13
0

NO-OP: whitespace

This commit is contained in:
Robin Gareus 2019-09-06 20:43:20 +02:00
parent 33c251a623
commit 66ceb2b3c7
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -22,18 +22,18 @@
#ifndef ardour_control_protocols_h #ifndef ardour_control_protocols_h
#define ardour_control_protocols_h #define ardour_control_protocols_h
#include <list>
#include <string> #include <string>
#include <vector> #include <vector>
#include <list>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include "pbd/stateful.h"
#include "pbd/signals.h" #include "pbd/signals.h"
#include "pbd/stateful.h"
#include "control_protocol/visibility.h"
#include "control_protocol/basic_ui.h" #include "control_protocol/basic_ui.h"
#include "control_protocol/types.h" #include "control_protocol/types.h"
#include "control_protocol/visibility.h"
namespace ARDOUR { namespace ARDOUR {
@ -44,14 +44,14 @@ class Stripable;
class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI
{ {
public: public:
ControlProtocol (Session&, std::string name); ControlProtocol (Session&, std::string name);
virtual ~ControlProtocol(); virtual ~ControlProtocol ();
virtual std::string name() const { return _name; } virtual std::string name () const { return _name; }
virtual int set_active (bool yn); virtual int set_active (bool yn);
virtual bool active() const { return _active; } virtual bool active () const { return _active; }
virtual int set_feedback (bool /*yn*/) { return 0; } virtual int set_feedback (bool /*yn*/) { return 0; }
virtual bool get_feedback () const { return false; } virtual bool get_feedback () const { return false; }
@ -63,8 +63,8 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope
PBD::Signal0<void> ActiveChanged; PBD::Signal0<void> ActiveChanged;
/* signals that a control protocol can emit and other (presumably graphical) /* signals that a control protocol can emit and other (presumably graphical)
user interfaces can respond to * user interfaces can respond to
*/ */
static PBD::Signal0<void> ZoomToSession; static PBD::Signal0<void> ZoomToSession;
static PBD::Signal0<void> ZoomIn; static PBD::Signal0<void> ZoomIn;
@ -72,8 +72,8 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope
static PBD::Signal0<void> Enter; static PBD::Signal0<void> Enter;
static PBD::Signal0<void> Undo; static PBD::Signal0<void> Undo;
static PBD::Signal0<void> Redo; static PBD::Signal0<void> Redo;
static PBD::Signal1<void,float> ScrollTimeline; static PBD::Signal1<void, float> ScrollTimeline;
static PBD::Signal1<void,uint32_t> GotoView; static PBD::Signal1<void, uint32_t> GotoView;
static PBD::Signal0<void> CloseDialog; static PBD::Signal0<void> CloseDialog;
static PBD::Signal0<void> VerticalZoomInAll; static PBD::Signal0<void> VerticalZoomInAll;
static PBD::Signal0<void> VerticalZoomOutAll; static PBD::Signal0<void> VerticalZoomOutAll;
@ -82,11 +82,11 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope
static PBD::Signal0<void> StepTracksDown; static PBD::Signal0<void> StepTracksDown;
static PBD::Signal0<void> StepTracksUp; static PBD::Signal0<void> StepTracksUp;
static PBD::Signal1<void,boost::shared_ptr<ARDOUR::Stripable> > AddStripableToSelection; static PBD::Signal1<void, boost::shared_ptr<ARDOUR::Stripable> > AddStripableToSelection;
static PBD::Signal1<void,boost::shared_ptr<ARDOUR::Stripable> > SetStripableSelection; static PBD::Signal1<void, boost::shared_ptr<ARDOUR::Stripable> > SetStripableSelection;
static PBD::Signal1<void,boost::shared_ptr<ARDOUR::Stripable> > ToggleStripableSelection; static PBD::Signal1<void, boost::shared_ptr<ARDOUR::Stripable> > ToggleStripableSelection;
static PBD::Signal1<void,boost::shared_ptr<ARDOUR::Stripable> > RemoveStripableFromSelection; static PBD::Signal1<void, boost::shared_ptr<ARDOUR::Stripable> > RemoveStripableFromSelection;
static PBD::Signal0<void> ClearStripableSelection; static PBD::Signal0<void> ClearStripableSelection;
static boost::shared_ptr<ARDOUR::Stripable> first_selected_stripable (); static boost::shared_ptr<ARDOUR::Stripable> first_selected_stripable ();
static void set_first_selected_stripable (boost::shared_ptr<ARDOUR::Stripable>); static void set_first_selected_stripable (boost::shared_ptr<ARDOUR::Stripable>);
@ -118,7 +118,7 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope
bool route_get_rec_enable (uint32_t table_index); bool route_get_rec_enable (uint32_t table_index);
float route_get_gain (uint32_t table_index); float route_get_gain (uint32_t table_index);
void route_set_gain (uint32_t table_index, float); void route_set_gain (uint32_t table_index, float);
float route_get_effective_gain (uint32_t table_index); float route_get_effective_gain (uint32_t table_index);
float route_get_peak_input_power (uint32_t table_index, uint32_t which_input); float route_get_peak_input_power (uint32_t table_index, uint32_t which_input);
@ -133,60 +133,62 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope
virtual std::list<boost::shared_ptr<ARDOUR::Bundle> > bundles (); virtual std::list<boost::shared_ptr<ARDOUR::Bundle> > bundles ();
virtual bool has_editor () const { return false; } virtual bool has_editor () const { return false; }
virtual void* get_gui() const { return 0; } virtual void* get_gui () const { return 0; }
virtual void tear_down_gui() { } virtual void tear_down_gui () {}
XMLNode& get_state (); XMLNode& get_state ();
int set_state (XMLNode const &, int version); int set_state (XMLNode const&, int version);
static const std::string state_node_name; static const std::string state_node_name;
static StripableNotificationList const & last_selected() { return _last_selected; }
static void notify_stripable_selection_changed (StripableNotificationListPtr);
protected: static StripableNotificationList const& last_selected () { return _last_selected; }
std::vector<boost::shared_ptr<ARDOUR::Route> > route_table; static void notify_stripable_selection_changed (StripableNotificationListPtr);
std::string _name;
protected:
void next_track (uint32_t initial_id); void next_track (uint32_t initial_id);
void prev_track (uint32_t initial_id); void prev_track (uint32_t initial_id);
private: std::vector<boost::shared_ptr<ARDOUR::Route> > route_table;
LIBCONTROLCP_LOCAL ControlProtocol (const ControlProtocol&); /* noncopyable */ std::string _name;
bool _active;
static Glib::Threads::Mutex special_stripable_mutex; private:
static boost::weak_ptr<ARDOUR::Stripable> _leftmost_mixer_stripable; LIBCONTROLCP_LOCAL ControlProtocol (const ControlProtocol&); /* noncopyable */
static boost::weak_ptr<ARDOUR::Stripable> _first_selected_stripable;
static StripableNotificationList _last_selected; bool _active;
static PBD::ScopedConnection selection_connection;
static bool selection_connected; static Glib::Threads::Mutex special_stripable_mutex;
static boost::weak_ptr<ARDOUR::Stripable> _leftmost_mixer_stripable;
static boost::weak_ptr<ARDOUR::Stripable> _first_selected_stripable;
static StripableNotificationList _last_selected;
static PBD::ScopedConnection selection_connection;
static bool selection_connected;
}; };
extern "C" { extern "C" {
class ControlProtocolDescriptor { class ControlProtocolDescriptor
public: {
const char* name; /* descriptive */ public:
const char* id; /* unique and version-specific */ const char* name; /* descriptive */
void* ptr; /* protocol can store a value here */ const char* id; /* unique and version-specific */
void* module; /* not for public access */ void* ptr; /* protocol can store a value here */
int mandatory; /* if non-zero, always load and do not make optional */ void* module; /* not for public access */
bool supports_feedback; /* if true, protocol has toggleable feedback mechanism */ int mandatory; /* if non-zero, always load and do not make optional */
bool (*probe)(ControlProtocolDescriptor*); bool supports_feedback; /* if true, protocol has toggleable feedback mechanism */
ControlProtocol* (*initialize)(ControlProtocolDescriptor*,Session*); bool (*probe) (ControlProtocolDescriptor*);
void (*destroy)(ControlProtocolDescriptor*,ControlProtocol*); ControlProtocol* (*initialize) (ControlProtocolDescriptor*, Session*);
/* this is required if the control protocol connects to signals void (*destroy) (ControlProtocolDescriptor*, ControlProtocol*);
from libardour. they all do. It should allocate a /* this is required if the control protocol connects to signals
type-specific request buffer for the calling thread, and * from libardour. they all do. It should allocate a
store it in a thread-local location that will be used to * type-specific request buffer for the calling thread, and
find it when sending the event loop a message * store it in a thread-local location that will be used to
(e.g. call_slot()). It should also return the allocated * find it when sending the event loop a message
buffer as a void*. * (e.g. call_slot()). It should also return the allocated
*/ * buffer as a void*.
void* (*request_buffer_factory)(uint32_t); */
}; void* (*request_buffer_factory) (uint32_t);
};
} }
} }
#endif // ardour_control_protocols_h #endif // ardour_control_protocols_h