-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
raylib.v
3778 lines (3202 loc) · 98.6 KB
/
raylib.v
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
module raylibv
// start enums
// Builtin colors
pub const lightgray = Color{200, 200, 200, 255}
pub const gray = Color{130, 130, 130, 255}
pub const darkgray = Color{80, 80, 80, 255}
pub const yellow = Color{253, 249, 0, 255}
pub const gold = Color{255, 203, 0, 255}
pub const orange = Color{255, 161, 0, 255}
pub const pink = Color{255, 109, 194, 255}
pub const red = Color{230, 41, 55, 255}
pub const maroon = Color{190, 33, 55, 255}
pub const green = Color{0, 228, 48, 255}
pub const lime = Color{0, 158, 47, 255}
pub const darkgreen = Color{0, 117, 44, 255}
pub const skyblue = Color{102, 191, 255, 255}
pub const blue = Color{0, 121, 241, 255}
pub const darkblue = Color{0, 82, 172, 255}
pub const purple = Color{200, 122, 255, 255}
pub const violet = Color{135, 60, 190, 255}
pub const darkpurple = Color{112, 31, 126, 255}
pub const beige = Color{211, 176, 131, 255}
pub const brown = Color{127, 106, 79, 255}
pub const darkbrown = Color{76, 63, 47, 255}
pub const white = Color{255, 255, 255, 255}
pub const black = Color{0, 0, 0, 255}
pub const blank = Color{0, 0, 0, 0}
pub const magenta = Color{255, 0, 255, 255}
pub const raywhite = Color{245, 245, 245, 255}
// ConfigFlags
pub const flag_vsync_hint = 64
pub const flag_fullscreen_mode = 2
pub const flag_window_resizable = 4
pub const flag_window_undecorated = 8
pub const flag_window_hidden = 128
pub const flag_window_minimized = 512
pub const flag_window_maximized = 1024
pub const flag_window_unfocused = 2048
pub const flag_window_topmost = 4096
pub const flag_window_always_run = 256
pub const flag_window_transparent = 16
pub const flag_window_highdpi = 8192
pub const flag_window_mouse_passthrough = 16384
pub const flag_msaa_4x_hint = 32
pub const flag_interlaced_hint = 65536
// TraceLogLevel
pub const log_all = 0
pub const log_trace = 1
pub const log_debug = 2
pub const log_info = 3
pub const log_warning = 4
pub const log_error = 5
pub const log_fatal = 6
pub const log_none = 7
// KeyboardKey
pub const key_null = 0
pub const key_apostrophe = 39
pub const key_comma = 44
pub const key_minus = 45
pub const key_period = 46
pub const key_slash = 47
pub const key_zero = 48
pub const key_one = 49
pub const key_two = 50
pub const key_three = 51
pub const key_four = 52
pub const key_five = 53
pub const key_six = 54
pub const key_seven = 55
pub const key_eight = 56
pub const key_nine = 57
pub const key_semicolon = 59
pub const key_equal = 61
pub const key_a = 65
pub const key_b = 66
pub const key_c = 67
pub const key_d = 68
pub const key_e = 69
pub const key_f = 70
pub const key_g = 71
pub const key_h = 72
pub const key_i = 73
pub const key_j = 74
pub const key_k = 75
pub const key_l = 76
pub const key_m = 77
pub const key_n = 78
pub const key_o = 79
pub const key_p = 80
pub const key_q = 81
pub const key_r = 82
pub const key_s = 83
pub const key_t = 84
pub const key_u = 85
pub const key_v = 86
pub const key_w = 87
pub const key_x = 88
pub const key_y = 89
pub const key_z = 90
pub const key_left_bracket = 91
pub const key_backslash = 92
pub const key_right_bracket = 93
pub const key_grave = 96
pub const key_space = 32
pub const key_escape = 256
pub const key_enter = 257
pub const key_tab = 258
pub const key_backspace = 259
pub const key_insert = 260
pub const key_delete = 261
pub const key_right = 262
pub const key_left = 263
pub const key_down = 264
pub const key_up = 265
pub const key_page_up = 266
pub const key_page_down = 267
pub const key_home = 268
pub const key_end = 269
pub const key_caps_lock = 280
pub const key_scroll_lock = 281
pub const key_num_lock = 282
pub const key_print_screen = 283
pub const key_pause = 284
pub const key_f1 = 290
pub const key_f2 = 291
pub const key_f3 = 292
pub const key_f4 = 293
pub const key_f5 = 294
pub const key_f6 = 295
pub const key_f7 = 296
pub const key_f8 = 297
pub const key_f9 = 298
pub const key_f10 = 299
pub const key_f11 = 300
pub const key_f12 = 301
pub const key_left_shift = 340
pub const key_left_control = 341
pub const key_left_alt = 342
pub const key_left_super = 343
pub const key_right_shift = 344
pub const key_right_control = 345
pub const key_right_alt = 346
pub const key_right_super = 347
pub const key_kb_menu = 348
pub const key_kp_0 = 320
pub const key_kp_1 = 321
pub const key_kp_2 = 322
pub const key_kp_3 = 323
pub const key_kp_4 = 324
pub const key_kp_5 = 325
pub const key_kp_6 = 326
pub const key_kp_7 = 327
pub const key_kp_8 = 328
pub const key_kp_9 = 329
pub const key_kp_decimal = 330
pub const key_kp_divide = 331
pub const key_kp_multiply = 332
pub const key_kp_subtract = 333
pub const key_kp_add = 334
pub const key_kp_enter = 335
pub const key_kp_equal = 336
pub const key_back = 4
pub const key_menu = 82
pub const key_volume_up = 24
pub const key_volume_down = 25
// MouseButton
pub const mouse_button_left = 0
pub const mouse_button_right = 1
pub const mouse_button_middle = 2
pub const mouse_button_side = 3
pub const mouse_button_extra = 4
pub const mouse_button_forward = 5
pub const mouse_button_back = 6
// MouseCursor
pub const mouse_cursor_default = 0
pub const mouse_cursor_arrow = 1
pub const mouse_cursor_ibeam = 2
pub const mouse_cursor_crosshair = 3
pub const mouse_cursor_pointing_hand = 4
pub const mouse_cursor_resize_ew = 5
pub const mouse_cursor_resize_ns = 6
pub const mouse_cursor_resize_nwse = 7
pub const mouse_cursor_resize_nesw = 8
pub const mouse_cursor_resize_all = 9
pub const mouse_cursor_not_allowed = 10
// GamepadButton
pub const gamepad_button_unknown = 0
pub const gamepad_button_left_face_up = 1
pub const gamepad_button_left_face_right = 2
pub const gamepad_button_left_face_down = 3
pub const gamepad_button_left_face_left = 4
pub const gamepad_button_right_face_up = 5
pub const gamepad_button_right_face_right = 6
pub const gamepad_button_right_face_down = 7
pub const gamepad_button_right_face_left = 8
pub const gamepad_button_left_trigger_1 = 9
pub const gamepad_button_left_trigger_2 = 10
pub const gamepad_button_right_trigger_1 = 11
pub const gamepad_button_right_trigger_2 = 12
pub const gamepad_button_middle_left = 13
pub const gamepad_button_middle = 14
pub const gamepad_button_middle_right = 15
pub const gamepad_button_left_thumb = 16
pub const gamepad_button_right_thumb = 17
// GamepadAxis
pub const gamepad_axis_left_x = 0
pub const gamepad_axis_left_y = 1
pub const gamepad_axis_right_x = 2
pub const gamepad_axis_right_y = 3
pub const gamepad_axis_left_trigger = 4
pub const gamepad_axis_right_trigger = 5
// MaterialMapIndex
pub const material_map_albedo = 0
pub const material_map_metalness = 1
pub const material_map_normal = 2
pub const material_map_roughness = 3
pub const material_map_occlusion = 4
pub const material_map_emission = 5
pub const material_map_height = 6
pub const material_map_cubemap = 7
pub const material_map_irradiance = 8
pub const material_map_prefilter = 9
pub const material_map_brdf = 10
// ShaderLocationIndex
pub const shader_loc_vertex_position = 0
pub const shader_loc_vertex_texcoord01 = 1
pub const shader_loc_vertex_texcoord02 = 2
pub const shader_loc_vertex_normal = 3
pub const shader_loc_vertex_tangent = 4
pub const shader_loc_vertex_color = 5
pub const shader_loc_matrix_mvp = 6
pub const shader_loc_matrix_view = 7
pub const shader_loc_matrix_projection = 8
pub const shader_loc_matrix_model = 9
pub const shader_loc_matrix_normal = 10
pub const shader_loc_vector_view = 11
pub const shader_loc_color_diffuse = 12
pub const shader_loc_color_specular = 13
pub const shader_loc_color_ambient = 14
pub const shader_loc_map_albedo = 15
pub const shader_loc_map_metalness = 16
pub const shader_loc_map_normal = 17
pub const shader_loc_map_roughness = 18
pub const shader_loc_map_occlusion = 19
pub const shader_loc_map_emission = 20
pub const shader_loc_map_height = 21
pub const shader_loc_map_cubemap = 22
pub const shader_loc_map_irradiance = 23
pub const shader_loc_map_prefilter = 24
pub const shader_loc_map_brdf = 25
// ShaderUniformDataType
pub const shader_uniform_float = 0
pub const shader_uniform_vec2 = 1
pub const shader_uniform_vec3 = 2
pub const shader_uniform_vec4 = 3
pub const shader_uniform_int = 4
pub const shader_uniform_ivec2 = 5
pub const shader_uniform_ivec3 = 6
pub const shader_uniform_ivec4 = 7
pub const shader_uniform_sampler2d = 8
// ShaderAttributeDataType
pub const shader_attrib_float = 0
pub const shader_attrib_vec2 = 1
pub const shader_attrib_vec3 = 2
pub const shader_attrib_vec4 = 3
// PixelFormat
pub const pixelformat_uncompressed_grayscale = 1
pub const pixelformat_uncompressed_gray_alpha = 2
pub const pixelformat_uncompressed_r5g6b5 = 3
pub const pixelformat_uncompressed_r8g8b8 = 4
pub const pixelformat_uncompressed_r5g5b5a1 = 5
pub const pixelformat_uncompressed_r4g4b4a4 = 6
pub const pixelformat_uncompressed_r8g8b8a8 = 7
pub const pixelformat_uncompressed_r32 = 8
pub const pixelformat_uncompressed_r32g32b32 = 9
pub const pixelformat_uncompressed_r32g32b32a32 = 10
pub const pixelformat_compressed_dxt1_rgb = 11
pub const pixelformat_compressed_dxt1_rgba = 12
pub const pixelformat_compressed_dxt3_rgba = 13
pub const pixelformat_compressed_dxt5_rgba = 14
pub const pixelformat_compressed_etc1_rgb = 15
pub const pixelformat_compressed_etc2_rgb = 16
pub const pixelformat_compressed_etc2_eac_rgba = 17
pub const pixelformat_compressed_pvrt_rgb = 18
pub const pixelformat_compressed_pvrt_rgba = 19
pub const pixelformat_compressed_astc_4x4_rgba = 20
pub const pixelformat_compressed_astc_8x8_rgba = 21
// TextureFilter
pub const texture_filter_point = 0
pub const texture_filter_bilinear = 1
pub const texture_filter_trilinear = 2
pub const texture_filter_anisotropic_4x = 3
pub const texture_filter_anisotropic_8x = 4
pub const texture_filter_anisotropic_16x = 5
// TextureWrap
pub const texture_wrap_repeat = 0
pub const texture_wrap_clamp = 1
pub const texture_wrap_mirror_repeat = 2
pub const texture_wrap_mirror_clamp = 3
// CubemapLayout
pub const cubemap_layout_auto_detect = 0
pub const cubemap_layout_line_vertical = 1
pub const cubemap_layout_line_horizontal = 2
pub const cubemap_layout_cross_three_by_four = 3
pub const cubemap_layout_cross_four_by_three = 4
pub const cubemap_layout_panorama = 5
// FontType
pub const font_default = 0
pub const font_bitmap = 1
pub const font_sdf = 2
// BlendMode
pub const blend_alpha = 0
pub const blend_additive = 1
pub const blend_multiplied = 2
pub const blend_add_colors = 3
pub const blend_subtract_colors = 4
pub const blend_alpha_premultiply = 5
pub const blend_custom = 6
// Gesture
pub const gesture_none = 0
pub const gesture_tap = 1
pub const gesture_doubletap = 2
pub const gesture_hold = 4
pub const gesture_drag = 8
pub const gesture_swipe_right = 16
pub const gesture_swipe_left = 32
pub const gesture_swipe_up = 64
pub const gesture_swipe_down = 128
pub const gesture_pinch_in = 256
pub const gesture_pinch_out = 512
// CameraMode
pub const camera_custom = 0
pub const camera_free = 1
pub const camera_orbital = 2
pub const camera_first_person = 3
pub const camera_third_person = 4
// CameraProjection
pub const camera_perspective = 0
pub const camera_orthographic = 1
// NPatchLayout
pub const npatch_nine_patch = 0
pub const npatch_three_patch_vertical = 1
pub const npatch_three_patch_horizontal = 2
// end enums
// start structs
@[typedef]
struct C.Vector2 {
pub mut:
x f32
y f32
}
pub type Vector2 = C.Vector2
@[typedef]
struct C.Vector3 {
pub mut:
x f32
y f32
z f32
}
pub type Vector3 = C.Vector3
@[typedef]
struct C.Vector4 {
pub mut:
x f32
y f32
z f32
w f32
}
pub type Vector4 = C.Vector4
@[typedef]
struct C.Matrix {
pub mut:
m0 f32
m4 f32
m8 f32
m12 f32
m1 f32
m5 f32
m9 f32
m13 f32
m2 f32
m6 f32
m10 f32
m14 f32
m3 f32
m7 f32
m11 f32
m15 f32
}
pub type Matrix = C.Matrix
@[typedef]
struct C.Color {
pub mut:
r u8
g u8
b u8
a u8
}
pub type Color = C.Color
@[typedef]
struct C.Rectangle {
pub mut:
x f32
y f32
width f32
height f32
}
pub type Rectangle = C.Rectangle
@[typedef]
struct C.Image {
pub mut:
data voidptr
width int
height int
mipmaps int
format int
}
pub type Image = C.Image
@[typedef]
struct C.Texture {
pub mut:
id u32
width int
height int
mipmaps int
format int
}
pub type Texture = C.Texture
@[typedef]
struct C.RenderTexture {
pub mut:
id u32
texture Texture
depth Texture
}
pub type RenderTexture = C.RenderTexture
@[typedef]
struct C.NPatchInfo {
pub mut:
source Rectangle
left int
top int
right int
bottom int
layout int
}
pub type NPatchInfo = C.NPatchInfo
@[typedef]
struct C.GlyphInfo {
pub mut:
value int
offsetX int
offsetY int
advanceX int
image Image
}
pub type GlyphInfo = C.GlyphInfo
@[typedef]
struct C.Font {
pub mut:
baseSize int
glyphCount int
glyphPadding int
texture Texture2D
recs &Rectangle
glyphs &GlyphInfo
}
pub type Font = C.Font
@[typedef]
struct C.Camera3D {
pub mut:
position Vector3
target Vector3
up Vector3
fovy f32
projection int
}
pub type Camera3D = C.Camera3D
@[typedef]
struct C.Camera2D {
pub mut:
offset Vector2
target Vector2
rotation f32
zoom f32
}
pub type Camera2D = C.Camera2D
@[typedef]
struct C.Mesh {
pub mut:
vertexCount int
triangleCount int
vertices &f32
texcoords &f32
texcoords2 &f32
normals &f32
tangents &f32
colors &u8
indices &u16
animVertices &f32
animNormals &f32
boneIds &u8
boneWeights &f32
vaoId u32
vboId &u32
}
pub type Mesh = C.Mesh
@[typedef]
struct C.Shader {
pub mut:
id u32
locs &int
}
pub type Shader = C.Shader
@[typedef]
struct C.MaterialMap {
pub mut:
texture Texture2D
color Color
value f32
}
pub type MaterialMap = C.MaterialMap
@[typedef]
struct C.Material {
pub mut:
shader Shader
maps &MaterialMap
params [4]f32
}
pub type Material = C.Material
@[typedef]
struct C.Transform {
pub mut:
translation Vector3
rotation Quaternion
scale Vector3
}
pub type Transform = C.Transform
@[typedef]
struct C.BoneInfo {
pub mut:
name [32]i8
parent int
}
pub type BoneInfo = C.BoneInfo
@[typedef]
struct C.Model {
pub mut:
transform Matrix
meshCount int
materialCount int
meshes &Mesh
materials &Material
meshMaterial &int
boneCount int
bones &BoneInfo
bindPose &Transform
}
pub type Model = C.Model
@[typedef]
struct C.ModelAnimation {
pub mut:
boneCount int
frameCount int
bones &BoneInfo
framePoses &&Transform
}
pub type ModelAnimation = C.ModelAnimation
@[typedef]
struct C.Ray {
pub mut:
position Vector3
direction Vector3
}
pub type Ray = C.Ray
@[typedef]
struct C.RayCollision {
pub mut:
hit bool
distance f32
point Vector3
normal Vector3
}
pub type RayCollision = C.RayCollision
@[typedef]
struct C.BoundingBox {
pub mut:
min Vector3
max Vector3
}
pub type BoundingBox = C.BoundingBox
@[typedef]
struct C.Wave {
pub mut:
frameCount u32
sampleRate u32
sampleSize u32
channels u32
data voidptr
}
pub type Wave = C.Wave
@[typedef]
struct C.AudioStream {
pub mut:
buffer voidptr
processor voidptr
sampleRate u32
sampleSize u32
channels u32
}
pub type AudioStream = C.AudioStream
@[typedef]
struct C.Sound {
pub mut:
stream AudioStream
frameCount u32
}
pub type Sound = C.Sound
@[typedef]
struct C.Music {
pub mut:
stream AudioStream
frameCount u32
looping bool
ctxType int
ctxData voidptr
}
pub type Music = C.Music
@[typedef]
struct C.VrDeviceInfo {
pub mut:
hResolution int
vResolution int
hScreenSize f32
vScreenSize f32
vScreenCenter f32
eyeToScreenDistance f32
lensSeparationDistance f32
interpupillaryDistance f32
lensDistortionValues [4]f32
chromaAbCorrection [4]f32
}
pub type VrDeviceInfo = C.VrDeviceInfo
@[typedef]
struct C.VrStereoConfig {
pub mut:
projection [2]Matrix
viewOffset [2]Matrix
leftLensCenter [2]f32
rightLensCenter [2]f32
leftScreenCenter [2]f32
rightScreenCenter [2]f32
scale [2]f32
scaleIn [2]f32
}
pub type VrStereoConfig = C.VrStereoConfig
@[typedef]
struct C.FilePathList {
pub mut:
capacity u32
count u32
paths &&i8
}
pub type FilePathList = C.FilePathList
// end structs
// start aliases
pub type Quaternion = C.Vector4
pub type Texture2D = C.Texture
pub type TextureCubemap = C.Texture
pub type RenderTexture2D = C.RenderTexture
pub type Camera = C.Camera3D
// end aliases
// start functions
fn C.InitWindow(width int, height int, title &i8)
@[inline]
pub fn init_window(width int, height int, title &i8) {
C.InitWindow(width, height, title)
}
fn C.WindowShouldClose() bool
@[inline]
pub fn window_should_close() bool {
return C.WindowShouldClose()
}
fn C.CloseWindow()
@[inline]
pub fn close_window() {
C.CloseWindow()
}
fn C.IsWindowReady() bool
@[inline]
pub fn is_window_ready() bool {
return C.IsWindowReady()
}
fn C.IsWindowFullscreen() bool
@[inline]
pub fn is_window_fullscreen() bool {
return C.IsWindowFullscreen()
}
fn C.IsWindowHidden() bool
@[inline]
pub fn is_window_hidden() bool {
return C.IsWindowHidden()
}
fn C.IsWindowMinimized() bool
@[inline]
pub fn is_window_minimized() bool {
return C.IsWindowMinimized()
}
fn C.IsWindowMaximized() bool
@[inline]
pub fn is_window_maximized() bool {
return C.IsWindowMaximized()
}
fn C.IsWindowFocused() bool
@[inline]
pub fn is_window_focused() bool {
return C.IsWindowFocused()
}
fn C.IsWindowResized() bool
@[inline]
pub fn is_window_resized() bool {
return C.IsWindowResized()
}
fn C.IsWindowState(flag u32) bool
@[inline]
pub fn is_window_state(flag u32) bool {
return C.IsWindowState(flag)
}
fn C.SetWindowState(flags u32)
@[inline]
pub fn set_window_state(flags u32) {
C.SetWindowState(flags)
}
fn C.ClearWindowState(flags u32)
@[inline]
pub fn clear_window_state(flags u32) {
C.ClearWindowState(flags)
}
fn C.ToggleFullscreen()
@[inline]
pub fn toggle_fullscreen() {
C.ToggleFullscreen()
}
fn C.MaximizeWindow()
@[inline]
pub fn maximize_window() {
C.MaximizeWindow()
}
fn C.MinimizeWindow()
@[inline]
pub fn minimize_window() {
C.MinimizeWindow()
}
fn C.RestoreWindow()
@[inline]
pub fn restore_window() {
C.RestoreWindow()
}
fn C.SetWindowIcon(image Image)
@[inline]
pub fn set_window_icon(image Image) {
C.SetWindowIcon(image)
}
fn C.SetWindowTitle(title &i8)
@[inline]
pub fn set_window_title(title &i8) {
C.SetWindowTitle(title)
}
fn C.SetWindowPosition(x int, y int)
@[inline]
pub fn set_window_position(x int, y int) {
C.SetWindowPosition(x, y)
}
fn C.SetWindowMonitor(monitor int)
@[inline]
pub fn set_window_monitor(monitor int) {
C.SetWindowMonitor(monitor)
}
fn C.SetWindowMinSize(width int, height int)
@[inline]
pub fn set_window_min_size(width int, height int) {
C.SetWindowMinSize(width, height)
}
fn C.SetWindowSize(width int, height int)
@[inline]
pub fn set_window_size(width int, height int) {
C.SetWindowSize(width, height)
}
fn C.SetWindowOpacity(opacity f32)
@[inline]
pub fn set_window_opacity(opacity f32) {
C.SetWindowOpacity(opacity)
}
fn C.GetWindowHandle() voidptr
@[inline]
pub fn get_window_handle() voidptr {
return C.GetWindowHandle()
}
fn C.GetScreenWidth() int
@[inline]
pub fn get_screen_width() int {
return C.GetScreenWidth()
}
fn C.GetScreenHeight() int
@[inline]
pub fn get_screen_height() int {
return C.GetScreenHeight()
}
fn C.GetRenderWidth() int
@[inline]
pub fn get_render_width() int {
return C.GetRenderWidth()
}
fn C.GetRenderHeight() int
@[inline]
pub fn get_render_height() int {
return C.GetRenderHeight()
}
fn C.GetMonitorCount() int
@[inline]
pub fn get_monitor_count() int {
return C.GetMonitorCount()
}
fn C.GetCurrentMonitor() int
@[inline]
pub fn get_current_monitor() int {
return C.GetCurrentMonitor()
}
fn C.GetMonitorPosition(monitor int) Vector2
@[inline]
pub fn get_monitor_position(monitor int) Vector2 {
return C.GetMonitorPosition(monitor)
}
fn C.GetMonitorWidth(monitor int) int
@[inline]
pub fn get_monitor_width(monitor int) int {
return C.GetMonitorWidth(monitor)
}
fn C.GetMonitorHeight(monitor int) int
@[inline]
pub fn get_monitor_height(monitor int) int {
return C.GetMonitorHeight(monitor)
}
fn C.GetMonitorPhysicalWidth(monitor int) int
@[inline]
pub fn get_monitor_physical_width(monitor int) int {
return C.GetMonitorPhysicalWidth(monitor)
}
fn C.GetMonitorPhysicalHeight(monitor int) int
@[inline]
pub fn get_monitor_physical_height(monitor int) int {
return C.GetMonitorPhysicalHeight(monitor)
}
fn C.GetMonitorRefreshRate(monitor int) int
@[inline]
pub fn get_monitor_refresh_rate(monitor int) int {
return C.GetMonitorRefreshRate(monitor)
}
fn C.GetWindowPosition() Vector2
@[inline]
pub fn get_window_position() Vector2 {
return C.GetWindowPosition()
}
fn C.GetWindowScaleDPI() Vector2
@[inline]
pub fn get_window_scale_dpi() Vector2 {
return C.GetWindowScaleDPI()
}
fn C.GetMonitorName(monitor int) &i8
@[inline]
pub fn get_monitor_name(monitor int) &i8 {
return C.GetMonitorName(monitor)
}
fn C.SetClipboardText(text &i8)
@[inline]
pub fn set_clipboard_text(text &i8) {
C.SetClipboardText(text)
}
fn C.GetClipboardText() &i8
@[inline]
pub fn get_clipboard_text() &i8 {
return C.GetClipboardText()
}
fn C.EnableEventWaiting()
@[inline]
pub fn enable_event_waiting() {
C.EnableEventWaiting()
}
fn C.DisableEventWaiting()
@[inline]