1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-18 08:31:13 +02:00

ModuleManager doesn't specially start up mod-script-pipe...

... The standard module dispatch can do that.
This commit is contained in:
Paul Licameli
2020-11-14 09:34:30 -05:00
parent c7834257d8
commit bbda68c079
4 changed files with 18 additions and 39 deletions

View File

@@ -15,6 +15,7 @@
#include <wx/wx.h>
#include "ScripterCallback.h"
#include "commands/ScriptCommandRelay.h"
/*
There are several functions that can be used in a GUI module.
@@ -23,10 +24,6 @@ There are several functions that can be used in a GUI module.
The most useful function. See the example in this
file. It has several cases/options in it.
//#define scriptFnName "RegScriptServerFunc"
This function is run from a non gui thread. It was originally
created for the benefit of mod-script-pipe.
//#define mainPanelFnName "MainPanelFunc"
This function is the hijacking function, to take over Audacity
and replace the main project window with our own wxFrame.
@@ -40,8 +37,6 @@ typedef DLL_IMPORT int (*tpExecScriptServerFunc)( wxString * pIn, wxString * pOu
static tpExecScriptServerFunc pScriptServerFn=NULL;
DEFINE_MODULE_ENTRIES
extern "C" {
// And here is our special registration function.
@@ -56,6 +51,18 @@ int DLL_API RegScriptServerFunc( tpExecScriptServerFunc pFn )
return 4;
}
DEFINE_VERSION_CHECK
extern "C" DLL_API int ModuleDispatch(ModuleDispatchTypes type)
{
switch (type) {
case ModuleInitialize:
ScriptCommandRelay::StartScriptServer(RegScriptServerFunc);
break;
default:
break;
}
return 1;
}
wxString Str2;
wxArrayString aStr;