diff options
421 files changed, 2170 insertions, 1153 deletions
diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 011126da64..07ff4f4be3 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -256,7 +256,8 @@ def configure(conf): autowaf.build_version_files( path_prefix + 'version.h', path_prefix + 'version.cc', - 'gtk2_ardour', conf.env['MAJOR'], conf.env['MINOR'], 0) + 'gtk2_ardour', conf.env['MAJOR'], conf.env['MINOR'], 0, + '', '') autowaf.configure(conf) if Options.options.dist_target == 'auto': @@ -394,7 +395,21 @@ def build(bld): obj.source = gtk2_ardour_sources obj.target = 'ardour-' + bld.env['VERSION'] obj.includes = ['.'] - + obj.defines = [] + + # if our internal libraries are built as DLL's, define + # the macros that activate the right stuff in headers + # for export/visibility to work on all platforms. + + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBPBD_DLL=1', + 'LIBARDOUR_DLL=1', + 'LIBMIDIPP_DLL=1', + 'LIBARDOUR_DLL=1', + 'LIBARDOUR_CP_DLL=1', + 'LIBGTKMM2EXT_DLL=1', + 'LIBEVORAL_DLL=1', + ] # continue with setup of obj, which could be a shared library # or an executable. @@ -416,7 +431,7 @@ def build(bld): if sys.platform == 'darwin': obj.uselib += ' AUDIOUNITS OSX GTKOSX' obj.use += ' libappleutility' - obj.defines = [ + obj.defines += [ 'PACKAGE="' + I18N_PACKAGE + '"', 'VERSIONSTRING="' + bld.env['VERSION'] + '"', 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h index e21cf62d62..f6a15666e9 100644 --- a/libs/ardour/ardour/amp.h +++ b/libs/ardour/ardour/amp.h @@ -19,6 +19,7 @@ #ifndef __ardour_amp_h__ #define __ardour_amp_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/chan_count.h" #include "ardour/processor.h" @@ -32,7 +33,7 @@ class IO; /** Applies a declick operation to all audio inputs, passing the same number of * audio outputs, and passing through any other types unchanged. */ -class Amp : public Processor { +class LIBARDOUR_API Amp : public Processor { public: Amp(Session& s); diff --git a/libs/ardour/ardour/analyser.h b/libs/ardour/ardour/analyser.h index 51adea67b9..cef71186cc 100644 --- a/libs/ardour/ardour/analyser.h +++ b/libs/ardour/ardour/analyser.h @@ -23,13 +23,15 @@ #include <glibmm/threads.h> #include <boost/shared_ptr.hpp> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class AudioFileSource; class Source; class TransientDetector; -class Analyser { +class LIBARDOUR_API Analyser { public: Analyser(); diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h index 80bdf9d80e..90a6272fac 100644 --- a/libs/ardour/ardour/ardour.h +++ b/libs/ardour/ardour/ardour.h @@ -34,7 +34,9 @@ #include "pbd/locale_guard.h" #include "pbd/stateful.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" +#include "ardour/libardour_visibility.h" #include <jack/jack.h> @@ -47,8 +49,8 @@ namespace ARDOUR { class AudioEngine; - extern PBD::Signal1<void,std::string> BootMessage; - extern PBD::Signal0<void> GUIIdle; + LIBARDOUR_API extern PBD::Signal1<void,std::string> BootMessage; + LIBARDOUR_API extern PBD::Signal0<void> GUIIdle; /** * @param with_vst true to enable VST Support @@ -58,27 +60,27 @@ namespace ARDOUR { * * @return true if Ardour library was successfully initialized */ - bool init (bool with_vst, bool try_optimization, const char* localedir); - void init_post_engine (); - void cleanup (); - bool no_auto_connect (); - void make_property_quarks (); + LIBARDOUR_API bool init (bool with_vst, bool try_optimization, const char* localedir); + LIBARDOUR_API void init_post_engine (); + LIBARDOUR_API void cleanup (); + LIBARDOUR_API bool no_auto_connect (); + LIBARDOUR_API void make_property_quarks (); - extern PBD::PropertyChange bounds_change; + LIBARDOUR_API extern PBD::PropertyChange bounds_change; - extern const char* const ardour_config_info; + LIBARDOUR_API extern const char* const ardour_config_info; - void find_bindings_files (std::map<std::string,std::string>&); + LIBARDOUR_API void find_bindings_files (std::map<std::string,std::string>&); /* these only impact bundled installations */ - std::string translation_enable_path (); - bool translations_are_enabled (); - bool set_translations_enabled (bool); + LIBARDOUR_API std::string translation_enable_path (); + LIBARDOUR_API bool translations_are_enabled (); + LIBARDOUR_API bool set_translations_enabled (bool); - microseconds_t get_microseconds (); + LIBARDOUR_API microseconds_t get_microseconds (); - void setup_fpu (); - std::vector<SyncSource> get_available_sync_options(); + LIBARDOUR_API void setup_fpu (); + LIBARDOUR_API std::vector<SyncSource> get_available_sync_options(); } #endif /* __ardour_ardour_h__ */ diff --git a/libs/ardour/ardour/async_midi_port.h b/libs/ardour/ardour/async_midi_port.h index 896301b398..c5babf6135 100644 --- a/libs/ardour/ardour/async_midi_port.h +++ b/libs/ardour/ardour/async_midi_port.h @@ -34,11 +34,12 @@ #include "midi++/parser.h" #include "midi++/port.h" +#include "ardour/libardour_visibility.h" #include "ardour/midi_port.h" namespace ARDOUR { - class AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port { +class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port { public: AsyncMIDIPort (std::string const &, PortFlags); diff --git a/libs/ardour/ardour/audio_backend.h b/libs/ardour/ardour/audio_backend.h index cbe0bfce50..175fc5bbf3 100644 --- a/libs/ardour/ardour/audio_backend.h +++ b/libs/ardour/ardour/audio_backend.h @@ -28,6 +28,7 @@ #include <boost/function.hpp> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/audioengine.h" #include "ardour/port_engine.h" @@ -42,7 +43,7 @@ namespace ARDOUR { -class AudioBackend : public PortEngine { +class LIBARDOUR_API AudioBackend : public PortEngine { public: AudioBackend (AudioEngine& e) : PortEngine (e), engine (e) {} @@ -461,7 +462,7 @@ class AudioBackend : public PortEngine { AudioEngine& engine; }; -struct AudioBackendInfo { +struct LIBARDOUR_API AudioBackendInfo { const char* name; /** Using arg1 and arg2, initialize this audiobackend. diff --git a/libs/ardour/ardour/audio_buffer.h b/libs/ardour/ardour/audio_buffer.h index 42aba607f9..58157a7919 100644 --- a/libs/ardour/ardour/audio_buffer.h +++ b/libs/ardour/ardour/audio_buffer.h @@ -27,7 +27,7 @@ namespace ARDOUR { /** Buffer containing audio data. */ -class AudioBuffer : public Buffer +class LIBARDOUR_API AudioBuffer : public Buffer { public: AudioBuffer(size_t capacity); diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h index 5a856e9b36..6741ba0ed4 100644 --- a/libs/ardour/ardour/audio_diskstream.h +++ b/libs/ardour/ardour/audio_diskstream.h @@ -53,7 +53,7 @@ class AudioPlaylist; class AudioFileSource; class IO; -class AudioDiskstream : public Diskstream +class LIBARDOUR_API AudioDiskstream : public Diskstream { public: AudioDiskstream (Session &, const std::string& name, Diskstream::Flag f = Recordable); diff --git a/libs/ardour/ardour/audio_library.h b/libs/ardour/ardour/audio_library.h index 2009ec39a7..6397821720 100644 --- a/libs/ardour/ardour/audio_library.h +++ b/libs/ardour/ardour/audio_library.h @@ -24,9 +24,11 @@ #include <map> #include <vector> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class AudioLibrary +class LIBARDOUR_API AudioLibrary { public: AudioLibrary (); @@ -43,7 +45,7 @@ class AudioLibrary std::string src; }; -extern AudioLibrary* Library; +LIBARDOUR_API extern AudioLibrary* Library; } // ARDOUR namespace diff --git a/libs/ardour/ardour/audio_playlist_importer.h b/libs/ardour/ardour/audio_playlist_importer.h index 011bfe39b8..a6d68b9c73 100644 --- a/libs/ardour/ardour/audio_playlist_importer.h +++ b/libs/ardour/ardour/audio_playlist_importer.h @@ -38,7 +38,7 @@ class AudioRegionImporter; class AudioPlaylistImporter; class Session; -class AudioPlaylistImportHandler : public ElementImportHandler +class LIBARDOUR_API AudioPlaylistImportHandler : public ElementImportHandler { public: typedef boost::shared_ptr<AudioPlaylistImporter> PlaylistPtr; @@ -57,7 +57,7 @@ class AudioPlaylistImportHandler : public ElementImportHandler AudioRegionImportHandler & region_handler; }; -class UnusedAudioPlaylistImportHandler : public AudioPlaylistImportHandler +class LIBARDOUR_API UnusedAudioPlaylistImportHandler : public AudioPlaylistImportHandler { public: UnusedAudioPlaylistImportHandler (XMLTree const & source, Session & session, AudioRegionImportHandler & region_handler) : @@ -65,7 +65,7 @@ class UnusedAudioPlaylistImportHandler : public AudioPlaylistImportHandler std::string get_info () const; }; -class AudioPlaylistImporter : public ElementImporter +class LIBARDOUR_API AudioPlaylistImporter : public ElementImporter { public: AudioPlaylistImporter (XMLTree const & source, Session & session, AudioPlaylistImportHandler & handler, XMLNode const & node); diff --git a/libs/ardour/ardour/audio_playlist_source.h b/libs/ardour/ardour/audio_playlist_source.h index c2e1e87f75..6a586fc30d 100644 --- a/libs/ardour/ardour/audio_playlist_source.h +++ b/libs/ardour/ardour/audio_playlist_source.h @@ -32,7 +32,7 @@ namespace ARDOUR { class AudioPlaylist; -class AudioPlaylistSource : public PlaylistSource, public AudioSource { +class LIBARDOUR_API AudioPlaylistSource : public PlaylistSource, public AudioSource { public: virtual ~AudioPlaylistSource (); diff --git a/libs/ardour/ardour/audio_port.h b/libs/ardour/ardour/audio_port.h index f87b134e9e..ca5f183a13 100644 --- a/libs/ardour/ardour/audio_port.h +++ b/libs/ardour/ardour/audio_port.h @@ -26,7 +26,7 @@ namespace ARDOUR { -class AudioPort : public Port +class LIBARDOUR_API AudioPort : public Port { public: ~AudioPort (); diff --git a/libs/ardour/ardour/audio_region_importer.h b/libs/ardour/ardour/audio_region_importer.h index b3bcb05668..d1a965a5ee 100644 --- a/libs/ardour/ardour/audio_region_importer.h +++ b/libs/ardour/ardour/audio_region_importer.h @@ -39,7 +39,7 @@ class Region; class Session; class Source; -class AudioRegionImportHandler : public ElementImportHandler +class LIBARDOUR_API AudioRegionImportHandler : public ElementImportHandler { public: // Inerface implementation @@ -69,7 +69,7 @@ class AudioRegionImportHandler : public ElementImportHandler IdMap id_map; }; -class AudioRegionImporter : public ElementImporter +class LIBARDOUR_API AudioRegionImporter : public ElementImporter { public: AudioRegionImporter (XMLTree const & source, Session & session, AudioRegionImportHandler & handler, XMLNode const & node); diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h index ada58e8ebe..1ecec88f89 100644 --- a/libs/ardour/ardour/audio_track.h +++ b/libs/ardour/ardour/audio_track.h @@ -31,7 +31,7 @@ class AudioPlaylist; class RouteGroup; class AudioFileSource; -class AudioTrack : public Track +class LIBARDOUR_API AudioTrack : public Track { public: AudioTrack (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal); diff --git a/libs/ardour/ardour/audio_track_importer.h b/libs/ardour/ardour/audio_track_importer.h index 683417de24..58789177e3 100644 --- a/libs/ardour/ardour/audio_track_importer.h +++ b/libs/ardour/ardour/audio_track_importer.h @@ -34,7 +34,7 @@ namespace ARDOUR { class AudioPlaylistImportHandler; class AudioPlaylistImporter; -class AudioTrackImportHandler : public ElementImportHandler +class LIBARDOUR_API AudioTrackImportHandler : public ElementImportHandler { public: AudioTrackImportHandler (XMLTree const & source, Session & session, AudioPlaylistImportHandler & pl_handler); @@ -46,7 +46,7 @@ class AudioTrackImportHandler : public ElementImportHandler }; -class AudioTrackImporter : public ElementImporter +class LIBARDOUR_API AudioTrackImporter : public ElementImporter { public: AudioTrackImporter (XMLTree const & source, diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h index 007390b34a..07f41f5526 100644 --- a/libs/ardour/ardour/audio_unit.h +++ b/libs/ardour/ardour/audio_unit.h @@ -41,14 +41,14 @@ class CAComponent; class CAAudioUnit; class CAComponentDescription; -struct AudioBufferList; +struct LIBARDOUR_API AudioBufferList; namespace ARDOUR { class AudioEngine; class Session; -struct AUParameterDescriptor : public Plugin::ParameterDescriptor { +struct LIBARDOUR_API AUParameterDescriptor : public Plugin::ParameterDescriptor { // additional fields to make operations more efficient AudioUnitParameterID id; AudioUnitScope scope; @@ -58,7 +58,7 @@ struct AUParameterDescriptor : public Plugin::ParameterDescriptor { AudioUnitParameterUnit unit; }; -class AUPlugin : public ARDOUR::Plugin +class LIBARDOUR_API AUPlugin : public ARDOUR::Plugin { public: AUPlugin (AudioEngine& engine, Session& session, boost::shared_ptr<CAComponent> comp); @@ -221,11 +221,11 @@ class AUPlugin : public ARDOUR::Plugin typedef boost::shared_ptr<AUPlugin> AUPluginPtr; -struct AUPluginCachedInfo { +struct LIBARDOUR_API AUPluginCachedInfo { std::vector<std::pair<int,int> > io_configs; }; -class AUPluginInfo : public PluginInfo { +class LIBARDOUR_API AUPluginInfo : public PluginInfo { public: AUPluginInfo (boost::shared_ptr<CAComponentDescription>); ~AUPluginInfo (); diff --git a/libs/ardour/ardour/audioanalyser.h b/libs/ardour/ardour/audioanalyser.h index 035390e99f..6a9738eb5a 100644 --- a/libs/ardour/ardour/audioanalyser.h +++ b/libs/ardour/ardour/audioanalyser.h @@ -26,6 +26,7 @@ #include <fstream> #include <boost/utility.hpp> #include "vamp-sdk/Plugin.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -33,7 +34,7 @@ namespace ARDOUR { class Readable; class Session; -class AudioAnalyser : public boost::noncopyable { +class LIBARDOUR_API AudioAnalyser : public boost::noncopyable { public: typedef Vamp::Plugin AnalysisPlugin; diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h index d5dcbffe2b..e769b9eec1 100644 --- a/libs/ardour/ardour/audioengine.h +++ b/libs/ardour/ardour/audioengine.h @@ -39,6 +39,7 @@ #include "ardour/ardour.h" #include "ardour/data_type.h" #include "ardour/session_handle.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/chan_count.h" #include "ardour/port_manager.h" @@ -59,7 +60,7 @@ class ProcessThread; class AudioBackend; class AudioBackendInfo; -class AudioEngine : public SessionHandlePtr, public PortManager +class LIBARDOUR_API AudioEngine : public SessionHandlePtr, public PortManager { public: diff --git a/libs/ardour/ardour/audiofile_tagger.h b/libs/ardour/ardour/audiofile_tagger.h index 9a46e235d8..0c551ecbc9 100644 --- a/libs/ardour/ardour/audiofile_tagger.h +++ b/libs/ardour/ardour/audiofile_tagger.h @@ -27,13 +27,15 @@ #include "taglib/toolkit/taglib.h" #include "taglib/ogg/xiphcomment.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class SessionMetadata; /// Class with static functions for tagging audiofiles -class AudiofileTagger +class LIBARDOUR_API AudiofileTagger { public: diff --git a/libs/ardour/ardour/audiofilesource.h b/libs/ardour/ardour/audiofilesource.h index af5dabe388..53819c1c9e 100644 --- a/libs/ardour/ardour/audiofilesource.h +++ b/libs/ardour/ardour/audiofilesource.h @@ -27,7 +27,7 @@ namespace ARDOUR { -struct SoundFileInfo { +struct LIBARDOUR_API SoundFileInfo { float samplerate; uint16_t channels; int64_t length; @@ -35,7 +35,7 @@ struct SoundFileInfo { int64_t timecode; }; -class AudioFileSource : public AudioSource, public FileSource { +class LIBARDOUR_API AudioFileSource : public AudioSource, public FileSource { public: virtual ~AudioFileSource (); diff --git a/libs/ardour/ardour/audioplaylist.h b/libs/ardour/ardour/audioplaylist.h index 3c987c0aa0..c4196dc3b6 100644 --- a/libs/ardour/ardour/audioplaylist.h +++ b/libs/ardour/ardour/audioplaylist.h @@ -31,10 +31,9 @@ namespace ARDOUR { class Session; class AudioRegion; class Source; - class AudioPlaylist; -class AudioPlaylist : public ARDOUR::Playlist +class LIBARDOUR_API AudioPlaylist : public ARDOUR::Playlist { public: AudioPlaylist (Session&, const XMLNode&, bool hidden = false); diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h index 13e46e4979..c3e9eec1f9 100644 --- a/libs/ardour/ardour/audioregion.h +++ b/libs/ardour/ardour/audioregion.h @@ -40,17 +40,17 @@ class PlaylistReadTest; namespace ARDOUR { namespace Properties { - extern PBD::PropertyDescriptor<bool> envelope_active; - extern PBD::PropertyDescriptor<bool> default_fade_in; - extern PBD::PropertyDescriptor<bool> default_fade_out; - extern PBD::PropertyDescriptor<bool> fade_in_active; - extern PBD::PropertyDescriptor<bool> fade_out_active; - extern PBD::PropertyDescriptor<float> scale_amplitude; - extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > fade_in; - extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > inverse_fade_in; - extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > fade_out; - extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > inverse_fade_out; - extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > envelope; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> envelope_active; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> default_fade_in; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> default_fade_out; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> fade_in_active; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> fade_out_active; + LIBARDOUR_API extern PBD::PropertyDescriptor<float> scale_amplitude; + LIBARDOUR_API extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > fade_in; + LIBARDOUR_API extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > inverse_fade_in; + LIBARDOUR_API extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > fade_out; + LIBARDOUR_API extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > inverse_fade_out; + LIBARDOUR_API extern PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > envelope; } class Playlist; @@ -59,7 +59,7 @@ class Filter; class AudioSource; -class AudioRegion : public Region +class LIBARDOUR_API AudioRegion : public Region { public: static void make_property_quarks (); @@ -235,4 +235,12 @@ class AudioRegion : public Region } /* namespace ARDOUR */ +/* access from C objects */ + +extern "C" { + LIBARDOUR_API int region_read_peaks_from_c (void *arg, uint32_t npeaks, uint32_t start, uint32_t length, intptr_t data, uint32_t n_chan, double samples_per_unit); + LIBARDOUR_API uint32_t region_length_from_c (void *arg); + LIBARDOUR_API uint32_t sourcefile_length_from_c (void *arg, double); +} + #endif /* __ardour_audio_region_h__ */ diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index d5c85a6bf8..910e03170d 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -38,7 +38,7 @@ namespace ARDOUR { -class AudioSource : virtual public Source, +class LIBARDOUR_API AudioSource : virtual public Source, public ARDOUR::Readable, public boost::enable_shared_from_this<ARDOUR::AudioSource> { diff --git a/libs/ardour/ardour/auditioner.h b/libs/ardour/ardour/auditioner.h index bdd04fcc66..0b04ab711d 100644 --- a/libs/ardour/ardour/auditioner.h +++ b/libs/ardour/ardour/auditioner.h @@ -33,7 +33,7 @@ class Session; class AudioRegion; class AudioPlaylist; -class Auditioner : public AudioTrack +class LIBARDOUR_API Auditioner : public AudioTrack { public: Auditioner (Session&); diff --git a/libs/ardour/ardour/auto_bundle.h b/libs/ardour/ardour/auto_bundle.h index d97080c089..703aa8e73d 100644 --- a/libs/ardour/ardour/auto_bundle.h +++ b/libs/ardour/ardour/auto_bundle.h @@ -26,7 +26,7 @@ namespace ARDOUR { -class AutoBundle : public Bundle { +class LIBARDOUR_API AutoBundle : public Bundle { public: AutoBundle (bool i = true); diff --git a/libs/ardour/ardour/automatable.h b/libs/ardour/ardour/automatable.h index b10b8eb2bc..11fb48904c 100644 --- a/libs/ardour/ardour/automatable.h +++ b/libs/ardour/ardour/automatable.h @@ -26,6 +26,7 @@ #include <boost/shared_ptr.hpp> #include "pbd/signals.h" #include "evoral/ControlSet.hpp" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" class XMLNode; @@ -38,7 +39,7 @@ class AutomationControl; /* The inherited ControlSet is virtual because AutomatableSequence inherits * from this AND EvoralSequence, which is also a ControlSet */ -class Automatable : virtual public Evoral::ControlSet +class LIBARDOUR_API Automatable : virtual public Evoral::ControlSet { public: Automatable(Session&); diff --git a/libs/ardour/ardour/automatable_sequence.h b/libs/ardour/ardour/automatable_sequence.h index 730ea33a7c..82a1d367e8 100644 --- a/libs/ardour/ardour/automatable_sequence.h +++ b/libs/ardour/ardour/automatable_sequence.h @@ -27,7 +27,7 @@ namespace ARDOUR { /** Contains notes and controllers */ template<typename T> -class AutomatableSequence : public Automatable, public Evoral::Sequence<T> { +class LIBARDOUR_API AutomatableSequence : public Automatable, public Evoral::Sequence<T> { public: AutomatableSequence(Session& s) : Evoral::ControlSet() diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index 10194b3f9b..aeee9dab30 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -26,6 +26,8 @@ #include "pbd/controllable.h" #include "evoral/Control.hpp" + +#include "ardour/libardour_visibility.h" #include "ardour/automation_list.h" namespace ARDOUR { @@ -36,7 +38,7 @@ class Automatable; /** A PBD::Controllable with associated automation data (AutomationList) */ -class AutomationControl : public PBD::Controllable, public Evoral::Control, public boost::enable_shared_from_this<AutomationControl> +class LIBARDOUR_API AutomationControl : public PBD::Controllable, public Evoral::Control, public boost::enable_shared_from_this<AutomationControl> { public: AutomationControl(ARDOUR::Session&, diff --git a/libs/ardour/ardour/automation_list.h b/libs/ardour/ardour/automation_list.h index 71eddda6dd..6e7b0007cd 100644 --- a/libs/ardour/ardour/automation_list.h +++ b/libs/ardour/ardour/automation_list.h @@ -40,7 +40,7 @@ namespace ARDOUR { class AutomationList; /** A SharedStatefulProperty for AutomationLists */ -class AutomationListProperty : public PBD::SharedStatefulProperty<AutomationList> +class LIBARDOUR_API AutomationListProperty : public PBD::SharedStatefulProperty<AutomationList> { public: AutomationListProperty (PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > d, Ptr p) @@ -59,7 +59,7 @@ private: AutomationListProperty& operator= (AutomationListProperty const &); }; -class AutomationList : public PBD::StatefulDestructible, public Evoral::ControlList +class LIBARDOUR_API AutomationList : public PBD::StatefulDestructible, public Evoral::ControlList { public: AutomationList (Evoral::Parameter id); diff --git a/libs/ardour/ardour/automation_watch.h b/libs/ardour/ardour/automation_watch.h index f3e343468d..db6474c062 100644 --- a/libs/ardour/ardour/automation_watch.h +++ b/libs/ardour/ardour/automation_watch.h @@ -30,7 +30,7 @@ namespace ARDOUR { class AutomationControl; -class AutomationWatch : public sigc::trackable, public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList { +class LIBARDOUR_API AutomationWatch : public sigc::trackable, public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList { public: static AutomationWatch& instance(); diff --git a/libs/ardour/ardour/beats_frames_converter.h b/libs/ardour/ardour/beats_frames_converter.h index e331b8411d..2e170d278a 100644 --- a/libs/ardour/ardour/beats_frames_converter.h +++ b/libs/ardour/ardour/beats_frames_converter.h @@ -20,6 +20,7 @@ */ #include "evoral/TimeConverter.hpp" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #ifndef __ardour_beats_frames_converter_h__ @@ -33,7 +34,7 @@ class TempoMap; * from some origin (supplied to the constructor in frames), and converts * them to the opposite unit, taking tempo changes into account. */ -class BeatsFramesConverter : public Evoral::TimeConverter<double,framepos_t> { +class LIBARDOUR_API BeatsFramesConverter : public Evoral::TimeConverter<double,framepos_t> { public: BeatsFramesConverter (TempoMap& tempo_map, framepos_t origin) : Evoral::TimeConverter<double, framepos_t> (origin) diff --git a/libs/ardour/ardour/broadcast_info.h b/libs/ardour/ardour/broadcast_info.h index 0e87d6e6df..97f86dd133 100644 --- a/libs/ardour/ardour/broadcast_info.h +++ b/libs/ardour/ardour/broadcast_info.h @@ -23,6 +23,7 @@ #include <string> +#include "ardour/libardour_visibility.h" #include "audiographer/broadcast_info.h" namespace ARDOUR @@ -30,7 +31,7 @@ namespace ARDOUR class Session; -class BroadcastInfo : public AudioGrapher::BroadcastInfo +class LIBARDOUR_API BroadcastInfo : public AudioGrapher::BroadcastInfo { public: BroadcastInfo (); diff --git a/libs/ardour/ardour/buffer.h b/libs/ardour/ardour/buffer.h index cbb92e7c4a..479d739be0 100644 --- a/libs/ardour/ardour/buffer.h +++ b/libs/ardour/ardour/buffer.h @@ -23,6 +23,7 @@ #include <boost/utility.hpp> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/data_type.h" @@ -38,7 +39,7 @@ namespace ARDOUR { * * To actually read/write buffer contents, use the appropriate derived class. */ -class Buffer : public boost::noncopyable +class LIBARDOUR_API Buffer : public boost::noncopyable { public: virtual ~Buffer() {} diff --git a/libs/ardour/ardour/buffer_manager.h b/libs/ardour/ardour/buffer_manager.h index fccd981fba..f5a3935ead 100644 --- a/libs/ardour/ardour/buffer_manager.h +++ b/libs/ardour/ardour/buffer_manager.h @@ -32,7 +32,7 @@ namespace ARDOUR { class ThreadBuffers; -class BufferManager +class LIBARDOUR_API BufferManager { public: static void init (uint32_t); diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h index 26d47682af..617feae269 100644 --- a/libs/ardour/ardour/buffer_set.h +++ b/libs/ardour/ardour/buffer_set.h @@ -27,6 +27,7 @@ #include <vector> #include "ardour/chan_count.h" #include "ardour/data_type.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #if defined VST_SUPPORT || defined LXVST_SUPPORT @@ -61,7 +62,7 @@ class PortSet; * others the form of their output (eg what they did to the BufferSet). * Setting the use counts is realtime safe. */ -class BufferSet +class LIBARDOUR_API BufferSet { public: BufferSet(); diff --git a/libs/ardour/ardour/bundle.h b/libs/ardour/ardour/bundle.h index 02845481b6..ef2247f12b 100644 --- a/libs/ardour/ardour/bundle.h +++ b/libs/ardour/ardour/bundle.h @@ -40,7 +40,7 @@ class AudioEngine; * `Channel' is a rather overloaded term but I can't think of a better * one right now. */ -class Bundle : public PBD::ScopedConnectionList +class LIBARDOUR_API Bundle : public PBD::ScopedConnectionList { public: @@ -149,7 +149,7 @@ class Bundle : public PBD::ScopedConnectionList Change _pending_change; }; -class BundleChannel +class LIBARDOUR_API BundleChannel { public: BundleChannel () : channel (-1) {} diff --git a/libs/ardour/ardour/butler.h b/libs/ardour/ardour/butler.h index 226aacbbad..efdaad1621 100644 --- a/libs/ardour/ardour/butler.h +++ b/libs/ardour/ardour/butler.h @@ -30,6 +30,7 @@ #include "pbd/ringbuffer.h" #include "pbd/pool.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/session_handle.h" @@ -44,7 +45,7 @@ namespace ARDOUR { * are empty they are deleted. */ -class Butler : public SessionHandleRef +class LIBARDOUR_API Butler : public SessionHandleRef { public: Butler (Session& session); diff --git a/libs/ardour/ardour/caimportable.h b/libs/ardour/ardour/caimportable.h index 1ed8676ee6..211329b8c6 100644 --- a/libs/ardour/ardour/caimportable.h +++ b/libs/ardour/ardour/caimportable.h @@ -21,6 +21,7 @@ #define __ardour_ca_importable_source_h__ #include "pbd/failed_constructor.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/importable_source.h" @@ -28,7 +29,7 @@ namespace ARDOUR { -class CAImportableSource : public ImportableSource { +class LIBARDOUR_API CAImportableSource : public ImportableSource { public: CAImportableSource (const std::string& path); virtual ~CAImportableSource(); diff --git a/libs/ardour/ardour/capturing_processor.h b/libs/ardour/ardour/capturing_processor.h index 5b9ea51557..9a91e6d02f 100644 --- a/libs/ardour/ardour/capturing_processor.h +++ b/libs/ardour/ardour/capturing_processor.h @@ -24,7 +24,7 @@ namespace ARDOUR { -class CapturingProcessor : public Processor +class LIBARDOUR_API CapturingProcessor : public Processor { public: CapturingProcessor (Session & session); diff --git a/libs/ardour/ardour/chan_count.h b/libs/ardour/ardour/chan_count.h index 03e2fcd8ff..9f9fd07543 100644 --- a/libs/ardour/ardour/chan_count.h +++ b/libs/ardour/ardour/chan_count.h @@ -38,7 +38,7 @@ namespace ARDOUR { * Operators are defined so this may safely be used as if it were a simple * (single-typed) integer count of channels. */ -class ChanCount { +class LIBARDOUR_API ChanCount { public: ChanCount(const XMLNode& node); ChanCount() { reset(); } diff --git a/libs/ardour/ardour/chan_mapping.h b/libs/ardour/ardour/chan_mapping.h index 5b63844f66..ebb7be402a 100644 --- a/libs/ardour/ardour/chan_mapping.h +++ b/libs/ardour/ardour/chan_mapping.h @@ -34,7 +34,7 @@ namespace ARDOUR { /** A mapping from one set of channels to another * (e.g. how to 'connect' two BufferSets). */ -class ChanMapping { +class LIBARDOUR_API ChanMapping { public: ChanMapping() {} ChanMapping(ARDOUR::ChanCount identity); diff --git a/libs/ardour/ardour/click.h b/libs/ardour/ardour/click.h index 1047540a74..7fc6d21f73 100644 --- a/libs/ardour/ardour/click.h +++ b/libs/ardour/ardour/click.h @@ -23,12 +23,13 @@ #include <list> #include "pbd/pool.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/io.h" namespace ARDOUR { -class Click { +class LIBARDOUR_API Click { public: framepos_t start; framecnt_t duration; @@ -49,7 +50,7 @@ private: static Pool pool; }; -class ClickIO : public IO +class LIBARDOUR_API ClickIO : public IO { public: ClickIO (Session& s, const std::string& name) : IO (s, name, IO::Output) {} diff --git a/libs/ardour/ardour/comparable_shared_ptr.h b/libs/ardour/ardour/comparable_shared_ptr.h index 5ff19af419..0aaacd6659 100644 --- a/libs/ardour/ardour/comparable_shared_ptr.h +++ b/libs/ardour/ardour/comparable_shared_ptr.h @@ -21,10 +21,12 @@ #ifndef __ardour_comparable_shared_ptr_h__ #define __ardour_comparable_shared_ptr_h__ +#include "ardour/libardour_visibility.h" + namespace ARDOUR { template<typename T> -class ComparableSharedPtr : public boost::shared_ptr<T> +class LIBARDOUR_API ComparableSharedPtr : public boost::shared_ptr<T> , public boost::less_than_comparable<ComparableSharedPtr<T> > { public: diff --git a/libs/ardour/ardour/configuration.h b/libs/ardour/ardour/configuration.h index 14a43e160c..f8e512e458 100644 --- a/libs/ardour/ardour/configuration.h +++ b/libs/ardour/ardour/configuration.h @@ -29,7 +29,7 @@ class XMLNode; namespace ARDOUR { -class Configuration : public PBD::Stateful +class LIBARDOUR_API Configuration : public PBD::Stateful { public: Configuration(); diff --git a/libs/ardour/ardour/configuration_variable.h b/libs/ardour/ardour/configuration_variable.h index a7fe8def48..a126264929 100644 --- a/libs/ardour/ardour/configuration_variable.h +++ b/libs/ardour/ardour/configuration_variable.h @@ -25,12 +25,13 @@ #include "pbd/xml++.h" #include "pbd/convert.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" namespace ARDOUR { -class ConfigVariableBase { +class LIBARDOUR_API ConfigVariableBase { public: ConfigVariableBase (std::string str) : _name (str) {} @@ -51,7 +52,7 @@ class ConfigVariableBase { }; template<class T> -class ConfigVariable : public ConfigVariableBase +class LIBARDOUR_API ConfigVariable : public ConfigVariableBase { public: @@ -91,7 +92,7 @@ class ConfigVariable : public ConfigVariableBase /** Specialisation of ConfigVariable for std::string to cope with whitespace properly */ template<> -class ConfigVariable<std::string> : public ConfigVariableBase +class LIBARDOUR_API ConfigVariable<std::string> : public ConfigVariableBase { public: @@ -126,7 +127,7 @@ class ConfigVariable<std::string> : public ConfigVariableBase }; template<> -class ConfigVariable<bool> : public ConfigVariableBase +class LIBARDOUR_API ConfigVariable<bool> : public ConfigVariableBase { public: @@ -163,7 +164,7 @@ class ConfigVariable<bool> : public ConfigVariableBase }; template<class T> -class ConfigVariableWithMutation : public ConfigVariable<T> +class LIBARDOUR_API ConfigVariableWithMutation : public ConfigVariable<T> { public: ConfigVariableWithMutation (std::string name, T val, T (*m)(T)) @@ -192,7 +193,7 @@ class ConfigVariableWithMutation : public ConfigVariable<T> }; template<> -class ConfigVariableWithMutation<std::string> : public ConfigVariable<std::string> +class LIBARDOUR_API ConfigVariableWithMutation<std::string> : public ConfigVariable<std::string> { public: ConfigVariableWithMutation (std::string name, std::string val, std::string (*m)(std::string)) diff --git a/libs/ardour/ardour/control_protocol_manager.h b/libs/ardour/ardour/control_protocol_manager.h index 519c762eee..98494476f9 100644 --- a/libs/ardour/ardour/control_protocol_manager.h +++ b/libs/ardour/ardour/control_protocol_manager.h @@ -35,7 +35,7 @@ class ControlProtocol; class ControlProtocolDescriptor; class Session; -class ControlProtocolInfo { +class LIBARDOUR_API ControlProtocolInfo { public: ControlProtocolDescriptor* descriptor; ControlProtocol* protocol; @@ -52,7 +52,7 @@ public: ~ControlProtocolInfo() { delete state; } }; -class ControlProtocolManager : public PBD::Stateful, public ARDOUR::SessionHandlePtr +class LIBARDOUR_API ControlProtocolManager : public PBD::Stateful, public ARDOUR::SessionHandlePtr { public: ~ControlProtocolManager (); diff --git a/libs/ardour/ardour/coreaudiosource.h b/libs/ardour/ardour/coreaudiosource.h index 30c66069f6..f12a67ded7 100644 --- a/libs/ardour/ardour/coreaudiosource.h +++ b/libs/ardour/ardour/coreaudiosource.h @@ -28,7 +28,7 @@ using namespace std; namespace ARDOUR { -class CoreAudioSource : public AudioFileSource { +class LIBARDOUR_API CoreAudioSource : public AudioFileSource { public: CoreAudioSource (ARDOUR::Session&, const XMLNode&); CoreAudioSource (ARDOUR::Session&, const string& path, int chn, Flag); diff --git a/libs/ardour/ardour/cycle_timer.h b/libs/ardour/ardour/cycle_timer.h index 35cc2a4c73..0335375c8a 100644 --- a/libs/ardour/ardour/cycle_timer.h +++ b/libs/ardour/ardour/cycle_timer.h @@ -24,12 +24,13 @@ #include <iostream> #include <cstdlib> +#include "ardour/libardour_visibility.h" #include "ardour/cycles.h" #include "ardour/debug.h" float get_mhz (); -class CycleTimer { +class LIBARDOUR_API CycleTimer { private: static float cycles_per_usec; #ifndef NDEBUG @@ -61,7 +62,7 @@ class CycleTimer { } }; -class StoringTimer +class LIBARDOUR_API StoringTimer { public: StoringTimer (int); diff --git a/libs/ardour/ardour/data_type.h b/libs/ardour/ardour/data_type.h index b4129e2629..2a4514a5cf 100644 --- a/libs/ardour/ardour/data_type.h +++ b/libs/ardour/ardour/data_type.h @@ -24,6 +24,8 @@ #include <stdint.h> #include <glib.h> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** A type of Data Ardour is capable of processing. @@ -32,7 +34,7 @@ namespace ARDOUR { * other type representations, simple comparison between then, etc. This code * is deliberately 'ugly' so other code doesn't have to be. */ -class DataType +class LIBARDOUR_API DataType { public: /** Numeric symbol for this DataType. diff --git a/libs/ardour/ardour/debug.h b/libs/ardour/ardour/debug.h index 47eee69df5..c26710b620 100644 --- a/libs/ardour/ardour/debug.h +++ b/libs/ardour/ardour/debug.h @@ -24,47 +24,47 @@ #include <sstream> +#include "ardour/libardour_visibility.h" #include "pbd/debug.h" namespace PBD { namespace DEBUG { - extern uint64_t MidiSourceIO; - extern uint64_t MidiPlaylistIO; - extern uint64_t MidiDiskstreamIO; - extern uint64_t SnapBBT; - extern uint64_t Configuration; - extern uint64_t Latency; - extern uint64_t Peaks; - extern uint64_t Processors; - extern uint64_t ProcessThreads; - extern uint64_t Graph; - extern uint64_t Destruction; - extern uint64_t MTC; - extern uint64_t LTC; - extern uint64_t Transport; - extern uint64_t Slave; - extern uint64_t SessionEvents; - extern uint64_t MidiIO; - extern uint64_t MackieControl; - extern uint64_t MidiClock; - extern uint64_t Monitor; - extern uint64_t Solo; - extern uint64_t AudioPlayback; - extern uint64_t Panning; - extern uint64_t LV2; - extern uint64_t CaptureAlignment; - extern uint64_t PluginManager; - extern uint64_t AudioUnits; - extern uint64_t ControlProtocols; - extern uint64_t CycleTimers; - extern uint64_t MidiTrackers; - extern uint64_t Layering; - extern uint64_t TempoMath; - extern uint64_t TempoMap; - extern uint64_t OrderKeys; - extern uint64_t Automation; - extern uint64_t WiimoteControl; - extern uint64_t Ports; + LIBARDOUR_API extern uint64_t MidiSourceIO; + LIBARDOUR_API extern uint64_t MidiPlaylistIO; + LIBARDOUR_API extern uint64_t MidiDiskstreamIO; + LIBARDOUR_API extern uint64_t SnapBBT; + LIBARDOUR_API extern uint64_t Configuration; + LIBARDOUR_API extern uint64_t Latency; + LIBARDOUR_API extern uint64_t Processors; + LIBARDOUR_API extern uint64_t ProcessThreads; + LIBARDOUR_API extern uint64_t Graph; + LIBARDOUR_API extern uint64_t Destruction; + LIBARDOUR_API extern uint64_t MTC; + LIBARDOUR_API extern uint64_t LTC; + LIBARDOUR_API extern uint64_t Transport; + LIBARDOUR_API extern uint64_t Slave; + LIBARDOUR_API extern uint64_t SessionEvents; + LIBARDOUR_API extern uint64_t MidiIO; + LIBARDOUR_API extern uint64_t MackieControl; + LIBARDOUR_API extern uint64_t MidiClock; + LIBARDOUR_API extern uint64_t Monitor; + LIBARDOUR_API extern uint64_t Solo; + LIBARDOUR_API extern uint64_t AudioPlayback; + LIBARDOUR_API extern uint64_t Panning; + LIBARDOUR_API extern uint64_t LV2; + LIBARDOUR_API extern uint64_t CaptureAlignment; + LIBARDOUR_API extern uint64_t PluginManager; + LIBARDOUR_API extern uint64_t AudioUnits; + LIBARDOUR_API extern uint64_t ControlProtocols; + LIBARDOUR_API extern uint64_t CycleTimers; + LIBARDOUR_API extern uint64_t MidiTrackers; + LIBARDOUR_API extern uint64_t Layering; + LIBARDOUR_API extern uint64_t TempoMath; + LIBARDOUR_API extern uint64_t TempoMap; + LIBARDOUR_API extern uint64_t OrderKeys; + LIBARDOUR_API extern uint64_t Automation; + LIBARDOUR_API extern uint64_t WiimoteControl; + LIBARDOUR_API extern uint64_t Ports; } } diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h index 4a6d4368a6..e19eef719f 100644 --- a/libs/ardour/ardour/delivery.h +++ b/libs/ardour/ardour/delivery.h @@ -21,6 +21,7 @@ #include <string> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/chan_count.h" #include "ardour/io_processor.h" @@ -34,7 +35,7 @@ class PannerShell; class Panner; class Pannable; -class Delivery : public IOProcessor +class LIBARDOUR_API Delivery : public IOProcessor { public: enum Role { diff --git a/libs/ardour/ardour/directory_names.h b/libs/ardour/ardour/directory_names.h index 72a456efe6..9eb2254219 100644 --- a/libs/ardour/ardour/directory_names.h +++ b/libs/ardour/ardour/directory_names.h @@ -21,25 +21,26 @@ #ifndef __ardour_directory_names_h__ #define __ardour_directory_names_h__ +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -extern const char* const old_sound_dir_name; -extern const char* const sound_dir_name; -extern const char* const midi_dir_name; -extern const char* const midi_patch_dir_name; -extern const char* const video_dir_name; -extern const char* const dead_dir_name; -extern const char* const interchange_dir_name; -extern const char* const peak_dir_name; -extern const char* const export_dir_name; -extern const char* const export_formats_dir_name; -extern const char* const templates_dir_name; -extern const char* const route_templates_dir_name; -extern const char* const surfaces_dir_name; -extern const char* const ladspa_dir_name; -extern const char* const user_config_dir_name; -extern const char* const panner_dir_name; -extern const char* const backend_dir_name; + LIBARDOUR_API extern const char* const old_sound_dir_name; + LIBARDOUR_API extern const char* const sound_dir_name; + LIBARDOUR_API extern const char* const midi_dir_name; + LIBARDOUR_API extern const char* const midi_patch_dir_name; + LIBARDOUR_API extern const char* const video_dir_name; + LIBARDOUR_API extern const char* const dead_dir_name; + LIBARDOUR_API extern const char* const interchange_dir_name; + LIBARDOUR_API extern const char* const peak_dir_name; + LIBARDOUR_API extern const char* const export_dir_name; + LIBARDOUR_API extern const char* const export_formats_dir_name; + LIBARDOUR_API extern const char* const templates_dir_name; + LIBARDOUR_API extern const char* const route_templates_dir_name; + LIBARDOUR_API extern const char* const surfaces_dir_name; + LIBARDOUR_API extern const char* const user_config_dir_name; + LIBARDOUR_API extern const char* const panner_dir_name; + LIBARDOUR_API extern const char* const backend_dir_name; }; diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h index 7a4bccbb46..5bd18663b8 100644 --- a/libs/ardour/ardour/diskstream.h +++ b/libs/ardour/ardour/diskstream.h @@ -34,6 +34,7 @@ #include "ardour/ardour.h" #include "ardour/chan_count.h" #include "ardour/session_object.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" #include "ardour/public_diskstream.h" @@ -54,7 +55,7 @@ class BufferSet; /** Parent class for classes which can stream data to and from disk. * These are used by Tracks to get playback and put recorded data. */ -class Diskstream : public SessionObject, public PublicDiskstream +class LIBARDOUR_API Diskstream : public SessionObject, public PublicDiskstream { public: enum Flag { diff --git a/libs/ardour/ardour/element_import_handler.h b/libs/ardour/ardour/element_import_handler.h index be2e3fafb0..32898ec9de 100644 --- a/libs/ardour/ardour/element_import_handler.h +++ b/libs/ardour/ardour/element_import_handler.h @@ -27,6 +27,9 @@ #include <boost/shared_ptr.hpp> +#include "ardour/libardour_visibility.h" +#include "pbd/libpbd_visibility.h" + class XMLTree; namespace ARDOUR { @@ -35,7 +38,7 @@ class Session; class ElementImporter; /// Virtual interface class for element import handlers -class ElementImportHandler +class LIBARDOUR_API ElementImportHandler { public: typedef boost::shared_ptr<ElementImporter> ElementPtr; diff --git a/libs/ardour/ardour/element_importer.h b/libs/ardour/ardour/element_importer.h index 8c25fd380d..b6d6ff7166 100644 --- a/libs/ardour/ardour/element_importer.h +++ b/libs/ardour/ardour/element_importer.h @@ -25,6 +25,7 @@ #include <utility> #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" class XMLTree; @@ -34,7 +35,7 @@ class Session; class ImportStatus; /// Virtual interface class for element importers -class ElementImporter +class LIBARDOUR_API ElementImporter { public: diff --git a/libs/ardour/ardour/event_type_map.h b/libs/ardour/ardour/event_type_map.h index 02852e9711..fbfd9ec73c 100644 --- a/libs/ardour/ardour/event_type_map.h +++ b/libs/ardour/ardour/event_type_map.h @@ -25,12 +25,14 @@ #include "evoral/TypeMap.hpp" #include "evoral/ControlList.hpp" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** This is the interface Ardour provides to Evoral about what * parameter and event types/ranges/names etc. to use. */ -class EventTypeMap : public Evoral::TypeMap { +class LIBARDOUR_API EventTypeMap : public Evoral::TypeMap { public: bool type_is_midi(uint32_t type) const; uint8_t parameter_midi_type(const Evoral::Parameter& param) const; diff --git a/libs/ardour/ardour/export_channel.h b/libs/ardour/ardour/export_channel.h index f3244095a3..894406874e 100644 --- a/libs/ardour/ardour/export_channel.h +++ b/libs/ardour/ardour/export_channel.h @@ -40,7 +40,7 @@ class AudioRegion; class CapturingProcessor; /// Export channel base class interface for different source types -class ExportChannel : public boost::less_than_comparable<ExportChannel> +class LIBARDOUR_API ExportChannel : public boost::less_than_comparable<ExportChannel> { public: @@ -62,7 +62,7 @@ class ExportChannel : public boost::less_than_comparable<ExportChannel> }; /// Basic export channel that reads from AudioPorts -class PortExportChannel : public ExportChannel +class LIBARDOUR_API PortExportChannel : public ExportChannel { public: typedef std::set<boost::weak_ptr<AudioPort> > PortSet; @@ -89,7 +89,7 @@ class PortExportChannel : public ExportChannel /// Handles RegionExportChannels and does actual reading from region -class RegionExportChannelFactory +class LIBARDOUR_API RegionExportChannelFactory { public: enum Type { @@ -128,7 +128,7 @@ class RegionExportChannelFactory }; /// Export channel that reads from region channel -class RegionExportChannel : public ExportChannel +class LIBARDOUR_API RegionExportChannel : public ExportChannel { friend class RegionExportChannelFactory; @@ -152,7 +152,7 @@ class RegionExportChannel : public ExportChannel }; /// Export channel for exporting from different positions in a route -class RouteExportChannel : public ExportChannel +class LIBARDOUR_API RouteExportChannel : public ExportChannel { class ProcessorRemover; // fwd declaration diff --git a/libs/ardour/ardour/export_channel_configuration.h b/libs/ardour/ardour/export_channel_configuration.h index b625be9dc3..4cab886c88 100644 --- a/libs/ardour/ardour/export_channel_configuration.h +++ b/libs/ardour/ardour/export_channel_configuration.h @@ -37,7 +37,7 @@ namespace ARDOUR class Session; -class ExportChannelConfiguration : public boost::enable_shared_from_this<ExportChannelConfiguration> +class LIBARDOUR_API ExportChannelConfiguration : public boost::enable_shared_from_this<ExportChannelConfiguration> { private: diff --git a/libs/ardour/ardour/export_failed.h b/libs/ardour/ardour/export_failed.h index 16687826b1..f1fd57ab4b 100644 --- a/libs/ardour/ardour/export_failed.h +++ b/libs/ardour/ardour/export_failed.h @@ -24,10 +24,12 @@ #include <exception> #include <string> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class ExportFailed : public std::exception +class LIBARDOUR_API ExportFailed : public std::exception { public: ExportFailed (std::string const &); diff --git a/libs/ardour/ardour/export_filename.h b/libs/ardour/ardour/export_filename.h index 994f584e8d..7eacc11b90 100644 --- a/libs/ardour/ardour/export_filename.h +++ b/libs/ardour/ardour/export_filename.h @@ -34,7 +34,7 @@ namespace ARDOUR class Session; -class ExportFilename { +class LIBARDOUR_API ExportFilename { public: enum DateFormat { diff --git a/libs/ardour/ardour/export_format_base.h b/libs/ardour/ardour/export_format_base.h index a21c977833..7ffb433e1a 100644 --- a/libs/ardour/ardour/export_format_base.h +++ b/libs/ardour/ardour/export_format_base.h @@ -30,6 +30,7 @@ #include <samplerate.h> #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "audiographer/general/sample_format_converter.h" @@ -37,7 +38,7 @@ namespace ARDOUR { -class ExportFormatBase { +class LIBARDOUR_API ExportFormatBase { public: enum Type { diff --git a/libs/ardour/ardour/export_format_compatibility.h b/libs/ardour/ardour/export_format_compatibility.h index a220e4e4a2..6f6e367ae0 100644 --- a/libs/ardour/ardour/export_format_compatibility.h +++ b/libs/ardour/ardour/export_format_compatibility.h @@ -28,7 +28,7 @@ namespace ARDOUR { /// Allows adding to all sets. A format should be able to test if it is compatible with this -class ExportFormatCompatibility : public ExportFormatBase, public ExportFormatBase::SelectableCompatible { +class LIBARDOUR_API ExportFormatCompatibility : public ExportFormatBase, public ExportFormatBase::SelectableCompatible { private: public: diff --git a/libs/ardour/ardour/export_format_manager.h b/libs/ardour/ardour/export_format_manager.h index 2b5d0ad804..9a95111509 100644 --- a/libs/ardour/ardour/export_format_manager.h +++ b/libs/ardour/ardour/export_format_manager.h @@ -39,7 +39,7 @@ class ExportFormatCompatibility; class ExportFormatSpecification; class AnyTime; -class ExportFormatManager : public PBD::ScopedConnectionList +class LIBARDOUR_API ExportFormatManager : public PBD::ScopedConnectionList { public: diff --git a/libs/ardour/ardour/export_format_specification.h b/libs/ardour/ardour/export_format_specification.h index fc03eb94b0..1593990d35 100644 --- a/libs/ardour/ardour/export_format_specification.h +++ b/libs/ardour/ardour/export_format_specification.h @@ -25,6 +25,7 @@ #include "pbd/uuid.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/export_format_base.h" @@ -37,7 +38,7 @@ class ExportFormat; class ExportFormatCompatibility; class Session; -class ExportFormatSpecification : public ExportFormatBase { +class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase { private: diff --git a/libs/ardour/ardour/export_formats.h b/libs/ardour/ardour/export_formats.h index 0e9a93ff96..076bb90d3d 100644 --- a/libs/ardour/ardour/export_formats.h +++ b/libs/ardour/ardour/export_formats.h @@ -33,13 +33,13 @@ namespace ARDOUR { -class ExportFormatIncompatible : public failed_constructor { +class LIBARDOUR_API ExportFormatIncompatible : public failed_constructor { public: virtual const char *what() const throw() { return "Export format constructor failed: Format incompatible with system"; } }; /// Base class for formats -class ExportFormat : public ExportFormatBase, public ExportFormatBase::SelectableCompatible { +class LIBARDOUR_API ExportFormat : public ExportFormatBase, public ExportFormatBase::SelectableCompatible { public: ExportFormat () {}; @@ -86,7 +86,7 @@ class ExportFormat : public ExportFormatBase, public ExportFormatBase::Selectabl }; /// Class to be inherited by export formats that have a selectable sample format -class HasSampleFormat : public PBD::ScopedConnectionList { +class LIBARDOUR_API HasSampleFormat : public PBD::ScopedConnectionList { public: class SampleFormatState : public ExportFormatBase::SelectableCompatible { @@ -156,7 +156,7 @@ class HasSampleFormat : public PBD::ScopedConnectionList { ExportFormatBase::SampleFormatSet & _sample_formats; }; -class ExportFormatLinear : public ExportFormat, public HasSampleFormat { +class LIBARDOUR_API ExportFormatLinear : public ExportFormat, public HasSampleFormat { public: ExportFormatLinear (std::string name, FormatId format_id); @@ -174,7 +174,7 @@ class ExportFormatLinear : public ExportFormat, public HasSampleFormat { SampleFormat _default_sample_format; }; -class ExportFormatOggVorbis : public ExportFormat { +class LIBARDOUR_API ExportFormatOggVorbis : public ExportFormat { public: ExportFormatOggVorbis (); ~ExportFormatOggVorbis () {}; @@ -185,7 +185,7 @@ class ExportFormatOggVorbis : public ExportFormat { virtual bool supports_tagging () const { return true; } }; -class ExportFormatFLAC : public ExportFormat, public HasSampleFormat { +class LIBARDOUR_API ExportFormatFLAC : public ExportFormat, public HasSampleFormat { public: ExportFormatFLAC (); ~ExportFormatFLAC () {}; @@ -198,7 +198,7 @@ class ExportFormatFLAC : public ExportFormat, public HasSampleFormat { virtual bool supports_tagging () const { return true; } }; -class ExportFormatBWF : public ExportFormat, public HasSampleFormat { +class LIBARDOUR_API ExportFormatBWF : public ExportFormat, public HasSampleFormat { public: ExportFormatBWF (); ~ExportFormatBWF () {}; diff --git a/libs/ardour/ardour/export_graph_builder.h b/libs/ardour/ardour/export_graph_builder.h index 07e866475a..40960b2b38 100644 --- a/libs/ardour/ardour/export_graph_builder.h +++ b/libs/ardour/ardour/export_graph_builder.h @@ -48,7 +48,7 @@ namespace ARDOUR class ExportTimespan; class Session; -class ExportGraphBuilder +class LIBARDOUR_API ExportGraphBuilder { private: typedef ExportHandler::FileSpec FileSpec; diff --git a/libs/ardour/ardour/export_handler.h b/libs/ardour/ardour/export_handler.h index d4dd5627f7..1bc80a80e9 100644 --- a/libs/ardour/ardour/export_handler.h +++ b/libs/ardour/ardour/export_handler.h @@ -29,6 +29,7 @@ #include "ardour/export_pointers.h" #include "ardour/session.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace AudioGrapher { @@ -45,7 +46,7 @@ class ExportFilename; class ExportGraphBuilder; class Location; -class ExportElementFactory +class LIBARDOUR_API ExportElementFactory { public: @@ -67,7 +68,7 @@ class ExportElementFactory Session & session; }; -class ExportHandler : public ExportElementFactory +class LIBARDOUR_API ExportHandler : public ExportElementFactory { public: struct FileSpec { diff --git a/libs/ardour/ardour/export_pointers.h b/libs/ardour/ardour/export_pointers.h index edd7f91325..ee29f0ee4c 100644 --- a/libs/ardour/ardour/export_pointers.h +++ b/libs/ardour/ardour/export_pointers.h @@ -25,6 +25,7 @@ #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> +#include "ardour/libardour_visibility.h" #include "ardour/comparable_shared_ptr.h" namespace AudioGrapher { diff --git a/libs/ardour/ardour/export_preset.h b/libs/ardour/ardour/export_preset.h index b24cc70dcf..b11ab75bab 100644 --- a/libs/ardour/ardour/export_preset.h +++ b/libs/ardour/ardour/export_preset.h @@ -26,12 +26,14 @@ #include "pbd/uuid.h" #include "pbd/xml++.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class Session; -class ExportPreset { +class LIBARDOUR_API ExportPreset { public: ExportPreset (std::string filename, Session & s); ~ExportPreset (); diff --git a/libs/ardour/ardour/export_profile_manager.h b/libs/ardour/ardour/export_profile_manager.h index 77ace497c2..2757795ff3 100644 --- a/libs/ardour/ardour/export_profile_manager.h +++ b/libs/ardour/ardour/export_profile_manager.h @@ -35,6 +35,7 @@ #include "ardour/filesystem_paths.h" #include "ardour/location.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/export_handler.h" @@ -46,7 +47,7 @@ class Location; class Session; /// Manages (de)serialization of export profiles and related classes -class ExportProfileManager +class LIBARDOUR_API ExportProfileManager { public: diff --git a/libs/ardour/ardour/export_status.h b/libs/ardour/ardour/export_status.h index 31027269f8..6a5be177e4 100644 --- a/libs/ardour/ardour/export_status.h +++ b/libs/ardour/ardour/export_status.h @@ -23,6 +23,7 @@ #include <stdint.h> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "pbd/signals.h" @@ -30,7 +31,7 @@ namespace ARDOUR { -class ExportStatus { +class LIBARDOUR_API ExportStatus { public: ExportStatus (); void init (); diff --git a/libs/ardour/ardour/export_timespan.h b/libs/ardour/ardour/export_timespan.h index 5cb32dbb1a..754335ba48 100644 --- a/libs/ardour/ardour/export_timespan.h +++ b/libs/ardour/ardour/export_timespan.h @@ -25,6 +25,7 @@ #include <boost/shared_ptr.hpp> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR @@ -34,7 +35,7 @@ class ExportStatus; class ExportChannel; class ExportTempFile; -class ExportTimespan +class LIBARDOUR_API ExportTimespan { private: typedef boost::shared_ptr<ExportStatus> ExportStatusPtr; diff --git a/libs/ardour/ardour/file_source.h b/libs/ardour/ardour/file_source.h index 52dca18feb..4b1dbf2b6c 100644 --- a/libs/ardour/ardour/file_source.h +++ b/libs/ardour/ardour/file_source.h @@ -28,7 +28,7 @@ namespace ARDOUR { -class MissingSource : public std::exception +class LIBARDOUR_API MissingSource : public std::exception { public: MissingSource (const std::string& p, DataType t) throw () @@ -42,7 +42,7 @@ class MissingSource : public std::exception }; /** A source associated with a file on disk somewhere */ -class FileSource : virtual public Source { +class LIBARDOUR_API FileSource : virtual public Source { public: virtual ~FileSource () {} diff --git a/libs/ardour/ardour/filename_extensions.h b/libs/ardour/ardour/filename_extensions.h index a7c9274c4a..c0725932fa 100644 --- a/libs/ardour/ardour/filename_extensions.h +++ b/libs/ardour/ardour/filename_extensions.h @@ -21,17 +21,19 @@ #ifndef __ardour_filename_extensions_h__ #define __ardour_filename_extensions_h__ +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -extern const char* const template_suffix; -extern const char* const statefile_suffix; -extern const char* const pending_suffix; -extern const char* const peakfile_suffix; -extern const char* const backup_suffix; -extern const char* const temp_suffix; -extern const char* const history_suffix; -extern const char* const export_preset_suffix; -extern const char* const export_format_suffix; + LIBARDOUR_API extern const char* const template_suffix; + LIBARDOUR_API extern const char* const statefile_suffix; + LIBARDOUR_API extern const char* const pending_suffix; + LIBARDOUR_API extern const char* const peakfile_suffix; + LIBARDOUR_API extern const char* const backup_suffix; + LIBARDOUR_API extern const char* const temp_suffix; + LIBARDOUR_API extern const char* const history_suffix; + LIBARDOUR_API extern const char* const export_preset_suffix; + LIBARDOUR_API extern const char* const export_format_suffix; } diff --git a/libs/ardour/ardour/filesystem_paths.h b/libs/ardour/ardour/filesystem_paths.h index e77de1c00f..b96cd05137 100644 --- a/libs/ardour/ardour/filesystem_paths.h +++ b/libs/ardour/ardour/filesystem_paths.h @@ -22,6 +22,8 @@ #include "pbd/search_path.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** @@ -29,26 +31,26 @@ namespace ARDOUR { * configuration files. * @post user_config_directory() exists */ - std::string user_config_directory (); + LIBARDOUR_API std::string user_config_directory (); /** * @return the path to the directory that contains the system wide ardour * modules. */ - std::string ardour_dll_directory (); + LIBARDOUR_API std::string ardour_dll_directory (); /** * @return the search path to be used when looking for per-system * configuration files. This may include user configuration files. */ - PBD::Searchpath ardour_config_search_path (); + LIBARDOUR_API PBD::SearchPath ardour_config_search_path (); /** * @return the search path to be used when looking for data files * that could be shared by systems (h/w and configuration independent * files, such as icons, XML files, etc) */ - PBD::Searchpath ardour_data_search_path (); + LIBARDOUR_API PBD::SearchPath ardour_data_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/filter.h b/libs/ardour/ardour/filter.h index a9cdc893a6..2b6476c49f 100644 --- a/libs/ardour/ardour/filter.h +++ b/libs/ardour/ardour/filter.h @@ -23,6 +23,7 @@ #include <vector> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -31,7 +32,7 @@ class Region; class Session; class Progress; -class Filter { +class LIBARDOUR_API Filter { public: virtual ~Filter() {} diff --git a/libs/ardour/ardour/graph.h b/libs/ardour/ardour/graph.h index 763723c792..b433580a54 100644 --- a/libs/ardour/ardour/graph.h +++ b/libs/ardour/ardour/graph.h @@ -33,6 +33,7 @@ #include "pbd/semutils.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/audio_backend.h" #include "ardour/session_handle.h" @@ -52,7 +53,7 @@ typedef boost::shared_ptr<GraphNode> node_ptr_t; typedef std::list< node_ptr_t > node_list_t; typedef std::set< node_ptr_t > node_set_t; -class Graph : public SessionHandleRef +class LIBARDOUR_API Graph : public SessionHandleRef { public: Graph (Session & session); diff --git a/libs/ardour/ardour/graphnode.h b/libs/ardour/ardour/graphnode.h index 9e0182300f..55867eac4c 100644 --- a/libs/ardour/ardour/graphnode.h +++ b/libs/ardour/ardour/graphnode.h @@ -38,7 +38,7 @@ typedef std::set< node_ptr_t > node_set_t; typedef std::list< node_ptr_t > node_list_t; /** A node on our processing graph, ie a Route */ -class GraphNode +class LIBARDOUR_API GraphNode { public: GraphNode( boost::shared_ptr<Graph> Graph ); diff --git a/libs/ardour/ardour/iec1ppmdsp.h b/libs/ardour/ardour/iec1ppmdsp.h index 58dea97555..3e0637716d 100644 --- a/libs/ardour/ardour/iec1ppmdsp.h +++ b/libs/ardour/ardour/iec1ppmdsp.h @@ -20,8 +20,9 @@ #ifndef __IEC1PPMDSP_H #define __IEC1PPMDSP_H +#include "ardour/libardour_visibility.h" -class Iec1ppmdsp +class LIBARDOUR_API Iec1ppmdsp { public: diff --git a/libs/ardour/ardour/iec2ppmdsp.h b/libs/ardour/ardour/iec2ppmdsp.h index 3574a8bd3f..aa5a90cdb9 100644 --- a/libs/ardour/ardour/iec2ppmdsp.h +++ b/libs/ardour/ardour/iec2ppmdsp.h @@ -20,8 +20,9 @@ #ifndef __IEC2PPMDSP_H #define __IEC2PPMDSP_H +#include "ardour/libardour_visibility.h" -class Iec2ppmdsp +class LIBARDOUR_API Iec2ppmdsp { public: diff --git a/libs/ardour/ardour/import_status.h b/libs/ardour/ardour/import_status.h index c261b7a960..4dbf8f8456 100644 --- a/libs/ardour/ardour/import_status.h +++ b/libs/ardour/ardour/import_status.h @@ -26,11 +26,12 @@ #include <stdint.h> #include "ardour/interthread_info.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { -class ImportStatus : public InterThreadInfo { +class LIBARDOUR_API ImportStatus : public InterThreadInfo { public: std::string doing_what; diff --git a/libs/ardour/ardour/importable_source.h b/libs/ardour/ardour/importable_source.h index fc695d88c1..9463f0b28b 100644 --- a/libs/ardour/ardour/importable_source.h +++ b/libs/ardour/ardour/importable_source.h @@ -21,11 +21,12 @@ #define __ardour_importable_source_h__ #include "pbd/failed_constructor.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { -class ImportableSource { +class LIBARDOUR_API ImportableSource { public: ImportableSource () {} virtual ~ImportableSource() {} diff --git a/libs/ardour/ardour/instrument_info.h b/libs/ardour/ardour/instrument_info.h index 8691db24e5..745e4803c0 100644 --- a/libs/ardour/ardour/instrument_info.h +++ b/libs/ardour/ardour/instrument_info.h @@ -28,19 +28,22 @@ #include "evoral/Parameter.hpp" +#include "midi++/libmidi_visibility.h" +#include "ardour/libardour_visibility.h" + namespace MIDI { -namespace Name { -class ChannelNameSet; -class Patch; -typedef std::list<boost::shared_ptr<Patch> > PatchNameList; -} + namespace Name { + class ChannelNameSet; + class Patch; + typedef std::list<boost::shared_ptr<Patch> > PatchNameList; + } } namespace ARDOUR { class Processor; -class InstrumentInfo { +class LIBARDOUR_API InstrumentInfo { public: InstrumentInfo(); ~InstrumentInfo (); diff --git a/libs/ardour/ardour/internal_return.h b/libs/ardour/ardour/internal_return.h index 4d2b32f031..d12b330e37 100644 --- a/libs/ardour/ardour/internal_return.h +++ b/libs/ardour/ardour/internal_return.h @@ -29,7 +29,7 @@ namespace ARDOUR { class InternalSend; -class InternalReturn : public Return +class LIBARDOUR_API InternalReturn : public Return { public: InternalReturn (Session&); diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h index a7f0f73e6e..8636a805db 100644 --- a/libs/ardour/ardour/internal_send.h +++ b/libs/ardour/ardour/internal_send.h @@ -25,7 +25,7 @@ namespace ARDOUR { -class InternalSend : public Send +class LIBARDOUR_API InternalSend : public Send { public: InternalSend (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_to, Delivery::Role role); diff --git a/libs/ardour/ardour/interpolation.h b/libs/ardour/ardour/interpolation.h index a4a332c8a2..64b0431e0f 100644 --- a/libs/ardour/ardour/interpolation.h +++ b/libs/ardour/ardour/interpolation.h @@ -20,6 +20,7 @@ #include <math.h> #include <samplerate.h> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #ifndef __interpolation_h__ @@ -27,7 +28,7 @@ namespace ARDOUR { -class Interpolation { +class LIBARDOUR_API Interpolation { protected: double _speed; double _target_speed; @@ -57,12 +58,12 @@ public: } }; -class LinearInterpolation : public Interpolation { +class LIBARDOUR_API LinearInterpolation : public Interpolation { public: framecnt_t interpolate (int channel, framecnt_t nframes, Sample* input, Sample* output); }; -class CubicInterpolation : public Interpolation { +class LIBARDOUR_API CubicInterpolation : public Interpolation { public: framecnt_t interpolate (int channel, framecnt_t nframes, Sample* input, Sample* output); }; diff --git a/libs/ardour/ardour/interthread_info.h b/libs/ardour/ardour/interthread_info.h index a06fc649ca..49055de5d0 100644 --- a/libs/ardour/ardour/interthread_info.h +++ b/libs/ardour/ardour/interthread_info.h @@ -22,6 +22,7 @@ #include <pthread.h> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/process_thread.h" diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index adad0c753f..1688a2a36d 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -40,6 +40,7 @@ #include "ardour/latent.h" #include "ardour/port_set.h" #include "ardour/session_object.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" #include "ardour/buffer_set.h" @@ -64,7 +65,7 @@ class UserBundle; * An IO can contain ports of varying types, making routes/inserts/etc with * varied combinations of types (eg MIDI and audio) possible. */ -class IO : public SessionObject, public Latent +class LIBARDOUR_API IO : public SessionObject, public Latent { public: static const std::string state_node_name; diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h index 7adfab2225..a2735453a7 100644 --- a/libs/ardour/ardour/io_processor.h +++ b/libs/ardour/ardour/io_processor.h @@ -40,7 +40,7 @@ class Route; /** A mixer strip element (Processor) with 1 or 2 IO elements. */ -class IOProcessor : public Processor +class LIBARDOUR_API IOProcessor : public Processor { public: IOProcessor (Session&, bool with_input, bool with_output, diff --git a/libs/ardour/ardour/kmeterdsp.h b/libs/ardour/ardour/kmeterdsp.h index eca3c76695..374afff50e 100644 --- a/libs/ardour/ardour/kmeterdsp.h +++ b/libs/ardour/ardour/kmeterdsp.h @@ -20,7 +20,9 @@ #ifndef __KMETERDSP_H #define __KMETERDSP_H -class Kmeterdsp +#include "ardour/libardour_visibility.h" + +class LIBARDOUR_API Kmeterdsp { public: diff --git a/libs/ardour/ardour/ladspa_plugin.h b/libs/ardour/ardour/ladspa_plugin.h index 62cad017fc..a3b99575fe 100644 --- a/libs/ardour/ardour/ladspa_plugin.h +++ b/libs/ardour/ardour/ladspa_plugin.h @@ -36,7 +36,7 @@ namespace ARDOUR { class AudioEngine; class Session; -class LadspaPlugin : public ARDOUR::Plugin +class LIBARDOUR_API LadspaPlugin : public ARDOUR::Plugin { public: LadspaPlugin (std::string module_path, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, framecnt_t sample_rate); @@ -147,7 +147,7 @@ class LadspaPlugin : public ARDOUR::Plugin void add_state (XMLNode *) const; }; -class LadspaPluginInfo : public PluginInfo { +class LIBARDOUR_API LadspaPluginInfo : public PluginInfo { public: LadspaPluginInfo (); ~LadspaPluginInfo () { }; diff --git a/libs/ardour/ardour/latent.h b/libs/ardour/ardour/latent.h index c6e81c17a2..bd639a8651 100644 --- a/libs/ardour/ardour/latent.h +++ b/libs/ardour/ardour/latent.h @@ -20,11 +20,12 @@ #ifndef __ardour_latent_h__ #define __ardour_latent_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { -class Latent { +class LIBARDOUR_API Latent { public: Latent() : _user_latency (0) {} virtual ~Latent() {} diff --git a/libs/ardour/ardour/libardour_visibility.h b/libs/ardour/ardour/libardour_visibility.h new file mode 100644 index 0000000000..ed5cacf261 --- /dev/null +++ b/libs/ardour/ardour/libardour_visibility.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2013 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __libardour_libardour_visibility_h__ +#define __libardour_libardour_visibility_h__ + +/* _WIN32 is defined by most compilers targetting Windows, but within the + * ardour source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending + * on how a Windows build is built. + */ + +#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) + #define LIBARDOUR_DLL_IMPORT __declspec(dllimport) + #define LIBARDOUR_DLL_EXPORT __declspec(dllexport) + #define LIBARDOUR_DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define LIBARDOUR_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBARDOUR_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBARDOUR_DLL_LOCAL __attribute__ ((visibility ("hidden"))) + #else + #define LIBARDOUR_DLL_IMPORT + #define LIBARDOUR_DLL_EXPORT + #define LIBARDOUR_DLL_LOCAL + #endif +#endif + +#ifdef LIBARDOUR_DLL // libardour is a DLL +#ifdef LIBARDOUR_DLL_EXPORTS // defined if we are building the libardour DLL (instead of using it) + #define LIBARDOUR_API LIBARDOUR_DLL_EXPORT +#else + #define LIBARDOUR_API LIBARDOUR_DLL_IMPORT +#endif +#define LIBARDOUR_LOCAL LIBARDOUR_DLL_LOCAL +#else /* static lib, not DLL */ +#define LIBARDOUR_API +#define LIBARDOUR_LOCAL +#endif + +#endif /* __libardour_libardour_visibility_h__ */ diff --git a/libs/ardour/ardour/linux_vst_support.h b/libs/ardour/ardour/linux_vst_support.h index c99c4a8cb3..cb18a0b1d4 100644 --- a/libs/ardour/ardour/linux_vst_support.h +++ b/libs/ardour/ardour/linux_vst_support.h @@ -25,44 +25,46 @@ #include <pthread.h> #include <stdio.h> +#include "ardour/libardour_visibility.h" #include "ardour/vst_types.h" /******************************************************************************************/ /*VSTFX - an engine to manage native linux VST plugins - derived from FST for Windows VSTs*/ /******************************************************************************************/ -extern void (*vstfx_error_callback)(const char *msg); +LIBARDOUR_API extern void (*vstfx_error_callback)(const char *msg); -void vstfx_set_error_function (void (*func)(const char *)); +LIBARDOUR_API void vstfx_set_error_function (void (*func)(const char *)); -void vstfx_error (const char *fmt, ...); +LIBARDOUR_API void vstfx_error (const char *fmt, ...); /*API to vstfx*/ -extern int vstfx_launch_editor (VSTState *); -extern int vstfx_init (void *); -extern void vstfx_exit (); -extern VSTHandle * vstfx_load (const char*); -extern int vstfx_unload (VSTHandle *); -extern VSTState * vstfx_instantiate (VSTHandle *, audioMasterCallback, void *); -extern void vstfx_close (VSTState*); +LIBARDOUR_API extern int vstfx_launch_editor (VSTState *); +LIBARDOUR_API extern int vstfx_init (void *); +LIBARDOUR_API extern void vstfx_exit (); +LIBARDOUR_API extern VSTHandle * vstfx_load (const char*); +LIBARDOUR_API extern int vstfx_unload (VSTHandle *); -extern int vstfx_create_editor (VSTState *); -extern int vstfx_run_editor (VSTState *); -extern void vstfx_destroy_editor (VSTState *); +LIBARDOUR_API extern VSTState * vstfx_instantiate (VSTHandle *, audioMasterCallback, void *); +LIBARDOUR_API extern void vstfx_close (VSTState*); -extern VSTInfo * vstfx_get_info (char *); -extern void vstfx_free_info (VSTInfo *); -extern void vstfx_event_loop_remove_plugin (VSTState *); -extern int vstfx_call_dispatcher (VSTState *, int, int, int, void *, float); +LIBARDOUR_API extern int vstfx_create_editor (VSTState *); +LIBARDOUR_API extern int vstfx_run_editor (VSTState *); +LIBARDOUR_API extern void vstfx_destroy_editor (VSTState *); + +LIBARDOUR_API extern VSTInfo * vstfx_get_info (char *); +LIBARDOUR_API extern void vstfx_free_info (VSTInfo *); +LIBARDOUR_API extern void vstfx_event_loop_remove_plugin (VSTState *); +LIBARDOUR_API extern int vstfx_call_dispatcher (VSTState *, int, int, int, void *, float); /** Load a plugin state from a file.**/ -extern int vstfx_load_state (VSTState* vstfx, char * filename); +LIBARDOUR_API extern int vstfx_load_state (VSTState* vstfx, char * filename); /** Save a plugin state to a file.**/ -extern bool vstfx_save_state (VSTState* vstfx, char * filename); +LIBARDOUR_API extern bool vstfx_save_state (VSTState* vstfx, char * filename); #endif /* __vstfx_h__ */ diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h index bb42df1b58..b0956eea36 100644 --- a/libs/ardour/ardour/location.h +++ b/libs/ardour/ardour/location.h @@ -38,7 +38,7 @@ namespace ARDOUR { -class Location : public SessionHandleRef, public PBD::StatefulDestructible +class LIBARDOUR_API Location : public SessionHandleRef, public PBD::StatefulDestructible { public: enum Flags { @@ -131,7 +131,7 @@ class Location : public SessionHandleRef, public PBD::StatefulDestructible void recompute_bbt_from_frames (); }; -class Locations : public SessionHandleRef, public PBD::StatefulDestructible +class LIBARDOUR_API Locations : public SessionHandleRef, public PBD::StatefulDestructible { public: typedef std::list<Location *> LocationList; diff --git a/libs/ardour/ardour/location_importer.h b/libs/ardour/ardour/location_importer.h index 332c5ae685..574b948062 100644 --- a/libs/ardour/ardour/location_importer.h +++ b/libs/ardour/ardour/location_importer.h @@ -33,14 +33,14 @@ namespace ARDOUR { class Location; class Session; -class LocationImportHandler : public ElementImportHandler +class LIBARDOUR_API LocationImportHandler : public ElementImportHandler { public: LocationImportHandler (XMLTree const & source, Session & session); std::string get_info () const; }; -class LocationImporter : public ElementImporter +class LIBARDOUR_API LocationImporter : public ElementImporter { public: LocationImporter (XMLTree const & source, Session & session, LocationImportHandler & handler, XMLNode const & node); diff --git a/libs/ardour/ardour/logcurve.h b/libs/ardour/ardour/logcurve.h index 4c91ad9a79..2585da66c8 100644 --- a/libs/ardour/ardour/logcurve.h +++ b/libs/ardour/ardour/logcurve.h @@ -25,7 +25,7 @@ namespace ARDOUR { -class LogCurve { +class LIBARDOUR_API LogCurve { public: LogCurve (float steepness = 0.2, uint32_t len = 0) { l = len; @@ -102,7 +102,7 @@ class LogCurve { uint32_t l; }; -class LogCurveIn : public LogCurve +class LIBARDOUR_API LogCurveIn : public LogCurve { public: LogCurveIn (float steepness = 0.2, uint32_t len = 0) @@ -117,7 +117,7 @@ class LogCurveIn : public LogCurve } }; -class LogCurveOut : public LogCurve +class LIBARDOUR_API LogCurveOut : public LogCurve { public: LogCurveOut (float steepness = 0.2, uint32_t len = 0) diff --git a/libs/ardour/ardour/lv2_plugin.h b/libs/ardour/ardour/lv2_plugin.h index 6b4b1a1c67..034101ee41 100644 --- a/libs/ardour/ardour/lv2_plugin.h +++ b/libs/ardour/ardour/lv2_plugin.h @@ -43,7 +43,7 @@ const void* lv2plugin_get_port_value(const char* port_symbol, class AudioEngine; class Session; -class LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee +class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee { public: LV2Plugin (ARDOUR::AudioEngine& engine, @@ -272,7 +272,7 @@ class LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee }; -class LV2PluginInfo : public PluginInfo { +class LIBARDOUR_API LV2PluginInfo : public PluginInfo { public: LV2PluginInfo (const void* c_plugin); ~LV2PluginInfo (); diff --git a/libs/ardour/ardour/lxvst_plugin.h b/libs/ardour/ardour/lxvst_plugin.h index 58bc626d32..f1a50b2f30 100644 --- a/libs/ardour/ardour/lxvst_plugin.h +++ b/libs/ardour/ardour/lxvst_plugin.h @@ -30,7 +30,7 @@ namespace ARDOUR { class AudioEngine; class Session; -class LXVSTPlugin : public VSTPlugin +class LIBARDOUR_API LXVSTPlugin : public VSTPlugin { public: LXVSTPlugin (AudioEngine &, Session &, VSTHandle *); @@ -40,7 +40,7 @@ class LXVSTPlugin : public VSTPlugin std::string state_node_name () const { return "lxvst"; } }; -class LXVSTPluginInfo : public PluginInfo +class LIBARDOUR_API LXVSTPluginInfo : public PluginInfo { public: LXVSTPluginInfo (); diff --git a/libs/ardour/ardour/meter.h b/libs/ardour/ardour/meter.h index df1e381bb4..8ed1ade50d 100644 --- a/libs/ardour/ardour/meter.h +++ b/libs/ardour/ardour/meter.h @@ -20,6 +20,7 @@ #define __ardour_meter_h__ #include <vector> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/processor.h" #include "pbd/fastlog.h" @@ -35,7 +36,7 @@ class BufferSet; class ChanCount; class Session; -class Metering { +class LIBARDOUR_API Metering { public: static void update_meters (); static PBD::Signal0<void> Meter; @@ -47,7 +48,7 @@ class Metering { /** Meters peaks on the input and stores them for access. */ -class PeakMeter : public Processor { +class LIBARDOUR_API PeakMeter : public Processor { public: PeakMeter(Session& s, const std::string& name); ~PeakMeter(); diff --git a/libs/ardour/ardour/midi_automation_list_binder.h b/libs/ardour/ardour/midi_automation_list_binder.h index 89c6cdb90b..241c4e7320 100644 --- a/libs/ardour/ardour/midi_automation_list_binder.h +++ b/libs/ardour/ardour/midi_automation_list_binder.h @@ -27,7 +27,7 @@ class MidiSource; class AutomationList; /** A class for late-binding a MidiSource and a Parameter to an AutomationList */ -class MidiAutomationListBinder : public MementoCommandBinder<ARDOUR::AutomationList> +class LIBARDOUR_API MidiAutomationListBinder : public MementoCommandBinder<ARDOUR::AutomationList> { public: MidiAutomationListBinder (boost::shared_ptr<ARDOUR::MidiSource>, Evoral::Parameter); diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h index 781396a598..0a799c41ab 100644 --- a/libs/ardour/ardour/midi_buffer.h +++ b/libs/ardour/ardour/midi_buffer.h @@ -29,7 +29,7 @@ namespace ARDOUR { /** Buffer containing 8-bit unsigned char (MIDI) data. */ -class MidiBuffer : public Buffer +class LIBARDOUR_API MidiBuffer : public Buffer { public: typedef framepos_t TimeType; diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h index b1c126b339..e3f2673871 100644 --- a/libs/ardour/ardour/midi_diskstream.h +++ b/libs/ardour/ardour/midi_diskstream.h @@ -52,7 +52,7 @@ class SMFSource; class Send; class Session; -class MidiDiskstream : public Diskstream +class LIBARDOUR_API MidiDiskstream : public Diskstream { public: MidiDiskstream (Session &, const string& name, Diskstream::Flag f = Recordable); diff --git a/libs/ardour/ardour/midi_model.h b/libs/ardour/ardour/midi_model.h index 3ecfca7d1c..98743969f7 100644 --- a/libs/ardour/ardour/midi_model.h +++ b/libs/ardour/ardour/midi_model.h @@ -27,10 +27,12 @@ #include <boost/utility.hpp> #include <glibmm/threads.h> #include "pbd/command.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/midi_buffer.h" #include "ardour/midi_ring_buffer.h" #include "ardour/automatable_sequence.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "evoral/Note.hpp" #include "evoral/Sequence.hpp" @@ -47,7 +49,7 @@ class MidiSource; * Because of this MIDI controllers and automatable controllers/widgets/etc * are easily interchangeable. */ -class MidiModel : public AutomatableSequence<Evoral::MusicalTime> { +class LIBARDOUR_API MidiModel : public AutomatableSequence<Evoral::MusicalTime> { public: typedef Evoral::MusicalTime TimeType; diff --git a/libs/ardour/ardour/midi_operator.h b/libs/ardour/ardour/midi_operator.h index c5def76384..00678a2831 100644 --- a/libs/ardour/ardour/midi_operator.h +++ b/libs/ardour/ardour/midi_operator.h @@ -32,7 +32,7 @@ namespace ARDOUR { class MidiModel; -class MidiOperator { +class LIBARDOUR_API MidiOperator { public: MidiOperator () {} virtual ~MidiOperator() {} diff --git a/libs/ardour/ardour/midi_patch_manager.h b/libs/ardour/ardour/midi_patch_manager.h index 32b3ebc61d..e9751c6956 100644 --- a/libs/ardour/ardour/midi_patch_manager.h +++ b/libs/ardour/ardour/midi_patch_manager.h @@ -35,7 +35,7 @@ namespace MIDI namespace Name { -class MidiPatchManager : public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr +class LIBARDOUR_API MidiPatchManager : public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr { /// Singleton private: diff --git a/libs/ardour/ardour/midi_playlist.h b/libs/ardour/ardour/midi_playlist.h index 99d0b98321..b118214c9e 100644 --- a/libs/ardour/ardour/midi_playlist.h +++ b/libs/ardour/ardour/midi_playlist.h @@ -36,7 +36,7 @@ class MidiRegion; class Source; template<typename T> class MidiRingBuffer; -class MidiPlaylist : public ARDOUR::Playlist +class LIBARDOUR_API MidiPlaylist : public ARDOUR::Playlist { public: MidiPlaylist (Session&, const XMLNode&, bool hidden = false); diff --git a/libs/ardour/ardour/midi_playlist_source.h b/libs/ardour/ardour/midi_playlist_source.h index 5e3bb0de67..7a61f5aa02 100644 --- a/libs/ardour/ardour/midi_playlist_source.h +++ b/libs/ardour/ardour/midi_playlist_source.h @@ -32,7 +32,7 @@ namespace ARDOUR { class MidiPlaylist; -class MidiPlaylistSource : public MidiSource, public PlaylistSource { +class LIBARDOUR_API MidiPlaylistSource : public MidiSource, public PlaylistSource { public: virtual ~MidiPlaylistSource (); diff --git a/libs/ardour/ardour/midi_port.h b/libs/ardour/ardour/midi_port.h index 00617d90ec..cc9fee1b15 100644 --- a/libs/ardour/ardour/midi_port.h +++ b/libs/ardour/ardour/midi_port.h @@ -31,7 +31,7 @@ namespace ARDOUR { class MidiEngine; -class MidiPort : public Port { +class LIBARDOUR_API MidiPort : public Port { public: ~MidiPort(); diff --git a/libs/ardour/ardour/midi_region.h b/libs/ardour/ardour/midi_region.h index daca7a243d..b326bb30d8 100644 --- a/libs/ardour/ardour/midi_region.h +++ b/libs/ardour/ardour/midi_region.h @@ -34,9 +34,9 @@ namespace ARDOUR { property, but it allows us to signal changes to the MidiModel used by the MidiRegion */ - extern PBD::PropertyDescriptor<void*> midi_data; - extern PBD::PropertyDescriptor<Evoral::MusicalTime> start_beats; - extern PBD::PropertyDescriptor<Evoral::MusicalTime> length_beats; + LIBARDOUR_API extern PBD::PropertyDescriptor<void*> midi_data; + LIBARDOUR_API extern PBD::PropertyDescriptor<Evoral::MusicalTime> start_beats; + LIBARDOUR_API extern PBD::PropertyDescriptor<Evoral::MusicalTime> length_beats; } } @@ -53,9 +53,10 @@ class MidiFilter; class MidiModel; class MidiSource; class MidiStateTracker; + template<typename T> class MidiRingBuffer; -class MidiRegion : public Region +class LIBARDOUR_API MidiRegion : public Region { public: static void make_property_quarks (); diff --git a/libs/ardour/ardour/midi_ring_buffer.h b/libs/ardour/ardour/midi_ring_buffer.h index d5c9947b9a..2d35be679f 100644 --- a/libs/ardour/ardour/midi_ring_buffer.h +++ b/libs/ardour/ardour/midi_ring_buffer.h @@ -24,6 +24,7 @@ #include "evoral/EventRingBuffer.hpp" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/midi_state_tracker.h" @@ -40,7 +41,7 @@ class MidiBuffer; * [timestamp][type][size][size bytes of raw MIDI][timestamp][type][size](etc...) */ template<typename T> -class MidiRingBuffer : public Evoral::EventRingBuffer<T> { +class LIBARDOUR_API MidiRingBuffer : public Evoral::EventRingBuffer<T> { public: /** @param size Size in bytes. */ diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h index a5aac8859b..ba50102ec9 100644 --- a/libs/ardour/ardour/midi_source.h +++ b/libs/ardour/ardour/midi_source.h @@ -36,10 +36,11 @@ namespace ARDOUR { class MidiStateTracker; class MidiModel; + template<typename T> class MidiRingBuffer; /** Source for MIDI data */ -class MidiSource : virtual public Source, public boost::enable_shared_from_this<MidiSource> +class LIBARDOUR_API MidiSource : virtual public Source, public boost::enable_shared_from_this<MidiSource> { public: typedef double TimeType; diff --git a/libs/ardour/ardour/midi_state_tracker.h b/libs/ardour/ardour/midi_state_tracker.h index 24d3ab73a1..046e77f38c 100644 --- a/libs/ardour/ardour/midi_state_tracker.h +++ b/libs/ardour/ardour/midi_state_tracker.h @@ -27,12 +27,13 @@ template <typename T> class EventSink; } namespace ARDOUR { + class MidiSource; /** Tracks played notes, so they can be resolved in potential stuck note * situations (e.g. looping, transport stop, etc). */ -class MidiStateTracker +class LIBARDOUR_API MidiStateTracker { public: MidiStateTracker(); diff --git a/libs/ardour/ardour/midi_stretch.h b/libs/ardour/ardour/midi_stretch.h index 42b201b55a..b6f6ac5073 100644 --- a/libs/ardour/ardour/midi_stretch.h +++ b/libs/ardour/ardour/midi_stretch.h @@ -25,7 +25,7 @@ namespace ARDOUR { -class MidiStretch : public Filter { +class LIBARDOUR_API MidiStretch : public Filter { public: MidiStretch (ARDOUR::Session&, const TimeFXRequest&); ~MidiStretch (); diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h index 9c1d21a3e4..cf6d3f7b64 100644 --- a/libs/ardour/ardour/midi_track.h +++ b/libs/ardour/ardour/midi_track.h @@ -35,7 +35,7 @@ class RouteGroup; class SMFSource; class Session; -class MidiTrack : public Track +class LIBARDOUR_API MidiTrack : public Track { public: MidiTrack (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal); diff --git a/libs/ardour/ardour/midi_ui.h b/libs/ardour/ardour/midi_ui.h index c15a530057..e99d6bf499 100644 --- a/libs/ardour/ardour/midi_ui.h +++ b/libs/ardour/ardour/midi_ui.h @@ -22,6 +22,7 @@ #include <list> +#define ABSTRACT_UI_EXPORTS #include "pbd/abstract_ui.h" #include "pbd/signals.h" #include "pbd/stacktrace.h" @@ -37,13 +38,13 @@ class AsyncMIDIPort; certain types of requests to the MIDI UI */ -struct MidiUIRequest : public BaseUI::BaseRequestObject { +struct LIBARDOUR_API MidiUIRequest : public BaseUI::BaseRequestObject { public: MidiUIRequest () { } ~MidiUIRequest() { } }; -class MidiControlUI : public AbstractUI<MidiUIRequest> +class LIBARDOUR_API MidiControlUI : public AbstractUI<MidiUIRequest> { public: MidiControlUI (Session& s); diff --git a/libs/ardour/ardour/midiport_manager.h b/libs/ardour/ardour/midiport_manager.h index 9f93c43d5a..b5b46e8510 100644 --- a/libs/ardour/ardour/midiport_manager.h +++ b/libs/ardour/ardour/midiport_manager.h @@ -29,6 +29,7 @@ #include "midi++/types.h" #include "midi++/port.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -36,7 +37,7 @@ namespace ARDOUR { class MidiPort; class Port; -class MidiPortManager { +class LIBARDOUR_API MidiPortManager { public: MidiPortManager(); virtual ~MidiPortManager (); diff --git a/libs/ardour/ardour/mix.h b/libs/ardour/ardour/mix.h index 1c3fb6e5c4..3cd9a3e60f 100644 --- a/libs/ardour/ardour/mix.h +++ b/libs/ardour/ardour/mix.h @@ -19,6 +19,7 @@ #ifndef __ardour_mix_h__ #define __ardour_mix_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" @@ -26,39 +27,39 @@ extern "C" { /* SSE functions */ -float x86_sse_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); -void x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); -void x86_sse_mix_buffers_with_gain(ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); -void x86_sse_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); + LIBARDOUR_API float x86_sse_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); + LIBARDOUR_API void x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); + LIBARDOUR_API void x86_sse_mix_buffers_with_gain(ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); + LIBARDOUR_API void x86_sse_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); } -void x86_sse_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max); +LIBARDOUR_API void x86_sse_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max); /* debug wrappers for SSE functions */ -float debug_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); -void debug_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); -void debug_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); -void debug_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); +LIBARDOUR_API float debug_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); +LIBARDOUR_API void debug_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); +LIBARDOUR_API void debug_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); +LIBARDOUR_API void debug_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); #endif #if defined (__APPLE__) -float veclib_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); -void veclib_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max); -void veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); -void veclib_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); -void veclib_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); +LIBARDOUR_API float veclib_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); +LIBARDOUR_API void veclib_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max); +LIBARDOUR_API void veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); +LIBARDOUR_API void veclib_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); +LIBARDOUR_API void veclib_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); #endif /* non-optimized functions */ -float default_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); -void default_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max); -void default_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); -void default_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); -void default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); +LIBARDOUR_API float default_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current); +LIBARDOUR_API void default_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max); +LIBARDOUR_API void default_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain); +LIBARDOUR_API void default_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain); +LIBARDOUR_API void default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes); #endif /* __ardour_mix_h__ */ diff --git a/libs/ardour/ardour/monitor_processor.h b/libs/ardour/ardour/monitor_processor.h index 64d3b86bfb..41e911f57c 100644 --- a/libs/ardour/ardour/monitor_processor.h +++ b/libs/ardour/ardour/monitor_processor.h @@ -28,6 +28,7 @@ #include "pbd/compose.h" #include "pbd/controllable.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/processor.h" @@ -38,7 +39,7 @@ namespace ARDOUR { class Session; template<typename T> -class MPControl : public PBD::Controllable { +class LIBARDOUR_API MPControl : public PBD::Controllable { public: MPControl (T initial, const std::string& name, PBD::Controllable::Flag flag, float lower = 0.0f, float upper = 1.0f) @@ -104,7 +105,7 @@ protected: T _upper; }; -class MonitorProcessor : public Processor +class LIBARDOUR_API MonitorProcessor : public Processor { public: MonitorProcessor (Session&); diff --git a/libs/ardour/ardour/movable.h b/libs/ardour/ardour/movable.h index d68d7620ba..df63987f4f 100644 --- a/libs/ardour/ardour/movable.h +++ b/libs/ardour/ardour/movable.h @@ -22,7 +22,7 @@ namespace ARDOUR { -class Movable { +class LIBARDOUR_API Movable { public: Movable() {} diff --git a/libs/ardour/ardour/mtdm.h b/libs/ardour/ardour/mtdm.h index b46e53c0a2..b57df7254a 100644 --- a/libs/ardour/ardour/mtdm.h +++ b/libs/ardour/ardour/mtdm.h @@ -21,7 +21,9 @@ #include <stddef.h> -class MTDM +#include "ardour/libardour_visibility.h" + +class LIBARDOUR_API MTDM { public: diff --git a/libs/ardour/ardour/mute_master.h b/libs/ardour/ardour/mute_master.h index 460c7bf48b..8a83352a5b 100644 --- a/libs/ardour/ardour/mute_master.h +++ b/libs/ardour/ardour/mute_master.h @@ -31,7 +31,7 @@ namespace ARDOUR { class Session; -class MuteMaster : public SessionHandleRef, public PBD::Stateful +class LIBARDOUR_API MuteMaster : public SessionHandleRef, public PBD::Stateful { public: /** deliveries to mute when the channel is "muted" */ diff --git a/libs/ardour/ardour/onset_detector.h b/libs/ardour/ardour/onset_detector.h index 6604a3a362..40eac9b465 100644 --- a/libs/ardour/ardour/onset_detector.h +++ b/libs/ardour/ardour/onset_detector.h @@ -27,7 +27,7 @@ namespace ARDOUR { class AudioSource; class Session; -class OnsetDetector : public AudioAnalyser +class LIBARDOUR_API OnsetDetector : public AudioAnalyser { public: OnsetDetector (float sample_rate); diff --git a/libs/ardour/ardour/operations.h b/libs/ardour/ardour/operations.h index dd6329d7b9..d113c621c2 100644 --- a/libs/ardour/ardour/operations.h +++ b/libs/ardour/ardour/operations.h @@ -17,6 +17,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "ardour/libardour_visibility.h" + /** These are GQuarks for a subset of UI operations. We use these * so that the undo system can be queried to find out what operations * are currently in progress, by calling Session::current_operations(). @@ -27,19 +29,19 @@ namespace Operations { - extern GQuark capture; - extern GQuark paste; - extern GQuark duplicate_region; - extern GQuark insert_file; - extern GQuark insert_region; - extern GQuark drag_region_brush; - extern GQuark region_drag; - extern GQuark selection_grab; - extern GQuark region_fill; - extern GQuark fill_selection; - extern GQuark create_region; - extern GQuark region_copy; - extern GQuark fixed_time_region_copy; + LIBARDOUR_API extern GQuark capture; + LIBARDOUR_API extern GQuark paste; + LIBARDOUR_API extern GQuark duplicate_region; + LIBARDOUR_API extern GQuark insert_file; + LIBARDOUR_API extern GQuark insert_region; + LIBARDOUR_API extern GQuark drag_region_brush; + LIBARDOUR_API extern GQuark region_drag; + LIBARDOUR_API extern GQuark selection_grab; + LIBARDOUR_API extern GQuark region_fill; + LIBARDOUR_API extern GQuark fill_selection; + LIBARDOUR_API extern GQuark create_region; + LIBARDOUR_API extern GQuark region_copy; + LIBARDOUR_API extern GQuark fixed_time_region_copy; }; diff --git a/libs/ardour/ardour/pan_controllable.h b/libs/ardour/ardour/pan_controllable.h index be0c9260c0..9abbec42ab 100644 --- a/libs/ardour/ardour/pan_controllable.h +++ b/libs/ardour/ardour/pan_controllable.h @@ -34,7 +34,7 @@ namespace ARDOUR { class Session; class Pannable; -class PanControllable : public AutomationControl +class LIBARDOUR_API PanControllable : public AutomationControl { public: PanControllable (Session& s, std::string name, Pannable* o, Evoral::Parameter param) diff --git a/libs/ardour/ardour/pannable.h b/libs/ardour/ardour/pannable.h index 0d5200b685..62c9cd123b 100644 --- a/libs/ardour/ardour/pannable.h +++ b/libs/ardour/ardour/pannable.h @@ -36,7 +36,7 @@ class Session; class AutomationControl; class Panner; -class Pannable : public PBD::Stateful, public Automatable, public SessionHandleRef +class LIBARDOUR_API Pannable : public PBD::Stateful, public Automatable, public SessionHandleRef { public: Pannable (Session& s); diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h index 024dcd150c..7dd9de6e0a 100644 --- a/libs/ardour/ardour/panner.h +++ b/libs/ardour/ardour/panner.h @@ -30,6 +30,7 @@ #include "pbd/signals.h" #include "pbd/stateful.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/automation_control.h" #include "ardour/automatable.h" @@ -50,7 +51,7 @@ class BufferSet; class AudioBuffer; class Speakers; -class Panner : public PBD::Stateful, public PBD::ScopedConnectionList +class LIBARDOUR_API Panner : public PBD::Stateful, public PBD::ScopedConnectionList { public: Panner (boost::shared_ptr<Pannable>); @@ -180,7 +181,7 @@ protected: } // namespace extern "C" { -struct PanPluginDescriptor { +struct LIBARDOUR_API PanPluginDescriptor { std::string name; int32_t in; int32_t out; diff --git a/libs/ardour/ardour/panner_manager.h b/libs/ardour/ardour/panner_manager.h index c34d22285d..1db4a27e52 100644 --- a/libs/ardour/ardour/panner_manager.h +++ b/libs/ardour/ardour/panner_manager.h @@ -27,7 +27,7 @@ namespace ARDOUR { -struct PannerInfo { +struct LIBARDOUR_API PannerInfo { PanPluginDescriptor descriptor; Glib::Module* module; @@ -41,7 +41,7 @@ struct PannerInfo { } }; -class PannerManager : public ARDOUR::SessionHandlePtr +class LIBARDOUR_API PannerManager : public ARDOUR::SessionHandlePtr { public: ~PannerManager (); diff --git a/libs/ardour/ardour/panner_shell.h b/libs/ardour/ardour/panner_shell.h index dba5826370..b78573212a 100644 --- a/libs/ardour/ardour/panner_shell.h +++ b/libs/ardour/ardour/panner_shell.h @@ -30,6 +30,7 @@ #include "pbd/cartesian.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/session_object.h" @@ -45,7 +46,7 @@ class Pannable; /** Class to manage panning by instantiating and controlling * an appropriate Panner object for a given in/out configuration. */ -class PannerShell : public SessionObject +class LIBARDOUR_API PannerShell : public SessionObject { public: PannerShell (std::string name, Session&, boost::shared_ptr<Pannable>); diff --git a/libs/ardour/ardour/peak.h b/libs/ardour/ardour/peak.h index ab99889dd3..9c871a9e35 100644 --- a/libs/ardour/ardour/peak.h +++ b/libs/ardour/ardour/peak.h @@ -21,6 +21,7 @@ #define __ardour_peak_h__ #include <cmath> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" diff --git a/libs/ardour/ardour/pi_controller.h b/libs/ardour/ardour/pi_controller.h index bcbc81701a..8daf7a7068 100644 --- a/libs/ardour/ardour/pi_controller.h +++ b/libs/ardour/ardour/pi_controller.h @@ -19,9 +19,10 @@ #ifndef __libardour_pi_controller__ #define __libardour_pi_controller__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" -class PIController { +class LIBARDOUR_API PIController { public: PIController (double resample_factor, int fir_size); ~PIController(); @@ -54,7 +55,7 @@ public: #define ESTIMATOR_SIZE 16 -class PIChaser { +class LIBARDOUR_API PIChaser { public: PIChaser(); ~PIChaser(); diff --git a/libs/ardour/ardour/pitch.h b/libs/ardour/ardour/pitch.h index 961609938c..4c8db5fb80 100644 --- a/libs/ardour/ardour/pitch.h +++ b/libs/ardour/ardour/pitch.h @@ -37,7 +37,7 @@ namespace ARDOUR { namespace ARDOUR { -class Pitch : public RBEffect { +class LIBARDOUR_API Pitch : public RBEffect { public: Pitch (ARDOUR::Session&, TimeFXRequest&); ~Pitch () {} @@ -49,7 +49,7 @@ class Pitch : public RBEffect { namespace ARDOUR { -class Pitch : public Filter { +class LIBARDOUR_API Pitch : public Filter { public: Pitch (ARDOUR::Session&, TimeFXRequest&); ~Pitch () {} diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h index fbe747b297..5629a04629 100644 --- a/libs/ardour/ardour/playlist.h +++ b/libs/ardour/ardour/playlist.h @@ -55,10 +55,10 @@ namespace Properties { /* fake the type, since regions are handled by SequenceProperty which doesn't care about such things. */ - extern PBD::PropertyDescriptor<bool> regions; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> regions; } -class RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_ptr<Region> > > +class LIBARDOUR_API RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_ptr<Region> > > { public: RegionListProperty (Playlist&); @@ -78,7 +78,7 @@ class RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_ Playlist& _playlist; }; -class Playlist : public SessionObject , public boost::enable_shared_from_this<Playlist> +class LIBARDOUR_API Playlist : public SessionObject , public boost::enable_shared_from_this<Playlist> { public: static void make_property_quarks (); diff --git a/libs/ardour/ardour/playlist_factory.h b/libs/ardour/ardour/playlist_factory.h index 8b5d9d6a23..505836234b 100644 --- a/libs/ardour/ardour/playlist_factory.h +++ b/libs/ardour/ardour/playlist_factory.h @@ -28,7 +28,7 @@ namespace ARDOUR { class Session; -class PlaylistFactory { +class LIBARDOUR_API PlaylistFactory { public: static PBD::Signal2<void,boost::shared_ptr<Playlist>, bool> PlaylistCreated; diff --git a/libs/ardour/ardour/playlist_source.h b/libs/ardour/ardour/playlist_source.h index 71802fddb6..55cc1f6b59 100644 --- a/libs/ardour/ardour/playlist_source.h +++ b/libs/ardour/ardour/playlist_source.h @@ -31,7 +31,7 @@ namespace ARDOUR { class Playlist; -class PlaylistSource : virtual public Source { +class LIBARDOUR_API PlaylistSource : virtual public Source { public: virtual ~PlaylistSource (); diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h index 55b76fbb08..7043460d52 100644 --- a/libs/ardour/ardour/plugin.h +++ b/libs/ardour/ardour/plugin.h @@ -32,6 +32,7 @@ #include "ardour/cycles.h" #include "ardour/latent.h" #include "ardour/plugin_insert.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/midi_state_tracker.h" @@ -49,7 +50,7 @@ class Plugin; typedef boost::shared_ptr<Plugin> PluginPtr; -class PluginInfo { +class LIBARDOUR_API PluginInfo { public: PluginInfo () { } virtual ~PluginInfo () { } @@ -87,7 +88,7 @@ class PluginInfo { typedef boost::shared_ptr<PluginInfo> PluginInfoPtr; typedef std::list<PluginInfoPtr> PluginInfoList; -class Plugin : public PBD::StatefulDestructible, public Latent +class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent { public: Plugin (ARDOUR::AudioEngine&, ARDOUR::Session&); diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index a1b9c5a685..51e1356d12 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -26,6 +26,7 @@ #include <boost/weak_ptr.hpp> #include "ardour/ardour.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/processor.h" #include "ardour/automation_control.h" @@ -40,7 +41,7 @@ class Plugin; /** Plugin inserts: send data through a plugin */ -class PluginInsert : public Processor +class LIBARDOUR_API PluginInsert : public Processor { public: PluginInsert (Session&, boost::shared_ptr<Plugin> = boost::shared_ptr<Plugin>()); diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h index 2464368ae7..bee1c68704 100644 --- a/libs/ardour/ardour/plugin_manager.h +++ b/libs/ardour/ardour/plugin_manager.h @@ -30,6 +30,7 @@ #include <set> #include <boost/utility.hpp> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/plugin.h" @@ -37,7 +38,7 @@ namespace ARDOUR { class Plugin; -class PluginManager : public boost::noncopyable { +class LIBARDOUR_API PluginManager : public boost::noncopyable { public: static PluginManager& instance(); diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h index 77bf2b6f71..5fb9a7efc3 100644 --- a/libs/ardour/ardour/port.h +++ b/libs/ardour/ardour/port.h @@ -31,6 +31,7 @@ #include "ardour/data_type.h" #include "ardour/port_engine.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -38,7 +39,7 @@ namespace ARDOUR { class AudioEngine; class Buffer; -class Port : public boost::noncopyable +class LIBARDOUR_API Port : public boost::noncopyable { public: virtual ~Port (); diff --git a/libs/ardour/ardour/port_engine.h b/libs/ardour/ardour/port_engine.h index 8c0ec9e754..16d3da3576 100644 --- a/libs/ardour/ardour/port_engine.h +++ b/libs/ardour/ardour/port_engine.h @@ -26,6 +26,7 @@ #include <stdint.h> #include "ardour/data_type.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -74,7 +75,7 @@ class PortManager; * documentation, on which this entire object is based. */ -class PortEngine { +class LIBARDOUR_API PortEngine { public: PortEngine (PortManager& pm) : manager (pm) {} virtual ~PortEngine() {} diff --git a/libs/ardour/ardour/port_insert.h b/libs/ardour/ardour/port_insert.h index abd9fb73cc..327080984a 100644 --- a/libs/ardour/ardour/port_insert.h +++ b/libs/ardour/ardour/port_insert.h @@ -26,6 +26,7 @@ #include "ardour/ardour.h" #include "ardour/io_processor.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" class XMLNode; @@ -41,7 +42,7 @@ class Pannable; /** Port inserts: send output to a Jack port, pick up input at a Jack port */ -class PortInsert : public IOProcessor +class LIBARDOUR_API PortInsert : public IOProcessor { public: PortInsert (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster> mm); diff --git a/libs/ardour/ardour/port_manager.h b/libs/ardour/ardour/port_manager.h index ba15142d83..b36e98fe64 100644 --- a/libs/ardour/ardour/port_manager.h +++ b/libs/ardour/ardour/port_manager.h @@ -40,7 +40,7 @@ namespace ARDOUR { class PortEngine; class AudioBackend; -class PortManager +class LIBARDOUR_API PortManager { public: typedef std::map<std::string,boost::shared_ptr<Port> > Ports; diff --git a/libs/ardour/ardour/port_set.h b/libs/ardour/ardour/port_set.h index 690875cd86..cd76f75ee3 100644 --- a/libs/ardour/ardour/port_set.h +++ b/libs/ardour/ardour/port_set.h @@ -39,7 +39,7 @@ class MidiPort; * and once in a vector of all port (_all_ports). This is to speed up the * fairly common case of iterating over all ports. */ -class PortSet : public boost::noncopyable { +class LIBARDOUR_API PortSet : public boost::noncopyable { public: PortSet(); diff --git a/libs/ardour/ardour/process_thread.h b/libs/ardour/ardour/process_thread.h index f96595fbbf..779fdaea2d 100644 --- a/libs/ardour/ardour/process_thread.h +++ b/libs/ardour/ardour/process_thread.h @@ -23,6 +23,7 @@ #include <glibmm/threads.h> #include "ardour/chan_count.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -30,7 +31,7 @@ namespace ARDOUR { class ThreadBuffers; class BufferSet; -class ProcessThread +class LIBARDOUR_API ProcessThread { public: ProcessThread (); diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index 18f13dbc78..85d466a169 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -30,6 +30,7 @@ #include "ardour/buffer_set.h" #include "ardour/latent.h" #include "ardour/session_object.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/automatable.h" @@ -41,7 +42,7 @@ class Session; class Route; /** A mixer strip element - plugin, send, meter, etc */ -class Processor : public SessionObject, public Automatable, public Latent +class LIBARDOUR_API Processor : public SessionObject, public Automatable, public Latent { public: static const std::string state_node_name; diff --git a/libs/ardour/ardour/profile.h b/libs/ardour/ardour/profile.h index 5d4e611833..9346138e00 100644 --- a/libs/ardour/ardour/profile.h +++ b/libs/ardour/ardour/profile.h @@ -23,9 +23,11 @@ #include <boost/dynamic_bitset.hpp> #include <stdint.h> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class RuntimeProfile { +class LIBARDOUR_API RuntimeProfile { public: enum Element { SmallScreen, @@ -51,7 +53,7 @@ private: }; -extern RuntimeProfile* Profile; +LIBARDOUR_API extern RuntimeProfile* Profile; }; // namespace ARDOUR diff --git a/libs/ardour/ardour/progress.h b/libs/ardour/ardour/progress.h index 10b7d75960..79043a31ee 100644 --- a/libs/ardour/ardour/progress.h +++ b/libs/ardour/ardour/progress.h @@ -22,10 +22,12 @@ #include <list> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** A class to handle reporting of progress of something */ -class Progress +class LIBARDOUR_API Progress { public: Progress (); diff --git a/libs/ardour/ardour/proxy_controllable.h b/libs/ardour/ardour/proxy_controllable.h index 169f60f9f5..066f2aac81 100644 --- a/libs/ardour/ardour/proxy_controllable.h +++ b/libs/ardour/ardour/proxy_controllable.h @@ -30,7 +30,7 @@ namespace ARDOUR { so that it can be used like a regular Controllable, bound to MIDI, OSC etc. */ -class ProxyControllable : public PBD::Controllable { +class LIBARDOUR_API ProxyControllable : public PBD::Controllable { public: ProxyControllable (const std::string& name, PBD::Controllable::Flag flags, boost::function1<bool,double> setter, diff --git a/libs/ardour/ardour/public_diskstream.h b/libs/ardour/ardour/public_diskstream.h index 125e1a21ce..5b5cd48231 100644 --- a/libs/ardour/ardour/public_diskstream.h +++ b/libs/ardour/ardour/public_diskstream.h @@ -27,7 +27,7 @@ class Source; class Location; /** Public interface to a Diskstream */ -class PublicDiskstream +class LIBARDOUR_API PublicDiskstream { public: virtual ~PublicDiskstream() {} diff --git a/libs/ardour/ardour/quantize.h b/libs/ardour/ardour/quantize.h index e56927767e..c41d172177 100644 --- a/libs/ardour/ardour/quantize.h +++ b/libs/ardour/ardour/quantize.h @@ -21,6 +21,7 @@ #ifndef __ardour_quantize_h__ #define __ardour_quantize_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/midi_operator.h" @@ -28,7 +29,7 @@ namespace ARDOUR { class Session; -class Quantize : public MidiOperator { +class LIBARDOUR_API Quantize : public MidiOperator { public: Quantize (ARDOUR::Session&, bool snap_start, bool snap_end, double start_grid, double end_grid, diff --git a/libs/ardour/ardour/rb_effect.h b/libs/ardour/ardour/rb_effect.h index 1d36f31332..6c10278fb3 100644 --- a/libs/ardour/ardour/rb_effect.h +++ b/libs/ardour/ardour/rb_effect.h @@ -27,7 +27,7 @@ namespace ARDOUR { class AudioRegion; -class RBEffect : public Filter { +class LIBARDOUR_API RBEffect : public Filter { public: RBEffect (ARDOUR::Session&, TimeFXRequest&); ~RBEffect (); diff --git a/libs/ardour/ardour/rc_configuration.h b/libs/ardour/ardour/rc_configuration.h index e2f68477a1..d85c723ff8 100644 --- a/libs/ardour/ardour/rc_configuration.h +++ b/libs/ardour/ardour/rc_configuration.h @@ -23,6 +23,7 @@ #include <map> #include <string> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" #include "ardour/configuration.h" @@ -31,7 +32,7 @@ class XMLNode; namespace ARDOUR { -class RCConfiguration : public Configuration +class LIBARDOUR_API RCConfiguration : public Configuration { public: RCConfiguration(); @@ -83,8 +84,8 @@ class RCConfiguration : public Configuration }; /* XXX: rename this */ -extern RCConfiguration *Config; -extern gain_t speed_quietning; /* see comment in configuration.cc */ +LIBARDOUR_API extern RCConfiguration *Config; +LIBARDOUR_API extern gain_t speed_quietning; /* see comment in configuration.cc */ } // namespace ARDOUR diff --git a/libs/ardour/ardour/readable.h b/libs/ardour/ardour/readable.h index d184902deb..18190436df 100644 --- a/libs/ardour/ardour/readable.h +++ b/libs/ardour/ardour/readable.h @@ -20,11 +20,12 @@ #ifndef __ardour_readable_h__ #define __ardour_readable_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { -class Readable { +class LIBARDOUR_API Readable { public: Readable () {} virtual ~Readable() {} diff --git a/libs/ardour/ardour/recent_sessions.h b/libs/ardour/ardour/recent_sessions.h index 2951496849..03134da6d2 100644 --- a/libs/ardour/ardour/recent_sessions.h +++ b/libs/ardour/ardour/recent_sessions.h @@ -24,13 +24,15 @@ #include <utility> #include <string> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { typedef std::deque<std::pair<std::string,std::string> > RecentSessions; - int read_recent_sessions (RecentSessions& rs); - int store_recent_sessions (std::string name, std::string path); - int write_recent_sessions (RecentSessions& rs); - int remove_recent_sessions (const std::string& path); + LIBARDOUR_API int read_recent_sessions (RecentSessions& rs); + LIBARDOUR_API int store_recent_sessions (std::string name, std::string path); + LIBARDOUR_API int write_recent_sessions (RecentSessions& rs); + LIBARDOUR_API int remove_recent_sessions (const std::string& path); }; // namespace ARDOUR #endif // __ardour_recent_sessions_h__ diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h index 593832343f..a66047a02a 100644 --- a/libs/ardour/ardour/region.h +++ b/libs/ardour/ardour/region.h @@ -38,35 +38,34 @@ class XMLNode; - namespace ARDOUR { namespace Properties { - extern PBD::PropertyDescriptor<bool> muted; - extern PBD::PropertyDescriptor<bool> opaque; - extern PBD::PropertyDescriptor<bool> locked; - extern PBD::PropertyDescriptor<bool> video_locked; - extern PBD::PropertyDescriptor<bool> automatic; - extern PBD::PropertyDescriptor<bool> whole_file; - extern PBD::PropertyDescriptor<bool> import; - extern PBD::PropertyDescriptor<bool> external; - extern PBD::PropertyDescriptor<bool> sync_marked; - extern PBD::PropertyDescriptor<bool> left_of_split; - extern PBD::PropertyDescriptor<bool> right_of_split; - extern PBD::PropertyDescriptor<bool> hidden; - extern PBD::PropertyDescriptor<bool> position_locked; - extern PBD::PropertyDescriptor<bool> valid_transients; - extern PBD::PropertyDescriptor<framepos_t> start; - extern PBD::PropertyDescriptor<framecnt_t> length; - extern PBD::PropertyDescriptor<framepos_t> position; - extern PBD::PropertyDescriptor<framecnt_t> sync_position; - extern PBD::PropertyDescriptor<layer_t> layer; - extern PBD::PropertyDescriptor<framepos_t> ancestral_start; - extern PBD::PropertyDescriptor<framecnt_t> ancestral_length; - extern PBD::PropertyDescriptor<float> stretch; - extern PBD::PropertyDescriptor<float> shift; - extern PBD::PropertyDescriptor<PositionLockStyle> position_lock_style; - extern PBD::PropertyDescriptor<uint64_t> layering_index; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> muted; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> opaque; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> locked; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> video_locked; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> automatic; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> whole_file; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> import; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> external; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> sync_marked; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> left_of_split; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> right_of_split; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> hidden; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> position_locked; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> valid_transients; + LIBARDOUR_API extern PBD::PropertyDescriptor<framepos_t> start; + LIBARDOUR_API extern PBD::PropertyDescriptor<framecnt_t> length; + LIBARDOUR_API extern PBD::PropertyDescriptor<framepos_t> position; + LIBARDOUR_API extern PBD::PropertyDescriptor<framecnt_t> sync_position; + LIBARDOUR_API extern PBD::PropertyDescriptor<layer_t> layer; + LIBARDOUR_API extern PBD::PropertyDescriptor<framepos_t> ancestral_start; + LIBARDOUR_API extern PBD::PropertyDescriptor<framecnt_t> ancestral_length; + LIBARDOUR_API extern PBD::PropertyDescriptor<float> stretch; + LIBARDOUR_API extern PBD::PropertyDescriptor<float> shift; + LIBARDOUR_API extern PBD::PropertyDescriptor<PositionLockStyle> position_lock_style; + LIBARDOUR_API extern PBD::PropertyDescriptor<uint64_t> layering_index; }; class Playlist; @@ -74,14 +73,14 @@ class Filter; class ExportSpecification; class Progress; -enum RegionEditState { +enum LIBARDOUR_API RegionEditState { EditChangesNothing = 0, EditChangesName = 1, EditChangesID = 2 }; -class Region +class LIBARDOUR_API Region : public SessionObject , public boost::enable_shared_from_this<Region> , public Readable diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h index ed0c962d87..a9b73dc462 100644 --- a/libs/ardour/ardour/region_factory.h +++ b/libs/ardour/ardour/region_factory.h @@ -28,6 +28,7 @@ #include "pbd/property_list.h" #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" class XMLNode; @@ -38,7 +39,7 @@ namespace ARDOUR { class Session; class AudioRegion; -class RegionFactory { +class LIBARDOUR_API RegionFactory { public: typedef std::map<PBD::ID,boost::shared_ptr<Region> > RegionMap; diff --git a/libs/ardour/ardour/region_sorters.h b/libs/ardour/ardour/region_sorters.h index baa3a3417d..9fd739a4da 100644 --- a/libs/ardour/ardour/region_sorters.h +++ b/libs/ardour/ardour/region_sorters.h @@ -24,13 +24,13 @@ namespace ARDOUR { -struct RegionSortByPosition { +struct LIBARDOUR_API RegionSortByPosition { bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) { return a->position() < b->position(); } }; -struct RegionSortByLayer { +struct LIBARDOUR_API RegionSortByLayer { bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) { return a->layer() < b->layer(); } diff --git a/libs/ardour/ardour/resampled_source.h b/libs/ardour/ardour/resampled_source.h index a36ad4331f..bb088f36fb 100644 --- a/libs/ardour/ardour/resampled_source.h +++ b/libs/ardour/ardour/resampled_source.h @@ -22,12 +22,13 @@ #include <samplerate.h> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/importable_source.h" namespace ARDOUR { -class ResampledImportableSource : public ImportableSource +class LIBARDOUR_API ResampledImportableSource : public ImportableSource { public: ResampledImportableSource (boost::shared_ptr<ImportableSource>, framecnt_t rate, SrcQuality); diff --git a/libs/ardour/ardour/return.h b/libs/ardour/ardour/return.h index 6dcd6ac2fc..45bb5573b2 100644 --- a/libs/ardour/ardour/return.h +++ b/libs/ardour/ardour/return.h @@ -34,7 +34,7 @@ class Amp; class PeakMeter; -class Return : public IOProcessor +class LIBARDOUR_API Return : public IOProcessor { public: Return (Session&, bool internal = false); diff --git a/libs/ardour/ardour/reverse.h b/libs/ardour/ardour/reverse.h index edc72ce707..4c24a7c1cb 100644 --- a/libs/ardour/ardour/reverse.h +++ b/libs/ardour/ardour/reverse.h @@ -24,7 +24,7 @@ namespace ARDOUR { -class Reverse : public Filter { +class LIBARDOUR_API Reverse : public Filter { public: Reverse (ARDOUR::Session&); ~Reverse (); diff --git a/libs/ardour/ardour/revision.h b/libs/ardour/ardour/revision.h index 9eeb1e2a9a..849a96fa07 100644 --- a/libs/ardour/ardour/revision.h +++ b/libs/ardour/ardour/revision.h @@ -20,8 +20,10 @@ #ifndef __ardour_revision_h__ #define __ardour_revision_h__ +#include "ardour/libardour_visibility.h" + namespace ARDOUR { - extern const char* revision; + LIBARDOUR_API extern const char* revision; } #endif diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 23f24cb275..a7eeace7b4 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -43,6 +43,7 @@ #include "ardour/ardour.h" #include "ardour/instrument_info.h" #include "ardour/io.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/mute_master.h" #include "ardour/route_group_member.h" @@ -67,7 +68,7 @@ class Pannable; class CapturingProcessor; class InternalSend; -class Route : public SessionObject, public Automatable, public RouteGroupMember, public GraphNode, public boost::enable_shared_from_this<Route> +class LIBARDOUR_API Route : public SessionObject, public Automatable, public RouteGroupMember, public GraphNode, public boost::enable_shared_from_this<Route> { public: diff --git a/libs/ardour/ardour/route_graph.h b/libs/ardour/ardour/route_graph.h index 0b0af6c7dd..77e74ceafd 100644 --- a/libs/ardour/ardour/route_graph.h +++ b/libs/ardour/ardour/route_graph.h @@ -37,7 +37,7 @@ typedef boost::shared_ptr<Route> GraphVertex; * * This may be a premature optimisation... */ -class GraphEdges +class LIBARDOUR_API GraphEdges { public: typedef std::map<GraphVertex, std::set<GraphVertex> > EdgeMap; diff --git a/libs/ardour/ardour/route_group.h b/libs/ardour/ardour/route_group.h index 2f62193d83..763430e1f1 100644 --- a/libs/ardour/ardour/route_group.h +++ b/libs/ardour/ardour/route_group.h @@ -29,24 +29,25 @@ #include "pbd/stateful.h" #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/session_object.h" namespace ARDOUR { namespace Properties { - extern PBD::PropertyDescriptor<bool> relative; - extern PBD::PropertyDescriptor<bool> active; - extern PBD::PropertyDescriptor<bool> gain; - extern PBD::PropertyDescriptor<bool> mute; - extern PBD::PropertyDescriptor<bool> solo; - extern PBD::PropertyDescriptor<bool> recenable; - extern PBD::PropertyDescriptor<bool> select; - extern PBD::PropertyDescriptor<bool> route_active; - extern PBD::PropertyDescriptor<bool> color; - extern PBD::PropertyDescriptor<bool> monitoring; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> relative; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> active; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> gain; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> mute; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> solo; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> recenable; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> select; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> route_active; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> color; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> monitoring; /* we use this, but its declared in region.cc */ - extern PBD::PropertyDescriptor<bool> hidden; + LIBARDOUR_API extern PBD::PropertyDescriptor<bool> hidden; }; class Route; @@ -54,7 +55,7 @@ class Track; class AudioTrack; class Session; -class RouteGroup : public SessionObject +class LIBARDOUR_API RouteGroup : public SessionObject { public: static void make_property_quarks(); diff --git a/libs/ardour/ardour/route_group_member.h b/libs/ardour/ardour/route_group_member.h index 2665c719e6..b0368cb240 100644 --- a/libs/ardour/ardour/route_group_member.h +++ b/libs/ardour/ardour/route_group_member.h @@ -26,7 +26,7 @@ namespace ARDOUR { class RouteGroup; -class RouteGroupMember +class LIBARDOUR_API RouteGroupMember { public: RouteGroupMember () : _route_group (0) {} diff --git a/libs/ardour/ardour/runtime_functions.h b/libs/ardour/ardour/runtime_functions.h index 8882d721d7..e1d6b99f61 100644 --- a/libs/ardour/ardour/runtime_functions.h +++ b/libs/ardour/ardour/runtime_functions.h @@ -20,6 +20,7 @@ #ifndef __ardour_runtime_functions_h__ #define __ardour_runtime_functions_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -30,11 +31,11 @@ namespace ARDOUR { typedef void (*mix_buffers_with_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, pframes_t, float); typedef void (*mix_buffers_no_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, pframes_t); - extern compute_peak_t compute_peak; - extern find_peaks_t find_peaks; - extern apply_gain_to_buffer_t apply_gain_to_buffer; - extern mix_buffers_with_gain_t mix_buffers_with_gain; - extern mix_buffers_no_gain_t mix_buffers_no_gain; + LIBARDOUR_API extern compute_peak_t compute_peak; + LIBARDOUR_API extern find_peaks_t find_peaks; + LIBARDOUR_API extern apply_gain_to_buffer_t apply_gain_to_buffer; + LIBARDOUR_API extern mix_buffers_with_gain_t mix_buffers_with_gain; + LIBARDOUR_API extern mix_buffers_no_gain_t mix_buffers_no_gain; } #endif /* __ardour_runtime_functions_h__ */ diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h index 1a21d1d050..5c15a17228 100644 --- a/libs/ardour/ardour/send.h +++ b/libs/ardour/ardour/send.h @@ -32,7 +32,7 @@ namespace ARDOUR { class PeakMeter; class Amp; -class Send : public Delivery +class LIBARDOUR_API Send : public Delivery { public: Send (Session&, boost::shared_ptr<Pannable> pannable, boost::shared_ptr<MuteMaster>, Delivery::Role r = Delivery::Send); diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 6fe7ac8637..381f9fbf4b 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -140,7 +140,7 @@ class WindowsVSTPlugin; extern void setup_enum_writer (); -class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager +class LIBARDOUR_API LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager { public: enum RecordState { diff --git a/libs/ardour/ardour/session_configuration.h b/libs/ardour/ardour/session_configuration.h index 46d6defa7d..e72d19f322 100644 --- a/libs/ardour/ardour/session_configuration.h +++ b/libs/ardour/ardour/session_configuration.h @@ -24,7 +24,7 @@ namespace ARDOUR { -class SessionConfiguration : public Configuration +class LIBARDOUR_API SessionConfiguration : public Configuration { public: SessionConfiguration (); diff --git a/libs/ardour/ardour/session_directory.h b/libs/ardour/ardour/session_directory.h index a4c372d6ed..685f0870dd 100644 --- a/libs/ardour/ardour/session_directory.h +++ b/libs/ardour/ardour/session_directory.h @@ -22,9 +22,11 @@ #include <string> #include <vector> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class SessionDirectory +class LIBARDOUR_API SessionDirectory { public: diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index e90ab71e26..d4102a62ef 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -28,7 +28,7 @@ #include "pbd/ringbuffer.h" #include "pbd/event_loop.h" -#include "ardour/visibility.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { diff --git a/libs/ardour/ardour/session_handle.h b/libs/ardour/ardour/session_handle.h index 0331970e5c..330f1805cd 100644 --- a/libs/ardour/ardour/session_handle.h +++ b/libs/ardour/ardour/session_handle.h @@ -22,10 +22,12 @@ #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class Session; -class SessionHandleRef : public PBD::ScopedConnectionList +class LIBARDOUR_API SessionHandleRef : public PBD::ScopedConnectionList { public: SessionHandleRef (ARDOUR::Session& s); @@ -37,7 +39,7 @@ class SessionHandleRef : public PBD::ScopedConnectionList virtual void insanity_check (); }; -class SessionHandlePtr +class LIBARDOUR_API SessionHandlePtr { public: SessionHandlePtr (ARDOUR::Session* s); diff --git a/libs/ardour/ardour/session_metadata.h b/libs/ardour/ardour/session_metadata.h index c4341dbc61..b163e98f65 100644 --- a/libs/ardour/ardour/session_metadata.h +++ b/libs/ardour/ardour/session_metadata.h @@ -28,13 +28,15 @@ #include "pbd/statefuldestructible.h" #include "pbd/xml++.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** Represents metadata associated to a Session * Metadata can be accessed and edited via this class. * Exported files can also be tagged with this data. */ -class SessionMetadata : public PBD::StatefulDestructible +class LIBARDOUR_API SessionMetadata : public PBD::StatefulDestructible { public: //singleton instance: diff --git a/libs/ardour/ardour/session_object.h b/libs/ardour/ardour/session_object.h index eacb0c49e9..ac74f07b77 100644 --- a/libs/ardour/ardour/session_object.h +++ b/libs/ardour/ardour/session_object.h @@ -31,7 +31,7 @@ namespace ARDOUR { namespace Properties { - extern PBD::PropertyDescriptor<std::string> name; + LIBARDOUR_API extern PBD::PropertyDescriptor<std::string> name; } class Session; @@ -40,7 +40,7 @@ class Session; expected to be destroyed before the session calls drop_references(). */ -class SessionObject : public SessionHandleRef, public PBD::StatefulDestructible +class LIBARDOUR_API SessionObject : public SessionHandleRef, public PBD::StatefulDestructible { public: static void make_property_quarks (); diff --git a/libs/ardour/ardour/session_playlists.h b/libs/ardour/ardour/session_playlists.h index 83dc8ee58c..e7ad1624dd 100644 --- a/libs/ardour/ardour/session_playlists.h +++ b/libs/ardour/ardour/session_playlists.h @@ -44,7 +44,7 @@ class Session; class Crossfade; class Track; -class SessionPlaylists : public PBD::ScopedConnectionList +class LIBARDOUR_API SessionPlaylists : public PBD::ScopedConnectionList { public: ~SessionPlaylists (); diff --git a/libs/ardour/ardour/session_state_utils.h b/libs/ardour/ardour/session_state_utils.h index 166b738d05..f35bbd0778 100644 --- a/libs/ardour/ardour/session_state_utils.h +++ b/libs/ardour/ardour/session_state_utils.h @@ -22,6 +22,8 @@ #include <vector> #include <string> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** @@ -32,7 +34,7 @@ namespace ARDOUR { * * @return true if successful, false otherwise. */ -bool create_backup_file (const std::string & file_path); +LIBARDOUR_API bool create_backup_file (const std::string & file_path); /** * Get the absolute paths to all state files in the directory @@ -41,8 +43,8 @@ bool create_backup_file (const std::string & file_path); * @param directory_path The absolute path to a directory. * @param result vector to contain resulting state files. */ -void get_state_files_in_directory (const std::string& directory_path, - std::vector<std::string>& result); +LIBARDOUR_API void get_state_files_in_directory (const std::string& directory_path, + std::vector<std::string>& result); /** * Given a vector of paths to files, return a vector containing @@ -52,7 +54,7 @@ void get_state_files_in_directory (const std::string& directory_path, * @return a vector containing a list of file names without any * filename extension. */ -std::vector<std::string> get_file_names_no_extension (const std::vector<std::string> & file_paths); +LIBARDOUR_API std::vector<std::string> get_file_names_no_extension (const std::vector<std::string> & file_paths); } // namespace ARDOUR diff --git a/libs/ardour/ardour/session_utils.h b/libs/ardour/ardour/session_utils.h index ab24e976b2..bd9cc92267 100644 --- a/libs/ardour/ardour/session_utils.h +++ b/libs/ardour/ardour/session_utils.h @@ -23,9 +23,11 @@ #include <string> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -int find_session (std::string str, std::string& path, std::string& snapshot, bool& isnew); + LIBARDOUR_API extern int find_session (std::string str, std::string& path, std::string& snapshot, bool& isnew); }; diff --git a/libs/ardour/ardour/silentfilesource.h b/libs/ardour/ardour/silentfilesource.h index 1ff251e71a..cf6462247a 100644 --- a/libs/ardour/ardour/silentfilesource.h +++ b/libs/ardour/ardour/silentfilesource.h @@ -25,7 +25,7 @@ namespace ARDOUR { -class SilentFileSource : public AudioFileSource { +class LIBARDOUR_API SilentFileSource : public AudioFileSource { public: int update_header (framepos_t /*when*/, struct tm&, time_t) { return 0; } int flush_header () { return 0; } diff --git a/libs/ardour/ardour/slave.h b/libs/ardour/ardour/slave.h index a0b7b878e4..faeb3be357 100644 --- a/libs/ardour/ardour/slave.h +++ b/libs/ardour/ardour/slave.h @@ -31,6 +31,7 @@ #include "timecode/time.h" #include "ltc/ltc.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "midi++/parser.h" #include "midi++/types.h" @@ -59,7 +60,7 @@ class MidiPort; * Therefore it is rather that class, that makes ARDOUR a slave by connecting it * to its external time master. */ -class Slave { +class LIBARDOUR_API Slave { public: Slave() { } virtual ~Slave() {} @@ -180,7 +181,7 @@ class Slave { }; /// We need this wrapper for testability, it's just too hard to mock up a session class -class ISlaveSessionProxy { +class LIBARDOUR_API ISlaveSessionProxy { public: virtual ~ISlaveSessionProxy() {} virtual TempoMap& tempo_map() const { return *((TempoMap *) 0); } @@ -198,7 +199,7 @@ class ISlaveSessionProxy { /// The Session Proxy for use in real Ardour -class SlaveSessionProxy : public ISlaveSessionProxy { +class LIBARDOUR_API SlaveSessionProxy : public ISlaveSessionProxy { Session& session; public: @@ -215,7 +216,7 @@ class SlaveSessionProxy : public ISlaveSessionProxy { void request_transport_speed (double speed); }; -struct SafeTime { +struct LIBARDOUR_API SafeTime { volatile int guard1; framepos_t position; framepos_t timestamp; @@ -231,7 +232,7 @@ struct SafeTime { } }; -class TimecodeSlave : public Slave { +class LIBARDOUR_API TimecodeSlave : public Slave { public: TimecodeSlave () {} @@ -248,7 +249,7 @@ class TimecodeSlave : public Slave { bool timecode_negative_offset; }; -class MTC_Slave : public TimecodeSlave { +class LIBARDOUR_API MTC_Slave : public TimecodeSlave { public: MTC_Slave (Session&, MidiPort&); ~MTC_Slave (); @@ -332,7 +333,7 @@ class MTC_Slave : public TimecodeSlave { void parameter_changed(std::string const & p); }; -class LTC_Slave : public TimecodeSlave { +class LIBARDOUR_API LTC_Slave : public TimecodeSlave { public: LTC_Slave (Session&); ~LTC_Slave (); @@ -400,7 +401,7 @@ public: double b, c; ///< DLL filter coefficients }; -class MIDIClock_Slave : public Slave { +class LIBARDOUR_API MIDIClock_Slave : public Slave { public: MIDIClock_Slave (Session&, MidiPort&, int ppqn = 24); @@ -486,7 +487,7 @@ class MIDIClock_Slave : public Slave { bool _starting; }; -class Engine_Slave : public Slave +class LIBARDOUR_API Engine_Slave : public Slave { public: Engine_Slave (AudioEngine&); diff --git a/libs/ardour/ardour/smf_source.h b/libs/ardour/ardour/smf_source.h index ca337a62c2..82e6252b45 100644 --- a/libs/ardour/ardour/smf_source.h +++ b/libs/ardour/ardour/smf_source.h @@ -34,7 +34,7 @@ namespace ARDOUR { template<typename T> class MidiRingBuffer; /** Standard Midi File (Type 0) Source */ -class SMFSource : public MidiSource, public FileSource, public Evoral::SMF { +class LIBARDOUR_API SMFSource : public MidiSource, public FileSource, public Evoral::SMF { public: /** Constructor for existing external-to-session files */ SMFSource (Session& session, const std::string& path, diff --git a/libs/ardour/ardour/sndfileimportable.h b/libs/ardour/ardour/sndfileimportable.h index 8612e264c4..10c429c545 100644 --- a/libs/ardour/ardour/sndfileimportable.h +++ b/libs/ardour/ardour/sndfileimportable.h @@ -22,12 +22,13 @@ #include <boost/shared_ptr.hpp> #include <sndfile.h> +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/importable_source.h" namespace ARDOUR { -class SndFileImportableSource : public ImportableSource { +class LIBARDOUR_API SndFileImportableSource : public ImportableSource { public: SndFileImportableSource (const std::string& path); virtual ~SndFileImportableSource(); diff --git a/libs/ardour/ardour/sndfilesource.h b/libs/ardour/ardour/sndfilesource.h index bed431c490..25b8f003b2 100644 --- a/libs/ardour/ardour/sndfilesource.h +++ b/libs/ardour/ardour/sndfilesource.h @@ -28,7 +28,7 @@ namespace ARDOUR { -class SndFileSource : public AudioFileSource { +class LIBARDOUR_API SndFileSource : public AudioFileSource { public: /** Constructor to be called for existing external-to-session files */ SndFileSource (Session&, const std::string& path, int chn, Flag flags); diff --git a/libs/ardour/ardour/soundseq.h b/libs/ardour/ardour/soundseq.h index ff8e96ad8f..02425a71cf 100644 --- a/libs/ardour/ardour/soundseq.h +++ b/libs/ardour/ardour/soundseq.h @@ -26,21 +26,21 @@ namespace ARDOUR { typedef gint16 peak_datum; -struct peak_data_t { +struct LIBARDOUR_API peak_data_t { peak_datum min; peak_datum max; }; const uint32_t frames_per_peak = 2048; -class Sound : public EDL::Piece { +class LIBARDOUR_API Sound : public EDL::Piece { public: int peak (peak_data_t& pk, uint32_t start, uint32_t cnt); int read_peaks (peak_data_t *, uint32_t npeaks, uint32_t start, uint32_t cnt); int build_peak (uint32_t first_frame, uint32_t cnt); }; -class SoundPlaylist : public EDL::Playlist { +class LIBARDOUR_API SoundPlaylist : public EDL::Playlist { public: int read_peaks (peak_data_t *, uint32_t npeaks, uint32_t start, uint32_t cnt); }; diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h index 5e851702d4..78b3cfaa21 100644 --- a/libs/ardour/ardour/source.h +++ b/libs/ardour/ardour/source.h @@ -36,7 +36,7 @@ namespace ARDOUR { class Session; -class Source : public SessionObject +class LIBARDOUR_API Source : public SessionObject { public: enum Flag { diff --git a/libs/ardour/ardour/source_factory.h b/libs/ardour/ardour/source_factory.h index c94f783b44..4ef2cd60ee 100644 --- a/libs/ardour/ardour/source_factory.h +++ b/libs/ardour/ardour/source_factory.h @@ -36,7 +36,7 @@ class Session; class AudioSource; class Playlist; -class SourceFactory { +class LIBARDOUR_API SourceFactory { public: static void init (); diff --git a/libs/ardour/ardour/speaker.h b/libs/ardour/ardour/speaker.h index 3deeb8b0d9..c643eb5d02 100644 --- a/libs/ardour/ardour/speaker.h +++ b/libs/ardour/ardour/speaker.h @@ -22,9 +22,11 @@ #include "pbd/cartesian.h" #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class Speaker { +class LIBARDOUR_API Speaker { public: Speaker (int, const PBD::AngularVector& position); Speaker (const Speaker &); diff --git a/libs/ardour/ardour/speakers.h b/libs/ardour/ardour/speakers.h index dbe4ef180e..cde2c40dbb 100644 --- a/libs/ardour/ardour/speakers.h +++ b/libs/ardour/ardour/speakers.h @@ -31,7 +31,7 @@ class XMLNode; namespace ARDOUR { -class Speakers : public PBD::Stateful { +class LIBARDOUR_API Speakers : public PBD::Stateful { public: Speakers (); Speakers (const Speakers&); diff --git a/libs/ardour/ardour/spline.h b/libs/ardour/ardour/spline.h index 6a12e96d52..475441fd44 100644 --- a/libs/ardour/ardour/spline.h +++ b/libs/ardour/ardour/spline.h @@ -28,7 +28,7 @@ extern "C" { typedef struct _spline Spline; typedef struct _spline_point SplinePoint; -struct _spline_point +struct LIBARDOUR_API _spline_point { float x; float y; @@ -45,7 +45,7 @@ void spline_fill (Spline *, float x0, float x1, float *vec, uint32_t veclen); float spline_get_max_x (Spline *); float spline_get_min_x (Spline *); -struct _spline +struct LIBARDOUR_API _spline { float *deriv2; float *x; diff --git a/libs/ardour/ardour/stretch.h b/libs/ardour/ardour/stretch.h index 066ed7861a..edca5fc44b 100644 --- a/libs/ardour/ardour/stretch.h +++ b/libs/ardour/ardour/stretch.h @@ -33,7 +33,7 @@ namespace ARDOUR { -class RBStretch : public RBEffect { +class LIBARDOUR_API RBStretch : public RBEffect { public: RBStretch (ARDOUR::Session&, TimeFXRequest&); ~RBStretch() {} @@ -47,7 +47,7 @@ class RBStretch : public RBEffect { namespace ARDOUR { -class STStretch : public Filter { +class LIBARDOUR_API STStretch : public Filter { public: STStretch (ARDOUR::Session&, TimeFXRequest&); ~STStretch (); diff --git a/libs/ardour/ardour/strip_silence.h b/libs/ardour/ardour/strip_silence.h index eed4320173..59f4ea0a57 100644 --- a/libs/ardour/ardour/strip_silence.h +++ b/libs/ardour/ardour/strip_silence.h @@ -22,7 +22,7 @@ namespace ARDOUR { /// A filter to strip silence from regions -class StripSilence : public Filter +class LIBARDOUR_API StripSilence : public Filter { public: StripSilence (Session &, const AudioIntervalMap&, framecnt_t fade_length); diff --git a/libs/ardour/ardour/tape_file_matcher.h b/libs/ardour/ardour/tape_file_matcher.h index 6c8392f46f..623bd406a8 100644 --- a/libs/ardour/ardour/tape_file_matcher.h +++ b/libs/ardour/ardour/tape_file_matcher.h @@ -23,9 +23,11 @@ #include <regex.h> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class TapeFileMatcher +class LIBARDOUR_API TapeFileMatcher { public: diff --git a/libs/ardour/ardour/template_utils.h b/libs/ardour/ardour/template_utils.h index e01a62bbd1..dc56c53c44 100644 --- a/libs/ardour/ardour/template_utils.h +++ b/libs/ardour/ardour/template_utils.h @@ -24,23 +24,25 @@ #include <string> #include <vector> +#include "ardour/libardour_visibility.h" + namespace ARDOUR { - std::string system_template_directory (); - std::string system_route_template_directory (); + LIBARDOUR_API std::string system_template_directory (); + LIBARDOUR_API std::string system_route_template_directory (); - std::string user_template_directory (); - std::string user_route_template_directory (); + LIBARDOUR_API std::string user_template_directory (); + LIBARDOUR_API std::string user_route_template_directory (); - struct TemplateInfo { + struct LIBARDOUR_API TemplateInfo { std::string name; std::string path; }; - void find_route_templates (std::vector<TemplateInfo>& template_names); - void find_session_templates (std::vector<TemplateInfo>& template_names); + LIBARDOUR_API void find_route_templates (std::vector<TemplateInfo>& template_names); + LIBARDOUR_API void find_session_templates (std::vector<TemplateInfo>& template_names); - std::string session_template_dir_to_file (std::string const &); + LIBARDOUR_API std::string session_template_dir_to_file (std::string const &); } // namespace ARDOUR diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h index bedc825288..8fa5ed45a0 100644 --- a/libs/ardour/ardour/tempo.h +++ b/libs/ardour/ardour/tempo.h @@ -45,7 +45,7 @@ class Meter; class TempoMap; /** Tempo, the speed at which musical time progresses (BPM). */ -class Tempo { +class LIBARDOUR_API Tempo { public: Tempo (double bpm, double type=4.0) // defaulting to quarter note : _beats_per_minute (bpm), _note_type(type) {} @@ -62,7 +62,7 @@ class Tempo { }; /** Meter, or time signature (beats per bar, and which note type is a beat). */ -class Meter { +class LIBARDOUR_API Meter { public: Meter (double dpb, double bt) : _divisions_per_bar (dpb), _note_type (bt) {} @@ -87,7 +87,7 @@ class Meter { }; /** A section of timeline with a certain Tempo or Meter. */ -class MetricSection { +class LIBARDOUR_API MetricSection { public: MetricSection (const Timecode::BBT_Time& start) : _start (start), _frame (0), _movable (true) {} @@ -123,7 +123,7 @@ class MetricSection { }; /** A section of timeline with a certain Meter. */ -class MeterSection : public MetricSection, public Meter { +class LIBARDOUR_API MeterSection : public MetricSection, public Meter { public: MeterSection (const Timecode::BBT_Time& start, double bpb, double note_type) : MetricSection (start), Meter (bpb, note_type) {} @@ -137,7 +137,7 @@ class MeterSection : public MetricSection, public Meter { }; /** A section of timeline with a certain Tempo. */ -class TempoSection : public MetricSection, public Tempo { +class LIBARDOUR_API TempoSection : public MetricSection, public Tempo { public: TempoSection (const Timecode::BBT_Time& start, double qpm, double note_type) : MetricSection (start), Tempo (qpm, note_type), _bar_offset (-1.0) {} @@ -170,7 +170,7 @@ typedef std::list<MetricSection*> Metrics; /** Helper class to keep track of the Meter *AND* Tempo in effect at a given point in time. */ -class TempoMetric { +class LIBARDOUR_API TempoMetric { public: TempoMetric (const Meter& m, const Tempo& t) : _meter (&m), _tempo (&t), _frame (0) {} @@ -205,7 +205,7 @@ class TempoMetric { Timecode::BBT_Time _start; }; -class TempoMap : public PBD::StatefulDestructible +class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible { public: TempoMap (framecnt_t frame_rate); diff --git a/libs/ardour/ardour/tempo_map_importer.h b/libs/ardour/ardour/tempo_map_importer.h index 57c7402781..28a65218c7 100644 --- a/libs/ardour/ardour/tempo_map_importer.h +++ b/libs/ardour/ardour/tempo_map_importer.h @@ -32,14 +32,14 @@ namespace ARDOUR { class Session; -class TempoMapImportHandler : public ElementImportHandler +class LIBARDOUR_API TempoMapImportHandler : public ElementImportHandler { public: TempoMapImportHandler (XMLTree const & source, Session & session); std::string get_info () const; }; -class TempoMapImporter : public ElementImporter +class LIBARDOUR_API TempoMapImporter : public ElementImporter { private: typedef boost::shared_ptr<XMLNode> XMLNodePtr; diff --git a/libs/ardour/ardour/thread_buffers.h b/libs/ardour/ardour/thread_buffers.h index 9d92454887..f30476a474 100644 --- a/libs/ardour/ardour/thread_buffers.h +++ b/libs/ardour/ardour/thread_buffers.h @@ -23,13 +23,14 @@ #include <glibmm/threads.h> #include "ardour/chan_count.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { class BufferSet; -class ThreadBuffers { +class LIBARDOUR_API ThreadBuffers { public: ThreadBuffers (); ~ThreadBuffers (); diff --git a/libs/ardour/ardour/ticker.h b/libs/ardour/ardour/ticker.h index 7f0d1987fc..0e5c3c80f4 100644 --- a/libs/ardour/ardour/ticker.h +++ b/libs/ardour/ardour/ticker.h @@ -23,6 +23,7 @@ #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/session_handle.h" @@ -35,7 +36,7 @@ namespace ARDOUR { class Session; class MidiPort; -class MidiClockTicker : public SessionHandlePtr, boost::noncopyable +class LIBARDOUR_API MidiClockTicker : public SessionHandlePtr, boost::noncopyable { public: MidiClockTicker (); diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index bdf420763b..2a6d3f7ad4 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -35,7 +35,7 @@ class Region; class Diskstream; class IO; -class Track : public Route, public PublicDiskstream +class LIBARDOUR_API Track : public Route, public PublicDiskstream { public: Track (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal, DataType default_type = DataType::AUDIO); diff --git a/libs/ardour/ardour/transient_detector.h b/libs/ardour/ardour/transient_detector.h index 322e4cbc75..0e07c5851a 100644 --- a/libs/ardour/ardour/transient_detector.h +++ b/libs/ardour/ardour/transient_detector.h @@ -28,7 +28,7 @@ class AudioSource; class Readable; class Session; -class TransientDetector : public AudioAnalyser +class LIBARDOUR_API TransientDetector : public AudioAnalyser { public: TransientDetector (float sample_rate); diff --git a/libs/ardour/ardour/trimmable.h b/libs/ardour/ardour/trimmable.h index 071e3d151a..07e2c809a3 100644 --- a/libs/ardour/ardour/trimmable.h +++ b/libs/ardour/ardour/trimmable.h @@ -22,7 +22,7 @@ namespace ARDOUR { -class Trimmable { +class LIBARDOUR_API Trimmable { public: Trimmable() {} virtual ~Trimmable() {} diff --git a/libs/ardour/ardour/unknown_processor.h b/libs/ardour/ardour/unknown_processor.h index 61a5734df2..50234e8294 100644 --- a/libs/ardour/ardour/unknown_processor.h +++ b/libs/ardour/ardour/unknown_processor.h @@ -39,7 +39,7 @@ namespace ARDOUR { * session on a machine without a particular plugin will not corrupt * the session. */ -class UnknownProcessor : public Processor +class LIBARDOUR_API UnknownProcessor : public Processor { public: UnknownProcessor (Session &, XMLNode const &); diff --git a/libs/ardour/ardour/uri_map.h b/libs/ardour/ardour/uri_map.h index 18008f0df2..a948ea4002 100644 --- a/libs/ardour/ardour/uri_map.h +++ b/libs/ardour/ardour/uri_map.h @@ -28,6 +28,8 @@ #include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" #include "lv2/lv2plug.in/ns/ext/urid/urid.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** Implementation of the LV2 uri-map and urid extensions. @@ -35,7 +37,7 @@ namespace ARDOUR { * This just uses a pair of std::map and is not so great in the space overhead * department, but it's fast enough and not really performance critical anyway. */ -class URIMap : public boost::noncopyable { +class LIBARDOUR_API URIMap : public boost::noncopyable { public: URIMap(); diff --git a/libs/ardour/ardour/user_bundle.h b/libs/ardour/ardour/user_bundle.h index 5ecfe521f5..4ff435ef35 100644 --- a/libs/ardour/ardour/user_bundle.h +++ b/libs/ardour/ardour/user_bundle.h @@ -29,7 +29,7 @@ namespace ARDOUR { class Session; -class UserBundle : public Bundle, public PBD::Stateful { +class LIBARDOUR_API UserBundle : public Bundle, public PBD::Stateful { public: UserBundle (std::string const &); diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h index bf91d4d57e..f0030557e9 100644 --- a/libs/ardour/ardour/utils.h +++ b/libs/ardour/ardour/utils.h @@ -32,18 +32,19 @@ #include <CoreFoundation/CoreFoundation.h> #endif /* __APPLE__ */ +#include "ardour/libardour_visibility.h" #include "ardour/ardour.h" #include "ardour/data_type.h" #include "ardour/dB.h" class XMLNode; -std::string legalize_for_path (const std::string& str); -std::string legalize_for_universal_path (const std::string& str); -std::string legalize_for_uri (const std::string& str); -std::string legalize_for_path_2X (const std::string& str); -XMLNode* find_named_node (const XMLNode& node, std::string name); -std::string bool_as_string (bool); +LIBARDOUR_API std::string legalize_for_path (const std::string& str); +LIBARDOUR_API std::string legalize_for_universal_path (const std::string& str); +LIBARDOUR_API std::string legalize_for_uri (const std::string& str); +LIBARDOUR_API std::string legalize_for_path_2X (const std::string& str); +LIBARDOUR_API XMLNode* find_named_node (const XMLNode& node, std::string name); +LIBARDOUR_API std::string bool_as_string (bool); static inline float f_max(float x, float a) { x -= a; @@ -54,22 +55,22 @@ static inline float f_max(float x, float a) { return (x); } -std::string bump_name_once(const std::string& s, char delimiter); +LIBARDOUR_API std::string bump_name_once(const std::string& s, char delimiter); -int cmp_nocase (const std::string& s, const std::string& s2); +LIBARDOUR_API int cmp_nocase (const std::string& s, const std::string& s2); -int touch_file(std::string path); +LIBARDOUR_API int touch_file(std::string path); -std::string region_name_from_path (std::string path, bool strip_channels, bool add_channel_suffix = false, uint32_t total = 0, uint32_t this_one = 0); -bool path_is_paired (std::string path, std::string& pair_base); +LIBARDOUR_API std::string region_name_from_path (std::string path, bool strip_channels, bool add_channel_suffix = false, uint32_t total = 0, uint32_t this_one = 0); +LIBARDOUR_API bool path_is_paired (std::string path, std::string& pair_base); -void compute_equal_power_fades (ARDOUR::framecnt_t nframes, float* in, float* out); +LIBARDOUR_API void compute_equal_power_fades (ARDOUR::framecnt_t nframes, float* in, float* out); -const char* sync_source_to_string (ARDOUR::SyncSource src, bool sh = false); -ARDOUR::SyncSource string_to_sync_source (std::string str); +LIBARDOUR_API const char* sync_source_to_string (ARDOUR::SyncSource src, bool sh = false); +LIBARDOUR_API ARDOUR::SyncSource string_to_sync_source (std::string str); -const char* edit_mode_to_string (ARDOUR::EditMode); -ARDOUR::EditMode string_to_edit_mode (std::string); +LIBARDOUR_API const char* edit_mode_to_string (ARDOUR::EditMode); +LIBARDOUR_API ARDOUR::EditMode string_to_edit_mode (std::string); #undef OLD_GAIN_MATH #define OLD_GAIN_MATH @@ -141,8 +142,8 @@ slider_position_to_gain (double pos) } #undef OLD_GAIN_MATH -double gain_to_slider_position_with_max (double g, double max_gain = 2.0); -double slider_position_to_gain_with_max (double g, double max_gain = 2.0); +LIBARDOUR_API double gain_to_slider_position_with_max (double g, double max_gain = 2.0); +LIBARDOUR_API double slider_position_to_gain_with_max (double g, double max_gain = 2.0); /* I don't really like hard-coding these falloff rates here * Probably should use a map of some kind that could be configured @@ -159,17 +160,17 @@ double slider_position_to_gain_with_max (double g, double max_gain = 2.0); #define METER_FALLOFF_FASTER 46.0f #define METER_FALLOFF_FASTEST 70.0f -float meter_falloff_to_float (ARDOUR::MeterFalloff); -ARDOUR::MeterFalloff meter_falloff_from_float (float); -float meter_falloff_to_db_per_sec (float); +LIBARDOUR_API float meter_falloff_to_float (ARDOUR::MeterFalloff); +LIBARDOUR_API ARDOUR::MeterFalloff meter_falloff_from_float (float); +LIBARDOUR_API float meter_falloff_to_db_per_sec (float); -const char* native_header_format_extension (ARDOUR::HeaderFormat, const ARDOUR::DataType& type); -bool matching_unsuffixed_filename_exists_in (const std::string& dir, const std::string& name); +LIBARDOUR_API const char* native_header_format_extension (ARDOUR::HeaderFormat, const ARDOUR::DataType& type); +LIBARDOUR_API bool matching_unsuffixed_filename_exists_in (const std::string& dir, const std::string& name); -uint32_t how_many_dsp_threads (); +LIBARDOUR_API uint32_t how_many_dsp_threads (); #if __APPLE__ -std::string CFStringRefToStdString(CFStringRef stringRef); +LIBARDOUR_API std::string CFStringRefToStdString(CFStringRef stringRef); #endif // __APPLE__ #endif /* __ardour_utils_h__ */ diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h index 7ca973cbb7..942f7192db 100644 --- a/libs/ardour/ardour/vst_plugin.h +++ b/libs/ardour/ardour/vst_plugin.h @@ -32,7 +32,7 @@ typedef struct _VSTState VSTState; namespace ARDOUR { /** Parent class for VST plugins of both Windows and Linux varieties */ -class VSTPlugin : public Plugin +class LIBARDOUR_API VSTPlugin : public Plugin { public: VSTPlugin (AudioEngine &, Session &, VSTHandle *); diff --git a/libs/ardour/ardour/vst_types.h b/libs/ardour/ardour/vst_types.h index d185d62606..47308aff73 100644 --- a/libs/ardour/ardour/vst_types.h +++ b/libs/ardour/ardour/vst_types.h @@ -20,9 +20,10 @@ #ifndef __ardour_vst_types_h__ #define __ardour_vst_types_h__ +#include "ardour/libardour_visibility.h" #include "ardour/vestige/aeffectx.h" -struct _VSTKey +struct LIBARDOUR_API _VSTKey { /** virtual-key code, or 0 if this _VSTFXKey is a `character' key */ int special; @@ -32,7 +33,7 @@ struct _VSTKey typedef struct _VSTKey VSTKey; -struct _VSTInfo +struct LIBARDOUR_API _VSTInfo { char *name; char *creator; @@ -56,7 +57,7 @@ typedef struct _VSTInfo VSTInfo; typedef AEffect * (* main_entry_t) (audioMasterCallback); -struct _VSTHandle +struct LIBARDOUR_API _VSTHandle { void* dll; char* name; @@ -69,7 +70,7 @@ struct _VSTHandle typedef struct _VSTHandle VSTHandle; -struct _VSTState +struct LIBARDOUR_API _VSTState { AEffect* plugin; diff --git a/libs/ardour/ardour/vumeterdsp.h b/libs/ardour/ardour/vumeterdsp.h index 86487e8e8e..f8abc7fa93 100644 --- a/libs/ardour/ardour/vumeterdsp.h +++ b/libs/ardour/ardour/vumeterdsp.h @@ -20,8 +20,9 @@ #ifndef __VUMETERDSP_H #define __VUMETERDSP_H +#include "ardour/libardour_visibility.h" -class Vumeterdsp +class LIBARDOUR_API Vumeterdsp { public: diff --git a/libs/ardour/ardour/windows_vst_plugin.h b/libs/ardour/ardour/windows_vst_plugin.h index 83bc113a00..ee4850dc05 100644 --- a/libs/ardour/ardour/windows_vst_plugin.h +++ b/libs/ardour/ardour/windows_vst_plugin.h @@ -22,7 +22,7 @@ #include "ardour/vst_plugin.h" -struct _VSTHandle; +struct LIBARDOUR_API _VSTHandle; typedef struct _VSTHandle VSTHandle; namespace ARDOUR { @@ -30,7 +30,7 @@ namespace ARDOUR { class AudioEngine; class Session; -class WindowsVSTPlugin : public VSTPlugin +class LIBARDOUR_API WindowsVSTPlugin : public VSTPlugin { public: WindowsVSTPlugin (AudioEngine &, Session &, VSTHandle *); @@ -40,7 +40,7 @@ public: std::string state_node_name () const { return "windows-vst"; } }; -class WindowsVSTPluginInfo : public PluginInfo +class LIBARDOUR_API WindowsVSTPluginInfo : public PluginInfo { public: WindowsVSTPluginInfo (); diff --git a/libs/ardour/ardour/worker.h b/libs/ardour/ardour/worker.h index 4f3ff54bc1..c9ff2f2d7f 100644 --- a/libs/ardour/ardour/worker.h +++ b/libs/ardour/ardour/worker.h @@ -27,12 +27,14 @@ #include "pbd/ringbuffer.h" #include "pbd/semaphore.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** An object that needs to schedule non-RT work in the audio thread. */ -class Workee { +class LIBARDOUR_API Workee { public: virtual ~Workee() {} @@ -50,7 +52,7 @@ public: /** A worker thread for non-realtime tasks scheduled in the audio thread. */ -class Worker +class LIBARDOUR_API Worker { public: Worker(Workee* workee, uint32_t ring_size); diff --git a/libs/ardour/cycle_timer.cc b/libs/ardour/cycle_timer.cc index 02d1abb930..bb4f3181e0 100644 --- a/libs/ardour/cycle_timer.cc +++ b/libs/ardour/cycle_timer.cc @@ -22,6 +22,8 @@ #include "pbd/error.h" #include "ardour/cycle_timer.h" +#include "ardour/libardour_visibility.h" + #include "i18n.h" using namespace std; diff --git a/libs/ardour/element_import_handler.cc b/libs/ardour/element_import_handler.cc index c360e82206..8f6483b145 100644 --- a/libs/ardour/element_import_handler.cc +++ b/libs/ardour/element_import_handler.cc @@ -18,6 +18,7 @@ */ +#include "ardour/libardour_visibility.h" #include "ardour/element_import_handler.h" #include <algorithm> diff --git a/libs/ardour/export_filename.cc b/libs/ardour/export_filename.cc index 9e126ed087..f7fe22c3b4 100644 --- a/libs/ardour/export_filename.cc +++ b/libs/ardour/export_filename.cc @@ -19,7 +19,6 @@ */ #include <string> -#include "ardour/export_filename.h" #include <glibmm/miscutils.h> #include <glibmm/fileutils.h> @@ -28,11 +27,13 @@ #include "pbd/convert.h" #include "pbd/enumwriter.h" +#include "ardour/libardour_visibility.h" #include "ardour/session.h" #include "ardour/session_directory.h" -#include "ardour/export_timespan.h" +#include "ardour/export_filename.h" #include "ardour/export_format_specification.h" #include "ardour/export_channel_configuration.h" +#include "ardour/export_timespan.h" #include "ardour/utils.h" #include "i18n.h" diff --git a/libs/ardour/find_session.cc b/libs/ardour/find_session.cc index afcbe7393b..501927c42c 100644 --- a/libs/ardour/find_session.cc +++ b/libs/ardour/find_session.cc @@ -32,6 +32,7 @@ #include "ardour/filename_extensions.h" #include "ardour/utils.h" +#include "ardour/session_utils.h" #include "i18n.h" diff --git a/libs/ardour/route_group_member.cc b/libs/ardour/route_group_member.cc index 85d2f981d7..3caa7cd1d0 100644 --- a/libs/ardour/route_group_member.cc +++ b/libs/ardour/route_group_member.cc @@ -16,6 +16,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "ardour/libardour_visibility.h" #include "ardour/route_group_member.h" using namespace ARDOUR; diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 39584c6390..e734582197 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -243,7 +243,8 @@ def configure(conf): autowaf.build_version_files( path_prefix + 'ardour/version.h', path_prefix + 'version.cc', - 'libardour3', conf.env['MAJOR'], conf.env['MINOR'], 0) + 'libardour3', conf.env['MAJOR'], conf.env['MINOR'], 0, + 'LIBARDOUR_API', 'ardour/libardour_visibility.h') autowaf.configure(conf) if Options.options.dist_target == 'auto': if re.search ("linux", sys.platform) != None: @@ -327,10 +328,17 @@ def build(bld): # Library if bld.is_defined ('INTERNAL_SHARED_LIBS'): obj = bld.shlib(features = 'c cxx cshlib cxxshlib', source=libardour_sources) + # macros for this shared library + obj.defines = [ 'LIBARDOUR_DLL=1', 'LIBARDOUR_DLL_EXPORTS=1' ] + # macros for this other internal shared libraries that we use + obj.defines += [ 'LIBEVORAL_DLL=1', 'LIBMIDIPP_DLL=1', 'LIBPBD_DLL=1' ] + obj.cflags = [ '-fvisibility=hidden' ] + obj.cxxflags = [ '-fvisibility=hidden' ] else: obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=libardour_sources) obj.cxxflags = [ '-fPIC' ] obj.cflags = [ '-fPIC' ] + obj.defines = [] obj.export_includes = ['.'] obj.includes = ['.', '../surfaces/control_protocol', '..'] @@ -344,13 +352,13 @@ def build(bld): 'libaudiographer','libltc','libtimecode'] obj.vnum = LIBARDOUR_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') - obj.defines = [ + obj.defines += [ 'PACKAGE="' + I18N_PACKAGE + '"', 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', 'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"', - 'EVORAL_MIDI_XML=1' + 'EVORAL_MIDI_XML=1', ] #obj.source += ' st_stretch.cc st_pitch.cc ' diff --git a/libs/audiographer/audiographer/broadcast_info.h b/libs/audiographer/audiographer/broadcast_info.h index 819978f8c6..66b10bd9f7 100644 --- a/libs/audiographer/audiographer/broadcast_info.h +++ b/libs/audiographer/audiographer/broadcast_info.h @@ -28,12 +28,14 @@ #include <sndfile.h> +#include "audiographer/visibility.h" + namespace AudioGrapher { -class SndfileHandle; +class LIBAUDIOGRAPHER_API SndfileHandle; -class BroadcastInfo +class LIBAUDIOGRAPHER_API BroadcastInfo { public: diff --git a/libs/audiographer/audiographer/debug_utils.h b/libs/audiographer/audiographer/debug_utils.h index 693c50064c..a8c63e85b6 100644 --- a/libs/audiographer/audiographer/debug_utils.h +++ b/libs/audiographer/audiographer/debug_utils.h @@ -11,11 +11,13 @@ #include <cstdlib> #endif +#include "audiographer/visibility.h" + namespace AudioGrapher { /// Utilities for debugging -struct DebugUtils +struct LIBAUDIOGRAPHER_API DebugUtils { /// Returns the demangled name of the object passed as the parameter template<typename T> diff --git a/libs/audiographer/audiographer/debuggable.h b/libs/audiographer/audiographer/debuggable.h index 79e0f80dd3..fc03d1e68d 100644 --- a/libs/audiographer/audiographer/debuggable.h +++ b/libs/audiographer/audiographer/debuggable.h @@ -7,11 +7,13 @@ #include <iostream> +#include "audiographer/visibility.h" + namespace AudioGrapher { /// Compile time defined debug level -enum DebugLevel +enum LIBAUDIOGRAPHER_API DebugLevel { DebugNone, ///< Disabled DebugObject, ///< Object level stuff, ctors, initalizers etc. @@ -36,7 +38,7 @@ enum DebugLevel * logical and (short-circuiting). */ template<DebugLevel L = DEFAULT_DEBUG_LEVEL> -class Debuggable +class LIBAUDIOGRAPHER_API Debuggable { protected: Debuggable(std::ostream & debug_stream = std::cerr) diff --git a/libs/audiographer/audiographer/exception.h b/libs/audiographer/audiographer/exception.h index 5583a2620b..b5141cb4c2 100644 --- a/libs/audiographer/audiographer/exception.h +++ b/libs/audiographer/audiographer/exception.h @@ -6,6 +6,7 @@ #include <boost/format.hpp> +#include "audiographer/visibility.h" #include "audiographer/debug_utils.h" namespace AudioGrapher @@ -14,7 +15,7 @@ namespace AudioGrapher /** AudioGrapher Exception class. * Automatically tells which class an exception was thrown from. */ -class Exception : public std::exception +class LIBAUDIOGRAPHER_API Exception : public std::exception { public: template<typename T> @@ -38,4 +39,4 @@ class Exception : public std::exception } // namespace AudioGrapher -#endif // AUDIOGRAPHER_EXCEPTION_H
\ No newline at end of file +#endif // AUDIOGRAPHER_EXCEPTION_H diff --git a/libs/audiographer/audiographer/flag_debuggable.h b/libs/audiographer/audiographer/flag_debuggable.h index b70480cd91..5cb948a3d0 100644 --- a/libs/audiographer/audiographer/flag_debuggable.h +++ b/libs/audiographer/audiographer/flag_debuggable.h @@ -1,6 +1,7 @@ #ifndef AUDIOGRAPHER_FLAG_DEBUGGABLE_H #define AUDIOGRAPHER_FLAG_DEBUGGABLE_H +#include "audiographer/visibility.h" #include "debuggable.h" #include "debug_utils.h" #include "process_context.h" @@ -13,7 +14,7 @@ namespace AudioGrapher /// A debugging class for nodes that support a certain set of flags. template<DebugLevel L = DEFAULT_DEBUG_LEVEL> -class FlagDebuggable : public Debuggable<L> +class LIBAUDIOGRAPHER_API FlagDebuggable : public Debuggable<L> { public: typedef FlagField::Flag Flag; diff --git a/libs/audiographer/audiographer/flag_field.h b/libs/audiographer/audiographer/flag_field.h index df81aa1766..34ab5efdd6 100644 --- a/libs/audiographer/audiographer/flag_field.h +++ b/libs/audiographer/audiographer/flag_field.h @@ -7,12 +7,14 @@ #include <boost/operators.hpp> +#include "audiographer/visibility.h" + namespace AudioGrapher { /** Flag field capable of holding 32 flags. * Easily grown in size to 64 flags by changing storage_type. */ -class FlagField +class LIBAUDIOGRAPHER_API FlagField : public boost::less_than_comparable<FlagField> , boost::equivalent<FlagField> , boost::equality_comparable<FlagField> @@ -103,4 +105,4 @@ class FlagField } // namespace -#endif // AUDIOGRAPHER_FLAG_FIELD_H
\ No newline at end of file +#endif // AUDIOGRAPHER_FLAG_FIELD_H diff --git a/libs/audiographer/audiographer/general/chunker.h b/libs/audiographer/audiographer/general/chunker.h index cc46aa4575..2ff766fef3 100644 --- a/libs/audiographer/audiographer/general/chunker.h +++ b/libs/audiographer/audiographer/general/chunker.h @@ -1,6 +1,7 @@ #ifndef AUDIOGRAPHER_CHUNKER_H #define AUDIOGRAPHER_CHUNKER_H +#include "audiographer/visibility.h" #include "audiographer/flag_debuggable.h" #include "audiographer/sink.h" #include "audiographer/type_utils.h" @@ -11,7 +12,7 @@ namespace AudioGrapher /// A class that chunks process cycles into equal sized frames template<typename T = DefaultSampleType> -class Chunker +class LIBAUDIOGRAPHER_API Chunker : public ListedSource<T> , public Sink<T> , public FlagDebuggable<> diff --git a/libs/audiographer/audiographer/general/deinterleaver.h b/libs/audiographer/audiographer/general/deinterleaver.h index 96d77b1f7b..f9374b67ad 100644 --- a/libs/audiographer/audiographer/general/deinterleaver.h +++ b/libs/audiographer/audiographer/general/deinterleaver.h @@ -1,6 +1,7 @@ #ifndef AUDIOGRAPHER_DEINTERLEAVER_H #define AUDIOGRAPHER_DEINTERLEAVER_H +#include "audiographer/visibility.h" #include "audiographer/types.h" #include "audiographer/source.h" #include "audiographer/sink.h" @@ -14,7 +15,7 @@ namespace AudioGrapher /// Converts on stream of interleaved data to many streams of uninterleaved data. template<typename T = DefaultSampleType> -class DeInterleaver +class LIBAUDIOGRAPHER_API DeInterleaver : public Sink<T> , public Throwing<> { diff --git a/libs/audiographer/audiographer/general/interleaver.h b/libs/audiographer/audiographer/general/interleaver.h index 924c1d04a5..b0f0efdc66 100644 --- a/libs/audiographer/audiographer/general/interleaver.h +++ b/libs/audiographer/audiographer/general/interleaver.h @@ -1,6 +1,7 @@ #ifndef AUDIOGRAPHER_INTERLEAVER_H #define AUDIOGRAPHER_INTERLEAVER_H +#include "audiographer/visibility.h" #include "audiographer/types.h" #include "audiographer/sink.h" #include "audiographer/exception.h" @@ -15,7 +16,7 @@ namespace AudioGrapher /// Interleaves many streams of non-interleaved data into one interleaved stream template<typename T = DefaultSampleType> -class Interleaver +class LIBAUDIOGRAPHER_API Interleaver : public ListedSource<T> , public Throwing<> { diff --git a/libs/audiographer/audiographer/general/normalizer.h b/libs/audiographer/audiographer/general/normalizer.h index 48d0fe8b0b..86fe26b790 100644 --- a/libs/audiographer/audiographer/general/normalizer.h +++ b/libs/audiographer/audiographer/general/normalizer.h @@ -1,6 +1,7 @@ #ifndef AUDIOGRAPHER_NORMALIZER_H #define AUDIOGRAPHER_NORMALIZER_H +#include "audiographer/visibility.h" #include "audiographer/sink.h" #include "audiographer/routines.h" #include "audiographer/utils/listed_source.h" @@ -11,7 +12,7 @@ namespace AudioGrapher { /// A class for normalizing to a specified target in dB -class Normalizer +class LIBAUDIOGRAPHER_API Normalizer : public ListedSource<float> , public Sink<float> , public Throwing<> diff --git a/libs/audiographer/audiographer/general/peak_reader.h b/libs/audiographer/audiographer/general/peak_reader.h index a257621cde..208a8989df 100644 --- a/libs/audiographer/audiographer/general/peak_reader.h +++ b/libs/audiographer/audiographer/general/peak_reader.h @@ -1,6 +1,7 @@ #ifndef AUDIOGRAPHER_PEAK_READER_H #define AUDIOGRAPHER_PEAK_READER_H +#include "audiographer/visibility.h" #include "audiographer/sink.h" #include "audiographer/routines.h" #include "audiographer/utils/listed_source.h" @@ -9,7 +10,7 @@ namespace AudioGrapher { /// A class that reads the maximum value from a stream -class PeakReader : public ListedSource<float>, public Sink<float> +class LIBAUDIOGRAPHER_API PeakReader : public ListedSource<float>, public Sink<float> { public: /// Constructor \n RT safe diff --git a/libs/audiographer/audiographer/general/sample_format_converter.h b/libs/audiographer/audiographer/general/sample_format_converter.h index a200f37825..62500d42dc 100644 --- a/libs/audiographer/audiographer/general/sample_format_converter.h +++ b/libs/audiographer/audiographer/general/sample_format_converter.h @@ -1,6 +1,7 @@ #ifndef AUDIOGRAPHER_SAMPLE_FORMAT_CONVERTER_H #define AUDIOGRAPHER_SAMPLE_FORMAT_CONVERTER_H +#include "audiographer/visibility.h" #include "audiographer/sink.h" #include "audiographer/utils/listed_source.h" #include "private/gdither/gdither_types.h" @@ -9,7 +10,7 @@ namespace AudioGrapher { /// Dither types from the gdither library -enum DitherType +enum LIBAUDIOGRAPHER_API DitherType { D_None = GDitherNone, ///< No didtering D_Rect = GDitherRect, ///< Rectangular dithering, i.e. white noise @@ -21,7 +22,7 @@ enum DitherType * This class can only convert floats to either \a float, \a int32_t, \a int16_t, or \a uint8_t */ template <typename TOut> -class SampleFormatConverter +class LIBAUDIOGRAPHER_API SampleFormatConverter : public Sink<float> , public ListedSource<TOut> , public Throwing<> diff --git a/libs/audiographer/audiographer/general/silence_trimmer.h b/libs/audiographer/audiographer/general/silence_trimmer.h index a653bfe215..8a8dd920f5 100644 --- a/libs/audiographer/audiographer/general/silence_trimmer.h +++ b/libs/audiographer/audiographer/general/silence_trimmer.h @@ -1,6 +1,7 @@ #ifndef AUDIOGRAPHER_SILENCE_TRIMMER_H #define AUDIOGRAPHER_SILENCE_TRIMMER_H +#include "audiographer/visibility.h" #include "audiographer/debug_utils.h" #include "audiographer/flag_debuggable.h" #include "audiographer/sink.h" @@ -13,7 +14,7 @@ namespace AudioGrapher { /// Removes and adds silent frames to beginning and/or end of stream template<typename T = DefaultSampleType> -class SilenceTrimmer +class LIBAUDIOGRAPHER_API SilenceTrimmer : public ListedSource<T> , public Sink<T> , public FlagDebuggable<> diff --git a/libs/audiographer/audiographer/general/sr_converter.h b/libs/audiographer/audiographer/general/sr_converter.h index a3298bbf97..0cbe3bd294 100644 --- a/libs/audiographer/audiographer/general/sr_converter.h +++ b/libs/audiographer/audiographer/general/sr_converter.h @@ -3,6 +3,7 @@ #include <samplerate.h> +#include "audiographer/visibility.h" #include "audiographer/flag_debuggable.h" #include "audiographer/sink.h" #include "audiographer/throwing.h" @@ -13,7 +14,7 @@ namespace AudioGrapher { /// Samplerate converter -class SampleRateConverter +class LIBAUDIOGRAPHER_API SampleRateConverter : public ListedSource<float> , public Sink<float> , public FlagDebuggable<> diff --git a/libs/audiographer/audiographer/general/threader.h b/libs/audiographer/audiographer/general/threader.h index d1e11c00e1..98c6145ee9 100644 --- a/libs/audiographer/audiographer/general/threader.h +++ b/libs/audiographer/audiographer/general/threader.h @@ -10,6 +10,7 @@ #include <vector> #include <algorithm> +#include "audiographer/visibility.h" #include "audiographer/source.h" #include "audiographer/sink.h" #include "audiographer/exception.h" @@ -18,7 +19,7 @@ namespace AudioGrapher { /// Class that stores exceptions thrown from different threads -class ThreaderException : public Exception +class LIBAUDIOGRAPHER_API ThreaderException : public Exception { public: template<typename T> @@ -32,7 +33,7 @@ class ThreaderException : public Exception /// Class for distributing processing across several threads template <typename T = DefaultSampleType> -class Threader : public Source<T>, public Sink<T> +class LIBAUDIOGRAPHER_API Threader : public Source<T>, public Sink<T> { private: typedef std::vector<typename Source<T>::SinkPtr> OutputVec; diff --git a/libs/audiographer/audiographer/process_context.h b/libs/audiographer/audiographer/process_context.h index 15128ab4ea..61b95a2aa4 100644 --- a/libs/audiographer/audiographer/process_context.h +++ b/libs/audiographer/audiographer/process_context.h @@ -5,6 +5,7 @@ #include <boost/type_traits.hpp> #include <boost/format.hpp> +#include "audiographer/visibility.h" #include "exception.h" #include "debug_utils.h" #include "types.h" @@ -21,7 +22,7 @@ namespace AudioGrapher */ template <typename T = DefaultSampleType> -class ProcessContext +class LIBAUDIOGRAPHER_API ProcessContext : public Throwing<> { // Support older compilers that don't support template base class initialization without template parameters @@ -125,7 +126,7 @@ protected: /// A process context that allocates and owns it's data buffer template <typename T = DefaultSampleType> -class AllocatingProcessContext : public ProcessContext<T> +class LIBAUDIOGRAPHER_API AllocatingProcessContext : public ProcessContext<T> { public: /// Allocates uninitialized memory @@ -162,7 +163,7 @@ public: /// A wrapper for a const ProcesContext which can be created from const data template <typename T = DefaultSampleType> -class ConstProcessContext +class LIBAUDIOGRAPHER_API ConstProcessContext { public: /// Basic constructor with data, frame and channel count diff --git a/libs/audiographer/audiographer/routines.h b/libs/audiographer/audiographer/routines.h index b3b7f0921b..4ab3bc5fb5 100644 --- a/libs/audiographer/audiographer/routines.h +++ b/libs/audiographer/audiographer/routines.h @@ -5,11 +5,13 @@ #include <cmath> +#include "audiographer/visibility.h" + namespace AudioGrapher { /// Allows overriding some routines with more efficient ones. -class Routines +class LIBAUDIOGRAPHER_API Routines { public: typedef uint32_t uint_type; diff --git a/libs/audiographer/audiographer/sink.h b/libs/audiographer/audiographer/sink.h index 0a7004464e..84f7e12e40 100644 --- a/libs/audiographer/audiographer/sink.h +++ b/libs/audiographer/audiographer/sink.h @@ -5,6 +5,8 @@ #include "process_context.h" +#include "audiographer/visibility.h" + namespace AudioGrapher { @@ -12,7 +14,7 @@ namespace AudioGrapher * This is a pure virtual interface for all data sinks in AudioGrapher */ template <typename T> -class Sink { +class LIBAUDIOGRAPHER_API Sink { public: virtual ~Sink () {} diff --git a/libs/audiographer/audiographer/source.h b/libs/audiographer/audiographer/source.h index deefb900ee..9a3f80719b 100644 --- a/libs/audiographer/audiographer/source.h +++ b/libs/audiographer/audiographer/source.h @@ -6,6 +6,8 @@ #include <boost/shared_ptr.hpp> +#include "audiographer/visibility.h" + namespace AudioGrapher { @@ -13,7 +15,7 @@ namespace AudioGrapher * This is a pure virtual interface for all data sources in AudioGrapher */ template<typename T> -class Source +class LIBAUDIOGRAPHER_API Source { public: virtual ~Source () { } diff --git a/libs/audiographer/audiographer/throwing.h b/libs/audiographer/audiographer/throwing.h index eefade1db0..e02958a521 100644 --- a/libs/audiographer/audiographer/throwing.h +++ b/libs/audiographer/audiographer/throwing.h @@ -5,6 +5,8 @@ #define DEFAULT_THROW_LEVEL ThrowStrict #endif +#include "audiographer/visibility.h" + namespace AudioGrapher { @@ -14,7 +16,7 @@ namespace AudioGrapher * However, if you want ultra-optimized code and/or don't care about handling * error situations, feel free to use whatever you want. */ -enum ThrowLevel +enum LIBAUDIOGRAPHER_API ThrowLevel { ThrowNone, ///< Not allowed to throw ThrowObject, ///< Object level stuff, ctors, initalizers etc. @@ -38,7 +40,7 @@ enum ThrowLevel * logical and (short-circuiting). */ template<ThrowLevel L = DEFAULT_THROW_LEVEL> -class Throwing +class LIBAUDIOGRAPHER_API Throwing { protected: Throwing() {} diff --git a/libs/audiographer/audiographer/type_utils.h b/libs/audiographer/audiographer/type_utils.h index 1d4754dee9..a7c38fc660 100644 --- a/libs/audiographer/audiographer/type_utils.h +++ b/libs/audiographer/audiographer/type_utils.h @@ -1,18 +1,20 @@ #ifndef AUDIOGRAPHER_TYPE_UTILS_H #define AUDIOGRAPHER_TYPE_UTILS_H -#include "audiographer/types.h" #include <boost/static_assert.hpp> #include <boost/type_traits.hpp> #include <memory> #include <algorithm> #include <cstring> +#include "audiographer/visibility.h" +#include "audiographer/types.h" + namespace AudioGrapher { /// Non-template base class for TypeUtils -class TypeUtilsBase +class LIBAUDIOGRAPHER_API TypeUtilsBase { protected: @@ -27,7 +29,7 @@ class TypeUtilsBase /// Utilities for initializing, copying, moving, etc. data template<typename T = DefaultSampleType> -class TypeUtils : private TypeUtilsBase +class LIBAUDIOGRAPHER_API TypeUtils : private TypeUtilsBase { BOOST_STATIC_ASSERT (boost::has_trivial_destructor<T>::value); diff --git a/libs/audiographer/audiographer/types.h b/libs/audiographer/audiographer/types.h index ae98cde7bd..4288dce0c6 100644 --- a/libs/audiographer/audiographer/types.h +++ b/libs/audiographer/audiographer/types.h @@ -3,6 +3,8 @@ #include <stdint.h> +#include "audiographer/visibility.h" + namespace AudioGrapher { /* XXX: copied from libardour */ diff --git a/libs/audiographer/audiographer/utils/identity_vertex.h b/libs/audiographer/audiographer/utils/identity_vertex.h index 147939a7c5..1d7ed80697 100644 --- a/libs/audiographer/audiographer/utils/identity_vertex.h +++ b/libs/audiographer/audiographer/utils/identity_vertex.h @@ -1,6 +1,8 @@ #ifndef AUDIOGRAPHER_IDENTITY_VERTEX_H #define AUDIOGRAPHER_IDENTITY_VERTEX_H +#include "audiographer/visibility.h" +#include "audiographer/types.h" #include "audiographer/utils/listed_source.h" #include "audiographer/sink.h" @@ -9,7 +11,7 @@ namespace AudioGrapher /// Outputs its input directly to a number of Sinks template<typename T = DefaultSampleType> -class IdentityVertex : public ListedSource<T>, Sink<T> +class LIBAUDIOGRAPHER_API IdentityVertex : public ListedSource<T>, Sink<T> { public: void process (ProcessContext<T> const & c) { ListedSource<T>::output(c); } diff --git a/libs/audiographer/audiographer/utils/listed_source.h b/libs/audiographer/audiographer/utils/listed_source.h index b030281207..6ceab6b27f 100644 --- a/libs/audiographer/audiographer/utils/listed_source.h +++ b/libs/audiographer/audiographer/utils/listed_source.h @@ -1,6 +1,8 @@ #ifndef AUDIOGRAPHER_LISTED_SOURCE_H #define AUDIOGRAPHER_LISTED_SOURCE_H +#include "audiographer/visibility.h" +#include "audiographer/types.h" #include "audiographer/types.h" #include "audiographer/source.h" @@ -11,7 +13,7 @@ namespace AudioGrapher /// An generic \a Source that uses a \a std::list for managing outputs template<typename T = DefaultSampleType> -class ListedSource : public Source<T> +class LIBAUDIOGRAPHER_API ListedSource : public Source<T> { public: void add_output (typename Source<T>::SinkPtr output) { outputs.push_back(output); } diff --git a/libs/audiographer/audiographer/visibility.h b/libs/audiographer/audiographer/visibility.h new file mode 100644 index 0000000000..8c149f9efd --- /dev/null +++ b/libs/audiographer/audiographer/visibility.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2013 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __libaudiographer_visibility_h__ +#define __libaudiographer_visibility_h__ + +/* _WIN32 is defined by most compilers targetting Windows, but within the + * audiographer source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending + * on how a Windows build is built. + */ + +#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) + #define LIBAUDIOGRAPHER_DLL_IMPORT __declspec(dllimport) + #define LIBAUDIOGRAPHER_DLL_EXPORT __declspec(dllexport) + #define LIBAUDIOGRAPHER_DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define LIBAUDIOGRAPHER_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBAUDIOGRAPHER_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBAUDIOGRAPHER_DLL_LOCAL __attribute__ ((visibility ("hidden"))) + #else + #define LIBAUDIOGRAPHER_DLL_IMPORT + #define LIBAUDIOGRAPHER_DLL_EXPORT + #define LIBAUDIOGRAPHER_DLL_LOCAL + #endif +#endif + +#ifdef LIBAUDIOGRAPHER_DLL // libaudiographer is a DLL +#ifdef LIBAUDIOGRAPHER_DLL_EXPORTS // defined if we are building the libaudiographer DLL (instead of using it) + #define LIBAUDIOGRAPHER_API LIBAUDIOGRAPHER_DLL_EXPORT +#else + #define LIBAUDIOGRAPHER_API LIBAUDIOGRAPHER_DLL_IMPORT +#endif +#define LIBAUDIOGRAPHER_LOCAL LIBAUDIOGRAPHER_DLL_LOCAL +#else /* static lib, not DLL */ +#define LIBAUDIOGRAPHER_API +#define LIBAUDIOGRAPHER_LOCAL +#endif + +#endif /* __libaudiographer_visibility_h__ */ diff --git a/libs/audiographer/wscript b/libs/audiographer/wscript index 66f4e80b72..9e2d1c4c3c 100644 --- a/libs/audiographer/wscript +++ b/libs/audiographer/wscript @@ -54,19 +54,29 @@ def build(bld): and bld.is_defined('HAVE_GLIBMM') and bld.is_defined('HAVE_GTHREAD')) - audiographer = bld(features = 'cxx cxxshlib') - audiographer.source = ''' - private/gdither/gdither.cc - src/general/sample_format_converter.cc - src/routines.cc - src/debug_utils.cc - src/general/broadcast_info.cc - ''' - + audiographer_sources = [ + 'private/gdither/gdither.cc', + 'src/general/sample_format_converter.cc', + 'src/routines.cc', + 'src/debug_utils.cc', + 'src/general/broadcast_info.cc' + ] if bld.is_defined('HAVE_SAMPLERATE'): - audiographer.source += ''' - src/general/sr_converter.cc - ''' + audiographer_sources += [ 'src/general/sr_converter.cc' ] + + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + audiographer = bld.shlib(features = 'c cxx cshlib cxxshlib', source=audiographer_sources) + # macros for this shared library + audiographer.defines = [ 'LIBAUDIOGRAPHER_DLL=1', 'LIBAUDIOGRAPHER_DLL_EXPORTS=1' ] + # macros for this other internal shared libraries that we use + audiographer.defines += [ 'LIBPBD_DLL=1' ] + audiographer.cflags = [ '-fvisibility=hidden' ] + audiographer.cxxflags = [ '-fvisibility=hidden' ] + else: + audiographer = bld.stlib(features = 'c cxx cstlib cxxstlib', source=libardour_sources) + audiographer.cxxflags = [ '-fPIC' ] + audiographer.cflags = [ '-fPIC' ] + audiographer.defines = [] audiographer.name = 'libaudiographer' audiographer.target = 'audiographer' diff --git a/libs/backends/jack/wscript b/libs/backends/jack/wscript index 4e54af0be5..80edd92634 100644 --- a/libs/backends/jack/wscript +++ b/libs/backends/jack/wscript @@ -53,6 +53,8 @@ def build(bld): obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"', 'ARDOURBACKEND_DLL_EXPORTS' ] + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] # # device discovery code in the jack backend needs ALSA diff --git a/libs/evoral/evoral/Control.hpp b/libs/evoral/evoral/Control.hpp index 369c4df630..2b7fd0aa65 100644 --- a/libs/evoral/evoral/Control.hpp +++ b/libs/evoral/evoral/Control.hpp @@ -23,6 +23,8 @@ #include <map> #include <boost/shared_ptr.hpp> #include "pbd/signals.h" + +#include "evoral/visibility.h" #include "evoral/types.hpp" #include "evoral/Parameter.hpp" @@ -38,7 +40,7 @@ class Transport; * a list of values for automation. */ -class Control +class LIBEVORAL_API Control { public: Control(const Parameter& parameter, boost::shared_ptr<ControlList>); diff --git a/libs/evoral/evoral/ControlList.hpp b/libs/evoral/evoral/ControlList.hpp index 967e08d619..de6eb6e3d9 100644 --- a/libs/evoral/evoral/ControlList.hpp +++ b/libs/evoral/evoral/ControlList.hpp @@ -25,6 +25,8 @@ #include <boost/pool/pool_alloc.hpp> #include <glibmm/threads.h> #include "pbd/signals.h" + +#include "evoral/visibility.h" #include "evoral/types.hpp" #include "evoral/Range.hpp" #include "evoral/Parameter.hpp" @@ -35,7 +37,7 @@ class Curve; /** A single event (time-stamped value) for a control */ -class ControlEvent { +class LIBEVORAL_API ControlEvent { public: ControlEvent (double w, double v) : when (w), value (v), coeff (0) @@ -67,7 +69,7 @@ public: /** A list (sequence) of time-stamped values for a control */ -class ControlList +class LIBEVORAL_API ControlList { public: typedef std::list<ControlEvent*> EventList; diff --git a/libs/evoral/evoral/ControlSet.hpp b/libs/evoral/evoral/ControlSet.hpp index 716d199fec..57a77afe71 100644 --- a/libs/evoral/evoral/ControlSet.hpp +++ b/libs/evoral/evoral/ControlSet.hpp @@ -25,6 +25,8 @@ #include <boost/utility.hpp> #include <glibmm/threads.h> #include "pbd/signals.h" + +#include "evoral/visibility.h" #include "evoral/types.hpp" #include "evoral/Parameter.hpp" #include "evoral/ControlList.hpp" @@ -34,7 +36,7 @@ namespace Evoral { class Control; class ControlEvent; -class ControlSet : public boost::noncopyable { +class LIBEVORAL_API ControlSet : public boost::noncopyable { public: ControlSet(); ControlSet (const ControlSet&); diff --git a/libs/evoral/evoral/Curve.hpp b/libs/evoral/evoral/Curve.hpp index 5719abf2d4..6aeeb039d7 100644 --- a/libs/evoral/evoral/Curve.hpp +++ b/libs/evoral/evoral/Curve.hpp @@ -22,11 +22,13 @@ #include <inttypes.h> #include <boost/utility.hpp> +#include "evoral/visibility.h" + namespace Evoral { class ControlList; -class Curve : public boost::noncopyable +class LIBEVORAL_API Curve : public boost::noncopyable { public: Curve (const ControlList& cl); @@ -51,7 +53,7 @@ private: } // namespace Evoral extern "C" { - void curve_get_vector_from_c (void *arg, double, double, float*, int32_t); + LIBEVORAL_API void curve_get_vector_from_c (void *arg, double, double, float*, int32_t); } #endif // EVORAL_CURVE_HPP diff --git a/libs/evoral/evoral/Event.hpp b/libs/evoral/evoral/Event.hpp index 747b795480..facaa64e68 100644 --- a/libs/evoral/evoral/Event.hpp +++ b/libs/evoral/evoral/Event.hpp @@ -25,6 +25,7 @@ #include <sstream> #include <stdint.h> +#include "evoral/visibility.h" #include "evoral/types.hpp" /** If this is not defined, all methods of MidiEvent are RT safe @@ -35,16 +36,16 @@ namespace Evoral { -event_id_t event_id_counter(); -event_id_t next_event_id(); -void init_event_id_counter(event_id_t n); +LIBEVORAL_API event_id_t event_id_counter(); +LIBEVORAL_API event_id_t next_event_id(); +LIBEVORAL_API void init_event_id_counter(event_id_t n); /** An event (much like a type generic jack_midi_event_t) * * Template parameter Time is the type of the time stamp used for this event. */ template<typename Time> -class Event { +class LIBEVORAL_API Event { public: #ifdef EVORAL_EVENT_ALLOC Event (EventType type=0, Time time=0, uint32_t size=0, uint8_t* buf=NULL, bool alloc=false); @@ -157,7 +158,7 @@ protected: template<typename Time> -std::ostream& operator<<(std::ostream& o, const Evoral::Event<Time>& ev) { +LIBEVORAL_API std::ostream& operator<<(std::ostream& o, const Evoral::Event<Time>& ev) { o << "Event #" << ev.id() << " type = " << ev.event_type() << " @ " << ev.time(); o << std::hex; for (uint32_t n = 0; n < ev.size(); ++n) { diff --git a/libs/evoral/evoral/EventList.hpp b/libs/evoral/evoral/EventList.hpp index e1a2679ce7..fd9df01377 100644 --- a/libs/evoral/evoral/EventList.hpp +++ b/libs/evoral/evoral/EventList.hpp @@ -19,6 +19,8 @@ #define EVORAL_EVENT_LIST_HPP #include <list> + +#include "evoral/visibility.h" #include "evoral/EventSink.hpp" #include "evoral/types.hpp" #include "evoral/Event.hpp" @@ -31,7 +33,7 @@ namespace Evoral { * Used when we need an unsorted list of Events that is also an EventSink. Absolutely nothing more. */ template<typename Time> -class EventList : public std::list<Evoral::Event<Time> *>, public Evoral::EventSink<Time> { +class LIBEVORAL_API EventList : public std::list<Evoral::Event<Time> *>, public Evoral::EventSink<Time> { public: EventList() {} diff --git a/libs/evoral/evoral/EventRingBuffer.hpp b/libs/evoral/evoral/EventRingBuffer.hpp index 419f427f33..26864e0ef1 100644 --- a/libs/evoral/evoral/EventRingBuffer.hpp +++ b/libs/evoral/evoral/EventRingBuffer.hpp @@ -22,6 +22,7 @@ #include "pbd/ringbufferNPT.h" +#include "evoral/visibility.h" #include "evoral/EventSink.hpp" #include "evoral/types.hpp" @@ -39,7 +40,7 @@ namespace Evoral { * possible interpretation of uint8_t. */ template<typename Time> -class EventRingBuffer : public PBD::RingBufferNPT<uint8_t>, public Evoral::EventSink<Time> { +class LIBEVORAL_API EventRingBuffer : public PBD::RingBufferNPT<uint8_t>, public Evoral::EventSink<Time> { public: /** @param capacity Ringbuffer capacity in bytes. diff --git a/libs/evoral/evoral/EventSink.hpp b/libs/evoral/evoral/EventSink.hpp index 29d2793dd3..59ae3803ec 100644 --- a/libs/evoral/evoral/EventSink.hpp +++ b/libs/evoral/evoral/EventSink.hpp @@ -19,15 +19,15 @@ #ifndef EVORAL_EVENT_SINK_HPP #define EVORAL_EVENT_SINK_HPP +#include "evoral/visibility.h" #include "evoral/types.hpp" namespace Evoral { - /** Pure virtual base for anything you can write events to. */ template<typename Time> -class EventSink { +class LIBEVORAL_API EventSink { public: virtual ~EventSink() {} virtual uint32_t write(Time time, EventType type, uint32_t size, const uint8_t* buf) = 0; diff --git a/libs/evoral/evoral/MIDIEvent.hpp b/libs/evoral/evoral/MIDIEvent.hpp index 6ba7269571..d6541bafeb 100644 --- a/libs/evoral/evoral/MIDIEvent.hpp +++ b/libs/evoral/evoral/MIDIEvent.hpp @@ -21,8 +21,11 @@ #include <cmath> #include <boost/shared_ptr.hpp> + +#include "evoral/visibility.h" #include "evoral/Event.hpp" #include "evoral/midi_events.h" + #ifdef EVORAL_MIDI_XML class XMLNode; #endif @@ -36,7 +39,7 @@ namespace Evoral { * valid MIDI data for these functions to make sense. */ template<typename Time> -class MIDIEvent : public Event<Time> { +class LIBEVORAL_API MIDIEvent : public Event<Time> { public: MIDIEvent(EventType type=0, Time time=0, uint32_t size=0, uint8_t* buf=NULL, bool alloc=false) : Event<Time>(type, time, size, buf, alloc) diff --git a/libs/evoral/evoral/MIDIParameters.hpp b/libs/evoral/evoral/MIDIParameters.hpp index 931d29b48d..fca53a7a45 100644 --- a/libs/evoral/evoral/MIDIParameters.hpp +++ b/libs/evoral/evoral/MIDIParameters.hpp @@ -19,23 +19,25 @@ #ifndef EVORAL_MIDI_PARAMETERS_HPP #define EVORAL_MIDI_PARAMETERS_HPP +#include "evoral/visibility.h" + namespace Evoral { namespace MIDI { -struct ContinuousController : public Parameter { +struct LIBEVORAL_API ContinuousController : public Parameter { ContinuousController(uint32_t cc_type, uint8_t channel, uint32_t controller) : Parameter(cc_type, channel, controller) {} }; -struct ProgramChange : public Parameter { +struct LIBEVORAL_API ProgramChange : public Parameter { ProgramChange(uint32_t pc_type, uint8_t channel) : Parameter(pc_type, channel, 0) {} }; -struct ChannelPressure : public Parameter { +struct LIBEVORAL_API ChannelPressure : public Parameter { ChannelPressure(uint32_t ca_type, uint32_t channel) : Parameter(ca_type, channel, 0) {} }; -struct PitchBender : public Parameter { +struct LIBEVORAL_API PitchBender : public Parameter { PitchBender(uint32_t pb_type, uint32_t channel) : Parameter(pb_type, channel, 0) {} }; diff --git a/libs/evoral/evoral/Note.hpp b/libs/evoral/evoral/Note.hpp index a400137f77..6b0aeebb4a 100644 --- a/libs/evoral/evoral/Note.hpp +++ b/libs/evoral/evoral/Note.hpp @@ -22,6 +22,8 @@ #include <algorithm> #include <glib.h> #include <stdint.h> + +#include "evoral/visibility.h" #include "evoral/MIDIEvent.hpp" namespace Evoral { @@ -31,7 +33,7 @@ namespace Evoral { * Currently a note is defined as (on event, length, off event). */ template<typename Time> -class Note { +class LIBEVORAL_API Note { public: Note(uint8_t chan=0, Time time=0, Time len=0, uint8_t note=0, uint8_t vel=0x40); Note(const Note<Time>& copy); @@ -106,7 +108,7 @@ private: } // namespace Evoral template<typename Time> -std::ostream& operator<<(std::ostream& o, const Evoral::Note<Time>& n) { +LIBEVORAL_API std::ostream& operator<<(std::ostream& o, const Evoral::Note<Time>& n) { o << "Note #" << n.id() << ": pitch = " << (int) n.note() << " @ " << n.time() << " .. " << n.end_time() << " velocity " << (int) n.velocity() diff --git a/libs/evoral/evoral/OldSMF.hpp b/libs/evoral/evoral/OldSMF.hpp index 692e159926..00bd0024e8 100644 --- a/libs/evoral/evoral/OldSMF.hpp +++ b/libs/evoral/evoral/OldSMF.hpp @@ -19,6 +19,8 @@ #ifndef EVORAL_OLD_SMF_HPP #define EVORAL_OLD_SMF_HPP +#include "evoral/visibility.h" + namespace Evoral { template<typename Time> class Event; @@ -28,7 +30,7 @@ template<typename Time> class EventRingBuffer; /** Standard Midi File (Type 0) */ template<typename Time> -class SMF { +class LIBEVORAL_API SMF { public: SMF(); virtual ~SMF(); diff --git a/libs/evoral/evoral/Parameter.hpp b/libs/evoral/evoral/Parameter.hpp index 7142574dbd..2164475cf9 100644 --- a/libs/evoral/evoral/Parameter.hpp +++ b/libs/evoral/evoral/Parameter.hpp @@ -24,6 +24,8 @@ #include <stdint.h> #include <boost/shared_ptr.hpp> +#include "evoral/visibility.h" + namespace Evoral { @@ -36,7 +38,7 @@ namespace Evoral { * This class defines a < operator which is a strict weak ordering, so * Parameter may be stored in a std::set, used as a std::map key, etc. */ -class Parameter +class LIBEVORAL_API Parameter { public: Parameter(uint32_t type, uint8_t channel=0, uint32_t id=0) diff --git a/libs/evoral/evoral/PatchChange.hpp b/libs/evoral/evoral/PatchChange.hpp index 53b50a3383..f468db4e5d 100644 --- a/libs/evoral/evoral/PatchChange.hpp +++ b/libs/evoral/evoral/PatchChange.hpp @@ -20,6 +20,7 @@ #ifndef EVORAL_PATCH_CHANGE_HPP #define EVORAL_PATCH_CHANGE_HPP +#include "evoral/visibility.h" #include "evoral/Event.hpp" #include "evoral/MIDIEvent.hpp" @@ -29,7 +30,7 @@ namespace Evoral { * bank select and then a program change. */ template<typename Time> -class PatchChange +class LIBEVORAL_API PatchChange { public: /** @param t Time. @@ -166,7 +167,7 @@ private: } template<typename Time> -std::ostream& operator<< (std::ostream& o, const Evoral::PatchChange<Time>& p) { +LIBEVORAL_API std::ostream& operator<< (std::ostream& o, const Evoral::PatchChange<Time>& p) { o << "Patch Change " << p.id() << " @ " << p.time() << " bank " << (int) p.bank() << " program " << (int) p.program(); return o; } diff --git a/libs/evoral/evoral/Range.hpp b/libs/evoral/evoral/Range.hpp index 02d92100b9..868dccdd5f 100644 --- a/libs/evoral/evoral/Range.hpp +++ b/libs/evoral/evoral/Range.hpp @@ -21,9 +21,11 @@ #include <list> +#include "evoral/visibility.h" + namespace Evoral { -enum OverlapType { +enum LIBEVORAL_API OverlapType { OverlapNone, // no overlap OverlapInternal, // the overlap is 100% with the object OverlapStart, // overlap covers start, but ends within @@ -32,7 +34,7 @@ enum OverlapType { }; template<typename T> -OverlapType coverage (T sa, T ea, T sb, T eb) { +LIBEVORAL_API OverlapType coverage (T sa, T ea, T sb, T eb) { /* OverlapType returned reflects how the second (B) range overlaps the first (A). @@ -107,7 +109,7 @@ OverlapType coverage (T sa, T ea, T sb, T eb) { /** Type to describe a time range */ template<typename T> -struct Range { +struct LIBEVORAL_API Range { Range (T f, T t) : from (f), to (t) {} T from; ///< start of the range T to; ///< end of the range @@ -119,7 +121,7 @@ bool operator== (Range<T> a, Range<T> b) { } template<typename T> -class RangeList { +class LIBEVORAL_API RangeList { public: RangeList () : _dirty (false) {} @@ -172,7 +174,7 @@ private: /** Type to describe the movement of a time range */ template<typename T> -struct RangeMove { +struct LIBEVORAL_API RangeMove { RangeMove (T f, double l, T t) : from (f), length (l), to (t) {} T from; ///< start of the range double length; ///< length of the range diff --git a/libs/evoral/evoral/SMF.hpp b/libs/evoral/evoral/SMF.hpp index 8bd05444c4..91bc928d9a 100644 --- a/libs/evoral/evoral/SMF.hpp +++ b/libs/evoral/evoral/SMF.hpp @@ -21,6 +21,8 @@ #define EVORAL_SMF_HPP #include <cassert> + +#include "evoral/visibility.h" #include "evoral/types.hpp" struct smf_struct; @@ -35,7 +37,7 @@ namespace Evoral { /** Standard Midi File. * Currently only tempo-based time of a given PPQN is supported. */ -class SMF { +class LIBEVORAL_API SMF { public: class FileError : public std::exception { public: diff --git a/libs/evoral/evoral/SMFReader.hpp b/libs/evoral/evoral/SMFReader.hpp index 91dd31da21..df7dc7073f 100644 --- a/libs/evoral/evoral/SMFReader.hpp +++ b/libs/evoral/evoral/SMFReader.hpp @@ -24,6 +24,8 @@ #include <string> #include <inttypes.h> +#include "evoral/visibility.h" + namespace Evoral { @@ -31,7 +33,7 @@ namespace Evoral { * * Currently this only reads SMF files with tempo-based timing. */ -class SMFReader { +class LIBEVORAL_API SMFReader { public: class PrematureEOF : public std::exception { const char* what() const throw() { return "Unexpected end of file"; } diff --git a/libs/evoral/evoral/Sequence.hpp b/libs/evoral/evoral/Sequence.hpp index dbc04d619b..e762d64ad1 100644 --- a/libs/evoral/evoral/Sequence.hpp +++ b/libs/evoral/evoral/Sequence.hpp @@ -26,6 +26,8 @@ #include <utility> #include <boost/shared_ptr.hpp> #include <glibmm/threads.h> + +#include "evoral/visibility.h" #include "evoral/types.hpp" #include "evoral/Note.hpp" #include "evoral/Parameter.hpp" @@ -42,7 +44,7 @@ template<typename Time> class Event; /** An iterator over (the x axis of) a 2-d double coordinate space. */ -class ControlIterator { +class LIBEVORAL_API ControlIterator { public: ControlIterator(boost::shared_ptr<const ControlList> al, double ax, double ay) : list(al) @@ -60,7 +62,7 @@ public: * notes (instead of just unassociated note on/off events) and controller data. * Controller data is represented as a list of time-stamped float values. */ template<typename Time> -class Sequence : virtual public ControlSet { +class LIBEVORAL_API Sequence : virtual public ControlSet { public: Sequence(const TypeMap& type_map); Sequence(const Sequence<Time>& other); @@ -360,7 +362,7 @@ private: } // namespace Evoral -template<typename Time> std::ostream& operator<<(std::ostream& o, const Evoral::Sequence<Time>& s) { s.dump (o); return o; } +template<typename Time> LIBEVORAL_API std::ostream& operator<<(std::ostream& o, const Evoral::Sequence<Time>& s) { s.dump (o); return o; } #endif // EVORAL_SEQUENCE_HPP diff --git a/libs/evoral/evoral/TimeConverter.hpp b/libs/evoral/evoral/TimeConverter.hpp index da765c4b78..e46e9e2d1a 100644 --- a/libs/evoral/evoral/TimeConverter.hpp +++ b/libs/evoral/evoral/TimeConverter.hpp @@ -19,6 +19,8 @@ #ifndef EVORAL_TIME_CONVERTER_HPP #define EVORAL_TIME_CONVERTER_HPP +#include "evoral/visibility.h" + namespace Evoral { /** A bidirectional converter between two different time units. @@ -33,7 +35,7 @@ namespace Evoral { * from() converts a time _origin_b + b into an offset from _origin_b in units of A. */ template<typename A, typename B> -class TimeConverter { +class LIBEVORAL_API TimeConverter { public: TimeConverter () : _origin_b (0) {} TimeConverter (B ob) : _origin_b (ob) {} @@ -63,7 +65,7 @@ protected: * going on. */ template<typename A, typename B> -class IdentityConverter : public TimeConverter<A,B> { +class LIBEVORAL_API IdentityConverter : public TimeConverter<A,B> { public: IdentityConverter() {} B to(A a) const { return static_cast<B>(a); } diff --git a/libs/evoral/evoral/TypeMap.hpp b/libs/evoral/evoral/TypeMap.hpp index 9d57cb8080..7fcb7f2880 100644 --- a/libs/evoral/evoral/TypeMap.hpp +++ b/libs/evoral/evoral/TypeMap.hpp @@ -19,6 +19,7 @@ #ifndef EVORAL_TYPE_MAP_HPP #define EVORAL_TYPE_MAP_HPP +#include "evoral/visibility.h" #include "evoral/types.hpp" namespace Evoral { @@ -28,7 +29,7 @@ class Parameter; /** The applications passes one of these which provide the implementation * with required information about event types in an opaque, type neutral way */ -class TypeMap { +class LIBEVORAL_API TypeMap { public: virtual ~TypeMap() {} diff --git a/libs/evoral/evoral/midi_util.h b/libs/evoral/evoral/midi_util.h index e4480b347e..5c72fb86c9 100644 --- a/libs/evoral/evoral/midi_util.h +++ b/libs/evoral/evoral/midi_util.h @@ -25,6 +25,8 @@ #include <string> #include <sys/types.h> #include <assert.h> + +#include "evoral/visibility.h" #include "evoral/midi_events.h" namespace Evoral { @@ -119,7 +121,7 @@ midi_event_is_valid(const uint8_t* buffer, size_t len) return true; } -std::string midi_note_name (uint8_t noteval); +LIBEVORAL_API std::string midi_note_name (uint8_t noteval); } // namespace Evoral diff --git a/libs/evoral/evoral/types.hpp b/libs/evoral/evoral/types.hpp index 000b79bb94..7259a5c0de 100644 --- a/libs/evoral/evoral/types.hpp +++ b/libs/evoral/evoral/types.hpp @@ -26,6 +26,8 @@ #include "pbd/debug.h" +#include "evoral/visibility.h" + namespace Evoral { /** ID of an event (note or other). This must be operable on by glib @@ -35,6 +37,7 @@ typedef int32_t event_id_t; /** Musical time: beats relative to some defined origin */ typedef double MusicalTime; + const MusicalTime MaxMusicalTime = DBL_MAX; const MusicalTime MinMusicalTime = DBL_MIN; @@ -77,9 +80,9 @@ typedef uint32_t EventType; namespace PBD { namespace DEBUG { - extern uint64_t Sequence; - extern uint64_t Note; - extern uint64_t ControlList; + LIBEVORAL_API extern uint64_t Sequence; + LIBEVORAL_API extern uint64_t Note; + LIBEVORAL_API extern uint64_t ControlList; } } diff --git a/libs/evoral/evoral/visibility.h b/libs/evoral/evoral/visibility.h new file mode 100644 index 0000000000..380caca2fd --- /dev/null +++ b/libs/evoral/evoral/visibility.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2013 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __libevoral_visibility_h__ +#define __libevoral_visibility_h__ + +/* _WIN32 is defined by most compilers targetting Windows, but within the + * evoral source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending + * on how a Windows build is built. + */ + +#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) + #define LIBEVORAL_DLL_IMPORT __declspec(dllimport) + #define LIBEVORAL_DLL_EXPORT __declspec(dllexport) + #define LIBEVORAL_DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define LIBEVORAL_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBEVORAL_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBEVORAL_DLL_LOCAL __attribute__ ((visibility ("hidden"))) + #else + #define LIBEVORAL_DLL_IMPORT + #define LIBEVORAL_DLL_EXPORT + #define LIBEVORAL_DLL_LOCAL + #endif +#endif + +#ifdef LIBEVORAL_DLL // libevoral is a DLL +#ifdef LIBEVORAL_DLL_EXPORTS // defined if we are building the libevoral DLL (instead of using it) + #define LIBEVORAL_API LIBEVORAL_DLL_EXPORT +#else + #define LIBEVORAL_API LIBEVORAL_DLL_IMPORT +#endif +#define LIBEVORAL_LOCAL LIBEVORAL_DLL_LOCAL +#else /* static lib, not DLL */ +#define LIBEVORAL_API +#define LIBEVORAL_LOCAL +#endif + +#endif /* __libevoral_visibility_h__ */ diff --git a/libs/evoral/wscript b/libs/evoral/wscript index bfb081217f..569aa0fc6b 100644 --- a/libs/evoral/wscript +++ b/libs/evoral/wscript @@ -88,8 +88,20 @@ def build(bld): ''' # Library - obj = bld(features = 'cxx cxxshlib') - obj.source = lib_source + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj = bld.shlib(features = 'c cxx cshlib cxxshlib', source=lib_source) + # DLL exports for this library + obj.defines = [ 'LIBEVORAL_DLL=1', 'LIBEVORAL_DLL_EXPORTS=1' ] + # DLL imports for other libraries + obj.defines += [ 'LIBPBD_DLL=1' ] + obj.cxxflags = [ '-fvisibility=hidden' ] + obj.cflags = [ '-fvisibility=hidden' ] + else: + obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=lib_source) + obj.cxxflags = [ '-fPIC' ] + obj.cflags = [ '-fPIC' ] + obj.defines = [ ] + obj.export_includes = ['.'] obj.includes = ['.', './src'] obj.name = 'libevoral' @@ -98,7 +110,7 @@ def build(bld): obj.use = 'libsmf libpbd' obj.vnum = EVORAL_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') - obj.defines = ['PACKAGE="libevoral"', 'EVORAL_MIDI_XML=1' ] + obj.defines += [ 'PACKAGE="libevoral"', 'EVORAL_MIDI_XML=1' ] if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'): # Static library (for unit test code coverage) diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index cd7ab1537a..33841cd0be 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -43,6 +43,7 @@ #include "gtkmm2ext/actions.h" #include "gtkmm2ext/activatable.h" #include "gtkmm2ext/actions.h" +#include "gtkmm2ext/gui_thread.h" #include "i18n.h" diff --git a/libs/gtkmm2ext/gtkmm2ext/actions.h b/libs/gtkmm2ext/gtkmm2ext/actions.h index 9101f8ea92..d92f85bb6e 100644 --- a/libs/gtkmm2ext/gtkmm2ext/actions.h +++ b/libs/gtkmm2ext/gtkmm2ext/actions.h @@ -28,67 +28,69 @@ #include <gtkmm/actiongroup.h> #include <gtkmm/accelkey.h> +#include "gtkmm2ext/visibility.h" + namespace Gtk { class UIManager; } namespace ActionManager { - extern std::string unbound_string; /* the key string returned if an action is not bound */ - extern Glib::RefPtr<Gtk::UIManager> ui_manager; + LIBGTKMM2EXT_API extern std::string unbound_string; /* the key string returned if an action is not bound */ + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::UIManager> ui_manager; - extern void set_sensitive (std::vector<Glib::RefPtr<Gtk::Action> >& actions, bool); - extern std::string get_key_representation (const std::string& accel_path, Gtk::AccelKey& key); + LIBGTKMM2EXT_API extern void set_sensitive (std::vector<Glib::RefPtr<Gtk::Action> >& actions, bool); + LIBGTKMM2EXT_API extern std::string get_key_representation (const std::string& accel_path, Gtk::AccelKey& key); - extern Gtk::Widget* get_widget (const char * name); - extern Glib::RefPtr<Gtk::Action> get_action (const char* group, const char* name); - extern Glib::RefPtr<Gtk::Action> get_action (const char* path); - extern Glib::RefPtr<Gtk::Action> get_action_from_name (const char* name); - extern void do_action (const char* group, const char* name); - extern void set_toggle_action (const char* group, const char* name, bool); + LIBGTKMM2EXT_API extern Gtk::Widget* get_widget (const char * name); + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> get_action (const char* group, const char* name); + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> get_action (const char* path); + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> get_action_from_name (const char* name); + LIBGTKMM2EXT_API extern void do_action (const char* group, const char* name); + LIBGTKMM2EXT_API extern void set_toggle_action (const char* group, const char* name, bool); - extern void add_action_group (Glib::RefPtr<Gtk::ActionGroup>); + LIBGTKMM2EXT_API extern void add_action_group (Glib::RefPtr<Gtk::ActionGroup>); - extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, const char * name, const char * label); - extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, const char * name, const char * label, sigc::slot<void> sl, guint key, Gdk::ModifierType mods); - extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, const char * name, const char * label, sigc::slot<void> sl); - extern Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&, const char * name, const char * label, sigc::slot<void> sl, guint key, Gdk::ModifierType mods); - extern Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&, const char * name, const char * label, sigc::slot<void> sl); - extern Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group&, std::string const &, std::string const &, std::string const &, sigc::slot<void> sl); - extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, const char * name, const char * label, sigc::slot<void> sl, guint key, Gdk::ModifierType mods); - extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, std::string const &, std::string const &, std::string const &, sigc::slot<void> sl); - extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, const char * name, const char * label, sigc::slot<void> sl); - extern bool lookup_entry (const Glib::ustring accel_path, Gtk::AccelKey& key); + LIBGTKMM2EXT_API extern bool lookup_entry (const Glib::ustring accel_path, Gtk::AccelKey& key); - extern void get_all_actions (std::vector<std::string>& names, + LIBGTKMM2EXT_API extern void get_all_actions (std::vector<std::string>& names, std::vector<std::string>& paths, std::vector<std::string>& tooltips, std::vector<std::string>& keys, std::vector<Gtk::AccelKey>& bindings); - extern void get_all_actions (std::vector<std::string>& groups, + LIBGTKMM2EXT_API extern void get_all_actions (std::vector<std::string>& groups, std::vector<std::string>& paths, std::vector<std::string>& tooltips, std::vector<Gtk::AccelKey>& bindings); - extern void check_toggleaction (std::string); - extern void uncheck_toggleaction (std::string); - extern void set_toggleaction_state (std::string, bool); + LIBGTKMM2EXT_API extern void check_toggleaction (std::string); + LIBGTKMM2EXT_API extern void uncheck_toggleaction (std::string); + LIBGTKMM2EXT_API extern void set_toggleaction_state (std::string, bool); }; #endif /* __libgtkmm2ext_actions_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/activatable.h b/libs/gtkmm2ext/gtkmm2ext/activatable.h index f8e2b5dd38..b9828d36cf 100644 --- a/libs/gtkmm2ext/gtkmm2ext/activatable.h +++ b/libs/gtkmm2ext/gtkmm2ext/activatable.h @@ -23,6 +23,8 @@ #include <gtkmm/action.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { /** @@ -30,7 +32,7 @@ namespace Gtkmm2ext { Gtkmm itself has a class for this. I don't know why we don't use it. */ -class Activatable { +class LIBGTKMM2EXT_API Activatable { public: virtual ~Activatable() {} diff --git a/libs/gtkmm2ext/gtkmm2ext/application.h b/libs/gtkmm2ext/gtkmm2ext/application.h index 3fb107b783..f0d029d3e7 100644 --- a/libs/gtkmm2ext/gtkmm2ext/application.h +++ b/libs/gtkmm2ext/gtkmm2ext/application.h @@ -22,9 +22,11 @@ #ifndef __GTK_APPLICATION_MM_H__ #define __GTK_APPLICATION_MM_H__ -#include <gtkmm2ext/gtkapplication.h> // for GtkApplicationGroup typedef #include <sigc++/signal.h> +#include "gtkmm2ext/visibility.h" +#include "gtkmm2ext/gtkapplication.h" // for GtkApplicationGroup typedef + namespace Gtk { class MenuItem; class MenuShell; @@ -36,7 +38,7 @@ namespace Glib { namespace Gtkmm2ext { -class Application +class LIBGTKMM2EXT_API Application { public: static Application* instance(); diff --git a/libs/gtkmm2ext/gtkmm2ext/auto_spin.h b/libs/gtkmm2ext/gtkmm2ext/auto_spin.h index 4eab2dae98..8a6c9ab3b0 100644 --- a/libs/gtkmm2ext/gtkmm2ext/auto_spin.h +++ b/libs/gtkmm2ext/gtkmm2ext/auto_spin.h @@ -26,9 +26,11 @@ #include <gtkmm.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class AutoSpin +class LIBGTKMM2EXT_API AutoSpin { public: diff --git a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h index 76dc8f2d49..094d4c67f4 100644 --- a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h +++ b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h @@ -21,13 +21,14 @@ #include <gtkmm/frame.h> #include <gtkmm/drawingarea.h> -#include <gtkmm2ext/binding_proxy.h> #include <cairo.h> +#include "gtkmm2ext/visibility.h" +#include "gtkmm2ext/binding_proxy.h" namespace Gtkmm2ext { -class BarController : public Gtk::Frame +class LIBGTKMM2EXT_API BarController : public Gtk::Frame { public: BarController (Gtk::Adjustment& adj, boost::shared_ptr<PBD::Controllable>); diff --git a/libs/gtkmm2ext/gtkmm2ext/bindable_button.h b/libs/gtkmm2ext/gtkmm2ext/bindable_button.h index 5ac81d8507..cf74d3aca0 100644 --- a/libs/gtkmm2ext/gtkmm2ext/bindable_button.h +++ b/libs/gtkmm2ext/gtkmm2ext/bindable_button.h @@ -23,14 +23,16 @@ #include <string> #include "pbd/signals.h" + +#include "gtkmm2ext/visibility.h" #include "gtkmm2ext/stateful_button.h" -#include "binding_proxy.h" +#include "gtkmm2ext/binding_proxy.h" namespace PBD { class Controllable; } -class BindableToggleButton : public Gtkmm2ext::StatefulToggleButton +class LIBGTKMM2EXT_API BindableToggleButton : public Gtkmm2ext::StatefulToggleButton { public: BindableToggleButton (const std::string &label) @@ -60,7 +62,7 @@ class BindableToggleButton : public Gtkmm2ext::StatefulToggleButton BindingProxy binding_proxy; }; -class BindableButton : public Gtkmm2ext::StatefulButton +class LIBGTKMM2EXT_API BindableButton : public Gtkmm2ext::StatefulButton { public: BindableButton (boost::shared_ptr<PBD::Controllable> c) : binding_proxy (c) {} diff --git a/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h b/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h index b541582f6f..d6e3140462 100644 --- a/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h +++ b/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h @@ -22,15 +22,18 @@ #define __binding_proxy__ #include <string> -#include <gtkmm2ext/popup.h> #include <boost/shared_ptr.hpp> + #include "pbd/signals.h" +#include "gtkmm2ext/visibility.h" +#include "gtkmm2ext/popup.h" + namespace PBD { class Controllable; } -class BindingProxy : public sigc::trackable +class LIBGTKMM2EXT_API BindingProxy : public sigc::trackable { public: BindingProxy (boost::shared_ptr<PBD::Controllable>); diff --git a/libs/gtkmm2ext/gtkmm2ext/bindings.h b/libs/gtkmm2ext/gtkmm2ext/bindings.h index 36da0b6075..31fea82a35 100644 --- a/libs/gtkmm2ext/gtkmm2ext/bindings.h +++ b/libs/gtkmm2ext/gtkmm2ext/bindings.h @@ -9,11 +9,13 @@ #include <gtkmm/radioaction.h> #include <gtkmm/toggleaction.h> +#include "gtkmm2ext/visibility.h" + class XMLNode; namespace Gtkmm2ext { -class KeyboardKey +class LIBGTKMM2EXT_API KeyboardKey { public: KeyboardKey () { @@ -40,7 +42,7 @@ class KeyboardKey uint64_t _val; }; -class MouseButton { +class LIBGTKMM2EXT_API MouseButton { public: MouseButton () { _val = ~0ULL; @@ -69,7 +71,7 @@ class MouseButton { static uint32_t _ignored_state; }; -class ActionMap { +class LIBGTKMM2EXT_API ActionMap { public: ActionMap() {} ~ActionMap() {} @@ -90,7 +92,7 @@ class ActionMap { _ActionMap actions; }; -class Bindings { +class LIBGTKMM2EXT_API Bindings { public: enum Operation { Press, diff --git a/libs/gtkmm2ext/gtkmm2ext/cairo_packer.h b/libs/gtkmm2ext/gtkmm2ext/cairo_packer.h index f38fe80eb5..519720dccf 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cairo_packer.h +++ b/libs/gtkmm2ext/gtkmm2ext/cairo_packer.h @@ -3,7 +3,9 @@ #include <gtkmm/box.h> -class CairoPacker +#include "gtkmm2ext/visibility.h" + +class LIBGTKMM2EXT_API CairoPacker { public: CairoPacker () {} @@ -15,7 +17,7 @@ class CairoPacker virtual void draw_background (Gtk::Widget&, GdkEventExpose*); }; -class CairoHPacker : public CairoPacker, public Gtk::HBox +class LIBGTKMM2EXT_API CairoHPacker : public CairoPacker, public Gtk::HBox { public: CairoHPacker (); @@ -27,7 +29,7 @@ class CairoHPacker : public CairoPacker, public Gtk::HBox void on_realize (); }; -class CairoVPacker : public CairoPacker, public Gtk::VBox +class LIBGTKMM2EXT_API CairoVPacker : public CairoPacker, public Gtk::VBox { public: CairoVPacker (); diff --git a/libs/gtkmm2ext/gtkmm2ext/cairo_widget.h b/libs/gtkmm2ext/gtkmm2ext/cairo_widget.h index eb741b7e98..596b695da6 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cairo_widget.h +++ b/libs/gtkmm2ext/gtkmm2ext/cairo_widget.h @@ -21,12 +21,14 @@ #define __gtk2_ardour_cairo_widget_h__ #include <gtkmm/eventbox.h> + +#include "gtkmm2ext/visibility.h" #include "gtkmm2ext/widget_state.h" /** A parent class for widgets that are rendered using Cairo. */ -class CairoWidget : public Gtk::EventBox +class LIBGTKMM2EXT_API CairoWidget : public Gtk::EventBox { public: CairoWidget (); diff --git a/libs/gtkmm2ext/gtkmm2ext/cairocell.h b/libs/gtkmm2ext/gtkmm2ext/cairocell.h index 2839d4266b..60a6f743d1 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cairocell.h +++ b/libs/gtkmm2ext/gtkmm2ext/cairocell.h @@ -29,7 +29,9 @@ #include <cairomm/cairomm.h> #include <gtkmm/misc.h> -class CairoCell +#include "gtkmm2ext/visibility.h" + +class LIBGTKMM2EXT_API CairoCell { public: CairoCell(int32_t id); @@ -72,7 +74,7 @@ class CairoCell uint32_t _xpad; }; -class CairoFontDescription { +class LIBGTKMM2EXT_API CairoFontDescription { public: CairoFontDescription (const std::string& f, Cairo::FontSlant s, @@ -106,7 +108,7 @@ class CairoFontDescription { double _size; }; -class CairoTextCell : public CairoCell +class LIBGTKMM2EXT_API CairoTextCell : public CairoCell { public: CairoTextCell (int32_t id, double width_chars, boost::shared_ptr<CairoFontDescription> font = boost::shared_ptr<CairoFontDescription>()); @@ -139,7 +141,7 @@ class CairoTextCell : public CairoCell double x_offset; }; -class CairoCharCell : public CairoTextCell +class LIBGTKMM2EXT_API CairoCharCell : public CairoTextCell { public: CairoCharCell(int32_t id, char c); @@ -147,7 +149,7 @@ class CairoCharCell : public CairoTextCell void set_size (Cairo::RefPtr<Cairo::Context>& context); }; -class CairoEditableText : public Gtk::Misc +class LIBGTKMM2EXT_API CairoEditableText : public Gtk::Misc { public: CairoEditableText (boost::shared_ptr<CairoFontDescription> font = boost::shared_ptr<CairoFontDescription>()); diff --git a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_color_selector.h b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_color_selector.h index 16e2feca6a..1360da4c50 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_color_selector.h +++ b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_color_selector.h @@ -25,6 +25,8 @@ #include <gtkmm/cellrenderer.h> #include <gdkmm.h> +#include "gtkmm2ext/visibility.h" + using namespace Gtk; namespace Gtk { @@ -33,7 +35,7 @@ namespace Gtk { namespace Gtkmm2ext { -class CellRendererColorSelector : public Gtk::CellRenderer +class LIBGTKMM2EXT_API CellRendererColorSelector : public Gtk::CellRenderer { public: CellRendererColorSelector(); diff --git a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_multi.h b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_multi.h index c856414150..5e763edefd 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_multi.h +++ b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_multi.h @@ -29,11 +29,13 @@ #include <gtkmm/cellrenderer.h> #include <gdkmm.h> +#include "gtkmm2ext/visibility.h" + using namespace Gtk; namespace Gtkmm2ext { -class CellRendererPixbufMulti : public Gtk::CellRenderer +class LIBGTKMM2EXT_API CellRendererPixbufMulti : public Gtk::CellRenderer { public: diff --git a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h index 7bc5d80685..e8ee448755 100644 --- a/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h +++ b/libs/gtkmm2ext/gtkmm2ext/cell_renderer_pixbuf_toggle.h @@ -26,11 +26,13 @@ #include <gtkmm/cellrenderer.h> #include <gdkmm.h> +#include "gtkmm2ext/visibility.h" + using namespace Gtk; namespace Gtkmm2ext { -class CellRendererPixbufToggle : public Gtk::CellRenderer +class LIBGTKMM2EXT_API CellRendererPixbufToggle : public Gtk::CellRenderer { public: diff --git a/libs/gtkmm2ext/gtkmm2ext/choice.h b/libs/gtkmm2ext/gtkmm2ext/choice.h index 17e3b3192c..df6a90dd30 100644 --- a/libs/gtkmm2ext/gtkmm2ext/choice.h +++ b/libs/gtkmm2ext/gtkmm2ext/choice.h @@ -27,9 +27,11 @@ #include <string> #include <vector> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class Choice : public Gtk::Dialog +class LIBGTKMM2EXT_API Choice : public Gtk::Dialog { public: Choice (std::string title, std::string prompt, std::vector<std::string> choices, bool center = true); diff --git a/libs/gtkmm2ext/gtkmm2ext/click_box.h b/libs/gtkmm2ext/gtkmm2ext/click_box.h index ea0041e540..c2afa2dd12 100644 --- a/libs/gtkmm2ext/gtkmm2ext/click_box.h +++ b/libs/gtkmm2ext/gtkmm2ext/click_box.h @@ -27,11 +27,12 @@ #include <string> #include <gtkmm.h> -#include <gtkmm2ext/auto_spin.h> +#include "gtkmm2ext/visibility.h" +#include "gtkmm2ext/auto_spin.h" namespace Gtkmm2ext { -class ClickBox : public Gtk::DrawingArea, public AutoSpin +class LIBGTKMM2EXT_API ClickBox : public Gtk::DrawingArea, public AutoSpin { public: ClickBox (Gtk::Adjustment *adj, const std::string &name, bool round_to_steps = false); diff --git a/libs/gtkmm2ext/gtkmm2ext/debug.h b/libs/gtkmm2ext/gtkmm2ext/debug.h index e057b3c9bf..8012742e6c 100644 --- a/libs/gtkmm2ext/gtkmm2ext/debug.h +++ b/libs/gtkmm2ext/gtkmm2ext/debug.h @@ -20,12 +20,14 @@ #ifndef __libgtkmm2ext_debug_h__ #define __libgtkmm2ext_debug_h__ +#include "gtkmm2ext/visibility.h" + #include <stdint.h> namespace Gtkmm2ext { namespace DEBUG { - extern uint64_t Keyboard; - extern uint64_t Bindings; + LIBGTKMM2EXT_API extern uint64_t Keyboard; + LIBGTKMM2EXT_API extern uint64_t Bindings; } } diff --git a/libs/gtkmm2ext/gtkmm2ext/dndtreeview.h b/libs/gtkmm2ext/gtkmm2ext/dndtreeview.h index b5f18fa890..4a3eb7b5cf 100644 --- a/libs/gtkmm2ext/gtkmm2ext/dndtreeview.h +++ b/libs/gtkmm2ext/gtkmm2ext/dndtreeview.h @@ -26,17 +26,19 @@ #include <gtkmm/treeselection.h> #include <gtkmm/selectiondata.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { template<class DataType> -struct SerializedObjectPointers { +struct LIBGTKMM2EXT_API SerializedObjectPointers { uint32_t size; uint32_t cnt; char type[32]; DataType data[0]; }; -class DnDTreeViewBase : public Gtk::TreeView +class LIBGTKMM2EXT_API DnDTreeViewBase : public Gtk::TreeView { private: public: @@ -87,7 +89,7 @@ class DnDTreeViewBase : public Gtk::TreeView }; template<class DataType> -class DnDTreeView : public DnDTreeViewBase +class LIBGTKMM2EXT_API DnDTreeView : public DnDTreeViewBase { public: DnDTreeView() {} diff --git a/libs/gtkmm2ext/gtkmm2ext/dndvbox.h b/libs/gtkmm2ext/gtkmm2ext/dndvbox.h index bbfd183c7b..e41437fbcc 100644 --- a/libs/gtkmm2ext/gtkmm2ext/dndvbox.h +++ b/libs/gtkmm2ext/gtkmm2ext/dndvbox.h @@ -18,12 +18,14 @@ */ #include <gtkmm/box.h> + +#include "gtkmm2ext/visibility.h" #include "gtkmm2ext/widget_state.h" namespace Gtkmm2ext { /** Parent class for children of a DnDVBox */ -class DnDVBoxChild +class LIBGTKMM2EXT_API DnDVBoxChild { public: virtual ~DnDVBoxChild () {} @@ -43,7 +45,7 @@ public: /** A VBox whose contents can be dragged and dropped */ template <class T> -class DnDVBox : public Gtk::EventBox +class LIBGTKMM2EXT_API DnDVBox : public Gtk::EventBox { public: DnDVBox () : _active (0), _drag_icon (0), _expecting_unwanted_button_event (false), _placeholder (0) diff --git a/libs/gtkmm2ext/gtkmm2ext/doi.h b/libs/gtkmm2ext/gtkmm2ext/doi.h index f61127dd74..53c24847f3 100644 --- a/libs/gtkmm2ext/gtkmm2ext/doi.h +++ b/libs/gtkmm2ext/gtkmm2ext/doi.h @@ -26,13 +26,15 @@ #include <gtkmm.h> +#include "gtkmm2ext/visibility.h" + /* XXX g++ 2.95 can't compile this as pair of member function templates */ -template<typename T> gint idle_delete (T *obj) { delete obj; return FALSE; } -template<typename T> void delete_when_idle (T *obj) { +template<typename T> LIBGTKMM2EXT_API gint idle_delete (T *obj) { delete obj; return FALSE; } +template<typename T> LIBGTKMM2EXT_API void delete_when_idle (T *obj) { Glib::signal_idle().connect (sigc::bind (sigc::ptr_fun (idle_delete<T>), obj)); } -template<typename T> gint delete_on_unmap (GdkEventAny *ignored, T *obj) { +template<typename T> LIBGTKMM2EXT_API gint delete_on_unmap (GdkEventAny *ignored, T *obj) { Glib::signal_idle().connect (sigc::bind (sigc::ptr_fun (idle_delete<T>), obj)); return FALSE; } diff --git a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h index 8070748963..6802481777 100644 --- a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h +++ b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h @@ -27,9 +27,11 @@ #include <gtkmm/drawingarea.h> #include <gdkmm/pixbuf.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class FastMeter : public Gtk::DrawingArea { +class LIBGTKMM2EXT_API FastMeter : public Gtk::DrawingArea { public: enum Orientation { Horizontal, diff --git a/libs/gtkmm2ext/gtkmm2ext/focus_entry.h b/libs/gtkmm2ext/gtkmm2ext/focus_entry.h index 3fb57b433d..9cdbc5cc7a 100644 --- a/libs/gtkmm2ext/gtkmm2ext/focus_entry.h +++ b/libs/gtkmm2ext/gtkmm2ext/focus_entry.h @@ -22,9 +22,11 @@ #include <gtkmm/entry.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class FocusEntry : public Gtk::Entry +class LIBGTKMM2EXT_API FocusEntry : public Gtk::Entry { public: FocusEntry (); diff --git a/libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h b/libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h index 99d9f8ffc4..da4136be0e 100644 --- a/libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h +++ b/libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h @@ -25,11 +25,13 @@ #include <vector> #include <sigc++/signal.h> +#include "gtkmm2ext/visibility.h" + namespace Gtk { class ToggleButton; }; -class GroupedButtons : public sigc::trackable +class LIBGTKMM2EXT_API GroupedButtons : public sigc::trackable { public: GroupedButtons (uint32_t nbuttons, uint32_t first_active); diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h index 9fa9e99fe8..065cc4bc00 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h @@ -41,12 +41,15 @@ #include <gtkmm/textbuffer.h> #include <gtkmm/main.h> #include <gdkmm/color.h> -#include <pbd/abstract_ui.h> -#include <pbd/ringbufferNPT.h> - -#include <pbd/pool.h> -#include <pbd/error.h> -#include <pbd/receiver.h> + +#define ABSTRACT_UI_EXPORTS +#include "pbd/abstract_ui.h" +#include "pbd/ringbufferNPT.h" +#include "pbd/pool.h" +#include "pbd/error.h" +#include "pbd/receiver.h" + +#include "gtkmm2ext/visibility.h" class Touchable; @@ -63,7 +66,7 @@ extern BaseUI::RequestType SetTip; extern BaseUI::RequestType AddIdle; extern BaseUI::RequestType AddTimeout; -struct UIRequest : public BaseUI::BaseRequestObject { +struct LIBGTKMM2EXT_API UIRequest : public BaseUI::BaseRequestObject { /* this once used anonymous unions to merge elements that are never part of the same request. that makes @@ -92,7 +95,7 @@ struct UIRequest : public BaseUI::BaseRequestObject { } }; -class UI : public AbstractUI<UIRequest> +class LIBGTKMM2EXT_API UI : public AbstractUI<UIRequest> { private: class MyReceiver : public Receiver { diff --git a/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h b/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h index d0d5b55557..83594fefbe 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h @@ -26,22 +26,24 @@ #include <gtk/gtk.h> +#include "gtkmm2ext/visibility.h" + G_BEGIN_DECLS typedef struct _GtkApplicationMenuGroup GtkApplicationMenuGroup; -int gtk_application_init (void); -void gtk_application_ready (void); -void gtk_application_cleanup (void); +LIBGTKMM2EXT_API int gtk_application_init (void); +LIBGTKMM2EXT_API void gtk_application_ready (void); +LIBGTKMM2EXT_API void gtk_application_cleanup (void); -void gtk_application_set_menu_bar (GtkMenuShell *menu_shell); -GtkApplicationMenuGroup * gtk_application_add_app_menu_group (void); -void gtk_application_add_app_menu_item (GtkApplicationMenuGroup *group, +LIBGTKMM2EXT_API void gtk_application_set_menu_bar (GtkMenuShell *menu_shell); +LIBGTKMM2EXT_API GtkApplicationMenuGroup * gtk_application_add_app_menu_group (void); +LIBGTKMM2EXT_API void gtk_application_add_app_menu_item (GtkApplicationMenuGroup *group, GtkMenuItem *menu_item); /* these are private but here until GtkApplication becomes a GtkObject with an interface */ -extern GList *_gtk_application_menu_groups; +LIBGTKMM2EXT_LOCAL extern GList *_gtk_application_menu_groups; G_END_DECLS diff --git a/libs/gtkmm2ext/gtkmm2ext/gtkutils.h b/libs/gtkmm2ext/gtkmm2ext/gtkutils.h index 832423f31d..48c166be29 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtkutils.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtkutils.h @@ -22,12 +22,14 @@ #include <string> +#include "gtkmm2ext/visibility.h" + namespace Gtk { class Widget; } -void gtk_set_size_request_to_display_given_text (Gtk::Widget& w, - const std::string& text, - gint hpadding = 0, - gint vpadding = 0); +LIBGTKMM2EXT_API void gtk_set_size_request_to_display_given_text (Gtk::Widget& w, + const std::string& text, + gint hpadding = 0, + gint vpadding = 0); #endif /* __gtkutils_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/gui_thread.h b/libs/gtkmm2ext/gtkmm2ext/gui_thread.h index 1e98a32b7b..6935a8d0af 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gui_thread.h +++ b/libs/gtkmm2ext/gtkmm2ext/gui_thread.h @@ -25,6 +25,8 @@ #include <boost/bind.hpp> #include <boost/bind/protect.hpp> +#include "gtkmm2ext/visibility.h" + namespace sigc { struct trackable; } @@ -34,7 +36,7 @@ namespace sigc { #define gui_context() Gtkmm2ext::UI::instance() /* a UICallback-derived object that specifies the event loop for GUI signal handling */ #define ui_bind(f, ...) boost::protect (boost::bind (f, __VA_ARGS__)) -extern PBD::EventLoop::InvalidationRecord* __invalidator (sigc::trackable& trackable, const char*, int); +LIBGTKMM2EXT_API extern PBD::EventLoop::InvalidationRecord* __invalidator (sigc::trackable& trackable, const char*, int); #define invalidator(x) __invalidator ((x), __FILE__, __LINE__) #endif /* __ardour_gtk_gui_thread_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h b/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h index d8bda35cb5..58e2f8f5bd 100644 --- a/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h +++ b/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h @@ -23,9 +23,11 @@ #include <sys/time.h> #include <gtkmm/adjustment.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class IdleAdjustment : public sigc::trackable +class LIBGTKMM2EXT_API IdleAdjustment : public sigc::trackable { public: IdleAdjustment (Gtk::Adjustment& adj); diff --git a/libs/gtkmm2ext/gtkmm2ext/keyboard.h b/libs/gtkmm2ext/gtkmm2ext/keyboard.h index 2c6b026a42..2123e6ff69 100644 --- a/libs/gtkmm2ext/gtkmm2ext/keyboard.h +++ b/libs/gtkmm2ext/gtkmm2ext/keyboard.h @@ -30,13 +30,15 @@ #include "pbd/stateful.h" +#include "gtkmm2ext/visibility.h" + namespace Gtk { class Window; } namespace Gtkmm2ext { -class Keyboard : public sigc::trackable, PBD::Stateful +class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful { public: Keyboard (); diff --git a/libs/gtkmm2ext/gtkmm2ext/motionfeedback.h b/libs/gtkmm2ext/gtkmm2ext/motionfeedback.h index b4bf2d9c02..9e051b04b8 100644 --- a/libs/gtkmm2ext/gtkmm2ext/motionfeedback.h +++ b/libs/gtkmm2ext/gtkmm2ext/motionfeedback.h @@ -27,6 +27,7 @@ #include <gtkmm/label.h> #include <gtkmm/eventbox.h> +#include "gtkmm2ext/visibility.h" #include "gtkmm2ext/binding_proxy.h" #include "gtkmm2ext/prolooks-helpers.h" @@ -37,7 +38,7 @@ namespace Gtk { namespace Gtkmm2ext { -class MotionFeedback : public Gtk::VBox +class LIBGTKMM2EXT_API MotionFeedback : public Gtk::VBox { public: enum Type { diff --git a/libs/gtkmm2ext/gtkmm2ext/persistent_tooltip.h b/libs/gtkmm2ext/gtkmm2ext/persistent_tooltip.h index edd1e199e4..840280f701 100644 --- a/libs/gtkmm2ext/gtkmm2ext/persistent_tooltip.h +++ b/libs/gtkmm2ext/gtkmm2ext/persistent_tooltip.h @@ -22,12 +22,14 @@ #include <sigc++/trackable.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { /** A class which offers a tooltip-like window which can be made to * stay open during a drag. */ -class PersistentTooltip : public sigc::trackable +class LIBGTKMM2EXT_API PersistentTooltip : public sigc::trackable { public: PersistentTooltip (Gtk::Widget *); diff --git a/libs/gtkmm2ext/gtkmm2ext/pixfader.h b/libs/gtkmm2ext/gtkmm2ext/pixfader.h index 2953cc6333..26942371d3 100644 --- a/libs/gtkmm2ext/gtkmm2ext/pixfader.h +++ b/libs/gtkmm2ext/gtkmm2ext/pixfader.h @@ -27,9 +27,11 @@ #include <gtkmm/adjustment.h> #include <gdkmm.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class PixFader : public Gtk::DrawingArea +class LIBGTKMM2EXT_API PixFader : public Gtk::DrawingArea { public: PixFader (Gtk::Adjustment& adjustment, int orientation, int span, int girth); diff --git a/libs/gtkmm2ext/gtkmm2ext/pixscroller.h b/libs/gtkmm2ext/gtkmm2ext/pixscroller.h index c87d1f130c..06d0ed2458 100644 --- a/libs/gtkmm2ext/gtkmm2ext/pixscroller.h +++ b/libs/gtkmm2ext/gtkmm2ext/pixscroller.h @@ -24,9 +24,11 @@ #include <gtkmm/adjustment.h> #include <gdkmm.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class PixScroller : public Gtk::DrawingArea +class LIBGTKMM2EXT_API PixScroller : public Gtk::DrawingArea { public: PixScroller(Gtk::Adjustment& adjustment, diff --git a/libs/gtkmm2ext/gtkmm2ext/popup.h b/libs/gtkmm2ext/gtkmm2ext/popup.h index 994932e733..75a62ae92c 100644 --- a/libs/gtkmm2ext/gtkmm2ext/popup.h +++ b/libs/gtkmm2ext/gtkmm2ext/popup.h @@ -29,9 +29,11 @@ #include <pbd/touchable.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class PopUp : public Gtk::Window, public Touchable +class LIBGTKMM2EXT_API PopUp : public Gtk::Window, public Touchable { public: PopUp (Gtk::WindowPosition pos, unsigned int show_for_msecs = 0, diff --git a/libs/gtkmm2ext/gtkmm2ext/prolooks-helpers.h b/libs/gtkmm2ext/gtkmm2ext/prolooks-helpers.h index a484dd2eab..1bdc0f8487 100644 --- a/libs/gtkmm2ext/gtkmm2ext/prolooks-helpers.h +++ b/libs/gtkmm2ext/gtkmm2ext/prolooks-helpers.h @@ -19,6 +19,8 @@ #include <gdk-pixbuf/gdk-pixdata.h> #include <gobject/gvaluecollector.h> +#include "gtkmm2ext/visibility.h" + #ifdef __cplusplus extern "C" { #endif @@ -141,107 +143,107 @@ struct _ProlooksParamSpecHSV { }; -gpointer cairo_color_ref (gpointer instance); -void cairo_color_unref (gpointer instance); -GParamSpec* cairo_param_spec_color (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void cairo_value_set_color (GValue* value, gpointer v_object); -void cairo_value_take_color (GValue* value, gpointer v_object); -gpointer cairo_value_get_color (const GValue* value); -GType cairo_color_get_type (void); +LIBGTKMM2EXT_API gpointer cairo_color_ref (gpointer instance); +LIBGTKMM2EXT_API void cairo_color_unref (gpointer instance); +LIBGTKMM2EXT_API GParamSpec* cairo_param_spec_color (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +LIBGTKMM2EXT_API void cairo_value_set_color (GValue* value, gpointer v_object); +LIBGTKMM2EXT_API void cairo_value_take_color (GValue* value, gpointer v_object); +LIBGTKMM2EXT_API gpointer cairo_value_get_color (const GValue* value); +LIBGTKMM2EXT_API GType cairo_color_get_type (void); #define CAIRO_COLOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CAIRO_TYPE_COLOR, CairoColorPrivate)) -enum { +enum LIBGTKMM2EXT_API { CAIRO_COLOR_DUMMY_PROPERTY }; -void cairo_color_set_red (CairoColor* self, double value); -void cairo_color_set_green (CairoColor* self, double value); -void cairo_color_set_blue (CairoColor* self, double value); -void cairo_color_set_alpha (CairoColor* self, double value); -CairoColor* cairo_color_new (double red, double green, double blue, double alpha); -CairoColor* cairo_color_construct (GType object_type, double red, double green, double blue, double alpha); -double cairo_color_get_red (CairoColor* self); -double cairo_color_get_green (CairoColor* self); -double cairo_color_get_blue (CairoColor* self); -double cairo_color_get_alpha (CairoColor* self); -CairoColor* cairo_color_copy (CairoColor* self); -void cairo_color_set_from_string (CairoColor* self, const char* webcolor); -CairoColor* cairo_color_new_from_string (const char* webcolor); -CairoColor* cairo_color_construct_from_string (GType object_type, const char* webcolor); -ProlooksHSL* prolooks_hsl_new (void); -ProlooksHSL* prolooks_hsl_construct (GType object_type); -gpointer prolooks_hsl_ref (gpointer instance); -void prolooks_hsl_unref (gpointer instance); -GParamSpec* prolooks_param_spec_hsl (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void prolooks_value_set_hsl (GValue* value, gpointer v_object); -void prolooks_value_take_hsl (GValue* value, gpointer v_object); -gpointer prolooks_value_get_hsl (const GValue* value); -GType prolooks_hsl_get_type (void); -void prolooks_hsl_from_cairo_color (ProlooksHSL* self, CairoColor* color); -double prolooks_hsl_get_lightness (ProlooksHSL* self); -void prolooks_hsl_set_lightness (ProlooksHSL* self, double value); -double prolooks_hsl_get_saturation (ProlooksHSL* self); -void prolooks_hsl_set_saturation (ProlooksHSL* self, double value); -CairoColor* prolooks_hsl_to_cairo_color (ProlooksHSL* self); -CairoColor* cairo_color_shade (CairoColor* self, double shade_factor); -void cairo_color_set_to (CairoColor* self, CairoColor* a_color); -void cairo_color_set_as_source_in (CairoColor* self, cairo_t* cr); -void cairo_color_add_color_stop_to (CairoColor* self, cairo_pattern_t* p, double offset); -CairoColor* prolooks_gdk_color_to_cairo (const GdkColor* color); -void prolooks_color_from_string (const char* webcolor, GdkColor* result); -GType prolooks_button_state_get_type (void); -GType prolooks_button_type_get_type (void); -void prolooks_set_line_width_from_device (cairo_t* cr); -char* prolooks_color_to_string (const GdkColor* color); -CairoColor* prolooks_cairo_color_from_string (const char* webcolor); -void prolooks_set_source_color (cairo_t* cr, const GdkColor* color, double alpha); -void prolooks_gdk_color_to_cairo_color (const GdkColor* color, double* red, double* green, double* blue); -void prolooks_cairo_color_to_gdk (CairoColor* cairo_color, GdkColor* result); -void prolooks_set_source_color_string (cairo_t* cr, const char* color, double alpha); -void prolooks_add_color_stop (cairo_pattern_t* p, double offset, const GdkColor* color, double alpha); -void prolooks_add_color_stop_str (cairo_pattern_t* p, double offset, const char* color, double alpha); -cairo_pattern_t* prolooks_create_gradient (double x1, double y1, double x2, double y2, const GdkColor* start, const GdkColor* stop, double alpha_start, double alpha_stop); -cairo_pattern_t* prolooks_create_gradient_str (double x1, double y1, double x2, double y2, const char* start, const char* stop, double alpha_start, double alpha_stop); -void prolooks_rounded_rect (cairo_t* cr, double x, double y, double w, double h, double radius_x, double radius_y); -void prolooks_background_gradient (cairo_t* cr, double w, double h); -double prolooks_modula (double number, double divisor); +LIBGTKMM2EXT_API void cairo_color_set_red (CairoColor* self, double value); +LIBGTKMM2EXT_API void cairo_color_set_green (CairoColor* self, double value); +LIBGTKMM2EXT_API void cairo_color_set_blue (CairoColor* self, double value); +LIBGTKMM2EXT_API void cairo_color_set_alpha (CairoColor* self, double value); +LIBGTKMM2EXT_API CairoColor* cairo_color_new (double red, double green, double blue, double alpha); +LIBGTKMM2EXT_API CairoColor* cairo_color_construct (GType object_type, double red, double green, double blue, double alpha); +LIBGTKMM2EXT_API double cairo_color_get_red (CairoColor* self); +LIBGTKMM2EXT_API double cairo_color_get_green (CairoColor* self); +LIBGTKMM2EXT_API double cairo_color_get_blue (CairoColor* self); +LIBGTKMM2EXT_API double cairo_color_get_alpha (CairoColor* self); +LIBGTKMM2EXT_API CairoColor* cairo_color_copy (CairoColor* self); +LIBGTKMM2EXT_API void cairo_color_set_from_string (CairoColor* self, const char* webcolor); +LIBGTKMM2EXT_API CairoColor* cairo_color_new_from_string (const char* webcolor); +LIBGTKMM2EXT_API CairoColor* cairo_color_construct_from_string (GType object_type, const char* webcolor); +LIBGTKMM2EXT_API ProlooksHSL* prolooks_hsl_new (void); +LIBGTKMM2EXT_API ProlooksHSL* prolooks_hsl_construct (GType object_type); +LIBGTKMM2EXT_API gpointer prolooks_hsl_ref (gpointer instance); +LIBGTKMM2EXT_API void prolooks_hsl_unref (gpointer instance); +LIBGTKMM2EXT_API GParamSpec* prolooks_param_spec_hsl (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +LIBGTKMM2EXT_API void prolooks_value_set_hsl (GValue* value, gpointer v_object); +LIBGTKMM2EXT_API void prolooks_value_take_hsl (GValue* value, gpointer v_object); +LIBGTKMM2EXT_API gpointer prolooks_value_get_hsl (const GValue* value); +LIBGTKMM2EXT_API GType prolooks_hsl_get_type (void); +LIBGTKMM2EXT_API void prolooks_hsl_from_cairo_color (ProlooksHSL* self, CairoColor* color); +LIBGTKMM2EXT_API double prolooks_hsl_get_lightness (ProlooksHSL* self); +LIBGTKMM2EXT_API void prolooks_hsl_set_lightness (ProlooksHSL* self, double value); +LIBGTKMM2EXT_API double prolooks_hsl_get_saturation (ProlooksHSL* self); +LIBGTKMM2EXT_API void prolooks_hsl_set_saturation (ProlooksHSL* self, double value); +LIBGTKMM2EXT_API CairoColor* prolooks_hsl_to_cairo_color (ProlooksHSL* self); +LIBGTKMM2EXT_API CairoColor* cairo_color_shade (CairoColor* self, double shade_factor); +LIBGTKMM2EXT_API void cairo_color_set_to (CairoColor* self, CairoColor* a_color); +LIBGTKMM2EXT_API void cairo_color_set_as_source_in (CairoColor* self, cairo_t* cr); +LIBGTKMM2EXT_API void cairo_color_add_color_stop_to (CairoColor* self, cairo_pattern_t* p, double offset); +LIBGTKMM2EXT_API CairoColor* prolooks_gdk_color_to_cairo (const GdkColor* color); +LIBGTKMM2EXT_API void prolooks_color_from_string (const char* webcolor, GdkColor* result); +LIBGTKMM2EXT_API GType prolooks_button_state_get_type (void); +LIBGTKMM2EXT_API GType prolooks_button_type_get_type (void); +LIBGTKMM2EXT_API void prolooks_set_line_width_from_device (cairo_t* cr); +LIBGTKMM2EXT_API char* prolooks_color_to_string (const GdkColor* color); +LIBGTKMM2EXT_API CairoColor* prolooks_cairo_color_from_string (const char* webcolor); +LIBGTKMM2EXT_API void prolooks_set_source_color (cairo_t* cr, const GdkColor* color, double alpha); +LIBGTKMM2EXT_API void prolooks_gdk_color_to_cairo_color (const GdkColor* color, double* red, double* green, double* blue); +LIBGTKMM2EXT_API void prolooks_cairo_color_to_gdk (CairoColor* cairo_color, GdkColor* result); +LIBGTKMM2EXT_API void prolooks_set_source_color_string (cairo_t* cr, const char* color, double alpha); +LIBGTKMM2EXT_API void prolooks_add_color_stop (cairo_pattern_t* p, double offset, const GdkColor* color, double alpha); +LIBGTKMM2EXT_API void prolooks_add_color_stop_str (cairo_pattern_t* p, double offset, const char* color, double alpha); +LIBGTKMM2EXT_API cairo_pattern_t* prolooks_create_gradient (double x1, double y1, double x2, double y2, const GdkColor* start, const GdkColor* stop, double alpha_start, double alpha_stop); +LIBGTKMM2EXT_API cairo_pattern_t* prolooks_create_gradient_str (double x1, double y1, double x2, double y2, const char* start, const char* stop, double alpha_start, double alpha_stop); +LIBGTKMM2EXT_API void prolooks_rounded_rect (cairo_t* cr, double x, double y, double w, double h, double radius_x, double radius_y); +LIBGTKMM2EXT_API void prolooks_background_gradient (cairo_t* cr, double w, double h); +LIBGTKMM2EXT_API double prolooks_modula (double number, double divisor); #define PROLOOKS_HSL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PROLOOKS_TYPE_HSL, ProlooksHSLPrivate)) -enum { +enum LIBGTKMM2EXT_API { PROLOOKS_HSL_DUMMY_PROPERTY }; -double prolooks_hsl_get_hue (ProlooksHSL* self); -char* prolooks_hsl_to_string (ProlooksHSL* self); -void prolooks_hsl_to_gdk_color (ProlooksHSL* self, GdkColor* result); -void prolooks_hsl_from_gdk_color (ProlooksHSL* self, const GdkColor* color); -void prolooks_hsl_set_hue (ProlooksHSL* self, double value); -gpointer prolooks_hsv_ref (gpointer instance); -void prolooks_hsv_unref (gpointer instance); -GParamSpec* prolooks_param_spec_hsv (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void prolooks_value_set_hsv (GValue* value, gpointer v_object); -void prolooks_value_take_hsv (GValue* value, gpointer v_object); -gpointer prolooks_value_get_hsv (const GValue* value); -GType prolooks_hsv_get_type (void); +LIBGTKMM2EXT_API double prolooks_hsl_get_hue (ProlooksHSL* self); +LIBGTKMM2EXT_API char* prolooks_hsl_to_string (ProlooksHSL* self); +LIBGTKMM2EXT_API void prolooks_hsl_to_gdk_color (ProlooksHSL* self, GdkColor* result); +LIBGTKMM2EXT_API void prolooks_hsl_from_gdk_color (ProlooksHSL* self, const GdkColor* color); +LIBGTKMM2EXT_API void prolooks_hsl_set_hue (ProlooksHSL* self, double value); +LIBGTKMM2EXT_API gpointer prolooks_hsv_ref (gpointer instance); +LIBGTKMM2EXT_API void prolooks_hsv_unref (gpointer instance); +LIBGTKMM2EXT_API GParamSpec* prolooks_param_spec_hsv (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +LIBGTKMM2EXT_API void prolooks_value_set_hsv (GValue* value, gpointer v_object); +LIBGTKMM2EXT_API void prolooks_value_take_hsv (GValue* value, gpointer v_object); +LIBGTKMM2EXT_API gpointer prolooks_value_get_hsv (const GValue* value); +LIBGTKMM2EXT_API GType prolooks_hsv_get_type (void); #define PROLOOKS_HSV_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PROLOOKS_TYPE_HSV, ProlooksHSVPrivate)) -enum { +enum LIBGTKMM2EXT_API { PROLOOKS_HSV_DUMMY_PROPERTY }; -double prolooks_hsv_get_hue (ProlooksHSV* self); -double prolooks_hsv_get_saturation (ProlooksHSV* self); -double prolooks_hsv_get_value (ProlooksHSV* self); -char* prolooks_hsv_to_string (ProlooksHSV* self); -void prolooks_hsv_from_gdk_color (ProlooksHSV* self, const GdkColor* color); -ProlooksHSV* prolooks_hsv_new_for_gdk_color (const GdkColor* color); -ProlooksHSV* prolooks_hsv_construct_for_gdk_color (GType object_type, const GdkColor* color); -void prolooks_hsv_from_cairo_color (ProlooksHSV* self, CairoColor* color); -ProlooksHSV* prolooks_hsv_new_for_cairo_color (CairoColor* color); -ProlooksHSV* prolooks_hsv_construct_for_cairo_color (GType object_type, CairoColor* color); -CairoColor* prolooks_hsv_to_cairo_color (ProlooksHSV* self); -void prolooks_hsv_to_gdk_color (ProlooksHSV* self, GdkColor* result); -void prolooks_hsv_set_value (ProlooksHSV* self, double value); -void prolooks_hsv_set_hue (ProlooksHSV* self, double value); -void prolooks_hsv_set_saturation (ProlooksHSV* self, double value); -ProlooksHSV* prolooks_hsv_new (void); -ProlooksHSV* prolooks_hsv_construct (GType object_type); -void prolooks_shade_color (const GdkColor* orig, double shade_ratio, GdkColor* result); -GdkPixbuf* prolooks_cairo_image_surface_to_pixbuf (cairo_surface_t* surface); +LIBGTKMM2EXT_API double prolooks_hsv_get_hue (ProlooksHSV* self); +LIBGTKMM2EXT_API double prolooks_hsv_get_saturation (ProlooksHSV* self); +LIBGTKMM2EXT_API double prolooks_hsv_get_value (ProlooksHSV* self); +LIBGTKMM2EXT_API char* prolooks_hsv_to_string (ProlooksHSV* self); +LIBGTKMM2EXT_API void prolooks_hsv_from_gdk_color (ProlooksHSV* self, const GdkColor* color); +LIBGTKMM2EXT_API ProlooksHSV* prolooks_hsv_new_for_gdk_color (const GdkColor* color); +LIBGTKMM2EXT_API ProlooksHSV* prolooks_hsv_construct_for_gdk_color (GType object_type, const GdkColor* color); +LIBGTKMM2EXT_API void prolooks_hsv_from_cairo_color (ProlooksHSV* self, CairoColor* color); +LIBGTKMM2EXT_API ProlooksHSV* prolooks_hsv_new_for_cairo_color (CairoColor* color); +LIBGTKMM2EXT_API ProlooksHSV* prolooks_hsv_construct_for_cairo_color (GType object_type, CairoColor* color); +LIBGTKMM2EXT_API CairoColor* prolooks_hsv_to_cairo_color (ProlooksHSV* self); +LIBGTKMM2EXT_API void prolooks_hsv_to_gdk_color (ProlooksHSV* self, GdkColor* result); +LIBGTKMM2EXT_API void prolooks_hsv_set_value (ProlooksHSV* self, double value); +LIBGTKMM2EXT_API void prolooks_hsv_set_hue (ProlooksHSV* self, double value); +LIBGTKMM2EXT_API void prolooks_hsv_set_saturation (ProlooksHSV* self, double value); +LIBGTKMM2EXT_API ProlooksHSV* prolooks_hsv_new (void); +LIBGTKMM2EXT_API ProlooksHSV* prolooks_hsv_construct (GType object_type); +LIBGTKMM2EXT_API void prolooks_shade_color (const GdkColor* orig, double shade_ratio, GdkColor* result); +LIBGTKMM2EXT_API GdkPixbuf* prolooks_cairo_image_surface_to_pixbuf (cairo_surface_t* surface); #ifdef __cplusplus } // extern "C" diff --git a/libs/gtkmm2ext/gtkmm2ext/prompter.h b/libs/gtkmm2ext/gtkmm2ext/prompter.h index 72d9f2149b..3499479073 100644 --- a/libs/gtkmm2ext/gtkmm2ext/prompter.h +++ b/libs/gtkmm2ext/gtkmm2ext/prompter.h @@ -27,13 +27,15 @@ #include <gtkmm/dialog.h> #include <sigc++/sigc++.h> +#include "gtkmm2ext/visibility.h" + namespace Gtk { class Window; } namespace Gtkmm2ext { -class Prompter : public Gtk::Dialog +class LIBGTKMM2EXT_API Prompter : public Gtk::Dialog { public: diff --git a/libs/gtkmm2ext/gtkmm2ext/scroomer.h b/libs/gtkmm2ext/gtkmm2ext/scroomer.h index a5b7f4a9ba..b5a84e9da6 100644 --- a/libs/gtkmm2ext/gtkmm2ext/scroomer.h +++ b/libs/gtkmm2ext/gtkmm2ext/scroomer.h @@ -24,9 +24,11 @@ #include <gtkmm/adjustment.h> #include <gdkmm.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class Scroomer : public Gtk::DrawingArea +class LIBGTKMM2EXT_API Scroomer : public Gtk::DrawingArea { public: enum Component { diff --git a/libs/gtkmm2ext/gtkmm2ext/selector.h b/libs/gtkmm2ext/gtkmm2ext/selector.h index 56e075a242..e1a0c1a530 100644 --- a/libs/gtkmm2ext/gtkmm2ext/selector.h +++ b/libs/gtkmm2ext/gtkmm2ext/selector.h @@ -28,9 +28,11 @@ #include <gtkmm.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class TreeView_Selector : public Gtk::TreeView +class LIBGTKMM2EXT_API TreeView_Selector : public Gtk::TreeView { public: TreeView_Selector() {} @@ -42,7 +44,7 @@ protected: typedef void (SelectorRefillFunction)(Glib::RefPtr<Gtk::ListStore>, void *); -class Selector : public Gtk::VBox +class LIBGTKMM2EXT_API Selector : public Gtk::VBox { friend class Gtkmm2ext::TreeView_Selector; diff --git a/libs/gtkmm2ext/gtkmm2ext/slider_controller.h b/libs/gtkmm2ext/gtkmm2ext/slider_controller.h index 42ed05a761..b04c2cb005 100644 --- a/libs/gtkmm2ext/gtkmm2ext/slider_controller.h +++ b/libs/gtkmm2ext/gtkmm2ext/slider_controller.h @@ -30,6 +30,8 @@ #include <boost/shared_ptr.hpp> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { class Pix; } @@ -40,7 +42,7 @@ namespace PBD { namespace Gtkmm2ext { -class SliderController : public Gtkmm2ext::PixFader +class LIBGTKMM2EXT_API SliderController : public Gtkmm2ext::PixFader { public: SliderController (Gtk::Adjustment* adj, int orientation, int, int); @@ -64,13 +66,13 @@ class SliderController : public Gtkmm2ext::PixFader void init (); }; -class VSliderController : public SliderController +class LIBGTKMM2EXT_API VSliderController : public SliderController { public: VSliderController (Gtk::Adjustment *adj, int, int, bool with_numeric = true); }; -class HSliderController : public SliderController +class LIBGTKMM2EXT_API HSliderController : public SliderController { public: HSliderController (Gtk::Adjustment *adj, int, int, bool with_numeric = true); diff --git a/libs/gtkmm2ext/gtkmm2ext/stateful_button.h b/libs/gtkmm2ext/gtkmm2ext/stateful_button.h index 5954d4de45..eb3ae0d567 100644 --- a/libs/gtkmm2ext/gtkmm2ext/stateful_button.h +++ b/libs/gtkmm2ext/gtkmm2ext/stateful_button.h @@ -24,9 +24,11 @@ #include <gtkmm/togglebutton.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { -class StateButton +class LIBGTKMM2EXT_API StateButton { public: StateButton(); @@ -53,7 +55,7 @@ class StateButton }; -class StatefulToggleButton : public StateButton, public Gtk::ToggleButton +class LIBGTKMM2EXT_API StatefulToggleButton : public StateButton, public Gtk::ToggleButton { public: StatefulToggleButton(); @@ -71,7 +73,7 @@ class StatefulToggleButton : public StateButton, public Gtk::ToggleButton std::string get_widget_name() const { return get_name(); } }; -class StatefulButton : public StateButton, public Gtk::Button +class LIBGTKMM2EXT_API StatefulButton : public StateButton, public Gtk::Button { public: StatefulButton(); diff --git a/libs/gtkmm2ext/gtkmm2ext/sync-menu.h b/libs/gtkmm2ext/gtkmm2ext/sync-menu.h index 2be5e71d02..b1fb455858 100644 --- a/libs/gtkmm2ext/gtkmm2ext/sync-menu.h +++ b/libs/gtkmm2ext/gtkmm2ext/sync-menu.h @@ -27,17 +27,19 @@ #include <gtk/gtk.h> +#include "gtkmm2ext/visibility.h" + G_BEGIN_DECLS typedef struct _IgeMacMenuGroup IgeMacMenuGroup; -void ige_mac_menu_set_menu_bar (GtkMenuShell *menu_shell); -void ige_mac_menu_set_quit_menu_item (GtkMenuItem *menu_item); +LIBGTKMM2EXT_API void ige_mac_menu_set_menu_bar (GtkMenuShell *menu_shell); +LIBGTKMM2EXT_API void ige_mac_menu_set_quit_menu_item (GtkMenuItem *menu_item); -IgeMacMenuGroup * ige_mac_menu_add_app_menu_group (void); -void ige_mac_menu_add_app_menu_item (IgeMacMenuGroup *group, - GtkMenuItem *menu_item, - const gchar *label); +LIBGTKMM2EXT_API IgeMacMenuGroup * ige_mac_menu_add_app_menu_group (void); +LIBGTKMM2EXT_API void ige_mac_menu_add_app_menu_item (IgeMacMenuGroup *group, + GtkMenuItem *menu_item, + const gchar *label); G_END_DECLS diff --git a/libs/gtkmm2ext/gtkmm2ext/tearoff.h b/libs/gtkmm2ext/gtkmm2ext/tearoff.h index 7f4358c154..f6742ea5d6 100644 --- a/libs/gtkmm2ext/gtkmm2ext/tearoff.h +++ b/libs/gtkmm2ext/gtkmm2ext/tearoff.h @@ -25,11 +25,13 @@ #include <gtkmm/box.h> #include <gtkmm/eventbox.h> +#include "gtkmm2ext/visibility.h" + class XMLNode; namespace Gtkmm2ext { -class TearOff : public Gtk::HBox +class LIBGTKMM2EXT_API TearOff : public Gtk::HBox { public: TearOff (Gtk::Widget& contents, bool allow_resize = false); diff --git a/libs/gtkmm2ext/gtkmm2ext/textviewer.h b/libs/gtkmm2ext/gtkmm2ext/textviewer.h index 004e2d99db..c2ab1fffd5 100644 --- a/libs/gtkmm2ext/gtkmm2ext/textviewer.h +++ b/libs/gtkmm2ext/gtkmm2ext/textviewer.h @@ -22,11 +22,13 @@ #include <string> #include <gtkmm.h> -#include <pbd/transmitter.h> +#include "pbd/transmitter.h" + +#include "gtkmm2ext/visibility.h" namespace Gtkmm2ext { -class TextViewer : public Gtk::Window, public Transmitter +class LIBGTKMM2EXT_API TextViewer : public Gtk::Window, public Transmitter { Gtk::TextView etext; Gtk::VBox vbox1; diff --git a/libs/gtkmm2ext/gtkmm2ext/treeutils.h b/libs/gtkmm2ext/gtkmm2ext/treeutils.h index 4632fb0278..a094d1f082 100644 --- a/libs/gtkmm2ext/gtkmm2ext/treeutils.h +++ b/libs/gtkmm2ext/gtkmm2ext/treeutils.h @@ -26,12 +26,14 @@ #include <gtkmm/treepath.h> #include <gtkmm/treeiter.h> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { - void treeview_select_one (Glib::RefPtr<Gtk::TreeSelection> selection, Glib::RefPtr<Gtk::TreeModel> model, Gtk::TreeView& view, - Gtk::TreeIter iter, Gtk::TreePath path, Gtk::TreeViewColumn* col); - void treeview_select_previous (Gtk::TreeView& view, Glib::RefPtr<Gtk::TreeModel> model, Gtk::TreeViewColumn* col); - void treeview_select_next (Gtk::TreeView& view, Glib::RefPtr<Gtk::TreeModel> model, Gtk::TreeViewColumn* col); + LIBGTKMM2EXT_API void treeview_select_one (Glib::RefPtr<Gtk::TreeSelection> selection, Glib::RefPtr<Gtk::TreeModel> model, Gtk::TreeView& view, + Gtk::TreeIter iter, Gtk::TreePath path, Gtk::TreeViewColumn* col); + LIBGTKMM2EXT_API void treeview_select_previous (Gtk::TreeView& view, Glib::RefPtr<Gtk::TreeModel> model, Gtk::TreeViewColumn* col); + LIBGTKMM2EXT_API void treeview_select_next (Gtk::TreeView& view, Glib::RefPtr<Gtk::TreeModel> model, Gtk::TreeViewColumn* col); } #endif /* __libgtkmm2ext_treeutils_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/utils.h b/libs/gtkmm2ext/gtkmm2ext/utils.h index e7c36d19e0..7d161e2518 100644 --- a/libs/gtkmm2ext/gtkmm2ext/utils.h +++ b/libs/gtkmm2ext/gtkmm2ext/utils.h @@ -32,6 +32,8 @@ #include <gdkmm/window.h> /* for WMDecoration */ #include <gdkmm/pixbuf.h> +#include "gtkmm2ext/visibility.h" + namespace Cairo { class Context; } @@ -45,79 +47,79 @@ namespace Gtk { } namespace Gtkmm2ext { - void init (const char*); - - std::string fit_to_pixels (const std::string&, int pixel_width, Pango::FontDescription& font, int& actual_width, bool with_ellipses = false); - std::pair<std::string, double> fit_to_pixels (cairo_t *, std::string, double); - int pixel_width (const std::string& str, Pango::FontDescription& font); - - void get_ink_pixel_size (Glib::RefPtr<Pango::Layout>, - int& width, int& height); - - void set_size_request_to_display_given_text (Gtk::Widget &w, - const gchar *text, - gint hpadding, - gint vpadding); - - void set_size_request_to_display_given_text (Gtk::Widget &w, - const std::vector<std::string>&, - gint hpadding, - gint vpadding); + LIBGTKMM2EXT_API void init (const char*); - Glib::RefPtr<Gdk::Pixbuf> pixbuf_from_string (const std::string& name, - const Pango::FontDescription& font, - int clip_width, - int clip_height, - Gdk::Color fg); + LIBGTKMM2EXT_API std::string fit_to_pixels (const std::string&, int pixel_width, Pango::FontDescription& font, int& actual_width, bool with_ellipses = false); + LIBGTKMM2EXT_API std::pair<std::string, double> fit_to_pixels (cairo_t *, std::string, double); + LIBGTKMM2EXT_API int pixel_width (const std::string& str, Pango::FontDescription& font); - void set_popdown_strings (Gtk::ComboBoxText&, + LIBGTKMM2EXT_API void get_ink_pixel_size (Glib::RefPtr<Pango::Layout>, + int& width, int& height); + + LIBGTKMM2EXT_API void set_size_request_to_display_given_text (Gtk::Widget &w, + const gchar *text, + gint hpadding, + gint vpadding); + + LIBGTKMM2EXT_API void set_size_request_to_display_given_text (Gtk::Widget &w, + const std::vector<std::string>&, + gint hpadding, + gint vpadding); + + LIBGTKMM2EXT_API Glib::RefPtr<Gdk::Pixbuf> pixbuf_from_string (const std::string& name, + const Pango::FontDescription& font, + int clip_width, + int clip_height, + Gdk::Color fg); + + LIBGTKMM2EXT_API void set_popdown_strings (Gtk::ComboBoxText&, const std::vector<std::string>&); - - template<class T> void deferred_delete (void *ptr) { + + template<class T> LIBGTKMM2EXT_API void deferred_delete (void *ptr) { delete static_cast<T *> (ptr); } - GdkWindow* get_paned_handle (Gtk::Paned& paned); - void set_decoration (Gtk::Window* win, Gdk::WMDecoration decor); - void set_treeview_header_as_default_label(Gtk::TreeViewColumn *c); - Glib::RefPtr<Gdk::Drawable> get_bogus_drawable(); - void detach_menu (Gtk::Menu&); + LIBGTKMM2EXT_API GdkWindow* get_paned_handle (Gtk::Paned& paned); + LIBGTKMM2EXT_API void set_decoration (Gtk::Window* win, Gdk::WMDecoration decor); + LIBGTKMM2EXT_API void set_treeview_header_as_default_label(Gtk::TreeViewColumn *c); + LIBGTKMM2EXT_API Glib::RefPtr<Gdk::Drawable> get_bogus_drawable(); + LIBGTKMM2EXT_API void detach_menu (Gtk::Menu&); - Glib::RefPtr<Gdk::Window> window_to_draw_on (Gtk::Widget& w, Gtk::Widget** parent); + LIBGTKMM2EXT_API Glib::RefPtr<Gdk::Window> window_to_draw_on (Gtk::Widget& w, Gtk::Widget** parent); - bool possibly_translate_keyval_to_make_legal_accelerator (uint32_t& keyval); - uint32_t possibly_translate_legal_accelerator_to_real_key (uint32_t keyval); + LIBGTKMM2EXT_API bool possibly_translate_keyval_to_make_legal_accelerator (uint32_t& keyval); + LIBGTKMM2EXT_API uint32_t possibly_translate_legal_accelerator_to_real_key (uint32_t keyval); - int physical_screen_height (Glib::RefPtr<Gdk::Window>); - int physical_screen_width (Glib::RefPtr<Gdk::Window>); + LIBGTKMM2EXT_API int physical_screen_height (Glib::RefPtr<Gdk::Window>); + LIBGTKMM2EXT_API int physical_screen_width (Glib::RefPtr<Gdk::Window>); - void container_clear (Gtk::Container&); + LIBGTKMM2EXT_API void container_clear (Gtk::Container&); /* C++ API for rounded rectangles */ - void rounded_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); - void rounded_top_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); - void rounded_top_left_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); - void rounded_top_right_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); - void rounded_top_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10); - void rounded_bottom_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10); - void rounded_right_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_left_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_right_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_bottom_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_right_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10); /* C API for rounded rectangles */ - void rounded_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - void rounded_top_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - void rounded_top_left_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - void rounded_top_right_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - void rounded_top_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - void rounded_bottom_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - void rounded_right_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_left_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_right_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_top_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_bottom_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); + LIBGTKMM2EXT_API void rounded_right_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10); - Gtk::Label* left_aligned_label (std::string const &); + LIBGTKMM2EXT_API Gtk::Label* left_aligned_label (std::string const &); - void set_no_tooltip_whatsoever (Gtk::Widget &); - void enable_tooltips (); - void disable_tooltips (); + LIBGTKMM2EXT_API void set_no_tooltip_whatsoever (Gtk::Widget &); + LIBGTKMM2EXT_API void enable_tooltips (); + LIBGTKMM2EXT_API void disable_tooltips (); void convert_bgra_to_rgba (guint8 const *, guint8 * dst, int, int); }; diff --git a/libs/gtkmm2ext/gtkmm2ext/visibility.h b/libs/gtkmm2ext/gtkmm2ext/visibility.h new file mode 100644 index 0000000000..ce2d3e6e42 --- /dev/null +++ b/libs/gtkmm2ext/gtkmm2ext/visibility.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2013 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __libgtkmm2ext_visibility_h__ +#define __libgtkmm2ext_visibility_h__ + +/* _WIN32 is defined by most compilers targetting Windows, but within the + * gtkmm2ext source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending + * on how a Windows build is built. + */ + +#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) + #define LIBGTKMM2EXT_DLL_IMPORT __declspec(dllimport) + #define LIBGTKMM2EXT_DLL_EXPORT __declspec(dllexport) + #define LIBGTKMM2EXT_DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define LIBGTKMM2EXT_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBGTKMM2EXT_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBGTKMM2EXT_DLL_LOCAL __attribute__ ((visibility ("hidden"))) + #else + #define LIBGTKMM2EXT_DLL_IMPORT + #define LIBGTKMM2EXT_DLL_EXPORT + #define LIBGTKMM2EXT_DLL_LOCAL + #endif +#endif + +#ifdef LIBGTKMM2EXT_DLL // libgtkmm2ext is a DLL +#ifdef LIBGTKMM2EXT_DLL_EXPORTS // defined if we are building the libgtkmm2ext DLL (instead of using it) + #define LIBGTKMM2EXT_API LIBGTKMM2EXT_DLL_EXPORT +#else + #define LIBGTKMM2EXT_API LIBGTKMM2EXT_DLL_IMPORT +#endif +#define LIBGTKMM2EXT_LOCAL LIBGTKMM2EXT_DLL_LOCAL +#else /* static lib, not DLL */ +#define LIBGTKMM2EXT_API +#define LIBGTKMM2EXT_LOCAL +#endif + +#endif /* __libgtkmm2ext_visibility_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/visibility_tracker.h b/libs/gtkmm2ext/gtkmm2ext/visibility_tracker.h index 1256448efd..596600cc8a 100644 --- a/libs/gtkmm2ext/gtkmm2ext/visibility_tracker.h +++ b/libs/gtkmm2ext/gtkmm2ext/visibility_tracker.h @@ -22,13 +22,15 @@ #include <gdk/gdkevents.h> +#include "gtkmm2ext/visibility.h" + namespace GTK { class Window; } namespace Gtkmm2ext { -class VisibilityTracker : public virtual sigc::trackable { +class LIBGTKMM2EXT_API VisibilityTracker : public virtual sigc::trackable { public: VisibilityTracker (Gtk::Window&); virtual ~VisibilityTracker() {} diff --git a/libs/gtkmm2ext/gtkmm2ext/widget_state.h b/libs/gtkmm2ext/gtkmm2ext/widget_state.h index 6067b0f2ce..2e405c453f 100644 --- a/libs/gtkmm2ext/gtkmm2ext/widget_state.h +++ b/libs/gtkmm2ext/gtkmm2ext/widget_state.h @@ -1,19 +1,21 @@ #ifndef __gtkmm2ext_widget_state_h__ #define __gtkmm2ext_widget_state_h__ +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { /* widget states: unlike GTK, visual states like "Selected" or "Prelight" are orthogonal to active states. */ - enum ActiveState { + enum LIBGTKMM2EXT_API ActiveState { Off, ExplicitActive, ImplicitActive, }; - enum VisualState { + enum LIBGTKMM2EXT_API VisualState { /* these can be OR-ed together */ NoVisualState = 0x0, Selected = 0x1, diff --git a/libs/gtkmm2ext/gtkmm2ext/window_title.h b/libs/gtkmm2ext/gtkmm2ext/window_title.h index 62a131c096..819839a7df 100644 --- a/libs/gtkmm2ext/gtkmm2ext/window_title.h +++ b/libs/gtkmm2ext/gtkmm2ext/window_title.h @@ -22,6 +22,8 @@ #include <string> +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { /** @@ -31,7 +33,7 @@ namespace Gtkmm2ext { * Each string element that is added to the window title will * be separated by a hyphen. */ -class WindowTitle +class LIBGTKMM2EXT_API WindowTitle { public: diff --git a/libs/gtkmm2ext/wscript b/libs/gtkmm2ext/wscript index 494ec8b225..955b133d33 100644 --- a/libs/gtkmm2ext/wscript +++ b/libs/gtkmm2ext/wscript @@ -77,7 +77,7 @@ def options(opt): def configure(conf): conf.load('compiler_cxx') autowaf.build_version_files(path_prefix+'gtkmm2ext/version.h', path_prefix+'version.cc', - 'libgtkmm2ext', MAJOR, MINOR, MICRO) + 'libgtkmm2ext', MAJOR, MINOR, MICRO, 'LIBGTKMM2EXT_API', 'gtkmm2ext/visibility.h') autowaf.configure(conf) autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', atleast_version='2.8') autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK', atleast_version='2.12.1') @@ -86,9 +86,16 @@ def configure(conf): def build(bld): if bld.is_defined ('INTERNAL_SHARED_LIBS'): obj = bld.shlib(features = 'c cxx cshlib cxxshlib', source=gtkmm2ext_sources) + # defines for this library + obj.defines = [ 'LIBGTKMM2EXT_DLL=1', 'LIBGTKMM2EXT_DLL_EXPORTS=1' ] + # internal shared libs that we use + obj.defines += [ 'LIBPBD_DLL=1' ] + obj.cxxflags = [ '-fvisibility=hidden' ] + obj.cflags = [ '-fvisibility=hidden' ] else: obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=gtkmm2ext_sources) obj.cxxflags = [ '-fPIC' ] + obj.defines = [ ] obj.export_includes = ['.'] obj.includes = ['.'] @@ -98,7 +105,7 @@ def build(bld): obj.use = [ 'libpbd' ] obj.vnum = GTKMM2EXT_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') - obj.defines = [ + obj.defines += [ 'PACKAGE="' + I18N_PACKAGE + '"', 'LOCALEDIR="' + os.path.join( os.path.normpath(bld.env['DATADIR']), 'locale') + '"'] diff --git a/libs/midi++2/midi++/channel.h b/libs/midi++2/midi++/channel.h index d00ce700c5..02c16e6729 100644 --- a/libs/midi++2/midi++/channel.h +++ b/libs/midi++2/midi++/channel.h @@ -23,8 +23,6 @@ #include <queue> #include "pbd/signals.h" - -#include "midi++/types.h" #include "midi++/parser.h" namespace MIDI { @@ -36,7 +34,7 @@ class Port; * This remembers various useful information about the current 'state' of a * MIDI channel (eg current pitch bend value). */ -class Channel : public PBD::ScopedConnectionList { +class LIBMIDIPP_API Channel : public PBD::ScopedConnectionList { public: Channel (byte channel_number, Port &); diff --git a/libs/midi++2/midi++/event.h b/libs/midi++2/midi++/event.h index 70744536a8..6620010071 100644 --- a/libs/midi++2/midi++/event.h +++ b/libs/midi++2/midi++/event.h @@ -26,6 +26,7 @@ #include <sstream> #include <assert.h> +#include "midi++/libmidi_visibility.h" #include "midi++/types.h" #include "midi++/events.h" #include "pbd/xml++.h" diff --git a/libs/midi++2/midi++/ipmidi_port.h b/libs/midi++2/midi++/ipmidi_port.h index a4adb14cf4..3f5f1c023b 100644 --- a/libs/midi++2/midi++/ipmidi_port.h +++ b/libs/midi++2/midi++/ipmidi_port.h @@ -48,13 +48,14 @@ #include "pbd/signals.h" #include "pbd/ringbuffer.h" +#include "midi++/libmidi_visibility.h" #include "midi++/types.h" #include "midi++/parser.h" #include "midi++/port.h" namespace MIDI { -class IPMIDIPort : public Port { +class LIBMIDIPP_API IPMIDIPort : public Port { public: IPMIDIPort (int base_port = lowest_ipmidi_port_default, const std::string& ifname = std::string()); IPMIDIPort (const XMLNode&); diff --git a/libs/midi++2/midi++/libmidi_visibility.h b/libs/midi++2/midi++/libmidi_visibility.h new file mode 100644 index 0000000000..62eebfe8e2 --- /dev/null +++ b/libs/midi++2/midi++/libmidi_visibility.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2013 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __libmidi_libmidi_visibility_h__ +#define __libmidi_libmidi_visibility_h__ + +/* _WIN32 is defined by most compilers targetting Windows, but within the + * midi source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending + * on how a Windows build is built. + */ + +#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) + #define LIBMIDIPP_DLL_IMPORT __declspec(dllimport) + #define LIBMIDIPP_DLL_EXPORT __declspec(dllexport) + #define LIBMIDIPP_DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define LIBMIDIPP_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBMIDIPP_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBMIDIPP_DLL_LOCAL __attribute__ ((visibility ("hidden"))) + #else + #define LIBMIDIPP_DLL_IMPORT + #define LIBMIDIPP_DLL_EXPORT + #define LIBMIDIPP_DLL_LOCAL + #endif +#endif + +#ifdef LIBMIDIPP_DLL // libmidi is a DLL +#ifdef LIBMIDIPP_DLL_EXPORTS // defined if we are building the libmidi DLL (instead of using it) + #define LIBMIDIPP_API LIBMIDIPP_DLL_EXPORT +#else + #define LIBMIDIPP_API LIBMIDIPP_DLL_IMPORT +#endif +#define LIBMIDIPP_LOCAL LIBMIDIPP_DLL_LOCAL +#else /* static lib, not DLL */ +#define LIBMIDIPP_API +#define LIBMIDIPP_LOCAL +#endif + +#endif /* __libmidi_libmidi_visibility_h__ */ diff --git a/libs/midi++2/midi++/midnam_patch.h b/libs/midi++2/midi++/midnam_patch.h index ddd62c2916..d67543429a 100644 --- a/libs/midi++2/midi++/midnam_patch.h +++ b/libs/midi++2/midi++/midnam_patch.h @@ -30,6 +30,7 @@ #include <stdint.h> +#include "midi++/libmidi_visibility.h" #include "midi++/event.h" #include "pbd/xml++.h" @@ -39,7 +40,7 @@ namespace MIDI namespace Name { -struct PatchPrimaryKey +struct LIBMIDIPP_API PatchPrimaryKey { public: int bank_number; @@ -81,7 +82,7 @@ public: class PatchBank; -class Patch +class LIBMIDIPP_API Patch { public: @@ -112,7 +113,7 @@ private: typedef std::list<boost::shared_ptr<Patch> > PatchNameList; -class PatchBank +class LIBMIDIPP_API PatchBank { public: PatchBank (uint16_t n = 0, std::string a_name = std::string()) : _name(a_name), _number (n) {}; @@ -138,7 +139,7 @@ private: std::string _patch_list_name; }; -class ChannelNameSet +class LIBMIDIPP_API ChannelNameSet { public: typedef std::set<uint8_t> AvailableForChannels; @@ -221,7 +222,7 @@ private: std::ostream& operator<< (std::ostream&, const ChannelNameSet&); -class Note +class LIBMIDIPP_API Note { public: Note() {} @@ -241,7 +242,7 @@ private: std::string _name; }; -class NoteNameList +class LIBMIDIPP_API NoteNameList { public: typedef std::vector< boost::shared_ptr<Note> > Notes; @@ -262,7 +263,7 @@ private: Notes _notes; }; -class Control +class LIBMIDIPP_API Control { public: Control() {} @@ -291,7 +292,7 @@ private: std::string _name; }; -class ControlNameList +class LIBMIDIPP_API ControlNameList { public: typedef std::map<uint16_t, boost::shared_ptr<Control> > Controls; @@ -315,7 +316,7 @@ private: Controls _controls; }; -class CustomDeviceMode +class LIBMIDIPP_API CustomDeviceMode { public: CustomDeviceMode() {}; @@ -341,7 +342,7 @@ private: std::string _channel_name_set_assignments[16]; }; -class MasterDeviceNames +class LIBMIDIPP_API MasterDeviceNames { public: typedef std::set<std::string> Models; @@ -395,7 +396,7 @@ private: ControlNameLists _control_name_lists; }; -class MIDINameDocument +class LIBMIDIPP_API MIDINameDocument { public: // Maps Model names to MasterDeviceNames @@ -424,7 +425,7 @@ private: MasterDeviceNames::Models _all_models; }; -extern const char* general_midi_program_names[128]; /* 0 .. 127 */ +LIBMIDIPP_API extern const char* general_midi_program_names[128]; /* 0 .. 127 */ } diff --git a/libs/midi++2/midi++/mmc.h b/libs/midi++2/midi++/mmc.h index 01f8bf3b8a..2f34b9c793 100644 --- a/libs/midi++2/midi++/mmc.h +++ b/libs/midi++2/midi++/mmc.h @@ -26,6 +26,7 @@ #include "pbd/signals.h" #include "pbd/ringbuffer.h" +#include "midi++/libmidi_visibility.h" #include "midi++/types.h" #include "midi++/parser.h" @@ -40,7 +41,7 @@ class Parser; class MachineControlCommand; /** Class to handle incoming and outgoing MIDI machine control messages */ -class MachineControl +class LIBMIDIPP_API MachineControl { public: typedef PBD::Signal1<void,MachineControl&> MMCSignal; @@ -287,7 +288,7 @@ class MachineControl * In an ideal world we might use a class hierarchy for this, but objects of this type * have to be allocated off the stack for RT safety. */ -class MachineControlCommand +class LIBMIDIPP_API MachineControlCommand { public: MachineControlCommand () : _command (MachineControl::Command (0)) {} diff --git a/libs/midi++2/midi++/parser.h b/libs/midi++2/midi++/parser.h index 44897f9d8e..e4126b210b 100644 --- a/libs/midi++2/midi++/parser.h +++ b/libs/midi++2/midi++/parser.h @@ -25,6 +25,7 @@ #include "pbd/signals.h" +#include "midi++/libmidi_visibility.h" #include "midi++/types.h" namespace MIDI { @@ -39,7 +40,7 @@ typedef PBD::Signal2<void,Parser &, EventTwoBytes *> TwoByteSignal; typedef PBD::Signal2<void,Parser &, pitchbend_t> PitchBendSignal; typedef PBD::Signal3<void,Parser &, byte *, size_t> Signal; -class Parser { +class LIBMIDIPP_API Parser { public: Parser (); ~Parser (); diff --git a/libs/midi++2/midi++/port.h b/libs/midi++2/midi++/port.h index a915320fa3..9515bdb5a4 100644 --- a/libs/midi++2/midi++/port.h +++ b/libs/midi++2/midi++/port.h @@ -33,6 +33,7 @@ #include "pbd/signals.h" #include "pbd/ringbuffer.h" +#include "midi++/libmidi_visibility.h" #include "midi++/types.h" #include "midi++/parser.h" @@ -41,7 +42,7 @@ namespace MIDI { class Channel; class PortRequest; -class Port { +class LIBMIDIPP_API Port { public: enum Flags { IsInput = JackPortIsInput, @@ -140,7 +141,7 @@ class Port { void init (std::string const &, Flags); }; -struct PortSet { +struct LIBMIDIPP_API PortSet { PortSet (std::string str) : owner (str) { } std::string owner; diff --git a/libs/midi++2/midi++/types.h b/libs/midi++2/midi++/types.h index 185e1e6f3f..a731855daa 100644 --- a/libs/midi++2/midi++/types.h +++ b/libs/midi++2/midi++/types.h @@ -23,6 +23,8 @@ #include <jack/jack.h> #include <inttypes.h> +#include "midi++/libmidi_visibility.h" + namespace MIDI { typedef char channel_t; @@ -60,10 +62,10 @@ namespace MIDI { reset = 0xFF }; - extern const char *controller_names[]; + LIBMIDIPP_API extern const char *controller_names[]; byte decode_controller_name (const char *name); - struct EventTwoBytes { + struct LIBMIDIPP_API EventTwoBytes { union { byte note_number; byte controller_number; @@ -74,14 +76,14 @@ namespace MIDI { }; }; - enum MTC_FPS { + enum LIBMIDIPP_API MTC_FPS { MTC_24_FPS = 0, MTC_25_FPS = 1, MTC_30_FPS_DROP = 2, MTC_30_FPS = 3 }; - enum MTC_Status { + enum LIBMIDIPP_API MTC_Status { MTC_Stopped = 0, MTC_Forward, MTC_Backward diff --git a/libs/midi++2/wscript b/libs/midi++2/wscript index 0abbab7d40..e27c4876ee 100644 --- a/libs/midi++2/wscript +++ b/libs/midi++2/wscript @@ -47,7 +47,7 @@ def options(opt): def configure(conf): conf.load('compiler_cxx') autowaf.build_version_files(path_prefix+'midi++/version.h', path_prefix+'version.cc', - 'midipp', MAJOR, MINOR, MICRO) + 'midipp', MAJOR, MINOR, MICRO, 'LIBMIDIPP_API', 'midi++/libmidi_visibility.h') autowaf.configure(conf) autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False) autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.118.2') @@ -62,9 +62,15 @@ def build(bld): # Library if bld.is_defined ('INTERNAL_SHARED_LIBS'): obj = bld.shlib(features = 'cxx cxxshlib', source=libmidi_sources) + obj.defines = [ 'LIBMIDIPP_DLL=1', 'LIBMIDIPP_DLL_EXPORTS=1' ] + obj.defines += [ 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] + obj.cxxflags = [ '-fvisibility=hidden' ] + obj.cflags = [ '-fvisibility=hidden' ] else: obj = bld.stlib(features = 'cxx cxxstlib', source=libmidi_sources) - obj.cxxflags = [ '-fPIC', '-DWITH_JACK_MIDI' ] + obj.cxxflags = [ '-fPIC', '-DWITH_JACK_MIDI' ] + obj.defines = [] + # everybody loves JACK obj.export_includes = ['.'] obj.includes = ['.', '../surfaces/control_protocol', '../ardour' ] diff --git a/libs/panners/1in2out/wscript b/libs/panners/1in2out/wscript index 31ff7e7fd1..86d1693d91 100644 --- a/libs/panners/1in2out/wscript +++ b/libs/panners/1in2out/wscript @@ -22,7 +22,9 @@ def build(bld): obj = bld(features = 'cxx cxxshlib') obj.source = [ 'panner_1in2out.cc' ] obj.export_includes = ['.'] - obj.cxxflags = '-DPACKAGE="libardour_pan1in2out"' + obj.defines = [ 'PACKAGE="libardour_pan1in2out"' ] + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] obj.defines = [ 'ARDOURPANNER_DLL_EXPORTS' ] obj.includes = ['.'] obj.name = 'libardour_pan1in2out' diff --git a/libs/panners/2in2out/wscript b/libs/panners/2in2out/wscript index 2aeca322d0..bd955e79fb 100644 --- a/libs/panners/2in2out/wscript +++ b/libs/panners/2in2out/wscript @@ -22,7 +22,9 @@ def build(bld): obj = bld(features = 'cxx cxxshlib') obj.source = [ 'panner_2in2out.cc' ] obj.export_includes = ['.'] - obj.cxxflags = '-DPACKAGE="libardour_pan2in2out"' + obj.defines = [ 'PACKAGE="libardour_pan2in2out"' ] + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] obj.defines = [ 'ARDOURPANNER_DLL_EXPORTS' ] obj.includes = ['.'] obj.name = 'libardour_pan2in2out' diff --git a/libs/panners/vbap/wscript b/libs/panners/vbap/wscript index 9258277810..1f8208317d 100644 --- a/libs/panners/vbap/wscript +++ b/libs/panners/vbap/wscript @@ -22,7 +22,9 @@ def build(bld): obj = bld(features = 'cxx cxxshlib') obj.source = [ 'vbap_speakers.cc', 'vbap.cc' ] obj.export_includes = ['.'] - obj.cxxflags = '-DPACKAGE="libardour_panvbap"' + obj.defines = [ 'PACKAGE="libardour_panvbap"' ] + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL_=1', 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] obj.defines = [ 'ARDOURPANNER_DLL_EXPORTS' ] obj.includes = ['.'] obj.name = 'libardour_panvbap' diff --git a/libs/pbd/boost_debug.cc b/libs/pbd/boost_debug.cc index 1267e7d168..6b9c0cbc92 100644 --- a/libs/pbd/boost_debug.cc +++ b/libs/pbd/boost_debug.cc @@ -33,6 +33,7 @@ #include <boost/shared_ptr.hpp> #include "pbd/stacktrace.h" +#include "pbd/boost_debug.h" class Backtrace { public: diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h index 905074c474..7e13425bf5 100644 --- a/libs/pbd/pbd/abstract_ui.h +++ b/libs/pbd/pbd/abstract_ui.h @@ -26,15 +26,33 @@ #include <glibmm/threads.h> +#include "pbd/libpbd_visibility.h" #include "pbd/receiver.h" #include "pbd/ringbufferNPT.h" #include "pbd/signals.h" #include "pbd/base_ui.h" +/* We have a special case in libpbd of a template class that gets instantiated + * as the base class of several classes in other libraries. It is not possible + * to use LIBFOO_API to mark this visible, because the FOO in each case is + * different. So we define this generic visible/export/hidden/import pair + * of macros to try to deal with this special case. These should NEVER be + * used anywhere except AbstractUI<T> (or similar cases if they arise. + * + * Note the assumption here that other libs are being built as DLLs if this one is. + */ + +#ifdef ABSTRACT_UI_EXPORTS +#define ABSTRACT_UI_API LIBPBD_DLL_EXPORT +#else +#define ABSTRACT_UI_API LIBPBD_DLL_IMPORT +#endif + + class Touchable; template<typename RequestObject> -class AbstractUI : public BaseUI +class ABSTRACT_UI_API AbstractUI : public BaseUI /* see notes in visibility.h about why this is not LIBPBD_API */ { public: AbstractUI (const std::string& name); diff --git a/libs/pbd/pbd/base_ui.h b/libs/pbd/pbd/base_ui.h index d947a06b34..ea1afbbb5a 100644 --- a/libs/pbd/pbd/base_ui.h +++ b/libs/pbd/pbd/base_ui.h @@ -29,6 +29,7 @@ #include <glibmm/threads.h> #include <glibmm/main.h> +#include "pbd/libpbd_visibility.h" #include "pbd/crossthread.h" #include "pbd/event_loop.h" @@ -41,7 +42,7 @@ */ -class BaseUI : public sigc::trackable, public PBD::EventLoop +class LIBPBD_API BaseUI : public sigc::trackable, public PBD::EventLoop { public: BaseUI (const std::string& name); diff --git a/libs/pbd/pbd/basename.h b/libs/pbd/pbd/basename.h index 43da3b39f6..16e7905748 100644 --- a/libs/pbd/pbd/basename.h +++ b/libs/pbd/pbd/basename.h @@ -22,8 +22,10 @@ #include <glibmm/ustring.h> +#include "pbd/libpbd_visibility.h" + namespace PBD { - Glib::ustring basename_nosuffix (Glib::ustring); + LIBPBD_API Glib::ustring basename_nosuffix (Glib::ustring); } #endif /* __libpbd_basename_h__ */ diff --git a/libs/pbd/pbd/boost_debug.h b/libs/pbd/pbd/boost_debug.h index 6a0e4970fd..294a3468f6 100644 --- a/libs/pbd/pbd/boost_debug.h +++ b/libs/pbd/pbd/boost_debug.h @@ -23,8 +23,10 @@ #include <ostream> -void boost_debug_shared_ptr_mark_interesting (void* ptr, const char* type); -void boost_debug_list_ptrs (); -void boost_debug_shared_ptr_show_live_debugging (bool yn); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API void boost_debug_shared_ptr_mark_interesting (void* ptr, const char* type); +LIBPBD_API void boost_debug_list_ptrs (); +LIBPBD_API void boost_debug_shared_ptr_show_live_debugging (bool yn); #endif /* __pbd_boost_debug_h__ */ diff --git a/libs/pbd/pbd/cartesian.h b/libs/pbd/pbd/cartesian.h index ffc91c2fd6..20c8b27088 100644 --- a/libs/pbd/pbd/cartesian.h +++ b/libs/pbd/pbd/cartesian.h @@ -22,14 +22,16 @@ #include <cfloat> #include <cmath> +#include "pbd/libpbd_visibility.h" + namespace PBD { -void spherical_to_cartesian (double azi, double ele, double len, double& x, double& y, double& z); -void cartesian_to_spherical (double x, double y, double z, double& azi, double& ele, double& len); +LIBPBD_API void spherical_to_cartesian (double azi, double ele, double len, double& x, double& y, double& z); +LIBPBD_API void cartesian_to_spherical (double x, double y, double z, double& azi, double& ele, double& len); struct AngularVector; -struct CartesianVector { +struct LIBPBD_API CartesianVector { double x; double y; double z; @@ -51,10 +53,10 @@ struct CartesianVector { return other; } - void angular (AngularVector&) const; + inline void angular (AngularVector& a) const; }; -struct AngularVector { +struct LIBPBD_API AngularVector { double azi; double ele; double length; @@ -95,7 +97,7 @@ struct AngularVector { } }; -inline void CartesianVector::angular (AngularVector& a) const { +LIBPBD_API inline void CartesianVector::angular (AngularVector& a) const { cartesian_to_spherical (x, y, z, a.azi, a.ele, a.length); } diff --git a/libs/pbd/pbd/clear_dir.h b/libs/pbd/pbd/clear_dir.h index 9c128d994d..c0fb49d41d 100644 --- a/libs/pbd/pbd/clear_dir.h +++ b/libs/pbd/pbd/clear_dir.h @@ -24,8 +24,10 @@ #include <vector> #include <sys/types.h> +#include "pbd/libpbd_visibility.h" + namespace PBD { - int clear_directory (const std::string&, size_t* = 0, std::vector<std::string>* = 0); + LIBPBD_API int clear_directory (const std::string&, size_t* = 0, std::vector<std::string>* = 0); } #endif /* __pbd_clear_dir_h__ */ diff --git a/libs/pbd/pbd/command.h b/libs/pbd/pbd/command.h index db4d2bbd81..4547b779fb 100644 --- a/libs/pbd/pbd/command.h +++ b/libs/pbd/pbd/command.h @@ -24,10 +24,11 @@ #include <string> +#include "pbd/libpbd_visibility.h" #include "pbd/signals.h" #include "pbd/statefuldestructible.h" -class Command : public PBD::StatefulDestructible, public PBD::ScopedConnectionList +class LIBPBD_API Command : public PBD::StatefulDestructible, public PBD::ScopedConnectionList { public: virtual ~Command() { /* NOTE: derived classes must call drop_references() */ } diff --git a/libs/pbd/pbd/compose.h b/libs/pbd/pbd/compose.h index 0df9519aaf..a80cb213b2 100644 --- a/libs/pbd/pbd/compose.h +++ b/libs/pbd/pbd/compose.h @@ -38,11 +38,13 @@ #include <list> #include <map> // for multimap +#include "pbd/libpbd_visibility.h" + namespace StringPrivate { // the actual composition class - using string::compose is cleaner, so we // hide it here - class Composition + class LIBPBD_API Composition { public: // initialize and prepare format string on the form "text %1 text %2 etc." @@ -202,7 +204,7 @@ namespace StringPrivate // a series of functions which accept a format string on the form "text %1 // more %2 less %3" and a number of templated parameters and spits out the // composited string - template <typename T1> + template <typename T1> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1) { StringPrivate::Composition c(fmt); @@ -210,7 +212,7 @@ namespace StringPrivate return c.str(); } - template <typename T1, typename T2> + template <typename T1, typename T2> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2) { @@ -219,7 +221,7 @@ namespace StringPrivate return c.str(); } - template <typename T1, typename T2, typename T3> + template <typename T1, typename T2, typename T3> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3) { @@ -228,7 +230,7 @@ namespace StringPrivate return c.str(); } - template <typename T1, typename T2, typename T3, typename T4> + template <typename T1, typename T2, typename T3, typename T4> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4) @@ -238,7 +240,7 @@ namespace StringPrivate return c.str(); } - template <typename T1, typename T2, typename T3, typename T4, typename T5> + template <typename T1, typename T2, typename T3, typename T4, typename T5> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5) @@ -249,7 +251,7 @@ namespace StringPrivate } template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6> + typename T6> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6) @@ -260,7 +262,7 @@ namespace StringPrivate } template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7> + typename T6, typename T7> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -272,7 +274,7 @@ namespace StringPrivate } template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8> + typename T6, typename T7, typename T8> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -284,7 +286,7 @@ namespace StringPrivate } template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9> + typename T6, typename T7, typename T8, typename T9> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -296,7 +298,7 @@ namespace StringPrivate } template <typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9, typename T10> + typename T6, typename T7, typename T8, typename T9, typename T10> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -311,7 +313,7 @@ namespace StringPrivate template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, - typename T11> + typename T11> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -326,7 +328,7 @@ namespace StringPrivate template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, - typename T11, typename T12> + typename T11, typename T12> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -341,7 +343,7 @@ namespace StringPrivate template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, - typename T11, typename T12, typename T13> + typename T11, typename T12, typename T13> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -357,7 +359,7 @@ namespace StringPrivate template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, - typename T11, typename T12, typename T13, typename T14> + typename T11, typename T12, typename T13, typename T14> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -374,7 +376,7 @@ namespace StringPrivate template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, - typename T15> + typename T15> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, diff --git a/libs/pbd/pbd/controllable.h b/libs/pbd/pbd/controllable.h index d9cd21d28d..eb4b7ff142 100644 --- a/libs/pbd/pbd/controllable.h +++ b/libs/pbd/pbd/controllable.h @@ -24,6 +24,7 @@ #include <set> #include <map> +#include "pbd/libpbd_visibility.h" #include "pbd/signals.h" #include <glibmm/threads.h> @@ -33,7 +34,7 @@ class XMLNode; namespace PBD { -class Controllable : public PBD::StatefulDestructible { +class LIBPBD_API Controllable : public PBD::StatefulDestructible { public: enum Flag { Toggle = 0x1, @@ -113,7 +114,7 @@ class Controllable : public PBD::StatefulDestructible { a Controllable */ -class IgnorableControllable : public Controllable +class LIBPBD_API IgnorableControllable : public Controllable { public: IgnorableControllable () : PBD::Controllable ("ignoreMe") {} diff --git a/libs/pbd/pbd/controllable_descriptor.h b/libs/pbd/pbd/controllable_descriptor.h index 6b0d733656..b234dbd293 100644 --- a/libs/pbd/pbd/controllable_descriptor.h +++ b/libs/pbd/pbd/controllable_descriptor.h @@ -23,9 +23,11 @@ #include <string> #include <stdint.h> +#include "pbd/libpbd_visibility.h" + namespace PBD { -class ControllableDescriptor { +class LIBPBD_API ControllableDescriptor { public: enum TopLevelType { RemoteControlID, diff --git a/libs/pbd/pbd/convert.h b/libs/pbd/pbd/convert.h index fec0248157..1269254906 100644 --- a/libs/pbd/pbd/convert.h +++ b/libs/pbd/pbd/convert.h @@ -27,25 +27,27 @@ #include <iostream> #include <glibmm/ustring.h> +#include "pbd/libpbd_visibility.h" + namespace PBD { -std::string short_version (std::string, std::string::size_type target_length); +LIBPBD_API std::string short_version (std::string, std::string::size_type target_length); -int atoi (const std::string&); -int32_t atol (const std::string&); -int64_t atoll (const std::string&); -double atof (const std::string&); -std::string url_decode (std::string const &); +LIBPBD_API int atoi (const std::string&); +LIBPBD_API int32_t atol (const std::string&); +LIBPBD_API int64_t atoll (const std::string&); +LIBPBD_API double atof (const std::string&); +LIBPBD_API std::string url_decode (std::string const &); -std::string capitalize (const std::string&); +LIBPBD_API std::string capitalize (const std::string&); // std::string length2string (const int32_t frames, const float sample_rate); -std::string length2string (const int64_t frames, const double sample_rate); +LIBPBD_API std::string length2string (const int64_t frames, const double sample_rate); -std::vector<std::string> internationalize (const char *, const char **); -bool strings_equal_ignore_case (const std::string& a, const std::string& b); +LIBPBD_API std::vector<std::string> internationalize (const char *, const char **); +LIBPBD_API bool strings_equal_ignore_case (const std::string& a, const std::string& b); -template <class T> std::string +template <class T> std::string LIBPBD_API to_string (T t, std::ios_base & (*f)(std::ios_base&)) { std::ostringstream oss; @@ -53,10 +55,9 @@ to_string (T t, std::ios_base & (*f)(std::ios_base&)) return oss.str(); } -bool string_is_affirmative (const std::string&); +LIBPBD_API bool string_is_affirmative (const std::string&); -const char * -sgettext (const char *, const char *); +LIBPBD_API const char* sgettext (const char *, const char *); } //namespace PBD diff --git a/libs/pbd/pbd/cpus.h b/libs/pbd/pbd/cpus.h index 1488f30068..c71567ddac 100644 --- a/libs/pbd/pbd/cpus.h +++ b/libs/pbd/pbd/cpus.h @@ -23,6 +23,8 @@ #include <stdint.h> -extern uint32_t hardware_concurrency (); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API extern uint32_t hardware_concurrency (); #endif /* __libpbd_cpus_h__ */ diff --git a/libs/pbd/pbd/crossthread.h b/libs/pbd/pbd/crossthread.h index 13ab37d38d..d172c9c60f 100644 --- a/libs/pbd/pbd/crossthread.h +++ b/libs/pbd/pbd/crossthread.h @@ -26,6 +26,8 @@ #include <glibmm/main.h> +#include "pbd/libpbd_visibility.h" + /** A simple abstraction of a mechanism of signalling one thread from another. * The signaller calls ::wakeup() to tell the signalled thread to check for * work to be done. @@ -35,7 +37,7 @@ * in Glib main loop based situations. */ -class CrossThreadChannel { +class LIBPBD_API CrossThreadChannel { public: /** if @a non_blocking is true, the channel will not cause blocking * when used in an event loop based on poll/select or the glib main diff --git a/libs/pbd/pbd/debug.h b/libs/pbd/pbd/debug.h index 704c9d0dad..54577f1a7e 100644 --- a/libs/pbd/pbd/debug.h +++ b/libs/pbd/pbd/debug.h @@ -24,25 +24,27 @@ #include <sstream> +#include "pbd/libpbd_visibility.h" + namespace PBD { - extern uint64_t debug_bits; - uint64_t new_debug_bit (const char* name); - void debug_print (const char* prefix, std::string str); - void set_debug_bits (uint64_t bits); - int parse_debug_options (const char* str); - void list_debug_options (); + LIBPBD_API extern uint64_t debug_bits; + LIBPBD_API uint64_t new_debug_bit (const char* name); + LIBPBD_API void debug_print (const char* prefix, std::string str); + LIBPBD_API void set_debug_bits (uint64_t bits); + LIBPBD_API int parse_debug_options (const char* str); + LIBPBD_API void list_debug_options (); namespace DEBUG { /* this namespace is so that we can write DEBUG::bit_name */ - extern uint64_t Stateful; - extern uint64_t Properties; - extern uint64_t FileManager; - extern uint64_t Pool; - extern uint64_t EventLoop; - extern uint64_t AbstractUI; + LIBPBD_API extern uint64_t Stateful; + LIBPBD_API extern uint64_t Properties; + LIBPBD_API extern uint64_t FileManager; + LIBPBD_API extern uint64_t Pool; + LIBPBD_API extern uint64_t EventLoop; + LIBPBD_API extern uint64_t AbstractUI; extern uint64_t FileUtils; } } diff --git a/libs/pbd/pbd/debug_rt_alloc.h b/libs/pbd/pbd/debug_rt_alloc.h index 2bbea90278..0d1b4bd47c 100644 --- a/libs/pbd/pbd/debug_rt_alloc.h +++ b/libs/pbd/pbd/debug_rt_alloc.h @@ -22,18 +22,20 @@ #ifndef __pbd_debug_rt_alloc_h__ #define __pbd_debug_rt_alloc_h__ +#include "pbd/libpbd_visibility.h" + extern "C" { /** Should be set to point to a function which returns non-0 if a malloc is * allowed in the current situation, or 0 if not. */ -extern int (*pbd_alloc_allowed) (); +LIBPBD_API extern int (*pbd_alloc_allowed) (); /** Call this to suspend malloc checking until a call to resume_rt_malloc_checks */ -extern void suspend_rt_malloc_checks (); +LIBPBD_API extern void suspend_rt_malloc_checks (); /** Resume malloc checking after a suspension */ -extern void resume_rt_malloc_checks (); +LIBPBD_API extern void resume_rt_malloc_checks (); } diff --git a/libs/pbd/pbd/demangle.h b/libs/pbd/pbd/demangle.h index aecd966f47..c9f5c194c0 100644 --- a/libs/pbd/pbd/demangle.h +++ b/libs/pbd/pbd/demangle.h @@ -28,9 +28,11 @@ #include <cxxabi.h> #endif +#include "pbd/libpbd_visibility.h" + namespace PBD { - template<typename T> + template<typename T> LIBPBD_API std::string demangled_name (T const & obj) { #ifdef __GNUC__ diff --git a/libs/pbd/pbd/destructible.h b/libs/pbd/pbd/destructible.h index 8881b45c55..78f6f83b7a 100644 --- a/libs/pbd/pbd/destructible.h +++ b/libs/pbd/pbd/destructible.h @@ -21,10 +21,11 @@ #define __pbd_destructible_h__ #include "pbd/signals.h" +#include "pbd/libpbd_visibility.h" namespace PBD { -class Destructible { +class LIBPBD_API Destructible { public: Destructible() {} virtual ~Destructible () { Destroyed(); } diff --git a/libs/pbd/pbd/enumwriter.h b/libs/pbd/pbd/enumwriter.h index 95f1ea9e9f..634767e7f2 100644 --- a/libs/pbd/pbd/enumwriter.h +++ b/libs/pbd/pbd/enumwriter.h @@ -27,9 +27,11 @@ #include <exception> #include <sstream> +#include "pbd/libpbd_visibility.h" + namespace PBD { -class unknown_enumeration : public std::exception { +class LIBPBD_API unknown_enumeration : public std::exception { public: unknown_enumeration (std::string const & e) throw() { std::stringstream s; @@ -47,7 +49,7 @@ private: std::string _message; }; -class EnumWriter { +class LIBPBD_API EnumWriter { public: static EnumWriter& instance(); static void destroy(); diff --git a/libs/pbd/pbd/epa.h b/libs/pbd/pbd/epa.h index 477d7f9678..6d305c5c4c 100644 --- a/libs/pbd/pbd/epa.h +++ b/libs/pbd/pbd/epa.h @@ -23,9 +23,11 @@ #include <map> #include <string> +#include "pbd/libpbd_visibility.h" + namespace PBD { -class EnvironmentalProtectionAgency { +class LIBPBD_API EnvironmentalProtectionAgency { public: EnvironmentalProtectionAgency (bool arm = true, const std::string& envname = std::string()); ~EnvironmentalProtectionAgency (); diff --git a/libs/pbd/pbd/error.h b/libs/pbd/pbd/error.h index 58842d68eb..eff88fbf10 100644 --- a/libs/pbd/pbd/error.h +++ b/libs/pbd/pbd/error.h @@ -19,13 +19,14 @@ #ifndef __libpbd_error_h__ #define __libpbd_error_h__ +#include "pbd/libpbd_visibility.h" #include "transmitter.h" namespace PBD { - extern Transmitter error; - extern Transmitter info; - extern Transmitter warning; - extern Transmitter fatal; + LIBPBD_API extern Transmitter error; + LIBPBD_API extern Transmitter info; + LIBPBD_API extern Transmitter warning; + LIBPBD_API extern Transmitter fatal; } #endif // __libpbd_error_h__ diff --git a/libs/pbd/pbd/event_loop.h b/libs/pbd/pbd/event_loop.h index b5ee9b8000..5baa5e04be 100644 --- a/libs/pbd/pbd/event_loop.h +++ b/libs/pbd/pbd/event_loop.h @@ -24,6 +24,8 @@ #include <boost/bind.hpp> /* we don't need this here, but anything calling call_slot() probably will, so this is convenient */ #include <glibmm/threads.h> +#include "pbd/libpbd_visibility.h" + namespace PBD { @@ -36,7 +38,7 @@ namespace PBD * when something like this is needed (it inherits from EventLoop). */ -class EventLoop +class LIBPBD_API EventLoop { public: EventLoop() {} diff --git a/libs/pbd/pbd/failed_constructor.h b/libs/pbd/pbd/failed_constructor.h index b13964e355..92c3f19c76 100644 --- a/libs/pbd/pbd/failed_constructor.h +++ b/libs/pbd/pbd/failed_constructor.h @@ -22,7 +22,9 @@ #include <exception> -class failed_constructor : public std::exception { +#include "pbd/libpbd_visibility.h" + +class LIBPBD_API failed_constructor : public std::exception { public: virtual const char *what() const throw() { return "failed constructor"; } }; diff --git a/libs/pbd/pbd/fastlog.h b/libs/pbd/pbd/fastlog.h index f64ad996cf..21cbfbdce2 100644 --- a/libs/pbd/pbd/fastlog.h +++ b/libs/pbd/pbd/fastlog.h @@ -10,6 +10,8 @@ as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. #include <math.h> /* for HUGE_VAL */ +#include "pbd/libpbd_visibility.h" + static inline float fast_log2 (float val) { /* don't use reinterpret_cast<> because that prevents this diff --git a/libs/pbd/pbd/file_manager.h b/libs/pbd/pbd/file_manager.h index 14552f9fef..d85c88fa46 100644 --- a/libs/pbd/pbd/file_manager.h +++ b/libs/pbd/pbd/file_manager.h @@ -25,11 +25,13 @@ #include <map> #include <list> #include <glibmm/threads.h> + +#include "pbd/libpbd_visibility.h" #include "pbd/signals.h" namespace PBD { -class FileManager; +class LIBPBD_API FileManager; /** Parent class for FileDescriptors. * @@ -45,7 +47,7 @@ class FileManager; * open files to stay within limits imposed by the operating system. */ -class FileDescriptor +class LIBPBD_API FileDescriptor { public: FileDescriptor (std::string const &, bool); @@ -86,7 +88,7 @@ private: /** FileDescriptor for a file to be opened using POSIX open */ -class FdFileDescriptor : public FileDescriptor +class LIBPBD_API FdFileDescriptor : public FileDescriptor { public: FdFileDescriptor (std::string const & file_name, bool writeable, mode_t mode); @@ -107,7 +109,7 @@ private: }; /** FileDescriptor for a file opened using stdio */ -class StdioFileDescriptor : public FileDescriptor +class LIBPBD_API StdioFileDescriptor : public FileDescriptor { public: StdioFileDescriptor (std::string const & file_name, std::string const & mode); @@ -129,7 +131,7 @@ private: /** Class to limit the number of files held open */ -class FileManager +class LIBPBD_API FileManager { public: FileManager (); diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h index 4b4bdf0735..01ff8606a7 100644 --- a/libs/pbd/pbd/file_utils.h +++ b/libs/pbd/pbd/file_utils.h @@ -25,6 +25,7 @@ #include <glibmm/pattern.h> +#include "pbd/libpbd_visibility.h" #include "pbd/search_path.h" namespace PBD { @@ -37,7 +38,7 @@ namespace PBD { * @param path An Absolute path to a directory * @param result A vector of filenames. */ -void +LIBPBD_API void get_files_in_directory (const std::string& path, std::vector<std::string>& result); @@ -49,7 +50,7 @@ get_files_in_directory (const std::string& path, * @param pattern A Glib::PatternSpec used to match the files. * @param result A vector in which to place the resulting matches. */ -void +LIBPBD_API void find_matching_files_in_directory (const std::string& directory, const Glib::PatternSpec& pattern, std::vector<std::string>& result); @@ -62,7 +63,7 @@ find_matching_files_in_directory (const std::string& directory, * @param pattern A Glib::PatternSpec used to match the files * @param result A vector in which to place the resulting matches. */ -void +LIBPBD_API void find_matching_files_in_directories (const std::vector<std::string>& directory_paths, const Glib::PatternSpec& pattern, std::vector<std::string>& result); @@ -75,7 +76,7 @@ find_matching_files_in_directories (const std::vector<std::string>& directory_pa * @param pattern A Glib::PatternSpec used to match the files * @param result A vector in which to place the resulting matches. */ -void +LIBPBD_API void find_matching_files_in_search_path (const Searchpath& search_path, const Glib::PatternSpec& pattern, std::vector<std::string>& result); @@ -86,7 +87,7 @@ find_matching_files_in_search_path (const Searchpath& search_path, * * @return true If file is found within the search path. */ -bool +LIBPBD_API bool find_file_in_search_path (const Searchpath& search_path, const std::string& filename, std::string& result); @@ -97,26 +98,26 @@ find_file_in_search_path (const Searchpath& search_path, * * @return true if file was successfully copied */ -bool copy_file(const std::string & from_path, const std::string & to_path); +LIBPBD_API bool copy_file(const std::string & from_path, const std::string & to_path); /** * Attempt to copy all regular files from from_path to a new directory. * This method does not recurse. */ -void copy_files(const std::string & from_path, const std::string & to_dir); +LIBPBD_API void copy_files(const std::string & from_path, const std::string & to_dir); /** * Take a (possibly) relative path and make it absolute * @return An absolute path */ -std::string get_absolute_path (const std::string &); +LIBPBD_API std::string get_absolute_path (const std::string &); /** * Find out if `needle' is a file or directory within the * directory `haystack'. * @return true if it is. */ -bool path_is_within (const std::string &, std::string); +LIBPBD_API bool path_is_within (const std::string &, std::string); /** * @return true if p1 and p2 both resolve to the same file @@ -125,10 +126,10 @@ bool path_is_within (const std::string &, std::string); * * Uses g_stat to check for identical st_dev and st_ino values. */ -bool equivalent_paths (const std::string &p1, const std::string &p2); +LIBPBD_API bool equivalent_paths (const std::string &p1, const std::string &p2); /// @return true if path at p exists and is writable, false otherwise -bool exists_and_writable(const std::string & p); +LIBPBD_API bool exists_and_writable(const std::string & p); } // namespace PBD diff --git a/libs/pbd/pbd/floating.h b/libs/pbd/pbd/floating.h index 6daef5d4aa..fc5a8be4f1 100644 --- a/libs/pbd/pbd/floating.h +++ b/libs/pbd/pbd/floating.h @@ -30,9 +30,11 @@ #include <cmath> +#include "pbd/libpbd_visibility.h" + namespace PBD { -union Float_t +union LIBPBD_API Float_t { Float_t (float num = 0.0f) : f(num) {} diff --git a/libs/pbd/pbd/forkexec.h b/libs/pbd/pbd/forkexec.h index 236cffa301..e6d8f0c5ea 100644 --- a/libs/pbd/pbd/forkexec.h +++ b/libs/pbd/pbd/forkexec.h @@ -22,7 +22,9 @@ #include <unistd.h> -pid_t forkexec(char **argv, char **envp, int outpipe[2], int inpipe[2]); -pid_t forkexec_cmd(char *cmd, char **envp, int outpipe[2], int inpipe[2]); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API pid_t forkexec(char **argv, char **envp, int outpipe[2], int inpipe[2]); +LIBPBD_API pid_t forkexec_cmd(char *cmd, char **envp, int outpipe[2], int inpipe[2]); #endif // __forkexec_h__ diff --git a/libs/pbd/pbd/fpu.h b/libs/pbd/pbd/fpu.h index ff3df481d0..6627951e9f 100644 --- a/libs/pbd/pbd/fpu.h +++ b/libs/pbd/pbd/fpu.h @@ -20,10 +20,11 @@ #ifndef __pbd_fpu_h__ #define __pbd_fpu_h__ -namespace PBD { +#include "pbd/libpbd_visibility.h" +namespace PBD { -class FPU { +class LIBPBD_API FPU { private: enum Flags { HasFlushToZero = 0x1, diff --git a/libs/pbd/pbd/functor_command.h b/libs/pbd/pbd/functor_command.h index b651c6f775..d2aacd18ac 100644 --- a/libs/pbd/pbd/functor_command.h +++ b/libs/pbd/pbd/functor_command.h @@ -25,6 +25,7 @@ #include <string> #include <map> +#include "pbd/libpbd_visibility.h" #include "pbd/xml++.h" #include "pbd/shiva.h" #include "pbd/command.h" @@ -36,7 +37,7 @@ namespace PBD { template <class obj_type, class arg_type> -class FunctorCommand : public Command +class LIBPBD_API FunctorCommand : public Command { private: typedef void (obj_type::*functor_type)(arg_type); diff --git a/libs/pbd/pbd/id.h b/libs/pbd/pbd/id.h index 6a9332be53..a7d0c2c622 100644 --- a/libs/pbd/pbd/id.h +++ b/libs/pbd/pbd/id.h @@ -25,9 +25,11 @@ #include <glibmm/threads.h> +#include "pbd/libpbd_visibility.h" + namespace PBD { -class ID { +class LIBPBD_API ID { public: ID (); ID (std::string); @@ -68,6 +70,7 @@ class ID { }; } -std::ostream& operator<< (std::ostream& ostr, const PBD::ID&); + +LIBPBD_API std::ostream& operator<< (std::ostream& ostr, const PBD::ID&); #endif /* __pbd_id_h__ */ diff --git a/libs/pbd/pbd/libpbd_visibility.h b/libs/pbd/pbd/libpbd_visibility.h new file mode 100644 index 0000000000..e2c6235f0b --- /dev/null +++ b/libs/pbd/pbd/libpbd_visibility.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2013 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __libpbd_libpbd_visibility_h__ +#define __libpbd_libpbd_visibility_h__ + +/* _WIN32 is defined by most compilers targetting Windows, but within the + * ardour source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending + * on how a Windows build is built. + */ + +#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) + #define LIBPBD_DLL_IMPORT __declspec(dllimport) + #define LIBPBD_DLL_EXPORT __declspec(dllexport) + #define LIBPBD_DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define LIBPBD_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBPBD_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBPBD_DLL_LOCAL __attribute__ ((visibility ("hidden"))) + #else + #define LIBPBD_DLL_IMPORT + #define LIBPBD_DLL_EXPORT + #define LIBPBD_DLL_LOCAL + #endif +#endif + +#ifdef LIBPBD_DLL // libpbd is a DLL +#ifdef LIBPBD_DLL_EXPORTS // defined if we are building the libpbd DLL (instead of using it) + #define LIBPBD_API LIBPBD_DLL_EXPORT +#else + #define LIBPBD_API LIBPBD_DLL_IMPORT +#endif +#define LIBPBD_LOCAL LIBPBD_DLL_LOCAL +#else /* static lib, not DLL */ +#define LIBPBD_API +#define LIBPBD_LOCAL +#endif + +#endif /* __libpbd_libpbd_visibility_h__ */ diff --git a/libs/pbd/pbd/locale_guard.h b/libs/pbd/pbd/locale_guard.h index 480cc0fddb..cac77ded24 100644 --- a/libs/pbd/pbd/locale_guard.h +++ b/libs/pbd/pbd/locale_guard.h @@ -20,9 +20,11 @@ #ifndef __pbd_locale_guard__ #define __pbd_locale_guard__ +#include "pbd/libpbd_visibility.h" + namespace PBD { -struct LocaleGuard { +struct LIBPBD_API LocaleGuard { LocaleGuard (const char*); ~LocaleGuard (); const char* old; diff --git a/libs/pbd/pbd/malign.h b/libs/pbd/pbd/malign.h index bc78882dc7..07f42f586f 100644 --- a/libs/pbd/pbd/malign.h +++ b/libs/pbd/pbd/malign.h @@ -22,6 +22,8 @@ #include <stdlib.h> -int cache_aligned_malloc (void** memptr, size_t size); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API int cache_aligned_malloc (void** memptr, size_t size); #endif /* __pbd_malign_h__ */ diff --git a/libs/pbd/pbd/memento_command.h b/libs/pbd/pbd/memento_command.h index 45cb100a36..6560780f3c 100644 --- a/libs/pbd/pbd/memento_command.h +++ b/libs/pbd/pbd/memento_command.h @@ -23,6 +23,7 @@ #include <iostream> +#include "pbd/libpbd_visibility.h" #include "pbd/command.h" #include "pbd/stacktrace.h" #include "pbd/xml++.h" @@ -50,7 +51,7 @@ * can do `just-in-time' binding from the crossfade ID. */ template <class obj_T> -class MementoCommandBinder : public PBD::Destructible +class LIBPBD_API MementoCommandBinder : public PBD::Destructible { public: /** @return Stateful object to operate on */ @@ -67,7 +68,7 @@ public: /** A simple MementoCommandBinder which binds directly to an object */ template <class obj_T> -class SimpleMementoCommandBinder : public MementoCommandBinder<obj_T> +class LIBPBD_API SimpleMementoCommandBinder : public MementoCommandBinder<obj_T> { public: SimpleMementoCommandBinder (obj_T& o) @@ -99,7 +100,7 @@ private: * memento, and redo is restoring the after memento. */ template <class obj_T> -class MementoCommand : public Command +class LIBPBD_API MementoCommand : public Command { public: MementoCommand (obj_T& a_object, XMLNode* a_before, XMLNode* a_after) diff --git a/libs/pbd/pbd/mountpoint.h b/libs/pbd/pbd/mountpoint.h index e0ec1be7f9..3500f8a4ca 100644 --- a/libs/pbd/pbd/mountpoint.h +++ b/libs/pbd/pbd/mountpoint.h @@ -22,6 +22,8 @@ #include <string> -std::string mountpoint (std::string path); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API std::string mountpoint (std::string path); #endif // __pbd_mountpoint_h__ diff --git a/libs/pbd/pbd/openuri.h b/libs/pbd/pbd/openuri.h index ec17b5a34a..8ba6ffca62 100644 --- a/libs/pbd/pbd/openuri.h +++ b/libs/pbd/pbd/openuri.h @@ -22,9 +22,11 @@ #include <string> +#include "pbd/libpbd_visibility.h" + namespace PBD { - bool open_uri (const char*); - bool open_uri (const std::string&); + LIBPBD_API bool open_uri (const char*); + LIBPBD_API bool open_uri (const std::string&); } #endif diff --git a/libs/pbd/pbd/pathexpand.h b/libs/pbd/pbd/pathexpand.h index 2b2639e07e..5f1c03f8ee 100644 --- a/libs/pbd/pbd/pathexpand.h +++ b/libs/pbd/pbd/pathexpand.h @@ -21,10 +21,11 @@ #include <string> +#include "pbd/libpbd_visibility.h" + namespace PBD { - std::string canonical_path (const std::string& path); - std::string path_expand (std::string path); - std::string search_path_expand (std::string path); + LIBPBD_API std::string path_expand (std::string path); + LIBPBD_API std::string search_path_expand (std::string path); } #endif /* __libpbd_path_expand_h__ */ diff --git a/libs/pbd/pbd/pathscanner.h b/libs/pbd/pbd/pathscanner.h index 796648de0f..d62203c008 100644 --- a/libs/pbd/pbd/pathscanner.h +++ b/libs/pbd/pbd/pathscanner.h @@ -28,7 +28,9 @@ #include <regex.h> #endif -class PathScanner +#include "pbd/libpbd_visibility.h" + +class LIBPBD_API PathScanner { public: diff --git a/libs/pbd/pbd/pbd.h b/libs/pbd/pbd/pbd.h index 5b3745f0ed..6d2584f64b 100644 --- a/libs/pbd/pbd/pbd.h +++ b/libs/pbd/pbd/pbd.h @@ -20,10 +20,12 @@ #ifndef __libpbd_pbd_h__ #define __libpbd_pbd_h__ +#include "pbd/libpbd_visibility.h" + namespace PBD { - bool init (); - void cleanup (); + LIBPBD_API bool init (); + LIBPBD_API void cleanup (); } // namespace PBD diff --git a/libs/pbd/pbd/pool.h b/libs/pbd/pbd/pool.h index 58c5861d23..165a3aac4b 100644 --- a/libs/pbd/pbd/pool.h +++ b/libs/pbd/pbd/pool.h @@ -25,12 +25,13 @@ #include <glibmm/threads.h> +#include "pbd/libpbd_visibility.h" #include "pbd/ringbuffer.h" /** A pool of data items that can be allocated, read from and written to * without system memory allocation or locking. */ -class Pool +class LIBPBD_API Pool { public: Pool (std::string name, unsigned long item_size, unsigned long nitems); @@ -49,7 +50,7 @@ class Pool void *block; ///< data storage area }; -class SingleAllocMultiReleasePool : public Pool +class LIBPBD_API SingleAllocMultiReleasePool : public Pool { public: SingleAllocMultiReleasePool (std::string name, unsigned long item_size, unsigned long nitems); @@ -63,7 +64,7 @@ class SingleAllocMultiReleasePool : public Pool }; -class MultiAllocSingleReleasePool : public Pool +class LIBPBD_API MultiAllocSingleReleasePool : public Pool { public: MultiAllocSingleReleasePool (std::string name, unsigned long item_size, unsigned long nitems); @@ -76,7 +77,7 @@ class MultiAllocSingleReleasePool : public Pool Glib::Threads::Mutex m_lock; }; -class PerThreadPool; +class LIBPBD_API PerThreadPool; /** Management of a per-thread pool of data that is allocated by one thread and * freed by one other thread. Not safe for use when there is more than 1 @@ -90,7 +91,7 @@ class PerThreadPool; * data), and so it calls alloc(), passes a pointer to the result of the alloc * to another thread, which later calls push() to "free" it. */ -class CrossThreadPool : public Pool +class LIBPBD_API CrossThreadPool : public Pool { public: CrossThreadPool (std::string n, unsigned long isize, unsigned long nitems, PerThreadPool *); @@ -112,7 +113,7 @@ class CrossThreadPool : public Pool /** A class to manage per-thread pools of memory. One object of this class is instantiated, * and then it is used to create per-thread pools for 1 or more threads as required. */ -class PerThreadPool +class LIBPBD_API PerThreadPool { public: PerThreadPool (); diff --git a/libs/pbd/pbd/properties.h b/libs/pbd/pbd/properties.h index e65929c60c..27a0be1895 100644 --- a/libs/pbd/pbd/properties.h +++ b/libs/pbd/pbd/properties.h @@ -26,6 +26,7 @@ #include <set> #include <iostream> +#include "pbd/libpbd_visibility.h" #include "pbd/xml++.h" #include "pbd/property_basics.h" #include "pbd/property_list.h" @@ -36,7 +37,7 @@ namespace PBD { /** Parent class for classes which represent a single scalar property in a Stateful object */ template<class T> -class PropertyTemplate : public PropertyBase +class LIBPBD_API PropertyTemplate : public PropertyBase { public: PropertyTemplate (PropertyDescriptor<T> p, T const& v) @@ -196,7 +197,7 @@ private: PropertyTemplate (PropertyTemplate<T> const &); }; -template<class T> +template<class T> LIBPBD_API std::ostream & operator<<(std::ostream& os, PropertyTemplate<T> const& s) { return os << s.val (); @@ -206,7 +207,7 @@ std::ostream & operator<<(std::ostream& os, PropertyTemplate<T> const& s) * with types that can be written to / read from stringstreams. */ template<class T> -class Property : public PropertyTemplate<T> +class LIBPBD_API Property : public PropertyTemplate<T> { public: Property (PropertyDescriptor<T> q, T const& v) @@ -284,7 +285,7 @@ private: * separators, etc. */ template<> -class Property<std::string> : public PropertyTemplate<std::string> +class LIBPBD_API Property<std::string> : public PropertyTemplate<std::string> { public: Property (PropertyDescriptor<std::string> d, std::string const & v) @@ -318,7 +319,7 @@ private: }; template<class T> -class EnumProperty : public Property<T> +class LIBPBD_API EnumProperty : public Property<T> { public: EnumProperty (PropertyDescriptor<T> q, T const& v) @@ -351,7 +352,7 @@ private: * one. */ template <class T> -class SharedStatefulProperty : public PropertyBase +class LIBPBD_API SharedStatefulProperty : public PropertyBase { public: typedef boost::shared_ptr<T> Ptr; diff --git a/libs/pbd/pbd/property_basics.h b/libs/pbd/pbd/property_basics.h index 2255a3d79b..2da21ddb84 100644 --- a/libs/pbd/pbd/property_basics.h +++ b/libs/pbd/pbd/property_basics.h @@ -24,20 +24,21 @@ #include <set> #include <vector> +#include "pbd/libpbd_visibility.h" #include "pbd/xml++.h" class Command; namespace PBD { -class PropertyList; -class StatefulDiffCommand; +class LIBPBD_API PropertyList; +class LIBPBD_API StatefulDiffCommand; /** A unique identifier for a property of a Stateful object */ typedef GQuark PropertyID; template<typename T> -struct PropertyDescriptor { +struct LIBPBD_API PropertyDescriptor { PropertyDescriptor () : property_id (0) {} PropertyDescriptor (PropertyID pid) : property_id (pid) {} @@ -46,7 +47,7 @@ struct PropertyDescriptor { }; /** A list of IDs of Properties that have changed in some situation or other */ -class PropertyChange : public std::set<PropertyID> +class LIBPBD_API PropertyChange : public std::set<PropertyID> { public: PropertyChange() {} @@ -83,7 +84,7 @@ public: * - to handle current state (when serializing Stateful objects) * - to handle history since some operation was started (when making StatefulDiffCommands for undo) */ -class PropertyBase +class LIBPBD_API PropertyBase { public: PropertyBase (PropertyID pid) diff --git a/libs/pbd/pbd/property_list.h b/libs/pbd/pbd/property_list.h index 12b7995009..abb85e77d5 100644 --- a/libs/pbd/pbd/property_list.h +++ b/libs/pbd/pbd/property_list.h @@ -22,6 +22,7 @@ #include <map> +#include "pbd/libpbd_visibility.h" #include "pbd/property_basics.h" class XMLNode; @@ -29,7 +30,7 @@ class XMLNode; namespace PBD { /** A list of properties, mapped using their ID */ -class PropertyList : public std::map<PropertyID, PropertyBase*> +class LIBPBD_API PropertyList : public std::map<PropertyID, PropertyBase*> { public: PropertyList (); @@ -61,7 +62,7 @@ protected: * own Properties store them in an OwnedPropertyList * to avoid having them deleted at the wrong time. */ -class OwnedPropertyList : public PropertyList +class LIBPBD_API OwnedPropertyList : public PropertyList { public: OwnedPropertyList(); diff --git a/libs/pbd/pbd/pthread_utils.h b/libs/pbd/pbd/pthread_utils.h index f578339410..37ce723715 100644 --- a/libs/pbd/pbd/pthread_utils.h +++ b/libs/pbd/pbd/pthread_utils.h @@ -29,18 +29,19 @@ #include <string> #include <stdint.h> -#include <pbd/signals.h> +#include "pbd/libpbd_visibility.h" +#include "pbd/signals.h" -int pthread_create_and_store (std::string name, pthread_t *thread, void * (*start_routine)(void *), void * arg); -void pthread_cancel_one (pthread_t thread); -void pthread_cancel_all (); -void pthread_kill_all (int signum); -const char* pthread_name (); -void pthread_set_name (const char* name); +LIBPBD_API int pthread_create_and_store (std::string name, pthread_t *thread, void * (*start_routine)(void *), void * arg); +LIBPBD_API void pthread_cancel_one (pthread_t thread); +LIBPBD_API void pthread_cancel_all (); +LIBPBD_API void pthread_kill_all (int signum); +LIBPBD_API const char* pthread_name (); +LIBPBD_API void pthread_set_name (const char* name); namespace PBD { - extern void notify_gui_about_thread_creation (std::string, pthread_t, std::string, int requests = 256); - extern PBD::Signal4<void,std::string,pthread_t,std::string,uint32_t> ThreadCreatedWithRequestSize; + LIBPBD_API extern void notify_gui_about_thread_creation (std::string, pthread_t, std::string, int requests = 256); + LIBPBD_API extern PBD::Signal4<void,std::string,pthread_t,std::string,uint32_t> ThreadCreatedWithRequestSize; } #endif /* __pbd_pthread_utils__ */ diff --git a/libs/pbd/pbd/rcu.h b/libs/pbd/pbd/rcu.h index 909954fc0e..6ee68afabf 100644 --- a/libs/pbd/pbd/rcu.h +++ b/libs/pbd/pbd/rcu.h @@ -25,6 +25,8 @@ #include <list> +#include "pbd/libpbd_visibility.h" + /** @file Defines a set of classes to implement Read-Copy-Update. We do not attempt to define RCU here - use google. The design consists of two parts: an RCUManager and an RCUWriter. @@ -43,7 +45,7 @@ and managed object. */ template<class T> -class RCUManager +class LIBPBD_API RCUManager { public: @@ -109,7 +111,7 @@ class RCUManager means that no actual objects will be deleted incorrectly if this is misused. */ template<class T> -class SerializedRCUManager : public RCUManager<T> +class LIBPBD_API SerializedRCUManager : public RCUManager<T> { public: @@ -212,7 +214,7 @@ private: */ template<class T> -class RCUWriter +class LIBPBD_API RCUWriter { public: diff --git a/libs/pbd/pbd/receiver.h b/libs/pbd/pbd/receiver.h index 32fb84fa38..d3303ae192 100644 --- a/libs/pbd/pbd/receiver.h +++ b/libs/pbd/pbd/receiver.h @@ -24,11 +24,12 @@ #include <sigc++/sigc++.h> +#include "pbd/libpbd_visibility.h" #include "transmitter.h" class strstream; -class Receiver : public sigc::trackable +class LIBPBD_API Receiver : public sigc::trackable { public: Receiver (); diff --git a/libs/pbd/pbd/replace_all.h b/libs/pbd/pbd/replace_all.h index 3bc465d89f..e7fcc1e0ce 100644 --- a/libs/pbd/pbd/replace_all.h +++ b/libs/pbd/pbd/replace_all.h @@ -22,6 +22,8 @@ #include <string> -int replace_all (std::string& str, const std::string& target, const std::string& replacement); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API int replace_all (std::string& str, const std::string& target, const std::string& replacement); #endif // __pbd_replace_all_h__ diff --git a/libs/pbd/pbd/ringbuffer.h b/libs/pbd/pbd/ringbuffer.h index bb5485a8f3..0e6772fee6 100644 --- a/libs/pbd/pbd/ringbuffer.h +++ b/libs/pbd/pbd/ringbuffer.h @@ -23,8 +23,10 @@ #include <cstring> #include <glib.h> +#include "pbd/libpbd_visibility.h" + template<class T> -class RingBuffer +class LIBPBD_API RingBuffer { public: RingBuffer (guint sz) { @@ -118,7 +120,7 @@ class RingBuffer guint size_mask; }; -template<class T> guint +template<class T> LIBPBD_API guint RingBuffer<T>::read (T *dest, guint cnt) { guint free_cnt; @@ -157,7 +159,7 @@ RingBuffer<T>::read (T *dest, guint cnt) return to_read; } -template<class T> guint +template<class T> LIBPBD_API guint RingBuffer<T>::write (T const *src, guint cnt) { @@ -197,7 +199,7 @@ RingBuffer<T>::write (T const *src, guint cnt) return to_write; } -template<class T> void +template<class T> LIBPBD_API void RingBuffer<T>::get_read_vector (typename RingBuffer<T>::rw_vector *vec) { @@ -238,7 +240,7 @@ RingBuffer<T>::get_read_vector (typename RingBuffer<T>::rw_vector *vec) } } -template<class T> void +template<class T> LIBPBD_API void RingBuffer<T>::get_write_vector (typename RingBuffer<T>::rw_vector *vec) { diff --git a/libs/pbd/pbd/ringbufferNPT.h b/libs/pbd/pbd/ringbufferNPT.h index b3890ba81b..bf5b2a10c8 100644 --- a/libs/pbd/pbd/ringbufferNPT.h +++ b/libs/pbd/pbd/ringbufferNPT.h @@ -25,12 +25,14 @@ #include <cstring> #include <glib.h> +#include "pbd/libpbd_visibility.h" + namespace PBD { /* ringbuffer class where the element size is not required to be a power of two */ template<class T> -class RingBufferNPT +class LIBPBD_API RingBufferNPT { public: RingBufferNPT (size_t sz) { @@ -118,7 +120,7 @@ class RingBufferNPT mutable gint read_ptr; }; -template<class T> size_t +template<class T> LIBPBD_API size_t RingBufferNPT<T>::read (T *dest, size_t cnt) { size_t free_cnt; @@ -157,7 +159,7 @@ RingBufferNPT<T>::read (T *dest, size_t cnt) return to_read; } -template<class T> size_t +template<class T> LIBPBD_API size_t RingBufferNPT<T>::write (const T *src, size_t cnt) { size_t free_cnt; @@ -196,7 +198,7 @@ RingBufferNPT<T>::write (const T *src, size_t cnt) return to_write; } -template<class T> void +template<class T> LIBPBD_API void RingBufferNPT<T>::get_read_vector (typename RingBufferNPT<T>::rw_vector *vec) { size_t free_cnt; @@ -236,7 +238,7 @@ RingBufferNPT<T>::get_read_vector (typename RingBufferNPT<T>::rw_vector *vec) } } -template<class T> void +template<class T> LIBPBD_API void RingBufferNPT<T>::get_write_vector (typename RingBufferNPT<T>::rw_vector *vec) { size_t free_cnt; diff --git a/libs/pbd/pbd/search_path.h b/libs/pbd/pbd/search_path.h index 5e1bce9aa3..857c3a78b6 100644 --- a/libs/pbd/pbd/search_path.h +++ b/libs/pbd/pbd/search_path.h @@ -23,6 +23,8 @@ #include <string> #include <vector> +#include "pbd/libpbd_visibility.h" + namespace PBD { /** @@ -36,7 +38,7 @@ namespace PBD { * The Searchpath class does not test whether the paths exist * or are directories. It is basically just a container. */ -class Searchpath : public std::vector<std::string> +class LIBPBD_API SearchPath : public std::vector<std::string> { public: /** diff --git a/libs/pbd/pbd/selectable.h b/libs/pbd/pbd/selectable.h index 85f3e79ab0..cb4677cba4 100644 --- a/libs/pbd/pbd/selectable.h +++ b/libs/pbd/pbd/selectable.h @@ -28,14 +28,16 @@ #include <sys/types.h> +#include "pbd/libpbd_visibility.h" + namespace Select { - enum Condition { + enum LIBPBD_API Condition { Readable = 0x1, Writable = 0x2, Exception = 0x4 }; -class Selectable : public sigc::trackable +class LIBPBD_API Selectable : public sigc::trackable { public: @@ -70,7 +72,7 @@ class Selectable : public sigc::trackable std::string path; }; -class Selector { +class LIBPBD_API Selector { private: int post_select (fd_set *, fd_set *, fd_set *); int _max_fd; diff --git a/libs/pbd/pbd/semaphore.h b/libs/pbd/pbd/semaphore.h index caa5eb68c2..6579ea6f0a 100644 --- a/libs/pbd/pbd/semaphore.h +++ b/libs/pbd/pbd/semaphore.h @@ -32,6 +32,7 @@ # include <errno.h> #endif +#include "pbd/libpbd_visibility.h" #include "pbd/failed_constructor.h" namespace PBD { @@ -48,7 +49,7 @@ namespace PBD { only safe way to reliably signal from a real-time audio thread. The counting semantics also complement ringbuffers of events nicely. */ -class Semaphore +class LIBPBD_API Semaphore { public: /** diff --git a/libs/pbd/pbd/semutils.h b/libs/pbd/pbd/semutils.h index af5c201b85..5c0191e25b 100644 --- a/libs/pbd/pbd/semutils.h +++ b/libs/pbd/pbd/semutils.h @@ -25,9 +25,11 @@ #include <semaphore.h> #endif +#include "pbd/libpbd_visibility.h" + namespace PBD { -class ProcessSemaphore { +class LIBPBD_API ProcessSemaphore { private: #ifdef PLATFORM_WINDOWS HANDLE _sem; diff --git a/libs/pbd/pbd/sequence_property.h b/libs/pbd/pbd/sequence_property.h index 63263819ca..1c3078350f 100644 --- a/libs/pbd/pbd/sequence_property.h +++ b/libs/pbd/pbd/sequence_property.h @@ -27,6 +27,7 @@ #include <boost/function.hpp> +#include "pbd/libpbd_visibility.h" #include "pbd/convert.h" #include "pbd/id.h" #include "pbd/property_basics.h" @@ -43,7 +44,7 @@ namespace PBD { * any change. */ template<typename Container> -class SequenceProperty : public PropertyBase +class LIBPBD_API SequenceProperty : public PropertyBase { public: typedef std::set<typename Container::value_type> ChangeContainer; diff --git a/libs/pbd/pbd/shortpath.h b/libs/pbd/pbd/shortpath.h index 55431bf34e..48dbb0eee2 100644 --- a/libs/pbd/pbd/shortpath.h +++ b/libs/pbd/pbd/shortpath.h @@ -22,6 +22,8 @@ #include <glibmm/ustring.h> -Glib::ustring short_path (const Glib::ustring& path, Glib::ustring::size_type target_characters); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API Glib::ustring short_path (const Glib::ustring& path, Glib::ustring::size_type target_characters); #endif /* __pbd_shortpath_h__ */ diff --git a/libs/pbd/pbd/signals.h b/libs/pbd/pbd/signals.h index 140ea014e8..3896fd55b5 100644 --- a/libs/pbd/pbd/signals.h +++ b/libs/pbd/pbd/signals.h @@ -36,13 +36,14 @@ #include <boost/enable_shared_from_this.hpp> #include <boost/optional.hpp> +#include "pbd/libpbd_visibility.h" #include "pbd/event_loop.h" namespace PBD { -class Connection; +class LIBPBD_API Connection; -class SignalBase +class LIBPBD_API SignalBase { public: virtual ~SignalBase () {} @@ -52,7 +53,7 @@ protected: Glib::Threads::Mutex _mutex; }; -class Connection : public boost::enable_shared_from_this<Connection> +class LIBPBD_API Connection : public boost::enable_shared_from_this<Connection> { public: Connection (SignalBase* b) : _signal (b) {} @@ -78,7 +79,7 @@ private: }; template<typename R> -class OptionalLastValue +class LIBPBD_API OptionalLastValue { public: typedef boost::optional<R> result_type; @@ -97,7 +98,7 @@ public: typedef boost::shared_ptr<Connection> UnscopedConnection; -class ScopedConnection +class LIBPBD_API ScopedConnection { public: ScopedConnection () {} @@ -128,7 +129,7 @@ private: UnscopedConnection _c; }; -class ScopedConnectionList : public boost::noncopyable +class LIBPBD_API ScopedConnectionList : public boost::noncopyable { public: ScopedConnectionList(); diff --git a/libs/pbd/pbd/sndfile_manager.h b/libs/pbd/pbd/sndfile_manager.h index 2167cadf5f..7abc8ea3d6 100644 --- a/libs/pbd/pbd/sndfile_manager.h +++ b/libs/pbd/pbd/sndfile_manager.h @@ -25,13 +25,15 @@ #include <map> #include <sndfile.h> #include <glibmm/threads.h> + +#include "pbd/libpbd_visibility.h" #include "pbd/signals.h" #include "pbd/file_manager.h" namespace PBD { /** FileDescriptor for a file to be opened using libsndfile */ -class SndFileDescriptor : public FileDescriptor +class LIBPBD_API SndFileDescriptor : public FileDescriptor { public: SndFileDescriptor (std::string const & file_name, bool writeable, SF_INFO* info); diff --git a/libs/pbd/pbd/stacktrace.h b/libs/pbd/pbd/stacktrace.h index f3c7baf7d7..77f5d38fb8 100644 --- a/libs/pbd/pbd/stacktrace.h +++ b/libs/pbd/pbd/stacktrace.h @@ -34,13 +34,16 @@ #include <cstdlib> #endif +#include "pbd/libpbd_visibility.h" + + namespace PBD { - void stacktrace (std::ostream& out, int levels = 0); - void trace_twb(); + LIBPBD_API void stacktrace (std::ostream& out, int levels = 0); + LIBPBD_API void trace_twb(); std::string demangle (const std::string&); template<typename T> -class thing_with_backtrace +class LIBPBD_API thing_with_backtrace { public: thing_with_backtrace () { @@ -109,8 +112,8 @@ private: static Glib::Threads::Mutex all_mutex; }; -template<typename T> std::list<PBD::thing_with_backtrace<T> *> PBD::thing_with_backtrace<T>::all; -template<typename T> Glib::Threads::Mutex PBD::thing_with_backtrace<T>::all_mutex; +template<typename T> LIBPBD_API std::list<PBD::thing_with_backtrace<T> *> PBD::thing_with_backtrace<T>::all; +template<typename T> LIBPBD_API Glib::Threads::Mutex PBD::thing_with_backtrace<T>::all_mutex; } // namespace PBD diff --git a/libs/pbd/pbd/stateful.h b/libs/pbd/pbd/stateful.h index 4808bc2911..ab09b7aa84 100644 --- a/libs/pbd/pbd/stateful.h +++ b/libs/pbd/pbd/stateful.h @@ -24,6 +24,7 @@ #include <list> #include <cassert> +#include "pbd/libpbd_visibility.h" #include "pbd/id.h" #include "pbd/xml++.h" #include "pbd/property_basics.h" @@ -41,7 +42,7 @@ class PropertyList; class OwnedPropertyList; /** Base class for objects with saveable and undoable state */ -class Stateful { +class LIBPBD_API Stateful { public: Stateful (); virtual ~Stateful(); diff --git a/libs/pbd/pbd/stateful_diff_command.h b/libs/pbd/pbd/stateful_diff_command.h index 2a213d7a17..2187c727ed 100644 --- a/libs/pbd/pbd/stateful_diff_command.h +++ b/libs/pbd/pbd/stateful_diff_command.h @@ -22,6 +22,8 @@ #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> + +#include "pbd/libpbd_visibility.h" #include "pbd/command.h" namespace PBD @@ -33,7 +35,7 @@ class PropertyList; /** A Command which stores its action as the differences between the before and after * state of a Stateful object. */ -class StatefulDiffCommand : public Command +class LIBPBD_API StatefulDiffCommand : public Command { public: StatefulDiffCommand (boost::shared_ptr<StatefulDestructible>); diff --git a/libs/pbd/pbd/statefuldestructible.h b/libs/pbd/pbd/statefuldestructible.h index 36eb43147c..79f5356c9f 100644 --- a/libs/pbd/pbd/statefuldestructible.h +++ b/libs/pbd/pbd/statefuldestructible.h @@ -20,12 +20,13 @@ #ifndef __pbd_stateful_destructible_h__ #define __pbd_stateful_destructible_h__ +#include "pbd/libpbd_visibility.h" #include "pbd/stateful.h" #include "pbd/destructible.h" namespace PBD { -class StatefulDestructible : public Stateful, public Destructible +class LIBPBD_API StatefulDestructible : public Stateful, public Destructible { }; diff --git a/libs/pbd/pbd/stl_delete.h b/libs/pbd/pbd/stl_delete.h index bca0ea9e21..b98bb5e8e3 100644 --- a/libs/pbd/pbd/stl_delete.h +++ b/libs/pbd/pbd/stl_delete.h @@ -20,12 +20,13 @@ #ifndef __libmisc_stl_delete_h__ #define __libmisc_stl_delete_h__ +#include "pbd/libpbd_visibility.h" /* To actually use any of these deletion functions, you need to first include the revelant container type header. */ #if defined(_CPP_VECTOR) || defined(_GLIBCXX_VECTOR) || defined(__SGI_STL_VECTOR) || defined(_LIBCPP_VECTOR) -template<class T> void vector_delete (std::vector<T *> *vec) +template<class T> LIBPBD_API void vector_delete (std::vector<T *> *vec) { typename std::vector<T *>::iterator i; @@ -37,7 +38,7 @@ template<class T> void vector_delete (std::vector<T *> *vec) #endif // _CPP_VECTOR || _GLIBCXX_VECTOR || __SGI_STL_VECTOR || _LIBCPP_VECTOR #if defined(_CPP_MAP) || defined(_GLIBCXX_MAP) || defined(__SGI_STL_MAP) -template<class K, class T> void map_delete (std::map<K, T *> *m) +template<class K, class T> LIBPBD_API void map_delete (std::map<K, T *> *m) { typename std::map<K, T *>::iterator i; @@ -49,7 +50,7 @@ template<class K, class T> void map_delete (std::map<K, T *> *m) #endif // _CPP_MAP || _GLIBCXX_MAP || __SGI_STL_MAP #if defined(_CPP_LIST) || defined(_GLIBCXX_LIST) || defined(__SGI_STL_LIST) -template<class T> void list_delete (std::list<T *> *l) +template<class T> LIBPBD_API void list_delete (std::list<T *> *l) { typename std::list<T *>::iterator i; @@ -62,7 +63,7 @@ template<class T> void list_delete (std::list<T *> *l) #endif // _CPP_LIST || _GLIBCXX_LIST || __SGI_STL_LIST #if defined(_CPP_SLIST) || defined(_GLIBCXX_SLIST) || defined(__SGI_STL_SLIST) -template<class T> void slist_delete (std::slist<T *> *l) +template<class T> LIBPBD_API void slist_delete (std::slist<T *> *l) { typename std::slist<T *>::iterator i; @@ -75,7 +76,7 @@ template<class T> void slist_delete (std::slist<T *> *l) #endif // _CPP_SLIST || _GLIBCXX_SLIST || __SGI_STL_SLIST #if defined(_CPP_SET) || defined(_GLIBCXX_SET) || defined(__SGI_STL_SET) -template<class T> void set_delete (std::set<T *> *sset) +template<class T> void LIBPBD_API set_delete (std::set<T *> *sset) { typename std::set<T *>::iterator i; diff --git a/libs/pbd/pbd/stl_functors.h b/libs/pbd/pbd/stl_functors.h index 3c83a1ae2f..5815dacb05 100644 --- a/libs/pbd/pbd/stl_functors.h +++ b/libs/pbd/pbd/stl_functors.h @@ -22,8 +22,10 @@ #include <string> +#include "pbd/libpbd_visibility.h" + #ifndef LESS_STRING_P -struct less<std::string *> { +struct LIBPBD_API less<std::string *> { bool operator()(std::string *s1, std::string *s2) const { return *s1 < *s2; } @@ -32,7 +34,7 @@ struct less<std::string *> { #endif // LESS_STRING_P #ifndef LESS_CONST_STRING_P -struct less<const std::string *> { +struct LIBPBD_API less<const std::string *> { bool operator()(const std::string *s1, const std::string *s2) const { return *s1 < *s2; } @@ -41,7 +43,7 @@ struct less<const std::string *> { #endif // LESS_CONST_STRING_P #ifndef LESS_CONST_CHAR_P -struct less<const char *> +struct LIBPBD_API less<const char *> { bool operator()(const char* s1, const char* s2) const { return strcmp(s1, s2) < 0; @@ -51,7 +53,7 @@ struct less<const char *> #endif // LESS_CONST_CHAR_P #ifndef LESS_CONST_FLOAT_P -struct less<const float *> +struct LIBPBD_API less<const float *> { bool operator()(const float *n1, const float *n2) const { return *n1 < *n2; @@ -61,7 +63,7 @@ struct less<const float *> #endif // LESS_CONST_FLOAT_P #ifndef EQUAL_TO_CONST_CHAR_P -struct equal_to<const char *> +struct LIBPBD_API equal_to<const char *> { bool operator()(const char *s1, const char *s2) const { return strcmp (s1, s2) == 0; @@ -71,7 +73,7 @@ struct equal_to<const char *> #endif // EQUAL_TO_CONST_CHAR_P #ifndef EQUAL_TO_STRING_P -struct equal_to<std::string *> +struct LIBPBD_API equal_to<std::string *> { bool operator()(const std::string *s1, const std::string *s2) const { return *s1 == *s2; @@ -81,7 +83,7 @@ struct equal_to<std::string *> #endif // EQUAL_TO_STRING_P #ifndef LESS_CONST_STRING_R -struct less<const std::string &> { +struct LIBPBD_API less<const std::string &> { bool operator() (const std::string &s1, const std::string &s2) { return s1 < s2; } diff --git a/libs/pbd/pbd/strsplit.h b/libs/pbd/pbd/strsplit.h index 25c4526b6a..045974d00c 100644 --- a/libs/pbd/pbd/strsplit.h +++ b/libs/pbd/pbd/strsplit.h @@ -24,7 +24,9 @@ #include <vector> #include <glibmm/ustring.h> -extern void split (std::string, std::vector<std::string>&, char); -extern void split (Glib::ustring, std::vector<Glib::ustring>&, char); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API extern void split (std::string, std::vector<std::string>&, char); +LIBPBD_API extern void split (Glib::ustring, std::vector<Glib::ustring>&, char); #endif // __pbd_strplit_h__ diff --git a/libs/pbd/pbd/textreceiver.h b/libs/pbd/pbd/textreceiver.h index c9a1d0aecc..9fe7e0828d 100644 --- a/libs/pbd/pbd/textreceiver.h +++ b/libs/pbd/pbd/textreceiver.h @@ -22,9 +22,10 @@ #include <string> +#include "pbd/libpbd_visibility.h" #include "receiver.h" -class TextReceiver : public Receiver +class LIBPBD_API TextReceiver : public Receiver { public: TextReceiver (const std::string &n); diff --git a/libs/pbd/pbd/thrown_error.h b/libs/pbd/pbd/thrown_error.h index 0a63085f11..be68be918f 100644 --- a/libs/pbd/pbd/thrown_error.h +++ b/libs/pbd/pbd/thrown_error.h @@ -19,6 +19,7 @@ #ifndef __qm_thrown_error_h__ #define __qm_thrown_error_h__ +#include "pbd/libpbd_visibility.h" #include "transmitter.h" #define SAFE_THROW(T) \ @@ -26,7 +27,7 @@ (*sent) << rdbuf(); \ throw sent -class ThrownError : public Transmitter { +class LIBPBD_API ThrownError : public Transmitter { public: ThrownError () : Transmitter (Transmitter::Throw) {} protected: diff --git a/libs/pbd/pbd/tokenizer.h b/libs/pbd/pbd/tokenizer.h index 39954194fb..b4b3b107c0 100644 --- a/libs/pbd/pbd/tokenizer.h +++ b/libs/pbd/pbd/tokenizer.h @@ -23,6 +23,7 @@ #include <iterator> #include <string> +#include "pbd/libpbd_visibility.h" #include "pbd/whitespace.h" namespace PBD { @@ -36,7 +37,7 @@ namespace PBD { are discarded. */ template<typename StringType, typename Iter> -unsigned int +LIBPBD_API unsigned int tokenize(const StringType& str, const StringType& delims, Iter it, diff --git a/libs/pbd/pbd/touchable.h b/libs/pbd/pbd/touchable.h index 12f1c443fd..ed7d75df52 100644 --- a/libs/pbd/pbd/touchable.h +++ b/libs/pbd/pbd/touchable.h @@ -19,7 +19,9 @@ #ifndef __pbd_touchable_h__ #define __pbd_touchable_h__ -class Touchable +#include "pbd/libpbd_visibility.h" + +class LIBPBD_API Touchable { public: Touchable() : _delete_after_touch (false) {} @@ -35,7 +37,7 @@ class Touchable }; template<class T> -class DynamicTouchable : public Touchable +class LIBPBD_API DynamicTouchable : public Touchable { public: DynamicTouchable (T& t, void (T::*m)(void)) @@ -51,7 +53,7 @@ class DynamicTouchable : public Touchable }; template<class T1, class T2> -class DynamicTouchable1 : public Touchable +class LIBPBD_API DynamicTouchable1 : public Touchable { public: DynamicTouchable1 (T1& t, void (T1::*m)(T2), T2 a) @@ -68,7 +70,7 @@ class DynamicTouchable1 : public Touchable }; template<class T1, class T2, class T3> -class DynamicTouchable2 : public Touchable +class LIBPBD_API DynamicTouchable2 : public Touchable { public: DynamicTouchable2 (T1& t, void (T1::*m)(T2, T3), T2 a1, T3 a2) diff --git a/libs/pbd/pbd/transmitter.h b/libs/pbd/pbd/transmitter.h index 6da521dd26..d77fca8da3 100644 --- a/libs/pbd/pbd/transmitter.h +++ b/libs/pbd/pbd/transmitter.h @@ -25,7 +25,9 @@ #include <sigc++/sigc++.h> -class Transmitter : public std::stringstream +#include "pbd/libpbd_visibility.h" + +class LIBPBD_API Transmitter : public std::stringstream { public: @@ -100,6 +102,6 @@ endmsg (std::ostream &ostr) } -extern "C" { void pbd_c_error (const char *); } +extern "C" { LIBPBD_API void pbd_c_error (const char *); } #endif // __libmisc_transmitter_h__ diff --git a/libs/pbd/pbd/undo.h b/libs/pbd/pbd/undo.h index e9582a1b53..794e68ce97 100644 --- a/libs/pbd/pbd/undo.h +++ b/libs/pbd/pbd/undo.h @@ -31,11 +31,12 @@ #include <ardourext/misc.h> #endif +#include "pbd/libpbd_visibility.h" #include "pbd/command.h" typedef sigc::slot<void> UndoAction; -class UndoTransaction : public Command +class LIBPBD_API UndoTransaction : public Command { public: UndoTransaction (); @@ -74,7 +75,7 @@ class UndoTransaction : public Command void about_to_explicitly_delete (); }; -class UndoHistory : public PBD::ScopedConnectionList +class LIBPBD_API UndoHistory : public PBD::ScopedConnectionList { public: UndoHistory(); diff --git a/libs/pbd/pbd/unknown_type.h b/libs/pbd/pbd/unknown_type.h index 3610d4f0ed..4d984269a7 100644 --- a/libs/pbd/pbd/unknown_type.h +++ b/libs/pbd/pbd/unknown_type.h @@ -22,7 +22,9 @@ #include <exception> -class unknown_type : public std::exception { +#include "pbd/libpbd_visibility.h" + +class LIBPBD_API unknown_type : public std::exception { public: virtual const char *what() const throw() { return "unknown type"; } }; diff --git a/libs/pbd/pbd/unwind.h b/libs/pbd/pbd/unwind.h index 6062e1f6e1..cf7998fdd4 100644 --- a/libs/pbd/pbd/unwind.h +++ b/libs/pbd/pbd/unwind.h @@ -20,10 +20,12 @@ #ifndef __libpbd_unwinder_h__ #define __libpbd_unwinder_h__ +#include "pbd/libpbd_visibility.h" + namespace PBD { template <typename T> -class Unwinder { +class LIBPBD_API Unwinder { public: Unwinder (T& var, T new_val) : _var (var), _old_val (var) { var = new_val; } ~Unwinder () { _var = _old_val; } diff --git a/libs/pbd/pbd/uuid.h b/libs/pbd/pbd/uuid.h index bf5abfc1ac..7cef916c85 100644 --- a/libs/pbd/pbd/uuid.h +++ b/libs/pbd/pbd/uuid.h @@ -25,9 +25,11 @@ #include <boost/uuid/uuid.hpp> #include <boost/uuid/uuid_generators.hpp> +#include "pbd/libpbd_visibility.h" + namespace PBD { -class UUID : public boost::uuids::uuid { +class LIBPBD_API UUID { public: UUID () diff --git a/libs/pbd/pbd/uuid_boost.h b/libs/pbd/pbd/uuid_boost.h new file mode 100644 index 0000000000..0219603723 --- /dev/null +++ b/libs/pbd/pbd/uuid_boost.h @@ -0,0 +1,60 @@ +/* + Copyright (C) 2008 Paul Davis + Author: Sakari Bergen + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __pbd_uuid_h__ +#define __pbd_uuid_h__ + +#include <string> +#include <boost/uuid/uuid.hpp> +#include <boost/uuid/uuid_generators.hpp> + +#include "pbd/libpbd_visibility.h" + +namespace PBD { + +class LIBPBD_API UUID : public boost::uuids::uuid { + + public: + UUID () + : boost::uuids::uuid (boost::uuids::random_generator()()) {} + UUID (std::string const & str) + : boost::uuids::uuid (boost::uuids::string_generator()(str)) {} + + explicit UUID (boost::uuids::uuid const& u) + : boost::uuids::uuid(u) + {} + + operator boost::uuids::uuid() { + return static_cast<boost::uuids::uuid&>(*this); + } + + operator boost::uuids::uuid() const { + return static_cast<boost::uuids::uuid const&>(*this); + } + + UUID& operator= (std::string const & str); + std::string to_s () const; + + operator bool() const { return !is_nil(); } +}; + +} // namespace PBD + +#endif // __pbd_uuid_h__ diff --git a/libs/pbd/pbd/whitespace.h b/libs/pbd/pbd/whitespace.h index 444be112b0..5816b84cae 100644 --- a/libs/pbd/pbd/whitespace.h +++ b/libs/pbd/pbd/whitespace.h @@ -22,11 +22,13 @@ #include <string> +#include "pbd/libpbd_visibility.h" + namespace PBD { // returns the empty string if the entire string is whitespace // so check length after calling. -extern void strip_whitespace_edges (std::string& str); + LIBPBD_API extern void strip_whitespace_edges (std::string& str); } // namespace PBD diff --git a/libs/pbd/pbd/xml++.h b/libs/pbd/pbd/xml++.h index bff863e4c6..e6795e5d45 100644 --- a/libs/pbd/pbd/xml++.h +++ b/libs/pbd/pbd/xml++.h @@ -17,6 +17,9 @@ */ +#ifndef __XML_H +#define __XML_H + /* xml++.h * libxml++ and this file are copyright (C) 2000 by Ari Johnson, and * are covered by the GNU Lesser General Public License, which should be @@ -34,8 +37,7 @@ #include <libxml/tree.h> #include <boost/shared_ptr.hpp> -#ifndef __XML_H -#define __XML_H +#include "pbd/libpbd_visibility.h" class XMLTree; class XMLNode; @@ -50,7 +52,7 @@ typedef XMLPropertyList::iterator XMLPropertyIterator; typedef XMLPropertyList::const_iterator XMLPropertyConstIterator; typedef std::map<std::string, XMLProperty*> XMLPropertyMap; -class XMLTree { +class LIBPBD_API XMLTree { public: XMLTree(); XMLTree(const std::string& fn, bool validate = false); @@ -90,7 +92,7 @@ private: int _compression; }; -class XMLNode { +class LIBPBD_API XMLNode { public: XMLNode(const std::string& name); XMLNode(const std::string& name, const std::string& content); @@ -148,7 +150,7 @@ private: void clear_lists (); }; -class XMLProperty { +class LIBPBD_API XMLProperty { public: XMLProperty(const std::string& n, const std::string& v = std::string()); ~XMLProperty(); @@ -162,7 +164,7 @@ private: std::string _value; }; -class XMLException: public std::exception { +class LIBPBD_API XMLException: public std::exception { public: explicit XMLException(const std::string msg) : _message(msg) {} virtual ~XMLException() throw() {} diff --git a/libs/pbd/wscript b/libs/pbd/wscript index 59f7a3368b..de831c92a2 100644 --- a/libs/pbd/wscript +++ b/libs/pbd/wscript @@ -89,7 +89,7 @@ def options(opt): def configure(conf): conf.load('compiler_cxx') autowaf.build_version_files(path_prefix+'pbd/version.h', path_prefix+'version.cc', - 'libpbd', MAJOR, MINOR, MICRO) + 'libpbd', MAJOR, MINOR, MICRO, 'LIBPBD_API', 'pbd/libpbd_visibility.h') autowaf.configure(conf) autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML') autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0') @@ -115,10 +115,17 @@ def build(bld): if bld.is_defined ('INTERNAL_SHARED_LIBS'): print('BUILD SHARED LIB') obj = bld.shlib(features = 'cxx cxxshlib', source=libpbd_sources) + obj.defines = [ 'LIBPBD_DLL=1', + 'LIBPBD_DLL_EXPORTS=1' + ] + obj.cxxflags = [ '-fvisibility=hidden' ] + obj.cflags = [ '-fvisibility=hidden' ] else: print('BUILD STATIC LIB') obj = bld.stlib(features = 'cxx cxxstlib', source=libpbd_sources) obj.cxxflags = [ '-fPIC' ] + obj.cflags = [ '-fPIC' ] + obj.defines = [] if bld.is_defined('DEBUG_RT_ALLOC'): obj.source += 'debug_rt_alloc.c' @@ -138,7 +145,7 @@ def build(bld): obj.uselib += ' OSX' obj.vnum = LIBPBD_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') - obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"'] + obj.defines += [ 'PACKAGE="' + I18N_PACKAGE + '"' ] if bld.env['build_target'] == 'x86_64': obj.defines += [ 'USE_X86_64_ASM' ] diff --git a/libs/surfaces/control_protocol/control_protocol/basic_ui.h b/libs/surfaces/control_protocol/control_protocol/basic_ui.h index 9bbfe65979..180688e616 100644 --- a/libs/surfaces/control_protocol/control_protocol/basic_ui.h +++ b/libs/surfaces/control_protocol/control_protocol/basic_ui.h @@ -32,21 +32,14 @@ #include "timecode/time.h" -#include "ardour/visibility.h" +#include "control_protocol/visibility.h" namespace ARDOUR { class Session; class SessionEvent; } -#ifdef ARDOURCP_DLL_EXPORTS // defined if we are building the ARDOUR Control Protocol DLL (instead of using it) - #define ARDOURCP_API LIBARDOUR_HELPER_DLL_EXPORT -#else - #define ARDOURCP_API LIBARDOUR_HELPER_DLL_IMPORT -#endif -#define ARDOURCP_LOCAL LIBARDOUR_HELPER_DLL_LOCAL - -class ARDOURCP_API BasicUI { +class LIBCONTROLCP_API BasicUI { public: BasicUI (ARDOUR::Session&); virtual ~BasicUI (); diff --git a/libs/surfaces/control_protocol/control_protocol/control_protocol.h b/libs/surfaces/control_protocol/control_protocol/control_protocol.h index 37322530e4..05315fc40a 100644 --- a/libs/surfaces/control_protocol/control_protocol/control_protocol.h +++ b/libs/surfaces/control_protocol/control_protocol/control_protocol.h @@ -30,6 +30,7 @@ #include "pbd/stateful.h" #include "pbd/signals.h" +#include "control_protocol/visibility.h" #include "control_protocol/basic_ui.h" #include "control_protocol/types.h" @@ -46,7 +47,7 @@ class Route; class Session; class Bundle; -class ARDOURCP_API ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI +class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI { public: ControlProtocol (Session&, std::string name); diff --git a/libs/surfaces/control_protocol/control_protocol/visibility.h b/libs/surfaces/control_protocol/control_protocol/visibility.h new file mode 100644 index 0000000000..40c83b8580 --- /dev/null +++ b/libs/surfaces/control_protocol/control_protocol/visibility.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2013 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __libcontrolcp_visibility_h__ +#define __libcontrolcp_visibility_h__ + +/* _WIN32 is defined by most compilers targetting Windows, but within the + * controlcp source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending + * on how a Windows build is built. + */ + +#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) + #define LIBCONTROLCP_DLL_IMPORT __declspec(dllimport) + #define LIBCONTROLCP_DLL_EXPORT __declspec(dllexport) + #define LIBCONTROLCP_DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define LIBCONTROLCP_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBCONTROLCP_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBCONTROLCP_DLL_LOCAL __attribute__ ((visibility ("hidden"))) + #else + #define LIBCONTROLCP_DLL_IMPORT + #define LIBCONTROLCP_DLL_EXPORT + #define LIBCONTROLCP_DLL_LOCAL + #endif +#endif + +#ifdef LIBCONTROLCP_DLL // libcontrolcp is a DLL +#ifdef LIBCONTROLCP_DLL_EXPORTS // defined if we are building the libcontrolcp DLL (instead of using it) + #define LIBCONTROLCP_API LIBCONTROLCP_DLL_EXPORT +#else + #define LIBCONTROLCP_API LIBCONTROLCP_DLL_IMPORT +#endif +#define LIBCONTROLCP_LOCAL LIBCONTROLCP_DLL_LOCAL +#else /* static lib, not DLL */ +#define LIBCONTROLCP_API +#define LIBCONTROLCP_LOCAL +#endif + +#endif /* __libcontrolcp_visibility_h__ */ diff --git a/libs/surfaces/control_protocol/wscript b/libs/surfaces/control_protocol/wscript index a4331e7b76..10ec7f6c95 100644 --- a/libs/surfaces/control_protocol/wscript +++ b/libs/surfaces/control_protocol/wscript @@ -13,6 +13,11 @@ LIBARDOUR_CP_LIB_VERSION = '4.1.0' top = '.' out = 'build' +controlcp_sources = [ + 'basic_ui.cc', + 'control_protocol.cc', + ] + def options(opt): autowaf.set_options(opt) @@ -20,13 +25,21 @@ def configure(conf): autowaf.configure(conf) def build(bld): - obj = bld(features = 'cxx cxxshlib') - obj.source = ''' - basic_ui.cc - control_protocol.cc - ''' + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj = bld.shlib(features = 'c cxx cshlib cxxshlib', source=controlcp_sources) + # defines for this library + obj.defines = [ 'LIBCONTROLCP_DLL=1', 'LIBCONTROLCP_DLL_EXPORTS=1' ] + # internal shared libs that we use + obj.defines += [ 'LIBPBD_DLL=1', 'LIBARDOUR_DLL=1', 'LIBEVORAL_DLL=1' ] + obj.cxxflags = [ '-fvisibility=hidden' ] + obj.cflags = [ '-fvisibility=hidden' ] + else: + obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=controlcp_sources) + obj.cxxflags = [ '-fPIC' ] + obj.defines = [ ] + obj.export_includes = ['.', './control_protocol' ] - obj.cxxflags = '-DPACKAGE="ardour_cp" -fPIC' + obj.defines += [ 'PACKAGE="ardour_cp"' ] obj.includes = ['.', './control_protocol'] obj.defines = [ 'ARDOURCP_DLL_EXPORTS' ] obj.name = 'libardour_cp' diff --git a/libs/surfaces/frontier/wscript b/libs/surfaces/frontier/wscript index c23b3cf3c9..aa7d119895 100644 --- a/libs/surfaces/frontier/wscript +++ b/libs/surfaces/frontier/wscript @@ -34,11 +34,13 @@ def build(bld): midicontrollable.cc ''' obj.export_includes = ['./generic_midi'] - obj.cxxflags = '-DPACKAGE="ardour_genericmidi"' + obj.defines = [ 'PACKAGE="ardour_frontier"' ] + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1' ] obj.includes = ['.', './generic_midi'] obj.name = 'libgeneric_midi' obj.target = 'generic_midi' - obj.use = 'libardour libsurfaces' + obj.use = 'libardour libardourcp' obj.vnum = LIBSURFACES_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'surfaces') diff --git a/libs/surfaces/generic_midi/wscript b/libs/surfaces/generic_midi/wscript index ffd4dd3698..f3868fadfc 100644 --- a/libs/surfaces/generic_midi/wscript +++ b/libs/surfaces/generic_midi/wscript @@ -30,7 +30,9 @@ def build(bld): midiaction.cc ''' obj.export_includes = ['.'] - obj.cxxflags = '-DPACKAGE="ardour_genericmidi"' + obj.defines = [ 'PACKAGE="ardour_genericmidi"' ] + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBGTKMM2EXT_DLL=1', 'LIBEVORAL_DLL=1' ] obj.includes = ['.', './generic_midi'] obj.name = 'libardour_generic_midi' obj.target = 'ardour_generic_midi' @@ -39,7 +41,7 @@ def build(bld): obj.use = 'libardour libardour_cp libgtkmm2ext libpbd' obj.vnum = LIBARDOUR_GENERIC_MIDI_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'surfaces') - obj.defines = [ + obj.defines += [ 'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"' ] diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h index 4669247726..81e1436938 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.h +++ b/libs/surfaces/mackie/mackie_control_protocol.h @@ -28,6 +28,7 @@ #include <pthread.h> #include <boost/smart_ptr.hpp> +#define ABSTRACT_UI_EXPORTS #include "pbd/abstract_ui.h" #include "midi++/types.h" #include "ardour/types.h" diff --git a/libs/surfaces/mackie/wscript b/libs/surfaces/mackie/wscript index e097772e7a..a7177bf0a6 100644 --- a/libs/surfaces/mackie/wscript +++ b/libs/surfaces/mackie/wscript @@ -42,7 +42,9 @@ def build(bld): types.cc ''' obj.export_includes = ['./mackie'] - obj.cxxflags = '-DPACKAGE="ardour_mackie"' + obj.defines = [ 'PACKAGE="ardour_mackie"' ] + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBGTKMM2EXT_DLL=1', 'LIBEVORAL_DLL=1' ] # need ../libs because some GTK2 header files require stuff there obj.includes = ['.', '../libs'] obj.name = 'libardour_mcp' diff --git a/libs/surfaces/osc/osc.h b/libs/surfaces/osc/osc.h index 84dd0d9c86..2479eceaff 100644 --- a/libs/surfaces/osc/osc.h +++ b/libs/surfaces/osc/osc.h @@ -31,6 +31,7 @@ #include <glibmm/main.h> +#define ABSTRACT_UI_EXPORTS #include "pbd/abstract_ui.h" #include "ardour/types.h" diff --git a/libs/surfaces/osc/wscript b/libs/surfaces/osc/wscript index f3046658ec..102b7426bd 100644 --- a/libs/surfaces/osc/wscript +++ b/libs/surfaces/osc/wscript @@ -27,7 +27,9 @@ def build(bld): interface.cc ''' obj.export_includes = ['.'] - obj.cxxflags = '-DPACKAGE="ardour_cp"' + obj.defines = [ 'PACKAGE="ardour_osc"' ] + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] obj.includes = ['.', './osc'] obj.name = 'libardour_osc' obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] diff --git a/libs/surfaces/tranzport/wscript b/libs/surfaces/tranzport/wscript index 3c479e72d8..a73cec2832 100644 --- a/libs/surfaces/tranzport/wscript +++ b/libs/surfaces/tranzport/wscript @@ -39,7 +39,9 @@ def build(bld): wheel_modes.cc ''' obj.export_includes = ['./tranzport'] - obj.cxxflags = '-DPACKAGE="ardour_tranzport"' + obj.defines = [ 'PACKAGE="ardour_tranzport"' ] + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBGTKMM2EXT_DLL=1' ] obj.includes = ['.', './tranzport'] obj.name = 'libardour_tranzport' obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] diff --git a/libs/surfaces/wiimote/wiimote.h b/libs/surfaces/wiimote/wiimote.h index f6ac8edc41..6edadf6c64 100644 --- a/libs/surfaces/wiimote/wiimote.h +++ b/libs/surfaces/wiimote/wiimote.h @@ -23,6 +23,7 @@ #include <cwiid.h> +#define ABSTRACT_UI_EXPORTS #include "pbd/abstract_ui.h" #include "ardour/types.h" #include "control_protocol/control_protocol.h" diff --git a/libs/surfaces/wiimote/wscript b/libs/surfaces/wiimote/wscript index f565927360..4dca1fcdb0 100644 --- a/libs/surfaces/wiimote/wscript +++ b/libs/surfaces/wiimote/wscript @@ -25,7 +25,9 @@ def build(bld): interface.cc ''' obj.export_includes = ['./wiimote'] - obj.cxxflags = '-DPACKAGE="ardour_wiimote"' + obj.defines = [ 'PACKAGE="ardour_wiimote"' ] + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBGTKMM2EXT_DLL=1', 'LIBEVORAL_DLL=1' ] obj.includes = ['.', '../libs'] obj.name = 'libardour_wiimote' obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] Binary files differ |