diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-27 15:25:25 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-28 14:25:19 -0400 |
commit | 632bb948b7ffbb08a6e965dabf88347afd0a1fa8 (patch) | |
tree | cbd9d4e4e3a7c605d2b0a5e3e66ce35554a74c4b /include/buffer_pool.h | |
parent | Add client protocols and swaybg skeleton (diff) | |
download | sway-632bb948b7ffbb08a6e965dabf88347afd0a1fa8.tar.gz sway-632bb948b7ffbb08a6e965dabf88347afd0a1fa8.tar.zst sway-632bb948b7ffbb08a6e965dabf88347afd0a1fa8.zip |
Add solid-color rendering to swaybg
Diffstat (limited to 'include/buffer_pool.h')
-rw-r--r-- | include/buffer_pool.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/buffer_pool.h b/include/buffer_pool.h new file mode 100644 index 00000000..cdebd64d --- /dev/null +++ b/include/buffer_pool.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef _SWAY_BUFFERS_H | ||
2 | #define _SWAY_BUFFERS_H | ||
3 | #include <cairo/cairo.h> | ||
4 | #include <pango/pangocairo.h> | ||
5 | #include <stdbool.h> | ||
6 | #include <stdint.h> | ||
7 | #include <wayland-client.h> | ||
8 | |||
9 | struct pool_buffer { | ||
10 | struct wl_buffer *buffer; | ||
11 | cairo_surface_t *surface; | ||
12 | cairo_t *cairo; | ||
13 | PangoContext *pango; | ||
14 | uint32_t width, height; | ||
15 | bool busy; | ||
16 | }; | ||
17 | |||
18 | struct pool_buffer *get_next_buffer(struct wl_shm *shm, | ||
19 | struct pool_buffer pool[static 2], uint32_t width, uint32_t height); | ||
20 | |||
21 | #endif | ||