source: titan/plugins/imdbapi/imdbapi.c @ 26912

Last change on this file since 26912 was 24056, checked in by nit, 10 years ago

[titan] add new plugindir system

File size: 1.2 KB
RevLine 
[16384]1#include "../titan/struct.h"
2#include "../titan/debug.h"
3#include "../titan/header.h"
4#include "imdbapi.h"
5
6char pluginname[] = "IMDb-API";
7char plugindesc[] = "Extensions";
[16428]8char pluginpic[] = "%pluginpath%/imdbapi/plugin.png";
[16384]9
10int pluginaktiv = 0;
[17097]11int pluginversion = PLUGINVERSION;
[16384]12struct skin* pluginmenu = NULL;
13int pluginflag = 0; //don't show the plugin in pluginmanager
14
15//wird beim laden ausgefuehrt
16void init(void)
17{
18        pluginaktiv = 1;
19        char* tmpstr = NULL;
20        struct skin* mainmenu = getscreen("mainmenu");
21        struct skin* listbox = getscreennode(mainmenu, "listbox");
22        struct skin* child = NULL;
23
24        if(mainmenu == NULL || listbox == NULL)
25                return;
26
[23090]27        child = checkscreennode(mainmenu, "imdbapi");
[16384]28        if(child != NULL)
29                changeinput(child, "start");
30
31        pluginmenu = child;
[24056]32        tmpstr = createpluginpath("/imdbapi/skin.xml", 0);
[16384]33        readscreen(tmpstr, 201, 1);
34        free(tmpstr); tmpstr = NULL;
[16413]35        debug(10, "imdbapi Plugin loadet !!!");
[16384]36}
37
38//wird beim entladen ausgefuehrt
39void deinit(void)
40{
41        delmarkedscreen(201);
42        pluginaktiv = 0;
[16413]43        debug(10, "imdbapi Plugin removed !!!");
[16384]44}
45
46//wird in der Pluginverwaltung bzw Menue ausfeguehrt
47void start(void)
48{
[18687]49        screenimdbapi(NULL, NULL, NULL, NULL, NULL);
[16384]50}
Note: See TracBrowser for help on using the repository browser.