|
| enum | rmgui_skin_target_t {
RMGUI_SKIN_TARGET_BUTTON
, RMGUI_SKIN_TARGET_DROPDOWN
, RMGUI_SKIN_TARGET_SLIDER
, RMGUI_SKIN_TARGET_CHOICE
,
RMGUI_SKIN_TARGET_LIST_ROW
, RMGUI_SKIN_TARGET_TEXT_FIELD
, RMGUI_SKIN_TARGET_TAB
, RMGUI_SKIN_TARGET_WINDOW
,
RMGUI_SKIN_TARGET_CONTEXT_MENU
, RMGUI_SKIN_TARGET_PROGRESS
, RMGUI_SKIN_TARGET_SCROLLBAR
, RMGUI_SKIN_TARGET_PANEL
,
RMGUI_SKIN_TARGET_BACKDROP
, RMGUI_SKIN_TARGET_COUNT
} |
| | Independent skin targets; values do not index style classes. More...
|
| enum | rmgui_skin_part_t {
RMGUI_SKIN_PART_FACE
, RMGUI_SKIN_PART_BODY
, RMGUI_SKIN_PART_CARD
, RMGUI_SKIN_PART_TITLE
,
RMGUI_SKIN_PART_TRACK
, RMGUI_SKIN_PART_FILL
, RMGUI_SKIN_PART_THUMB
, RMGUI_SKIN_PART_INDICATOR
,
RMGUI_SKIN_PART_DECREMENT
, RMGUI_SKIN_PART_INCREMENT
, RMGUI_SKIN_PART_CLOSE
, RMGUI_SKIN_PART_MINIMIZE
,
RMGUI_SKIN_PART_MAXIMIZE
, RMGUI_SKIN_PART_RESTORE
, RMGUI_SKIN_PART_CLOSE_GLYPH
, RMGUI_SKIN_PART_MINIMIZE_GLYPH
,
RMGUI_SKIN_PART_MAXIMIZE_GLYPH
, RMGUI_SKIN_PART_RESTORE_GLYPH
, RMGUI_SKIN_PART_STRIPES
, RMGUI_SKIN_PART_SHADOW
,
RMGUI_SKIN_PART_RADIO_INDICATOR
, RMGUI_SKIN_PART_ARROW_UP
, RMGUI_SKIN_PART_ARROW_DOWN
, RMGUI_SKIN_PART_ARROW_LEFT
,
RMGUI_SKIN_PART_ARROW_RIGHT
, RMGUI_SKIN_PART_TOOLBAR = 25
, RMGUI_SKIN_PART_STATUS = 26
, RMGUI_SKIN_PART_TAB_SEGMENT_FIRST = 27
,
RMGUI_SKIN_PART_TAB_SEGMENT_LAST = 28
, RMGUI_SKIN_PART_THUMB_HORIZONTAL = 29
, RMGUI_SKIN_PART_TRACK_HORIZONTAL = 30
, RMGUI_SKIN_PART_CHECK_MARK = 31
,
RMGUI_SKIN_PART_RADIO_MARK = 32
, RMGUI_SKIN_PART_COUNT = 33
} |
| | Replaceable visual parts; text/selection marks remain element-owned. More...
|
| enum | rmgui_skin_mode_t { RMGUI_SKIN_NINE_PATCH
, RMGUI_SKIN_TILE
} |
| | Nine-patch uses physical source insets; tile repeats the full source. More...
|
| enum | rmgui_skin_tint_kind_t {
RMGUI_SKIN_TINT_NONE
, RMGUI_SKIN_TINT_LITERAL
, RMGUI_SKIN_TINT_ROLE
, RMGUI_SKIN_TINT_ROLE_RAMP
,
RMGUI_SKIN_TINT_ROLE_BEVEL
} |
| | None uses opaque white; literal and role multiply straight RGBA channels. More...
|
|
| rmgui_skin_cache_t * | rmgui_skin_cache_create (size_t byte_capacity) |
| void | rmgui_skin_cache_destroy (rmgui_skin_cache_t *cache) |
| void | rmgui_skin_cache_clear (rmgui_skin_cache_t *cache) |
| rmgui_skin_cache_t * | rmgui_skin_cache_scope (rmgui_skin_cache_t *cache) |
| int | rmgui_skin_bind (const rmgui_skin_set_t *set, const rmgui_skin_image_t *images, size_t image_count, rmgui_skin_bound_t *scratch, size_t capacity, rmgui_skin_binding_t *out, char *error, size_t error_cap) |
| | Validate sorted declarations, unique image names and source bounds, then bind without allocation.
|
| int | rmgui_style_resolve_with_skins (const rmgui_style_snapshot_t *snapshot, const rmgui_skin_binding_t *skins, rmgui_style_class_t class_id, rmgui_style_states_t states, int font_px, int scale_percent, rmgui_style_resolved_t *out) |
| | Ordinary resolution plus borrowed skin binding/colour roles.
|
| int | rmgui_skin_is_opaque (const rmgui_style_resolved_t *rs, rmgui_skin_target_t target, rmgui_skin_part_t part, rmgui_style_states_t states) |
| int | rmgui_skin_paint (rmgui_fb_t *fb, const rmgui_style_resolved_t *rs, rmgui_skin_target_t target, rmgui_skin_part_t part, rmgui_style_states_t states, rmgui_rect_t dst, rmgui_rect_t clip, int origin_x, int origin_y) |
| | Paint the normalized target/part/state with nearest permitted tier.
|
| int | rmgui_skin_paint_to (rmgui_target_t *, const rmgui_style_resolved_t *, rmgui_skin_target_t, rmgui_skin_part_t, rmgui_style_states_t, rmgui_rect_t, rmgui_rect_t, int, int) |
| | Explicit destination skin painter.
|
| int | rmgui_skin_recipe (const rmgui_style_resolved_t *, rmgui_skin_target_t, rmgui_skin_part_t, rmgui_style_states_t, int origin_x, int origin_y, struct rmgui_recipe_step *out) |
| | Lower the selected sheet part to one caller-owned image recipe layer.
|
| int | rmgui_style_decode_with_assets_kdl (const char *text, size_t length, size_t max_bytes, const rmgui_style_palette_t *palette, rmgui_style_snapshot_t *out, rmgui_style_palette_refs_t *refs_out, rmgui_skin_t *skin_scratch, size_t skin_capacity, char *skin_names, size_t skin_names_capacity, rmgui_skin_set_t *skins_out, char *error, size_t error_cap) |
| | Unified schema-2/3 decode.
|
| int | rmgui_style_decode_with_assets_and_ext_kdl (const char *text, size_t length, size_t max_bytes, const rmgui_style_palette_t *palette, rmgui_style_snapshot_t *out, rmgui_style_palette_refs_t *refs_out, const rmgui_style_kdl_skin_storage_t *skin_storage, const rmgui_style_kdl_skin_storage_t *skin_work, rmgui_skin_set_t *skins_out, rmgui_style_ext_t *ext, rmgui_style_ext_t *ext_work, char *error, size_t error_cap) |
| size_t | rmgui_style_encode_with_assets_kdl (const rmgui_style_snapshot_t *snapshot, const rmgui_style_palette_refs_t *refs, const rmgui_skin_set_t *skins, char *out, size_t capacity) |
| | Canonical schema-3 export preserving role identities and sorted declarations.
|
None uses opaque white; literal and role multiply straight RGBA channels.
ROLE_RAMP maps source luminance floor((54R+183G+19B)/256) from the role in tint.r (black endpoint) to tint_role (white endpoint), interpolating straight RGBA with halves-up /255 rounding, then multiplying source alpha. tint.g/b must be zero and tint.a must be 255. KDL: tint ramp LOW HIGH. ROLE_BEVEL uses tint.r/tint.g as an unordered pair of edge roles, ordered dark/light by (54R²+183G²+19B²)/256 in the active scheme; tint_role is the face role. Luminance 0/128/255 selects shade/face/highlight, with linear halves-up RGBA interpolation between stops; source alpha still multiplies. tint.b must be zero and tint.a must be 255. KDL: tint bevel EDGE FACE EDGE.
| Enumerator |
|---|
| RMGUI_SKIN_TINT_NONE | |
| RMGUI_SKIN_TINT_LITERAL | |
| RMGUI_SKIN_TINT_ROLE | |
| RMGUI_SKIN_TINT_ROLE_RAMP | |
| RMGUI_SKIN_TINT_ROLE_BEVEL | |
Validate sorted declarations, unique image names and source bounds, then bind without allocation.
Only caller capacity limits the entry count. Returns 0/-1; out is unchanged on error, scratch unspecified. NULL storage is permitted only for empty tables. Scratch must not alias a published binding. Names, declarations and sheets are borrowed read-only and must remain alive; sheets must not alias painting destination storage.
Paint the normalized target/part/state with nearest permitted tier.
State priority is DISABLED, PRESSED, HOVER, SELECTED, FOCUSED, DEFAULT; INACTIVE is independent. Never inherit another state/part. SELECTED overrides HOVER/PRESSED only when its matching entry is a nine-patch with non-zero insets. Missing, tile and zero-inset selected art retain interaction art. For enabled SELECTED controls, compose at most one matching nine-patch perimeter: PRESSED, otherwise FOCUSED, otherwise HOVER. The selected interior is untouched by perimeter composition. Each disjoint outer destination band's width is its scaled source inset capped at two logical pixels (rounded to device pixels, minimum cap one); opposing bands shrink proportionally when the destination is smaller. Physical corner-preserving caps are not perimeter widths. Tiles, zero-width bands and absent entries contribute nothing. Return 1 for present base skin (even transparent), 0 for no match, NULL inputs or empty dst/clip. Origin is absolute device px; no allocation or procedural fallback is performed. WINDOW/TOOLBAR and WINDOW/STATUS use shared chrome dst/origin and individual band clips to keep material phase continuous; painting a band changes neither geometry nor client BODY.