comparison Platforms/Wasm/Defaults.h @ 287:2038d76bf13f am-2

interaction with HTML/JS
author am@osimis.io
date Thu, 30 Aug 2018 11:36:36 +0200
parents 8a86695fcbc3
children 8c8da145fefa
comparison
equal deleted inserted replaced
286:6b3d91857b96 287:2038d76bf13f
14 extern "C" { 14 extern "C" {
15 #endif 15 #endif
16 16
17 // JS methods accessible from C++ 17 // JS methods accessible from C++
18 extern void ScheduleWebViewportRedrawFromCpp(ViewportHandle cppViewportHandle); 18 extern void ScheduleWebViewportRedrawFromCpp(ViewportHandle cppViewportHandle);
19 extern void UpdateStoneApplicationStatusFromCpp(const char* statusUpdateMessage);
19 20
20 // C++ methods accessible from JS 21 // C++ methods accessible from JS
21 extern void EMSCRIPTEN_KEEPALIVE CreateWasmApplication(ViewportHandle cppViewportHandle); 22 extern void EMSCRIPTEN_KEEPALIVE CreateWasmApplication(ViewportHandle cppViewportHandle);
22 extern void EMSCRIPTEN_KEEPALIVE SetStartupParameter(const char* keyc, const char* value); 23 extern void EMSCRIPTEN_KEEPALIVE SetStartupParameter(const char* keyc, const char* value);
23 24
28 29
29 extern OrthancStone::IBasicApplication* CreateUserApplication(OrthancStone::MessageBroker& broker); 30 extern OrthancStone::IBasicApplication* CreateUserApplication(OrthancStone::MessageBroker& broker);
30 31
31 namespace OrthancStone { 32 namespace OrthancStone {
32 33
33 // default Ovserver to trigger Viewport redraw when something changes in the Viewport 34 // default Observer to trigger Viewport redraw when something changes in the Viewport
34 class ViewportContentChangedObserver : 35 class ViewportContentChangedObserver :
35 public OrthancStone::IViewport::IObserver 36 public OrthancStone::IViewport::IObserver
36 { 37 {
37 private: 38 private:
38 // Flag to avoid flooding JavaScript with redundant Redraw requests 39 // Flag to avoid flooding JavaScript with redundant Redraw requests