vdr-plugin-skindesigner/libskindesignerapi/osdelements.h

99 lines
3.0 KiB
C
Raw Normal View History

2015-04-02 15:09:41 +02:00
#ifndef __OSDELEMENTS_H
#define __OSDELEMENTS_H
#include <vdr/plugin.h>
#include "skindesignerapi.h"
namespace skindesignerapi {
/**********************************************************************
* cOsdElement
**********************************************************************/
class cOsdElement {
protected:
2016-01-26 18:32:38 +01:00
int viewId;
2015-04-02 15:09:41 +02:00
ISkinDisplayPlugin *view;
2016-01-26 18:32:38 +01:00
cTokenContainer *tk;
2015-04-02 15:09:41 +02:00
public:
2016-01-26 18:32:38 +01:00
cOsdElement(ISkinDisplayPlugin *view, int viewId);
2015-04-02 15:09:41 +02:00
virtual ~cOsdElement();
2016-01-26 18:32:38 +01:00
void SetTokenContainer(cTokenContainer *tk) { this->tk = tk; };
int GetLoopIndex(const char *loop);
void SetLoop(vector<int> loopInfo);
void AddLoopToken(int loopIndex, int row, int index, const char *value);
void AddStringToken(int index, const char *value);
void AddIntToken(int index, int value);
2015-04-02 15:09:41 +02:00
void ClearTokens(void);
bool ChannelLogoExists(string channelId);
string GetEpgImagePath(void);
2016-01-26 18:32:38 +01:00
void DebugTokenContainer(void);
2015-04-02 15:09:41 +02:00
};
/**********************************************************************
* cViewElement
**********************************************************************/
class cViewElement : public cOsdElement {
private:
2016-01-26 18:32:38 +01:00
int viewElementId;
2015-04-02 15:09:41 +02:00
public:
2016-01-26 18:32:38 +01:00
cViewElement(ISkinDisplayPlugin *view, int viewId, int viewElementId);
2015-04-02 15:09:41 +02:00
virtual ~cViewElement();
void Clear(void);
void Display(void);
};
/**********************************************************************
* cViewGrid
**********************************************************************/
class cViewGrid : public cOsdElement {
private:
2016-01-26 18:32:38 +01:00
int viewGridId;
2015-04-02 15:09:41 +02:00
public:
2016-01-26 18:32:38 +01:00
cViewGrid(ISkinDisplayPlugin *view, int viewId, int viewGridId);
2015-04-02 15:09:41 +02:00
virtual ~cViewGrid();
2016-01-26 18:32:38 +01:00
void SetGrid(long gridId, double x, double y, double width, double height);
void SetCurrent(long gridId, bool current);
void MoveGrid(long gridId, double x, double y, double width, double height);
void Delete(long gridId);
2015-04-02 15:09:41 +02:00
void Clear(void);
void Display(void);
};
/**********************************************************************
* cViewTab
**********************************************************************/
class cViewTab : public cOsdElement {
private:
public:
2016-01-26 18:32:38 +01:00
cViewTab(ISkinDisplayPlugin *view, int viewId);
2015-04-02 15:09:41 +02:00
virtual ~cViewTab();
void Init(void);
void Left(void);
void Right(void);
void Up(void);
void Down(void);
void Display(void);
};
/**********************************************************************
* cOsdView
**********************************************************************/
class cOsdView {
private:
ISkinDisplayPlugin *displayPlugin;
2016-01-26 18:32:38 +01:00
cPluginStructure *plugStruct;
int viewId;
2015-04-02 15:09:41 +02:00
public:
2016-01-26 18:32:38 +01:00
cOsdView(cPluginStructure *plugStruct, ISkinDisplayPlugin *displayPlugin, int viewId);
2015-04-02 15:09:41 +02:00
virtual ~cOsdView();
void Deactivate(bool hide);
void Activate(void);
cViewElement *GetViewElement(int viewElementID);
cViewGrid *GetViewGrid(int viewGridID);
cViewTab *GetViewTabs(void);
void Display(void);
};
}
#endif // __OSDELEMENTS_H