aboutsummaryrefslogtreecommitdiff
path: root/cursor-shape.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-07-03 13:01:49 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-07-03 13:01:49 +0000
commite00a20465b71a9c546c794e0f572b0db14810ffe (patch)
treeb2364ce0f323b3e7f339f7a68428f7fbc4c39328 /cursor-shape.h
parentwayland: handle enum value XDG_TOPLEVEL_STATE_SUSPENDED (diff)
parentmeson: move cursor-shape.{c,h} from ‘foot’ binary to vtlib (diff)
Merge branch 'cursor-shape'
Closes #1379
Diffstat (limited to 'cursor-shape.h')
-rw-r--r--cursor-shape.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/cursor-shape.h b/cursor-shape.h
new file mode 100644
index 00000000..a9619553
--- /dev/null
+++ b/cursor-shape.h
@@ -0,0 +1,34 @@
+#pragma once
+
+#if defined(HAVE_CURSOR_SHAPE)
+#include <cursor-shape-v1.h>
+#endif
+
+enum cursor_shape {
+ CURSOR_SHAPE_NONE,
+ CURSOR_SHAPE_CUSTOM,
+ CURSOR_SHAPE_HIDDEN,
+
+ CURSOR_SHAPE_LEFT_PTR,
+ CURSOR_SHAPE_TEXT,
+ CURSOR_SHAPE_TEXT_FALLBACK,
+ CURSOR_SHAPE_TOP_LEFT_CORNER,
+ CURSOR_SHAPE_TOP_RIGHT_CORNER,
+ CURSOR_SHAPE_BOTTOM_LEFT_CORNER,
+ CURSOR_SHAPE_BOTTOM_RIGHT_CORNER,
+ CURSOR_SHAPE_LEFT_SIDE,
+ CURSOR_SHAPE_RIGHT_SIDE,
+ CURSOR_SHAPE_TOP_SIDE,
+ CURSOR_SHAPE_BOTTOM_SIDE,
+
+ CURSOR_SHAPE_COUNT,
+};
+
+const char *cursor_shape_to_string(enum cursor_shape shape);
+
+#if defined(HAVE_CURSOR_SHAPE)
+enum wp_cursor_shape_device_v1_shape cursor_shape_to_server_shape(
+ enum cursor_shape shape);
+enum wp_cursor_shape_device_v1_shape cursor_string_to_server_shape(
+ const char *xcursor);
+#endif