X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6d8b4f8d2b864a8b84587265bc846a73001f643f..07b2e1cd389c16c05d74adedf92fda3ca785f2bd:/wxPython/src/msw/gdi.cpp diff --git a/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp index 7fa8794735..cda64768c9 100644 --- a/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -56,11 +56,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "gdic" #include "helpers.h" -#include #include -#ifndef __WXMSW__ -#include -#endif #include #include #include @@ -96,7 +92,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif static wxString wxPyEmptyStr(""); @@ -186,11 +182,44 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { wxColour* wxNamedColour(const wxString& colorName) { return new wxColour(colorName); } + +class wxPyPen : public wxPen { +public: + wxPyPen(wxColour& colour, int width=1, int style=wxSOLID) + : wxPen(colour, width, style) + { m_dash = NULL; } + ~wxPyPen() { + if (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; iMinX(); + *y1 = dc->MinY(); + *x2 = dc->MaxX(); + *y2 = dc->MaxY(); +} // Alternate 'constructor' wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC) { return new wxMemoryDC(oldDC); } +#include + #if 0 extern wxFont * wxNORMAL_FONT; extern wxFont * wxSMALL_FONT; @@ -236,7 +265,7 @@ extern wxFont wxNullFont; extern wxColour wxNullColour; extern wxFontList * wxTheFontList; extern wxPenList * wxThePenList; -extern wxBrushlist * wxTheBrushList; +extern wxBrushList * wxTheBrushList; extern wxColourDatabase * wxTheColourDatabase; #endif @@ -1240,7 +1269,7 @@ static PyObject *_wrap_wxTheBrushList_get() { PyObject * pyobj; char ptemp[128]; - SWIG_MakePtr(ptemp, (char *) wxTheBrushList,"_wxBrushlist_p"); + SWIG_MakePtr(ptemp, (char *) wxTheBrushList,"_wxBrushList_p"); pyobj = PyString_FromString(ptemp); return pyobj; } @@ -1430,13 +1459,13 @@ static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args, PyObject *kw PyObject * _resultobj; wxBitmap * _result; wxString * _arg0; - wxBitmapType _arg1; + wxBitmapType _arg1 = (wxBitmapType ) wxBITMAP_TYPE_BMP; PyObject * _obj0 = 0; char *_kwnames[] = { "name","type", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:new_wxBitmap",_kwnames,&_obj0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxBitmap",_kwnames,&_obj0,&_arg1)) return NULL; { #if PYTHON_API_VERSION >= 1009 @@ -1580,13 +1609,13 @@ static PyObject *_wrap_wxBitmap_LoadFile(PyObject *self, PyObject *args, PyObjec bool _result; wxBitmap * _arg0; wxString * _arg1; - long _arg2; + wxBitmapType _arg2 = (wxBitmapType ) wxBITMAP_TYPE_BMP; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","name","flags", NULL }; + char *_kwnames[] = { "self","name","type", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:wxBitmap_LoadFile",_kwnames,&_argo0,&_obj1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxBitmap_LoadFile",_kwnames,&_argo0,&_obj1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1633,7 +1662,7 @@ static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args, PyObjec bool _result; wxBitmap * _arg0; wxString * _arg1; - int _arg2; + wxBitmapType _arg2; wxPalette * _arg3 = (wxPalette *) NULL; PyObject * _argo0 = 0; PyObject * _obj1 = 0; @@ -5464,43 +5493,6 @@ static PyObject *_wrap_wxPen_SetWidth(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define wxPen_GetDashes(_swigobj,_swigarg0) (_swigobj->GetDashes(_swigarg0)) -static PyObject *_wrap_wxPen_GetDashes(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxPen * _arg0; - wxDash ** _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","dashes", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPen_GetDashes",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetDashes. Expected _wxPen_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDash_pp")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_GetDashes. Expected _wxDash_pp."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxPen_GetDashes(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - #define wxPen_SetDashes(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDashes(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPen_SetDashes(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5622,6 +5614,143 @@ static PyObject *_wrap_wxPen_SetStipple(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxPyPenTowxPen(void *ptr) { + wxPyPen *src; + wxPen *dest; + src = (wxPyPen *) ptr; + dest = (wxPen *) src; + return (void *) dest; +} + +static void *SwigwxPyPenTowxGDIObject(void *ptr) { + wxPyPen *src; + wxGDIObject *dest; + src = (wxPyPen *) ptr; + dest = (wxGDIObject *) src; + return (void *) dest; +} + +static void *SwigwxPyPenTowxObject(void *ptr) { + wxPyPen *src; + wxObject *dest; + src = (wxPyPen *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxPyPen(_swigarg0,_swigarg1,_swigarg2) (new wxPyPen(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxPyPen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyPen * _result; + wxColour * _arg0; + int _arg1 = (int ) 1; + int _arg2 = (int ) wxSOLID; + wxColour temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "colour","width","style", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:new_wxPyPen",_kwnames,&_obj0,&_arg1,&_arg2)) + return NULL; +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyPen *)new_wxPyPen(*_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyPen_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxPyPen(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxPyPen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyPen * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxPyPen",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyPen. Expected _wxPyPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxPyPen(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyPen_SetDashes(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDashes(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyPen_SetDashes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyPen * _arg0; + int _arg1; + wxDash * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","choices", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyPen_SetDashes",_kwnames,&_argo0,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyPen_SetDashes. Expected _wxPyPen_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = (wxDash*)byte_LIST_helper(_obj2); + if (_arg2 == NULL) { + return NULL; + } +} +{ + if (_obj2) { + _arg1 = PyList_Size(_obj2); + } + else { + _arg1 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyPen_SetDashes(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + delete [] _arg2; +} + return _resultobj; +} + static void *SwigwxPenListTowxObject(void *ptr) { wxPenList *src; wxObject *dest; @@ -6051,6 +6180,14 @@ static PyObject *_wrap_wxBrush_SetStyle(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxBrushListTowxObject(void *ptr) { + wxBrushList *src; + wxObject *dest; + src = (wxBrushList *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxBrushList_AddBrush(_swigobj,_swigarg0) (_swigobj->AddBrush(_swigarg0)) static PyObject *_wrap_wxBrushList_AddBrush(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8363,6 +8500,43 @@ static PyObject *_wrap_wxDC_SetClippingRegion(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxDC_SetClippingRegionAsRegion(_swigobj,_swigarg0) (_swigobj->SetClippingRegion(_swigarg0)) +static PyObject *_wrap_wxDC_SetClippingRegionAsRegion(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDC * _arg0; + wxRegion * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","region", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDC_SetClippingRegionAsRegion",_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 wxDC_SetClippingRegionAsRegion. Expected _wxDC_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetClippingRegionAsRegion. Expected _wxRegion_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetClippingRegionAsRegion(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxDC_SetPalette(_swigobj,_swigarg0) (_swigobj->SetPalette(_swigarg0)) static PyObject *_wrap_wxDC_SetPalette(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9184,6 +9358,73 @@ static PyObject *_wrap_wxDC_ResetBoundingBox(PyObject *self, PyObject *args, PyO return _resultobj; } +static PyObject *_wrap_wxDC_GetBoundingBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDC * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + int * _arg3; + int temp1; + int * _arg4; + int temp2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} +{ + _arg3 = &temp1; +} +{ + _arg4 = &temp2; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDC_GetBoundingBox",_kwnames,&_argo0)) + 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_GetBoundingBox. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_GetBoundingBox(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + 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; +} + #define wxDC_GetHDC(_swigobj) (_swigobj->GetHDC()) static PyObject *_wrap_wxDC_GetHDC(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9212,17 +9453,233 @@ static PyObject *_wrap_wxDC_GetHDC(PyObject *self, PyObject *args, PyObject *kwa return _resultobj; } -static void *SwigwxMemoryDCTowxDC(void *ptr) { - wxMemoryDC *src; - wxDC *dest; - src = (wxMemoryDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} +static PyObject * wxDC__DrawPointList(wxDC *self,PyObject * pyPoints,PyObject * pyPens) { + bool isFastSeq = PyList_Check(pyPoints) || PyTuple_Check(pyPoints); + bool isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens); + int numObjs = 0; + int numPens = 0; + wxPen* pen; + PyObject* obj; + int x1, y1; + int i = 0; -static void *SwigwxMemoryDCTowxObject(void *ptr) { - wxMemoryDC *src; - wxObject *dest; + if (!PySequence_Check(pyPoints)) { + goto err0; + } + if (!PySequence_Check(pyPens)) { + goto err1; + } + numObjs = PySequence_Length(pyPoints); + numPens = PySequence_Length(pyPens); + + for (i = 0; i < numObjs; i++) { + // Use a new pen? + if (i < numPens) { + if (isFastPens) { + obj = PySequence_Fast_GET_ITEM(pyPens, i); + } + else { + obj = PySequence_GetItem(pyPens, i); + } + if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) { + if (!isFastPens) + Py_DECREF(obj); + goto err1; + } + + self->SetPen(*pen); + if (!isFastPens) + Py_DECREF(obj); + } + + // Get the point coordinants + if (isFastSeq) { + obj = PySequence_Fast_GET_ITEM(pyPoints, i); + } + else { + obj = PySequence_GetItem(pyPoints, i); + } + if (! _2int_seq_helper(obj, &x1, &y1)) { + if (!isFastPens) + Py_DECREF(obj); + goto err0; + } + + // Now draw the point + self->DrawPoint(x1, y1); + + if (!isFastSeq) + Py_DECREF(obj); + } + + Py_INCREF(Py_None); + return Py_None; + + err1: + PyErr_SetString(PyExc_TypeError, "Expected a sequence of wxPens"); + return NULL; + err0: + PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y) sequences."); + return NULL; + } +static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxDC * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","pyPoints","pyPens", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDC__DrawPointList",_kwnames,&_argo0,&_obj1,&_obj2)) + 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__DrawPointList. Expected _wxDC_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxDC__DrawPointList(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxDC__DrawLineList(wxDC *self,PyObject * pyLines,PyObject * pyPens) { + bool isFastSeq = PyList_Check(pyLines) || PyTuple_Check(pyLines); + bool isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens); + int numObjs = 0; + int numPens = 0; + wxPen* pen; + PyObject* obj; + int x1, y1, x2, y2; + int i = 0; + + if (!PySequence_Check(pyLines)) { + goto err0; + } + if (!PySequence_Check(pyPens)) { + goto err1; + } + numObjs = PySequence_Length(pyLines); + numPens = PySequence_Length(pyPens); + + for (i = 0; i < numObjs; i++) { + // Use a new pen? + if (i < numPens) { + if (isFastPens) { + obj = PySequence_Fast_GET_ITEM(pyPens, i); + } + else { + obj = PySequence_GetItem(pyPens, i); + } + if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) { + if (!isFastPens) + Py_DECREF(obj); + goto err1; + } + + self->SetPen(*pen); + if (!isFastPens) + Py_DECREF(obj); + } + + // Get the line coordinants + if (isFastSeq) { + obj = PySequence_Fast_GET_ITEM(pyLines, i); + } + else { + obj = PySequence_GetItem(pyLines, i); + } + if (! _4int_seq_helper(obj, &x1, &y1, &x2, &y2)) { + if (!isFastPens) + Py_DECREF(obj); + goto err0; + } + + // Now draw the line + self->DrawLine(x1, y1, x2, y2); + + if (!isFastSeq) + Py_DECREF(obj); + } + + Py_INCREF(Py_None); + return Py_None; + + err1: + PyErr_SetString(PyExc_TypeError, "Expected a sequence of wxPens"); + return NULL; + err0: + PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x1,y1, x2,y2) sequences."); + return NULL; + } +static PyObject *_wrap_wxDC__DrawLineList(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxDC * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","pyLines","pyPens", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDC__DrawLineList",_kwnames,&_argo0,&_obj1,&_obj2)) + 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__DrawLineList. Expected _wxDC_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxDC__DrawLineList(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static void *SwigwxMemoryDCTowxDC(void *ptr) { + wxMemoryDC *src; + wxDC *dest; + src = (wxMemoryDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} + +static void *SwigwxMemoryDCTowxObject(void *ptr) { + wxMemoryDC *src; + wxObject *dest; src = (wxMemoryDC *) ptr; dest = (wxObject *) src; return (void *) dest; @@ -9588,6 +10045,268 @@ static PyObject *_wrap_new_wxWindowDC(PyObject *self, PyObject *args, PyObject * return _resultobj; } +static void *SwigwxMetaFileTowxObject(void *ptr) { + wxMetaFile *src; + wxObject *dest; + src = (wxMetaFile *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxMetaFile(_swigarg0) (new wxMetaFile(_swigarg0)) +static PyObject *_wrap_new_wxMetaFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMetaFile * _result; + wxString * _arg0 = (wxString *) &wxPyEmptyStr; + PyObject * _obj0 = 0; + char *_kwnames[] = { "filename", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxMetaFile",_kwnames,&_obj0)) + return NULL; + if (_obj0) +{ +#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 +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMetaFile *)new_wxMetaFile(*_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMetaFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define delete_wxMetaFile(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxMetaFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMetaFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxMetaFile",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxMetaFile. Expected _wxMetaFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxMetaFile(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxMetaFile_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxMetaFile_Ok(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMetaFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_Ok",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_Ok. Expected _wxMetaFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMetaFile_Ok(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMetaFile_SetClipboard(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetClipboard(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxMetaFile_SetClipboard(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMetaFile * _arg0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxMetaFile_SetClipboard",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_SetClipboard. Expected _wxMetaFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMetaFile_SetClipboard(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMetaFile_GetSize(_swigobj) (_swigobj->GetSize()) +static PyObject *_wrap_wxMetaFile_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxMetaFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_GetSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_GetSize. Expected _wxMetaFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxMetaFile_GetSize(_arg0)); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxMetaFile_GetWidth(_swigobj) (_swigobj->GetWidth()) +static PyObject *_wrap_wxMetaFile_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxMetaFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_GetWidth",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_GetWidth. Expected _wxMetaFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxMetaFile_GetWidth(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMetaFile_GetHeight(_swigobj) (_swigobj->GetHeight()) +static PyObject *_wrap_wxMetaFile_GetHeight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxMetaFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_GetHeight",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_GetHeight. Expected _wxMetaFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxMetaFile_GetHeight(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMetaFile_GetFileName(_swigobj) (_swigobj->GetFileName()) +static PyObject *_wrap_wxMetaFile_GetFileName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxMetaFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_GetFileName",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_GetFileName. Expected _wxMetaFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxMetaFile_GetFileName(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + static void *SwigwxMetaFileDCTowxDC(void *ptr) { wxMetaFileDC *src; wxDC *dest; @@ -9604,17 +10323,21 @@ static void *SwigwxMetaFileDCTowxObject(void *ptr) { return (void *) dest; } -#define new_wxMetaFileDC(_swigarg0) (new wxMetaFileDC(_swigarg0)) +#define new_wxMetaFileDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxMetaFileDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxMetaFileDC * _result; wxString * _arg0 = (wxString *) &wxPyEmptyStr; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + wxString * _arg3 = (wxString *) &wxPyEmptyStr; PyObject * _obj0 = 0; - char *_kwnames[] = { "filename", NULL }; + PyObject * _obj3 = 0; + char *_kwnames[] = { "filename","width","height","description", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxMetaFileDC",_kwnames,&_obj0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OiiO:new_wxMetaFileDC",_kwnames,&_obj0,&_arg1,&_arg2,&_obj3)) return NULL; if (_obj0) { @@ -9634,10 +10357,29 @@ static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args, PyObject } _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); #endif +} + if (_obj3) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMetaFileDC *)new_wxMetaFileDC(*_arg0); + _result = (wxMetaFileDC *)new_wxMetaFileDC(*_arg0,_arg1,_arg2,*_arg3); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -9651,6 +10393,10 @@ static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args, PyObject { if (_obj0) delete _arg0; +} +{ + if (_obj3) + delete _arg3; } return _resultobj; } @@ -11458,6 +12204,14 @@ static PyMethodDef gdicMethods[] = { { "new_wxPalette", (PyCFunction) _wrap_new_wxPalette, METH_VARARGS | METH_KEYWORDS }, { "wxMetaFileDC_Close", (PyCFunction) _wrap_wxMetaFileDC_Close, METH_VARARGS | METH_KEYWORDS }, { "new_wxMetaFileDC", (PyCFunction) _wrap_new_wxMetaFileDC, METH_VARARGS | METH_KEYWORDS }, + { "wxMetaFile_GetFileName", (PyCFunction) _wrap_wxMetaFile_GetFileName, METH_VARARGS | METH_KEYWORDS }, + { "wxMetaFile_GetHeight", (PyCFunction) _wrap_wxMetaFile_GetHeight, METH_VARARGS | METH_KEYWORDS }, + { "wxMetaFile_GetWidth", (PyCFunction) _wrap_wxMetaFile_GetWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxMetaFile_GetSize", (PyCFunction) _wrap_wxMetaFile_GetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxMetaFile_SetClipboard", (PyCFunction) _wrap_wxMetaFile_SetClipboard, METH_VARARGS | METH_KEYWORDS }, + { "wxMetaFile_Ok", (PyCFunction) _wrap_wxMetaFile_Ok, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxMetaFile", (PyCFunction) _wrap_delete_wxMetaFile, METH_VARARGS | METH_KEYWORDS }, + { "new_wxMetaFile", (PyCFunction) _wrap_new_wxMetaFile, 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 }, @@ -11467,7 +12221,10 @@ static PyMethodDef gdicMethods[] = { { "new_wxScreenDC", (PyCFunction) _wrap_new_wxScreenDC, 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 }, + { "wxDC__DrawPointList", (PyCFunction) _wrap_wxDC__DrawPointList, METH_VARARGS | METH_KEYWORDS }, { "wxDC_GetHDC", (PyCFunction) _wrap_wxDC_GetHDC, METH_VARARGS | METH_KEYWORDS }, + { "wxDC_GetBoundingBox", (PyCFunction) _wrap_wxDC_GetBoundingBox, METH_VARARGS | METH_KEYWORDS }, { "wxDC_ResetBoundingBox", (PyCFunction) _wrap_wxDC_ResetBoundingBox, METH_VARARGS | METH_KEYWORDS }, { "wxDC_CalcBoundingBox", (PyCFunction) _wrap_wxDC_CalcBoundingBox, METH_VARARGS | METH_KEYWORDS }, { "wxDC_SetAxisOrientation", (PyCFunction) _wrap_wxDC_SetAxisOrientation, METH_VARARGS | METH_KEYWORDS }, @@ -11492,6 +12249,7 @@ static PyMethodDef gdicMethods[] = { { "wxDC_SetFont", (PyCFunction) _wrap_wxDC_SetFont, METH_VARARGS | METH_KEYWORDS }, { "wxDC_SetBrush", (PyCFunction) _wrap_wxDC_SetBrush, METH_VARARGS | METH_KEYWORDS }, { "wxDC_SetPalette", (PyCFunction) _wrap_wxDC_SetPalette, METH_VARARGS | METH_KEYWORDS }, + { "wxDC_SetClippingRegionAsRegion", (PyCFunction) _wrap_wxDC_SetClippingRegionAsRegion, METH_VARARGS | METH_KEYWORDS }, { "wxDC_SetClippingRegion", (PyCFunction) _wrap_wxDC_SetClippingRegion, METH_VARARGS | METH_KEYWORDS }, { "wxDC_SetBackgroundMode", (PyCFunction) _wrap_wxDC_SetBackgroundMode, METH_VARARGS | METH_KEYWORDS }, { "wxDC_SetBackground", (PyCFunction) _wrap_wxDC_SetBackground, METH_VARARGS | METH_KEYWORDS }, @@ -11568,10 +12326,12 @@ static PyMethodDef gdicMethods[] = { { "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_SetStipple", (PyCFunction) _wrap_wxPen_SetStipple, METH_VARARGS | METH_KEYWORDS }, { "wxPen_GetStipple", (PyCFunction) _wrap_wxPen_GetStipple, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetDashes", (PyCFunction) _wrap_wxPen_SetDashes, METH_VARARGS | METH_KEYWORDS }, - { "wxPen_GetDashes", (PyCFunction) _wrap_wxPen_GetDashes, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetWidth", (PyCFunction) _wrap_wxPen_SetWidth, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetStyle", (PyCFunction) _wrap_wxPen_SetStyle, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetJoin", (PyCFunction) _wrap_wxPen_SetJoin, METH_VARARGS | METH_KEYWORDS }, @@ -11724,12 +12484,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, { "_wxPrintQuality","_time_t",0}, + { "_wxPen","_wxPyPen",SwigwxPyPenTowxPen}, { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxGDIObject","_wxRegion",SwigwxRegionTowxGDIObject}, { "_wxGDIObject","_wxPalette",SwigwxPaletteTowxGDIObject}, { "_wxGDIObject","_wxBrush",SwigwxBrushTowxGDIObject}, + { "_wxGDIObject","_wxPyPen",SwigwxPyPenTowxGDIObject}, { "_wxGDIObject","_wxPen",SwigwxPenTowxGDIObject}, { "_wxGDIObject","_wxFont",SwigwxFontTowxGDIObject}, { "_wxGDIObject","_wxCursor",SwigwxCursorTowxGDIObject}, @@ -11780,14 +12542,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxImageList",SwigwxImageListTowxObject}, { "_wxObject","_wxPalette",SwigwxPaletteTowxObject}, { "_wxObject","_wxMetaFileDC",SwigwxMetaFileDCTowxObject}, + { "_wxObject","_wxMetaFile",SwigwxMetaFileTowxObject}, { "_wxObject","_wxWindowDC",SwigwxWindowDCTowxObject}, { "_wxObject","_wxPaintDC",SwigwxPaintDCTowxObject}, { "_wxObject","_wxClientDC",SwigwxClientDCTowxObject}, { "_wxObject","_wxScreenDC",SwigwxScreenDCTowxObject}, { "_wxObject","_wxMemoryDC",SwigwxMemoryDCTowxObject}, { "_wxObject","_wxDC",SwigwxDCTowxObject}, + { "_wxObject","_wxBrushList",SwigwxBrushListTowxObject}, { "_wxObject","_wxBrush",SwigwxBrushTowxObject}, { "_wxObject","_wxPenList",SwigwxPenListTowxObject}, + { "_wxObject","_wxPyPen",SwigwxPyPenTowxObject}, { "_wxObject","_wxPen",SwigwxPenTowxObject}, { "_wxObject","_wxColourDatabase",SwigwxColourDatabaseTowxObject}, { "_wxObject","_wxColour",SwigwxColourTowxObject}, @@ -11899,6 +12664,10 @@ SWIGEXPORT(void) initgdic() { 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_CP932", PyInt_FromLong((long) wxFONTENCODING_CP932)); + PyDict_SetItemString(d,"wxFONTENCODING_CP936", PyInt_FromLong((long) wxFONTENCODING_CP936)); + PyDict_SetItemString(d,"wxFONTENCODING_CP949", PyInt_FromLong((long) wxFONTENCODING_CP949)); + PyDict_SetItemString(d,"wxFONTENCODING_CP950", PyInt_FromLong((long) wxFONTENCODING_CP950)); 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));