first version of PythonSignals - need to be finalized a bit, but work basically
[enigma2.git] / lib / python / enigma_python.i
1 %module enigma
2 %{
3 #define SWIG_COMPILE
4 #include <lib/base/smartptr.h>
5 #include <lib/base/eerror.h>
6 #include <lib/base/econfig.h>
7 #include <lib/service/iservice.h>
8 #include <lib/service/service.h>
9
10 #include <lib/gui/ewidget.h>
11 #include <lib/gui/elabel.h>
12 #include <lib/gui/ebutton.h>
13 #include <lib/gui/ewindow.h>
14 #include <lib/gui/ewidgetdesktop.h>
15 #include <lib/gui/eslider.h>
16 #include <lib/python/connections.h>
17 %}
18
19 #define DEBUG
20 %include "stl.i"
21 %include <lib/base/object.h>
22 %include <lib/base/eerror.h>
23 %include <lib/base/econfig.h>
24 %include <lib/base/smartptr.h>
25 %include <lib/service/iservice.h>
26 %include <lib/service/service.h>
27 %template(eServiceCenterPtr) ePtr<eServiceCenter>;
28
29 %immutable eButton::selected;
30
31 %include <lib/gdi/epoint.h>
32 %include <lib/gdi/erect.h>
33 %include <lib/gdi/esize.h>
34 %include <lib/gdi/region.h>
35 %include <lib/gui/ewidget.h>
36 %include <lib/gui/elabel.h>
37 %include <lib/gui/ebutton.h>
38 %include <lib/gui/ewindow.h>
39 %include <lib/gui/eslider.h>
40 %include <lib/gui/ewidgetdesktop.h>
41
42 template<class R> class PSignal0
43 {
44 public:
45         PyObject *get();
46 };
47
48 template<class R, class P0> class PSignal1
49 {
50 public:
51         PyObject *get();
52 };
53
54 template<class R, class P0, class P1> class PSignal2
55 {
56 public:
57         PyObject *get();
58 };
59
60 %template(PSignal1VI) PSignal1<void,int>;
61
62 %typemap(out) PSignal1VI {
63         $1 = $input->get();
64 }
65
66 %template(PSignal0V) PSignal0<void>;
67
68 %typemap(out) PSignal0V {
69         $1 = $input->get();
70 }
71