@gtkx/ffi
Classes
| Class | Description |
|---|---|
| NativeError | Error class wrapping GLib GError structures. |
| NativeObject | Base class for all GLib/GTK native objects managed by the FFI layer. |
Functions
| Function | Description |
|---|---|
| alloc | Allocates native memory for a structure or buffer. |
| call | Invokes a native function through FFI. |
| createRef | Creates a mutable reference wrapper. |
| findNativeClass | Finds a native class by walking the type hierarchy. |
| findNativeObject | Finds an existing JavaScript wrapper for a native pointer. |
| freeze | Freezes the GLib main loop, preventing it from processing events. |
| getNativeClass | Gets a registered class by its GLib type name. |
| getNativeId | Gets the internal handle ID for a native pointer. |
| getNativeInterface | Gets a native object as a specific interface type if it implements that interface. |
| getNativeObject | Creates a JavaScript wrapper for a native GObject. |
| isStarted | Whether the GTK application runtime is currently running. true if start has been called and stop has not. |
| read | Reads a value from native memory. |
| registerNativeClass | Registers a native class for type resolution. |
| registerNativeObject | Registers a native object in the identity registry. |
| start | Initializes the GTK application runtime. |
| stop | Shuts down the GTK application runtime. |
| unfreeze | Unfreezes the GLib main loop, flushing all batched mutations. |
| write | Writes a value to native memory. |
Type Aliases
| Type Alias | Description |
|---|---|
| Arg | An argument for an FFI call. |
| FfiValue | Union of all possible FFI return value types. |
| NativeClass | Constructor type for a NativeObject subclass, carrying GLib type metadata (glibTypeName, objectType) as static properties. |
| NativeHandle | Opaque handle for a native value. |
| Ref | A mutable reference wrapper for out-parameters. |
| Type | Discriminated union of all FFI type descriptors. |
Variables
| Variable | Description |
|---|---|
| events | Event emitter for GTK application lifecycle events. |