3 #include <libsig_comp.h>
4 #include <lib/base/ebase.h>
5 #include <lib/base/eerror.h>
6 #include <lib/base/init.h>
7 #include <lib/base/init_num.h>
11 #include <lib/gdi/grc.h>
12 #include <lib/gdi/gfbdc.h>
13 #include <lib/gdi/sdl.h>
14 #include <lib/gdi/font.h>
16 #include <lib/gui/ewidget.h>
17 #include <lib/gui/ewidgetdesktop.h>
18 #include <lib/gui/elabel.h>
19 #include <lib/gui/ebutton.h>
21 #include <lib/gui/ewindow.h>
23 #include <lib/python/python.h>
24 #include <lib/python/connections.h>
26 #include <lib/gui/elistboxcontent.h>
28 #include <lib/driver/rc.h>
30 #include <lib/actions/action.h>
32 #include <lib/gdi/epng.h>
35 int object_total_remaining;
39 printf("%d items left\n", object_total_remaining);
43 void dumpRegion(const gRegion ®ion)
45 fprintf(stderr, "extends: %d %d -> %d %d (%d rects)\n",
46 region.extends.left(), region.extends.top(),
47 region.extends.right(), region.extends.bottom(), region.rects.size());
48 for (int y=0; y<region.extends.bottom(); ++y)
50 for (int x=0; x<region.extends.right(); ++x)
52 unsigned char res = ' ';
53 for (unsigned int i=0; i < region.rects.size(); ++i)
54 if (region.rects[i].contains(ePoint(x, y)))
56 fprintf(stderr, "%c", res);
58 fprintf(stderr, "\n");
64 // typedef struct _object PyObject;
68 printf("C++ says: it's a %d!!!\n", i);
71 PSignal1<void,int> keyPressed;
73 PSignal1<void,int> &keyPressedSignal()
78 void keyEvent(const eRCKey &key)
81 eActionMap::getInstance(ptr);
82 ptr->keyPressed(0, key.code, key.flags);
84 // keyPressed(key.code);
87 /************************************************/
89 #include <lib/components/scan.h>
90 #include <lib/dvb/idvb.h>
91 #include <lib/dvb/dvb.h>
92 #include <lib/dvb/db.h>
94 class eMain: public eApplication, public Object
98 ePtr<eDVBResourceManager> m_mgr;
101 ePtr<eComponentScan> m_scan;
106 init.setRunlevel(eAutoInitNumbers::main);
108 /* TODO: put into init */
109 m_dvbdb = new eDVBDB();
110 m_mgr = new eDVBResourceManager();
112 m_mgr->setChannelList(m_dvbdb);
114 // m_scan = new eComponentScan();
125 /************************************************/
128 int main(int argc, char **argv)
141 gSDLDC::getInstance(my_dc);
144 gFBDC::getInstance(my_dc);
147 fontRenderClass::getInstance()->AddFont("/home/tmbinc/enigma2/fonts/arial.ttf", "Arial", 100);
149 eWidgetDesktop dsk(eSize(720, 576));
157 loadPNG(m_pm, "data/pal.png");
160 eFatal("hi ghost, please copy pal.png into your ./data, thanks!");
162 dsk.setPalette(*m_pm);
164 dsk.setBackgroundColor(gRGB(0,0,0,0));
167 /* redrawing is done in an idle-timer, so we have to set the context */
168 dsk.setRedrawTask(main);
170 eRCInput::getInstance()->keyEvent.connect(slot(keyEvent));
172 printf("executing main\n");
174 python.execute("mytest", "__main__");
181 eWidgetDesktop *getDesktop()