-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.wu
89 lines (70 loc) · 3.13 KB
/
init.wu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import audio
import data
import event
import filesystem
import font
import graphics
import image
import joystick
import keyboard
import math
import mouse
import physics
import sound
import system
import thread
import timer
import touch
import video
import window
import types { Config }
# TODO: update signatures when sum types are implemented
# TODO: update signatures when enums are implemented
# FUNCTIONS -----------------------------------------------------------------------------
getVersion: extern fun() -> (int, int, int, str)
hasDeprecationOutput: extern fun() -> bool
isVersionCompatible: extern fun(any, int?, int?) -> bool # fun(str|int?, int?, int?) -> bool
setDeprecationOutput: extern fun(bool) -> nil
# CALLBACKS -----------------------------------------------------------------------------
# general
conf: extern fun(Config) -> nil
displayrotated: extern fun(int, str) -> nil # fun(int, window DisplayOrientation) -> nil
draw: extern fun() -> nil
errhandler: extern fun(str) -> nil
load: extern fun(any?, any?) -> nil
lowmemory: extern fun() -> nil
quit: extern fun() -> bool
run: extern fun() -> fun
threaderror: extern fun(thread Thread, str) -> nil
update: extern fun(float) -> nil
# window
directorydropped: extern fun(str) -> nil
filedropped: extern fun(filesystem DroppedFile) -> nil
focus: extern fun(bool) -> nil
mousefocus: extern fun(bool) -> nil
resize: extern fun(int, int) -> nil
visible: extern fun(bool) -> nil
# keyboard
keypressed: extern fun(str, str, bool) -> nil # fun(keyboard KeyConstant, keyboard Scancode, bool)
keyreleased: extern fun(str, str) -> nil # fun(keyboard KeyConstant, keyboard Scancode) -> nil
textedited: extern fun(str, int, int) -> nil
textinput: extern fun(str) -> nil
# mouse
mousemoved: extern fun(int, int, int, int, bool) -> nil
mousepressed: extern fun(int, int, int, bool, int) -> nil
mousereleased: extern fun(int, int, int, bool, int) -> nil
wheelmoved: extern fun(int, int) -> nil
# joystick
gamepadaxis: extern fun(joystick Joystick, str, float) -> nil # fun(joystick Joystick, joystick GamepadAxis, float) -> nil
gamepadpressed: extern fun(joystick Joystick, str) -> nil # fun(joystick Joystick, joystick GamepadButton) -> nil
gamepadreleased: extern fun(joystick Joystick, str) -> nil # fun(joystick Joystick, joystick GamepadButton) -> nil
joystickadded: extern fun(joystick Joystick) -> nil
joystickaxis: extern fun(joystick Joystick, int, float) -> nil
joystickhat: extern fun(joystick Joystick, int, str) -> nil # fun(joystick Joystick, int, joystick JoystickHat) -> nil
joystickpressed: extern fun(joystick Joystick, int)
joystickreleased: extern fun(joystick Joystick, int)
joystickremoved: extern fun(joystick Joystick) -> nil
# touch
touchmoved: extern fun(any, int, int, int, int, float)
touchpressed: extern fun(any, int, int, int, int, float)
touchreleased: extern fun(any, int, int, int, int, float)