Wiki Page Content

Differences between revisions 5 and 6
Revision 5 as of 2010-12-28 06:37:35
Size: 1492
Editor: SheenaSmith
Comment: minor change for consistency
Revision 6 as of 2011-11-07 00:56:39
Size: 1586
Editor: SheenaSmith
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 17: Line 17:
||'''filter'''||^a pointer to fill in with the function to call when an event happens^ ???||
||'''userdata'''||^a pointer to a pointer filled in with user-specified data^||
||'''filter'''||the callback function to get; see [[#Remarks|Remarks]] for details||
||'''userdata'''||a pointer to a pointer that is passed to '''filter'''||
Line 21: Line 21:
Returns the current event filter. If there is no event filter set, this function returns SDL_FALSE. Returns SDL_TRUE on success or SDL_FALSE if there is no event filter set,,; call [[SDL_GetError]]() for more information.,,
Line 23: Line 23:
<<Color2(green,Does it return SDL_TRUE if there is a filter or does it return other text describing the filter?)>> <<Color2(green,The header says it "Returns the current event filter" but I suspect this isn't referring to the actual return value but the output of the function. Should that be included here?)>>
Line 31: Line 31:
Can be used to "chain" filters. This function can be used to "chain" filters.
Line 33: Line 33:
*<<BR>><<Color2(green,This functions appears to have changed dramatically since 1.2. Is that correct?)>><<BR>>*

<<Color2(green,Should the following be included here as it is in [[SDL_SetEventFilter]]()?)>>
The '''filter''' function has the following form:
<<Color2(green,Should the following be included here as it is in [[SDL_SetEventFilter]]()?  Right now this is different.)>>
The function prototype for '''filter''' is:
Line 38: Line 36:
int SDL_EventFilter(void* userdata, SDL_Event* event) int SDL_EventFilter(void*      userdata,
                   
SDL_Event* event)
Line 40: Line 39:
where '''userdata''' is the event queue to filter and '''event''' is the desired event to pull from the queue.  . where its parameters are:
 ||`userdata`||what was passed as '''userdata''' to [[SDL_GetEventFilter]]()||
 ||`event`||the desired event to query from the queue ???||

DRAFT

SDL_GetEventFilter

Use this function to return the current event filter.

Syntax

SDL_bool SDL_GetEventFilter(SDL_EventFilter* filter,
                            void**           userdata)

Function Parameters

filter

the callback function to get; see Remarks for details

userdata

a pointer to a pointer that is passed to filter

Return Value

Returns SDL_TRUE on success or SDL_FALSE if there is no event filter set; call [[SDL_GetError]]() for more information.

green

Code Examples

You can add your code example here

Remarks

This function can be used to "chain" filters.

green

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_GetEventFilter()

    event

    the desired event to query from the queue ???


CategoryAPI, CategoryEvents

None: SDL_GetEventFilter (last edited 2013-08-08 22:36:07 by RyanGordon)

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