mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
use visibility macros to control visibility in control surface DLL/DSO's
This commit is contained in:
parent
4898b95e93
commit
a435e6357f
12 changed files with 38 additions and 53 deletions
|
|
@ -33,13 +33,22 @@
|
|||
#include "control_protocol/basic_ui.h"
|
||||
#include "control_protocol/types.h"
|
||||
|
||||
#include "ardour/visibility.h"
|
||||
|
||||
#ifdef ARDOURSURFACE_DLL_EXPORTS // defined if we are building the ARDOUR surface DLLs (instead of using them)
|
||||
#define ARDOURSURFACE_API LIBARDOUR_HELPER_DLL_EXPORT
|
||||
#else
|
||||
#define ARDOURSURFACE_API LIBARDOUR_HELPER_DLL_IMPORT
|
||||
#endif
|
||||
#define ARDOURSURFACE_LOCAL LIBARDOUR_HELPER_DLL_LOCAL
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
class Route;
|
||||
class Session;
|
||||
class Bundle;
|
||||
|
||||
class ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI
|
||||
class ARDOURSURFACE_API ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI
|
||||
{
|
||||
public:
|
||||
ControlProtocol (Session&, std::string name);
|
||||
|
|
@ -142,7 +151,7 @@ class ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList,
|
|||
void prev_track (uint32_t initial_id);
|
||||
|
||||
private:
|
||||
ControlProtocol (const ControlProtocol&); /* noncopyable */
|
||||
ARDOURSURFACE_LOCAL ControlProtocol (const ControlProtocol&); /* noncopyable */
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ def build(bld):
|
|||
obj.export_includes = ['.', './control_protocol' ]
|
||||
obj.cxxflags = '-DPACKAGE="ardour_cp" -fPIC'
|
||||
obj.includes = ['.', './control_protocol']
|
||||
obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ]
|
||||
obj.name = 'libardour_cp'
|
||||
obj.target = 'ardourcp'
|
||||
obj.use = 'ardour libtimecode'
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
using namespace ARDOUR;
|
||||
|
||||
ControlProtocol*
|
||||
ControlProtocol* ARDOURSURFACE_LOCAL
|
||||
new_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s)
|
||||
{
|
||||
GenericMidiControlProtocol* gmcp;
|
||||
|
|
@ -43,13 +43,13 @@ new_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s
|
|||
return gmcp;
|
||||
}
|
||||
|
||||
void
|
||||
void ARDOURSURFACE_LOCAL
|
||||
delete_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/, ControlProtocol* cp)
|
||||
{
|
||||
delete cp;
|
||||
}
|
||||
|
||||
bool
|
||||
bool ARDOURSURFACE_LOCAL
|
||||
probe_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/)
|
||||
{
|
||||
return GenericMidiControlProtocol::probe ();
|
||||
|
|
@ -67,11 +67,5 @@ static ControlProtocolDescriptor generic_midi_descriptor = {
|
|||
destroy : delete_generic_midi_protocol
|
||||
};
|
||||
|
||||
|
||||
extern "C" {
|
||||
ControlProtocolDescriptor*
|
||||
protocol_descriptor () {
|
||||
return &generic_midi_descriptor;
|
||||
}
|
||||
}
|
||||
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &generic_midi_descriptor; }
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ def build(bld):
|
|||
obj.includes = ['.', './generic_midi']
|
||||
obj.name = 'libardour_generic_midi'
|
||||
obj.target = 'ardour_generic_midi'
|
||||
obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ]
|
||||
obj.uselib = 'GTKMM GTK GDK'
|
||||
obj.use = 'libardour libardour_cp libgtkmm2ext libpbd'
|
||||
obj.vnum = LIBARDOUR_GENERIC_MIDI_LIB_VERSION
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ using namespace ARDOUR;
|
|||
using namespace PBD;
|
||||
using namespace std;
|
||||
|
||||
ControlProtocol*
|
||||
static ControlProtocol*
|
||||
new_mackie_protocol (ControlProtocolDescriptor*, Session* s)
|
||||
{
|
||||
MackieControlProtocol* mcp = 0;
|
||||
|
|
@ -47,7 +47,7 @@ new_mackie_protocol (ControlProtocolDescriptor*, Session* s)
|
|||
return mcp;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
delete_mackie_protocol (ControlProtocolDescriptor*, ControlProtocol* cp)
|
||||
{
|
||||
try
|
||||
|
|
@ -66,7 +66,7 @@ delete_mackie_protocol (ControlProtocolDescriptor*, ControlProtocol* cp)
|
|||
So anything that can be changed in the UI should not be used here to
|
||||
prevent loading of the lib.
|
||||
*/
|
||||
bool
|
||||
static bool
|
||||
probe_mackie_protocol (ControlProtocolDescriptor*)
|
||||
{
|
||||
return MackieControlProtocol::probe();
|
||||
|
|
@ -89,11 +89,4 @@ static ControlProtocolDescriptor mackie_descriptor = {
|
|||
};
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
ControlProtocolDescriptor*
|
||||
protocol_descriptor () {
|
||||
return &mackie_descriptor;
|
||||
}
|
||||
|
||||
}
|
||||
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &mackie_descriptor; }
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ def build(bld):
|
|||
# need ../libs because some GTK2 header files require stuff there
|
||||
obj.includes = ['.', '../libs']
|
||||
obj.name = 'libardour_mcp'
|
||||
obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ]
|
||||
obj.target = 'ardour_mcp'
|
||||
obj.uselib = 'GTKMM'
|
||||
obj.use = 'libardour libardour_cp libgtkmm2ext'
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
using namespace ARDOUR;
|
||||
|
||||
ControlProtocol*
|
||||
static ControlProtocol*
|
||||
new_osc_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s)
|
||||
{
|
||||
OSC* osc = new OSC (*s, Config->get_osc_port());
|
||||
|
|
@ -33,13 +33,13 @@ new_osc_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s)
|
|||
return osc;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
delete_osc_protocol (ControlProtocolDescriptor* /*descriptor*/, ControlProtocol* cp)
|
||||
{
|
||||
delete cp;
|
||||
}
|
||||
|
||||
bool
|
||||
static bool
|
||||
probe_osc_protocol (ControlProtocolDescriptor* /*descriptor*/)
|
||||
{
|
||||
return true; // we can always do OSC
|
||||
|
|
@ -57,10 +57,5 @@ static ControlProtocolDescriptor osc_descriptor = {
|
|||
destroy : delete_osc_protocol
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
ControlProtocolDescriptor*
|
||||
protocol_descriptor () {
|
||||
return &osc_descriptor;
|
||||
}
|
||||
}
|
||||
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &osc_descriptor; }
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ def build(bld):
|
|||
obj.cxxflags = '-DPACKAGE="ardour_cp"'
|
||||
obj.includes = ['.', './osc']
|
||||
obj.name = 'libardour_osc'
|
||||
obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ]
|
||||
obj.target = 'ardour_osc'
|
||||
obj.uselib = ' LO '
|
||||
obj.use = 'libardour libardour_cp libpbd'
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
using namespace ARDOUR;
|
||||
|
||||
ControlProtocol*
|
||||
static ControlProtocol*
|
||||
new_tranzport_protocol (ControlProtocolDescriptor* descriptor, Session* s)
|
||||
{
|
||||
TranzportControlProtocol* tcp = new TranzportControlProtocol (*s);
|
||||
|
|
@ -37,13 +37,13 @@ new_tranzport_protocol (ControlProtocolDescriptor* descriptor, Session* s)
|
|||
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
delete_tranzport_protocol (ControlProtocolDescriptor* descriptor, ControlProtocol* cp)
|
||||
{
|
||||
delete cp;
|
||||
}
|
||||
|
||||
bool
|
||||
static bool
|
||||
probe_tranzport_protocol (ControlProtocolDescriptor* descriptor)
|
||||
{
|
||||
return TranzportControlProtocol::probe();
|
||||
|
|
@ -62,10 +62,6 @@ static ControlProtocolDescriptor tranzport_descriptor = {
|
|||
};
|
||||
|
||||
|
||||
extern "C" {
|
||||
ControlProtocolDescriptor*
|
||||
protocol_descriptor () {
|
||||
return &tranzport_descriptor;
|
||||
}
|
||||
}
|
||||
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &tranzport_descriptor; }
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ def build(bld):
|
|||
obj.cxxflags = '-DPACKAGE="ardour_tranzport"'
|
||||
obj.includes = ['.', './tranzport']
|
||||
obj.name = 'libardour_tranzport'
|
||||
obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ]
|
||||
obj.target = 'ardour_tranzport'
|
||||
obj.use = 'libardour libardour_cp'
|
||||
obj.vnum = LIBARDOUR_TRANZPORT_LIB_VERSION
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
ControlProtocol*
|
||||
static ControlProtocol*
|
||||
new_wiimote_protocol (ControlProtocolDescriptor*, Session* s)
|
||||
{
|
||||
WiimoteControlProtocol* wmcp = new WiimoteControlProtocol (*s);
|
||||
|
|
@ -37,13 +37,13 @@ new_wiimote_protocol (ControlProtocolDescriptor*, Session* s)
|
|||
return wmcp;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
delete_wiimote_protocol (ControlProtocolDescriptor* /*descriptor*/, ControlProtocol* cp)
|
||||
{
|
||||
delete cp;
|
||||
}
|
||||
|
||||
bool
|
||||
static bool
|
||||
probe_wiimote_protocol (ControlProtocolDescriptor*)
|
||||
{
|
||||
return WiimoteControlProtocol::probe ();
|
||||
|
|
@ -61,13 +61,5 @@ static ControlProtocolDescriptor wiimote_descriptor = {
|
|||
destroy : delete_wiimote_protocol
|
||||
};
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
ControlProtocolDescriptor*
|
||||
protocol_descriptor () {
|
||||
return &wiimote_descriptor;
|
||||
}
|
||||
|
||||
}
|
||||
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &wiimote_descriptor; }
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ def build(bld):
|
|||
obj.cxxflags = '-DPACKAGE="ardour_wiimote"'
|
||||
obj.includes = ['.', '../libs']
|
||||
obj.name = 'libardour_wiimote'
|
||||
obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ]
|
||||
obj.target = 'ardour_wiimote'
|
||||
obj.uselib = 'GTKMM CWIID'
|
||||
obj.use = 'libardour libardour_cp libgtkmm2ext'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue