-
-
Save timo/1edc45ba68bf8906f7d4e3d609a7b6d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
use JSON::Fast; | |
my $typedef_dict = from-json("cimgui/generator/output/typedefs_dict.json".IO.slurp); | |
my (:$structs, :$enums) := from-json("cimgui/generator/output/structs_and_enums.json".IO.slurp); | |
my %renames = | |
Pair => "ImPair"; | |
my %native-types = | |
"int" => "int32", | |
"unsigned int" => "uint32", | |
"signed int" => "int32", | |
"long" => "long", | |
"const char *" => "Str", | |
"const char*" => "Str", | |
"char*" => "Str", | |
"char" => "char", | |
"float" => "num32", | |
"double" => "num64", | |
"void*" => "Pointer", | |
"void *" => "Pointer", | |
"bool" => "int32", | |
"ImU32" => "uint32", | |
"ImWchar" => "uint16", | |
"ImTextureID" => "Pointer", | |
"uint64_t" => "uint64", | |
"int64_t" => "int64", | |
; | |
dd %native-types; | |
my @defined-types; | |
my %enumtypes; | |
say "use NativeCall;"; | |
note "outputting stubs for structs in the typedefs_dict file"; | |
structstub: for $typedef_dict.pairs { | |
if .value.starts-with("struct ") { | |
my $structname = %renames{.key} // .key; | |
say "class $structname is repr<CStruct> \{ ... }"; | |
@defined-types.push: $structname; | |
} | |
} | |
enumentry: for $enums.pairs { | |
my Str $enumname; | |
if defined $typedef_dict{.key.chop} { | |
$enumname = .key.chop; | |
} | |
orwith .key { | |
$enumname = $_; | |
if $enumname !~~ /^(<[a..zA..Z]>+)+ %% <[_'-]>$/ { | |
note "warning: skipped unaccepted name $enumname.perl()"; | |
say "# skipped $enumname.perl()"; | |
next enumentry; | |
} | |
} | |
say ""; | |
say "enum $enumname is export ("; | |
for .value.list { | |
say " $_<name> => $_<calc_value>,"; | |
} | |
say ");"; | |
@defined-types.push: $enumname; | |
%enumtypes{$enumname} = "uint32"; | |
} | |
my %valid-types is Set = flat @defined-types, |%native-types.keys; | |
my %defined-vectors is SetHash; | |
my @vector-impl-code; | |
sub typemap(Str $type) { | |
with %renames{$type} { | |
note "remapped from $type to $_"; | |
return typemap $_ | |
} | |
with %native-types{$type} -> $nt { | |
note "native type $type to $nt"; | |
return $nt; | |
} | |
orwith %enumtypes{$type} { | |
note "enum type $type"; | |
return $_; | |
} | |
orwith @defined-types.first($type) { | |
note "defined type: $type -> $_"; | |
return $type; | |
} | |
elsif %defined-vectors{"ImVector_$type"} { | |
note "defined vector for $type"; | |
return $type | |
} | |
note "nothing in typemap for $type"; | |
return Any; | |
} | |
structentry: for $structs.pairs.sort { | |
my Str $structname; | |
note "----"; | |
note "considering $_.key()"; | |
$structname = %renames{.key} // .key; | |
# ImVector is a special case, and also empty by itself; skip! | |
if $structname eq "ImVector" { | |
next structentry; | |
} | |
my @types = .value.list>>.<type>; | |
while @types.grep(*.starts-with("ImVector_")).first({ not %defined-vectors{$_} }) -> $vector-to-define is copy { | |
dd %defined-vectors; | |
$vector-to-define .= substr("ImVector_".chars); | |
without typemap($vector-to-define) { | |
note "cannot declare ImVector of unknown type $vector-to-define"; | |
next structentry; | |
} | |
%defined-vectors{"ImVector_$vector-to-define"}++; | |
note "stubbing vector ImVector_$vector-to-define"; | |
say "class ImVector_$vector-to-define is repr<CStruct> \{ ... }"; | |
@vector-impl-code.append: | |
"class ImVector_$vector-to-define \{", | |
' has int32 $.Size;', | |
' has int32 $.Capacity;', | |
" has CArray[$vector-to-define] \$.Data;", | |
"}"; | |
} | |
my @p6types = @types.map(&typemap); | |
dd @p6types; | |
if @p6types.grep(!*.defined, :k).map({@types[$_]}) -> @missing-types { | |
note " !!! skipping $structname ..."; | |
note " missing type: $_" for @missing-types.unique; | |
next structentry; | |
} | |
if .value.list>>.<name>.grep(none(/^<[a..zA..Z0..9]>+$/)) -> @invalid-names { | |
note " !!! skipping $structname ..."; | |
note " invalid name $_" for @invalid-names; | |
next structentry; | |
} | |
note "outputting struct definition of $structname"; | |
say ""; | |
say "class $structname \{"; | |
for .value.list>>.<name>.pairs { | |
say "has @p6types[.key] \$.$_.value();"; | |
} | |
say "}"; | |
} | |
.say for @vector-impl-code; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use NativeCall; | |
class TextRange is repr<CStruct> { ... } | |
class ImGuiStorage is repr<CStruct> { ... } | |
class ImGuiTextBuffer is repr<CStruct> { ... } | |
class ImFontConfig is repr<CStruct> { ... } | |
class ImGuiContext is repr<CStruct> { ... } | |
class ImDrawList is repr<CStruct> { ... } | |
class ImDrawVert is repr<CStruct> { ... } | |
class ImFontGlyphRangesBuilder is repr<CStruct> { ... } | |
class ImDrawData is repr<CStruct> { ... } | |
class ImFontAtlas is repr<CStruct> { ... } | |
class ImGuiOnceUponAFrame is repr<CStruct> { ... } | |
class ImDrawCmd is repr<CStruct> { ... } | |
class ImFont is repr<CStruct> { ... } | |
class ImGuiIO is repr<CStruct> { ... } | |
class ImColor is repr<CStruct> { ... } | |
class ImGuiStyle is repr<CStruct> { ... } | |
class ImVec4 is repr<CStruct> { ... } | |
class ImFontGlyph is repr<CStruct> { ... } | |
class ImGuiPayload is repr<CStruct> { ... } | |
class ImGuiTextFilter is repr<CStruct> { ... } | |
class ImPair is repr<CStruct> { ... } | |
class ImGuiInputTextCallbackData is repr<CStruct> { ... } | |
class ImGuiListClipper is repr<CStruct> { ... } | |
class ImVec2 is repr<CStruct> { ... } | |
class ImGuiSizeCallbackData is repr<CStruct> { ... } | |
class ImDrawChannel is repr<CStruct> { ... } | |
class ImDrawListSharedData is repr<CStruct> { ... } | |
class CustomRect is repr<CStruct> { ... } | |
enum ImGuiMouseCursor is export ( | |
ImGuiMouseCursor_None => -1, | |
ImGuiMouseCursor_Arrow => 0, | |
ImGuiMouseCursor_TextInput => 1, | |
ImGuiMouseCursor_ResizeAll => 2, | |
ImGuiMouseCursor_ResizeNS => 3, | |
ImGuiMouseCursor_ResizeEW => 4, | |
ImGuiMouseCursor_ResizeNESW => 5, | |
ImGuiMouseCursor_ResizeNWSE => 6, | |
ImGuiMouseCursor_Hand => 7, | |
ImGuiMouseCursor_COUNT => 8, | |
); | |
enum ImGuiColorEditFlags is export ( | |
ImGuiColorEditFlags_None => 0, | |
ImGuiColorEditFlags_NoAlpha => 2, | |
ImGuiColorEditFlags_NoPicker => 4, | |
ImGuiColorEditFlags_NoOptions => 8, | |
ImGuiColorEditFlags_NoSmallPreview => 16, | |
ImGuiColorEditFlags_NoInputs => 32, | |
ImGuiColorEditFlags_NoTooltip => 64, | |
ImGuiColorEditFlags_NoLabel => 128, | |
ImGuiColorEditFlags_NoSidePreview => 256, | |
ImGuiColorEditFlags_NoDragDrop => 512, | |
ImGuiColorEditFlags_AlphaBar => 65536, | |
ImGuiColorEditFlags_AlphaPreview => 131072, | |
ImGuiColorEditFlags_AlphaPreviewHalf => 262144, | |
ImGuiColorEditFlags_HDR => 524288, | |
ImGuiColorEditFlags_RGB => 1048576, | |
ImGuiColorEditFlags_HSV => 2097152, | |
ImGuiColorEditFlags_HEX => 4194304, | |
ImGuiColorEditFlags_Uint8 => 8388608, | |
ImGuiColorEditFlags_Float => 16777216, | |
ImGuiColorEditFlags_PickerHueBar => 33554432, | |
ImGuiColorEditFlags_PickerHueWheel => 67108864, | |
ImGuiColorEditFlags__InputsMask => 7340032, | |
ImGuiColorEditFlags__DataTypeMask => 25165824, | |
ImGuiColorEditFlags__PickerMask => 100663296, | |
ImGuiColorEditFlags__OptionsDefault => 42991616, | |
); | |
enum ImDrawListFlags is export ( | |
ImDrawListFlags_None => 0, | |
ImDrawListFlags_AntiAliasedLines => 1, | |
ImDrawListFlags_AntiAliasedFill => 2, | |
); | |
enum ImGuiWindowFlags is export ( | |
ImGuiWindowFlags_None => 0, | |
ImGuiWindowFlags_NoTitleBar => 1, | |
ImGuiWindowFlags_NoResize => 2, | |
ImGuiWindowFlags_NoMove => 4, | |
ImGuiWindowFlags_NoScrollbar => 8, | |
ImGuiWindowFlags_NoScrollWithMouse => 16, | |
ImGuiWindowFlags_NoCollapse => 32, | |
ImGuiWindowFlags_AlwaysAutoResize => 64, | |
ImGuiWindowFlags_NoBackground => 128, | |
ImGuiWindowFlags_NoSavedSettings => 256, | |
ImGuiWindowFlags_NoMouseInputs => 512, | |
ImGuiWindowFlags_MenuBar => 1024, | |
ImGuiWindowFlags_HorizontalScrollbar => 2048, | |
ImGuiWindowFlags_NoFocusOnAppearing => 4096, | |
ImGuiWindowFlags_NoBringToFrontOnFocus => 8192, | |
ImGuiWindowFlags_AlwaysVerticalScrollbar => 16384, | |
ImGuiWindowFlags_AlwaysHorizontalScrollbar => 32768, | |
ImGuiWindowFlags_AlwaysUseWindowPadding => 65536, | |
ImGuiWindowFlags_NoNavInputs => 262144, | |
ImGuiWindowFlags_NoNavFocus => 524288, | |
ImGuiWindowFlags_UnsavedDocument => 1048576, | |
ImGuiWindowFlags_NoNav => 786432, | |
ImGuiWindowFlags_NoDecoration => 43, | |
ImGuiWindowFlags_NoInputs => 786944, | |
ImGuiWindowFlags_NavFlattened => 8388608, | |
ImGuiWindowFlags_ChildWindow => 16777216, | |
ImGuiWindowFlags_Tooltip => 33554432, | |
ImGuiWindowFlags_Popup => 67108864, | |
ImGuiWindowFlags_Modal => 134217728, | |
ImGuiWindowFlags_ChildMenu => 268435456, | |
); | |
enum ImGuiDragDropFlags is export ( | |
ImGuiDragDropFlags_None => 0, | |
ImGuiDragDropFlags_SourceNoPreviewTooltip => 1, | |
ImGuiDragDropFlags_SourceNoDisableHover => 2, | |
ImGuiDragDropFlags_SourceNoHoldToOpenOthers => 4, | |
ImGuiDragDropFlags_SourceAllowNullID => 8, | |
ImGuiDragDropFlags_SourceExtern => 16, | |
ImGuiDragDropFlags_SourceAutoExpirePayload => 32, | |
ImGuiDragDropFlags_AcceptBeforeDelivery => 1024, | |
ImGuiDragDropFlags_AcceptNoDrawDefaultRect => 2048, | |
ImGuiDragDropFlags_AcceptNoPreviewTooltip => 4096, | |
ImGuiDragDropFlags_AcceptPeekOnly => 3072, | |
); | |
enum ImFontAtlasFlags is export ( | |
ImFontAtlasFlags_None => 0, | |
ImFontAtlasFlags_NoPowerOfTwoHeight => 1, | |
ImFontAtlasFlags_NoMouseCursors => 2, | |
); | |
enum ImGuiFocusedFlags is export ( | |
ImGuiFocusedFlags_None => 0, | |
ImGuiFocusedFlags_ChildWindows => 1, | |
ImGuiFocusedFlags_RootWindow => 2, | |
ImGuiFocusedFlags_AnyWindow => 4, | |
ImGuiFocusedFlags_RootAndChildWindows => 3, | |
); | |
enum ImGuiDataType is export ( | |
ImGuiDataType_S32 => 0, | |
ImGuiDataType_U32 => 1, | |
ImGuiDataType_S64 => 2, | |
ImGuiDataType_U64 => 3, | |
ImGuiDataType_Float => 4, | |
ImGuiDataType_Double => 5, | |
ImGuiDataType_COUNT => 6, | |
); | |
enum ImGuiNavInput is export ( | |
ImGuiNavInput_Activate => 0, | |
ImGuiNavInput_Cancel => 1, | |
ImGuiNavInput_Input => 2, | |
ImGuiNavInput_Menu => 3, | |
ImGuiNavInput_DpadLeft => 4, | |
ImGuiNavInput_DpadRight => 5, | |
ImGuiNavInput_DpadUp => 6, | |
ImGuiNavInput_DpadDown => 7, | |
ImGuiNavInput_LStickLeft => 8, | |
ImGuiNavInput_LStickRight => 9, | |
ImGuiNavInput_LStickUp => 10, | |
ImGuiNavInput_LStickDown => 11, | |
ImGuiNavInput_FocusPrev => 12, | |
ImGuiNavInput_FocusNext => 13, | |
ImGuiNavInput_TweakSlow => 14, | |
ImGuiNavInput_TweakFast => 15, | |
ImGuiNavInput_KeyMenu_ => 16, | |
ImGuiNavInput_KeyLeft_ => 17, | |
ImGuiNavInput_KeyRight_ => 18, | |
ImGuiNavInput_KeyUp_ => 19, | |
ImGuiNavInput_KeyDown_ => 20, | |
ImGuiNavInput_COUNT => 21, | |
ImGuiNavInput_InternalStart_ => 16, | |
); | |
enum ImGuiSelectableFlags is export ( | |
ImGuiSelectableFlags_None => 0, | |
ImGuiSelectableFlags_DontClosePopups => 1, | |
ImGuiSelectableFlags_SpanAllColumns => 2, | |
ImGuiSelectableFlags_AllowDoubleClick => 4, | |
ImGuiSelectableFlags_Disabled => 8, | |
); | |
enum ImGuiKey is export ( | |
ImGuiKey_Tab => 0, | |
ImGuiKey_LeftArrow => 1, | |
ImGuiKey_RightArrow => 2, | |
ImGuiKey_UpArrow => 3, | |
ImGuiKey_DownArrow => 4, | |
ImGuiKey_PageUp => 5, | |
ImGuiKey_PageDown => 6, | |
ImGuiKey_Home => 7, | |
ImGuiKey_End => 8, | |
ImGuiKey_Insert => 9, | |
ImGuiKey_Delete => 10, | |
ImGuiKey_Backspace => 11, | |
ImGuiKey_Space => 12, | |
ImGuiKey_Enter => 13, | |
ImGuiKey_Escape => 14, | |
ImGuiKey_A => 15, | |
ImGuiKey_C => 16, | |
ImGuiKey_V => 17, | |
ImGuiKey_X => 18, | |
ImGuiKey_Y => 19, | |
ImGuiKey_Z => 20, | |
ImGuiKey_COUNT => 21, | |
); | |
enum ImGuiInputTextFlags is export ( | |
ImGuiInputTextFlags_None => 0, | |
ImGuiInputTextFlags_CharsDecimal => 1, | |
ImGuiInputTextFlags_CharsHexadecimal => 2, | |
ImGuiInputTextFlags_CharsUppercase => 4, | |
ImGuiInputTextFlags_CharsNoBlank => 8, | |
ImGuiInputTextFlags_AutoSelectAll => 16, | |
ImGuiInputTextFlags_EnterReturnsTrue => 32, | |
ImGuiInputTextFlags_CallbackCompletion => 64, | |
ImGuiInputTextFlags_CallbackHistory => 128, | |
ImGuiInputTextFlags_CallbackAlways => 256, | |
ImGuiInputTextFlags_CallbackCharFilter => 512, | |
ImGuiInputTextFlags_AllowTabInput => 1024, | |
ImGuiInputTextFlags_CtrlEnterForNewLine => 2048, | |
ImGuiInputTextFlags_NoHorizontalScroll => 4096, | |
ImGuiInputTextFlags_AlwaysInsertMode => 8192, | |
ImGuiInputTextFlags_ReadOnly => 16384, | |
ImGuiInputTextFlags_Password => 32768, | |
ImGuiInputTextFlags_NoUndoRedo => 65536, | |
ImGuiInputTextFlags_CharsScientific => 131072, | |
ImGuiInputTextFlags_CallbackResize => 262144, | |
ImGuiInputTextFlags_Multiline => 1048576, | |
); | |
enum ImGuiCol is export ( | |
ImGuiCol_Text => 0, | |
ImGuiCol_TextDisabled => 1, | |
ImGuiCol_WindowBg => 2, | |
ImGuiCol_ChildBg => 3, | |
ImGuiCol_PopupBg => 4, | |
ImGuiCol_Border => 5, | |
ImGuiCol_BorderShadow => 6, | |
ImGuiCol_FrameBg => 7, | |
ImGuiCol_FrameBgHovered => 8, | |
ImGuiCol_FrameBgActive => 9, | |
ImGuiCol_TitleBg => 10, | |
ImGuiCol_TitleBgActive => 11, | |
ImGuiCol_TitleBgCollapsed => 12, | |
ImGuiCol_MenuBarBg => 13, | |
ImGuiCol_ScrollbarBg => 14, | |
ImGuiCol_ScrollbarGrab => 15, | |
ImGuiCol_ScrollbarGrabHovered => 16, | |
ImGuiCol_ScrollbarGrabActive => 17, | |
ImGuiCol_CheckMark => 18, | |
ImGuiCol_SliderGrab => 19, | |
ImGuiCol_SliderGrabActive => 20, | |
ImGuiCol_Button => 21, | |
ImGuiCol_ButtonHovered => 22, | |
ImGuiCol_ButtonActive => 23, | |
ImGuiCol_Header => 24, | |
ImGuiCol_HeaderHovered => 25, | |
ImGuiCol_HeaderActive => 26, | |
ImGuiCol_Separator => 27, | |
ImGuiCol_SeparatorHovered => 28, | |
ImGuiCol_SeparatorActive => 29, | |
ImGuiCol_ResizeGrip => 30, | |
ImGuiCol_ResizeGripHovered => 31, | |
ImGuiCol_ResizeGripActive => 32, | |
ImGuiCol_Tab => 33, | |
ImGuiCol_TabHovered => 34, | |
ImGuiCol_TabActive => 35, | |
ImGuiCol_TabUnfocused => 36, | |
ImGuiCol_TabUnfocusedActive => 37, | |
ImGuiCol_PlotLines => 38, | |
ImGuiCol_PlotLinesHovered => 39, | |
ImGuiCol_PlotHistogram => 40, | |
ImGuiCol_PlotHistogramHovered => 41, | |
ImGuiCol_TextSelectedBg => 42, | |
ImGuiCol_DragDropTarget => 43, | |
ImGuiCol_NavHighlight => 44, | |
ImGuiCol_NavWindowingHighlight => 45, | |
ImGuiCol_NavWindowingDimBg => 46, | |
ImGuiCol_ModalWindowDimBg => 47, | |
ImGuiCol_COUNT => 48, | |
); | |
enum ImGuiBackendFlags is export ( | |
ImGuiBackendFlags_None => 0, | |
ImGuiBackendFlags_HasGamepad => 1, | |
ImGuiBackendFlags_HasMouseCursors => 2, | |
ImGuiBackendFlags_HasSetMousePos => 4, | |
); | |
enum ImGuiDir is export ( | |
ImGuiDir_None => -1, | |
ImGuiDir_Left => 0, | |
ImGuiDir_Right => 1, | |
ImGuiDir_Up => 2, | |
ImGuiDir_Down => 3, | |
ImGuiDir_COUNT => 4, | |
); | |
enum ImGuiTabItemFlags is export ( | |
ImGuiTabItemFlags_None => 0, | |
ImGuiTabItemFlags_UnsavedDocument => 1, | |
ImGuiTabItemFlags_SetSelected => 2, | |
ImGuiTabItemFlags_NoCloseWithMiddleMouseButton => 4, | |
ImGuiTabItemFlags_NoPushId => 8, | |
); | |
enum ImGuiHoveredFlags is export ( | |
ImGuiHoveredFlags_None => 0, | |
ImGuiHoveredFlags_ChildWindows => 1, | |
ImGuiHoveredFlags_RootWindow => 2, | |
ImGuiHoveredFlags_AnyWindow => 4, | |
ImGuiHoveredFlags_AllowWhenBlockedByPopup => 8, | |
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem => 32, | |
ImGuiHoveredFlags_AllowWhenOverlapped => 64, | |
ImGuiHoveredFlags_AllowWhenDisabled => 128, | |
ImGuiHoveredFlags_RectOnly => 104, | |
ImGuiHoveredFlags_RootAndChildWindows => 3, | |
); | |
enum ImDrawCornerFlags is export ( | |
ImDrawCornerFlags_TopLeft => 1, | |
ImDrawCornerFlags_TopRight => 2, | |
ImDrawCornerFlags_BotLeft => 4, | |
ImDrawCornerFlags_BotRight => 8, | |
ImDrawCornerFlags_Top => 3, | |
ImDrawCornerFlags_Bot => 12, | |
ImDrawCornerFlags_Left => 5, | |
ImDrawCornerFlags_Right => 10, | |
ImDrawCornerFlags_All => 15, | |
); | |
enum ImGuiCond is export ( | |
ImGuiCond_Always => 1, | |
ImGuiCond_Once => 2, | |
ImGuiCond_FirstUseEver => 4, | |
ImGuiCond_Appearing => 8, | |
); | |
enum ImGuiTreeNodeFlags is export ( | |
ImGuiTreeNodeFlags_None => 0, | |
ImGuiTreeNodeFlags_Selected => 1, | |
ImGuiTreeNodeFlags_Framed => 2, | |
ImGuiTreeNodeFlags_AllowItemOverlap => 4, | |
ImGuiTreeNodeFlags_NoTreePushOnOpen => 8, | |
ImGuiTreeNodeFlags_NoAutoOpenOnLog => 16, | |
ImGuiTreeNodeFlags_DefaultOpen => 32, | |
ImGuiTreeNodeFlags_OpenOnDoubleClick => 64, | |
ImGuiTreeNodeFlags_OpenOnArrow => 128, | |
ImGuiTreeNodeFlags_Leaf => 256, | |
ImGuiTreeNodeFlags_Bullet => 512, | |
ImGuiTreeNodeFlags_FramePadding => 1024, | |
ImGuiTreeNodeFlags_NavLeftJumpsBackHere => 8192, | |
ImGuiTreeNodeFlags_CollapsingHeader => 26, | |
); | |
enum ImGuiComboFlags is export ( | |
ImGuiComboFlags_None => 0, | |
ImGuiComboFlags_PopupAlignLeft => 1, | |
ImGuiComboFlags_HeightSmall => 2, | |
ImGuiComboFlags_HeightRegular => 4, | |
ImGuiComboFlags_HeightLarge => 8, | |
ImGuiComboFlags_HeightLargest => 16, | |
ImGuiComboFlags_NoArrowButton => 32, | |
ImGuiComboFlags_NoPreview => 64, | |
ImGuiComboFlags_HeightMask_ => 30, | |
); | |
enum ImGuiTabBarFlags is export ( | |
ImGuiTabBarFlags_None => 0, | |
ImGuiTabBarFlags_Reorderable => 1, | |
ImGuiTabBarFlags_AutoSelectNewTabs => 2, | |
ImGuiTabBarFlags_NoCloseWithMiddleMouseButton => 4, | |
ImGuiTabBarFlags_NoTabListPopupButton => 8, | |
ImGuiTabBarFlags_NoTabListScrollingButtons => 16, | |
ImGuiTabBarFlags_NoTooltip => 32, | |
ImGuiTabBarFlags_FittingPolicyResizeDown => 64, | |
ImGuiTabBarFlags_FittingPolicyScroll => 128, | |
ImGuiTabBarFlags_FittingPolicyMask_ => 192, | |
ImGuiTabBarFlags_FittingPolicyDefault_ => 64, | |
); | |
enum ImGuiStyleVar is export ( | |
ImGuiStyleVar_Alpha => 0, | |
ImGuiStyleVar_WindowPadding => 1, | |
ImGuiStyleVar_WindowRounding => 2, | |
ImGuiStyleVar_WindowBorderSize => 3, | |
ImGuiStyleVar_WindowMinSize => 4, | |
ImGuiStyleVar_WindowTitleAlign => 5, | |
ImGuiStyleVar_ChildRounding => 6, | |
ImGuiStyleVar_ChildBorderSize => 7, | |
ImGuiStyleVar_PopupRounding => 8, | |
ImGuiStyleVar_PopupBorderSize => 9, | |
ImGuiStyleVar_FramePadding => 10, | |
ImGuiStyleVar_FrameRounding => 11, | |
ImGuiStyleVar_FrameBorderSize => 12, | |
ImGuiStyleVar_ItemSpacing => 13, | |
ImGuiStyleVar_ItemInnerSpacing => 14, | |
ImGuiStyleVar_IndentSpacing => 15, | |
ImGuiStyleVar_ScrollbarSize => 16, | |
ImGuiStyleVar_ScrollbarRounding => 17, | |
ImGuiStyleVar_GrabMinSize => 18, | |
ImGuiStyleVar_GrabRounding => 19, | |
ImGuiStyleVar_TabRounding => 20, | |
ImGuiStyleVar_ButtonTextAlign => 21, | |
ImGuiStyleVar_COUNT => 22, | |
); | |
enum ImGuiConfigFlags is export ( | |
ImGuiConfigFlags_None => 0, | |
ImGuiConfigFlags_NavEnableKeyboard => 1, | |
ImGuiConfigFlags_NavEnableGamepad => 2, | |
ImGuiConfigFlags_NavEnableSetMousePos => 4, | |
ImGuiConfigFlags_NavNoCaptureKeyboard => 8, | |
ImGuiConfigFlags_NoMouse => 16, | |
ImGuiConfigFlags_NoMouseCursorChange => 32, | |
ImGuiConfigFlags_IsSRGB => 1048576, | |
ImGuiConfigFlags_IsTouchScreen => 2097152, | |
); | |
class ImColor { | |
has ImVec4 $.Value; | |
} | |
class ImVector_ImDrawCmd is repr<CStruct> { ... } | |
class ImDrawVert { | |
has ImVec2 $.pos; | |
has ImVec2 $.uv; | |
has uint32 $.col; | |
} | |
class ImVector_ImFontGlyph is repr<CStruct> { ... } | |
class ImVector_float is repr<CStruct> { ... } | |
class ImVector_ImWchar is repr<CStruct> { ... } | |
class ImFontGlyph { | |
has uint16 $.Codepoint; | |
has num32 $.AdvanceX; | |
has num32 $.X0; | |
has num32 $.Y0; | |
has num32 $.X1; | |
has num32 $.Y1; | |
has num32 $.U0; | |
has num32 $.V0; | |
has num32 $.U1; | |
has num32 $.V1; | |
} | |
class ImVector_int is repr<CStruct> { ... } | |
class ImGuiInputTextCallbackData { | |
has uint32 $.EventFlag; | |
has uint32 $.Flags; | |
has Pointer $.UserData; | |
has uint16 $.EventChar; | |
has uint32 $.EventKey; | |
has Str $.Buf; | |
has int32 $.BufTextLen; | |
has int32 $.BufSize; | |
has int32 $.BufDirty; | |
has int32 $.CursorPos; | |
has int32 $.SelectionStart; | |
has int32 $.SelectionEnd; | |
} | |
class ImGuiListClipper { | |
has num32 $.StartPosY; | |
has num32 $.ItemsHeight; | |
has int32 $.ItemsCount; | |
has int32 $.StepNo; | |
has int32 $.DisplayStart; | |
has int32 $.DisplayEnd; | |
} | |
class ImGuiOnceUponAFrame { | |
has int32 $.RefFrame; | |
} | |
class ImGuiSizeCallbackData { | |
has Pointer $.UserData; | |
has ImVec2 $.Pos; | |
has ImVec2 $.CurrentSize; | |
has ImVec2 $.DesiredSize; | |
} | |
class ImVector_Pair is repr<CStruct> { ... } | |
class ImVector_char is repr<CStruct> { ... } | |
class ImVector_TextRange is repr<CStruct> { ... } | |
class ImVec2 { | |
has num32 $.x; | |
has num32 $.y; | |
} | |
class ImVec4 { | |
has num32 $.x; | |
has num32 $.y; | |
has num32 $.z; | |
has num32 $.w; | |
} | |
class TextRange { | |
has Str $.b; | |
has Str $.e; | |
} | |
class ImVector_ImDrawCmd { | |
has int32 $.Size; | |
has int32 $.Capacity; | |
has CArray[ImDrawCmd] $.Data; | |
} | |
class ImVector_ImFontGlyph { | |
has int32 $.Size; | |
has int32 $.Capacity; | |
has CArray[ImFontGlyph] $.Data; | |
} | |
class ImVector_float { | |
has int32 $.Size; | |
has int32 $.Capacity; | |
has CArray[float] $.Data; | |
} | |
class ImVector_ImWchar { | |
has int32 $.Size; | |
has int32 $.Capacity; | |
has CArray[ImWchar] $.Data; | |
} | |
class ImVector_int { | |
has int32 $.Size; | |
has int32 $.Capacity; | |
has CArray[int] $.Data; | |
} | |
class ImVector_Pair { | |
has int32 $.Size; | |
has int32 $.Capacity; | |
has CArray[Pair] $.Data; | |
} | |
class ImVector_char { | |
has int32 $.Size; | |
has int32 $.Capacity; | |
has CArray[char] $.Data; | |
} | |
class ImVector_TextRange { | |
has int32 $.Size; | |
has int32 $.Capacity; | |
has CArray[TextRange] $.Data; | |
} |
Still need to hand craft the following:
Function definition finished, but detected no match:
'bool igDragFloat2(const char* label,float v[2],float v_speed,float v_min,float v_max,const char* format,float power); bool igDragFloat3(const char* label,float v[3],float v_speed,float v_min,float v_max,const char* format,float power);'
Function definition finished, but detected no match:
'bool igDragInt3(const char* label,int v[3],float v_speed,int v_min,int v_max,const char* format); bool igDragInt4(const char* label,int v[4],float v_speed,int v_min,int v_max,const char* format);'
Function definition finished, but detected no match:
'bool igSliderFloat2(const char* label,float v[2],float v_min,float v_max,const char* format,float power); bool igSliderFloat3(const char* label,float v[3],float v_min,float v_max,const char* format,float power);'
Function definition finished, but detected no match:
'bool igSliderInt3(const char* label,int v[3],int v_min,int v_max,const char* format); bool igSliderInt4(const char* label,int v[4],int v_min,int v_max,const char* format);'
Function definition finished, but detected no match:
'bool igInputFloat3(const char* label,float v[3],const char* format,ImGuiInputTextFlags flags); bool igInputFloat4(const char* label,float v[4],const char* format,ImGuiInputTextFlags flags);'
Function definition finished, but detected no match:
'bool igInputInt3(const char* label,int v[3],ImGuiInputTextFlags flags); bool igInputInt4(const char* label,int v[4],ImGuiInputTextFlags flags);'
Function definition finished, but detected no match:
'bool igColorEdit4(const char* label,float col[4],ImGuiColorEditFlags flags); bool igColorPicker3(const char* label,float col[3],ImGuiColorEditFlags flags);'
Function definition finished, but detected no match:
'bool igTreeNodeStrStr(const char* str_id,const char* fmt,...); bool igTreeNodePtr(const void* ptr_id,const char* fmt,...);'
Function definition finished, but detected no match:
'void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* self,unsigned char** out_pixels,int* out_width,int* out_height,int* out_bytes_per_pixel); void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* self,unsigned char** out_pixels,int* out_width,int* out_height,int* out_bytes_per_pixel);'
Function definition finished, but detected no match:
'ImWchar* ImVector_ImWchar_erase(ImVector_ImWchar* self,ImWchar const * it); ImFontConfig* ImVector_ImFontConfig_erase(ImVector_ImFontConfig* self,ImFontConfig const * it);'
Function definition finished, but detected no match:
'ImFontGlyph* ImVector_ImFontGlyph_erase(ImVector_ImFontGlyph* self,ImFontGlyph const * it); TextRange* ImVector_TextRange_erase(ImVector_TextRange* self,TextRange const * it);'
Function definition finished, but detected no match:
'CustomRect* ImVector_CustomRect_erase(ImVector_CustomRect* self,CustomRect const * it); ImDrawChannel* ImVector_ImDrawChannel_erase(ImVector_ImDrawChannel* self,ImDrawChannel const * it);'
Function definition finished, but detected no match:
'char* ImVector_char_erase(ImVector_char* self,char const * it); ImTextureID* ImVector_ImTextureID_erase(ImVector_ImTextureID* self,ImTextureID const * it);'
Function definition finished, but detected no match:
'ImDrawVert* ImVector_ImDrawVert_erase(ImVector_ImDrawVert* self,ImDrawVert const * it); int* ImVector_int_erase(ImVector_int* self,int const * it);'
Function definition finished, but detected no match:
'Pair* ImVector_Pair_erase(ImVector_Pair* self,Pair const * it); ImFont** ImVector_ImFontPtr_erase(ImVector_ImFontPtr* self,ImFont* const * it);'
Function definition finished, but detected no match:
'ImVec4* ImVector_ImVec4_erase(ImVector_ImVec4* self,ImVec4 const * it); ImDrawCmd* ImVector_ImDrawCmd_erase(ImVector_ImDrawCmd* self,ImDrawCmd const * it);'
Function definition finished, but detected no match:
'ImDrawIdx* ImVector_ImDrawIdx_erase(ImVector_ImDrawIdx* self,ImDrawIdx const * it); ImVec2* ImVector_ImVec2_erase(ImVector_ImVec2* self,ImVec2 const * it);'
Function definition finished, but detected no match:
'float* ImVector_float_eraseTPtr(ImVector_float* self,float const * it,float const * it_last); ImWchar* ImVector_ImWchar_eraseTPtr(ImVector_ImWchar* self,ImWchar const * it,ImWchar const * it_last);'
Function definition finished, but detected no match:
'ImFontConfig* ImVector_ImFontConfig_eraseTPtr(ImVector_ImFontConfig* self,ImFontConfig const * it,ImFontConfig const * it_last); ImFontGlyph* ImVector_ImFontGlyph_eraseTPtr(ImVector_ImFontGlyph* self,ImFontGlyph const * it,ImFontGlyph const * it_last);'
Function definition finished, but detected no match:
'TextRange* ImVector_TextRange_eraseTPtr(ImVector_TextRange* self,TextRange const * it,TextRange const * it_last); CustomRect* ImVector_CustomRect_eraseTPtr(ImVector_CustomRect* self,CustomRect const * it,CustomRect const * it_last);'
Function definition finished, but detected no match:
'ImDrawChannel* ImVector_ImDrawChannel_eraseTPtr(ImVector_ImDrawChannel* self,ImDrawChannel const * it,ImDrawChannel const * it_last); char* ImVector_char_eraseTPtr(ImVector_char* self,char const * it,char const * it_last);'
Function definition finished, but detected no match:
'ImTextureID* ImVector_ImTextureID_eraseTPtr(ImVector_ImTextureID* self,ImTextureID const * it,ImTextureID const * it_last); ImDrawVert* ImVector_ImDrawVert_eraseTPtr(ImVector_ImDrawVert* self,ImDrawVert const * it,ImDrawVert const * it_last);'
Function definition finished, but detected no match:
'int* ImVector_int_eraseTPtr(ImVector_int* self,int const * it,int const * it_last); Pair* ImVector_Pair_eraseTPtr(ImVector_Pair* self,Pair const * it,Pair const * it_last);'
Function definition finished, but detected no match:
'ImFont** ImVector_ImFontPtr_eraseTPtr(ImVector_ImFontPtr* self,ImFont* const * it,ImFont* const * it_last); ImVec4* ImVector_ImVec4_eraseTPtr(ImVector_ImVec4* self,ImVec4 const * it,ImVec4 const * it_last);'
Function definition finished, but detected no match:
'ImDrawCmd* ImVector_ImDrawCmd_eraseTPtr(ImVector_ImDrawCmd* self,ImDrawCmd const * it,ImDrawCmd const * it_last); ImDrawIdx* ImVector_ImDrawIdx_eraseTPtr(ImVector_ImDrawIdx* self,ImDrawIdx const * it,ImDrawIdx const * it_last);'
Function definition finished, but detected no match:
'ImVec2* ImVector_ImVec2_eraseTPtr(ImVector_ImVec2* self,ImVec2 const * it,ImVec2 const * it_last); float* ImVector_float_erase_unsorted(ImVector_float* self,float const * it);'
Function definition finished, but detected no match:
'ImWchar* ImVector_ImWchar_erase_unsorted(ImVector_ImWchar* self,ImWchar const * it); ImFontConfig* ImVector_ImFontConfig_erase_unsorted(ImVector_ImFontConfig* self,ImFontConfig const * it);'
Function definition finished, but detected no match:
'ImFontGlyph* ImVector_ImFontGlyph_erase_unsorted(ImVector_ImFontGlyph* self,ImFontGlyph const * it); TextRange* ImVector_TextRange_erase_unsorted(ImVector_TextRange* self,TextRange const * it);'
Function definition finished, but detected no match:
'CustomRect* ImVector_CustomRect_erase_unsorted(ImVector_CustomRect* self,CustomRect const * it); ImDrawChannel* ImVector_ImDrawChannel_erase_unsorted(ImVector_ImDrawChannel* self,ImDrawChannel const * it);'
Function definition finished, but detected no match:
'char* ImVector_char_erase_unsorted(ImVector_char* self,char const * it); ImTextureID* ImVector_ImTextureID_erase_unsorted(ImVector_ImTextureID* self,ImTextureID const * it);'
Function definition finished, but detected no match:
'ImDrawVert* ImVector_ImDrawVert_erase_unsorted(ImVector_ImDrawVert* self,ImDrawVert const * it); int* ImVector_int_erase_unsorted(ImVector_int* self,int const * it);'
Function definition finished, but detected no match:
'Pair* ImVector_Pair_erase_unsorted(ImVector_Pair* self,Pair const * it); ImFont** ImVector_ImFontPtr_erase_unsorted(ImVector_ImFontPtr* self,ImFont* const * it);'
Function definition finished, but detected no match:
'ImVec4* ImVector_ImVec4_erase_unsorted(ImVector_ImVec4* self,ImVec4 const * it); ImDrawCmd* ImVector_ImDrawCmd_erase_unsorted(ImVector_ImDrawCmd* self,ImDrawCmd const * it);'
Function definition finished, but detected no match:
'ImDrawIdx* ImVector_ImDrawIdx_erase_unsorted(ImVector_ImDrawIdx* self,ImDrawIdx const * it); ImVec2* ImVector_ImVec2_erase_unsorted(ImVector_ImVec2* self,ImVec2 const * it);'
Function definition finished, but detected no match:
'float* ImVector_float_insert(ImVector_float* self,float const * it,const float v); ImWchar* ImVector_ImWchar_insert(ImVector_ImWchar* self,ImWchar const * it,const ImWchar v);'
Function definition finished, but detected no match:
'ImFontConfig* ImVector_ImFontConfig_insert(ImVector_ImFontConfig* self,ImFontConfig const * it,const ImFontConfig v); ImFontGlyph* ImVector_ImFontGlyph_insert(ImVector_ImFontGlyph* self,ImFontGlyph const * it,const ImFontGlyph v);'
Function definition finished, but detected no match:
'TextRange* ImVector_TextRange_insert(ImVector_TextRange* self,TextRange const * it,const TextRange v); CustomRect* ImVector_CustomRect_insert(ImVector_CustomRect* self,CustomRect const * it,const CustomRect v);'
Function definition finished, but detected no match:
'ImDrawChannel* ImVector_ImDrawChannel_insert(ImVector_ImDrawChannel* self,ImDrawChannel const * it,const ImDrawChannel v); char* ImVector_char_insert(ImVector_char* self,char const * it,const char v);'
Function definition finished, but detected no match:
'ImTextureID* ImVector_ImTextureID_insert(ImVector_ImTextureID* self,ImTextureID const * it,const ImTextureID v); ImDrawVert* ImVector_ImDrawVert_insert(ImVector_ImDrawVert* self,ImDrawVert const * it,const ImDrawVert v);'
Function definition finished, but detected no match:
'int* ImVector_int_insert(ImVector_int* self,int const * it,const int v); Pair* ImVector_Pair_insert(ImVector_Pair* self,Pair const * it,const Pair v);'
Function definition finished, but detected no match:
'ImFont** ImVector_ImFontPtr_insert(ImVector_ImFontPtr* self,ImFont* const * it,ImFont* const v); ImVec4* ImVector_ImVec4_insert(ImVector_ImVec4* self,ImVec4 const * it,const ImVec4 v);'
Function definition finished, but detected no match:
'ImDrawCmd* ImVector_ImDrawCmd_insert(ImVector_ImDrawCmd* self,ImDrawCmd const * it,const ImDrawCmd v); ImDrawIdx* ImVector_ImDrawIdx_insert(ImVector_ImDrawIdx* self,ImDrawIdx const * it,const ImDrawIdx v);'
Function definition finished, but detected no match:
'int ImVector_ImWchar_index_from_ptr(const ImVector_ImWchar* self,ImWchar const * it); int ImVector_ImFontConfig_index_from_ptr(const ImVector_ImFontConfig* self,ImFontConfig const * it);'
Function definition finished, but detected no match:
'int ImVector_ImFontGlyph_index_from_ptr(const ImVector_ImFontGlyph* self,ImFontGlyph const * it); int ImVector_TextRange_index_from_ptr(const ImVector_TextRange* self,TextRange const * it);'
Function definition finished, but detected no match:
'int ImVector_CustomRect_index_from_ptr(const ImVector_CustomRect* self,CustomRect const * it); int ImVector_ImDrawChannel_index_from_ptr(const ImVector_ImDrawChannel* self,ImDrawChannel const * it);'
Function definition finished, but detected no match:
'int ImVector_char_index_from_ptr(const ImVector_char* self,char const * it); int ImVector_ImTextureID_index_from_ptr(const ImVector_ImTextureID* self,ImTextureID const * it);'
Function definition finished, but detected no match:
'int ImVector_ImDrawVert_index_from_ptr(const ImVector_ImDrawVert* self,ImDrawVert const * it); int ImVector_int_index_from_ptr(const ImVector_int* self,int const * it);'
Function definition finished, but detected no match:
'int ImVector_Pair_index_from_ptr(const ImVector_Pair* self,Pair const * it); int ImVector_ImFontPtr_index_from_ptr(const ImVector_ImFontPtr* self,ImFont* const * it);'
Function definition finished, but detected no match:
'int ImVector_ImVec4_index_from_ptr(const ImVector_ImVec4* self,ImVec4 const * it); int ImVector_ImDrawCmd_index_from_ptr(const ImVector_ImDrawCmd* self,ImDrawCmd const * it);'
Function definition finished, but detected no match:
'int ImVector_ImDrawIdx_index_from_ptr(const ImVector_ImDrawIdx* self,ImDrawIdx const * it); int ImVector_ImVec2_index_from_ptr(const ImVector_ImVec2* self,ImVec2 const * it);'
Function definition finished, but detected no match:
'void igLogText(CONST char *fmt, ...); void ImGuiTextBuffer_appendf(struct ImGuiTextBuffer *buffer, const char *fmt, ...);'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh, hey! Look at that!: