Audacity  3.0.3
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 \
41 extern "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 }
51 
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 \
55 DEFINE_VERSION_CHECK \
56 extern "C" DLL_API int ModuleDispatch(ModuleDispatchTypes type){ return 1; }
57 
59 UTILITY_API extern const std::wstring AppName;
60 
61 #endif
AppName
UTILITY_API const std::wstring AppName
This program's name.
Definition: ModuleConstants.cpp:15
AppQuiting
@ AppQuiting
Definition: ModuleConstants.h:31
ModuleDispatchTypes
ModuleDispatchTypes
Definition: ModuleConstants.h:27
ModuleTerminate
@ ModuleTerminate
Definition: ModuleConstants.h:29
AppInitialized
@ AppInitialized
Definition: ModuleConstants.h:30
ProjectInitialized
@ ProjectInitialized
Definition: ModuleConstants.h:32
ProjectClosing
@ ProjectClosing
Definition: ModuleConstants.h:33
ModuleInitialize
@ ModuleInitialize
Definition: ModuleConstants.h:28