Mercurial > hg > orthanc-stone
diff Platforms/WebAssembly/Defaults.h @ 223:d30a10d574ec am
refactoring continued - not working
author | am@osimis.io |
---|---|
date | Thu, 14 Jun 2018 10:57:02 +0200 |
parents | 84844649a8fd |
children | c8f11437a6fd |
line wrap: on
line diff
--- a/Platforms/WebAssembly/Defaults.h Tue Jun 12 17:21:15 2018 +0200 +++ b/Platforms/WebAssembly/Defaults.h Thu Jun 14 10:57:02 2018 +0200 @@ -1,23 +1,35 @@ #pragma once +#include <emscripten/emscripten.h> + #include <Framework/dev.h> #include <Framework/Viewport/WidgetViewport.h> #include <Framework/Widgets/LayerWidget.h> #include <Framework/Widgets/LayoutWidget.h> +#include <Applications/Wasm/BasicWasmApplication.h> +#include <Applications/Wasm/BasicWasmApplicationContext.h> #ifdef __cplusplus extern "C" { #endif + // JS methods accessible from C++ extern void ScheduleRedraw(); + // C++ methods accessible from JS + extern void EMSCRIPTEN_KEEPALIVE CreateWasmApplication(); +// extern void EMSCRIPTEN_KEEPALIVE SetStartupParameter(const char* keyc, const char* value); +// extern void EMSCRIPTEN_KEEPALIVE StartWasmApplication(); + #ifdef __cplusplus } #endif +extern OrthancStone::BasicWasmApplication* CreateUserApplication(); namespace OrthancStone { + // default Ovserver to trigger Viewport redraw when something changes in the Viewport class ChangeObserver : public OrthancStone::IViewport::IObserver { @@ -46,7 +58,7 @@ } }; - + // default status bar to log messages on the console/stdout class StatusBar : public OrthancStone::IStatusBar { public: