imgui-bindings 0.1.14-aarch64-linux → 0.1.16-aarch64-linux

Sign up to get free protection for your applications and to get access to all the features.
data/lib/imgui.rb CHANGED
@@ -20,6 +20,7 @@ FFI.typedef :int, :ImGuiComboFlags
20
20
  FFI.typedef :int, :ImGuiCond
21
21
  FFI.typedef :int, :ImGuiConfigFlags
22
22
  FFI.typedef :int, :ImGuiDataType
23
+ FFI.typedef :int, :ImGuiDockNodeFlags
23
24
  FFI.typedef :int, :ImGuiDragDropFlags
24
25
  FFI.typedef :int, :ImGuiFocusedFlags
25
26
  FFI.typedef :int, :ImGuiHoveredFlags
@@ -51,7 +52,7 @@ FFI.typedef :short, :ImS16
51
52
  FFI.typedef :int, :ImS32
52
53
  FFI.typedef :int64, :ImS64
53
54
  FFI.typedef :char, :ImS8
54
- FFI.typedef :pointer, :ImTextureID
55
+ FFI.typedef :uint64, :ImTextureID
55
56
  FFI.typedef :ushort, :ImU16
56
57
  FFI.typedef :uint, :ImU32
57
58
  FFI.typedef :uint64, :ImU64
@@ -77,8 +78,10 @@ FFI.typedef :int32, :ImGuiCond_
77
78
  FFI.typedef :int32, :ImGuiConfigFlags_
78
79
  FFI.typedef :int32, :ImGuiDataType_
79
80
  FFI.typedef :int32, :ImGuiDir
81
+ FFI.typedef :int32, :ImGuiDockNodeFlags_
80
82
  FFI.typedef :int32, :ImGuiDragDropFlags_
81
83
  FFI.typedef :int32, :ImGuiFocusedFlags_
84
+ FFI.typedef :int32, :ImGuiFreeTypeBuilderFlags
82
85
  FFI.typedef :int32, :ImGuiHoveredFlags_
83
86
  FFI.typedef :int32, :ImGuiInputFlags_
84
87
  FFI.typedef :int32, :ImGuiInputTextFlags_
@@ -140,11 +143,14 @@ ImFontAtlasFlags_NoBakedLines = 4 # 1 << 2 # Don't build thick line textur
140
143
 
141
144
  # ImGuiBackendFlags_
142
145
  # Backend capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom backend.
143
- ImGuiBackendFlags_None = 0 # 0
144
- ImGuiBackendFlags_HasGamepad = 1 # 1 << 0 # Backend Platform supports gamepad and currently has one connected.
145
- ImGuiBackendFlags_HasMouseCursors = 2 # 1 << 1 # Backend Platform supports honoring GetMouseCursor() value to change the OS cursor shape.
146
- ImGuiBackendFlags_HasSetMousePos = 4 # 1 << 2 # Backend Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if ImGuiConfigFlags_NavEnableSetMousePos is set).
147
- ImGuiBackendFlags_RendererHasVtxOffset = 8 # 1 << 3 # Backend Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bit indices.
146
+ ImGuiBackendFlags_None = 0 # 0
147
+ ImGuiBackendFlags_HasGamepad = 1 # 1 << 0 # Backend Platform supports gamepad and currently has one connected.
148
+ ImGuiBackendFlags_HasMouseCursors = 2 # 1 << 1 # Backend Platform supports honoring GetMouseCursor() value to change the OS cursor shape.
149
+ ImGuiBackendFlags_HasSetMousePos = 4 # 1 << 2 # Backend Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if io.ConfigNavMoveSetMousePos is set).
150
+ ImGuiBackendFlags_RendererHasVtxOffset = 8 # 1 << 3 # Backend Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bit indices.
151
+ ImGuiBackendFlags_PlatformHasViewports = 1024 # 1 << 10 # Backend Platform supports multiple viewports.
152
+ ImGuiBackendFlags_HasMouseHoveredViewport = 2048 # 1 << 11 # Backend Platform supports calling io.AddMouseViewportEvent() with the viewport under the mouse. IF POSSIBLE, ignore viewports with the ImGuiViewportFlags_NoInputs flag (Win32 backend, GLFW 3.30+ backend can do this, SDL backend cannot). If this cannot be done, Dear ImGui needs to use a flawed heuristic to find the viewport under.
153
+ ImGuiBackendFlags_RendererHasViewports = 4096 # 1 << 12 # Backend Renderer supports multiple viewports.
148
154
 
149
155
  # ImGuiButtonFlags_
150
156
  # Flags for InvisibleButton() [extended in imgui_internal.h]
@@ -153,10 +159,11 @@ ImGuiButtonFlags_MouseButtonLeft = 1 # 1 << 0 # React on left mouse button (de
153
159
  ImGuiButtonFlags_MouseButtonRight = 2 # 1 << 1 # React on right mouse button
154
160
  ImGuiButtonFlags_MouseButtonMiddle = 4 # 1 << 2 # React on center mouse button
155
161
  ImGuiButtonFlags_MouseButtonMask_ = 7 # ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle # [Internal]
162
+ ImGuiButtonFlags_EnableNav = 8 # 1 << 3 # InvisibleButton(): do not disable navigation/tabbing. Otherwise disabled by default.
156
163
 
157
164
  # ImGuiChildFlags_
158
165
  # Flags for ImGui::BeginChild()
159
- # (Legacy: bit 0 must always correspond to ImGuiChildFlags_Border to be backward compatible with old API using 'bool border = false'.
166
+ # (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'.
160
167
  # About using AutoResizeX/AutoResizeY flags:
161
168
  # - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints").
162
169
  # - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing.
@@ -165,7 +172,7 @@ ImGuiButtonFlags_MouseButtonMask_ = 7 # ImGuiButtonFlags_MouseButtonLeft | ImGu
165
172
  # - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view.
166
173
  # HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping.
167
174
  ImGuiChildFlags_None = 0 # 0
168
- ImGuiChildFlags_Border = 1 # 1 << 0 # Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy reason)
175
+ ImGuiChildFlags_Borders = 1 # 1 << 0 # Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy reason)
169
176
  ImGuiChildFlags_AlwaysUseWindowPadding = 2 # 1 << 1 # Pad with style.WindowPadding even if no border are drawn (no padding by default for non-bordered child windows because it makes more sense)
170
177
  ImGuiChildFlags_ResizeX = 4 # 1 << 2 # Allow resize from right border (layout direction). Enable .ini saving (unless ImGuiWindowFlags_NoSavedSettings passed to window flags)
171
178
  ImGuiChildFlags_ResizeY = 8 # 1 << 3 # Allow resize from bottom border (layout direction). "
@@ -173,7 +180,7 @@ ImGuiChildFlags_AutoResizeX = 16 # 1 << 4 # Enable auto-resizing width
173
180
  ImGuiChildFlags_AutoResizeY = 32 # 1 << 5 # Enable auto-resizing height. Read "IMPORTANT: Size measurement" details above.
174
181
  ImGuiChildFlags_AlwaysAutoResize = 64 # 1 << 6 # Combined with AutoResizeX/AutoResizeY. Always measure size even when child is hidden, always return true, always disable clipping optimization! NOT RECOMMENDED.
175
182
  ImGuiChildFlags_FrameStyle = 128 # 1 << 7 # Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding.
176
- ImGuiChildFlags_NavFlattened = 256 # 1 << 8 # [BETA] Share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
183
+ ImGuiChildFlags_NavFlattened = 256 # 1 << 8 # [BETA] Share focus scope, allow keyboard/gamepad navigation to cross over parent border to this child or between sibling child windows.
177
184
 
178
185
  # ImGuiCol_
179
186
  # Enumeration for PushStyleColor() / PopStyleColor()
@@ -217,23 +224,25 @@ ImGuiCol_TabSelectedOverline = 36 # 36 # Tab horizontal overline, when tab
217
224
  ImGuiCol_TabDimmed = 37 # 37 # Tab background, when tab-bar is unfocused & tab is unselected
218
225
  ImGuiCol_TabDimmedSelected = 38 # 38 # Tab background, when tab-bar is unfocused & tab is selected
219
226
  ImGuiCol_TabDimmedSelectedOverline = 39 # 39 #..horizontal overline, when tab-bar is unfocused & tab is selected
220
- ImGuiCol_PlotLines = 40 # 40
221
- ImGuiCol_PlotLinesHovered = 41 # 41
222
- ImGuiCol_PlotHistogram = 42 # 42
223
- ImGuiCol_PlotHistogramHovered = 43 # 43
224
- ImGuiCol_TableHeaderBg = 44 # 44 # Table header background
225
- ImGuiCol_TableBorderStrong = 45 # 45 # Table outer and header borders (prefer using Alpha=1.0 here)
226
- ImGuiCol_TableBorderLight = 46 # 46 # Table inner borders (prefer using Alpha=1.0 here)
227
- ImGuiCol_TableRowBg = 47 # 47 # Table row background (even rows)
228
- ImGuiCol_TableRowBgAlt = 48 # 48 # Table row background (odd rows)
229
- ImGuiCol_TextLink = 49 # 49 # Hyperlink color
230
- ImGuiCol_TextSelectedBg = 50 # 50
231
- ImGuiCol_DragDropTarget = 51 # 51 # Rectangle highlighting a drop target
232
- ImGuiCol_NavHighlight = 52 # 52 # Gamepad/keyboard: current highlighted item
233
- ImGuiCol_NavWindowingHighlight = 53 # 53 # Highlight window when using CTRL+TAB
234
- ImGuiCol_NavWindowingDimBg = 54 # 54 # Darken/colorize entire screen behind the CTRL+TAB window list, when active
235
- ImGuiCol_ModalWindowDimBg = 55 # 55 # Darken/colorize entire screen behind a modal window, when one is active
236
- ImGuiCol_COUNT = 56 # 56
227
+ ImGuiCol_DockingPreview = 40 # 40 # Preview overlay color when about to docking something
228
+ ImGuiCol_DockingEmptyBg = 41 # 41 # Background color for empty node (e.g. CentralNode with no window docked into it)
229
+ ImGuiCol_PlotLines = 42 # 42
230
+ ImGuiCol_PlotLinesHovered = 43 # 43
231
+ ImGuiCol_PlotHistogram = 44 # 44
232
+ ImGuiCol_PlotHistogramHovered = 45 # 45
233
+ ImGuiCol_TableHeaderBg = 46 # 46 # Table header background
234
+ ImGuiCol_TableBorderStrong = 47 # 47 # Table outer and header borders (prefer using Alpha=1.0 here)
235
+ ImGuiCol_TableBorderLight = 48 # 48 # Table inner borders (prefer using Alpha=1.0 here)
236
+ ImGuiCol_TableRowBg = 49 # 49 # Table row background (even rows)
237
+ ImGuiCol_TableRowBgAlt = 50 # 50 # Table row background (odd rows)
238
+ ImGuiCol_TextLink = 51 # 51 # Hyperlink color
239
+ ImGuiCol_TextSelectedBg = 52 # 52
240
+ ImGuiCol_DragDropTarget = 53 # 53 # Rectangle highlighting a drop target
241
+ ImGuiCol_NavCursor = 54 # 54 # Color of keyboard/gamepad navigation cursor/rectangle, when visible
242
+ ImGuiCol_NavWindowingHighlight = 55 # 55 # Highlight window when using CTRL+TAB
243
+ ImGuiCol_NavWindowingDimBg = 56 # 56 # Darken/colorize entire screen behind the CTRL+TAB window list, when active
244
+ ImGuiCol_ModalWindowDimBg = 57 # 57 # Darken/colorize entire screen behind a modal window, when one is active
245
+ ImGuiCol_COUNT = 58 # 58
237
246
 
238
247
  # ImGuiColorEditFlags_
239
248
  # Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton()
@@ -292,16 +301,18 @@ ImGuiCond_Appearing = 8 # 1 << 3 # Set the variable if the object/window is a
292
301
 
293
302
  # ImGuiConfigFlags_
294
303
  # Configuration flags stored in io.ConfigFlags. Set by user/application.
295
- ImGuiConfigFlags_None = 0 # 0
296
- ImGuiConfigFlags_NavEnableKeyboard = 1 # 1 << 0 # Master keyboard navigation enable flag. Enable full Tabbing + directional arrows + space/enter to activate.
297
- ImGuiConfigFlags_NavEnableGamepad = 2 # 1 << 1 # Master gamepad navigation enable flag. Backend also needs to set ImGuiBackendFlags_HasGamepad.
298
- ImGuiConfigFlags_NavEnableSetMousePos = 4 # 1 << 2 # Instruct navigation to move the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward. Will update io.MousePos and set io.WantSetMousePos=true. If enabled you MUST honor io.WantSetMousePos requests in your backend, otherwise ImGui will react as if the mouse is jumping around back and forth.
299
- ImGuiConfigFlags_NavNoCaptureKeyboard = 8 # 1 << 3 # Instruct navigation to not set the io.WantCaptureKeyboard flag when io.NavActive is set.
300
- ImGuiConfigFlags_NoMouse = 16 # 1 << 4 # Instruct dear imgui to disable mouse inputs and interactions.
301
- ImGuiConfigFlags_NoMouseCursorChange = 32 # 1 << 5 # Instruct backend to not alter mouse cursor shape and visibility. Use if the backend cursor changes are interfering with yours and you don't want to use SetMouseCursor() to change mouse cursor. You may want to honor requests from imgui by reading GetMouseCursor() yourself instead.
302
- ImGuiConfigFlags_NoKeyboard = 64 # 1 << 6 # Instruct dear imgui to disable keyboard inputs and interactions. This is done by ignoring keyboard events and clearing existing states.
303
- ImGuiConfigFlags_IsSRGB = 1048576 # 1 << 20 # Application is SRGB-aware.
304
- ImGuiConfigFlags_IsTouchScreen = 2097152 # 1 << 21 # Application is using a touch screen instead of a mouse.
304
+ ImGuiConfigFlags_None = 0 # 0
305
+ ImGuiConfigFlags_NavEnableKeyboard = 1 # 1 << 0 # Master keyboard navigation enable flag. Enable full Tabbing + directional arrows + space/enter to activate.
306
+ ImGuiConfigFlags_NavEnableGamepad = 2 # 1 << 1 # Master gamepad navigation enable flag. Backend also needs to set ImGuiBackendFlags_HasGamepad.
307
+ ImGuiConfigFlags_NoMouse = 16 # 1 << 4 # Instruct dear imgui to disable mouse inputs and interactions.
308
+ ImGuiConfigFlags_NoMouseCursorChange = 32 # 1 << 5 # Instruct backend to not alter mouse cursor shape and visibility. Use if the backend cursor changes are interfering with yours and you don't want to use SetMouseCursor() to change mouse cursor. You may want to honor requests from imgui by reading GetMouseCursor() yourself instead.
309
+ ImGuiConfigFlags_NoKeyboard = 64 # 1 << 6 # Instruct dear imgui to disable keyboard inputs and interactions. This is done by ignoring keyboard events and clearing existing states.
310
+ ImGuiConfigFlags_DockingEnable = 128 # 1 << 7 # Docking enable flags.
311
+ ImGuiConfigFlags_ViewportsEnable = 1024 # 1 << 10 # Viewport enable flags (require both ImGuiBackendFlags_PlatformHasViewports + ImGuiBackendFlags_RendererHasViewports set by the respective backends)
312
+ ImGuiConfigFlags_DpiEnableScaleViewports = 16384 # 1 << 14 # [BETA: Don't use] FIXME-DPI: Reposition and resize imgui windows when the DpiScale of a viewport changed (mostly useful for the main viewport hosting other window). Note that resizing the main window itself is up to your application.
313
+ ImGuiConfigFlags_DpiEnableScaleFonts = 32768 # 1 << 15 # [BETA: Don't use] FIXME-DPI: Request bitmap-scaled fonts to match DpiScale. This is a very low-quality workaround. The correct way to handle DPI is _currently_ to replace the atlas and/or fonts in the Platform_OnChangedViewport callback, but this is all early work in progress.
314
+ ImGuiConfigFlags_IsSRGB = 1048576 # 1 << 20 # Application is SRGB-aware.
315
+ ImGuiConfigFlags_IsTouchScreen = 2097152 # 1 << 21 # Application is using a touch screen instead of a mouse.
305
316
 
306
317
  # ImGuiDataType_
307
318
  # A primary data type
@@ -327,6 +338,19 @@ ImGuiDir_Up = 2 # 2
327
338
  ImGuiDir_Down = 3 # 3
328
339
  ImGuiDir_COUNT = 4 # 4
329
340
 
341
+ # ImGuiDockNodeFlags_
342
+ # Flags for ImGui::DockSpace(), shared/inherited by child nodes.
343
+ # (Some flags can be applied to individual nodes directly)
344
+ # FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api.
345
+ ImGuiDockNodeFlags_None = 0 # 0
346
+ ImGuiDockNodeFlags_KeepAliveOnly = 1 # 1 << 0 # // Don't display the dockspace node but keep it alive. Windows docked into this dockspace node won't be undocked.
347
+ ImGuiDockNodeFlags_NoDockingOverCentralNode = 4 # 1 << 2 # // Disable docking over the Central Node, which will be always kept empty.
348
+ ImGuiDockNodeFlags_PassthruCentralNode = 8 # 1 << 3 # // Enable passthru dockspace: 1) DockSpace() will render a ImGuiCol_WindowBg background covering everything excepted the Central Node when empty. Meaning the host window should probably use SetNextWindowBgAlpha(0.0f) prior to Begin() when using this. 2) When Central Node is empty: let inputs pass-through + won't display a DockingEmptyBg background. See demo for details.
349
+ ImGuiDockNodeFlags_NoDockingSplit = 16 # 1 << 4 # // Disable other windows/nodes from splitting this node.
350
+ ImGuiDockNodeFlags_NoResize = 32 # 1 << 5 # Saved // Disable resizing node using the splitter/separators. Useful with programmatically setup dockspaces.
351
+ ImGuiDockNodeFlags_AutoHideTabBar = 64 # 1 << 6 # // Tab bar will automatically hide when there is a single window in the dock node.
352
+ ImGuiDockNodeFlags_NoUndocking = 128 # 1 << 7 # // Disable undocking this node.
353
+
330
354
  # ImGuiDragDropFlags_
331
355
  # Flags for ImGui::BeginDragDropSource(), ImGui::AcceptDragDropPayload()
332
356
  ImGuiDragDropFlags_None = 0 # 0
@@ -350,8 +374,21 @@ ImGuiFocusedFlags_ChildWindows = 1 # 1 << 0 # Return true if any children
350
374
  ImGuiFocusedFlags_RootWindow = 2 # 1 << 1 # Test from root window (top most parent of the current hierarchy)
351
375
  ImGuiFocusedFlags_AnyWindow = 4 # 1 << 2 # Return true if any window is focused. Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this. Use 'io.WantCaptureMouse' instead! Please read the FAQ!
352
376
  ImGuiFocusedFlags_NoPopupHierarchy = 8 # 1 << 3 # Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with _ChildWindows or _RootWindow)
377
+ ImGuiFocusedFlags_DockHierarchy = 16 # 1 << 4 # Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with _ChildWindows or _RootWindow)
353
378
  ImGuiFocusedFlags_RootAndChildWindows = 3 # ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
354
379
 
380
+ # ImGuiFreeTypeBuilderFlags
381
+ ImGuiFreeTypeBuilderFlags_NoHinting = 1 # 1 << 0
382
+ ImGuiFreeTypeBuilderFlags_NoAutoHint = 2 # 1 << 1
383
+ ImGuiFreeTypeBuilderFlags_ForceAutoHint = 4 # 1 << 2
384
+ ImGuiFreeTypeBuilderFlags_LightHinting = 8 # 1 << 3
385
+ ImGuiFreeTypeBuilderFlags_MonoHinting = 16 # 1 << 4
386
+ ImGuiFreeTypeBuilderFlags_Bold = 32 # 1 << 5
387
+ ImGuiFreeTypeBuilderFlags_Oblique = 64 # 1 << 6
388
+ ImGuiFreeTypeBuilderFlags_Monochrome = 128 # 1 << 7
389
+ ImGuiFreeTypeBuilderFlags_LoadColor = 256 # 1 << 8
390
+ ImGuiFreeTypeBuilderFlags_Bitmap = 512 # 1 << 9
391
+
355
392
  # ImGuiHoveredFlags_
356
393
  # Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered()
357
394
  # Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ!
@@ -361,12 +398,13 @@ ImGuiHoveredFlags_ChildWindows = 1 # 1 << 0 # IsWindowHovered(
361
398
  ImGuiHoveredFlags_RootWindow = 2 # 1 << 1 # IsWindowHovered() only: Test from root window (top most parent of the current hierarchy)
362
399
  ImGuiHoveredFlags_AnyWindow = 4 # 1 << 2 # IsWindowHovered() only: Return true if any window is hovered
363
400
  ImGuiHoveredFlags_NoPopupHierarchy = 8 # 1 << 3 # IsWindowHovered() only: Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with _ChildWindows or _RootWindow)
401
+ ImGuiHoveredFlags_DockHierarchy = 16 # 1 << 4 # IsWindowHovered() only: Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with _ChildWindows or _RootWindow)
364
402
  ImGuiHoveredFlags_AllowWhenBlockedByPopup = 32 # 1 << 5 # Return true even if a popup window is normally blocking access to this item/window
365
403
  ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 128 # 1 << 7 # Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns.
366
404
  ImGuiHoveredFlags_AllowWhenOverlappedByItem = 256 # 1 << 8 # IsItemHovered() only: Return true even if the item uses AllowOverlap mode and is overlapped by another hoverable item.
367
405
  ImGuiHoveredFlags_AllowWhenOverlappedByWindow = 512 # 1 << 9 # IsItemHovered() only: Return true even if the position is obstructed or overlapped by another window.
368
406
  ImGuiHoveredFlags_AllowWhenDisabled = 1024 # 1 << 10 # IsItemHovered() only: Return true even if the item is disabled
369
- ImGuiHoveredFlags_NoNavOverride = 2048 # 1 << 11 # IsItemHovered() only: Disable using gamepad/keyboard navigation state when active, always query mouse
407
+ ImGuiHoveredFlags_NoNavOverride = 2048 # 1 << 11 # IsItemHovered() only: Disable using keyboard/gamepad navigation state when active, always query mouse
370
408
  ImGuiHoveredFlags_AllowWhenOverlapped = 768 # ImGuiHoveredFlags_AllowWhenOverlappedByItem | ImGuiHoveredFlags_AllowWhenOverlappedByWindow
371
409
  ImGuiHoveredFlags_RectOnly = 928 # ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped
372
410
  ImGuiHoveredFlags_RootAndChildWindows = 3 # ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
@@ -403,7 +441,7 @@ ImGuiInputTextFlags_CharsScientific = 4 # 1 << 2 # Allow 0123456789.+-*
403
441
  ImGuiInputTextFlags_CharsUppercase = 8 # 1 << 3 # Turn a..z into A..Z
404
442
  ImGuiInputTextFlags_CharsNoBlank = 16 # 1 << 4 # Filter out spaces, tabs
405
443
  ImGuiInputTextFlags_AllowTabInput = 32 # 1 << 5 # Pressing TAB input a '\t' character into the text field
406
- ImGuiInputTextFlags_EnterReturnsTrue = 64 # 1 << 6 # Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function.
444
+ ImGuiInputTextFlags_EnterReturnsTrue = 64 # 1 << 6 # Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider using IsItemDeactivatedAfterEdit() instead!
407
445
  ImGuiInputTextFlags_EscapeClearsAll = 128 # 1 << 7 # Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert)
408
446
  ImGuiInputTextFlags_CtrlEnterForNewLine = 256 # 1 << 8 # In multi-line mode, validate with Enter, add new line with Ctrl+Enter (default is opposite: validate with Ctrl+Enter, add line with Enter).
409
447
  ImGuiInputTextFlags_ReadOnly = 512 # 1 << 9 # Read-only mode
@@ -414,12 +452,13 @@ ImGuiInputTextFlags_ParseEmptyRefVal = 8192 # 1 << 13 # InputFloat(), Input
414
452
  ImGuiInputTextFlags_DisplayEmptyRefVal = 16384 # 1 << 14 # InputFloat(), InputInt(), InputScalar() etc. only: when value is zero, do not display it. Generally used with ImGuiInputTextFlags_ParseEmptyRefVal.
415
453
  ImGuiInputTextFlags_NoHorizontalScroll = 32768 # 1 << 15 # Disable following the cursor horizontally
416
454
  ImGuiInputTextFlags_NoUndoRedo = 65536 # 1 << 16 # Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID().
417
- ImGuiInputTextFlags_CallbackCompletion = 131072 # 1 << 17 # Callback on pressing TAB (for completion handling)
418
- ImGuiInputTextFlags_CallbackHistory = 262144 # 1 << 18 # Callback on pressing Up/Down arrows (for history handling)
419
- ImGuiInputTextFlags_CallbackAlways = 524288 # 1 << 19 # Callback on each iteration. User code may query cursor position, modify text buffer.
420
- ImGuiInputTextFlags_CallbackCharFilter = 1048576 # 1 << 20 # Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
421
- ImGuiInputTextFlags_CallbackResize = 2097152 # 1 << 21 # Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h for an example of using this)
422
- ImGuiInputTextFlags_CallbackEdit = 4194304 # 1 << 22 # Callback on any edit (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active)
455
+ ImGuiInputTextFlags_ElideLeft = 131072 # 1 << 17 # When text doesn't fit, elide left side to ensure right side stays visible. Useful for path/filenames. Single-line only!
456
+ ImGuiInputTextFlags_CallbackCompletion = 262144 # 1 << 18 # Callback on pressing TAB (for completion handling)
457
+ ImGuiInputTextFlags_CallbackHistory = 524288 # 1 << 19 # Callback on pressing Up/Down arrows (for history handling)
458
+ ImGuiInputTextFlags_CallbackAlways = 1048576 # 1 << 20 # Callback on each iteration. User code may query cursor position, modify text buffer.
459
+ ImGuiInputTextFlags_CallbackCharFilter = 2097152 # 1 << 21 # Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
460
+ ImGuiInputTextFlags_CallbackResize = 4194304 # 1 << 22 # Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h for an example of using this)
461
+ ImGuiInputTextFlags_CallbackEdit = 8388608 # 1 << 23 # Callback on any edit (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active)
423
462
 
424
463
  # ImGuiItemFlags_
425
464
  # Flags for ImGui::PushItemFlag()
@@ -430,15 +469,17 @@ ImGuiItemFlags_NoNav = 2 # 1 << 1 # false // Disable any form of
430
469
  ImGuiItemFlags_NoNavDefaultFocus = 4 # 1 << 2 # false // Disable item being a candidate for default focus (e.g. used by title bar items).
431
470
  ImGuiItemFlags_ButtonRepeat = 8 # 1 << 3 # false // Any button-like behavior will have repeat mode enabled (based on io.KeyRepeatDelay and io.KeyRepeatRate values). Note that you can also call IsItemActive() after any button to tell if it is being held.
432
471
  ImGuiItemFlags_AutoClosePopups = 16 # 1 << 4 # true // MenuItem()/Selectable() automatically close their parent popup window.
472
+ ImGuiItemFlags_AllowDuplicateId = 32 # 1 << 5 # false // Allow submitting an item with the same identifier as an item already submitted this frame without triggering a warning tooltip if io.ConfigDebugHighlightIdConflicts is set.
433
473
 
434
474
  # ImGuiKey
435
475
  # A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value): can represent Keyboard, Mouse and Gamepad values.
436
- # All our named keys are >= 512. Keys value 0 to 511 are left unused as legacy native/opaque key values (< 1.87).
437
- # Since >= 1.89 we increased typing (went from int to enum), some legacy code may need a cast to ImGuiKey.
438
- # Read details about the 1.87 and 1.89 transition : https://github.com/ocornut/imgui/issues/4921
476
+ # All our named keys are >= 512. Keys value 0 to 511 are left unused and were legacy native/opaque key values (< 1.87).
477
+ # Support for legacy keys was completely removed in 1.91.5.
478
+ # Read details about the 1.87+ transition : https://github.com/ocornut/imgui/issues/4921
439
479
  # Note that "Keys" related to physical keys and are not the same concept as input "Characters", the later are submitted via io.AddInputCharacter().
440
480
  # The keyboard key enum values are named after the keys on a standard US keyboard, and on other keyboard types the keys reported may not match the keycaps.
441
481
  ImGuiKey_None = 0 # 0
482
+ ImGuiKey_NamedKey_BEGIN = 512 # 512 # First valid key value (other than 0)
442
483
  ImGuiKey_Tab = 512 # 512 # == ImGuiKey_NamedKey_BEGIN
443
484
  ImGuiKey_LeftArrow = 513 # 513
444
485
  ImGuiKey_RightArrow = 514 # 514
@@ -593,18 +634,14 @@ ImGuiKey_ReservedForModCtrl = 662 # 662
593
634
  ImGuiKey_ReservedForModShift = 663 # 663
594
635
  ImGuiKey_ReservedForModAlt = 664 # 664
595
636
  ImGuiKey_ReservedForModSuper = 665 # 665
596
- ImGuiKey_COUNT = 666 # 666
637
+ ImGuiKey_NamedKey_END = 666 # 666
597
638
  ImGuiMod_None = 0 # 0
598
639
  ImGuiMod_Ctrl = 4096 # 1 << 12 # Ctrl (non-macOS), Cmd (macOS)
599
640
  ImGuiMod_Shift = 8192 # 1 << 13 # Shift
600
641
  ImGuiMod_Alt = 16384 # 1 << 14 # Option/Menu
601
642
  ImGuiMod_Super = 32768 # 1 << 15 # Windows/Super (non-macOS), Ctrl (macOS)
602
643
  ImGuiMod_Mask_ = 61440 # 0xF000 # 4-bits
603
- ImGuiKey_NamedKey_BEGIN = 512 # 512
604
- ImGuiKey_NamedKey_END = 666 # ImGuiKey_COUNT
605
644
  ImGuiKey_NamedKey_COUNT = 154 # ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN
606
- ImGuiKey_KeysData_SIZE = 154 # ImGuiKey_NamedKey_COUNT # Size of KeysData[]: hold legacy 0..512 keycodes + named keys
607
- ImGuiKey_KeysData_OFFSET = 512 # ImGuiKey_NamedKey_BEGIN # Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET) index.
608
645
 
609
646
  # ImGuiMouseButton_
610
647
  # Identify a mouse button.
@@ -700,13 +737,16 @@ ImGuiSelectionRequestType_SetRange = 2 # 2 # Request app to select/unselect [Ran
700
737
  # ImGuiSliderFlags_
701
738
  # Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
702
739
  # We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
703
- # (Those are per-item flags. There are shared flags in ImGuiIO: io.ConfigDragClickToInputText)
740
+ # (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText)
704
741
  ImGuiSliderFlags_None = 0 # 0
705
- ImGuiSliderFlags_AlwaysClamp = 16 # 1 << 4 # Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going out of bounds.
706
742
  ImGuiSliderFlags_Logarithmic = 32 # 1 << 5 # Make the widget logarithmic (linear otherwise). Consider using ImGuiSliderFlags_NoRoundToFormat with this if using a format-string with small amount of digits.
707
743
  ImGuiSliderFlags_NoRoundToFormat = 64 # 1 << 6 # Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are rounded to those 3 digits).
708
744
  ImGuiSliderFlags_NoInput = 128 # 1 << 7 # Disable CTRL+Click or Enter key allowing to input text directly into the widget.
709
- ImGuiSliderFlags_WrapAround = 256 # 1 << 8 # Enable wrapping around from max to min and from min to max (only supported by DragXXX() functions for now.
745
+ ImGuiSliderFlags_WrapAround = 256 # 1 << 8 # Enable wrapping around from max to min and from min to max. Only supported by DragXXX() functions for now.
746
+ ImGuiSliderFlags_ClampOnInput = 512 # 1 << 9 # Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going out of bounds.
747
+ ImGuiSliderFlags_ClampZeroRange = 1024 # 1 << 10 # Clamp even if min==max==0.0f. Otherwise due to legacy reason DragXXX functions don't clamp with those values. When your clamping limits are dynamic you almost always want to use it.
748
+ ImGuiSliderFlags_NoSpeedTweaks = 2048 # 1 << 11 # Disable keyboard modifiers altering tweak speed. Useful if you want to alter tweak speed yourself based on your own logic.
749
+ ImGuiSliderFlags_AlwaysClamp = 1536 # ImGuiSliderFlags_ClampOnInput | ImGuiSliderFlags_ClampZeroRange
710
750
  ImGuiSliderFlags_InvalidMask_ = 1879048207 # 0x7000000F # [Internal] We treat using those bits as being potentially a 'float power' argument from the previous API that has got miscast to this enum, and will trigger an assert if needed.
711
751
 
712
752
  # ImGuiSortDirection
@@ -757,7 +797,8 @@ ImGuiStyleVar_SelectableTextAlign = 29 # 29 # ImVec2 SelectableTextAl
757
797
  ImGuiStyleVar_SeparatorTextBorderSize = 30 # 30 # float SeparatorTextBorderSize
758
798
  ImGuiStyleVar_SeparatorTextAlign = 31 # 31 # ImVec2 SeparatorTextAlign
759
799
  ImGuiStyleVar_SeparatorTextPadding = 32 # 32 # ImVec2 SeparatorTextPadding
760
- ImGuiStyleVar_COUNT = 33 # 33
800
+ ImGuiStyleVar_DockingSeparatorSize = 33 # 33 # float DockingSeparatorSize
801
+ ImGuiStyleVar_COUNT = 34 # 34
761
802
 
762
803
  # ImGuiTabBarFlags_
763
804
  # Flags for ImGui::BeginTabBar()
@@ -817,7 +858,7 @@ ImGuiTableColumnFlags_NoClip = 256 # 1 << 8 # Disable clipping f
817
858
  ImGuiTableColumnFlags_NoSort = 512 # 1 << 9 # Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table).
818
859
  ImGuiTableColumnFlags_NoSortAscending = 1024 # 1 << 10 # Disable ability to sort in the ascending direction.
819
860
  ImGuiTableColumnFlags_NoSortDescending = 2048 # 1 << 11 # Disable ability to sort in the descending direction.
820
- ImGuiTableColumnFlags_NoHeaderLabel = 4096 # 1 << 12 # TableHeadersRow() will not submit horizontal label for this column. Convenient for some small columns. Name will still appear in context menu or in angled headers.
861
+ ImGuiTableColumnFlags_NoHeaderLabel = 4096 # 1 << 12 # TableHeadersRow() will submit an empty label for this column. Convenient for some small columns. Name will still appear in context menu or in angled headers. You may append into this cell by calling TableSetColumnIndex() right after the TableHeadersRow() call.
821
862
  ImGuiTableColumnFlags_NoHeaderWidth = 8192 # 1 << 13 # Disable header text width contribution to automatic column width.
822
863
  ImGuiTableColumnFlags_PreferSortAscending = 16384 # 1 << 14 # Make the initial sort direction Ascending when first sorting on this column (default).
823
864
  ImGuiTableColumnFlags_PreferSortDescending = 32768 # 1 << 15 # Make the initial sort direction Descending when first sorting on this column.
@@ -908,8 +949,8 @@ ImGuiTreeNodeFlags_AllowOverlap = 4 # 1 << 2 # Hit testing to allow
908
949
  ImGuiTreeNodeFlags_NoTreePushOnOpen = 8 # 1 << 3 # Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack
909
950
  ImGuiTreeNodeFlags_NoAutoOpenOnLog = 16 # 1 << 4 # Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes)
910
951
  ImGuiTreeNodeFlags_DefaultOpen = 32 # 1 << 5 # Default node to be open
911
- ImGuiTreeNodeFlags_OpenOnDoubleClick = 64 # 1 << 6 # Need double-click to open node
912
- ImGuiTreeNodeFlags_OpenOnArrow = 128 # 1 << 7 # Only open when clicking on the arrow part. If ImGuiTreeNodeFlags_OpenOnDoubleClick is also set, single-click arrow or double-click all box to open.
952
+ ImGuiTreeNodeFlags_OpenOnDoubleClick = 64 # 1 << 6 # Open on double-click instead of simple click (default for multi-select unless any _OpenOnXXX behavior is set explicitly). Both behaviors may be combined.
953
+ ImGuiTreeNodeFlags_OpenOnArrow = 128 # 1 << 7 # Open when clicking on the arrow part (default for multi-select unless any _OpenOnXXX behavior is set explicitly). Both behaviors may be combined.
913
954
  ImGuiTreeNodeFlags_Leaf = 256 # 1 << 8 # No collapsing, no arrow (use as a convenience for leaf nodes).
914
955
  ImGuiTreeNodeFlags_Bullet = 512 # 1 << 9 # Display a bullet instead of arrow. IMPORTANT: node can still be marked open/close if you don't set the _Leaf flag!
915
956
  ImGuiTreeNodeFlags_FramePadding = 1024 # 1 << 10 # Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding() before the node.
@@ -922,10 +963,21 @@ ImGuiTreeNodeFlags_CollapsingHeader = 26 # ImGuiTreeNodeFlags_Framed | Im
922
963
 
923
964
  # ImGuiViewportFlags_
924
965
  # Flags stored in ImGuiViewport::Flags, giving indications to the platform backends.
925
- ImGuiViewportFlags_None = 0 # 0
926
- ImGuiViewportFlags_IsPlatformWindow = 1 # 1 << 0 # Represent a Platform Window
927
- ImGuiViewportFlags_IsPlatformMonitor = 2 # 1 << 1 # Represent a Platform Monitor (unused yet)
928
- ImGuiViewportFlags_OwnedByApp = 4 # 1 << 2 # Platform Window: is created/managed by the application (rather than a dear imgui backend)
966
+ ImGuiViewportFlags_None = 0 # 0
967
+ ImGuiViewportFlags_IsPlatformWindow = 1 # 1 << 0 # Represent a Platform Window
968
+ ImGuiViewportFlags_IsPlatformMonitor = 2 # 1 << 1 # Represent a Platform Monitor (unused yet)
969
+ ImGuiViewportFlags_OwnedByApp = 4 # 1 << 2 # Platform Window: Is created/managed by the user application? (rather than our backend)
970
+ ImGuiViewportFlags_NoDecoration = 8 # 1 << 3 # Platform Window: Disable platform decorations: title bar, borders, etc. (generally set all windows, but if ImGuiConfigFlags_ViewportsDecoration is set we only set this on popups/tooltips)
971
+ ImGuiViewportFlags_NoTaskBarIcon = 16 # 1 << 4 # Platform Window: Disable platform task bar icon (generally set on popups/tooltips, or all windows if ImGuiConfigFlags_ViewportsNoTaskBarIcon is set)
972
+ ImGuiViewportFlags_NoFocusOnAppearing = 32 # 1 << 5 # Platform Window: Don't take focus when created.
973
+ ImGuiViewportFlags_NoFocusOnClick = 64 # 1 << 6 # Platform Window: Don't take focus when clicked on.
974
+ ImGuiViewportFlags_NoInputs = 128 # 1 << 7 # Platform Window: Make mouse pass through so we can drag this window while peaking behind it.
975
+ ImGuiViewportFlags_NoRendererClear = 256 # 1 << 8 # Platform Window: Renderer doesn't need to clear the framebuffer ahead (because we will fill it entirely).
976
+ ImGuiViewportFlags_NoAutoMerge = 512 # 1 << 9 # Platform Window: Avoid merging this window into another host window. This can only be set via ImGuiWindowClass viewport flags override (because we need to now ahead if we are going to create a viewport in the first place!).
977
+ ImGuiViewportFlags_TopMost = 1024 # 1 << 10 # Platform Window: Display on top (for tooltips only).
978
+ ImGuiViewportFlags_CanHostOtherWindows = 2048 # 1 << 11 # Viewport can host multiple imgui windows (secondary viewports are associated to a single window). // FIXME: In practice there's still probably code making the assumption that this is always and only on the MainViewport. Will fix once we add support for "no main viewport".
979
+ ImGuiViewportFlags_IsMinimized = 4096 # 1 << 12 # Platform Window: Window is minimized, can skip render. When minimized we tend to avoid using the viewport pos/size for clipping window or testing if they are contained in the viewport.
980
+ ImGuiViewportFlags_IsFocused = 8192 # 1 << 13 # Platform Window: Window is focused (last call to Platform_GetWindowFocus() returned true)
929
981
 
930
982
  # ImGuiWindowFlags_
931
983
  # Flags for ImGui::Begin()
@@ -947,9 +999,10 @@ ImGuiWindowFlags_NoFocusOnAppearing = 4096 # 1 << 12 # Disable taking fo
947
999
  ImGuiWindowFlags_NoBringToFrontOnFocus = 8192 # 1 << 13 # Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus)
948
1000
  ImGuiWindowFlags_AlwaysVerticalScrollbar = 16384 # 1 << 14 # Always show vertical scrollbar (even if ContentSize.y < Size.y)
949
1001
  ImGuiWindowFlags_AlwaysHorizontalScrollbar = 32768 # 1<< 15 # Always show horizontal scrollbar (even if ContentSize.x < Size.x)
950
- ImGuiWindowFlags_NoNavInputs = 65536 # 1 << 16 # No gamepad/keyboard navigation within the window
951
- ImGuiWindowFlags_NoNavFocus = 131072 # 1 << 17 # No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)
1002
+ ImGuiWindowFlags_NoNavInputs = 65536 # 1 << 16 # No keyboard/gamepad navigation within the window
1003
+ ImGuiWindowFlags_NoNavFocus = 131072 # 1 << 17 # No focusing toward this window with keyboard/gamepad navigation (e.g. skipped by CTRL+TAB)
952
1004
  ImGuiWindowFlags_UnsavedDocument = 262144 # 1 << 18 # Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.
1005
+ ImGuiWindowFlags_NoDocking = 524288 # 1 << 19 # Disable docking of this window
953
1006
  ImGuiWindowFlags_NoNav = 196608 # ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus
954
1007
  ImGuiWindowFlags_NoDecoration = 43 # ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse
955
1008
  ImGuiWindowFlags_NoInputs = 197120 # ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus
@@ -958,6 +1011,7 @@ ImGuiWindowFlags_Tooltip = 33554432 # 1 << 25 # Don't use! For in
958
1011
  ImGuiWindowFlags_Popup = 67108864 # 1 << 26 # Don't use! For internal use by BeginPopup()
959
1012
  ImGuiWindowFlags_Modal = 134217728 # 1 << 27 # Don't use! For internal use by BeginPopupModal()
960
1013
  ImGuiWindowFlags_ChildMenu = 268435456 # 1 << 28 # Don't use! For internal use by BeginMenu()
1014
+ ImGuiWindowFlags_DockNodeHost = 536870912 # 1 << 29 # Don't use! For internal use by Begin()/NewFrame()
961
1015
 
962
1016
 
963
1017
  class ImVec2 < FFI::Struct
@@ -1040,12 +1094,14 @@ end
1040
1094
  class ImDrawCmd < FFI::Struct
1041
1095
  layout(
1042
1096
  :ClipRect, ImVec4.by_value,
1043
- :TextureId, :pointer,
1097
+ :TextureId, :uint64,
1044
1098
  :VtxOffset, :uint,
1045
1099
  :IdxOffset, :uint,
1046
1100
  :ElemCount, :uint,
1047
1101
  :UserCallback, :pointer,
1048
- :UserCallbackData, :pointer
1102
+ :UserCallbackData, :pointer,
1103
+ :UserCallbackDataSize, :int,
1104
+ :UserCallbackDataOffset, :int
1049
1105
  )
1050
1106
 
1051
1107
  def GetTexID()
@@ -1066,7 +1122,7 @@ end
1066
1122
  class ImDrawCmdHeader < FFI::Struct
1067
1123
  layout(
1068
1124
  :ClipRect, ImVec4.by_value,
1069
- :TextureId, :pointer,
1125
+ :TextureId, :uint64,
1070
1126
  :VtxOffset, :uint
1071
1127
  )
1072
1128
  end
@@ -1078,7 +1134,7 @@ end
1078
1134
  # access the current window draw list and draw custom primitives.
1079
1135
  # You can interleave normal ImGui:: calls and adding primitives to the current draw list.
1080
1136
  # In single viewport mode, top-left is == GetMainViewport()->Pos (generally 0,0), bottom-right is == GetMainViewport()->Pos+Size (generally io.DisplaySize).
1081
- # You are totally free to apply whatever transformation matrix to want to the data (depending on the use of the transformation you may want to apply it to ClipRect as well!)
1137
+ # You are totally free to apply whatever transformation matrix you want to the data (depending on the use of the transformation you may want to apply it to ClipRect as well!)
1082
1138
  # Important: Primitives are always added to the list and not culled (culling is done at higher-level by ImGui:: functions), if you use this API a lot consider coarse culling your drawn objects.
1083
1139
  class ImDrawList < FFI::Struct
1084
1140
  layout(
@@ -1095,6 +1151,7 @@ class ImDrawList < FFI::Struct
1095
1151
  :_Splitter, ImDrawListSplitter.by_value,
1096
1152
  :_ClipRectStack, ImVector.by_value,
1097
1153
  :_TextureIdStack, ImVector.by_value,
1154
+ :_CallbacksDataBuf, ImVector.by_value,
1098
1155
  :_FringeScale, :float,
1099
1156
  :_OwnerName, :pointer
1100
1157
  )
@@ -1107,8 +1164,8 @@ class ImDrawList < FFI::Struct
1107
1164
  ImGui::ImDrawList_AddBezierQuadratic(self, p1, p2, p3, col, thickness, num_segments)
1108
1165
  end
1109
1166
 
1110
- def AddCallback(callback, callback_data)
1111
- ImGui::ImDrawList_AddCallback(self, callback, callback_data)
1167
+ def AddCallback(callback, userdata, userdata_size = 0)
1168
+ ImGui::ImDrawList_AddCallback(self, callback, userdata, userdata_size)
1112
1169
  end
1113
1170
 
1114
1171
  def AddCircle(center, radius, col, num_segments = 0, thickness = 1.0)
@@ -1371,6 +1428,10 @@ class ImDrawList < FFI::Struct
1371
1428
  ImGui::ImDrawList__ResetForNewFrame(self)
1372
1429
  end
1373
1430
 
1431
+ def _SetTextureID(texture_id)
1432
+ ImGui::ImDrawList__SetTextureID(self, texture_id)
1433
+ end
1434
+
1374
1435
  def _TryMergeDrawCmds()
1375
1436
  ImGui::ImDrawList__TryMergeDrawCmds(self)
1376
1437
  end
@@ -1401,7 +1462,7 @@ end
1401
1462
  class ImFontAtlas < FFI::Struct
1402
1463
  layout(
1403
1464
  :Flags, :int,
1404
- :TexID, :pointer,
1465
+ :TexID, :uint64,
1405
1466
  :TexDesiredWidth, :int,
1406
1467
  :TexGlyphPadding, :int,
1407
1468
  :Locked, :bool,
@@ -1561,47 +1622,6 @@ class ImGuiKeyData < FFI::Struct
1561
1622
  )
1562
1623
  end
1563
1624
 
1564
- # - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.
1565
- # - In 'docking' branch with multi-viewport enabled, we extend this concept to have multiple active viewports.
1566
- # - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode.
1567
- # - About Main Area vs Work Area:
1568
- # - Main Area = entire viewport.
1569
- # - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor).
1570
- # - Windows are generally trying to stay within the Work Area of their host viewport.
1571
- class ImGuiViewport < FFI::Struct
1572
- layout(
1573
- :ID, :uint,
1574
- :Flags, :int,
1575
- :Pos, ImVec2.by_value,
1576
- :Size, ImVec2.by_value,
1577
- :WorkPos, ImVec2.by_value,
1578
- :WorkSize, ImVec2.by_value,
1579
- :PlatformHandle, :pointer,
1580
- :PlatformHandleRaw, :pointer
1581
- )
1582
-
1583
- def GetCenter()
1584
- pOut = ImVec2.new
1585
- ImGui::ImGuiViewport_GetCenter(pOut, self)
1586
- return pOut
1587
- end
1588
-
1589
- def GetWorkCenter()
1590
- pOut = ImVec2.new
1591
- ImGui::ImGuiViewport_GetWorkCenter(pOut, self)
1592
- return pOut
1593
- end
1594
-
1595
- def self.create()
1596
- return ImGuiViewport.new(ImGui::ImGuiViewport_ImGuiViewport())
1597
- end
1598
-
1599
- def destroy()
1600
- ImGui::ImGuiViewport_destroy(self)
1601
- end
1602
-
1603
- end
1604
-
1605
1625
  # Helper: Key->Value storage
1606
1626
  # Typically you don't have to worry about this since a storage is held within each Window.
1607
1627
  # We use it to e.g. store collapse state for a tree (Int 0/1)
@@ -1677,6 +1697,58 @@ class ImGuiStorage < FFI::Struct
1677
1697
 
1678
1698
  end
1679
1699
 
1700
+ class ImDrawData < FFI::Struct
1701
+ end
1702
+ # - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.
1703
+ # - With multi-viewport enabled, we extend this concept to have multiple active viewports.
1704
+ # - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode.
1705
+ # - About Main Area vs Work Area:
1706
+ # - Main Area = entire viewport.
1707
+ # - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor).
1708
+ # - Windows are generally trying to stay within the Work Area of their host viewport.
1709
+ class ImGuiViewport < FFI::Struct
1710
+ layout(
1711
+ :ID, :uint,
1712
+ :Flags, :int,
1713
+ :Pos, ImVec2.by_value,
1714
+ :Size, ImVec2.by_value,
1715
+ :WorkPos, ImVec2.by_value,
1716
+ :WorkSize, ImVec2.by_value,
1717
+ :DpiScale, :float,
1718
+ :ParentViewportId, :uint,
1719
+ :DrawData, ImDrawData.ptr,
1720
+ :RendererUserData, :pointer,
1721
+ :PlatformUserData, :pointer,
1722
+ :PlatformHandle, :pointer,
1723
+ :PlatformHandleRaw, :pointer,
1724
+ :PlatformWindowCreated, :bool,
1725
+ :PlatformRequestMove, :bool,
1726
+ :PlatformRequestResize, :bool,
1727
+ :PlatformRequestClose, :bool
1728
+ )
1729
+
1730
+ def GetCenter()
1731
+ pOut = ImVec2.new
1732
+ ImGui::ImGuiViewport_GetCenter(pOut, self)
1733
+ return pOut
1734
+ end
1735
+
1736
+ def GetWorkCenter()
1737
+ pOut = ImVec2.new
1738
+ ImGui::ImGuiViewport_GetWorkCenter(pOut, self)
1739
+ return pOut
1740
+ end
1741
+
1742
+ def self.create()
1743
+ return ImGuiViewport.new(ImGui::ImGuiViewport_ImGuiViewport())
1744
+ end
1745
+
1746
+ def destroy()
1747
+ ImGui::ImGuiViewport_destroy(self)
1748
+ end
1749
+
1750
+ end
1751
+
1680
1752
  # Helper: ImColor() implicitly converts colors to either ImU32 (packed 4x1 byte) or ImVec4 (4x1 float)
1681
1753
  # Prefer using IM_COL32() macros if you want a guaranteed compile-time ImU32 for usage with ImDrawList API.
1682
1754
  # **Avoid storing ImColor! Store either u32 of ImVec4. This is not a full-featured color class. MAY OBSOLETE.
@@ -1742,9 +1814,9 @@ class ImFont < FFI::Struct
1742
1814
  :ContainerAtlas, ImFontAtlas.ptr,
1743
1815
  :ConfigData, :pointer,
1744
1816
  :ConfigDataCount, :short,
1745
- :FallbackChar, :ushort,
1746
- :EllipsisChar, :ushort,
1747
1817
  :EllipsisCharCount, :short,
1818
+ :EllipsisChar, :ushort,
1819
+ :FallbackChar, :ushort,
1748
1820
  :EllipsisWidth, :float,
1749
1821
  :EllipsisCharStep, :float,
1750
1822
  :DirtyLookupTables, :bool,
@@ -1834,11 +1906,12 @@ end
1834
1906
  # See ImFontAtlas::AddCustomRectXXX functions.
1835
1907
  class ImFontAtlasCustomRect < FFI::Struct
1836
1908
  layout(
1837
- :Width, :ushort,
1838
- :Height, :ushort,
1839
1909
  :X, :ushort,
1840
1910
  :Y, :ushort,
1911
+ :Width, :ushort,
1912
+ :Height, :ushort,
1841
1913
  :GlyphID, :uint,
1914
+ :GlyphColored, :uint,
1842
1915
  :GlyphAdvanceX, :float,
1843
1916
  :GlyphOffset, ImVec2.by_value,
1844
1917
  :Font, ImFont.ptr
@@ -1971,22 +2044,43 @@ class ImGuiIO < FFI::Struct
1971
2044
  :FontAllowUserScaling, :bool,
1972
2045
  :FontDefault, ImFont.ptr,
1973
2046
  :DisplayFramebufferScale, ImVec2.by_value,
2047
+ :ConfigNavSwapGamepadButtons, :bool,
2048
+ :ConfigNavMoveSetMousePos, :bool,
2049
+ :ConfigNavCaptureKeyboard, :bool,
2050
+ :ConfigNavEscapeClearFocusItem, :bool,
2051
+ :ConfigNavEscapeClearFocusWindow, :bool,
2052
+ :ConfigNavCursorVisibleAuto, :bool,
2053
+ :ConfigNavCursorVisibleAlways, :bool,
2054
+ :ConfigDockingNoSplit, :bool,
2055
+ :ConfigDockingWithShift, :bool,
2056
+ :ConfigDockingAlwaysTabBar, :bool,
2057
+ :ConfigDockingTransparentPayload, :bool,
2058
+ :ConfigViewportsNoAutoMerge, :bool,
2059
+ :ConfigViewportsNoTaskBarIcon, :bool,
2060
+ :ConfigViewportsNoDecoration, :bool,
2061
+ :ConfigViewportsNoDefaultParent, :bool,
1974
2062
  :MouseDrawCursor, :bool,
1975
2063
  :ConfigMacOSXBehaviors, :bool,
1976
- :ConfigNavSwapGamepadButtons, :bool,
1977
2064
  :ConfigInputTrickleEventQueue, :bool,
1978
2065
  :ConfigInputTextCursorBlink, :bool,
1979
2066
  :ConfigInputTextEnterKeepActive, :bool,
1980
2067
  :ConfigDragClickToInputText, :bool,
1981
2068
  :ConfigWindowsResizeFromEdges, :bool,
1982
2069
  :ConfigWindowsMoveFromTitleBarOnly, :bool,
2070
+ :ConfigWindowsCopyContentsWithCtrlC, :bool,
2071
+ :ConfigScrollbarScrollByPage, :bool,
1983
2072
  :ConfigMemoryCompactTimer, :float,
1984
2073
  :MouseDoubleClickTime, :float,
1985
2074
  :MouseDoubleClickMaxDist, :float,
1986
2075
  :MouseDragThreshold, :float,
1987
2076
  :KeyRepeatDelay, :float,
1988
2077
  :KeyRepeatRate, :float,
2078
+ :ConfigErrorRecovery, :bool,
2079
+ :ConfigErrorRecoveryEnableAssert, :bool,
2080
+ :ConfigErrorRecoveryEnableDebugLog, :bool,
2081
+ :ConfigErrorRecoveryEnableTooltip, :bool,
1989
2082
  :ConfigDebugIsDebuggerPresent, :bool,
2083
+ :ConfigDebugHighlightIdConflicts, :bool,
1990
2084
  :ConfigDebugBeginReturnValueOnce, :bool,
1991
2085
  :ConfigDebugBeginReturnValueLoop, :bool,
1992
2086
  :ConfigDebugIgnoreFocusLoss, :bool,
@@ -1996,13 +2090,6 @@ class ImGuiIO < FFI::Struct
1996
2090
  :BackendPlatformUserData, :pointer,
1997
2091
  :BackendRendererUserData, :pointer,
1998
2092
  :BackendLanguageUserData, :pointer,
1999
- :GetClipboardTextFn, :pointer,
2000
- :SetClipboardTextFn, :pointer,
2001
- :ClipboardUserData, :pointer,
2002
- :PlatformOpenInShellFn, :pointer,
2003
- :PlatformOpenInShellUserData, :pointer,
2004
- :PlatformSetImeDataFn, :pointer,
2005
- :PlatformLocaleDecimalPoint, :ushort,
2006
2093
  :WantCaptureMouse, :bool,
2007
2094
  :WantCaptureKeyboard, :bool,
2008
2095
  :WantTextInput, :bool,
@@ -2022,6 +2109,7 @@ class ImGuiIO < FFI::Struct
2022
2109
  :MouseWheel, :float,
2023
2110
  :MouseWheelH, :float,
2024
2111
  :MouseSource, :int,
2112
+ :MouseHoveredViewport, :uint,
2025
2113
  :KeyCtrl, :bool,
2026
2114
  :KeyShift, :bool,
2027
2115
  :KeyAlt, :bool,
@@ -2043,12 +2131,11 @@ class ImGuiIO < FFI::Struct
2043
2131
  :MouseCtrlLeftAsRightClick, :bool,
2044
2132
  :MouseDownDuration, [:float, 5],
2045
2133
  :MouseDownDurationPrev, [:float, 5],
2134
+ :MouseDragMaxDistanceAbs, [ImVec2.by_value, 5],
2046
2135
  :MouseDragMaxDistanceSqr, [:float, 5],
2047
2136
  :PenPressure, :float,
2048
2137
  :AppFocusLost, :bool,
2049
2138
  :AppAcceptingEvents, :bool,
2050
- :BackendUsingLegacyKeyArrays, :char,
2051
- :BackendUsingLegacyNavInputArray, :bool,
2052
2139
  :InputQueueSurrogate, :ushort,
2053
2140
  :InputQueueCharacters, ImVector.by_value
2054
2141
  )
@@ -2089,6 +2176,10 @@ class ImGuiIO < FFI::Struct
2089
2176
  ImGui::ImGuiIO_AddMouseSourceEvent(self, source)
2090
2177
  end
2091
2178
 
2179
+ def AddMouseViewportEvent(id)
2180
+ ImGui::ImGuiIO_AddMouseViewportEvent(self, id)
2181
+ end
2182
+
2092
2183
  def AddMouseWheelEvent(wheel_x, wheel_y)
2093
2184
  ImGui::ImGuiIO_AddMouseWheelEvent(self, wheel_x, wheel_y)
2094
2185
  end
@@ -2300,7 +2391,7 @@ class ImGuiPayload < FFI::Struct
2300
2391
 
2301
2392
  end
2302
2393
 
2303
- # (Optional) Support for IME (Input Method Editor) via the io.PlatformSetImeDataFn() function.
2394
+ # (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function.
2304
2395
  class ImGuiPlatformImeData < FFI::Struct
2305
2396
  layout(
2306
2397
  :WantVisible, :bool,
@@ -2318,6 +2409,28 @@ class ImGuiPlatformImeData < FFI::Struct
2318
2409
 
2319
2410
  end
2320
2411
 
2412
+ # (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI.
2413
+ # We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors.
2414
+ class ImGuiPlatformMonitor < FFI::Struct
2415
+ layout(
2416
+ :MainPos, ImVec2.by_value,
2417
+ :MainSize, ImVec2.by_value,
2418
+ :WorkPos, ImVec2.by_value,
2419
+ :WorkSize, ImVec2.by_value,
2420
+ :DpiScale, :float,
2421
+ :PlatformHandle, :pointer
2422
+ )
2423
+
2424
+ def self.create()
2425
+ return ImGuiPlatformMonitor.new(ImGui::ImGuiPlatformMonitor_ImGuiPlatformMonitor())
2426
+ end
2427
+
2428
+ def destroy()
2429
+ ImGui::ImGuiPlatformMonitor_destroy(self)
2430
+ end
2431
+
2432
+ end
2433
+
2321
2434
  # Optional helper to store multi-selection state + apply multi-selection requests.
2322
2435
  # - Used by our demos and provided as a convenience to easily implement basic multi-selection.
2323
2436
  # - Iterate selection with 'void* it = NULL; ImGuiID id; while (selection.GetNextSelectedItem(&it, &id)) { ... }'
@@ -2469,13 +2582,14 @@ class ImGuiStyle < FFI::Struct
2469
2582
  :SeparatorTextPadding, ImVec2.by_value,
2470
2583
  :DisplayWindowPadding, ImVec2.by_value,
2471
2584
  :DisplaySafeAreaPadding, ImVec2.by_value,
2585
+ :DockingSeparatorSize, :float,
2472
2586
  :MouseCursorScale, :float,
2473
2587
  :AntiAliasedLines, :bool,
2474
2588
  :AntiAliasedLinesUseTex, :bool,
2475
2589
  :AntiAliasedFill, :bool,
2476
2590
  :CurveTessellationTol, :float,
2477
2591
  :CircleTessellationMaxError, :float,
2478
- :Colors, [ImVec4.by_value, 56],
2592
+ :Colors, [ImVec4.by_value, 58],
2479
2593
  :HoverStationaryDelay, :float,
2480
2594
  :HoverDelayShort, :float,
2481
2595
  :HoverDelayNormal, :float,
@@ -2552,8 +2666,8 @@ class ImGuiTextBuffer < FFI::Struct
2552
2666
  ImGui::ImGuiTextBuffer_append(self, str, str_end)
2553
2667
  end
2554
2668
 
2555
- def appendf(fmt, *varargs)
2556
- ImGui::ImGuiTextBuffer_appendf(self, fmt, *varargs)
2669
+ def appendf(buffer, fmt, *varargs)
2670
+ ImGui::ImGuiTextBuffer_appendf(buffer, fmt, *varargs)
2557
2671
  end
2558
2672
 
2559
2673
  def begin()
@@ -2656,6 +2770,36 @@ class ImGuiTextRange < FFI::Struct
2656
2770
 
2657
2771
  end
2658
2772
 
2773
+ # [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions.
2774
+ # Important: the content of this class is still highly WIP and likely to change and be refactored
2775
+ # before we stabilize Docking features. Please be mindful if using this.
2776
+ # Provide hints:
2777
+ # - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.)
2778
+ # - To the platform backend for OS level parent/child relationships of viewport.
2779
+ # - To the docking system for various options and filtering.
2780
+ class ImGuiWindowClass < FFI::Struct
2781
+ layout(
2782
+ :ClassId, :uint,
2783
+ :ParentViewportId, :uint,
2784
+ :FocusRouteParentWindowId, :uint,
2785
+ :ViewportFlagsOverrideSet, :int,
2786
+ :ViewportFlagsOverrideClear, :int,
2787
+ :TabItemFlagsOverrideSet, :int,
2788
+ :DockNodeFlagsOverrideSet, :int,
2789
+ :DockingAlwaysTabBar, :bool,
2790
+ :DockingAllowUnclassed, :bool
2791
+ )
2792
+
2793
+ def self.create()
2794
+ return ImGuiWindowClass.new(ImGui::ImGuiWindowClass_ImGuiWindowClass())
2795
+ end
2796
+
2797
+ def destroy()
2798
+ ImGui::ImGuiWindowClass_destroy(self)
2799
+ end
2800
+
2801
+ end
2802
+
2659
2803
  # [Internal] Key+Value for ImGuiStorage
2660
2804
  class ImGuiStoragePair < FFI::Struct
2661
2805
  layout(
@@ -2725,12 +2869,12 @@ module ImGui
2725
2869
  end
2726
2870
 
2727
2871
  def self.import_symbols(output_error = false)
2728
- callback :ImDrawCallback, [ImDrawList, ImDrawCmd], :void
2729
- callback :ImGuiInputTextCallback, [ImGuiInputTextCallbackData], :int
2730
- callback :ImGuiSizeCallback, [ImGuiSizeCallbackData], :void
2872
+ callback :ImDrawCallback, [ImDrawList, ImDrawCmd], :void
2873
+ callback :ImGuiInputTextCallback, [ImGuiInputTextCallbackData], :int
2874
+ callback :ImGuiSizeCallback, [ImGuiSizeCallbackData], :void
2731
2875
 
2732
2876
  entries = [
2733
- [:ImDrawCmd_GetTexID, [:pointer], :pointer],
2877
+ [:ImDrawCmd_GetTexID, [:pointer], :uint64],
2734
2878
  [:ImDrawCmd_ImDrawCmd, [], :pointer],
2735
2879
  [:ImDrawCmd_destroy, [:pointer], :void],
2736
2880
  [:ImDrawData_AddDrawList, [:pointer, :pointer], :void],
@@ -2748,7 +2892,7 @@ module ImGui
2748
2892
  [:ImDrawListSplitter_destroy, [:pointer], :void],
2749
2893
  [:ImDrawList_AddBezierCubic, [:pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint, :float, :int], :void],
2750
2894
  [:ImDrawList_AddBezierQuadratic, [:pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint, :float, :int], :void],
2751
- [:ImDrawList_AddCallback, [:pointer, :ImDrawCallback, :pointer], :void],
2895
+ [:ImDrawList_AddCallback, [:pointer, :ImDrawCallback, :pointer, :size_t], :void],
2752
2896
  [:ImDrawList_AddCircle, [:pointer, ImVec2.by_value, :float, :uint, :int, :float], :void],
2753
2897
  [:ImDrawList_AddCircleFilled, [:pointer, ImVec2.by_value, :float, :uint, :int], :void],
2754
2898
  [:ImDrawList_AddConcavePolyFilled, [:pointer, :pointer, :int, :uint], :void],
@@ -2756,9 +2900,9 @@ module ImGui
2756
2900
  [:ImDrawList_AddDrawCmd, [:pointer], :void],
2757
2901
  [:ImDrawList_AddEllipse, [:pointer, ImVec2.by_value, ImVec2.by_value, :uint, :float, :int, :float], :void],
2758
2902
  [:ImDrawList_AddEllipseFilled, [:pointer, ImVec2.by_value, ImVec2.by_value, :uint, :float, :int], :void],
2759
- [:ImDrawList_AddImage, [:pointer, :pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint], :void],
2760
- [:ImDrawList_AddImageQuad, [:pointer, :pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint], :void],
2761
- [:ImDrawList_AddImageRounded, [:pointer, :pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint, :float, :int], :void],
2903
+ [:ImDrawList_AddImage, [:pointer, :uint64, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint], :void],
2904
+ [:ImDrawList_AddImageQuad, [:pointer, :uint64, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint], :void],
2905
+ [:ImDrawList_AddImageRounded, [:pointer, :uint64, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint, :float, :int], :void],
2762
2906
  [:ImDrawList_AddLine, [:pointer, ImVec2.by_value, ImVec2.by_value, :uint, :float], :void],
2763
2907
  [:ImDrawList_AddNgon, [:pointer, ImVec2.by_value, :float, :uint, :int, :float], :void],
2764
2908
  [:ImDrawList_AddNgonFilled, [:pointer, ImVec2.by_value, :float, :uint, :int], :void],
@@ -2803,7 +2947,7 @@ module ImGui
2803
2947
  [:ImDrawList_PrimWriteVtx, [:pointer, ImVec2.by_value, ImVec2.by_value, :uint], :void],
2804
2948
  [:ImDrawList_PushClipRect, [:pointer, ImVec2.by_value, ImVec2.by_value, :bool], :void],
2805
2949
  [:ImDrawList_PushClipRectFullScreen, [:pointer], :void],
2806
- [:ImDrawList_PushTextureID, [:pointer, :pointer], :void],
2950
+ [:ImDrawList_PushTextureID, [:pointer, :uint64], :void],
2807
2951
  [:ImDrawList__CalcCircleAutoSegmentCount, [:pointer, :float], :int],
2808
2952
  [:ImDrawList__ClearFreeMemory, [:pointer], :void],
2809
2953
  [:ImDrawList__OnChangedClipRect, [:pointer], :void],
@@ -2813,6 +2957,7 @@ module ImGui
2813
2957
  [:ImDrawList__PathArcToN, [:pointer, ImVec2.by_value, :float, :float, :float, :int], :void],
2814
2958
  [:ImDrawList__PopUnusedDrawCmd, [:pointer], :void],
2815
2959
  [:ImDrawList__ResetForNewFrame, [:pointer], :void],
2960
+ [:ImDrawList__SetTextureID, [:pointer, :uint64], :void],
2816
2961
  [:ImDrawList__TryMergeDrawCmds, [:pointer], :void],
2817
2962
  [:ImDrawList_destroy, [:pointer], :void],
2818
2963
  [:ImFontAtlasCustomRect_ImFontAtlasCustomRect, [], :pointer],
@@ -2847,7 +2992,7 @@ module ImGui
2847
2992
  [:ImFontAtlas_GetTexDataAsRGBA32, [:pointer, :pointer, :pointer, :pointer, :pointer], :void],
2848
2993
  [:ImFontAtlas_ImFontAtlas, [], :pointer],
2849
2994
  [:ImFontAtlas_IsBuilt, [:pointer], :bool],
2850
- [:ImFontAtlas_SetTexID, [:pointer, :pointer], :void],
2995
+ [:ImFontAtlas_SetTexID, [:pointer, :uint64], :void],
2851
2996
  [:ImFontAtlas_destroy, [:pointer], :void],
2852
2997
  [:ImFontConfig_ImFontConfig, [], :pointer],
2853
2998
  [:ImFontConfig_destroy, [:pointer], :void],
@@ -2878,6 +3023,8 @@ module ImGui
2878
3023
  [:ImFont_RenderText, [:pointer, :pointer, :float, ImVec2.by_value, :uint, ImVec4.by_value, :pointer, :pointer, :float, :bool], :void],
2879
3024
  [:ImFont_SetGlyphVisible, [:pointer, :ushort, :bool], :void],
2880
3025
  [:ImFont_destroy, [:pointer], :void],
3026
+ [:ImGuiFreeType_GetBuilderForFreeType, [], :pointer],
3027
+ [:ImGuiFreeType_SetAllocatorFunctions, [:pointer, :pointer, :pointer], :void],
2881
3028
  [:ImGuiIO_AddFocusEvent, [:pointer, :bool], :void],
2882
3029
  [:ImGuiIO_AddInputCharacter, [:pointer, :uint], :void],
2883
3030
  [:ImGuiIO_AddInputCharacterUTF16, [:pointer, :ushort], :void],
@@ -2887,6 +3034,7 @@ module ImGui
2887
3034
  [:ImGuiIO_AddMouseButtonEvent, [:pointer, :int, :bool], :void],
2888
3035
  [:ImGuiIO_AddMousePosEvent, [:pointer, :float, :float], :void],
2889
3036
  [:ImGuiIO_AddMouseSourceEvent, [:pointer, :int], :void],
3037
+ [:ImGuiIO_AddMouseViewportEvent, [:pointer, :uint], :void],
2890
3038
  [:ImGuiIO_AddMouseWheelEvent, [:pointer, :float, :float], :void],
2891
3039
  [:ImGuiIO_ClearEventsQueue, [:pointer], :void],
2892
3040
  [:ImGuiIO_ClearInputKeys, [:pointer], :void],
@@ -2918,8 +3066,12 @@ module ImGui
2918
3066
  [:ImGuiPayload_IsDelivery, [:pointer], :bool],
2919
3067
  [:ImGuiPayload_IsPreview, [:pointer], :bool],
2920
3068
  [:ImGuiPayload_destroy, [:pointer], :void],
3069
+ [:ImGuiPlatformIO_ImGuiPlatformIO, [], :pointer],
3070
+ [:ImGuiPlatformIO_destroy, [:pointer], :void],
2921
3071
  [:ImGuiPlatformImeData_ImGuiPlatformImeData, [], :pointer],
2922
3072
  [:ImGuiPlatformImeData_destroy, [:pointer], :void],
3073
+ [:ImGuiPlatformMonitor_ImGuiPlatformMonitor, [], :pointer],
3074
+ [:ImGuiPlatformMonitor_destroy, [:pointer], :void],
2923
3075
  [:ImGuiSelectionBasicStorage_ApplyRequests, [:pointer, :pointer], :void],
2924
3076
  [:ImGuiSelectionBasicStorage_Clear, [:pointer], :void],
2925
3077
  [:ImGuiSelectionBasicStorage_Contains, [:pointer, :uint], :bool],
@@ -2985,6 +3137,8 @@ module ImGui
2985
3137
  [:ImGuiViewport_GetWorkCenter, [:pointer, :pointer], :void],
2986
3138
  [:ImGuiViewport_ImGuiViewport, [], :pointer],
2987
3139
  [:ImGuiViewport_destroy, [:pointer], :void],
3140
+ [:ImGuiWindowClass_ImGuiWindowClass, [], :pointer],
3141
+ [:ImGuiWindowClass_destroy, [:pointer], :void],
2988
3142
  [:igAcceptDragDropPayload, [:pointer, :int], :pointer],
2989
3143
  [:igAlignTextToFramePadding, [], :void],
2990
3144
  [:igArrowButton, [:pointer, :int], :bool],
@@ -3042,6 +3196,9 @@ module ImGui
3042
3196
  [:igDebugStartItemPicker, [], :void],
3043
3197
  [:igDebugTextEncoding, [:pointer], :void],
3044
3198
  [:igDestroyContext, [:pointer], :void],
3199
+ [:igDestroyPlatformWindows, [], :void],
3200
+ [:igDockSpace, [:uint, ImVec2.by_value, :int, :pointer], :uint],
3201
+ [:igDockSpaceOverViewport, [:uint, :pointer, :int, :pointer], :uint],
3045
3202
  [:igDragFloat, [:pointer, :pointer, :float, :float, :float, :pointer, :int], :bool],
3046
3203
  [:igDragFloat2, [:pointer, :pointer, :float, :float, :float, :pointer, :int], :bool],
3047
3204
  [:igDragFloat3, [:pointer, :pointer, :float, :float, :float, :pointer, :int], :bool],
@@ -3073,8 +3230,10 @@ module ImGui
3073
3230
  [:igEndTabItem, [], :void],
3074
3231
  [:igEndTable, [], :void],
3075
3232
  [:igEndTooltip, [], :void],
3233
+ [:igFindViewportByID, [:uint], :pointer],
3234
+ [:igFindViewportByPlatformHandle, [:pointer], :pointer],
3076
3235
  [:igGetAllocatorFunctions, [:pointer, :pointer, :pointer], :void],
3077
- [:igGetBackgroundDrawList, [], :pointer],
3236
+ [:igGetBackgroundDrawList, [:pointer], :pointer],
3078
3237
  [:igGetClipboardText, [], :pointer],
3079
3238
  [:igGetColorU32_Col, [:int, :float], :uint],
3080
3239
  [:igGetColorU32_Vec4, [ImVec4.by_value], :uint],
@@ -3096,7 +3255,7 @@ module ImGui
3096
3255
  [:igGetFont, [], :pointer],
3097
3256
  [:igGetFontSize, [], :float],
3098
3257
  [:igGetFontTexUvWhitePixel, [:pointer], :void],
3099
- [:igGetForegroundDrawList, [], :pointer],
3258
+ [:igGetForegroundDrawList, [:pointer], :pointer],
3100
3259
  [:igGetFrameCount, [], :int],
3101
3260
  [:igGetFrameHeight, [], :float],
3102
3261
  [:igGetFrameHeightWithSpacing, [], :float],
@@ -3117,6 +3276,7 @@ module ImGui
3117
3276
  [:igGetMouseDragDelta, [:pointer, :int, :float], :void],
3118
3277
  [:igGetMousePos, [:pointer], :void],
3119
3278
  [:igGetMousePosOnOpeningCurrentPopup, [:pointer], :void],
3279
+ [:igGetPlatformIO, [], :pointer],
3120
3280
  [:igGetScrollMaxX, [], :float],
3121
3281
  [:igGetScrollMaxY, [], :float],
3122
3282
  [:igGetScrollX, [], :float],
@@ -3130,13 +3290,16 @@ module ImGui
3130
3290
  [:igGetTime, [], :double],
3131
3291
  [:igGetTreeNodeToLabelSpacing, [], :float],
3132
3292
  [:igGetVersion, [], :pointer],
3293
+ [:igGetWindowDockID, [], :uint],
3294
+ [:igGetWindowDpiScale, [], :float],
3133
3295
  [:igGetWindowDrawList, [], :pointer],
3134
3296
  [:igGetWindowHeight, [], :float],
3135
3297
  [:igGetWindowPos, [:pointer], :void],
3136
3298
  [:igGetWindowSize, [:pointer], :void],
3299
+ [:igGetWindowViewport, [], :pointer],
3137
3300
  [:igGetWindowWidth, [], :float],
3138
- [:igImage, [:pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec4.by_value, ImVec4.by_value], :void],
3139
- [:igImageButton, [:pointer, :pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec4.by_value, ImVec4.by_value], :bool],
3301
+ [:igImage, [:uint64, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec4.by_value, ImVec4.by_value], :void],
3302
+ [:igImageButton, [:pointer, :uint64, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec4.by_value, ImVec4.by_value], :bool],
3140
3303
  [:igIndent, [:float], :void],
3141
3304
  [:igInputDouble, [:pointer, :pointer, :double, :double, :pointer, :int], :bool],
3142
3305
  [:igInputFloat, [:pointer, :pointer, :float, :float, :pointer, :int], :bool],
@@ -3184,6 +3347,7 @@ module ImGui
3184
3347
  [:igIsRectVisible_Vec2, [ImVec2.by_value, ImVec2.by_value], :bool],
3185
3348
  [:igIsWindowAppearing, [], :bool],
3186
3349
  [:igIsWindowCollapsed, [], :bool],
3350
+ [:igIsWindowDocked, [], :bool],
3187
3351
  [:igIsWindowFocused, [:int], :bool],
3188
3352
  [:igIsWindowHovered, [:int], :bool],
3189
3353
  [:igLabelText, [:pointer, :pointer, :varargs], :void],
@@ -3232,10 +3396,13 @@ module ImGui
3232
3396
  [:igPushStyleColor_Vec4, [:int, ImVec4.by_value], :void],
3233
3397
  [:igPushStyleVar_Float, [:int, :float], :void],
3234
3398
  [:igPushStyleVar_Vec2, [:int, ImVec2.by_value], :void],
3399
+ [:igPushStyleVarX, [:int, :float], :void],
3400
+ [:igPushStyleVarY, [:int, :float], :void],
3235
3401
  [:igPushTextWrapPos, [:float], :void],
3236
3402
  [:igRadioButton_Bool, [:pointer, :bool], :bool],
3237
3403
  [:igRadioButton_IntPtr, [:pointer, :pointer, :int], :bool],
3238
3404
  [:igRender, [], :void],
3405
+ [:igRenderPlatformWindowsDefault, [:pointer, :pointer], :void],
3239
3406
  [:igResetMouseDragDelta, [:int], :void],
3240
3407
  [:igSameLine, [:float, :float], :void],
3241
3408
  [:igSaveIniSettingsToDisk, [:pointer], :void],
@@ -3260,6 +3427,7 @@ module ImGui
3260
3427
  [:igSetItemTooltip, [:pointer, :varargs], :void],
3261
3428
  [:igSetKeyboardFocusHere, [:int], :void],
3262
3429
  [:igSetMouseCursor, [:int], :void],
3430
+ [:igSetNavCursorVisible, [:bool], :void],
3263
3431
  [:igSetNextFrameWantCaptureKeyboard, [:bool], :void],
3264
3432
  [:igSetNextFrameWantCaptureMouse, [:bool], :void],
3265
3433
  [:igSetNextItemAllowOverlap, [], :void],
@@ -3269,13 +3437,16 @@ module ImGui
3269
3437
  [:igSetNextItemStorageID, [:uint], :void],
3270
3438
  [:igSetNextItemWidth, [:float], :void],
3271
3439
  [:igSetNextWindowBgAlpha, [:float], :void],
3440
+ [:igSetNextWindowClass, [:pointer], :void],
3272
3441
  [:igSetNextWindowCollapsed, [:bool, :int], :void],
3273
3442
  [:igSetNextWindowContentSize, [ImVec2.by_value], :void],
3443
+ [:igSetNextWindowDockID, [:uint, :int], :void],
3274
3444
  [:igSetNextWindowFocus, [], :void],
3275
3445
  [:igSetNextWindowPos, [ImVec2.by_value, :int, ImVec2.by_value], :void],
3276
3446
  [:igSetNextWindowScroll, [ImVec2.by_value], :void],
3277
3447
  [:igSetNextWindowSize, [ImVec2.by_value, :int], :void],
3278
3448
  [:igSetNextWindowSizeConstraints, [ImVec2.by_value, ImVec2.by_value, :ImGuiSizeCallback, :pointer], :void],
3449
+ [:igSetNextWindowViewport, [:uint], :void],
3279
3450
  [:igSetScrollFromPosX, [:float, :float], :void],
3280
3451
  [:igSetScrollFromPosY, [:float, :float], :void],
3281
3452
  [:igSetScrollHereX, [:float], :void],
@@ -3355,6 +3526,7 @@ module ImGui
3355
3526
  [:igTreePush_Str, [:pointer], :void],
3356
3527
  [:igTreePush_Ptr, [:pointer], :void],
3357
3528
  [:igUnindent, [:float], :void],
3529
+ [:igUpdatePlatformWindows, [], :void],
3358
3530
  [:igVSliderFloat, [:pointer, ImVec2.by_value, :pointer, :float, :float, :pointer, :int], :bool],
3359
3531
  [:igVSliderInt, [:pointer, ImVec2.by_value, :pointer, :int, :int, :pointer, :int], :bool],
3360
3532
  [:igVSliderScalar, [:pointer, ImVec2.by_value, :int, :pointer, :pointer, :pointer, :pointer, :int], :bool],
@@ -3442,7 +3614,7 @@ module ImGui
3442
3614
  # - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
3443
3615
  # - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled)
3444
3616
  # - Tooltips windows by exception are opted out of disabling.
3445
- # - BeginDisabled(false) essentially does nothing useful but is provided to facilitate use of boolean expressions. If you can avoid calling BeginDisabled(False)/EndDisabled() best to avoid it.
3617
+ # - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls)
3446
3618
  def self.BeginDisabled(disabled = true)
3447
3619
  igBeginDisabled(disabled)
3448
3620
  end
@@ -3484,6 +3656,7 @@ module ImGui
3484
3656
  #
3485
3657
  # Widgets: List Boxes
3486
3658
  # - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
3659
+ # - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result.
3487
3660
  # - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items.
3488
3661
  # - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analoguous to how Combos are created.
3489
3662
  # - Choose frame width: size.x > 0.0f: custom / size.x < 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth
@@ -3761,13 +3934,13 @@ module ImGui
3761
3934
  igColorPicker4(label, col, flags, ref_col)
3762
3935
  end
3763
3936
 
3764
- # arg: count(int), id(const char*), border(bool)
3937
+ # arg: count(int), id(const char*), borders(bool)
3765
3938
  # ret: void
3766
3939
  #
3767
3940
  # Legacy Columns API (prefer using Tables!)
3768
3941
  # - You can also use SameLine(pos_x) to mimic simplified columns.
3769
- def self.Columns(count = 1, id = nil, border = true) # Implied count = 1, id = NULL, border = true
3770
- igColumns(count, id, border)
3942
+ def self.Columns(count = 1, id = nil, borders = true) # Implied count = 1, id = NULL, borders = true
3943
+ igColumns(count, id, borders)
3771
3944
  end
3772
3945
 
3773
3946
  # arg: label(const char*), current_item(int*), items(const char* const[]), items_count(int), popup_max_height_in_items(int)
@@ -3837,6 +4010,37 @@ module ImGui
3837
4010
  igDestroyContext(ctx)
3838
4011
  end
3839
4012
 
4013
+ # ret: void
4014
+ def self.DestroyPlatformWindows() # call DestroyWindow platform functions for all viewports. call from backend Shutdown() if you need to close platform windows before imgui shutdown. otherwise will be called by DestroyContext().
4015
+ igDestroyPlatformWindows()
4016
+ end
4017
+
4018
+ # arg: dockspace_id(ImGuiID), size(ImVec2), flags(ImGuiDockNodeFlags), window_class(const ImGuiWindowClass*)
4019
+ # ret: uint
4020
+ #
4021
+ # Docking
4022
+ # [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
4023
+ # Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
4024
+ # - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
4025
+ # - Drag from window menu button (upper-left button) to undock an entire node (all windows).
4026
+ # - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking.
4027
+ # About dockspaces:
4028
+ # - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it.
4029
+ # This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent.
4030
+ # - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
4031
+ # - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
4032
+ # - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
4033
+ # e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
4034
+ def self.DockSpace(dockspace_id, size = ImVec2.create(0,0), flags = 0, window_class = nil) # Implied size = ImVec2(0, 0), flags = 0, window_class = NULL
4035
+ igDockSpace(dockspace_id, size, flags, window_class)
4036
+ end
4037
+
4038
+ # arg: dockspace_id(ImGuiID), viewport(const ImGuiViewport*), flags(ImGuiDockNodeFlags), window_class(const ImGuiWindowClass*)
4039
+ # ret: uint
4040
+ def self.DockSpaceOverViewport(dockspace_id = 0, viewport = nil, flags = 0, window_class = nil) # Implied dockspace_id = 0, viewport = NULL, flags = 0, window_class = NULL
4041
+ igDockSpaceOverViewport(dockspace_id, viewport, flags, window_class)
4042
+ end
4043
+
3840
4044
  # arg: label(const char*), v(float*), v_speed(float), v_min(float), v_max(float), format(const char*), flags(ImGuiSliderFlags)
3841
4045
  # ret: bool
3842
4046
  #
@@ -3846,7 +4050,7 @@ module ImGui
3846
4050
  # the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
3847
4051
  # - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
3848
4052
  # - Format string may also be set to NULL or use the default format ("%f" or "%d").
3849
- # - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
4053
+ # - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
3850
4054
  # - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
3851
4055
  # - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
3852
4056
  # - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
@@ -4018,17 +4222,30 @@ module ImGui
4018
4222
  igEndTooltip()
4019
4223
  end
4020
4224
 
4225
+ # arg: id(ImGuiID)
4226
+ # ret: pointer
4227
+ def self.FindViewportByID(id) # this is a helper for backends.
4228
+ igFindViewportByID(id)
4229
+ end
4230
+
4231
+ # arg: platform_handle(void*)
4232
+ # ret: pointer
4233
+ def self.FindViewportByPlatformHandle(platform_handle) # this is a helper for backends. the type platform_handle is decided by the backend (e.g. HWND, MyWindow*, GLFWwindow* etc.)
4234
+ igFindViewportByPlatformHandle(platform_handle)
4235
+ end
4236
+
4021
4237
  # arg: p_alloc_func(ImGuiMemAllocFunc*), p_free_func(ImGuiMemFreeFunc*), p_user_data(void**)
4022
4238
  # ret: void
4023
4239
  def self.GetAllocatorFunctions(p_alloc_func, p_free_func, p_user_data)
4024
4240
  igGetAllocatorFunctions(p_alloc_func, p_free_func, p_user_data)
4025
4241
  end
4026
4242
 
4243
+ # arg: viewport(ImGuiViewport*)
4027
4244
  # ret: pointer
4028
4245
  #
4029
4246
  # Background/Foreground Draw Lists
4030
- def self.GetBackgroundDrawList() # this draw list will be the first rendered one. Useful to quickly draw shapes/text behind dear imgui contents.
4031
- igGetBackgroundDrawList()
4247
+ def self.GetBackgroundDrawList(viewport = nil) # Implied viewport = NULL
4248
+ igGetBackgroundDrawList(viewport)
4032
4249
  end
4033
4250
 
4034
4251
  # ret: pointer
@@ -4162,15 +4379,16 @@ module ImGui
4162
4379
  end
4163
4380
 
4164
4381
  # ret: void
4165
- def self.GetFontTexUvWhitePixel() # get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API
4382
+ def self.GetFontTexUvWhitePixel() # get UV coordinate for a white pixel, useful to draw custom shapes via the ImDrawList API
4166
4383
  pOut = ImVec2.new
4167
4384
  igGetFontTexUvWhitePixel(pOut)
4168
4385
  return pOut
4169
4386
  end
4170
4387
 
4388
+ # arg: viewport(ImGuiViewport*)
4171
4389
  # ret: pointer
4172
- def self.GetForegroundDrawList() # this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
4173
- igGetForegroundDrawList()
4390
+ def self.GetForegroundDrawList(viewport = nil) # Implied viewport = NULL
4391
+ igGetForegroundDrawList(viewport)
4174
4392
  end
4175
4393
 
4176
4394
  # ret: int
@@ -4215,7 +4433,7 @@ module ImGui
4215
4433
  # ret: pointer
4216
4434
  #
4217
4435
  # Main
4218
- def self.GetIO() # access the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)
4436
+ def self.GetIO() # access the ImGuiIO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)
4219
4437
  igGetIO()
4220
4438
  end
4221
4439
 
@@ -4300,6 +4518,11 @@ module ImGui
4300
4518
  return pOut
4301
4519
  end
4302
4520
 
4521
+ # ret: pointer
4522
+ def self.GetPlatformIO() # access the ImGuiPlatformIO structure (mostly hooks/functions to connect to platform/renderer and OS Clipboard, IME etc.)
4523
+ igGetPlatformIO()
4524
+ end
4525
+
4303
4526
  # ret: float
4304
4527
  def self.GetScrollMaxX() # get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - DecorationsSize.x
4305
4528
  igGetScrollMaxX()
@@ -4371,6 +4594,16 @@ module ImGui
4371
4594
  igGetVersion()
4372
4595
  end
4373
4596
 
4597
+ # ret: uint
4598
+ def self.GetWindowDockID()
4599
+ igGetWindowDockID()
4600
+ end
4601
+
4602
+ # ret: float
4603
+ def self.GetWindowDpiScale() # get DPI scale currently associated to the current window's viewport.
4604
+ igGetWindowDpiScale()
4605
+ end
4606
+
4374
4607
  # ret: pointer
4375
4608
  def self.GetWindowDrawList() # get draw list associated to the current window, to append your own drawing primitives
4376
4609
  igGetWindowDrawList()
@@ -4395,6 +4628,11 @@ module ImGui
4395
4628
  return pOut
4396
4629
  end
4397
4630
 
4631
+ # ret: pointer
4632
+ def self.GetWindowViewport() # get viewport currently associated to the current window.
4633
+ igGetWindowViewport()
4634
+ end
4635
+
4398
4636
  # ret: float
4399
4637
  def self.GetWindowWidth() # get current window width (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().x.
4400
4638
  igGetWindowWidth()
@@ -4407,6 +4645,7 @@ module ImGui
4407
4645
  # - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
4408
4646
  # - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above.
4409
4647
  # - Note that Image() may add +2.0f to provided size if a border is visible, ImageButton() adds style.FramePadding*2.0f to provided size.
4648
+ # - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified.
4410
4649
  def self.Image(user_texture_id, image_size, uv0 = ImVec2.create(0,0), uv1 = ImVec2.create(1,1), tint_col = ImVec4.create(1,1,1,1), border_col = ImVec4.create(0,0,0,0)) # Implied uv0 = ImVec2(0, 0), uv1 = ImVec2(1, 1), tint_col = ImVec4(1, 1, 1, 1), border_col = ImVec4(0, 0, 0, 0)
4411
4650
  igImage(user_texture_id, image_size, uv0, uv1, tint_col, border_col)
4412
4651
  end
@@ -4609,9 +4848,8 @@ module ImGui
4609
4848
  #
4610
4849
  # Inputs Utilities: Keyboard/Mouse/Gamepad
4611
4850
  # - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
4612
- # - before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. About use of those legacy ImGuiKey values:
4613
- # - without IMGUI_DISABLE_OBSOLETE_KEYIO (legacy support): you can still use your legacy native/user indices (< 512) according to how your backend/engine stored them in io.KeysDown[], but need to cast them to ImGuiKey.
4614
- # - with IMGUI_DISABLE_OBSOLETE_KEYIO (this is the way forward): any use of ImGuiKey will assert with key < 512. GetKeyIndex() is pass-through and therefore deprecated (gone if IMGUI_DISABLE_OBSOLETE_KEYIO is defined).
4851
+ # - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)
4852
+ # - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices)
4615
4853
  def self.IsKeyDown(key) # is key being held.
4616
4854
  igIsKeyDown(key)
4617
4855
  end
@@ -4643,7 +4881,7 @@ module ImGui
4643
4881
  # arg: button(ImGuiMouseButton)
4644
4882
  # ret: bool
4645
4883
  #
4646
- # Inputs Utilities: Mouse specific
4884
+ # Inputs Utilities: Mouse
4647
4885
  # - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
4648
4886
  # - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
4649
4887
  # - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
@@ -4711,6 +4949,11 @@ module ImGui
4711
4949
  igIsWindowCollapsed()
4712
4950
  end
4713
4951
 
4952
+ # ret: bool
4953
+ def self.IsWindowDocked() # is current window docked into another window?
4954
+ igIsWindowDocked()
4955
+ end
4956
+
4714
4957
  # arg: flags(ImGuiFocusedFlags)
4715
4958
  # ret: bool
4716
4959
  def self.IsWindowFocused(flags = 0) # is current window focused? or its root/child, depending on flags. see flags for options.
@@ -5003,6 +5246,18 @@ module ImGui
5003
5246
  igPushStyleVar_Vec2(idx, val)
5004
5247
  end
5005
5248
 
5249
+ # arg: idx(ImGuiStyleVar), val_x(float)
5250
+ # ret: void
5251
+ def self.PushStyleVarX(idx, val_x) # modify X component of a style ImVec2 variable. "
5252
+ igPushStyleVarX(idx, val_x)
5253
+ end
5254
+
5255
+ # arg: idx(ImGuiStyleVar), val_y(float)
5256
+ # ret: void
5257
+ def self.PushStyleVarY(idx, val_y) # modify Y component of a style ImVec2 variable. "
5258
+ igPushStyleVarY(idx, val_y)
5259
+ end
5260
+
5006
5261
  # arg: wrap_local_pos_x(float)
5007
5262
  # ret: void
5008
5263
  def self.PushTextWrapPos(wrap_local_pos_x = 0.0) # push word-wrapping position for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space
@@ -5026,6 +5281,12 @@ module ImGui
5026
5281
  igRender()
5027
5282
  end
5028
5283
 
5284
+ # arg: platform_render_arg(void*), renderer_render_arg(void*)
5285
+ # ret: void
5286
+ def self.RenderPlatformWindowsDefault(platform_render_arg = nil, renderer_render_arg = nil) # Implied platform_render_arg = NULL, renderer_render_arg = NULL
5287
+ igRenderPlatformWindowsDefault(platform_render_arg, renderer_render_arg)
5288
+ end
5289
+
5029
5290
  # arg: button(ImGuiMouseButton)
5030
5291
  # ret: void
5031
5292
  def self.ResetMouseDragDelta(button = 0) # Implied button = 0
@@ -5149,8 +5410,7 @@ module ImGui
5149
5410
  # ret: void
5150
5411
  #
5151
5412
  # Focus, Activation
5152
- # - Prefer using "SetItemDefaultFocus()" over "if (IsWindowAppearing()) SetScrollHereY()" when applicable to signify "this is the default item"
5153
- def self.SetItemDefaultFocus() # make last item the default focused item of a window.
5413
+ def self.SetItemDefaultFocus() # make last item the default focused item of of a newly appearing window.
5154
5414
  igSetItemDefaultFocus()
5155
5415
  end
5156
5416
 
@@ -5185,6 +5445,14 @@ module ImGui
5185
5445
  igSetMouseCursor(cursor_type)
5186
5446
  end
5187
5447
 
5448
+ # arg: visible(bool)
5449
+ # ret: void
5450
+ #
5451
+ # Keyboard/Gamepad Navigation
5452
+ def self.SetNavCursorVisible(visible) # alter visibility of keyboard/gamepad cursor. by default: show when using an arrow key, hide when clicking with mouse.
5453
+ igSetNavCursorVisible(visible)
5454
+ end
5455
+
5188
5456
  # arg: want_capture_keyboard(bool)
5189
5457
  # ret: void
5190
5458
  def self.SetNextFrameWantCaptureKeyboard(want_capture_keyboard) # Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle, typically when true it instructs your app to ignore inputs). e.g. force capture keyboard when your widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard"; after the next NewFrame() call.
@@ -5240,6 +5508,12 @@ module ImGui
5240
5508
  igSetNextWindowBgAlpha(alpha)
5241
5509
  end
5242
5510
 
5511
+ # arg: window_class(const ImGuiWindowClass*)
5512
+ # ret: void
5513
+ def self.SetNextWindowClass(window_class) # set next window class (control docking compatibility + provide hints to platform backend via custom viewport flags and platform parent/child relationship)
5514
+ igSetNextWindowClass(window_class)
5515
+ end
5516
+
5243
5517
  # arg: collapsed(bool), cond(ImGuiCond)
5244
5518
  # ret: void
5245
5519
  def self.SetNextWindowCollapsed(collapsed, cond = 0) # set next window collapsed state. call before Begin()
@@ -5252,6 +5526,12 @@ module ImGui
5252
5526
  igSetNextWindowContentSize(size)
5253
5527
  end
5254
5528
 
5529
+ # arg: dock_id(ImGuiID), cond(ImGuiCond)
5530
+ # ret: void
5531
+ def self.SetNextWindowDockID(dock_id, cond = 0) # set next window dock id
5532
+ igSetNextWindowDockID(dock_id, cond)
5533
+ end
5534
+
5255
5535
  # ret: void
5256
5536
  def self.SetNextWindowFocus() # set next window to be focused / top-most. call before Begin()
5257
5537
  igSetNextWindowFocus()
@@ -5284,6 +5564,12 @@ module ImGui
5284
5564
  igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data)
5285
5565
  end
5286
5566
 
5567
+ # arg: viewport_id(ImGuiID)
5568
+ # ret: void
5569
+ def self.SetNextWindowViewport(viewport_id) # set next window viewport
5570
+ igSetNextWindowViewport(viewport_id)
5571
+ end
5572
+
5287
5573
  # arg: local_x(float), center_x_ratio(float)
5288
5574
  # ret: void
5289
5575
  def self.SetScrollFromPosX(local_x, center_x_ratio = 0.5) # adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to compute a valid position.
@@ -5791,6 +6077,15 @@ module ImGui
5791
6077
  igUnindent(indent_w)
5792
6078
  end
5793
6079
 
6080
+ # ret: void
6081
+ #
6082
+ # (Optional) Platform/OS interface for multi-viewport support
6083
+ # Read comments around the ImGuiPlatformIO structure for more details.
6084
+ # Note: You may use GetWindowViewport() to get the current viewport of the current window.
6085
+ def self.UpdatePlatformWindows() # call in main loop. will call CreateWindow/ResizeWindow/etc. platform functions for each secondary viewport, and DestroyWindow for each inactive viewport.
6086
+ igUpdatePlatformWindows()
6087
+ end
6088
+
5794
6089
  # arg: label(const char*), size(ImVec2), v(float*), v_min(float), v_max(float), format(const char*), flags(ImGuiSliderFlags)
5795
6090
  # ret: bool
5796
6091
  def self.VSliderFloat(label, size, v, v_min, v_max, format = "%.3f", flags = 0) # Implied format = "%.3f", flags = 0
@@ -5839,10 +6134,10 @@ module ImGui
5839
6134
  # Child Windows
5840
6135
  # - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child.
5841
6136
  # - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false".
5842
- # This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Border == true.
6137
+ # This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Borders == true.
5843
6138
  # Consider updating your old code:
5844
6139
  # BeginChild("Name", size, false) -> Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None);
5845
- # BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Border);
6140
+ # BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Borders);
5846
6141
  # - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)):
5847
6142
  # == 0.0f: use remaining parent window size for this axis.
5848
6143
  # > 0.0f: use specified size for this axis.
@@ -6036,7 +6331,7 @@ module ImGui
6036
6331
  $stderr.puts("[Warning] PushStyleColor : No matching functions found (#{arg})")
6037
6332
  end
6038
6333
 
6039
- def self.PushStyleVar(*arg) # modify a style float variable. always use this if you modify the style after NewFrame().
6334
+ def self.PushStyleVar(*arg) # modify a style float variable. always use this if you modify the style after NewFrame()!
6040
6335
  # arg: 0:idx(ImGuiStyleVar), 1:val(float)
6041
6336
  # ret: void
6042
6337
  return igPushStyleVar_Float(arg[0], arg[1]) if arg.length == 2 && (arg[0].kind_of?(Integer) && arg[1].kind_of?(Float))