@@ -5,22 +5,31 @@ module gg
55
66pub type FNCb = fn (data voidptr )
77
8+ // FNEvent defines the type of a function that will be called for every event
89pub type FNEvent = fn (e & Event, data voidptr )
910
11+ // FNEvent2 same as FNEvent with inverted arguments TODO: deprecate this, in favor of event_fn
1012pub type FNEvent2 = fn (data voidptr , e & Event)
1113
14+ // FNFail defines the type of a function that will be called when there is a fail
1215pub type FNFail = fn (msg string , data voidptr )
1316
17+ // FNKeyDown defines the type of a function that will be called for every key pressed down
1418pub type FNKeyDown = fn (c KeyCode, m Modifier, data voidptr )
1519
20+ // FNKeyUp defines the type of a function that will be called for every release of a pressed key
1621pub type FNKeyUp = fn (c KeyCode, m Modifier, data voidptr )
1722
23+ // FNMove defines the type of a function that will be called for every mouse move on the screen
1824pub type FNMove = fn (x f32 , y f32 , data voidptr )
1925
26+ // FNClick defines the type of a function that will be called for every mouse click
2027pub type FNClick = fn (x f32 , y f32 , button MouseButton, data voidptr )
2128
29+ // FNUnClick defines the type of a function that will be called every time a mouse button is released
2230pub type FNUnClick = fn (x f32 , y f32 , button MouseButton, data voidptr )
2331
32+ // FNChar defines the type of a function that will be called once per character
2433pub type FNChar = fn (c u32 , data voidptr )
2534
2635pub struct PenConfig {
0 commit comments