fixed refcount of eListboxPythonStringContent
[enigma2.git] / main / enigma.cpp
index faff4d89be2bb865bcaf1681dfabbc5c4a68f77e..df28bcd75c4c01bf1ef7c64884ae757018d517bf 100644 (file)
@@ -21,6 +21,8 @@
 #include <lib/python/python.h>
 #include <lib/python/connections.h>
 
+#include <lib/driver/rc.h>
+
 #ifdef OBJECT_DEBUG
 int object_total_remaining;
 
@@ -69,6 +71,19 @@ void print(int i)
        printf("C++ says: it's a %d!!!\n", i);
 }
 
+PSignal1<void,int> keyPressed;
+
+PSignal1<void,int> &keyPressedSignal()
+{
+       return keyPressed;
+}
+
+void keyEvent(const eRCKey &key)
+{
+       if (!key.flags)
+               keyPressed(key.code);
+}
+
 int main(int argc, char **argv)
 {
 #ifdef OBJECT_DEBUG
@@ -105,12 +120,15 @@ int main(int argc, char **argv)
        eWidgetDesktop dsk(eSize(720, 576));
        
        wdsk = &dsk;
+       dsk.setBackgroundColor(gColor(0));
        dsk.setDC(my_dc);
 #endif
 
                /* redrawing is done in an idle-timer, so we have to set the context */
        dsk.setRedrawTask(main);
        
+       eRCInput::getInstance()->keyEvent.connect(slot(keyEvent));
+       
        ePython python;
        
        printf("executing main\n");