diff --git a/copies.odin b/copies.odin index 7276fbb..8f521ca 100644 --- a/copies.odin +++ b/copies.odin @@ -18,6 +18,10 @@ Alloc_Func :: #type proc "c" (size: i64, user_data: rawptr) -> rawptr; Free_Func :: #type proc "c" (ptr: rawptr, user_data: rawptr); +Mem_Alloc_Func :: #type proc "c" (size: i64, user_data: rawptr) -> rawptr; + +Mem_Free_Func :: #type proc "c" (ptr: rawptr, user_data: rawptr); + Items_Getter_Proc :: #type proc "c" (data: rawptr, idx: i32, out_text: ^cstring) -> bool; Value_Getter_Proc :: #type proc "c" (data: rawptr, idx: i32) -> f32; @@ -28,9 +32,11 @@ Input_Text_Callback :: #type proc "c" (data: ^Input_Text_Callback_Data) -> int; Size_Callback :: #type proc "c" (data: ^Size_Callback_Data); -Draw_List_Shared_Data :: opaque struct {}; +Draw_List_Shared_Data :: struct {}; + +Context :: struct {}; -Context :: opaque struct {}; +Font_Builder_Io :: struct {}; Im_Vector :: struct(T : typeid) { size: i32, diff --git a/enums.odin b/enums.odin index 1019c3d..524bfcd 100644 --- a/enums.odin +++ b/enums.odin @@ -1,16 +1,20 @@ package imgui; -Draw_Corner_Flags :: enum i32 { - None = 0, - TopLeft = 1 << 0, - TopRight = 1 << 1, - BotLeft = 1 << 2, - BotRight = 1 << 3, - Top = TopLeft | TopRight, - Bot = BotLeft | BotRight, - Left = TopLeft | BotLeft, - Right = TopRight | BotRight, - All = 0xF, +Draw_Flags :: enum i32 { + None = 0, + Closed = 1 << 0, + RoundCornersTopLeft = 1 << 4, + RoundCornersTopRight = 1 << 5, + RoundCornersBottomLeft = 1 << 6, + RoundCornersBottomRight = 1 << 7, + RoundCornersNone = 1 << 8, + RoundCornersTop = RoundCornersTopLeft | RoundCornersTopRight, + RoundCornersBottom = RoundCornersBottomLeft | RoundCornersBottomRight, + RoundCornersLeft = RoundCornersBottomLeft | RoundCornersTopLeft, + RoundCornersRight = RoundCornersBottomRight | RoundCornersTopRight, + RoundCornersAll = RoundCornersTopLeft | RoundCornersTopRight | RoundCornersBottomLeft | RoundCornersBottomRight, + RoundCornersDefault = RoundCornersAll, + RoundCornersMask = RoundCornersAll | RoundCornersNone, } Draw_List_Flags :: enum i32 { @@ -88,13 +92,18 @@ Col :: enum i32 { PlotLinesHovered = 39, PlotHistogram = 40, PlotHistogramHovered = 41, - TextSelectedBg = 42, - DragDropTarget = 43, - NavHighlight = 44, - NavWindowingHighlight = 45, - NavWindowingDimBg = 46, - ModalWindowDimBg = 47, - Count = 48, + TableHeaderBg = 42, + TableBorderStrong = 43, + TableBorderLight = 44, + TableRowBg = 45, + TableRowBgAlt = 46, + TextSelectedBg = 47, + DragDropTarget = 48, + NavHighlight = 49, + NavWindowingHighlight = 50, + NavWindowingDimBg = 51, + ModalWindowDimBg = 52, + Count = 53, } Color_Edit_Flags :: enum i32 { @@ -234,7 +243,7 @@ Input_Text_Flags :: enum i32 { AllowTabInput = 1 << 10, CtrlEnterForNewLine = 1 << 11, NoHorizontalScroll = 1 << 12, - AlwaysInsertMode = 1 << 13, + AlwaysOverwrite = 1 << 13, ReadOnly = 1 << 14, Password = 1 << 15, NoUndoRedo = 1 << 16, @@ -358,6 +367,12 @@ Slider_Flags :: enum i32 { InvalidMask = 0x7000000F, } +Sort_Direction :: enum i32 { + None = 0, + Ascending = 1, + Descending = 2, +} + Style_Var :: enum i32 { Alpha = 0, WindowPadding = 1, @@ -375,14 +390,15 @@ Style_Var :: enum i32 { ItemSpacing = 13, ItemInnerSpacing = 14, IndentSpacing = 15, - ScrollbarSize = 16, - ScrollbarRounding = 17, - GrabMinSize = 18, - GrabRounding = 19, - TabRounding = 20, - ButtonTextAlign = 21, - SelectableTextAlign = 22, - Count = 23, + CellPadding = 16, + ScrollbarSize = 17, + ScrollbarRounding = 18, + GrabMinSize = 19, + GrabRounding = 20, + TabRounding = 21, + ButtonTextAlign = 22, + SelectableTextAlign = 23, + Count = 24, } Tab_Bar_Flags :: enum i32 { @@ -411,6 +427,85 @@ Tab_Item_Flags :: enum i32 { Trailing = 1 << 7, } +Table_Bg_Target :: enum i32 { + None = 0, + RowBg0 = 1, + RowBg1 = 2, + CellBg = 3, +} + +Table_Column_Flags :: enum i32 { + None = 0, + DefaultHide = 1 << 0, + DefaultSort = 1 << 1, + WidthStretch = 1 << 2, + WidthFixed = 1 << 3, + NoResize = 1 << 4, + NoReorder = 1 << 5, + NoHide = 1 << 6, + NoClip = 1 << 7, + NoSort = 1 << 8, + NoSortAscending = 1 << 9, + NoSortDescending = 1 << 10, + NoHeaderWidth = 1 << 11, + PreferSortAscending = 1 << 12, + PreferSortDescending = 1 << 13, + IndentEnable = 1 << 14, + IndentDisable = 1 << 15, + IsEnabled = 1 << 20, + IsVisible = 1 << 21, + IsSorted = 1 << 22, + IsHovered = 1 << 23, + WidthMask = WidthStretch | WidthFixed, + IndentMask = IndentEnable | IndentDisable, + StatusMask = IsEnabled | IsVisible | IsSorted | IsHovered, + NoDirectResize = 1 << 30, +} + +Table_Flags :: enum i32 { + None = 0, + Resizable = 1 << 0, + Reorderable = 1 << 1, + Hideable = 1 << 2, + Sortable = 1 << 3, + NoSavedSettings = 1 << 4, + ContextMenuInBody = 1 << 5, + RowBg = 1 << 6, + BordersInnerH = 1 << 7, + BordersOuterH = 1 << 8, + BordersInnerV = 1 << 9, + BordersOuterV = 1 << 10, + BordersH = BordersInnerH | BordersOuterH, + BordersV = BordersInnerV | BordersOuterV, + BordersInner = BordersInnerV | BordersInnerH, + BordersOuter = BordersOuterV | BordersOuterH, + Borders = BordersInner | BordersOuter, + NoBordersInBody = 1 << 11, + NoBordersInBodyUntilResize = 1 << 12, + SizingFixedFit = 1 << 13, + SizingFixedSame = 2 << 13, + SizingStretchProp = 3 << 13, + SizingStretchSame = 4 << 13, + NoHostExtendX = 1 << 16, + NoHostExtendY = 1 << 17, + NoKeepColumnsVisible = 1 << 18, + PreciseWidths = 1 << 19, + NoClip = 1 << 20, + PadOuterX = 1 << 21, + NoPadOuterX = 1 << 22, + NoPadInnerX = 1 << 23, + ScrollX = 1 << 24, + ScrollY = 1 << 25, + SortMulti = 1 << 26, + SortTristate = 1 << 27, + SizingMask = SizingFixedFit | SizingFixedSame | SizingStretchProp | SizingStretchSame, +} + +Table_Row_Flags :: enum i32 { + None = 0, + Headers = 1 << 0, +} + Tree_Node_Flags :: enum i32 { None = 0, Selected = 1 << 0, @@ -430,6 +525,13 @@ Tree_Node_Flags :: enum i32 { CollapsingHeader = Framed | NoTreePushOnOpen | NoAutoOpenOnLog, } +Viewport_Flags :: enum i32 { + None = 0, + IsPlatformWindow = 1 << 0, + IsPlatformMonitor = 1 << 1, + OwnedByApp = 1 << 2, +} + Window_Flags :: enum i32 { None = 0, NoTitleBar = 1 << 0, diff --git a/external/cimgui.lib b/external/cimgui.lib index 6671075..accfa65 100644 Binary files a/external/cimgui.lib and b/external/cimgui.lib differ diff --git a/external/cimgui_debug.lib b/external/cimgui_debug.lib index 52dad0e..96ddca7 100644 Binary files a/external/cimgui_debug.lib and b/external/cimgui_debug.lib differ diff --git a/external/cimgui_debug.pdb b/external/cimgui_debug.pdb index c2dbbbb..6d542ce 100644 Binary files a/external/cimgui_debug.pdb and b/external/cimgui_debug.pdb differ diff --git a/foreign.odin b/foreign.odin index d778c6a..415a726 100644 --- a/foreign.odin +++ b/foreign.odin @@ -21,62 +21,67 @@ foreign cimgui { ImDrawListSplitter_SetCurrentChannel :: proc(self: ^Draw_List_Splitter, draw_list: ^Draw_List, channel_idx: i32) ---; ImDrawListSplitter_Split :: proc(self: ^Draw_List_Splitter, draw_list: ^Draw_List, count: i32) ---; - ImDrawList_AddBezierCurve :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, col: u32, thickness: f32, num_segments: i32) ---; - ImDrawList_AddCallback :: proc(self: ^Draw_List, callback: Draw_Callback, callback_data: rawptr) ---; - ImDrawList_AddCircle :: proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments: i32, thickness: f32) ---; - ImDrawList_AddCircleFilled :: proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments: i32) ---; - ImDrawList_AddConvexPolyFilled :: proc(self: ^Draw_List, points: ^Vec2, num_points: i32, col: u32) ---; - ImDrawList_AddDrawCmd :: proc(self: ^Draw_List) ---; - ImDrawList_AddImage :: proc(self: ^Draw_List, user_texture_id: Texture_ID, p_min: Vec2, p_max: Vec2, uv_min: Vec2, uv_max: Vec2, col: u32) ---; - ImDrawList_AddImageQuad :: proc(self: ^Draw_List, user_texture_id: Texture_ID, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, uv1: Vec2, uv2: Vec2, uv3: Vec2, uv4: Vec2, col: u32) ---; - ImDrawList_AddImageRounded :: proc(self: ^Draw_List, user_texture_id: Texture_ID, p_min: Vec2, p_max: Vec2, uv_min: Vec2, uv_max: Vec2, col: u32, rounding: f32, rounding_corners: Draw_Corner_Flags) ---; - ImDrawList_AddLine :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, col: u32, thickness: f32) ---; - ImDrawList_AddNgon :: proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments: i32, thickness: f32) ---; - ImDrawList_AddNgonFilled :: proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments: i32) ---; - ImDrawList_AddPolyline :: proc(self: ^Draw_List, points: ^Vec2, num_points: i32, col: u32, closed: bool, thickness: f32) ---; - ImDrawList_AddQuad :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, col: u32, thickness: f32) ---; - ImDrawList_AddQuadFilled :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, col: u32) ---; - ImDrawList_AddRect :: proc(self: ^Draw_List, p_min: Vec2, p_max: Vec2, col: u32, rounding: f32, rounding_corners: Draw_Corner_Flags, thickness: f32) ---; - ImDrawList_AddRectFilled :: proc(self: ^Draw_List, p_min: Vec2, p_max: Vec2, col: u32, rounding: f32, rounding_corners: Draw_Corner_Flags) ---; - ImDrawList_AddRectFilledMultiColor :: proc(self: ^Draw_List, p_min: Vec2, p_max: Vec2, col_upr_left: u32, col_upr_right: u32, col_bot_right: u32, col_bot_left: u32) ---; - ImDrawList_AddTextVec2 :: proc(self: ^Draw_List, pos: Vec2, col: u32, text_begin: cstring, text_end: cstring) ---; - ImDrawList_AddTextFontPtr :: proc(self: ^Draw_List, font: ^ImFont, font_size: f32, pos: Vec2, col: u32, text_begin: cstring, text_end: cstring, wrap_width: f32, cpu_fine_clip_rect: ^Vec4) ---; - ImDrawList_AddTriangle :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, col: u32, thickness: f32) ---; - ImDrawList_AddTriangleFilled :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, col: u32) ---; - ImDrawList_ChannelsMerge :: proc(self: ^Draw_List) ---; - ImDrawList_ChannelsSetCurrent :: proc(self: ^Draw_List, n: i32) ---; - ImDrawList_ChannelsSplit :: proc(self: ^Draw_List, count: i32) ---; - ImDrawList_CloneOutput :: proc(self: ^Draw_List) -> ^Draw_List ---; - ImDrawList_GetClipRectMax :: proc(pOut: ^Vec2, self: ^Draw_List) ---; - ImDrawList_GetClipRectMin :: proc(pOut: ^Vec2, self: ^Draw_List) ---; - ImDrawList_PathArcTo :: proc(self: ^Draw_List, center: Vec2, radius: f32, a_min: f32, a_max: f32, num_segments: i32) ---; - ImDrawList_PathArcToFast :: proc(self: ^Draw_List, center: Vec2, radius: f32, a_min_of_12: i32, a_max_of_12: i32) ---; - ImDrawList_PathBezierCurveTo :: proc(self: ^Draw_List, p2: Vec2, p3: Vec2, p4: Vec2, num_segments: i32) ---; - ImDrawList_PathClear :: proc(self: ^Draw_List) ---; - ImDrawList_PathFillConvex :: proc(self: ^Draw_List, col: u32) ---; - ImDrawList_PathLineTo :: proc(self: ^Draw_List, pos: Vec2) ---; - ImDrawList_PathLineToMergeDuplicate :: proc(self: ^Draw_List, pos: Vec2) ---; - ImDrawList_PathRect :: proc(self: ^Draw_List, rect_min: Vec2, rect_max: Vec2, rounding: f32, rounding_corners: Draw_Corner_Flags) ---; - ImDrawList_PathStroke :: proc(self: ^Draw_List, col: u32, closed: bool, thickness: f32) ---; - ImDrawList_PopClipRect :: proc(self: ^Draw_List) ---; - ImDrawList_PopTextureID :: proc(self: ^Draw_List) ---; - ImDrawList_PrimQuadUV :: proc(self: ^Draw_List, a: Vec2, b: Vec2, c: Vec2, d: Vec2, uv_a: Vec2, uv_b: Vec2, uv_c: Vec2, uv_d: Vec2, col: u32) ---; - ImDrawList_PrimRect :: proc(self: ^Draw_List, a: Vec2, b: Vec2, col: u32) ---; - ImDrawList_PrimRectUV :: proc(self: ^Draw_List, a: Vec2, b: Vec2, uv_a: Vec2, uv_b: Vec2, col: u32) ---; - ImDrawList_PrimReserve :: proc(self: ^Draw_List, idx_count: i32, vtx_count: i32) ---; - ImDrawList_PrimUnreserve :: proc(self: ^Draw_List, idx_count: i32, vtx_count: i32) ---; - ImDrawList_PrimVtx :: proc(self: ^Draw_List, pos: Vec2, uv: Vec2, col: u32) ---; - ImDrawList_PrimWriteIdx :: proc(self: ^Draw_List, idx: Draw_Idx) ---; - ImDrawList_PrimWriteVtx :: proc(self: ^Draw_List, pos: Vec2, uv: Vec2, col: u32) ---; - ImDrawList_PushClipRect :: proc(self: ^Draw_List, clip_rect_min: Vec2, clip_rect_max: Vec2, intersect_with_current_clip_rect: bool) ---; - ImDrawList_PushClipRectFullScreen :: proc(self: ^Draw_List) ---; - ImDrawList_PushTextureID :: proc(self: ^Draw_List, texture_id: Texture_ID) ---; - ImDrawList__ClearFreeMemory :: proc(self: ^Draw_List) ---; - ImDrawList__OnChangedClipRect :: proc(self: ^Draw_List) ---; - ImDrawList__OnChangedTextureID :: proc(self: ^Draw_List) ---; - ImDrawList__OnChangedVtxOffset :: proc(self: ^Draw_List) ---; - ImDrawList__PopUnusedDrawCmd :: proc(self: ^Draw_List) ---; - ImDrawList__ResetForNewFrame :: proc(self: ^Draw_List) ---; + ImDrawList_AddBezierCubic :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, col: u32, thickness: f32, num_segments: i32) ---; + ImDrawList_AddBezierQuadratic :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, col: u32, thickness: f32, num_segments: i32) ---; + ImDrawList_AddCallback :: proc(self: ^Draw_List, callback: Draw_Callback, callback_data: rawptr) ---; + ImDrawList_AddCircle :: proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments: i32, thickness: f32) ---; + ImDrawList_AddCircleFilled :: proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments: i32) ---; + ImDrawList_AddConvexPolyFilled :: proc(self: ^Draw_List, points: ^Vec2, num_points: i32, col: u32) ---; + ImDrawList_AddDrawCmd :: proc(self: ^Draw_List) ---; + ImDrawList_AddImage :: proc(self: ^Draw_List, user_texture_id: Texture_ID, p_min: Vec2, p_max: Vec2, uv_min: Vec2, uv_max: Vec2, col: u32) ---; + ImDrawList_AddImageQuad :: proc(self: ^Draw_List, user_texture_id: Texture_ID, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, uv1: Vec2, uv2: Vec2, uv3: Vec2, uv4: Vec2, col: u32) ---; + ImDrawList_AddImageRounded :: proc(self: ^Draw_List, user_texture_id: Texture_ID, p_min: Vec2, p_max: Vec2, uv_min: Vec2, uv_max: Vec2, col: u32, rounding: f32, flags: Draw_Flags) ---; + ImDrawList_AddLine :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, col: u32, thickness: f32) ---; + ImDrawList_AddNgon :: proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments: i32, thickness: f32) ---; + ImDrawList_AddNgonFilled :: proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments: i32) ---; + ImDrawList_AddPolyline :: proc(self: ^Draw_List, points: ^Vec2, num_points: i32, col: u32, flags: Draw_Flags, thickness: f32) ---; + ImDrawList_AddQuad :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, col: u32, thickness: f32) ---; + ImDrawList_AddQuadFilled :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, col: u32) ---; + ImDrawList_AddRect :: proc(self: ^Draw_List, p_min: Vec2, p_max: Vec2, col: u32, rounding: f32, flags: Draw_Flags, thickness: f32) ---; + ImDrawList_AddRectFilled :: proc(self: ^Draw_List, p_min: Vec2, p_max: Vec2, col: u32, rounding: f32, flags: Draw_Flags) ---; + ImDrawList_AddRectFilledMultiColor :: proc(self: ^Draw_List, p_min: Vec2, p_max: Vec2, col_upr_left: u32, col_upr_right: u32, col_bot_right: u32, col_bot_left: u32) ---; + ImDrawList_AddText_Vec2 :: proc(self: ^Draw_List, pos: Vec2, col: u32, text_begin: cstring, text_end: cstring) ---; + ImDrawList_AddText_FontPtr :: proc(self: ^Draw_List, font: ^ImFont, font_size: f32, pos: Vec2, col: u32, text_begin: cstring, text_end: cstring, wrap_width: f32, cpu_fine_clip_rect: ^Vec4) ---; + ImDrawList_AddTriangle :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, col: u32, thickness: f32) ---; + ImDrawList_AddTriangleFilled :: proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, col: u32) ---; + ImDrawList_ChannelsMerge :: proc(self: ^Draw_List) ---; + ImDrawList_ChannelsSetCurrent :: proc(self: ^Draw_List, n: i32) ---; + ImDrawList_ChannelsSplit :: proc(self: ^Draw_List, count: i32) ---; + ImDrawList_CloneOutput :: proc(self: ^Draw_List) -> ^Draw_List ---; + ImDrawList_GetClipRectMax :: proc(pOut: ^Vec2, self: ^Draw_List) ---; + ImDrawList_GetClipRectMin :: proc(pOut: ^Vec2, self: ^Draw_List) ---; + ImDrawList_PathArcTo :: proc(self: ^Draw_List, center: Vec2, radius: f32, a_min: f32, a_max: f32, num_segments: i32) ---; + ImDrawList_PathArcToFast :: proc(self: ^Draw_List, center: Vec2, radius: f32, a_min_of_12: i32, a_max_of_12: i32) ---; + ImDrawList_PathBezierCubicCurveTo :: proc(self: ^Draw_List, p2: Vec2, p3: Vec2, p4: Vec2, num_segments: i32) ---; + ImDrawList_PathBezierQuadraticCurveTo :: proc(self: ^Draw_List, p2: Vec2, p3: Vec2, num_segments: i32) ---; + ImDrawList_PathClear :: proc(self: ^Draw_List) ---; + ImDrawList_PathFillConvex :: proc(self: ^Draw_List, col: u32) ---; + ImDrawList_PathLineTo :: proc(self: ^Draw_List, pos: Vec2) ---; + ImDrawList_PathLineToMergeDuplicate :: proc(self: ^Draw_List, pos: Vec2) ---; + ImDrawList_PathRect :: proc(self: ^Draw_List, rect_min: Vec2, rect_max: Vec2, rounding: f32, flags: Draw_Flags) ---; + ImDrawList_PathStroke :: proc(self: ^Draw_List, col: u32, flags: Draw_Flags, thickness: f32) ---; + ImDrawList_PopClipRect :: proc(self: ^Draw_List) ---; + ImDrawList_PopTextureID :: proc(self: ^Draw_List) ---; + ImDrawList_PrimQuadUV :: proc(self: ^Draw_List, a: Vec2, b: Vec2, c: Vec2, d: Vec2, uv_a: Vec2, uv_b: Vec2, uv_c: Vec2, uv_d: Vec2, col: u32) ---; + ImDrawList_PrimRect :: proc(self: ^Draw_List, a: Vec2, b: Vec2, col: u32) ---; + ImDrawList_PrimRectUV :: proc(self: ^Draw_List, a: Vec2, b: Vec2, uv_a: Vec2, uv_b: Vec2, col: u32) ---; + ImDrawList_PrimReserve :: proc(self: ^Draw_List, idx_count: i32, vtx_count: i32) ---; + ImDrawList_PrimUnreserve :: proc(self: ^Draw_List, idx_count: i32, vtx_count: i32) ---; + ImDrawList_PrimVtx :: proc(self: ^Draw_List, pos: Vec2, uv: Vec2, col: u32) ---; + ImDrawList_PrimWriteIdx :: proc(self: ^Draw_List, idx: Draw_Idx) ---; + ImDrawList_PrimWriteVtx :: proc(self: ^Draw_List, pos: Vec2, uv: Vec2, col: u32) ---; + ImDrawList_PushClipRect :: proc(self: ^Draw_List, clip_rect_min: Vec2, clip_rect_max: Vec2, intersect_with_current_clip_rect: bool) ---; + ImDrawList_PushClipRectFullScreen :: proc(self: ^Draw_List) ---; + ImDrawList_PushTextureID :: proc(self: ^Draw_List, texture_id: Texture_ID) ---; + ImDrawList__CalcCircleAutoSegmentCount :: proc(self: ^Draw_List, radius: f32) -> i32 ---; + ImDrawList__ClearFreeMemory :: proc(self: ^Draw_List) ---; + ImDrawList__OnChangedClipRect :: proc(self: ^Draw_List) ---; + ImDrawList__OnChangedTextureID :: proc(self: ^Draw_List) ---; + ImDrawList__OnChangedVtxOffset :: proc(self: ^Draw_List) ---; + ImDrawList__PathArcToFastEx :: proc(self: ^Draw_List, center: Vec2, radius: f32, a_min_sample: i32, a_max_sample: i32, a_step: i32) ---; + ImDrawList__PathArcToN :: proc(self: ^Draw_List, center: Vec2, radius: f32, a_min: f32, a_max: f32, num_segments: i32) ---; + ImDrawList__PopUnusedDrawCmd :: proc(self: ^Draw_List) ---; + ImDrawList__ResetForNewFrame :: proc(self: ^Draw_List) ---; ImFontAtlasCustomRect_IsPacked :: proc(self: ^Font_Atlas_Custom_Rect) -> bool ---; @@ -192,17 +197,21 @@ foreign cimgui { ImGuiTextRange_empty :: proc(self: ^Text_Range) -> bool ---; ImGuiTextRange_split :: proc(self: ^Text_Range, separator: i8, out: ^Im_Vector(Text_Range)) ---; + ImGuiViewport_GetCenter :: proc(pOut: ^Vec2, self: ^Viewport) ---; + ImGuiViewport_GetWorkCenter :: proc(pOut: ^Vec2, self: ^Viewport) ---; + igAcceptDragDropPayload :: proc(type: cstring, flags: Drag_Drop_Flags) -> ^Payload ---; igAlignTextToFramePadding :: proc() ---; igArrowButton :: proc(str_id: cstring, dir: Dir) -> bool ---; igBegin :: proc(name: cstring, p_open: ^bool, flags: Window_Flags) -> bool ---; - igBeginChildStr :: proc(str_id: cstring, size: Vec2, border: bool, flags: Window_Flags) -> bool ---; - igBeginChildID :: proc(id: ImID, size: Vec2, border: bool, flags: Window_Flags) -> bool ---; + igBeginChild_Str :: proc(str_id: cstring, size: Vec2, border: bool, flags: Window_Flags) -> bool ---; + igBeginChild_ID :: proc(id: ImID, size: Vec2, border: bool, flags: Window_Flags) -> bool ---; igBeginChildFrame :: proc(id: ImID, size: Vec2, flags: Window_Flags) -> bool ---; igBeginCombo :: proc(label: cstring, preview_value: cstring, flags: Combo_Flags) -> bool ---; igBeginDragDropSource :: proc(flags: Drag_Drop_Flags) -> bool ---; igBeginDragDropTarget :: proc() -> bool ---; igBeginGroup :: proc() ---; + igBeginListBox :: proc(label: cstring, size: Vec2) -> bool ---; igBeginMainMenuBar :: proc() -> bool ---; igBeginMenu :: proc(label: cstring, enabled: bool) -> bool ---; igBeginMenuBar :: proc() -> bool ---; @@ -213,6 +222,7 @@ foreign cimgui { igBeginPopupModal :: proc(name: cstring, p_open: ^bool, flags: Window_Flags) -> bool ---; igBeginTabBar :: proc(str_id: cstring, flags: Tab_Bar_Flags) -> bool ---; igBeginTabItem :: proc(label: cstring, p_open: ^bool, flags: Tab_Item_Flags) -> bool ---; + igBeginTable :: proc(str_id: cstring, column: i32, flags: Table_Flags, outer_size: Vec2, inner_width: f32) -> bool ---; igBeginTooltip :: proc() ---; igBullet :: proc() ---; igBulletText :: proc(fmt_: cstring, #c_vararg args: ..any) ---; @@ -223,10 +233,11 @@ foreign cimgui { igCaptureKeyboardFromApp :: proc(want_capture_keyboard_value: bool) ---; igCaptureMouseFromApp :: proc(want_capture_mouse_value: bool) ---; igCheckbox :: proc(label: cstring, v: ^bool) -> bool ---; - igCheckboxFlags :: proc(label: cstring, flags: ^u32, flags_value: u32) -> bool ---; + igCheckboxFlags_IntPtr :: proc(label: cstring, flags: ^i32, flags_value: i32) -> bool ---; + igCheckboxFlags_UintPtr :: proc(label: cstring, flags: ^u32, flags_value: u32) -> bool ---; igCloseCurrentPopup :: proc() ---; - igCollapsingHeaderTreeNodeFlags :: proc(label: cstring, flags: Tree_Node_Flags) -> bool ---; - igCollapsingHeaderBoolPtr :: proc(label: cstring, p_open: ^bool, flags: Tree_Node_Flags) -> bool ---; + igCollapsingHeader_TreeNodeFlags :: proc(label: cstring, flags: Tree_Node_Flags) -> bool ---; + igCollapsingHeader_BoolPtr :: proc(label: cstring, p_visible: ^bool, flags: Tree_Node_Flags) -> bool ---; igColorButton :: proc(desc_id: cstring, col: Vec4, flags: Color_Edit_Flags, size: Vec2) -> bool ---; igColorConvertFloat4ToU32 :: proc(in_: Vec4) -> u32 ---; igColorConvertHSVtoRGB :: proc(h: f32, s: f32, v: f32, out_r: ^f32, out_g: ^f32, out_b: ^f32) ---; @@ -237,9 +248,9 @@ foreign cimgui { igColorPicker3 :: proc(label: cstring, col: [3]f32, flags: Color_Edit_Flags) -> bool ---; igColorPicker4 :: proc(label: cstring, col: [4]f32, flags: Color_Edit_Flags, ref_col: ^f32) -> bool ---; igColumns :: proc(count: i32, id: cstring, border: bool) ---; - igComboStr_arr :: proc(label: cstring, current_item: ^i32, items: ^cstring, items_count: i32, popup_max_height_in_items: i32) -> bool --- - igComboStr :: proc(label: cstring, current_item: ^i32, items_separated_by_zeros: cstring, popup_max_height_in_items: i32) -> bool ---; - igComboFnBoolPtr :: proc(label: cstring, current_item: ^i32, items_getter: Items_Getter_Proc, data: rawptr, items_count: i32, popup_max_height_in_items: i32) -> bool --- + igCombo_Str_arr :: proc(label: cstring, current_item: ^i32, items: ^cstring, items_count: i32, popup_max_height_in_items: i32) -> bool --- + igCombo_Str :: proc(label: cstring, current_item: ^i32, items_separated_by_zeros: cstring, popup_max_height_in_items: i32) -> bool ---; + igCombo_FnBoolPtr :: proc(label: cstring, current_item: ^i32, items_getter: Items_Getter_Proc, data: rawptr, items_count: i32, popup_max_height_in_items: i32) -> bool --- igCreateContext :: proc(shared_font_atlas: ^Font_Atlas) -> ^Context ---; igDebugCheckVersionAndDataLayout :: proc(version_str: cstring, sz_io: uint, sz_style: uint, sz_vec2: uint, sz_vec4: uint, sz_drawvert: uint, sz_drawidx: uint) -> bool ---; igDestroyContext :: proc(ctx: ^Context) ---; @@ -264,18 +275,21 @@ foreign cimgui { igEndDragDropTarget :: proc() ---; igEndFrame :: proc() ---; igEndGroup :: proc() ---; + igEndListBox :: proc() ---; igEndMainMenuBar :: proc() ---; igEndMenu :: proc() ---; igEndMenuBar :: proc() ---; igEndPopup :: proc() ---; igEndTabBar :: proc() ---; igEndTabItem :: proc() ---; + igEndTable :: proc() ---; igEndTooltip :: proc() ---; - igGetBackgroundDrawList :: proc() -> ^Draw_List ---; + igGetAllocatorFunctions :: proc(p_alloc_func: ^Mem_Alloc_Func, p_free_func: ^Mem_Free_Func, p_user_data: ^rawptr) ---; + igGetBackgroundDrawList_Nil :: proc() -> ^Draw_List ---; igGetClipboardText :: proc() -> cstring ---; - igGetColorU32Col :: proc(idx: Col, alpha_mul: f32) -> u32 ---; - igGetColorU32Vec4 :: proc(col: Vec4) -> u32 ---; - igGetColorU32U32 :: proc(col: u32) -> u32 ---; + igGetColorU32_Col :: proc(idx: Col, alpha_mul: f32) -> u32 ---; + igGetColorU32_Vec4 :: proc(col: Vec4) -> u32 ---; + igGetColorU32_U32 :: proc(col: u32) -> u32 ---; igGetColumnIndex :: proc() -> i32 ---; igGetColumnOffset :: proc(column_index: i32) -> f32 ---; igGetColumnWidth :: proc(column_index: i32) -> f32 ---; @@ -294,19 +308,20 @@ foreign cimgui { igGetFont :: proc() -> ^ImFont ---; igGetFontSize :: proc() -> f32 ---; igGetFontTexUvWhitePixel :: proc(pOut: ^Vec2) ---; - igGetForegroundDrawListNil :: proc() -> ^Draw_List ---; + igGetForegroundDrawList_Nil :: proc() -> ^Draw_List ---; igGetFrameCount :: proc() -> i32 ---; igGetFrameHeight :: proc() -> f32 ---; igGetFrameHeightWithSpacing :: proc() -> f32 ---; - igGetIDStr :: proc(str_id: cstring) -> ImID ---; - igGetIDStrStr :: proc(str_id_begin: cstring, str_id_end: cstring) -> ImID ---; - igGetIDPtr :: proc(ptr_id: rawptr) -> ImID ---; + igGetID_Str :: proc(str_id: cstring) -> ImID ---; + igGetID_StrStr :: proc(str_id_begin: cstring, str_id_end: cstring) -> ImID ---; + igGetID_Ptr :: proc(ptr_id: rawptr) -> ImID ---; igGetIO :: proc() -> ^IO ---; igGetItemRectMax :: proc(pOut: ^Vec2) ---; igGetItemRectMin :: proc(pOut: ^Vec2) ---; igGetItemRectSize :: proc(pOut: ^Vec2) ---; igGetKeyIndex :: proc(imgui_key: Key) -> i32 ---; igGetKeyPressedAmount :: proc(key_index: i32, repeat_delay: f32, rate: f32) -> i32 ---; + igGetMainViewport :: proc() -> ^Viewport ---; igGetMouseCursor :: proc() -> Mouse_Cursor ---; igGetMouseDragDelta :: proc(pOut: ^Vec2, button: Mouse_Button, lock_threshold: f32) ---; igGetMousePos :: proc(pOut: ^Vec2) ---; @@ -374,19 +389,16 @@ foreign cimgui { igIsMouseHoveringRect :: proc(r_min: Vec2, r_max: Vec2, clip: bool) -> bool ---; igIsMousePosValid :: proc(mouse_pos: ^Vec2) -> bool ---; igIsMouseReleased :: proc(button: Mouse_Button) -> bool ---; - igIsPopupOpenStr :: proc(str_id: cstring, flags: Popup_Flags) -> bool ---; - igIsRectVisibleNil :: proc(size: Vec2) -> bool ---; - igIsRectVisibleVec2 :: proc(rect_min: Vec2, rect_max: Vec2) -> bool ---; + igIsPopupOpen_Str :: proc(str_id: cstring, flags: Popup_Flags) -> bool ---; + igIsRectVisible_Nil :: proc(size: Vec2) -> bool ---; + igIsRectVisible_Vec2 :: proc(rect_min: Vec2, rect_max: Vec2) -> bool ---; igIsWindowAppearing :: proc() -> bool ---; igIsWindowCollapsed :: proc() -> bool ---; igIsWindowFocused :: proc(flags: Focused_Flags) -> bool ---; igIsWindowHovered :: proc(flags: Hovered_Flags) -> bool ---; igLabelText :: proc(label: cstring, fmt_: cstring, #c_vararg args: ..any) ---; - igListBoxStr_arr :: proc(label: cstring, current_item: ^i32, items: cstring, items_count: i32, height_in_items: i32) -> bool ---; - igListBoxFnBoolPtr :: proc(label: cstring, current_item: ^i32, items_getter: Items_Getter_Proc, data: rawptr, items_count: i32, height_in_items: i32) -> bool --- - igListBoxFooter :: proc() ---; - igListBoxHeaderVec2 :: proc(label: cstring, size: Vec2) -> bool ---; - igListBoxHeaderInt :: proc(label: cstring, items_count: i32, height_in_items: i32) -> bool ---; + igListBox_Str_arr :: proc(label: cstring, current_item: ^i32, items: cstring, items_count: i32, height_in_items: i32) -> bool ---; + igListBox_FnBoolPtr :: proc(label: cstring, current_item: ^i32, items_getter: Items_Getter_Proc, data: rawptr, items_count: i32, height_in_items: i32) -> bool --- igLoadIniSettingsFromDisk :: proc(ini_filename: cstring) ---; igLoadIniSettingsFromMemory :: proc(ini_data: cstring, ini_size: uint) ---; igLogButtons :: proc() ---; @@ -397,17 +409,17 @@ foreign cimgui { igLogToTTY :: proc(auto_open_depth: i32) ---; igMemAlloc :: proc(size: uint) -> rawptr ---; igMemFree :: proc(ptr: rawptr) ---; - igMenuItemBool :: proc(label: cstring, shortcut: cstring, selected: bool, enabled: bool) -> bool ---; - igMenuItemBoolPtr :: proc(label: cstring, shortcut: cstring, p_selected: ^bool, enabled: bool) -> bool ---; + igMenuItem_Bool :: proc(label: cstring, shortcut: cstring, selected: bool, enabled: bool) -> bool ---; + igMenuItem_BoolPtr :: proc(label: cstring, shortcut: cstring, p_selected: ^bool, enabled: bool) -> bool ---; igNewFrame :: proc() ---; igNewLine :: proc() ---; igNextColumn :: proc() ---; igOpenPopup :: proc(str_id: cstring, popup_flags: Popup_Flags) ---; igOpenPopupOnItemClick :: proc(str_id: cstring, popup_flags: Popup_Flags) ---; - igPlotHistogramFloatPtr :: proc(label: cstring, values: ^f32, values_count: i32, values_offset: i32, overlay_text: cstring, scale_min: f32, scale_max: f32, graph_size: Vec2, stride: i32) ---; - igPlotHistogramFnFloatPtr :: proc(label: cstring, values_getter: Value_Getter_Proc, data: rawptr, values_count: i32, values_offset: i32, overlay_text: cstring, scale_min: f32, scale_max: f32, graph_size: Vec2) --- - igPlotLinesFloatPtr :: proc(label: cstring, values: ^f32, values_count: i32, values_offset: i32, overlay_text: cstring, scale_min: f32, scale_max: f32, graph_size: Vec2, stride: i32) ---; - igPlotLinesFnFloatPtr :: proc(label: cstring, values_getter: Value_Getter_Proc, data: rawptr, values_count: i32, values_offset: i32, overlay_text: cstring, scale_min: f32, scale_max: f32, graph_size: Vec2) --- + igPlotHistogram_FloatPtr :: proc(label: cstring, values: ^f32, values_count: i32, values_offset: i32, overlay_text: cstring, scale_min: f32, scale_max: f32, graph_size: Vec2, stride: i32) ---; + igPlotHistogram_FnFloatPtr :: proc(label: cstring, values_getter: Value_Getter_Proc, data: rawptr, values_count: i32, values_offset: i32, overlay_text: cstring, scale_min: f32, scale_max: f32, graph_size: Vec2) --- + igPlotLines_FloatPtr :: proc(label: cstring, values: ^f32, values_count: i32, values_offset: i32, overlay_text: cstring, scale_min: f32, scale_max: f32, graph_size: Vec2, stride: i32) ---; + igPlotLines_FnFloatPtr :: proc(label: cstring, values_getter: Value_Getter_Proc, data: rawptr, values_count: i32, values_offset: i32, overlay_text: cstring, scale_min: f32, scale_max: f32, graph_size: Vec2) --- igPopAllowKeyboardFocus :: proc() ---; igPopButtonRepeat :: proc() ---; igPopClipRect :: proc() ---; @@ -422,25 +434,25 @@ foreign cimgui { igPushButtonRepeat :: proc(repeat: bool) ---; igPushClipRect :: proc(clip_rect_min: Vec2, clip_rect_max: Vec2, intersect_with_current_clip_rect: bool) ---; igPushFont :: proc(font: ^ImFont) ---; - igPushIDStr :: proc(str_id: cstring) ---; - igPushIDStrStr :: proc(str_id_begin: cstring, str_id_end: cstring) ---; - igPushIDPtr :: proc(ptr_id: rawptr) ---; - igPushIDInt :: proc(int_id: i32) ---; + igPushID_Str :: proc(str_id: cstring) ---; + igPushID_StrStr :: proc(str_id_begin: cstring, str_id_end: cstring) ---; + igPushID_Ptr :: proc(ptr_id: rawptr) ---; + igPushID_Int :: proc(int_id: i32) ---; igPushItemWidth :: proc(item_width: f32) ---; - igPushStyleColorU32 :: proc(idx: Col, col: u32) ---; - igPushStyleColorVec4 :: proc(idx: Col, col: Vec4) ---; - igPushStyleVarFloat :: proc(idx: Style_Var, val: f32) ---; - igPushStyleVarVec2 :: proc(idx: Style_Var, val: Vec2) ---; + igPushStyleColor_U32 :: proc(idx: Col, col: u32) ---; + igPushStyleColor_Vec4 :: proc(idx: Col, col: Vec4) ---; + igPushStyleVar_Float :: proc(idx: Style_Var, val: f32) ---; + igPushStyleVar_Vec2 :: proc(idx: Style_Var, val: Vec2) ---; igPushTextWrapPos :: proc(wrap_local_pos_x: f32) ---; - igRadioButtonBool :: proc(label: cstring, active: bool) -> bool ---; - igRadioButtonIntPtr :: proc(label: cstring, v: ^i32, v_button: i32) -> bool ---; + igRadioButton_Bool :: proc(label: cstring, active: bool) -> bool ---; + igRadioButton_IntPtr :: proc(label: cstring, v: ^i32, v_button: i32) -> bool ---; igRender :: proc() ---; igResetMouseDragDelta :: proc(button: Mouse_Button) ---; igSameLine :: proc(offset_from_start_x: f32, spacing: f32) ---; igSaveIniSettingsToDisk :: proc(ini_filename: cstring) ---; igSaveIniSettingsToMemory :: proc(out_ini_size: ^uint) -> cstring ---; - igSelectableBool :: proc(label: cstring, selected: bool, flags: Selectable_Flags, size: Vec2) -> bool ---; - igSelectableBoolPtr :: proc(label: cstring, p_selected: ^bool, flags: Selectable_Flags, size: Vec2) -> bool ---; + igSelectable_Bool :: proc(label: cstring, selected: bool, flags: Selectable_Flags, size: Vec2) -> bool ---; + igSelectable_BoolPtr :: proc(label: cstring, p_selected: ^bool, flags: Selectable_Flags, size: Vec2) -> bool ---; igSeparator :: proc() ---; igSetAllocatorFunctions :: proc(alloc_func: Alloc_Func, free_func: Free_Func) --- igSetClipboardText :: proc(text: cstring) ---; @@ -466,24 +478,24 @@ foreign cimgui { igSetNextWindowPos :: proc(pos: Vec2, cond: Cond, pivot: Vec2) ---; igSetNextWindowSize :: proc(size: Vec2, cond: Cond) ---; igSetNextWindowSizeConstraints :: proc(size_min: Vec2, size_max: Vec2, custom_callback: Size_Callback, custom_callback_data: rawptr) ---; - igSetScrollFromPosXFloat :: proc(local_x: f32, center_x_ratio: f32) ---; - igSetScrollFromPosYFloat :: proc(local_y: f32, center_y_ratio: f32) ---; + igSetScrollFromPosX_Float :: proc(local_x: f32, center_x_ratio: f32) ---; + igSetScrollFromPosY_Float :: proc(local_y: f32, center_y_ratio: f32) ---; igSetScrollHereX :: proc(center_x_ratio: f32) ---; igSetScrollHereY :: proc(center_y_ratio: f32) ---; - igSetScrollXFloat :: proc(scroll_x: f32) ---; - igSetScrollYFloat :: proc(scroll_y: f32) ---; + igSetScrollX_Float :: proc(scroll_x: f32) ---; + igSetScrollY_Float :: proc(scroll_y: f32) ---; igSetStateStorage :: proc(storage: ^Storage) ---; igSetTabItemClosed :: proc(tab_or_docked_window_label: cstring) ---; igSetTooltip :: proc(fmt_: cstring, #c_vararg args: ..any) ---; - igSetWindowCollapsedBool :: proc(collapsed: bool, cond: Cond) ---; - igSetWindowCollapsedStr :: proc(name: cstring, collapsed: bool, cond: Cond) ---; - igSetWindowFocusNil :: proc() ---; - igSetWindowFocusStr :: proc(name: cstring) ---; + igSetWindowCollapsed_Bool :: proc(collapsed: bool, cond: Cond) ---; + igSetWindowCollapsed_Str :: proc(name: cstring, collapsed: bool, cond: Cond) ---; + igSetWindowFocus_Nil :: proc() ---; + igSetWindowFocus_Str :: proc(name: cstring) ---; igSetWindowFontScale :: proc(scale: f32) ---; - igSetWindowPosVec2 :: proc(pos: Vec2, cond: Cond) ---; - igSetWindowPosStr :: proc(name: cstring, pos: Vec2, cond: Cond) ---; - igSetWindowSizeVec2 :: proc(size: Vec2, cond: Cond) ---; - igSetWindowSizeStr :: proc(name: cstring, size: Vec2, cond: Cond) ---; + igSetWindowPos_Vec2 :: proc(pos: Vec2, cond: Cond) ---; + igSetWindowPos_Str :: proc(name: cstring, pos: Vec2, cond: Cond) ---; + igSetWindowSize_Vec2 :: proc(size: Vec2, cond: Cond) ---; + igSetWindowSize_Str :: proc(name: cstring, size: Vec2, cond: Cond) ---; igShowAboutWindow :: proc(p_open: ^bool) ---; igShowDemoWindow :: proc(p_open: ^bool) ---; igShowFontSelector :: proc(label: cstring) ---; @@ -508,27 +520,41 @@ foreign cimgui { igStyleColorsDark :: proc(dst: ^Style) ---; igStyleColorsLight :: proc(dst: ^Style) ---; igTabItemButton :: proc(label: cstring, flags: Tab_Item_Flags) -> bool ---; + igTableGetColumnCount :: proc() -> i32 ---; + igTableGetColumnFlags :: proc(column_n: i32) -> Table_Column_Flags ---; + igTableGetColumnIndex :: proc() -> i32 ---; + igTableGetColumnName_Int :: proc(column_n: i32) -> cstring ---; + igTableGetRowIndex :: proc() -> i32 ---; + igTableGetSortSpecs :: proc() -> ^Table_Sort_Specs ---; + igTableHeader :: proc(label: cstring) ---; + igTableHeadersRow :: proc() ---; + igTableNextColumn :: proc() -> bool ---; + igTableNextRow :: proc(row_flags: Table_Row_Flags, min_row_height: f32) ---; + igTableSetBgColor :: proc(target: Table_Bg_Target, color: u32, column_n: i32) ---; + igTableSetColumnIndex :: proc(column_n: i32) -> bool ---; + igTableSetupColumn :: proc(label: cstring, flags: Table_Column_Flags, init_width_or_weight: f32, user_id: ImID) ---; + igTableSetupScrollFreeze :: proc(cols: i32, rows: i32) ---; igText :: proc(fmt_: cstring, #c_vararg args: ..any) ---; igTextColored :: proc(col: Vec4, fmt_: cstring, #c_vararg args: ..any) ---; igTextDisabled :: proc(fmt_: cstring, #c_vararg args: ..any) ---; igTextUnformatted :: proc(text: cstring, text_end: cstring) ---; igTextWrapped :: proc(fmt_: cstring, #c_vararg args: ..any) ---; - igTreeNodeStr :: proc(label: cstring) -> bool ---; - igTreeNodeStrStr :: proc(str_id: cstring, fmt_: cstring, #c_vararg args: ..any) -> bool ---; - igTreeNodePtr :: proc(ptr_id: rawptr, fmt_: cstring, #c_vararg args: ..any) -> bool ---; - igTreeNodeExStr :: proc(label: cstring, flags: Tree_Node_Flags) -> bool ---; - igTreeNodeExStrStr :: proc(str_id: cstring, flags: Tree_Node_Flags, fmt_: cstring, #c_vararg args: ..any) -> bool ---; - igTreeNodeExPtr :: proc(ptr_id: rawptr, flags: Tree_Node_Flags, fmt_: cstring, #c_vararg args: ..any) -> bool ---; + igTreeNode_Str :: proc(label: cstring) -> bool ---; + igTreeNode_StrStr :: proc(str_id: cstring, fmt_: cstring, #c_vararg args: ..any) -> bool ---; + igTreeNode_Ptr :: proc(ptr_id: rawptr, fmt_: cstring, #c_vararg args: ..any) -> bool ---; + igTreeNodeEx_Str :: proc(label: cstring, flags: Tree_Node_Flags) -> bool ---; + igTreeNodeEx_StrStr :: proc(str_id: cstring, flags: Tree_Node_Flags, fmt_: cstring, #c_vararg args: ..any) -> bool ---; + igTreeNodeEx_Ptr :: proc(ptr_id: rawptr, flags: Tree_Node_Flags, fmt_: cstring, #c_vararg args: ..any) -> bool ---; igTreePop :: proc() ---; - igTreePushStr :: proc(str_id: cstring) ---; - igTreePushPtr :: proc(ptr_id: rawptr) ---; + igTreePush_Str :: proc(str_id: cstring) ---; + igTreePush_Ptr :: proc(ptr_id: rawptr) ---; igUnindent :: proc(indent_w: f32) ---; igVSliderFloat :: proc(label: cstring, size: Vec2, v: ^f32, v_min: f32, v_max: f32, format: cstring, flags: Slider_Flags) -> bool ---; igVSliderInt :: proc(label: cstring, size: Vec2, v: ^i32, v_min: i32, v_max: i32, format: cstring, flags: Slider_Flags) -> bool ---; igVSliderScalar :: proc(label: cstring, size: Vec2, data_type: Data_Type, p_data: rawptr, p_min: rawptr, p_max: rawptr, format: cstring, flags: Slider_Flags) -> bool ---; - igValueBool :: proc(prefix: cstring, b: bool) ---; - igValueInt :: proc(prefix: cstring, v: i32) ---; - igValueUint :: proc(prefix: cstring, v: u32) ---; - igValueFloat :: proc(prefix: cstring, v: f32, float_format: cstring) ---; + igValue_Bool :: proc(prefix: cstring, b: bool) ---; + igValue_Int :: proc(prefix: cstring, v: i32) ---; + igValue_Uint :: proc(prefix: cstring, v: u32) ---; + igValue_Float :: proc(prefix: cstring, v: f32, float_format: cstring) ---; } diff --git a/header.odin b/header.odin index c8a90d8..4e348a7 100644 --- a/header.odin +++ b/header.odin @@ -1,504 +1,521 @@ package imgui; -color_hsv :: inline proc(pOut: ^Color, h: f32, s: f32, v: f32, a := f32(1.0)) do ImColor_HSV(pOut, h, s, v, a); -color_set_hsv :: inline proc(self: ^Color, h: f32, s: f32, v: f32, a := f32(1.0)) do ImColor_SetHSV(self, h, s, v, a); - -draw_data_clear :: inline proc(self: ^Draw_Data) do ImDrawData_Clear(self); -draw_data_de_index_all_buffers :: inline proc(self: ^Draw_Data) do ImDrawData_DeIndexAllBuffers(self); -draw_data_scale_clip_rects :: inline proc(self: ^Draw_Data, fb_scale: Vec2) do ImDrawData_ScaleClipRects(self, fb_scale); - -draw_list_splitter_clear :: inline proc(self: ^Draw_List_Splitter) do ImDrawListSplitter_Clear(self); -draw_list_splitter_clear_free_memory :: inline proc(self: ^Draw_List_Splitter) do ImDrawListSplitter_ClearFreeMemory(self); -draw_list_splitter_merge :: inline proc(self: ^Draw_List_Splitter, draw_list: ^Draw_List) do ImDrawListSplitter_Merge(self, draw_list); -draw_list_splitter_set_current_channel :: inline proc(self: ^Draw_List_Splitter, draw_list: ^Draw_List, channel_idx: i32) do ImDrawListSplitter_SetCurrentChannel(self, draw_list, channel_idx); -draw_list_splitter_split :: inline proc(self: ^Draw_List_Splitter, draw_list: ^Draw_List, count: i32) do ImDrawListSplitter_Split(self, draw_list, count); - -draw_list_add_bezier_curve :: inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, col: u32, thickness: f32, num_segments := i32(0)) do ImDrawList_AddBezierCurve(self, p1, p2, p3, p4, col, thickness, num_segments); -draw_list_add_callback :: inline proc(self: ^Draw_List, callback: Draw_Callback, callback_data: rawptr) do ImDrawList_AddCallback(self, callback, callback_data); -draw_list_add_circle :: inline proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments := i32(0), thickness := f32(1.0)) do ImDrawList_AddCircle(self, center, radius, col, num_segments, thickness); -draw_list_add_circle_filled :: inline proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments := i32(0)) do ImDrawList_AddCircleFilled(self, center, radius, col, num_segments); -draw_list_add_convex_poly_filled :: inline proc(self: ^Draw_List, points: ^Vec2, num_points: i32, col: u32) do ImDrawList_AddConvexPolyFilled(self, points, num_points, col); -draw_list_add_draw_cmd :: inline proc(self: ^Draw_List) do ImDrawList_AddDrawCmd(self); -draw_list_add_image :: inline proc(self: ^Draw_List, user_texture_id: Texture_ID, p_min: Vec2, p_max: Vec2, uv_min := Vec2(Vec2 {0,0}), uv_max := Vec2(Vec2 {1,1}), col := u32(4294967295)) do ImDrawList_AddImage(self, user_texture_id, p_min, p_max, uv_min, uv_max, col); -draw_list_add_image_quad :: inline proc(self: ^Draw_List, user_texture_id: Texture_ID, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, uv1 := Vec2(Vec2 {0,0}), uv2 := Vec2(Vec2 {1,0}), uv3 := Vec2(Vec2 {1,1}), uv4 := Vec2(Vec2 {0,1}), col := u32(4294967295)) do ImDrawList_AddImageQuad(self, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); -draw_list_add_image_rounded :: inline proc(self: ^Draw_List, user_texture_id: Texture_ID, p_min: Vec2, p_max: Vec2, uv_min: Vec2, uv_max: Vec2, col: u32, rounding: f32, rounding_corners := Draw_Corner_Flags(Draw_Corner_Flags.All)) do ImDrawList_AddImageRounded(self, user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, rounding_corners); -draw_list_add_line :: inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, col: u32, thickness := f32(1.0)) do ImDrawList_AddLine(self, p1, p2, col, thickness); -draw_list_add_ngon :: inline proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments: i32, thickness := f32(1.0)) do ImDrawList_AddNgon(self, center, radius, col, num_segments, thickness); -draw_list_add_ngon_filled :: inline proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments: i32) do ImDrawList_AddNgonFilled(self, center, radius, col, num_segments); -draw_list_add_polyline :: inline proc(self: ^Draw_List, points: ^Vec2, num_points: i32, col: u32, closed: bool, thickness: f32) do ImDrawList_AddPolyline(self, points, num_points, col, closed, thickness); -draw_list_add_quad :: inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, col: u32, thickness := f32(1.0)) do ImDrawList_AddQuad(self, p1, p2, p3, p4, col, thickness); -draw_list_add_quad_filled :: inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, col: u32) do ImDrawList_AddQuadFilled(self, p1, p2, p3, p4, col); -draw_list_add_rect :: inline proc(self: ^Draw_List, p_min: Vec2, p_max: Vec2, col: u32, rounding := f32(0.0), rounding_corners := Draw_Corner_Flags(Draw_Corner_Flags.All), thickness := f32(1.0)) do ImDrawList_AddRect(self, p_min, p_max, col, rounding, rounding_corners, thickness); -draw_list_add_rect_filled :: inline proc(self: ^Draw_List, p_min: Vec2, p_max: Vec2, col: u32, rounding := f32(0.0), rounding_corners := Draw_Corner_Flags(Draw_Corner_Flags.All)) do ImDrawList_AddRectFilled(self, p_min, p_max, col, rounding, rounding_corners); -draw_list_add_rect_filled_multi_color :: inline proc(self: ^Draw_List, p_min: Vec2, p_max: Vec2, col_upr_left: u32, col_upr_right: u32, col_bot_right: u32, col_bot_left: u32) do ImDrawList_AddRectFilledMultiColor(self, p_min, p_max, col_upr_left, col_upr_right, col_bot_right, col_bot_left); +color_hsv :: #force_inline proc(pOut: ^Color, h: f32, s: f32, v: f32, a := f32(1.0)) do ImColor_HSV(pOut, h, s, v, a); +color_set_hsv :: #force_inline proc(self: ^Color, h: f32, s: f32, v: f32, a := f32(1.0)) do ImColor_SetHSV(self, h, s, v, a); + +draw_data_clear :: #force_inline proc(self: ^Draw_Data) do ImDrawData_Clear(self); +draw_data_de_index_all_buffers :: #force_inline proc(self: ^Draw_Data) do ImDrawData_DeIndexAllBuffers(self); +draw_data_scale_clip_rects :: #force_inline proc(self: ^Draw_Data, fb_scale: Vec2) do ImDrawData_ScaleClipRects(self, fb_scale); + +draw_list_splitter_clear :: #force_inline proc(self: ^Draw_List_Splitter) do ImDrawListSplitter_Clear(self); +draw_list_splitter_clear_free_memory :: #force_inline proc(self: ^Draw_List_Splitter) do ImDrawListSplitter_ClearFreeMemory(self); +draw_list_splitter_merge :: #force_inline proc(self: ^Draw_List_Splitter, draw_list: ^Draw_List) do ImDrawListSplitter_Merge(self, draw_list); +draw_list_splitter_set_current_channel :: #force_inline proc(self: ^Draw_List_Splitter, draw_list: ^Draw_List, channel_idx: i32) do ImDrawListSplitter_SetCurrentChannel(self, draw_list, channel_idx); +draw_list_splitter_split :: #force_inline proc(self: ^Draw_List_Splitter, draw_list: ^Draw_List, count: i32) do ImDrawListSplitter_Split(self, draw_list, count); + +draw_list_add_bezier_cubic :: #force_inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, col: u32, thickness: f32, num_segments := i32(0)) do ImDrawList_AddBezierCubic(self, p1, p2, p3, p4, col, thickness, num_segments); +draw_list_add_bezier_quadratic :: #force_inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, col: u32, thickness: f32, num_segments := i32(0)) do ImDrawList_AddBezierQuadratic(self, p1, p2, p3, col, thickness, num_segments); +draw_list_add_callback :: #force_inline proc(self: ^Draw_List, callback: Draw_Callback, callback_data: rawptr) do ImDrawList_AddCallback(self, callback, callback_data); +draw_list_add_circle :: #force_inline proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments := i32(0), thickness := f32(1.0)) do ImDrawList_AddCircle(self, center, radius, col, num_segments, thickness); +draw_list_add_circle_filled :: #force_inline proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments := i32(0)) do ImDrawList_AddCircleFilled(self, center, radius, col, num_segments); +draw_list_add_convex_poly_filled :: #force_inline proc(self: ^Draw_List, points: ^Vec2, num_points: i32, col: u32) do ImDrawList_AddConvexPolyFilled(self, points, num_points, col); +draw_list_add_draw_cmd :: #force_inline proc(self: ^Draw_List) do ImDrawList_AddDrawCmd(self); +draw_list_add_image :: #force_inline proc(self: ^Draw_List, user_texture_id: Texture_ID, p_min: Vec2, p_max: Vec2, uv_min := Vec2(Vec2 {0,0}), uv_max := Vec2(Vec2 {1,1}), col := u32(4294967295)) do ImDrawList_AddImage(self, user_texture_id, p_min, p_max, uv_min, uv_max, col); +draw_list_add_image_quad :: #force_inline proc(self: ^Draw_List, user_texture_id: Texture_ID, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, uv1 := Vec2(Vec2 {0,0}), uv2 := Vec2(Vec2 {1,0}), uv3 := Vec2(Vec2 {1,1}), uv4 := Vec2(Vec2 {0,1}), col := u32(4294967295)) do ImDrawList_AddImageQuad(self, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); +draw_list_add_image_rounded :: #force_inline proc(self: ^Draw_List, user_texture_id: Texture_ID, p_min: Vec2, p_max: Vec2, uv_min: Vec2, uv_max: Vec2, col: u32, rounding: f32, flags := Draw_Flags(0)) do ImDrawList_AddImageRounded(self, user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, flags); +draw_list_add_line :: #force_inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, col: u32, thickness := f32(1.0)) do ImDrawList_AddLine(self, p1, p2, col, thickness); +draw_list_add_ngon :: #force_inline proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments: i32, thickness := f32(1.0)) do ImDrawList_AddNgon(self, center, radius, col, num_segments, thickness); +draw_list_add_ngon_filled :: #force_inline proc(self: ^Draw_List, center: Vec2, radius: f32, col: u32, num_segments: i32) do ImDrawList_AddNgonFilled(self, center, radius, col, num_segments); +draw_list_add_polyline :: #force_inline proc(self: ^Draw_List, points: ^Vec2, num_points: i32, col: u32, flags: Draw_Flags, thickness: f32) do ImDrawList_AddPolyline(self, points, num_points, col, flags, thickness); +draw_list_add_quad :: #force_inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, col: u32, thickness := f32(1.0)) do ImDrawList_AddQuad(self, p1, p2, p3, p4, col, thickness); +draw_list_add_quad_filled :: #force_inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, p4: Vec2, col: u32) do ImDrawList_AddQuadFilled(self, p1, p2, p3, p4, col); +draw_list_add_rect :: #force_inline proc(self: ^Draw_List, p_min: Vec2, p_max: Vec2, col: u32, rounding := f32(0.0), flags := Draw_Flags(0), thickness := f32(1.0)) do ImDrawList_AddRect(self, p_min, p_max, col, rounding, flags, thickness); +draw_list_add_rect_filled :: #force_inline proc(self: ^Draw_List, p_min: Vec2, p_max: Vec2, col: u32, rounding := f32(0.0), flags := Draw_Flags(0)) do ImDrawList_AddRectFilled(self, p_min, p_max, col, rounding, flags); +draw_list_add_rect_filled_multi_color :: #force_inline proc(self: ^Draw_List, p_min: Vec2, p_max: Vec2, col_upr_left: u32, col_upr_right: u32, col_bot_right: u32, col_bot_left: u32) do ImDrawList_AddRectFilledMultiColor(self, p_min, p_max, col_upr_left, col_upr_right, col_bot_right, col_bot_left); add_text :: proc { draw_list_add_text_vec2, draw_list_add_text_font_ptr, }; -draw_list_add_text_vec2 :: inline proc(self: ^Draw_List, pos: Vec2, col: u32, text_begin: string, text_end := "") do swr_ImDrawList_AddTextVec2(self, pos, col, text_begin, text_end); -draw_list_add_text_font_ptr :: inline proc(self: ^Draw_List, font: ^ImFont, font_size: f32, pos: Vec2, col: u32, text_begin: string, text_end := "", wrap_width := f32(0.0), cpu_fine_clip_rect : ^Vec4 = nil) do swr_ImDrawList_AddTextFontPtr(self, font, font_size, pos, col, text_begin, text_end, wrap_width, cpu_fine_clip_rect); - -draw_list_add_triangle :: inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, col: u32, thickness := f32(1.0)) do ImDrawList_AddTriangle(self, p1, p2, p3, col, thickness); -draw_list_add_triangle_filled :: inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, col: u32) do ImDrawList_AddTriangleFilled(self, p1, p2, p3, col); -draw_list_channels_merge :: inline proc(self: ^Draw_List) do ImDrawList_ChannelsMerge(self); -draw_list_channels_set_current :: inline proc(self: ^Draw_List, n: i32) do ImDrawList_ChannelsSetCurrent(self, n); -draw_list_channels_split :: inline proc(self: ^Draw_List, count: i32) do ImDrawList_ChannelsSplit(self, count); -draw_list_clone_output :: inline proc(self: ^Draw_List) -> ^Draw_List do return ImDrawList_CloneOutput(self); -draw_list_get_clip_rect_max :: inline proc(pOut: ^Vec2, self: ^Draw_List) do ImDrawList_GetClipRectMax(pOut, self); -draw_list_get_clip_rect_min :: inline proc(pOut: ^Vec2, self: ^Draw_List) do ImDrawList_GetClipRectMin(pOut, self); -draw_list_path_arc_to :: inline proc(self: ^Draw_List, center: Vec2, radius: f32, a_min: f32, a_max: f32, num_segments := i32(10)) do ImDrawList_PathArcTo(self, center, radius, a_min, a_max, num_segments); -draw_list_path_arc_to_fast :: inline proc(self: ^Draw_List, center: Vec2, radius: f32, a_min_of_12: i32, a_max_of_12: i32) do ImDrawList_PathArcToFast(self, center, radius, a_min_of_12, a_max_of_12); -draw_list_path_bezier_curve_to :: inline proc(self: ^Draw_List, p2: Vec2, p3: Vec2, p4: Vec2, num_segments := i32(0)) do ImDrawList_PathBezierCurveTo(self, p2, p3, p4, num_segments); -draw_list_path_clear :: inline proc(self: ^Draw_List) do ImDrawList_PathClear(self); -draw_list_path_fill_convex :: inline proc(self: ^Draw_List, col: u32) do ImDrawList_PathFillConvex(self, col); -draw_list_path_line_to :: inline proc(self: ^Draw_List, pos: Vec2) do ImDrawList_PathLineTo(self, pos); -draw_list_path_line_to_merge_duplicate :: inline proc(self: ^Draw_List, pos: Vec2) do ImDrawList_PathLineToMergeDuplicate(self, pos); -draw_list_path_rect :: inline proc(self: ^Draw_List, rect_min: Vec2, rect_max: Vec2, rounding := f32(0.0), rounding_corners := Draw_Corner_Flags(Draw_Corner_Flags.All)) do ImDrawList_PathRect(self, rect_min, rect_max, rounding, rounding_corners); -draw_list_path_stroke :: inline proc(self: ^Draw_List, col: u32, closed: bool, thickness := f32(1.0)) do ImDrawList_PathStroke(self, col, closed, thickness); -draw_list_pop_clip_rect :: inline proc(self: ^Draw_List) do ImDrawList_PopClipRect(self); -draw_list_pop_texture_id :: inline proc(self: ^Draw_List) do ImDrawList_PopTextureID(self); -draw_list_prim_quad_uv :: inline proc(self: ^Draw_List, a: Vec2, b: Vec2, c: Vec2, d: Vec2, uv_a: Vec2, uv_b: Vec2, uv_c: Vec2, uv_d: Vec2, col: u32) do ImDrawList_PrimQuadUV(self, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); -draw_list_prim_rect :: inline proc(self: ^Draw_List, a: Vec2, b: Vec2, col: u32) do ImDrawList_PrimRect(self, a, b, col); -draw_list_prim_rect_uv :: inline proc(self: ^Draw_List, a: Vec2, b: Vec2, uv_a: Vec2, uv_b: Vec2, col: u32) do ImDrawList_PrimRectUV(self, a, b, uv_a, uv_b, col); -draw_list_prim_reserve :: inline proc(self: ^Draw_List, idx_count: i32, vtx_count: i32) do ImDrawList_PrimReserve(self, idx_count, vtx_count); -draw_list_prim_unreserve :: inline proc(self: ^Draw_List, idx_count: i32, vtx_count: i32) do ImDrawList_PrimUnreserve(self, idx_count, vtx_count); -draw_list_prim_vtx :: inline proc(self: ^Draw_List, pos: Vec2, uv: Vec2, col: u32) do ImDrawList_PrimVtx(self, pos, uv, col); -draw_list_prim_write_idx :: inline proc(self: ^Draw_List, idx: Draw_Idx) do ImDrawList_PrimWriteIdx(self, idx); -draw_list_prim_write_vtx :: inline proc(self: ^Draw_List, pos: Vec2, uv: Vec2, col: u32) do ImDrawList_PrimWriteVtx(self, pos, uv, col); -draw_list_push_clip_rect :: inline proc(self: ^Draw_List, clip_rect_min: Vec2, clip_rect_max: Vec2, intersect_with_current_clip_rect := bool(false)) do ImDrawList_PushClipRect(self, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); -draw_list_push_clip_rect_full_screen :: inline proc(self: ^Draw_List) do ImDrawList_PushClipRectFullScreen(self); -draw_list_push_texture_id :: inline proc(self: ^Draw_List, texture_id: Texture_ID) do ImDrawList_PushTextureID(self, texture_id); -draw_list_clear_free_memory :: inline proc(self: ^Draw_List) do ImDrawList__ClearFreeMemory(self); -draw_list_on_changed_clip_rect :: inline proc(self: ^Draw_List) do ImDrawList__OnChangedClipRect(self); -draw_list_on_changed_texture_id :: inline proc(self: ^Draw_List) do ImDrawList__OnChangedTextureID(self); -draw_list_on_changed_vtx_offset :: inline proc(self: ^Draw_List) do ImDrawList__OnChangedVtxOffset(self); -draw_list_pop_unused_draw_cmd :: inline proc(self: ^Draw_List) do ImDrawList__PopUnusedDrawCmd(self); -draw_list_reset_for_new_frame :: inline proc(self: ^Draw_List) do ImDrawList__ResetForNewFrame(self); - -font_atlas_custom_rect_is_packed :: inline proc(self: ^Font_Atlas_Custom_Rect) -> bool do return ImFontAtlasCustomRect_IsPacked(self); - -font_atlas_add_custom_rect_font_glyph :: inline proc(self: ^Font_Atlas, font: ^ImFont, id: Wchar, width: i32, height: i32, advance_x: f32, offset := Vec2(Vec2 {0,0})) -> i32 do return ImFontAtlas_AddCustomRectFontGlyph(self, font, id, width, height, advance_x, offset); -font_atlas_add_custom_rect_regular :: inline proc(self: ^Font_Atlas, width: i32, height: i32) -> i32 do return ImFontAtlas_AddCustomRectRegular(self, width, height); -font_atlas_add_font :: inline proc(self: ^Font_Atlas, font_cfg: ^Font_Config) -> ^ImFont do return ImFontAtlas_AddFont(self, font_cfg); -font_atlas_add_font_default :: inline proc(self: ^Font_Atlas, font_cfg : ^Font_Config = nil) -> ^ImFont do return ImFontAtlas_AddFontDefault(self, font_cfg); -font_atlas_add_font_from_file_ttf :: inline proc(self: ^Font_Atlas, filename: string, size_pixels: f32, font_cfg : ^Font_Config = nil, glyph_ranges : ^Wchar = nil) -> ^ImFont do return swr_ImFontAtlas_AddFontFromFileTTF(self, filename, size_pixels, font_cfg, glyph_ranges); -font_atlas_add_font_from_memory_compressed_base85ttf :: inline proc(self: ^Font_Atlas, compressed_font_data_base85: string, size_pixels: f32, font_cfg : ^Font_Config = nil, glyph_ranges : ^Wchar = nil) -> ^ImFont do return swr_ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(self, compressed_font_data_base85, size_pixels, font_cfg, glyph_ranges); -font_atlas_add_font_from_memory_compressed_ttf :: inline proc(self: ^Font_Atlas, compressed_font_data: rawptr, compressed_font_size: i32, size_pixels: f32, font_cfg : ^Font_Config = nil, glyph_ranges : ^Wchar = nil) -> ^ImFont do return ImFontAtlas_AddFontFromMemoryCompressedTTF(self, compressed_font_data, compressed_font_size, size_pixels, font_cfg, glyph_ranges); -font_atlas_add_font_from_memory_ttf :: inline proc(self: ^Font_Atlas, font_data: rawptr, font_size: i32, size_pixels: f32, font_cfg : ^Font_Config = nil, glyph_ranges : ^Wchar = nil) -> ^ImFont do return ImFontAtlas_AddFontFromMemoryTTF(self, font_data, font_size, size_pixels, font_cfg, glyph_ranges); -font_atlas_build :: inline proc(self: ^Font_Atlas) -> bool do return ImFontAtlas_Build(self); -font_atlas_calc_custom_rect_uv :: inline proc(self: ^Font_Atlas, rect: ^Font_Atlas_Custom_Rect, out_uv_min: ^Vec2, out_uv_max: ^Vec2) do ImFontAtlas_CalcCustomRectUV(self, rect, out_uv_min, out_uv_max); -font_atlas_clear :: inline proc(self: ^Font_Atlas) do ImFontAtlas_Clear(self); -font_atlas_clear_fonts :: inline proc(self: ^Font_Atlas) do ImFontAtlas_ClearFonts(self); -font_atlas_clear_input_data :: inline proc(self: ^Font_Atlas) do ImFontAtlas_ClearInputData(self); -font_atlas_clear_tex_data :: inline proc(self: ^Font_Atlas) do ImFontAtlas_ClearTexData(self); -font_atlas_get_custom_rect_by_index :: inline proc(self: ^Font_Atlas, index: i32) -> ^Font_Atlas_Custom_Rect do return ImFontAtlas_GetCustomRectByIndex(self, index); -font_atlas_get_glyph_ranges_chinese_full :: inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesChineseFull(self); -font_atlas_get_glyph_ranges_chinese_simplified_common :: inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(self); -font_atlas_get_glyph_ranges_cyrillic :: inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesCyrillic(self); -font_atlas_get_glyph_ranges_default :: inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesDefault(self); -font_atlas_get_glyph_ranges_japanese :: inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesJapanese(self); -font_atlas_get_glyph_ranges_korean :: inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesKorean(self); -font_atlas_get_glyph_ranges_thai :: inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesThai(self); -font_atlas_get_glyph_ranges_vietnamese :: inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesVietnamese(self); -font_atlas_get_mouse_cursor_tex_data :: inline proc(self: ^Font_Atlas, cursor: Mouse_Cursor, out_offset: ^Vec2, out_size: ^Vec2, out_uv_border: [2]Vec2, out_uv_fill: [2]Vec2) -> bool do return ImFontAtlas_GetMouseCursorTexData(self, cursor, out_offset, out_size, out_uv_border, out_uv_fill); -font_atlas_get_tex_data_as_alpha8 :: inline proc(self: ^Font_Atlas, out_pixels: ^^u8, out_width: ^i32, out_height: ^i32, out_bytes_per_pixel : ^i32 = nil) do ImFontAtlas_GetTexDataAsAlpha8(self, out_pixels, out_width, out_height, out_bytes_per_pixel); -font_atlas_get_tex_data_as_rgba32 :: inline proc(self: ^Font_Atlas, out_pixels: ^^u8, out_width: ^i32, out_height: ^i32, out_bytes_per_pixel : ^i32 = nil) do ImFontAtlas_GetTexDataAsRGBA32(self, out_pixels, out_width, out_height, out_bytes_per_pixel); -font_atlas_is_built :: inline proc(self: ^Font_Atlas) -> bool do return ImFontAtlas_IsBuilt(self); -font_atlas_set_tex_id :: inline proc(self: ^Font_Atlas, id: Texture_ID) do ImFontAtlas_SetTexID(self, id); - -font_glyph_ranges_builder_add_char :: inline proc(self: ^Font_Glyph_Ranges_Builder, c: Wchar) do ImFontGlyphRangesBuilder_AddChar(self, c); -font_glyph_ranges_builder_add_ranges :: inline proc(self: ^Font_Glyph_Ranges_Builder, ranges: ^Wchar) do ImFontGlyphRangesBuilder_AddRanges(self, ranges); -font_glyph_ranges_builder_add_text :: inline proc(self: ^Font_Glyph_Ranges_Builder, text: string, text_end := "") do swr_ImFontGlyphRangesBuilder_AddText(self, text, text_end); -font_glyph_ranges_builder_build_ranges :: inline proc(self: ^Font_Glyph_Ranges_Builder, out_ranges: ^Im_Vector(Wchar)) do ImFontGlyphRangesBuilder_BuildRanges(self, out_ranges); -font_glyph_ranges_builder_clear :: inline proc(self: ^Font_Glyph_Ranges_Builder) do ImFontGlyphRangesBuilder_Clear(self); -font_glyph_ranges_builder_get_bit :: inline proc(self: ^Font_Glyph_Ranges_Builder, n: uint) -> bool do return ImFontGlyphRangesBuilder_GetBit(self, n); -font_glyph_ranges_builder_set_bit :: inline proc(self: ^Font_Glyph_Ranges_Builder, n: uint) do ImFontGlyphRangesBuilder_SetBit(self, n); - -font_add_glyph :: inline proc(self: ^ImFont, src_cfg: ^Font_Config, c: Wchar, x0: f32, y0: f32, x1: f32, y1: f32, u0: f32, v0: f32, u1: f32, v1: f32, advance_x: f32) do ImFont_AddGlyph(self, src_cfg, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x); -font_add_remap_char :: inline proc(self: ^ImFont, dst: Wchar, src: Wchar, overwrite_dst := bool(true)) do ImFont_AddRemapChar(self, dst, src, overwrite_dst); -font_build_lookup_table :: inline proc(self: ^ImFont) do ImFont_BuildLookupTable(self); -font_calc_text_size_a :: inline proc(pOut: ^Vec2, self: ^ImFont, size: f32, max_width: f32, wrap_width: f32, text_begin: string, text_end := "", remaining : ^cstring = nil) do swr_ImFont_CalcTextSizeA(pOut, self, size, max_width, wrap_width, text_begin, text_end, remaining); -font_calc_word_wrap_position_a :: inline proc(self: ^ImFont, scale: f32, text: string, text_end: string, wrap_width: f32) -> cstring do return swr_ImFont_CalcWordWrapPositionA(self, scale, text, text_end, wrap_width); -font_clear_output_data :: inline proc(self: ^ImFont) do ImFont_ClearOutputData(self); -font_find_glyph :: inline proc(self: ^ImFont, c: Wchar) -> ^Font_Glyph do return ImFont_FindGlyph(self, c); -font_find_glyph_no_fallback :: inline proc(self: ^ImFont, c: Wchar) -> ^Font_Glyph do return ImFont_FindGlyphNoFallback(self, c); -font_get_char_advance :: inline proc(self: ^ImFont, c: Wchar) -> f32 do return ImFont_GetCharAdvance(self, c); -font_get_debug_name :: inline proc(self: ^ImFont) -> cstring do return ImFont_GetDebugName(self); -font_grow_index :: inline proc(self: ^ImFont, new_size: i32) do ImFont_GrowIndex(self, new_size); -font_is_glyph_range_unused :: inline proc(self: ^ImFont, c_begin: u32, c_last: u32) -> bool do return ImFont_IsGlyphRangeUnused(self, c_begin, c_last); -font_is_loaded :: inline proc(self: ^ImFont) -> bool do return ImFont_IsLoaded(self); -font_render_char :: inline proc(self: ^ImFont, draw_list: ^Draw_List, size: f32, pos: Vec2, col: u32, c: Wchar) do ImFont_RenderChar(self, draw_list, size, pos, col, c); -font_render_text :: inline proc(self: ^ImFont, draw_list: ^Draw_List, size: f32, pos: Vec2, col: u32, clip_rect: Vec4, text_begin: string, text_end: string, wrap_width := f32(0.0), cpu_fine_clip := bool(false)) do swr_ImFont_RenderText(self, draw_list, size, pos, col, clip_rect, text_begin, text_end, wrap_width, cpu_fine_clip); -font_set_fallback_char :: inline proc(self: ^ImFont, c: Wchar) do ImFont_SetFallbackChar(self, c); -font_set_glyph_visible :: inline proc(self: ^ImFont, c: Wchar, visible: bool) do ImFont_SetGlyphVisible(self, c, visible); - -io_add_input_character :: inline proc(self: ^IO, c: u32) do ImGuiIO_AddInputCharacter(self, c); -io_add_input_character_utf16 :: inline proc(self: ^IO, c: Wchar16) do ImGuiIO_AddInputCharacterUTF16(self, c); -io_add_input_characters_utf8 :: inline proc(self: ^IO, str: string) do swr_ImGuiIO_AddInputCharactersUTF8(self, str); -io_clear_input_characters :: inline proc(self: ^IO) do ImGuiIO_ClearInputCharacters(self); - -input_text_callback_data_clear_selection :: inline proc(self: ^Input_Text_Callback_Data) do ImGuiInputTextCallbackData_ClearSelection(self); -input_text_callback_data_delete_chars :: inline proc(self: ^Input_Text_Callback_Data, pos: i32, bytes_count: i32) do ImGuiInputTextCallbackData_DeleteChars(self, pos, bytes_count); -input_text_callback_data_has_selection :: inline proc(self: ^Input_Text_Callback_Data) -> bool do return ImGuiInputTextCallbackData_HasSelection(self); -input_text_callback_data_insert_chars :: inline proc(self: ^Input_Text_Callback_Data, pos: i32, text: string, text_end := "") do swr_ImGuiInputTextCallbackData_InsertChars(self, pos, text, text_end); -input_text_callback_data_select_all :: inline proc(self: ^Input_Text_Callback_Data) do ImGuiInputTextCallbackData_SelectAll(self); - -list_clipper_begin :: inline proc(self: ^List_Clipper, items_count: i32, items_height := f32(-1.0)) do ImGuiListClipper_Begin(self, items_count, items_height); -list_clipper_end :: inline proc(self: ^List_Clipper) do ImGuiListClipper_End(self); -list_clipper_step :: inline proc(self: ^List_Clipper) -> bool do return ImGuiListClipper_Step(self); - -payload_clear :: inline proc(self: ^Payload) do ImGuiPayload_Clear(self); -payload_is_data_type :: inline proc(self: ^Payload, type: string) -> bool do return swr_ImGuiPayload_IsDataType(self, type); -payload_is_delivery :: inline proc(self: ^Payload) -> bool do return ImGuiPayload_IsDelivery(self); -payload_is_preview :: inline proc(self: ^Payload) -> bool do return ImGuiPayload_IsPreview(self); - -storage_build_sort_by_key :: inline proc(self: ^Storage) do ImGuiStorage_BuildSortByKey(self); -storage_clear :: inline proc(self: ^Storage) do ImGuiStorage_Clear(self); -storage_get_bool :: inline proc(self: ^Storage, key: ImID, default_val := bool(false)) -> bool do return ImGuiStorage_GetBool(self, key, default_val); -storage_get_bool_ref :: inline proc(self: ^Storage, key: ImID, default_val := bool(false)) -> ^bool do return ImGuiStorage_GetBoolRef(self, key, default_val); -storage_get_float :: inline proc(self: ^Storage, key: ImID, default_val := f32(0.0)) -> f32 do return ImGuiStorage_GetFloat(self, key, default_val); -storage_get_float_ref :: inline proc(self: ^Storage, key: ImID, default_val := f32(0.0)) -> ^f32 do return ImGuiStorage_GetFloatRef(self, key, default_val); -storage_get_int :: inline proc(self: ^Storage, key: ImID, default_val := i32(0)) -> i32 do return ImGuiStorage_GetInt(self, key, default_val); -storage_get_int_ref :: inline proc(self: ^Storage, key: ImID, default_val := i32(0)) -> ^i32 do return ImGuiStorage_GetIntRef(self, key, default_val); -storage_get_void_ptr :: inline proc(self: ^Storage, key: ImID) -> rawptr do return ImGuiStorage_GetVoidPtr(self, key); -storage_get_void_ptr_ref :: inline proc(self: ^Storage, key: ImID, default_val : rawptr = nil) -> ^rawptr do return ImGuiStorage_GetVoidPtrRef(self, key, default_val); -storage_set_all_int :: inline proc(self: ^Storage, val: i32) do ImGuiStorage_SetAllInt(self, val); -storage_set_bool :: inline proc(self: ^Storage, key: ImID, val: bool) do ImGuiStorage_SetBool(self, key, val); -storage_set_float :: inline proc(self: ^Storage, key: ImID, val: f32) do ImGuiStorage_SetFloat(self, key, val); -storage_set_int :: inline proc(self: ^Storage, key: ImID, val: i32) do ImGuiStorage_SetInt(self, key, val); -storage_set_void_ptr :: inline proc(self: ^Storage, key: ImID, val: rawptr) do ImGuiStorage_SetVoidPtr(self, key, val); - -style_scale_all_sizes :: inline proc(self: ^Style, scale_factor: f32) do ImGuiStyle_ScaleAllSizes(self, scale_factor); - -text_buffer_append :: inline proc(self: ^Text_Buffer, str: string, str_end := "") do swr_ImGuiTextBuffer_append(self, str, str_end); -text_buffer_appendf :: inline proc(self: ^Text_Buffer, fmt_: string, args: ..any) do swr_ImGuiTextBuffer_appendf(self, fmt_, args); -text_buffer_begin :: inline proc(self: ^Text_Buffer) -> cstring do return ImGuiTextBuffer_begin(self); -text_buffer_c_str :: inline proc(self: ^Text_Buffer) -> cstring do return ImGuiTextBuffer_c_str(self); -text_buffer_clear :: inline proc(self: ^Text_Buffer) do ImGuiTextBuffer_clear(self); -text_buffer_empty :: inline proc(self: ^Text_Buffer) -> bool do return ImGuiTextBuffer_empty(self); -text_buffer_end :: inline proc(self: ^Text_Buffer) -> cstring do return ImGuiTextBuffer_end(self); -text_buffer_reserve :: inline proc(self: ^Text_Buffer, capacity: i32) do ImGuiTextBuffer_reserve(self, capacity); -text_buffer_size :: inline proc(self: ^Text_Buffer) -> i32 do return ImGuiTextBuffer_size(self); - -text_filter_build :: inline proc(self: ^Text_Filter) do ImGuiTextFilter_Build(self); -text_filter_clear :: inline proc(self: ^Text_Filter) do ImGuiTextFilter_Clear(self); -text_filter_draw :: inline proc(self: ^Text_Filter, label := "Filter(inc,-exc)", width := f32(0.0)) -> bool do return swr_ImGuiTextFilter_Draw(self, label, width); -text_filter_is_active :: inline proc(self: ^Text_Filter) -> bool do return ImGuiTextFilter_IsActive(self); -text_filter_pass_filter :: inline proc(self: ^Text_Filter, text: string, text_end := "") -> bool do return swr_ImGuiTextFilter_PassFilter(self, text, text_end); - -text_range_empty :: inline proc(self: ^Text_Range) -> bool do return ImGuiTextRange_empty(self); -text_range_split :: inline proc(self: ^Text_Range, separator: i8, out: ^Im_Vector(Text_Range)) do ImGuiTextRange_split(self, separator, out); - -accept_drag_drop_payload :: inline proc(type: string, flags := Drag_Drop_Flags(0)) -> ^Payload do return swr_igAcceptDragDropPayload(type, flags); -align_text_to_frame_padding :: inline proc() do igAlignTextToFramePadding(); -arrow_button :: inline proc(str_id: string, dir: Dir) -> bool do return swr_igArrowButton(str_id, dir); -begin :: inline proc(name: string, p_open : ^bool = nil, flags := Window_Flags(0)) -> bool do return swr_igBegin(name, p_open, flags); +draw_list_add_text_vec2 :: #force_inline proc(self: ^Draw_List, pos: Vec2, col: u32, text_begin: string, text_end := "") do swr_ImDrawList_AddText_Vec2(self, pos, col, text_begin, text_end); +draw_list_add_text_font_ptr :: #force_inline proc(self: ^Draw_List, font: ^ImFont, font_size: f32, pos: Vec2, col: u32, text_begin: string, text_end := "", wrap_width := f32(0.0), cpu_fine_clip_rect : ^Vec4 = nil) do swr_ImDrawList_AddText_FontPtr(self, font, font_size, pos, col, text_begin, text_end, wrap_width, cpu_fine_clip_rect); + +draw_list_add_triangle :: #force_inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, col: u32, thickness := f32(1.0)) do ImDrawList_AddTriangle(self, p1, p2, p3, col, thickness); +draw_list_add_triangle_filled :: #force_inline proc(self: ^Draw_List, p1: Vec2, p2: Vec2, p3: Vec2, col: u32) do ImDrawList_AddTriangleFilled(self, p1, p2, p3, col); +draw_list_channels_merge :: #force_inline proc(self: ^Draw_List) do ImDrawList_ChannelsMerge(self); +draw_list_channels_set_current :: #force_inline proc(self: ^Draw_List, n: i32) do ImDrawList_ChannelsSetCurrent(self, n); +draw_list_channels_split :: #force_inline proc(self: ^Draw_List, count: i32) do ImDrawList_ChannelsSplit(self, count); +draw_list_clone_output :: #force_inline proc(self: ^Draw_List) -> ^Draw_List do return ImDrawList_CloneOutput(self); +draw_list_get_clip_rect_max :: #force_inline proc(pOut: ^Vec2, self: ^Draw_List) do ImDrawList_GetClipRectMax(pOut, self); +draw_list_get_clip_rect_min :: #force_inline proc(pOut: ^Vec2, self: ^Draw_List) do ImDrawList_GetClipRectMin(pOut, self); +draw_list_path_arc_to :: #force_inline proc(self: ^Draw_List, center: Vec2, radius: f32, a_min: f32, a_max: f32, num_segments := i32(0)) do ImDrawList_PathArcTo(self, center, radius, a_min, a_max, num_segments); +draw_list_path_arc_to_fast :: #force_inline proc(self: ^Draw_List, center: Vec2, radius: f32, a_min_of_12: i32, a_max_of_12: i32) do ImDrawList_PathArcToFast(self, center, radius, a_min_of_12, a_max_of_12); +draw_list_path_bezier_cubic_curve_to :: #force_inline proc(self: ^Draw_List, p2: Vec2, p3: Vec2, p4: Vec2, num_segments := i32(0)) do ImDrawList_PathBezierCubicCurveTo(self, p2, p3, p4, num_segments); +draw_list_path_bezier_quadratic_curve_to :: #force_inline proc(self: ^Draw_List, p2: Vec2, p3: Vec2, num_segments := i32(0)) do ImDrawList_PathBezierQuadraticCurveTo(self, p2, p3, num_segments); +draw_list_path_clear :: #force_inline proc(self: ^Draw_List) do ImDrawList_PathClear(self); +draw_list_path_fill_convex :: #force_inline proc(self: ^Draw_List, col: u32) do ImDrawList_PathFillConvex(self, col); +draw_list_path_line_to :: #force_inline proc(self: ^Draw_List, pos: Vec2) do ImDrawList_PathLineTo(self, pos); +draw_list_path_line_to_merge_duplicate :: #force_inline proc(self: ^Draw_List, pos: Vec2) do ImDrawList_PathLineToMergeDuplicate(self, pos); +draw_list_path_rect :: #force_inline proc(self: ^Draw_List, rect_min: Vec2, rect_max: Vec2, rounding := f32(0.0), flags := Draw_Flags(0)) do ImDrawList_PathRect(self, rect_min, rect_max, rounding, flags); +draw_list_path_stroke :: #force_inline proc(self: ^Draw_List, col: u32, flags := Draw_Flags(0), thickness := f32(1.0)) do ImDrawList_PathStroke(self, col, flags, thickness); +draw_list_pop_clip_rect :: #force_inline proc(self: ^Draw_List) do ImDrawList_PopClipRect(self); +draw_list_pop_texture_id :: #force_inline proc(self: ^Draw_List) do ImDrawList_PopTextureID(self); +draw_list_prim_quad_uv :: #force_inline proc(self: ^Draw_List, a: Vec2, b: Vec2, c: Vec2, d: Vec2, uv_a: Vec2, uv_b: Vec2, uv_c: Vec2, uv_d: Vec2, col: u32) do ImDrawList_PrimQuadUV(self, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); +draw_list_prim_rect :: #force_inline proc(self: ^Draw_List, a: Vec2, b: Vec2, col: u32) do ImDrawList_PrimRect(self, a, b, col); +draw_list_prim_rect_uv :: #force_inline proc(self: ^Draw_List, a: Vec2, b: Vec2, uv_a: Vec2, uv_b: Vec2, col: u32) do ImDrawList_PrimRectUV(self, a, b, uv_a, uv_b, col); +draw_list_prim_reserve :: #force_inline proc(self: ^Draw_List, idx_count: i32, vtx_count: i32) do ImDrawList_PrimReserve(self, idx_count, vtx_count); +draw_list_prim_unreserve :: #force_inline proc(self: ^Draw_List, idx_count: i32, vtx_count: i32) do ImDrawList_PrimUnreserve(self, idx_count, vtx_count); +draw_list_prim_vtx :: #force_inline proc(self: ^Draw_List, pos: Vec2, uv: Vec2, col: u32) do ImDrawList_PrimVtx(self, pos, uv, col); +draw_list_prim_write_idx :: #force_inline proc(self: ^Draw_List, idx: Draw_Idx) do ImDrawList_PrimWriteIdx(self, idx); +draw_list_prim_write_vtx :: #force_inline proc(self: ^Draw_List, pos: Vec2, uv: Vec2, col: u32) do ImDrawList_PrimWriteVtx(self, pos, uv, col); +draw_list_push_clip_rect :: #force_inline proc(self: ^Draw_List, clip_rect_min: Vec2, clip_rect_max: Vec2, intersect_with_current_clip_rect := bool(false)) do ImDrawList_PushClipRect(self, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); +draw_list_push_clip_rect_full_screen :: #force_inline proc(self: ^Draw_List) do ImDrawList_PushClipRectFullScreen(self); +draw_list_push_texture_id :: #force_inline proc(self: ^Draw_List, texture_id: Texture_ID) do ImDrawList_PushTextureID(self, texture_id); +draw_list_calc_circle_auto_segment_count :: #force_inline proc(self: ^Draw_List, radius: f32) -> i32 do return ImDrawList__CalcCircleAutoSegmentCount(self, radius); +draw_list_clear_free_memory :: #force_inline proc(self: ^Draw_List) do ImDrawList__ClearFreeMemory(self); +draw_list_on_changed_clip_rect :: #force_inline proc(self: ^Draw_List) do ImDrawList__OnChangedClipRect(self); +draw_list_on_changed_texture_id :: #force_inline proc(self: ^Draw_List) do ImDrawList__OnChangedTextureID(self); +draw_list_on_changed_vtx_offset :: #force_inline proc(self: ^Draw_List) do ImDrawList__OnChangedVtxOffset(self); +draw_list_path_arc_to_fast_ex :: #force_inline proc(self: ^Draw_List, center: Vec2, radius: f32, a_min_sample: i32, a_max_sample: i32, a_step: i32) do ImDrawList__PathArcToFastEx(self, center, radius, a_min_sample, a_max_sample, a_step); +draw_list_path_arc_to_n :: #force_inline proc(self: ^Draw_List, center: Vec2, radius: f32, a_min: f32, a_max: f32, num_segments: i32) do ImDrawList__PathArcToN(self, center, radius, a_min, a_max, num_segments); +draw_list_pop_unused_draw_cmd :: #force_inline proc(self: ^Draw_List) do ImDrawList__PopUnusedDrawCmd(self); +draw_list_reset_for_new_frame :: #force_inline proc(self: ^Draw_List) do ImDrawList__ResetForNewFrame(self); + +font_atlas_custom_rect_is_packed :: #force_inline proc(self: ^Font_Atlas_Custom_Rect) -> bool do return ImFontAtlasCustomRect_IsPacked(self); + +font_atlas_add_custom_rect_font_glyph :: #force_inline proc(self: ^Font_Atlas, font: ^ImFont, id: Wchar, width: i32, height: i32, advance_x: f32, offset := Vec2(Vec2 {0,0})) -> i32 do return ImFontAtlas_AddCustomRectFontGlyph(self, font, id, width, height, advance_x, offset); +font_atlas_add_custom_rect_regular :: #force_inline proc(self: ^Font_Atlas, width: i32, height: i32) -> i32 do return ImFontAtlas_AddCustomRectRegular(self, width, height); +font_atlas_add_font :: #force_inline proc(self: ^Font_Atlas, font_cfg: ^Font_Config) -> ^ImFont do return ImFontAtlas_AddFont(self, font_cfg); +font_atlas_add_font_default :: #force_inline proc(self: ^Font_Atlas, font_cfg : ^Font_Config = nil) -> ^ImFont do return ImFontAtlas_AddFontDefault(self, font_cfg); +font_atlas_add_font_from_file_ttf :: #force_inline proc(self: ^Font_Atlas, filename: string, size_pixels: f32, font_cfg : ^Font_Config = nil, glyph_ranges : ^Wchar = nil) -> ^ImFont do return swr_ImFontAtlas_AddFontFromFileTTF(self, filename, size_pixels, font_cfg, glyph_ranges); +font_atlas_add_font_from_memory_compressed_base85ttf :: #force_inline proc(self: ^Font_Atlas, compressed_font_data_base85: string, size_pixels: f32, font_cfg : ^Font_Config = nil, glyph_ranges : ^Wchar = nil) -> ^ImFont do return swr_ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(self, compressed_font_data_base85, size_pixels, font_cfg, glyph_ranges); +font_atlas_add_font_from_memory_compressed_ttf :: #force_inline proc(self: ^Font_Atlas, compressed_font_data: rawptr, compressed_font_size: i32, size_pixels: f32, font_cfg : ^Font_Config = nil, glyph_ranges : ^Wchar = nil) -> ^ImFont do return ImFontAtlas_AddFontFromMemoryCompressedTTF(self, compressed_font_data, compressed_font_size, size_pixels, font_cfg, glyph_ranges); +font_atlas_add_font_from_memory_ttf :: #force_inline proc(self: ^Font_Atlas, font_data: rawptr, font_size: i32, size_pixels: f32, font_cfg : ^Font_Config = nil, glyph_ranges : ^Wchar = nil) -> ^ImFont do return ImFontAtlas_AddFontFromMemoryTTF(self, font_data, font_size, size_pixels, font_cfg, glyph_ranges); +font_atlas_build :: #force_inline proc(self: ^Font_Atlas) -> bool do return ImFontAtlas_Build(self); +font_atlas_calc_custom_rect_uv :: #force_inline proc(self: ^Font_Atlas, rect: ^Font_Atlas_Custom_Rect, out_uv_min: ^Vec2, out_uv_max: ^Vec2) do ImFontAtlas_CalcCustomRectUV(self, rect, out_uv_min, out_uv_max); +font_atlas_clear :: #force_inline proc(self: ^Font_Atlas) do ImFontAtlas_Clear(self); +font_atlas_clear_fonts :: #force_inline proc(self: ^Font_Atlas) do ImFontAtlas_ClearFonts(self); +font_atlas_clear_input_data :: #force_inline proc(self: ^Font_Atlas) do ImFontAtlas_ClearInputData(self); +font_atlas_clear_tex_data :: #force_inline proc(self: ^Font_Atlas) do ImFontAtlas_ClearTexData(self); +font_atlas_get_custom_rect_by_index :: #force_inline proc(self: ^Font_Atlas, index: i32) -> ^Font_Atlas_Custom_Rect do return ImFontAtlas_GetCustomRectByIndex(self, index); +font_atlas_get_glyph_ranges_chinese_full :: #force_inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesChineseFull(self); +font_atlas_get_glyph_ranges_chinese_simplified_common :: #force_inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(self); +font_atlas_get_glyph_ranges_cyrillic :: #force_inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesCyrillic(self); +font_atlas_get_glyph_ranges_default :: #force_inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesDefault(self); +font_atlas_get_glyph_ranges_japanese :: #force_inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesJapanese(self); +font_atlas_get_glyph_ranges_korean :: #force_inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesKorean(self); +font_atlas_get_glyph_ranges_thai :: #force_inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesThai(self); +font_atlas_get_glyph_ranges_vietnamese :: #force_inline proc(self: ^Font_Atlas) -> ^Wchar do return ImFontAtlas_GetGlyphRangesVietnamese(self); +font_atlas_get_mouse_cursor_tex_data :: #force_inline proc(self: ^Font_Atlas, cursor: Mouse_Cursor, out_offset: ^Vec2, out_size: ^Vec2, out_uv_border: [2]Vec2, out_uv_fill: [2]Vec2) -> bool do return ImFontAtlas_GetMouseCursorTexData(self, cursor, out_offset, out_size, out_uv_border, out_uv_fill); +font_atlas_get_tex_data_as_alpha8 :: #force_inline proc(self: ^Font_Atlas, out_pixels: ^^u8, out_width: ^i32, out_height: ^i32, out_bytes_per_pixel : ^i32 = nil) do ImFontAtlas_GetTexDataAsAlpha8(self, out_pixels, out_width, out_height, out_bytes_per_pixel); +font_atlas_get_tex_data_as_rgba32 :: #force_inline proc(self: ^Font_Atlas, out_pixels: ^^u8, out_width: ^i32, out_height: ^i32, out_bytes_per_pixel : ^i32 = nil) do ImFontAtlas_GetTexDataAsRGBA32(self, out_pixels, out_width, out_height, out_bytes_per_pixel); +font_atlas_is_built :: #force_inline proc(self: ^Font_Atlas) -> bool do return ImFontAtlas_IsBuilt(self); +font_atlas_set_tex_id :: #force_inline proc(self: ^Font_Atlas, id: Texture_ID) do ImFontAtlas_SetTexID(self, id); + +font_glyph_ranges_builder_add_char :: #force_inline proc(self: ^Font_Glyph_Ranges_Builder, c: Wchar) do ImFontGlyphRangesBuilder_AddChar(self, c); +font_glyph_ranges_builder_add_ranges :: #force_inline proc(self: ^Font_Glyph_Ranges_Builder, ranges: ^Wchar) do ImFontGlyphRangesBuilder_AddRanges(self, ranges); +font_glyph_ranges_builder_add_text :: #force_inline proc(self: ^Font_Glyph_Ranges_Builder, text: string, text_end := "") do swr_ImFontGlyphRangesBuilder_AddText(self, text, text_end); +font_glyph_ranges_builder_build_ranges :: #force_inline proc(self: ^Font_Glyph_Ranges_Builder, out_ranges: ^Im_Vector(Wchar)) do ImFontGlyphRangesBuilder_BuildRanges(self, out_ranges); +font_glyph_ranges_builder_clear :: #force_inline proc(self: ^Font_Glyph_Ranges_Builder) do ImFontGlyphRangesBuilder_Clear(self); +font_glyph_ranges_builder_get_bit :: #force_inline proc(self: ^Font_Glyph_Ranges_Builder, n: uint) -> bool do return ImFontGlyphRangesBuilder_GetBit(self, n); +font_glyph_ranges_builder_set_bit :: #force_inline proc(self: ^Font_Glyph_Ranges_Builder, n: uint) do ImFontGlyphRangesBuilder_SetBit(self, n); + +font_add_glyph :: #force_inline proc(self: ^ImFont, src_cfg: ^Font_Config, c: Wchar, x0: f32, y0: f32, x1: f32, y1: f32, u0: f32, v0: f32, u1: f32, v1: f32, advance_x: f32) do ImFont_AddGlyph(self, src_cfg, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x); +font_add_remap_char :: #force_inline proc(self: ^ImFont, dst: Wchar, src: Wchar, overwrite_dst := bool(true)) do ImFont_AddRemapChar(self, dst, src, overwrite_dst); +font_build_lookup_table :: #force_inline proc(self: ^ImFont) do ImFont_BuildLookupTable(self); +font_calc_text_size_a :: #force_inline proc(pOut: ^Vec2, self: ^ImFont, size: f32, max_width: f32, wrap_width: f32, text_begin: string, text_end := "", remaining : ^cstring = nil) do swr_ImFont_CalcTextSizeA(pOut, self, size, max_width, wrap_width, text_begin, text_end, remaining); +font_calc_word_wrap_position_a :: #force_inline proc(self: ^ImFont, scale: f32, text: string, text_end: string, wrap_width: f32) -> cstring do return swr_ImFont_CalcWordWrapPositionA(self, scale, text, text_end, wrap_width); +font_clear_output_data :: #force_inline proc(self: ^ImFont) do ImFont_ClearOutputData(self); +font_find_glyph :: #force_inline proc(self: ^ImFont, c: Wchar) -> ^Font_Glyph do return ImFont_FindGlyph(self, c); +font_find_glyph_no_fallback :: #force_inline proc(self: ^ImFont, c: Wchar) -> ^Font_Glyph do return ImFont_FindGlyphNoFallback(self, c); +font_get_char_advance :: #force_inline proc(self: ^ImFont, c: Wchar) -> f32 do return ImFont_GetCharAdvance(self, c); +font_get_debug_name :: #force_inline proc(self: ^ImFont) -> cstring do return ImFont_GetDebugName(self); +font_grow_index :: #force_inline proc(self: ^ImFont, new_size: i32) do ImFont_GrowIndex(self, new_size); +font_is_glyph_range_unused :: #force_inline proc(self: ^ImFont, c_begin: u32, c_last: u32) -> bool do return ImFont_IsGlyphRangeUnused(self, c_begin, c_last); +font_is_loaded :: #force_inline proc(self: ^ImFont) -> bool do return ImFont_IsLoaded(self); +font_render_char :: #force_inline proc(self: ^ImFont, draw_list: ^Draw_List, size: f32, pos: Vec2, col: u32, c: Wchar) do ImFont_RenderChar(self, draw_list, size, pos, col, c); +font_render_text :: #force_inline proc(self: ^ImFont, draw_list: ^Draw_List, size: f32, pos: Vec2, col: u32, clip_rect: Vec4, text_begin: string, text_end: string, wrap_width := f32(0.0), cpu_fine_clip := bool(false)) do swr_ImFont_RenderText(self, draw_list, size, pos, col, clip_rect, text_begin, text_end, wrap_width, cpu_fine_clip); +font_set_fallback_char :: #force_inline proc(self: ^ImFont, c: Wchar) do ImFont_SetFallbackChar(self, c); +font_set_glyph_visible :: #force_inline proc(self: ^ImFont, c: Wchar, visible: bool) do ImFont_SetGlyphVisible(self, c, visible); + +io_add_input_character :: #force_inline proc(self: ^IO, c: u32) do ImGuiIO_AddInputCharacter(self, c); +io_add_input_character_utf16 :: #force_inline proc(self: ^IO, c: Wchar16) do ImGuiIO_AddInputCharacterUTF16(self, c); +io_add_input_characters_utf8 :: #force_inline proc(self: ^IO, str: string) do swr_ImGuiIO_AddInputCharactersUTF8(self, str); +io_clear_input_characters :: #force_inline proc(self: ^IO) do ImGuiIO_ClearInputCharacters(self); + +input_text_callback_data_clear_selection :: #force_inline proc(self: ^Input_Text_Callback_Data) do ImGuiInputTextCallbackData_ClearSelection(self); +input_text_callback_data_delete_chars :: #force_inline proc(self: ^Input_Text_Callback_Data, pos: i32, bytes_count: i32) do ImGuiInputTextCallbackData_DeleteChars(self, pos, bytes_count); +input_text_callback_data_has_selection :: #force_inline proc(self: ^Input_Text_Callback_Data) -> bool do return ImGuiInputTextCallbackData_HasSelection(self); +input_text_callback_data_insert_chars :: #force_inline proc(self: ^Input_Text_Callback_Data, pos: i32, text: string, text_end := "") do swr_ImGuiInputTextCallbackData_InsertChars(self, pos, text, text_end); +input_text_callback_data_select_all :: #force_inline proc(self: ^Input_Text_Callback_Data) do ImGuiInputTextCallbackData_SelectAll(self); + +list_clipper_begin :: #force_inline proc(self: ^List_Clipper, items_count: i32, items_height := f32(-1.0)) do ImGuiListClipper_Begin(self, items_count, items_height); +list_clipper_end :: #force_inline proc(self: ^List_Clipper) do ImGuiListClipper_End(self); +list_clipper_step :: #force_inline proc(self: ^List_Clipper) -> bool do return ImGuiListClipper_Step(self); + +payload_clear :: #force_inline proc(self: ^Payload) do ImGuiPayload_Clear(self); +payload_is_data_type :: #force_inline proc(self: ^Payload, type: string) -> bool do return swr_ImGuiPayload_IsDataType(self, type); +payload_is_delivery :: #force_inline proc(self: ^Payload) -> bool do return ImGuiPayload_IsDelivery(self); +payload_is_preview :: #force_inline proc(self: ^Payload) -> bool do return ImGuiPayload_IsPreview(self); + +storage_build_sort_by_key :: #force_inline proc(self: ^Storage) do ImGuiStorage_BuildSortByKey(self); +storage_clear :: #force_inline proc(self: ^Storage) do ImGuiStorage_Clear(self); +storage_get_bool :: #force_inline proc(self: ^Storage, key: ImID, default_val := bool(false)) -> bool do return ImGuiStorage_GetBool(self, key, default_val); +storage_get_bool_ref :: #force_inline proc(self: ^Storage, key: ImID, default_val := bool(false)) -> ^bool do return ImGuiStorage_GetBoolRef(self, key, default_val); +storage_get_float :: #force_inline proc(self: ^Storage, key: ImID, default_val := f32(0.0)) -> f32 do return ImGuiStorage_GetFloat(self, key, default_val); +storage_get_float_ref :: #force_inline proc(self: ^Storage, key: ImID, default_val := f32(0.0)) -> ^f32 do return ImGuiStorage_GetFloatRef(self, key, default_val); +storage_get_int :: #force_inline proc(self: ^Storage, key: ImID, default_val := i32(0)) -> i32 do return ImGuiStorage_GetInt(self, key, default_val); +storage_get_int_ref :: #force_inline proc(self: ^Storage, key: ImID, default_val := i32(0)) -> ^i32 do return ImGuiStorage_GetIntRef(self, key, default_val); +storage_get_void_ptr :: #force_inline proc(self: ^Storage, key: ImID) -> rawptr do return ImGuiStorage_GetVoidPtr(self, key); +storage_get_void_ptr_ref :: #force_inline proc(self: ^Storage, key: ImID, default_val : rawptr = nil) -> ^rawptr do return ImGuiStorage_GetVoidPtrRef(self, key, default_val); +storage_set_all_int :: #force_inline proc(self: ^Storage, val: i32) do ImGuiStorage_SetAllInt(self, val); +storage_set_bool :: #force_inline proc(self: ^Storage, key: ImID, val: bool) do ImGuiStorage_SetBool(self, key, val); +storage_set_float :: #force_inline proc(self: ^Storage, key: ImID, val: f32) do ImGuiStorage_SetFloat(self, key, val); +storage_set_int :: #force_inline proc(self: ^Storage, key: ImID, val: i32) do ImGuiStorage_SetInt(self, key, val); +storage_set_void_ptr :: #force_inline proc(self: ^Storage, key: ImID, val: rawptr) do ImGuiStorage_SetVoidPtr(self, key, val); + +style_scale_all_sizes :: #force_inline proc(self: ^Style, scale_factor: f32) do ImGuiStyle_ScaleAllSizes(self, scale_factor); + +text_buffer_append :: #force_inline proc(self: ^Text_Buffer, str: string, str_end := "") do swr_ImGuiTextBuffer_append(self, str, str_end); +text_buffer_appendf :: #force_inline proc(self: ^Text_Buffer, fmt_: string, args: ..any) do swr_ImGuiTextBuffer_appendf(self, fmt_, args); +text_buffer_begin :: #force_inline proc(self: ^Text_Buffer) -> cstring do return ImGuiTextBuffer_begin(self); +text_buffer_c_str :: #force_inline proc(self: ^Text_Buffer) -> cstring do return ImGuiTextBuffer_c_str(self); +text_buffer_clear :: #force_inline proc(self: ^Text_Buffer) do ImGuiTextBuffer_clear(self); +text_buffer_empty :: #force_inline proc(self: ^Text_Buffer) -> bool do return ImGuiTextBuffer_empty(self); +text_buffer_end :: #force_inline proc(self: ^Text_Buffer) -> cstring do return ImGuiTextBuffer_end(self); +text_buffer_reserve :: #force_inline proc(self: ^Text_Buffer, capacity: i32) do ImGuiTextBuffer_reserve(self, capacity); +text_buffer_size :: #force_inline proc(self: ^Text_Buffer) -> i32 do return ImGuiTextBuffer_size(self); + +text_filter_build :: #force_inline proc(self: ^Text_Filter) do ImGuiTextFilter_Build(self); +text_filter_clear :: #force_inline proc(self: ^Text_Filter) do ImGuiTextFilter_Clear(self); +text_filter_draw :: #force_inline proc(self: ^Text_Filter, label := "Filter(inc,-exc)", width := f32(0.0)) -> bool do return swr_ImGuiTextFilter_Draw(self, label, width); +text_filter_is_active :: #force_inline proc(self: ^Text_Filter) -> bool do return ImGuiTextFilter_IsActive(self); +text_filter_pass_filter :: #force_inline proc(self: ^Text_Filter, text: string, text_end := "") -> bool do return swr_ImGuiTextFilter_PassFilter(self, text, text_end); + +text_range_empty :: #force_inline proc(self: ^Text_Range) -> bool do return ImGuiTextRange_empty(self); +text_range_split :: #force_inline proc(self: ^Text_Range, separator: i8, out: ^Im_Vector(Text_Range)) do ImGuiTextRange_split(self, separator, out); + +viewport_get_center :: #force_inline proc(pOut: ^Vec2, self: ^Viewport) do ImGuiViewport_GetCenter(pOut, self); +viewport_get_work_center :: #force_inline proc(pOut: ^Vec2, self: ^Viewport) do ImGuiViewport_GetWorkCenter(pOut, self); + +accept_drag_drop_payload :: #force_inline proc(type: string, flags := Drag_Drop_Flags(0)) -> ^Payload do return swr_igAcceptDragDropPayload(type, flags); +align_text_to_frame_padding :: #force_inline proc() do igAlignTextToFramePadding(); +arrow_button :: #force_inline proc(str_id: string, dir: Dir) -> bool do return swr_igArrowButton(str_id, dir); +begin :: #force_inline proc(name: string, p_open : ^bool = nil, flags := Window_Flags(0)) -> bool do return swr_igBegin(name, p_open, flags); begin_child :: proc { begin_child_str, begin_child_id, }; -begin_child_str :: inline proc(str_id: string, size := Vec2(Vec2 {0,0}), border := bool(false), flags := Window_Flags(0)) -> bool do return swr_igBeginChildStr(str_id, size, border, flags); -begin_child_id :: inline proc(id: ImID, size := Vec2(Vec2 {0,0}), border := bool(false), flags := Window_Flags(0)) -> bool do return igBeginChildID(id, size, border, flags); - -begin_child_frame :: inline proc(id: ImID, size: Vec2, flags := Window_Flags(0)) -> bool do return igBeginChildFrame(id, size, flags); -begin_combo :: inline proc(label: string, preview_value: string, flags := Combo_Flags(0)) -> bool do return swr_igBeginCombo(label, preview_value, flags); -begin_drag_drop_source :: inline proc(flags := Drag_Drop_Flags(0)) -> bool do return igBeginDragDropSource(flags); -begin_drag_drop_target :: inline proc() -> bool do return igBeginDragDropTarget(); -begin_group :: inline proc() do igBeginGroup(); -begin_main_menu_bar :: inline proc() -> bool do return igBeginMainMenuBar(); -begin_menu :: inline proc(label: string, enabled := bool(true)) -> bool do return swr_igBeginMenu(label, enabled); -begin_menu_bar :: inline proc() -> bool do return igBeginMenuBar(); -begin_popup :: inline proc(str_id: string, flags := Window_Flags(0)) -> bool do return swr_igBeginPopup(str_id, flags); -begin_popup_context_item :: inline proc(str_id := "", popup_flags := Popup_Flags(1)) -> bool do return swr_igBeginPopupContextItem(str_id, popup_flags); -begin_popup_context_void :: inline proc(str_id := "", popup_flags := Popup_Flags(1)) -> bool do return swr_igBeginPopupContextVoid(str_id, popup_flags); -begin_popup_context_window :: inline proc(str_id := "", popup_flags := Popup_Flags(1)) -> bool do return swr_igBeginPopupContextWindow(str_id, popup_flags); -begin_popup_modal :: inline proc(name: string, p_open : ^bool = nil, flags := Window_Flags(0)) -> bool do return swr_igBeginPopupModal(name, p_open, flags); -begin_tab_bar :: inline proc(str_id: string, flags := Tab_Bar_Flags(0)) -> bool do return swr_igBeginTabBar(str_id, flags); -begin_tab_item :: inline proc(label: string, p_open : ^bool = nil, flags := Tab_Item_Flags(0)) -> bool do return swr_igBeginTabItem(label, p_open, flags); -begin_tooltip :: inline proc() do igBeginTooltip(); -bullet :: inline proc() do igBullet(); -bullet_text :: inline proc(fmt_: string, args: ..any) do swr_igBulletText(fmt_, args); -button :: inline proc(label: string, size := Vec2(Vec2 {0,0})) -> bool do return swr_igButton(label, size); -calc_item_width :: inline proc() -> f32 do return igCalcItemWidth(); -calc_list_clipping :: inline proc(items_count: i32, items_height: f32, out_items_display_start: ^i32, out_items_display_end: ^i32) do igCalcListClipping(items_count, items_height, out_items_display_start, out_items_display_end); -calc_text_size :: inline proc(pOut: ^Vec2, text: string, text_end := "", hide_text_after_double_hash := bool(false), wrap_width := f32(-1.0)) do swr_igCalcTextSize(pOut, text, text_end, hide_text_after_double_hash, wrap_width); -capture_keyboard_from_app :: inline proc(want_capture_keyboard_value := bool(true)) do igCaptureKeyboardFromApp(want_capture_keyboard_value); -capture_mouse_from_app :: inline proc(want_capture_mouse_value := bool(true)) do igCaptureMouseFromApp(want_capture_mouse_value); -checkbox :: inline proc(label: string, v: ^bool) -> bool do return swr_igCheckbox(label, v); -checkbox_flags :: inline proc(label: string, flags: ^u32, flags_value: u32) -> bool do return swr_igCheckboxFlags(label, flags, flags_value); -close_current_popup :: inline proc() do igCloseCurrentPopup(); +begin_child_str :: #force_inline proc(str_id: string, size := Vec2(Vec2 {0,0}), border := bool(false), flags := Window_Flags(0)) -> bool do return swr_igBeginChild_Str(str_id, size, border, flags); +begin_child_id :: #force_inline proc(id: ImID, size := Vec2(Vec2 {0,0}), border := bool(false), flags := Window_Flags(0)) -> bool do return igBeginChild_ID(id, size, border, flags); + +begin_child_frame :: #force_inline proc(id: ImID, size: Vec2, flags := Window_Flags(0)) -> bool do return igBeginChildFrame(id, size, flags); +begin_combo :: #force_inline proc(label: string, preview_value: string, flags := Combo_Flags(0)) -> bool do return swr_igBeginCombo(label, preview_value, flags); +begin_drag_drop_source :: #force_inline proc(flags := Drag_Drop_Flags(0)) -> bool do return igBeginDragDropSource(flags); +begin_drag_drop_target :: #force_inline proc() -> bool do return igBeginDragDropTarget(); +begin_group :: #force_inline proc() do igBeginGroup(); +begin_list_box :: #force_inline proc(label: string, size := Vec2(Vec2 {0,0})) -> bool do return swr_igBeginListBox(label, size); +begin_main_menu_bar :: #force_inline proc() -> bool do return igBeginMainMenuBar(); +begin_menu :: #force_inline proc(label: string, enabled := bool(true)) -> bool do return swr_igBeginMenu(label, enabled); +begin_menu_bar :: #force_inline proc() -> bool do return igBeginMenuBar(); +begin_popup :: #force_inline proc(str_id: string, flags := Window_Flags(0)) -> bool do return swr_igBeginPopup(str_id, flags); +begin_popup_context_item :: #force_inline proc(str_id := "", popup_flags := Popup_Flags(1)) -> bool do return swr_igBeginPopupContextItem(str_id, popup_flags); +begin_popup_context_void :: #force_inline proc(str_id := "", popup_flags := Popup_Flags(1)) -> bool do return swr_igBeginPopupContextVoid(str_id, popup_flags); +begin_popup_context_window :: #force_inline proc(str_id := "", popup_flags := Popup_Flags(1)) -> bool do return swr_igBeginPopupContextWindow(str_id, popup_flags); +begin_popup_modal :: #force_inline proc(name: string, p_open : ^bool = nil, flags := Window_Flags(0)) -> bool do return swr_igBeginPopupModal(name, p_open, flags); +begin_tab_bar :: #force_inline proc(str_id: string, flags := Tab_Bar_Flags(0)) -> bool do return swr_igBeginTabBar(str_id, flags); +begin_tab_item :: #force_inline proc(label: string, p_open : ^bool = nil, flags := Tab_Item_Flags(0)) -> bool do return swr_igBeginTabItem(label, p_open, flags); +begin_table :: #force_inline proc(str_id: string, column: i32, flags := Table_Flags(0), outer_size := Vec2(Vec2 {0.0,0.0}), inner_width := f32(0.0)) -> bool do return swr_igBeginTable(str_id, column, flags, outer_size, inner_width); +begin_tooltip :: #force_inline proc() do igBeginTooltip(); +bullet :: #force_inline proc() do igBullet(); +bullet_text :: #force_inline proc(fmt_: string, args: ..any) do swr_igBulletText(fmt_, args); +button :: #force_inline proc(label: string, size := Vec2(Vec2 {0,0})) -> bool do return swr_igButton(label, size); +calc_item_width :: #force_inline proc() -> f32 do return igCalcItemWidth(); +calc_list_clipping :: #force_inline proc(items_count: i32, items_height: f32, out_items_display_start: ^i32, out_items_display_end: ^i32) do igCalcListClipping(items_count, items_height, out_items_display_start, out_items_display_end); +calc_text_size :: #force_inline proc(pOut: ^Vec2, text: string, text_end := "", hide_text_after_double_hash := bool(false), wrap_width := f32(-1.0)) do swr_igCalcTextSize(pOut, text, text_end, hide_text_after_double_hash, wrap_width); +capture_keyboard_from_app :: #force_inline proc(want_capture_keyboard_value := bool(true)) do igCaptureKeyboardFromApp(want_capture_keyboard_value); +capture_mouse_from_app :: #force_inline proc(want_capture_mouse_value := bool(true)) do igCaptureMouseFromApp(want_capture_mouse_value); +checkbox :: #force_inline proc(label: string, v: ^bool) -> bool do return swr_igCheckbox(label, v); + +checkbox_flags :: proc { + checkbox_flags_int_ptr, + checkbox_flags_uint_ptr, +}; +checkbox_flags_int_ptr :: #force_inline proc(label: string, flags: ^i32, flags_value: i32) -> bool do return swr_igCheckboxFlags_IntPtr(label, flags, flags_value); +checkbox_flags_uint_ptr :: #force_inline proc(label: string, flags: ^u32, flags_value: u32) -> bool do return swr_igCheckboxFlags_UintPtr(label, flags, flags_value); + +close_current_popup :: #force_inline proc() do igCloseCurrentPopup(); collapsing_header :: proc { collapsing_header_tree_node_flags, collapsing_header_bool_ptr, }; -collapsing_header_tree_node_flags :: inline proc(label: string, flags := Tree_Node_Flags(0)) -> bool do return swr_igCollapsingHeaderTreeNodeFlags(label, flags); -collapsing_header_bool_ptr :: inline proc(label: string, p_open: ^bool, flags := Tree_Node_Flags(0)) -> bool do return swr_igCollapsingHeaderBoolPtr(label, p_open, flags); - -color_button :: inline proc(desc_id: string, col: Vec4, flags := Color_Edit_Flags(0), size := Vec2(Vec2 {0,0})) -> bool do return swr_igColorButton(desc_id, col, flags, size); -color_convert_float4to_u32 :: inline proc(in_: Vec4) -> u32 do return igColorConvertFloat4ToU32(in_); -color_convert_hs_vto_rgb :: inline proc(h: f32, s: f32, v: f32, out_r: ^f32, out_g: ^f32, out_b: ^f32) do igColorConvertHSVtoRGB(h, s, v, out_r, out_g, out_b); -color_convert_rg_bto_hsv :: inline proc(r: f32, g: f32, b: f32, out_h: ^f32, out_s: ^f32, out_v: ^f32) do igColorConvertRGBtoHSV(r, g, b, out_h, out_s, out_v); -color_convert_u32to_float4 :: inline proc(pOut: ^Vec4, in_: u32) do igColorConvertU32ToFloat4(pOut, in_); -color_edit3 :: inline proc(label: string, col: [3]f32, flags := Color_Edit_Flags(0)) -> bool do return swr_igColorEdit3(label, col, flags); -color_edit4 :: inline proc(label: string, col: [4]f32, flags := Color_Edit_Flags(0)) -> bool do return swr_igColorEdit4(label, col, flags); -color_picker3 :: inline proc(label: string, col: [3]f32, flags := Color_Edit_Flags(0)) -> bool do return swr_igColorPicker3(label, col, flags); -color_picker4 :: inline proc(label: string, col: [4]f32, flags := Color_Edit_Flags(0), ref_col : ^f32 = nil) -> bool do return swr_igColorPicker4(label, col, flags, ref_col); -columns :: inline proc(count := i32(1), id := "", border := bool(true)) do swr_igColumns(count, id, border); +collapsing_header_tree_node_flags :: #force_inline proc(label: string, flags := Tree_Node_Flags(0)) -> bool do return swr_igCollapsingHeader_TreeNodeFlags(label, flags); +collapsing_header_bool_ptr :: #force_inline proc(label: string, p_visible: ^bool, flags := Tree_Node_Flags(0)) -> bool do return swr_igCollapsingHeader_BoolPtr(label, p_visible, flags); + +color_button :: #force_inline proc(desc_id: string, col: Vec4, flags := Color_Edit_Flags(0), size := Vec2(Vec2 {0,0})) -> bool do return swr_igColorButton(desc_id, col, flags, size); +color_convert_float4to_u32 :: #force_inline proc(in_: Vec4) -> u32 do return igColorConvertFloat4ToU32(in_); +color_convert_hs_vto_rgb :: #force_inline proc(h: f32, s: f32, v: f32, out_r: ^f32, out_g: ^f32, out_b: ^f32) do igColorConvertHSVtoRGB(h, s, v, out_r, out_g, out_b); +color_convert_rg_bto_hsv :: #force_inline proc(r: f32, g: f32, b: f32, out_h: ^f32, out_s: ^f32, out_v: ^f32) do igColorConvertRGBtoHSV(r, g, b, out_h, out_s, out_v); +color_convert_u32to_float4 :: #force_inline proc(pOut: ^Vec4, in_: u32) do igColorConvertU32ToFloat4(pOut, in_); +color_edit3 :: #force_inline proc(label: string, col: [3]f32, flags := Color_Edit_Flags(0)) -> bool do return swr_igColorEdit3(label, col, flags); +color_edit4 :: #force_inline proc(label: string, col: [4]f32, flags := Color_Edit_Flags(0)) -> bool do return swr_igColorEdit4(label, col, flags); +color_picker3 :: #force_inline proc(label: string, col: [3]f32, flags := Color_Edit_Flags(0)) -> bool do return swr_igColorPicker3(label, col, flags); +color_picker4 :: #force_inline proc(label: string, col: [4]f32, flags := Color_Edit_Flags(0), ref_col : ^f32 = nil) -> bool do return swr_igColorPicker4(label, col, flags, ref_col); +columns :: #force_inline proc(count := i32(1), id := "", border := bool(true)) do swr_igColumns(count, id, border); combo :: proc { combo_str_arr, combo_str, combo_fn_bool_ptr, }; -combo_str_arr :: inline proc(label: string, current_item: ^i32, items: []string, popup_max_height_in_items := i32(0)) -> bool do return wrapper_combo_str_arr(label, current_item, items, popup_max_height_in_items); -combo_str :: inline proc(label: string, current_item: ^i32, items_separated_by_zeros: string, popup_max_height_in_items := i32(-1)) -> bool do return swr_igComboStr(label, current_item, items_separated_by_zeros, popup_max_height_in_items); -combo_fn_bool_ptr :: inline proc(label: string, current_item: ^i32, items_getter: Items_Getter_Proc, data: rawptr, items_count: i32, popup_max_height_in_items := i32(0)) -> bool do return wrapper_combo_fn_bool_ptr(label, current_item, items_getter, data, items_count, popup_max_height_in_items); - -create_context :: inline proc(shared_font_atlas : ^Font_Atlas = nil) -> ^Context do return igCreateContext(shared_font_atlas); -debug_check_version_and_data_layout :: inline proc(version_str: string, sz_io: uint, sz_style: uint, sz_vec2: uint, sz_vec4: uint, sz_drawvert: uint, sz_drawidx: uint) -> bool do return swr_igDebugCheckVersionAndDataLayout(version_str, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert, sz_drawidx); -destroy_context :: inline proc(ctx : ^Context = nil) do igDestroyContext(ctx); -drag_float :: inline proc(label: string, v: ^f32, v_speed := f32(1.0), v_min := f32(0.0), v_max := f32(0.0), format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igDragFloat(label, v, v_speed, v_min, v_max, format, flags); -drag_float2 :: inline proc(label: string, v: [2]f32, v_speed := f32(1.0), v_min := f32(0.0), v_max := f32(0.0), format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igDragFloat2(label, v, v_speed, v_min, v_max, format, flags); -drag_float3 :: inline proc(label: string, v: [3]f32, v_speed := f32(1.0), v_min := f32(0.0), v_max := f32(0.0), format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igDragFloat3(label, v, v_speed, v_min, v_max, format, flags); -drag_float4 :: inline proc(label: string, v: [4]f32, v_speed := f32(1.0), v_min := f32(0.0), v_max := f32(0.0), format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igDragFloat4(label, v, v_speed, v_min, v_max, format, flags); -drag_float_range2 :: inline proc(label: string, v_current_min: ^f32, v_current_max: ^f32, v_speed := f32(1.0), v_min := f32(0.0), v_max := f32(0.0), format := "%.3f", format_max := "", flags := Slider_Flags(0)) -> bool do return swr_igDragFloatRange2(label, v_current_min, v_current_max, v_speed, v_min, v_max, format, format_max, flags); -drag_int :: inline proc(label: string, v: ^i32, v_speed := f32(1.0), v_min := i32(0), v_max := i32(0), format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igDragInt(label, v, v_speed, v_min, v_max, format, flags); -drag_int2 :: inline proc(label: string, v: [2]i32, v_speed := f32(1.0), v_min := i32(0), v_max := i32(0), format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igDragInt2(label, v, v_speed, v_min, v_max, format, flags); -drag_int3 :: inline proc(label: string, v: [3]i32, v_speed := f32(1.0), v_min := i32(0), v_max := i32(0), format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igDragInt3(label, v, v_speed, v_min, v_max, format, flags); -drag_int4 :: inline proc(label: string, v: [4]i32, v_speed := f32(1.0), v_min := i32(0), v_max := i32(0), format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igDragInt4(label, v, v_speed, v_min, v_max, format, flags); -drag_int_range2 :: inline proc(label: string, v_current_min: ^i32, v_current_max: ^i32, v_speed := f32(1.0), v_min := i32(0), v_max := i32(0), format := "%d", format_max := "", flags := Slider_Flags(0)) -> bool do return swr_igDragIntRange2(label, v_current_min, v_current_max, v_speed, v_min, v_max, format, format_max, flags); -drag_scalar :: inline proc(label: string, data_type: Data_Type, p_data: rawptr, v_speed: f32, p_min : rawptr = nil, p_max : rawptr = nil, format := "", flags := Slider_Flags(0)) -> bool do return swr_igDragScalar(label, data_type, p_data, v_speed, p_min, p_max, format, flags); -drag_scalar_n :: inline proc(label: string, data_type: Data_Type, p_data: rawptr, components: i32, v_speed: f32, p_min : rawptr = nil, p_max : rawptr = nil, format := "", flags := Slider_Flags(0)) -> bool do return swr_igDragScalarN(label, data_type, p_data, components, v_speed, p_min, p_max, format, flags); -dummy :: inline proc(size: Vec2) do igDummy(size); -end :: inline proc() do igEnd(); -end_child :: inline proc() do igEndChild(); -end_child_frame :: inline proc() do igEndChildFrame(); -end_combo :: inline proc() do igEndCombo(); -end_drag_drop_source :: inline proc() do igEndDragDropSource(); -end_drag_drop_target :: inline proc() do igEndDragDropTarget(); -end_frame :: inline proc() do igEndFrame(); -end_group :: inline proc() do igEndGroup(); -end_main_menu_bar :: inline proc() do igEndMainMenuBar(); -end_menu :: inline proc() do igEndMenu(); -end_menu_bar :: inline proc() do igEndMenuBar(); -end_popup :: inline proc() do igEndPopup(); -end_tab_bar :: inline proc() do igEndTabBar(); -end_tab_item :: inline proc() do igEndTabItem(); -end_tooltip :: inline proc() do igEndTooltip(); -get_background_draw_list :: inline proc() -> ^Draw_List do return igGetBackgroundDrawList(); -get_clipboard_text :: inline proc() -> cstring do return igGetClipboardText(); +combo_str_arr :: #force_inline proc(label: string, current_item: ^i32, items: []string, popup_max_height_in_items := i32(0)) -> bool do return wrapper_combo_str_arr(label, current_item, items, popup_max_height_in_items); +combo_str :: #force_inline proc(label: string, current_item: ^i32, items_separated_by_zeros: string, popup_max_height_in_items := i32(-1)) -> bool do return swr_igCombo_Str(label, current_item, items_separated_by_zeros, popup_max_height_in_items); +combo_fn_bool_ptr :: #force_inline proc(label: string, current_item: ^i32, items_getter: Items_Getter_Proc, data: rawptr, items_count: i32, popup_max_height_in_items := i32(0)) -> bool do return wrapper_combo_fn_bool_ptr(label, current_item, items_getter, data, items_count, popup_max_height_in_items); + +create_context :: #force_inline proc(shared_font_atlas : ^Font_Atlas = nil) -> ^Context do return igCreateContext(shared_font_atlas); +debug_check_version_and_data_layout :: #force_inline proc(version_str: string, sz_io: uint, sz_style: uint, sz_vec2: uint, sz_vec4: uint, sz_drawvert: uint, sz_drawidx: uint) -> bool do return swr_igDebugCheckVersionAndDataLayout(version_str, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert, sz_drawidx); +destroy_context :: #force_inline proc(ctx : ^Context = nil) do igDestroyContext(ctx); +drag_float :: #force_inline proc(label: string, v: ^f32, v_speed := f32(1.0), v_min := f32(0.0), v_max := f32(0.0), format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igDragFloat(label, v, v_speed, v_min, v_max, format, flags); +drag_float2 :: #force_inline proc(label: string, v: [2]f32, v_speed := f32(1.0), v_min := f32(0.0), v_max := f32(0.0), format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igDragFloat2(label, v, v_speed, v_min, v_max, format, flags); +drag_float3 :: #force_inline proc(label: string, v: [3]f32, v_speed := f32(1.0), v_min := f32(0.0), v_max := f32(0.0), format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igDragFloat3(label, v, v_speed, v_min, v_max, format, flags); +drag_float4 :: #force_inline proc(label: string, v: [4]f32, v_speed := f32(1.0), v_min := f32(0.0), v_max := f32(0.0), format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igDragFloat4(label, v, v_speed, v_min, v_max, format, flags); +drag_float_range2 :: #force_inline proc(label: string, v_current_min: ^f32, v_current_max: ^f32, v_speed := f32(1.0), v_min := f32(0.0), v_max := f32(0.0), format := "%.3f", format_max := "", flags := Slider_Flags(0)) -> bool do return swr_igDragFloatRange2(label, v_current_min, v_current_max, v_speed, v_min, v_max, format, format_max, flags); +drag_int :: #force_inline proc(label: string, v: ^i32, v_speed := f32(1.0), v_min := i32(0), v_max := i32(0), format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igDragInt(label, v, v_speed, v_min, v_max, format, flags); +drag_int2 :: #force_inline proc(label: string, v: [2]i32, v_speed := f32(1.0), v_min := i32(0), v_max := i32(0), format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igDragInt2(label, v, v_speed, v_min, v_max, format, flags); +drag_int3 :: #force_inline proc(label: string, v: [3]i32, v_speed := f32(1.0), v_min := i32(0), v_max := i32(0), format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igDragInt3(label, v, v_speed, v_min, v_max, format, flags); +drag_int4 :: #force_inline proc(label: string, v: [4]i32, v_speed := f32(1.0), v_min := i32(0), v_max := i32(0), format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igDragInt4(label, v, v_speed, v_min, v_max, format, flags); +drag_int_range2 :: #force_inline proc(label: string, v_current_min: ^i32, v_current_max: ^i32, v_speed := f32(1.0), v_min := i32(0), v_max := i32(0), format := "%d", format_max := "", flags := Slider_Flags(0)) -> bool do return swr_igDragIntRange2(label, v_current_min, v_current_max, v_speed, v_min, v_max, format, format_max, flags); +drag_scalar :: #force_inline proc(label: string, data_type: Data_Type, p_data: rawptr, v_speed := f32(1.0), p_min : rawptr = nil, p_max : rawptr = nil, format := "", flags := Slider_Flags(0)) -> bool do return swr_igDragScalar(label, data_type, p_data, v_speed, p_min, p_max, format, flags); +drag_scalar_n :: #force_inline proc(label: string, data_type: Data_Type, p_data: rawptr, components: i32, v_speed := f32(1.0), p_min : rawptr = nil, p_max : rawptr = nil, format := "", flags := Slider_Flags(0)) -> bool do return swr_igDragScalarN(label, data_type, p_data, components, v_speed, p_min, p_max, format, flags); +dummy :: #force_inline proc(size: Vec2) do igDummy(size); +end :: #force_inline proc() do igEnd(); +end_child :: #force_inline proc() do igEndChild(); +end_child_frame :: #force_inline proc() do igEndChildFrame(); +end_combo :: #force_inline proc() do igEndCombo(); +end_drag_drop_source :: #force_inline proc() do igEndDragDropSource(); +end_drag_drop_target :: #force_inline proc() do igEndDragDropTarget(); +end_frame :: #force_inline proc() do igEndFrame(); +end_group :: #force_inline proc() do igEndGroup(); +end_list_box :: #force_inline proc() do igEndListBox(); +end_main_menu_bar :: #force_inline proc() do igEndMainMenuBar(); +end_menu :: #force_inline proc() do igEndMenu(); +end_menu_bar :: #force_inline proc() do igEndMenuBar(); +end_popup :: #force_inline proc() do igEndPopup(); +end_tab_bar :: #force_inline proc() do igEndTabBar(); +end_tab_item :: #force_inline proc() do igEndTabItem(); +end_table :: #force_inline proc() do igEndTable(); +end_tooltip :: #force_inline proc() do igEndTooltip(); +get_allocator_functions :: #force_inline proc(p_alloc_func: ^Mem_Alloc_Func, p_free_func: ^Mem_Free_Func, p_user_data: ^rawptr) do igGetAllocatorFunctions(p_alloc_func, p_free_func, p_user_data); + +get_background_draw_list :: proc { + get_background_draw_list_nil, +}; +get_background_draw_list_nil :: #force_inline proc() -> ^Draw_List do return igGetBackgroundDrawList_Nil(); + +get_clipboard_text :: #force_inline proc() -> cstring do return igGetClipboardText(); get_color_u32 :: proc { - get_color_u32col, - get_color_u32vec4, - get_color_u32u32, -}; -get_color_u32col :: inline proc(idx: Col, alpha_mul := f32(1.0)) -> u32 do return igGetColorU32Col(idx, alpha_mul); -get_color_u32vec4 :: inline proc(col: Vec4) -> u32 do return igGetColorU32Vec4(col); -get_color_u32u32 :: inline proc(col: u32) -> u32 do return igGetColorU32U32(col); - -get_column_index :: inline proc() -> i32 do return igGetColumnIndex(); -get_column_offset :: inline proc(column_index := i32(-1)) -> f32 do return igGetColumnOffset(column_index); -get_column_width :: inline proc(column_index := i32(-1)) -> f32 do return igGetColumnWidth(column_index); -get_columns_count :: inline proc() -> i32 do return igGetColumnsCount(); -get_content_region_avail :: inline proc(pOut: ^Vec2) do igGetContentRegionAvail(pOut); -get_content_region_max :: inline proc(pOut: ^Vec2) do igGetContentRegionMax(pOut); -get_current_context :: inline proc() -> ^Context do return igGetCurrentContext(); -get_cursor_pos :: inline proc(pOut: ^Vec2) do igGetCursorPos(pOut); -get_cursor_pos_x :: inline proc() -> f32 do return igGetCursorPosX(); -get_cursor_pos_y :: inline proc() -> f32 do return igGetCursorPosY(); -get_cursor_screen_pos :: inline proc(pOut: ^Vec2) do igGetCursorScreenPos(pOut); -get_cursor_start_pos :: inline proc(pOut: ^Vec2) do igGetCursorStartPos(pOut); -get_drag_drop_payload :: inline proc() -> ^Payload do return igGetDragDropPayload(); -get_draw_data :: inline proc() -> ^Draw_Data do return igGetDrawData(); -get_draw_list_shared_data :: inline proc() -> ^Draw_List_Shared_Data do return igGetDrawListSharedData(); -get_font :: inline proc() -> ^ImFont do return igGetFont(); -get_font_size :: inline proc() -> f32 do return igGetFontSize(); -get_font_tex_uv_white_pixel :: inline proc(pOut: ^Vec2) do igGetFontTexUvWhitePixel(pOut); + get_color_u32_col, + get_color_u32_vec4, + get_color_u32_u32, +}; +get_color_u32_col :: #force_inline proc(idx: Col, alpha_mul := f32(1.0)) -> u32 do return igGetColorU32_Col(idx, alpha_mul); +get_color_u32_vec4 :: #force_inline proc(col: Vec4) -> u32 do return igGetColorU32_Vec4(col); +get_color_u32_u32 :: #force_inline proc(col: u32) -> u32 do return igGetColorU32_U32(col); + +get_column_index :: #force_inline proc() -> i32 do return igGetColumnIndex(); +get_column_offset :: #force_inline proc(column_index := i32(-1)) -> f32 do return igGetColumnOffset(column_index); +get_column_width :: #force_inline proc(column_index := i32(-1)) -> f32 do return igGetColumnWidth(column_index); +get_columns_count :: #force_inline proc() -> i32 do return igGetColumnsCount(); +get_content_region_avail :: #force_inline proc(pOut: ^Vec2) do igGetContentRegionAvail(pOut); +get_content_region_max :: #force_inline proc(pOut: ^Vec2) do igGetContentRegionMax(pOut); +get_current_context :: #force_inline proc() -> ^Context do return igGetCurrentContext(); +get_cursor_pos :: #force_inline proc(pOut: ^Vec2) do igGetCursorPos(pOut); +get_cursor_pos_x :: #force_inline proc() -> f32 do return igGetCursorPosX(); +get_cursor_pos_y :: #force_inline proc() -> f32 do return igGetCursorPosY(); +get_cursor_screen_pos :: #force_inline proc(pOut: ^Vec2) do igGetCursorScreenPos(pOut); +get_cursor_start_pos :: #force_inline proc(pOut: ^Vec2) do igGetCursorStartPos(pOut); +get_drag_drop_payload :: #force_inline proc() -> ^Payload do return igGetDragDropPayload(); +get_draw_data :: #force_inline proc() -> ^Draw_Data do return igGetDrawData(); +get_draw_list_shared_data :: #force_inline proc() -> ^Draw_List_Shared_Data do return igGetDrawListSharedData(); +get_font :: #force_inline proc() -> ^ImFont do return igGetFont(); +get_font_size :: #force_inline proc() -> f32 do return igGetFontSize(); +get_font_tex_uv_white_pixel :: #force_inline proc(pOut: ^Vec2) do igGetFontTexUvWhitePixel(pOut); get_foreground_draw_list :: proc { get_foreground_draw_list_nil, }; -get_foreground_draw_list_nil :: inline proc() -> ^Draw_List do return igGetForegroundDrawListNil(); +get_foreground_draw_list_nil :: #force_inline proc() -> ^Draw_List do return igGetForegroundDrawList_Nil(); -get_frame_count :: inline proc() -> i32 do return igGetFrameCount(); -get_frame_height :: inline proc() -> f32 do return igGetFrameHeight(); -get_frame_height_with_spacing :: inline proc() -> f32 do return igGetFrameHeightWithSpacing(); +get_frame_count :: #force_inline proc() -> i32 do return igGetFrameCount(); +get_frame_height :: #force_inline proc() -> f32 do return igGetFrameHeight(); +get_frame_height_with_spacing :: #force_inline proc() -> f32 do return igGetFrameHeightWithSpacing(); get_id :: proc { get_id_str, get_id_str_str, get_id_ptr, }; -get_id_str :: inline proc(str_id: string) -> ImID do return swr_igGetIDStr(str_id); -get_id_str_str :: inline proc(str_id_begin: string, str_id_end: string) -> ImID do return swr_igGetIDStrStr(str_id_begin, str_id_end); -get_id_ptr :: inline proc(ptr_id: rawptr) -> ImID do return igGetIDPtr(ptr_id); - -get_io :: inline proc() -> ^IO do return igGetIO(); -get_item_rect_max :: inline proc(pOut: ^Vec2) do igGetItemRectMax(pOut); -get_item_rect_min :: inline proc(pOut: ^Vec2) do igGetItemRectMin(pOut); -get_item_rect_size :: inline proc(pOut: ^Vec2) do igGetItemRectSize(pOut); -get_key_index :: inline proc(imgui_key: Key) -> i32 do return igGetKeyIndex(imgui_key); -get_key_pressed_amount :: inline proc(key_index: i32, repeat_delay: f32, rate: f32) -> i32 do return igGetKeyPressedAmount(key_index, repeat_delay, rate); -get_mouse_cursor :: inline proc() -> Mouse_Cursor do return igGetMouseCursor(); -get_mouse_drag_delta :: inline proc(pOut: ^Vec2, button := Mouse_Button(0), lock_threshold := f32(-1.0)) do igGetMouseDragDelta(pOut, button, lock_threshold); -get_mouse_pos :: inline proc(pOut: ^Vec2) do igGetMousePos(pOut); -get_mouse_pos_on_opening_current_popup :: inline proc(pOut: ^Vec2) do igGetMousePosOnOpeningCurrentPopup(pOut); -get_scroll_max_x :: inline proc() -> f32 do return igGetScrollMaxX(); -get_scroll_max_y :: inline proc() -> f32 do return igGetScrollMaxY(); -get_scroll_x :: inline proc() -> f32 do return igGetScrollX(); -get_scroll_y :: inline proc() -> f32 do return igGetScrollY(); -get_state_storage :: inline proc() -> ^Storage do return igGetStateStorage(); -get_style :: inline proc() -> ^Style do return igGetStyle(); -get_style_color_name :: inline proc(idx: Col) -> cstring do return igGetStyleColorName(idx); -get_style_color_vec4 :: inline proc(idx: Col) -> ^Vec4 do return igGetStyleColorVec4(idx); -get_text_line_height :: inline proc() -> f32 do return igGetTextLineHeight(); -get_text_line_height_with_spacing :: inline proc() -> f32 do return igGetTextLineHeightWithSpacing(); -get_time :: inline proc() -> f64 do return igGetTime(); -get_tree_node_to_label_spacing :: inline proc() -> f32 do return igGetTreeNodeToLabelSpacing(); -get_version :: inline proc() -> cstring do return igGetVersion(); -get_window_content_region_max :: inline proc(pOut: ^Vec2) do igGetWindowContentRegionMax(pOut); -get_window_content_region_min :: inline proc(pOut: ^Vec2) do igGetWindowContentRegionMin(pOut); -get_window_content_region_width :: inline proc() -> f32 do return igGetWindowContentRegionWidth(); -get_window_draw_list :: inline proc() -> ^Draw_List do return igGetWindowDrawList(); -get_window_height :: inline proc() -> f32 do return igGetWindowHeight(); -get_window_pos :: inline proc() -> Vec2 do return wrapper_get_window_pos(); -get_window_size :: inline proc() -> Vec2 do return wrapper_get_window_size(); -get_window_width :: inline proc() -> f32 do return igGetWindowWidth(); -image :: inline proc(user_texture_id: Texture_ID, size: Vec2, uv0 := Vec2(Vec2 {0,0}), uv1 := Vec2(Vec2 {1,1}), tint_col := Vec4(Vec4 {1,1,1,1}), border_col := Vec4(Vec4 {0,0,0,0})) do igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); -image_button :: inline proc(user_texture_id: Texture_ID, size: Vec2, uv0 := Vec2(Vec2 {0,0}), uv1 := Vec2(Vec2 {1,1}), frame_padding := i32(-1), bg_col := Vec4(Vec4 {0,0,0,0}), tint_col := Vec4(Vec4 {1,1,1,1})) -> bool do return igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); -indent :: inline proc(indent_w := f32(0.0)) do igIndent(indent_w); -input_double :: inline proc(label: string, v: ^f64, step := f64(0.0), step_fast := f64(0.0), format := "%.6f", flags := Input_Text_Flags(0)) -> bool do return swr_igInputDouble(label, v, step, step_fast, format, flags); -input_float :: inline proc(label: string, v: ^f32, step := f32(0.0), step_fast := f32(0.0), format := "%.3f", flags := Input_Text_Flags(0)) -> bool do return swr_igInputFloat(label, v, step, step_fast, format, flags); -input_float2 :: inline proc(label: string, v: [2]f32, format := "%.3f", flags := Input_Text_Flags(0)) -> bool do return swr_igInputFloat2(label, v, format, flags); -input_float3 :: inline proc(label: string, v: [3]f32, format := "%.3f", flags := Input_Text_Flags(0)) -> bool do return swr_igInputFloat3(label, v, format, flags); -input_float4 :: inline proc(label: string, v: [4]f32, format := "%.3f", flags := Input_Text_Flags(0)) -> bool do return swr_igInputFloat4(label, v, format, flags); -input_int :: inline proc(label: string, v: ^i32, step := i32(1), step_fast := i32(100), flags := Input_Text_Flags(0)) -> bool do return swr_igInputInt(label, v, step, step_fast, flags); -input_int2 :: inline proc(label: string, v: [2]i32, flags := Input_Text_Flags(0)) -> bool do return swr_igInputInt2(label, v, flags); -input_int3 :: inline proc(label: string, v: [3]i32, flags := Input_Text_Flags(0)) -> bool do return swr_igInputInt3(label, v, flags); -input_int4 :: inline proc(label: string, v: [4]i32, flags := Input_Text_Flags(0)) -> bool do return swr_igInputInt4(label, v, flags); -input_scalar :: inline proc(label: string, data_type: Data_Type, p_data: rawptr, p_step : rawptr = nil, p_step_fast : rawptr = nil, format := "", flags := Input_Text_Flags(0)) -> bool do return swr_igInputScalar(label, data_type, p_data, p_step, p_step_fast, format, flags); -input_scalar_n :: inline proc(label: string, data_type: Data_Type, p_data: rawptr, components: i32, p_step : rawptr = nil, p_step_fast : rawptr = nil, format := "", flags := Input_Text_Flags(0)) -> bool do return swr_igInputScalarN(label, data_type, p_data, components, p_step, p_step_fast, format, flags); -input_text :: inline proc(label: string, buf: []u8, flags := Input_Text_Flags(0), callback : Input_Text_Callback = nil, user_data : rawptr = nil) -> bool do return wrapper_input_text(label, buf, flags, callback, user_data); -input_text_multiline :: inline proc(label: string, buf: string, buf_size: uint, size := Vec2(Vec2 {0,0}), flags := Input_Text_Flags(0), callback : Input_Text_Callback = nil, user_data : rawptr = nil) -> bool do return swr_igInputTextMultiline(label, buf, buf_size, size, flags, callback, user_data); -input_text_with_hint :: inline proc(label: string, hint: string, buf: string, buf_size: uint, flags := Input_Text_Flags(0), callback : Input_Text_Callback = nil, user_data : rawptr = nil) -> bool do return swr_igInputTextWithHint(label, hint, buf, buf_size, flags, callback, user_data); -invisible_button :: inline proc(str_id: string, size: Vec2, flags := Button_Flags(0)) -> bool do return swr_igInvisibleButton(str_id, size, flags); -is_any_item_active :: inline proc() -> bool do return igIsAnyItemActive(); -is_any_item_focused :: inline proc() -> bool do return igIsAnyItemFocused(); -is_any_item_hovered :: inline proc() -> bool do return igIsAnyItemHovered(); -is_any_mouse_down :: inline proc() -> bool do return igIsAnyMouseDown(); -is_item_activated :: inline proc() -> bool do return igIsItemActivated(); -is_item_active :: inline proc() -> bool do return igIsItemActive(); -is_item_clicked :: inline proc(mouse_button := Mouse_Button(0)) -> bool do return igIsItemClicked(mouse_button); -is_item_deactivated :: inline proc() -> bool do return igIsItemDeactivated(); -is_item_deactivated_after_edit :: inline proc() -> bool do return igIsItemDeactivatedAfterEdit(); -is_item_edited :: inline proc() -> bool do return igIsItemEdited(); -is_item_focused :: inline proc() -> bool do return igIsItemFocused(); -is_item_hovered :: inline proc(flags := Hovered_Flags(0)) -> bool do return igIsItemHovered(flags); -is_item_toggled_open :: inline proc() -> bool do return igIsItemToggledOpen(); -is_item_visible :: inline proc() -> bool do return igIsItemVisible(); -is_key_down :: inline proc(user_key_index: i32) -> bool do return igIsKeyDown(user_key_index); -is_key_pressed :: inline proc(user_key_index: i32, repeat := bool(true)) -> bool do return igIsKeyPressed(user_key_index, repeat); -is_key_released :: inline proc(user_key_index: i32) -> bool do return igIsKeyReleased(user_key_index); -is_mouse_clicked :: inline proc(button: Mouse_Button, repeat := bool(false)) -> bool do return igIsMouseClicked(button, repeat); -is_mouse_double_clicked :: inline proc(button: Mouse_Button) -> bool do return igIsMouseDoubleClicked(button); -is_mouse_down :: inline proc(button: Mouse_Button) -> bool do return igIsMouseDown(button); -is_mouse_dragging :: inline proc(button: Mouse_Button, lock_threshold := f32(-1.0)) -> bool do return igIsMouseDragging(button, lock_threshold); -is_mouse_hovering_rect :: inline proc(r_min: Vec2, r_max: Vec2, clip := bool(true)) -> bool do return igIsMouseHoveringRect(r_min, r_max, clip); -is_mouse_pos_valid :: inline proc(mouse_pos : ^Vec2 = nil) -> bool do return igIsMousePosValid(mouse_pos); -is_mouse_released :: inline proc(button: Mouse_Button) -> bool do return igIsMouseReleased(button); +get_id_str :: #force_inline proc(str_id: string) -> ImID do return swr_igGetID_Str(str_id); +get_id_str_str :: #force_inline proc(str_id_begin: string, str_id_end: string) -> ImID do return swr_igGetID_StrStr(str_id_begin, str_id_end); +get_id_ptr :: #force_inline proc(ptr_id: rawptr) -> ImID do return igGetID_Ptr(ptr_id); + +get_io :: #force_inline proc() -> ^IO do return igGetIO(); +get_item_rect_max :: #force_inline proc(pOut: ^Vec2) do igGetItemRectMax(pOut); +get_item_rect_min :: #force_inline proc(pOut: ^Vec2) do igGetItemRectMin(pOut); +get_item_rect_size :: #force_inline proc(pOut: ^Vec2) do igGetItemRectSize(pOut); +get_key_index :: #force_inline proc(imgui_key: Key) -> i32 do return igGetKeyIndex(imgui_key); +get_key_pressed_amount :: #force_inline proc(key_index: i32, repeat_delay: f32, rate: f32) -> i32 do return igGetKeyPressedAmount(key_index, repeat_delay, rate); +get_main_viewport :: #force_inline proc() -> ^Viewport do return igGetMainViewport(); +get_mouse_cursor :: #force_inline proc() -> Mouse_Cursor do return igGetMouseCursor(); +get_mouse_drag_delta :: #force_inline proc(pOut: ^Vec2, button := Mouse_Button(0), lock_threshold := f32(-1.0)) do igGetMouseDragDelta(pOut, button, lock_threshold); +get_mouse_pos :: #force_inline proc(pOut: ^Vec2) do igGetMousePos(pOut); +get_mouse_pos_on_opening_current_popup :: #force_inline proc(pOut: ^Vec2) do igGetMousePosOnOpeningCurrentPopup(pOut); +get_scroll_max_x :: #force_inline proc() -> f32 do return igGetScrollMaxX(); +get_scroll_max_y :: #force_inline proc() -> f32 do return igGetScrollMaxY(); +get_scroll_x :: #force_inline proc() -> f32 do return igGetScrollX(); +get_scroll_y :: #force_inline proc() -> f32 do return igGetScrollY(); +get_state_storage :: #force_inline proc() -> ^Storage do return igGetStateStorage(); +get_style :: #force_inline proc() -> ^Style do return igGetStyle(); +get_style_color_name :: #force_inline proc(idx: Col) -> cstring do return igGetStyleColorName(idx); +get_style_color_vec4 :: #force_inline proc(idx: Col) -> ^Vec4 do return igGetStyleColorVec4(idx); +get_text_line_height :: #force_inline proc() -> f32 do return igGetTextLineHeight(); +get_text_line_height_with_spacing :: #force_inline proc() -> f32 do return igGetTextLineHeightWithSpacing(); +get_time :: #force_inline proc() -> f64 do return igGetTime(); +get_tree_node_to_label_spacing :: #force_inline proc() -> f32 do return igGetTreeNodeToLabelSpacing(); +get_version :: #force_inline proc() -> cstring do return igGetVersion(); +get_window_content_region_max :: #force_inline proc(pOut: ^Vec2) do igGetWindowContentRegionMax(pOut); +get_window_content_region_min :: #force_inline proc(pOut: ^Vec2) do igGetWindowContentRegionMin(pOut); +get_window_content_region_width :: #force_inline proc() -> f32 do return igGetWindowContentRegionWidth(); +get_window_draw_list :: #force_inline proc() -> ^Draw_List do return igGetWindowDrawList(); +get_window_height :: #force_inline proc() -> f32 do return igGetWindowHeight(); +get_window_pos :: #force_inline proc() -> Vec2 do return wrapper_get_window_pos(); +get_window_size :: #force_inline proc() -> Vec2 do return wrapper_get_window_size(); +get_window_width :: #force_inline proc() -> f32 do return igGetWindowWidth(); +image :: #force_inline proc(user_texture_id: Texture_ID, size: Vec2, uv0 := Vec2(Vec2 {0,0}), uv1 := Vec2(Vec2 {1,1}), tint_col := Vec4(Vec4 {1,1,1,1}), border_col := Vec4(Vec4 {0,0,0,0})) do igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); +image_button :: #force_inline proc(user_texture_id: Texture_ID, size: Vec2, uv0 := Vec2(Vec2 {0,0}), uv1 := Vec2(Vec2 {1,1}), frame_padding := i32(-1), bg_col := Vec4(Vec4 {0,0,0,0}), tint_col := Vec4(Vec4 {1,1,1,1})) -> bool do return igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); +indent :: #force_inline proc(indent_w := f32(0.0)) do igIndent(indent_w); +input_double :: #force_inline proc(label: string, v: ^f64, step := f64(0.0), step_fast := f64(0.0), format := "%.6f", flags := Input_Text_Flags(0)) -> bool do return swr_igInputDouble(label, v, step, step_fast, format, flags); +input_float :: #force_inline proc(label: string, v: ^f32, step := f32(0.0), step_fast := f32(0.0), format := "%.3f", flags := Input_Text_Flags(0)) -> bool do return swr_igInputFloat(label, v, step, step_fast, format, flags); +input_float2 :: #force_inline proc(label: string, v: [2]f32, format := "%.3f", flags := Input_Text_Flags(0)) -> bool do return swr_igInputFloat2(label, v, format, flags); +input_float3 :: #force_inline proc(label: string, v: [3]f32, format := "%.3f", flags := Input_Text_Flags(0)) -> bool do return swr_igInputFloat3(label, v, format, flags); +input_float4 :: #force_inline proc(label: string, v: [4]f32, format := "%.3f", flags := Input_Text_Flags(0)) -> bool do return swr_igInputFloat4(label, v, format, flags); +input_int :: #force_inline proc(label: string, v: ^i32, step := i32(1), step_fast := i32(100), flags := Input_Text_Flags(0)) -> bool do return swr_igInputInt(label, v, step, step_fast, flags); +input_int2 :: #force_inline proc(label: string, v: [2]i32, flags := Input_Text_Flags(0)) -> bool do return swr_igInputInt2(label, v, flags); +input_int3 :: #force_inline proc(label: string, v: [3]i32, flags := Input_Text_Flags(0)) -> bool do return swr_igInputInt3(label, v, flags); +input_int4 :: #force_inline proc(label: string, v: [4]i32, flags := Input_Text_Flags(0)) -> bool do return swr_igInputInt4(label, v, flags); +input_scalar :: #force_inline proc(label: string, data_type: Data_Type, p_data: rawptr, p_step : rawptr = nil, p_step_fast : rawptr = nil, format := "", flags := Input_Text_Flags(0)) -> bool do return swr_igInputScalar(label, data_type, p_data, p_step, p_step_fast, format, flags); +input_scalar_n :: #force_inline proc(label: string, data_type: Data_Type, p_data: rawptr, components: i32, p_step : rawptr = nil, p_step_fast : rawptr = nil, format := "", flags := Input_Text_Flags(0)) -> bool do return swr_igInputScalarN(label, data_type, p_data, components, p_step, p_step_fast, format, flags); +input_text :: #force_inline proc(label: string, buf: []u8, flags := Input_Text_Flags(0), callback : Input_Text_Callback = nil, user_data : rawptr = nil) -> bool do return wrapper_input_text(label, buf, flags, callback, user_data); +input_text_multiline :: #force_inline proc(label: string, buf: string, buf_size: uint, size := Vec2(Vec2 {0,0}), flags := Input_Text_Flags(0), callback : Input_Text_Callback = nil, user_data : rawptr = nil) -> bool do return swr_igInputTextMultiline(label, buf, buf_size, size, flags, callback, user_data); +input_text_with_hint :: #force_inline proc(label: string, hint: string, buf: string, buf_size: uint, flags := Input_Text_Flags(0), callback : Input_Text_Callback = nil, user_data : rawptr = nil) -> bool do return swr_igInputTextWithHint(label, hint, buf, buf_size, flags, callback, user_data); +invisible_button :: #force_inline proc(str_id: string, size: Vec2, flags := Button_Flags(0)) -> bool do return swr_igInvisibleButton(str_id, size, flags); +is_any_item_active :: #force_inline proc() -> bool do return igIsAnyItemActive(); +is_any_item_focused :: #force_inline proc() -> bool do return igIsAnyItemFocused(); +is_any_item_hovered :: #force_inline proc() -> bool do return igIsAnyItemHovered(); +is_any_mouse_down :: #force_inline proc() -> bool do return igIsAnyMouseDown(); +is_item_activated :: #force_inline proc() -> bool do return igIsItemActivated(); +is_item_active :: #force_inline proc() -> bool do return igIsItemActive(); +is_item_clicked :: #force_inline proc(mouse_button := Mouse_Button(0)) -> bool do return igIsItemClicked(mouse_button); +is_item_deactivated :: #force_inline proc() -> bool do return igIsItemDeactivated(); +is_item_deactivated_after_edit :: #force_inline proc() -> bool do return igIsItemDeactivatedAfterEdit(); +is_item_edited :: #force_inline proc() -> bool do return igIsItemEdited(); +is_item_focused :: #force_inline proc() -> bool do return igIsItemFocused(); +is_item_hovered :: #force_inline proc(flags := Hovered_Flags(0)) -> bool do return igIsItemHovered(flags); +is_item_toggled_open :: #force_inline proc() -> bool do return igIsItemToggledOpen(); +is_item_visible :: #force_inline proc() -> bool do return igIsItemVisible(); +is_key_down :: #force_inline proc(user_key_index: i32) -> bool do return igIsKeyDown(user_key_index); +is_key_pressed :: #force_inline proc(user_key_index: i32, repeat := bool(true)) -> bool do return igIsKeyPressed(user_key_index, repeat); +is_key_released :: #force_inline proc(user_key_index: i32) -> bool do return igIsKeyReleased(user_key_index); +is_mouse_clicked :: #force_inline proc(button: Mouse_Button, repeat := bool(false)) -> bool do return igIsMouseClicked(button, repeat); +is_mouse_double_clicked :: #force_inline proc(button: Mouse_Button) -> bool do return igIsMouseDoubleClicked(button); +is_mouse_down :: #force_inline proc(button: Mouse_Button) -> bool do return igIsMouseDown(button); +is_mouse_dragging :: #force_inline proc(button: Mouse_Button, lock_threshold := f32(-1.0)) -> bool do return igIsMouseDragging(button, lock_threshold); +is_mouse_hovering_rect :: #force_inline proc(r_min: Vec2, r_max: Vec2, clip := bool(true)) -> bool do return igIsMouseHoveringRect(r_min, r_max, clip); +is_mouse_pos_valid :: #force_inline proc(mouse_pos : ^Vec2 = nil) -> bool do return igIsMousePosValid(mouse_pos); +is_mouse_released :: #force_inline proc(button: Mouse_Button) -> bool do return igIsMouseReleased(button); is_popup_open :: proc { is_popup_open_str, }; -is_popup_open_str :: inline proc(str_id: string, flags := Popup_Flags(0)) -> bool do return swr_igIsPopupOpenStr(str_id, flags); +is_popup_open_str :: #force_inline proc(str_id: string, flags := Popup_Flags(0)) -> bool do return swr_igIsPopupOpen_Str(str_id, flags); is_rect_visible :: proc { is_rect_visible_nil, is_rect_visible_vec2, }; -is_rect_visible_nil :: inline proc(size: Vec2) -> bool do return igIsRectVisibleNil(size); -is_rect_visible_vec2 :: inline proc(rect_min: Vec2, rect_max: Vec2) -> bool do return igIsRectVisibleVec2(rect_min, rect_max); +is_rect_visible_nil :: #force_inline proc(size: Vec2) -> bool do return igIsRectVisible_Nil(size); +is_rect_visible_vec2 :: #force_inline proc(rect_min: Vec2, rect_max: Vec2) -> bool do return igIsRectVisible_Vec2(rect_min, rect_max); -is_window_appearing :: inline proc() -> bool do return igIsWindowAppearing(); -is_window_collapsed :: inline proc() -> bool do return igIsWindowCollapsed(); -is_window_focused :: inline proc(flags := Focused_Flags(0)) -> bool do return igIsWindowFocused(flags); -is_window_hovered :: inline proc(flags := Hovered_Flags(0)) -> bool do return igIsWindowHovered(flags); -label_text :: inline proc(label: string, fmt_: string, args: ..any) do swr_igLabelText(label, fmt_, args); +is_window_appearing :: #force_inline proc() -> bool do return igIsWindowAppearing(); +is_window_collapsed :: #force_inline proc() -> bool do return igIsWindowCollapsed(); +is_window_focused :: #force_inline proc(flags := Focused_Flags(0)) -> bool do return igIsWindowFocused(flags); +is_window_hovered :: #force_inline proc(flags := Hovered_Flags(0)) -> bool do return igIsWindowHovered(flags); +label_text :: #force_inline proc(label: string, fmt_: string, args: ..any) do swr_igLabelText(label, fmt_, args); list_box :: proc { list_box_str_arr, list_box_fn_bool_ptr, }; -list_box_str_arr :: inline proc(label: string, current_item: ^i32, items: string, items_count: i32, height_in_items := i32(-1)) -> bool do return swr_igListBoxStr_arr(label, current_item, items, items_count, height_in_items); -list_box_fn_bool_ptr :: inline proc(label: string, current_item: ^i32, items_getter: Items_Getter_Proc, data: rawptr, items_count: i32, height_in_items := i32(0)) -> bool do return wrapper_list_box_fn_bool_ptr(label, current_item, items_getter, data, items_count, height_in_items); - -list_box_footer :: inline proc() do igListBoxFooter(); - -list_box_header :: proc { - list_box_header_vec2, - list_box_header_int, -}; -list_box_header_vec2 :: inline proc(label: string, size := Vec2(Vec2 {0,0})) -> bool do return swr_igListBoxHeaderVec2(label, size); -list_box_header_int :: inline proc(label: string, items_count: i32, height_in_items := i32(-1)) -> bool do return swr_igListBoxHeaderInt(label, items_count, height_in_items); - -load_ini_settings_from_disk :: inline proc(ini_filename: string) do swr_igLoadIniSettingsFromDisk(ini_filename); -load_ini_settings_from_memory :: inline proc(ini_data: string, ini_size := uint(0)) do swr_igLoadIniSettingsFromMemory(ini_data, ini_size); -log_buttons :: inline proc() do igLogButtons(); -log_finish :: inline proc() do igLogFinish(); -log_text :: inline proc(fmt_: string, args: ..any) do swr_igLogText(fmt_, args); -log_to_clipboard :: inline proc(auto_open_depth := i32(-1)) do igLogToClipboard(auto_open_depth); -log_to_file :: inline proc(auto_open_depth := i32(-1), filename := "") do swr_igLogToFile(auto_open_depth, filename); -log_to_tty :: inline proc(auto_open_depth := i32(-1)) do igLogToTTY(auto_open_depth); -mem_alloc :: inline proc(size: uint) -> rawptr do return igMemAlloc(size); -mem_free :: inline proc(ptr: rawptr) do igMemFree(ptr); +list_box_str_arr :: #force_inline proc(label: string, current_item: ^i32, items: string, items_count: i32, height_in_items := i32(-1)) -> bool do return swr_igListBox_Str_arr(label, current_item, items, items_count, height_in_items); +list_box_fn_bool_ptr :: #force_inline proc(label: string, current_item: ^i32, items_getter: Items_Getter_Proc, data: rawptr, items_count: i32, height_in_items := i32(0)) -> bool do return wrapper_list_box_fn_bool_ptr(label, current_item, items_getter, data, items_count, height_in_items); + +load_ini_settings_from_disk :: #force_inline proc(ini_filename: string) do swr_igLoadIniSettingsFromDisk(ini_filename); +load_ini_settings_from_memory :: #force_inline proc(ini_data: string, ini_size := uint(0)) do swr_igLoadIniSettingsFromMemory(ini_data, ini_size); +log_buttons :: #force_inline proc() do igLogButtons(); +log_finish :: #force_inline proc() do igLogFinish(); +log_text :: #force_inline proc(fmt_: string, args: ..any) do swr_igLogText(fmt_, args); +log_to_clipboard :: #force_inline proc(auto_open_depth := i32(-1)) do igLogToClipboard(auto_open_depth); +log_to_file :: #force_inline proc(auto_open_depth := i32(-1), filename := "") do swr_igLogToFile(auto_open_depth, filename); +log_to_tty :: #force_inline proc(auto_open_depth := i32(-1)) do igLogToTTY(auto_open_depth); +mem_alloc :: #force_inline proc(size: uint) -> rawptr do return igMemAlloc(size); +mem_free :: #force_inline proc(ptr: rawptr) do igMemFree(ptr); menu_item :: proc { menu_item_bool, menu_item_bool_ptr, }; -menu_item_bool :: inline proc(label: string, shortcut := "", selected := bool(false), enabled := bool(true)) -> bool do return swr_igMenuItemBool(label, shortcut, selected, enabled); -menu_item_bool_ptr :: inline proc(label: string, shortcut: string, p_selected: ^bool, enabled := bool(true)) -> bool do return swr_igMenuItemBoolPtr(label, shortcut, p_selected, enabled); +menu_item_bool :: #force_inline proc(label: string, shortcut := "", selected := bool(false), enabled := bool(true)) -> bool do return swr_igMenuItem_Bool(label, shortcut, selected, enabled); +menu_item_bool_ptr :: #force_inline proc(label: string, shortcut: string, p_selected: ^bool, enabled := bool(true)) -> bool do return swr_igMenuItem_BoolPtr(label, shortcut, p_selected, enabled); -new_frame :: inline proc() do igNewFrame(); -new_line :: inline proc() do igNewLine(); -next_column :: inline proc() do igNextColumn(); -open_popup :: inline proc(str_id: string, popup_flags := Popup_Flags(0)) do swr_igOpenPopup(str_id, popup_flags); -open_popup_on_item_click :: inline proc(str_id := "", popup_flags := Popup_Flags(1)) do swr_igOpenPopupOnItemClick(str_id, popup_flags); +new_frame :: #force_inline proc() do igNewFrame(); +new_line :: #force_inline proc() do igNewLine(); +next_column :: #force_inline proc() do igNextColumn(); +open_popup :: #force_inline proc(str_id: string, popup_flags := Popup_Flags(0)) do swr_igOpenPopup(str_id, popup_flags); +open_popup_on_item_click :: #force_inline proc(str_id := "", popup_flags := Popup_Flags(1)) do swr_igOpenPopupOnItemClick(str_id, popup_flags); plot_histogram :: proc { plot_histogram_float_ptr, plot_histogram_fn_float_ptr, }; -plot_histogram_float_ptr :: inline proc(label: string, values: ^f32, values_count: i32, values_offset := i32(0), overlay_text := "", scale_min := f32(max(f32)), scale_max := f32(max(f32)), graph_size := Vec2(Vec2 {0,0}), stride := i32(size_of(f32))) do swr_igPlotHistogramFloatPtr(label, values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, stride); -plot_histogram_fn_float_ptr :: inline proc(label: string, values_getter: Value_Getter_Proc, data: rawptr, values_count: i32, values_offset: i32, overlay_text: string, scale_min: f32, scale_max: f32, graph_size: Vec2) do wrapper_plot_histogram_fn_float_ptr(label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size); +plot_histogram_float_ptr :: #force_inline proc(label: string, values: ^f32, values_count: i32, values_offset := i32(0), overlay_text := "", scale_min := f32(max(f32)), scale_max := f32(max(f32)), graph_size := Vec2(Vec2 {0,0}), stride := i32(size_of(f32))) do swr_igPlotHistogram_FloatPtr(label, values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, stride); +plot_histogram_fn_float_ptr :: #force_inline proc(label: string, values_getter: Value_Getter_Proc, data: rawptr, values_count: i32, values_offset: i32, overlay_text: string, scale_min: f32, scale_max: f32, graph_size: Vec2) do wrapper_plot_histogram_fn_float_ptr(label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size); plot_lines :: proc { plot_lines_float_ptr, plot_lines_fn_float_ptr, }; -plot_lines_float_ptr :: inline proc(label: string, values: ^f32, values_count: i32, values_offset := i32(0), overlay_text := "", scale_min := f32(max(f32)), scale_max := f32(max(f32)), graph_size := Vec2(Vec2 {0,0}), stride := i32(size_of(f32))) do swr_igPlotLinesFloatPtr(label, values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, stride); -plot_lines_fn_float_ptr :: inline proc(label: string, values_getter: Value_Getter_Proc, data: rawptr, values_count: i32, values_offset: i32, overlay_text: string, scale_min: f32, scale_max: f32, graph_size: Vec2) do wrapper_plot_lines_fn_float_ptr(label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size); - -pop_allow_keyboard_focus :: inline proc() do igPopAllowKeyboardFocus(); -pop_button_repeat :: inline proc() do igPopButtonRepeat(); -pop_clip_rect :: inline proc() do igPopClipRect(); -pop_font :: inline proc() do igPopFont(); -pop_id :: inline proc() do igPopID(); -pop_item_width :: inline proc() do igPopItemWidth(); -pop_style_color :: inline proc(count := i32(1)) do igPopStyleColor(count); -pop_style_var :: inline proc(count := i32(1)) do igPopStyleVar(count); -pop_text_wrap_pos :: inline proc() do igPopTextWrapPos(); -progress_bar :: inline proc(fraction: f32, size_arg := Vec2(Vec2 {-1,0}), overlay := "") do swr_igProgressBar(fraction, size_arg, overlay); -push_allow_keyboard_focus :: inline proc(allow_keyboard_focus: bool) do igPushAllowKeyboardFocus(allow_keyboard_focus); -push_button_repeat :: inline proc(repeat: bool) do igPushButtonRepeat(repeat); -push_clip_rect :: inline proc(clip_rect_min: Vec2, clip_rect_max: Vec2, intersect_with_current_clip_rect: bool) do igPushClipRect(clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); -push_font :: inline proc(font: ^ImFont) do igPushFont(font); +plot_lines_float_ptr :: #force_inline proc(label: string, values: ^f32, values_count: i32, values_offset := i32(0), overlay_text := "", scale_min := f32(max(f32)), scale_max := f32(max(f32)), graph_size := Vec2(Vec2 {0,0}), stride := i32(size_of(f32))) do swr_igPlotLines_FloatPtr(label, values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, stride); +plot_lines_fn_float_ptr :: #force_inline proc(label: string, values_getter: Value_Getter_Proc, data: rawptr, values_count: i32, values_offset: i32, overlay_text: string, scale_min: f32, scale_max: f32, graph_size: Vec2) do wrapper_plot_lines_fn_float_ptr(label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size); + +pop_allow_keyboard_focus :: #force_inline proc() do igPopAllowKeyboardFocus(); +pop_button_repeat :: #force_inline proc() do igPopButtonRepeat(); +pop_clip_rect :: #force_inline proc() do igPopClipRect(); +pop_font :: #force_inline proc() do igPopFont(); +pop_id :: #force_inline proc() do igPopID(); +pop_item_width :: #force_inline proc() do igPopItemWidth(); +pop_style_color :: #force_inline proc(count := i32(1)) do igPopStyleColor(count); +pop_style_var :: #force_inline proc(count := i32(1)) do igPopStyleVar(count); +pop_text_wrap_pos :: #force_inline proc() do igPopTextWrapPos(); +progress_bar :: #force_inline proc(fraction: f32, size_arg := Vec2(Vec2 {-min(f32),0}), overlay := "") do swr_igProgressBar(fraction, size_arg, overlay); +push_allow_keyboard_focus :: #force_inline proc(allow_keyboard_focus: bool) do igPushAllowKeyboardFocus(allow_keyboard_focus); +push_button_repeat :: #force_inline proc(repeat: bool) do igPushButtonRepeat(repeat); +push_clip_rect :: #force_inline proc(clip_rect_min: Vec2, clip_rect_max: Vec2, intersect_with_current_clip_rect: bool) do igPushClipRect(clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); +push_font :: #force_inline proc(font: ^ImFont) do igPushFont(font); push_id :: proc { push_id_str, @@ -506,175 +523,194 @@ push_id :: proc { push_id_ptr, push_id_int, }; -push_id_str :: inline proc(str_id: string) do swr_igPushIDStr(str_id); -push_id_str_str :: inline proc(str_id_begin: string, str_id_end: string) do swr_igPushIDStrStr(str_id_begin, str_id_end); -push_id_ptr :: inline proc(ptr_id: rawptr) do igPushIDPtr(ptr_id); -push_id_int :: inline proc(int_id: i32) do igPushIDInt(int_id); +push_id_str :: #force_inline proc(str_id: string) do swr_igPushID_Str(str_id); +push_id_str_str :: #force_inline proc(str_id_begin: string, str_id_end: string) do swr_igPushID_StrStr(str_id_begin, str_id_end); +push_id_ptr :: #force_inline proc(ptr_id: rawptr) do igPushID_Ptr(ptr_id); +push_id_int :: #force_inline proc(int_id: i32) do igPushID_Int(int_id); -push_item_width :: inline proc(item_width: f32) do igPushItemWidth(item_width); +push_item_width :: #force_inline proc(item_width: f32) do igPushItemWidth(item_width); push_style_color :: proc { push_style_color_u32, push_style_color_vec4, }; -push_style_color_u32 :: inline proc(idx: Col, col: u32) do igPushStyleColorU32(idx, col); -push_style_color_vec4 :: inline proc(idx: Col, col: Vec4) do igPushStyleColorVec4(idx, col); +push_style_color_u32 :: #force_inline proc(idx: Col, col: u32) do igPushStyleColor_U32(idx, col); +push_style_color_vec4 :: #force_inline proc(idx: Col, col: Vec4) do igPushStyleColor_Vec4(idx, col); push_style_var :: proc { push_style_var_float, push_style_var_vec2, }; -push_style_var_float :: inline proc(idx: Style_Var, val: f32) do igPushStyleVarFloat(idx, val); -push_style_var_vec2 :: inline proc(idx: Style_Var, val: Vec2) do igPushStyleVarVec2(idx, val); +push_style_var_float :: #force_inline proc(idx: Style_Var, val: f32) do igPushStyleVar_Float(idx, val); +push_style_var_vec2 :: #force_inline proc(idx: Style_Var, val: Vec2) do igPushStyleVar_Vec2(idx, val); -push_text_wrap_pos :: inline proc(wrap_local_pos_x := f32(0.0)) do igPushTextWrapPos(wrap_local_pos_x); +push_text_wrap_pos :: #force_inline proc(wrap_local_pos_x := f32(0.0)) do igPushTextWrapPos(wrap_local_pos_x); radio_button :: proc { radio_button_bool, radio_button_int_ptr, }; -radio_button_bool :: inline proc(label: string, active: bool) -> bool do return swr_igRadioButtonBool(label, active); -radio_button_int_ptr :: inline proc(label: string, v: ^i32, v_button: i32) -> bool do return swr_igRadioButtonIntPtr(label, v, v_button); +radio_button_bool :: #force_inline proc(label: string, active: bool) -> bool do return swr_igRadioButton_Bool(label, active); +radio_button_int_ptr :: #force_inline proc(label: string, v: ^i32, v_button: i32) -> bool do return swr_igRadioButton_IntPtr(label, v, v_button); -render :: inline proc() do igRender(); -reset_mouse_drag_delta :: inline proc(button := Mouse_Button(0)) do igResetMouseDragDelta(button); -same_line :: inline proc(offset_from_start_x := f32(0.0), spacing := f32(-1.0)) do igSameLine(offset_from_start_x, spacing); -save_ini_settings_to_disk :: inline proc(ini_filename: string) do swr_igSaveIniSettingsToDisk(ini_filename); -save_ini_settings_to_memory :: inline proc(out_ini_size : ^uint = nil) -> cstring do return igSaveIniSettingsToMemory(out_ini_size); +render :: #force_inline proc() do igRender(); +reset_mouse_drag_delta :: #force_inline proc(button := Mouse_Button(0)) do igResetMouseDragDelta(button); +same_line :: #force_inline proc(offset_from_start_x := f32(0.0), spacing := f32(-1.0)) do igSameLine(offset_from_start_x, spacing); +save_ini_settings_to_disk :: #force_inline proc(ini_filename: string) do swr_igSaveIniSettingsToDisk(ini_filename); +save_ini_settings_to_memory :: #force_inline proc(out_ini_size : ^uint = nil) -> cstring do return igSaveIniSettingsToMemory(out_ini_size); selectable :: proc { selectable_bool, selectable_bool_ptr, }; -selectable_bool :: inline proc(label: string, selected := bool(false), flags := Selectable_Flags(0), size := Vec2(Vec2 {0,0})) -> bool do return swr_igSelectableBool(label, selected, flags, size); -selectable_bool_ptr :: inline proc(label: string, p_selected: ^bool, flags := Selectable_Flags(0), size := Vec2(Vec2 {0,0})) -> bool do return swr_igSelectableBoolPtr(label, p_selected, flags, size); - -separator :: inline proc() do igSeparator(); -set_allocator_functions :: inline proc(alloc_func: Alloc_Func, free_func: Free_Func) do wrapper_set_allocator_functions(alloc_func, free_func); -set_clipboard_text :: inline proc(text: string) do swr_igSetClipboardText(text); -set_color_edit_options :: inline proc(flags: Color_Edit_Flags) do igSetColorEditOptions(flags); -set_column_offset :: inline proc(column_index: i32, offset_x: f32) do igSetColumnOffset(column_index, offset_x); -set_column_width :: inline proc(column_index: i32, width: f32) do igSetColumnWidth(column_index, width); -set_current_context :: inline proc(ctx: ^Context) do igSetCurrentContext(ctx); -set_cursor_pos :: inline proc(local_pos: Vec2) do igSetCursorPos(local_pos); -set_cursor_pos_x :: inline proc(local_x: f32) do igSetCursorPosX(local_x); -set_cursor_pos_y :: inline proc(local_y: f32) do igSetCursorPosY(local_y); -set_cursor_screen_pos :: inline proc(pos: Vec2) do igSetCursorScreenPos(pos); -set_drag_drop_payload :: inline proc(type: string, data: rawptr, sz: uint, cond := Cond(0)) -> bool do return swr_igSetDragDropPayload(type, data, sz, cond); -set_item_allow_overlap :: inline proc() do igSetItemAllowOverlap(); -set_item_default_focus :: inline proc() do igSetItemDefaultFocus(); -set_keyboard_focus_here :: inline proc(offset := i32(0)) do igSetKeyboardFocusHere(offset); -set_mouse_cursor :: inline proc(cursor_type: Mouse_Cursor) do igSetMouseCursor(cursor_type); -set_next_item_open :: inline proc(is_open: bool, cond := Cond(0)) do igSetNextItemOpen(is_open, cond); -set_next_item_width :: inline proc(item_width: f32) do igSetNextItemWidth(item_width); -set_next_window_bg_alpha :: inline proc(alpha: f32) do igSetNextWindowBgAlpha(alpha); -set_next_window_collapsed :: inline proc(collapsed: bool, cond := Cond(0)) do igSetNextWindowCollapsed(collapsed, cond); -set_next_window_content_size :: inline proc(size: Vec2) do igSetNextWindowContentSize(size); -set_next_window_focus :: inline proc() do igSetNextWindowFocus(); -set_next_window_pos :: inline proc(pos: Vec2, cond := Cond(0), pivot := Vec2(Vec2 {0,0})) do igSetNextWindowPos(pos, cond, pivot); -set_next_window_size :: inline proc(size: Vec2, cond := Cond(0)) do igSetNextWindowSize(size, cond); -set_next_window_size_constraints :: inline proc(size_min: Vec2, size_max: Vec2, custom_callback : Size_Callback = nil, custom_callback_data : rawptr = nil) do igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data); +selectable_bool :: #force_inline proc(label: string, selected := bool(false), flags := Selectable_Flags(0), size := Vec2(Vec2 {0,0})) -> bool do return swr_igSelectable_Bool(label, selected, flags, size); +selectable_bool_ptr :: #force_inline proc(label: string, p_selected: ^bool, flags := Selectable_Flags(0), size := Vec2(Vec2 {0,0})) -> bool do return swr_igSelectable_BoolPtr(label, p_selected, flags, size); + +separator :: #force_inline proc() do igSeparator(); +set_allocator_functions :: #force_inline proc(alloc_func: Alloc_Func, free_func: Free_Func) do wrapper_set_allocator_functions(alloc_func, free_func); +set_clipboard_text :: #force_inline proc(text: string) do swr_igSetClipboardText(text); +set_color_edit_options :: #force_inline proc(flags: Color_Edit_Flags) do igSetColorEditOptions(flags); +set_column_offset :: #force_inline proc(column_index: i32, offset_x: f32) do igSetColumnOffset(column_index, offset_x); +set_column_width :: #force_inline proc(column_index: i32, width: f32) do igSetColumnWidth(column_index, width); +set_current_context :: #force_inline proc(ctx: ^Context) do igSetCurrentContext(ctx); +set_cursor_pos :: #force_inline proc(local_pos: Vec2) do igSetCursorPos(local_pos); +set_cursor_pos_x :: #force_inline proc(local_x: f32) do igSetCursorPosX(local_x); +set_cursor_pos_y :: #force_inline proc(local_y: f32) do igSetCursorPosY(local_y); +set_cursor_screen_pos :: #force_inline proc(pos: Vec2) do igSetCursorScreenPos(pos); +set_drag_drop_payload :: #force_inline proc(type: string, data: rawptr, sz: uint, cond := Cond(0)) -> bool do return swr_igSetDragDropPayload(type, data, sz, cond); +set_item_allow_overlap :: #force_inline proc() do igSetItemAllowOverlap(); +set_item_default_focus :: #force_inline proc() do igSetItemDefaultFocus(); +set_keyboard_focus_here :: #force_inline proc(offset := i32(0)) do igSetKeyboardFocusHere(offset); +set_mouse_cursor :: #force_inline proc(cursor_type: Mouse_Cursor) do igSetMouseCursor(cursor_type); +set_next_item_open :: #force_inline proc(is_open: bool, cond := Cond(0)) do igSetNextItemOpen(is_open, cond); +set_next_item_width :: #force_inline proc(item_width: f32) do igSetNextItemWidth(item_width); +set_next_window_bg_alpha :: #force_inline proc(alpha: f32) do igSetNextWindowBgAlpha(alpha); +set_next_window_collapsed :: #force_inline proc(collapsed: bool, cond := Cond(0)) do igSetNextWindowCollapsed(collapsed, cond); +set_next_window_content_size :: #force_inline proc(size: Vec2) do igSetNextWindowContentSize(size); +set_next_window_focus :: #force_inline proc() do igSetNextWindowFocus(); +set_next_window_pos :: #force_inline proc(pos: Vec2, cond := Cond(0), pivot := Vec2(Vec2 {0,0})) do igSetNextWindowPos(pos, cond, pivot); +set_next_window_size :: #force_inline proc(size: Vec2, cond := Cond(0)) do igSetNextWindowSize(size, cond); +set_next_window_size_constraints :: #force_inline proc(size_min: Vec2, size_max: Vec2, custom_callback : Size_Callback = nil, custom_callback_data : rawptr = nil) do igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data); set_scroll_from_pos_x :: proc { set_scroll_from_pos_x_float, }; -set_scroll_from_pos_x_float :: inline proc(local_x: f32, center_x_ratio := f32(0.5)) do igSetScrollFromPosXFloat(local_x, center_x_ratio); +set_scroll_from_pos_x_float :: #force_inline proc(local_x: f32, center_x_ratio := f32(0.5)) do igSetScrollFromPosX_Float(local_x, center_x_ratio); set_scroll_from_pos_y :: proc { set_scroll_from_pos_y_float, }; -set_scroll_from_pos_y_float :: inline proc(local_y: f32, center_y_ratio := f32(0.5)) do igSetScrollFromPosYFloat(local_y, center_y_ratio); +set_scroll_from_pos_y_float :: #force_inline proc(local_y: f32, center_y_ratio := f32(0.5)) do igSetScrollFromPosY_Float(local_y, center_y_ratio); -set_scroll_here_x :: inline proc(center_x_ratio := f32(0.5)) do igSetScrollHereX(center_x_ratio); -set_scroll_here_y :: inline proc(center_y_ratio := f32(0.5)) do igSetScrollHereY(center_y_ratio); +set_scroll_here_x :: #force_inline proc(center_x_ratio := f32(0.5)) do igSetScrollHereX(center_x_ratio); +set_scroll_here_y :: #force_inline proc(center_y_ratio := f32(0.5)) do igSetScrollHereY(center_y_ratio); set_scroll_x :: proc { set_scroll_x_float, }; -set_scroll_x_float :: inline proc(scroll_x: f32) do igSetScrollXFloat(scroll_x); +set_scroll_x_float :: #force_inline proc(scroll_x: f32) do igSetScrollX_Float(scroll_x); set_scroll_y :: proc { set_scroll_y_float, }; -set_scroll_y_float :: inline proc(scroll_y: f32) do igSetScrollYFloat(scroll_y); +set_scroll_y_float :: #force_inline proc(scroll_y: f32) do igSetScrollY_Float(scroll_y); -set_state_storage :: inline proc(storage: ^Storage) do igSetStateStorage(storage); -set_tab_item_closed :: inline proc(tab_or_docked_window_label: string) do swr_igSetTabItemClosed(tab_or_docked_window_label); -set_tooltip :: inline proc(fmt_: string, args: ..any) do swr_igSetTooltip(fmt_, args); +set_state_storage :: #force_inline proc(storage: ^Storage) do igSetStateStorage(storage); +set_tab_item_closed :: #force_inline proc(tab_or_docked_window_label: string) do swr_igSetTabItemClosed(tab_or_docked_window_label); +set_tooltip :: #force_inline proc(fmt_: string, args: ..any) do swr_igSetTooltip(fmt_, args); set_window_collapsed :: proc { set_window_collapsed_bool, set_window_collapsed_str, }; -set_window_collapsed_bool :: inline proc(collapsed: bool, cond := Cond(0)) do igSetWindowCollapsedBool(collapsed, cond); -set_window_collapsed_str :: inline proc(name: string, collapsed: bool, cond := Cond(0)) do swr_igSetWindowCollapsedStr(name, collapsed, cond); +set_window_collapsed_bool :: #force_inline proc(collapsed: bool, cond := Cond(0)) do igSetWindowCollapsed_Bool(collapsed, cond); +set_window_collapsed_str :: #force_inline proc(name: string, collapsed: bool, cond := Cond(0)) do swr_igSetWindowCollapsed_Str(name, collapsed, cond); set_window_focus :: proc { set_window_focus_nil, set_window_focus_str, }; -set_window_focus_nil :: inline proc() do igSetWindowFocusNil(); -set_window_focus_str :: inline proc(name: string) do swr_igSetWindowFocusStr(name); +set_window_focus_nil :: #force_inline proc() do igSetWindowFocus_Nil(); +set_window_focus_str :: #force_inline proc(name: string) do swr_igSetWindowFocus_Str(name); -set_window_font_scale :: inline proc(scale: f32) do igSetWindowFontScale(scale); +set_window_font_scale :: #force_inline proc(scale: f32) do igSetWindowFontScale(scale); set_window_pos :: proc { set_window_pos_vec2, set_window_pos_str, }; -set_window_pos_vec2 :: inline proc(pos: Vec2, cond := Cond(0)) do igSetWindowPosVec2(pos, cond); -set_window_pos_str :: inline proc(name: string, pos: Vec2, cond := Cond(0)) do swr_igSetWindowPosStr(name, pos, cond); +set_window_pos_vec2 :: #force_inline proc(pos: Vec2, cond := Cond(0)) do igSetWindowPos_Vec2(pos, cond); +set_window_pos_str :: #force_inline proc(name: string, pos: Vec2, cond := Cond(0)) do swr_igSetWindowPos_Str(name, pos, cond); set_window_size :: proc { set_window_size_vec2, set_window_size_str, }; -set_window_size_vec2 :: inline proc(size: Vec2, cond := Cond(0)) do igSetWindowSizeVec2(size, cond); -set_window_size_str :: inline proc(name: string, size: Vec2, cond := Cond(0)) do swr_igSetWindowSizeStr(name, size, cond); - -show_about_window :: inline proc(p_open : ^bool = nil) do igShowAboutWindow(p_open); -show_demo_window :: inline proc(p_open : ^bool = nil) do igShowDemoWindow(p_open); -show_font_selector :: inline proc(label: string) do swr_igShowFontSelector(label); -show_metrics_window :: inline proc(p_open : ^bool = nil) do igShowMetricsWindow(p_open); -show_style_editor :: inline proc(ref : ^Style = nil) do igShowStyleEditor(ref); -show_style_selector :: inline proc(label: string) -> bool do return swr_igShowStyleSelector(label); -show_user_guide :: inline proc() do igShowUserGuide(); -slider_angle :: inline proc(label: string, v_rad: ^f32, v_degrees_min := f32(-360.0), v_degrees_max := f32(+360.0), format := "%.0f deg", flags := Slider_Flags(0)) -> bool do return swr_igSliderAngle(label, v_rad, v_degrees_min, v_degrees_max, format, flags); -slider_float :: inline proc(label: string, v: ^f32, v_min: f32, v_max: f32, format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igSliderFloat(label, v, v_min, v_max, format, flags); -slider_float2 :: inline proc(label: string, v: [2]f32, v_min: f32, v_max: f32, format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igSliderFloat2(label, v, v_min, v_max, format, flags); -slider_float3 :: inline proc(label: string, v: [3]f32, v_min: f32, v_max: f32, format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igSliderFloat3(label, v, v_min, v_max, format, flags); -slider_float4 :: inline proc(label: string, v: [4]f32, v_min: f32, v_max: f32, format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igSliderFloat4(label, v, v_min, v_max, format, flags); -slider_int :: inline proc(label: string, v: ^i32, v_min: i32, v_max: i32, format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igSliderInt(label, v, v_min, v_max, format, flags); -slider_int2 :: inline proc(label: string, v: [2]i32, v_min: i32, v_max: i32, format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igSliderInt2(label, v, v_min, v_max, format, flags); -slider_int3 :: inline proc(label: string, v: [3]i32, v_min: i32, v_max: i32, format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igSliderInt3(label, v, v_min, v_max, format, flags); -slider_int4 :: inline proc(label: string, v: [4]i32, v_min: i32, v_max: i32, format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igSliderInt4(label, v, v_min, v_max, format, flags); -slider_scalar :: inline proc(label: string, data_type: Data_Type, p_data: rawptr, p_min: rawptr, p_max: rawptr, format := "", flags := Slider_Flags(0)) -> bool do return swr_igSliderScalar(label, data_type, p_data, p_min, p_max, format, flags); -slider_scalar_n :: inline proc(label: string, data_type: Data_Type, p_data: rawptr, components: i32, p_min: rawptr, p_max: rawptr, format := "", flags := Slider_Flags(0)) -> bool do return swr_igSliderScalarN(label, data_type, p_data, components, p_min, p_max, format, flags); -small_button :: inline proc(label: string) -> bool do return swr_igSmallButton(label); -spacing :: inline proc() do igSpacing(); -style_colors_classic :: inline proc(dst : ^Style = nil) do igStyleColorsClassic(dst); -style_colors_dark :: inline proc(dst : ^Style = nil) do igStyleColorsDark(dst); -style_colors_light :: inline proc(dst : ^Style = nil) do igStyleColorsLight(dst); -tab_item_button :: inline proc(label: string, flags := Tab_Item_Flags(0)) -> bool do return swr_igTabItemButton(label, flags); -text :: inline proc(fmt_: string, args: ..any) do wrapper_text(fmt_, ..args); -text_colored :: inline proc(col: Vec4, fmt_: string, args: ..any) do wrapper_text_colored(col, fmt_, ..args); -text_disabled :: inline proc(fmt_: string, args: ..any) do wrapper_text_disabled(fmt_, ..args); -text_unformatted :: inline proc(text: string) do wrapper_unformatted_text(text); -text_wrapped :: inline proc(fmt_: string, args: ..any) do wrapper_text_wrapped(fmt_, ..args); +set_window_size_vec2 :: #force_inline proc(size: Vec2, cond := Cond(0)) do igSetWindowSize_Vec2(size, cond); +set_window_size_str :: #force_inline proc(name: string, size: Vec2, cond := Cond(0)) do swr_igSetWindowSize_Str(name, size, cond); + +show_about_window :: #force_inline proc(p_open : ^bool = nil) do igShowAboutWindow(p_open); +show_demo_window :: #force_inline proc(p_open : ^bool = nil) do igShowDemoWindow(p_open); +show_font_selector :: #force_inline proc(label: string) do swr_igShowFontSelector(label); +show_metrics_window :: #force_inline proc(p_open : ^bool = nil) do igShowMetricsWindow(p_open); +show_style_editor :: #force_inline proc(ref : ^Style = nil) do igShowStyleEditor(ref); +show_style_selector :: #force_inline proc(label: string) -> bool do return swr_igShowStyleSelector(label); +show_user_guide :: #force_inline proc() do igShowUserGuide(); +slider_angle :: #force_inline proc(label: string, v_rad: ^f32, v_degrees_min := f32(-360.0), v_degrees_max := f32(+360.0), format := "%.0f deg", flags := Slider_Flags(0)) -> bool do return swr_igSliderAngle(label, v_rad, v_degrees_min, v_degrees_max, format, flags); +slider_float :: #force_inline proc(label: string, v: ^f32, v_min: f32, v_max: f32, format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igSliderFloat(label, v, v_min, v_max, format, flags); +slider_float2 :: #force_inline proc(label: string, v: [2]f32, v_min: f32, v_max: f32, format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igSliderFloat2(label, v, v_min, v_max, format, flags); +slider_float3 :: #force_inline proc(label: string, v: [3]f32, v_min: f32, v_max: f32, format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igSliderFloat3(label, v, v_min, v_max, format, flags); +slider_float4 :: #force_inline proc(label: string, v: [4]f32, v_min: f32, v_max: f32, format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igSliderFloat4(label, v, v_min, v_max, format, flags); +slider_int :: #force_inline proc(label: string, v: ^i32, v_min: i32, v_max: i32, format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igSliderInt(label, v, v_min, v_max, format, flags); +slider_int2 :: #force_inline proc(label: string, v: [2]i32, v_min: i32, v_max: i32, format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igSliderInt2(label, v, v_min, v_max, format, flags); +slider_int3 :: #force_inline proc(label: string, v: [3]i32, v_min: i32, v_max: i32, format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igSliderInt3(label, v, v_min, v_max, format, flags); +slider_int4 :: #force_inline proc(label: string, v: [4]i32, v_min: i32, v_max: i32, format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igSliderInt4(label, v, v_min, v_max, format, flags); +slider_scalar :: #force_inline proc(label: string, data_type: Data_Type, p_data: rawptr, p_min: rawptr, p_max: rawptr, format := "", flags := Slider_Flags(0)) -> bool do return swr_igSliderScalar(label, data_type, p_data, p_min, p_max, format, flags); +slider_scalar_n :: #force_inline proc(label: string, data_type: Data_Type, p_data: rawptr, components: i32, p_min: rawptr, p_max: rawptr, format := "", flags := Slider_Flags(0)) -> bool do return swr_igSliderScalarN(label, data_type, p_data, components, p_min, p_max, format, flags); +small_button :: #force_inline proc(label: string) -> bool do return swr_igSmallButton(label); +spacing :: #force_inline proc() do igSpacing(); +style_colors_classic :: #force_inline proc(dst : ^Style = nil) do igStyleColorsClassic(dst); +style_colors_dark :: #force_inline proc(dst : ^Style = nil) do igStyleColorsDark(dst); +style_colors_light :: #force_inline proc(dst : ^Style = nil) do igStyleColorsLight(dst); +tab_item_button :: #force_inline proc(label: string, flags := Tab_Item_Flags(0)) -> bool do return swr_igTabItemButton(label, flags); +table_get_column_count :: #force_inline proc() -> i32 do return igTableGetColumnCount(); +table_get_column_flags :: #force_inline proc(column_n := i32(-1)) -> Table_Column_Flags do return igTableGetColumnFlags(column_n); +table_get_column_index :: #force_inline proc() -> i32 do return igTableGetColumnIndex(); + +table_get_column_name :: proc { + table_get_column_name_int, +}; +table_get_column_name_int :: #force_inline proc(column_n := i32(-1)) -> cstring do return igTableGetColumnName_Int(column_n); + +table_get_row_index :: #force_inline proc() -> i32 do return igTableGetRowIndex(); +table_get_sort_specs :: #force_inline proc() -> ^Table_Sort_Specs do return igTableGetSortSpecs(); +table_header :: #force_inline proc(label: string) do swr_igTableHeader(label); +table_headers_row :: #force_inline proc() do igTableHeadersRow(); +table_next_column :: #force_inline proc() -> bool do return igTableNextColumn(); +table_next_row :: #force_inline proc(row_flags := Table_Row_Flags(0), min_row_height := f32(0.0)) do igTableNextRow(row_flags, min_row_height); +table_set_bg_color :: #force_inline proc(target: Table_Bg_Target, color: u32, column_n := i32(-1)) do igTableSetBgColor(target, color, column_n); +table_set_column_index :: #force_inline proc(column_n: i32) -> bool do return igTableSetColumnIndex(column_n); +table_setup_column :: #force_inline proc(label: string, flags := Table_Column_Flags(0), init_width_or_weight := f32(0.0), user_id := ImID(0)) do swr_igTableSetupColumn(label, flags, init_width_or_weight, user_id); +table_setup_scroll_freeze :: #force_inline proc(cols: i32, rows: i32) do igTableSetupScrollFreeze(cols, rows); +text :: #force_inline proc(fmt_: string, args: ..any) do wrapper_text(fmt_, ..args); +text_colored :: #force_inline proc(col: Vec4, fmt_: string, args: ..any) do wrapper_text_colored(col, fmt_, ..args); +text_disabled :: #force_inline proc(fmt_: string, args: ..any) do wrapper_text_disabled(fmt_, ..args); +text_unformatted :: #force_inline proc(text: string) do wrapper_unformatted_text(text); +text_wrapped :: #force_inline proc(fmt_: string, args: ..any) do wrapper_text_wrapped(fmt_, ..args); tree_node :: proc { tree_node_str, tree_node_str_str, tree_node_ptr, }; -tree_node_str :: inline proc(label: string) -> bool do return swr_igTreeNodeStr(label); -tree_node_str_str :: inline proc(str_id: string, fmt_: string, args: ..any) -> bool do return swr_igTreeNodeStrStr(str_id, fmt_, args); -tree_node_ptr :: inline proc(ptr_id: rawptr, fmt_: string, args: ..any) -> bool do return swr_igTreeNodePtr(ptr_id, fmt_, args); +tree_node_str :: #force_inline proc(label: string) -> bool do return swr_igTreeNode_Str(label); +tree_node_str_str :: #force_inline proc(str_id: string, fmt_: string, args: ..any) -> bool do return swr_igTreeNode_StrStr(str_id, fmt_, args); +tree_node_ptr :: #force_inline proc(ptr_id: rawptr, fmt_: string, args: ..any) -> bool do return swr_igTreeNode_Ptr(ptr_id, fmt_, args); tree_node_ex :: proc { @@ -682,23 +718,23 @@ tree_node_ex :: proc { tree_node_ex_str_str, tree_node_ex_ptr, }; -tree_node_ex_str :: inline proc(label: string, flags := Tree_Node_Flags(0)) -> bool do return swr_igTreeNodeExStr(label, flags); -tree_node_ex_str_str :: inline proc(str_id: string, flags: Tree_Node_Flags, fmt_: string, args: ..any) -> bool do return swr_igTreeNodeExStrStr(str_id, flags, fmt_, args); -tree_node_ex_ptr :: inline proc(ptr_id: rawptr, flags: Tree_Node_Flags, fmt_: string, args: ..any) -> bool do return swr_igTreeNodeExPtr(ptr_id, flags, fmt_, args); +tree_node_ex_str :: #force_inline proc(label: string, flags := Tree_Node_Flags(0)) -> bool do return swr_igTreeNodeEx_Str(label, flags); +tree_node_ex_str_str :: #force_inline proc(str_id: string, flags: Tree_Node_Flags, fmt_: string, args: ..any) -> bool do return swr_igTreeNodeEx_StrStr(str_id, flags, fmt_, args); +tree_node_ex_ptr :: #force_inline proc(ptr_id: rawptr, flags: Tree_Node_Flags, fmt_: string, args: ..any) -> bool do return swr_igTreeNodeEx_Ptr(ptr_id, flags, fmt_, args); -tree_pop :: inline proc() do igTreePop(); +tree_pop :: #force_inline proc() do igTreePop(); tree_push :: proc { tree_push_str, tree_push_ptr, }; -tree_push_str :: inline proc(str_id: string) do swr_igTreePushStr(str_id); -tree_push_ptr :: inline proc(ptr_id : rawptr = nil) do igTreePushPtr(ptr_id); +tree_push_str :: #force_inline proc(str_id: string) do swr_igTreePush_Str(str_id); +tree_push_ptr :: #force_inline proc(ptr_id : rawptr = nil) do igTreePush_Ptr(ptr_id); -unindent :: inline proc(indent_w := f32(0.0)) do igUnindent(indent_w); -v_slider_float :: inline proc(label: string, size: Vec2, v: ^f32, v_min: f32, v_max: f32, format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igVSliderFloat(label, size, v, v_min, v_max, format, flags); -v_slider_int :: inline proc(label: string, size: Vec2, v: ^i32, v_min: i32, v_max: i32, format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igVSliderInt(label, size, v, v_min, v_max, format, flags); -v_slider_scalar :: inline proc(label: string, size: Vec2, data_type: Data_Type, p_data: rawptr, p_min: rawptr, p_max: rawptr, format := "", flags := Slider_Flags(0)) -> bool do return swr_igVSliderScalar(label, size, data_type, p_data, p_min, p_max, format, flags); +unindent :: #force_inline proc(indent_w := f32(0.0)) do igUnindent(indent_w); +v_slider_float :: #force_inline proc(label: string, size: Vec2, v: ^f32, v_min: f32, v_max: f32, format := "%.3f", flags := Slider_Flags(0)) -> bool do return swr_igVSliderFloat(label, size, v, v_min, v_max, format, flags); +v_slider_int :: #force_inline proc(label: string, size: Vec2, v: ^i32, v_min: i32, v_max: i32, format := "%d", flags := Slider_Flags(0)) -> bool do return swr_igVSliderInt(label, size, v, v_min, v_max, format, flags); +v_slider_scalar :: #force_inline proc(label: string, size: Vec2, data_type: Data_Type, p_data: rawptr, p_min: rawptr, p_max: rawptr, format := "", flags := Slider_Flags(0)) -> bool do return swr_igVSliderScalar(label, size, data_type, p_data, p_min, p_max, format, flags); value :: proc { value_bool, @@ -706,9 +742,9 @@ value :: proc { value_uint, value_float, }; -value_bool :: inline proc(prefix: string, b: bool) do swr_igValueBool(prefix, b); -value_int :: inline proc(prefix: string, v: i32) do swr_igValueInt(prefix, v); -value_uint :: inline proc(prefix: string, v: u32) do swr_igValueUint(prefix, v); -value_float :: inline proc(prefix: string, v: f32, float_format := "") do swr_igValueFloat(prefix, v, float_format); +value_bool :: #force_inline proc(prefix: string, b: bool) do swr_igValue_Bool(prefix, b); +value_int :: #force_inline proc(prefix: string, v: i32) do swr_igValue_Int(prefix, v); +value_uint :: #force_inline proc(prefix: string, v: u32) do swr_igValue_Uint(prefix, v); +value_float :: #force_inline proc(prefix: string, v: f32, float_format := "") do swr_igValue_Float(prefix, v, float_format); diff --git a/structs.odin b/structs.odin index df5a792..ea0dfaa 100644 --- a/structs.odin +++ b/structs.odin @@ -22,13 +22,20 @@ Draw_Cmd :: struct { user_callback_data: rawptr, } +//ImDrawCmdHeader +Draw_Cmd_Header :: struct { + clip_rect: Vec4, + texture_id: Texture_ID, + vtx_offset: u32, +} + //ImDrawData Draw_Data :: struct { valid: bool, - cmd_lists: ^^Draw_List, cmd_lists_count: i32, total_idx_count: i32, total_vtx_count: i32, + cmd_lists: ^^Draw_List, display_pos: Vec2, display_size: Vec2, framebuffer_scale: Vec2, @@ -40,16 +47,17 @@ Draw_List :: struct { idx_buffer: Im_Vector(Draw_Idx), vtx_buffer: Im_Vector(Draw_Vert), flags: Draw_List_Flags, + _vtx_current_idx: u32, _data: ^Draw_List_Shared_Data, _owner_name: cstring, - _vtx_current_idx: u32, _vtx_write_ptr: ^Draw_Vert, _idx_write_ptr: ^Draw_Idx, _clip_rect_stack: Im_Vector(Vec4), _texture_id_stack: Im_Vector(Texture_ID), _path: Im_Vector(Vec2), - _cmd_header: Draw_Cmd, + _cmd_header: Draw_Cmd_Header, _splitter: Draw_List_Splitter, + _fringe_scale: f32, } //ImDrawListSplitter @@ -89,11 +97,12 @@ ImFont :: struct { //ImFontAtlas Font_Atlas :: struct { - locked: bool, flags: Font_Atlas_Flags, tex_id: Texture_ID, tex_desired_width: i32, tex_glyph_padding: i32, + locked: bool, + tex_pixels_use_colors: bool, tex_pixels_alpha8: ^u8, tex_pixels_rgba32: ^u32, tex_width: i32, @@ -104,6 +113,8 @@ Font_Atlas :: struct { custom_rects: Im_Vector(Font_Atlas_Custom_Rect), config_data: Im_Vector(Font_Config), tex_uv_lines: [64]Vec4, + font_builder_io: ^Font_Builder_Io, + font_builder_flags: u32, pack_id_mouse_cursors: i32, pack_id_lines: i32, } @@ -136,7 +147,7 @@ Font_Config :: struct { glyph_min_advance_x: f32, glyph_max_advance_x: f32, merge_mode: bool, - rasterizer_flags: u32, + font_builder_flags: u32, rasterizer_multiply: f32, ellipsis_char: Wchar, name: [40]i8, @@ -145,8 +156,9 @@ Font_Config :: struct { //ImFontGlyph Font_Glyph :: struct { - codepoint: u32, + colored: u32, visible: u32, + codepoint: u32, advance_x: f32, x0: f32, y0: f32, @@ -187,9 +199,10 @@ IO :: struct { mouse_draw_cursor: bool, config_mac_osx_behaviors: bool, config_input_text_cursor_blink: bool, + config_drag_click_to_input_text: bool, config_windows_resize_from_edges: bool, config_windows_move_from_title_bar_only: bool, - config_windows_memory_compact_timer: f32, + config_memory_compact_timer: f32, backend_platform_name: cstring, backend_renderer_name: cstring, backend_platform_user_data: rawptr, @@ -200,7 +213,6 @@ IO :: struct { clipboard_user_data: rawptr, ime_set_input_screen_pos_fn: proc "c"(x, y : i32), ime_window_handle: rawptr, - render_draw_lists_fn_unused: rawptr, mouse_pos: Vec2, mouse_down: [5]bool, mouse_wheel: f32, @@ -269,6 +281,7 @@ List_Clipper :: struct { display_end: i32, items_count: i32, step_no: i32, + items_frozen: i32, items_height: f32, start_pos_y: f32, } @@ -308,8 +321,8 @@ Storage_Pair :: struct { using _: struct #raw_union { val_i: i32, val_f: f32, - val_p: rawptr, - } + val_p: rawptr, + }, } //ImGuiStyle @@ -330,6 +343,7 @@ Style :: struct { frame_border_size: f32, item_spacing: Vec2, item_inner_spacing: Vec2, + cell_padding: Vec2, touch_extra_padding: Vec2, indent_spacing: f32, columns_min_spacing: f32, @@ -351,8 +365,23 @@ Style :: struct { anti_aliased_lines_use_tex: bool, anti_aliased_fill: bool, curve_tessellation_tol: f32, - circle_segment_max_error: f32, - colors: [48]Vec4, + circle_tessellation_max_error: f32, + colors: [53]Vec4, +} + +//ImGuiTableColumnSortSpecs +Table_Column_Sort_Specs :: struct { + column_user_id: ImID, + column_index: i16, + sort_order: i16, + sort_direction: Sort_Direction, +} + +//ImGuiTableSortSpecs +Table_Sort_Specs :: struct { + specs: ^Table_Column_Sort_Specs, + specs_count: i32, + specs_dirty: bool, } //ImGuiTextBuffer @@ -373,6 +402,15 @@ Text_Range :: struct { e: cstring, } +//ImGuiViewport +Viewport :: struct { + flags: Viewport_Flags, + pos: Vec2, + size: Vec2, + work_pos: Vec2, + work_size: Vec2, +} + //ImVec2 Vec2 :: struct { x: f32, diff --git a/wrapper.odin b/wrapper.odin index 03fa30f..6452121 100644 --- a/wrapper.odin +++ b/wrapper.odin @@ -6,18 +6,18 @@ import "core:mem"; -// AUTO_GENERATED for 'ImDrawList_AddTextVec2' -swr_ImDrawList_AddTextVec2 :: proc(self: ^Draw_List, pos: Vec2, col: u32, text_begin: string, text_end: string) { +// AUTO_GENERATED for 'ImDrawList_AddText_Vec2' +swr_ImDrawList_AddText_Vec2 :: proc(self: ^Draw_List, pos: Vec2, col: u32, text_begin: string, text_end: string) { str3 := strings.clone_to_cstring(text_begin, context.temp_allocator); str4 := strings.clone_to_cstring(text_end, context.temp_allocator); - ImDrawList_AddTextVec2(self, pos, col, str3, str4); + ImDrawList_AddText_Vec2(self, pos, col, str3, str4); } -// AUTO_GENERATED for 'ImDrawList_AddTextFontPtr' -swr_ImDrawList_AddTextFontPtr :: proc(self: ^Draw_List, font: ^ImFont, font_size: f32, pos: Vec2, col: u32, text_begin: string, text_end: string, wrap_width: f32, cpu_fine_clip_rect: ^Vec4) { +// AUTO_GENERATED for 'ImDrawList_AddText_FontPtr' +swr_ImDrawList_AddText_FontPtr :: proc(self: ^Draw_List, font: ^ImFont, font_size: f32, pos: Vec2, col: u32, text_begin: string, text_end: string, wrap_width: f32, cpu_fine_clip_rect: ^Vec4) { str5 := strings.clone_to_cstring(text_begin, context.temp_allocator); str6 := strings.clone_to_cstring(text_end, context.temp_allocator); - ImDrawList_AddTextFontPtr(self, font, font_size, pos, col, str5, str6, wrap_width, cpu_fine_clip_rect); + ImDrawList_AddText_FontPtr(self, font, font_size, pos, col, str5, str6, wrap_width, cpu_fine_clip_rect); } @@ -119,6 +119,7 @@ swr_ImGuiTextFilter_PassFilter :: proc(self: ^Text_Filter, text: string, text_en + // AUTO_GENERATED for 'igAcceptDragDropPayload' swr_igAcceptDragDropPayload :: proc(type: string, flags: Drag_Drop_Flags) -> ^Payload { str0 := strings.clone_to_cstring(type, context.temp_allocator); @@ -137,10 +138,10 @@ swr_igBegin :: proc(name: string, p_open: ^bool, flags: Window_Flags) -> bool { return igBegin(str0, p_open, flags); } -// AUTO_GENERATED for 'igBeginChildStr' -swr_igBeginChildStr :: proc(str_id: string, size: Vec2, border: bool, flags: Window_Flags) -> bool { +// AUTO_GENERATED for 'igBeginChild_Str' +swr_igBeginChild_Str :: proc(str_id: string, size: Vec2, border: bool, flags: Window_Flags) -> bool { str0 := strings.clone_to_cstring(str_id, context.temp_allocator); - return igBeginChildStr(str0, size, border, flags); + return igBeginChild_Str(str0, size, border, flags); } // AUTO_GENERATED for 'igBeginCombo' @@ -150,6 +151,12 @@ swr_igBeginCombo :: proc(label: string, preview_value: string, flags: Combo_Flag return igBeginCombo(str0, str1, flags); } +// AUTO_GENERATED for 'igBeginListBox' +swr_igBeginListBox :: proc(label: string, size: Vec2) -> bool { + str0 := strings.clone_to_cstring(label, context.temp_allocator); + return igBeginListBox(str0, size); +} + // AUTO_GENERATED for 'igBeginMenu' swr_igBeginMenu :: proc(label: string, enabled: bool) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); @@ -198,6 +205,12 @@ swr_igBeginTabItem :: proc(label: string, p_open: ^bool, flags: Tab_Item_Flags) return igBeginTabItem(str0, p_open, flags); } +// AUTO_GENERATED for 'igBeginTable' +swr_igBeginTable :: proc(str_id: string, column: i32, flags: Table_Flags, outer_size: Vec2, inner_width: f32) -> bool { + str0 := strings.clone_to_cstring(str_id, context.temp_allocator); + return igBeginTable(str0, column, flags, outer_size, inner_width); +} + // AUTO_GENERATED for 'igBulletText' swr_igBulletText :: proc(fmt_: string, args: ..any) { str0 := strings.clone_to_cstring(fmt_, context.temp_allocator); @@ -223,22 +236,28 @@ swr_igCheckbox :: proc(label: string, v: ^bool) -> bool { return igCheckbox(str0, v); } -// AUTO_GENERATED for 'igCheckboxFlags' -swr_igCheckboxFlags :: proc(label: string, flags: ^u32, flags_value: u32) -> bool { +// AUTO_GENERATED for 'igCheckboxFlags_IntPtr' +swr_igCheckboxFlags_IntPtr :: proc(label: string, flags: ^i32, flags_value: i32) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); - return igCheckboxFlags(str0, flags, flags_value); + return igCheckboxFlags_IntPtr(str0, flags, flags_value); } -// AUTO_GENERATED for 'igCollapsingHeaderTreeNodeFlags' -swr_igCollapsingHeaderTreeNodeFlags :: proc(label: string, flags: Tree_Node_Flags) -> bool { +// AUTO_GENERATED for 'igCheckboxFlags_UintPtr' +swr_igCheckboxFlags_UintPtr :: proc(label: string, flags: ^u32, flags_value: u32) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); - return igCollapsingHeaderTreeNodeFlags(str0, flags); + return igCheckboxFlags_UintPtr(str0, flags, flags_value); } -// AUTO_GENERATED for 'igCollapsingHeaderBoolPtr' -swr_igCollapsingHeaderBoolPtr :: proc(label: string, p_open: ^bool, flags: Tree_Node_Flags) -> bool { +// AUTO_GENERATED for 'igCollapsingHeader_TreeNodeFlags' +swr_igCollapsingHeader_TreeNodeFlags :: proc(label: string, flags: Tree_Node_Flags) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); - return igCollapsingHeaderBoolPtr(str0, p_open, flags); + return igCollapsingHeader_TreeNodeFlags(str0, flags); +} + +// AUTO_GENERATED for 'igCollapsingHeader_BoolPtr' +swr_igCollapsingHeader_BoolPtr :: proc(label: string, p_visible: ^bool, flags: Tree_Node_Flags) -> bool { + str0 := strings.clone_to_cstring(label, context.temp_allocator); + return igCollapsingHeader_BoolPtr(str0, p_visible, flags); } // AUTO_GENERATED for 'igColorButton' @@ -277,7 +296,7 @@ swr_igColumns :: proc(count: i32, id: string, border: bool) { igColumns(count, str1, border); } -// PREDEFINED FOR 'igComboStr_arr' +// PREDEFINED FOR 'igCombo_Str_arr' wrapper_combo_str_arr :: proc(label: string, current_item: ^i32, items: []string, popup_max_height_in_items := i32(0)) -> bool { l := strings.clone_to_cstring(label, context.temp_allocator); @@ -286,20 +305,20 @@ wrapper_combo_str_arr :: proc(label: string, current_item: ^i32, items: []string data[idx] = strings.clone_to_cstring(item, context.temp_allocator); } - return igComboStr_arr(l, current_item, &data[0], i32(len(items)), popup_max_height_in_items); + return igCombo_Str_arr(l, current_item, &data[0], i32(len(items)), popup_max_height_in_items); } -// AUTO_GENERATED for 'igComboStr' -swr_igComboStr :: proc(label: string, current_item: ^i32, items_separated_by_zeros: string, popup_max_height_in_items: i32) -> bool { +// AUTO_GENERATED for 'igCombo_Str' +swr_igCombo_Str :: proc(label: string, current_item: ^i32, items_separated_by_zeros: string, popup_max_height_in_items: i32) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); str2 := strings.clone_to_cstring(items_separated_by_zeros, context.temp_allocator); - return igComboStr(str0, current_item, str2, popup_max_height_in_items); + return igCombo_Str(str0, current_item, str2, popup_max_height_in_items); } -// PREDEFINED FOR 'igComboFnBoolPtr' +// PREDEFINED FOR 'igCombo_FnBoolPtr' wrapper_combo_fn_bool_ptr :: proc(label: string, current_item: ^i32, items_getter: Items_Getter_Proc, data: rawptr, items_count: i32, popup_max_height_in_items := i32(0)) -> bool { l := strings.clone_to_cstring(label, context.temp_allocator); - return igComboFnBoolPtr(l, current_item, items_getter, data, items_count, popup_max_height_in_items); + return igCombo_FnBoolPtr(l, current_item, items_getter, data, items_count, popup_max_height_in_items); } // AUTO_GENERATED for 'igDebugCheckVersionAndDataLayout' @@ -394,17 +413,17 @@ swr_igDragScalarN :: proc(label: string, data_type: Data_Type, p_data: rawptr, c return igDragScalarN(str0, data_type, p_data, components, v_speed, p_min, p_max, str7, flags); } -// AUTO_GENERATED for 'igGetIDStr' -swr_igGetIDStr :: proc(str_id: string) -> ImID { +// AUTO_GENERATED for 'igGetID_Str' +swr_igGetID_Str :: proc(str_id: string) -> ImID { str0 := strings.clone_to_cstring(str_id, context.temp_allocator); - return igGetIDStr(str0); + return igGetID_Str(str0); } -// AUTO_GENERATED for 'igGetIDStrStr' -swr_igGetIDStrStr :: proc(str_id_begin: string, str_id_end: string) -> ImID { +// AUTO_GENERATED for 'igGetID_StrStr' +swr_igGetID_StrStr :: proc(str_id_begin: string, str_id_end: string) -> ImID { str0 := strings.clone_to_cstring(str_id_begin, context.temp_allocator); str1 := strings.clone_to_cstring(str_id_end, context.temp_allocator); - return igGetIDStrStr(str0, str1); + return igGetID_StrStr(str0, str1); } // PREDEFINED FOR 'igGetWindowPos' @@ -495,7 +514,7 @@ swr_igInputScalarN :: proc(label: string, data_type: Data_Type, p_data: rawptr, } // PREDEFINED FOR 'igInputText' -wrapper_input_text :: inline proc(label: string, buf: []u8, flags := Input_Text_Flags(0), callback : Input_Text_Callback = nil, user_data : rawptr = nil) -> bool { +wrapper_input_text :: #force_inline proc(label: string, buf: []u8, flags := Input_Text_Flags(0), callback : Input_Text_Callback = nil, user_data : rawptr = nil) -> bool { l := strings.clone_to_cstring(label, context.temp_allocator); return igInputText(l, cstring(&buf[0]), uint(len(buf)), flags, callback, user_data); } @@ -521,10 +540,10 @@ swr_igInvisibleButton :: proc(str_id: string, size: Vec2, flags: Button_Flags) - return igInvisibleButton(str0, size, flags); } -// AUTO_GENERATED for 'igIsPopupOpenStr' -swr_igIsPopupOpenStr :: proc(str_id: string, flags: Popup_Flags) -> bool { +// AUTO_GENERATED for 'igIsPopupOpen_Str' +swr_igIsPopupOpen_Str :: proc(str_id: string, flags: Popup_Flags) -> bool { str0 := strings.clone_to_cstring(str_id, context.temp_allocator); - return igIsPopupOpenStr(str0, flags); + return igIsPopupOpen_Str(str0, flags); } // AUTO_GENERATED for 'igLabelText' @@ -534,29 +553,17 @@ swr_igLabelText :: proc(label: string, fmt_: string, args: ..any) { igLabelText(str0, str1, args); } -// AUTO_GENERATED for 'igListBoxStr_arr' -swr_igListBoxStr_arr :: proc(label: string, current_item: ^i32, items: string, items_count: i32, height_in_items: i32) -> bool { +// AUTO_GENERATED for 'igListBox_Str_arr' +swr_igListBox_Str_arr :: proc(label: string, current_item: ^i32, items: string, items_count: i32, height_in_items: i32) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); str2 := strings.clone_to_cstring(items, context.temp_allocator); - return igListBoxStr_arr(str0, current_item, str2, items_count, height_in_items); + return igListBox_Str_arr(str0, current_item, str2, items_count, height_in_items); } -// PREDEFINED FOR 'igListBoxFnBoolPtr' +// PREDEFINED FOR 'igListBox_FnBoolPtr' wrapper_list_box_fn_bool_ptr :: proc(label: string, current_item: ^i32, items_getter: Items_Getter_Proc, data: rawptr, items_count: i32, height_in_items := i32(0))-> bool { l := strings.clone_to_cstring(label, context.temp_allocator); - return igListBoxFnBoolPtr(l, current_item, items_getter, data, items_count, height_in_items); -} - -// AUTO_GENERATED for 'igListBoxHeaderVec2' -swr_igListBoxHeaderVec2 :: proc(label: string, size: Vec2) -> bool { - str0 := strings.clone_to_cstring(label, context.temp_allocator); - return igListBoxHeaderVec2(str0, size); -} - -// AUTO_GENERATED for 'igListBoxHeaderInt' -swr_igListBoxHeaderInt :: proc(label: string, items_count: i32, height_in_items: i32) -> bool { - str0 := strings.clone_to_cstring(label, context.temp_allocator); - return igListBoxHeaderInt(str0, items_count, height_in_items); + return igListBox_FnBoolPtr(l, current_item, items_getter, data, items_count, height_in_items); } // AUTO_GENERATED for 'igLoadIniSettingsFromDisk' @@ -583,18 +590,18 @@ swr_igLogToFile :: proc(auto_open_depth: i32, filename: string) { igLogToFile(auto_open_depth, str1); } -// AUTO_GENERATED for 'igMenuItemBool' -swr_igMenuItemBool :: proc(label: string, shortcut: string, selected: bool, enabled: bool) -> bool { +// AUTO_GENERATED for 'igMenuItem_Bool' +swr_igMenuItem_Bool :: proc(label: string, shortcut: string, selected: bool, enabled: bool) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); str1 := strings.clone_to_cstring(shortcut, context.temp_allocator); - return igMenuItemBool(str0, str1, selected, enabled); + return igMenuItem_Bool(str0, str1, selected, enabled); } -// AUTO_GENERATED for 'igMenuItemBoolPtr' -swr_igMenuItemBoolPtr :: proc(label: string, shortcut: string, p_selected: ^bool, enabled: bool) -> bool { +// AUTO_GENERATED for 'igMenuItem_BoolPtr' +swr_igMenuItem_BoolPtr :: proc(label: string, shortcut: string, p_selected: ^bool, enabled: bool) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); str1 := strings.clone_to_cstring(shortcut, context.temp_allocator); - return igMenuItemBoolPtr(str0, str1, p_selected, enabled); + return igMenuItem_BoolPtr(str0, str1, p_selected, enabled); } // AUTO_GENERATED for 'igOpenPopup' @@ -609,14 +616,14 @@ swr_igOpenPopupOnItemClick :: proc(str_id: string, popup_flags: Popup_Flags) { igOpenPopupOnItemClick(str0, popup_flags); } -// AUTO_GENERATED for 'igPlotHistogramFloatPtr' -swr_igPlotHistogramFloatPtr :: proc(label: string, values: ^f32, values_count: i32, values_offset: i32, overlay_text: string, scale_min: f32, scale_max: f32, graph_size: Vec2, stride: i32) { +// AUTO_GENERATED for 'igPlotHistogram_FloatPtr' +swr_igPlotHistogram_FloatPtr :: proc(label: string, values: ^f32, values_count: i32, values_offset: i32, overlay_text: string, scale_min: f32, scale_max: f32, graph_size: Vec2, stride: i32) { str0 := strings.clone_to_cstring(label, context.temp_allocator); str4 := strings.clone_to_cstring(overlay_text, context.temp_allocator); - igPlotHistogramFloatPtr(str0, values, values_count, values_offset, str4, scale_min, scale_max, graph_size, stride); + igPlotHistogram_FloatPtr(str0, values, values_count, values_offset, str4, scale_min, scale_max, graph_size, stride); } -// PREDEFINED FOR 'igPlotHistogramFnFloatPtr' +// PREDEFINED FOR 'igPlotHistogram_FnFloatPtr' wrapper_plot_histogram_fn_float_ptr :: proc(label: string, values_getter: Value_Getter_Proc, data: rawptr, @@ -628,17 +635,17 @@ wrapper_plot_histogram_fn_float_ptr :: proc(label: string, graph_size: Vec2) { l := strings.clone_to_cstring(label, context.temp_allocator); overlay := strings.clone_to_cstring(overlay_text, context.temp_allocator); - igPlotHistogramFnFloatPtr(l, values_getter, data, values_count, values_offset, overlay, scale_min, scale_max, graph_size); + igPlotHistogram_FnFloatPtr(l, values_getter, data, values_count, values_offset, overlay, scale_min, scale_max, graph_size); } -// AUTO_GENERATED for 'igPlotLinesFloatPtr' -swr_igPlotLinesFloatPtr :: proc(label: string, values: ^f32, values_count: i32, values_offset: i32, overlay_text: string, scale_min: f32, scale_max: f32, graph_size: Vec2, stride: i32) { +// AUTO_GENERATED for 'igPlotLines_FloatPtr' +swr_igPlotLines_FloatPtr :: proc(label: string, values: ^f32, values_count: i32, values_offset: i32, overlay_text: string, scale_min: f32, scale_max: f32, graph_size: Vec2, stride: i32) { str0 := strings.clone_to_cstring(label, context.temp_allocator); str4 := strings.clone_to_cstring(overlay_text, context.temp_allocator); - igPlotLinesFloatPtr(str0, values, values_count, values_offset, str4, scale_min, scale_max, graph_size, stride); + igPlotLines_FloatPtr(str0, values, values_count, values_offset, str4, scale_min, scale_max, graph_size, stride); } -// PREDEFINED FOR 'igPlotLinesFnFloatPtr' +// PREDEFINED FOR 'igPlotLines_FnFloatPtr' wrapper_plot_lines_fn_float_ptr :: proc(label: string, values_getter: Value_Getter_Proc, data: rawptr, @@ -650,7 +657,7 @@ wrapper_plot_lines_fn_float_ptr :: proc(label: string, graph_size: Vec2) { l := strings.clone_to_cstring(label, context.temp_allocator); overlay := strings.clone_to_cstring(overlay_text, context.temp_allocator); - igPlotLinesFnFloatPtr(l, values_getter, data, values_count, values_offset, overlay, scale_min, scale_max, graph_size); + igPlotLines_FnFloatPtr(l, values_getter, data, values_count, values_offset, overlay, scale_min, scale_max, graph_size); } // AUTO_GENERATED for 'igProgressBar' @@ -659,29 +666,29 @@ swr_igProgressBar :: proc(fraction: f32, size_arg: Vec2, overlay: string) { igProgressBar(fraction, size_arg, str2); } -// AUTO_GENERATED for 'igPushIDStr' -swr_igPushIDStr :: proc(str_id: string) { +// AUTO_GENERATED for 'igPushID_Str' +swr_igPushID_Str :: proc(str_id: string) { str0 := strings.clone_to_cstring(str_id, context.temp_allocator); - igPushIDStr(str0); + igPushID_Str(str0); } -// AUTO_GENERATED for 'igPushIDStrStr' -swr_igPushIDStrStr :: proc(str_id_begin: string, str_id_end: string) { +// AUTO_GENERATED for 'igPushID_StrStr' +swr_igPushID_StrStr :: proc(str_id_begin: string, str_id_end: string) { str0 := strings.clone_to_cstring(str_id_begin, context.temp_allocator); str1 := strings.clone_to_cstring(str_id_end, context.temp_allocator); - igPushIDStrStr(str0, str1); + igPushID_StrStr(str0, str1); } -// AUTO_GENERATED for 'igRadioButtonBool' -swr_igRadioButtonBool :: proc(label: string, active: bool) -> bool { +// AUTO_GENERATED for 'igRadioButton_Bool' +swr_igRadioButton_Bool :: proc(label: string, active: bool) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); - return igRadioButtonBool(str0, active); + return igRadioButton_Bool(str0, active); } -// AUTO_GENERATED for 'igRadioButtonIntPtr' -swr_igRadioButtonIntPtr :: proc(label: string, v: ^i32, v_button: i32) -> bool { +// AUTO_GENERATED for 'igRadioButton_IntPtr' +swr_igRadioButton_IntPtr :: proc(label: string, v: ^i32, v_button: i32) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); - return igRadioButtonIntPtr(str0, v, v_button); + return igRadioButton_IntPtr(str0, v, v_button); } // AUTO_GENERATED for 'igSaveIniSettingsToDisk' @@ -690,20 +697,20 @@ swr_igSaveIniSettingsToDisk :: proc(ini_filename: string) { igSaveIniSettingsToDisk(str0); } -// AUTO_GENERATED for 'igSelectableBool' -swr_igSelectableBool :: proc(label: string, selected: bool, flags: Selectable_Flags, size: Vec2) -> bool { +// AUTO_GENERATED for 'igSelectable_Bool' +swr_igSelectable_Bool :: proc(label: string, selected: bool, flags: Selectable_Flags, size: Vec2) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); - return igSelectableBool(str0, selected, flags, size); + return igSelectable_Bool(str0, selected, flags, size); } -// AUTO_GENERATED for 'igSelectableBoolPtr' -swr_igSelectableBoolPtr :: proc(label: string, p_selected: ^bool, flags: Selectable_Flags, size: Vec2) -> bool { +// AUTO_GENERATED for 'igSelectable_BoolPtr' +swr_igSelectable_BoolPtr :: proc(label: string, p_selected: ^bool, flags: Selectable_Flags, size: Vec2) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); - return igSelectableBoolPtr(str0, p_selected, flags, size); + return igSelectable_BoolPtr(str0, p_selected, flags, size); } // PREDEFINED FOR 'igSetAllocatorFunctions' -wrapper_set_allocator_functions :: inline proc(alloc_func: Alloc_Func, free_func: Free_Func) { +wrapper_set_allocator_functions :: #force_inline proc(alloc_func: Alloc_Func, free_func: Free_Func) { igSetAllocatorFunctions(alloc_func, free_func); } @@ -731,28 +738,28 @@ swr_igSetTooltip :: proc(fmt_: string, args: ..any) { igSetTooltip(str0, args); } -// AUTO_GENERATED for 'igSetWindowCollapsedStr' -swr_igSetWindowCollapsedStr :: proc(name: string, collapsed: bool, cond: Cond) { +// AUTO_GENERATED for 'igSetWindowCollapsed_Str' +swr_igSetWindowCollapsed_Str :: proc(name: string, collapsed: bool, cond: Cond) { str0 := strings.clone_to_cstring(name, context.temp_allocator); - igSetWindowCollapsedStr(str0, collapsed, cond); + igSetWindowCollapsed_Str(str0, collapsed, cond); } -// AUTO_GENERATED for 'igSetWindowFocusStr' -swr_igSetWindowFocusStr :: proc(name: string) { +// AUTO_GENERATED for 'igSetWindowFocus_Str' +swr_igSetWindowFocus_Str :: proc(name: string) { str0 := strings.clone_to_cstring(name, context.temp_allocator); - igSetWindowFocusStr(str0); + igSetWindowFocus_Str(str0); } -// AUTO_GENERATED for 'igSetWindowPosStr' -swr_igSetWindowPosStr :: proc(name: string, pos: Vec2, cond: Cond) { +// AUTO_GENERATED for 'igSetWindowPos_Str' +swr_igSetWindowPos_Str :: proc(name: string, pos: Vec2, cond: Cond) { str0 := strings.clone_to_cstring(name, context.temp_allocator); - igSetWindowPosStr(str0, pos, cond); + igSetWindowPos_Str(str0, pos, cond); } -// AUTO_GENERATED for 'igSetWindowSizeStr' -swr_igSetWindowSizeStr :: proc(name: string, size: Vec2, cond: Cond) { +// AUTO_GENERATED for 'igSetWindowSize_Str' +swr_igSetWindowSize_Str :: proc(name: string, size: Vec2, cond: Cond) { str0 := strings.clone_to_cstring(name, context.temp_allocator); - igSetWindowSizeStr(str0, size, cond); + igSetWindowSize_Str(str0, size, cond); } // AUTO_GENERATED for 'igShowFontSelector' @@ -856,6 +863,18 @@ swr_igTabItemButton :: proc(label: string, flags: Tab_Item_Flags) -> bool { return igTabItemButton(str0, flags); } +// AUTO_GENERATED for 'igTableHeader' +swr_igTableHeader :: proc(label: string) { + str0 := strings.clone_to_cstring(label, context.temp_allocator); + igTableHeader(str0); +} + +// AUTO_GENERATED for 'igTableSetupColumn' +swr_igTableSetupColumn :: proc(label: string, flags: Table_Column_Flags, init_width_or_weight: f32, user_id: ImID) { + str0 := strings.clone_to_cstring(label, context.temp_allocator); + igTableSetupColumn(str0, flags, init_width_or_weight, user_id); +} + // PREDEFINED FOR 'igText' wrapper_text :: proc(fmt_: string, args: ..any) { fmt_str := fmt.tprintf("{}\x00", fmt_); @@ -892,48 +911,48 @@ wrapper_text_wrapped :: proc(fmt_: string, args: ..any) { igTextWrapped(cstring(&str[0]), nil); } -// AUTO_GENERATED for 'igTreeNodeStr' -swr_igTreeNodeStr :: proc(label: string) -> bool { +// AUTO_GENERATED for 'igTreeNode_Str' +swr_igTreeNode_Str :: proc(label: string) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); - return igTreeNodeStr(str0); + return igTreeNode_Str(str0); } -// AUTO_GENERATED for 'igTreeNodeStrStr' -swr_igTreeNodeStrStr :: proc(str_id: string, fmt_: string, args: ..any) -> bool { +// AUTO_GENERATED for 'igTreeNode_StrStr' +swr_igTreeNode_StrStr :: proc(str_id: string, fmt_: string, args: ..any) -> bool { str0 := strings.clone_to_cstring(str_id, context.temp_allocator); str1 := strings.clone_to_cstring(fmt_, context.temp_allocator); - return igTreeNodeStrStr(str0, str1, args); + return igTreeNode_StrStr(str0, str1, args); } -// AUTO_GENERATED for 'igTreeNodePtr' -swr_igTreeNodePtr :: proc(ptr_id: rawptr, fmt_: string, args: ..any) -> bool { +// AUTO_GENERATED for 'igTreeNode_Ptr' +swr_igTreeNode_Ptr :: proc(ptr_id: rawptr, fmt_: string, args: ..any) -> bool { str1 := strings.clone_to_cstring(fmt_, context.temp_allocator); - return igTreeNodePtr(ptr_id, str1, args); + return igTreeNode_Ptr(ptr_id, str1, args); } -// AUTO_GENERATED for 'igTreeNodeExStr' -swr_igTreeNodeExStr :: proc(label: string, flags: Tree_Node_Flags) -> bool { +// AUTO_GENERATED for 'igTreeNodeEx_Str' +swr_igTreeNodeEx_Str :: proc(label: string, flags: Tree_Node_Flags) -> bool { str0 := strings.clone_to_cstring(label, context.temp_allocator); - return igTreeNodeExStr(str0, flags); + return igTreeNodeEx_Str(str0, flags); } -// AUTO_GENERATED for 'igTreeNodeExStrStr' -swr_igTreeNodeExStrStr :: proc(str_id: string, flags: Tree_Node_Flags, fmt_: string, args: ..any) -> bool { +// AUTO_GENERATED for 'igTreeNodeEx_StrStr' +swr_igTreeNodeEx_StrStr :: proc(str_id: string, flags: Tree_Node_Flags, fmt_: string, args: ..any) -> bool { str0 := strings.clone_to_cstring(str_id, context.temp_allocator); str2 := strings.clone_to_cstring(fmt_, context.temp_allocator); - return igTreeNodeExStrStr(str0, flags, str2, args); + return igTreeNodeEx_StrStr(str0, flags, str2, args); } -// AUTO_GENERATED for 'igTreeNodeExPtr' -swr_igTreeNodeExPtr :: proc(ptr_id: rawptr, flags: Tree_Node_Flags, fmt_: string, args: ..any) -> bool { +// AUTO_GENERATED for 'igTreeNodeEx_Ptr' +swr_igTreeNodeEx_Ptr :: proc(ptr_id: rawptr, flags: Tree_Node_Flags, fmt_: string, args: ..any) -> bool { str2 := strings.clone_to_cstring(fmt_, context.temp_allocator); - return igTreeNodeExPtr(ptr_id, flags, str2, args); + return igTreeNodeEx_Ptr(ptr_id, flags, str2, args); } -// AUTO_GENERATED for 'igTreePushStr' -swr_igTreePushStr :: proc(str_id: string) { +// AUTO_GENERATED for 'igTreePush_Str' +swr_igTreePush_Str :: proc(str_id: string) { str0 := strings.clone_to_cstring(str_id, context.temp_allocator); - igTreePushStr(str0); + igTreePush_Str(str0); } // AUTO_GENERATED for 'igVSliderFloat' @@ -957,29 +976,29 @@ swr_igVSliderScalar :: proc(label: string, size: Vec2, data_type: Data_Type, p_d return igVSliderScalar(str0, size, data_type, p_data, p_min, p_max, str6, flags); } -// AUTO_GENERATED for 'igValueBool' -swr_igValueBool :: proc(prefix: string, b: bool) { +// AUTO_GENERATED for 'igValue_Bool' +swr_igValue_Bool :: proc(prefix: string, b: bool) { str0 := strings.clone_to_cstring(prefix, context.temp_allocator); - igValueBool(str0, b); + igValue_Bool(str0, b); } -// AUTO_GENERATED for 'igValueInt' -swr_igValueInt :: proc(prefix: string, v: i32) { +// AUTO_GENERATED for 'igValue_Int' +swr_igValue_Int :: proc(prefix: string, v: i32) { str0 := strings.clone_to_cstring(prefix, context.temp_allocator); - igValueInt(str0, v); + igValue_Int(str0, v); } -// AUTO_GENERATED for 'igValueUint' -swr_igValueUint :: proc(prefix: string, v: u32) { +// AUTO_GENERATED for 'igValue_Uint' +swr_igValue_Uint :: proc(prefix: string, v: u32) { str0 := strings.clone_to_cstring(prefix, context.temp_allocator); - igValueUint(str0, v); + igValue_Uint(str0, v); } -// AUTO_GENERATED for 'igValueFloat' -swr_igValueFloat :: proc(prefix: string, v: f32, float_format: string) { +// AUTO_GENERATED for 'igValue_Float' +swr_igValue_Float :: proc(prefix: string, v: f32, float_format: string) { str0 := strings.clone_to_cstring(prefix, context.temp_allocator); str2 := strings.clone_to_cstring(float_format, context.temp_allocator); - igValueFloat(str0, v, str2); + igValue_Float(str0, v, str2); }