X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ecere%2Fsrc%2Fgui%2FGuiApplication.ec;h=bb7fd95336cd5fdaaf76bc7e4533bf8d1554ba84;hb=701362334685321c5e50fd1ce22e91b503b18522;hp=87fe462572fecda7bf7ff6f13e20a564f559b0bd;hpb=ea18072fed76d1b39c11ffa1483c878d62e5c1d2;p=sdk diff --git a/ecere/src/gui/GuiApplication.ec b/ecere/src/gui/GuiApplication.ec index 87fe462..bb7fd95 100644 --- a/ecere/src/gui/GuiApplication.ec +++ b/ecere/src/gui/GuiApplication.ec @@ -1,6 +1,14 @@ namespace gui; -#if (defined(__unix__) || defined(__APPLE__)) && !defined(__ANDROID__) +#ifdef __EMSCRIPTEN__ +#include +#endif + +#ifdef __EMSCRIPTEN__ +#include +#endif + +#if (defined(__unix__) || defined(__APPLE__)) && !defined(__ANDROID__) && !defined(__EMSCRIPTEN__) #define property _property #define new _new #define class _class @@ -77,7 +85,7 @@ import "network" import "CocoaInterface" #endif -#if (defined(__unix__) || defined(__APPLE__)) && !defined(__ANDROID__) +#if (defined(__unix__) || defined(__APPLE__)) && !defined(__ANDROID__) && !defined(__EMSCRIPTEN__) import "XInterface" #endif @@ -160,9 +168,13 @@ public class GuiApplication : Application bool processAll; +#if !defined(__EMSCRIPTEN__) Mutex waitMutex {}; +#endif bool waiting; +#if !defined(__EMSCRIPTEN__) Mutex lockMutex {}; +#endif Window interimWindow; bool caretEnabled; @@ -179,7 +191,9 @@ public class GuiApplication : Application { SystemCursor c; +#if !defined(__EMSCRIPTEN__) mainThread = GetCurrentThreadID(); +#endif if(!guiApp) guiApp = this; @@ -194,9 +208,11 @@ public class GuiApplication : Application for(c = 0; c