From d97a417012d7e510b08c2e7d9a71997605c48e88 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Wed, 1 Jun 2016 23:02:21 +0800 Subject: Initial event modifier and event filter stub. --- include/qmpcorepublic.hpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/qmpcorepublic.hpp b/include/qmpcorepublic.hpp index 13afe3e..d578018 100644 --- a/include/qmpcorepublic.hpp +++ b/include/qmpcorepublic.hpp @@ -3,15 +3,16 @@ #include #include #include -//This struct is used by event reader callbacks and event handler callbacks -//as caller data struct #ifdef _WIN32 #define EXPORTSYM __declspec(dllexport) #else #define EXPORTSYM __attribute__ ((visibility ("default"))) #endif -struct SEventCallBackData +//This struct is used by event reader callbacks and event handler callbacks +//as caller data struct +class SEventCallBackData { +public: uint32_t time,type,p1,p2; SEventCallBackData(uint32_t _t,uint32_t _p1,uint32_t _p2,uint32_t _tm){type=_t;p1=_p1;p2=_p2;time=_tm;} }; @@ -24,7 +25,7 @@ class IMidiCallBack virtual void callBack(void* callerdata,void* userdata)=0; virtual ~IMidiCallBack(){} }; -//Main plugin pinterface. +//Main plugin interface. class qmpPluginIntf { public: @@ -75,6 +76,15 @@ class qmpPluginAPI virtual std::wstring getWTitle(); virtual std::string getChannelPresetString(int ch); + //WARNING!!: This function should be called from event reader callbacks only and + //it is somehow dangerous -- other plugins might be unaware of the removal of the + //event. The design might be modified afterward. + virtual void discardLastEvent(); + //WARNING!!: This function should be called from event reader callbacks only and + //it is somehow dangerous -- other plugins might be unaware of the event change. + //The design might be modified afterward. + virtual void commitEventChange(SEventCallBackData d); + virtual int registerVisualizationIntf(qmpVisualizationIntf* intf); virtual void unregisterVisualizationIntf(int intfhandle); virtual int registerEventReaderIntf(IMidiCallBack* cb,void* userdata); -- cgit v1.2.3