1 .TH "SDL_UserEvent" "3" "Tue 11 Sep 2001, 23:00" "SDL" "SDL API Reference"
3 SDL_UserEvent\- A user-defined event type
4 .SH "STRUCTURE DEFINITION"
18 \fBSDL_USEREVENT\fP through to \fBSDL_NUMEVENTS-1\fP
21 User defined event code
24 User defined data pointer
27 User defined data pointer
30 \fBSDL_UserEvent\fR is in the \fBuser\fR member of the structure \fI\fBSDL_Event\fR\fR\&. 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 \fI\fBSDL_PushEvent\fP\fR\&. The contents of the structure members or completely up to the programmer, the only requirement is that \fBtype\fR is a value from \fBSDL_USEREVENT\fP to \fBSDL_NUMEVENTS-1\fP (inclusive)\&.
37 event\&.type = SDL_USEREVENT;
38 event\&.user\&.code = my_event_code;
39 event\&.user\&.data1 = significant_data;
40 event\&.user\&.data2 = 0;
41 SDL_PushEvent(&event);\fR
46 \fI\fBSDL_Event\fR\fR, \fI\fBSDL_PushEvent\fP\fR
47 ...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 23:00