Audacity 3.2.0
ModuleConstants.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 ModuleConstants.h
6
7 Paul Licameli split from ModuleManager.h
8
9**********************************************************************/
10
11#ifndef __AUDACITY_MODULE_CONSTANTS__
12#define __AUDACITY_MODULE_CONSTANTS__
13
14#include <string>
15
16#define ModuleDispatchName "ModuleDispatch"
17
18#ifdef _MSC_VER
19 #define DLL_API _declspec(dllexport)
20 #define DLL_IMPORT _declspec(dllimport)
21#else
22 #define DLL_API __attribute__ ((visibility("default")))
23 #define DLL_IMPORT
24#endif
25
27{
34};
35
36// Macro generates one of the required entry points of a module
37// GetVersionString
38// REQUIRED for the module to be accepted by Audacity.
39// Without it Audacity will see a version number mismatch.
40#define DEFINE_VERSION_CHECK \
41extern "C" { \
42 DLL_API const wchar_t * GetVersionString() \
43 { \
44 /* Make sure that this version of the module requires the version \
45 of Audacity it is built with. \
46 For now, the versions must match exactly for Audacity to \
47 agree to load the module. */ \
48 return AUDACITY_VERSION_STRING; \
49 } \
50}
52// Macro generates minimal required entry points to load a module
53// Use it when you don't care about event notifications from the application
54#define DEFINE_MODULE_ENTRIES \
55DEFINE_VERSION_CHECK \
56extern "C" DLL_API int ModuleDispatch(ModuleDispatchTypes type){ return 1; }
57
59UTILITY_API extern const std::wstring AppName;
60
61#endif
UTILITY_API const std::wstring AppName
This program's name.
ModuleDispatchTypes
@ AppInitialized
@ ModuleInitialize
@ AppQuiting
@ ProjectClosing
@ ProjectInitialized
@ ModuleTerminate