aboutsummaryrefslogtreecommitdiff
path: root/include/qmpcorepublic.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-06-01 23:02:21 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-06-01 23:02:21 +0800
commitd97a417012d7e510b08c2e7d9a71997605c48e88 (patch)
treef13402745af921be0d791c5a10f9ad8fda78ef72 /include/qmpcorepublic.hpp
parentc6f549a963ece1ed757793540d42d50111c19a80 (diff)
downloadQMidiPlayer-d97a417012d7e510b08c2e7d9a71997605c48e88.tar.xz
Initial event modifier and event filter stub.
Diffstat (limited to 'include/qmpcorepublic.hpp')
-rw-r--r--include/qmpcorepublic.hpp18
1 files changed, 14 insertions, 4 deletions
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 <cstdint>
#include <vector>
#include <string>
-//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);