fixed refcount of eListboxPythonStringContent
[enigma2.git] / main / enigma.cpp
index 92982e5b19ef9ed0771d4f003c30867ca63dd8dc..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
@@ -112,6 +127,8 @@ int main(int argc, char **argv)
                /* 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");