Mercurial > hg > orthanc-stone
comparison Platforms/Wasm/default-library.js @ 466:5055031f4a06 bgo-commands-codegen
- Added browserify to build. This allows using require calls for modules that
work with tsc compiler.
- removed older stuff related to Protocol Buffers and Flatbuffers
- changed triple-slash references to import statements
- module prefixes are now added at call sites
- added cmake module for filename handling
- switched to Ninja for sample build
- Added virtual dtor in ICommand
author | bgo-osimis |
---|---|
date | Mon, 11 Feb 2019 16:00:04 +0100 |
parents | 2038d76bf13f |
children | 7105a0bad250 |
comparison
equal
deleted
inserted
replaced
448:cc47e6eaefb0 | 466:5055031f4a06 |
---|---|
1 // this file contains the JS method you want to expose to C++ code | 1 // this file contains the JS method you want to expose to C++ code |
2 | 2 |
3 mergeInto(LibraryManager.library, { | 3 mergeInto(LibraryManager.library, { |
4 ScheduleWebViewportRedrawFromCpp: function(cppViewportHandle) { | 4 ScheduleWebViewportRedrawFromCpp: function(cppViewportHandle) { |
5 ScheduleWebViewportRedraw(cppViewportHandle); | 5 window.ScheduleWebViewportRedraw(cppViewportHandle); |
6 }, | 6 }, |
7 CreateWasmViewportFromCpp: function(htmlCanvasId) { | 7 CreateWasmViewportFromCpp: function(htmlCanvasId) { |
8 return CreateWasmViewport(htmlCanvasId); | 8 return window.CreateWasmViewport(htmlCanvasId); |
9 }, | 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 | 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) { | 11 UpdateStoneApplicationStatusFromCpp: function(statusUpdateMessage) { |
12 var statusUpdateMessage_ = UTF8ToString(statusUpdateMessage); | 12 var statusUpdateMessage_ = UTF8ToString(statusUpdateMessage); |
13 UpdateWebApplication(statusUpdateMessage_); | 13 UpdateWebApplication(statusUpdateMessage_); |
14 } | 14 } |
15 }); | 15 }); |
16 |