File: pool-buffer.h

package info (click to toggle)
swaybg 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 160 kB
  • sloc: ansic: 972; xml: 240; makefile: 6
file content (20 lines) | stat: -rw-r--r-- 435 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef _SWAY_BUFFERS_H
#define _SWAY_BUFFERS_H
#include <cairo.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;
	void *data;
	size_t size;
};

bool create_buffer(struct pool_buffer *buffer, struct wl_shm *shm,
		int32_t width, int32_t height, uint32_t format);
void destroy_buffer(struct pool_buffer *buffer);

#endif