started plugin interface implementation

This commit is contained in:
louis 2015-01-27 17:30:24 +01:00
parent 15ad84bccf
commit c650dcacd8
7 changed files with 55 additions and 0 deletions

View File

@ -65,6 +65,7 @@ OBJS = $(PLUGIN).o \
displayreplay.o \
displaytracks.o \
displayvolume.o \
displayplugin.o \
libcore/pixmapcontainer.o \
libcore/fontmanager.o \
libcore/imagecache.o \

View File

@ -10,6 +10,7 @@
#include "displayvolume.h"
#include "displaytracks.h"
#include "displaymessage.h"
#include "displayplugin.h"
#include <vdr/skinlcars.h>
class cSkinDesigner : public cSkin {

View File

@ -19,6 +19,7 @@ cSDDisplayMenu::cSDDisplayMenu(cTemplate *menuTemplate) {
doOutput = false;
return;
}
esyslog("skindesigner: menu opened");
}
cSDDisplayMenu::~cSDDisplayMenu() {
@ -26,6 +27,7 @@ cSDDisplayMenu::~cSDDisplayMenu() {
delete rootView;
if (textAreaFont)
delete textAreaFont;
esyslog("skindesigner: menu closed");
}
void cSDDisplayMenu::Scroll(bool Up, bool Page) {
@ -184,6 +186,7 @@ bool cSDDisplayMenu::SetItemPlugin(map<string,string> *stringTokens, map<string,
}
void cSDDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool Selectable) {
esyslog("skindesigner: Item %s %s", Text, Current ? " -- ACTIVE --" : "");
if (!doOutput)
return;
cDisplayMenuListView *list = rootView->GetListView();

7
displayplugin.c Normal file
View File

@ -0,0 +1,7 @@
#include "displayplugin.h"
cDisplayPlugin::cDisplayPlugin(cTemplate *menuTemplate) {
}
cDisplayPlugin::~cDisplayPlugin() {
}

13
displayplugin.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef __DISPLAYPLUGIN_H
#define __DISPLAYPLUGIN_H
#include "libtemplate/template.h"
class cDisplayPlugin {
private:
public:
cDisplayPlugin(cTemplate *pluginTemplate);
virtual ~cDisplayPlugin();
};
#endif //__DISPLAYPLUGIN_H

View File

@ -9,6 +9,7 @@ void SkinDesignerXMLErrorHandler (void * userData, xmlErrorPtr error) {
}
cXmlParser::cXmlParser(void) {
view = NULL;
doc = NULL;
root = NULL;
ctxt = NULL;

View File

@ -35,4 +35,33 @@ public:
//out
cSDDisplayMenu *displayMenu;
};
// Data structure for service "RegisterStandalonePlugin"
/*
class RegisterStandalonePlugin {
public:
RegisterStandalonePlugin(void) {
name = "";
rootView = "";
};
void SetMenu(int key, string templateName) {
menus.insert(pair<int, string>(key, templateName));
}
// in
string name; //name of plugin
string rootView; //name of plugin
map< int, string > menus; //menus as key -> templatename hashmap
//out
};
*/
// Data structure for service "GetDisplayPlugin"
class GetDisplayPlugin {
public:
GetDisplayPlugin(void) {
displayPlugin = NULL;
};
// in
//out
cDisplayPlugin *displayPlugin;
};
#endif //__SKINDESIGNERSERVICES_H