aboutsummaryrefslogtreecommitdiff
path: root/src/server/Message.ts
diff options
context:
space:
mode:
authorFawn <fangrui_tong@brown.edu>2020-01-15 16:08:48 -0500
committerFawn <fangrui_tong@brown.edu>2020-01-15 16:08:48 -0500
commit65e164eaec42d1850de7f5e1eba1d4302c3e8230 (patch)
tree322cbc215c9921c5153d512643d1332c0c1fdffc /src/server/Message.ts
parent3cca58612cde96a3082ca8e190fe2166d531d556 (diff)
mobile interface emits events when switched to inking view and when strokes are drawn, currently with dummy callbacks
Diffstat (limited to 'src/server/Message.ts')
-rw-r--r--src/server/Message.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/server/Message.ts b/src/server/Message.ts
index 621abfd1e..fe74dafa5 100644
--- a/src/server/Message.ts
+++ b/src/server/Message.ts
@@ -1,4 +1,5 @@
import { Utils } from "../Utils";
+import { Point } from "../pen-gestures/ndollar";
export class Message<T> {
private _name: string;
@@ -42,6 +43,16 @@ export interface Diff extends Reference {
readonly diff: any;
}
+export interface GestureContent {
+ readonly points: Array<Point>;
+ readonly width?: string;
+ readonly color?: string;
+}
+
+export interface MobileInkBoxTriggerContent {
+ readonly enableBox: boolean;
+}
+
export namespace MessageStore {
export const Foo = new Message<string>("Foo");
export const Bar = new Message<string>("Bar");
@@ -51,6 +62,8 @@ export namespace MessageStore {
export const GetDocument = new Message<string>("Get Document");
export const DeleteAll = new Message<any>("Delete All");
export const ConnectionTerminated = new Message<string>("Connection Terminated");
+ export const GesturePoints = new Message<GestureContent>("Gesture Points");
+ export const MobileInkBoxTrigger = new Message<boolean>("Trigger Mobile Ink Box");
export const GetRefField = new Message<string>("Get Ref Field");
export const GetRefFields = new Message<string[]>("Get Ref Fields");