wsh rpc working (#55)

lots of iterations on an RPC protocol. getting wsh working with a
getmeta/setmeta command in addition to html mode.
This commit is contained in:
Mike Sawka
2024-06-17 09:58:28 -07:00
committed by GitHub
parent d0c4f5c46f
commit e46906d423
20 changed files with 902 additions and 198 deletions
+10
View File
@@ -98,3 +98,13 @@ class ObjectServiceType {
export const ObjectService = new ObjectServiceType()
// windowservice.WindowService (window)
class WindowServiceType {
// @returns object updates
SetWindowPosAndSize(arg2: string, arg3: Point, arg4: WinSize): Promise<void> {
return WOS.callBackendService("window", "SetWindowPosAndSize", Array.from(arguments))
}
}
export const WindowService = new WindowServiceType()
+8 -1
View File
@@ -30,7 +30,7 @@ declare global {
type BlockCommand = {
command: string;
} & ( BlockAppendIJsonCommand | BlockInputCommand | BlockSetViewCommand | BlockSetMetaCommand | BlockMessageCommand | BlockAppendFileCommand );
} & ( BlockSetMetaCommand | BlockGetMetaCommand | BlockMessageCommand | BlockAppendFileCommand | BlockAppendIJsonCommand | BlockInputCommand | BlockSetViewCommand );
// wstore.BlockDef
type BlockDef = {
@@ -40,6 +40,12 @@ declare global {
meta?: MetaType;
};
// wshutil.BlockGetMetaCommand
type BlockGetMetaCommand = {
command: "getmeta";
oid: string;
};
// wshutil.BlockInputCommand
type BlockInputCommand = {
command: "controller:input";
@@ -57,6 +63,7 @@ declare global {
// wshutil.BlockSetMetaCommand
type BlockSetMetaCommand = {
command: "setmeta";
oid?: string;
meta: MetaType;
};