diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-06-23 15:10:52 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-06-26 10:26:55 -0400 |
commit | f5b7bc033eced5c1ba3ba63b52985fb9b0e9f618 (patch) | |
tree | df732b8b07009590cc6d2cfa2f23cceb794f3f3a /include | |
parent | 8a18cf456aac6fee666ccb4e7df0a9eb6c059756 (diff) |
Add wlr_wl_compositor and remove wlr_wl_shm
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_output.h | 3 | ||||
-rw-r--r-- | include/wlr/wayland/wlr_compositor.h | 25 | ||||
-rw-r--r-- | include/wlr/wlcore/wl_shm.h | 13 |
3 files changed, 27 insertions, 14 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 71e1d0fe..6c7c320d 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -19,8 +19,9 @@ struct wlr_output_state; struct wlr_output { const struct wlr_output_impl *impl; struct wlr_output_state *state; + void *user_data; struct wl_global *wl_global; - struct wl_list resource_list; + struct wl_list wl_resources; uint32_t flags; char name[16]; diff --git a/include/wlr/wayland/wlr_compositor.h b/include/wlr/wayland/wlr_compositor.h new file mode 100644 index 00000000..2c2ade62 --- /dev/null +++ b/include/wlr/wayland/wlr_compositor.h @@ -0,0 +1,25 @@ +#ifndef _WLR_COMPOSITOR_H +#define _WLR_COMPOSITOR_H +#include <wayland-server.h> + +struct wlr_compositor_state; + +struct wlr_compositor { + struct wlr_compositor_state *state; + void *user_data; + struct wl_global *wl_global; + struct wl_list wl_resources; + + struct { + /** Emits a reference to the wl_resource just created */ + struct wl_signal bound; + /** Emits a reference to the wl_surface just created */ + struct wl_signal create_surface; + /** Emits a reference to the wl_region just created */ + struct wl_signal create_region; + } events; +}; + +struct wlr_compositor *wlr_compositor_init(struct wl_display *display); + +#endif diff --git a/include/wlr/wlcore/wl_shm.h b/include/wlr/wlcore/wl_shm.h deleted file mode 100644 index 12c2ef78..00000000 --- a/include/wlr/wlcore/wl_shm.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _WLR_WLCORE_WL_SHM_H -#define _WLR_WLCORE_WL_SHM_H -#include <wayland-server-core.h> -#include <wlr/render.h> - -struct wlr_wl_shm; - -struct wlr_wl_shm *wlr_wl_shm_init(struct wl_display *display); -void wlr_wl_shm_add_format(struct wlr_wl_shm *shm, enum wl_shm_format format); -void wlr_wl_shm_add_renderer_formats( - struct wlr_wl_shm *shm, struct wlr_renderer *renderer); - -#endif |