Ardour  8.12
midi_ui.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009-2015 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2011 David Robillard <d@drobilla.net>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef __libardour_midi_ui_h__
21 #define __libardour_midi_ui_h__
22 
23 #include <list>
24 
25 #define ABSTRACT_UI_EXPORTS
26 #include "pbd/abstract_ui.h"
27 #include "pbd/signals.h"
28 
29 namespace ARDOUR {
30 
31 class Session;
32 class AsyncMIDIPort;
33 
34 /* this is mostly a placeholder because I suspect that at some
35  point we will want to add more members to accommodate
36  certain types of requests to the MIDI UI
37 */
38 
39 struct LIBARDOUR_API MidiUIRequest : public BaseUI::BaseRequestObject {
40  public:
43 };
44 
45 class LIBARDOUR_API MidiControlUI : public AbstractUI<MidiUIRequest>
46 {
47  public:
50 
51  static MidiControlUI* instance() { return _instance; }
52  static void* request_factory (uint32_t num_requests);
53 
55 
56  protected:
57  void thread_init ();
59 
60  private:
62 
63  bool midi_input_handler (Glib::IOCondition, std::weak_ptr<AsyncMIDIPort>);
64  void reset_ports ();
65  void clear_ports ();
66 
68 };
69 
70 }
71 
72 #endif /* __libardour_midi_ui_h__ */
void do_request(MidiUIRequest *)
ARDOUR::Session & _session
Definition: midi_ui.h:61
static MidiControlUI * instance()
Definition: midi_ui.h:51
MidiControlUI(Session &s)
bool midi_input_handler(Glib::IOCondition, std::weak_ptr< AsyncMIDIPort >)
static MidiControlUI * _instance
Definition: midi_ui.h:67
static void * request_factory(uint32_t num_requests)
#define LIBARDOUR_API