diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-05-23 19:54:52 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-05-23 19:54:52 +0000 |
commit | 2fba6d0925307abd11be9d8f7a8d2722a2b6ccbd (patch) | |
tree | 485eed909963636b010d5f1e24527a6a4b377a42 /libs/ardour/ardour | |
parent | a222c19737fa2d3fce3971350c1a18906635e29a (diff) |
breakout control protocol code into LGPL library; fix panner buttons even more than nick did, plus some other bits and pieces
git-svn-id: svn://localhost/trunk/ardour2@522 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/basic_ui.h | 43 | ||||
-rw-r--r-- | libs/ardour/ardour/control_protocol.h | 99 | ||||
-rw-r--r-- | libs/ardour/ardour/osc.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 3 |
4 files changed, 5 insertions, 143 deletions
diff --git a/libs/ardour/ardour/basic_ui.h b/libs/ardour/ardour/basic_ui.h deleted file mode 100644 index a6ab536893..0000000000 --- a/libs/ardour/ardour/basic_ui.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __ardour_basic_ui_h__ -#define __ardour_basic_ui_h__ - -namespace ARDOUR { - class Session; -} - -class BasicUI { - public: - BasicUI (ARDOUR::Session&); - virtual ~BasicUI (); - - void add_marker (); - - /* transport control */ - - void loop_toggle (); - void goto_start (); - void goto_end (); - void rewind (); - void ffwd (); - void transport_stop (); - void transport_play (); - void set_transport_speed (float speed); - float get_transport_speed (float speed); - - void save_state (); - void prev_marker (); - void next_marker (); - void undo (); - void redo (); - void toggle_punch_in (); - void toggle_punch_out (); - - void rec_enable_toggle (); - void toggle_all_rec_enables (); - - protected: - BasicUI (); - ARDOUR::Session* session; -}; - -#endif /* __ardour_basic_ui_h__ */ diff --git a/libs/ardour/ardour/control_protocol.h b/libs/ardour/ardour/control_protocol.h deleted file mode 100644 index 38c6261af5..0000000000 --- a/libs/ardour/ardour/control_protocol.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef ardour_control_protocols_h -#define ardour_control_protocols_h - -#include <string> -#include <vector> -#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; - - /* the model here is as follows: - - we imagine most control surfaces being able to control - from 1 to N tracks at a time, with a session that may - contain 1 to M tracks, where M may be smaller, larger or - equal to N. - - the control surface has a fixed set of physical controllers - which can potentially be mapped onto different tracks/busses - via some mechanism. - - therefore, the control protocol object maintains - a table that reflects the current mapping between - the controls and route object. - */ - - void set_route_table_size (uint32_t size); - void set_route_table (uint32_t table_index, ARDOUR::Route*); - - void route_set_rec_enable (uint32_t table_index, bool yn); - bool route_get_rec_enable (uint32_t table_index); - - float route_get_gain (uint32_t table_index); - void route_set_gain (uint32_t table_index, float); - float route_get_effective_gain (uint32_t table_index); - - float route_get_peak_input_power (uint32_t table_index, uint32_t which_input); - - bool route_get_muted (uint32_t table_index); - void route_set_muted (uint32_t table_index, bool); - - bool route_get_soloed (uint32_t table_index); - void route_set_soloed (uint32_t table_index, bool); - - std::string route_get_name (uint32_t table_index); - - protected: - std::vector<ARDOUR::Route*> route_table; - std::string _name; - bool _active; - - void next_track (uint32_t initial_id); - void prev_track (uint32_t initial_id); -}; - -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 */ - int mandatory; /* if non-zero, always load and do not make optional */ - ControlProtocol* (*initialize)(ControlProtocolDescriptor*,Session*); - void (*destroy)(ControlProtocolDescriptor*,ControlProtocol*); - - }; -} - -} - -#endif // ardour_control_protocols_h diff --git a/libs/ardour/ardour/osc.h b/libs/ardour/ardour/osc.h index 66c28eb8a5..69ec76eac6 100644 --- a/libs/ardour/ardour/osc.h +++ b/libs/ardour/ardour/osc.h @@ -31,7 +31,8 @@ #include <sigc++/sigc++.h> #include <ardour/types.h> -#include <ardour/basic_ui.h> + +#include "basic_ui.h" namespace ARDOUR { class Session; diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 57f01bf690..0d968fcff1 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -360,6 +360,9 @@ class Session : public sigc::trackable, public Stateful void request_diskstream_speed (DiskStream&, float speed); void request_input_change_handling (); + bool locate_pending() const { return static_cast<bool>(post_transport_work&PostTransportLocate); } + bool transport_locked () const; + int wipe (); int wipe_diskstream (DiskStream *); |