summaryrefslogtreecommitdiffstats
path: root/include/client/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/client/client.h')
-rw-r--r--include/client/client.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/client/client.h b/include/client/client.h
new file mode 100644
index 00000000..bac2c1a6
--- /dev/null
+++ b/include/client/client.h
@@ -0,0 +1,47 @@
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 <stdbool.h>
8#include "list.h"
9
10struct output_state {
11 struct wl_output *output;
12 uint32_t flags;
13 uint32_t width, height;
14};
15
16struct buffer {
17 struct wl_buffer *buffer;
18 cairo_surface_t *surface;
19 cairo_t *cairo;
20 PangoContext *pango;
21 uint32_t width, height;
22 bool busy;
23};
24
25struct client_state {
26 struct wl_compositor *compositor;
27 struct wl_display *display;
28 struct wl_pointer *pointer;
29 struct wl_seat *seat;
30 struct wl_shell *shell;
31 struct wl_shm *shm;
32 struct buffer buffers[2];
33 struct buffer *buffer;
34 struct wl_surface *surface;
35 struct wl_shell_surface *shell_surface;
36 struct wl_callback *frame_cb;
37 uint32_t width, height;
38 cairo_t *cairo;
39 list_t *outputs;
40};
41
42struct client_state *client_setup(uint32_t width, uint32_t height);
43void client_teardown(struct client_state *state);
44int client_prerender(struct client_state *state);
45int client_render(struct client_state *state);
46
47#endif