This repository has been archived by the owner on Jun 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathi686-w64-mingw32.jl
13768 lines (11102 loc) · 509 KB
/
i686-w64-mingw32.jl
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
using CEnum
to_c_type(t::Type) = t
to_c_type_pairs(va_list) = map(enumerate(to_c_type.(va_list))) do (ind, type)
:(va_list[$ind]::$type)
end
const __time32_t = Clong
const time_t = __time32_t
struct tm
data::NTuple{36, UInt8}
end
function Base.getproperty(x::Ptr{tm}, f::Symbol)
f === :tm_sec && return Ptr{Cint}(x + 0)
f === :tm_min && return Ptr{Cint}(x + 4)
f === :tm_hour && return Ptr{Cint}(x + 8)
f === :tm_mday && return Ptr{Cint}(x + 12)
f === :tm_mon && return Ptr{Cint}(x + 16)
f === :tm_year && return Ptr{Cint}(x + 20)
f === :tm_wday && return Ptr{Cint}(x + 24)
f === :tm_yday && return Ptr{Cint}(x + 28)
f === :tm_isdst && return Ptr{Cint}(x + 32)
return getfield(x, f)
end
function Base.getproperty(x::tm, f::Symbol)
r = Ref{tm}(x)
ptr = Base.unsafe_convert(Ptr{tm}, r)
fptr = getproperty(ptr, f)
GC.@preserve r unsafe_load(fptr)
end
function Base.setproperty!(x::Ptr{tm}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
struct ImVec4
x::Cfloat
y::Cfloat
z::Cfloat
w::Cfloat
end
function Base.getproperty(x::Ptr{ImVec4}, f::Symbol)
f === :x && return Ptr{Cfloat}(x + 0)
f === :y && return Ptr{Cfloat}(x + 4)
f === :z && return Ptr{Cfloat}(x + 8)
f === :w && return Ptr{Cfloat}(x + 12)
return getfield(x, f)
end
function Base.setproperty!(x::Ptr{ImVec4}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
const ImTextureID = Ptr{Cvoid}
# typedef void ( * ImDrawCallback ) ( const ImDrawList * parent_list , const ImDrawCmd * cmd )
const ImDrawCallback = Ptr{Cvoid}
struct ImDrawCmd
ClipRect::ImVec4
TextureId::ImTextureID
VtxOffset::Cuint
IdxOffset::Cuint
ElemCount::Cuint
UserCallback::ImDrawCallback
UserCallbackData::Ptr{Cvoid}
end
function Base.getproperty(x::Ptr{ImDrawCmd}, f::Symbol)
f === :ClipRect && return Ptr{ImVec4}(x + 0)
f === :TextureId && return Ptr{ImTextureID}(x + 16)
f === :VtxOffset && return Ptr{Cuint}(x + 20)
f === :IdxOffset && return Ptr{Cuint}(x + 24)
f === :ElemCount && return Ptr{Cuint}(x + 28)
f === :UserCallback && return Ptr{ImDrawCallback}(x + 32)
f === :UserCallbackData && return Ptr{Ptr{Cvoid}}(x + 36)
return getfield(x, f)
end
function Base.setproperty!(x::Ptr{ImDrawCmd}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
struct ImVector_ImDrawCmd
Size::Cint
Capacity::Cint
Data::Ptr{ImDrawCmd}
end
const ImDrawIdx = Cushort
struct ImVector_ImDrawIdx
Size::Cint
Capacity::Cint
Data::Ptr{ImDrawIdx}
end
struct ImDrawChannel
_CmdBuffer::ImVector_ImDrawCmd
_IdxBuffer::ImVector_ImDrawIdx
end
struct ImVec2
x::Cfloat
y::Cfloat
end
function Base.getproperty(x::Ptr{ImVec2}, f::Symbol)
f === :x && return Ptr{Cfloat}(x + 0)
f === :y && return Ptr{Cfloat}(x + 4)
return getfield(x, f)
end
function Base.setproperty!(x::Ptr{ImVec2}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
const ImU32 = Cuint
struct ImDrawVert
pos::ImVec2
uv::ImVec2
col::ImU32
end
struct ImVector_ImDrawVert
Size::Cint
Capacity::Cint
Data::Ptr{ImDrawVert}
end
const ImDrawListFlags = Cint
struct ImVector_float
Size::Cint
Capacity::Cint
Data::Ptr{Cfloat}
end
const ImWchar16 = Cushort
const ImWchar = ImWchar16
struct ImVector_ImWchar
Size::Cint
Capacity::Cint
Data::Ptr{ImWchar}
end
struct ImFontGlyph
data::NTuple{40, UInt8}
end
function Base.getproperty(x::Ptr{ImFontGlyph}, f::Symbol)
f === :Colored && return (Ptr{Cuint}(x + 0), 0, 1)
f === :Visible && return (Ptr{Cuint}(x + 0), 1, 1)
f === :Codepoint && return (Ptr{Cuint}(x + 0), 2, 30)
f === :AdvanceX && return Ptr{Cfloat}(x + 4)
f === :X0 && return Ptr{Cfloat}(x + 8)
f === :Y0 && return Ptr{Cfloat}(x + 12)
f === :X1 && return Ptr{Cfloat}(x + 16)
f === :Y1 && return Ptr{Cfloat}(x + 20)
f === :U0 && return Ptr{Cfloat}(x + 24)
f === :V0 && return Ptr{Cfloat}(x + 28)
f === :U1 && return Ptr{Cfloat}(x + 32)
f === :V1 && return Ptr{Cfloat}(x + 36)
return getfield(x, f)
end
function Base.getproperty(x::ImFontGlyph, f::Symbol)
r = Ref{ImFontGlyph}(x)
ptr = Base.unsafe_convert(Ptr{ImFontGlyph}, r)
fptr = getproperty(ptr, f)
begin
if fptr isa Ptr
return GC.@preserve(r, unsafe_load(fptr))
else
(baseptr, offset, width) = fptr
ty = eltype(baseptr)
baseptr32 = convert(Ptr{UInt32}, baseptr)
u64 = GC.@preserve(r, unsafe_load(baseptr32))
if offset + width > 32
u64 |= GC.@preserve(r, unsafe_load(baseptr32 + 4)) << 32
end
u64 = u64 >> offset & (1 << width - 1)
return u64 % ty
end
end
end
function Base.setproperty!(x::Ptr{ImFontGlyph}, f::Symbol, v)
fptr = getproperty(x, f)
if fptr isa Ptr
unsafe_store!(getproperty(x, f), v)
else
(baseptr, offset, width) = fptr
baseptr32 = convert(Ptr{UInt32}, baseptr)
u64 = unsafe_load(baseptr32)
straddle = offset + width > 32
if straddle
u64 |= unsafe_load(baseptr32 + 4) << 32
end
mask = 1 << width - 1
u64 &= ~(mask << offset)
u64 |= (unsigned(v) & mask) << offset
unsafe_store!(baseptr32, u64 & typemax(UInt32))
if straddle
unsafe_store!(baseptr32 + 4, u64 >> 32)
end
end
end
struct ImVector_ImFontGlyph
Size::Cint
Capacity::Cint
Data::Ptr{ImFontGlyph}
end
const ImFontAtlasFlags = Cint
struct ImVector_ImFontPtr
Size::Cint
Capacity::Cint
Data::Ptr{Ptr{Cvoid}} # Data::Ptr{Ptr{ImFont}}
end
function Base.getproperty(x::ImVector_ImFontPtr, f::Symbol)
f === :Data && return Ptr{Ptr{ImFont}}(getfield(x, f))
return getfield(x, f)
end
struct ImFontAtlasCustomRect
Width::Cushort
Height::Cushort
X::Cushort
Y::Cushort
GlyphID::Cuint
GlyphAdvanceX::Cfloat
GlyphOffset::ImVec2
Font::Ptr{Cvoid} # Font::Ptr{ImFont}
end
function Base.getproperty(x::ImFontAtlasCustomRect, f::Symbol)
f === :Font && return Ptr{ImFont}(getfield(x, f))
return getfield(x, f)
end
struct ImVector_ImFontAtlasCustomRect
Size::Cint
Capacity::Cint
Data::Ptr{ImFontAtlasCustomRect}
end
struct ImFontConfig
FontData::Ptr{Cvoid}
FontDataSize::Cint
FontDataOwnedByAtlas::Bool
FontNo::Cint
SizePixels::Cfloat
OversampleH::Cint
OversampleV::Cint
PixelSnapH::Bool
GlyphExtraSpacing::ImVec2
GlyphOffset::ImVec2
GlyphRanges::Ptr{ImWchar}
GlyphMinAdvanceX::Cfloat
GlyphMaxAdvanceX::Cfloat
MergeMode::Bool
FontBuilderFlags::Cuint
RasterizerMultiply::Cfloat
EllipsisChar::ImWchar
Name::NTuple{40, Cchar}
DstFont::Ptr{Cvoid} # DstFont::Ptr{ImFont}
end
function Base.getproperty(x::ImFontConfig, f::Symbol)
f === :DstFont && return Ptr{ImFont}(getfield(x, f))
return getfield(x, f)
end
function Base.getproperty(x::Ptr{ImFontConfig}, f::Symbol)
f === :FontData && return Ptr{Ptr{Cvoid}}(x + 0)
f === :FontDataSize && return Ptr{Cint}(x + 4)
f === :FontDataOwnedByAtlas && return Ptr{Bool}(x + 8)
f === :FontNo && return Ptr{Cint}(x + 12)
f === :SizePixels && return Ptr{Cfloat}(x + 16)
f === :OversampleH && return Ptr{Cint}(x + 20)
f === :OversampleV && return Ptr{Cint}(x + 24)
f === :PixelSnapH && return Ptr{Bool}(x + 28)
f === :GlyphExtraSpacing && return Ptr{ImVec2}(x + 32)
f === :GlyphOffset && return Ptr{ImVec2}(x + 40)
f === :GlyphRanges && return Ptr{Ptr{ImWchar}}(x + 48)
f === :GlyphMinAdvanceX && return Ptr{Cfloat}(x + 52)
f === :GlyphMaxAdvanceX && return Ptr{Cfloat}(x + 56)
f === :MergeMode && return Ptr{Bool}(x + 60)
f === :FontBuilderFlags && return Ptr{Cuint}(x + 64)
f === :RasterizerMultiply && return Ptr{Cfloat}(x + 68)
f === :EllipsisChar && return Ptr{ImWchar}(x + 72)
f === :Name && return Ptr{NTuple{40, Cchar}}(x + 74)
f === :DstFont && return Ptr{Ptr{ImFont}}(x + 116)
return getfield(x, f)
end
function Base.setproperty!(x::Ptr{ImFontConfig}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
struct ImVector_ImFontConfig
Size::Cint
Capacity::Cint
Data::Ptr{ImFontConfig}
end
struct ImFontBuilderIO
FontBuilder_Build::Ptr{Cvoid}
end
struct ImFontAtlas
Flags::ImFontAtlasFlags
TexID::ImTextureID
TexDesiredWidth::Cint
TexGlyphPadding::Cint
Locked::Bool
UserData::Ptr{Cvoid}
TexReady::Bool
TexPixelsUseColors::Bool
TexPixelsAlpha8::Ptr{Cuchar}
TexPixelsRGBA32::Ptr{Cuint}
TexWidth::Cint
TexHeight::Cint
TexUvScale::ImVec2
TexUvWhitePixel::ImVec2
Fonts::ImVector_ImFontPtr
CustomRects::ImVector_ImFontAtlasCustomRect
ConfigData::ImVector_ImFontConfig
TexUvLines::NTuple{64, ImVec4}
FontBuilderIO::Ptr{ImFontBuilderIO}
FontBuilderFlags::Cuint
PackIdMouseCursors::Cint
PackIdLines::Cint
end
function Base.getproperty(x::Ptr{ImFontAtlas}, f::Symbol)
f === :Flags && return Ptr{ImFontAtlasFlags}(x + 0)
f === :TexID && return Ptr{ImTextureID}(x + 4)
f === :TexDesiredWidth && return Ptr{Cint}(x + 8)
f === :TexGlyphPadding && return Ptr{Cint}(x + 12)
f === :Locked && return Ptr{Bool}(x + 16)
f === :UserData && return Ptr{Ptr{Cvoid}}(x + 20)
f === :TexReady && return Ptr{Bool}(x + 24)
f === :TexPixelsUseColors && return Ptr{Bool}(x + 25)
f === :TexPixelsAlpha8 && return Ptr{Ptr{Cuchar}}(x + 28)
f === :TexPixelsRGBA32 && return Ptr{Ptr{Cuint}}(x + 32)
f === :TexWidth && return Ptr{Cint}(x + 36)
f === :TexHeight && return Ptr{Cint}(x + 40)
f === :TexUvScale && return Ptr{ImVec2}(x + 44)
f === :TexUvWhitePixel && return Ptr{ImVec2}(x + 52)
f === :Fonts && return Ptr{ImVector_ImFontPtr}(x + 60)
f === :CustomRects && return Ptr{ImVector_ImFontAtlasCustomRect}(x + 72)
f === :ConfigData && return Ptr{ImVector_ImFontConfig}(x + 84)
f === :TexUvLines && return Ptr{NTuple{64, ImVec4}}(x + 96)
f === :FontBuilderIO && return Ptr{Ptr{ImFontBuilderIO}}(x + 1120)
f === :FontBuilderFlags && return Ptr{Cuint}(x + 1124)
f === :PackIdMouseCursors && return Ptr{Cint}(x + 1128)
f === :PackIdLines && return Ptr{Cint}(x + 1132)
return getfield(x, f)
end
function Base.setproperty!(x::Ptr{ImFontAtlas}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
const ImU8 = Cuchar
struct ImFont
IndexAdvanceX::ImVector_float
FallbackAdvanceX::Cfloat
FontSize::Cfloat
IndexLookup::ImVector_ImWchar
Glyphs::ImVector_ImFontGlyph
FallbackGlyph::Ptr{ImFontGlyph}
ContainerAtlas::Ptr{ImFontAtlas}
ConfigData::Ptr{ImFontConfig}
ConfigDataCount::Cshort
FallbackChar::ImWchar
EllipsisChar::ImWchar
EllipsisCharCount::Cshort
EllipsisWidth::Cfloat
EllipsisCharStep::Cfloat
DirtyLookupTables::Bool
Scale::Cfloat
Ascent::Cfloat
Descent::Cfloat
MetricsTotalSurface::Cint
Used4kPagesMap::NTuple{2, ImU8}
end
struct ImVector_ImVec2
Size::Cint
Capacity::Cint
Data::Ptr{ImVec2}
end
struct ImDrawListSharedData
TexUvWhitePixel::ImVec2
Font::Ptr{ImFont}
FontSize::Cfloat
CurveTessellationTol::Cfloat
CircleSegmentMaxError::Cfloat
ClipRectFullscreen::ImVec4
InitialFlags::ImDrawListFlags
TempBuffer::ImVector_ImVec2
ArcFastVtx::NTuple{48, ImVec2}
ArcFastRadiusCutoff::Cfloat
CircleSegmentCounts::NTuple{64, ImU8}
TexUvLines::Ptr{ImVec4}
end
struct ImVector_ImVec4
Size::Cint
Capacity::Cint
Data::Ptr{ImVec4}
end
struct ImVector_ImTextureID
Size::Cint
Capacity::Cint
Data::Ptr{ImTextureID}
end
struct ImDrawCmdHeader
ClipRect::ImVec4
TextureId::ImTextureID
VtxOffset::Cuint
end
struct ImVector_ImDrawChannel
Size::Cint
Capacity::Cint
Data::Ptr{ImDrawChannel}
end
struct ImDrawListSplitter
_Current::Cint
_Count::Cint
_Channels::ImVector_ImDrawChannel
end
struct ImDrawList
CmdBuffer::ImVector_ImDrawCmd
IdxBuffer::ImVector_ImDrawIdx
VtxBuffer::ImVector_ImDrawVert
Flags::ImDrawListFlags
_VtxCurrentIdx::Cuint
_Data::Ptr{ImDrawListSharedData}
_OwnerName::Ptr{Cchar}
_VtxWritePtr::Ptr{ImDrawVert}
_IdxWritePtr::Ptr{ImDrawIdx}
_ClipRectStack::ImVector_ImVec4
_TextureIdStack::ImVector_ImTextureID
_Path::ImVector_ImVec2
_CmdHeader::ImDrawCmdHeader
_Splitter::ImDrawListSplitter
_FringeScale::Cfloat
end
function Base.getproperty(x::Ptr{ImDrawList}, f::Symbol)
f === :CmdBuffer && return Ptr{ImVector_ImDrawCmd}(x + 0)
f === :IdxBuffer && return Ptr{ImVector_ImDrawIdx}(x + 12)
f === :VtxBuffer && return Ptr{ImVector_ImDrawVert}(x + 24)
f === :Flags && return Ptr{ImDrawListFlags}(x + 36)
f === :_VtxCurrentIdx && return Ptr{Cuint}(x + 40)
f === :_Data && return Ptr{Ptr{ImDrawListSharedData}}(x + 44)
f === :_OwnerName && return Ptr{Ptr{Cchar}}(x + 48)
f === :_VtxWritePtr && return Ptr{Ptr{ImDrawVert}}(x + 52)
f === :_IdxWritePtr && return Ptr{Ptr{ImDrawIdx}}(x + 56)
f === :_ClipRectStack && return Ptr{ImVector_ImVec4}(x + 60)
f === :_TextureIdStack && return Ptr{ImVector_ImTextureID}(x + 72)
f === :_Path && return Ptr{ImVector_ImVec2}(x + 84)
f === :_CmdHeader && return Ptr{ImDrawCmdHeader}(x + 96)
f === :_Splitter && return Ptr{ImDrawListSplitter}(x + 120)
f === :_FringeScale && return Ptr{Cfloat}(x + 140)
return getfield(x, f)
end
function Base.setproperty!(x::Ptr{ImDrawList}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
const ImGuiID = Cuint
const ImGuiViewportFlags = Cint
struct ImGuiViewport
ID::ImGuiID
Flags::ImGuiViewportFlags
Pos::ImVec2
Size::ImVec2
WorkPos::ImVec2
WorkSize::ImVec2
DpiScale::Cfloat
ParentViewportId::ImGuiID
DrawData::Ptr{Cvoid} # DrawData::Ptr{ImDrawData}
RendererUserData::Ptr{Cvoid}
PlatformUserData::Ptr{Cvoid}
PlatformHandle::Ptr{Cvoid}
PlatformHandleRaw::Ptr{Cvoid}
PlatformWindowCreated::Bool
PlatformRequestMove::Bool
PlatformRequestResize::Bool
PlatformRequestClose::Bool
end
function Base.getproperty(x::ImGuiViewport, f::Symbol)
f === :DrawData && return Ptr{ImDrawData}(getfield(x, f))
return getfield(x, f)
end
function Base.getproperty(x::Ptr{ImGuiViewport}, f::Symbol)
f === :ID && return Ptr{ImGuiID}(x + 0)
f === :Flags && return Ptr{ImGuiViewportFlags}(x + 4)
f === :Pos && return Ptr{ImVec2}(x + 8)
f === :Size && return Ptr{ImVec2}(x + 16)
f === :WorkPos && return Ptr{ImVec2}(x + 24)
f === :WorkSize && return Ptr{ImVec2}(x + 32)
f === :DpiScale && return Ptr{Cfloat}(x + 40)
f === :ParentViewportId && return Ptr{ImGuiID}(x + 44)
f === :DrawData && return Ptr{Ptr{ImDrawData}}(x + 48)
f === :RendererUserData && return Ptr{Ptr{Cvoid}}(x + 52)
f === :PlatformUserData && return Ptr{Ptr{Cvoid}}(x + 56)
f === :PlatformHandle && return Ptr{Ptr{Cvoid}}(x + 60)
f === :PlatformHandleRaw && return Ptr{Ptr{Cvoid}}(x + 64)
f === :PlatformWindowCreated && return Ptr{Bool}(x + 68)
f === :PlatformRequestMove && return Ptr{Bool}(x + 69)
f === :PlatformRequestResize && return Ptr{Bool}(x + 70)
f === :PlatformRequestClose && return Ptr{Bool}(x + 71)
return getfield(x, f)
end
function Base.setproperty!(x::Ptr{ImGuiViewport}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
struct ImDrawData
Valid::Bool
CmdListsCount::Cint
TotalIdxCount::Cint
TotalVtxCount::Cint
CmdLists::Ptr{Ptr{ImDrawList}}
DisplayPos::ImVec2
DisplaySize::ImVec2
FramebufferScale::ImVec2
OwnerViewport::Ptr{ImGuiViewport}
end
function Base.getproperty(x::Ptr{ImDrawData}, f::Symbol)
f === :Valid && return Ptr{Bool}(x + 0)
f === :CmdListsCount && return Ptr{Cint}(x + 4)
f === :TotalIdxCount && return Ptr{Cint}(x + 8)
f === :TotalVtxCount && return Ptr{Cint}(x + 12)
f === :CmdLists && return Ptr{Ptr{Ptr{ImDrawList}}}(x + 16)
f === :DisplayPos && return Ptr{ImVec2}(x + 20)
f === :DisplaySize && return Ptr{ImVec2}(x + 28)
f === :FramebufferScale && return Ptr{ImVec2}(x + 36)
f === :OwnerViewport && return Ptr{Ptr{ImGuiViewport}}(x + 44)
return getfield(x, f)
end
function Base.setproperty!(x::Ptr{ImDrawData}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
struct ImVector_ImU32
Size::Cint
Capacity::Cint
Data::Ptr{ImU32}
end
struct ImFontGlyphRangesBuilder
UsedChars::ImVector_ImU32
end
struct ImColor
Value::ImVec4
end
const ImGuiConfigFlags = Cint
const ImGuiBackendFlags = Cint
const ImGuiKeyChord = Cint
struct ImGuiKeyData
Down::Bool
DownDuration::Cfloat
DownDurationPrev::Cfloat
AnalogValue::Cfloat
end
const ImU16 = Cushort
const ImS8 = Int8
struct ImGuiIO
ConfigFlags::ImGuiConfigFlags
BackendFlags::ImGuiBackendFlags
DisplaySize::ImVec2
DeltaTime::Cfloat
IniSavingRate::Cfloat
IniFilename::Ptr{Cchar}
LogFilename::Ptr{Cchar}
MouseDoubleClickTime::Cfloat
MouseDoubleClickMaxDist::Cfloat
MouseDragThreshold::Cfloat
KeyRepeatDelay::Cfloat
KeyRepeatRate::Cfloat
HoverDelayNormal::Cfloat
HoverDelayShort::Cfloat
UserData::Ptr{Cvoid}
Fonts::Ptr{ImFontAtlas}
FontGlobalScale::Cfloat
FontAllowUserScaling::Bool
FontDefault::Ptr{ImFont}
DisplayFramebufferScale::ImVec2
ConfigDockingNoSplit::Bool
ConfigDockingWithShift::Bool
ConfigDockingAlwaysTabBar::Bool
ConfigDockingTransparentPayload::Bool
ConfigViewportsNoAutoMerge::Bool
ConfigViewportsNoTaskBarIcon::Bool
ConfigViewportsNoDecoration::Bool
ConfigViewportsNoDefaultParent::Bool
MouseDrawCursor::Bool
ConfigMacOSXBehaviors::Bool
ConfigInputTrickleEventQueue::Bool
ConfigInputTextCursorBlink::Bool
ConfigInputTextEnterKeepActive::Bool
ConfigDragClickToInputText::Bool
ConfigWindowsResizeFromEdges::Bool
ConfigWindowsMoveFromTitleBarOnly::Bool
ConfigMemoryCompactTimer::Cfloat
ConfigDebugBeginReturnValueOnce::Bool
ConfigDebugBeginReturnValueLoop::Bool
BackendPlatformName::Ptr{Cchar}
BackendRendererName::Ptr{Cchar}
BackendPlatformUserData::Ptr{Cvoid}
BackendRendererUserData::Ptr{Cvoid}
BackendLanguageUserData::Ptr{Cvoid}
GetClipboardTextFn::Ptr{Cvoid}
SetClipboardTextFn::Ptr{Cvoid}
ClipboardUserData::Ptr{Cvoid}
SetPlatformImeDataFn::Ptr{Cvoid}
_UnusedPadding::Ptr{Cvoid}
WantCaptureMouse::Bool
WantCaptureKeyboard::Bool
WantTextInput::Bool
WantSetMousePos::Bool
WantSaveIniSettings::Bool
NavActive::Bool
NavVisible::Bool
Framerate::Cfloat
MetricsRenderVertices::Cint
MetricsRenderIndices::Cint
MetricsRenderWindows::Cint
MetricsActiveWindows::Cint
MetricsActiveAllocations::Cint
MouseDelta::ImVec2
KeyMap::NTuple{652, Cint}
KeysDown::NTuple{652, Bool}
NavInputs::NTuple{16, Cfloat}
Ctx::Ptr{Cvoid} # Ctx::Ptr{ImGuiContext}
MousePos::ImVec2
MouseDown::NTuple{5, Bool}
MouseWheel::Cfloat
MouseWheelH::Cfloat
MouseHoveredViewport::ImGuiID
KeyCtrl::Bool
KeyShift::Bool
KeyAlt::Bool
KeySuper::Bool
KeyMods::ImGuiKeyChord
KeysData::NTuple{652, ImGuiKeyData}
WantCaptureMouseUnlessPopupClose::Bool
MousePosPrev::ImVec2
MouseClickedPos::NTuple{5, ImVec2}
MouseClickedTime::NTuple{5, Cdouble}
MouseClicked::NTuple{5, Bool}
MouseDoubleClicked::NTuple{5, Bool}
MouseClickedCount::NTuple{5, ImU16}
MouseClickedLastCount::NTuple{5, ImU16}
MouseReleased::NTuple{5, Bool}
MouseDownOwned::NTuple{5, Bool}
MouseDownOwnedUnlessPopupClose::NTuple{5, Bool}
MouseDownDuration::NTuple{5, Cfloat}
MouseDownDurationPrev::NTuple{5, Cfloat}
MouseDragMaxDistanceAbs::NTuple{5, ImVec2}
MouseDragMaxDistanceSqr::NTuple{5, Cfloat}
PenPressure::Cfloat
AppFocusLost::Bool
AppAcceptingEvents::Bool
BackendUsingLegacyKeyArrays::ImS8
BackendUsingLegacyNavInputArray::Bool
InputQueueSurrogate::ImWchar16
InputQueueCharacters::ImVector_ImWchar
end
function Base.getproperty(x::ImGuiIO, f::Symbol)
f === :Ctx && return Ptr{ImGuiContext}(getfield(x, f))
return getfield(x, f)
end
function Base.getproperty(x::Ptr{ImGuiIO}, f::Symbol)
f === :ConfigFlags && return Ptr{ImGuiConfigFlags}(x + 0)
f === :BackendFlags && return Ptr{ImGuiBackendFlags}(x + 4)
f === :DisplaySize && return Ptr{ImVec2}(x + 8)
f === :DeltaTime && return Ptr{Cfloat}(x + 16)
f === :IniSavingRate && return Ptr{Cfloat}(x + 20)
f === :IniFilename && return Ptr{Ptr{Cchar}}(x + 24)
f === :LogFilename && return Ptr{Ptr{Cchar}}(x + 28)
f === :MouseDoubleClickTime && return Ptr{Cfloat}(x + 32)
f === :MouseDoubleClickMaxDist && return Ptr{Cfloat}(x + 36)
f === :MouseDragThreshold && return Ptr{Cfloat}(x + 40)
f === :KeyRepeatDelay && return Ptr{Cfloat}(x + 44)
f === :KeyRepeatRate && return Ptr{Cfloat}(x + 48)
f === :HoverDelayNormal && return Ptr{Cfloat}(x + 52)
f === :HoverDelayShort && return Ptr{Cfloat}(x + 56)
f === :UserData && return Ptr{Ptr{Cvoid}}(x + 60)
f === :Fonts && return Ptr{Ptr{ImFontAtlas}}(x + 64)
f === :FontGlobalScale && return Ptr{Cfloat}(x + 68)
f === :FontAllowUserScaling && return Ptr{Bool}(x + 72)
f === :FontDefault && return Ptr{Ptr{ImFont}}(x + 76)
f === :DisplayFramebufferScale && return Ptr{ImVec2}(x + 80)
f === :ConfigDockingNoSplit && return Ptr{Bool}(x + 88)
f === :ConfigDockingWithShift && return Ptr{Bool}(x + 89)
f === :ConfigDockingAlwaysTabBar && return Ptr{Bool}(x + 90)
f === :ConfigDockingTransparentPayload && return Ptr{Bool}(x + 91)
f === :ConfigViewportsNoAutoMerge && return Ptr{Bool}(x + 92)
f === :ConfigViewportsNoTaskBarIcon && return Ptr{Bool}(x + 93)
f === :ConfigViewportsNoDecoration && return Ptr{Bool}(x + 94)
f === :ConfigViewportsNoDefaultParent && return Ptr{Bool}(x + 95)
f === :MouseDrawCursor && return Ptr{Bool}(x + 96)
f === :ConfigMacOSXBehaviors && return Ptr{Bool}(x + 97)
f === :ConfigInputTrickleEventQueue && return Ptr{Bool}(x + 98)
f === :ConfigInputTextCursorBlink && return Ptr{Bool}(x + 99)
f === :ConfigInputTextEnterKeepActive && return Ptr{Bool}(x + 100)
f === :ConfigDragClickToInputText && return Ptr{Bool}(x + 101)
f === :ConfigWindowsResizeFromEdges && return Ptr{Bool}(x + 102)
f === :ConfigWindowsMoveFromTitleBarOnly && return Ptr{Bool}(x + 103)
f === :ConfigMemoryCompactTimer && return Ptr{Cfloat}(x + 104)
f === :ConfigDebugBeginReturnValueOnce && return Ptr{Bool}(x + 108)
f === :ConfigDebugBeginReturnValueLoop && return Ptr{Bool}(x + 109)
f === :BackendPlatformName && return Ptr{Ptr{Cchar}}(x + 112)
f === :BackendRendererName && return Ptr{Ptr{Cchar}}(x + 116)
f === :BackendPlatformUserData && return Ptr{Ptr{Cvoid}}(x + 120)
f === :BackendRendererUserData && return Ptr{Ptr{Cvoid}}(x + 124)
f === :BackendLanguageUserData && return Ptr{Ptr{Cvoid}}(x + 128)
f === :GetClipboardTextFn && return Ptr{Ptr{Cvoid}}(x + 132)
f === :SetClipboardTextFn && return Ptr{Ptr{Cvoid}}(x + 136)
f === :ClipboardUserData && return Ptr{Ptr{Cvoid}}(x + 140)
f === :SetPlatformImeDataFn && return Ptr{Ptr{Cvoid}}(x + 144)
f === :_UnusedPadding && return Ptr{Ptr{Cvoid}}(x + 148)
f === :WantCaptureMouse && return Ptr{Bool}(x + 152)
f === :WantCaptureKeyboard && return Ptr{Bool}(x + 153)
f === :WantTextInput && return Ptr{Bool}(x + 154)
f === :WantSetMousePos && return Ptr{Bool}(x + 155)
f === :WantSaveIniSettings && return Ptr{Bool}(x + 156)
f === :NavActive && return Ptr{Bool}(x + 157)
f === :NavVisible && return Ptr{Bool}(x + 158)
f === :Framerate && return Ptr{Cfloat}(x + 160)
f === :MetricsRenderVertices && return Ptr{Cint}(x + 164)
f === :MetricsRenderIndices && return Ptr{Cint}(x + 168)
f === :MetricsRenderWindows && return Ptr{Cint}(x + 172)
f === :MetricsActiveWindows && return Ptr{Cint}(x + 176)
f === :MetricsActiveAllocations && return Ptr{Cint}(x + 180)
f === :MouseDelta && return Ptr{ImVec2}(x + 184)
f === :KeyMap && return Ptr{NTuple{652, Cint}}(x + 192)
f === :KeysDown && return Ptr{NTuple{652, Bool}}(x + 2800)
f === :NavInputs && return Ptr{NTuple{16, Cfloat}}(x + 3452)
f === :Ctx && return Ptr{Ptr{ImGuiContext}}(x + 3516)
f === :MousePos && return Ptr{ImVec2}(x + 3520)
f === :MouseDown && return Ptr{NTuple{5, Bool}}(x + 3528)
f === :MouseWheel && return Ptr{Cfloat}(x + 3536)
f === :MouseWheelH && return Ptr{Cfloat}(x + 3540)
f === :MouseHoveredViewport && return Ptr{ImGuiID}(x + 3544)
f === :KeyCtrl && return Ptr{Bool}(x + 3548)
f === :KeyShift && return Ptr{Bool}(x + 3549)
f === :KeyAlt && return Ptr{Bool}(x + 3550)
f === :KeySuper && return Ptr{Bool}(x + 3551)
f === :KeyMods && return Ptr{ImGuiKeyChord}(x + 3552)
f === :KeysData && return Ptr{NTuple{652, ImGuiKeyData}}(x + 3556)
f === :WantCaptureMouseUnlessPopupClose && return Ptr{Bool}(x + 13988)
f === :MousePosPrev && return Ptr{ImVec2}(x + 13992)
f === :MouseClickedPos && return Ptr{NTuple{5, ImVec2}}(x + 14000)
f === :MouseClickedTime && return Ptr{NTuple{5, Cdouble}}(x + 14040)
f === :MouseClicked && return Ptr{NTuple{5, Bool}}(x + 14080)
f === :MouseDoubleClicked && return Ptr{NTuple{5, Bool}}(x + 14085)
f === :MouseClickedCount && return Ptr{NTuple{5, ImU16}}(x + 14090)
f === :MouseClickedLastCount && return Ptr{NTuple{5, ImU16}}(x + 14100)
f === :MouseReleased && return Ptr{NTuple{5, Bool}}(x + 14110)
f === :MouseDownOwned && return Ptr{NTuple{5, Bool}}(x + 14115)
f === :MouseDownOwnedUnlessPopupClose && return Ptr{NTuple{5, Bool}}(x + 14120)
f === :MouseDownDuration && return Ptr{NTuple{5, Cfloat}}(x + 14128)
f === :MouseDownDurationPrev && return Ptr{NTuple{5, Cfloat}}(x + 14148)
f === :MouseDragMaxDistanceAbs && return Ptr{NTuple{5, ImVec2}}(x + 14168)
f === :MouseDragMaxDistanceSqr && return Ptr{NTuple{5, Cfloat}}(x + 14208)
f === :PenPressure && return Ptr{Cfloat}(x + 14228)
f === :AppFocusLost && return Ptr{Bool}(x + 14232)
f === :AppAcceptingEvents && return Ptr{Bool}(x + 14233)
f === :BackendUsingLegacyKeyArrays && return Ptr{ImS8}(x + 14234)
f === :BackendUsingLegacyNavInputArray && return Ptr{Bool}(x + 14235)
f === :InputQueueSurrogate && return Ptr{ImWchar16}(x + 14236)
f === :InputQueueCharacters && return Ptr{ImVector_ImWchar}(x + 14240)
return getfield(x, f)
end
function Base.setproperty!(x::Ptr{ImGuiIO}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
struct ImGuiPlatformMonitor
MainPos::ImVec2
MainSize::ImVec2
WorkPos::ImVec2
WorkSize::ImVec2
DpiScale::Cfloat
end
function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end
function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Data::Ptr{ImGuiPlatformMonitor}
end
struct ImVector_ImGuiViewportPtr
Size::Cint
Capacity::Cint
Data::Ptr{Ptr{ImGuiViewport}}
end
struct ImGuiPlatformIO
Platform_CreateWindow::Ptr{Cvoid}
Platform_DestroyWindow::Ptr{Cvoid}
Platform_ShowWindow::Ptr{Cvoid}
Platform_SetWindowPos::Ptr{Cvoid}
Platform_GetWindowPos::Ptr{Cvoid}
Platform_SetWindowSize::Ptr{Cvoid}
Platform_GetWindowSize::Ptr{Cvoid}
Platform_SetWindowFocus::Ptr{Cvoid}
Platform_GetWindowFocus::Ptr{Cvoid}
Platform_GetWindowMinimized::Ptr{Cvoid}
Platform_SetWindowTitle::Ptr{Cvoid}
Platform_SetWindowAlpha::Ptr{Cvoid}
Platform_UpdateWindow::Ptr{Cvoid}
Platform_RenderWindow::Ptr{Cvoid}
Platform_SwapBuffers::Ptr{Cvoid}
Platform_GetWindowDpiScale::Ptr{Cvoid}
Platform_OnChangedViewport::Ptr{Cvoid}
Platform_CreateVkSurface::Ptr{Cvoid}
Renderer_CreateWindow::Ptr{Cvoid}
Renderer_DestroyWindow::Ptr{Cvoid}
Renderer_SetWindowSize::Ptr{Cvoid}
Renderer_RenderWindow::Ptr{Cvoid}
Renderer_SwapBuffers::Ptr{Cvoid}
Monitors::ImVector_ImGuiPlatformMonitor
Viewports::ImVector_ImGuiViewportPtr
end
function Base.getproperty(x::Ptr{ImGuiPlatformIO}, f::Symbol)
f === :Platform_CreateWindow && return Ptr{Ptr{Cvoid}}(x + 0)
f === :Platform_DestroyWindow && return Ptr{Ptr{Cvoid}}(x + 4)
f === :Platform_ShowWindow && return Ptr{Ptr{Cvoid}}(x + 8)
f === :Platform_SetWindowPos && return Ptr{Ptr{Cvoid}}(x + 12)
f === :Platform_GetWindowPos && return Ptr{Ptr{Cvoid}}(x + 16)
f === :Platform_SetWindowSize && return Ptr{Ptr{Cvoid}}(x + 20)
f === :Platform_GetWindowSize && return Ptr{Ptr{Cvoid}}(x + 24)
f === :Platform_SetWindowFocus && return Ptr{Ptr{Cvoid}}(x + 28)
f === :Platform_GetWindowFocus && return Ptr{Ptr{Cvoid}}(x + 32)
f === :Platform_GetWindowMinimized && return Ptr{Ptr{Cvoid}}(x + 36)
f === :Platform_SetWindowTitle && return Ptr{Ptr{Cvoid}}(x + 40)
f === :Platform_SetWindowAlpha && return Ptr{Ptr{Cvoid}}(x + 44)
f === :Platform_UpdateWindow && return Ptr{Ptr{Cvoid}}(x + 48)
f === :Platform_RenderWindow && return Ptr{Ptr{Cvoid}}(x + 52)
f === :Platform_SwapBuffers && return Ptr{Ptr{Cvoid}}(x + 56)
f === :Platform_GetWindowDpiScale && return Ptr{Ptr{Cvoid}}(x + 60)
f === :Platform_OnChangedViewport && return Ptr{Ptr{Cvoid}}(x + 64)
f === :Platform_CreateVkSurface && return Ptr{Ptr{Cvoid}}(x + 68)
f === :Renderer_CreateWindow && return Ptr{Ptr{Cvoid}}(x + 72)
f === :Renderer_DestroyWindow && return Ptr{Ptr{Cvoid}}(x + 76)
f === :Renderer_SetWindowSize && return Ptr{Ptr{Cvoid}}(x + 80)
f === :Renderer_RenderWindow && return Ptr{Ptr{Cvoid}}(x + 84)
f === :Renderer_SwapBuffers && return Ptr{Ptr{Cvoid}}(x + 88)
f === :Monitors && return Ptr{ImVector_ImGuiPlatformMonitor}(x + 92)
f === :Viewports && return Ptr{ImVector_ImGuiViewportPtr}(x + 104)
return getfield(x, f)
end
function Base.setproperty!(x::Ptr{ImGuiPlatformIO}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
@cenum ImGuiInputEventType::UInt32 begin
ImGuiInputEventType_None = 0
ImGuiInputEventType_MousePos = 1
ImGuiInputEventType_MouseWheel = 2
ImGuiInputEventType_MouseButton = 3
ImGuiInputEventType_MouseViewport = 4
ImGuiInputEventType_Key = 5
ImGuiInputEventType_Text = 6
ImGuiInputEventType_Focus = 7
ImGuiInputEventType_COUNT = 8
end
@cenum ImGuiInputSource::UInt32 begin
ImGuiInputSource_None = 0
ImGuiInputSource_Mouse = 1
ImGuiInputSource_Keyboard = 2
ImGuiInputSource_Gamepad = 3
ImGuiInputSource_Clipboard = 4
ImGuiInputSource_Nav = 5
ImGuiInputSource_COUNT = 6
end
struct ImGuiInputEvent
data::NTuple{24, UInt8}
end
function Base.getproperty(x::Ptr{ImGuiInputEvent}, f::Symbol)
f === :Type && return Ptr{ImGuiInputEventType}(x + 0)
f === :Source && return Ptr{ImGuiInputSource}(x + 4)
f === :MousePos && return Ptr{ImGuiInputEventMousePos}(x + 8)
f === :MouseWheel && return Ptr{ImGuiInputEventMouseWheel}(x + 8)
f === :MouseButton && return Ptr{ImGuiInputEventMouseButton}(x + 8)
f === :MouseViewport && return Ptr{ImGuiInputEventMouseViewport}(x + 8)
f === :Key && return Ptr{ImGuiInputEventKey}(x + 8)
f === :Text && return Ptr{ImGuiInputEventText}(x + 8)
f === :AppFocused && return Ptr{ImGuiInputEventAppFocused}(x + 8)
f === :AddedByTestEngine && return Ptr{Bool}(x + 20)
return getfield(x, f)
end
function Base.getproperty(x::ImGuiInputEvent, f::Symbol)
r = Ref{ImGuiInputEvent}(x)
ptr = Base.unsafe_convert(Ptr{ImGuiInputEvent}, r)
fptr = getproperty(ptr, f)
GC.@preserve r unsafe_load(fptr)
end
function Base.setproperty!(x::Ptr{ImGuiInputEvent}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end
struct ImVector_ImGuiInputEvent
Size::Cint
Capacity::Cint
Data::Ptr{ImGuiInputEvent}
end
const ImGuiDir = Cint
struct ImGuiStyle
Alpha::Cfloat
DisabledAlpha::Cfloat
WindowPadding::ImVec2
WindowRounding::Cfloat
WindowBorderSize::Cfloat
WindowMinSize::ImVec2
WindowTitleAlign::ImVec2
WindowMenuButtonPosition::ImGuiDir
ChildRounding::Cfloat
ChildBorderSize::Cfloat
PopupRounding::Cfloat
PopupBorderSize::Cfloat
FramePadding::ImVec2
FrameRounding::Cfloat
FrameBorderSize::Cfloat
ItemSpacing::ImVec2
ItemInnerSpacing::ImVec2
CellPadding::ImVec2
TouchExtraPadding::ImVec2
IndentSpacing::Cfloat
ColumnsMinSpacing::Cfloat
ScrollbarSize::Cfloat