|
RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
|
Optional KDL frontend for caller-owned style and palette data. More...
Functions | |
| int | rmgui_style_decode_kdl (const char *text, size_t length, size_t max_bytes, rmgui_style_snapshot_t *out, char *error, size_t error_cap) |
| Decode schema-2/3 KDL, preserving authored references. | |
| size_t | rmgui_style_encode_kdl (const rmgui_style_snapshot_t *snapshot, char *out, size_t out_cap) |
| Encode canonical schema-3 KDL. | |
| int | rmgui_style_roundtrip_check (const char *text, size_t length, size_t max_bytes, const rmgui_style_snapshot_t *expected, char *error, size_t error_cap) |
| Decode with the same byte-budget convention and compare semantic values, reference identities and scheme against expected; 0 on equality, otherwise -1 with an optional bounded diagnostic. | |
| int | rmgui_style_palette_decode_kdl (const char *text, size_t length, size_t max_bytes, rmgui_style_palette_t *out, char *error, size_t error_cap) |
| Decode a schema-3 Base16 palette. | |
| size_t | rmgui_style_palette_encode_kdl (const rmgui_style_palette_t *palette, char *out, size_t capacity) |
| Encode canonical schema-3 palette KDL with snprintf-shaped output. | |
| int | rmgui_style_decode_with_ext_kdl (const char *text, size_t length, size_t max_bytes, rmgui_style_snapshot_t *out, rmgui_style_ext_t *ext, rmgui_style_ext_t *scratch, char *error, size_t error_cap) |
| Decode builtin fields and registered extension classes. | |
| size_t | rmgui_style_encode_with_ext_kdl (const rmgui_style_snapshot_t *snapshot, const rmgui_style_ext_t *ext, char *out, size_t capacity) |
| Encode builtin fields followed by extension bases and authored state overlays. | |
Optional KDL frontend for caller-owned style and palette data.
| int rmgui_style_decode_kdl | ( | const char * | text, |
| size_t | length, | ||
| size_t | max_bytes, | ||
| rmgui_style_snapshot_t * | out, | ||
| char * | error, | ||
| size_t | error_cap ) |
Decode schema-2/3 KDL, preserving authored references.
max_bytes is the caller's input-byte budget; zero selects RMGUI_STYLE_DEFAULT_MAX_BYTES. Success returns 0. Failure returns -1, leaves out untouched, and writes an optional bounded diagnostic. text and out must be non-NULL.
| size_t rmgui_style_encode_kdl | ( | const rmgui_style_snapshot_t * | snapshot, |
| char * | out, | ||
| size_t | out_cap ) |
Encode canonical schema-3 KDL.
Return required bytes excluding NUL, writing a truncated NUL-terminated prefix when out and out_cap permit. Invalid snapshots return 0 and empty the supplied buffer.
| int rmgui_style_roundtrip_check | ( | const char * | text, |
| size_t | length, | ||
| size_t | max_bytes, | ||
| const rmgui_style_snapshot_t * | expected, | ||
| char * | error, | ||
| size_t | error_cap ) |
Decode with the same byte-budget convention and compare semantic values, reference identities and scheme against expected; 0 on equality, otherwise -1 with an optional bounded diagnostic.
| int rmgui_style_palette_decode_kdl | ( | const char * | text, |
| size_t | length, | ||
| size_t | max_bytes, | ||
| rmgui_style_palette_t * | out, | ||
| char * | error, | ||
| size_t | error_cap ) |
Decode a schema-3 Base16 palette.
All sixteen slots are required. The byte budget and transactional failure conventions match style decoding.
| size_t rmgui_style_palette_encode_kdl | ( | const rmgui_style_palette_t * | palette, |
| char * | out, | ||
| size_t | capacity ) |
Encode canonical schema-3 palette KDL with snprintf-shaped output.
Invalid palettes return 0 and empty the supplied buffer.
| int rmgui_style_decode_with_ext_kdl | ( | const char * | text, |
| size_t | length, | ||
| size_t | max_bytes, | ||
| rmgui_style_snapshot_t * | out, | ||
| rmgui_style_ext_t * | ext, | ||
| rmgui_style_ext_t * | scratch, | ||
| char * | error, | ||
| size_t | error_cap ) |
Decode builtin fields and registered extension classes.
Extension syntax is class "name" { property value; state hover { property value; } }. scratch must be initialized with disjoint caller storage large enough for ext's registered records; its contents may change on failure. out and ext remain unchanged on every failure. Input must not alias mutable storage. Extension identifiers and enum names are matched against borrowed registered descriptors without a frontend-imposed name-length limit. max_bytes follows the same convention as rmgui_style_decode_kdl.
| size_t rmgui_style_encode_with_ext_kdl | ( | const rmgui_style_snapshot_t * | snapshot, |
| const rmgui_style_ext_t * | ext, | ||
| char * | out, | ||
| size_t | capacity ) |
Encode builtin fields followed by extension bases and authored state overlays.
The same snprintf-shaped output/refusal convention applies.