aboutsummaryrefslogtreecommitdiff
path: root/examples/compositor.h
blob: 2847808f8a4e504a714a821f7be501792cbc34ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef _EXAMPLE_COMPOSITOR_H
#define _EXAMPLE_COMPOSITOR_H
#include <wayland-server.h>
#include <wlr/render.h>

struct wl_compositor_state {
	struct wl_global *wl_global;
	struct wl_list wl_resources;
	struct wlr_renderer *renderer;
	struct wl_list surfaces;
	struct wl_listener destroy_surface_listener;
};

void wl_compositor_init(struct wl_display *display,
		struct wl_compositor_state *state, struct wlr_renderer *renderer);

struct wlr_surface;
void wl_compositor_surface_destroyed(struct wl_compositor_state *compositor,
		struct wlr_surface *surface);

struct wl_shell_state {
	struct wl_global *wl_global;
	struct wl_list wl_resources;
};

struct xdg_shell_state {
	struct wl_global *wl_global;
	struct wl_list wl_resources;
	struct wl_display *display;
};

void wl_shell_init(struct wl_display *display,
		struct wl_shell_state *state);

void xdg_shell_init(struct wl_display *display,
		struct xdg_shell_state *state);

void xdg_shell_release(struct xdg_shell_state *state);

#endif