include/SDL_events.h
changeset 12130 24142c5073a4
parent 11811 5d94cb6b24d3
child 12143 673ec0369266
equal deleted inserted replaced
12129:42ff8f08c740 12130:24142c5073a4
   142 
   142 
   143     /* Audio hotplug events */
   143     /* Audio hotplug events */
   144     SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
   144     SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
   145     SDL_AUDIODEVICEREMOVED,        /**< An audio device has been removed. */
   145     SDL_AUDIODEVICEREMOVED,        /**< An audio device has been removed. */
   146 
   146 
       
   147     /* Sensor events */
       
   148     SDL_SENSORUPDATE = 0x1200,     /**< A sensor was updated */
       
   149 
   147     /* Render events */
   150     /* Render events */
   148     SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
   151     SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
   149     SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
   152     SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
   150 
   153 
   151     /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
   154     /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
   468     Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
   471     Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
   469     char *file;         /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
   472     char *file;         /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
   470     Uint32 windowID;    /**< The window that was dropped on, if any */
   473     Uint32 windowID;    /**< The window that was dropped on, if any */
   471 } SDL_DropEvent;
   474 } SDL_DropEvent;
   472 
   475 
       
   476 
       
   477 /**
       
   478  *  \brief Sensor event structure (event.sensor.*)
       
   479  */
       
   480 typedef struct SDL_SensorEvent
       
   481 {
       
   482     Uint32 type;        /**< ::SDL_SENSORUPDATE */
       
   483     Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */
       
   484     Sint32 which;       /**< The instance ID of the sensor */
       
   485     float data[6];      /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
       
   486 } SDL_SensorEvent;
   473 
   487 
   474 /**
   488 /**
   475  *  \brief The "quit requested" event
   489  *  \brief The "quit requested" event
   476  */
   490  */
   477 typedef struct SDL_QuitEvent
   491 typedef struct SDL_QuitEvent
   540     SDL_JoyDeviceEvent jdevice;     /**< Joystick device change event data */
   554     SDL_JoyDeviceEvent jdevice;     /**< Joystick device change event data */
   541     SDL_ControllerAxisEvent caxis;      /**< Game Controller axis event data */
   555     SDL_ControllerAxisEvent caxis;      /**< Game Controller axis event data */
   542     SDL_ControllerButtonEvent cbutton;  /**< Game Controller button event data */
   556     SDL_ControllerButtonEvent cbutton;  /**< Game Controller button event data */
   543     SDL_ControllerDeviceEvent cdevice;  /**< Game Controller device event data */
   557     SDL_ControllerDeviceEvent cdevice;  /**< Game Controller device event data */
   544     SDL_AudioDeviceEvent adevice;   /**< Audio device event data */
   558     SDL_AudioDeviceEvent adevice;   /**< Audio device event data */
       
   559     SDL_SensorEvent sensor;         /**< Sensor event data */
   545     SDL_QuitEvent quit;             /**< Quit request event data */
   560     SDL_QuitEvent quit;             /**< Quit request event data */
   546     SDL_UserEvent user;             /**< Custom event data */
   561     SDL_UserEvent user;             /**< Custom event data */
   547     SDL_SysWMEvent syswm;           /**< System dependent window event data */
   562     SDL_SysWMEvent syswm;           /**< System dependent window event data */
   548     SDL_TouchFingerEvent tfinger;   /**< Touch finger event data */
   563     SDL_TouchFingerEvent tfinger;   /**< Touch finger event data */
   549     SDL_MultiGestureEvent mgesture; /**< Gesture event data */
   564     SDL_MultiGestureEvent mgesture; /**< Gesture event data */