summaryrefslogtreecommitdiff
path: root/src/wlstate.h
blob: 3b863452053a2321b668c6848a24f4fc36d7cc0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include "utils.h"

enum wlstate_error_e {
  WLSTATE_ERROR_NONE = 0,
  WLSTATE_ERROR_CONNECTION,
  WLSTATE_ERROR_REGISTRY,
};

struct wlstate_s {
  wl_display_t display;
  wl_registry_t registry;
  wl_compositor_t compositor;
  xdg_wm_base_t wm_base;
  i32 eventfd;
};

enum wlstate_error_e wayc_wlstate_init(struct wlstate_s* state);
void wayc_wlstate_deinit(struct wlstate_s* state);
void wayc_wlstate_update(struct wlstate_s* state);