aboutsummaryrefslogtreecommitdiffstats
path: root/pugl
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-18 13:18:41 +0100
committerDavid Robillard <d@drobilla.net>2020-03-18 13:18:41 +0100
commit3754f6708093519211aae1073eb60ea5bb88bcbf (patch)
tree24bbafd8848861d2b3e1ecd3db6313fc8d4a4e36 /pugl
parentba4e39fd54c19798713055e3cbdb4e6f989e135b (diff)
downloadpugl-3754f6708093519211aae1073eb60ea5bb88bcbf.tar.gz
pugl-3754f6708093519211aae1073eb60ea5bb88bcbf.tar.bz2
pugl-3754f6708093519211aae1073eb60ea5bb88bcbf.zip
Reorder event struct definitions to match PuglEventType
Diffstat (limited to 'pugl')
-rw-r--r--pugl/pugl.h54
1 files changed, 27 insertions, 27 deletions
diff --git a/pugl/pugl.h b/pugl/pugl.h
index 0acf08e..f1ddfdb 100644
--- a/pugl/pugl.h
+++ b/pugl/pugl.h
@@ -236,21 +236,6 @@ typedef struct {
} 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.
A configure event is sent whenever the window is resized or moved. When a
@@ -285,6 +270,18 @@ typedef struct {
} 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.
This event represents low-level key presses and releases. This can be used
@@ -359,6 +356,21 @@ typedef struct {
} 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.
*/
typedef struct {
@@ -397,18 +409,6 @@ typedef struct {
} 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.
This can be used to send a custom message to a view, which is delivered via