1 #ifndef DONUT_EVENTS_EVENT_HPP
2 #define DONUT_EVENTS_EVENT_HPP
294 ApplicationQuitRequestedEvent,
295 ApplicationTerminatingEvent,
296 ApplicationLowMemoryEvent,
297 ApplicationPausingEvent,
298 ApplicationPausedEvent,
299 ApplicationUnpausingEvent,
300 ApplicationUnpausedEvent,
306 WindowSizeChangedEvent,
307 WindowMinimizedEvent,
308 WindowMaximizedEvent,
310 WindowMouseFocusGainedEvent,
311 WindowMouseFocusLostEvent,
312 WindowKeyboardFocusGainedEvent,
313 WindowKeyboardFocusLostEvent,
314 WindowCloseRequestedEvent,
315 WindowDisplayChangedEvent,
317 KeyPressRepeatedEvent,
319 TextInputEditedEvent,
320 TextInputSubmittedEvent,
322 MouseButtonPressedEvent,
323 MouseButtonReleasedEvent,
324 MouseWheelScrolledEvent,
325 ControllerAddedEvent,
326 ControllerRemovedEvent,
327 ControllerRemappedEvent,
328 ControllerAxisMovedEvent,
329 ControllerButtonPressedEvent,
330 ControllerButtonReleasedEvent,
335 ClipboardUpdatedEvent,
339 DropCompletedEvent> {};
Tagged union value type that holds a value of one of the given types.
Definition: Variant.hpp:291
Input
Unique identifier for a specific control on a physical input device, such as a certain keyboard key,...
Definition: Input.hpp:323
Application Event base.
Definition: Event.hpp:17
Application is low on memory.
Definition: Event.hpp:135
Application was paused by the OS.
Definition: Event.hpp:141
Application is about to be paused by the OS.
Definition: Event.hpp:138
Application was requested to quit by the user.
Definition: Event.hpp:129
Application is being terminated by the OS.
Definition: Event.hpp:132
Application was unpaused by the OS.
Definition: Event.hpp:147
Application is about to be unpaused by the OS.
Definition: Event.hpp:144
Clipboard Event base.
Definition: Event.hpp:121
Clipboard was updated.
Definition: Event.hpp:266
Controller was added.
Definition: Event.hpp:236
Controller axis Event base.
Definition: Event.hpp:85
i16 axisValue
Current axis value in the range [-32768, 32767].
Definition: Event.hpp:100
ControllerAxis
Controller axis enumeration.
Definition: Event.hpp:89
@ RIGHT_TRIGGER
Movement of the right trigger.
@ LEFT_STICK_Y
Vertical movement of the left analog stick.
@ RIGHT_STICK_Y
Vertical movement of the right analog stick.
@ RIGHT_STICK_X
Horizontal movement of the right analog stick.
@ LEFT_TRIGGER
Movement of the left trigger.
@ LEFT_STICK_X
Horizontal movement of the left analog stick.
ControllerAxis axis
Physical controller axis.
Definition: Event.hpp:99
Controller axis was moved.
Definition: Event.hpp:245
Controller Event base.
Definition: Event.hpp:80
std::int32_t controllerId
Unique identifier of the controller instance.
Definition: Event.hpp:81
Controller was remapped.
Definition: Event.hpp:242
Controller was removed.
Definition: Event.hpp:239
Drop was completed.
Definition: Event.hpp:282
Drop Event base.
Definition: Event.hpp:124
std::uint32_t windowId
Unique identifier of the window that was dropped onto, if any.
Definition: Event.hpp:125
File was dropped.
Definition: Event.hpp:269
std::string droppedFilepath
Filepath of the dropped file.
Definition: Event.hpp:270
Drop was started.
Definition: Event.hpp:279
Text was dropped.
Definition: Event.hpp:274
std::string droppedText
Dropped text.
Definition: Event.hpp:275
Event base.
Definition: Event.hpp:14
Data structure containing information about an event.
Definition: Event.hpp:339
Keyboard key Event base.
Definition: Event.hpp:30
KeyModifier
Key modifier bits.
Definition: Event.hpp:35
@ MODIFIER_SCROLL_LOCK
Scroll lock.
Definition: Event.hpp:48
@ MODIFIER_SHIFT
Left or right shift.
Definition: Event.hpp:51
@ MODIFIER_RSHIFT
Right shift.
Definition: Event.hpp:38
@ MODIFIER_LCTRL
Left control.
Definition: Event.hpp:39
@ MODIFIER_NONE
No modifiers.
Definition: Event.hpp:36
@ MODIFIER_LSUPER
Left super.
Definition: Event.hpp:43
@ MODIFIER_MODE
Mode.
Definition: Event.hpp:47
@ MODIFIER_RALT
Right alt.
Definition: Event.hpp:42
@ MODIFIER_SUPER
Left or right super.
Definition: Event.hpp:53
@ MODIFIER_ALT
Left or right alt.
Definition: Event.hpp:52
@ MODIFIER_CTRL
Left or right control.
Definition: Event.hpp:50
@ MODIFIER_LSHIFT
Left shift.
Definition: Event.hpp:37
@ MODIFIER_RCTRL
Right control.
Definition: Event.hpp:40
@ MODIFIER_NUM_LOCK
Number lock.
Definition: Event.hpp:45
@ MODIFIER_LALT
Left alt.
Definition: Event.hpp:41
@ MODIFIER_RSUPER
Right super.
Definition: Event.hpp:44
@ MODIFIER_CAPS_LOCK
Capital lock.
Definition: Event.hpp:46
Input physicalKeyInput
Physical key input identifier.
Definition: Event.hpp:56
KeyModifiers keyModifiers
Current key modifiers.
Definition: Event.hpp:58
int symbolicKeyCode
Symbolic identifier of the key.
Definition: Event.hpp:57
std::uint16_t KeyModifiers
Bit set of key modifiers.
Definition: Event.hpp:32
Keyboard key was held, causing a repeat press.
Definition: Event.hpp:206
Keyboard key was pressed.
Definition: Event.hpp:203
Keyboard key was released.
Definition: Event.hpp:209
Keyboard keymap was changed.
Definition: Event.hpp:263
Keyboard keymap Event base.
Definition: Event.hpp:118
Mouse Event base.
Definition: Event.hpp:67
ivec2 mousePosition
Current mouse position relative to the window.
Definition: Event.hpp:69
std::uint32_t mouseId
Unique identifier of the mouse instance.
Definition: Event.hpp:68
ivec2 relativeMouseMotion
Position offset relative to the previous position.
Definition: Event.hpp:70
Mouse was moved.
Definition: Event.hpp:221
Text input was edited.
Definition: Event.hpp:212
std::int32_t textCursorOffset
The cursor offset of the start of the selected text.
Definition: Event.hpp:213
std::int32_t textCursorSelectionLength
The length of the current text selection, if any.
Definition: Event.hpp:214
Text input Event base.
Definition: Event.hpp:62
std::string inputText
Input text.
Definition: Event.hpp:63
Text input was submitted.
Definition: Event.hpp:218
Touch Event base.
Definition: Event.hpp:109
vec2 relativeNormalizedFingerMotion
Finger offset relative to the previous position, normalized to the range [-1, 1].
Definition: Event.hpp:113
std::int64_t touchDeviceId
Touch device identifier.
Definition: Event.hpp:110
vec2 normalizedFingerPosition
Current finger position, normalized to the range [0, 1].
Definition: Event.hpp:112
float normalizedFingerPressure
Amount of pressure applied, normalized to the range [0, 1].
Definition: Event.hpp:114
std::int64_t fingerId
Finger identifier.
Definition: Event.hpp:111
Touch was moved.
Definition: Event.hpp:254
Touch was pressed.
Definition: Event.hpp:257
Touch was released.
Definition: Event.hpp:260
Window was requested to close.
Definition: Event.hpp:195
Window was moved to a new display.
Definition: Event.hpp:198
int displayIndex
Current display index.
Definition: Event.hpp:199
Window Event base.
Definition: Event.hpp:20
std::uint32_t windowId
Unique identifier of the window.
Definition: Event.hpp:21
Window was exposed.
Definition: Event.hpp:156
Window was hidden.
Definition: Event.hpp:153
Window gained keyboard focus.
Definition: Event.hpp:189
Window lost keyboard focus.
Definition: Event.hpp:192
Window was maximized.
Definition: Event.hpp:177
Window was minimized.
Definition: Event.hpp:174
Window gained mouse focus.
Definition: Event.hpp:183
Window lost mouse focus.
Definition: Event.hpp:186
Window was moved.
Definition: Event.hpp:159
ivec2 windowPosition
Current window position.
Definition: Event.hpp:160
Window was resized manually.
Definition: Event.hpp:164
ivec2 windowSize
Current window size.
Definition: Event.hpp:165
Window was restored.
Definition: Event.hpp:180
Window was shown.
Definition: Event.hpp:150
Window size was changed.
Definition: Event.hpp:169
ivec2 windowSize
Current window size.
Definition: Event.hpp:170