1#ifndef SDL3PP_EVENTS_H_
2#define SDL3PP_EVENTS_H_
6#include <SDL3/SDL_events.h>
7#include "SDL3pp_stdinc.h"
8#include "SDL3pp_video.h"
82 SDL_EVENT_WILL_ENTER_BACKGROUND;
97 SDL_EVENT_WILL_ENTER_FOREGROUND;
107 SDL_EVENT_LOCALE_CHANGED;
110 SDL_EVENT_SYSTEM_THEME_CHANGED;
113 SDL_EVENT_DISPLAY_ORIENTATION;
116 SDL_EVENT_DISPLAY_ADDED;
119 SDL_EVENT_DISPLAY_REMOVED;
122 SDL_EVENT_DISPLAY_MOVED;
125 SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED;
128 SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED;
131 SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED;
135 SDL_EVENT_DISPLAY_FIRST;
138 SDL_EVENT_DISPLAY_LAST;
141 SDL_EVENT_WINDOW_SHOWN;
144 SDL_EVENT_WINDOW_HIDDEN;
153 SDL_EVENT_WINDOW_MOVED;
156 SDL_EVENT_WINDOW_RESIZED;
162 SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED;
168 SDL_EVENT_WINDOW_METAL_VIEW_RESIZED;
171 SDL_EVENT_WINDOW_MINIMIZED;
174 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;
197 SDL_EVENT_WINDOW_CLOSE_REQUESTED;
200 SDL_EVENT_WINDOW_HIT_TEST;
207 SDL_EVENT_WINDOW_ICCPROF_CHANGED;
210 SDL_EVENT_WINDOW_DISPLAY_CHANGED;
213 SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED;
217 SDL_EVENT_WINDOW_SAFE_AREA_CHANGED;
221 SDL_EVENT_WINDOW_OCCLUDED;
224 SDL_EVENT_WINDOW_ENTER_FULLSCREEN;
228 SDL_EVENT_WINDOW_LEAVE_FULLSCREEN;
240 SDL_EVENT_WINDOW_HDR_STATE_CHANGED;
243 SDL_EVENT_WINDOW_FIRST;
252 SDL_EVENT_TEXT_EDITING;
255 SDL_EVENT_TEXT_INPUT;
264 SDL_EVENT_KEYBOARD_ADDED;
268 SDL_EVENT_KEYBOARD_REMOVED;
271 SDL_EVENT_TEXT_EDITING_CANDIDATES;
274 SDL_EVENT_MOUSE_MOTION;
277 SDL_EVENT_MOUSE_BUTTON_DOWN;
280 SDL_EVENT_MOUSE_BUTTON_UP;
283 SDL_EVENT_MOUSE_WHEEL;
286 SDL_EVENT_MOUSE_ADDED;
289 SDL_EVENT_MOUSE_REMOVED;
292 SDL_EVENT_JOYSTICK_AXIS_MOTION;
295 SDL_EVENT_JOYSTICK_BALL_MOTION;
298 SDL_EVENT_JOYSTICK_HAT_MOTION;
301 SDL_EVENT_JOYSTICK_BUTTON_DOWN;
304 SDL_EVENT_JOYSTICK_BUTTON_UP;
307 SDL_EVENT_JOYSTICK_ADDED;
311 SDL_EVENT_JOYSTICK_REMOVED;
314 SDL_EVENT_JOYSTICK_BATTERY_UPDATED;
317 SDL_EVENT_JOYSTICK_UPDATE_COMPLETE;
320 SDL_EVENT_GAMEPAD_AXIS_MOTION;
323 SDL_EVENT_GAMEPAD_BUTTON_DOWN;
326 SDL_EVENT_GAMEPAD_BUTTON_UP;
329 SDL_EVENT_GAMEPAD_ADDED;
332 SDL_EVENT_GAMEPAD_REMOVED;
335 SDL_EVENT_GAMEPAD_REMAPPED;
338 SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN;
341 SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION;
344 SDL_EVENT_GAMEPAD_TOUCHPAD_UP;
347 SDL_EVENT_GAMEPAD_SENSOR_UPDATE;
350 SDL_EVENT_GAMEPAD_UPDATE_COMPLETE;
353 SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED;
360 SDL_EVENT_FINGER_MOTION;
363 SDL_EVENT_FINGER_CANCELED;
366 SDL_EVENT_CLIPBOARD_UPDATE;
375 SDL_EVENT_DROP_BEGIN;
383 SDL_EVENT_DROP_POSITION;
386 SDL_EVENT_AUDIO_DEVICE_ADDED;
389 SDL_EVENT_AUDIO_DEVICE_REMOVED;
395 SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED;
398 SDL_EVENT_SENSOR_UPDATE;
401 SDL_EVENT_PEN_PROXIMITY_IN;
404 SDL_EVENT_PEN_PROXIMITY_OUT;
416 SDL_EVENT_PEN_BUTTON_DOWN;
419 SDL_EVENT_PEN_BUTTON_UP;
422 SDL_EVENT_PEN_MOTION;
428 SDL_EVENT_CAMERA_DEVICE_ADDED;
431 SDL_EVENT_CAMERA_DEVICE_REMOVED;
437 SDL_EVENT_CAMERA_DEVICE_APPROVED;
455 SDL_EVENT_RENDER_DEVICE_LOST;
467 SDL_EVENT_POLL_SENTINEL;
481 SDL_EVENT_ENUM_PADDING;
934 return SDL_PeepEvents(events, numevents, action, minType, maxType);
952inline bool HasEvent(Uint32 type) {
return SDL_HasEvent(type); }
974 return SDL_HasEvents(minType, maxType);
1002inline void FlushEvent(Uint32 type) {
return SDL_FlushEvent(type); }
1032 return SDL_FlushEvents(minType, maxType);
1121 return std::nullopt;
1203 return SDL_WaitEventTimeout(event, timeoutMS);
1232 return std::nullopt;
1264 std::chrono::milliseconds timeoutDuration)
1292 std::chrono::milliseconds timeoutDuration)
1295 return std::nullopt;
1417 using CallbackHandle::CallbackHandle;
1461 return SDL_SetEventFilter(filter, userdata);
1507 using Wrapper = UniqueCallbackWrapper<EventFilterCB>;
1509 [](
void* userdata, SDL_Event* event) {
1510 return Wrapper::Call(userdata, *event);
1512 Wrapper::Wrap(std::move(filter)));
1534 CheckError(SDL_GetEventFilter(filter, userdata));
1563 return [filter](
const Event& event) {
1564 return filter(
nullptr,
const_cast<Event*
>(&event));
1566 if (
auto cb = Wrapper::at(userdata))
return cb;
1567 return [filter, userdata](
const Event& event) {
1568 return filter(userdata,
const_cast<Event*
>(&event));
1573inline bool EventWatchAuxCallback(
void* userdata,
Event* event)
1610 CheckError(SDL_AddEventWatch(filter, userdata));
1649 auto cb = Wrapper::Wrap(std::move(filter));
1650 if (!SDL_AddEventWatch(&EventWatchAuxCallback, &cb)) {
1651 Wrapper::release(cb);
1674 SDL_RemoveEventWatch(filter, userdata);
1695 Wrapper::release(handle);
1718 SDL_FilterEvents(filter, userdata);
1744 [](
void* userdata, SDL_Event* event) {
1764 return SDL_SetEventEnabled(type, enabled);
1797 return SDL_RegisterEvents(numevents);
1817 return CheckError(SDL_GetWindowFromEvent(&event));
A typesafe handle for callback.
Definition SDL3pp_callbackWrapper.h:21
An exception that returns GetError()
Definition SDL3pp_error.h:167
constexpr void CheckError(bool result)
Check and throw if returned value from SDL is an error.
Definition SDL3pp_error.h:206
void FlushEvent(Uint32 type)
Clear events of a specific type from the event queue.
Definition SDL3pp_events.h:1002
void RemoveEventWatch(EventFilter filter, void *userdata)
Remove an event watch callback added with AddEventWatch().
Definition SDL3pp_events.h:1672
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:928
SDL_PenProximityEvent PenProximityEvent
Pressure-sensitive pen proximity event structure (event.pmotion.
Definition SDL3pp_events.h:736
SDL_GamepadButtonEvent GamepadButtonEvent
Gamepad button event structure (event.gbutton.
Definition SDL3pp_events.h:647
SDL_WindowEvent WindowEvent
Window state change event data (event.window.
Definition SDL3pp_events.h:504
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:972
SDL_RenderEvent RenderEvent
Renderer event structure (event.render.
Definition SDL3pp_events.h:698
SDL_JoyAxisEvent JoyAxisEvent
Joystick axis motion event structure (event.jaxis.
Definition SDL3pp_events.h:593
SDL_CameraDeviceEvent CameraDeviceEvent
Camera device event structure (event.cdevice.
Definition SDL3pp_events.h:691
SDL_GamepadAxisEvent GamepadAxisEvent
Gamepad axis motion event structure (event.gaxis.
Definition SDL3pp_events.h:640
SDL_EventFilter EventFilter
A function pointer used for callbacks that watch the event queue.
Definition SDL3pp_events.h:1384
SDL_GamepadDeviceEvent GamepadDeviceEvent
Gamepad device event structure (event.gdevice.
Definition SDL3pp_events.h:663
SDL_ClipboardEvent ClipboardEvent
An event triggered when the clipboard contents have changed (event.clipboard.
Definition SDL3pp_events.h:795
SDL_GamepadSensorEvent GamepadSensorEvent
Gamepad sensor event structure (event.gsensor.
Definition SDL3pp_events.h:677
SDL_MouseDeviceEvent MouseDeviceEvent
Mouse device event structure (event.mdevice.
Definition SDL3pp_events.h:565
SDL_TouchFingerEvent TouchFingerEvent
Touch finger event structure (event.tfinger.
Definition SDL3pp_events.h:719
SDL_SensorEvent SensorEvent
Sensor event structure (event.sensor.
Definition SDL3pp_events.h:802
SDL_GamepadTouchpadEvent GamepadTouchpadEvent
Gamepad touchpad event structure (event.gtouchpad.
Definition SDL3pp_events.h:670
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:1029
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:1795
SDL_PenTouchEvent PenTouchEvent
Pressure-sensitive pen touched event structure (event.ptouch.
Definition SDL3pp_events.h:759
SDL_KeyboardDeviceEvent KeyboardDeviceEvent
Keyboard device event structure (event.kdevice.
Definition SDL3pp_events.h:511
SDL_AudioDeviceEvent AudioDeviceEvent
Audio device event structure (event.adevice.
Definition SDL3pp_events.h:684
SDL_DropEvent DropEvent
An event used to drop text or request a file open by the system (event.drop.
Definition SDL3pp_events.h:787
SDL_MouseButtonEvent MouseButtonEvent
Mouse button event structure (event.button.
Definition SDL3pp_events.h:579
constexpr EventAction GETEVENT
Retrieve/remove events from the front of the queue.
Definition SDL3pp_events.h:880
SDL_JoyBatteryEvent JoyBatteryEvent
Joystick battery level change event structure (event.jbattery.
Definition SDL3pp_events.h:633
SDL_EventAction EventAction
The type of action to request from PeepEvents().
Definition SDL3pp_events.h:867
SDL_DisplayEvent DisplayEvent
Display state change event data (event.display.
Definition SDL3pp_events.h:497
bool WaitEventTimeout(Event *event, Sint32 timeoutMS)
Wait until the specified timeout (in milliseconds) for the next available event.
Definition SDL3pp_events.h:1201
void SetEventEnabled(Uint32 type, bool enabled)
Set the state of processing events by type.
Definition SDL3pp_events.h:1762
SDL_Event Event
The structure for all events in SDL.
Definition SDL3pp_events.h:832
SDL_EventType EventType
The types of events that can be delivered.
Definition SDL3pp_events.h:49
SDL_TextEditingEvent TextEditingEvent
Keyboard text editing event structure (event.edit.
Definition SDL3pp_events.h:538
SDL_UserEvent UserEvent
A user-defined event type (event.user.
Definition SDL3pp_events.h:822
std::optional< Event > PollEvent()
Poll for currently pending events.
Definition SDL3pp_events.h:1118
Event WaitEvent()
Wait indefinitely for the next available event.
Definition SDL3pp_events.h:1166
SDL_TextEditingCandidatesEvent TextEditingCandidatesEvent
Keyboard IME candidates event structure (event.edit_candidates.
Definition SDL3pp_events.h:545
WindowRef GetWindowFromEvent(const Event &event)
Get window associated with an event.
Definition SDL3pp_events.h:1815
void PushEvent(Event *event)
Add an event to the event queue.
Definition SDL3pp_events.h:1328
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:1458
SDL_PenAxisEvent PenAxisEvent
Pressure-sensitive pen pressure / angle event structure (event.paxis.
Definition SDL3pp_events.h:779
SDL_KeyboardEvent KeyboardEvent
Keyboard button event structure (event.key.
Definition SDL3pp_events.h:527
constexpr EventAction ADDEVENT
Add events to the back of the queue.
Definition SDL3pp_events.h:869
bool HasEvent(Uint32 type)
Check for the existence of a certain event type in the event queue.
Definition SDL3pp_events.h:952
SDL_MouseMotionEvent MouseMotionEvent
Mouse motion event structure (event.motion.
Definition SDL3pp_events.h:572
SDL_JoyHatEvent JoyHatEvent
Joystick hat position change event structure (event.jhat.
Definition SDL3pp_events.h:607
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:1608
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:1716
SDL_MouseWheelEvent MouseWheelEvent
Mouse wheel event structure (event.wheel.
Definition SDL3pp_events.h:586
SDL_CommonEvent CommonEvent
Fields shared by every event.
Definition SDL3pp_events.h:490
SDL_JoyButtonEvent JoyButtonEvent
Joystick button event structure (event.jbutton.
Definition SDL3pp_events.h:614
SDL_PenButtonEvent PenButtonEvent
Pressure-sensitive pen button event structure (event.pbutton.
Definition SDL3pp_events.h:769
SDL_TextInputEvent TextInputEvent
Keyboard text input event structure (event.text.
Definition SDL3pp_events.h:558
constexpr EventAction PEEKEVENT
Check but don't remove events from the queue front.
Definition SDL3pp_events.h:875
SDL_QuitEvent QuitEvent
The "quit requested" event.
Definition SDL3pp_events.h:809
bool EventEnabled(Uint32 type)
Query the state of processing events by type.
Definition SDL3pp_events.h:1779
SDL_JoyDeviceEvent JoyDeviceEvent
Joystick device event structure (event.jdevice.
Definition SDL3pp_events.h:626
SDL_JoyBallEvent JoyBallEvent
Joystick trackball motion event structure (event.jball.
Definition SDL3pp_events.h:600
void PumpEvents()
Pump the event loop, gathering events from the input devices.
Definition SDL3pp_events.h:854
SDL_PenMotionEvent PenMotionEvent
Pressure-sensitive pen motion event structure (event.pmotion.
Definition SDL3pp_events.h:749
EventFilterCB GetEventFilter()
Query the current event filter.
Definition SDL3pp_events.h:1555
std::function< bool(const Event &)> EventFilterCB
A std::function used for callbacks that watch the event queue.
Definition SDL3pp_events.h:1407
constexpr EventType EVENT_PEN_UP
Pressure-sensitive pen stopped touching drawing surface.
Definition SDL3pp_events.h:413
constexpr EventType EVENT_WINDOW_SAFE_AREA_CHANGED
The window safe area has been changed.
Definition SDL3pp_events.h:216
constexpr EventType EVENT_DROP_FILE
The system requests a file open.
Definition SDL3pp_events.h:368
constexpr EventType EVENT_PEN_MOTION
Pressure-sensitive pen is moving on the tablet.
Definition SDL3pp_events.h:421
constexpr EventType EVENT_DISPLAY_ORIENTATION
Display orientation has changed to data1.
Definition SDL3pp_events.h:112
constexpr EventType EVENT_JOYSTICK_BUTTON_UP
Joystick button released.
Definition SDL3pp_events.h:303
constexpr EventType EVENT_KEYBOARD_REMOVED
A keyboard has been removed.
Definition SDL3pp_events.h:267
constexpr EventType EVENT_DISPLAY_ADDED
Display has been added to the system.
Definition SDL3pp_events.h:115
constexpr EventType EVENT_AUDIO_DEVICE_ADDED
A new audio device is available.
Definition SDL3pp_events.h:385
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:334
constexpr EventType EVENT_PRIVATE0
PRIVATE0.
Definition SDL3pp_events.h:458
constexpr EventType EVENT_RENDER_DEVICE_LOST
The device has been lost and can't be recovered.
Definition SDL3pp_events.h:454
constexpr EventType EVENT_WINDOW_OCCLUDED
The window has been occluded.
Definition SDL3pp_events.h:220
constexpr EventType EVENT_WINDOW_MOVED
Window has been moved to data1, data2.
Definition SDL3pp_events.h:152
constexpr EventType EVENT_JOYSTICK_HAT_MOTION
Joystick hat position change.
Definition SDL3pp_events.h:297
constexpr EventType EVENT_WINDOW_LEAVE_FULLSCREEN
The window has left fullscreen mode.
Definition SDL3pp_events.h:227
constexpr EventType EVENT_PRIVATE2
PRIVATE2.
Definition SDL3pp_events.h:462
constexpr EventType EVENT_DROP_BEGIN
A new set of drops is beginning (NULL filename)
Definition SDL3pp_events.h:374
constexpr EventType EVENT_CAMERA_DEVICE_APPROVED
A camera device has been approved for use by the user.
Definition SDL3pp_events.h:436
constexpr EventType EVENT_WILL_ENTER_BACKGROUND
The application is about to enter the background.
Definition SDL3pp_events.h:81
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:150
constexpr EventType EVENT_WINDOW_ICCPROF_CHANGED
The ICC profile of the window's display has changed.
Definition SDL3pp_events.h:206
constexpr EventType EVENT_GAMEPAD_REMOVED
A gamepad has been removed.
Definition SDL3pp_events.h:331
constexpr EventType EVENT_DISPLAY_CURRENT_MODE_CHANGED
Display has changed current mode.
Definition SDL3pp_events.h:127
constexpr EventType EVENT_DID_ENTER_FOREGROUND
The application is now interactive.
Definition SDL3pp_events.h:104
constexpr EventType EVENT_MOUSE_BUTTON_UP
Mouse button released.
Definition SDL3pp_events.h:279
constexpr EventType EVENT_KEYBOARD_ADDED
A new keyboard has been inserted into the system.
Definition SDL3pp_events.h:263
constexpr EventType EVENT_AUDIO_DEVICE_REMOVED
An audio device has been removed.
Definition SDL3pp_events.h:388
constexpr EventType EVENT_DISPLAY_CONTENT_SCALE_CHANGED
Display has changed content scale.
Definition SDL3pp_events.h:130
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:199
constexpr EventType EVENT_JOYSTICK_BUTTON_DOWN
Joystick button pressed.
Definition SDL3pp_events.h:300
constexpr EventType EVENT_DISPLAY_MOVED
Display has changed position.
Definition SDL3pp_events.h:121
constexpr EventType EVENT_PEN_BUTTON_UP
Pressure-sensitive pen button released.
Definition SDL3pp_events.h:418
constexpr EventType EVENT_KEY_UP
Key released.
Definition SDL3pp_events.h:249
constexpr EventType EVENT_MOUSE_ADDED
A new mouse has been inserted into the system.
Definition SDL3pp_events.h:285
constexpr EventType EVENT_POLL_SENTINEL
Signals the end of an event poll cycle.
Definition SDL3pp_events.h:466
constexpr EventType EVENT_MOUSE_REMOVED
A mouse has been removed.
Definition SDL3pp_events.h:288
constexpr EventType EVENT_DROP_POSITION
Position while moving over the window.
Definition SDL3pp_events.h:382
constexpr EventType EVENT_JOYSTICK_BATTERY_UPDATED
Joystick battery level change.
Definition SDL3pp_events.h:313
constexpr EventType EVENT_TEXT_INPUT
Keyboard text input.
Definition SDL3pp_events.h:254
constexpr EventType EVENT_DISPLAY_LAST
DISPLAY_LAST.
Definition SDL3pp_events.h:137
constexpr EventType EVENT_WINDOW_RESIZED
Window has been resized to data1xdata2.
Definition SDL3pp_events.h:155
constexpr EventType EVENT_PEN_PROXIMITY_OUT
Pressure-sensitive pen has become unavailable.
Definition SDL3pp_events.h:403
constexpr EventType EVENT_WINDOW_PIXEL_SIZE_CHANGED
The pixel size of the window has changed to data1xdata2.
Definition SDL3pp_events.h:161
constexpr EventType EVENT_JOYSTICK_BALL_MOTION
Joystick trackball motion.
Definition SDL3pp_events.h:294
constexpr EventType EVENT_GAMEPAD_BUTTON_DOWN
Gamepad button pressed.
Definition SDL3pp_events.h:322
constexpr EventType EVENT_CAMERA_DEVICE_REMOVED
A camera device has been removed.
Definition SDL3pp_events.h:430
constexpr EventType EVENT_DISPLAY_FIRST
DISPLAY_FIRST.
Definition SDL3pp_events.h:134
constexpr EventType EVENT_WINDOW_FIRST
WINDOW_FIRST.
Definition SDL3pp_events.h:242
constexpr EventType EVENT_RENDER_DEVICE_RESET
The device has been reset and all textures need to be recreated.
Definition SDL3pp_events.h:452
constexpr EventType EVENT_PEN_DOWN
Pressure-sensitive pen touched drawing surface.
Definition SDL3pp_events.h:407
constexpr EventType EVENT_TEXT_EDITING
Keyboard text editing (composition)
Definition SDL3pp_events.h:251
constexpr EventType EVENT_WINDOW_CLOSE_REQUESTED
The window manager requests that the window be closed.
Definition SDL3pp_events.h:196
constexpr EventType EVENT_GAMEPAD_TOUCHPAD_UP
Gamepad touchpad finger was lifted.
Definition SDL3pp_events.h:343
constexpr EventType EVENT_DID_ENTER_BACKGROUND
The application did enter the background and may not get CPU for some time.
Definition SDL3pp_events.h:89
constexpr EventType EVENT_DROP_TEXT
text/plain drag-and-drop event
Definition SDL3pp_events.h:371
constexpr EventType EVENT_WINDOW_HDR_STATE_CHANGED
Window HDR properties have changed.
Definition SDL3pp_events.h:239
constexpr EventType EVENT_PEN_PROXIMITY_IN
Pressure-sensitive pen has become available.
Definition SDL3pp_events.h:400
constexpr EventType EVENT_WILL_ENTER_FOREGROUND
The application is about to enter the foreground.
Definition SDL3pp_events.h:96
constexpr EventType EVENT_SENSOR_UPDATE
A sensor was updated.
Definition SDL3pp_events.h:397
constexpr EventType EVENT_KEY_DOWN
Key pressed.
Definition SDL3pp_events.h:247
constexpr EventType EVENT_TEXT_EDITING_CANDIDATES
Keyboard text editing candidates.
Definition SDL3pp_events.h:270
constexpr EventType EVENT_GAMEPAD_TOUCHPAD_DOWN
Gamepad touchpad was touched.
Definition SDL3pp_events.h:337
constexpr EventType EVENT_WINDOW_MINIMIZED
Window has been minimized.
Definition SDL3pp_events.h:170
constexpr EventType EVENT_PRIVATE1
PRIVATE1.
Definition SDL3pp_events.h:460
constexpr EventType EVENT_LAST
This last event is only for bounding internal arrays.
Definition SDL3pp_events.h:478
constexpr EventType EVENT_FINGER_MOTION
FINGER_MOTION.
Definition SDL3pp_events.h:359
constexpr EventType EVENT_JOYSTICK_UPDATE_COMPLETE
Joystick update is complete.
Definition SDL3pp_events.h:316
constexpr EventType EVENT_FINGER_CANCELED
FINGER_CANCELED.
Definition SDL3pp_events.h:362
constexpr EventType EVENT_LOW_MEMORY
The application is low on memory, free memory if possible.
Definition SDL3pp_events.h:74
constexpr EventType EVENT_DISPLAY_REMOVED
Display has been removed from the system.
Definition SDL3pp_events.h:118
constexpr EventType EVENT_GAMEPAD_TOUCHPAD_MOTION
Gamepad touchpad finger was moved.
Definition SDL3pp_events.h:340
constexpr EventType EVENT_FINGER_UP
FINGER_UP.
Definition SDL3pp_events.h:357
constexpr EventType EVENT_JOYSTICK_AXIS_MOTION
Joystick axis motion.
Definition SDL3pp_events.h:291
constexpr EventType EVENT_WINDOW_DISPLAY_SCALE_CHANGED
Window display scale has been changed.
Definition SDL3pp_events.h:212
constexpr EventType EVENT_FINGER_DOWN
FINGER_DOWN.
Definition SDL3pp_events.h:355
constexpr EventType EVENT_DISPLAY_DESKTOP_MODE_CHANGED
Display has changed desktop mode.
Definition SDL3pp_events.h:124
constexpr EventType EVENT_WINDOW_DESTROYED
The window with the associated ID is being or has been destroyed.
Definition SDL3pp_events.h:237
constexpr EventType EVENT_PRIVATE3
PRIVATE3.
Definition SDL3pp_events.h:464
constexpr EventType EVENT_GAMEPAD_BUTTON_UP
Gamepad button released.
Definition SDL3pp_events.h:325
constexpr EventType EVENT_CAMERA_DEVICE_DENIED
A camera device has been denied for use by the user.
Definition SDL3pp_events.h:442
constexpr EventType EVENT_GAMEPAD_STEAM_HANDLE_UPDATED
Gamepad Steam handle has changed.
Definition SDL3pp_events.h:352
constexpr EventType EVENT_USER
Events EVENT_USER through EVENT_LAST are for your use, and should be allocated with RegisterEvents()
Definition SDL3pp_events.h:473
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:261
constexpr EventType EVENT_MOUSE_BUTTON_DOWN
Mouse button pressed.
Definition SDL3pp_events.h:276
constexpr EventType EVENT_LOCALE_CHANGED
The user's locale preferences have changed.
Definition SDL3pp_events.h:106
constexpr EventType EVENT_PEN_AXIS
Pressure-sensitive pen angle/pressure/etc changed.
Definition SDL3pp_events.h:424
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:58
constexpr EventType EVENT_JOYSTICK_REMOVED
An opened joystick has been removed.
Definition SDL3pp_events.h:310
constexpr EventType EVENT_GAMEPAD_UPDATE_COMPLETE
Gamepad update is complete.
Definition SDL3pp_events.h:349
constexpr EventType EVENT_CLIPBOARD_UPDATE
The clipboard or primary selection changed.
Definition SDL3pp_events.h:365
constexpr EventType EVENT_AUDIO_DEVICE_FORMAT_CHANGED
An audio device's format has been changed by the system.
Definition SDL3pp_events.h:394
constexpr EventType EVENT_MOUSE_WHEEL
Mouse wheel motion.
Definition SDL3pp_events.h:282
constexpr EventType EVENT_SYSTEM_THEME_CHANGED
The system theme changed.
Definition SDL3pp_events.h:109
constexpr EventType EVENT_JOYSTICK_ADDED
A new joystick has been inserted into the system.
Definition SDL3pp_events.h:306
constexpr EventType EVENT_TERMINATING
The application is being terminated by the OS.
Definition SDL3pp_events.h:67
constexpr EventType EVENT_ENUM_PADDING
ENUM_PADDING.
Definition SDL3pp_events.h:480
constexpr EventType EVENT_GAMEPAD_SENSOR_UPDATE
Gamepad sensor was updated.
Definition SDL3pp_events.h:346
constexpr EventType EVENT_WINDOW_SHOWN
Window has been shown.
Definition SDL3pp_events.h:140
constexpr EventType EVENT_WINDOW_MAXIMIZED
Window has been maximized.
Definition SDL3pp_events.h:173
constexpr EventType EVENT_GAMEPAD_ADDED
A new gamepad has been inserted into the system.
Definition SDL3pp_events.h:328
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:273
constexpr EventType EVENT_PEN_BUTTON_DOWN
Pressure-sensitive pen button pressed.
Definition SDL3pp_events.h:415
constexpr EventType EVENT_WINDOW_METAL_VIEW_RESIZED
The pixel size of a Metal view associated with the window has changed.
Definition SDL3pp_events.h:167
constexpr EventType EVENT_GAMEPAD_AXIS_MOTION
Gamepad axis motion.
Definition SDL3pp_events.h:319
constexpr EventType EVENT_RENDER_TARGETS_RESET
The render targets have been reset and their contents need to be updated.
Definition SDL3pp_events.h:447
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:223
constexpr EventType EVENT_QUIT
User-requested quit.
Definition SDL3pp_events.h:60
constexpr EventType EVENT_WINDOW_DISPLAY_CHANGED
Window has been moved to display data1.
Definition SDL3pp_events.h:209
constexpr EventType EVENT_WINDOW_HIDDEN
Window has been hidden.
Definition SDL3pp_events.h:143
constexpr EventType EVENT_CAMERA_DEVICE_ADDED
A new camera device is available.
Definition SDL3pp_events.h:427
constexpr EventType EVENT_WINDOW_LAST
WINDOW_LAST.
Definition SDL3pp_events.h:245
constexpr EventType EVENT_DROP_COMPLETE
Current set of drops is now complete (NULL filename)
Definition SDL3pp_events.h:380
the main namespace where all SDL3pp public functions and types live
Definition SDL3pp_assert.h:7
Definition SDL3pp_callbackWrapper.h:66
Handle returned by AddEventWatch(EventFilterCB)
Definition SDL3pp_events.h:1416
Stored Wrapper unique by type result callbacks.
Definition SDL3pp_callbackWrapper.h:242
Represents a handle to a window.
Definition SDL3pp_video.h:860