mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-18 16:41:14 +02:00
Don't duplicate defs of DLL_IMPORT, DLL_API, ModuleDispatchTypes
This commit is contained in:
@@ -27,8 +27,7 @@ click from the menu into the actual function to be called.
|
|||||||
|
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
#include "ModNullCallback.h"
|
#include "ModNullCallback.h"
|
||||||
|
#include "ModuleConstants.h"
|
||||||
#include "ModuleManager.h"
|
|
||||||
#include "ShuttleGui.h"
|
#include "ShuttleGui.h"
|
||||||
#include "Project.h"
|
#include "Project.h"
|
||||||
#include "commands/CommandManager.h"
|
#include "commands/CommandManager.h"
|
||||||
@@ -55,14 +54,6 @@ and replace the main project window with our own wxFrame.
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define DLL_API _declspec(dllexport)
|
|
||||||
#define DLL_IMPORT _declspec(dllimport)
|
|
||||||
#else
|
|
||||||
#define DLL_API __attribute__ ((visibility("default")))
|
|
||||||
#define DLL_IMPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// derived from wxFrame as it needs to be some kind of event handler.
|
// derived from wxFrame as it needs to be some kind of event handler.
|
||||||
class ModNullCallback : public wxFrame
|
class ModNullCallback : public wxFrame
|
||||||
{
|
{
|
||||||
|
@@ -4,15 +4,3 @@
|
|||||||
// that uses this DLL. This way any other project whose source files include this file see
|
// that uses this DLL. This way any other project whose source files include this file see
|
||||||
// MOD_NULL_DLL_API functions as being imported from a DLL, whereas this DLL sees symbols
|
// MOD_NULL_DLL_API functions as being imported from a DLL, whereas this DLL sees symbols
|
||||||
// defined with this macro as being exported.
|
// defined with this macro as being exported.
|
||||||
|
|
||||||
|
|
||||||
/* Magic for dynamic library import and export. This is unfortunately
|
|
||||||
* compiler-specific because there isn't a standard way to do it. Currently it
|
|
||||||
* works with the Visual Studio compiler for windows, and for GCC 4+. Anything
|
|
||||||
* else gets all symbols made public, which gets messy */
|
|
||||||
/* The Visual Studio implementation */
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define DLL_API _declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define DLL_API __attribute__ ((visibility("default")))
|
|
||||||
#endif
|
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "AudioIOBase.h"
|
#include "AudioIOBase.h"
|
||||||
#include "CommonCommandFlags.h"
|
#include "CommonCommandFlags.h"
|
||||||
#include "ModuleManager.h"
|
#include "ModuleConstants.h"
|
||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
#include "Project.h"
|
#include "Project.h"
|
||||||
#include "ShuttleGui.h"
|
#include "ShuttleGui.h"
|
||||||
@@ -134,12 +134,6 @@ extern "C"
|
|||||||
{
|
{
|
||||||
static NyqBench *gBench = NULL;
|
static NyqBench *gBench = NULL;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define DLL_API _declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define DLL_API __attribute__ ((visibility("default")))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern DLL_API const wxChar * GetVersionString();
|
extern DLL_API const wxChar * GetVersionString();
|
||||||
// GetVersionString
|
// GetVersionString
|
||||||
// REQUIRED for the module to be accepted by Audacity.
|
// REQUIRED for the module to be accepted by Audacity.
|
||||||
|
@@ -37,25 +37,7 @@ and replace the main project window with our own wxFrame.
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#include "ModuleConstants.h"
|
||||||
#define DLL_API _declspec(dllexport)
|
|
||||||
#define DLL_IMPORT _declspec(dllimport)
|
|
||||||
#else
|
|
||||||
#define DLL_API __attribute__ ((visibility("default")))
|
|
||||||
#define DLL_IMPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
ModuleInitialize,
|
|
||||||
ModuleTerminate,
|
|
||||||
AppInitialized,
|
|
||||||
AppQuiting,
|
|
||||||
ProjectInitialized,
|
|
||||||
ProjectClosing
|
|
||||||
} ModuleDispatchTypes;
|
|
||||||
|
|
||||||
|
|
||||||
extern void PipeServer();
|
extern void PipeServer();
|
||||||
typedef DLL_IMPORT int (*tpExecScriptServerFunc)( wxString * pIn, wxString * pOut);
|
typedef DLL_IMPORT int (*tpExecScriptServerFunc)( wxString * pIn, wxString * pOut);
|
||||||
|
@@ -179,6 +179,7 @@ list( APPEND SOURCES
|
|||||||
Mix.h
|
Mix.h
|
||||||
MixerBoard.cpp
|
MixerBoard.cpp
|
||||||
MixerBoard.h
|
MixerBoard.h
|
||||||
|
ModuleConstants.h
|
||||||
ModuleManager.cpp
|
ModuleManager.cpp
|
||||||
ModuleManager.h
|
ModuleManager.h
|
||||||
NoteTrack.cpp
|
NoteTrack.cpp
|
||||||
|
34
src/ModuleConstants.h
Normal file
34
src/ModuleConstants.h
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
Audacity: A Digital Audio Editor
|
||||||
|
|
||||||
|
ModuleConstants.h
|
||||||
|
|
||||||
|
Paul Licameli split from ModuleManager.h
|
||||||
|
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
#ifndef __AUDACITY_MODULE_CONSTANTS__
|
||||||
|
#define __AUDACITY_MODULE_CONSTANTS__
|
||||||
|
|
||||||
|
#define ModuleDispatchName "ModuleDispatch"
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define DLL_API _declspec(dllexport)
|
||||||
|
#define DLL_IMPORT _declspec(dllimport)
|
||||||
|
#else
|
||||||
|
#define DLL_API __attribute__ ((visibility("default")))
|
||||||
|
#define DLL_IMPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
enum ModuleDispatchTypes
|
||||||
|
{
|
||||||
|
ModuleInitialize,
|
||||||
|
ModuleTerminate,
|
||||||
|
AppInitialized,
|
||||||
|
AppQuiting,
|
||||||
|
ProjectInitialized,
|
||||||
|
ProjectClosing
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@@ -30,17 +30,8 @@ wxWindow * MakeHijackPanel();
|
|||||||
//
|
//
|
||||||
// wxPluginManager would be MUCH better, but it's an "undocumented" framework.
|
// wxPluginManager would be MUCH better, but it's an "undocumented" framework.
|
||||||
//
|
//
|
||||||
#define ModuleDispatchName "ModuleDispatch"
|
|
||||||
|
|
||||||
typedef enum
|
#include "ModuleConstants.h"
|
||||||
{
|
|
||||||
ModuleInitialize,
|
|
||||||
ModuleTerminate,
|
|
||||||
AppInitialized,
|
|
||||||
AppQuiting,
|
|
||||||
ProjectInitialized,
|
|
||||||
ProjectClosing
|
|
||||||
} ModuleDispatchTypes;
|
|
||||||
|
|
||||||
typedef int (*fnModuleDispatch)(ModuleDispatchTypes type);
|
typedef int (*fnModuleDispatch)(ModuleDispatchTypes type);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user