aboutsummaryrefslogtreecommitdiffstats
path: root/include/pugl/pugl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/pugl/pugl.h')
-rw-r--r--include/pugl/pugl.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h
index 779cc80..17fa3de 100644
--- a/include/pugl/pugl.h
+++ b/include/pugl/pugl.h
@@ -859,10 +859,11 @@ typedef enum {
PUGL_RESIZABLE, ///< True if view should be resizable
PUGL_IGNORE_KEY_REPEAT, ///< True if key repeat events are ignored
PUGL_REFRESH_RATE, ///< Refresh rate in Hz
-
- PUGL_NUM_VIEW_HINTS
} PuglViewHint;
+/// The number of #PuglViewHint values
+#define PUGL_NUM_VIEW_HINTS ((unsigned)PUGL_REFRESH_RATE + 1u)
+
/// A special view hint value
typedef enum {
PUGL_DONT_CARE = -1, ///< Use best available value
@@ -907,6 +908,9 @@ typedef enum {
PUGL_MAX_ASPECT
} PuglSizeHint;
+/// The number of #PuglSizeHint values
+#define PUGL_NUM_SIZE_HINTS ((unsigned)PUGL_MAX_ASPECT + 1u)
+
/// A function called when an event occurs
typedef PuglStatus (*PuglEventFunc)(PuglView* view, const PuglEvent* event);
@@ -1260,6 +1264,9 @@ typedef enum {
PUGL_CURSOR_UP_DOWN, ///< Up/down arrow for vertical resize
} PuglCursor;
+/// The number of #PuglCursor values
+#define PUGL_NUM_CURSORS ((unsigned)PUGL_CURSOR_UP_DOWN + 1u)
+
/**
Grab the keyboard input focus.