first version of PythonSignals - need to be finalized a bit, but work basically
[vuplus_dvbapp] / lib / python / enigma_python.i
index c9dc42e..15bc16e 100644 (file)
@@ -13,6 +13,7 @@
 #include <lib/gui/ewindow.h>
 #include <lib/gui/ewidgetdesktop.h>
 #include <lib/gui/eslider.h>
+#include <lib/python/connections.h>
 %}
 
 #define DEBUG
@@ -25,6 +26,8 @@
 %include <lib/service/service.h>
 %template(eServiceCenterPtr) ePtr<eServiceCenter>;
 
+%immutable eButton::selected;
+
 %include <lib/gdi/epoint.h>
 %include <lib/gdi/erect.h>
 %include <lib/gdi/esize.h>
 %include <lib/gui/eslider.h>
 %include <lib/gui/ewidgetdesktop.h>
 
+template<class R> class PSignal0
+{
+public:
+       PyObject *get();
+};
+
+template<class R, class P0> class PSignal1
+{
+public:
+       PyObject *get();
+};
+
+template<class R, class P0, class P1> class PSignal2
+{
+public:
+       PyObject *get();
+};
+
+%template(PSignal1VI) PSignal1<void,int>;
+
+%typemap(out) PSignal1VI {
+       $1 = $input->get();
+}
+
+%template(PSignal0V) PSignal0<void>;
+
+%typemap(out) PSignal0V {
+       $1 = $input->get();
+}
+