|
Size: 1472
Comment: update content - SDL_EventFilter
|
Size: 1355
Comment: update content for consistency - callback (table); camelcase
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
| #pragma disable-camelcase | #pragma camelcase off |
| Line 8: | Line 8: |
| <<Color2(green,I suspect that the perspective in the header where this was taken from was different and it should read:)>> Use this function to filter 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. |
| Line 21: | Line 20: |
| ||'''filter'''||a function that gets called when an event happens; see [[#Remarks|Remarks]] for details|| ||'''userdata'''||^a pointer filled in with user-specified information to be filtered^|| |
||'''filter'''||the function to call when an event happens; see [[#Remarks|Remarks]] for details|| ||'''userdata'''||a pointer that is passed to '''filter'''|| |
| Line 30: | Line 29: |
| The '''filter''' function has the following form: {{{ int SDL_EventFilter(void* userdata, SDL_Event* event) |
The function prototype for '''filter''' is: {{{ int SDL_EventFilter(void* userdata, SDL_Event* event) |
| Line 34: | Line 34: |
| where '''userdata''' is the event queue to filter and '''event''' is the desired event to pull from the queue. <<Color2(green,Should this be formatted like the syntax section?)>> |
. where its parameters are: ||`userdata`||what was passed as '''userdata''' to [[SDL_FilterEvents]]()|| ||`event`||the desired event to pull from the queue|| |
| Line 40: | Line 41: |
| .[[SDL_GetEventFilter]] ??? .[[SDL_SetEventFilter]] ??? |
.[[SDL_GetEventFilter]] .[[SDL_SetEventFilter]] |
DRAFT |
SDL_FilterEvents
Use this function to run the filter function on the current event queue, removing any events for which the filter returns 0.
green
Use this function to filter the current event queue and remove filtered events.
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.
