diff options
author | David Robillard <d@drobilla.net> | 2022-06-07 21:19:26 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-06-07 21:19:26 -0400 |
commit | 5076f59694e33d1099511d20ef72f4fc6cfa87cd (patch) | |
tree | 28717b0445b72a5031985ebb6820a7d355609abf /include/pugl | |
parent | 6115f80dfb76ffbdeeacab5fc33ea4fb5eb677fd (diff) | |
download | pugl-5076f59694e33d1099511d20ef72f4fc6cfa87cd.tar.gz pugl-5076f59694e33d1099511d20ef72f4fc6cfa87cd.tar.bz2 pugl-5076f59694e33d1099511d20ef72f4fc6cfa87cd.zip |
Use a consistent scheme for enum sizes
Diffstat (limited to 'include/pugl')
-rw-r--r-- | include/pugl/pugl.h | 11 |
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. |