Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Thursday, June 13, 2019
 
 

SDL_UserEvent (3)

Name

SDL_UserEvent - defined event type

Synopsis

Please see following description for synopsis

Description

SDL_UserEvent(3)               SDL API Reference              SDL_UserEvent(3)



NAME
       SDL_UserEvent - A user-defined event type

STRUCTURE DEFINITION
       typedef struct{
         Uint8 type;
         int code;
         void *data1;
         void *data2;
       } SDL_UserEvent;

STRUCTURE DATA
       type                SDL_USEREVENT through to SDL_NUMEVENTS-1

       code                User defined event code

       data1               User defined data pointer

       data2               User defined data pointer

DESCRIPTION
       SDL_UserEvent  is  in  the user member of the structure SDL_Event. 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 con-
       tents of the structure members or completely up to the programmer,  the
       only  requirement  is  that  type  is  a  value  from  SDL_USEREVENT to
       SDL_NUMEVENTS-1 (inclusive).

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);

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | library/sdl      |
       +---------------+------------------+
       |Stability      | Volatile         |
       +---------------+------------------+
SEE ALSO
       SDL_Event, SDL_PushEvent



NOTES
       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source       was        downloaded        from         https://www.lib-
       sdl.org/release/SDL-1.2.15.tar.gz

       Further information about this software can be found on the open source
       community website at https://www.libsdl.org/.



SDL                         Tue 11 Sep 2001, 23:00            SDL_UserEvent(3)