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.
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.
getStartErrorReturns why FFI calls are not allowed, or null if they are allowed.
isObjectEqualCompares two NativeObject instances for equality based on their underlying handles.
readReads a value from native memory.
readPointerReads a value from memory pointed to by a pointer field.
registerNativeClassRegisters a native class for type resolution.
setInstantiatingSets the instantiation flag.
startInitializes the GTK application runtime.
stopShuts down the GTK application runtime.
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.
isStartedWhether the GTK application runtime is currently running. true if start has been called and stop has not.

Classes

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

Type Aliases

Type AliasDescription
GErrorLikeInterface representing a GLib GError structure.
NativeClassConstructor type for native object wrapper classes.
NativeHandleOpaque handle for a native value.