diff options
Diffstat (limited to 'include/client')
-rw-r--r-- | include/client/buffer.h | 8 | ||||
-rw-r--r-- | include/client/client.h | 47 |
2 files changed, 55 insertions, 0 deletions
diff --git a/include/client/buffer.h b/include/client/buffer.h new file mode 100644 index 00000000..aa8d68a1 --- /dev/null +++ b/include/client/buffer.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _BUFFER_H | ||
2 | #define _BUFFER_H | ||
3 | |||
4 | #include "client/client.h" | ||
5 | |||
6 | struct buffer *get_next_buffer(struct client_state *state); | ||
7 | |||
8 | #endif | ||
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 | |||
10 | struct output_state { | ||
11 | struct wl_output *output; | ||
12 | uint32_t flags; | ||
13 | uint32_t width, height; | ||
14 | }; | ||
15 | |||
16 | struct 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 | |||
25 | struct 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 | |||
42 | struct client_state *client_setup(uint32_t width, uint32_t height); | ||
43 | void client_teardown(struct client_state *state); | ||
44 | int client_prerender(struct client_state *state); | ||
45 | int client_render(struct client_state *state); | ||
46 | |||
47 | #endif | ||