aboutsummaryrefslogtreecommitdiff
path: root/include/cursor.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-03-09 16:59:09 +0100
committerdec05eba <dec05eba@protonmail.com>2024-03-09 16:59:09 +0100
commita3fedae32937f8965c9905e12633fa4de0c3658e (patch)
treea8596397292e6fc674f8fe3c8f09f17b63b0d646 /include/cursor.h
parent5e05bbbbcbd45298c48af2b56a33da93d15b8f44 (diff)
Draw cursor in window capture
Diffstat (limited to 'include/cursor.h')
-rw-r--r--include/cursor.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/cursor.h b/include/cursor.h
new file mode 100644
index 0000000..b1ec6bd
--- /dev/null
+++ b/include/cursor.h
@@ -0,0 +1,26 @@
+#ifndef GSR_CURSOR_H
+#define GSR_CURSOR_H
+
+#include "egl.h"
+#include "vec2.h"
+
+typedef struct {
+ gsr_egl *egl;
+ Display *display;
+ int x_fixes_event_base;
+
+ unsigned int texture_id;
+ vec2i size;
+ vec2i hotspot;
+ vec2i position;
+
+ bool cursor_image_set;
+} gsr_cursor;
+
+int gsr_cursor_init(gsr_cursor *self, gsr_egl *egl, Display *display);
+void gsr_cursor_deinit(gsr_cursor *self);
+
+void gsr_cursor_update(gsr_cursor *self, XEvent *xev);
+void gsr_cursor_tick(gsr_cursor *self, Window relative_to);
+
+#endif /* GSR_CURSOR_H */