NativeStructs
imgui.NativeStructs (Class)
Portable creation of the few ImGui helper structs that user code owns
(the generator binds their fields and member functions, but cannot emit
constructors: C++ ctor semantics are replicated here per target).
Also provides raw native memory helpers for the rare APIs taking a
buffer + size (drag and drop payloads, polyline points...).
Static Members
Allocate an ImGuiListClipper (C++ ctor semantics in imgui 1.92: plain
zeroing). Destroy it with destroyListClipper when done, or keep one
per call site for its lifetime (clippers are reusable).
Create an ImGuiSelectionBasicStorage. adapter is the index-to-storage-id
function pointer (use imgui.ImGuiCallbacks.selectionAdapter to install a
Haxe handler); the C++ constructor installs an identity adapter, but the
bindings replicate the ctor per target so the adapter is always set here.
Allocate an ImFontConfig (C++ ctor semantics replicated per target:
fontDataOwnedByAtlas=true, glyphMaxAdvanceX=FLT_MAX, rasterizer
multiply/density=1). Destroy it with destroyFontConfig when done
(the atlas copies the config during AddFont* calls).
Allocate native bytes and copy a haxe.io.Bytes into them (fast per
target: memcpy / HEAPU8.set / Marshal.Copy). Suited to font files and
other large blobs. The returned buffer is never freed automatically.
Allocate raw native bytes (for payloads, point buffers...). The address
type follows the target's convention (cpp pointer, js Int, cs Float);
use the Bytes* helpers below to read/write portably.
| Name |
Type |
buffer |
Int |
offset |
Int |
| Name |
Type |
buffer |
Int |
offset |
Int |
| Name |
Type |
buffer |
Int |
offset |
Int |
64-bit integers cross as Haxe Float (53-bit precision, fine for UI demo values).
| Name |
Type |
buffer |
Int |
offset |
Int |
| Name |
Type |
buffer |
Int |
offset |
Int |
| Name |
Type |
buffer |
Int |
offset |
Int |