diff Platforms/WebAssembly/wasm-application.ts @ 229:b0ba3b38a23c am

ScheduleRedraw can handle multiple viewports
author am@osimis.io
date Thu, 14 Jun 2018 16:51:43 +0200
parents 1fa4c65c7e1b
children 7d2631320615
line wrap: on
line diff
--- a/Platforms/WebAssembly/wasm-application.ts	Thu Jun 14 15:06:29 2018 +0200
+++ b/Platforms/WebAssembly/wasm-application.ts	Thu Jun 14 16:51:43 2018 +0200
@@ -1,12 +1,37 @@
 ///<reference path='stone-framework-loader.ts'/>
+///<reference path='wasm-viewport.ts'/>
 
-declare function InitializeWasmApplication() :void; // still in a js file
+module Stone {
+  
+    //  export declare type InitializationCallback = () => void;
+      
+    //  export declare var StoneFrameworkModule : any;
+      
+      //const ASSETS_FOLDER : string = "assets/lib";
+      //const WASM_FILENAME : string = "orthanc-framework";
+      
+      export class WasmApplication {
+    
+        private viewport_ : WasmViewport;
+        private canvasId_: string;
+    
+        private pimpl_ : any; // Private pointer to the underlying WebAssembly C++ object
+    
+        public constructor(canvasId: string) {
+          this.canvasId_ = canvasId;
+            //this.module_ = module;
+        }
+    }
+}
+    
+
+declare function InitializeWasmApplication(canvasId: string) :void; // still in a js file
 
 
 
 
 // Wait for the Orthanc Framework to be initialized (this initializes
-// the WebAssembly environment)
+// the WebAssembly environment) and then, create and initialize the Wasm application
 Stone.Framework.Initialize(true, function() {
-    InitializeWasmApplication();
+    InitializeWasmApplication("canvas");
 });
\ No newline at end of file