全部博文(1958)
分类: LINUX
2011-03-17 17:41:40
SDL_UserEvent -- A user-defined event type
Structure Definitiontypedef struct{
type | SDL_USEREVENT through to SDL_NUMEVENTS-1 |
code | User defined event code |
data1 | User defined data pointer |
data2 | User defined data pointer |
is in the user member of the structure . 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. The contents of the structure members are completely up to the programmer, the only requirement is that type is a value from SDL_USEREVENT to SDL_NUMEVENTS-1 (inclusive).
ExamplesSDL_Event event; event.type = SDL_USEREVENT; event.user.code = my_event_code; event.user.data1 = significant_data; event.user.data2 = 0; SDL_PushEvent(&event);See Also
,