diff include/SDL_events.h @ 4465:3e69e077cb95

Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API. Plus, this lets me start implementing cursor support.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 09 May 2010 20:47:22 -0700
parents e953700da4ca
children 524dfefd554c
line wrap: on
line diff
--- a/include/SDL_events.h	Sun May 09 19:55:28 2010 -0700
+++ b/include/SDL_events.h	Sun May 09 20:47:22 2010 -0700
@@ -75,9 +75,13 @@
     SDL_MOUSEBUTTONUP,          /**< Mouse button released */
     SDL_MOUSEWHEEL,             /**< Mouse wheel motion */
 
-    /* Tablet events */
-    SDL_PROXIMITYIN    = 0x500, /**< Proximity In event */
-    SDL_PROXIMITYOUT,           /**< Proximity Out event */
+    /* Tablet or multiple mice input device events */
+    SDL_INPUTMOTION    = 0x500, /**< Input moved */
+    SDL_INPUTBUTTONDOWN,        /**< Input button pressed */
+    SDL_INPUTBUTTONUP,          /**< Input button released */
+    SDL_INPUTWHEEL,             /**< Input wheel motion */
+    SDL_INPUTPROXIMITYIN,       /**< Input pen entered proximity */
+    SDL_INPUTPROXIMITYOUT,      /**< Input pen left proximity */
 
     /* Joystick events */
     SDL_JOYAXISMOTION  = 0x600, /**< Joystick axis motion */
@@ -124,10 +128,10 @@
 {
     Uint32 type;        /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
     Uint32 windowID;    /**< The window with keyboard focus, if any */
-    Uint8 which;        /**< The keyboard device index */
     Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
     Uint8 padding1;
     Uint8 padding2;
+    Uint8 padding3;
     SDL_keysym keysym;  /**< The key that was pressed or released */
 } SDL_KeyboardEvent;
 
@@ -139,7 +143,6 @@
 {
     Uint32 type;                                /**< ::SDL_TEXTEDITING */
     Uint32 windowID;                            /**< The window with keyboard focus, if any */
-    Uint8 which;                                /**< The keyboard device index */
     char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE];  /**< The editing text */
     int start;                                  /**< The start cursor of selected editing text */
     int length;                                 /**< The length of selected editing text */
@@ -154,10 +157,6 @@
 {
     Uint32 type;                              /**< ::SDL_TEXTINPUT */
     Uint32 windowID;                          /**< The window with keyboard focus, if any */
-    Uint8 which;                              /**< The keyboard device index */
-    Uint8 padding1;
-    Uint8 padding2;
-    Uint8 padding3;
     char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];  /**< The input text */
 } SDL_TextInputEvent;
 
@@ -168,20 +167,12 @@
 {
     Uint32 type;        /**< ::SDL_MOUSEMOTION */
     Uint32 windowID;    /**< The window with mouse focus, if any */
-    Uint8 which;        /**< The mouse device index */
     Uint8 state;        /**< The current button state */
     Uint8 padding1;
     Uint8 padding2;
+    Uint8 padding3;
     int x;              /**< X coordinate, relative to window */
     int y;              /**< Y coordinate, relative to window */
-    int z;              /**< Z coordinate, for future use */
-    int pressure;       /**< Pressure reported by tablets */
-    int pressure_max;   /**< Maximum value of the pressure reported by the device */
-    int pressure_min;   /**< Minimum value of the pressure reported by the device */
-    int rotation;       /**< For future use */
-    int tilt_x;         /**< For future use */
-    int tilt_y;         /**< For future use */
-    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_MouseMotionEvent;
@@ -193,10 +184,10 @@
 {
     Uint32 type;        /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
     Uint32 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 */
     Uint8 padding1;
+    Uint8 padding2;
     int x;              /**< X coordinate, relative to window */
     int y;              /**< Y coordinate, relative to window */
 } SDL_MouseButtonEvent;
@@ -208,31 +199,11 @@
 {
     Uint32 type;        /**< ::SDL_MOUSEWHEEL */
     Uint32 windowID;    /**< The window with mouse focus, if any */
-    Uint8 which;        /**< The mouse device index */
-    Uint8 padding1;
-    Uint8 padding2;
-    Uint8 padding3;
     int x;              /**< The amount scrolled horizontally */
     int y;              /**< The amount scrolled vertically */
 } SDL_MouseWheelEvent;
 
 /**
- * \brief Tablet pen proximity event
- */
-typedef struct SDL_ProximityEvent
-{
-    Uint32 type;        /**< ::SDL_PROXIMITYIN or ::SDL_PROXIMITYOUT */
-    Uint32 windowID;    /**< The associated window */
-    Uint8 which;
-    Uint8 padding1;
-    Uint8 padding2;
-    Uint8 padding3;
-    int cursor;
-    int x;
-    int y;
-} SDL_ProximityEvent;
-
-/**
  *  \brief Joystick axis motion event structure (event.jaxis.*)
  */
 typedef struct SDL_JoyAxisEvent
@@ -371,7 +342,6 @@
     SDL_QuitEvent quit;             /**< Quit request event data */
     SDL_UserEvent user;             /**< Custom event data */
     SDL_SysWMEvent syswm;           /**< System dependent window event data */
-    SDL_ProximityEvent proximity;   /**< Proximity In or Out event */
 
     /** Temporarily here for backwards compatibility */
     /*@{*/