Client¶
Section notes in abi.h
Capability group: client (client_*). All NULL on a server host.
Two capability groups follow, client and dimensions. They are unconditionally present in the layout; when the capability package was not built into the host, their slots are NULL (see the file header). New slots still go at the real end of the struct, never inside a capability group.
Every callback fires on the client thread.
Slots¶
client_get_local_player¶
| C | |
|---|---|
Local player's name via ll::service::getClientInstance()->getLocalPlayer(). sink receives the name, or the call returns false if not in a level.
- Call:
api->client_get_local_player(ctx, sink) - Parameters:
- ctx :
void* - sink :
PierStrSink
- ctx :
- Return type:
bool - Section of abi.h: Capability group: client (client_*). All NULL on a server host.
- Position in the table: slot 140, counting from 0
- Callers in each binding:
client_is_in_level¶
| C | |
|---|---|
True when the client is inside a level (a world is loaded).
- Call:
api->client_is_in_level() - Return type:
bool - Section of abi.h: Capability group: client (client_*). All NULL on a server host.
- Position in the table: slot 141, counting from 0
- Callers in each binding:
client_get_screen_name¶
| C | |
|---|---|
Current screen / UI name (e.g. "hud_screen", "pause_screen"). NULL on every current host, client builds included: the engine exposes no stable accessor for it.
- Call:
api->client_get_screen_name(ctx, sink) - Parameters:
- ctx :
void* - sink :
PierStrSink
- ctx :
- Return type:
bool - Section of abi.h: Capability group: client (client_*). All NULL on a server host.
- Position in the table: slot 142, counting from 0
- Callers in each binding:
- Rust:
client::screen_name - Go:
Raw.ClientGetScreenName
- Rust:
client_register_key¶
| C | |
|---|---|
Register a key binding via ll::input::KeyRegistry::getOrCreateKey. Returns NULL on failure. The handle is owned by the caller; drop with client_unregister_key. down_cb/up_cb fire on the client thread.
- Call:
api->client_register_key(mod, name, key_codes, key_count, allow_remap, down_cb, up_cb, user) - Parameters:
- mod :
PierModHandle - name :
PierStr - key_codes :
int32_t const* - key_count :
int32_t - allow_remap :
bool - down_cb :
PierKeyCb - up_cb :
PierKeyCb - user :
void*
- mod :
- Return type:
PierKeyHandle - Section of abi.h: Capability group: client (client_*). All NULL on a server host.
- Position in the table: slot 143, counting from 0
- Callers in each binding:
- Rust:
client::register_key - Go:
RegisterKey
- Rust:
client_unregister_key¶
| C | |
|---|---|
Unregister a key binding: this mod's handler stops firing and the handle is freed. The ll::input::KeyHandle itself is not destroyed, since the key registry keeps one key per name and offers no removal; registering the same name again reuses that key.
- Call:
api->client_unregister_key(handle) - Parameters:
- handle :
PierKeyHandle
- handle :
- Return type:
bool - Section of abi.h: Capability group: client (client_*). All NULL on a server host.
- Position in the table: slot 144, counting from 0
- Callers in each binding:
client_get_key_codes¶
| C | |
|---|---|
Currently assigned key codes (may differ from defaults if remapped). sink receives a JSON-style array string "[1,2,3]".
- Call:
api->client_get_key_codes(handle, ctx, sink) - Parameters:
- handle :
PierKeyHandle - ctx :
void* - sink :
PierStrSink
- handle :
- Return type:
bool - Section of abi.h: Capability group: client (client_*). All NULL on a server host.
- Position in the table: slot 145, counting from 0
- Callers in each binding:
- Rust:
KeyBinding::key_codes - Go:
Raw.ClientGetKeyCodes
- Rust:
Types¶
PierKeyHandle¶
| C | |
|---|---|
Opaque handle to a registered key binding owned by the loader's ll::input::KeyRegistry. Drop via client_unregister_key.
PierKeyAction¶
| C | |
|---|---|
Key action: 0 = released (up), 1 = pressed (down). Mirrors ll::event::KeyInputEvent::Action.
PierFocusImpact¶
| C | |
|---|---|
Focus impact level: 0=Neutral 1=ActivateFocus 2=DeactivateFocus. Mirrors ::FocusImpact.
PierKeyCb¶
| C | |
|---|---|
Callback for key press/release events. Runs on the client thread. user β pointer passed to client_register_key action β 0=released 1=pressed (see PierKeyAction) impact β current focus impact (see PierFocusImpact)