1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-18 14:41:20 +01:00

Added AUDACITY_DLL_API and similar to export more of our classes. This is a tiny adaptation of a patch by Stephen Parry for enabling his Eutychus plug-in. See audacity-devel thread 'Second Exports Patch' of Jan 11th 2014.

This commit is contained in:
james.k.crook@gmail.com
2014-01-13 21:09:14 +00:00
parent 0e7e4dbd86
commit 396486d3a6
5 changed files with 20 additions and 12 deletions

View File

@@ -50,7 +50,15 @@ class ShuttleGui;
class TagsEditor; class TagsEditor;
class ComboEditor; class ComboEditor;
WX_DECLARE_STRING_HASH_MAP(wxString, TagMap); // We want a macro call like this:
// WX_DECLARE_USER_EXPORTED_STRING_HASH_MAP(wxString, TagMap, AUDACITY_DLL_API);
// Which wxWidgets does not supply!
// So use this undocumented variant:
WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxString, TagMap,class AUDACITY_DLL_API );
// Doing this means we can export class Tags without any worry,
// as every class it uses, including TagMap, is then exported.
// It's better than using #pragma warning(disable: 4251)
// and relying on the relevant parts of class Tags being private.
#define TAG_TITLE wxT("TITLE") #define TAG_TITLE wxT("TITLE")
#define TAG_ARTIST wxT("ARTIST") #define TAG_ARTIST wxT("ARTIST")
@@ -62,7 +70,7 @@ WX_DECLARE_STRING_HASH_MAP(wxString, TagMap);
#define TAG_SOFTWARE wxT("Software") #define TAG_SOFTWARE wxT("Software")
#define TAG_COPYRIGHT wxT("Copyright") #define TAG_COPYRIGHT wxT("Copyright")
class Tags: public XMLTagHandler { class AUDACITY_DLL_API Tags: public XMLTagHandler {
public: public:
Tags(); // constructor Tags(); // constructor

View File

@@ -86,8 +86,8 @@ static void ExportCallback(void *cbdata, int index)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#include <wx/arrimpl.cpp> #include <wx/arrimpl.cpp>
WX_DEFINE_OBJARRAY(ExportPluginArray); WX_DEFINE_USER_EXPORTED_OBJARRAY(ExportPluginArray);
WX_DEFINE_OBJARRAY(FormatInfoArray); WX_DEFINE_USER_EXPORTED_OBJARRAY(FormatInfoArray);
ExportPlugin::ExportPlugin() ExportPlugin::ExportPlugin()
{ {

View File

@@ -29,7 +29,7 @@ class FileDialog;
class TimeTrack; class TimeTrack;
class Mixer; class Mixer;
class FormatInfo class AUDACITY_DLL_API FormatInfo
{ {
public: public:
FormatInfo(){}; FormatInfo(){};
@@ -43,12 +43,12 @@ class FormatInfo
bool mCanMetaData; bool mCanMetaData;
}; };
WX_DECLARE_OBJARRAY(FormatInfo, FormatInfoArray); WX_DECLARE_USER_EXPORTED_OBJARRAY(FormatInfo, FormatInfoArray, AUDACITY_DLL_API);
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// ExportPlugin // ExportPlugin
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
class ExportPlugin class AUDACITY_DLL_API ExportPlugin
{ {
public: public:
@@ -129,12 +129,12 @@ private:
FormatInfoArray mFormatInfos; FormatInfoArray mFormatInfos;
}; };
WX_DECLARE_OBJARRAY(ExportPlugin *, ExportPluginArray); WX_DECLARE_USER_EXPORTED_OBJARRAY(ExportPlugin *, ExportPluginArray, AUDACITY_DLL_API);
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Exporter // Exporter
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
class Exporter class AUDACITY_DLL_API Exporter
{ {
public: public:

View File

@@ -14,7 +14,7 @@
#include "XMLTagHandler.h" #include "XMLTagHandler.h"
class XMLFileReader { class AUDACITY_DLL_API XMLFileReader {
public: public:
XMLFileReader(); XMLFileReader();
virtual ~XMLFileReader(); virtual ~XMLFileReader();

View File

@@ -16,7 +16,7 @@
/// ///
/// XMLWriter /// XMLWriter
/// ///
class XMLWriter { class AUDACITY_DLL_API XMLWriter {
public: public:
@@ -72,7 +72,7 @@ class XMLWriter {
/// ///
/// XMLFileWriter /// XMLFileWriter
/// ///
class XMLFileWriter:public wxFFile, public XMLWriter { class AUDACITY_DLL_API XMLFileWriter:public wxFFile, public XMLWriter {
public: public: