Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
21 
22 #include <list>
23 
24 #define ABSTRACT_UI_EXPORTS
25 #include "pbd/abstract_ui.h"
26 #include "pbd/signals.h"
27 
29 
30 namespace ARDOUR {
31 
32 class Session;
33 class AsyncMIDIPort;
34 
35 /* this is mostly a placeholder because I suspect that at some
36  point we will want to add more members to accommodate
37  certain types of requests to the MIDI UI
38 */
39 
40 struct LIBARDOUR_API MidiUIRequest : public BaseUI::BaseRequestObject {
41  public:
44 };
45 
46 class LIBARDOUR_API MidiControlUI : public AbstractUI<MidiUIRequest>
47 {
48  public:
51 
52  static MidiControlUI* instance() { return _instance; }
53  static void* request_factory (uint32_t num_requests);
54 
56 
57  protected:
58  void thread_init ();
60 
61  private:
63 
64  bool midi_input_handler (Glib::IOCondition, std::weak_ptr<AsyncMIDIPort>);
65  void reset_ports ();
66  void clear_ports ();
67 
69 };
70 
71 }
72 
void do_request(MidiUIRequest *)
ARDOUR::Session & _session
Definition: midi_ui.h:62
static MidiControlUI * instance()
Definition: midi_ui.h:52
MidiControlUI(Session &s)
bool midi_input_handler(Glib::IOCondition, std::weak_ptr< AsyncMIDIPort >)
static MidiControlUI * _instance
Definition: midi_ui.h:68
static void * request_factory(uint32_t num_requests)
#define LIBARDOUR_API