Skip to content

Commit 1018149

Browse files
yglukhovdom96
authored andcommitted
Added more events. Fixed SysWMInfo size.
1 parent 34037ce commit 1018149

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/sdl2.nim

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ type
3737
EventType* {.size: sizeof(uint32).} = enum
3838
QuitEvent = 0x100, AppTerminating, AppLowMemory, AppWillEnterBackground,
3939
AppDidEnterBackground, AppWillEnterForeground, AppDidEnterForeground,
40+
DisplayEvent = 0x150,
4041
WindowEvent = 0x200, SysWMEvent,
41-
KeyDown = 0x300, KeyUp, TextEditing, TextInput,
42+
KeyDown = 0x300, KeyUp, TextEditing, TextInput, KeymapChanged,
4243
MouseMotion = 0x400, MouseButtonDown, MouseButtonUp, MouseWheel,
4344
JoyAxisMotion = 0x600, JoyBallMotion, JoyHatMotion, JoyButtonDown,
4445
JoyButtonUp, JoyDeviceAdded, JoyDeviceRemoved,
@@ -47,8 +48,10 @@ type
4748
FingerDown = 0x700, FingerUp, FingerMotion,
4849
DollarGesture = 0x800, DollarRecord, MultiGesture,
4950
ClipboardUpdate = 0x900,
50-
DropFile = 0x1000,
51+
DropFile = 0x1000, DropText, DropBegin, DropComplete,
5152
AudioDeviceAdded = 0x1100, AudioDeviceRemoved = 0x1101,
53+
SensorUpdate = 0x1200,
54+
RenderTargetsReset = 0x2000, RenderDeviceReset,
5255
UserEvent = 0x8000, UserEvent1, UserEvent2, UserEvent3, UserEvent4, UserEvent5,
5356
LastEvent = 0xFFFF,
5457

@@ -308,7 +311,7 @@ type
308311
WMinfo* = object
309312
version*: SDL_Version
310313
subsystem*: SysWMType
311-
padding*: array[24, byte] ## if the low-level stuff is important to you check \
314+
padding*: array[64, byte] ## if the low-level stuff is important to you check \
312315
## SDL_syswm.h and cast padding to the right type
313316

314317
const ## WindowFlags

0 commit comments

Comments
 (0)