Merge remote-tracking branch 'remotes/origin/cairocanvas' into windows
[ardour.git] / libs / ardour / ardour / panner.h
index c23d3bd33fbe97b0e3331e0a34b9c9a24e93da53..024dcd150c802e2ab74630ff4e8edb046fadf4f4 100644 (file)
 #include "ardour/types.h"
 #include "ardour/automation_control.h"
 #include "ardour/automatable.h"
+#include "ardour/visibility.h"
 
-#if !defined(ARDOURPANNER_IS_IN_WINDLL)
-       #if defined(COMPILER_MSVC) || defined(COMPILER_MINGW)
-       // If you need '__declspec' compatibility, add extra compilers to the above as necessary
-               #define ARDOURPANNER_IS_IN_WINDLL 1
-       #else
-               #define ARDOURPANNER_IS_IN_WINDLL 0
-       #endif
-#endif
-
-#if ARDOURPANNER_IS_IN_WINDLL && !defined(ARDOURPANNER_API)
-       #if defined(BUILDING_ARDOURPANNERS)
-               #define ARDOURPANNER_API __declspec(dllexport)
-               #define ARDOURPANNER_APICALLTYPE __thiscall
-               #define ARDOURPANNER_CAPICALLTYPE __cdecl
-       #elif defined(COMPILER_MSVC) || defined(COMPILER_MINGW) // Probably needs Cygwin too, at some point
-               #define ARDOURPANNER_API __declspec(dllimport)
-               #define ARDOURPANNER_APICALLTYPE __thiscall
-               #define ARDOURPANNER_CAPICALLTYPE __cdecl
-       #else
-               #error "Attempting to define __declspec with an incompatible compiler !"
-       #endif
-#elif !defined(ARDOURPANNER_API)
-       // Other compilers / platforms could be accommodated here
-       #define ARDOURPANNER_API
-       #define ARDOURPANNER_APICALLTYPE
-       #define ARDOURPANNER_CAPICALLTYPE
-#endif
+#ifdef ARDOURPANNER_DLL_EXPORTS // defined if we are building the ARDOUR Panners DLLs (instead of using them)
+    #define ARDOURPANNER_API LIBARDOUR_HELPER_DLL_EXPORT
+#else
+    #define ARDOURPANNER_API LIBARDOUR_HELPER_DLL_IMPORT
+#endif 
+#define ARDOURPANNER_LOCAL LIBARDOUR_HELPER_DLL_LOCAL
 
 namespace ARDOUR {
 
@@ -95,7 +75,7 @@ public:
           * return false
        */
 
-       virtual bool ARDOURPANNER_APICALLTYPE clamp_position (double&) { return true; }
+       virtual bool clamp_position (double&) { return true; }
        virtual bool clamp_width (double&) { return true; }
        virtual bool clamp_elevation (double&) { return true; }
 
@@ -103,7 +83,7 @@ public:
        virtual std::pair<double, double> width_range () const { return std::make_pair (-DBL_MAX, DBL_MAX); }
        virtual std::pair<double, double> elevation_range () const { return std::make_pair (-DBL_MAX, DBL_MAX); }
 
-       virtual void ARDOURPANNER_APICALLTYPE set_position (double) { }
+       virtual void set_position (double) { }
        virtual void set_width (double) { }
        virtual void set_elevation (double) { }