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

Optional projection of property tracks into schema and extension values. More...

#include "tracks.h"
#include "style_ext.h"

Data Structures

struct  rmgui_track_property_t
 Four arbitrary channel IDs. More...

Functions

int rmgui_tracks_style_field (const rmgui_tracks_t *tracks, const rmgui_track_property_t *binding, rmgui_style_snapshot_t *snapshot, const rmgui_style_field_t *field)
 Apply one field to a caller-owned paint snapshot.
int rmgui_tracks_ext_property (const rmgui_tracks_t *tracks, const rmgui_track_property_t *binding, const rmgui_style_ext_t *ext, rmgui_style_ext_resolved_t *resolved, size_t property_id, int scale_percent)
 Apply one resolved extension property.

Detailed Description

Optional projection of property tracks into schema and extension values.

Function Documentation

◆ rmgui_tracks_style_field()

int rmgui_tracks_style_field ( const rmgui_tracks_t * tracks,
const rmgui_track_property_t * binding,
rmgui_style_snapshot_t * snapshot,
const rmgui_style_field_t * field )

Apply one field to a caller-owned paint snapshot.

Integer and named-enum fields floor Q16 to an integer, rejecting values outside the row's range; colours round normalized channels to bytes. Numeric bases must fit signed Q16 integers (-32768..32767). References are resolved then replaced by a literal. NULL, non-schema rows or invalid values return -1 unchanged; 0 succeeds. Cross-field validation remains the host's responsibility.

◆ rmgui_tracks_ext_property()

int rmgui_tracks_ext_property ( const rmgui_tracks_t * tracks,
const rmgui_track_property_t * binding,
const rmgui_style_ext_t * ext,
rmgui_style_ext_resolved_t * resolved,
size_t property_id,
int scale_percent )

Apply one resolved extension property.

LENGTH channels and bases use device pixels; scale_percent (1..400) must match its resolve. Scalar bases must fit -32768..32767. INT/LENGTH and ENUM outputs are checked against the registry descriptor (length bounds scale and round like resolve). No authored state, references or descriptors change. Required NULL, missing property, invalid kind/scale/value returns -1 unchanged; 0 succeeds. Colours use the same normalized channels as style_field.