Skip to main content

@gtkx/ffi

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.
freeze-
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.
readPointerReads a value from memory pointed to by a pointer field.
registerNativeClassRegisters a native class for type resolution.
registerNativeObjectRegisters a native object in the identity registry.
setInstantiatingSets the instantiation flag.
startInitializes the GTK application runtime.
stopShuts down the GTK application runtime.
unfreeze-
writeWrites a value to native memory.
writePointerWrites a struct value to memory pointed to by a pointer field.

Variables

VariableDescription
eventsEvent emitter for GTK application lifecycle events.
isInstantiatingFlag indicating if a native object is currently being instantiated.

Classes

ClassDescription
NativeErrorError class wrapping GLib GError structures.
NativeObjectBase class for all GTK/GLib object wrappers.

Type Aliases

Type AliasDescription
ArgAn argument for an FFI call.
NativeClassConstructor type for native object wrapper classes.
NativeHandleOpaque handle for a native value.
RefA mutable reference wrapper for out-parameters.
TypeDiscriminated union of all FFI type descriptors.