X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fpbd%2Fpbd%2Fbase_ui.h;h=ea1afbbb5a3428e84fd4cc9b4fe0a02db45d2597;hb=59076a7e4c66db12bbbfbf01f012ca2f6ba4bf56;hp=22784c9bfc22ca9083acbb74a57185e1a41180e3;hpb=7626cd68ac033de3ebaa0bf60ce4bdbf7da44329;p=ardour.git diff --git a/libs/pbd/pbd/base_ui.h b/libs/pbd/pbd/base_ui.h index 22784c9bfc..ea1afbbb5a 100644 --- a/libs/pbd/pbd/base_ui.h +++ b/libs/pbd/pbd/base_ui.h @@ -29,6 +29,7 @@ #include #include +#include "pbd/libpbd_visibility.h" #include "pbd/crossthread.h" #include "pbd/event_loop.h" @@ -41,7 +42,7 @@ */ -class BaseUI : public sigc::trackable, public PBD::EventLoop +class LIBPBD_API BaseUI : public sigc::trackable, public PBD::EventLoop { public: BaseUI (const std::string& name); @@ -74,9 +75,10 @@ class BaseUI : public sigc::trackable, public PBD::EventLoop bool _ok; Glib::RefPtr _main_loop; - Glib::Threads::Thread* run_loop_thread; + Glib::RefPtr m_context; + Glib::Threads::Thread* run_loop_thread; Glib::Threads::Mutex _run_lock; - Glib::Threads::Cond _running; + Glib::Threads::Cond _running; /* this signals _running from within the event loop, from an idle callback @@ -91,12 +93,17 @@ class BaseUI : public sigc::trackable, public PBD::EventLoop virtual void thread_init () {}; +#ifdef PLATFORM_WINDOWS + static gboolean _request_handler (gpointer); + bool request_handler (); +#else /** Called when there input ready on the request_channel */ bool request_handler (Glib::IOCondition); +#endif void signal_new_request (); - void attach_request_source (Glib::RefPtr context); + void attach_request_source (); /** Derived UI objects must implement this method, * which will be called whenever there are requests @@ -108,7 +115,9 @@ class BaseUI : public sigc::trackable, public PBD::EventLoop std::string _name; BaseUI* base_ui_instance; +#ifndef PLATFORM_WINDOWS CrossThreadChannel request_channel; +#endif static uint64_t rt_bit;