From dba614edd2aad3c17e244914eaef3809d8300cb1 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Sun, 27 Feb 2005 02:20:31 +0000 Subject: - hopefully fixed some python/refcount stuff (__deref__ is still evil!) - first work on skin support, not really far - improved infobar - deletes components when destroying screens - fixed elistbox and component - add ability to change bouqet - real query parser still unfinished --- lib/python/Makefile.am | 6 ++++++ lib/python/enigma_python.i | 19 +++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Makefile.am b/lib/python/Makefile.am index e82cb650..dbcf489e 100644 --- a/lib/python/Makefile.am +++ b/lib/python/Makefile.am @@ -9,3 +9,9 @@ libenigma_python_a_SOURCES = \ enigma_python_wrap.cxx: enigma_python.i swig -I$(top_srcdir)/ -c++ -python enigma_python.i + +enigma_python.i: enigma_iobject.i + +enigma_iobject.i: + find ../../.. -name "*.cpp" | xargs grep -h "DEFINE_REF" > enigma_iobject.i + \ No newline at end of file diff --git a/lib/python/enigma_python.i b/lib/python/enigma_python.i index 33fc0a14..096254f9 100644 --- a/lib/python/enigma_python.i +++ b/lib/python/enigma_python.i @@ -32,14 +32,9 @@ Oh, things like "operator= is private in this context" etc. 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 %{ + #define SWIG_COMPILE #include #include @@ -54,6 +49,7 @@ is usually caused by not marking PSignals as immutable. #include #include #include +#include #include #include #include @@ -69,9 +65,10 @@ extern void quitMainloop(); extern PSignal1 &keyPressedSignal(); %} -RefCount(eListboxPythonStringContent) -RefCount(eListboxServiceContent) -RefCount(eComponentScan) +%feature("ref") iObject "$this->AddRef(); eDebug(\"AddRef (%s:%d)!\", __FILE__, __LINE__); " +%feature("unref") iObject "$this->Release(); eDebug(\"Release! %s:%d\", __FILE__, __LINE__); " + +%newobject eDebugClassPtr::operator->; #define DEBUG %include "typemaps.i" @@ -82,6 +79,7 @@ RefCount(eComponentScan) %include %include %include + %template(eServiceCenterPtr) ePtr; %include @@ -103,6 +101,7 @@ RefCount(eComponentScan) %include %include %include +%include %include %include %include @@ -111,7 +110,6 @@ RefCount(eComponentScan) /************** eptr **************/ %template(eActionMapPtr) ePtr; -RefCount(eActionMap) %apply eActionMapPtr OUTPUT { eActionMapPtr &ptr } %apply eActionMap* *OUTPUT { eActionMap **ptr } @@ -169,3 +167,4 @@ void runMainloop(); void quitMainloop(); %immutable keyPressed; PSignal1 &keyPressedSignal(); + -- cgit v1.2.3