X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b6294124ecb7b6b72e4ef0b72e2934d74f56e65b..11ec0dcea243f7ce1cbe7d33bfd9cd0e2f6d9083:/wxPython/src/gtk/_gdi_wrap.cpp diff --git a/wxPython/src/gtk/_gdi_wrap.cpp b/wxPython/src/gtk/_gdi_wrap.cpp index 4a4b8cfd52..b62b72b96f 100644 --- a/wxPython/src/gtk/_gdi_wrap.cpp +++ b/wxPython/src/gtk/_gdi_wrap.cpp @@ -883,12 +883,38 @@ PyObject *wxPyFontEnumerator_GetFacenames(wxPyFontEnumerator *self){ return PyList_New(0); } +#include wxLocale *new_wxLocale(int language,int flags){ + wxLocale* loc; if (language == -1) - return new wxLocale(); + loc = new wxLocale(); else - return new wxLocale(language, flags); + loc = new wxLocale(language, flags); + // Python before 2.4 needs to have LC_NUMERIC set to "C" in order + // for the floating point conversions and such to work right. +#if PY_VERSION_HEX < 0x02040000 + setlocale(LC_NUMERIC, "C"); +#endif + return loc; + } +bool wxLocale_Init1(wxLocale *self,wxString const &szName,wxString const &szShort,wxString const &szLocale,bool bLoadDefault,bool bConvertEncoding){ + bool rc = self->Init(szName, szShort, szLocale, bLoadDefault, bConvertEncoding); + // Python before 2.4 needs to have LC_NUMERIC set to "C" in order + // for the floating point conversions and such to work right. +#if PY_VERSION_HEX < 0x02040000 + setlocale(LC_NUMERIC, "C"); +#endif + return rc; + } +bool wxLocale_Init2(wxLocale *self,int language,int flags){ + bool rc = self->Init(language, flags); + // Python before 2.4 needs to have LC_NUMERIC set to "C" in order + // for the floating point conversions and such to work right. +#if PY_VERSION_HEX < 0x02040000 + setlocale(LC_NUMERIC, "C"); +#endif + return rc; } #include "wx/wxPython/pydrawxxx.h" @@ -1827,6 +1853,32 @@ static PyObject *_wrap_Palette_GetRGB(PyObject *, PyObject *args, PyObject *kwar } +static PyObject *_wrap_Palette_GetColoursCount(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxPalette *arg1 = (wxPalette *) 0 ; + int result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Palette_GetColoursCount",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPalette, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxPalette const *)arg1)->GetColoursCount(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int((int)result); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Palette_Ok(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxPalette *arg1 = (wxPalette *) 0 ; @@ -2670,6 +2722,34 @@ static PyObject *_wrap_Brush_GetStipple(PyObject *, PyObject *args, PyObject *kw } +static PyObject *_wrap_Brush_IsHatch(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxBrush *arg1 = (wxBrush *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Brush_IsHatch",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBrush, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxBrush const *)arg1)->IsHatch(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Brush_Ok(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxBrush *arg1 = (wxBrush *) 0 ; @@ -3340,6 +3420,32 @@ static PyObject *_wrap_Bitmap_LoadFile(PyObject *, PyObject *args, PyObject *kwa } +static PyObject *_wrap_Bitmap_GetPalette(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxBitmap *arg1 = (wxBitmap *) 0 ; + wxPalette *result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Bitmap_GetPalette",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBitmap, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxPalette *)((wxBitmap const *)arg1)->GetPalette(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxPalette, 0); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Bitmap_CopyFromIcon(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxBitmap *arg1 = (wxBitmap *) 0 ; @@ -9563,7 +9669,7 @@ static PyObject *_wrap_Locale_Init1(PyObject *, PyObject *args, PyObject *kwargs } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)(arg1)->Init((wxString const &)*arg2,(wxString const &)*arg3,(wxString const &)*arg4,arg5,arg6); + result = (bool)wxLocale_Init1(arg1,(wxString const &)*arg2,(wxString const &)*arg3,(wxString const &)*arg4,arg5,arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -9627,7 +9733,7 @@ static PyObject *_wrap_Locale_Init2(PyObject *, PyObject *args, PyObject *kwargs } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)(arg1)->Init(arg2,arg3); + result = (bool)wxLocale_Init2(arg1,arg2,arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -14812,57 +14918,25 @@ static PyObject *_wrap_DC_SetLogicalFunction(PyObject *, PyObject *args, PyObjec } -static PyObject *_wrap_DC_SetOptimization(PyObject *, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxDC *arg1 = (wxDC *) 0 ; - bool arg2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "optimize", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DC_SetOptimization",kwnames,&obj0,&obj1)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDC, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (bool)SWIG_As_bool(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetOptimization(arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_DC_GetOptimization(PyObject *, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_DC_ComputeScaleAndOrigin(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxDC *arg1 = (wxDC *) 0 ; - bool result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:DC_GetOptimization",kwnames,&obj0)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:DC_ComputeScaleAndOrigin",kwnames,&obj0)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDC, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)(arg1)->GetOptimization(); + (arg1)->ComputeScaleAndOrigin(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - { - resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); - } + Py_INCREF(Py_None); resultobj = Py_None; return resultobj; fail: return NULL; @@ -18503,6 +18577,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"delete_Palette", (PyCFunction) _wrap_delete_Palette, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Palette_GetPixel", (PyCFunction) _wrap_Palette_GetPixel, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Palette_GetRGB", (PyCFunction) _wrap_Palette_GetRGB, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Palette_GetColoursCount", (PyCFunction) _wrap_Palette_GetColoursCount, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Palette_Ok", (PyCFunction) _wrap_Palette_Ok, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Palette_swigregister", Palette_swigregister, METH_VARARGS, NULL }, { (char *)"new_Pen", (PyCFunction) _wrap_new_Pen, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -18533,6 +18608,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Brush_GetColour", (PyCFunction) _wrap_Brush_GetColour, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Brush_GetStyle", (PyCFunction) _wrap_Brush_GetStyle, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Brush_GetStipple", (PyCFunction) _wrap_Brush_GetStipple, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Brush_IsHatch", (PyCFunction) _wrap_Brush_IsHatch, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Brush_Ok", (PyCFunction) _wrap_Brush_Ok, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Brush_swigregister", Brush_swigregister, METH_VARARGS, NULL }, { (char *)"new_Bitmap", (PyCFunction) _wrap_new_Bitmap, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -18554,6 +18630,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Bitmap_GetSubBitmap", (PyCFunction) _wrap_Bitmap_GetSubBitmap, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_SaveFile", (PyCFunction) _wrap_Bitmap_SaveFile, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_LoadFile", (PyCFunction) _wrap_Bitmap_LoadFile, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Bitmap_GetPalette", (PyCFunction) _wrap_Bitmap_GetPalette, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_CopyFromIcon", (PyCFunction) _wrap_Bitmap_CopyFromIcon, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_SetHeight", (PyCFunction) _wrap_Bitmap_SetHeight, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_SetWidth", (PyCFunction) _wrap_Bitmap_SetWidth, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -18898,8 +18975,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"DC_SetAxisOrientation", (PyCFunction) _wrap_DC_SetAxisOrientation, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"DC_GetLogicalFunction", (PyCFunction) _wrap_DC_GetLogicalFunction, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"DC_SetLogicalFunction", (PyCFunction) _wrap_DC_SetLogicalFunction, METH_VARARGS | METH_KEYWORDS, NULL }, - { (char *)"DC_SetOptimization", (PyCFunction) _wrap_DC_SetOptimization, METH_VARARGS | METH_KEYWORDS, NULL }, - { (char *)"DC_GetOptimization", (PyCFunction) _wrap_DC_GetOptimization, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"DC_ComputeScaleAndOrigin", (PyCFunction) _wrap_DC_ComputeScaleAndOrigin, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"DC_CalcBoundingBox", (PyCFunction) _wrap_DC_CalcBoundingBox, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"DC_CalcBoundingBoxPoint", (PyCFunction) _wrap_DC_CalcBoundingBoxPoint, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"DC_ResetBoundingBox", (PyCFunction) _wrap_DC_ResetBoundingBox, METH_VARARGS | METH_KEYWORDS, NULL },