Wiki Page Content

Differences between revisions 6 and 7
Revision 6 as of 2011-11-07 01:11:52
Size: 1355
Editor: SheenaSmith
Comment: update content for consistency - callback (table); camelcase
Revision 7 as of 2013-08-08 22:17:30
Size: 1231
Editor: RyanGordon
Comment: Updated
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 6: Line 5:
Use this function to run the filter function on the current event queue, removing any events for which the filter returns 0.    <<Color2(green,Is this more appropriate wording for this context?)>> <<BR>>
Use this function to filter the current event queue and remove filtered events.
Use this function to run a specific filter function on the current event queue, removing any events for which the filter returns 0.
Line 15: Line 11:
void SDL_FilterEvents(SDL_EventFilter filter,
                     
void*           userdata)
void SDL_FilterEvents(SDL_EventFilter filter, void* userdata)
Line 30: Line 25:
 {{{
int SDL_EventFilter(void*      userdata,                      SDL_Event* event)
{{{
int SDL_EventFilter(void* userdata, SDL_Event* event)
Line 38: Line 32:
See [[SDL_SetEventFilter]]() for more information. See [[SDL_SetEventFilter]]() for more information. Unlike [[SDL_SetEventFilter]](), this function does not change the filter permanently, it only uses the supplied filter until this function returns.

SDL_FilterEvents

Use this function to run a specific filter function on the current event queue, removing any events for which the filter returns 0.

Syntax

void SDL_FilterEvents(SDL_EventFilter filter, void* userdata)

Function Parameters

filter

the function to call when an event happens; see Remarks for details

userdata

a pointer that is passed to filter

Code Examples

You can add your code example here

Remarks

The function prototype for filter is:

int SDL_EventFilter(void* userdata, SDL_Event* event)
  • where its parameters are:

    userdata

    what was passed as userdata to SDL_FilterEvents()

    event

    the desired event to pull from the queue

See SDL_SetEventFilter() for more information. Unlike SDL_SetEventFilter(), this function does not change the filter permanently, it only uses the supplied filter until this function returns.


CategoryAPI, CategoryEvents

None: SDL_FilterEvents (last edited 2015-12-19 22:23:21 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit