Mercurial > hg > orthanc-stone
comparison Platforms/Wasm/Defaults.h @ 754:92c400a09f1b
Merge from default
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 22 May 2019 16:13:46 +0200 |
parents | c35e98d22764 |
children |
comparison
equal
deleted
inserted
replaced
753:a386bbc955dc | 754:92c400a09f1b |
---|---|
1 #pragma once | 1 #pragma once |
2 | 2 |
3 #include <emscripten/emscripten.h> | 3 #include <emscripten/emscripten.h> |
4 | 4 |
5 #include <Framework/dev.h> | 5 #include "../../Framework/Deprecated/Viewport/WidgetViewport.h" |
6 #include <Framework/Viewport/WidgetViewport.h> | 6 #include "../../Framework/Deprecated/Widgets/LayoutWidget.h" |
7 #include <Framework/Widgets/LayoutWidget.h> | |
8 #include <Applications/IStoneApplication.h> | 7 #include <Applications/IStoneApplication.h> |
9 #include <Platforms/Wasm/WasmPlatformApplicationAdapter.h> | 8 #include <Platforms/Wasm/WasmPlatformApplicationAdapter.h> |
10 | 9 |
11 typedef OrthancStone::WidgetViewport* ViewportHandle; // the objects exchanged between JS and C++ | 10 typedef Deprecated::WidgetViewport* ViewportHandle; // the objects exchanged between JS and C++ |
12 | 11 |
13 #ifdef __cplusplus | 12 #ifdef __cplusplus |
14 extern "C" { | 13 extern "C" { |
15 #endif | 14 #endif |
16 | 15 |
55 void Reset() | 54 void Reset() |
56 { | 55 { |
57 isScheduled_ = false; | 56 isScheduled_ = false; |
58 } | 57 } |
59 | 58 |
60 void OnViewportChanged(const IViewport::ViewportChangedMessage& message) | 59 void OnViewportChanged(const Deprecated::IViewport::ViewportChangedMessage& message) |
61 { | 60 { |
62 if (!isScheduled_) | 61 if (!isScheduled_) |
63 { | 62 { |
64 ScheduleWebViewportRedrawFromCpp((ViewportHandle)&message.GetOrigin()); // loosing constness when transmitted to Web | 63 ScheduleWebViewportRedrawFromCpp((ViewportHandle)&message.GetOrigin()); // loosing constness when transmitted to Web |
65 isScheduled_ = true; | 64 isScheduled_ = true; |
66 } | 65 } |
67 } | 66 } |
68 }; | 67 }; |
69 | 68 |
70 // default status bar to log messages on the console/stdout | 69 // default status bar to log messages on the console/stdout |
71 class StatusBar : public OrthancStone::IStatusBar | 70 class StatusBar : public Deprecated::IStatusBar |
72 { | 71 { |
73 public: | 72 public: |
74 virtual void ClearMessage() | 73 virtual void ClearMessage() |
75 { | 74 { |
76 } | 75 } |