Wiki Page Content

Differences between revisions 6 and 7
Revision 6 as of 2010-09-03 00:41:46
Size: 1539
Editor: SheenaSmith
Comment: update formatting - categories
Revision 7 as of 2011-01-17 18:05:55
Size: 1536
Editor: SheenaSmith
Comment: minor change for consistency
Deletions are marked like this. Additions are marked like this.
Line 34: Line 34:
 .[[SDL_EventType]]???  .[[SDL_EventType]]

DRAFT

SDL_UserEvent

A structure that contains a user-defined event type (event.user.*).

Data Fields

Uint32

type

SDL_USEREVENT through SDL_NUMEVENTS-1

Uint32

windowID

the associated window, if any

int

code

user defined event code

void*

data1

user defined data pointer

void*

data2

user defined data pointer

Code Examples

*

SDL_Event event;

event.type = SDL_USEREVENT;
event.user.code = my_event_code;
event.user.data1 = significant_data;
event.user.data2 = 0;
SDL_PushEvent(&event);


*green

Remarks

*
SDL_UserEvent is in the user member of the structure SDL_Event union. This event is unique; it is never created by SDL but only by the user. The event can be pushed onto the event queue using SDL_PushEvent(). The contents of the structure members green

are completely up to the programmer, green

the only requirement is that type is a value from SDL_USEREVENT to SDL_NUMEVENTS-1 (inclusive).
*


CategoryStruct, CategoryEvents

None: SDL_UserEvent (last edited 2015-10-29 21:58:30 by PhilippWiesemann)

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