Impossible SDK

Reference

ui/template.h

Compiled WinUI control template tables. Portable, no floats, no OS calls.

im_icon_id

Portable SDK icon identifiers mapped from WinUI SymbolThemeFontFamily glyphs.

ui/template.h, line 9
typedef enum im_icon_id {
    IM_ICON_NONE = 0,
    IM_ICON_DISMISS,
    IM_ICON_CHECKMARK,
    IM_ICON_COUNT
} im_icon_id;

im_element_kind

Element kinds supported by compiled WinUI control templates.

ui/template.h, line 17
typedef enum im_element_kind {
    IM_ELEM_GRID = 0,
    IM_ELEM_BORDER,
    IM_ELEM_CONTENT_PRESENTER,
    IM_ELEM_RECTANGLE,
    IM_ELEM_TEXT_BLOCK,
    IM_ELEM_BUTTON,
    IM_ELEM_SCROLL_VIEWER,
    IM_ELEM_THUMB,
    IM_ELEM_FONT_ICON,
    IM_ELEM_LIST_VIEW_ITEM_PRESENTER,
    IM_ELEM_ITEMS_STACK_PANEL,
    IM_ELEM_ITEMS_PRESENTER,
    IM_ELEM_ROW_DEFINITION,
    IM_ELEM_COLUMN_DEFINITION,
    IM_ELEM_TRANSLATE_TRANSFORM,
    IM_ELEM_SCALE_TRANSFORM,
    IM_ELEM_COMPOSITE_TRANSFORM,
    IM_ELEM_RECTANGLE_GEOMETRY,
    IM_ELEM_BRUSH_TRANSITION,
    IM_ELEM_ADD_DELETE_THEME_TRANSITION,
    IM_ELEM_CONTENT_THEME_TRANSITION,
    IM_ELEM_REORDER_THEME_TRANSITION,
    IM_ELEM_ENTRANCE_THEME_TRANSITION,
    IM_ELEM_STACK_PANEL,
    IM_ELEM_COUNT
} im_element_kind;

im_value_kind

Discriminator for a compiled template property, setter or keyframe value.

ui/template.h, line 46
typedef enum im_value_kind {
    IM_TVAL_NONE = 0,
    IM_TVAL_BRUSH,
    IM_TVAL_COLOR,
    IM_TVAL_THEME_VALUE,
    IM_TVAL_FIXED,
    IM_TVAL_POINT,
    IM_TVAL_QUAD,
    IM_TVAL_BOOL,
    IM_TVAL_INT,
    IM_TVAL_DURATION_MS,
    IM_TVAL_SPLINE,
    IM_TVAL_ICON,
    IM_TVAL_ICON_FONT,
    IM_TVAL_TEMPLATE_BINDING,
    IM_TVAL_BINDING,
    IM_TVAL_ENUM_STR,
    IM_TVAL_NULL,
    IM_TVAL_NESTED_TEMPLATE
} im_value_kind;

im_binding_source

Binding source for IM_TVAL_BINDING values (stored in value.a).

ui/template.h, line 68
typedef enum im_binding_source {
    IM_BIND_DATA = 0,
    IM_BIND_TEMPLATED_PARENT
} im_binding_source;

im_binding_mode

Binding mode for IM_TVAL_BINDING values (stored in value.b).

ui/template.h, line 74
typedef enum im_binding_mode {
    IM_BIND_ONE_WAY = 0,
    IM_BIND_TWO_WAY,
    IM_BIND_ONE_TIME
} im_binding_mode;

im_anim_direction

Direction for directional theme animations (e.g. DragOverThemeAnimation).

ui/template.h, line 81
typedef enum im_anim_direction {
    IM_DIR_NONE = 0,
    IM_DIR_LEFT,
    IM_DIR_RIGHT,
    IM_DIR_TOP,
    IM_DIR_BOTTOM
} im_anim_direction;

im_anim_kind

Storyboard animation kinds compiled from WinUI visual states and transitions.

ui/template.h, line 90
typedef enum im_anim_kind {
    IM_ANIM_OBJECT_KEYFRAMES = 0,
    IM_ANIM_DOUBLE,
    IM_ANIM_DOUBLE_KEYFRAMES,
    IM_ANIM_COLOR_KEYFRAMES,
    IM_ANIM_REPOSITION_THEME,
    IM_ANIM_FADE_IN_THEME,
    IM_ANIM_FADE_OUT_THEME,
    IM_ANIM_DRAG_ITEM_THEME,
    IM_ANIM_DRAG_OVER_THEME,
    IM_ANIM_DROP_TARGET_THEME
} im_anim_kind;

im_keyframe_kind

Keyframe interpolation kinds inside keyframe animations.

ui/template.h, line 104
typedef enum im_keyframe_kind {
    IM_KF_DISCRETE = 0,
    IM_KF_LINEAR_DOUBLE,
    IM_KF_SPLINE_DOUBLE,
    IM_KF_EASING_DOUBLE,
    IM_KF_LINEAR_COLOR
} im_keyframe_kind;

im_template_value

A typed value stored inside a compiled template table.

ui/template.h, line 113
typedef struct im_template_value {
    im_value_kind kind;
    int32_t a, b, c, d;
    const char *text;
    const char *fallback;
} im_template_value;

im_template_prop

One named property on a compiled template element.

ui/template.h, line 121
typedef struct im_template_prop {
    const char *name;
    im_template_value value;
} im_template_prop;

im_template_element

One element in a compiled template tree (pre-order; parent == -1 for root).

ui/template.h, line 127
typedef struct im_template_element {
    im_element_kind kind;
    const char *name;
    int32_t parent;
    uint16_t prop_start;
    uint16_t prop_count;
} im_template_element;

im_template_setter

One style setter or visual-state setter (target is NULL on style setters).

ui/template.h, line 136
typedef struct im_template_setter {
    const char *target;
    const char *property;
    im_template_value value;
} im_template_setter;

im_template_keyframe

One keyframe in a keyframe animation (key_time_ms in ms, spline in 16.16 fixed point).

ui/template.h, line 143
typedef struct im_template_keyframe {
    im_keyframe_kind kind;
    uint32_t key_time_ms;
    im_template_value value;
    im_fixed spline[4];
} im_template_keyframe;

im_template_anim

One animation entry inside a visual state or transition storyboard.

ui/template.h, line 151
typedef struct im_template_anim {
    im_anim_kind kind;
    const char *target_name;
    const char *target_property;
    uint32_t duration_ms;
    im_anim_direction direction;
    bool has_from;
    bool has_from_y;
    bool has_to;
    im_template_value from_val;
    im_template_value from_y_val;
    im_template_value to_val;
    uint16_t kf_start;
    uint16_t kf_count;
} im_template_anim;

im_template_state

One named visual state within a visual state group.

ui/template.h, line 168
typedef struct im_template_state {
    const char *name;
    uint16_t setter_start;
    uint16_t setter_count;
    uint16_t anim_start;
    uint16_t anim_count;
} im_template_state;

im_template_transition

One visual transition between states within a visual state group.

ui/template.h, line 177
typedef struct im_template_transition {
    const char *from_state;
    const char *to_state;
    uint32_t duration_ms;
    uint16_t anim_start;
    uint16_t anim_count;
} im_template_transition;

im_template_group

One visual state group owned by a compiled template.

ui/template.h, line 186
typedef struct im_template_group {
    const char *name;
    uint16_t state_start;
    uint16_t state_count;
    uint16_t trans_start;
    uint16_t trans_count;
} im_template_group;

im_template

Top-level compiled control style and template descriptor.

ui/template.h, line 195
typedef struct im_template {
    const char *key;
    const char *target_type;
    uint16_t style_setter_start;
    uint16_t style_setter_count;
    uint16_t elem_start;
    uint16_t elem_count;
    uint16_t group_start;
    uint16_t group_count;
} im_template;
GeneratedMade from ui/template.hPublished from c4737ad