blob: ef5dd0005e3fe2999115f6af1c6efbca326d6727 (
plain)
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
;;;
;;; Input-related functions: keyboard
;;;
;; Check if a key has been pressed once
;; bool IsKeyPressed(int key);
(define key-pressed?
(c-lambda (int) bool "IsKeyPressed"))
;; Check if a key has been pressed again (Only PLATFORM_DESKTOP)
;; bool IsKeyPressedRepeat(int key);
(define key-pressed-repeat?
(c-lambda (int) bool "IsKeyPressedRepeat"))
;; Check if a key is being pressed
;; bool IsKeyDown(int key);
(define key-down?
(c-lambda (int) bool "IsKeyDown"))
;; Check if a key has been released once
;; bool IsKeyReleased(int key);
(define key-released?
(c-lambda (int) bool "IsKeyReleased"))
;; Check if a key is NOT being pressed
;; bool IsKeyUp(int key);
(define key-up?
(c-lambda (int) bool "IsKeyUp"))
;; Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
;; int GetKeyPressed(void);
(define get-pressed-key
(c-lambda () int "GetKeyPressed"))
;; Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
;; int GetCharPressed(void);
(define get-pressed-char
(c-lambda () int "GetCharPressed"))
;; Set a custom key to exit program (default is ESC)
;; void SetExitKey(int key);
(define set-exit-key
(c-lambda (int) void "SetExitKey"))
;;;
;;; Input-related functions: mouse
;;;
;; Check if a mouse button has been pressed once
;; bool IsMouseButtonPressed(int button);
(define mouse-btn-pressed?
(c-lambda (int) bool "IsMouseButtonPressed"))
;; Check if a mouse button is being pressed
;; bool IsMouseButtonDown(int button);
(define mouse-btn-down?
(c-lambda (int) bool "IsMouseButtonDown"))
;; Check if a mouse button has been released once
;; bool IsMouseButtonReleased(int button);
(define mouse-btn-released?
(c-lambda (int) bool "IsMouseButtonReleased"))
;; Check if a mouse button is NOT being pressed
;; bool IsMouseButtonUp(int button);
(define mouse-btn-up?
(c-lambda (int) bool "IsMouseButtonUp"))
;; Get mouse position X
;; int GetMouseX(void);
(define get-mouse-x
(c-lambda () int "GetMouseX"))
;; Get mouse position Y
;; int GetMouseY(void);
(define get-mouse-y
(c-lambda () int "GetMouseY"))
;; Get mouse position XY
;; Vector2 GetMousePosition(void);
;; replaced by this:
(define get-mouse-pos
(lambda ()
(cons (get-mouse-x)
(get-mouse-y))))
;; Get mouse delta between frames
;; Vector2 GetMouseDelta(void);
;; Set mouse position XY
;; void SetMousePosition(int x, int y);
(define set-mouse-pos
(c-lambda (int int) void "SetMousePosition"))
;; Set mouse offset
;; void SetMouseOffset(int offsetX, int offsetY);
(define set-mouse-offset
(c-lambda (int int) void "SetMouseOffset"))
;; Set mouse scaling
;; void SetMouseScale(float scaleX, float scaleY);
;; Get mouse wheel movement for X or Y, whichever is larger
;; float GetMouseWheelMove(void);
;; Get mouse wheel movement for both X and Y
;; Vector2 GetMouseWheelMoveV(void);
;; Set mouse cursor
;; void SetMouseCursor(int cursor);
|