Skip to main content

Module ffi

Module ffi 

Source
Expand description

C ABI for the 32-bit game exe. Header: include/hpl_cjk_text.h (cbindgen, checked by tests/header.rs). Rules: fixed-width types only, no panic crosses the boundary, Rust never keeps caller pointers.

Structs§

HplCjkDecodeResult
Result of hpl_cjk_decode_utf8.

Constants§

HPL_CJK_ABI_VERSION
Bumped whenever an exported signature or struct changes.
HPL_CJK_BUFFER_TOO_SMALL
dst_cap was too small; out.len holds the length needed.
HPL_CJK_NULL_POINTER
A required pointer was null.
HPL_CJK_OK
Success.
HPL_CJK_PANIC
Internal error (a caught panic).

Functions§

hpl_cjk_abi_version
hpl_cjk_break_allowed
1 if a line may break between UTF-16 code units prev and next, else 0.
hpl_cjk_decode_utf8⚠
Decodes UTF-8 into BMP-only UTF-16. dst_cap >= src_len always suffices.
hpl_cjk_is_cjk
1 if c counts as CJK for line breaking, else 0.