diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-03-12 10:54:52 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-03-12 10:54:52 +0100 |
commit | b9773f6eecea38e6a5aa28745cc6fe79aa2d441f (patch) | |
tree | 3740949c67bb6bfe533b35974f230c0443ce2c57 /plugingui/plugingui.h | |
parent | 4bda33e204fafc4fdee6d14d5167ca7a801400ae (diff) |
Add parent widget pointer for contained plugin windows. Remove threaded event handling and make all event handling depend on processEcvents being called with a regular (~50ms) interval.
Diffstat (limited to 'plugingui/plugingui.h')
-rw-r--r-- | plugingui/plugingui.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugingui/plugingui.h b/plugingui/plugingui.h index d639a16..af05478 100644 --- a/plugingui/plugingui.h +++ b/plugingui/plugingui.h @@ -40,19 +40,18 @@ namespace GUI { -class PluginGUI : public Thread, public MessageReceiver, public Listener { +class PluginGUI + : public MessageReceiver + , public Listener +{ public: - PluginGUI(); + PluginGUI(void* native_window = nullptr); virtual ~PluginGUI(); - void thread_main(); - //! Process all events and messages in queue //! \return true if not closing, returns false if closing. bool processEvents(); - void stopThread(); - void init(); void deinit(); @@ -65,7 +64,6 @@ public: DGWindow* window{nullptr}; EventHandler* eventhandler{nullptr}; - Config* config{nullptr}; Notifier<> closeNotifier; @@ -76,6 +74,8 @@ public: private: void closeEventHandler(); + void* native_window{nullptr}; + volatile bool running{true}; volatile bool closing{false}; volatile bool initialised{false}; |