essence-os/util/designer/designer.rf

432 lines
17 KiB
Plaintext

type StyleColor_Type StyleColorOp;
type StyleString_Type StyleStringOp;
type StyleBool_Type StyleBoolOp;
type StyleArray_Type StyleArrayOp;
type StyleFloat_Type StyleFloatOp;
type StyleI8_Type StyleI8Op;
type StyleI16_Type StyleI16Op;
struct Property Property_Type PropertyOp {
rfNone "uint32_t *" path;
rfData RfData data;
};
struct Rectangle8 Rectangle8_Type Rectangle8Op {
StyleI8_Type int8_t l;
StyleI8_Type int8_t r;
StyleI8_Type int8_t t;
StyleI8_Type int8_t b;
};
struct Rectangle16 Rectangle16_Type Rectangle16Op {
StyleI16_Type int16_t l;
StyleI16_Type int16_t r;
StyleI16_Type int16_t t;
StyleI16_Type int16_t b;
};
struct Corners8 Corners8_Type Corners8Op {
StyleI8_Type int8_t tl;
StyleI8_Type int8_t tr;
StyleI8_Type int8_t bl;
StyleI8_Type int8_t br;
};
struct Gaps8 Gaps8_Type Gaps8Op {
StyleI8_Type int8_t major;
StyleI8_Type int8_t minor;
StyleI8_Type int8_t wrap;
};
struct Size16 Size16_Type Size16Op {
StyleI16_Type int16_t width;
StyleI16_Type int16_t height;
};
struct PaintSolid PaintSolid_Type PaintSolidOp {
StyleColor_Type uint32_t color #StringOption { "Color" };
};
struct PaintOverwrite PaintOverwrite_Type PaintOverwriteOp {
StyleColor_Type uint32_t color #StringOption { "Color" };
};
struct GradientStop GradientStop_Type GradientStopOp {
StyleColor_Type uint32_t color #StringOption { "Color" };
StyleI8_Type int8_t position #StringOption { "Position" };
};
enum GradientRepeat_Type StyleEnumOp {
GRADIENT_REPEAT_CLAMP #StringOption { "Clamp" };
GRADIENT_REPEAT_NORMAL #StringOption { "Normal" };
GRADIENT_REPEAT_MIRROR #StringOption { "Mirror" };
};
struct PaintLinearGradient PaintLinearGradient_Type PaintLinearGradientOp {
Rectangle16_Type Rectangle16 range #StringOption { "Range" } to 6;
StyleBool_Type bool useGammaInterpolation #StringOption { "Use gamma-accurate color interpolation" };
StyleArray_Type "GradientStop *" stops #RfItem { &GradientStop_Type, sizeof(GradientStop), &(StringOption) { "Stops: " } };
StyleBool_Type bool useDithering #StringOption { "Use dithering" } from 4;
GradientRepeat_Type uint8_t repeat #StringOption { "Repeat mode" } from 5;
StyleFloat_Type float transformX #StringOption { "Transform X" } from 6;
StyleFloat_Type float transformY #StringOption { "Transform Y" } from 6;
StyleFloat_Type float transformStart #StringOption { "Transform start" } from 6;
StyleBool_Type bool useSystemHue #StringOption { "Use system hue" } from 20;
StyleBool_Type bool _unused #StringOption { "_unused" } from 21;
};
struct PaintRadialGradient PaintRadialGradient_Type PaintRadialGradientOp {
StyleBool_Type bool useGammaInterpolation #StringOption { "Use gamma-accurate color interpolation" };
StyleArray_Type "GradientStop *" stops #RfItem { &GradientStop_Type, sizeof(GradientStop), &(StringOption) { "Stops: " } };
GradientRepeat_Type uint8_t repeat #StringOption { "Repeat mode" };
StyleFloat_Type float transform0 #StringOption { "Transform X scale" };
StyleFloat_Type float transform2 #StringOption { "Transform X offset" };
StyleFloat_Type float transform4 #StringOption { "Transform Y scale" };
StyleFloat_Type float transform5 #StringOption { "Transform Y offset" };
StyleFloat_Type float transform1 #StringOption { "Transform X skew" } from 8;
StyleFloat_Type float transform3 #StringOption { "Transform Y skew" } from 8;
};
struct Paint Paint_Type StyleUnionOp {
rfU32 uint32_t tag;
PaintSolid_Type PaintSolid solid #StringOption { "Solid" };
PaintLinearGradient_Type PaintLinearGradient linearGradient #StringOption { "Linear gradient" };
PaintOverwrite_Type PaintOverwrite overwrite #StringOption { "Overwrite" } from 2;
PaintRadialGradient_Type PaintRadialGradient radialGradient #StringOption { "Radial gradient" } from 7;
};
struct LayerBox LayerBox_Type LayerBoxOp {
Rectangle8_Type Rectangle8 borders #StringOption { "Borders" };
Corners8_Type Corners8 corners #StringOption { "Corners" };
Paint_Type Paint mainPaint #StringOption { "Main paint" };
Paint_Type Paint borderPaint #StringOption { "Border paint" };
StyleBool_Type bool blurred #StringOption { "Blurred" };
StyleBool_Type bool autoCorners #StringOption { "Auto corners" };
StyleBool_Type bool autoBorders #StringOption { "Auto borders" };
StyleBool_Type bool shadowHiding #StringOption { "Shadow hiding" };
StyleBool_Type bool shadowCut #StringOption { "Shadow cut (obsolete)" } from 13;
};
enum ClipMode_Type StyleEnumOp {
CLIP_MODE_ENABLED #StringOption { "Enabled" };
CLIP_MODE_DISABLED #StringOption { "Disabled" };
};
enum Cursor_Type StyleEnumOp {
CURSOR_NORMAL #StringOption { "Normal" };
CURSOR_TEXT #StringOption { "Text" };
CURSOR_RESIZE_VERTICAL #StringOption { "Resize vertical" };
CURSOR_RESIZE_HORIZONTAL #StringOption { "Resize horizontal" };
CURSOR_RESIZE_DIAGONAL_1 #StringOption { "Diagonal 1" };
CURSOR_RESIZE_DIAGONAL_2 #StringOption { "Diagonal 2" };
CURSOR_SPLIT_VERTICAL #StringOption { "Split vertical" };
CURSOR_SPLIT_HORIZONTAL #StringOption { "Split horizontal" };
CURSOR_HAND_HOVER #StringOption { "Hand hover" };
CURSOR_HAND_DRAG #StringOption { "Hand drag" };
CURSOR_HAND_POINT #StringOption { "Hand point" };
CURSOR_SCROLL_UP_LEFT #StringOption { "Scroll up-left" };
CURSOR_SCROLL_UP #StringOption { "Scroll up" };
CURSOR_SCROLL_UP_RIGHT #StringOption { "Scroll up-right" };
CURSOR_SCROLL_LEFT #StringOption { "Scroll left" };
CURSOR_SCROLL_CENTER #StringOption { "Scroll center" };
CURSOR_SCROLL_RIGHT #StringOption { "Scroll right" };
CURSOR_SCROLL_DOWN_LEFT #StringOption { "Scroll down-left" };
CURSOR_SCROLL_DOWN #StringOption { "Scroll down" };
CURSOR_SCROLL_DOWN_RIGHT #StringOption { "Scroll down-right" };
CURSOR_SELECT_LINES #StringOption { "Select lines" };
CURSOR_DROP_TEXT #StringOption { "Drop text" };
CURSOR_CROSS_HAIR_PICK #StringOption { "Cross hair pick" };
CURSOR_CROSS_HAIR_RESIZE #StringOption { "Cross hair resize" };
CURSOR_MOVE_HOVER #StringOption { "Move hover" };
CURSOR_MOVE_DRAG #StringOption { "Move drag" };
CURSOR_ROTATE_HOVER #StringOption { "Rotate hover" };
CURSOR_ROTATE_DRAG #StringOption { "Rotate drag" };
CURSOR_BLANK #StringOption { "Blank" };
};
enum Transition_Type StyleEnumOp {
TRANSITION_NONE #StringOption { "None" };
TRANSITION_SLIDE_UP #StringOption { "Slide up" };
TRANSITION_SLIDE_DOWN #StringOption { "Slide down" };
TRANSITION_COVER_UP #StringOption { "Cover up" };
TRANSITION_COVER_DOWN #StringOption { "Cover down" };
TRANSITION_SQUISH_UP #StringOption { "Squish up" };
TRANSITION_SQUISH_DOWN #StringOption { "Squish down" };
TRANSITION_REVEAL_UP #StringOption { "Reveal up" };
TRANSITION_REVEAL_DOWN #StringOption { "Reveal down" };
TRANSITION_ZOOM_OUT #StringOption { "Zoom out" };
TRANSITION_ZOOM_IN #StringOption { "Zoom in" };
TRANSITION_ZOOM_OUT_LIGHT #StringOption { "Zoom out (light)" };
TRANSITION_ZOOM_IN_LIGHT #StringOption { "Zoom in (light)" };
TRANSITION_FADE_OUT #StringOption { "Fade out" };
TRANSITION_FADE_IN #StringOption { "Fade in" };
};
enum Align_Type StyleEnumOp {
ALIGN_START #StringOption { "Start" };
ALIGN_CENTER #StringOption { "Center" };
ALIGN_END #StringOption { "End" };
};
enum FontFamily_Type StyleEnumOp {
FONT_FAMILY_SANS #StringOption { "Sans" };
FONT_FAMILY_SERIF #StringOption { "Serif" };
FONT_FAMILY_MONO #StringOption { "Mono" };
};
struct LayerMetrics LayerMetrics_Type LayerMetricsOp {
Rectangle8_Type Rectangle8 insets #StringOption { "Insets" };
ClipMode_Type uint32_t clipEnabled #StringOption { "Clipping: " };
Rectangle8_Type Rectangle8 clipInsets #StringOption { "Clip insets" };
Size16_Type Size16 preferredSize #StringOption { "Preferred size" };
Size16_Type Size16 minimumSize #StringOption { "Minimum size" };
Size16_Type Size16 maximumSize #StringOption { "Maximum size" };
Gaps8_Type Gaps8 gaps #StringOption { "Gaps" };
Cursor_Type uint32_t cursor #StringOption { "Cursor" };
Transition_Type uint32_t entranceTransition #StringOption { "Entrance transition" };
StyleI16_Type int16_t entranceDuration #StringOption { "Entrance duration (ms)" };
Transition_Type uint32_t exitTransition #StringOption { "Exit transition" };
StyleI16_Type int16_t exitDuration #StringOption { "Exit duration (ms)" };
Rectangle8_Type Rectangle8 globalOffset #StringOption { "Global offset" };
Align_Type uint32_t textVerticalAlign #StringOption { "Text vertical align: " };
Align_Type uint32_t textHorizontalAlign #StringOption { "Text horizontal align: " };
StyleI8_Type int8_t textSize #StringOption { "Font size" };
FontFamily_Type uint32_t fontFamily #StringOption { "Font family: " };
StyleI8_Type int8_t fontWeight #StringOption { "Font weight" };
StyleBool_Type bool italic #StringOption { "Italic" };
StyleBool_Type bool wrapText #StringOption { "Wrap text" };
StyleBool_Type bool ellipsis #StringOption { "Ellipsis" };
StyleColor_Type uint32_t textColor #StringOption { "Text color" };
StyleColor_Type uint32_t selectedBackground #StringOption { "Selected background" };
StyleColor_Type uint32_t selectedText #StringOption { "Selected text" };
StyleI8_Type int8_t iconSize #StringOption { "Icon size" };
StyleColor_Type uint32_t iconColor #StringOption { "Icon color" };
StyleString_Type RfData inheritText #StringOption { "Inherit text properties from:" } from 11;
};
struct LayerText LayerText_Type LayerTextOp {
StyleColor_Type uint32_t color #StringOption { "Color" };
StyleI8_Type int8_t blur #StringOption { "Blur radius" };
};
struct PathPoint PathPoint_Type PathPointOp {
StyleFloat_Type float x0 #StringOption { "x0" };
StyleFloat_Type float y0 #StringOption { "y0" };
StyleFloat_Type float x1 #StringOption { "x1" };
StyleFloat_Type float y1 #StringOption { "y1" };
StyleFloat_Type float x2 #StringOption { "x2" };
StyleFloat_Type float y2 #StringOption { "y2" };
};
struct PathFillSolid PathFillSolid_Type PathFillSolidOp {
};
enum JoinMode StyleEnumOp {
JOIN_MODE_MITER #StringOption { "Miter" };
JOIN_MODE_ROUND #StringOption { "Round" };
JOIN_MODE_BEVEL #StringOption { "Bevel" };
};
enum CapMode StyleEnumOp {
CAP_MODE_FLAT #StringOption { "Flat" };
CAP_MODE_ROUND #StringOption { "Round" };
CAP_MODE_SQUARE #StringOption { "Square" };
};
struct PathFillContour PathFillContour_Type PathFillContourOp {
StyleI8_Type int8_t internalWidth #StringOption { "Internal width" };
StyleI8_Type int8_t externalWidth #StringOption { "External width" };
StyleFloat_Type float miterLimit #StringOption { "Miter limit" };
JoinMode uint8_t joinMode #StringOption { "Join mode: " };
CapMode uint8_t capMode #StringOption { "Cap mode: " };
StyleBool_Type bool integerWidthsOnly #StringOption { "Integer widths only when scaling" } from 14;
};
struct PathFillDash PathFillDash_Type PathFillDashOp {
PathFillContour_Type PathFillContour contour;
StyleI8_Type int8_t length #StringOption { "Length" };
StyleI8_Type int8_t gap #StringOption { "Gap" };
};
struct PathFillDashed PathFillDashed_Type PathFillDashedOp {
StyleArray_Type "PathFillDash *" dashes #RfItem { &PathFillDash_Type, sizeof(PathFillDash), &(StringOption) { "Dashes: " } };
};
struct PathFillMode PathFillMode_Type StyleUnionOp {
rfU32 uint32_t tag;
PathFillSolid_Type PathFillSolid solid #StringOption { "Solid" };
PathFillContour_Type PathFillContour contour #StringOption { "Contour" };
PathFillDashed_Type PathFillDashed dashed #StringOption { "Dashed" };
};
struct PathFill PathFill_Type PathFillOp {
PathFillMode_Type PathFillMode mode #StringOption { "Mode" };
Paint_Type Paint paint #StringOption { "Paint" };
};
struct LayerPath LayerPath_Type LayerPathOp {
StyleBool_Type bool evenOdd #StringOption { "Even-odd fill rule" };
StyleBool_Type bool closed #StringOption { "Closed path" };
StyleI16_Type int16_t alpha #StringOption { "Alpha" };
StyleArray_Type "PathPoint *" points #RfItem { &PathPoint_Type, sizeof(PathPoint), &(StringOption) { "Points: " } };
StyleArray_Type "PathFill *" fills #RfItem { &PathFill_Type, sizeof(PathFill), &(StringOption) { "Fills: " } };
};
union LayerBase LayerBase_Type RfUnionOp {
LayerBox_Type LayerBox box;
LayerMetrics_Type LayerMetrics metrics;
rfNone bool _removed0;
rfNone bool _removed1;
LayerText_Type LayerText text;
LayerPath_Type LayerPath path;
};
type DesignerArray_Type DesignerArrayOp;
struct Keyframe Keyframe_Type RfStructOp {
StyleI8_Type int8_t progress #StringOption { "Progress (%)" };
DesignerArray_Type "Property *" properties #RfItem { &Property_Type, sizeof(Property), NULL };
};
enum PrimaryState_Type StyleEnumOp {
PRIMARY_STATE_ANY #StringOption { "Any" };
PRIMARY_STATE_IDLE #StringOption { "Idle" };
PRIMARY_STATE_HOVERED #StringOption { "Hovered" };
PRIMARY_STATE_PRESSED #StringOption { "Pressed" };
PRIMARY_STATE_DISABLED #StringOption { "Disabled" };
PRIMARY_STATE_INACTIVE #StringOption { "Inactive" };
};
struct Sequence Sequence_Type RfStructOp {
DesignerArray_Type "Keyframe **" keyframes #RfItem { &rfObject, sizeof(Keyframe *), &(RfItem) { &Keyframe_Type, sizeof(Keyframe), NULL } };
StyleI16_Type int16_t duration #StringOption { "Duration (ms)" };
PrimaryState_Type uint32_t primaryState #StringOption { "Primary state" };
StyleBool_Type bool flagFocused #StringOption { "Focused?" };
StyleBool_Type bool flagChecked #StringOption { "Checked?" };
StyleBool_Type bool flagIndeterminate #StringOption { "Indeterminate?" };
StyleBool_Type bool flagDefault #StringOption { "Default?" };
StyleBool_Type bool flagItemFocus #StringOption { "List item focus?" };
StyleBool_Type bool flagListFocus #StringOption { "List focus?" };
StyleBool_Type bool flagSelected #StringOption { "Selected?" };
StyleBool_Type bool flagBeforeEnter #StringOption { "Before enter?" };
StyleBool_Type bool flagAfterExit #StringOption { "After exit?" };
};
enum LayerMode_Type StyleEnumOp {
LAYER_MODE_BACKGROUND #StringOption { "Background" };
LAYER_MODE_SHADOW #StringOption { "Shadow" };
LAYER_MODE_CONTENT #StringOption { "Content" };
LAYER_MODE_OVERLAY #StringOption { "Overlay" };
};
struct Layer Layer_Type LayerOp {
rfU64 uint64_t id;
rfNone uint32_t exportOffset;
DesignerArray_Type "Sequence **" sequences #RfItem { &rfObject, sizeof(Sequence *), &(RfItem) { &Sequence_Type, sizeof(Sequence), NULL } };
StyleString_Type RfData name #StringOption { "Layer name" };
rfBool bool isMetricsLayer;
Rectangle8_Type Rectangle8 offset #StringOption { "Offset (dpx)" };
Rectangle8_Type Rectangle8 position #StringOption { "Position (%)" };
LayerMode_Type uint8_t mode #StringOption { "Mode: " };
LayerBase_Type LayerBase base;
};
struct Style Style_Type RfStructOp {
DesignerArray_Type "uint64_t *" layers #RfItem { &rfU64, sizeof(uint64_t), NULL };
rfData RfData name;
rfU64 uint64_t id from 15;
rfBool bool publicStyle from 16;
};
struct Constant Constant_Type RfStructOp {
rfData RfData key;
StyleString_Type RfData value;
StyleBool_Type bool scale from 9;
};
struct Color Color_Type RfStructOp {
rfData RfData key;
rfU32 uint32_t value;
rfU32 uint32_t id;
};
struct StyleSet StyleSet_Type StyleSetOp {
rfU64 uint64_t lastID;
DesignerArray_Type "Style **" styles #RfItem { &rfObject, sizeof(Style *), &(RfItem) { &Style_Type, sizeof(Style), NULL } };
DesignerArray_Type "Layer **" layers #RfItem { &rfObject, sizeof(Layer *), &(RfItem) { &Layer_Type, sizeof(Layer), NULL } };
DesignerArray_Type "Constant **" constants #RfItem { &rfObject, sizeof(Constant *), &(RfItem) { &Constant_Type, sizeof(Constant), NULL } };
DesignerArray_Type "Color **" colors #RfItem { &rfObject, sizeof(Color *), &(RfItem) { &Color_Type, sizeof(Color), NULL } } from 17;
};
/////////////////////////////////////////////////////
struct ModAddLayer ModAddLayer_Type ModAddLayerOp {
rfObject "Layer *" layer #RfItem { &Layer_Type, sizeof(Layer), NULL };
rfI32 int index;
};
struct ModDeleteLayer ModDeleteLayer_Type ModDeleteLayerOp {
rfI32 int index;
};
struct ModSwapLayers ModSwapLayers_Type ModSwapLayersOp {
rfI32 int index;
};
struct ModSwapSequences ModSwapSequences_Type ModSwapSequencesOp {
rfI32 int index;
};
struct ModAddSequence ModAddSequence_Type ModAddSequenceOp {
rfObject "Sequence *" sequence #RfItem { &Sequence_Type, sizeof(Sequence), NULL };
rfI32 int index;
};
struct ModDeleteSequence ModDeleteSequence_Type ModDeleteSequenceOp {
rfI32 int index;
};
struct ModAddKeyframe ModAddKeyframe_Type ModAddKeyframeOp {
rfObject "Keyframe *" keyframe #RfItem { &Keyframe_Type, sizeof(Keyframe), NULL };
rfI32 int index;
};
struct ModDeleteKeyframe ModDeleteKeyframe_Type ModDeleteKeyframeOp {
rfI32 int index;
};
struct ModChangeProperty ModChangeProperty_Type ModChangePropertyOp {
Property_Type Property property;
rfNone "struct UIElement *" source;
};
struct ModArray ModArray_Type ModArrayOp {
Property_Type Property property;
rfBool bool isDelete;
};
struct ModDeleteOverride ModDeleteOverride_Type ModDeleteOverrideOp {
Property_Type Property property;
};
union ModData ModData_Type RfUnionOp {
ModAddLayer_Type ModAddLayer addLayer;
ModDeleteLayer_Type ModDeleteLayer deleteLayer;
ModSwapLayers_Type ModSwapLayers swapLayers;
ModSwapSequences_Type ModSwapSequences swapSequences;
ModAddSequence_Type ModAddSequence addSequence;
ModDeleteSequence_Type ModDeleteSequence deleteSequence;
ModAddKeyframe_Type ModAddKeyframe addKeyframe;
ModDeleteKeyframe_Type ModDeleteKeyframe deleteKeyframe;
ModChangeProperty_Type ModChangeProperty changeProperty;
ModArray_Type ModArray array;
ModDeleteOverride_Type ModDeleteOverride deleteOverride;
};
struct Mod Mod_Type RfStructOp {
rfNone ModContext context;
ModData_Type ModData data;
};