OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
| 3 * |
| 4 * This program is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU General Public License |
| 6 * as published by the Free Software Foundation; either version 2 |
| 7 * of the License, or (at your option) any later version. |
| 8 * |
| 9 * This program is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. |
| 13 * |
| 14 * You should have received a copy of the GNU General Public License |
| 15 * along with this program; if not, write to the Free Software Foundation, |
| 16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 * |
| 18 * Contributor(s): Mitchell Stokes |
| 19 * |
| 20 * ***** END GPL LICENSE BLOCK ***** |
| 21 */ |
| 22 |
| 23 /** \file KX_LibLoadStatus.h |
| 24 * \ingroup bgeconv |
| 25 */ |
| 26 |
| 27 #ifndef __KX_LIBLOADSTATUS_H__ |
| 28 #define __KX_LIBLOADSTATUS_H__ |
| 29 |
| 30 #include "PyObjectPlus.h" |
| 31 |
| 32 class KX_LibLoadStatus : public PyObjectPlus |
| 33 { |
| 34 Py_Header |
| 35 private: |
| 36 class KX_BlenderSceneConverter* m_converter; |
| 37 class KX_KetsjiEngine* m_engine; |
| 38 class KX_Scene* m_mergescene; |
| 39 void* m_data; |
| 40 STR_String m_libname; |
| 41 |
| 42 int m_refcount; |
| 43 float m_progress; |
| 44 double m_starttime; |
| 45 double m_endtime; |
| 46 |
| 47 #ifdef WITH_PYTHON |
| 48 PyObject* m_finish_cb; |
| 49 PyObject* m_progress_cb; |
| 50 #endif |
| 51 |
| 52 public: |
| 53 KX_LibLoadStatus(class KX_BlenderSceneConverter* kx_converter, |
| 54 class KX_KetsjiEngine* kx_engine
, |
| 55 class KX_Scene* merge_scene, |
| 56 const char *path); |
| 57 |
| 58 void Finish(); // Called when the libload is done |
| 59 void RunFinishCallback(); |
| 60 void RunProgressCallback(); |
| 61 |
| 62 class KX_BlenderSceneConverter *GetConverter(); |
| 63 class KX_KetsjiEngine *GetEngine(); |
| 64 class KX_Scene *GetMergeScene(); |
| 65 |
| 66 void SetLibName(const char *name); |
| 67 const char *GetLibName(); |
| 68 |
| 69 void SetData(void *data); |
| 70 void *GetData(); |
| 71 |
| 72 void SetProgress(float progress); |
| 73 float GetProgress(); |
| 74 void AddProgress(float progress); |
| 75 |
| 76 #ifdef WITH_PYTHON |
| 77 static PyObject* pyattr_get_onfinish(void *self_v, const KX_PYATT
RIBUTE_DEF *attrdef); |
| 78 static int pyattr_set_onfinish(void *self_v, const
KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); |
| 79 static PyObject* pyattr_get_onprogress(void *self_v, const KX_PYA
TTRIBUTE_DEF *attrdef); |
| 80 static int pyattr_set_onprogress(void *self_v, cons
t KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); |
| 81 |
| 82 static PyObject* pyattr_get_timetaken(void *self_v, const KX_PYAT
TRIBUTE_DEF *attrdef); |
| 83 #endif |
| 84 }; |
| 85 |
| 86 #endif // __KX_LIBLOADSTATUS_H__ |
OLD | NEW |