aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2017-02-12 00:29:01 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2017-02-12 00:29:01 +0800
commitd779d32c8c32e0e0c22662046498620b11fa46de (patch)
treeba63a0d33d1fb6a07bca30d74dd72934b9ef69ce /include
parentacf466561f17bf0eb6c19ea0467b27f5392aeb36 (diff)
downloadQMidiPlayer-d779d32c8c32e0e0c22662046498620b11fa46de.tar.xz
New functionality API. Port built-in features to the new API.
Start the revamp of the main Window. Credit of the new design goes to @BLumia.
Diffstat (limited to 'include')
-rw-r--r--include/qmpcorepublic.hpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/qmpcorepublic.hpp b/include/qmpcorepublic.hpp
index 18b2f6a..67259e0 100644
--- a/include/qmpcorepublic.hpp
+++ b/include/qmpcorepublic.hpp
@@ -8,7 +8,7 @@
#else
#define EXPORTSYM __attribute__ ((visibility ("default")))
#endif
-#define QMP_PLUGIN_API_REV "1+indev2"
+#define QMP_PLUGIN_API_REV "1+indev3"
//MIDI Event structure
struct SEvent
{
@@ -70,9 +70,17 @@ class qmpPluginIntf
virtual const char* pluginGetName(){return "";}
virtual const char* pluginGetVersion(){return "";}
};
+class qmpFuncBaseIntf
+{
+ public:
+ qmpFuncBaseIntf(){}
+ virtual void show()=0;
+ virtual void close()=0;
+ virtual ~qmpFuncBaseIntf(){}
+};
//Visualization plugin pinterface. If your plugin implements a visualization,
//you should implement this pinterface.
-class qmpVisualizationIntf
+class qmpVisualizationIntf:public qmpFuncBaseIntf
{
public:
qmpVisualizationIntf(){}
@@ -112,6 +120,7 @@ class qmpPluginAPI
virtual std::string getTitle();
virtual std::wstring getWTitle();
virtual std::string getChannelPresetString(int ch);
+ virtual bool isDarkTheme();
//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
@@ -124,8 +133,8 @@ class qmpPluginAPI
//This function should be called from a file reader when it has read a new event
virtual void callEventReaderCB(SEventCallBackData d);
- virtual int registerVisualizationIntf(qmpVisualizationIntf* intf);
- virtual void unregisterVisualizationIntf(int intfhandle);
+ virtual void registerVisualizationIntf(qmpVisualizationIntf* intf,std::string name,std::string desc,const char* icon,int iconlen);
+ virtual void unregisterVisualizationIntf(std::string name);
virtual int registerEventReaderIntf(IMidiCallBack* cb,void* userdata);
virtual void unregisterEventReaderIntf(int intfhandle);
virtual int registerEventHandlerIntf(IMidiCallBack* cb,void* userdata);