include/SDL_events.h
changeset 12143 673ec0369266
parent 12130 24142c5073a4
child 12503 806492103856
     1.1 --- a/include/SDL_events.h	Wed Aug 22 17:44:28 2018 -0700
     1.2 +++ b/include/SDL_events.h	Wed Aug 22 21:48:28 2018 -0700
     1.3 @@ -85,6 +85,9 @@
     1.4                                       Called on Android in onResume()
     1.5                                  */
     1.6  
     1.7 +    /* Display events */
     1.8 +    SDL_DISPLAYEVENT   = 0x150,  /**< Display state change */
     1.9 +
    1.10      /* Window events */
    1.11      SDL_WINDOWEVENT    = 0x200, /**< Window state change */
    1.12      SDL_SYSWMEVENT,             /**< System specific event */
    1.13 @@ -172,6 +175,21 @@
    1.14  } SDL_CommonEvent;
    1.15  
    1.16  /**
    1.17 + *  \brief Display state change event data (event.display.*)
    1.18 + */
    1.19 +typedef struct SDL_DisplayEvent
    1.20 +{
    1.21 +    Uint32 type;        /**< ::SDL_DISPLAYEVENT */
    1.22 +    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
    1.23 +    Uint32 display;     /**< The associated display index */
    1.24 +    Uint8 event;        /**< ::SDL_DisplayEventID */
    1.25 +    Uint8 padding1;
    1.26 +    Uint8 padding2;
    1.27 +    Uint8 padding3;
    1.28 +    Sint32 data1;       /**< event dependent data */
    1.29 +} SDL_DisplayEvent;
    1.30 +
    1.31 +/**
    1.32   *  \brief Window state change event data (event.window.*)
    1.33   */
    1.34  typedef struct SDL_WindowEvent
    1.35 @@ -540,6 +558,7 @@
    1.36  {
    1.37      Uint32 type;                    /**< Event type, shared with all events */
    1.38      SDL_CommonEvent common;         /**< Common event data */
    1.39 +    SDL_DisplayEvent display;       /**< Window event data */
    1.40      SDL_WindowEvent window;         /**< Window event data */
    1.41      SDL_KeyboardEvent key;          /**< Keyboard event data */
    1.42      SDL_TextEditingEvent edit;      /**< Text editing event data */