RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
Loading...
Searching...
No Matches
skin_builtin.h File Reference
#include "skin.h"

Typedefs

typedef struct rmgui_skin_builtin rmgui_skin_builtin_t

Functions

size_t rmgui_skin_builtin_count (void)
const char * rmgui_skin_builtin_name (size_t index)
rmgui_skin_builtin_t * rmgui_skin_builtin_create (const char *name, const rmgui_style_snapshot_t *snapshot, char *error, size_t error_cap)
rmgui_skin_builtin_t * rmgui_skin_builtin_create_scaled (const char *name, const rmgui_style_snapshot_t *snapshot, int scale_percent, char *error, size_t error_cap)
const rmgui_skin_set_t * rmgui_skin_builtin_declarations (const rmgui_skin_builtin_t *provider)
const rmgui_skin_binding_t * rmgui_skin_builtin_binding (const rmgui_skin_builtin_t *provider)
void rmgui_skin_builtin_destroy (rmgui_skin_builtin_t *provider)

Typedef Documentation

◆ rmgui_skin_builtin_t

typedef struct rmgui_skin_builtin rmgui_skin_builtin_t
  • Immutable owner of procedural widget/chrome declarations, binding, names, and RGBA sheets. Entry/name allocations match the authored inventory, not a library-wide capacity. Independent creation is reentrant; sharing read-only borrows requires externally synchronized destruction. No input is retained.

Function Documentation

◆ rmgui_skin_builtin_count()

size_t rmgui_skin_builtin_count ( void )
  • Number of stable built-in identifiers: experience, lion, flat-hairline, remix, in that order. Enumeration allocates nothing.

◆ rmgui_skin_builtin_name()

const char * rmgui_skin_builtin_name ( size_t index)
  • Static identifier at index, or NULL when index is out of range.

◆ rmgui_skin_builtin_create()

rmgui_skin_builtin_t * rmgui_skin_builtin_create ( const char * name,
const rmgui_style_snapshot_t * snapshot,
char * error,
size_t error_cap )
  • Create the 100/150/200 percent tiers for a known identifier and valid non-NULL snapshot. Resolving above 200 resamples the 200 tier; use rmgui_skin_builtin_create_scaled to generate the scale's own tier. Returns NULL on invalid input or allocation/generation refusal, optionally writing a NUL-terminated diagnostic to error when error_cap is nonzero. Inputs are borrowed only during this call. No I/O or global style mutation. Resolve using matching snapshot role colours; metric-only edits may reuse artwork. Role edits require an explicitly created replacement owner.

Lion and Experience keep the indicator chrome and selected marks in separate parts, rasterized with antialiasing at each generated tier. With Aqua, Lion uses a dark check and shaded blue radio dot; with Aero, Experience uses a slate-blue check and dot. Other built-ins keep the procedural selected marks.

◆ rmgui_skin_builtin_create_scaled()

rmgui_skin_builtin_t * rmgui_skin_builtin_create_scaled ( const char * name,
const rmgui_style_snapshot_t * snapshot,
int scale_percent,
char * error,
size_t error_cap )
  • As rmgui_skin_builtin_create, except that for scale_percent in 50..400 the tier nearest it (below 125 the first, below 175 the second, otherwise the third) is generated natively at exactly scale_percent, so resolving at that scale resamples no artwork and the art's rounded ring meets the edges rmgui_window_frame_arrange lays out at that scale. Sheet names keep identifying the three tier slots, not their percentages. Other scale_percent values give the 100/150/200 tiers.

◆ rmgui_skin_builtin_declarations()

const rmgui_skin_set_t * rmgui_skin_builtin_declarations ( const rmgui_skin_builtin_t * provider)
  • Borrow the immutable declarations until destruction; NULL owner gives NULL. This getter performs no generation, allocation, or copying.

◆ rmgui_skin_builtin_binding()

const rmgui_skin_binding_t * rmgui_skin_builtin_binding ( const rmgui_skin_builtin_t * provider)
  • Borrow the immutable bound table until destruction; NULL owner gives NULL. Enumerate entries' declaration->sheet names and sheet framebuffer pointers to discover every sheet; entries need not share a framebuffer. This getter performs no generation, allocation, or copying.

◆ rmgui_skin_builtin_destroy()

void rmgui_skin_builtin_destroy ( rmgui_skin_builtin_t * provider)
  • Release an owner; NULL is harmless. Before destruction retire all resolved styles, RECORD streams by submit/discard, and native source borrows by consume/cancel, then clear sprite caches borrowing its sheets. Replacement creation may fail without affecting the current owner; publish only after preparation succeeds and retire old borrows before freeing the old owner.