-
Notifications
You must be signed in to change notification settings - Fork 1
/
raylib-definitions.scm
218 lines (204 loc) · 10.6 KB
/
raylib-definitions.scm
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
(import chicken scheme foreign foreigners lolevel)
(use foreigners lolevel)
(foreign-declare "#include <raylib.h>")
(define-foreign-enum-type (blend-mode int)
(blend-mode->int int->blend-mode)
((blend-alpha blend-mode/blend-alpha) BLEND_ALPHA)
((blend-additive blend-mode/blend-additive) BLEND_ADDITIVE)
((blend-multiplied blend-mode/blend-multiplied) BLEND_MULTIPLIED))
(define-foreign-enum-type (camera-type int)
(camera-type->int int->camera-type)
((perspective camera-type/perspective) CAMERA_PERSPECTIVE)
((orthographic camera-type/orthographic) CAMERA_ORTHOGRAPHIC))
(define-foreign-enum-type (camera-mode int)
(camera-mode->int int->camera-mode)
((camera-custom camera-mode/camera-custom) CAMERA_CUSTOM)
((camera-free camera-mode/camera-free) CAMERA_FREE)
((camera-orbital camera-mode/camera-orbital) CAMERA_ORBITAL)
((camera-first-person camera-mode/camera-first-person) CAMERA_FIRST_PERSON)
((camera-third-person camera-mode/camera-third-person) CAMERA_THIRD_PERSON))
(define-foreign-enum-type (config-flag unsigned-short)
(config-flag->int int->config-flag)
; Set to show raylib logo at startup
((flag-show-logo config-flag/flag-show-logo) FLAG_SHOW_LOGO)
; Set to run program in fullscreen
((flag-fullscreen-mode config-flag/flag-fullscreen-mode) FLAG_FULLSCREEN_MODE)
; Set to allow resizable window
((flag-window-resizable config-flag/flag-window-resizable) FLAG_WINDOW_RESIZABLE)
; Set to disable window decoration (frame and buttons)
((flag-window-undecorated config-flag/flag-window-undecorated) FLAG_WINDOW_UNDECORATED)
; Set to allow transparent window
((flag-window-transparent config-flag/flag-window-transparent) FLAG_WINDOW_TRANSPARENT)
; Set to create the window initially hidden
((flag-window-hidden config-flag/flag-window-hidden) FLAG_WINDOW_HIDDEN)
; Set to try enabling MSAA 4X
((flag-msaa-4x-hint config-flag/flag-msaa-4x-hint) FLAG_MSAA_4X_HINT)
; Set to try enabling V-Sync on GPU
((flag-vsync-hint config-flag/flag-vsync-hint) FLAG_VSYNC_HINT))
(define-foreign-enum-type (keyboard-keys int)
(keyboard-keys->int int->keyboard-keys)
((key-apostrophe keyboard-keys/key-apostrophe) KEY_APOSTROPHE)
((key-comma keyboard-keys/key-comma) KEY_COMMA)
((key-minus keyboard-keys/key-minus) KEY_MINUS)
((key-period keyboard-keys/key-period) KEY_PERIOD)
((key-slash keyboard-keys/key-slash) KEY_SLASH)
((key-zero keyboard-keys/key-zero) KEY_ZERO)
((key-one keyboard-keys/key-one) KEY_ONE)
((key-two keyboard-keys/key-two) KEY_TWO)
((key-three keyboard-keys/key-three) KEY_THREE)
((key-four keyboard-keys/key-four) KEY_FOUR)
((key-five keyboard-keys/key-five) KEY_FIVE)
((key-six keyboard-keys/key-six) KEY_SIX)
((key-seven keyboard-keys/key-seven) KEY_SEVEN)
((key-eight keyboard-keys/key-eight) KEY_EIGHT)
((key-nine keyboard-keys/key-nine) KEY_NINE)
((key-semicolon keyboard-keys/key-semicolon) KEY_SEMICOLON)
((key-equal keyboard-keys/key-equal) KEY_EQUAL)
((key-a keyboard-keys/key-a) KEY_A)
((key-b keyboard-keys/key-b) KEY_B)
((key-c keyboard-keys/key-c) KEY_C)
((key-d keyboard-keys/key-d) KEY_D)
((key-e keyboard-keys/key-e) KEY_E)
((key-f keyboard-keys/key-f) KEY_F)
((key-g keyboard-keys/key-g) KEY_G)
((key-h keyboard-keys/key-h) KEY_H)
((key-i keyboard-keys/key-i) KEY_I)
((key-j keyboard-keys/key-j) KEY_J)
((key-k keyboard-keys/key-k) KEY_K)
((key-l keyboard-keys/key-l) KEY_L)
((key-m keyboard-keys/key-m) KEY_M)
((key-n keyboard-keys/key-n) KEY_N)
((key-o keyboard-keys/key-o) KEY_O)
((key-p keyboard-keys/key-p) KEY_P)
((key-q keyboard-keys/key-q) KEY_Q)
((key-r keyboard-keys/key-r) KEY_R)
((key-s keyboard-keys/key-s) KEY_S)
((key-t keyboard-keys/key-t) KEY_T)
((key-u keyboard-keys/key-u) KEY_U)
((key-v keyboard-keys/key-v) KEY_V)
((key-w keyboard-keys/key-w) KEY_W)
((key-x keyboard-keys/key-x) KEY_X)
((key-y keyboard-keys/key-y) KEY_Y)
((key-z keyboard-keys/key-z) KEY_Z)
; Function keys
((key-space keyboard-keys/key-space) KEY_SPACE)
((key-escape keyboard-keys/key-escape) KEY_ESCAPE)
((key-enter keyboard-keys/key-enter) KEY_ENTER)
((key-tab keyboard-keys/key-tab) KEY_TAB)
((key-backspace keyboard-keys/key-backspace) KEY_BACKSPACE)
((key-insert keyboard-keys/key-insert) KEY_INSERT)
((key-delete keyboard-keys/key-delete) KEY_DELETE)
((key-right keyboard-keys/key-right) KEY_RIGHT)
((key-left keyboard-keys/key-left) KEY_LEFT)
((key-down keyboard-keys/key-down) KEY_DOWN)
((key-up keyboard-keys/key-up) KEY_UP)
((key-page-up keyboard-keys/key-page-up) KEY_PAGE_UP)
((key-page-down keyboard-keys/key-page-down) KEY_PAGE_DOWN)
((key-home keyboard-keys/key-home) KEY_HOME)
((key-end keyboard-keys/key-end) KEY_END)
((key-caps-lock keyboard-keys/key-caps-lock) KEY_CAPS_LOCK)
((key-scroll-lock keyboard-keys/key-scroll-lock) KEY_SCROLL_LOCK)
((key-num-lock keyboard-keys/key-num-lock) KEY_NUM_LOCK)
((key-print-screen keyboard-keys/key-print-screen) KEY_PRINT_SCREEN)
((key-pause keyboard-keys/key-pause) KEY_PAUSE)
((key-f1 keyboard-keys/key-f1) KEY_F1)
((key-f2 keyboard-keys/key-f2) KEY_F2)
((key-f3 keyboard-keys/key-f3) KEY_F3)
((key-f4 keyboard-keys/key-f4) KEY_F4)
((key-f5 keyboard-keys/key-f5) KEY_F5)
((key-f6 keyboard-keys/key-f6) KEY_F6)
((key-f7 keyboard-keys/key-f7) KEY_F7)
((key-f8 keyboard-keys/key-f8) KEY_F8)
((key-f9 keyboard-keys/key-f9) KEY_F9)
((key-f10 keyboard-keys/key-f10) KEY_F10)
((key-f11 keyboard-keys/key-f11) KEY_F11)
((key-f12 keyboard-keys/key-f12) KEY_F12)
((key-left-shift keyboard-keys/key-left-shift) KEY_LEFT_SHIFT)
((key-left-control keyboard-keys/key-left-control) KEY_LEFT_CONTROL)
((key-left-alt keyboard-keys/key-left-alt) KEY_LEFT_ALT)
((key-left-super keyboard-keys/key-left-super) KEY_LEFT_SUPER)
((key-right-shift keyboard-keys/key-right-shift) KEY_RIGHT_SHIFT)
((key-right-control keyboard-keys/key-right-control) KEY_RIGHT_CONTROL)
((key-right-alt keyboard-keys/key-right-alt) KEY_RIGHT_ALT)
((key-right-super keyboard-keys/key-right-super) KEY_RIGHT_SUPER)
((key-kb-menu keyboard-keys/key-kb-menu) KEY_KB_MENU)
((key-left-bracket keyboard-keys/key-left-bracket) KEY_LEFT_BRACKET)
((key-backslash keyboard-keys/key-backslash) KEY_BACKSLASH)
((key-right-bracket keyboard-keys/key-right-bracket) KEY_RIGHT_BRACKET)
((key-grave keyboard-keys/key-grave) KEY_GRAVE)
; Keypad keys
((key-kp-0 keyboard-keys/key-kp-0) KEY_KP_0)
((key-kp-1 keyboard-keys/key-kp-1) KEY_KP_1)
((key-kp-2 keyboard-keys/key-kp-2) KEY_KP_2)
((key-kp-3 keyboard-keys/key-kp-3) KEY_KP_3)
((key-kp-4 keyboard-keys/key-kp-4) KEY_KP_4)
((key-kp-5 keyboard-keys/key-kp-5) KEY_KP_5)
((key-kp-6 keyboard-keys/key-kp-6) KEY_KP_6)
((key-kp-7 keyboard-keys/key-kp-7) KEY_KP_7)
((key-kp-8 keyboard-keys/key-kp-8) KEY_KP_8)
((key-kp-9 keyboard-keys/key-kp-9) KEY_KP_9)
((key-kp-decimal keyboard-keys/key-kp-decimal) KEY_KP_DECIMAL)
((key-kp-divide keyboard-keys/key-kp-divide) KEY_KP_DIVIDE)
((key-kp-multiply keyboard-keys/key-kp-multiply) KEY_KP_MULTIPLY)
((key-kp-subtract keyboard-keys/key-kp-subtract) KEY_KP_SUBTRACT)
((key-kp-add keyboard-keys/key-kp-add) KEY_KP_ADD)
((key-kp-enter keyboard-keys/key-kp-enter) KEY_KP_ENTER)
((key-kp-equal keyboard-keys/key-kp-equal) KEY_KP_EQUAL))
(define-foreign-enum-type (mouse-button int)
(mouse-button->int int->mouse-button)
((mouse-left-button mouse-button/mouse-left-button) MOUSE_LEFT_BUTTON)
((mouse-right-button mouse-button/mouse-right-button) MOUSE_RIGHT_BUTTON)
((mouse-middle-button mouse-button/mouse-middle-button) MOUSE_MIDDLE_BUTTON))
(define-foreign-enum-type (shader-uniform-data-type int)
(shader-uniform-data-type->int int->shader-uniform-data-type)
((uniform-float shader-uniform-data-type/uniform-float) UNIFORM_FLOAT)
((uniform-vec2 shader-uniform-data-type/uniform-vec2) UNIFORM_VEC2)
((uniform-vec3 shader-uniform-data-type/uniform-vec3) UNIFORM_VEC3)
((uniform-vec4 shader-uniform-data-type/uniform-vec4) UNIFORM_VEC4)
((uniform-int shader-uniform-data-type/uniform-int) UNIFORM_INT)
((uniform-ivec2 shader-uniform-data-type/uniform-ivec2) UNIFORM_IVEC2)
((uniform-ivec3 shader-uniform-data-type/uniform-ivec3) UNIFORM_IVEC3)
((uniform-ivec4 shader-uniform-data-type/uniform-ivec4) UNIFORM_IVEC4)
((uniform-sampler2d shader-uniform-data-type/uniform-sampler2d) UNIFORM_SAMPLER2D))
(define-foreign-enum-type (texmap-index int)
(texmap-index->int int->texmap-index)
((map-albedo texmap-index/map-albedo) MAP_ALBEDO) ; MAP_DIFFUSE
((map-metalness texmap-index/map-metalness) MAP_METALNESS) ; MAP_SPECULAR
((map-normal texmap-index/map-normal) MAP_NORMAL)
((map-roughness texmap-index/map-roughness) MAP_ROUGHNESS)
((map-occlusion texmap-index/map-occlusion) MAP_OCCLUSION)
((map-emission texmap-index/map-emission) MAP_EMISSION)
((map-height texmap-index/map-height) MAP_HEIGHT)
((map-cubemap texmap-index/map-cubemap) MAP_CUBEMAP) ; NOTE: Uses GL_TEXTURE_CUBE_MAP
((map-irradiance texmap-index/map-irradiance) MAP_IRRADIANCE) ; NOTE: Uses GL_TEXTURE_CUBE_MAP
((map-prefilter texmap-index/map-prefilter) MAP_PREFILTER) ; NOTE: Uses GL_TEXTURE_CUBE_MAP
((map-brdf texmap-index/map-brdf) MAP_BRDF))
(define texmap-index/map-diffuse texmap-index/map-albedo)
(define texmap-index/map-specular texmap-index/map-metalness)
(define-foreign-enum-type (trace-log-type unsigned-short)
(trace-log-type->unsigned-short unsigned-short->trace-log-type)
((log-all trace-log-type/log-all) LOG_ALL)
((log-trace trace-log-type/log-trace) LOG_TRACE)
((log-debug trace-log-type/log-debug) LOG_DEBUG)
((log-info trace-log-type/log-info) LOG_INFO)
((log-warning trace-log-type/log-warning) LOG_WARNING)
((log-error trace-log-type/log-error) LOG_ERROR)
((log-fatal trace-log-type/log-fatal) LOG_FATAL)
((log-none trace-log-type/log-none) LOG_NONE))
(define-foreign-record-type (bounding-box BoundingBox))
(define-foreign-record-type (camera Camera))
(define-foreign-record-type (color Color))
(define-foreign-record-type (image Image))
(define-foreign-record-type (material Material))
(define-foreign-record-type (material-map MaterialMap))
(define-foreign-record-type (matrix Matrix))
(define-foreign-record-type (mesh Mesh))
(define-foreign-record-type (model Model))
(define-foreign-record-type (ray Ray))
(define-foreign-record-type (rectangle Rectangle))
(define-foreign-record-type (render-texture-2d RenderTexture2D))
(define-foreign-record-type (shader Shader))
(define-foreign-record-type (sound Sound))
(define-foreign-record-type (texture-2d Texture2D))
(define-foreign-record-type (vector-2 Vector2))
(define-foreign-record-type (vector-3 Vector3))