2015-04-02 11:39:43 +02:00
|
|
|
#ifndef __LIBSKINDESIGNERAPI_SERVICES_H
|
|
|
|
#define __LIBSKINDESIGNERAPI_SERVICES_H
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
|
|
|
#include <vdr/osdbase.h>
|
2016-01-26 18:32:38 +01:00
|
|
|
#include "pluginstructure.h"
|
|
|
|
#include "tokencontainer.h"
|
2015-04-02 11:39:43 +02:00
|
|
|
|
|
|
|
namespace skindesignerapi {
|
|
|
|
|
2016-01-26 18:32:38 +01:00
|
|
|
enum eMenuType {
|
|
|
|
mtList,
|
|
|
|
mtText
|
|
|
|
};
|
|
|
|
|
2015-04-02 11:39:43 +02:00
|
|
|
class ISDDisplayMenu : public cSkinDisplayMenu {
|
|
|
|
public:
|
2015-04-02 15:09:41 +02:00
|
|
|
virtual void SetTitle(const char *Title) = 0;
|
2016-01-26 18:32:38 +01:00
|
|
|
virtual void SetPluginMenu(int plugId, int menuId, int type, bool init) = 0;
|
|
|
|
virtual bool SetItemPlugin(cTokenContainer *tk, int Index, bool Current, bool Selectable) = 0;
|
|
|
|
virtual bool SetPluginText(cTokenContainer *tk) = 0;
|
2015-04-02 15:09:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class ISkinDisplayPlugin {
|
|
|
|
public:
|
|
|
|
virtual ~ISkinDisplayPlugin(void) {};
|
2016-01-26 18:32:38 +01:00
|
|
|
virtual bool InitOsd(void) = 0;
|
|
|
|
virtual void CloseOsd(void) = 0;
|
|
|
|
virtual void Deactivate(int viewId, bool hide) = 0;
|
|
|
|
virtual void Activate(int viewId) = 0;
|
|
|
|
virtual void SetViewElementTokens(int id, int viewId, skindesignerapi::cTokenContainer *tk) = 0;
|
|
|
|
virtual void ClearViewElement(int id, int viewId) = 0;
|
|
|
|
virtual void DisplayViewElement(int id, int viewId) = 0;
|
|
|
|
virtual void SetGrid(long id, int viewId, int viewGridId, double x, double y, double width, double height, skindesignerapi::cTokenContainer *tk) = 0;
|
|
|
|
virtual void SetGridCurrent(long id, int viewId, int viewGridId, bool current) = 0;
|
|
|
|
virtual void DeleteGrid(long id, int viewId, int viewGridId) = 0;
|
|
|
|
virtual void DisplayGrids(int viewId, int viewGridId) = 0;
|
|
|
|
virtual void ClearGrids(int viewId, int viewGridId) = 0;
|
|
|
|
virtual void SetTabTokens(int viewId, skindesignerapi::cTokenContainer *tk) = 0;
|
|
|
|
virtual void TabLeft(int viewId) = 0;
|
|
|
|
virtual void TabRight(int viewId) = 0;
|
|
|
|
virtual void TabUp(int viewId) = 0;
|
|
|
|
virtual void TabDown(int viewId) = 0;
|
|
|
|
virtual void DisplayTabs(int viewId) = 0;
|
|
|
|
virtual void ClearTab(int viewId) = 0;
|
2016-07-22 15:21:09 +02:00
|
|
|
virtual void Flush(void) = 0;
|
2015-04-02 15:09:41 +02:00
|
|
|
virtual bool ChannelLogoExists(string channelId) = 0;
|
|
|
|
virtual string GetEpgImagePath(void) = 0;
|
|
|
|
};
|
|
|
|
|
2015-04-02 11:39:43 +02:00
|
|
|
class SkindesignerAPI {
|
|
|
|
private:
|
2015-04-02 15:09:41 +02:00
|
|
|
static SkindesignerAPI* skindesigner;
|
2015-04-02 11:39:43 +02:00
|
|
|
protected:
|
2015-04-02 15:09:41 +02:00
|
|
|
SkindesignerAPI(void);
|
|
|
|
virtual ~SkindesignerAPI(void);
|
|
|
|
virtual bool ServiceRegisterPlugin(cPluginStructure *plugStructure) = 0;
|
|
|
|
virtual ISDDisplayMenu *ServiceGetDisplayMenu(void) = 0;
|
2016-01-26 18:32:38 +01:00
|
|
|
virtual ISkinDisplayPlugin *ServiceGetDisplayPlugin(int plugId) = 0;
|
2015-04-02 11:39:43 +02:00
|
|
|
public:
|
2016-01-26 18:32:38 +01:00
|
|
|
static bool ServiceAvailable(void);
|
2015-04-02 15:09:41 +02:00
|
|
|
static bool RegisterPlugin(cPluginStructure *plugStructure);
|
|
|
|
static ISDDisplayMenu *GetDisplayMenu(void);
|
2016-01-26 18:32:38 +01:00
|
|
|
static ISkinDisplayPlugin *GetDisplayPlugin(int plugId);
|
2015-04-02 11:39:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //__LIBSKINDESIGNERAPI_SERVICES_H
|