1#ifndef SDL3PP_EVENTS_H_
2#define SDL3PP_EVENTS_H_
4#include <SDL3/SDL_events.h>
5#include "SDL3pp_stdinc.h"
6#include "SDL3pp_video.h"
79 SDL_EVENT_WILL_ENTER_BACKGROUND;
94 SDL_EVENT_WILL_ENTER_FOREGROUND;
104 SDL_EVENT_LOCALE_CHANGED;
107 SDL_EVENT_SYSTEM_THEME_CHANGED;
110 SDL_EVENT_DISPLAY_ORIENTATION;
113 SDL_EVENT_DISPLAY_ADDED;
116 SDL_EVENT_DISPLAY_REMOVED;
119 SDL_EVENT_DISPLAY_MOVED;
122 SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED;
125 SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED;
128 SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED;
131#if SDL_VERSION_ATLEAST(3, 4, 0)
134 SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED;
140 SDL_EVENT_DISPLAY_FIRST;
143 SDL_EVENT_DISPLAY_LAST;
146 SDL_EVENT_WINDOW_SHOWN;
149 SDL_EVENT_WINDOW_HIDDEN;
159 SDL_EVENT_WINDOW_MOVED;
162 SDL_EVENT_WINDOW_RESIZED;
166 SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED;
170 SDL_EVENT_WINDOW_METAL_VIEW_RESIZED;
173 SDL_EVENT_WINDOW_MINIMIZED;
176 SDL_EVENT_WINDOW_MAXIMIZED;
182 SDL_EVENT_WINDOW_MOUSE_ENTER;
185 SDL_EVENT_WINDOW_MOUSE_LEAVE;
188 SDL_EVENT_WINDOW_FOCUS_GAINED;
191 SDL_EVENT_WINDOW_FOCUS_LOST;
195 SDL_EVENT_WINDOW_CLOSE_REQUESTED;
198 SDL_EVENT_WINDOW_HIT_TEST;
203 SDL_EVENT_WINDOW_ICCPROF_CHANGED;
206 SDL_EVENT_WINDOW_DISPLAY_CHANGED;
209 SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED;
213 SDL_EVENT_WINDOW_SAFE_AREA_CHANGED;
216 SDL_EVENT_WINDOW_OCCLUDED;
219 SDL_EVENT_WINDOW_ENTER_FULLSCREEN;
222 SDL_EVENT_WINDOW_LEAVE_FULLSCREEN;
234 SDL_EVENT_WINDOW_HDR_STATE_CHANGED;
237 SDL_EVENT_WINDOW_FIRST;
246 SDL_EVENT_TEXT_EDITING;
249 SDL_EVENT_TEXT_INPUT;
258 SDL_EVENT_KEYBOARD_ADDED;
262 SDL_EVENT_KEYBOARD_REMOVED;
265 SDL_EVENT_TEXT_EDITING_CANDIDATES;
267#if SDL_VERSION_ATLEAST(3, 4, 0)
270 SDL_EVENT_SCREEN_KEYBOARD_SHOWN;
273 SDL_EVENT_SCREEN_KEYBOARD_HIDDEN;
278 SDL_EVENT_MOUSE_MOTION;
281 SDL_EVENT_MOUSE_BUTTON_DOWN;
284 SDL_EVENT_MOUSE_BUTTON_UP;
287 SDL_EVENT_MOUSE_WHEEL;
290 SDL_EVENT_MOUSE_ADDED;
293 SDL_EVENT_MOUSE_REMOVED;
296 SDL_EVENT_JOYSTICK_AXIS_MOTION;
299 SDL_EVENT_JOYSTICK_BALL_MOTION;
302 SDL_EVENT_JOYSTICK_HAT_MOTION;
305 SDL_EVENT_JOYSTICK_BUTTON_DOWN;
308 SDL_EVENT_JOYSTICK_BUTTON_UP;
311 SDL_EVENT_JOYSTICK_ADDED;
315 SDL_EVENT_JOYSTICK_REMOVED;
318 SDL_EVENT_JOYSTICK_BATTERY_UPDATED;
321 SDL_EVENT_JOYSTICK_UPDATE_COMPLETE;
324 SDL_EVENT_GAMEPAD_AXIS_MOTION;
327 SDL_EVENT_GAMEPAD_BUTTON_DOWN;
330 SDL_EVENT_GAMEPAD_BUTTON_UP;
333 SDL_EVENT_GAMEPAD_ADDED;
336 SDL_EVENT_GAMEPAD_REMOVED;
339 SDL_EVENT_GAMEPAD_REMAPPED;
342 SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN;
345 SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION;
348 SDL_EVENT_GAMEPAD_TOUCHPAD_UP;
351 SDL_EVENT_GAMEPAD_SENSOR_UPDATE;
354 SDL_EVENT_GAMEPAD_UPDATE_COMPLETE;
357 SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED;
364 SDL_EVENT_FINGER_MOTION;
367 SDL_EVENT_FINGER_CANCELED;
369#if SDL_VERSION_ATLEAST(3, 4, 0)
372 SDL_EVENT_PINCH_BEGIN;
375 SDL_EVENT_PINCH_UPDATE;
383 SDL_EVENT_CLIPBOARD_UPDATE;
392 SDL_EVENT_DROP_BEGIN;
398 SDL_EVENT_DROP_POSITION;
401 SDL_EVENT_AUDIO_DEVICE_ADDED;
404 SDL_EVENT_AUDIO_DEVICE_REMOVED;
408 SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED;
411 SDL_EVENT_SENSOR_UPDATE;
414 SDL_EVENT_PEN_PROXIMITY_IN;
417 SDL_EVENT_PEN_PROXIMITY_OUT;
427 SDL_EVENT_PEN_BUTTON_DOWN;
430 SDL_EVENT_PEN_BUTTON_UP;
433 SDL_EVENT_PEN_MOTION;
439 SDL_EVENT_CAMERA_DEVICE_ADDED;
442 SDL_EVENT_CAMERA_DEVICE_REMOVED;
446 SDL_EVENT_CAMERA_DEVICE_APPROVED;
458 SDL_EVENT_RENDER_DEVICE_LOST;
470 SDL_EVENT_POLL_SENTINEL;
482 SDL_EVENT_ENUM_PADDING;
725#if SDL_VERSION_ATLEAST(3, 4, 0)
941 return SDL_PeepEvents(events, numevents, action, minType, maxType);
981 return SDL_HasEvents(minType, maxType);
1039 SDL_FlushEvents(minType, maxType);
1141 return std::nullopt;
1224 return SDL_WaitEventTimeout(event, timeoutMS);
1253 return std::nullopt;
1285 std::chrono::milliseconds timeoutDuration)
1317 std::chrono::milliseconds timeoutDuration)
1320 return std::nullopt;
1495 SDL_SetEventFilter(filter, userdata);
1542 staticFilter = filter;
1566 CheckError(SDL_GetEventFilter(filter, userdata));
1600 CheckError(SDL_AddEventWatch(filter, userdata));
1655 SDL_RemoveEventWatch(filter, userdata);
1678 SDL_FilterEvents(filter, userdata);
1703 [](
void* userdata,
Event* event) {
1724 SDL_SetEventEnabled(type, enabled);
1757 return SDL_RegisterEvents(numevents);
1777 return {
CheckError(SDL_GetWindowFromEvent(&event))};
1780#if SDL_VERSION_ATLEAST(3, 4, 0)
1814 if (buf.
size_bytes() == 0)
return SDL_GetEventDescription(&event,
nullptr, 0);
1815 return SDL_GetEventDescription(&event, buf.
data(), buf.
size_bytes());
1847 int sz = SDL_GetEventDescription(&event,
nullptr, 0);
Target byte stream.
Definition: SDL3pp_strings.h:326
constexpr char * data() const
Retrieves contained data.
Definition: SDL3pp_strings.h:412
constexpr size_t size_bytes() const
Retrieves contained size in bytes.
Definition: SDL3pp_strings.h:409
constexpr void CheckError(bool result)
Check and throw if returned value from SDL is an error.
Definition: SDL3pp_error.h:197
bool(SDLCALL *)(void *userdata, Event *event) EventFilter
A function pointer used for callbacks that watch the event queue.
Definition: SDL3pp_events.h:1408
void FlushEvent(Uint32 type)
Clear events of a specific type from the event queue.
Definition: SDL3pp_events.h:1009
void RemoveEventWatch(EventFilter filter, void *userdata)
Remove an event watch callback added with AddEventWatch().
Definition: SDL3pp_events.h:1653
int PeepEvents(Event *events, int numevents, EventAction action, Uint32 minType=EVENT_FIRST, Uint32 maxType=EVENT_LAST)
Check the event queue for messages and optionally return them.
Definition: SDL3pp_events.h:935
SDL_PenProximityEvent PenProximityEvent
Pressure-sensitive pen proximity event structure (event.pproximity.
Definition: SDL3pp_events.h:750
SDL_GamepadButtonEvent GamepadButtonEvent
Gamepad button event structure (event.gbutton.
Definition: SDL3pp_events.h:648
void GetEventFilter(EventFilter *filter, void **userdata)
Query the current event filter.
Definition: SDL3pp_events.h:1564
SDL_WindowEvent WindowEvent
Window state change event data (event.window.
Definition: SDL3pp_events.h:505
bool HasEvents(Uint32 minType=EVENT_FIRST, Uint32 maxType=EVENT_LAST)
Check for the existence of certain event types in the event queue.
Definition: SDL3pp_events.h:979
SDL_RenderEvent RenderEvent
Renderer event structure (event.render.
Definition: SDL3pp_events.h:703
SDL_JoyAxisEvent JoyAxisEvent
Joystick axis motion event structure (event.jaxis.
Definition: SDL3pp_events.h:594
SDL_CameraDeviceEvent CameraDeviceEvent
Camera device event structure (event.cdevice.
Definition: SDL3pp_events.h:696
SDL_GamepadAxisEvent GamepadAxisEvent
Gamepad axis motion event structure (event.gaxis.
Definition: SDL3pp_events.h:641
SDL_GamepadDeviceEvent GamepadDeviceEvent
Gamepad device event structure (event.gdevice.
Definition: SDL3pp_events.h:664
SDL_ClipboardEvent ClipboardEvent
An event triggered when the clipboard contents have changed (event.clipboard.
Definition: SDL3pp_events.h:807
SDL_GamepadSensorEvent GamepadSensorEvent
Gamepad sensor event structure (event.gsensor.
Definition: SDL3pp_events.h:678
SDL_MouseDeviceEvent MouseDeviceEvent
Mouse device event structure (event.mdevice.
Definition: SDL3pp_events.h:566
SDL_TouchFingerEvent TouchFingerEvent
Touch finger event structure (event.tfinger.
Definition: SDL3pp_events.h:723
std::function< bool(Event *event)> EventFilterCB
A std::function used for callbacks that watch the event queue.
Definition: SDL3pp_events.h:1429
SDL_SensorEvent SensorEvent
Sensor event structure (event.sensor.
Definition: SDL3pp_events.h:814
SDL_GamepadTouchpadEvent GamepadTouchpadEvent
Gamepad touchpad event structure (event.gtouchpad.
Definition: SDL3pp_events.h:671
void FlushEvents(Uint32 minType=EVENT_FIRST, Uint32 maxType=EVENT_LAST)
Clear events of a range of types from the event queue.
Definition: SDL3pp_events.h:1036
Uint32 RegisterEvents(int numevents)
Allocate a set of user-defined events, and return the beginning event number for that set of events.
Definition: SDL3pp_events.h:1755
SDL_PenTouchEvent PenTouchEvent
Pressure-sensitive pen touched event structure (event.ptouch.
Definition: SDL3pp_events.h:772
SDL_KeyboardDeviceEvent KeyboardDeviceEvent
Keyboard device event structure (event.kdevice.
Definition: SDL3pp_events.h:512
SDL_AudioDeviceEvent AudioDeviceEvent
Audio device event structure (event.adevice.
Definition: SDL3pp_events.h:689
SDL_DropEvent DropEvent
An event used to drop text or request a file open by the system (event.drop.
Definition: SDL3pp_events.h:799
SDL_MouseButtonEvent MouseButtonEvent
Mouse button event structure (event.button.
Definition: SDL3pp_events.h:580
constexpr EventAction GETEVENT
Retrieve/remove events from the front of the queue.
Definition: SDL3pp_events.h:888
SDL_JoyBatteryEvent JoyBatteryEvent
Joystick battery level change event structure (event.jbattery.
Definition: SDL3pp_events.h:634
SDL_EventAction EventAction
The type of action to request from PeepEvents().
Definition: SDL3pp_events.h:879
SDL_DisplayEvent DisplayEvent
Display state change event data (event.display.
Definition: SDL3pp_events.h:498
bool WaitEventTimeout(Event *event, Sint32 timeoutMS)
Wait until the specified timeout (in milliseconds) for the next available event.
Definition: SDL3pp_events.h:1222
void SetEventEnabled(Uint32 type, bool enabled)
Set the state of processing events by type.
Definition: SDL3pp_events.h:1722
SDL_Event Event
The structure for all events in SDL.
Definition: SDL3pp_events.h:844
SDL_TextEditingEvent TextEditingEvent
Keyboard text editing event structure (event.edit.
Definition: SDL3pp_events.h:539
int GetEventDescription(const Event &event, TargetBytes buf)
Generate an English description of an event.
Definition: SDL3pp_events.h:1812
SDL_UserEvent UserEvent
A user-defined event type (event.user.
Definition: SDL3pp_events.h:834
std::optional< Event > PollEvent()
Poll for currently pending events.
Definition: SDL3pp_events.h:1138
Event WaitEvent()
Wait indefinitely for the next available event.
Definition: SDL3pp_events.h:1187
SDL_TextEditingCandidatesEvent TextEditingCandidatesEvent
Keyboard IME candidates event structure (event.edit_candidates.
Definition: SDL3pp_events.h:546
WindowRef GetWindowFromEvent(const Event &event)
Get window associated with an event.
Definition: SDL3pp_events.h:1775
void PushEvent(Event *event)
Add an event to the event queue.
Definition: SDL3pp_events.h:1353
void SetEventFilter(EventFilter filter, void *userdata)
Set up a filter to process all events before they are added to the internal event queue.
Definition: SDL3pp_events.h:1493
SDL_PenAxisEvent PenAxisEvent
Pressure-sensitive pen pressure / angle event structure (event.paxis.
Definition: SDL3pp_events.h:791
SDL_KeyboardEvent KeyboardEvent
Keyboard button event structure (event.key.
Definition: SDL3pp_events.h:528
constexpr EventAction ADDEVENT
Add events to the back of the queue.
Definition: SDL3pp_events.h:881
bool HasEvent(Uint32 type)
Check for the existence of a certain event type in the event queue.
Definition: SDL3pp_events.h:959
SDL_MouseMotionEvent MouseMotionEvent
Mouse motion event structure (event.motion.
Definition: SDL3pp_events.h:573
SDL_JoyHatEvent JoyHatEvent
Joystick hat position change event structure (event.jhat.
Definition: SDL3pp_events.h:608
void AddEventWatch(EventFilter filter, void *userdata)
Add a callback to be triggered when an event is added to the event queue.
Definition: SDL3pp_events.h:1598
void FilterEvents(EventFilter filter, void *userdata)
Run a specific filter function on the current event queue, removing any events for which the filter r...
Definition: SDL3pp_events.h:1676
SDL_PinchFingerEvent PinchFingerEvent
Pinch event structure (event.pinch.*)
Definition: SDL3pp_events.h:728
SDL_MouseWheelEvent MouseWheelEvent
Mouse wheel event structure (event.wheel.
Definition: SDL3pp_events.h:587
SDL_CommonEvent CommonEvent
Fields shared by every event.
Definition: SDL3pp_events.h:491
SDL_JoyButtonEvent JoyButtonEvent
Joystick button event structure (event.jbutton.
Definition: SDL3pp_events.h:615
SDL_PenButtonEvent PenButtonEvent
Pressure-sensitive pen button event structure (event.pbutton.
Definition: SDL3pp_events.h:782
SDL_TextInputEvent TextInputEvent
Keyboard text input event structure (event.text.
Definition: SDL3pp_events.h:559
constexpr EventAction PEEKEVENT
Check but don't remove events from the queue front.
Definition: SDL3pp_events.h:885
SDL_QuitEvent QuitEvent
The "quit requested" event.
Definition: SDL3pp_events.h:821
bool EventEnabled(Uint32 type)
Query the state of processing events by type.
Definition: SDL3pp_events.h:1739
SDL_JoyDeviceEvent JoyDeviceEvent
Joystick device event structure (event.jdevice.
Definition: SDL3pp_events.h:627
SDL_JoyBallEvent JoyBallEvent
Joystick trackball motion event structure (event.jball.
Definition: SDL3pp_events.h:601
void PumpEvents()
Pump the event loop, gathering events from the input devices.
Definition: SDL3pp_events.h:866
SDL_PenMotionEvent PenMotionEvent
Pressure-sensitive pen motion event structure (event.pmotion.
Definition: SDL3pp_events.h:762
::Uint32 Uint32
An unsigned 32-bit integer type.
Definition: SDL3pp_stdinc.h:341
::Sint64 Sint64
A signed 64-bit integer type.
Definition: SDL3pp_stdinc.h:356
::Sint32 Sint32
A signed 32-bit integer type.
Definition: SDL3pp_stdinc.h:328
constexpr EventType EVENT_PEN_UP
Pressure-sensitive pen stopped touching drawing surface.
Definition: SDL3pp_events.h:424
constexpr EventType EVENT_WINDOW_SAFE_AREA_CHANGED
The window safe area has been changed.
Definition: SDL3pp_events.h:212
constexpr EventType EVENT_DROP_FILE
The system requests a file open.
Definition: SDL3pp_events.h:385
constexpr EventType EVENT_PINCH_UPDATE
Pinch gesture updated.
Definition: SDL3pp_events.h:374
constexpr EventType EVENT_PEN_MOTION
Pressure-sensitive pen is moving on the tablet.
Definition: SDL3pp_events.h:432
constexpr EventType EVENT_DISPLAY_ORIENTATION
Display orientation has changed to data1.
Definition: SDL3pp_events.h:109
constexpr EventType EVENT_JOYSTICK_BUTTON_UP
Joystick button released.
Definition: SDL3pp_events.h:307
constexpr EventType EVENT_KEYBOARD_REMOVED
A keyboard has been removed.
Definition: SDL3pp_events.h:261
constexpr EventType EVENT_DISPLAY_ADDED
Display has been added to the system.
Definition: SDL3pp_events.h:112
constexpr EventType EVENT_AUDIO_DEVICE_ADDED
A new audio device is available.
Definition: SDL3pp_events.h:400
constexpr EventType EVENT_WINDOW_MOUSE_ENTER
Window has gained mouse focus.
Definition: SDL3pp_events.h:181
constexpr EventType EVENT_GAMEPAD_REMAPPED
The gamepad mapping was updated.
Definition: SDL3pp_events.h:338
constexpr EventType EVENT_PRIVATE0
PRIVATE0.
Definition: SDL3pp_events.h:461
constexpr EventType EVENT_RENDER_DEVICE_LOST
The device has been lost and can't be recovered.
Definition: SDL3pp_events.h:457
constexpr EventType EVENT_WINDOW_OCCLUDED
The window has been occluded.
Definition: SDL3pp_events.h:215
constexpr EventType EVENT_WINDOW_MOVED
Window has been moved to data1, data2.
Definition: SDL3pp_events.h:158
constexpr EventType EVENT_JOYSTICK_HAT_MOTION
Joystick hat position change.
Definition: SDL3pp_events.h:301
constexpr EventType EVENT_WINDOW_LEAVE_FULLSCREEN
The window has left fullscreen mode.
Definition: SDL3pp_events.h:221
constexpr EventType EVENT_PRIVATE2
PRIVATE2.
Definition: SDL3pp_events.h:465
constexpr EventType EVENT_DROP_BEGIN
A new set of drops is beginning (NULL filename)
Definition: SDL3pp_events.h:391
constexpr EventType EVENT_CAMERA_DEVICE_APPROVED
A camera device has been approved for use by the user.
Definition: SDL3pp_events.h:445
constexpr EventType EVENT_WILL_ENTER_BACKGROUND
The application is about to enter the background.
Definition: SDL3pp_events.h:78
constexpr EventType EVENT_WINDOW_EXPOSED
Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for th...
Definition: SDL3pp_events.h:156
constexpr EventType EVENT_WINDOW_ICCPROF_CHANGED
The ICC profile of the window's display has changed.
Definition: SDL3pp_events.h:202
constexpr EventType EVENT_GAMEPAD_REMOVED
A gamepad has been removed.
Definition: SDL3pp_events.h:335
constexpr EventType EVENT_DISPLAY_CURRENT_MODE_CHANGED
Display has changed current mode.
Definition: SDL3pp_events.h:124
constexpr EventType EVENT_DID_ENTER_FOREGROUND
The application is now interactive.
Definition: SDL3pp_events.h:101
constexpr EventType EVENT_MOUSE_BUTTON_UP
Mouse button released.
Definition: SDL3pp_events.h:283
constexpr EventType EVENT_KEYBOARD_ADDED
A new keyboard has been inserted into the system.
Definition: SDL3pp_events.h:257
constexpr EventType EVENT_AUDIO_DEVICE_REMOVED
An audio device has been removed.
Definition: SDL3pp_events.h:403
constexpr EventType EVENT_DISPLAY_CONTENT_SCALE_CHANGED
Display has changed content scale.
Definition: SDL3pp_events.h:127
constexpr EventType EVENT_WINDOW_RESTORED
Window has been restored to normal size and position.
Definition: SDL3pp_events.h:179
constexpr EventType EVENT_WINDOW_HIT_TEST
Window had a hit test that wasn't HITTEST_NORMAL.
Definition: SDL3pp_events.h:197
constexpr EventType EVENT_JOYSTICK_BUTTON_DOWN
Joystick button pressed.
Definition: SDL3pp_events.h:304
constexpr EventType EVENT_DISPLAY_MOVED
Display has changed position.
Definition: SDL3pp_events.h:118
constexpr EventType EVENT_PEN_BUTTON_UP
Pressure-sensitive pen button released.
Definition: SDL3pp_events.h:429
constexpr EventType EVENT_KEY_UP
Key released.
Definition: SDL3pp_events.h:243
constexpr EventType EVENT_MOUSE_ADDED
A new mouse has been inserted into the system.
Definition: SDL3pp_events.h:289
constexpr EventType EVENT_POLL_SENTINEL
Signals the end of an event poll cycle.
Definition: SDL3pp_events.h:469
constexpr EventType EVENT_MOUSE_REMOVED
A mouse has been removed.
Definition: SDL3pp_events.h:292
constexpr EventType EVENT_DROP_POSITION
Position while moving over the window.
Definition: SDL3pp_events.h:397
constexpr EventType EVENT_JOYSTICK_BATTERY_UPDATED
Joystick battery level change.
Definition: SDL3pp_events.h:317
constexpr EventType EVENT_TEXT_INPUT
Keyboard text input.
Definition: SDL3pp_events.h:248
constexpr EventType EVENT_PINCH_END
Pinch gesture ended.
Definition: SDL3pp_events.h:377
constexpr EventType EVENT_DISPLAY_LAST
DISPLAY_LAST.
Definition: SDL3pp_events.h:142
constexpr EventType EVENT_WINDOW_RESIZED
Window has been resized to data1xdata2.
Definition: SDL3pp_events.h:161
constexpr EventType EVENT_PEN_PROXIMITY_OUT
Pressure-sensitive pen has become unavailable.
Definition: SDL3pp_events.h:416
constexpr EventType EVENT_WINDOW_PIXEL_SIZE_CHANGED
The pixel size of the window has changed to data1xdata2.
Definition: SDL3pp_events.h:165
constexpr EventType EVENT_JOYSTICK_BALL_MOTION
Joystick trackball motion.
Definition: SDL3pp_events.h:298
constexpr EventType EVENT_GAMEPAD_BUTTON_DOWN
Gamepad button pressed.
Definition: SDL3pp_events.h:326
constexpr EventType EVENT_CAMERA_DEVICE_REMOVED
A camera device has been removed.
Definition: SDL3pp_events.h:441
constexpr EventType EVENT_DISPLAY_FIRST
DISPLAY_FIRST.
Definition: SDL3pp_events.h:139
constexpr EventType EVENT_WINDOW_FIRST
WINDOW_FIRST.
Definition: SDL3pp_events.h:236
constexpr EventType EVENT_SCREEN_KEYBOARD_SHOWN
The on-screen keyboard has been shown.
Definition: SDL3pp_events.h:269
constexpr EventType EVENT_RENDER_DEVICE_RESET
The device has been reset and all textures need to be recreated.
Definition: SDL3pp_events.h:455
constexpr EventType EVENT_PEN_DOWN
Pressure-sensitive pen touched drawing surface.
Definition: SDL3pp_events.h:420
constexpr EventType EVENT_TEXT_EDITING
Keyboard text editing (composition)
Definition: SDL3pp_events.h:245
constexpr EventType EVENT_WINDOW_CLOSE_REQUESTED
The window manager requests that the window be closed.
Definition: SDL3pp_events.h:194
constexpr EventType EVENT_GAMEPAD_TOUCHPAD_UP
Gamepad touchpad finger was lifted.
Definition: SDL3pp_events.h:347
constexpr EventType EVENT_DID_ENTER_BACKGROUND
The application did enter the background and may not get CPU for some time.
Definition: SDL3pp_events.h:86
constexpr EventType EVENT_DROP_TEXT
text/plain drag-and-drop event
Definition: SDL3pp_events.h:388
constexpr EventType EVENT_WINDOW_HDR_STATE_CHANGED
Window HDR properties have changed.
Definition: SDL3pp_events.h:233
constexpr EventType EVENT_PEN_PROXIMITY_IN
Pressure-sensitive pen has become available.
Definition: SDL3pp_events.h:413
constexpr EventType EVENT_WILL_ENTER_FOREGROUND
The application is about to enter the foreground.
Definition: SDL3pp_events.h:93
constexpr EventType EVENT_SENSOR_UPDATE
A sensor was updated.
Definition: SDL3pp_events.h:410
constexpr EventType EVENT_KEY_DOWN
Key pressed.
Definition: SDL3pp_events.h:241
constexpr EventType EVENT_TEXT_EDITING_CANDIDATES
Keyboard text editing candidates.
Definition: SDL3pp_events.h:264
constexpr EventType EVENT_DISPLAY_USABLE_BOUNDS_CHANGED
Display has changed usable bounds.
Definition: SDL3pp_events.h:133
constexpr EventType EVENT_GAMEPAD_TOUCHPAD_DOWN
Gamepad touchpad was touched.
Definition: SDL3pp_events.h:341
constexpr EventType EVENT_WINDOW_MINIMIZED
Window has been minimized.
Definition: SDL3pp_events.h:172
SDL_EventType EventType
The types of events that can be delivered.
Definition: SDL3pp_events.h:53
constexpr EventType EVENT_PRIVATE1
PRIVATE1.
Definition: SDL3pp_events.h:463
constexpr EventType EVENT_LAST
This last event is only for bounding internal arrays.
Definition: SDL3pp_events.h:479
constexpr EventType EVENT_FINGER_MOTION
FINGER_MOTION.
Definition: SDL3pp_events.h:363
constexpr EventType EVENT_JOYSTICK_UPDATE_COMPLETE
Joystick update is complete.
Definition: SDL3pp_events.h:320
constexpr EventType EVENT_FINGER_CANCELED
FINGER_CANCELED.
Definition: SDL3pp_events.h:366
constexpr EventType EVENT_LOW_MEMORY
The application is low on memory, free memory if possible.
Definition: SDL3pp_events.h:71
constexpr EventType EVENT_DISPLAY_REMOVED
Display has been removed from the system.
Definition: SDL3pp_events.h:115
constexpr EventType EVENT_GAMEPAD_TOUCHPAD_MOTION
Gamepad touchpad finger was moved.
Definition: SDL3pp_events.h:344
constexpr EventType EVENT_FINGER_UP
FINGER_UP.
Definition: SDL3pp_events.h:361
constexpr EventType EVENT_JOYSTICK_AXIS_MOTION
Joystick axis motion.
Definition: SDL3pp_events.h:295
constexpr EventType EVENT_WINDOW_DISPLAY_SCALE_CHANGED
Window display scale has been changed.
Definition: SDL3pp_events.h:208
constexpr EventType EVENT_SCREEN_KEYBOARD_HIDDEN
The on-screen keyboard has been hidden.
Definition: SDL3pp_events.h:272
constexpr EventType EVENT_FINGER_DOWN
FINGER_DOWN.
Definition: SDL3pp_events.h:359
constexpr EventType EVENT_DISPLAY_DESKTOP_MODE_CHANGED
Display has changed desktop mode.
Definition: SDL3pp_events.h:121
constexpr EventType EVENT_WINDOW_DESTROYED
The window with the associated ID is being or has been destroyed.
Definition: SDL3pp_events.h:231
constexpr EventType EVENT_PRIVATE3
PRIVATE3.
Definition: SDL3pp_events.h:467
constexpr EventType EVENT_GAMEPAD_BUTTON_UP
Gamepad button released.
Definition: SDL3pp_events.h:329
constexpr EventType EVENT_CAMERA_DEVICE_DENIED
A camera device has been denied for use by the user.
Definition: SDL3pp_events.h:449
constexpr EventType EVENT_GAMEPAD_STEAM_HANDLE_UPDATED
Gamepad Steam handle has changed.
Definition: SDL3pp_events.h:356
constexpr EventType EVENT_USER
Events EVENT_USER through EVENT_LAST are for your use, and should be allocated with RegisterEvents()
Definition: SDL3pp_events.h:476
constexpr EventType EVENT_KEYMAP_CHANGED
Keymap changed due to a system event such as an input language or keyboard layout change.
Definition: SDL3pp_events.h:255
constexpr EventType EVENT_MOUSE_BUTTON_DOWN
Mouse button pressed.
Definition: SDL3pp_events.h:280
constexpr EventType EVENT_LOCALE_CHANGED
The user's locale preferences have changed.
Definition: SDL3pp_events.h:103
constexpr EventType EVENT_PINCH_BEGIN
Pinch gesture started.
Definition: SDL3pp_events.h:371
constexpr EventType EVENT_PEN_AXIS
Pressure-sensitive pen angle/pressure/etc changed.
Definition: SDL3pp_events.h:435
constexpr EventType EVENT_WINDOW_MOUSE_LEAVE
Window has lost mouse focus.
Definition: SDL3pp_events.h:184
constexpr EventType EVENT_FIRST
Unused (do not remove)
Definition: SDL3pp_events.h:55
constexpr EventType EVENT_JOYSTICK_REMOVED
An opened joystick has been removed.
Definition: SDL3pp_events.h:314
constexpr EventType EVENT_GAMEPAD_UPDATE_COMPLETE
Gamepad update is complete.
Definition: SDL3pp_events.h:353
constexpr EventType EVENT_CLIPBOARD_UPDATE
The clipboard changed.
Definition: SDL3pp_events.h:382
constexpr EventType EVENT_AUDIO_DEVICE_FORMAT_CHANGED
An audio device's format has been changed by the system.
Definition: SDL3pp_events.h:407
constexpr EventType EVENT_MOUSE_WHEEL
Mouse wheel motion.
Definition: SDL3pp_events.h:286
constexpr EventType EVENT_SYSTEM_THEME_CHANGED
The system theme changed.
Definition: SDL3pp_events.h:106
constexpr EventType EVENT_JOYSTICK_ADDED
A new joystick has been inserted into the system.
Definition: SDL3pp_events.h:310
constexpr EventType EVENT_TERMINATING
The application is being terminated by the OS.
Definition: SDL3pp_events.h:64
constexpr EventType EVENT_ENUM_PADDING
ENUM_PADDING.
Definition: SDL3pp_events.h:481
constexpr EventType EVENT_GAMEPAD_SENSOR_UPDATE
Gamepad sensor was updated.
Definition: SDL3pp_events.h:350
constexpr EventType EVENT_WINDOW_SHOWN
Window has been shown.
Definition: SDL3pp_events.h:145
constexpr EventType EVENT_WINDOW_MAXIMIZED
Window has been maximized.
Definition: SDL3pp_events.h:175
constexpr EventType EVENT_GAMEPAD_ADDED
A new gamepad has been inserted into the system.
Definition: SDL3pp_events.h:332
constexpr EventType EVENT_WINDOW_FOCUS_LOST
Window has lost keyboard focus.
Definition: SDL3pp_events.h:190
constexpr EventType EVENT_MOUSE_MOTION
Mouse moved.
Definition: SDL3pp_events.h:277
constexpr EventType EVENT_PEN_BUTTON_DOWN
Pressure-sensitive pen button pressed.
Definition: SDL3pp_events.h:426
constexpr EventType EVENT_WINDOW_METAL_VIEW_RESIZED
The pixel size of a Metal view associated with the window has changed.
Definition: SDL3pp_events.h:169
constexpr EventType EVENT_GAMEPAD_AXIS_MOTION
Gamepad axis motion.
Definition: SDL3pp_events.h:323
constexpr EventType EVENT_RENDER_TARGETS_RESET
The render targets have been reset and their contents need to be updated.
Definition: SDL3pp_events.h:452
constexpr EventType EVENT_WINDOW_FOCUS_GAINED
Window has gained keyboard focus.
Definition: SDL3pp_events.h:187
constexpr EventType EVENT_WINDOW_ENTER_FULLSCREEN
The window has entered fullscreen mode.
Definition: SDL3pp_events.h:218
constexpr EventType EVENT_QUIT
User-requested quit.
Definition: SDL3pp_events.h:57
constexpr EventType EVENT_WINDOW_DISPLAY_CHANGED
Window has been moved to display data1.
Definition: SDL3pp_events.h:205
constexpr EventType EVENT_WINDOW_HIDDEN
Window has been hidden.
Definition: SDL3pp_events.h:148
constexpr EventType EVENT_CAMERA_DEVICE_ADDED
A new camera device is available.
Definition: SDL3pp_events.h:438
constexpr EventType EVENT_WINDOW_LAST
WINDOW_LAST.
Definition: SDL3pp_events.h:239
constexpr EventType EVENT_DROP_COMPLETE
Current set of drops is now complete (NULL filename)
Definition: SDL3pp_events.h:395
Main include header for the SDL3pp library.
Definition: SDL3pp_callbackWrapper.h:169
Semi-safe reference for Window.
Definition: SDL3pp_video.h:3169