RaylibCallback<R extends RaylibCallback<R, D>, D extends Function> class abstract

Implementers

Constructors

RaylibCallback([String? name])

Properties

function → D
The Dart function exposed to the native side.
no setter
hashCode → int
The hash code for this object.
no setterinherited
name ↔ String
A human-readable name for this callback, used in toString and logging.
getter/setter pair
nativeFunction → MemoryPointer<RFunction<R>>
no setter
registry → Map<int, R>
The registry of live callbacks for this callback type.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

attach() → MemoryPointer<RFunction<R>>
Registers this callback and returns its function pointer.
detach([bool keepAlive = false]) → MemoryPointer<RFunction<R>>
Removes this callback from registry, optionally disposes it, and returns its function pointer.
dispose() → void
Marks this instance as disposed.
initializer() → MemoryPointer<RFunction<R>>
Backend-specific: produces the callable native pointer for function. Native: wraps a NativeCallable<C>, returns its nativeFunction cast to RVoid. Wasm: registers via addFunction(jsFunction, signature), wraps the int as a pointer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
Returns name.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

disposeRegistry(Map<int, RaylibCallback<RaylibCallback<dynamic, Function>, Function>> registry) → void
Disposes all callbacks in registry and clears it.