blob: 70c7d2dc0de2370e22864e51a5f3ecebf6876832 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#ifndef ardour_control_protocols_h
#define ardour_control_protocols_h
#include <string>
#include <list>
#include <sigc++/sigc++.h>
#include <ardour/basic_ui.h>
namespace ARDOUR {
class Route;
class Session;
class ControlProtocol : public sigc::trackable, public BasicUI {
public:
ControlProtocol (Session&, std::string name);
virtual ~ControlProtocol();
std::string name() const { return _name; }
virtual int set_active (bool yn) = 0;
bool get_active() const { return _active; }
sigc::signal<void> ActiveChanged;
/* signals that a control protocol can emit and other (presumably graphical)
user interfaces can respond to
*/
static sigc::signal<void> ZoomToSession;
static sigc::signal<void> ZoomIn;
static sigc::signal<void> ZoomOut;
static sigc::signal<void> Enter;
static sigc::signal<void,float> ScrollTimeline;
protected:
std::string _name;
bool _active;
};
extern "C" {
struct ControlProtocolDescriptor {
const char* name; /* descriptive */
const char* id; /* unique and version-specific */
void* ptr; /* protocol can store a value here */
void* module; /* not for public access */
ControlProtocol* (*initialize)(ControlProtocolDescriptor*,Session*);
void (*destroy)(ControlProtocolDescriptor*,ControlProtocol*);
};
}
}
#endif // ardour_control_protocols_h
|