From 1948342aa869ad284d3bed11abbec03bc56ac612 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Tue, 27 Feb 2018 01:00:47 +0800 Subject: the fscking initial commit. --- Callback.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Callback.cpp (limited to 'Callback.cpp') diff --git a/Callback.cpp b/Callback.cpp new file mode 100644 index 0000000..b96a30a --- /dev/null +++ b/Callback.cpp @@ -0,0 +1,32 @@ +#include "stdafx.h" +#include "Callback.h" +#include "Menu.h" + +//static plugin interface that allow direct communication with Virtools Dev +PluginInterface* s_Plugininterface = NULL; + + +//main plugin callback for Virtools Dev +void PluginCallback(PluginInfo::CALLBACK_REASON reason,PluginInterface* plugininterface) +{ + switch(reason) + { + case PluginInfo::CR_LOAD: + { + s_Plugininterface = plugininterface; + InitMenu(); + UpdateMenu(); + }break; + case PluginInfo::CR_UNLOAD: + { + RemoveMenu(); + s_Plugininterface = NULL; + }break; + case PluginInfo::CR_NEWCOMPOSITIONNAME: + { + }break; + case PluginInfo::CR_NOTIFICATION: + { + }break; + } +} -- cgit v1.2.3