fix LCD in MoviePlayer
[enigma2.git] / lib / python / python.h
1 #ifndef __lib_python_python_h
2 #define __lib_python_python_h
3
4 #include <string>
5 #include <lib/base/object.h>
6
7 typedef struct _object PyObject;
8
9 // useable for debugging python refcounting
10
11 extern PyObject *New_TestObj();
12
13 class TestObj
14 {
15 DECLARE_REF(TestObj);
16 public:
17         TestObj();
18         ~TestObj();
19 };
20 TEMPLATE_TYPEDEF(ePtr<TestObj>, TestObjPtr);
21
22 #ifndef SWIG
23 /* class ePyObject
24 {
25         void *m_object;
26 public:
27         ePyObject(void *ptr);
28         ePyObject(ePyObject &p);
29         ePyObject();
30         ePyObject &operator=(ePyObject &p);
31         ePyObject &operator=(void *p);
32         ~ePyObject();
33         void *get() { return m_object; }
34 }; */
35
36 class ePython
37 {
38 public:
39         ePython();
40         ~ePython();
41         int execute(const std::string &pythonfile, const std::string &funcname);
42         static int call(PyObject *pFunc, PyObject *args);
43         static PyObject *resolve(const std::string &pythonfile, const std::string &funcname);
44 private:
45 };
46 #endif // SWIG
47
48 #endif