pool-buffer.h - wmenu - [fork] efficient dynamic menu for wayland
(HTM) git clone https://git.drkhsh.at/wmenu.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
pool-buffer.h (597B)
---
1 /* Taken from sway. MIT licensed */
2 #ifndef WMENU_POOL_BUFFER_H
3 #define WMENU_POOL_BUFFER_H
4
5 #include <cairo.h>
6 #include <pango/pangocairo.h>
7 #include <stdbool.h>
8 #include <stdint.h>
9 #include <wayland-client.h>
10
11 struct pool_buffer {
12 struct wl_buffer *buffer;
13 cairo_surface_t *surface;
14 cairo_t *cairo;
15 PangoContext *pango;
16 size_t size;
17 int32_t width, height, scale;
18 bool busy;
19 void *data;
20 };
21
22 struct pool_buffer *get_next_buffer(struct wl_shm *shm,
23 struct pool_buffer pool[static 2], int32_t width, int32_t height, int32_t scale);
24 void destroy_buffer(struct pool_buffer *buffer);
25
26 #endif