From b9773f6eecea38e6a5aa28745cc6fe79aa2d441f Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 12 Mar 2016 10:54:52 +0100 Subject: 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. --- plugingui/plugingui.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugingui/plugingui.h') 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}; -- cgit v1.2.3