Skip to content

Commit dd99c6b

Browse files
authored
gg: add doc comments for the FN** types (#25814)
1 parent 975cfcd commit dd99c6b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎vlib/gg/gg.v‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,31 @@ module gg
55

66
pub type FNCb = fn (data voidptr)
77

8+
// FNEvent defines the type of a function that will be called for every event
89
pub type FNEvent = fn (e &Event, data voidptr)
910

11+
// FNEvent2 same as FNEvent with inverted arguments TODO: deprecate this, in favor of event_fn
1012
pub 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
1215
pub 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
1418
pub 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
1621
pub 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
1824
pub 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
2027
pub 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
2230
pub 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
2433
pub type FNChar = fn (c u32, data voidptr)
2534

2635
pub struct PenConfig {

0 commit comments

Comments
 (0)