mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-23 07:45:59 +08:00
Release metadata of remote protocol
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
[@Cpp(::vl::presentation::NativeCoordinate)]
|
||||
struct NativeCoordinate
|
||||
{
|
||||
var value : int;
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::NativePoint)]
|
||||
struct NativePoint
|
||||
{
|
||||
var x : NativeCoordinate;
|
||||
var y : NativeCoordinate;
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::NativeSize)]
|
||||
struct NativeSize
|
||||
{
|
||||
var x : NativeCoordinate;
|
||||
var y : NativeCoordinate;
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::NativeRect)]
|
||||
struct NativeRect
|
||||
{
|
||||
var x1 : NativeCoordinate;
|
||||
var y1 : NativeCoordinate;
|
||||
var x2 : NativeCoordinate;
|
||||
var y2 : NativeCoordinate;
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::NativeMargin)]
|
||||
struct NativeMargin
|
||||
{
|
||||
var left : NativeCoordinate;
|
||||
var top : NativeCoordinate;
|
||||
var right : NativeCoordinate;
|
||||
var bottom : NativeCoordinate;
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::Point)]
|
||||
struct Point
|
||||
{
|
||||
var x : int;
|
||||
var y : int;
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::Size)]
|
||||
struct Size
|
||||
{
|
||||
var x : int;
|
||||
var y : int;
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::Rect)]
|
||||
struct Rect
|
||||
{
|
||||
var x1 : int;
|
||||
var y1 : int;
|
||||
var x2 : int;
|
||||
var y2 : int;
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::FontProperties)]
|
||||
struct FontProperties
|
||||
{
|
||||
var fontFamily : string;
|
||||
var size : int;
|
||||
var bold : bool;
|
||||
var italic : bool;
|
||||
var underline : bool;
|
||||
var strikeline : bool;
|
||||
var antialias : bool;
|
||||
var verticalAntialias : bool;
|
||||
}
|
||||
|
||||
struct FontConfig
|
||||
{
|
||||
var defaultFont : FontProperties;
|
||||
var supportedFonts : string[];
|
||||
}
|
||||
|
||||
message ControllerGetFontConfig
|
||||
{
|
||||
response: FontConfig;
|
||||
}
|
||||
|
||||
struct ScreenConfig
|
||||
{
|
||||
var bounds : NativeRect;
|
||||
var clientBounds : NativeRect;
|
||||
var scalingX : double;
|
||||
var scalingY : double;
|
||||
}
|
||||
|
||||
message ControllerGetScreenConfig
|
||||
{
|
||||
response: ScreenConfig;
|
||||
}
|
||||
|
||||
message ControllerConnectionEstablished {}
|
||||
message ControllerConnectionStopped {}
|
||||
|
||||
event ControllerConnect {}
|
||||
event ControllerDisconnect {}
|
||||
event ControllerRequestExit {}
|
||||
event ControllerForceExit {}
|
||||
|
||||
[@DropRepeat] event ControllerScreenUpdated { request: ScreenConfig; }
|
||||
@@ -0,0 +1,79 @@
|
||||
enum IOMouseButton
|
||||
{
|
||||
Left,
|
||||
Middle,
|
||||
Right,
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::NativeWindowMouseInfo)]
|
||||
struct IOMouseInfo
|
||||
{
|
||||
var ctrl: bool;
|
||||
var shift: bool;
|
||||
var left: bool;
|
||||
var middle: bool;
|
||||
var right: bool;
|
||||
var x: NativeCoordinate;
|
||||
var y: NativeCoordinate;
|
||||
var wheel: int;
|
||||
var nonClient: bool;
|
||||
}
|
||||
|
||||
struct IOMouseInfoWithButton
|
||||
{
|
||||
var button: IOMouseButton;
|
||||
var info: IOMouseInfo;
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::NativeWindowKeyInfo)]
|
||||
struct IOKeyInfo
|
||||
{
|
||||
var code: key;
|
||||
var ctrl: bool;
|
||||
var shift: bool;
|
||||
var alt: bool;
|
||||
var capslock: bool;
|
||||
var autoRepeatKeyDown: bool;
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::NativeWindowCharInfo)]
|
||||
struct IOCharInfo
|
||||
{
|
||||
var code: char;
|
||||
var ctrl: bool;
|
||||
var shift: bool;
|
||||
var alt: bool;
|
||||
var capslock: bool;
|
||||
}
|
||||
|
||||
struct GlobalShortcutKey
|
||||
{
|
||||
var id : int;
|
||||
var ctrl : bool;
|
||||
var shift : bool;
|
||||
var alt : bool;
|
||||
var code : key;
|
||||
}
|
||||
|
||||
message IOUpdateGlobalShortcutKey { request: GlobalShortcutKey[]; }
|
||||
event IOGlobalShortcutKey { request: int; }
|
||||
|
||||
message IORequireCapture {}
|
||||
message IOReleaseCapture {}
|
||||
message IOIsKeyPressing { request: key; response: bool; }
|
||||
message IOIsKeyToggled { request: key; response: bool; }
|
||||
|
||||
event IOButtonDown { request: IOMouseInfoWithButton; }
|
||||
event IOButtonDoubleClick { request: IOMouseInfoWithButton; }
|
||||
event IOButtonUp { request: IOMouseInfoWithButton; }
|
||||
event IOHWheel { request: IOMouseInfo; }
|
||||
event IOVWheel { request: IOMouseInfo; }
|
||||
|
||||
[@DropConsecutive]
|
||||
event IOMouseMoving { request: IOMouseInfo; }
|
||||
event IOMouseEntered {}
|
||||
event IOMouseLeaved {}
|
||||
|
||||
event IOKeyDown { request: IOKeyInfo; }
|
||||
event IOKeyUp { request: IOKeyInfo; }
|
||||
event IOChar { request: IOCharInfo; }
|
||||
@@ -0,0 +1,86 @@
|
||||
[@Cpp(::vl::presentation::INativeWindowListener::HitTestResult)]
|
||||
[@CppNamespace(::vl::presentation::INativeWindowListener)]
|
||||
enum WindowHitTestResult
|
||||
{
|
||||
BorderNoSizing,
|
||||
BorderLeft,
|
||||
BorderRight,
|
||||
BorderTop,
|
||||
BorderBottom,
|
||||
BorderLeftTop,
|
||||
BorderRightTop,
|
||||
BorderLeftBottom,
|
||||
BorderRightBottom,
|
||||
Title,
|
||||
ButtonMinimum,
|
||||
ButtonMaximum,
|
||||
ButtonClose,
|
||||
Client,
|
||||
Icon,
|
||||
NoDecision,
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::INativeCursor::SystemCursorType)]
|
||||
[@CppNamespace(::vl::presentation::INativeCursor)]
|
||||
enum WindowSystemCursorType
|
||||
{
|
||||
SmallWaiting,
|
||||
LargeWaiting,
|
||||
Arrow,
|
||||
Cross,
|
||||
Hand,
|
||||
Help,
|
||||
IBeam,
|
||||
SizeAll,
|
||||
SizeNESW,
|
||||
SizeNS,
|
||||
SizeNWSE,
|
||||
SizeWE,
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::INativeWindow::WindowSizeState)]
|
||||
enum WindowSizeState
|
||||
{
|
||||
Minimized,
|
||||
Restored,
|
||||
Maximized,
|
||||
}
|
||||
|
||||
struct WindowSizingConfig
|
||||
{
|
||||
var bounds: NativeRect;
|
||||
var clientBounds: NativeRect;
|
||||
var sizeState: WindowSizeState;
|
||||
var customFramePadding: NativeMargin;
|
||||
}
|
||||
|
||||
message WindowGetBounds
|
||||
{
|
||||
response: WindowSizingConfig;
|
||||
}
|
||||
|
||||
[@DropRepeat] message WindowNotifySetTitle { request: string; }
|
||||
[@DropRepeat] message WindowNotifySetEnabled { request: bool; }
|
||||
[@DropRepeat] message WindowNotifySetTopMost { request: bool; }
|
||||
[@DropRepeat] message WindowNotifySetShowInTaskBar { request: bool; }
|
||||
[@DropRepeat] message WindowNotifySetCustomFrameMode { request: bool; }
|
||||
[@DropRepeat] message WindowNotifySetMaximizedBox { request: bool; }
|
||||
[@DropRepeat] message WindowNotifySetMinimizedBox { request: bool; }
|
||||
[@DropRepeat] message WindowNotifySetBorder { request: bool; }
|
||||
[@DropRepeat] message WindowNotifySetSizeBox { request: bool; }
|
||||
[@DropRepeat] message WindowNotifySetIconVisible { request: bool; }
|
||||
[@DropRepeat] message WindowNotifySetTitleBar { request: bool; }
|
||||
[@DropRepeat] message WindowNotifySetBounds { request: NativeRect; }
|
||||
[@DropRepeat] message WindowNotifySetClientSize { request: NativeSize; }
|
||||
|
||||
struct WindowShowing
|
||||
{
|
||||
var activate: bool;
|
||||
var sizeState: WindowSizeState;
|
||||
}
|
||||
|
||||
[@DropRepeat] message WindowNotifyActivate {}
|
||||
[@DropRepeat] message WindowNotifyShow { request: WindowShowing; }
|
||||
|
||||
[@DropRepeat] event WindowBoundsUpdated { request: WindowSizingConfig; }
|
||||
[@DropRepeat] event WindowActivatedUpdated { request: bool; }
|
||||
@@ -0,0 +1,70 @@
|
||||
enum RendererType
|
||||
{
|
||||
FocusRectangle,
|
||||
SolidBorder,
|
||||
SinkBorder,
|
||||
SinkSplitter,
|
||||
SolidBackground,
|
||||
GradientBackground,
|
||||
InnerShadow,
|
||||
SolidLabel,
|
||||
Polygon,
|
||||
ImageFrame,
|
||||
UnsupportedColorizedText,
|
||||
UnsupportedDocument,
|
||||
}
|
||||
|
||||
struct RendererCreation
|
||||
{
|
||||
var id : int;
|
||||
var type : RendererType;
|
||||
}
|
||||
|
||||
message RendererCreated { request: RendererCreation[]; }
|
||||
message RendererDestroyed { request: int[]; }
|
||||
|
||||
struct ElementBeginRendering
|
||||
{
|
||||
var frameId : int;
|
||||
}
|
||||
|
||||
struct ElementRendering
|
||||
{
|
||||
var id : int;
|
||||
var bounds : Rect;
|
||||
var areaClippedByParent : Rect;
|
||||
}
|
||||
|
||||
struct ElementBoundary
|
||||
{
|
||||
var hitTestResult : WindowHitTestResult?;
|
||||
var cursor: WindowSystemCursorType?;
|
||||
var bounds : Rect;
|
||||
var areaClippedBySelf : Rect;
|
||||
}
|
||||
|
||||
struct ElementMeasuring_FontHeight
|
||||
{
|
||||
var fontFamily : string;
|
||||
var fontSize : int;
|
||||
var height : int;
|
||||
}
|
||||
|
||||
struct ElementMeasuring_ElementMinSize
|
||||
{
|
||||
var id : int;
|
||||
var minSize : Size;
|
||||
}
|
||||
|
||||
struct ElementMeasurings
|
||||
{
|
||||
var fontHeights : ElementMeasuring_FontHeight[];
|
||||
var minSizes : ElementMeasuring_ElementMinSize[];
|
||||
var createdImages : ImageMetadata[];
|
||||
}
|
||||
|
||||
message RendererBeginRendering { request: ElementBeginRendering; }
|
||||
message RendererBeginBoundary { request: ElementBoundary; }
|
||||
message RendererRenderElement { request: ElementRendering; }
|
||||
message RendererEndBoundary {}
|
||||
message RendererEndRendering { response: ElementMeasurings; }
|
||||
@@ -0,0 +1,132 @@
|
||||
[@Cpp(::vl::presentation::elements::ElementShapeType)]
|
||||
enum ElementShapeType
|
||||
{
|
||||
Rectangle,
|
||||
Ellipse,
|
||||
RoundRect,
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::elements::GuiGradientBackgroundElement::Direction)]
|
||||
[@CppNamespace(::vl::presentation::elements::GuiGradientBackgroundElement)]
|
||||
enum ElementGradientrDirection
|
||||
{
|
||||
Horizontal,
|
||||
Vertical,
|
||||
Slash,
|
||||
Backslash,
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::elements::Gui3DSplitterElement::Direction)]
|
||||
[@CppNamespace(::vl::presentation::elements::Gui3DSplitterElement)]
|
||||
enum ElementSplitterDirection
|
||||
{
|
||||
Horizontal,
|
||||
Vertical,
|
||||
}
|
||||
|
||||
enum ElementHorizontalAlignment
|
||||
{
|
||||
Left,
|
||||
Right,
|
||||
Center,
|
||||
}
|
||||
|
||||
enum ElementVerticalAlignment
|
||||
{
|
||||
Top,
|
||||
Bottom,
|
||||
Center,
|
||||
}
|
||||
|
||||
[@Cpp(::vl::presentation::elements::ElementShape)]
|
||||
struct ElementShape
|
||||
{
|
||||
var shapeType : ElementShapeType;
|
||||
var radiusX : int;
|
||||
var radiusY : int;
|
||||
}
|
||||
|
||||
struct ElementDesc_SolidBorder
|
||||
{
|
||||
var id : int;
|
||||
var borderColor : color;
|
||||
var shape : ElementShape;
|
||||
}
|
||||
|
||||
struct ElementDesc_SinkBorder
|
||||
{
|
||||
var id : int;
|
||||
var leftTopColor : color;
|
||||
var rightBottomColor : color;
|
||||
}
|
||||
|
||||
struct ElementDesc_SinkSplitter
|
||||
{
|
||||
var id : int;
|
||||
var leftTopColor : color;
|
||||
var rightBottomColor : color;
|
||||
var direction : ElementSplitterDirection;
|
||||
}
|
||||
|
||||
struct ElementDesc_SolidBackground
|
||||
{
|
||||
var id : int;
|
||||
var backgroundColor : color;
|
||||
var shape : ElementShape;
|
||||
}
|
||||
|
||||
struct ElementDesc_GradientBackground
|
||||
{
|
||||
var id : int;
|
||||
var leftTopColor : color;
|
||||
var rightBottomColor : color;
|
||||
var direction : ElementGradientrDirection;
|
||||
var shape : ElementShape;
|
||||
}
|
||||
|
||||
struct ElementDesc_InnerShadow
|
||||
{
|
||||
var id : int;
|
||||
var shadowColor : color;
|
||||
var thickness : int;
|
||||
}
|
||||
|
||||
struct ElementDesc_Polygon
|
||||
{
|
||||
var id : int;
|
||||
var size : Size;
|
||||
var borderColor : color;
|
||||
var backgroundColor : color;
|
||||
var points : Point[];
|
||||
}
|
||||
|
||||
enum ElementSolidLabelMeasuringRequest
|
||||
{
|
||||
FontHeight,
|
||||
TotalSize,
|
||||
}
|
||||
|
||||
struct ElementDesc_SolidLabel
|
||||
{
|
||||
var id : int;
|
||||
var textColor : color;
|
||||
var horizontalAlignment : ElementHorizontalAlignment;
|
||||
var verticalAlignment : ElementVerticalAlignment;
|
||||
var wrapLine : bool;
|
||||
var wrapLineHeightCalculation : bool;
|
||||
var ellipse : bool;
|
||||
var multiline : bool;
|
||||
|
||||
var font : FontProperties?;
|
||||
var text : string?;
|
||||
var measuringRequest : ElementSolidLabelMeasuringRequest?;
|
||||
}
|
||||
|
||||
message RendererUpdateElement_SolidBorder { request: ElementDesc_SolidBorder; }
|
||||
message RendererUpdateElement_SinkBorder { request: ElementDesc_SinkBorder; }
|
||||
message RendererUpdateElement_SinkSplitter { request: ElementDesc_SinkSplitter; }
|
||||
message RendererUpdateElement_SolidBackground { request: ElementDesc_SolidBackground; }
|
||||
message RendererUpdateElement_GradientBackground { request: ElementDesc_GradientBackground; }
|
||||
message RendererUpdateElement_InnerShadow { request: ElementDesc_InnerShadow; }
|
||||
message RendererUpdateElement_Polygon { request: ElementDesc_Polygon; }
|
||||
message RendererUpdateElement_SolidLabel { request: ElementDesc_SolidLabel; }
|
||||
@@ -0,0 +1,49 @@
|
||||
[@Cpp(::vl::presentation::INativeImage::FormatType)]
|
||||
[@CppNamespace(::vl::presentation::INativeImage)]
|
||||
enum ImageFormatType
|
||||
{
|
||||
Bmp,
|
||||
Gif,
|
||||
Icon,
|
||||
Jpeg,
|
||||
Png,
|
||||
Tiff,
|
||||
Wmp,
|
||||
Unknown,
|
||||
}
|
||||
|
||||
struct ImageCreation
|
||||
{
|
||||
var id : int;
|
||||
var imageData : binary;
|
||||
var imageDataOmitted : bool;
|
||||
}
|
||||
|
||||
struct ImageFrameMetadata
|
||||
{
|
||||
var size : Size;
|
||||
}
|
||||
|
||||
struct ImageMetadata
|
||||
{
|
||||
var id : int;
|
||||
var format : ImageFormatType;
|
||||
var frames : ImageFrameMetadata[];
|
||||
}
|
||||
|
||||
message ImageCreated { request: ImageCreation; response: ImageMetadata; }
|
||||
message ImageDestroyed { request: int; }
|
||||
|
||||
struct ElementDesc_ImageFrame
|
||||
{
|
||||
var id : int;
|
||||
var imageId : int?;
|
||||
var imageFrame : int;
|
||||
var horizontalAlignment : ElementHorizontalAlignment;
|
||||
var verticalAlignment : ElementVerticalAlignment;
|
||||
var stretch : bool;
|
||||
var enabled : bool;
|
||||
var imageCreation : ImageCreation?;
|
||||
}
|
||||
|
||||
message RendererUpdateElement_ImageFrame { request: ElementDesc_ImageFrame; }
|
||||
@@ -0,0 +1,62 @@
|
||||
union ElementDescVariant
|
||||
{
|
||||
ElementDesc_SolidBorder,
|
||||
ElementDesc_SinkBorder,
|
||||
ElementDesc_SinkSplitter,
|
||||
ElementDesc_SolidBackground,
|
||||
ElementDesc_GradientBackground,
|
||||
ElementDesc_InnerShadow,
|
||||
ElementDesc_Polygon,
|
||||
ElementDesc_SolidLabel,
|
||||
ElementDesc_ImageFrame,
|
||||
}
|
||||
|
||||
class RenderingDom
|
||||
{
|
||||
var hitTestResult: WindowHitTestResult?;
|
||||
var cursor: WindowSystemCursorType?;
|
||||
var element: int?;
|
||||
var bounds: Rect;
|
||||
var validArea: Rect;
|
||||
var children: RenderingDom[];
|
||||
}
|
||||
|
||||
struct RenderingCommand_BeginBoundary
|
||||
{
|
||||
var boundary: ElementBoundary;
|
||||
}
|
||||
|
||||
struct RenderingCommand_EndBoundary
|
||||
{
|
||||
}
|
||||
|
||||
struct RenderingCommand_Element
|
||||
{
|
||||
var rendering: ElementRendering;
|
||||
var element: int?;
|
||||
}
|
||||
|
||||
union RenderingCommand
|
||||
{
|
||||
RenderingCommand_BeginBoundary,
|
||||
RenderingCommand_EndBoundary,
|
||||
RenderingCommand_Element,
|
||||
}
|
||||
|
||||
struct RenderingFrame
|
||||
{
|
||||
var frameId : int;
|
||||
var frameName : string?;
|
||||
var windowSize: WindowSizingConfig;
|
||||
var elements: ElementDescVariant[int];
|
||||
var commands: RenderingCommand[];
|
||||
var root: RenderingDom;
|
||||
}
|
||||
|
||||
struct RenderingTrace
|
||||
{
|
||||
var createdElements: RendererType[int];
|
||||
var imageCreations: ImageCreation[.id];
|
||||
var imageMetadatas: ImageMetadata[.id];
|
||||
var frames: RenderingFrame[];
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
Protocol_Controller
|
||||
Protocol_MainWindow
|
||||
Protocol_IO
|
||||
Protocol_Renderer_BasicElements
|
||||
Protocol_Renderer_ImageFrame
|
||||
Protocol_Renderer
|
||||
Protocol_SyncDom
|
||||
Reference in New Issue
Block a user