Events¶
Section notes in abi.h
the core slots, present since ABI v1
Slots¶
subscribe_event¶
| C | |
|---|---|
Subscribe to a LeviLamina event by id (server thread only).
| Text Only | |
|---|---|
Returns NULL on failure (unknown/ambiguous id).
- Call:
api->subscribe_event(mod, event_id, priority, cb, user) - Parameters:
- mod :
PierModHandle - event_id :
PierStr - priority :
int32_t - cb :
PierEventCb - user :
void*
- mod :
- Return type:
PierListenerHandle - Section of abi.h: the core slots, present since ABI v1
- Position in the table: slot 4, counting from 0
- Callers in each binding:
- Rust:
event::subscribe,event::subscribe_with,Wiring::arm,Wiring::arm_lenient - Go:
Subscribe - Zig:
subscribe
- Rust:
unsubscribe_event¶
| C | |
|---|---|
Remove a listener previously returned by subscribe_event. Server thread only.
- Call:
api->unsubscribe_event(mod, listener) - Parameters:
- mod :
PierModHandle - listener :
PierListenerHandle
- mod :
- Return type:
bool - Section of abi.h: the core slots, present since ABI v1
- Position in the table: slot 5, counting from 0
- Callers in each binding:
list_events¶
| C | |
|---|---|
Enumerate all currently registered event ids. Server thread only.
- Call:
api->list_events(ctx, sink) - Parameters:
- ctx :
void* - sink :
PierStrSink
- ctx :
- Section of abi.h: the core slots, present since ABI v1
- Position in the table: slot 6, counting from 0
- Callers in each binding:
- Rust:
event::list,event::exists,Host::list_events - Go:
ListEvents,Raw.ListEvents
- Rust:
Types¶
PierListenerHandle¶
| C | |
|---|---|
Opaque handle to an event listener.
PierEventCb¶
| C | |
|---|---|
Event callback.