diff options
Diffstat (limited to 'src/wlstate.cc')
| -rw-r--r-- | src/wlstate.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/wlstate.cc b/src/wlstate.cc new file mode 100644 index 0000000..e78aad1 --- /dev/null +++ b/src/wlstate.cc @@ -0,0 +1,19 @@ +#include "wlstate.h" +#include "utils.h" + +bool wayc_wl_state_init(struct wl_state_s *state) { + wayc_assert(state != NULL); + + wl_display_t display = wl_display_connect(NULL); + if (display == NULL) + return false; + + state->display = display; + return true; +} + +void wayc_wl_state_deinit(struct wl_state_s *state) { + wayc_assert(state != NULL); + + wl_display_disconnect(state->display); +} |
