view Platforms/Wasm/default-library.js @ 556:b1e1eccee214

CairoSurface::Copy()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 17 Apr 2019 14:37:18 +0200
parents 5055031f4a06
children 7105a0bad250
line wrap: on
line source

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

mergeInto(LibraryManager.library, {
  ScheduleWebViewportRedrawFromCpp: function(cppViewportHandle) {
    window.ScheduleWebViewportRedraw(cppViewportHandle);
  },
  CreateWasmViewportFromCpp: function(htmlCanvasId) {
    return window.CreateWasmViewport(htmlCanvasId);
  },
  // 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
  UpdateStoneApplicationStatusFromCpp: function(statusUpdateMessage) {
    var statusUpdateMessage_ = UTF8ToString(statusUpdateMessage);
    UpdateWebApplication(statusUpdateMessage_);
  }
});