- fixed dvb scan
[enigma2.git] / lib / python / enigma_python.i
index c621bb62c9a7a8740c4b8b3a771d7cd176c20993..8e55b74fc8d419585d9fec77d54c6572a9d17f4c 100644 (file)
@@ -33,6 +33,11 @@ is usually caused by not marking PSignals as immutable.
 
 */
 
+%define RefCount(...)
+%typemap(newfree) __VA_ARGS__ * { eDebug("adding ref"); $1->AddRef(); }
+%extend __VA_ARGS__  { ~__VA_ARGS__() { eDebug("removing ref!"); self->Release(); } }
+%ignore __VA_ARGS__::~__VA_ARGS__();
+%enddef
 
 %module enigma
 %{
@@ -51,10 +56,17 @@ is usually caused by not marking PSignals as immutable.
 #include <lib/gui/ewidgetdesktop.h>
 #include <lib/gui/eslider.h>
 #include <lib/python/connections.h>
+#include <lib/gui/elistbox.h>
+#include <lib/gui/elistboxcontent.h>
+#include <lib/service/listboxservice.h>
 
 extern void runMainloop();
+
+extern PSignal1<void,int> &keyPressedSignal();
 %}
 
+RefCount(eListboxPythonStringContent)
+
 #define DEBUG
 %include "stl.i"
 %include <lib/base/object.h>
@@ -77,6 +89,9 @@ extern void runMainloop();
 %include <lib/gui/ewindow.h>
 %include <lib/gui/eslider.h>
 %include <lib/gui/ewidgetdesktop.h>
+%include <lib/gui/elistbox.h>
+%include <lib/gui/elistboxcontent.h>
+%include <lib/service/listboxservice.h>
 
 template<class R> class PSignal0
 {
@@ -127,3 +142,5 @@ public:
 /**************  debug  **************/
 
 void runMainloop();
+%immutable keyPressed;
+PSignal1<void,int> &keyPressedSignal();