summaryrefslogtreecommitdiff
path: root/plugins/example
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-10-15 04:34:38 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-10-15 04:34:38 +0300
commit2760d3e7c0de77ddb969db78349ec472a20299bf (patch)
treeeeb72292455490e0ee34f8e1a0dc2e7709316975 /plugins/example
parentf84a9c3ef28306d4d4297c1e41ed37b624831cfc (diff)
modified: plugins/example/main.cpp
Diffstat (limited to 'plugins/example')
-rw-r--r--plugins/example/main.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/example/main.cpp b/plugins/example/main.cpp
index c435207..edeb9e3 100644
--- a/plugins/example/main.cpp
+++ b/plugins/example/main.cpp
@@ -13,6 +13,10 @@ PLUGINLINK *pluginLink;
IMPLEMENT_APP_NO_MAIN(wxPluginForEvilCore) //main() does not needed, we will create instance by hand later
+bool wxPluginForEvilCore::OnInit()
+{
+ return true;
+}
/*HINSTANCE hInst;
@@ -32,28 +36,29 @@ PLUGININFO pluginInfo =
0x00010101 //version 0.1.1.1
};
-extern "C" PLUGININFO* SetPluginInfo()
+extern "C" PLUGININFO* set_plugin_info()
{
return &pluginInfo; //necessary, our plugin info for core can recognize us
}
-extern "C" int Load(PLUGINLINK *link) //basic initialisation, registering new functions, do other basic initialisation, you can create infinite loop, or other code which use many time here, only fast basic initialisation
+extern "C" int load(PLUGINLINK *link) //basic initialisation, registering new functions, do other basic initialisation, you can create infinite loop, or other code which use many time here, only fast basic initialisation
{
pluginLink = link; //necessary
//some basic initialisation code
return 0; //all ok, retrun 0
}
-extern "C" int OnModulesLoaded() //load main code from here, all services from other plugins must be avaible here
+extern "C" int on_modules_loaded() //load main code from here, all services from other plugins must be avaible here
{
wxApp::SetInstance(new wxPluginForEvilCore()); //create instance, i think here is right place, not in load where we do only basic initialisation
// wxEntry(GetModuleHandle(NULL),NULL,NULL,SW_SHOW); //here we need to get module handle somehow, commented string is for windows only
return 0;
}
-extern "C" int Unload()
+extern "C" int unload()
{
//do some cleanup on exit
+ wxEntryCleanup(); //call it before, or after other cleanup
return 0;
}