include/SDL_events.h
changeset 3191 91b335df6fc8
parent 3167 0c85abc61e47
child 3280 00cace2d9080
--- a/include/SDL_events.h	Wed Jun 10 13:54:13 2009 +0000
+++ b/include/SDL_events.h	Wed Jun 10 14:00:21 2009 +0000
@@ -128,10 +128,10 @@
 typedef struct SDL_WindowEvent
 {
     Uint8 type;             /**< SDL_WINDOWEVENT */
+    SDL_WindowID windowID;  /**< The associated window */
     Uint8 event;            /**< SDL_WindowEventID */
     int data1;              /**< event dependent data */
     int data2;              /**< event dependent data */
-    SDL_WindowID windowID;  /**< The associated window */
 } SDL_WindowEvent;
 
 /**
@@ -142,10 +142,10 @@
 typedef struct SDL_KeyboardEvent
 {
     Uint8 type;             /**< SDL_KEYDOWN or SDL_KEYUP */
+    SDL_WindowID windowID;  /**< The window with keyboard focus, if any */
     Uint8 which;            /**< The keyboard device index */
     Uint8 state;            /**< SDL_PRESSED or SDL_RELEASED */
     SDL_keysym keysym;      /**< The key that was pressed or released */
-    SDL_WindowID windowID;  /**< The window with keyboard focus, if any */
 } SDL_KeyboardEvent;
 
 /**
@@ -157,9 +157,9 @@
 typedef struct SDL_TextInputEvent
 {
     Uint8 type;                               /**< SDL_TEXTINPUT */
+    SDL_WindowID windowID;                    /**< The window with keyboard focus, if any */
     Uint8 which;                              /**< The keyboard device index */
     char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];  /**< The input text */
-    SDL_WindowID windowID;                    /**< The window with keyboard focus, if any */
 } SDL_TextInputEvent;
 
 /**
@@ -170,6 +170,7 @@
 typedef struct SDL_MouseMotionEvent
 {
     Uint8 type;             /**< SDL_MOUSEMOTION */
+    SDL_WindowID windowID;  /**< The window with mouse focus, if any */
     Uint8 which;            /**< The mouse device index */
     Uint8 state;            /**< The current button state */
     int x;                  /**< X coordinate, relative to window */
@@ -183,7 +184,6 @@
     int cursor;             /**< The cursor being used in the event */
     int xrel;               /**< The relative motion in the X direction */
     int yrel;               /**< The relative motion in the Y direction */
-    SDL_WindowID windowID;  /**< The window with mouse focus, if any */
 } SDL_MouseMotionEvent;
 
 /**
@@ -194,12 +194,12 @@
 typedef struct SDL_MouseButtonEvent
 {
     Uint8 type;             /**< SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP */
+    SDL_WindowID windowID;  /**< The window with mouse focus, if any */
     Uint8 which;            /**< The mouse device index */
     Uint8 button;           /**< The mouse button index */
     Uint8 state;            /**< SDL_PRESSED or SDL_RELEASED */
     int x;                  /**< X coordinate, relative to window */
     int y;                  /**< Y coordinate, relative to window */
-    SDL_WindowID windowID;  /**< The window with mouse focus, if any */
 } SDL_MouseButtonEvent;
 
 /**
@@ -210,10 +210,10 @@
 typedef struct SDL_MouseWheelEvent
 {
     Uint8 type;             /**< SDL_MOUSEWHEEL */
+    SDL_WindowID windowID;  /**< The window with mouse focus, if any */
     Uint8 which;            /**< The mouse device index */
     int x;                  /**< The amount scrolled horizontally */
     int y;                  /**< The amount scrolled vertically */
-    SDL_WindowID windowID;  /**< The window with mouse focus, if any */
 } SDL_MouseWheelEvent;
 
 /**
@@ -292,10 +292,10 @@
 typedef struct SDL_UserEvent
 {
     Uint8 type;             /**< SDL_USEREVENT through SDL_NUMEVENTS-1 */
+    SDL_WindowID windowID;  /**< The associated window if any*/
     int code;               /**< User defined event code */
     void *data1;            /**< User defined data pointer */
     void *data2;            /**< User defined data pointer */
-    SDL_WindowID windowID;  /**< The associated window if any*/
 } SDL_UserEvent;
 
 /**
@@ -316,6 +316,7 @@
 typedef struct SDL_ProximityEvent
 {
     Uint8 type;
+    SDL_WindowID windowID;  /**< The associated window */
     Uint8 which;
     int cursor;
     int x;