mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-18 08:31:13 +02:00
A macro for boilerplate to generate required module entry points
This commit is contained in:
@@ -19,10 +19,6 @@
|
||||
/*
|
||||
There are several functions that can be used in a GUI module.
|
||||
|
||||
//#define versionFnName "GetVersionString"
|
||||
If the version is wrong, the module will be rejected.
|
||||
That is it will be loaded and then unloaded.
|
||||
|
||||
//#define ModuleDispatchName "ModuleDispatch"
|
||||
The most useful function. See the example in this
|
||||
file. It has several cases/options in it.
|
||||
@@ -44,40 +40,10 @@ typedef DLL_IMPORT int (*tpExecScriptServerFunc)( wxString * pIn, wxString * pOu
|
||||
static tpExecScriptServerFunc pScriptServerFn=NULL;
|
||||
|
||||
|
||||
DEFINE_MODULE_ENTRIES
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
DLL_API const wxChar * GetVersionString()
|
||||
{
|
||||
// Make sure that this version of the module requires the version
|
||||
// of Audacity it is built with.
|
||||
// For now the versions must match exactly for Audacity to
|
||||
// agree to load the module.
|
||||
return AUDACITY_VERSION_STRING;
|
||||
}
|
||||
|
||||
extern int DLL_API ModuleDispatch(ModuleDispatchTypes type);
|
||||
// ModuleDispatch
|
||||
// is called by Audacity to initialize/terminate the module
|
||||
// We don't (yet) do anything in this, since we have a special function for the scripter
|
||||
// all we need to do is return 1.
|
||||
int ModuleDispatch(ModuleDispatchTypes type){
|
||||
switch (type){
|
||||
case AppInitialized:{
|
||||
}
|
||||
break;
|
||||
case AppQuiting: {
|
||||
}
|
||||
break;
|
||||
case ProjectInitialized: {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
// And here is our special registration function.
|
||||
int DLL_API RegScriptServerFunc( tpExecScriptServerFunc pFn )
|
||||
{
|
||||
|
Reference in New Issue
Block a user