diff options
| author | coasteen <coasteen@proton.me> | 2026-07-09 10:42:28 +0330 |
|---|---|---|
| committer | coasteen <coasteen@proton.me> | 2026-07-09 10:42:28 +0330 |
| commit | 8cbadb61604667b407b53ee1258433994fa4765a (patch) | |
| tree | 97765fb29418fd6278fcb4cbb9760893afaf7a58 /wmenu/pool-buffer.h | |
Diffstat (limited to 'wmenu/pool-buffer.h')
| -rwxr-xr-x | wmenu/pool-buffer.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/wmenu/pool-buffer.h b/wmenu/pool-buffer.h new file mode 100755 index 0000000..e07802d --- /dev/null +++ b/wmenu/pool-buffer.h @@ -0,0 +1,26 @@ +/* Taken from sway. MIT licensed */ +#ifndef WMENU_POOL_BUFFER_H +#define WMENU_POOL_BUFFER_H + +#include <cairo.h> +#include <pango/pangocairo.h> +#include <stdbool.h> +#include <stdint.h> +#include <wayland-client.h> + +struct pool_buffer { + struct wl_buffer *buffer; + cairo_surface_t *surface; + cairo_t *cairo; + PangoContext *pango; + size_t size; + int32_t width, height, scale; + bool busy; + void *data; +}; + +struct pool_buffer *get_next_buffer(struct wl_shm *shm, + struct pool_buffer pool[static 2], int32_t width, int32_t height, int32_t scale); +void destroy_buffer(struct pool_buffer *buffer); + +#endif |
