From 0e2c023102de730c16a5aa38dfe7dc14685ea868 Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 13 Jul 2018 06:38:09 -0700 Subject: [PATCH] Add sdl window event --- ion/system_packages/sdl/input.ion | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ion/system_packages/sdl/input.ion b/ion/system_packages/sdl/input.ion index 461612e..212bd3b 100644 --- a/ion/system_packages/sdl/input.ion +++ b/ion/system_packages/sdl/input.ion @@ -274,13 +274,14 @@ enum SDL_Scancode { @foreign enum SDL_EventType { SDL_QUIT = 0x100, + SDL_WINDOWEVENT = 0x200, SDL_KEYDOWN = 0x300, SDL_KEYUP, SDL_TEXTEDITING, SDL_TEXTINPUT, SDL_MOUSEMOTION = 0x400, SDL_MOUSEBUTTONDOWN, - SDL_MOUSEBUTTONUP, + SDL_MOUSEBUTTONUP, } @foreign @@ -303,6 +304,19 @@ struct SDL_Keysym { unused: uint32; } +@foreign +struct SDL_WindowEvent { + type: uint32; + timestamp: uint32; + windowID: uint32; + event: uint8; + padding1: uint8; + padding2: uint8; + padding3: uint8; + data1: int32; + data2: int32; +} + @foreign struct SDL_KeyboardEvent { type: uint32; @@ -357,6 +371,7 @@ struct SDL_MouseButtonEvent { @foreign union SDL_Event { type: uint32; + window: SDL_WindowEvent; key: SDL_KeyboardEvent; text: SDL_TextInputEvent; motion: SDL_MouseMotionEvent;