|
Canorus
0.7
|
00001 00008 #ifdef USE_PYTHON 00009 #ifndef SWIGPYTHON_H_ 00010 #define SWIGPYTHON_H_ 00011 00012 #include <Python.h> 00013 00014 #include <QString> 00015 #include <QList> 00016 00017 00018 00019 class CASwigPython { 00020 public: 00021 enum CAClassType { 00022 // Qt objects 00023 String, 00024 00025 // Canorus objects 00026 Document, 00027 Sheet, 00028 Context, 00029 Voice, 00030 MusElement, 00031 PlayableLength, 00032 00033 // Console 00034 PyConsoleInterface, 00035 00036 // Plugins 00037 Plugin 00038 }; 00039 00040 static void init(); 00041 static PyObject *callFunction(QString fileName, QString function, QList<PyObject*> args, bool autoReload = false); 00042 static void *callPycli(void*); 00043 static PyObject *toPythonObject(void *object, CAClassType type); // defined in scripting/canoruspython.i 00044 00045 static PyThreadState *mainThreadState, *pycliThreadState; 00046 }; 00047 00048 #endif /*SWIGPYTHON_H_*/ 00049 #endif
1.8.0