include/SDL_events.h
changeset 4429 faa9fc8e7f67
parent 3697 f7b03b6838cb
child 4434 5c64052fb476
     1.1 --- a/include/SDL_events.h	Wed Mar 10 15:07:20 2010 +0000
     1.2 +++ b/include/SDL_events.h	Thu Mar 25 01:08:26 2010 -0700
     1.3 @@ -54,83 +54,67 @@
     1.4   */
     1.5  typedef enum
     1.6  {
     1.7 -    SDL_NOEVENT = 0,            /**< Unused (do not remove) */
     1.8 -    SDL_WINDOWEVENT,            /**< Window state change */
     1.9 -    SDL_KEYDOWN,                /**< Keys pressed */
    1.10 +    SDL_FIRSTEVENT     = 0,     /**< Unused (do not remove) */
    1.11 +
    1.12 +    /* Application events */
    1.13 +    SDL_QUIT           = 0x100, /**< User-requested quit */
    1.14 +
    1.15 +    /* Window events */
    1.16 +    SDL_WINDOWEVENT    = 0x200, /**< Window state change */
    1.17 +    SDL_SYSWMEVENT,             /**< System specific event */
    1.18 +
    1.19 +    /* Keyboard events */
    1.20 +    SDL_KEYDOWN        = 0x300, /**< Keys pressed */
    1.21      SDL_KEYUP,                  /**< Keys released */
    1.22      SDL_TEXTEDITING,            /**< Keyboard text editing (composition) */
    1.23      SDL_TEXTINPUT,              /**< Keyboard text input */
    1.24 -    SDL_MOUSEMOTION,            /**< Mouse moved */
    1.25 +
    1.26 +    /* Mouse events */
    1.27 +    SDL_MOUSEMOTION    = 0x400, /**< Mouse moved */
    1.28      SDL_MOUSEBUTTONDOWN,        /**< Mouse button pressed */
    1.29      SDL_MOUSEBUTTONUP,          /**< Mouse button released */
    1.30      SDL_MOUSEWHEEL,             /**< Mouse wheel motion */
    1.31 -    SDL_JOYAXISMOTION,          /**< Joystick axis motion */
    1.32 +
    1.33 +    /* Tablet events */
    1.34 +    SDL_PROXIMITYIN    = 0x500, /**< Proximity In event */
    1.35 +    SDL_PROXIMITYOUT,           /**< Proximity Out event */
    1.36 +
    1.37 +    /* Joystick events */
    1.38 +    SDL_JOYAXISMOTION  = 0x600, /**< Joystick axis motion */
    1.39      SDL_JOYBALLMOTION,          /**< Joystick trackball motion */
    1.40      SDL_JOYHATMOTION,           /**< Joystick hat position change */
    1.41      SDL_JOYBUTTONDOWN,          /**< Joystick button pressed */
    1.42      SDL_JOYBUTTONUP,            /**< Joystick button released */
    1.43 -    SDL_QUIT,                   /**< User-requested quit */
    1.44 -    SDL_SYSWMEVENT,             /**< System specific event */
    1.45 -    SDL_PROXIMITYIN,            /**< Proximity In event */
    1.46 -    SDL_PROXIMITYOUT,           /**< Proximity Out event */
    1.47 -    SDL_EVENT_RESERVED1,        /**< Reserved for future use... */
    1.48 -    SDL_EVENT_RESERVED2,        /**< Reserved for future use... */
    1.49 -    SDL_EVENT_RESERVED3,        /**< Reserved for future use... */
    1.50 -    /** Events ::SDL_USEREVENT through ::SDL_MAXEVENTS-1 are for your use */
    1.51 -    SDL_USEREVENT = 24,
    1.52 +
    1.53 +    /* Obsolete events */
    1.54 +    SDL_EVENT_COMPAT1 = 0x7000, /**< SDL 1.2 events for compatibility */
    1.55 +    SDL_EVENT_COMPAT2,
    1.56 +    SDL_EVENT_COMPAT3,
    1.57 +
    1.58 +    /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
    1.59 +     *  and should be allocated with SDL_RegisterEvents()
    1.60 +     */
    1.61 +    SDL_USEREVENT    = 0x8000,
    1.62 +
    1.63      /**
    1.64       *  This last event is only for bounding internal arrays
    1.65 -     *  It is the number of bits in the event mask datatype -- Uint32
    1.66       */
    1.67 -    SDL_NUMEVENTS = 32
    1.68 +    SDL_LASTEVENT    = 0xFFFF
    1.69  } SDL_EventType;
    1.70  
    1.71 -/*@{*/
    1.72 -#define SDL_EVENTMASK(X)	(1<<(X))
    1.73 -/**
    1.74 - * \brief Predefined event masks
    1.75 - */
    1.76 -typedef enum
    1.77 -{
    1.78 -    SDL_WINDOWEVENTMASK = SDL_EVENTMASK(SDL_WINDOWEVENT),
    1.79 -    SDL_KEYDOWNMASK = SDL_EVENTMASK(SDL_KEYDOWN),
    1.80 -    SDL_KEYUPMASK = SDL_EVENTMASK(SDL_KEYUP),
    1.81 -    SDL_KEYEVENTMASK = SDL_EVENTMASK(SDL_KEYDOWN) | SDL_EVENTMASK(SDL_KEYUP),
    1.82 -    SDL_TEXTEDITINGMASK = SDL_EVENTMASK(SDL_TEXTEDITING),
    1.83 -    SDL_TEXTINPUTMASK = SDL_EVENTMASK(SDL_TEXTINPUT),
    1.84 -    SDL_MOUSEMOTIONMASK = SDL_EVENTMASK(SDL_MOUSEMOTION),
    1.85 -    SDL_MOUSEBUTTONDOWNMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN),
    1.86 -    SDL_MOUSEBUTTONUPMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
    1.87 -    SDL_MOUSEWHEELMASK = SDL_EVENTMASK(SDL_MOUSEWHEEL),
    1.88 -    SDL_MOUSEEVENTMASK = SDL_EVENTMASK(SDL_MOUSEMOTION) |
    1.89 -        SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN) | SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
    1.90 -    SDL_JOYAXISMOTIONMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION),
    1.91 -    SDL_JOYBALLMOTIONMASK = SDL_EVENTMASK(SDL_JOYBALLMOTION),
    1.92 -    SDL_JOYHATMOTIONMASK = SDL_EVENTMASK(SDL_JOYHATMOTION),
    1.93 -    SDL_JOYBUTTONDOWNMASK = SDL_EVENTMASK(SDL_JOYBUTTONDOWN),
    1.94 -    SDL_JOYBUTTONUPMASK = SDL_EVENTMASK(SDL_JOYBUTTONUP),
    1.95 -    SDL_JOYEVENTMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION) |
    1.96 -        SDL_EVENTMASK(SDL_JOYBALLMOTION) |
    1.97 -        SDL_EVENTMASK(SDL_JOYHATMOTION) |
    1.98 -        SDL_EVENTMASK(SDL_JOYBUTTONDOWN) | SDL_EVENTMASK(SDL_JOYBUTTONUP),
    1.99 -    SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT),
   1.100 -    SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT),
   1.101 -    SDL_PROXIMITYINMASK = SDL_EVENTMASK(SDL_PROXIMITYIN),
   1.102 -    SDL_PROXIMITYOUTMASK = SDL_EVENTMASK(SDL_PROXIMITYOUT)
   1.103 -} SDL_EventMask;
   1.104 -#define SDL_ALLEVENTS		0xFFFFFFFF
   1.105 -/*@}*/
   1.106 -
   1.107  /**
   1.108   *  \brief Window state change event data (event.window.*)
   1.109   */
   1.110  typedef struct SDL_WindowEvent
   1.111  {
   1.112 -    Uint8 type;             /**< ::SDL_WINDOWEVENT */
   1.113 -    Uint32 windowID;        /**< The associated window */
   1.114 -    Uint8 event;            /**< ::SDL_WindowEventID */
   1.115 -    int data1;              /**< event dependent data */
   1.116 -    int data2;              /**< event dependent data */
   1.117 +    Uint32 type;        /**< ::SDL_WINDOWEVENT */
   1.118 +    Uint32 windowID;    /**< The associated window */
   1.119 +    Uint8 event;        /**< ::SDL_WindowEventID */
   1.120 +    Uint8 padding1;
   1.121 +    Uint8 padding2;
   1.122 +    Uint8 padding3;
   1.123 +    int data1;          /**< event dependent data */
   1.124 +    int data2;          /**< event dependent data */
   1.125  } SDL_WindowEvent;
   1.126  
   1.127  /**
   1.128 @@ -138,11 +122,13 @@
   1.129   */
   1.130  typedef struct SDL_KeyboardEvent
   1.131  {
   1.132 -    Uint8 type;             /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
   1.133 -    Uint32 windowID;        /**< The window with keyboard focus, if any */
   1.134 -    Uint8 which;            /**< The keyboard device index */
   1.135 -    Uint8 state;            /**< ::SDL_PRESSED or ::SDL_RELEASED */
   1.136 -    SDL_keysym keysym;      /**< The key that was pressed or released */
   1.137 +    Uint32 type;        /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
   1.138 +    Uint32 windowID;    /**< The window with keyboard focus, if any */
   1.139 +    Uint8 which;        /**< The keyboard device index */
   1.140 +    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
   1.141 +    Uint8 padding1;
   1.142 +    Uint8 padding2;
   1.143 +    SDL_keysym keysym;  /**< The key that was pressed or released */
   1.144  } SDL_KeyboardEvent;
   1.145  
   1.146  #define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
   1.147 @@ -151,7 +137,7 @@
   1.148   */
   1.149  typedef struct SDL_TextEditingEvent
   1.150  {
   1.151 -    Uint8 type;                                 /**< ::SDL_TEXTEDITING */
   1.152 +    Uint32 type;                                /**< ::SDL_TEXTEDITING */
   1.153      char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE];  /**< The editing text */
   1.154      int start;                                  /**< The start cursor of selected editing text */
   1.155      int length;                                 /**< The length of selected editing text */
   1.156 @@ -164,9 +150,12 @@
   1.157   */
   1.158  typedef struct SDL_TextInputEvent
   1.159  {
   1.160 -    Uint8 type;                               /**< ::SDL_TEXTINPUT */
   1.161 +    Uint32 type;                              /**< ::SDL_TEXTINPUT */
   1.162      Uint32 windowID;                          /**< The window with keyboard focus, if any */
   1.163      Uint8 which;                              /**< The keyboard device index */
   1.164 +    Uint8 padding1;
   1.165 +    Uint8 padding2;
   1.166 +    Uint8 padding3;
   1.167      char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];  /**< The input text */
   1.168  } SDL_TextInputEvent;
   1.169  
   1.170 @@ -175,22 +164,24 @@
   1.171   */
   1.172  typedef struct SDL_MouseMotionEvent
   1.173  {
   1.174 -    Uint8 type;             /**< ::SDL_MOUSEMOTION */
   1.175 -    Uint32 windowID;        /**< The window with mouse focus, if any */
   1.176 -    Uint8 which;            /**< The mouse device index */
   1.177 -    Uint8 state;            /**< The current button state */
   1.178 -    int x;                  /**< X coordinate, relative to window */
   1.179 -    int y;                  /**< Y coordinate, relative to window */
   1.180 -    int z;                  /**< Z coordinate, for future use */
   1.181 -    int pressure;           /**< Pressure reported by tablets */
   1.182 -    int pressure_max;       /**< Maximum value of the pressure reported by the device */
   1.183 -    int pressure_min;       /**< Minimum value of the pressure reported by the device */
   1.184 -    int rotation;           /**< For future use */
   1.185 -    int tilt_x;             /**< For future use */
   1.186 -    int tilt_y;             /**< For future use */
   1.187 -    int cursor;             /**< The cursor being used in the event */
   1.188 -    int xrel;               /**< The relative motion in the X direction */
   1.189 -    int yrel;               /**< The relative motion in the Y direction */
   1.190 +    Uint32 type;        /**< ::SDL_MOUSEMOTION */
   1.191 +    Uint32 windowID;    /**< The window with mouse focus, if any */
   1.192 +    Uint8 which;        /**< The mouse device index */
   1.193 +    Uint8 state;        /**< The current button state */
   1.194 +    Uint8 padding1;
   1.195 +    Uint8 padding2;
   1.196 +    int x;              /**< X coordinate, relative to window */
   1.197 +    int y;              /**< Y coordinate, relative to window */
   1.198 +    int z;              /**< Z coordinate, for future use */
   1.199 +    int pressure;       /**< Pressure reported by tablets */
   1.200 +    int pressure_max;   /**< Maximum value of the pressure reported by the device */
   1.201 +    int pressure_min;   /**< Minimum value of the pressure reported by the device */
   1.202 +    int rotation;       /**< For future use */
   1.203 +    int tilt_x;         /**< For future use */
   1.204 +    int tilt_y;         /**< For future use */
   1.205 +    int cursor;         /**< The cursor being used in the event */
   1.206 +    int xrel;           /**< The relative motion in the X direction */
   1.207 +    int yrel;           /**< The relative motion in the Y direction */
   1.208  } SDL_MouseMotionEvent;
   1.209  
   1.210  /**
   1.211 @@ -198,13 +189,14 @@
   1.212   */
   1.213  typedef struct SDL_MouseButtonEvent
   1.214  {
   1.215 -    Uint8 type;             /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
   1.216 -    Uint32 windowID;        /**< The window with mouse focus, if any */
   1.217 -    Uint8 which;            /**< The mouse device index */
   1.218 -    Uint8 button;           /**< The mouse button index */
   1.219 -    Uint8 state;            /**< ::SDL_PRESSED or ::SDL_RELEASED */
   1.220 -    int x;                  /**< X coordinate, relative to window */
   1.221 -    int y;                  /**< Y coordinate, relative to window */
   1.222 +    Uint32 type;        /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
   1.223 +    Uint32 windowID;    /**< The window with mouse focus, if any */
   1.224 +    Uint8 which;        /**< The mouse device index */
   1.225 +    Uint8 button;       /**< The mouse button index */
   1.226 +    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
   1.227 +    Uint8 padding1;
   1.228 +    int x;              /**< X coordinate, relative to window */
   1.229 +    int y;              /**< Y coordinate, relative to window */
   1.230  } SDL_MouseButtonEvent;
   1.231  
   1.232  /**
   1.233 @@ -212,21 +204,42 @@
   1.234   */
   1.235  typedef struct SDL_MouseWheelEvent
   1.236  {
   1.237 -    Uint8 type;             /**< ::SDL_MOUSEWHEEL */
   1.238 -    Uint32 windowID;        /**< The window with mouse focus, if any */
   1.239 -    Uint8 which;            /**< The mouse device index */
   1.240 -    int x;                  /**< The amount scrolled horizontally */
   1.241 -    int y;                  /**< The amount scrolled vertically */
   1.242 +    Uint32 type;        /**< ::SDL_MOUSEWHEEL */
   1.243 +    Uint32 windowID;    /**< The window with mouse focus, if any */
   1.244 +    Uint8 which;        /**< The mouse device index */
   1.245 +    Uint8 padding1;
   1.246 +    Uint8 padding2;
   1.247 +    Uint8 padding3;
   1.248 +    int x;              /**< The amount scrolled horizontally */
   1.249 +    int y;              /**< The amount scrolled vertically */
   1.250  } SDL_MouseWheelEvent;
   1.251  
   1.252  /**
   1.253 + * \brief Tablet pen proximity event
   1.254 + */
   1.255 +typedef struct SDL_ProximityEvent
   1.256 +{
   1.257 +    Uint32 type;        /**< ::SDL_PROXIMITYIN or ::SDL_PROXIMITYOUT */
   1.258 +    Uint32 windowID;    /**< The associated window */
   1.259 +    Uint8 which;
   1.260 +    Uint8 padding1;
   1.261 +    Uint8 padding2;
   1.262 +    Uint8 padding3;
   1.263 +    int cursor;
   1.264 +    int x;
   1.265 +    int y;
   1.266 +} SDL_ProximityEvent;
   1.267 +
   1.268 +/**
   1.269   *  \brief Joystick axis motion event structure (event.jaxis.*)
   1.270   */
   1.271  typedef struct SDL_JoyAxisEvent
   1.272  {
   1.273 -    Uint8 type;         /**< ::SDL_JOYAXISMOTION */
   1.274 +    Uint32 type;        /**< ::SDL_JOYAXISMOTION */
   1.275      Uint8 which;        /**< The joystick device index */
   1.276      Uint8 axis;         /**< The joystick axis index */
   1.277 +    Uint8 padding1;
   1.278 +    Uint8 padding2;
   1.279      int value;          /**< The axis value (range: -32768 to 32767) */
   1.280  } SDL_JoyAxisEvent;
   1.281  
   1.282 @@ -235,9 +248,11 @@
   1.283   */
   1.284  typedef struct SDL_JoyBallEvent
   1.285  {
   1.286 -    Uint8 type;         /**< ::SDL_JOYBALLMOTION */
   1.287 +    Uint32 type;        /**< ::SDL_JOYBALLMOTION */
   1.288      Uint8 which;        /**< The joystick device index */
   1.289      Uint8 ball;         /**< The joystick trackball index */
   1.290 +    Uint8 padding1;
   1.291 +    Uint8 padding2;
   1.292      int xrel;           /**< The relative motion in the X direction */
   1.293      int yrel;           /**< The relative motion in the Y direction */
   1.294  } SDL_JoyBallEvent;
   1.295 @@ -247,7 +262,7 @@
   1.296   */
   1.297  typedef struct SDL_JoyHatEvent
   1.298  {
   1.299 -    Uint8 type;         /**< ::SDL_JOYHATMOTION */
   1.300 +    Uint32 type;        /**< ::SDL_JOYHATMOTION */
   1.301      Uint8 which;        /**< The joystick device index */
   1.302      Uint8 hat;          /**< The joystick hat index */
   1.303      Uint8 value;        /**< The hat position value.
   1.304 @@ -257,6 +272,7 @@
   1.305                           *   
   1.306                           *   Note that zero means the POV is centered.
   1.307                           */
   1.308 +    Uint8 padding1;
   1.309  } SDL_JoyHatEvent;
   1.310  
   1.311  /**
   1.312 @@ -264,10 +280,11 @@
   1.313   */
   1.314  typedef struct SDL_JoyButtonEvent
   1.315  {
   1.316 -    Uint8 type;         /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
   1.317 +    Uint32 type;        /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
   1.318      Uint8 which;        /**< The joystick device index */
   1.319      Uint8 button;       /**< The joystick button index */
   1.320      Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
   1.321 +    Uint8 padding1;
   1.322  } SDL_JoyButtonEvent;
   1.323  
   1.324  /**
   1.325 @@ -275,7 +292,7 @@
   1.326   */
   1.327  typedef struct SDL_QuitEvent
   1.328  {
   1.329 -    Uint8 type;         /**< ::SDL_QUIT */
   1.330 +    Uint32 type;        /**< ::SDL_QUIT */
   1.331  } SDL_QuitEvent;
   1.332  
   1.333  /**
   1.334 @@ -283,11 +300,11 @@
   1.335   */
   1.336  typedef struct SDL_UserEvent
   1.337  {
   1.338 -    Uint8 type;             /**< ::SDL_USEREVENT through ::SDL_NUMEVENTS-1 */
   1.339 -    Uint32 windowID;        /**< The associated window if any*/
   1.340 -    int code;               /**< User defined event code */
   1.341 -    void *data1;            /**< User defined data pointer */
   1.342 -    void *data2;            /**< User defined data pointer */
   1.343 +    Uint32 type;        /**< ::SDL_USEREVENT through ::SDL_NUMEVENTS-1 */
   1.344 +    Uint32 windowID;    /**< The associated window if any */
   1.345 +    int code;           /**< User defined event code */
   1.346 +    void *data1;        /**< User defined data pointer */
   1.347 +    void *data2;        /**< User defined data pointer */
   1.348  } SDL_UserEvent;
   1.349  
   1.350  struct SDL_SysWMmsg;
   1.351 @@ -300,20 +317,10 @@
   1.352   */
   1.353  typedef struct SDL_SysWMEvent
   1.354  {
   1.355 -    Uint8 type;         /**< ::SDL_SYSWMEVENT */
   1.356 +    Uint32 type;        /**< ::SDL_SYSWMEVENT */
   1.357      SDL_SysWMmsg *msg;  /**< driver dependent data, defined in SDL_syswm.h */
   1.358  } SDL_SysWMEvent;
   1.359  
   1.360 -typedef struct SDL_ProximityEvent
   1.361 -{
   1.362 -    Uint8 type;
   1.363 -    Uint32 windowID;    /**< The associated window */
   1.364 -    Uint8 which;
   1.365 -    int cursor;
   1.366 -    int x;
   1.367 -    int y;
   1.368 -} SDL_ProximityEvent;
   1.369 -
   1.370  #ifndef SDL_NO_COMPAT
   1.371  /**
   1.372   *  \addtogroup Compatibility 
   1.373 @@ -326,14 +333,14 @@
   1.374  /*@{*/
   1.375  typedef struct SDL_ActiveEvent
   1.376  {
   1.377 -    Uint8 type;
   1.378 +    Uint32 type;
   1.379      Uint8 gain;
   1.380      Uint8 state;
   1.381  } SDL_ActiveEvent;
   1.382  
   1.383  typedef struct SDL_ResizeEvent
   1.384  {
   1.385 -    Uint8 type;
   1.386 +    Uint32 type;
   1.387      int w;
   1.388      int h;
   1.389  } SDL_ResizeEvent;
   1.390 @@ -347,7 +354,7 @@
   1.391   */
   1.392  typedef union SDL_Event
   1.393  {
   1.394 -    Uint8 type;                     /**< Event type, shared with all events */
   1.395 +    Uint32 type;                    /**< Event type, shared with all events */
   1.396      SDL_WindowEvent window;         /**< Window event data */
   1.397      SDL_KeyboardEvent key;          /**< Keyboard event data */
   1.398      SDL_TextEditingEvent edit;      /**< Text editing event data */
   1.399 @@ -413,13 +420,20 @@
   1.400   */
   1.401  extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
   1.402                                             SDL_eventaction action,
   1.403 -                                           Uint32 mask);
   1.404 +                                           Uint32 minType, Uint32 maxType);
   1.405  /*@}*/
   1.406  
   1.407  /**
   1.408   *  Checks to see if certain event types are in the event queue.
   1.409   */
   1.410 -extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 mask);
   1.411 +extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
   1.412 +extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
   1.413 +
   1.414 +/**
   1.415 + *  This function clears events from the event queue
   1.416 + */
   1.417 +extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
   1.418 +extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
   1.419  
   1.420  /**
   1.421   *  \brief Polls for currently pending events.
   1.422 @@ -520,8 +534,18 @@
   1.423   *   - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the 
   1.424   *     current processing state of the specified event.
   1.425   */
   1.426 -extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint8 type, int state);
   1.427 +extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
   1.428  /*@}*/
   1.429 +#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
   1.430 +
   1.431 +/**
   1.432 + *  This function allocates a set of user-defined events, and returns
   1.433 + *  the beginning event number for that set of events.
   1.434 + *
   1.435 + *  If there aren't enough user-defined events left, this function
   1.436 + *  returns (Uint32)-1
   1.437 + */
   1.438 +extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
   1.439  
   1.440  /* Ends C function definitions when using C++ */
   1.441  #ifdef __cplusplus