ImGuiCs

imguics.ImGuiCs (Class)

cs-target runtime support for the generated bindings (imguics.ImGui): native addresses cross as Haxe Float (53-bit mantissa covers user-space pointers on every supported platform), converted to System.IntPtr at the P/Invoke boundary. Scratch memory is allocated once (Marshal.AllocHGlobal through DCImGui.Alloc) - nothing here allocates garbage per frame.

Static Members

numScratch: Float

Float address type used across the generated cs bindings.


arrScratchA: Float

arrScratchB: Float

ptrSize: Int

Native pointer size in bytes.


init(): Void

Haxe Float address → native pointer.

Name Type
a Float
Returns
cs.system.IntPtr

Native pointer → Haxe Float address.

Name Type
p cs.system.IntPtr
Returns
Float

Returns
cs.system.IntPtr

toU64(v: Float): cs.UInt64
Name Type
v Float
Returns
cs.UInt64

toI64(v: Float): haxe.Int64
Name Type
v Float
Returns
haxe.Int64

from64(v: cs.UInt64): Float
Name Type
v cs.UInt64
Returns
Float

from64i(v: haxe.Int64): Float
Name Type
v haxe.Int64
Returns
Float

toI8(v: Int): cs.Int8
Name Type
v Int
Returns
cs.Int8

toU8(v: Int): cs.UInt8
Name Type
v Int
Returns
cs.UInt8

toI16(v: Int): cs.Int16
Name Type
v Int
Returns
cs.Int16

toU16(v: Int): cs.UInt16
Name Type
v Int
Returns
cs.UInt16

getF32(a: Float): Float
Name Type
a Float
Returns
Float

setF32(a: Float, v: Float): Void
Name Type
a Float
v Float

getF64(a: Float): Float
Name Type
a Float
Returns
Float

setF64(a: Float, v: Float): Void
Name Type
a Float
v Float

getI32(a: Float): Int
Name Type
a Float
Returns
Int

setI32(a: Float, v: Int): Void
Name Type
a Float
v Int

getU32(a: Float): Float
Name Type
a Float
Returns
Float

setU32(a: Float, v: Float): Void
Name Type
a Float
v Float

getU16(a: Float): Int
Name Type
a Float
Returns
Int

getU8(a: Float): Int
Name Type
a Float
Returns
Int

setU8(a: Float, v: Int): Void
Name Type
a Float
v Int

floatsDyn(values: Array<Float>): Float

Copy a Haxe Array into a persistent native f32 buffer; returns its address.

Name Type
values Array<Float>
Returns
Float

readPtr(addr: Float): Float

Read a native pointer at addr.

Name Type
addr Float
Returns
Float

Whether a native pointer is NULL.

Name Type
p cs.system.IntPtr
Returns
Bool

getU64(a: Float): Float

Read a u64 at addr as a Haxe Float (registry ids are small).

Name Type
a Float
Returns
Float

readString(p: cs.system.IntPtr): String

Read a NUL-terminated UTF-8 native string.

Name Type
p cs.system.IntPtr
Returns
String

strBufPut(s: String, maxLength: Int): Float

Copy s (UTF-8, clamped to maxLength bytes on a codepoint boundary, zero-terminated) into the persistent buffer; returns its Float address.

Name Type
s String
maxLength Int
Returns
Float

strBufChanged(original: String): Bool

Whether the persistent buffer differs from original.

Name Type
original String
Returns
Bool

strBufRead(): String

The persistent buffer content as a Haxe String.

Returns
String

Private Members

bufAddr: Float

bufCap: Int

inited: Bool

dynFloats: Float

dynFloatsCap: Int

Metadata

Name Parameters
:hxGen -