comparison include/SDL_events.h @ 5149:3052772b59db

Added functions to watch events as they go through the event queue.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 01 Feb 2011 19:15:42 -0800
parents 25d4feb7c127
children 572a73d71b5f
comparison
equal deleted inserted replaced
5148:2f44e6969a59 5149:3052772b59db
579 */ 579 */
580 extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter, 580 extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
581 void **userdata); 581 void **userdata);
582 582
583 /** 583 /**
584 * Add a function which is called when an event is added to the queue.
585 */
586 extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
587 void *userdata);
588
589 /**
590 * Remove an event watch function added with SDL_AddEventWatch()
591 */
592 extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
593 void *userdata);
594
595 /**
584 * Run the filter function on the current event queue, removing any 596 * Run the filter function on the current event queue, removing any
585 * events for which the filter returns 0. 597 * events for which the filter returns 0.
586 */ 598 */
587 extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter, 599 extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
588 void *userdata); 600 void *userdata);