summaryrefslogtreecommitdiffstats
path: root/include/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/client.h')
-rw-r--r--include/client.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/client.h b/include/client.h
new file mode 100644
index 00000000..ec3537ca
--- /dev/null
+++ b/include/client.h
@@ -0,0 +1,43 @@
1#ifndef _CLIENT_H
2#define _CLIENT_H
3
4#include <wayland-client.h>
5#include <cairo/cairo.h>
6#include <pango/pangocairo.h>
7#include "list.h"
8
9struct output_state {
10 struct wl_output *output;
11 uint32_t flags;
12 int width, height;
13};
14
15struct buffer {
16 struct wl_buffer *buffer;
17 struct wl_shm_pool *pool;
18 uint32_t width, height;
19};
20
21struct client_state {
22 struct wl_compositor *compositor;
23 struct wl_display *display;
24 struct wl_pointer *pointer;
25 struct wl_seat *seat;
26 struct wl_shell *shell;
27 struct wl_shm *shm;
28 struct buffer *buffer;
29 struct wl_surface *surface;
30 struct wl_shell_surface *shell_surface;
31 cairo_t *cairo;
32 cairo_surface_t *cairo_surface;
33 PangoContext *pango;
34 list_t *outputs;
35};
36
37struct client_state *client_setup(void);
38void client_teardown(struct client_state *state);
39struct buffer *create_memory_pool(struct client_state *state, int32_t width, int32_t height, uint32_t format);
40int client_prerender(struct client_state *state);
41int client_render(struct client_state *state);
42
43#endif