|
RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
|
rmgui.h — umbrella header of the RMGui retained-mode UI library. More...
Macros | |
| #define | RMGUI_VERSION_MAJOR 0 |
| Version of the headers being compiled against. | |
| #define | RMGUI_VERSION_MINOR 15 |
| #define | RMGUI_VERSION_PATCH 0 |
| #define | RMGUI_VERSION_STRING "0.15.0" |
| #define | RMGUI_ABI_VERSION 15 |
| Binary interface generation: bumped whenever a public type's layout or a public function's signature changes incompatibly, or a public symbol is removed. | |
Functions | |
| const char * | rmgui_version (void) |
| The version the linked archive was built as: a static NUL-terminated "MAJOR.MINOR.PATCH" string, never NULL. | |
| int | rmgui_abi_version (void) |
| The ABI generation the linked archive was built as. | |
rmgui.h — umbrella header of the RMGui retained-mode UI library.
Including this header declares the whole public surface: the core modules (geometry, input events, framebuffer, drawing and coverage masks, bytes-in fonts and PNG images, text flow, the style schema and KDL codec, scrolling, the layout kernel, focus and the shared painters), the elements (button, image button, choice, slider, list row, dropdown, tab, field, context menu, section, window frame, docking and chart painters) and the effects (motion, element motion, layer, particle, backdrop, patterns and emboss), plus bounded GLB scenes, animation and the optional CPU cel mesh painter. Every public symbol is prefixed rmgui_ (RMGUI_ for macros and enum constants), and each header is also self-contained on its own. Consumers include it as <rmgui/rmgui.h> and link librmgui.a libckdl.a -lm, in that order. The headers are C11 (not C++); each target's rmgui.target names any further flags its consumers need (the wasm-eh target: -fwasm-exceptions -sSUPPORT_LONGJMP=wasm).
One return convention holds across the surface; rects, colors and sizes (geom.h) pass by value. A fallible operation returns 0 on success and -1 when refused, leaving every out-parameter and object argument unchanged; mesh operations additionally distinguish documented negative error codes. A mutator that cannot fail returns 1 when it changed state and 0 when it did not. Predicates are named rmgui_<module>is<adjective>, rmgui_<module>has<noun> or rmgui_<module>_contains and return 1 or 0. A query returns its value (NULL or a documented empty value when there is none); a query whose results are only out-parameters is fallible, 0/-1. A NULL where a pointer is required is a refusal (a no-op for functions returning nothing), never a crash, except where a function's header states a precondition.
Fonts are bytes-in: the library has no filesystem loader and never searches for a font. The caller supplies rmgui_font_init with trusted, complete, already-validated TrueType bytes; the rasterizer (stb_truetype, compiled private to the archive) is not hardened against hostile font data and the byte length does not bound its reads (see font.h).
Images are bytes-in too: a caller-owned codec registry (image.h) sniffs trusted PNG, JPEG or WebP bytes and returns a straight-alpha RGBA8 framebuffer, within limits the caller passes per call (documented defaults apply to NULL). The decoders (stb_image for PNG and JPEG, compiled private to the archive, and the in-house WebP decoder) are not hardened against hostile data: the limits bound the declared image, not what a crafted compressed stream can make a decoder allocate (see image.h).
A package built from a subset of the modules (see rmgui.mk) installs only their headers; each include below is taken when its header is installed.
Optional GPU declarations require the host's Sokol types first. Defining RMGUI_NATIVE_GPU to zero omits the native declarations from this umbrella.
| #define RMGUI_VERSION_MAJOR 0 |
Version of the headers being compiled against.
While MAJOR is 0, MINOR equals RMGUI_ABI_VERSION; a change that keeps the ABI bumps only PATCH.
| #define RMGUI_VERSION_MINOR 15 |
| #define RMGUI_VERSION_PATCH 0 |
| #define RMGUI_VERSION_STRING "0.15.0" |
| #define RMGUI_ABI_VERSION 15 |
Binary interface generation: bumped whenever a public type's layout or a public function's signature changes incompatibly, or a public symbol is removed.
Headers and archive agree exactly when rmgui_abi_version() == RMGUI_ABI_VERSION.
| const char * rmgui_version | ( | void | ) |
The version the linked archive was built as: a static NUL-terminated "MAJOR.MINOR.PATCH" string, never NULL.
| int rmgui_abi_version | ( | void | ) |
The ABI generation the linked archive was built as.