Skip to main content

@gtkx/ffi

Functions

FunctionDescription
batchExecutes a function with automatic batching.
beginBatchBegins a new FFI call batch.
callMakes an FFI call, batching it if inside a batch context.
createRefCreates a mutable reference wrapper.
discardAllBatchesDiscards all pending batched calls without executing them.
endBatchEnds the current batch and executes all queued FFI calls.
findNativeClassFinds a native class by walking the type hierarchy.
getNativeClassGets a registered class by its GLib type name.
getNativeIdGets the internal handle ID for a native pointer.
getNativeObjectCreates a JavaScript wrapper for a native GObject.
isBatchingChecks if currently inside a batch context.
isObjectEqualCompares two NativeObject instances for equality based on their underlying handles.
isStartedChecks if the GTK application runtime is currently running. Returns false in forked child processes where GTK state is invalid.
registerNativeClassRegisters a native class for type resolution.
setInstantiatingSets the instantiation flag.
startInitializes the GTK application runtime.
stopShuts down the GTK application runtime.

Variables

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

Interfaces

InterfaceDescription
GErrorLikeInterface representing a GLib GError structure.

Classes

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

Type Aliases

Type AliasDescription
NativeClassConstructor type for native object wrapper classes.
NativeHandleOpaque handle for a native value.