include/SDL_events.h
changeset 9393 ed79a66e57e5
parent 9257 6f41196c2d6b
child 9417 86483b23f44a
     1.1 --- a/include/SDL_events.h	Wed Mar 18 10:09:39 2015 -0400
     1.2 +++ b/include/SDL_events.h	Mon Mar 16 02:11:39 2015 -0400
     1.3 @@ -110,6 +110,10 @@
     1.4      SDL_JOYDEVICEADDED,         /**< A new joystick has been inserted into the system */
     1.5      SDL_JOYDEVICEREMOVED,       /**< An opened joystick has been removed */
     1.6  
     1.7 +    /* Audio hotplug events */
     1.8 +    SDL_AUDIODEVICEADDED = 0x700,  /**< A new audio device is available */
     1.9 +    SDL_AUDIODEVICEREMOVED,        /**< An audio device has been removed. */
    1.10 +
    1.11      /* Game controller events */
    1.12      SDL_CONTROLLERAXISMOTION  = 0x650, /**< Game controller axis motion */
    1.13      SDL_CONTROLLERBUTTONDOWN,          /**< Game controller button pressed */
    1.14 @@ -382,6 +386,20 @@
    1.15      Sint32 which;       /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
    1.16  } SDL_ControllerDeviceEvent;
    1.17  
    1.18 +/**
    1.19 + *  \brief Audio device event structure (event.adevice.*)
    1.20 + */
    1.21 +typedef struct SDL_AudioDeviceEvent
    1.22 +{
    1.23 +    Uint32 type;        /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */
    1.24 +    Uint32 timestamp;
    1.25 +    Uint32 which;       /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
    1.26 +    Uint8 iscapture;    /**< zero if an output device, non-zero if a capture device. */
    1.27 +    Uint8 padding1;
    1.28 +    Uint8 padding2;
    1.29 +    Uint8 padding3;
    1.30 +} SDL_AudioDeviceEvent;
    1.31 +
    1.32  
    1.33  /**
    1.34   *  \brief Touch finger event structure (event.tfinger.*)
    1.35 @@ -516,6 +534,7 @@
    1.36      SDL_ControllerAxisEvent caxis;      /**< Game Controller axis event data */
    1.37      SDL_ControllerButtonEvent cbutton;  /**< Game Controller button event data */
    1.38      SDL_ControllerDeviceEvent cdevice;  /**< Game Controller device event data */
    1.39 +    SDL_AudioDeviceEvent adevice;   /**< Audio device event data */
    1.40      SDL_QuitEvent quit;             /**< Quit request event data */
    1.41      SDL_UserEvent user;             /**< Custom event data */
    1.42      SDL_SysWMEvent syswm;           /**< System dependent window event data */