diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-09 03:05:14 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-09 03:05:14 +0000 |
commit | c38e02285fda1fd7966c9e4ad85994445247e6a6 (patch) | |
tree | a5f46d4350b8df3e0a74558169c696cbb837ce7f /libs/ardour/ardour/midi_ui.h | |
parent | 90f95df20707995e267bd624b28980cfd9200bed (diff) |
major design changes: use glib event loop for MIDI thread/UI; rework design of BaseUI and AbstractUI; solo & mute are both temporarily broken; OSC control up next; may segfault during exit
git-svn-id: svn://localhost/ardour2/branches/3.0@6328 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/midi_ui.h')
-rw-r--r-- | libs/ardour/ardour/midi_ui.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/libs/ardour/ardour/midi_ui.h b/libs/ardour/ardour/midi_ui.h new file mode 100644 index 0000000000..e1f322ddd1 --- /dev/null +++ b/libs/ardour/ardour/midi_ui.h @@ -0,0 +1,52 @@ +#ifndef __libardour_midi_ui_h__ +#define __libardour_midi_ui_h__ + +#include <list> +#include "pbd/abstract_ui.h" + +namespace MIDI { + class port; +} + +namespace ARDOUR { + +class Session; + +/* this is mostly a placeholder because I suspect that at some + point we will want to add more members to accomodate + certain types of requests to the MIDI UI +*/ + +struct MidiUIRequest : public BaseUI::BaseRequestObject { + public: + MidiUIRequest () {} + ~MidiUIRequest() {} +}; + +class MidiControlUI : public AbstractUI<MidiUIRequest> +{ + public: + MidiControlUI (Session& s); + ~MidiControlUI (); + + static BaseUI::RequestType PortChange; + + void change_midi_ports (); + + protected: + void thread_init (); + void do_request (MidiUIRequest*); + + private: + typedef std::list<Glib::RefPtr<Glib::IOSource> > PortSources; + PortSources port_sources; + ARDOUR::Session& _session; + + bool midi_input_handler (Glib::IOCondition, MIDI::Port*); + void reset_ports (); + void clear_ports (); +}; + +} + +#endif /* __libardour_midi_ui_h__ */ |