aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-01-27 06:25:40 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-01-27 06:25:40 +0000
commit84670d3dc9c9dc29fd3af42b2f25092b3b6c2a09 (patch)
tree2b6dd112784a6958665dcd54aeaa42ef9ea94472 /main
parentf9723e7fbf7669f063151eaf53bb1ee9f4189289 (diff)
downloadenigma2-84670d3dc9c9dc29fd3af42b2f25092b3b6c2a09.tar.gz
enigma2-84670d3dc9c9dc29fd3af42b2f25092b3b6c2a09.zip
- add rcconsole key input (for now)
- very basic method of delivering keys into python (will be changed, of course)
Diffstat (limited to 'main')
-rw-r--r--main/enigma.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/main/enigma.cpp b/main/enigma.cpp
index 92982e5b..df28bcd7 100644
--- a/main/enigma.cpp
+++ b/main/enigma.cpp
@@ -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");