view Resources/CodeGeneration/testWasmIntegrated/DefaultLibrary.js @ 551:90f3a60576a9 dev rtviewer19

Merged in ct-pet-dose-struct (pull request #2) Ct pet dose struct
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 02 Apr 2019 14:02:12 +0000
parents baa9e1e932db
children f185cfcb72a0
line wrap: on
line source

// this file contains the JS method you want to expose to C++ code

mergeInto(LibraryManager.library, {
  // each time the Application updates its status, it may signal it through this method. i.e, to change the status of a button in the web interface
  // It needs to be put in this file so that the emscripten SDK linker knows where to find it.
  SendFreeTextFromCppJS: function(statusUpdateMessage) {
    var statusUpdateMessage_ = UTF8ToString(statusUpdateMessage);
    window.SendFreeTextFromCpp(statusUpdateMessage_);
  },
  SendMessageFromCppJS: function(statusUpdateMessage) {
    var statusUpdateMessage_ = UTF8ToString(statusUpdateMessage);
    SendMessageFromCpp(statusUpdateMessage_);
  }
});