include/SDL_events.h
branchSDL-1.3
changeset 1722 5daa04d862f1
parent 1686 8d7fecceb9ef
child 1724 6c63fc2bd986
     1.1 --- a/include/SDL_events.h	Fri Jun 30 05:50:35 2006 +0000
     1.2 +++ b/include/SDL_events.h	Fri Jun 30 08:18:44 2006 +0000
     1.3 @@ -377,7 +377,7 @@
     1.4  
     1.5    The filter is protypted as:
     1.6  */
     1.7 -typedef int (SDLCALL * SDL_EventFilter) (SDL_Event * event);
     1.8 +typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
     1.9  /*
    1.10    If the filter returns 1, then the event will be added to the internal queue.
    1.11    If it returns 0, then the event will be dropped from the queue, but the 
    1.12 @@ -394,13 +394,21 @@
    1.13    If the quit event is generated by an interrupt signal, it will bypass the
    1.14    internal queue and be delivered to the application at the next event poll.
    1.15  */
    1.16 -extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter);
    1.17 +extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
    1.18 +                                                void *userdata);
    1.19  
    1.20  /*
    1.21    Return the current event filter - can be used to "chain" filters.
    1.22    If there is no event filter set, this function returns NULL.
    1.23  */
    1.24 -extern DECLSPEC SDL_EventFilter SDLCALL SDL_GetEventFilter(void);
    1.25 +extern DECLSPEC SDL_EventFilter SDLCALL SDL_GetEventFilter(void **userdata);
    1.26 +
    1.27 +/*
    1.28 +  Run the filter function on the current event queue, removing any
    1.29 +  events for which the filter returns 0.
    1.30 +*/
    1.31 +extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
    1.32 +                                              void *userdata);
    1.33  
    1.34  /*
    1.35    This function allows you to set the state of processing certain events.