2 #include <libsig_comp.h>
3 #include <lib/base/ebase.h>
4 #include <lib/base/eerror.h>
5 #include <lib/base/init.h>
6 #include <lib/base/init_num.h>
10 #include <lib/gdi/grc.h>
11 #include <lib/gdi/gfbdc.h>
12 #include <lib/gdi/font.h>
14 #include <lib/gui/ewidget.h>
15 #include <lib/gui/ewidgetdesktop.h>
16 #include <lib/gui/elabel.h>
17 #include <lib/gui/ebutton.h>
19 #include <lib/gui/ewindow.h>
21 #include <lib/python/python.h>
22 #include <lib/python/connections.h>
25 int object_total_remaining;
29 printf("%d items left\n", object_total_remaining);
33 void dumpRegion(const gRegion ®ion)
35 fprintf(stderr, "extends: %d %d -> %d %d (%d rects)\n",
36 region.extends.left(), region.extends.top(),
37 region.extends.right(), region.extends.bottom(), region.rects.size());
38 for (int y=0; y<region.extends.bottom(); ++y)
40 for (int x=0; x<region.extends.right(); ++x)
42 unsigned char res = ' ';
43 for (unsigned int i=0; i < region.rects.size(); ++i)
44 if (region.rects[i].contains(ePoint(x, y)))
46 fprintf(stderr, "%c", res);
48 fprintf(stderr, "\n");
53 class eMain: public eApplication, public Object
59 init.setRunlevel(eAutoInitNumbers::main);
65 // typedef struct _object PyObject;
69 printf("C++ says: it's a %d!!!\n", i);
72 int main(int argc, char **argv)
83 gFBDC::getInstance(my_dc);
93 for (int a=0; a<0x10; ++a)
94 pal[a | 0x10] = 0x111111 * a;
95 for (int a=0; a<0x10; ++a)
96 pal[a | 0x20] = (0x111100 * a) | 0xFF;
97 for (int a=0; a<0x10; ++a)
98 pal[a | 0x30] = (0x110011 * a) | 0xFF00;
99 for (int a=0; a<0x10; ++a)
100 pal[a | 0x40] = (0x001111 * a) | 0xFF0000;
101 p.setPalette(pal, 0, 256);
103 fontRenderClass::getInstance()->AddFont("/dbox2/cdkroot/share/fonts/arial.ttf", "Arial", 100);
105 eWidgetDesktop dsk(eSize(720, 576));
111 /* redrawing is done in an idle-timer, so we have to set the context */
112 dsk.setRedrawTask(main);
116 printf("executing main\n");
117 python.execute("mytest", "__main__");
122 eWidgetDesktop *getDesktop()