mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
remove unused, empty glib event source/callback code (was from an experiment during nutempo2 development)
This commit is contained in:
parent
acd7703c36
commit
e057088195
7 changed files with 0 additions and 80 deletions
|
|
@ -73,17 +73,11 @@ BaseUI::RequestType Gtkmm2ext::AddTimeout = BaseUI::new_request_type();
|
||||||
|
|
||||||
template class AbstractUI<Gtkmm2ext::UIRequest>;
|
template class AbstractUI<Gtkmm2ext::UIRequest>;
|
||||||
|
|
||||||
void
|
|
||||||
UI::event_loop_precall ()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
UI::UI (string application_name, string thread_name, int *argc, char ***argv)
|
UI::UI (string application_name, string thread_name, int *argc, char ***argv)
|
||||||
: AbstractUI<UIRequest> (thread_name)
|
: AbstractUI<UIRequest> (thread_name)
|
||||||
, _receiver (*this)
|
, _receiver (*this)
|
||||||
, global_bindings (0)
|
, global_bindings (0)
|
||||||
, errors (0)
|
, errors (0)
|
||||||
, event_callback (boost::bind (&UI::event_loop_precall, this))
|
|
||||||
{
|
{
|
||||||
theMain = new Main (argc, argv);
|
theMain = new Main (argc, argv);
|
||||||
|
|
||||||
|
|
@ -117,12 +111,6 @@ UI::UI (string application_name, string thread_name, int *argc, char ***argv)
|
||||||
|
|
||||||
EventLoop::register_request_buffer_factory ("gui", request_buffer_factory);
|
EventLoop::register_request_buffer_factory ("gui", request_buffer_factory);
|
||||||
|
|
||||||
/*
|
|
||||||
* every time the main loop runs (i.e. before any actual event handling
|
|
||||||
*/
|
|
||||||
|
|
||||||
event_callback.attach (MainContext::get_default());
|
|
||||||
|
|
||||||
/* attach our request source to the default main context */
|
/* attach our request source to the default main context */
|
||||||
|
|
||||||
attach_request_source ();
|
attach_request_source ();
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,6 @@
|
||||||
#define ABSTRACT_UI_EXPORTS
|
#define ABSTRACT_UI_EXPORTS
|
||||||
#endif
|
#endif
|
||||||
#include "pbd/abstract_ui.h"
|
#include "pbd/abstract_ui.h"
|
||||||
#include "pbd/glib_event_source.h"
|
|
||||||
#include "pbd/ringbufferNPT.h"
|
#include "pbd/ringbufferNPT.h"
|
||||||
#include "pbd/pool.h"
|
#include "pbd/pool.h"
|
||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
|
|
@ -171,8 +170,6 @@ protected:
|
||||||
Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag,
|
Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag,
|
||||||
const char *msg);
|
const char *msg);
|
||||||
|
|
||||||
virtual void event_loop_precall ();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static UI *theGtkUI;
|
static UI *theGtkUI;
|
||||||
|
|
||||||
|
|
@ -205,8 +202,6 @@ private:
|
||||||
bool color_picked;
|
bool color_picked;
|
||||||
|
|
||||||
void do_request (UIRequest*);
|
void do_request (UIRequest*);
|
||||||
|
|
||||||
GlibEventLoopCallback event_callback;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace */
|
} /* namespace */
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ BaseUI::BaseUI (const string& loop_name)
|
||||||
, m_context(MainContext::get_default())
|
, m_context(MainContext::get_default())
|
||||||
, run_loop_thread (0)
|
, run_loop_thread (0)
|
||||||
, request_channel (true)
|
, request_channel (true)
|
||||||
, glib_event_callback (boost::bind (&BaseUI::event_loop_precall, this))
|
|
||||||
{
|
{
|
||||||
base_ui_instance = this;
|
base_ui_instance = this;
|
||||||
request_channel.set_receive_handler (sigc::mem_fun (*this, &BaseUI::request_handler));
|
request_channel.set_receive_handler (sigc::mem_fun (*this, &BaseUI::request_handler));
|
||||||
|
|
@ -121,12 +120,6 @@ BaseUI::run ()
|
||||||
_main_loop = MainLoop::create (m_context);
|
_main_loop = MainLoop::create (m_context);
|
||||||
attach_request_source ();
|
attach_request_source ();
|
||||||
|
|
||||||
/*
|
|
||||||
* every time the main loop runs (i.e. before any actual event handling)
|
|
||||||
*/
|
|
||||||
|
|
||||||
glib_event_callback.attach (m_context);
|
|
||||||
|
|
||||||
Glib::Threads::Mutex::Lock lm (_run_lock);
|
Glib::Threads::Mutex::Lock lm (_run_lock);
|
||||||
run_loop_thread = Glib::Threads::Thread::create (mem_fun (*this, &BaseUI::main_thread));
|
run_loop_thread = Glib::Threads::Thread::create (mem_fun (*this, &BaseUI::main_thread));
|
||||||
_running.wait (_run_lock);
|
_running.wait (_run_lock);
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
#include "pbd/glib_event_source.h"
|
|
||||||
|
|
||||||
bool
|
|
||||||
GlibEventLoopSource::prepare (int& timeout)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
GlibEventLoopSource::check ()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
GlibEventLoopSource::dispatch (sigc::slot_base*)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
@ -33,7 +33,6 @@
|
||||||
#include "pbd/libpbd_visibility.h"
|
#include "pbd/libpbd_visibility.h"
|
||||||
#include "pbd/crossthread.h"
|
#include "pbd/crossthread.h"
|
||||||
#include "pbd/event_loop.h"
|
#include "pbd/event_loop.h"
|
||||||
#include "pbd/glib_event_source.h"
|
|
||||||
#include "pbd/pthread_utils.h"
|
#include "pbd/pthread_utils.h"
|
||||||
|
|
||||||
/** A BaseUI is an abstraction designed to be used with any "user
|
/** A BaseUI is an abstraction designed to be used with any "user
|
||||||
|
|
@ -129,8 +128,6 @@ class LIBPBD_API BaseUI : public sigc::trackable, public PBD::EventLoop
|
||||||
|
|
||||||
int setup_request_pipe ();
|
int setup_request_pipe ();
|
||||||
void main_thread ();
|
void main_thread ();
|
||||||
|
|
||||||
GlibEventLoopCallback glib_event_callback;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __pbd_base_ui_h__ */
|
#endif /* __pbd_base_ui_h__ */
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
#ifndef __libpbd_glib_event_source_h__
|
|
||||||
#define __libpbd_glib_event_source_h__
|
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
|
||||||
|
|
||||||
#include <glibmm/main.h>
|
|
||||||
|
|
||||||
class LIBPBD_API GlibEventLoopSource : public Glib::Source
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
GlibEventLoopSource () {};
|
|
||||||
|
|
||||||
bool prepare (int& timeout);
|
|
||||||
bool check();
|
|
||||||
bool dispatch (sigc::slot_base*);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class LIBPBD_API GlibEventLoopCallback : public GlibEventLoopSource
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
GlibEventLoopCallback (boost::function<void()> callback) : _callback (callback) {}
|
|
||||||
|
|
||||||
bool check() {
|
|
||||||
_callback();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
boost::function<void()> _callback;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __libpbd_glib_event_source_h__ */
|
|
||||||
|
|
@ -51,7 +51,6 @@ libpbd_sources = [
|
||||||
'file_archive.cc',
|
'file_archive.cc',
|
||||||
'file_utils.cc',
|
'file_utils.cc',
|
||||||
'fpu.cc',
|
'fpu.cc',
|
||||||
'glib_event_source.cc',
|
|
||||||
'id.cc',
|
'id.cc',
|
||||||
'locale_guard.cc',
|
'locale_guard.cc',
|
||||||
'localtime_r.cc',
|
'localtime_r.cc',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue