some strategic documentation
[ardour.git] / libs / pbd / pbd / base_ui.h
index d947a06b34046a93e8530d7f92ce4ffdb4d24efc..029d8223eaaa0d1692bb75d136b93f061d5ae54f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2000-2009 Paul Davis 
+    Copyright (C) 2000-2009 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@
 #include <glibmm/threads.h>
 #include <glibmm/main.h>
 
+#include "pbd/libpbd_visibility.h"
 #include "pbd/crossthread.h"
 #include "pbd/event_loop.h"
 
  * events/requests and dispatch/process them as they arrive.
  *
  * This implementation starts up a thread that runs a Glib main loop
- * to wait on events/requests etc. 
+ * to wait on events/requests etc.
  */
 
 
-class BaseUI : public sigc::trackable, public PBD::EventLoop
+class LIBPBD_API BaseUI : public sigc::trackable, public PBD::EventLoop
 {
   public:
        BaseUI (const std::string& name);
@@ -53,15 +54,13 @@ class BaseUI : public sigc::trackable, public PBD::EventLoop
         Glib::Threads::Thread* event_loop_thread() const { return run_loop_thread; }
         bool caller_is_self () const { return Glib::Threads::Thread::self() == run_loop_thread; }
 
-       std::string name() const { return _name; }
-
        bool ok() const { return _ok; }
-       
+
        static RequestType new_request_type();
        static RequestType CallSlot;
        static RequestType Quit;
 
-       /** start up a thread to run the main loop 
+       /** start up a thread to run the main loop
         */
        void run ();
 
@@ -71,7 +70,7 @@ class BaseUI : public sigc::trackable, public PBD::EventLoop
        void quit ();
 
   protected:
-       bool _ok; 
+       bool _ok;
 
        Glib::RefPtr<Glib::MainLoop> _main_loop;
        Glib::RefPtr<Glib::MainContext> m_context;
@@ -80,7 +79,7 @@ class BaseUI : public sigc::trackable, public PBD::EventLoop
        Glib::Threads::Cond         _running;
 
        /* this signals _running from within the event loop,
-          from an idle callback 
+          from an idle callback
        */
 
        bool signal_running ();
@@ -92,14 +91,9 @@ 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 ();
@@ -111,13 +105,10 @@ class BaseUI : public sigc::trackable, public PBD::EventLoop
        virtual void handle_ui_requests () = 0;
 
   private:
-       std::string _name; 
        BaseUI* base_ui_instance;
 
-#ifndef PLATFORM_WINDOWS
        CrossThreadChannel request_channel;
-#endif
-       
+
        static uint64_t rt_bit;
 
        int setup_request_pipe ();