mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-03 02:17:39 +00:00
Renamed SDL events for clarity
Fixes https://github.com/libsdl-org/SDL/issues/6877
This commit is contained in:
parent
74697bc351
commit
7b50bae524
101 changed files with 1375 additions and 862 deletions
|
@ -54,153 +54,153 @@ extern "C" {
|
|||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_FIRSTEVENT = 0, /**< Unused (do not remove) */
|
||||
SDL_EVENT_FIRST = 0, /**< Unused (do not remove) */
|
||||
|
||||
/* Application events */
|
||||
SDL_QUIT = 0x100, /**< User-requested quit */
|
||||
SDL_EVENT_QUIT = 0x100, /**< User-requested quit */
|
||||
|
||||
/* These application events have special meaning on iOS, see README-ios.md for details */
|
||||
SDL_APP_TERMINATING, /**< The application is being terminated by the OS
|
||||
SDL_EVENT_TERMINATING, /**< The application is being terminated by the OS
|
||||
Called on iOS in applicationWillTerminate()
|
||||
Called on Android in onDestroy()
|
||||
*/
|
||||
SDL_APP_LOWMEMORY, /**< The application is low on memory, free memory if possible.
|
||||
SDL_EVENT_LOW_MEMORY, /**< The application is low on memory, free memory if possible.
|
||||
Called on iOS in applicationDidReceiveMemoryWarning()
|
||||
Called on Android in onLowMemory()
|
||||
*/
|
||||
SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background
|
||||
SDL_EVENT_WILL_ENTER_BACKGROUND, /**< The application is about to enter the background
|
||||
Called on iOS in applicationWillResignActive()
|
||||
Called on Android in onPause()
|
||||
*/
|
||||
SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time
|
||||
SDL_EVENT_DID_ENTER_BACKGROUND, /**< The application did enter the background and may not get CPU for some time
|
||||
Called on iOS in applicationDidEnterBackground()
|
||||
Called on Android in onPause()
|
||||
*/
|
||||
SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground
|
||||
SDL_EVENT_WILL_ENTER_FOREGROUND, /**< The application is about to enter the foreground
|
||||
Called on iOS in applicationWillEnterForeground()
|
||||
Called on Android in onResume()
|
||||
*/
|
||||
SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive
|
||||
SDL_EVENT_DID_ENTER_FOREGROUND, /**< The application is now interactive
|
||||
Called on iOS in applicationDidBecomeActive()
|
||||
Called on Android in onResume()
|
||||
*/
|
||||
|
||||
SDL_LOCALECHANGED, /**< The user's locale preferences have changed. */
|
||||
SDL_EVENT_LOCALE_CHANGED, /**< The user's locale preferences have changed. */
|
||||
|
||||
/* Display events */
|
||||
/* 0x150 was SDL_DISPLAYEVENT, reserve the number for sdl2-compat */
|
||||
SDL_DISPLAYEVENT_ORIENTATION = 0x151, /**< Display orientation has changed to data1 */
|
||||
SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */
|
||||
SDL_DISPLAYEVENT_DISCONNECTED, /**< Display has been removed from the system */
|
||||
SDL_DISPLAYEVENT_MOVED, /**< Display has changed position */
|
||||
SDL_DISPLAYEVENT_FIRST = SDL_DISPLAYEVENT_ORIENTATION,
|
||||
SDL_DISPLAYEVENT_LAST = SDL_DISPLAYEVENT_DISCONNECTED,
|
||||
SDL_EVENT_DISPLAY_ORIENTATION = 0x151, /**< Display orientation has changed to data1 */
|
||||
SDL_EVENT_DISPLAY_CONNECTED, /**< Display has been added to the system */
|
||||
SDL_EVENT_DISPLAY_DISCONNECTED, /**< Display has been removed from the system */
|
||||
SDL_EVENT_DISPLAY_MOVED, /**< Display has changed position */
|
||||
SDL_EVENT_DISPLAY_FIRST = SDL_EVENT_DISPLAY_ORIENTATION,
|
||||
SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_DISCONNECTED,
|
||||
|
||||
/* Window events */
|
||||
/* 0x200 was SDL_WINDOWEVENT, reserve the number for sdl2-compat */
|
||||
SDL_SYSWMEVENT = 0x201, /**< System specific event */
|
||||
SDL_WINDOWEVENT_SHOWN, /**< Window has been shown */
|
||||
SDL_WINDOWEVENT_HIDDEN, /**< Window has been hidden */
|
||||
SDL_WINDOWEVENT_EXPOSED, /**< Window has been exposed and should be
|
||||
SDL_EVENT_SYSWM = 0x201, /**< System specific event */
|
||||
SDL_EVENT_WINDOW_SHOWN, /**< Window has been shown */
|
||||
SDL_EVENT_WINDOW_HIDDEN, /**< Window has been hidden */
|
||||
SDL_EVENT_WINDOW_EXPOSED, /**< Window has been exposed and should be
|
||||
redrawn */
|
||||
SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1, data2
|
||||
SDL_EVENT_WINDOW_MOVED, /**< Window has been moved to data1, data2
|
||||
*/
|
||||
SDL_WINDOWEVENT_RESIZED, /**< Window has been resized to data1xdata2 */
|
||||
SDL_WINDOWEVENT_SIZE_CHANGED, /**< The window size has changed, either as
|
||||
SDL_EVENT_WINDOW_RESIZED, /**< Window has been resized to data1xdata2 */
|
||||
SDL_EVENT_WINDOW_SIZE_CHANGED, /**< The window size has changed, either as
|
||||
a result of an API call or through the
|
||||
system or user changing the window size. */
|
||||
SDL_WINDOWEVENT_MINIMIZED, /**< Window has been minimized */
|
||||
SDL_WINDOWEVENT_MAXIMIZED, /**< Window has been maximized */
|
||||
SDL_WINDOWEVENT_RESTORED, /**< Window has been restored to normal size
|
||||
SDL_EVENT_WINDOW_MINIMIZED, /**< Window has been minimized */
|
||||
SDL_EVENT_WINDOW_MAXIMIZED, /**< Window has been maximized */
|
||||
SDL_EVENT_WINDOW_RESTORED, /**< Window has been restored to normal size
|
||||
and position */
|
||||
SDL_WINDOWEVENT_ENTER, /**< Window has gained mouse focus */
|
||||
SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */
|
||||
SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */
|
||||
SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */
|
||||
SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */
|
||||
SDL_WINDOWEVENT_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
|
||||
SDL_WINDOWEVENT_HIT_TEST, /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
|
||||
SDL_WINDOWEVENT_ICCPROF_CHANGED,/**< The ICC profile of the window's display has changed. */
|
||||
SDL_WINDOWEVENT_DISPLAY_CHANGED,/**< Window has been moved to display data1. */
|
||||
SDL_WINDOWEVENT_FIRST = SDL_WINDOWEVENT_SHOWN,
|
||||
SDL_WINDOWEVENT_LAST = SDL_WINDOWEVENT_DISPLAY_CHANGED,
|
||||
SDL_EVENT_WINDOW_MOUSE_ENTER, /**< Window has gained mouse focus */
|
||||
SDL_EVENT_WINDOW_MOUSE_LEAVE, /**< Window has lost mouse focus */
|
||||
SDL_EVENT_WINDOW_FOCUS_GAINED, /**< Window has gained keyboard focus */
|
||||
SDL_EVENT_WINDOW_FOCUS_LOST, /**< Window has lost keyboard focus */
|
||||
SDL_EVENT_WINDOW_CLOSE_REQUESTED, /**< The window manager requests that the window be closed */
|
||||
SDL_EVENT_WINDOW_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
|
||||
SDL_EVENT_WINDOW_HIT_TEST, /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
|
||||
SDL_EVENT_WINDOW_ICCPROF_CHANGED,/**< The ICC profile of the window's display has changed. */
|
||||
SDL_EVENT_WINDOW_DISPLAY_CHANGED,/**< Window has been moved to display data1. */
|
||||
SDL_EVENT_WINDOW_FIRST = SDL_EVENT_WINDOW_SHOWN,
|
||||
SDL_EVENT_WINDOW_LAST = SDL_EVENT_WINDOW_DISPLAY_CHANGED,
|
||||
|
||||
/* Keyboard events */
|
||||
SDL_KEYDOWN = 0x300, /**< Key pressed */
|
||||
SDL_KEYUP, /**< Key released */
|
||||
SDL_TEXTEDITING, /**< Keyboard text editing (composition) */
|
||||
SDL_TEXTINPUT, /**< Keyboard text input */
|
||||
SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an
|
||||
SDL_EVENT_KEY_DOWN = 0x300, /**< Key pressed */
|
||||
SDL_EVENT_KEY_UP, /**< Key released */
|
||||
SDL_EVENT_TEXT_EDITING, /**< Keyboard text editing (composition) */
|
||||
SDL_EVENT_TEXT_INPUT, /**< Keyboard text input */
|
||||
SDL_EVENT_KEYMAP_CHANGED, /**< Keymap changed due to a system event such as an
|
||||
input language or keyboard layout change.
|
||||
*/
|
||||
SDL_TEXTEDITING_EXT, /**< Extended keyboard text editing (composition) */
|
||||
SDL_EVENT_TEXTEDITING_EXT, /**< Extended keyboard text editing (composition) */
|
||||
|
||||
/* Mouse events */
|
||||
SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
|
||||
SDL_MOUSEBUTTONDOWN, /**< Mouse button pressed */
|
||||
SDL_MOUSEBUTTONUP, /**< Mouse button released */
|
||||
SDL_MOUSEWHEEL, /**< Mouse wheel motion */
|
||||
SDL_EVENT_MOUSE_MOTION = 0x400, /**< Mouse moved */
|
||||
SDL_EVENT_MOUSE_BUTTONDOWN, /**< Mouse button pressed */
|
||||
SDL_EVENT_MOUSE_BUTTONUP, /**< Mouse button released */
|
||||
SDL_EVENT_MOUSE_WHEEL, /**< Mouse wheel motion */
|
||||
|
||||
/* Joystick events */
|
||||
SDL_JOYAXISMOTION = 0x600, /**< Joystick axis motion */
|
||||
SDL_JOYHATMOTION = 0x602, /**< Joystick hat position change */
|
||||
SDL_JOYBUTTONDOWN, /**< Joystick button pressed */
|
||||
SDL_JOYBUTTONUP, /**< Joystick button released */
|
||||
SDL_JOYDEVICEADDED, /**< A new joystick has been inserted into the system */
|
||||
SDL_JOYDEVICEREMOVED, /**< An opened joystick has been removed */
|
||||
SDL_JOYBATTERYUPDATED, /**< Joystick battery level change */
|
||||
SDL_EVENT_JOYSTICK_AXIS_MOTION = 0x600, /**< Joystick axis motion */
|
||||
SDL_EVENT_JOYSTICK_HAT_MOTION = 0x602, /**< Joystick hat position change */
|
||||
SDL_EVENT_JOYSTICK_BUTTON_DOWN, /**< Joystick button pressed */
|
||||
SDL_EVENT_JOYSTICK_BUTTON_UP, /**< Joystick button released */
|
||||
SDL_EVENT_JOYSTICK_ADDED, /**< A new joystick has been inserted into the system */
|
||||
SDL_EVENT_JOYSTICK_REMOVED, /**< An opened joystick has been removed */
|
||||
SDL_EVENT_JOYSTICK_BATTERY_UPDATED, /**< Joystick battery level change */
|
||||
|
||||
/* Gamepad events */
|
||||
SDL_GAMEPADAXISMOTION = 0x650, /**< Gamepad axis motion */
|
||||
SDL_GAMEPADBUTTONDOWN, /**< Gamepad button pressed */
|
||||
SDL_GAMEPADBUTTONUP, /**< Gamepad button released */
|
||||
SDL_GAMEPADADDED, /**< A new gamepad has been inserted into the system */
|
||||
SDL_GAMEPADREMOVED, /**< An opened gamepad has been removed */
|
||||
SDL_GAMEPADREMAPPED, /**< The gamepad mapping was updated */
|
||||
SDL_GAMEPADTOUCHPADDOWN, /**< Gamepad touchpad was touched */
|
||||
SDL_GAMEPADTOUCHPADMOTION, /**< Gamepad touchpad finger was moved */
|
||||
SDL_GAMEPADTOUCHPADUP, /**< Gamepad touchpad finger was lifted */
|
||||
SDL_GAMEPADSENSORUPDATE, /**< Gamepad sensor was updated */
|
||||
SDL_EVENT_GAMEPAD_AXIS_MOTION = 0x650, /**< Gamepad axis motion */
|
||||
SDL_EVENT_GAMEPAD_BUTTON_DOWN, /**< Gamepad button pressed */
|
||||
SDL_EVENT_GAMEPAD_BUTTON_UP, /**< Gamepad button released */
|
||||
SDL_EVENT_GAMEPAD_ADDED, /**< A new gamepad has been inserted into the system */
|
||||
SDL_EVENT_GAMEPAD_REMOVED, /**< An opened gamepad has been removed */
|
||||
SDL_EVENT_GAMEPAD_REMAPPED, /**< The gamepad mapping was updated */
|
||||
SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN, /**< Gamepad touchpad was touched */
|
||||
SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION, /**< Gamepad touchpad finger was moved */
|
||||
SDL_EVENT_GAMEPAD_TOUCHPAD_UP, /**< Gamepad touchpad finger was lifted */
|
||||
SDL_EVENT_GAMEPAD_SENSOR_UPDATE, /**< Gamepad sensor was updated */
|
||||
|
||||
/* Touch events */
|
||||
SDL_FINGERDOWN = 0x700,
|
||||
SDL_FINGERUP,
|
||||
SDL_FINGERMOTION,
|
||||
SDL_EVENT_FINGER_DOWN = 0x700,
|
||||
SDL_EVENT_FINGER_UP,
|
||||
SDL_EVENT_FINGER_MOTION,
|
||||
|
||||
/* 0x800, 0x801, and 0x802 were the Gesture events from SDL2. Do not reuse these values! sdl2-compat needs them! */
|
||||
|
||||
/* Clipboard events */
|
||||
SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard or primary selection changed */
|
||||
SDL_EVENT_CLIPBOARD_UPDATE = 0x900, /**< The clipboard or primary selection changed */
|
||||
|
||||
/* Drag and drop events */
|
||||
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
|
||||
SDL_DROPTEXT, /**< text/plain drag-and-drop event */
|
||||
SDL_DROPBEGIN, /**< A new set of drops is beginning (NULL filename) */
|
||||
SDL_DROPCOMPLETE, /**< Current set of drops is now complete (NULL filename) */
|
||||
SDL_EVENT_DROP_FILE = 0x1000, /**< The system requests a file open */
|
||||
SDL_EVENT_DROP_TEXT, /**< text/plain drag-and-drop event */
|
||||
SDL_EVENT_DROP_BEGIN, /**< A new set of drops is beginning (NULL filename) */
|
||||
SDL_EVENT_DROP_COMPLETE, /**< Current set of drops is now complete (NULL filename) */
|
||||
|
||||
/* Audio hotplug events */
|
||||
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
|
||||
SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
|
||||
SDL_EVENT_AUDIO_DEVICE_ADDED = 0x1100, /**< A new audio device is available */
|
||||
SDL_EVENT_AUDIO_DEVICE_REMOVED, /**< An audio device has been removed. */
|
||||
|
||||
/* Sensor events */
|
||||
SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */
|
||||
SDL_EVENT_SENSOR_UPDATE = 0x1200, /**< A sensor was updated */
|
||||
|
||||
/* Render events */
|
||||
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
|
||||
SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
|
||||
SDL_EVENT_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
|
||||
SDL_EVENT_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
|
||||
|
||||
/* Internal events */
|
||||
SDL_POLLSENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
|
||||
SDL_EVENT_POLL_SENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
|
||||
|
||||
/** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
|
||||
/** Events ::SDL_EVENT_USER through ::SDL_EVENT_LAST are for your use,
|
||||
* and should be allocated with SDL_RegisterEvents()
|
||||
*/
|
||||
SDL_USEREVENT = 0x8000,
|
||||
SDL_EVENT_USER = 0x8000,
|
||||
|
||||
/**
|
||||
* This last event is only for bounding internal arrays
|
||||
*/
|
||||
SDL_LASTEVENT = 0xFFFF
|
||||
SDL_EVENT_LAST = 0xFFFF
|
||||
} SDL_EventType;
|
||||
|
||||
/**
|
||||
|
@ -240,7 +240,7 @@ typedef struct SDL_WindowEvent
|
|||
*/
|
||||
typedef struct SDL_KeyboardEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
|
||||
Uint32 type; /**< ::SDL_EVENT_KEY_DOWN or ::SDL_EVENT_KEY_UP */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_WindowID windowID;/**< The window with keyboard focus, if any */
|
||||
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
||||
|
@ -256,7 +256,7 @@ typedef struct SDL_KeyboardEvent
|
|||
*/
|
||||
typedef struct SDL_TextEditingEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_TEXTEDITING */
|
||||
Uint32 type; /**< ::SDL_EVENT_TEXT_EDITING */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_WindowID windowID; /**< The window with keyboard focus, if any */
|
||||
char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; /**< The editing text */
|
||||
|
@ -270,7 +270,7 @@ typedef struct SDL_TextEditingEvent
|
|||
*/
|
||||
typedef struct SDL_TextEditingExtEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_TEXTEDITING_EXT */
|
||||
Uint32 type; /**< ::SDL_EVENT_TEXTEDITING_EXT */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_WindowID windowID; /**< The window with keyboard focus, if any */
|
||||
char* text; /**< The editing text, which should be freed with SDL_free(), and will not be NULL */
|
||||
|
@ -284,7 +284,7 @@ typedef struct SDL_TextEditingExtEvent
|
|||
*/
|
||||
typedef struct SDL_TextInputEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_TEXTINPUT */
|
||||
Uint32 type; /**< ::SDL_EVENT_TEXT_INPUT */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_WindowID windowID; /**< The window with keyboard focus, if any */
|
||||
char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */
|
||||
|
@ -295,7 +295,7 @@ typedef struct SDL_TextInputEvent
|
|||
*/
|
||||
typedef struct SDL_MouseMotionEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MOUSEMOTION */
|
||||
Uint32 type; /**< ::SDL_EVENT_MOUSE_MOTION */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_WindowID windowID;/**< The window with mouse focus, if any */
|
||||
SDL_MouseID which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||
|
@ -311,7 +311,7 @@ typedef struct SDL_MouseMotionEvent
|
|||
*/
|
||||
typedef struct SDL_MouseButtonEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
|
||||
Uint32 type; /**< ::SDL_EVENT_MOUSE_BUTTONDOWN or ::SDL_EVENT_MOUSE_BUTTONUP */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_WindowID windowID;/**< The window with mouse focus, if any */
|
||||
SDL_MouseID which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||
|
@ -328,7 +328,7 @@ typedef struct SDL_MouseButtonEvent
|
|||
*/
|
||||
typedef struct SDL_MouseWheelEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MOUSEWHEEL */
|
||||
Uint32 type; /**< ::SDL_EVENT_MOUSE_WHEEL */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_WindowID windowID;/**< The window with mouse focus, if any */
|
||||
SDL_MouseID which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||
|
@ -344,7 +344,7 @@ typedef struct SDL_MouseWheelEvent
|
|||
*/
|
||||
typedef struct SDL_JoyAxisEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYAXISMOTION */
|
||||
Uint32 type; /**< ::SDL_EVENT_JOYSTICK_AXIS_MOTION */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 axis; /**< The joystick axis index */
|
||||
|
@ -360,7 +360,7 @@ typedef struct SDL_JoyAxisEvent
|
|||
*/
|
||||
typedef struct SDL_JoyHatEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYHATMOTION */
|
||||
Uint32 type; /**< ::SDL_EVENT_JOYSTICK_HAT_MOTION */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 hat; /**< The joystick hat index */
|
||||
|
@ -380,7 +380,7 @@ typedef struct SDL_JoyHatEvent
|
|||
*/
|
||||
typedef struct SDL_JoyButtonEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
|
||||
Uint32 type; /**< ::SDL_EVENT_JOYSTICK_BUTTON_DOWN or ::SDL_EVENT_JOYSTICK_BUTTON_UP */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 button; /**< The joystick button index */
|
||||
|
@ -394,7 +394,7 @@ typedef struct SDL_JoyButtonEvent
|
|||
*/
|
||||
typedef struct SDL_JoyDeviceEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */
|
||||
Uint32 type; /**< ::SDL_EVENT_JOYSTICK_ADDED or ::SDL_EVENT_JOYSTICK_REMOVED */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
} SDL_JoyDeviceEvent;
|
||||
|
@ -404,7 +404,7 @@ typedef struct SDL_JoyDeviceEvent
|
|||
*/
|
||||
typedef struct SDL_JoyBatteryEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYBATTERYUPDATED */
|
||||
Uint32 type; /**< ::SDL_EVENT_JOYSTICK_BATTERY_UPDATED */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
SDL_JoystickPowerLevel level; /**< The joystick battery level */
|
||||
|
@ -415,7 +415,7 @@ typedef struct SDL_JoyBatteryEvent
|
|||
*/
|
||||
typedef struct SDL_GamepadAxisEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_GAMEPADAXISMOTION */
|
||||
Uint32 type; /**< ::SDL_EVENT_GAMEPAD_AXIS_MOTION */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 axis; /**< The gamepad axis (SDL_GamepadAxis) */
|
||||
|
@ -432,7 +432,7 @@ typedef struct SDL_GamepadAxisEvent
|
|||
*/
|
||||
typedef struct SDL_GamepadButtonEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_GAMEPADBUTTONDOWN or ::SDL_GAMEPADBUTTONUP */
|
||||
Uint32 type; /**< ::SDL_EVENT_GAMEPAD_BUTTON_DOWN or ::SDL_EVENT_GAMEPAD_BUTTON_UP */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 button; /**< The gamepad button (SDL_GamepadButton) */
|
||||
|
@ -447,7 +447,7 @@ typedef struct SDL_GamepadButtonEvent
|
|||
*/
|
||||
typedef struct SDL_GamepadDeviceEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_GAMEPADADDED, ::SDL_GAMEPADREMOVED, or ::SDL_GAMEPADREMAPPED */
|
||||
Uint32 type; /**< ::SDL_EVENT_GAMEPAD_ADDED, ::SDL_EVENT_GAMEPAD_REMOVED, or ::SDL_EVENT_GAMEPAD_REMAPPED */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
} SDL_GamepadDeviceEvent;
|
||||
|
@ -457,7 +457,7 @@ typedef struct SDL_GamepadDeviceEvent
|
|||
*/
|
||||
typedef struct SDL_GamepadTouchpadEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_GAMEPADTOUCHPADDOWN or ::SDL_GAMEPADTOUCHPADMOTION or ::SDL_GAMEPADTOUCHPADUP */
|
||||
Uint32 type; /**< ::SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN or ::SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION or ::SDL_EVENT_GAMEPAD_TOUCHPAD_UP */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Sint32 touchpad; /**< The index of the touchpad */
|
||||
|
@ -472,7 +472,7 @@ typedef struct SDL_GamepadTouchpadEvent
|
|||
*/
|
||||
typedef struct SDL_GamepadSensorEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_GAMEPADSENSORUPDATE */
|
||||
Uint32 type; /**< ::SDL_EVENT_GAMEPAD_SENSOR_UPDATE */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Sint32 sensor; /**< The type of the sensor, one of the values of ::SDL_SensorType */
|
||||
|
@ -485,7 +485,7 @@ typedef struct SDL_GamepadSensorEvent
|
|||
*/
|
||||
typedef struct SDL_AudioDeviceEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */
|
||||
Uint32 type; /**< ::SDL_EVENT_AUDIO_DEVICE_ADDED, or ::SDL_EVENT_AUDIO_DEVICE_REMOVED */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_AudioDeviceID which; /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
|
||||
Uint8 iscapture; /**< zero if an output device, non-zero if a capture device. */
|
||||
|
@ -500,7 +500,7 @@ typedef struct SDL_AudioDeviceEvent
|
|||
*/
|
||||
typedef struct SDL_TouchFingerEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
|
||||
Uint32 type; /**< ::SDL_EVENT_FINGER_MOTION or ::SDL_EVENT_FINGER_DOWN or ::SDL_EVENT_FINGER_UP */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_TouchID touchId; /**< The touch device id */
|
||||
SDL_FingerID fingerId;
|
||||
|
@ -520,7 +520,7 @@ typedef struct SDL_TouchFingerEvent
|
|||
*/
|
||||
typedef struct SDL_DropEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
|
||||
Uint32 type; /**< ::SDL_EVENT_DROP_BEGIN or ::SDL_EVENT_DROP_FILE or ::SDL_EVENT_DROP_TEXT or ::SDL_EVENT_DROP_COMPLETE */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
|
||||
SDL_WindowID windowID;/**< The window that was dropped on, if any */
|
||||
|
@ -532,7 +532,7 @@ typedef struct SDL_DropEvent
|
|||
*/
|
||||
typedef struct SDL_SensorEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_SENSORUPDATE */
|
||||
Uint32 type; /**< ::SDL_EVENT_SENSOR_UPDATE */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_SensorID which; /**< The instance ID of the sensor */
|
||||
float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_GetSensorData() */
|
||||
|
@ -544,7 +544,7 @@ typedef struct SDL_SensorEvent
|
|||
*/
|
||||
typedef struct SDL_QuitEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_QUIT */
|
||||
Uint32 type; /**< ::SDL_EVENT_QUIT */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
} SDL_QuitEvent;
|
||||
|
||||
|
@ -553,7 +553,7 @@ typedef struct SDL_QuitEvent
|
|||
*/
|
||||
typedef struct SDL_OSEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_QUIT */
|
||||
Uint32 type; /**< ::SDL_EVENT_QUIT */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
} SDL_OSEvent;
|
||||
|
||||
|
@ -562,7 +562,7 @@ typedef struct SDL_OSEvent
|
|||
*/
|
||||
typedef struct SDL_UserEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */
|
||||
Uint32 type; /**< ::SDL_EVENT_USER through ::SDL_EVENT_LAST-1 */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_WindowID windowID;/**< The associated window if any */
|
||||
Sint32 code; /**< User defined event code */
|
||||
|
@ -582,7 +582,7 @@ typedef struct SDL_SysWMmsg SDL_SysWMmsg;
|
|||
*/
|
||||
typedef struct SDL_SysWMEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_SYSWMEVENT */
|
||||
Uint32 type; /**< ::SDL_EVENT_SYSWM */
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */
|
||||
} SDL_SysWMEvent;
|
||||
|
@ -701,9 +701,9 @@ typedef enum
|
|||
* SDL_GETEVENT, the maximum number of events to retrieve
|
||||
* \param action action to take; see [[#action|Remarks]] for details
|
||||
* \param minType minimum value of the event type to be considered;
|
||||
* SDL_FIRSTEVENT is a safe choice
|
||||
* SDL_EVENT_FIRST is a safe choice
|
||||
* \param maxType maximum value of the event type to be considered;
|
||||
* SDL_LASTEVENT is a safe choice
|
||||
* SDL_EVENT_LAST is a safe choice
|
||||
* \returns the number of events actually stored or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
|
|
|
@ -132,7 +132,7 @@ extern "C" {
|
|||
* \brief A variable to control whether we trap the Android back button to handle it manually.
|
||||
* This is necessary for the right mouse button to work on some Android devices, or
|
||||
* to be able to trap the back button for use in your code reliably. If set to true,
|
||||
* the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of
|
||||
* the back button will show up as an SDL_EVENT_KEY_DOWN / SDL_EVENT_KEY_UP pair with a keycode of
|
||||
* SDL_SCANCODE_AC_BACK.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
|
@ -557,13 +557,13 @@ extern "C" {
|
|||
#define SDL_HINT_HIDAPI_IGNORE_DEVICES "SDL_HIDAPI_IGNORE_DEVICES"
|
||||
|
||||
/**
|
||||
* \brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_TEXTEDITING events.
|
||||
* \brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_EVENT_TEXT_EDITING events.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - SDL_TEXTEDITING events are sent, and it is the application's
|
||||
* "0" - SDL_EVENT_TEXT_EDITING events are sent, and it is the application's
|
||||
* responsibility to render the text from these events and
|
||||
* differentiate it somehow from committed text. (default)
|
||||
* "1" - If supported by the IME then SDL_TEXTEDITING events are not sent,
|
||||
* "1" - If supported by the IME then SDL_EVENT_TEXT_EDITING events are not sent,
|
||||
* and text that is being composed will be rendered in its own UI.
|
||||
*/
|
||||
#define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
|
||||
|
@ -1211,7 +1211,7 @@ extern "C" {
|
|||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - SDL will install a SIGINT and SIGTERM handler, and when it
|
||||
* catches a signal, convert it into an SDL_QUIT event.
|
||||
* catches a signal, convert it into an SDL_EVENT_QUIT event.
|
||||
* "1" - SDL will not install a signal handler at all.
|
||||
*/
|
||||
#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
|
||||
|
@ -1279,7 +1279,7 @@ extern "C" {
|
|||
*
|
||||
* If set, this will be favored over anything the OS might report for the
|
||||
* user's preferred locales. Changing this hint at runtime will not generate
|
||||
* a SDL_LOCALECHANGED event (but if you can change the hint, you can push
|
||||
* a SDL_EVENT_LOCALE_CHANGED event (but if you can change the hint, you can push
|
||||
* your own event, if you want).
|
||||
*
|
||||
* The format of this hint is a comma-separated list of language and locale,
|
||||
|
@ -2138,8 +2138,8 @@ extern "C" {
|
|||
* the app).
|
||||
*
|
||||
* SDL registers its own back-button-press callback with the Windows Phone
|
||||
* OS. This callback will emit a pair of SDL key-press events (SDL_KEYDOWN
|
||||
* and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which
|
||||
* OS. This callback will emit a pair of SDL key-press events (SDL_EVENT_KEY_DOWN
|
||||
* and SDL_EVENT_KEY_UP), each with a scancode of SDL_SCANCODE_AC_BACK, after which
|
||||
* it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.
|
||||
* If the hint's value is set to "1", the back button event's Handled
|
||||
* property will get set to 'true'. If the hint's value is set to something
|
||||
|
@ -2152,8 +2152,8 @@ extern "C" {
|
|||
*
|
||||
* In order to get notified when a back button is pressed, SDL apps should
|
||||
* register a callback function with SDL_AddEventWatch(), and have it listen
|
||||
* for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
|
||||
* (Alternatively, SDL_KEYUP events can be listened-for. Listening for
|
||||
* for SDL_EVENT_KEY_DOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
|
||||
* (Alternatively, SDL_EVENT_KEY_UP events can be listened-for. Listening for
|
||||
* either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON
|
||||
* set by such a callback, will be applied to the OS' current
|
||||
* back-button-press event.
|
||||
|
@ -2290,26 +2290,26 @@ extern "C" {
|
|||
#define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
|
||||
|
||||
/**
|
||||
* \brief A variable that decides whether to send SDL_QUIT when closing the final window.
|
||||
* \brief A variable that decides whether to send SDL_EVENT_QUIT when closing the final window.
|
||||
*
|
||||
* By default, SDL sends an SDL_QUIT event when there is only one window
|
||||
* and it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most
|
||||
* By default, SDL sends an SDL_EVENT_QUIT event when there is only one window
|
||||
* and it receives an SDL_EVENT_WINDOW_CLOSE_REQUESTED event, under the assumption most
|
||||
* apps would also take the loss of this window as a signal to terminate the
|
||||
* program.
|
||||
*
|
||||
* However, it's not unreasonable in some cases to have the program continue
|
||||
* to live on, perhaps to create new windows later.
|
||||
*
|
||||
* Changing this hint to "0" will cause SDL to not send an SDL_QUIT event
|
||||
* Changing this hint to "0" will cause SDL to not send an SDL_EVENT_QUIT event
|
||||
* when the final window is requesting to close. Note that in this case,
|
||||
* there are still other legitimate reasons one might get an SDL_QUIT
|
||||
* there are still other legitimate reasons one might get an SDL_EVENT_QUIT
|
||||
* event: choosing "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c)
|
||||
* on Unix, etc.
|
||||
*
|
||||
* The default value is "1". This hint can be changed at any time.
|
||||
*
|
||||
* This hint is available since SDL 2.0.22. Before then, you always get
|
||||
* an SDL_QUIT event when closing the final window.
|
||||
* an SDL_EVENT_QUIT event when closing the final window.
|
||||
*/
|
||||
#define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
/**
|
||||
* \brief The SDL keysym structure, used in key events.
|
||||
*
|
||||
* \note If you are looking for translated character input, see the ::SDL_TEXTINPUT event.
|
||||
* \note If you are looking for translated character input, see the ::SDL_EVENT_TEXT_INPUT event.
|
||||
*/
|
||||
typedef struct SDL_Keysym
|
||||
{
|
||||
|
@ -247,8 +247,8 @@ extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
|
|||
* Start accepting Unicode text input events.
|
||||
*
|
||||
* This function will start accepting Unicode text input events in the focused
|
||||
* SDL window, and start emitting SDL_TextInputEvent (SDL_TEXTINPUT) and
|
||||
* SDL_TextEditingEvent (SDL_TEXTEDITING) events. Please use this function in
|
||||
* SDL window, and start emitting SDL_TextInputEvent (SDL_EVENT_TEXT_INPUT) and
|
||||
* SDL_TextEditingEvent (SDL_EVENT_TEXT_EDITING) events. Please use this function in
|
||||
* pair with SDL_StopTextInput().
|
||||
*
|
||||
* On some platforms using this function activates the screen keyboard.
|
||||
|
|
|
@ -79,7 +79,7 @@ typedef struct SDL_Locale
|
|||
* This might be a "slow" call that has to query the operating system. It's
|
||||
* best to ask for this once and save the results. However, this list can
|
||||
* change, usually because the user has changed a system preference outside of
|
||||
* your program; SDL will send an SDL_LOCALECHANGED event in this case, if
|
||||
* your program; SDL will send an SDL_EVENT_LOCALE_CHANGED event in this case, if
|
||||
* possible, and you can call this function again to get an updated copy of
|
||||
* preferred locales.
|
||||
*
|
||||
|
|
|
@ -50,21 +50,86 @@
|
|||
#define SDL_NewAudioStream SDL_CreateAudioStream
|
||||
|
||||
/* ##SDL_events.h */
|
||||
#define SDL_CONTROLLERAXISMOTION SDL_GAMEPADAXISMOTION
|
||||
#define SDL_CONTROLLERBUTTONDOWN SDL_GAMEPADBUTTONDOWN
|
||||
#define SDL_CONTROLLERBUTTONUP SDL_GAMEPADBUTTONUP
|
||||
#define SDL_CONTROLLERDEVICEADDED SDL_GAMEPADADDED
|
||||
#define SDL_CONTROLLERDEVICEREMAPPED SDL_GAMEPADREMAPPED
|
||||
#define SDL_CONTROLLERDEVICEREMOVED SDL_GAMEPADREMOVED
|
||||
#define SDL_CONTROLLERSENSORUPDATE SDL_GAMEPADSENSORUPDATE
|
||||
#define SDL_CONTROLLERTOUCHPADDOWN SDL_GAMEPADTOUCHPADDOWN
|
||||
#define SDL_CONTROLLERTOUCHPADMOTION SDL_GAMEPADTOUCHPADMOTION
|
||||
#define SDL_CONTROLLERTOUCHPADUP SDL_GAMEPADTOUCHPADUP
|
||||
#define SDL_APP_DIDENTERBACKGROUND SDL_EVENT_DID_ENTER_BACKGROUND
|
||||
#define SDL_APP_DIDENTERFOREGROUND SDL_EVENT_DID_ENTER_FOREGROUND
|
||||
#define SDL_APP_LOWMEMORY SDL_EVENT_LOW_MEMORY
|
||||
#define SDL_APP_TERMINATING SDL_EVENT_TERMINATING
|
||||
#define SDL_APP_WILLENTERBACKGROUND SDL_EVENT_WILL_ENTER_BACKGROUND
|
||||
#define SDL_APP_WILLENTERFOREGROUND SDL_EVENT_WILL_ENTER_FOREGROUND
|
||||
#define SDL_AUDIODEVICEADDED SDL_EVENT_AUDIO_DEVICE_ADDED
|
||||
#define SDL_AUDIODEVICEREMOVED SDL_EVENT_AUDIO_DEVICE_REMOVED
|
||||
#define SDL_CLIPBOARDUPDATE SDL_EVENT_CLIPBOARD_UPDATE
|
||||
#define SDL_CONTROLLERAXISMOTION SDL_EVENT_GAMEPAD_AXIS_MOTION
|
||||
#define SDL_CONTROLLERBUTTONDOWN SDL_EVENT_GAMEPAD_BUTTON_DOWN
|
||||
#define SDL_CONTROLLERBUTTONUP SDL_EVENT_GAMEPAD_BUTTON_UP
|
||||
#define SDL_CONTROLLERDEVICEADDED SDL_EVENT_GAMEPAD_ADDED
|
||||
#define SDL_CONTROLLERDEVICEREMAPPED SDL_EVENT_GAMEPAD_REMAPPED
|
||||
#define SDL_CONTROLLERDEVICEREMOVED SDL_EVENT_GAMEPAD_REMOVED
|
||||
#define SDL_CONTROLLERSENSORUPDATE SDL_EVENT_GAMEPAD_SENSOR_UPDATE
|
||||
#define SDL_CONTROLLERTOUCHPADDOWN SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN
|
||||
#define SDL_CONTROLLERTOUCHPADMOTION SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION
|
||||
#define SDL_CONTROLLERTOUCHPADUP SDL_EVENT_GAMEPAD_TOUCHPAD_UP
|
||||
#define SDL_ControllerAxisEvent SDL_GamepadAxisEvent
|
||||
#define SDL_ControllerButtonEvent SDL_GamepadButtonEvent
|
||||
#define SDL_ControllerDeviceEvent SDL_GamepadDeviceEvent
|
||||
#define SDL_ControllerSensorEvent SDL_GamepadSensorEvent
|
||||
#define SDL_ControllerTouchpadEvent SDL_GamepadTouchpadEvent
|
||||
#define SDL_DISPLAYEVENT_CONNECTED SDL_EVENT_DISPLAY_CONNECTED
|
||||
#define SDL_DISPLAYEVENT_DISCONNECTED SDL_EVENT_DISPLAY_DISCONNECTED
|
||||
#define SDL_DISPLAYEVENT_MOVED SDL_EVENT_DISPLAY_MOVED
|
||||
#define SDL_DISPLAYEVENT_ORIENTATION SDL_EVENT_DISPLAY_ORIENTATION
|
||||
#define SDL_DROPBEGIN SDL_EVENT_DROP_BEGIN
|
||||
#define SDL_DROPCOMPLETE SDL_EVENT_DROP_COMPLETE
|
||||
#define SDL_DROPFILE SDL_EVENT_DROP_FILE
|
||||
#define SDL_DROPTEXT SDL_EVENT_DROP_TEXT
|
||||
#define SDL_FINGERDOWN SDL_EVENT_FINGER_DOWN
|
||||
#define SDL_FINGERMOTION SDL_EVENT_FINGER_MOTION
|
||||
#define SDL_FINGERUP SDL_EVENT_FINGER_UP
|
||||
#define SDL_FIRSTEVENT SDL_EVENT_FIRST
|
||||
#define SDL_JOYAXISMOTION SDL_EVENT_JOYSTICK_AXIS_MOTION
|
||||
#define SDL_JOYBATTERYUPDATED SDL_EVENT_JOYSTICK_BATTERY_UPDATED
|
||||
#define SDL_JOYBUTTONDOWN SDL_EVENT_JOYSTICK_BUTTON_DOWN
|
||||
#define SDL_JOYBUTTONUP SDL_EVENT_JOYSTICK_BUTTON_UP
|
||||
#define SDL_JOYDEVICEADDED SDL_EVENT_JOYSTICK_ADDED
|
||||
#define SDL_JOYDEVICEREMOVED SDL_EVENT_JOYSTICK_REMOVED
|
||||
#define SDL_JOYHATMOTION SDL_EVENT_JOYSTICK_HAT_MOTION
|
||||
#define SDL_KEYDOWN SDL_EVENT_KEY_DOWN
|
||||
#define SDL_KEYMAPCHANGED SDL_EVENT_KEYMAP_CHANGED
|
||||
#define SDL_KEYUP SDL_EVENT_KEY_UP
|
||||
#define SDL_LASTEVENT SDL_EVENT_LAST
|
||||
#define SDL_LOCALECHANGED SDL_EVENT_LOCALE_CHANGED
|
||||
#define SDL_MOUSEBUTTONDOWN SDL_EVENT_MOUSE_BUTTONDOWN
|
||||
#define SDL_MOUSEBUTTONUP SDL_EVENT_MOUSE_BUTTONUP
|
||||
#define SDL_MOUSEMOTION SDL_EVENT_MOUSE_MOTION
|
||||
#define SDL_MOUSEWHEEL SDL_EVENT_MOUSE_WHEEL
|
||||
#define SDL_POLLSENTINEL SDL_EVENT_POLL_SENTINEL
|
||||
#define SDL_QUIT SDL_EVENT_QUIT
|
||||
#define SDL_RENDER_DEVICE_RESET SDL_EVENT_RENDER_DEVICE_RESET
|
||||
#define SDL_RENDER_TARGETS_RESET SDL_EVENT_RENDER_TARGETS_RESET
|
||||
#define SDL_SENSORUPDATE SDL_EVENT_SENSOR_UPDATE
|
||||
#define SDL_SYSWMEVENT SDL_EVENT_SYSWM
|
||||
#define SDL_TEXTEDITING SDL_EVENT_TEXT_EDITING
|
||||
#define SDL_TEXTEDITING_EXT SDL_EVENT_TEXTEDITING_EXT
|
||||
#define SDL_TEXTINPUT SDL_EVENT_TEXT_INPUT
|
||||
#define SDL_USEREVENT SDL_EVENT_USER
|
||||
#define SDL_WINDOWEVENT_CLOSE SDL_EVENT_WINDOW_CLOSE_REQUESTED
|
||||
#define SDL_WINDOWEVENT_DISPLAY_CHANGED SDL_EVENT_WINDOW_DISPLAY_CHANGED
|
||||
#define SDL_WINDOWEVENT_ENTER SDL_EVENT_WINDOW_MOUSE_ENTER
|
||||
#define SDL_WINDOWEVENT_EXPOSED SDL_EVENT_WINDOW_EXPOSED
|
||||
#define SDL_WINDOWEVENT_FOCUS_GAINED SDL_EVENT_WINDOW_FOCUS_GAINED
|
||||
#define SDL_WINDOWEVENT_FOCUS_LOST SDL_EVENT_WINDOW_FOCUS_LOST
|
||||
#define SDL_WINDOWEVENT_HIDDEN SDL_EVENT_WINDOW_HIDDEN
|
||||
#define SDL_WINDOWEVENT_HIT_TEST SDL_EVENT_WINDOW_HIT_TEST
|
||||
#define SDL_WINDOWEVENT_ICCPROF_CHANGED SDL_EVENT_WINDOW_ICCPROF_CHANGED
|
||||
#define SDL_WINDOWEVENT_LEAVE SDL_EVENT_WINDOW_MOUSE_LEAVE
|
||||
#define SDL_WINDOWEVENT_MAXIMIZED SDL_EVENT_WINDOW_MAXIMIZED
|
||||
#define SDL_WINDOWEVENT_MINIMIZED SDL_EVENT_WINDOW_MINIMIZED
|
||||
#define SDL_WINDOWEVENT_MOVED SDL_EVENT_WINDOW_MOVED
|
||||
#define SDL_WINDOWEVENT_RESIZED SDL_EVENT_WINDOW_RESIZED
|
||||
#define SDL_WINDOWEVENT_RESTORED SDL_EVENT_WINDOW_RESTORED
|
||||
#define SDL_WINDOWEVENT_SHOWN SDL_EVENT_WINDOW_SHOWN
|
||||
#define SDL_WINDOWEVENT_SIZE_CHANGED SDL_EVENT_WINDOW_SIZE_CHANGED
|
||||
#define SDL_WINDOWEVENT_TAKE_FOCUS SDL_EVENT_WINDOW_TAKE_FOCUS
|
||||
|
||||
/* ##SDL_gamepad.h */
|
||||
#define SDL_CONTROLLER_AXIS_INVALID SDL_GAMEPAD_AXIS_INVALID
|
||||
|
@ -363,6 +428,15 @@
|
|||
#define SDL_NewAudioStream SDL_NewAudioStream_renamed_SDL_CreateAudioStream
|
||||
|
||||
/* ##SDL_events.h */
|
||||
#define SDL_APP_DIDENTERBACKGROUND SDL_APP_DIDENTERBACKGROUND_renamed_SDL_EVENT_DID_ENTER_BACKGROUND
|
||||
#define SDL_APP_DIDENTERFOREGROUND SDL_APP_DIDENTERFOREGROUND_renamed_SDL_EVENT_DID_ENTER_FOREGROUND
|
||||
#define SDL_APP_LOWMEMORY SDL_APP_LOWMEMORY_renamed_SDL_EVENT_LOW_MEMORY
|
||||
#define SDL_APP_TERMINATING SDL_APP_TERMINATING_renamed_SDL_EVENT_TERMINATING
|
||||
#define SDL_APP_WILLENTERBACKGROUND SDL_APP_WILLENTERBACKGROUND_renamed_SDL_EVENT_WILL_ENTER_BACKGROUND
|
||||
#define SDL_APP_WILLENTERFOREGROUND SDL_APP_WILLENTERFOREGROUND_renamed_SDL_EVENT_WILL_ENTER_FOREGROUND
|
||||
#define SDL_AUDIODEVICEADDED SDL_AUDIODEVICEADDED_renamed_SDL_EVENT_AUDIO_DEVICE_ADDED
|
||||
#define SDL_AUDIODEVICEREMOVED SDL_AUDIODEVICEREMOVED_renamed_SDL_EVENT_AUDIO_DEVICE_REMOVED
|
||||
#define SDL_CLIPBOARDUPDATE SDL_CLIPBOARDUPDATE_renamed_SDL_EVENT_CLIPBOARD_UPDATE
|
||||
#define SDL_CONTROLLERAXISMOTION SDL_CONTROLLERAXISMOTION_renamed_SDL_GAMEPADAXISMOTION
|
||||
#define SDL_CONTROLLERBUTTONDOWN SDL_CONTROLLERBUTTONDOWN_renamed_SDL_GAMEPADBUTTONDOWN
|
||||
#define SDL_CONTROLLERBUTTONUP SDL_CONTROLLERBUTTONUP_renamed_SDL_GAMEPADBUTTONUP
|
||||
|
@ -378,6 +452,62 @@
|
|||
#define SDL_ControllerDeviceEvent SDL_ControllerDeviceEvent_renamed_SDL_GamepadDeviceEvent
|
||||
#define SDL_ControllerSensorEvent SDL_ControllerSensorEvent_renamed_SDL_GamepadSensorEvent
|
||||
#define SDL_ControllerTouchpadEvent SDL_ControllerTouchpadEvent_renamed_SDL_GamepadTouchpadEvent
|
||||
#define SDL_DISPLAYEVENT_CONNECTED SDL_DISPLAYEVENT_CONNECTED_renamed_SDL_EVENT_DISPLAY_CONNECTED
|
||||
#define SDL_DISPLAYEVENT_DISCONNECTED SDL_DISPLAYEVENT_DISCONNECTED_renamed_SDL_EVENT_DISPLAY_DISCONNECTED
|
||||
#define SDL_DISPLAYEVENT_MOVED SDL_DISPLAYEVENT_MOVED_renamed_SDL_EVENT_DISPLAY_MOVED
|
||||
#define SDL_DISPLAYEVENT_ORIENTATION SDL_DISPLAYEVENT_ORIENTATION_renamed_SDL_EVENT_DISPLAY_ORIENTATION
|
||||
#define SDL_DROPBEGIN SDL_DROPBEGIN_renamed_SDL_EVENT_DROP_BEGIN
|
||||
#define SDL_DROPCOMPLETE SDL_DROPCOMPLETE_renamed_SDL_EVENT_DROP_COMPLETE
|
||||
#define SDL_DROPFILE SDL_DROPFILE_renamed_SDL_EVENT_DROP_FILE
|
||||
#define SDL_DROPTEXT SDL_DROPTEXT_renamed_SDL_EVENT_DROP_TEXT
|
||||
#define SDL_FINGERDOWN SDL_FINGERDOWN_renamed_SDL_EVENT_FINGER_DOWN
|
||||
#define SDL_FINGERMOTION SDL_FINGERMOTION_renamed_SDL_EVENT_FINGER_MOTION
|
||||
#define SDL_FINGERUP SDL_FINGERUP_renamed_SDL_EVENT_FINGER_UP
|
||||
#define SDL_FIRSTEVENT SDL_FIRSTEVENT_renamed_SDL_EVENT_FIRST
|
||||
#define SDL_JOYAXISMOTION SDL_JOYAXISMOTION_renamed_SDL_EVENT_JOYSTICK_AXIS_MOTION
|
||||
#define SDL_JOYBATTERYUPDATED SDL_JOYBATTERYUPDATED_renamed_SDL_EVENT_JOYSTICK_BATTERY_UPDATED
|
||||
#define SDL_JOYBUTTONDOWN SDL_JOYBUTTONDOWN_renamed_SDL_EVENT_JOYSTICK_BUTTON_DOWN
|
||||
#define SDL_JOYBUTTONUP SDL_JOYBUTTONUP_renamed_SDL_EVENT_JOYSTICK_BUTTON_UP
|
||||
#define SDL_JOYDEVICEADDED SDL_JOYDEVICEADDED_renamed_SDL_EVENT_JOYSTICK_ADDED
|
||||
#define SDL_JOYDEVICEREMOVED SDL_JOYDEVICEREMOVED_renamed_SDL_EVENT_JOYSTICK_REMOVED
|
||||
#define SDL_JOYHATMOTION SDL_JOYHATMOTION_renamed_SDL_EVENT_JOYSTICK_HAT_MOTION
|
||||
#define SDL_KEYDOWN SDL_KEYDOWN_renamed_SDL_EVENT_KEY_DOWN
|
||||
#define SDL_KEYMAPCHANGED SDL_KEYMAPCHANGED_renamed_SDL_EVENT_KEYMAP_CHANGED
|
||||
#define SDL_KEYUP SDL_KEYUP_renamed_SDL_EVENT_KEY_UP
|
||||
#define SDL_LASTEVENT SDL_LASTEVENT_renamed_SDL_EVENT_LAST
|
||||
#define SDL_LOCALECHANGED SDL_LOCALECHANGED_renamed_SDL_EVENT_LOCALECHANGED
|
||||
#define SDL_MOUSEBUTTONDOWN SDL_MOUSEBUTTONDOWN_renamed_SDL_EVENT_MOUSE_BUTTONDOWN
|
||||
#define SDL_MOUSEBUTTONUP SDL_MOUSEBUTTONUP_renamed_SDL_EVENT_MOUSE_BUTTONUP
|
||||
#define SDL_MOUSEMOTION SDL_MOUSEMOTION_renamed_SDL_EVENT_MOUSE_MOTION
|
||||
#define SDL_MOUSEWHEEL SDL_MOUSEWHEEL_renamed_SDL_EVENT_MOUSE_WHEEL
|
||||
#define SDL_POLLSENTINEL SDL_POLLSENTINEL_renamed_SDL_EVENT_POLL_SENTINEL
|
||||
#define SDL_QUIT SDL_QUIT_renamed_SDL_EVENT_QUIT
|
||||
#define SDL_RENDER_DEVICE_RESET SDL_RENDER_DEVICE_RESET_renamed_SDL_EVENT_RENDER_DEVICE_RESET
|
||||
#define SDL_RENDER_TARGETS_RESET SDL_RENDER_TARGETS_RESET_renamed_SDL_EVENT_RENDER_TARGETS_RESET
|
||||
#define SDL_SENSORUPDATE SDL_SENSORUPDATE_renamed_SDL_EVENT_SENSOR_UPDATE
|
||||
#define SDL_SYSWMEVENT SDL_SYSWMEVENT_renamed_SDL_EVENT_SYSWM
|
||||
#define SDL_TEXTEDITING SDL_TEXTEDITING_renamed_SDL_EVENT_TEXT_EDITING
|
||||
#define SDL_TEXTEDITING_EXT SDL_TEXTEDITING_EXT_renamed_SDL_EVENT_TEXTEDITING_EXT
|
||||
#define SDL_TEXTINPUT SDL_TEXTINPUT_renamed_SDL_EVENT_TEXT_INPUT
|
||||
#define SDL_USEREVENT SDL_USEREVENT_renamed_SDL_EVENT_USER
|
||||
#define SDL_WINDOWEVENT_CLOSE SDL_WINDOWEVENT_CLOSE_renamed_SDL_EVENT_WINDOW_CLOSE
|
||||
#define SDL_WINDOWEVENT_DISPLAY_CHANGED SDL_WINDOWEVENT_DISPLAY_CHANGED_renamed_SDL_EVENT_WINDOW_DISPLAY_CHANGED
|
||||
#define SDL_WINDOWEVENT_ENTER SDL_WINDOWEVENT_ENTER_renamed_SDL_EVENT_WINDOW_ENTER
|
||||
#define SDL_WINDOWEVENT_EXPOSED SDL_WINDOWEVENT_EXPOSED_renamed_SDL_EVENT_WINDOW_EXPOSED
|
||||
#define SDL_WINDOWEVENT_FOCUS_GAINED SDL_WINDOWEVENT_FOCUS_GAINED_renamed_SDL_EVENT_WINDOW_FOCUS_GAINED
|
||||
#define SDL_WINDOWEVENT_FOCUS_LOST SDL_WINDOWEVENT_FOCUS_LOST_renamed_SDL_EVENT_WINDOW_FOCUS_LOST
|
||||
#define SDL_WINDOWEVENT_HIDDEN SDL_WINDOWEVENT_HIDDEN_renamed_SDL_EVENT_WINDOW_HIDDEN
|
||||
#define SDL_WINDOWEVENT_HIT_TEST SDL_WINDOWEVENT_HIT_TEST_renamed_SDL_EVENT_WINDOW_HIT_TEST
|
||||
#define SDL_WINDOWEVENT_ICCPROF_CHANGED SDL_WINDOWEVENT_ICCPROF_CHANGED_renamed_SDL_EVENT_WINDOW_ICCPROF_CHANGED
|
||||
#define SDL_WINDOWEVENT_LEAVE SDL_WINDOWEVENT_LEAVE_renamed_SDL_EVENT_WINDOW_LEAVE
|
||||
#define SDL_WINDOWEVENT_MAXIMIZED SDL_WINDOWEVENT_MAXIMIZED_renamed_SDL_EVENT_WINDOW_MAXIMIZED
|
||||
#define SDL_WINDOWEVENT_MINIMIZED SDL_WINDOWEVENT_MINIMIZED_renamed_SDL_EVENT_WINDOW_MINIMIZED
|
||||
#define SDL_WINDOWEVENT_MOVED SDL_WINDOWEVENT_MOVED_renamed_SDL_EVENT_WINDOW_MOVED
|
||||
#define SDL_WINDOWEVENT_RESIZED SDL_WINDOWEVENT_RESIZED_renamed_SDL_EVENT_WINDOW_RESIZED
|
||||
#define SDL_WINDOWEVENT_RESTORED SDL_WINDOWEVENT_RESTORED_renamed_SDL_EVENT_WINDOW_RESTORED
|
||||
#define SDL_WINDOWEVENT_SHOWN SDL_WINDOWEVENT_SHOWN_renamed_SDL_EVENT_WINDOW_SHOWN
|
||||
#define SDL_WINDOWEVENT_SIZE_CHANGED SDL_WINDOWEVENT_SIZE_CHANGED_renamed_SDL_EVENT_WINDOW_SIZE_CHANGED
|
||||
#define SDL_WINDOWEVENT_TAKE_FOCUS SDL_WINDOWEVENT_TAKE_FOCUS_renamed_SDL_EVENT_WINDOW_TAKE_FOCUS
|
||||
|
||||
/* ##SDL_gamepad.h */
|
||||
#define SDL_CONTROLLER_AXIS_INVALID SDL_CONTROLLER_AXIS_INVALID_renamed_SDL_GAMEPAD_AXIS_INVALID
|
||||
|
|
|
@ -34,16 +34,16 @@
|
|||
/**
|
||||
* \file SDL_quit.h
|
||||
*
|
||||
* An ::SDL_QUIT event is generated when the user tries to close the application
|
||||
* window. If it is ignored or filtered out, the window will remain open.
|
||||
* ::SDL_EVENT_QUIT is generated when the user tries to close the application
|
||||
* window. If it is ignored or filtered out, the window will remain open.
|
||||
* If it is not ignored or filtered, it is queued normally and the window
|
||||
* is allowed to close. When the window is closed, screen updates will
|
||||
* is allowed to close. When the window is closed, screen updates will
|
||||
* complete, but have no effect.
|
||||
*
|
||||
* SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
|
||||
* and SIGTERM (system termination request), if handlers do not already
|
||||
* exist, that generate ::SDL_QUIT events as well. There is no way
|
||||
* to determine the cause of an ::SDL_QUIT event, but setting a signal
|
||||
* exist, that generate ::SDL_EVENT_QUIT as well. There is no way
|
||||
* to determine the cause of an ::SDL_EVENT_QUIT, but setting a signal
|
||||
* handler in your application will override the default generation of
|
||||
* quit events for that signal.
|
||||
*
|
||||
|
@ -53,6 +53,6 @@
|
|||
/* There are no functions directly affecting the quit event */
|
||||
|
||||
#define SDL_QuitRequested() \
|
||||
(SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))
|
||||
(SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_EVENT_QUIT,SDL_EVENT_QUIT) > 0))
|
||||
|
||||
#endif /* SDL_quit_h_ */
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
/**
|
||||
* \brief SDL_syswm.h
|
||||
*
|
||||
* Your application has access to a special type of event ::SDL_SYSWMEVENT,
|
||||
* Your application has access to a special type of event ::SDL_EVENT_SYSWM,
|
||||
* which contains window-manager specific information and arrives whenever
|
||||
* an unhandled window event occurs. This event is ignored by default, but
|
||||
* you can enable it with SDL_SetEventEnabled().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue