Mercurial > hg > orthanc-stone
annotate Platforms/Wasm/default-library.js @ 491:8e7e151ef472 bgo-commands-codegen
Unit tests pass for enum generation
author | bgo-osimis |
---|---|
date | Wed, 20 Feb 2019 20:51:30 +0100 |
parents | 5055031f4a06 |
children | 7105a0bad250 |
rev | line source |
---|---|
229 | 1 // this file contains the JS method you want to expose to C++ code |
2 | |
3 mergeInto(LibraryManager.library, { | |
4 ScheduleWebViewportRedrawFromCpp: function(cppViewportHandle) { | |
466
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
287
diff
changeset
|
5 window.ScheduleWebViewportRedraw(cppViewportHandle); |
231
5027cb2feb51
viewport is now part of the Application itself and not global anymore
am@osimis.io
parents:
229
diff
changeset
|
6 }, |
5027cb2feb51
viewport is now part of the Application itself and not global anymore
am@osimis.io
parents:
229
diff
changeset
|
7 CreateWasmViewportFromCpp: function(htmlCanvasId) { |
466
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
287
diff
changeset
|
8 return window.CreateWasmViewport(htmlCanvasId); |
287 | 9 }, |
10 // each time the StoneApplication updates its status, it may signal it through this method. i.e, to change the status of a button in the web interface | |
11 UpdateStoneApplicationStatusFromCpp: function(statusUpdateMessage) { | |
12 var statusUpdateMessage_ = UTF8ToString(statusUpdateMessage); | |
13 UpdateWebApplication(statusUpdateMessage_); | |
231
5027cb2feb51
viewport is now part of the Application itself and not global anymore
am@osimis.io
parents:
229
diff
changeset
|
14 } |
5027cb2feb51
viewport is now part of the Application itself and not global anymore
am@osimis.io
parents:
229
diff
changeset
|
15 }); |