Skip to content

@gtkx/ffi

Classes

ClassDescription
NativeErrorError class wrapping GLib GError structures.
NativeObjectBase class for all GLib/GTK native objects managed by the FFI layer.

Functions

FunctionDescription
allocAllocates native memory for a structure or buffer.
callInvokes a native function through FFI.
createRefCreates a mutable reference wrapper.
findNativeClassFinds a native class by walking the type hierarchy.
findNativeObjectFinds an existing JavaScript wrapper for a native pointer.
freezeFreezes the GLib main loop, preventing it from processing events.
getNativeClassGets a registered class by its GLib type name.
getNativeIdGets the internal handle ID for a native pointer.
getNativeInterfaceGets a native object as a specific interface type if it implements that interface.
getNativeObjectCreates a JavaScript wrapper for a native GObject.
isStartedWhether the GTK application runtime is currently running. true if start has been called and stop has not.
readReads a value from native memory.
registerNativeClassRegisters a native class for type resolution.
registerNativeObjectRegisters a native object in the identity registry.
startInitializes the GTK application runtime.
stopShuts down the GTK application runtime.
unfreezeUnfreezes the GLib main loop, flushing all batched mutations.
writeWrites a value to native memory.

Type Aliases

Type AliasDescription
ArgAn argument for an FFI call.
FfiValueUnion of all possible FFI return value types.
NativeClassConstructor type for a NativeObject subclass, carrying GLib type metadata (glibTypeName, objectType) as static properties.
NativeHandleOpaque handle for a native value.
RefA mutable reference wrapper for out-parameters.
TypeDiscriminated union of all FFI type descriptors.

Variables

VariableDescription
eventsEvent emitter for GTK application lifecycle events.