diff options
author | 2015-11-18 08:22:37 -0500 | |
---|---|---|
committer | 2015-11-18 08:22:53 -0500 | |
commit | 399220f14bc60581490936d9f1a0fd353bfc9ef5 (patch) | |
tree | ec086840b4f340029e775d324279730fda64a9ad /include/client.h | |
parent | Track pid of child process from exec (diff) | |
download | sway-399220f14bc60581490936d9f1a0fd353bfc9ef5.tar.gz sway-399220f14bc60581490936d9f1a0fd353bfc9ef5.tar.zst sway-399220f14bc60581490936d9f1a0fd353bfc9ef5.zip |
Fix up wayland client implementation
Now it receives frame callbacks and renders properly, and is double
buffered and such.
Diffstat (limited to 'include/client.h')
-rw-r--r-- | include/client.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/include/client.h b/include/client.h deleted file mode 100644 index f10e6b1a..00000000 --- a/include/client.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
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 | int width, height; | ||
14 | }; | ||
15 | |||
16 | struct buffer { | ||
17 | struct wl_buffer *buffer; | ||
18 | struct wl_shm_pool *pool; | ||
19 | uint32_t width, height; | ||
20 | }; | ||
21 | |||
22 | struct client_state { | ||
23 | struct wl_compositor *compositor; | ||
24 | struct wl_display *display; | ||
25 | struct wl_pointer *pointer; | ||
26 | struct wl_seat *seat; | ||
27 | struct wl_shell *shell; | ||
28 | struct wl_shm *shm; | ||
29 | struct buffer *buffer; | ||
30 | struct wl_surface *surface; | ||
31 | struct wl_shell_surface *shell_surface; | ||
32 | struct wl_callback *frame_cb; | ||
33 | bool busy; | ||
34 | cairo_t *cairo; | ||
35 | cairo_surface_t *cairo_surface; | ||
36 | PangoContext *pango; | ||
37 | list_t *outputs; | ||
38 | }; | ||
39 | |||
40 | struct client_state *client_setup(void); | ||
41 | void client_teardown(struct client_state *state); | ||
42 | struct buffer *create_memory_pool(struct client_state *state, int32_t width, int32_t height, uint32_t format); | ||
43 | int client_prerender(struct client_state *state); | ||
44 | int client_render(struct client_state *state); | ||
45 | |||
46 | #endif | ||