13
0

launchpads: add namespacing to make 1-source-2-surfaces work for X and Mini

This commit is contained in:
Paul Davis 2023-11-04 09:29:53 -06:00
parent 9b511ce973
commit 3fc126b891
6 changed files with 38 additions and 5 deletions

View File

@ -37,9 +37,16 @@
#include "pbd/i18n.h"
#ifdef LAUNCHPAD_MINI
#define LAUNCHPAD_NAMESPACE LP_MINI
#else
#define LAUNCHPAD_NAMESPACE LP_X
#endif
using namespace PBD;
using namespace ARDOUR;
using namespace ArdourSurface;
using namespace ArdourSurface::LAUNCHPAD_NAMESPACE;
using namespace Gtk;
using namespace Gtkmm2ext;

View File

@ -39,7 +39,7 @@ namespace Gtk {
#include "lpx.h"
namespace ArdourSurface {
namespace ArdourSurface { namespace LAUNCHPAD_NAMESPACE {
class LPX_GUI : public Gtk::VBox
{
@ -96,6 +96,6 @@ private:
#endif
};
}
} } /* namespaces */
#endif /* __ardour_lpx_gui_h__ */

View File

@ -25,9 +25,16 @@ o * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include "control_protocol/control_protocol.h"
#include "lpx.h"
#ifdef LAUNCHPAD_MINI
#define LAUNCHPAD_NAMESPACE LP_MINI
#else
#define LAUNCHPAD_NAMESPACE LP_X
#endif
using namespace ARDOUR;
using namespace PBD;
using namespace ArdourSurface;
using namespace ArdourSurface::LAUNCHPAD_NAMESPACE;
static ControlProtocol*
new_lpmini (Session* s)

View File

@ -25,9 +25,15 @@
#include "control_protocol/control_protocol.h"
#include "lpx.h"
#ifdef LAUNCHPAD_MINI
#define LAUNCHPAD_NAMESPACE LP_MINI
#else
#define LAUNCHPAD_NAMESPACE LP_X
#endif
using namespace ARDOUR;
using namespace PBD;
using namespace ArdourSurface;
using namespace ArdourSurface::LAUNCHPAD_NAMESPACE;
static ControlProtocol*
new_lpx (Session* s)

View File

@ -67,10 +67,17 @@
#define random() rand()
#endif
#ifdef LAUNCHPAD_MINI
#define LAUNCHPAD_NAMESPACE LP_MINI
#else
#define LAUNCHPAD_NAMESPACE LP_X
#endif
using namespace ARDOUR;
using namespace PBD;
using namespace Glib;
using namespace ArdourSurface;
using namespace ArdourSurface::LAUNCHPAD_NAMESPACE;
using namespace Gtkmm2ext;
#include "pbd/abstract_ui.cc" // instantiate template

View File

@ -56,7 +56,13 @@ namespace ARDOUR {
class Trigger;
}
namespace ArdourSurface {
#ifdef LAUNCHPAD_MINI
#define LAUNCHPAD_NAMESPACE LP_MINI
#else
#define LAUNCHPAD_NAMESPACE LP_X
#endif
namespace ArdourSurface { namespace LAUNCHPAD_NAMESPACE {
class LPX_GUI;
@ -373,6 +379,6 @@ class LaunchPadX : public MIDISurface
};
} /* namespace */
} } /* namespaces */
#endif /* __ardour_lpx_h__ */