summaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
authorLeon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de>2020-09-24 18:01:28 +0200
committerLeon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de>2020-09-24 18:01:28 +0200
commit9ff4f4959b8d78104fa4defb3c4cea9606e3c484 (patch)
treeac80aef7e1caff0d0af491ea4816ca63706a8116 /src/buffer.h
downloadwlclock-9ff4f4959b8d78104fa4defb3c4cea9606e3c484.tar.gz
wlclock-9ff4f4959b8d78104fa4defb3c4cea9606e3c484.tar.bz2
Init
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h
new file mode 100644
index 0000000..3e82541
--- /dev/null
+++ b/src/buffer.h
@@ -0,0 +1,25 @@
+#ifndef WLCLOCK_BUFFER_H
+#define WLCLOCK_BUFFER_H
+
+#include<stdint.h>
+#include<stdbool.h>
+#include<cairo/cairo.h>
+#include<wayland-client.h>
+
+struct Wlclock_buffer
+{
+ struct wl_buffer *buffer;
+ cairo_surface_t *surface;
+ cairo_t *cairo;
+ uint32_t w;
+ uint32_t h;
+ void *memory_object;
+ size_t size;
+ bool busy;
+};
+
+bool next_buffer (struct Wlclock_buffer **buffer, struct wl_shm *shm,
+ struct Wlclock_buffer buffers[static 2], uint32_t w, uint32_t h);
+void finish_buffer (struct Wlclock_buffer *buffer);
+
+#endif