include/SDL_events.h
branchSDL-1.2
changeset 4217 4c4113c2162c
parent 4159 a1b03ba2fcd0
child 6137 4720145f848b
     1.1 --- a/include/SDL_events.h	Mon Sep 21 09:27:08 2009 +0000
     1.2 +++ b/include/SDL_events.h	Mon Sep 21 09:38:10 2009 +0000
     1.3 @@ -20,7 +20,10 @@
     1.4      slouken@libsdl.org
     1.5  */
     1.6  
     1.7 -/* Include file for SDL event handling */
     1.8 +/**
     1.9 + *  @file SDL_events.h
    1.10 + *  Include file for SDL event handling
    1.11 + */
    1.12  
    1.13  #ifndef _SDL_events_h
    1.14  #define _SDL_events_h
    1.15 @@ -39,45 +42,48 @@
    1.16  extern "C" {
    1.17  #endif
    1.18  
    1.19 -/* General keyboard/mouse state definitions */
    1.20 +/** @name General keyboard/mouse state definitions */
    1.21 +/*@{*/
    1.22  #define SDL_RELEASED	0
    1.23  #define SDL_PRESSED	1
    1.24 +/*@}*/
    1.25  
    1.26 -/* Event enumerations */
    1.27 +/** Event enumerations */
    1.28  typedef enum {
    1.29 -       SDL_NOEVENT = 0,			/* Unused (do not remove) */
    1.30 -       SDL_ACTIVEEVENT,			/* Application loses/gains visibility */
    1.31 -       SDL_KEYDOWN,			/* Keys pressed */
    1.32 -       SDL_KEYUP,			/* Keys released */
    1.33 -       SDL_MOUSEMOTION,			/* Mouse moved */
    1.34 -       SDL_MOUSEBUTTONDOWN,		/* Mouse button pressed */
    1.35 -       SDL_MOUSEBUTTONUP,		/* Mouse button released */
    1.36 -       SDL_JOYAXISMOTION,		/* Joystick axis motion */
    1.37 -       SDL_JOYBALLMOTION,		/* Joystick trackball motion */
    1.38 -       SDL_JOYHATMOTION,		/* Joystick hat position change */
    1.39 -       SDL_JOYBUTTONDOWN,		/* Joystick button pressed */
    1.40 -       SDL_JOYBUTTONUP,			/* Joystick button released */
    1.41 -       SDL_QUIT,			/* User-requested quit */
    1.42 -       SDL_SYSWMEVENT,			/* System specific event */
    1.43 -       SDL_EVENT_RESERVEDA,		/* Reserved for future use.. */
    1.44 -       SDL_EVENT_RESERVEDB,		/* Reserved for future use.. */
    1.45 -       SDL_VIDEORESIZE,			/* User resized video mode */
    1.46 -       SDL_VIDEOEXPOSE,			/* Screen needs to be redrawn */
    1.47 -       SDL_EVENT_RESERVED2,		/* Reserved for future use.. */
    1.48 -       SDL_EVENT_RESERVED3,		/* Reserved for future use.. */
    1.49 -       SDL_EVENT_RESERVED4,		/* Reserved for future use.. */
    1.50 -       SDL_EVENT_RESERVED5,		/* Reserved for future use.. */
    1.51 -       SDL_EVENT_RESERVED6,		/* Reserved for future use.. */
    1.52 -       SDL_EVENT_RESERVED7,		/* Reserved for future use.. */
    1.53 -       /* Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */
    1.54 +       SDL_NOEVENT = 0,			/**< Unused (do not remove) */
    1.55 +       SDL_ACTIVEEVENT,			/**< Application loses/gains visibility */
    1.56 +       SDL_KEYDOWN,			/**< Keys pressed */
    1.57 +       SDL_KEYUP,			/**< Keys released */
    1.58 +       SDL_MOUSEMOTION,			/**< Mouse moved */
    1.59 +       SDL_MOUSEBUTTONDOWN,		/**< Mouse button pressed */
    1.60 +       SDL_MOUSEBUTTONUP,		/**< Mouse button released */
    1.61 +       SDL_JOYAXISMOTION,		/**< Joystick axis motion */
    1.62 +       SDL_JOYBALLMOTION,		/**< Joystick trackball motion */
    1.63 +       SDL_JOYHATMOTION,		/**< Joystick hat position change */
    1.64 +       SDL_JOYBUTTONDOWN,		/**< Joystick button pressed */
    1.65 +       SDL_JOYBUTTONUP,			/**< Joystick button released */
    1.66 +       SDL_QUIT,			/**< User-requested quit */
    1.67 +       SDL_SYSWMEVENT,			/**< System specific event */
    1.68 +       SDL_EVENT_RESERVEDA,		/**< Reserved for future use.. */
    1.69 +       SDL_EVENT_RESERVEDB,		/**< Reserved for future use.. */
    1.70 +       SDL_VIDEORESIZE,			/**< User resized video mode */
    1.71 +       SDL_VIDEOEXPOSE,			/**< Screen needs to be redrawn */
    1.72 +       SDL_EVENT_RESERVED2,		/**< Reserved for future use.. */
    1.73 +       SDL_EVENT_RESERVED3,		/**< Reserved for future use.. */
    1.74 +       SDL_EVENT_RESERVED4,		/**< Reserved for future use.. */
    1.75 +       SDL_EVENT_RESERVED5,		/**< Reserved for future use.. */
    1.76 +       SDL_EVENT_RESERVED6,		/**< Reserved for future use.. */
    1.77 +       SDL_EVENT_RESERVED7,		/**< Reserved for future use.. */
    1.78 +       /** Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */
    1.79         SDL_USEREVENT = 24,
    1.80 -       /* This last event is only for bounding internal arrays
    1.81 -	  It is the number of bits in the event mask datatype -- Uint32
    1.82 +       /** This last event is only for bounding internal arrays
    1.83 +	*  It is the number of bits in the event mask datatype -- Uint32
    1.84          */
    1.85         SDL_NUMEVENTS = 32
    1.86  } SDL_EventType;
    1.87  
    1.88 -/* Predefined event masks */
    1.89 +/** @name Predefined event masks */
    1.90 +/*@{*/
    1.91  #define SDL_EVENTMASK(X)	(1<<(X))
    1.92  typedef enum {
    1.93  	SDL_ACTIVEEVENTMASK	= SDL_EVENTMASK(SDL_ACTIVEEVENT),
    1.94 @@ -107,108 +113,109 @@
    1.95  	SDL_SYSWMEVENTMASK	= SDL_EVENTMASK(SDL_SYSWMEVENT)
    1.96  } SDL_EventMask ;
    1.97  #define SDL_ALLEVENTS		0xFFFFFFFF
    1.98 +/*@}*/
    1.99  
   1.100 -/* Application visibility event structure */
   1.101 +/** Application visibility event structure */
   1.102  typedef struct SDL_ActiveEvent {
   1.103 -	Uint8 type;	/* SDL_ACTIVEEVENT */
   1.104 -	Uint8 gain;	/* Whether given states were gained or lost (1/0) */
   1.105 -	Uint8 state;	/* A mask of the focus states */
   1.106 +	Uint8 type;	/**< SDL_ACTIVEEVENT */
   1.107 +	Uint8 gain;	/**< Whether given states were gained or lost (1/0) */
   1.108 +	Uint8 state;	/**< A mask of the focus states */
   1.109  } SDL_ActiveEvent;
   1.110  
   1.111 -/* Keyboard event structure */
   1.112 +/** Keyboard event structure */
   1.113  typedef struct SDL_KeyboardEvent {
   1.114 -	Uint8 type;	/* SDL_KEYDOWN or SDL_KEYUP */
   1.115 -	Uint8 which;	/* The keyboard device index */
   1.116 -	Uint8 state;	/* SDL_PRESSED or SDL_RELEASED */
   1.117 +	Uint8 type;	/**< SDL_KEYDOWN or SDL_KEYUP */
   1.118 +	Uint8 which;	/**< The keyboard device index */
   1.119 +	Uint8 state;	/**< SDL_PRESSED or SDL_RELEASED */
   1.120  	SDL_keysym keysym;
   1.121  } SDL_KeyboardEvent;
   1.122  
   1.123 -/* Mouse motion event structure */
   1.124 +/** Mouse motion event structure */
   1.125  typedef struct SDL_MouseMotionEvent {
   1.126 -	Uint8 type;	/* SDL_MOUSEMOTION */
   1.127 -	Uint8 which;	/* The mouse device index */
   1.128 -	Uint8 state;	/* The current button state */
   1.129 -	Uint16 x, y;	/* The X/Y coordinates of the mouse */
   1.130 -	Sint16 xrel;	/* The relative motion in the X direction */
   1.131 -	Sint16 yrel;	/* The relative motion in the Y direction */
   1.132 +	Uint8 type;	/**< SDL_MOUSEMOTION */
   1.133 +	Uint8 which;	/**< The mouse device index */
   1.134 +	Uint8 state;	/**< The current button state */
   1.135 +	Uint16 x, y;	/**< The X/Y coordinates of the mouse */
   1.136 +	Sint16 xrel;	/**< The relative motion in the X direction */
   1.137 +	Sint16 yrel;	/**< The relative motion in the Y direction */
   1.138  } SDL_MouseMotionEvent;
   1.139  
   1.140 -/* Mouse button event structure */
   1.141 +/** Mouse button event structure */
   1.142  typedef struct SDL_MouseButtonEvent {
   1.143 -	Uint8 type;	/* SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP */
   1.144 -	Uint8 which;	/* The mouse device index */
   1.145 -	Uint8 button;	/* The mouse button index */
   1.146 -	Uint8 state;	/* SDL_PRESSED or SDL_RELEASED */
   1.147 -	Uint16 x, y;	/* The X/Y coordinates of the mouse at press time */
   1.148 +	Uint8 type;	/**< SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP */
   1.149 +	Uint8 which;	/**< The mouse device index */
   1.150 +	Uint8 button;	/**< The mouse button index */
   1.151 +	Uint8 state;	/**< SDL_PRESSED or SDL_RELEASED */
   1.152 +	Uint16 x, y;	/**< The X/Y coordinates of the mouse at press time */
   1.153  } SDL_MouseButtonEvent;
   1.154  
   1.155 -/* Joystick axis motion event structure */
   1.156 +/** Joystick axis motion event structure */
   1.157  typedef struct SDL_JoyAxisEvent {
   1.158 -	Uint8 type;	/* SDL_JOYAXISMOTION */
   1.159 -	Uint8 which;	/* The joystick device index */
   1.160 -	Uint8 axis;	/* The joystick axis index */
   1.161 -	Sint16 value;	/* The axis value (range: -32768 to 32767) */
   1.162 +	Uint8 type;	/**< SDL_JOYAXISMOTION */
   1.163 +	Uint8 which;	/**< The joystick device index */
   1.164 +	Uint8 axis;	/**< The joystick axis index */
   1.165 +	Sint16 value;	/**< The axis value (range: -32768 to 32767) */
   1.166  } SDL_JoyAxisEvent;
   1.167  
   1.168 -/* Joystick trackball motion event structure */
   1.169 +/** Joystick trackball motion event structure */
   1.170  typedef struct SDL_JoyBallEvent {
   1.171 -	Uint8 type;	/* SDL_JOYBALLMOTION */
   1.172 -	Uint8 which;	/* The joystick device index */
   1.173 -	Uint8 ball;	/* The joystick trackball index */
   1.174 -	Sint16 xrel;	/* The relative motion in the X direction */
   1.175 -	Sint16 yrel;	/* The relative motion in the Y direction */
   1.176 +	Uint8 type;	/**< SDL_JOYBALLMOTION */
   1.177 +	Uint8 which;	/**< The joystick device index */
   1.178 +	Uint8 ball;	/**< The joystick trackball index */
   1.179 +	Sint16 xrel;	/**< The relative motion in the X direction */
   1.180 +	Sint16 yrel;	/**< The relative motion in the Y direction */
   1.181  } SDL_JoyBallEvent;
   1.182  
   1.183 -/* Joystick hat position change event structure */
   1.184 +/** Joystick hat position change event structure */
   1.185  typedef struct SDL_JoyHatEvent {
   1.186 -	Uint8 type;	/* SDL_JOYHATMOTION */
   1.187 -	Uint8 which;	/* The joystick device index */
   1.188 -	Uint8 hat;	/* The joystick hat index */
   1.189 -	Uint8 value;	/* The hat position value:
   1.190 -			    SDL_HAT_LEFTUP   SDL_HAT_UP       SDL_HAT_RIGHTUP
   1.191 -			    SDL_HAT_LEFT     SDL_HAT_CENTERED SDL_HAT_RIGHT
   1.192 -			    SDL_HAT_LEFTDOWN SDL_HAT_DOWN     SDL_HAT_RIGHTDOWN
   1.193 -			   Note that zero means the POV is centered.
   1.194 -			*/
   1.195 +	Uint8 type;	/**< SDL_JOYHATMOTION */
   1.196 +	Uint8 which;	/**< The joystick device index */
   1.197 +	Uint8 hat;	/**< The joystick hat index */
   1.198 +	Uint8 value;	/**< The hat position value:
   1.199 +			 *   SDL_HAT_LEFTUP   SDL_HAT_UP       SDL_HAT_RIGHTUP
   1.200 +			 *   SDL_HAT_LEFT     SDL_HAT_CENTERED SDL_HAT_RIGHT
   1.201 +			 *   SDL_HAT_LEFTDOWN SDL_HAT_DOWN     SDL_HAT_RIGHTDOWN
   1.202 +			 *  Note that zero means the POV is centered.
   1.203 +			 */
   1.204  } SDL_JoyHatEvent;
   1.205  
   1.206 -/* Joystick button event structure */
   1.207 +/** Joystick button event structure */
   1.208  typedef struct SDL_JoyButtonEvent {
   1.209 -	Uint8 type;	/* SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP */
   1.210 -	Uint8 which;	/* The joystick device index */
   1.211 -	Uint8 button;	/* The joystick button index */
   1.212 -	Uint8 state;	/* SDL_PRESSED or SDL_RELEASED */
   1.213 +	Uint8 type;	/**< SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP */
   1.214 +	Uint8 which;	/**< The joystick device index */
   1.215 +	Uint8 button;	/**< The joystick button index */
   1.216 +	Uint8 state;	/**< SDL_PRESSED or SDL_RELEASED */
   1.217  } SDL_JoyButtonEvent;
   1.218  
   1.219 -/* The "window resized" event
   1.220 -   When you get this event, you are responsible for setting a new video
   1.221 -   mode with the new width and height.
   1.222 +/** The "window resized" event
   1.223 + *  When you get this event, you are responsible for setting a new video
   1.224 + *  mode with the new width and height.
   1.225   */
   1.226  typedef struct SDL_ResizeEvent {
   1.227 -	Uint8 type;	/* SDL_VIDEORESIZE */
   1.228 -	int w;		/* New width */
   1.229 -	int h;		/* New height */
   1.230 +	Uint8 type;	/**< SDL_VIDEORESIZE */
   1.231 +	int w;		/**< New width */
   1.232 +	int h;		/**< New height */
   1.233  } SDL_ResizeEvent;
   1.234  
   1.235 -/* The "screen redraw" event */
   1.236 +/** The "screen redraw" event */
   1.237  typedef struct SDL_ExposeEvent {
   1.238 -	Uint8 type;	/* SDL_VIDEOEXPOSE */
   1.239 +	Uint8 type;	/**< SDL_VIDEOEXPOSE */
   1.240  } SDL_ExposeEvent;
   1.241  
   1.242 -/* The "quit requested" event */
   1.243 +/** The "quit requested" event */
   1.244  typedef struct SDL_QuitEvent {
   1.245 -	Uint8 type;	/* SDL_QUIT */
   1.246 +	Uint8 type;	/**< SDL_QUIT */
   1.247  } SDL_QuitEvent;
   1.248  
   1.249 -/* A user-defined event type */
   1.250 +/** A user-defined event type */
   1.251  typedef struct SDL_UserEvent {
   1.252 -	Uint8 type;	/* SDL_USEREVENT through SDL_NUMEVENTS-1 */
   1.253 -	int code;	/* User defined event code */
   1.254 -	void *data1;	/* User defined data pointer */
   1.255 -	void *data2;	/* User defined data pointer */
   1.256 +	Uint8 type;	/**< SDL_USEREVENT through SDL_NUMEVENTS-1 */
   1.257 +	int code;	/**< User defined event code */
   1.258 +	void *data1;	/**< User defined data pointer */
   1.259 +	void *data2;	/**< User defined data pointer */
   1.260  } SDL_UserEvent;
   1.261  
   1.262 -/* If you want to use this event, you should include SDL_syswm.h */
   1.263 +/** If you want to use this event, you should include SDL_syswm.h */
   1.264  struct SDL_SysWMmsg;
   1.265  typedef struct SDL_SysWMmsg SDL_SysWMmsg;
   1.266  typedef struct SDL_SysWMEvent {
   1.267 @@ -216,7 +223,7 @@
   1.268  	SDL_SysWMmsg *msg;
   1.269  } SDL_SysWMEvent;
   1.270  
   1.271 -/* General event structure */
   1.272 +/** General event structure */
   1.273  typedef union SDL_Event {
   1.274  	Uint8 type;
   1.275  	SDL_ActiveEvent active;
   1.276 @@ -237,97 +244,109 @@
   1.277  
   1.278  /* Function prototypes */
   1.279  
   1.280 -/* Pumps the event loop, gathering events from the input devices.
   1.281 -   This function updates the event queue and internal input device state.
   1.282 -   This should only be run in the thread that sets the video mode.
   1.283 -*/
   1.284 +/** Pumps the event loop, gathering events from the input devices.
   1.285 + *  This function updates the event queue and internal input device state.
   1.286 + *  This should only be run in the thread that sets the video mode.
   1.287 + */
   1.288  extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
   1.289  
   1.290 -/* Checks the event queue for messages and optionally returns them.
   1.291 -   If 'action' is SDL_ADDEVENT, up to 'numevents' events will be added to
   1.292 -   the back of the event queue.
   1.293 -   If 'action' is SDL_PEEKEVENT, up to 'numevents' events at the front
   1.294 -   of the event queue, matching 'mask', will be returned and will not
   1.295 -   be removed from the queue.
   1.296 -   If 'action' is SDL_GETEVENT, up to 'numevents' events at the front 
   1.297 -   of the event queue, matching 'mask', will be returned and will be
   1.298 -   removed from the queue.
   1.299 -   This function returns the number of events actually stored, or -1
   1.300 -   if there was an error.  This function is thread-safe.
   1.301 -*/
   1.302  typedef enum {
   1.303  	SDL_ADDEVENT,
   1.304  	SDL_PEEKEVENT,
   1.305  	SDL_GETEVENT
   1.306  } SDL_eventaction;
   1.307 -/* */
   1.308 +
   1.309 +/**
   1.310 + *  Checks the event queue for messages and optionally returns them.
   1.311 + *
   1.312 + *  If 'action' is SDL_ADDEVENT, up to 'numevents' events will be added to
   1.313 + *  the back of the event queue.
   1.314 + *  If 'action' is SDL_PEEKEVENT, up to 'numevents' events at the front
   1.315 + *  of the event queue, matching 'mask', will be returned and will not
   1.316 + *  be removed from the queue.
   1.317 + *  If 'action' is SDL_GETEVENT, up to 'numevents' events at the front 
   1.318 + *  of the event queue, matching 'mask', will be returned and will be
   1.319 + *  removed from the queue.
   1.320 + *
   1.321 + *  @return
   1.322 + *  This function returns the number of events actually stored, or -1
   1.323 + *  if there was an error.
   1.324 + *
   1.325 + *  This function is thread-safe.
   1.326 + */
   1.327  extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event *events, int numevents,
   1.328  				SDL_eventaction action, Uint32 mask);
   1.329  
   1.330 -/* Polls for currently pending events, and returns 1 if there are any pending
   1.331 -   events, or 0 if there are none available.  If 'event' is not NULL, the next
   1.332 -   event is removed from the queue and stored in that area.
   1.333 +/** Polls for currently pending events, and returns 1 if there are any pending
   1.334 + *  events, or 0 if there are none available.  If 'event' is not NULL, the next
   1.335 + *  event is removed from the queue and stored in that area.
   1.336   */
   1.337  extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event *event);
   1.338  
   1.339 -/* Waits indefinitely for the next available event, returning 1, or 0 if there
   1.340 -   was an error while waiting for events.  If 'event' is not NULL, the next
   1.341 -   event is removed from the queue and stored in that area.
   1.342 +/** Waits indefinitely for the next available event, returning 1, or 0 if there
   1.343 + *  was an error while waiting for events.  If 'event' is not NULL, the next
   1.344 + *  event is removed from the queue and stored in that area.
   1.345   */
   1.346  extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event *event);
   1.347  
   1.348 -/* Add an event to the event queue.
   1.349 -   This function returns 0 on success, or -1 if the event queue was full
   1.350 -   or there was some other error.
   1.351 +/** Add an event to the event queue.
   1.352 + *  This function returns 0 on success, or -1 if the event queue was full
   1.353 + *  or there was some other error.
   1.354   */
   1.355  extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event *event);
   1.356  
   1.357 -/*
   1.358 -  This function sets up a filter to process all events before they
   1.359 -  change internal state and are posted to the internal event queue.
   1.360 -
   1.361 -  The filter is protypted as:
   1.362 -*/
   1.363 +/** @name Event Filtering */
   1.364 +/*@{*/
   1.365  typedef int (SDLCALL *SDL_EventFilter)(const SDL_Event *event);
   1.366 -/*
   1.367 -  If the filter returns 1, then the event will be added to the internal queue.
   1.368 -  If it returns 0, then the event will be dropped from the queue, but the 
   1.369 -  internal state will still be updated.  This allows selective filtering of
   1.370 -  dynamically arriving events.
   1.371 -
   1.372 -  WARNING:  Be very careful of what you do in the event filter function, as 
   1.373 -            it may run in a different thread!
   1.374 -
   1.375 -  There is one caveat when dealing with the SDL_QUITEVENT event type.  The
   1.376 -  event filter is only called when the window manager desires to close the
   1.377 -  application window.  If the event filter returns 1, then the window will
   1.378 -  be closed, otherwise the window will remain open if possible.
   1.379 -  If the quit event is generated by an interrupt signal, it will bypass the
   1.380 -  internal queue and be delivered to the application at the next event poll.
   1.381 -*/
   1.382 +/**
   1.383 + *  This function sets up a filter to process all events before they
   1.384 + *  change internal state and are posted to the internal event queue.
   1.385 + *
   1.386 + *  The filter is protypted as:
   1.387 + *      @code typedef int (SDLCALL *SDL_EventFilter)(const SDL_Event *event); @endcode
   1.388 + *
   1.389 + * If the filter returns 1, then the event will be added to the internal queue.
   1.390 + * If it returns 0, then the event will be dropped from the queue, but the 
   1.391 + * internal state will still be updated.  This allows selective filtering of
   1.392 + * dynamically arriving events.
   1.393 + *
   1.394 + * @warning  Be very careful of what you do in the event filter function, as 
   1.395 + *           it may run in a different thread!
   1.396 + *
   1.397 + * There is one caveat when dealing with the SDL_QUITEVENT event type.  The
   1.398 + * event filter is only called when the window manager desires to close the
   1.399 + * application window.  If the event filter returns 1, then the window will
   1.400 + * be closed, otherwise the window will remain open if possible.
   1.401 + * If the quit event is generated by an interrupt signal, it will bypass the
   1.402 + * internal queue and be delivered to the application at the next event poll.
   1.403 + */
   1.404  extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter);
   1.405  
   1.406 -/*
   1.407 -  Return the current event filter - can be used to "chain" filters.
   1.408 -  If there is no event filter set, this function returns NULL.
   1.409 -*/
   1.410 +/**
   1.411 + *  Return the current event filter - can be used to "chain" filters.
   1.412 + *  If there is no event filter set, this function returns NULL.
   1.413 + */
   1.414  extern DECLSPEC SDL_EventFilter SDLCALL SDL_GetEventFilter(void);
   1.415 +/*@}*/
   1.416  
   1.417 -/*
   1.418 -  This function allows you to set the state of processing certain events.
   1.419 -  If 'state' is set to SDL_IGNORE, that event will be automatically dropped
   1.420 -  from the event queue and will not event be filtered.
   1.421 -  If 'state' is set to SDL_ENABLE, that event will be processed normally.
   1.422 -  If 'state' is set to SDL_QUERY, SDL_EventState() will return the 
   1.423 -  current processing state of the specified event.
   1.424 -*/
   1.425 +/** @name Event State */
   1.426 +/*@{*/
   1.427  #define SDL_QUERY	-1
   1.428  #define SDL_IGNORE	 0
   1.429  #define SDL_DISABLE	 0
   1.430  #define SDL_ENABLE	 1
   1.431 +/*@}*/
   1.432 +
   1.433 +/**
   1.434 +* This function allows you to set the state of processing certain events.
   1.435 +* If 'state' is set to SDL_IGNORE, that event will be automatically dropped
   1.436 +* from the event queue and will not event be filtered.
   1.437 +* If 'state' is set to SDL_ENABLE, that event will be processed normally.
   1.438 +* If 'state' is set to SDL_QUERY, SDL_EventState() will return the 
   1.439 +* current processing state of the specified event.
   1.440 +*/
   1.441  extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint8 type, int state);
   1.442  
   1.443 -
   1.444  /* Ends C function definitions when using C++ */
   1.445  #ifdef __cplusplus
   1.446  }