X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6056257ab676ea10a51ef96e19b1f1092f95b40..4bb081fd23dc73d1bc005f67649c9eb0d244dc14:/wxPython/src/mac/gdi.cpp diff --git a/wxPython/src/mac/gdi.cpp b/wxPython/src/mac/gdi.cpp index ddcaa067e9..8b65db226d 100644 --- a/wxPython/src/mac/gdi.cpp +++ b/wxPython/src/mac/gdi.cpp @@ -57,13 +57,12 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include -#ifndef __WXMSW__ -#include -#endif #include #include #include #include +#include +#include static PyObject* t_output_helper(PyObject* target, PyObject* o) { @@ -92,13 +91,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - - static wxString wxPyEmptyStr(""); + // Put some wx default wxChar* values into wxStrings. + static const wxString wxPyEmptyString(wxT("")); // Implementations of some alternate "constructors" wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) { @@ -177,6 +171,12 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { delete [] cArray; return icon; } + + wxIcon* wxIconFromBitmap(const wxBitmap& bmp) { + wxIcon* icon = new wxIcon(); + icon->CopyFromBitmap(bmp); + return icon; + } // Alternate 'constructor' wxCursor* wxPyStockCursor(int id) { return new wxCursor(id); @@ -193,13 +193,16 @@ public: { m_dash = NULL; } ~wxPyPen() { if (m_dash) - delete m_dash; + delete [] m_dash; } void SetDashes(int nb_dashes, const wxDash *dash) { + if (m_dash) + delete [] m_dash; m_dash = new wxDash[nb_dashes]; - for (int i=0; i= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxColour *)wxNamedColour(*_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxColour *)wxNamedColour(*_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); @@ -582,10 +606,10 @@ static PyObject *_wrap_wxMemoryDCFromDC(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMemoryDC *)wxMemoryDCFromDC(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxMemoryDC *)wxMemoryDCFromDC(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxMemoryDC_p"); @@ -1306,10 +1330,10 @@ static PyObject *_wrap_new_wxGDIObject(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGDIObject",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGDIObject *)new_wxGDIObject(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxGDIObject *)new_wxGDIObject(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxGDIObject_p"); @@ -1339,10 +1363,10 @@ static PyObject *_wrap_delete_wxGDIObject(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxGDIObject(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxGDIObject(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1368,10 +1392,10 @@ static PyObject *_wrap_wxGDIObject_GetVisible(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGDIObject_GetVisible(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxGDIObject_GetVisible(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1398,10 +1422,10 @@ static PyObject *_wrap_wxGDIObject_SetVisible(PyObject *self, PyObject *args, Py } _arg1 = (bool ) tempbool1; { - wxPy_BEGIN_ALLOW_THREADS; - wxGDIObject_SetVisible(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGDIObject_SetVisible(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1427,10 +1451,10 @@ static PyObject *_wrap_wxGDIObject_IsNull(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGDIObject_IsNull(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxGDIObject_IsNull(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1457,7 +1481,7 @@ static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args, PyObject *kw PyObject * _resultobj; wxBitmap * _result; wxString * _arg0; - wxBitmapType _arg1 = (wxBitmapType ) wxBITMAP_TYPE_BMP; + wxBitmapType _arg1 = (wxBitmapType ) wxBITMAP_TYPE_ANY; PyObject * _obj0 = 0; char *_kwnames[] = { "name","type", NULL }; char _ptemp[128]; @@ -1466,28 +1490,15 @@ static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxBitmap",_kwnames,&_obj0,&_arg1)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxBitmap *)new_wxBitmap(*_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBitmap *)new_wxBitmap(*_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); @@ -1521,10 +1532,10 @@ static PyObject *_wrap_delete_wxBitmap(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxBitmap(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxBitmap(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1551,10 +1562,10 @@ static PyObject *_wrap_wxBitmap_GetPalette(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPalette *)wxBitmap_GetPalette(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxPalette *)wxBitmap_GetPalette(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxPalette_p"); @@ -1586,10 +1597,10 @@ static PyObject *_wrap_wxBitmap_GetMask(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMask *)wxBitmap_GetMask(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxMask *)wxBitmap_GetMask(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxMask_p"); @@ -1607,7 +1618,7 @@ static PyObject *_wrap_wxBitmap_LoadFile(PyObject *self, PyObject *args, PyObjec bool _result; wxBitmap * _arg0; wxString * _arg1; - wxBitmapType _arg2 = (wxBitmapType ) wxBITMAP_TYPE_BMP; + wxBitmapType _arg2 = (wxBitmapType ) wxBITMAP_TYPE_ANY; PyObject * _argo0 = 0; PyObject * _obj1 = 0; char *_kwnames[] = { "self","name","type", NULL }; @@ -1623,28 +1634,15 @@ static PyObject *_wrap_wxBitmap_LoadFile(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxBitmap_LoadFile(_arg0,*_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxBitmap_LoadFile(_arg0,*_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -1678,22 +1676,9 @@ static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -1703,10 +1688,10 @@ static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxBitmap_SaveFile(_arg0,*_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxBitmap_SaveFile(_arg0,*_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -1743,10 +1728,10 @@ static PyObject *_wrap_wxBitmap_SetMask(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmap_SetMask(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBitmap_SetMask(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1772,10 +1757,10 @@ static PyObject *_wrap_wxBitmap_Ok(PyObject *self, PyObject *args, PyObject *kwa } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxBitmap_Ok(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxBitmap_Ok(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1800,10 +1785,10 @@ static PyObject *_wrap_wxBitmap_GetWidth(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxBitmap_GetWidth(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxBitmap_GetWidth(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1828,10 +1813,10 @@ static PyObject *_wrap_wxBitmap_GetHeight(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxBitmap_GetHeight(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxBitmap_GetHeight(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1856,10 +1841,10 @@ static PyObject *_wrap_wxBitmap_GetDepth(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxBitmap_GetDepth(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxBitmap_GetDepth(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1884,10 +1869,10 @@ static PyObject *_wrap_wxBitmap_SetWidth(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmap_SetWidth(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBitmap_SetWidth(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1913,10 +1898,10 @@ static PyObject *_wrap_wxBitmap_SetHeight(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmap_SetHeight(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBitmap_SetHeight(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1942,10 +1927,10 @@ static PyObject *_wrap_wxBitmap_SetDepth(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmap_SetDepth(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBitmap_SetDepth(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1980,10 +1965,10 @@ static PyObject *_wrap_wxBitmap_GetSubBitmap(PyObject *self, PyObject *args, PyO return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxBitmap (wxBitmap_GetSubBitmap(_arg0,*_arg1)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxBitmap (wxBitmap_GetSubBitmap(_arg0,*_arg1)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -2018,10 +2003,10 @@ static PyObject *_wrap_wxBitmap_CopyFromIcon(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxBitmap_CopyFromIcon(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxBitmap_CopyFromIcon(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -2055,10 +2040,10 @@ static PyObject *_wrap_new_wxMask(PyObject *self, PyObject *args, PyObject *kwar } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMask *)new_wxMask(*_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxMask *)new_wxMask(*_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxMask_p"); @@ -2088,10 +2073,10 @@ static PyObject *_wrap_wxMask_Destroy(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - wxMask_Destroy(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxMask_Destroy(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -2130,28 +2115,15 @@ static PyObject *_wrap_new_wxIcon(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|ii:new_wxIcon",_kwnames,&_obj0,&_arg1,&_arg2,&_arg3)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxIcon *)new_wxIcon(*_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIcon *)new_wxIcon(*_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); @@ -2185,69 +2157,16 @@ static PyObject *_wrap_delete_wxIcon(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxIcon(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxIcon(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } -#define wxIcon_LoadFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadFile(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxIcon_LoadFile(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxIcon * _arg0; - wxString * _arg1; - long _arg2; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","name","flags", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:wxIcon_LoadFile",_kwnames,&_argo0,&_obj1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_LoadFile. Expected _wxIcon_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxIcon_LoadFile(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - #define wxIcon_Ok(_swigobj) (_swigobj->Ok()) static PyObject *_wrap_wxIcon_Ok(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2267,10 +2186,10 @@ static PyObject *_wrap_wxIcon_Ok(PyObject *self, PyObject *args, PyObject *kwarg } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxIcon_Ok(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxIcon_Ok(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -2295,10 +2214,10 @@ static PyObject *_wrap_wxIcon_GetWidth(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxIcon_GetWidth(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxIcon_GetWidth(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -2323,10 +2242,10 @@ static PyObject *_wrap_wxIcon_GetHeight(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxIcon_GetHeight(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxIcon_GetHeight(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -2351,10 +2270,10 @@ static PyObject *_wrap_wxIcon_GetDepth(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxIcon_GetDepth(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxIcon_GetDepth(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -2379,10 +2298,10 @@ static PyObject *_wrap_wxIcon_SetWidth(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIcon_SetWidth(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIcon_SetWidth(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -2408,10 +2327,10 @@ static PyObject *_wrap_wxIcon_SetHeight(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIcon_SetHeight(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIcon_SetHeight(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -2437,10 +2356,10 @@ static PyObject *_wrap_wxIcon_SetDepth(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIcon_SetDepth(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIcon_SetDepth(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -2474,226 +2393,256 @@ static PyObject *_wrap_wxIcon_CopyFromBitmap(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIcon_CopyFromBitmap(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIcon_CopyFromBitmap(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } -static void *SwigwxCursorTowxGDIObject(void *ptr) { - wxCursor *src; - wxGDIObject *dest; - src = (wxCursor *) ptr; - dest = (wxGDIObject *) src; - return (void *) dest; -} +#define new_wxIconBundle() (new wxIconBundle()) +static PyObject *_wrap_new_wxIconBundle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIconBundle * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; -static void *SwigwxCursorTowxObject(void *ptr) { - wxCursor *src; - wxObject *dest; - src = (wxCursor *) ptr; - dest = (wxObject *) src; - return (void *) dest; + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxIconBundle",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIconBundle *)new_wxIconBundle(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxIconBundle_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; } -#define delete_wxCursor(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxCursor(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxIconBundleFromFile(_swigarg0,_swigarg1) (new wxIconBundle(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxIconBundleFromFile(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxCursor * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + wxIconBundle * _result; + wxString * _arg0; + long _arg1; + PyObject * _obj0 = 0; + char *_kwnames[] = { "file","type", NULL }; + char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxCursor",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:new_wxIconBundleFromFile",_kwnames,&_obj0,&_arg1)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxCursor. Expected _wxCursor_p."); +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - } +} { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxCursor(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIconBundle *)new_wxIconBundleFromFile(*_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxIconBundle_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} return _resultobj; } -#define wxCursor_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxCursor_Ok(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxIconBundleFromIcon(_swigarg0) (new wxIconBundle(_swigarg0)) +static PyObject *_wrap_new_wxIconBundleFromIcon(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - wxCursor * _arg0; + wxIconBundle * _result; + wxIcon * _arg0; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "icon", NULL }; + char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCursor_Ok",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxIconBundleFromIcon",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCursor_Ok. Expected _wxCursor_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxIconBundleFromIcon. Expected _wxIcon_p."); return NULL; } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCursor_Ok(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIconBundle *)new_wxIconBundleFromIcon(*_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxIconBundle_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } return _resultobj; } -#define wxNativeFontInfo_FromString(_swigobj,_swigarg0) (_swigobj->FromString(_swigarg0)) -static PyObject *_wrap_wxNativeFontInfo_FromString(PyObject *self, PyObject *args, PyObject *kwargs) { +#define delete_wxIconBundle(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxIconBundle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - wxNativeFontInfo * _arg0; - wxString * _arg1; + wxIconBundle * _arg0; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","s", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNativeFontInfo_FromString",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxIconBundle",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_FromString. Expected _wxNativeFontInfo_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIconBundle_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxIconBundle. Expected _wxIconBundle_p."); return NULL; } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxNativeFontInfo_FromString(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxIconBundle(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxNativeFontInfo_ToString(_swigobj) (_swigobj->ToString()) -static PyObject *_wrap_wxNativeFontInfo_ToString(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxIconBundle_AddIcon(_swigobj,_swigarg0) (_swigobj->AddIcon(_swigarg0)) +static PyObject *_wrap_wxIconBundle_AddIcon(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; - wxNativeFontInfo * _arg0; + wxIconBundle * _arg0; + wxIcon * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","icon", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_ToString",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxIconBundle_AddIcon",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_ToString. Expected _wxNativeFontInfo_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIconBundle_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIconBundle_AddIcon. Expected _wxIconBundle_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIconBundle_AddIcon. Expected _wxIcon_p."); return NULL; } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxNativeFontInfo_ToString(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIconBundle_AddIcon(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -static wxString wxNativeFontInfo___str__(wxNativeFontInfo *self) { - return self->ToString(); - } -static PyObject *_wrap_wxNativeFontInfo___str__(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxIconBundle_AddIconFromFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->AddIcon(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxIconBundle_AddIconFromFile(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; - wxNativeFontInfo * _arg0; + wxIconBundle * _arg0; + wxString * _arg1; + long _arg2; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","file","type", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo___str__",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:wxIconBundle_AddIconFromFile",_kwnames,&_argo0,&_obj1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo___str__. Expected _wxNativeFontInfo_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIconBundle_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIconBundle_AddIconFromFile. Expected _wxIconBundle_p."); return NULL; } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxNativeFontInfo___str__(_arg0)); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIconBundle_AddIconFromFile(_arg0,*_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} +} Py_INCREF(Py_None); + _resultobj = Py_None; { - delete _result; + if (_obj1) + delete _arg1; } return _resultobj; } -#define new_wxFontMapper() (new wxFontMapper()) -static PyObject *_wrap_new_wxFontMapper(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxIconBundle_GetIcon(_swigobj,_swigarg0) (_swigobj->GetIcon(_swigarg0)) +static PyObject *_wrap_wxIconBundle_GetIcon(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxFontMapper * _result; - char *_kwnames[] = { NULL }; + wxIcon * _result; + wxIconBundle * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFontMapper",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxIconBundle_GetIcon",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIconBundle_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIconBundle_GetIcon. Expected _wxIconBundle_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) return NULL; +} { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxFontMapper *)new_wxFontMapper(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + const wxIcon & _result_ref = wxIconBundle_GetIcon(_arg0,*_arg1); + _result = (wxIcon *) &_result_ref; - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFontMapper_p"); + SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); _resultobj = Py_BuildValue("s",_ptemp); } else { Py_INCREF(Py_None); @@ -2702,1354 +2651,75 @@ static PyObject *_wrap_new_wxFontMapper(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define delete_wxFontMapper(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxFontMapper(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFontMapper * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFontMapper",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFontMapper. Expected _wxFontMapper_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxFontMapper(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject * wxFontMapper_GetAltForEncoding(wxFontMapper *self,wxFontEncoding encoding,const wxString & facename,bool interactive) { - wxFontEncoding alt_enc; - if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive)) - return PyInt_FromLong(alt_enc); - else { - Py_INCREF(Py_None); - return Py_None; - } - } -static PyObject *_wrap_wxFontMapper_GetAltForEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxFontMapper * _arg0; - wxFontEncoding _arg1; - wxString * _arg2 = (wxString *) &wxEmptyString; - bool _arg3 = (bool ) TRUE; - PyObject * _argo0 = 0; - PyObject * _obj2 = 0; - int tempbool3 = (int) TRUE; - char *_kwnames[] = { "self","encoding","facename","interactive", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|Oi:wxFontMapper_GetAltForEncoding",_kwnames,&_argo0,&_arg1,&_obj2,&tempbool3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_GetAltForEncoding. Expected _wxFontMapper_p."); - return NULL; - } - } - if (_obj2) -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif -} - _arg3 = (bool ) tempbool3; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxFontMapper_GetAltForEncoding(_arg0,_arg1,*_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -}{ - _resultobj = _result; -} -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxFontMapper_IsEncodingAvailable(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsEncodingAvailable(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFontMapper_IsEncodingAvailable(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxFontMapper * _arg0; - wxFontEncoding _arg1; - wxString * _arg2 = (wxString *) &wxEmptyString; - PyObject * _argo0 = 0; - PyObject * _obj2 = 0; - char *_kwnames[] = { "self","encoding","facename", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxFontMapper_IsEncodingAvailable",_kwnames,&_argo0,&_arg1,&_obj2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_IsEncodingAvailable. Expected _wxFontMapper_p."); - return NULL; - } - } - if (_obj2) -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFontMapper_IsEncodingAvailable(_arg0,_arg1,*_arg2); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxFontMapper_CharsetToEncoding(_swigobj,_swigarg0,_swigarg1) (_swigobj->CharsetToEncoding(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFontMapper_CharsetToEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFontEncoding _result; - wxFontMapper * _arg0; - wxString * _arg1; - bool _arg2 = (bool ) TRUE; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - int tempbool2 = (int) TRUE; - char *_kwnames[] = { "self","charset","interactive", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFontMapper_CharsetToEncoding",_kwnames,&_argo0,&_obj1,&tempbool2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_CharsetToEncoding. Expected _wxFontMapper_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} - _arg2 = (bool ) tempbool2; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxFontEncoding )wxFontMapper_CharsetToEncoding(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static PyObject *_wrap_wxFontMapper_GetEncodingName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxFontEncoding _arg0; - char *_kwnames[] = { "encoding", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxFontMapper_GetEncodingName",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxFontMapper::GetEncodingName(_arg0)); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxFontMapper_GetEncodingDescription(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxFontEncoding _arg0; - char *_kwnames[] = { "encoding", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxFontMapper_GetEncodingDescription",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxFontMapper::GetEncodingDescription(_arg0)); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFontMapper_SetDialogParent(_swigobj,_swigarg0) (_swigobj->SetDialogParent(_swigarg0)) -static PyObject *_wrap_wxFontMapper_SetDialogParent(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFontMapper * _arg0; - wxWindow * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","parent", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetDialogParent",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetDialogParent. Expected _wxFontMapper_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontMapper_SetDialogParent. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFontMapper_SetDialogParent(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontMapper_SetDialogTitle(_swigobj,_swigarg0) (_swigobj->SetDialogTitle(_swigarg0)) -static PyObject *_wrap_wxFontMapper_SetDialogTitle(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFontMapper * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","title", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetDialogTitle",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetDialogTitle. Expected _wxFontMapper_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFontMapper_SetDialogTitle(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFontMapper_SetConfig(_swigobj,_swigarg0) (_swigobj->SetConfig(_swigarg0)) -static PyObject *_wrap_wxFontMapper_SetConfig(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFontMapper * _arg0; - wxConfigBase * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","config", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetConfig",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetConfig. Expected _wxFontMapper_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontMapper_SetConfig. Expected _wxConfigBase_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFontMapper_SetConfig(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontMapper_SetConfigPath(_swigobj,_swigarg0) (_swigobj->SetConfigPath(_swigarg0)) -static PyObject *_wrap_wxFontMapper_SetConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFontMapper * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","prefix", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetConfigPath",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetConfigPath. Expected _wxFontMapper_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFontMapper_SetConfigPath(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static PyObject *_wrap_wxFontMapper_GetDefaultConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxChar * _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFontMapper_GetDefaultConfigPath",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxChar *)wxFontMapper::GetDefaultConfigPath(); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); - return _resultobj; -} - -static void *SwigwxFontTowxGDIObject(void *ptr) { - wxFont *src; - wxGDIObject *dest; - src = (wxFont *) ptr; - dest = (wxGDIObject *) src; - return (void *) dest; -} - -static void *SwigwxFontTowxObject(void *ptr) { - wxFont *src; - wxObject *dest; - src = (wxFont *) ptr; - dest = (wxObject *) src; - return (void *) dest; -} - -#define new_wxFont(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFont(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _result; - int _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4 = (int ) FALSE; - char * _arg5 = (char *) ""; - wxFontEncoding _arg6 = (wxFontEncoding ) (wxFONTENCODING_DEFAULT); - char *_kwnames[] = { "pointSize","family","style","weight","underline","faceName","encoding", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiii|isi:new_wxFont",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define new_wxFontFromNativeInfo(_swigarg0) (new wxFont(_swigarg0)) -static PyObject *_wrap_new_wxFontFromNativeInfo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _result; - wxNativeFontInfo * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "info", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxFontFromNativeInfo",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFontFromNativeInfo. Expected _wxNativeFontInfo_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxFont *)new_wxFontFromNativeInfo(*_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxFont(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFont",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFont. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxFont(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFont_Ok(_swigobj) (_swigobj->Ok()) -static PyObject *_wrap_wxFont_Ok(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_Ok",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_Ok. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFont_Ok(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetPointSize(_swigobj) (_swigobj->GetPointSize()) -static PyObject *_wrap_wxFont_GetPointSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetPointSize",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetPointSize. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxFont_GetPointSize(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetFamily(_swigobj) (_swigobj->GetFamily()) -static PyObject *_wrap_wxFont_GetFamily(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetFamily",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFamily. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxFont_GetFamily(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetStyle(_swigobj) (_swigobj->GetStyle()) -static PyObject *_wrap_wxFont_GetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetStyle",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetStyle. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxFont_GetStyle(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetWeight(_swigobj) (_swigobj->GetWeight()) -static PyObject *_wrap_wxFont_GetWeight(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetWeight",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetWeight. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxFont_GetWeight(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetUnderlined(_swigobj) (_swigobj->GetUnderlined()) -static PyObject *_wrap_wxFont_GetUnderlined(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetUnderlined",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetUnderlined. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFont_GetUnderlined(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetFaceName(_swigobj) (_swigobj->GetFaceName()) -static PyObject *_wrap_wxFont_GetFaceName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetFaceName",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFaceName. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxFont_GetFaceName(_arg0)); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFont_GetEncoding(_swigobj) (_swigobj->GetEncoding()) -static PyObject *_wrap_wxFont_GetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFontEncoding _result; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetEncoding",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetEncoding. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxFontEncoding )wxFont_GetEncoding(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFont_GetNativeFontInfo(_swigobj) (_swigobj->GetNativeFontInfo()) -static PyObject *_wrap_wxFont_GetNativeFontInfo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxNativeFontInfo * _result; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetNativeFontInfo",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetNativeFontInfo. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxNativeFontInfo *)wxFont_GetNativeFontInfo(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxNativeFontInfo_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxFont_SetPointSize(_swigobj,_swigarg0) (_swigobj->SetPointSize(_swigarg0)) -static PyObject *_wrap_wxFont_SetPointSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","pointSize", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetPointSize",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetPointSize. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont_SetPointSize(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFont_SetFamily(_swigobj,_swigarg0) (_swigobj->SetFamily(_swigarg0)) -static PyObject *_wrap_wxFont_SetFamily(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","family", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetFamily",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFamily. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont_SetFamily(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFont_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) -static PyObject *_wrap_wxFont_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","style", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetStyle",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetStyle. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont_SetStyle(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFont_SetWeight(_swigobj,_swigarg0) (_swigobj->SetWeight(_swigarg0)) -static PyObject *_wrap_wxFont_SetWeight(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","weight", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetWeight",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetWeight. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont_SetWeight(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFont_SetFaceName(_swigobj,_swigarg0) (_swigobj->SetFaceName(_swigarg0)) -static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","faceName", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFont_SetFaceName",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFaceName. Expected _wxFont_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont_SetFaceName(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxFont_SetUnderlined(_swigobj,_swigarg0) (_swigobj->SetUnderlined(_swigarg0)) -static PyObject *_wrap_wxFont_SetUnderlined(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","underlined", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetUnderlined",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetUnderlined. Expected _wxFont_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont_SetUnderlined(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFont_SetEncoding(_swigobj,_swigarg0) (_swigobj->SetEncoding(_swigarg0)) -static PyObject *_wrap_wxFont_SetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _arg0; - wxFontEncoding _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","encoding", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetEncoding",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetEncoding. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont_SetEncoding(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFont_SetNativeFontInfo(_swigobj,_swigarg0) (_swigobj->SetNativeFontInfo(_swigarg0)) -static PyObject *_wrap_wxFont_SetNativeFontInfo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _arg0; - wxNativeFontInfo * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","info", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFont_SetNativeFontInfo",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetNativeFontInfo. Expected _wxFont_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFont_SetNativeFontInfo. Expected _wxNativeFontInfo_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont_SetNativeFontInfo(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFont_GetFamilyString(_swigobj) (_swigobj->GetFamilyString()) -static PyObject *_wrap_wxFont_GetFamilyString(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetFamilyString",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFamilyString. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxFont_GetFamilyString(_arg0)); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFont_GetStyleString(_swigobj) (_swigobj->GetStyleString()) -static PyObject *_wrap_wxFont_GetStyleString(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetStyleString",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetStyleString. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxFont_GetStyleString(_arg0)); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxFont_GetWeightString(_swigobj) (_swigobj->GetWeightString()) -static PyObject *_wrap_wxFont_GetWeightString(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxFont * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetWeightString",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetWeightString. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxFont_GetWeightString(_arg0)); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxFont_GetDefaultEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFontEncoding _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFont_GetDefaultEncoding",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxFontEncoding )wxFont::GetDefaultEncoding(); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxFont_SetDefaultEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFontEncoding _arg0; - char *_kwnames[] = { "encoding", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxFont_SetDefaultEncoding",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont::SetDefaultEncoding(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; +static void *SwigwxCursorTowxGDIObject(void *ptr) { + wxCursor *src; + wxGDIObject *dest; + src = (wxCursor *) ptr; + dest = (wxGDIObject *) src; + return (void *) dest; } -static void *SwigwxFontListTowxObject(void *ptr) { - wxFontList *src; +static void *SwigwxCursorTowxObject(void *ptr) { + wxCursor *src; wxObject *dest; - src = (wxFontList *) ptr; + src = (wxCursor *) ptr; dest = (wxObject *) src; return (void *) dest; } -#define wxFontList_AddFont(_swigobj,_swigarg0) (_swigobj->AddFont(_swigarg0)) -static PyObject *_wrap_wxFontList_AddFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFontList * _arg0; - wxFont * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","font", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontList_AddFont",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontList_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontList_AddFont. Expected _wxFontList_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontList_AddFont. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFontList_AddFont(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontList_FindOrCreateFont(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->FindOrCreateFont(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_wxFontList_FindOrCreateFont(PyObject *self, PyObject *args, PyObject *kwargs) { +#define delete_wxCursor(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxCursor(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxFont * _result; - wxFontList * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - bool _arg5 = (bool ) FALSE; - char * _arg6 = (char *) NULL; - wxFontEncoding _arg7 = (wxFontEncoding ) (wxFONTENCODING_DEFAULT); + wxCursor * _arg0; PyObject * _argo0 = 0; - int tempbool5 = (int) FALSE; - char *_kwnames[] = { "self","point_size","family","style","weight","underline","facename","encoding", NULL }; - char _ptemp[128]; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|isi:wxFontList_FindOrCreateFont",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&tempbool5,&_arg6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxCursor",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontList_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontList_FindOrCreateFont. Expected _wxFontList_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxCursor. Expected _wxCursor_p."); return NULL; } } - _arg5 = (bool ) tempbool5; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxFont *)wxFontList_FindOrCreateFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxCursor(_arg0); - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxFontList_RemoveFont(_swigobj,_swigarg0) (_swigobj->RemoveFont(_swigarg0)) -static PyObject *_wrap_wxFontList_RemoveFont(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxCursor_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxCursor_Ok(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxFontList * _arg0; - wxFont * _arg1; + bool _result; + wxCursor * _arg0; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","font", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontList_RemoveFont",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCursor_Ok",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontList_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontList_RemoveFont. Expected _wxFontList_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontList_RemoveFont. Expected _wxFont_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCursor_Ok. Expected _wxCursor_p."); return NULL; } } { - wxPy_BEGIN_ALLOW_THREADS; - wxFontList_RemoveFont(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxCursor_Ok(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -4075,10 +2745,10 @@ static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|bbb:new_wxColour",_kwnames,&_arg0,&_arg1,&_arg2)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxColour *)new_wxColour(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxColour *)new_wxColour(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); @@ -4107,10 +2777,10 @@ static PyObject *_wrap_delete_wxColour(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxColour(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxColour(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4135,10 +2805,10 @@ static PyObject *_wrap_wxColour_Red(PyObject *self, PyObject *args, PyObject *kw return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (unsigned char )wxColour_Red(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (unsigned char )wxColour_Red(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("b",_result); return _resultobj; @@ -4162,10 +2832,10 @@ static PyObject *_wrap_wxColour_Green(PyObject *self, PyObject *args, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (unsigned char )wxColour_Green(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (unsigned char )wxColour_Green(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("b",_result); return _resultobj; @@ -4189,10 +2859,10 @@ static PyObject *_wrap_wxColour_Blue(PyObject *self, PyObject *args, PyObject *k return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (unsigned char )wxColour_Blue(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (unsigned char )wxColour_Blue(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("b",_result); return _resultobj; @@ -4216,10 +2886,10 @@ static PyObject *_wrap_wxColour_Ok(PyObject *self, PyObject *args, PyObject *kwa return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxColour_Ok(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxColour_Ok(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -4245,10 +2915,10 @@ static PyObject *_wrap_wxColour_Set(PyObject *self, PyObject *args, PyObject *kw return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxColour_Set(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxColour_Set(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4279,10 +2949,10 @@ static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args, PyObject *kw return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxColour_Get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxColour_Get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; @@ -4320,28 +2990,15 @@ static PyObject *_wrap_wxColourDatabase_FindColour(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxColour *)wxColourDatabase_FindColour(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxColour *)wxColourDatabase_FindColour(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); @@ -4384,13 +3041,17 @@ static PyObject *_wrap_wxColourDatabase_FindName(PyObject *self, PyObject *args, return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxColourDatabase_FindName(_arg0,*_arg1)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxColourDatabase_FindName(_arg0,*_arg1)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4399,6 +3060,25 @@ static PyObject *_wrap_wxColourDatabase_FindName(PyObject *self, PyObject *args, } static void wxColourDatabase_Append(wxColourDatabase *self,const wxString & name,int red,int green,int blue) { + // first see if the name is already there + wxString cName = name; + cName.MakeUpper(); + wxString cName2 = cName; + if ( !cName2.Replace(wxT("GRAY"), wxT("GREY")) ) + cName2.clear(); + + wxNode *node = self->First(); + while ( node ) { + const wxChar *key = node->GetKeyString(); + if ( cName == key || cName2 == key ) { + wxColour* c = (wxColour *)node->Data(); + c->Set(red, green, blue); + return; + } + node = node->Next(); + } + + // otherwise append the new colour self->Append(name.c_str(), new wxColour(red, green, blue)); } static PyObject *_wrap_wxColourDatabase_Append(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -4423,28 +3103,15 @@ static PyObject *_wrap_wxColourDatabase_Append(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxColourDatabase_Append(_arg0,*_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxColourDatabase_Append(_arg0,*_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4492,10 +3159,10 @@ static PyObject *_wrap_new_wxPen(PyObject *self, PyObject *args, PyObject *kwarg return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPen *)new_wxPen(*_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxPen *)new_wxPen(*_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p"); @@ -4525,10 +3192,10 @@ static PyObject *_wrap_delete_wxPen(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxPen(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxPen(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4554,10 +3221,10 @@ static PyObject *_wrap_wxPen_GetCap(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxPen_GetCap(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxPen_GetCap(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -4583,10 +3250,10 @@ static PyObject *_wrap_wxPen_GetColour(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxColour (wxPen_GetColour(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxColour (wxPen_GetColour(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -4612,10 +3279,10 @@ static PyObject *_wrap_wxPen_GetJoin(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxPen_GetJoin(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxPen_GetJoin(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -4640,10 +3307,10 @@ static PyObject *_wrap_wxPen_GetStyle(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxPen_GetStyle(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxPen_GetStyle(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -4668,10 +3335,10 @@ static PyObject *_wrap_wxPen_GetWidth(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxPen_GetWidth(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxPen_GetWidth(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -4696,10 +3363,10 @@ static PyObject *_wrap_wxPen_Ok(PyObject *self, PyObject *args, PyObject *kwargs } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxPen_Ok(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxPen_Ok(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -4724,10 +3391,10 @@ static PyObject *_wrap_wxPen_SetCap(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - wxPen_SetCap(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPen_SetCap(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4760,10 +3427,10 @@ static PyObject *_wrap_wxPen_SetColour(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxPen_SetColour(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPen_SetColour(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4789,10 +3456,10 @@ static PyObject *_wrap_wxPen_SetJoin(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - wxPen_SetJoin(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPen_SetJoin(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4818,10 +3485,10 @@ static PyObject *_wrap_wxPen_SetStyle(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - wxPen_SetStyle(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPen_SetStyle(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4847,10 +3514,10 @@ static PyObject *_wrap_wxPen_SetWidth(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - wxPen_SetWidth(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPen_SetWidth(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4893,10 +3560,10 @@ static PyObject *_wrap_wxPen_SetDashes(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxPen_SetDashes(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPen_SetDashes(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4906,6 +3573,45 @@ static PyObject *_wrap_wxPen_SetDashes(PyObject *self, PyObject *args, PyObject return _resultobj; } +static PyObject * wxPen_GetDashes(wxPen *self) { + wxDash* dashes; + int count = self->GetDashes(&dashes); + wxPyBeginBlockThreads(); + PyObject* retval = PyList_New(0); + for (int x=0; xGetCount()) +static PyObject *_wrap_wxPenList_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPenList * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPenList_GetCount",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPenList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPenList_GetCount. Expected _wxPenList_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxPenList_GetCount(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxBrushTowxGDIObject(void *ptr) { wxBrush *src; wxGDIObject *dest; @@ -5206,10 +3940,10 @@ static PyObject *_wrap_new_wxBrush(PyObject *self, PyObject *args, PyObject *kwa return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxBrush *)new_wxBrush(*_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBrush *)new_wxBrush(*_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); @@ -5239,10 +3973,10 @@ static PyObject *_wrap_delete_wxBrush(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxBrush(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxBrush(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5269,10 +4003,10 @@ static PyObject *_wrap_wxBrush_GetColour(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxColour (wxBrush_GetColour(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxColour (wxBrush_GetColour(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -5299,10 +4033,10 @@ static PyObject *_wrap_wxBrush_GetStipple(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxBitmap *)wxBrush_GetStipple(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBitmap *)wxBrush_GetStipple(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); @@ -5333,10 +4067,10 @@ static PyObject *_wrap_wxBrush_GetStyle(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxBrush_GetStyle(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxBrush_GetStyle(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -5361,10 +4095,10 @@ static PyObject *_wrap_wxBrush_Ok(PyObject *self, PyObject *args, PyObject *kwar } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxBrush_Ok(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxBrush_Ok(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -5396,10 +4130,10 @@ static PyObject *_wrap_wxBrush_SetColour(PyObject *self, PyObject *args, PyObjec return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxBrush_SetColour(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBrush_SetColour(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5433,10 +4167,10 @@ static PyObject *_wrap_wxBrush_SetStipple(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBrush_SetStipple(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBrush_SetStipple(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5462,10 +4196,10 @@ static PyObject *_wrap_wxBrush_SetStyle(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBrush_SetStyle(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBrush_SetStyle(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5507,10 +4241,10 @@ static PyObject *_wrap_wxBrushList_AddBrush(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBrushList_AddBrush(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBrushList_AddBrush(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5546,10 +4280,10 @@ static PyObject *_wrap_wxBrushList_FindOrCreateBrush(PyObject *self, PyObject *a return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxBrush *)wxBrushList_FindOrCreateBrush(_arg0,*_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBrush *)wxBrushList_FindOrCreateBrush(_arg0,*_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); @@ -5588,16 +4322,44 @@ static PyObject *_wrap_wxBrushList_RemoveBrush(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBrushList_RemoveBrush(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBrushList_RemoveBrush(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } +#define wxBrushList_GetCount(_swigobj) (_swigobj->GetCount()) +static PyObject *_wrap_wxBrushList_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxBrushList * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBrushList_GetCount",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBrushList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrushList_GetCount. Expected _wxBrushList_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxBrushList_GetCount(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxDCTowxObject(void *ptr) { wxDC *src; wxObject *dest; @@ -5624,10 +4386,10 @@ static PyObject *_wrap_delete_wxDC(PyObject *self, PyObject *args, PyObject *kwa } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxDC(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxDC(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5652,10 +4414,10 @@ static PyObject *_wrap_wxDC_BeginDrawing(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_BeginDrawing(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_BeginDrawing(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5698,10 +4460,10 @@ static PyObject *_wrap_wxDC_Blit(PyObject *self, PyObject *args, PyObject *kwarg } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxDC_Blit(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDC_Blit(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -5725,10 +4487,10 @@ static PyObject *_wrap_wxDC_Clear(PyObject *self, PyObject *args, PyObject *kwar } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_Clear(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_Clear(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5755,10 +4517,10 @@ static PyObject *_wrap_wxDC_CrossHair(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_CrossHair(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_CrossHair(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5783,10 +4545,10 @@ static PyObject *_wrap_wxDC_DestroyClippingRegion(PyObject *self, PyObject *args } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DestroyClippingRegion(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DestroyClippingRegion(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5813,10 +4575,10 @@ static PyObject *_wrap_wxDC_DeviceToLogicalX(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_DeviceToLogicalX(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_DeviceToLogicalX(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -5842,10 +4604,10 @@ static PyObject *_wrap_wxDC_DeviceToLogicalXRel(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_DeviceToLogicalXRel(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_DeviceToLogicalXRel(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -5871,10 +4633,10 @@ static PyObject *_wrap_wxDC_DeviceToLogicalY(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_DeviceToLogicalY(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_DeviceToLogicalY(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -5900,10 +4662,10 @@ static PyObject *_wrap_wxDC_DeviceToLogicalYRel(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_DeviceToLogicalYRel(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_DeviceToLogicalYRel(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -5933,10 +4695,10 @@ static PyObject *_wrap_wxDC_DrawArc(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5964,10 +4726,10 @@ static PyObject *_wrap_wxDC_DrawCircle(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawCircle(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawCircle(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5996,10 +4758,10 @@ static PyObject *_wrap_wxDC_DrawEllipse(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawEllipse(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawEllipse(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6030,10 +4792,10 @@ static PyObject *_wrap_wxDC_DrawEllipticArc(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawEllipticArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawEllipticArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6069,13 +4831,126 @@ static PyObject *_wrap_wxDC_DrawIcon(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawIcon(_arg0,*_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawIcon(_arg0,*_arg1,_arg2,_arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_DrawLabel(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawLabel(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDC_DrawLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDC * _arg0; + wxString * _arg1; + wxRect * _arg2; + int _arg3 = (int ) wxALIGN_LEFT|wxALIGN_TOP; + int _arg4 = (int ) -1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + wxRect temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","text","rect","alignment","indexAccel", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|ii:wxDC_DrawLabel",_kwnames,&_argo0,&_obj1,&_obj2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawLabel. Expected _wxDC_p."); + return NULL; + } + } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} +{ + _arg2 = &temp; + if (! wxRect_helper(_obj2, &_arg2)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawLabel(_arg0,*_arg1,*_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static wxRect wxDC_DrawImageLabel(wxDC *self,const wxString & text,const wxBitmap & image,const wxRect & rect,int alignment,int indexAccel) { + wxRect rv; + self->DrawLabel(text, image, rect, alignment, indexAccel, &rv); + return rv; + } +static PyObject *_wrap_wxDC_DrawImageLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _result; + wxDC * _arg0; + wxString * _arg1; + wxBitmap * _arg2; + wxRect * _arg3; + int _arg4 = (int ) wxALIGN_LEFT|wxALIGN_TOP; + int _arg5 = (int ) -1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + wxRect temp; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","text","image","rect","alignment","indexAccel", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO|ii:wxDC_DrawImageLabel",_kwnames,&_argo0,&_obj1,&_argo2,&_obj3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawImageLabel. Expected _wxDC_p."); + return NULL; + } + } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDC_DrawImageLabel. Expected _wxBitmap_p."); + return NULL; + } + } +{ + _arg3 = &temp; + if (! wxRect_helper(_obj3, &_arg3)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxRect (wxDC_DrawImageLabel(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -6101,10 +4976,10 @@ static PyObject *_wrap_wxDC_DrawLine(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawLine(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawLine(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6145,10 +5020,10 @@ static PyObject *_wrap_wxDC_DrawLines(PyObject *self, PyObject *args, PyObject * _arg1 = NPOINTS; } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawLines(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawLines(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6193,10 +5068,10 @@ static PyObject *_wrap_wxDC_DrawPolygon(PyObject *self, PyObject *args, PyObject _arg1 = NPOINTS; } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawPolygon(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawPolygon(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6226,10 +5101,10 @@ static PyObject *_wrap_wxDC_DrawPoint(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawPoint(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawPoint(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6258,10 +5133,10 @@ static PyObject *_wrap_wxDC_DrawRectangle(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawRectangle(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawRectangle(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6291,28 +5166,15 @@ static PyObject *_wrap_wxDC_DrawRotatedText(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawRotatedText(_arg0,*_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawRotatedText(_arg0,*_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6346,10 +5208,10 @@ static PyObject *_wrap_wxDC_DrawRoundedRectangle(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawRoundedRectangle(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawRoundedRectangle(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6388,10 +5250,10 @@ static PyObject *_wrap_wxDC_DrawSpline(PyObject *self, PyObject *args, PyObject _arg1 = NPOINTS; } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawSpline(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawSpline(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6423,28 +5285,15 @@ static PyObject *_wrap_wxDC_DrawText(PyObject *self, PyObject *args, PyObject *k } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawText(_arg0,*_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawText(_arg0,*_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6473,10 +5322,10 @@ static PyObject *_wrap_wxDC_EndDoc(PyObject *self, PyObject *args, PyObject *kwa } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_EndDoc(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_EndDoc(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6501,10 +5350,10 @@ static PyObject *_wrap_wxDC_EndDrawing(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_EndDrawing(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_EndDrawing(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6529,10 +5378,10 @@ static PyObject *_wrap_wxDC_EndPage(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_EndPage(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_EndPage(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6542,6 +5391,7 @@ static PyObject *_wrap_wxDC_EndPage(PyObject *self, PyObject *args, PyObject *kw #define wxDC_FloodFill(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->FloodFill(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxDC * _arg0; long _arg1; long _arg2; @@ -6568,13 +5418,12 @@ static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_FloodFill(_arg0,_arg1,_arg2,*_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDC_FloodFill(_arg0,_arg1,_arg2,*_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -6598,19 +5447,13 @@ static PyObject *_wrap_wxDC_GetBackground(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBrush & _result_ref = wxDC_GetBackground(_arg0); - _result = (wxBrush *) &_result_ref; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxBrush (wxDC_GetBackground(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBrush_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -6634,19 +5477,13 @@ static PyObject *_wrap_wxDC_GetBrush(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBrush & _result_ref = wxDC_GetBrush(_arg0); - _result = (wxBrush *) &_result_ref; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxBrush (wxDC_GetBrush(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBrush_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -6669,10 +5506,10 @@ static PyObject *_wrap_wxDC_GetCharHeight(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_GetCharHeight(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_GetCharHeight(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -6697,10 +5534,10 @@ static PyObject *_wrap_wxDC_GetCharWidth(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_GetCharWidth(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_GetCharWidth(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -6744,10 +5581,10 @@ static PyObject *_wrap_wxDC_GetClippingBox(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_GetClippingBox(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_GetClippingBox(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6794,19 +5631,13 @@ static PyObject *_wrap_wxDC_GetFont(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - wxFont & _result_ref = wxDC_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxFont (wxDC_GetFont(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -6829,10 +5660,10 @@ static PyObject *_wrap_wxDC_GetLogicalFunction(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxDC_GetLogicalFunction(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxDC_GetLogicalFunction(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -6866,10 +5697,10 @@ static PyObject *_wrap_wxDC_GetLogicalScale(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_GetLogicalScale(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_GetLogicalScale(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6905,10 +5736,10 @@ static PyObject *_wrap_wxDC_GetMapMode(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxDC_GetMapMode(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxDC_GetMapMode(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -6933,10 +5764,10 @@ static PyObject *_wrap_wxDC_GetOptimization(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxDC_GetOptimization(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDC_GetOptimization(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -6962,19 +5793,13 @@ static PyObject *_wrap_wxDC_GetPen(PyObject *self, PyObject *args, PyObject *kwa } } { - wxPy_BEGIN_ALLOW_THREADS; - wxPen & _result_ref = wxDC_GetPen(_arg0); - _result = (wxPen *) &_result_ref; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxPen (wxDC_GetPen(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPen_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -7004,10 +5829,10 @@ static PyObject *_wrap_wxDC_GetPixel(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxColour *)wxDC_GetPixel(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxColour *)wxDC_GetPixel(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); @@ -7047,10 +5872,10 @@ static PyObject *_wrap_wxDC_GetSizeTuple(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_GetSizeTuple(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_GetSizeTuple(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7087,10 +5912,10 @@ static PyObject *_wrap_wxDC_GetSize(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxSize (wxDC_GetSize(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxDC_GetSize(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -7117,10 +5942,10 @@ static PyObject *_wrap_wxDC_GetSizeMM(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxSize (wxDC_GetSizeMM(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxDC_GetSizeMM(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -7147,10 +5972,10 @@ static PyObject *_wrap_wxDC_GetTextBackground(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxColour (wxDC_GetTextBackground(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxColour (wxDC_GetTextBackground(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -7187,28 +6012,15 @@ static PyObject *_wrap_wxDC_GetTextExtent(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7271,22 +6083,9 @@ static PyObject *_wrap_wxDC_GetFullTextExtent(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -7296,10 +6095,10 @@ static PyObject *_wrap_wxDC_GetFullTextExtent(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_GetFullTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_GetFullTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7350,10 +6149,10 @@ static PyObject *_wrap_wxDC_GetTextForeground(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxColour (wxDC_GetTextForeground(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxColour (wxDC_GetTextForeground(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -7388,10 +6187,10 @@ static PyObject *_wrap_wxDC_GetUserScale(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_GetUserScale(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_GetUserScale(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7428,10 +6227,10 @@ static PyObject *_wrap_wxDC_LogicalToDeviceX(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_LogicalToDeviceX(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_LogicalToDeviceX(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -7457,10 +6256,10 @@ static PyObject *_wrap_wxDC_LogicalToDeviceXRel(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_LogicalToDeviceXRel(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_LogicalToDeviceXRel(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -7486,10 +6285,10 @@ static PyObject *_wrap_wxDC_LogicalToDeviceY(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_LogicalToDeviceY(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_LogicalToDeviceY(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -7515,10 +6314,10 @@ static PyObject *_wrap_wxDC_LogicalToDeviceYRel(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_LogicalToDeviceYRel(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_LogicalToDeviceYRel(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -7543,10 +6342,10 @@ static PyObject *_wrap_wxDC_MaxX(PyObject *self, PyObject *args, PyObject *kwarg } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_MaxX(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_MaxX(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -7571,10 +6370,10 @@ static PyObject *_wrap_wxDC_MaxY(PyObject *self, PyObject *args, PyObject *kwarg } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_MaxY(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_MaxY(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -7599,10 +6398,10 @@ static PyObject *_wrap_wxDC_MinX(PyObject *self, PyObject *args, PyObject *kwarg } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_MinX(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_MinX(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -7627,10 +6426,10 @@ static PyObject *_wrap_wxDC_MinY(PyObject *self, PyObject *args, PyObject *kwarg } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxDC_MinY(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxDC_MinY(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -7655,10 +6454,10 @@ static PyObject *_wrap_wxDC_Ok(PyObject *self, PyObject *args, PyObject *kwargs) } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxDC_Ok(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDC_Ok(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -7684,10 +6483,10 @@ static PyObject *_wrap_wxDC_SetDeviceOrigin(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetDeviceOrigin(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetDeviceOrigin(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7721,10 +6520,10 @@ static PyObject *_wrap_wxDC_SetBackground(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetBackground(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetBackground(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7750,10 +6549,10 @@ static PyObject *_wrap_wxDC_SetBackgroundMode(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetBackgroundMode(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetBackgroundMode(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7782,10 +6581,10 @@ static PyObject *_wrap_wxDC_SetClippingRegion(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetClippingRegion(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetClippingRegion(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7819,10 +6618,10 @@ static PyObject *_wrap_wxDC_SetClippingRegionAsRegion(PyObject *self, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetClippingRegionAsRegion(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetClippingRegionAsRegion(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7856,10 +6655,10 @@ static PyObject *_wrap_wxDC_SetPalette(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetPalette(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetPalette(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7893,10 +6692,10 @@ static PyObject *_wrap_wxDC_SetBrush(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetBrush(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetBrush(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7930,10 +6729,10 @@ static PyObject *_wrap_wxDC_SetFont(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetFont(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetFont(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7959,10 +6758,10 @@ static PyObject *_wrap_wxDC_SetLogicalFunction(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetLogicalFunction(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetLogicalFunction(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7989,10 +6788,10 @@ static PyObject *_wrap_wxDC_SetLogicalScale(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetLogicalScale(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetLogicalScale(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8018,10 +6817,10 @@ static PyObject *_wrap_wxDC_SetMapMode(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetMapMode(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetMapMode(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8049,10 +6848,10 @@ static PyObject *_wrap_wxDC_SetOptimization(PyObject *self, PyObject *args, PyOb } _arg1 = (bool ) tempbool1; { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetOptimization(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetOptimization(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8086,10 +6885,10 @@ static PyObject *_wrap_wxDC_SetPen(PyObject *self, PyObject *args, PyObject *kwa } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetPen(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetPen(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8122,10 +6921,10 @@ static PyObject *_wrap_wxDC_SetTextBackground(PyObject *self, PyObject *args, Py return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetTextBackground(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetTextBackground(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8158,10 +6957,10 @@ static PyObject *_wrap_wxDC_SetTextForeground(PyObject *self, PyObject *args, Py return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetTextForeground(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetTextForeground(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8188,10 +6987,10 @@ static PyObject *_wrap_wxDC_SetUserScale(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetUserScale(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetUserScale(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8214,33 +7013,20 @@ static PyObject *_wrap_wxDC_StartDoc(PyObject *self, PyObject *args, PyObject *k if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_StartDoc. Expected _wxDC_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_StartDoc. Expected _wxDC_p."); return NULL; + } } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxDC_StartDoc(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDC_StartDoc(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -8268,10 +7054,10 @@ static PyObject *_wrap_wxDC_StartPage(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_StartPage(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_StartPage(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8308,10 +7094,10 @@ static PyObject *_wrap_wxDC_DrawBitmap(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_DrawBitmap(_arg0,*_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_DrawBitmap(_arg0,*_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8337,10 +7123,10 @@ static PyObject *_wrap_wxDC_CanDrawBitmap(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxDC_CanDrawBitmap(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDC_CanDrawBitmap(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -8365,10 +7151,10 @@ static PyObject *_wrap_wxDC_CanGetTextExtent(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxDC_CanGetTextExtent(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDC_CanGetTextExtent(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -8393,10 +7179,10 @@ static PyObject *_wrap_wxDC_GetDepth(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxDC_GetDepth(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxDC_GetDepth(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -8422,10 +7208,10 @@ static PyObject *_wrap_wxDC_GetPPI(PyObject *self, PyObject *args, PyObject *kwa } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxSize (wxDC_GetPPI(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxDC_GetPPI(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -8460,10 +7246,10 @@ static PyObject *_wrap_wxDC_GetLogicalOrigin(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_GetLogicalOrigin(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_GetLogicalOrigin(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8500,10 +7286,10 @@ static PyObject *_wrap_wxDC_SetLogicalOrigin(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetLogicalOrigin(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetLogicalOrigin(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8538,10 +7324,10 @@ static PyObject *_wrap_wxDC_GetDeviceOrigin(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_GetDeviceOrigin(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_GetDeviceOrigin(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8582,10 +7368,10 @@ static PyObject *_wrap_wxDC_SetAxisOrientation(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; _arg2 = (bool ) tempbool2; { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_SetAxisOrientation(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_SetAxisOrientation(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8612,10 +7398,10 @@ static PyObject *_wrap_wxDC_CalcBoundingBox(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_CalcBoundingBox(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_CalcBoundingBox(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8640,10 +7426,10 @@ static PyObject *_wrap_wxDC_ResetBoundingBox(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_ResetBoundingBox(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_ResetBoundingBox(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8687,10 +7473,10 @@ static PyObject *_wrap_wxDC_GetBoundingBox(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - wxDC_GetBoundingBox(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_GetBoundingBox(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8814,10 +7600,10 @@ static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObj _arg2 = _obj2; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxDC__DrawPointList(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxDC__DrawPointList(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; @@ -8922,10 +7708,10 @@ static PyObject *_wrap_wxDC__DrawLineList(PyObject *self, PyObject *args, PyObje _arg2 = _obj2; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxDC__DrawLineList(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxDC__DrawLineList(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; @@ -8960,10 +7746,10 @@ static PyObject *_wrap_new_wxMemoryDC(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxMemoryDC",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMemoryDC *)new_wxMemoryDC(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxMemoryDC *)new_wxMemoryDC(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxMemoryDC_p"); @@ -9002,16 +7788,231 @@ static PyObject *_wrap_wxMemoryDC_SelectObject(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - wxMemoryDC_SelectObject(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxMemoryDC_SelectObject(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxBufferedDCTowxMemoryDC(void *ptr) { + wxBufferedDC *src; + wxMemoryDC *dest; + src = (wxBufferedDC *) ptr; + dest = (wxMemoryDC *) src; + return (void *) dest; +} + +static void *SwigwxBufferedDCTowxDC(void *ptr) { + wxBufferedDC *src; + wxDC *dest; + src = (wxBufferedDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} + +static void *SwigwxBufferedDCTowxObject(void *ptr) { + wxBufferedDC *src; + wxObject *dest; + src = (wxBufferedDC *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxBufferedDC(_swigarg0,_swigarg1) (new wxBufferedDC(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxBufferedDC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBufferedDC * _result; + wxDC * _arg0; + wxBitmap * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "dc","buffer", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxBufferedDC",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBufferedDC. Expected _wxDC_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxBufferedDC. Expected _wxBitmap_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBufferedDC *)new_wxBufferedDC(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBufferedDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxBufferedDCInternalBuffer(_swigarg0,_swigarg1) (new wxBufferedDC(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxBufferedDCInternalBuffer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBufferedDC * _result; + wxDC * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "dc","area", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxBufferedDCInternalBuffer",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBufferedDCInternalBuffer. Expected _wxDC_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBufferedDC *)new_wxBufferedDCInternalBuffer(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBufferedDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxBufferedDC_UnMask(_swigobj) (_swigobj->UnMask()) +static PyObject *_wrap_wxBufferedDC_UnMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBufferedDC * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBufferedDC_UnMask",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBufferedDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBufferedDC_UnMask. Expected _wxBufferedDC_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBufferedDC_UnMask(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } +static void *SwigwxBufferedPaintDCTowxBufferedDC(void *ptr) { + wxBufferedPaintDC *src; + wxBufferedDC *dest; + src = (wxBufferedPaintDC *) ptr; + dest = (wxBufferedDC *) src; + return (void *) dest; +} + +static void *SwigwxBufferedPaintDCTowxMemoryDC(void *ptr) { + wxBufferedPaintDC *src; + wxMemoryDC *dest; + src = (wxBufferedPaintDC *) ptr; + dest = (wxMemoryDC *) src; + return (void *) dest; +} + +static void *SwigwxBufferedPaintDCTowxDC(void *ptr) { + wxBufferedPaintDC *src; + wxDC *dest; + src = (wxBufferedPaintDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} + +static void *SwigwxBufferedPaintDCTowxObject(void *ptr) { + wxBufferedPaintDC *src; + wxObject *dest; + src = (wxBufferedPaintDC *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxBufferedPaintDC(_swigarg0,_swigarg1) (new wxBufferedPaintDC(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxBufferedPaintDC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBufferedPaintDC * _result; + wxWindow * _arg0; + wxBitmap * _arg1 = (wxBitmap *) &wxNullBitmap; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "window","buffer", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:new_wxBufferedPaintDC",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBufferedPaintDC. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxBufferedPaintDC. Expected _wxBitmap_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBufferedPaintDC *)new_wxBufferedPaintDC(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBufferedPaintDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static void *SwigwxScreenDCTowxDC(void *ptr) { wxScreenDC *src; wxDC *dest; @@ -9039,10 +8040,10 @@ static PyObject *_wrap_new_wxScreenDC(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxScreenDC",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxScreenDC *)new_wxScreenDC(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxScreenDC *)new_wxScreenDC(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxScreenDC_p"); @@ -9082,10 +8083,10 @@ static PyObject *_wrap_wxScreenDC_StartDrawingOnTopWin(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxScreenDC_StartDrawingOnTopWin(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxScreenDC_StartDrawingOnTopWin(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9119,10 +8120,10 @@ static PyObject *_wrap_wxScreenDC_StartDrawingOnTop(PyObject *self, PyObject *ar return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxScreenDC_StartDrawingOnTop(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxScreenDC_StartDrawingOnTop(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9147,10 +8148,10 @@ static PyObject *_wrap_wxScreenDC_EndDrawingOnTop(PyObject *self, PyObject *args } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxScreenDC_EndDrawingOnTop(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxScreenDC_EndDrawingOnTop(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9192,10 +8193,10 @@ static PyObject *_wrap_new_wxClientDC(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxClientDC *)new_wxClientDC(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxClientDC *)new_wxClientDC(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxClientDC_p"); @@ -9243,10 +8244,10 @@ static PyObject *_wrap_new_wxPaintDC(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPaintDC *)new_wxPaintDC(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxPaintDC *)new_wxPaintDC(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxPaintDC_p"); @@ -9294,10 +8295,10 @@ static PyObject *_wrap_new_wxWindowDC(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindowDC *)new_wxWindowDC(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxWindowDC *)new_wxWindowDC(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindowDC_p"); @@ -9309,84 +8310,6 @@ static PyObject *_wrap_new_wxWindowDC(PyObject *self, PyObject *args, PyObject * return _resultobj; } -static void *SwigwxPostScriptDCTowxDC(void *ptr) { - wxPostScriptDC *src; - wxDC *dest; - src = (wxPostScriptDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -static void *SwigwxPostScriptDCTowxObject(void *ptr) { - wxPostScriptDC *src; - wxObject *dest; - src = (wxPostScriptDC *) ptr; - dest = (wxObject *) src; - return (void *) dest; -} - -#define new_wxPostScriptDC(_swigarg0,_swigarg1,_swigarg2) (new wxPostScriptDC(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPostScriptDC * _result; - wxString * _arg0; - bool _arg1 = (bool ) TRUE; - wxWindow * _arg2 = (wxWindow *) NULL; - PyObject * _obj0 = 0; - int tempbool1 = (int) TRUE; - PyObject * _argo2 = 0; - char *_kwnames[] = { "output","interactive","win", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:new_wxPostScriptDC",_kwnames,&_obj0,&tempbool1,&_argo2)) - return NULL; -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif -} - _arg1 = (bool ) tempbool1; - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxPostScriptDC. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPostScriptDC *)new_wxPostScriptDC(*_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPostScriptDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - static void *SwigwxPaletteTowxGDIObject(void *ptr) { wxPalette *src; wxGDIObject *dest; @@ -9448,10 +8371,10 @@ static PyObject *_wrap_new_wxPalette(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPalette *)new_wxPalette(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxPalette *)new_wxPalette(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxPalette_p"); @@ -9490,10 +8413,10 @@ static PyObject *_wrap_delete_wxPalette(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxPalette(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxPalette(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -9522,10 +8445,10 @@ static PyObject *_wrap_wxPalette_GetPixel(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxPalette_GetPixel(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxPalette_GetPixel(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9538,16 +8461,25 @@ static PyObject *_wrap_wxPalette_GetRGB(PyObject *self, PyObject *args, PyObject wxPalette * _arg0; int _arg1; byte * _arg2; + int temp; byte * _arg3; + int temp0; byte * _arg4; + int temp1; PyObject * _argo0 = 0; - PyObject * _argo2 = 0; - PyObject * _argo3 = 0; - PyObject * _argo4 = 0; - char *_kwnames[] = { "self","pixel","OUTPUT","OUTPUT","OUTPUT", NULL }; + char *_kwnames[] = { "self","pixel", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOOO:wxPalette_GetRGB",_kwnames,&_argo0,&_arg1,&_argo2,&_argo3,&_argo4)) +{ + _arg2 = (byte*)&temp; +} +{ + _arg3 = (byte*)&temp0; +} +{ + _arg4 = (byte*)&temp1; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPalette_GetRGB",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -9556,34 +8488,28 @@ static PyObject *_wrap_wxPalette_GetRGB(PyObject *self, PyObject *args, PyObject return NULL; } } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_byte_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxPalette_GetRGB. Expected _byte_p."); - return NULL; - } - } - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_byte_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxPalette_GetRGB. Expected _byte_p."); - return NULL; - } - } - if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_byte_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxPalette_GetRGB. Expected _byte_p."); - return NULL; - } - } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxPalette_GetRGB(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxPalette_GetRGB(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg4)); + _resultobj = t_output_helper(_resultobj, o); +} return _resultobj; } @@ -9606,10 +8532,10 @@ static PyObject *_wrap_wxPalette_Ok(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxPalette_Ok(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxPalette_Ok(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9638,10 +8564,10 @@ static PyObject *_wrap_new_wxImageList(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"ii|ii:new_wxImageList",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxImageList *)new_wxImageList(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxImageList *)new_wxImageList(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); @@ -9671,10 +8597,10 @@ static PyObject *_wrap_delete_wxImageList(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxImageList(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxImageList(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -9718,10 +8644,10 @@ static PyObject *_wrap_wxImageList_Add(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxImageList_Add(_arg0,*_arg1,*_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxImageList_Add(_arg0,*_arg1,*_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9763,10 +8689,10 @@ static PyObject *_wrap_wxImageList_AddWithColourMask(PyObject *self, PyObject *a return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxImageList_AddWithColourMask(_arg0,*_arg1,*_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxImageList_AddWithColourMask(_arg0,*_arg1,*_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9800,10 +8726,10 @@ static PyObject *_wrap_wxImageList_AddIcon(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxImageList_AddIcon(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxImageList_AddIcon(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9838,10 +8764,10 @@ static PyObject *_wrap_wxImageList_Replace(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxImageList_Replace(_arg0,_arg1,*_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxImageList_Replace(_arg0,_arg1,*_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9882,10 +8808,10 @@ static PyObject *_wrap_wxImageList_Draw(PyObject *self, PyObject *args, PyObject } _arg6 = (bool ) tempbool6; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxImageList_Draw(_arg0,_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxImageList_Draw(_arg0,_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9910,10 +8836,10 @@ static PyObject *_wrap_wxImageList_GetImageCount(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxImageList_GetImageCount(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxImageList_GetImageCount(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9939,10 +8865,10 @@ static PyObject *_wrap_wxImageList_Remove(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxImageList_Remove(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxImageList_Remove(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9967,10 +8893,10 @@ static PyObject *_wrap_wxImageList_RemoveAll(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxImageList_RemoveAll(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxImageList_RemoveAll(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10005,10 +8931,10 @@ static PyObject *_wrap_wxImageList_GetSize(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - wxImageList_GetSize(_arg0,_arg1,*_arg2,*_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxImageList_GetSize(_arg0,_arg1,*_arg2,*_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10056,10 +8982,10 @@ static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|llll:new_wxRegion",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxRegion_p"); @@ -10089,10 +9015,10 @@ static PyObject *_wrap_delete_wxRegion(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxRegion(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxRegion(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10117,10 +9043,10 @@ static PyObject *_wrap_wxRegion_Clear(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - wxRegion_Clear(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRegion_Clear(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10148,10 +9074,10 @@ static PyObject *_wrap_wxRegion_Contains(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionContain )wxRegion_Contains(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxRegionContain )wxRegion_Contains(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10184,10 +9110,10 @@ static PyObject *_wrap_wxRegion_ContainsPoint(PyObject *self, PyObject *args, Py return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionContain )wxRegion_ContainsPoint(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxRegionContain )wxRegion_ContainsPoint(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10220,10 +9146,10 @@ static PyObject *_wrap_wxRegion_ContainsRect(PyObject *self, PyObject *args, PyO return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionContain )wxRegion_ContainsRect(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxRegionContain )wxRegion_ContainsRect(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10252,10 +9178,10 @@ static PyObject *_wrap_wxRegion_ContainsRectDim(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionContain )wxRegion_ContainsRectDim(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxRegionContain )wxRegion_ContainsRectDim(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10281,10 +9207,10 @@ static PyObject *_wrap_wxRegion_GetBox(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxRect (wxRegion_GetBox(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxRect (wxRegion_GetBox(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -10314,10 +9240,10 @@ static PyObject *_wrap_wxRegion_Intersect(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_Intersect(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_Intersect(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10350,10 +9276,10 @@ static PyObject *_wrap_wxRegion_IntersectRect(PyObject *self, PyObject *args, Py return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_IntersectRect(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_IntersectRect(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10387,10 +9313,10 @@ static PyObject *_wrap_wxRegion_IntersectRegion(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_IntersectRegion(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_IntersectRegion(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10415,10 +9341,10 @@ static PyObject *_wrap_wxRegion_IsEmpty(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_IsEmpty(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_IsEmpty(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10447,10 +9373,10 @@ static PyObject *_wrap_wxRegion_Union(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_Union(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_Union(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10483,10 +9409,10 @@ static PyObject *_wrap_wxRegion_UnionRect(PyObject *self, PyObject *args, PyObje return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_UnionRect(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_UnionRect(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10520,10 +9446,10 @@ static PyObject *_wrap_wxRegion_UnionRegion(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_UnionRegion(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_UnionRegion(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10552,10 +9478,10 @@ static PyObject *_wrap_wxRegion_Subtract(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_Subtract(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_Subtract(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10588,10 +9514,10 @@ static PyObject *_wrap_wxRegion_SubtractRect(PyObject *self, PyObject *args, PyO return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_SubtractRect(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_SubtractRect(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10625,10 +9551,10 @@ static PyObject *_wrap_wxRegion_SubtractRegion(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_SubtractRegion(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_SubtractRegion(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10657,10 +9583,10 @@ static PyObject *_wrap_wxRegion_Xor(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_Xor(_arg0,_arg1,_arg2,_arg3,_arg4); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_Xor(_arg0,_arg1,_arg2,_arg3,_arg4); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10693,10 +9619,10 @@ static PyObject *_wrap_wxRegion_XorRect(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_XorRect(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_XorRect(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10730,10 +9656,10 @@ static PyObject *_wrap_wxRegion_XorRegion(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_XorRegion(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegion_XorRegion(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10767,10 +9693,10 @@ static PyObject *_wrap_new_wxRegionIterator(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionIterator *)new_wxRegionIterator(*_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxRegionIterator *)new_wxRegionIterator(*_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxRegionIterator_p"); @@ -10800,10 +9726,10 @@ static PyObject *_wrap_delete_wxRegionIterator(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxRegionIterator(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxRegionIterator(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10829,10 +9755,10 @@ static PyObject *_wrap_wxRegionIterator_GetX(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetX(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxRegionIterator_GetX(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -10857,10 +9783,10 @@ static PyObject *_wrap_wxRegionIterator_GetY(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetY(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxRegionIterator_GetY(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -10885,10 +9811,10 @@ static PyObject *_wrap_wxRegionIterator_GetW(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetW(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxRegionIterator_GetW(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -10913,10 +9839,10 @@ static PyObject *_wrap_wxRegionIterator_GetWidth(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetWidth(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxRegionIterator_GetWidth(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -10941,10 +9867,10 @@ static PyObject *_wrap_wxRegionIterator_GetH(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetH(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxRegionIterator_GetH(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -10969,10 +9895,10 @@ static PyObject *_wrap_wxRegionIterator_GetHeight(PyObject *self, PyObject *args } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetHeight(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxRegionIterator_GetHeight(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -10998,10 +9924,10 @@ static PyObject *_wrap_wxRegionIterator_GetRect(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxRect (wxRegionIterator_GetRect(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxRect (wxRegionIterator_GetRect(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -11027,10 +9953,10 @@ static PyObject *_wrap_wxRegionIterator_HaveRects(PyObject *self, PyObject *args } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegionIterator_HaveRects(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRegionIterator_HaveRects(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -11054,10 +9980,10 @@ static PyObject *_wrap_wxRegionIterator_Reset(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - wxRegionIterator_Reset(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRegionIterator_Reset(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -11084,10 +10010,10 @@ static PyObject *_wrap_wxRegionIterator_Next(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxRegionIterator_Next(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRegionIterator_Next(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -11144,7 +10070,6 @@ static PyMethodDef gdicMethods[] = { { "wxPalette_GetPixel", (PyCFunction) _wrap_wxPalette_GetPixel, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPalette", (PyCFunction) _wrap_delete_wxPalette, METH_VARARGS | METH_KEYWORDS }, { "new_wxPalette", (PyCFunction) _wrap_new_wxPalette, METH_VARARGS | METH_KEYWORDS }, - { "new_wxPostScriptDC", (PyCFunction) _wrap_new_wxPostScriptDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxWindowDC", (PyCFunction) _wrap_new_wxWindowDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxPaintDC", (PyCFunction) _wrap_new_wxPaintDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxClientDC", (PyCFunction) _wrap_new_wxClientDC, METH_VARARGS | METH_KEYWORDS }, @@ -11152,6 +10077,10 @@ static PyMethodDef gdicMethods[] = { { "wxScreenDC_StartDrawingOnTop", (PyCFunction) _wrap_wxScreenDC_StartDrawingOnTop, METH_VARARGS | METH_KEYWORDS }, { "wxScreenDC_StartDrawingOnTopWin", (PyCFunction) _wrap_wxScreenDC_StartDrawingOnTopWin, METH_VARARGS | METH_KEYWORDS }, { "new_wxScreenDC", (PyCFunction) _wrap_new_wxScreenDC, METH_VARARGS | METH_KEYWORDS }, + { "new_wxBufferedPaintDC", (PyCFunction) _wrap_new_wxBufferedPaintDC, METH_VARARGS | METH_KEYWORDS }, + { "wxBufferedDC_UnMask", (PyCFunction) _wrap_wxBufferedDC_UnMask, METH_VARARGS | METH_KEYWORDS }, + { "new_wxBufferedDCInternalBuffer", (PyCFunction) _wrap_new_wxBufferedDCInternalBuffer, METH_VARARGS | METH_KEYWORDS }, + { "new_wxBufferedDC", (PyCFunction) _wrap_new_wxBufferedDC, METH_VARARGS | METH_KEYWORDS }, { "wxMemoryDC_SelectObject", (PyCFunction) _wrap_wxMemoryDC_SelectObject, METH_VARARGS | METH_KEYWORDS }, { "new_wxMemoryDC", (PyCFunction) _wrap_new_wxMemoryDC, METH_VARARGS | METH_KEYWORDS }, { "wxDC__DrawLineList", (PyCFunction) _wrap_wxDC__DrawLineList, METH_VARARGS | METH_KEYWORDS }, @@ -11228,6 +10157,8 @@ static PyMethodDef gdicMethods[] = { { "wxDC_DrawPolygon", (PyCFunction) _wrap_wxDC_DrawPolygon, METH_VARARGS | METH_KEYWORDS }, { "wxDC_DrawLines", (PyCFunction) _wrap_wxDC_DrawLines, METH_VARARGS | METH_KEYWORDS }, { "wxDC_DrawLine", (PyCFunction) _wrap_wxDC_DrawLine, METH_VARARGS | METH_KEYWORDS }, + { "wxDC_DrawImageLabel", (PyCFunction) _wrap_wxDC_DrawImageLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxDC_DrawLabel", (PyCFunction) _wrap_wxDC_DrawLabel, METH_VARARGS | METH_KEYWORDS }, { "wxDC_DrawIcon", (PyCFunction) _wrap_wxDC_DrawIcon, METH_VARARGS | METH_KEYWORDS }, { "wxDC_DrawEllipticArc", (PyCFunction) _wrap_wxDC_DrawEllipticArc, METH_VARARGS | METH_KEYWORDS }, { "wxDC_DrawEllipse", (PyCFunction) _wrap_wxDC_DrawEllipse, METH_VARARGS | METH_KEYWORDS }, @@ -11243,6 +10174,7 @@ static PyMethodDef gdicMethods[] = { { "wxDC_Blit", (PyCFunction) _wrap_wxDC_Blit, METH_VARARGS | METH_KEYWORDS }, { "wxDC_BeginDrawing", (PyCFunction) _wrap_wxDC_BeginDrawing, METH_VARARGS | METH_KEYWORDS }, { "delete_wxDC", (PyCFunction) _wrap_delete_wxDC, METH_VARARGS | METH_KEYWORDS }, + { "wxBrushList_GetCount", (PyCFunction) _wrap_wxBrushList_GetCount, METH_VARARGS | METH_KEYWORDS }, { "wxBrushList_RemoveBrush", (PyCFunction) _wrap_wxBrushList_RemoveBrush, METH_VARARGS | METH_KEYWORDS }, { "wxBrushList_FindOrCreateBrush", (PyCFunction) _wrap_wxBrushList_FindOrCreateBrush, METH_VARARGS | METH_KEYWORDS }, { "wxBrushList_AddBrush", (PyCFunction) _wrap_wxBrushList_AddBrush, METH_VARARGS | METH_KEYWORDS }, @@ -11255,12 +10187,14 @@ static PyMethodDef gdicMethods[] = { { "wxBrush_GetColour", (PyCFunction) _wrap_wxBrush_GetColour, METH_VARARGS | METH_KEYWORDS }, { "delete_wxBrush", (PyCFunction) _wrap_delete_wxBrush, METH_VARARGS | METH_KEYWORDS }, { "new_wxBrush", (PyCFunction) _wrap_new_wxBrush, METH_VARARGS | METH_KEYWORDS }, + { "wxPenList_GetCount", (PyCFunction) _wrap_wxPenList_GetCount, METH_VARARGS | METH_KEYWORDS }, { "wxPenList_RemovePen", (PyCFunction) _wrap_wxPenList_RemovePen, METH_VARARGS | METH_KEYWORDS }, { "wxPenList_FindOrCreatePen", (PyCFunction) _wrap_wxPenList_FindOrCreatePen, METH_VARARGS | METH_KEYWORDS }, { "wxPenList_AddPen", (PyCFunction) _wrap_wxPenList_AddPen, METH_VARARGS | METH_KEYWORDS }, { "wxPyPen_SetDashes", (PyCFunction) _wrap_wxPyPen_SetDashes, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPyPen", (PyCFunction) _wrap_delete_wxPyPen, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyPen", (PyCFunction) _wrap_new_wxPyPen, METH_VARARGS | METH_KEYWORDS }, + { "wxPen_GetDashes", (PyCFunction) _wrap_wxPen_GetDashes, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetDashes", (PyCFunction) _wrap_wxPen_SetDashes, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetWidth", (PyCFunction) _wrap_wxPen_SetWidth, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetStyle", (PyCFunction) _wrap_wxPen_SetStyle, METH_VARARGS | METH_KEYWORDS }, @@ -11286,51 +10220,15 @@ static PyMethodDef gdicMethods[] = { { "wxColour_Red", (PyCFunction) _wrap_wxColour_Red, METH_VARARGS | METH_KEYWORDS }, { "delete_wxColour", (PyCFunction) _wrap_delete_wxColour, METH_VARARGS | METH_KEYWORDS }, { "new_wxColour", (PyCFunction) _wrap_new_wxColour, METH_VARARGS | METH_KEYWORDS }, - { "wxFontList_RemoveFont", (PyCFunction) _wrap_wxFontList_RemoveFont, METH_VARARGS | METH_KEYWORDS }, - { "wxFontList_FindOrCreateFont", (PyCFunction) _wrap_wxFontList_FindOrCreateFont, METH_VARARGS | METH_KEYWORDS }, - { "wxFontList_AddFont", (PyCFunction) _wrap_wxFontList_AddFont, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_SetDefaultEncoding", (PyCFunction) _wrap_wxFont_SetDefaultEncoding, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_GetDefaultEncoding", (PyCFunction) _wrap_wxFont_GetDefaultEncoding, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_GetWeightString", (PyCFunction) _wrap_wxFont_GetWeightString, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_GetStyleString", (PyCFunction) _wrap_wxFont_GetStyleString, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_GetFamilyString", (PyCFunction) _wrap_wxFont_GetFamilyString, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_SetNativeFontInfo", (PyCFunction) _wrap_wxFont_SetNativeFontInfo, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_SetEncoding", (PyCFunction) _wrap_wxFont_SetEncoding, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_SetUnderlined", (PyCFunction) _wrap_wxFont_SetUnderlined, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_SetFaceName", (PyCFunction) _wrap_wxFont_SetFaceName, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_SetWeight", (PyCFunction) _wrap_wxFont_SetWeight, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_SetStyle", (PyCFunction) _wrap_wxFont_SetStyle, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_SetFamily", (PyCFunction) _wrap_wxFont_SetFamily, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_SetPointSize", (PyCFunction) _wrap_wxFont_SetPointSize, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_GetNativeFontInfo", (PyCFunction) _wrap_wxFont_GetNativeFontInfo, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_GetEncoding", (PyCFunction) _wrap_wxFont_GetEncoding, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_GetFaceName", (PyCFunction) _wrap_wxFont_GetFaceName, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_GetUnderlined", (PyCFunction) _wrap_wxFont_GetUnderlined, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_GetWeight", (PyCFunction) _wrap_wxFont_GetWeight, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_GetStyle", (PyCFunction) _wrap_wxFont_GetStyle, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_GetFamily", (PyCFunction) _wrap_wxFont_GetFamily, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_GetPointSize", (PyCFunction) _wrap_wxFont_GetPointSize, METH_VARARGS | METH_KEYWORDS }, - { "wxFont_Ok", (PyCFunction) _wrap_wxFont_Ok, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxFont", (PyCFunction) _wrap_delete_wxFont, METH_VARARGS | METH_KEYWORDS }, - { "new_wxFontFromNativeInfo", (PyCFunction) _wrap_new_wxFontFromNativeInfo, METH_VARARGS | METH_KEYWORDS }, - { "new_wxFont", (PyCFunction) _wrap_new_wxFont, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_GetDefaultConfigPath", (PyCFunction) _wrap_wxFontMapper_GetDefaultConfigPath, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_SetConfigPath", (PyCFunction) _wrap_wxFontMapper_SetConfigPath, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_SetConfig", (PyCFunction) _wrap_wxFontMapper_SetConfig, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_SetDialogTitle", (PyCFunction) _wrap_wxFontMapper_SetDialogTitle, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_SetDialogParent", (PyCFunction) _wrap_wxFontMapper_SetDialogParent, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_GetEncodingDescription", (PyCFunction) _wrap_wxFontMapper_GetEncodingDescription, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_GetEncodingName", (PyCFunction) _wrap_wxFontMapper_GetEncodingName, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_CharsetToEncoding", (PyCFunction) _wrap_wxFontMapper_CharsetToEncoding, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_IsEncodingAvailable", (PyCFunction) _wrap_wxFontMapper_IsEncodingAvailable, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_GetAltForEncoding", (PyCFunction) _wrap_wxFontMapper_GetAltForEncoding, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxFontMapper", (PyCFunction) _wrap_delete_wxFontMapper, METH_VARARGS | METH_KEYWORDS }, - { "new_wxFontMapper", (PyCFunction) _wrap_new_wxFontMapper, METH_VARARGS | METH_KEYWORDS }, - { "wxNativeFontInfo___str__", (PyCFunction) _wrap_wxNativeFontInfo___str__, METH_VARARGS | METH_KEYWORDS }, - { "wxNativeFontInfo_ToString", (PyCFunction) _wrap_wxNativeFontInfo_ToString, METH_VARARGS | METH_KEYWORDS }, - { "wxNativeFontInfo_FromString", (PyCFunction) _wrap_wxNativeFontInfo_FromString, METH_VARARGS | METH_KEYWORDS }, { "wxCursor_Ok", (PyCFunction) _wrap_wxCursor_Ok, METH_VARARGS | METH_KEYWORDS }, { "delete_wxCursor", (PyCFunction) _wrap_delete_wxCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxIconBundle_GetIcon", (PyCFunction) _wrap_wxIconBundle_GetIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxIconBundle_AddIconFromFile", (PyCFunction) _wrap_wxIconBundle_AddIconFromFile, METH_VARARGS | METH_KEYWORDS }, + { "wxIconBundle_AddIcon", (PyCFunction) _wrap_wxIconBundle_AddIcon, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxIconBundle", (PyCFunction) _wrap_delete_wxIconBundle, METH_VARARGS | METH_KEYWORDS }, + { "new_wxIconBundleFromIcon", (PyCFunction) _wrap_new_wxIconBundleFromIcon, METH_VARARGS | METH_KEYWORDS }, + { "new_wxIconBundleFromFile", (PyCFunction) _wrap_new_wxIconBundleFromFile, METH_VARARGS | METH_KEYWORDS }, + { "new_wxIconBundle", (PyCFunction) _wrap_new_wxIconBundle, METH_VARARGS | METH_KEYWORDS }, { "wxIcon_CopyFromBitmap", (PyCFunction) _wrap_wxIcon_CopyFromBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxIcon_SetDepth", (PyCFunction) _wrap_wxIcon_SetDepth, METH_VARARGS | METH_KEYWORDS }, { "wxIcon_SetHeight", (PyCFunction) _wrap_wxIcon_SetHeight, METH_VARARGS | METH_KEYWORDS }, @@ -11339,7 +10237,6 @@ static PyMethodDef gdicMethods[] = { { "wxIcon_GetHeight", (PyCFunction) _wrap_wxIcon_GetHeight, METH_VARARGS | METH_KEYWORDS }, { "wxIcon_GetWidth", (PyCFunction) _wrap_wxIcon_GetWidth, METH_VARARGS | METH_KEYWORDS }, { "wxIcon_Ok", (PyCFunction) _wrap_wxIcon_Ok, METH_VARARGS | METH_KEYWORDS }, - { "wxIcon_LoadFile", (PyCFunction) _wrap_wxIcon_LoadFile, METH_VARARGS | METH_KEYWORDS }, { "delete_wxIcon", (PyCFunction) _wrap_delete_wxIcon, METH_VARARGS | METH_KEYWORDS }, { "new_wxIcon", (PyCFunction) _wrap_new_wxIcon, METH_VARARGS | METH_KEYWORDS }, { "wxMask_Destroy", (PyCFunction) _wrap_wxMask_Destroy, METH_VARARGS | METH_KEYWORDS }, @@ -11368,6 +10265,7 @@ static PyMethodDef gdicMethods[] = { { "wxMemoryDCFromDC", (PyCFunction) _wrap_wxMemoryDCFromDC, METH_VARARGS | METH_KEYWORDS }, { "wxNamedColour", (PyCFunction) _wrap_wxNamedColour, METH_VARARGS | METH_KEYWORDS }, { "wxStockCursor", (PyCFunction) _wrap_wxStockCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxIconFromBitmap", (PyCFunction) _wrap_wxIconFromBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxIconFromXPMData", (PyCFunction) _wrap_wxIconFromXPMData, METH_VARARGS | METH_KEYWORDS }, { "wxEmptyIcon", (PyCFunction) _wrap_wxEmptyIcon, METH_VARARGS | METH_KEYWORDS }, { "wxMaskColour", (PyCFunction) _wrap_wxMaskColour, METH_VARARGS | METH_KEYWORDS }, @@ -11403,15 +10301,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGDIObject","_wxBrush",SwigwxBrushTowxGDIObject}, { "_wxGDIObject","_wxPyPen",SwigwxPyPenTowxGDIObject}, { "_wxGDIObject","_wxPen",SwigwxPenTowxGDIObject}, - { "_wxGDIObject","_wxFont",SwigwxFontTowxGDIObject}, { "_wxGDIObject","_wxCursor",SwigwxCursorTowxGDIObject}, { "_wxGDIObject","_wxIcon",SwigwxIconTowxGDIObject}, { "_wxGDIObject","_wxBitmap",SwigwxBitmapTowxGDIObject}, - { "_wxDC","_wxPostScriptDC",SwigwxPostScriptDCTowxDC}, { "_wxDC","_wxWindowDC",SwigwxWindowDCTowxDC}, { "_wxDC","_wxPaintDC",SwigwxPaintDCTowxDC}, { "_wxDC","_wxClientDC",SwigwxClientDCTowxDC}, { "_wxDC","_wxScreenDC",SwigwxScreenDCTowxDC}, + { "_wxDC","_wxBufferedPaintDC",SwigwxBufferedPaintDCTowxDC}, + { "_wxDC","_wxBufferedDC",SwigwxBufferedDCTowxDC}, { "_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, @@ -11429,6 +10327,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_uint","_wxWindowID",0}, { "_wxChar","_char",0}, { "_char","_wxChar",0}, + { "_wxBufferedDC","_wxBufferedPaintDC",SwigwxBufferedPaintDCTowxBufferedDC}, { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, @@ -11451,11 +10350,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxRegion",SwigwxRegionTowxObject}, { "_wxObject","_wxImageList",SwigwxImageListTowxObject}, { "_wxObject","_wxPalette",SwigwxPaletteTowxObject}, - { "_wxObject","_wxPostScriptDC",SwigwxPostScriptDCTowxObject}, { "_wxObject","_wxWindowDC",SwigwxWindowDCTowxObject}, { "_wxObject","_wxPaintDC",SwigwxPaintDCTowxObject}, { "_wxObject","_wxClientDC",SwigwxClientDCTowxObject}, { "_wxObject","_wxScreenDC",SwigwxScreenDCTowxObject}, + { "_wxObject","_wxBufferedPaintDC",SwigwxBufferedPaintDCTowxObject}, + { "_wxObject","_wxBufferedDC",SwigwxBufferedDCTowxObject}, { "_wxObject","_wxMemoryDC",SwigwxMemoryDCTowxObject}, { "_wxObject","_wxDC",SwigwxDCTowxObject}, { "_wxObject","_wxBrushList",SwigwxBrushListTowxObject}, @@ -11465,8 +10365,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxPen",SwigwxPenTowxObject}, { "_wxObject","_wxColourDatabase",SwigwxColourDatabaseTowxObject}, { "_wxObject","_wxColour",SwigwxColourTowxObject}, - { "_wxObject","_wxFontList",SwigwxFontListTowxObject}, - { "_wxObject","_wxFont",SwigwxFontTowxObject}, { "_wxObject","_wxCursor",SwigwxCursorTowxObject}, { "_wxObject","_wxIcon",SwigwxIconTowxObject}, { "_wxObject","_wxMask",SwigwxMaskTowxObject}, @@ -11474,6 +10372,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxGDIObject",SwigwxGDIObjectTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, + { "_wxMemoryDC","_wxBufferedPaintDC",SwigwxBufferedPaintDCTowxMemoryDC}, + { "_wxMemoryDC","_wxBufferedDC",SwigwxBufferedDCTowxMemoryDC}, { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, @@ -11530,62 +10430,16 @@ SWIGEXPORT(void) initgdic() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("gdic", gdicMethods); d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxFONTFAMILY_DEFAULT", PyInt_FromLong((long) wxFONTFAMILY_DEFAULT)); - PyDict_SetItemString(d,"wxFONTFAMILY_DECORATIVE", PyInt_FromLong((long) wxFONTFAMILY_DECORATIVE)); - PyDict_SetItemString(d,"wxFONTFAMILY_ROMAN", PyInt_FromLong((long) wxFONTFAMILY_ROMAN)); - PyDict_SetItemString(d,"wxFONTFAMILY_SCRIPT", PyInt_FromLong((long) wxFONTFAMILY_SCRIPT)); - PyDict_SetItemString(d,"wxFONTFAMILY_SWISS", PyInt_FromLong((long) wxFONTFAMILY_SWISS)); - PyDict_SetItemString(d,"wxFONTFAMILY_MODERN", PyInt_FromLong((long) wxFONTFAMILY_MODERN)); - PyDict_SetItemString(d,"wxFONTFAMILY_TELETYPE", PyInt_FromLong((long) wxFONTFAMILY_TELETYPE)); - PyDict_SetItemString(d,"wxFONTFAMILY_MAX", PyInt_FromLong((long) wxFONTFAMILY_MAX)); - PyDict_SetItemString(d,"wxFONTSTYLE_NORMAL", PyInt_FromLong((long) wxFONTSTYLE_NORMAL)); - PyDict_SetItemString(d,"wxFONTSTYLE_ITALIC", PyInt_FromLong((long) wxFONTSTYLE_ITALIC)); - PyDict_SetItemString(d,"wxFONTSTYLE_SLANT", PyInt_FromLong((long) wxFONTSTYLE_SLANT)); - PyDict_SetItemString(d,"wxFONTSTYLE_MAX", PyInt_FromLong((long) wxFONTSTYLE_MAX)); - PyDict_SetItemString(d,"wxFONTWEIGHT_NORMAL", PyInt_FromLong((long) wxFONTWEIGHT_NORMAL)); - PyDict_SetItemString(d,"wxFONTWEIGHT_LIGHT", PyInt_FromLong((long) wxFONTWEIGHT_LIGHT)); - PyDict_SetItemString(d,"wxFONTWEIGHT_BOLD", PyInt_FromLong((long) wxFONTWEIGHT_BOLD)); - PyDict_SetItemString(d,"wxFONTWEIGHT_MAX", PyInt_FromLong((long) wxFONTWEIGHT_MAX)); - PyDict_SetItemString(d,"wxFONTENCODING_SYSTEM", PyInt_FromLong((long) wxFONTENCODING_SYSTEM)); - PyDict_SetItemString(d,"wxFONTENCODING_DEFAULT", PyInt_FromLong((long) wxFONTENCODING_DEFAULT)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_1", PyInt_FromLong((long) wxFONTENCODING_ISO8859_1)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_2", PyInt_FromLong((long) wxFONTENCODING_ISO8859_2)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_3", PyInt_FromLong((long) wxFONTENCODING_ISO8859_3)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_4", PyInt_FromLong((long) wxFONTENCODING_ISO8859_4)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_5", PyInt_FromLong((long) wxFONTENCODING_ISO8859_5)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_6", PyInt_FromLong((long) wxFONTENCODING_ISO8859_6)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_7", PyInt_FromLong((long) wxFONTENCODING_ISO8859_7)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_8", PyInt_FromLong((long) wxFONTENCODING_ISO8859_8)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_9", PyInt_FromLong((long) wxFONTENCODING_ISO8859_9)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_10", PyInt_FromLong((long) wxFONTENCODING_ISO8859_10)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_11", PyInt_FromLong((long) wxFONTENCODING_ISO8859_11)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_12", PyInt_FromLong((long) wxFONTENCODING_ISO8859_12)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_13", PyInt_FromLong((long) wxFONTENCODING_ISO8859_13)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_14", PyInt_FromLong((long) wxFONTENCODING_ISO8859_14)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_15", PyInt_FromLong((long) wxFONTENCODING_ISO8859_15)); - PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_MAX", PyInt_FromLong((long) wxFONTENCODING_ISO8859_MAX)); - PyDict_SetItemString(d,"wxFONTENCODING_KOI8", PyInt_FromLong((long) wxFONTENCODING_KOI8)); - PyDict_SetItemString(d,"wxFONTENCODING_ALTERNATIVE", PyInt_FromLong((long) wxFONTENCODING_ALTERNATIVE)); - PyDict_SetItemString(d,"wxFONTENCODING_BULGARIAN", PyInt_FromLong((long) wxFONTENCODING_BULGARIAN)); - PyDict_SetItemString(d,"wxFONTENCODING_CP437", PyInt_FromLong((long) wxFONTENCODING_CP437)); - PyDict_SetItemString(d,"wxFONTENCODING_CP850", PyInt_FromLong((long) wxFONTENCODING_CP850)); - PyDict_SetItemString(d,"wxFONTENCODING_CP852", PyInt_FromLong((long) wxFONTENCODING_CP852)); - PyDict_SetItemString(d,"wxFONTENCODING_CP855", PyInt_FromLong((long) wxFONTENCODING_CP855)); - PyDict_SetItemString(d,"wxFONTENCODING_CP866", PyInt_FromLong((long) wxFONTENCODING_CP866)); - PyDict_SetItemString(d,"wxFONTENCODING_CP874", PyInt_FromLong((long) wxFONTENCODING_CP874)); - PyDict_SetItemString(d,"wxFONTENCODING_CP1250", PyInt_FromLong((long) wxFONTENCODING_CP1250)); - PyDict_SetItemString(d,"wxFONTENCODING_CP1251", PyInt_FromLong((long) wxFONTENCODING_CP1251)); - PyDict_SetItemString(d,"wxFONTENCODING_CP1252", PyInt_FromLong((long) wxFONTENCODING_CP1252)); - PyDict_SetItemString(d,"wxFONTENCODING_CP1253", PyInt_FromLong((long) wxFONTENCODING_CP1253)); - PyDict_SetItemString(d,"wxFONTENCODING_CP1254", PyInt_FromLong((long) wxFONTENCODING_CP1254)); - PyDict_SetItemString(d,"wxFONTENCODING_CP1255", PyInt_FromLong((long) wxFONTENCODING_CP1255)); - PyDict_SetItemString(d,"wxFONTENCODING_CP1256", PyInt_FromLong((long) wxFONTENCODING_CP1256)); - PyDict_SetItemString(d,"wxFONTENCODING_CP1257", PyInt_FromLong((long) wxFONTENCODING_CP1257)); - PyDict_SetItemString(d,"wxFONTENCODING_CP12_MAX", PyInt_FromLong((long) wxFONTENCODING_CP12_MAX)); - PyDict_SetItemString(d,"wxFONTENCODING_UTF7", PyInt_FromLong((long) wxFONTENCODING_UTF7)); - PyDict_SetItemString(d,"wxFONTENCODING_UTF8", PyInt_FromLong((long) wxFONTENCODING_UTF8)); - PyDict_SetItemString(d,"wxFONTENCODING_UNICODE", PyInt_FromLong((long) wxFONTENCODING_UNICODE)); - PyDict_SetItemString(d,"wxFONTENCODING_MAX", PyInt_FromLong((long) wxFONTENCODING_MAX)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_NORMAL", PyInt_FromLong((long) wxIMAGELIST_DRAW_NORMAL)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_TRANSPARENT", PyInt_FromLong((long) wxIMAGELIST_DRAW_TRANSPARENT)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_SELECTED", PyInt_FromLong((long) wxIMAGELIST_DRAW_SELECTED)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_FOCUSED", PyInt_FromLong((long) wxIMAGELIST_DRAW_FOCUSED)); + PyDict_SetItemString(d,"wxIMAGE_LIST_NORMAL", PyInt_FromLong((long) wxIMAGE_LIST_NORMAL)); + PyDict_SetItemString(d,"wxIMAGE_LIST_SMALL", PyInt_FromLong((long) wxIMAGE_LIST_SMALL)); + PyDict_SetItemString(d,"wxIMAGE_LIST_STATE", PyInt_FromLong((long) wxIMAGE_LIST_STATE)); + PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); + PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); + PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxNORMAL_FONT",_wrap_wxNORMAL_FONT_get, _wrap_wxNORMAL_FONT_set); SWIG_addvarlink(SWIG_globals,"wxSMALL_FONT",_wrap_wxSMALL_FONT_get, _wrap_wxSMALL_FONT_set); @@ -11633,16 +10487,6 @@ SWIGEXPORT(void) initgdic() { SWIG_addvarlink(SWIG_globals,"wxThePenList",_wrap_wxThePenList_get, _wrap_wxThePenList_set); SWIG_addvarlink(SWIG_globals,"wxTheBrushList",_wrap_wxTheBrushList_get, _wrap_wxTheBrushList_set); SWIG_addvarlink(SWIG_globals,"wxTheColourDatabase",_wrap_wxTheColourDatabase_get, _wrap_wxTheColourDatabase_set); - PyDict_SetItemString(d,"wxIMAGELIST_DRAW_NORMAL", PyInt_FromLong((long) wxIMAGELIST_DRAW_NORMAL)); - PyDict_SetItemString(d,"wxIMAGELIST_DRAW_TRANSPARENT", PyInt_FromLong((long) wxIMAGELIST_DRAW_TRANSPARENT)); - PyDict_SetItemString(d,"wxIMAGELIST_DRAW_SELECTED", PyInt_FromLong((long) wxIMAGELIST_DRAW_SELECTED)); - PyDict_SetItemString(d,"wxIMAGELIST_DRAW_FOCUSED", PyInt_FromLong((long) wxIMAGELIST_DRAW_FOCUSED)); - PyDict_SetItemString(d,"wxIMAGE_LIST_NORMAL", PyInt_FromLong((long) wxIMAGE_LIST_NORMAL)); - PyDict_SetItemString(d,"wxIMAGE_LIST_SMALL", PyInt_FromLong((long) wxIMAGE_LIST_SMALL)); - PyDict_SetItemString(d,"wxIMAGE_LIST_STATE", PyInt_FromLong((long) wxIMAGE_LIST_STATE)); - PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); - PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); - PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); { int i; for (i = 0; _swig_mapping[i].n1; i++)