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