From 3754f6708093519211aae1073eb60ea5bb88bcbf Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 18 Mar 2020 13:18:41 +0100 Subject: Reorder event struct definitions to match PuglEventType --- pugl/pugl.h | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'pugl') diff --git a/pugl/pugl.h b/pugl/pugl.h index 0acf08e..f1ddfdb 100644 --- a/pugl/pugl.h +++ b/pugl/pugl.h @@ -235,21 +235,6 @@ typedef struct { PuglEventFlags flags; ///< Bitwise OR of #PuglEventFlag values } PuglEventAny; -/** - Button press or release event. -*/ -typedef struct { - PuglEventType type; ///< #PUGL_BUTTON_PRESS or #PUGL_BUTTON_RELEASE - PuglEventFlags flags; ///< Bitwise OR of #PuglEventFlag values - double time; ///< Time in seconds - double x; ///< View-relative X coordinate - double y; ///< View-relative Y coordinate - double xRoot; ///< Root-relative X coordinate - double yRoot; ///< Root-relative Y coordinate - PuglMods state; ///< Bitwise OR of #PuglMod flags - uint32_t button; ///< Button number starting from 1 -} PuglEventButton; - /** Window resize or move event. @@ -284,6 +269,18 @@ typedef struct { int count; ///< Number of expose events to follow } PuglEventExpose; +/** + Keyboard focus event. + + This event is sent whenever the view gains or loses the keyboard focus. The + view with the keyboard focus will receive any key press or release events. +*/ +typedef struct { + PuglEventType type; ///< #PUGL_FOCUS_IN or #PUGL_FOCUS_OUT + PuglEventFlags flags; ///< Bitwise OR of #PuglEventFlag values + bool grab; ///< True iff this is a grab/ungrab event +} PuglEventFocus; + /** Key press or release event. @@ -358,6 +355,21 @@ typedef struct { PuglCrossingMode mode; ///< Reason for crossing } PuglEventCrossing; +/** + Button press or release event. +*/ +typedef struct { + PuglEventType type; ///< #PUGL_BUTTON_PRESS or #PUGL_BUTTON_RELEASE + PuglEventFlags flags; ///< Bitwise OR of #PuglEventFlag values + double time; ///< Time in seconds + double x; ///< View-relative X coordinate + double y; ///< View-relative Y coordinate + double xRoot; ///< Root-relative X coordinate + double yRoot; ///< Root-relative Y coordinate + PuglMods state; ///< Bitwise OR of #PuglMod flags + uint32_t button; ///< Button number starting from 1 +} PuglEventButton; + /** Pointer motion event. */ @@ -396,18 +408,6 @@ typedef struct { double dy; ///< Scroll Y distance in lines } PuglEventScroll; -/** - Keyboard focus event. - - This event is sent whenever the view gains or loses the keyboard focus. The - view with the keyboard focus will receive any key press or release events. -*/ -typedef struct { - PuglEventType type; ///< #PUGL_FOCUS_IN or #PUGL_FOCUS_OUT - PuglEventFlags flags; ///< Bitwise OR of #PuglEventFlag values - bool grab; ///< True iff this is a grab/ungrab event -} PuglEventFocus; - /** Custom client message event. -- cgit v1.2.1