comparison semiconginev2/events.nim @ 1256:bfb75c934f4e

add: window focus handling, improve window api a bit
author sam <sam@basx.dev>
date Sun, 28 Jul 2024 17:33:41 +0700
parents 56781cc0fc7c
children
comparison
equal deleted inserted replaced
1255:2b5ca798f6d6 1256:bfb75c934f4e
3 Quit 3 Quit
4 ResizedWindow, MinimizedWindow, RestoredWindow 4 ResizedWindow, MinimizedWindow, RestoredWindow
5 KeyPressed, KeyReleased 5 KeyPressed, KeyReleased
6 MousePressed, MouseReleased, MouseMoved, 6 MousePressed, MouseReleased, MouseMoved,
7 MouseWheel 7 MouseWheel
8 GotFocus, LostFocus
8 Key* {.size: sizeof(cint), pure.} = enum 9 Key* {.size: sizeof(cint), pure.} = enum
9 UNKNOWN 10 UNKNOWN
10 Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12 11 Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12
11 NumberRowExtra1, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `0`, 12 NumberRowExtra1, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `0`,
12 NumberRowExtra2, NumberRowExtra3 # tilde, minus, plus 13 NumberRowExtra2, NumberRowExtra3 # tilde, minus, plus
29 button*: MouseButton 30 button*: MouseButton
30 of MouseMoved: 31 of MouseMoved:
31 x*, y*: int 32 x*, y*: int
32 of MouseWheel: 33 of MouseWheel:
33 amount*: float32 34 amount*: float32
35 of GotFocus:
36 discard
37 of LostFocus:
38 discard
34 else: 39 else:
35 discard 40 discard