Sync SDL2 wiki -> header
This commit is contained in:
parent
169f77ed5e
commit
143d5d779c
41 changed files with 1150 additions and 1138 deletions
|
@ -746,15 +746,15 @@ typedef enum SDL_eventaction
|
|||
*
|
||||
* This function is thread-safe.
|
||||
*
|
||||
* \param events destination buffer for the retrieved events
|
||||
* \param events destination buffer for the retrieved events.
|
||||
* \param numevents if action is SDL_ADDEVENT, the number of events to add
|
||||
* back to the event queue; if action is SDL_PEEKEVENT or
|
||||
* SDL_GETEVENT, the maximum number of events to retrieve
|
||||
* \param action action to take; see [[#action|Remarks]] for details
|
||||
* SDL_GETEVENT, the maximum number of events to retrieve.
|
||||
* \param action action to take; see [[#action|Remarks]] for details.
|
||||
* \param minType minimum value of the event type to be considered;
|
||||
* SDL_FIRSTEVENT is a safe choice
|
||||
* SDL_FIRSTEVENT is a safe choice.
|
||||
* \param maxType maximum value of the event type to be considered;
|
||||
* SDL_LASTEVENT is a safe choice
|
||||
* SDL_LASTEVENT is a safe choice.
|
||||
* \returns the number of events actually stored or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -775,7 +775,7 @@ extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
|
|||
* If you need to check for a range of event types, use SDL_HasEvents()
|
||||
* instead.
|
||||
*
|
||||
* \param type the type of event to be queried; see SDL_EventType for details
|
||||
* \param type the type of event to be queried; see SDL_EventType for details.
|
||||
* \returns SDL_TRUE if events matching `type` are present, or SDL_FALSE if
|
||||
* events matching `type` are not present.
|
||||
*
|
||||
|
@ -792,9 +792,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
|
|||
* If you need to check for a single event type, use SDL_HasEvent() instead.
|
||||
*
|
||||
* \param minType the low end of event type to be queried, inclusive; see
|
||||
* SDL_EventType for details
|
||||
* SDL_EventType for details.
|
||||
* \param maxType the high end of event type to be queried, inclusive; see
|
||||
* SDL_EventType for details
|
||||
* SDL_EventType for details.
|
||||
* \returns SDL_TRUE if events with type >= `minType` and <= `maxType` are
|
||||
* present, or SDL_FALSE if not.
|
||||
*
|
||||
|
@ -818,7 +818,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
|
|||
* sure that all pending OS events are flushed, you can call SDL_PumpEvents()
|
||||
* on the main thread immediately before the flush call.
|
||||
*
|
||||
* \param type the type of event to be cleared; see SDL_EventType for details
|
||||
* \param type the type of event to be cleared; see SDL_EventType for details.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -841,9 +841,9 @@ extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
|
|||
* on the main thread immediately before the flush call.
|
||||
*
|
||||
* \param minType the low end of event type to be cleared, inclusive; see
|
||||
* SDL_EventType for details
|
||||
* SDL_EventType for details.
|
||||
* \param maxType the high end of event type to be cleared, inclusive; see
|
||||
* SDL_EventType for details
|
||||
* SDL_EventType for details.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -884,7 +884,7 @@ extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
|
|||
* ```
|
||||
*
|
||||
* \param event the SDL_Event structure to be filled with the next event from
|
||||
* the queue, or NULL
|
||||
* the queue, or NULL.
|
||||
* \returns 1 if there is a pending event or 0 if there are none available.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
|
@ -908,7 +908,7 @@ extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
|
|||
* this function in the thread that initialized the video subsystem.
|
||||
*
|
||||
* \param event the SDL_Event structure to be filled in with the next event
|
||||
* from the queue, or NULL
|
||||
* from the queue, or NULL.
|
||||
* \returns 1 on success or 0 if there was an error while waiting for events;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -931,9 +931,9 @@ extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
|
|||
* this function in the thread that initialized the video subsystem.
|
||||
*
|
||||
* \param event the SDL_Event structure to be filled in with the next event
|
||||
* from the queue, or NULL
|
||||
* from the queue, or NULL.
|
||||
* \param timeout the maximum number of milliseconds to wait for the next
|
||||
* available event
|
||||
* available event.
|
||||
* \returns 1 on success or 0 if there was an error while waiting for events;
|
||||
* call SDL_GetError() for more information. This also returns 0 if
|
||||
* the timeout elapsed without an event arriving.
|
||||
|
@ -968,7 +968,7 @@ extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
|
|||
* get an event type that does not conflict with other code that also wants
|
||||
* its own custom event types.
|
||||
*
|
||||
* \param event the SDL_Event to be added to the queue
|
||||
* \param event the SDL_Event to be added to the queue.
|
||||
* \returns 1 on success, 0 if the event was filtered, or a negative error
|
||||
* code on failure; call SDL_GetError() for more information. A
|
||||
* common reason for error is the event queue being full.
|
||||
|
@ -985,8 +985,8 @@ extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
|
|||
* A function pointer used for callbacks that watch the event queue.
|
||||
*
|
||||
* \param userdata what was passed as `userdata` to SDL_SetEventFilter() or
|
||||
* SDL_AddEventWatch, etc
|
||||
* \param event the event that triggered the callback
|
||||
* SDL_AddEventWatch, etc.
|
||||
* \param event the event that triggered the callback.
|
||||
* \returns 1 to permit event to be added to the queue, and 0 to disallow it.
|
||||
* When used with SDL_AddEventWatch, the return value is ignored.
|
||||
*
|
||||
|
@ -1026,8 +1026,8 @@ typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
|
|||
* the event filter, but events pushed onto the queue with SDL_PeepEvents() do
|
||||
* not.
|
||||
*
|
||||
* \param filter An SDL_EventFilter function to call when an event happens
|
||||
* \param userdata a pointer that is passed to `filter`
|
||||
* \param filter An SDL_EventFilter function to call when an event happens.
|
||||
* \param userdata a pointer that is passed to `filter`.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -1046,9 +1046,9 @@ extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
|
|||
* This function can be used to "chain" filters, by saving the existing filter
|
||||
* before replacing it with a function that will call that saved filter.
|
||||
*
|
||||
* \param filter the current callback function will be stored here
|
||||
* \param filter the current callback function will be stored here.
|
||||
* \param userdata the pointer that is passed to the current event filter will
|
||||
* be stored here
|
||||
* be stored here.
|
||||
* \returns SDL_TRUE on success or SDL_FALSE if there is no event filter set.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
|
@ -1077,7 +1077,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
|
|||
* through SDL_PeepEvents().
|
||||
*
|
||||
* \param filter an SDL_EventFilter function to call when an event happens.
|
||||
* \param userdata a pointer that is passed to `filter`
|
||||
* \param userdata a pointer that is passed to `filter`.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -1093,8 +1093,8 @@ extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
|
|||
* This function takes the same input as SDL_AddEventWatch() to identify and
|
||||
* delete the corresponding callback.
|
||||
*
|
||||
* \param filter the function originally passed to SDL_AddEventWatch()
|
||||
* \param userdata the pointer originally passed to SDL_AddEventWatch()
|
||||
* \param filter the function originally passed to SDL_AddEventWatch().
|
||||
* \param userdata the pointer originally passed to SDL_AddEventWatch().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -1111,8 +1111,8 @@ extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
|
|||
* this function does not change the filter permanently, it only uses the
|
||||
* supplied filter until this function returns.
|
||||
*
|
||||
* \param filter the SDL_EventFilter function to call when an event happens
|
||||
* \param userdata a pointer that is passed to `filter`
|
||||
* \param filter the SDL_EventFilter function to call when an event happens.
|
||||
* \param userdata a pointer that is passed to `filter`.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -1138,8 +1138,8 @@ extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
|
|||
* from the event queue and will not be filtered
|
||||
* - `SDL_ENABLE`: the event will be processed normally
|
||||
*
|
||||
* \param type the type of event; see SDL_EventType for details
|
||||
* \param state how to process the event
|
||||
* \param type the type of event; see SDL_EventType for details.
|
||||
* \param state how to process the event.
|
||||
* \returns `SDL_DISABLE` or `SDL_ENABLE`, representing the processing state
|
||||
* of the event before this function makes any changes to it.
|
||||
*
|
||||
|
@ -1161,7 +1161,7 @@ extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
|
|||
* Note, (Uint32)-1 means the maximum unsigned 32-bit integer value (or
|
||||
* 0xFFFFFFFF), but is clearer to write.
|
||||
*
|
||||
* \param numevents the number of events to be allocated
|
||||
* \param numevents the number of events to be allocated.
|
||||
* \returns the beginning event number, or (Uint32)-1 if there are not enough
|
||||
* user-defined events left.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue