From 5acb46e0cde04773273611029a3b439d74c67bec Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 16 Sep 2006 19:05:36 +0000 Subject: [PATCH] new wxRect and wxPlatformInformation methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_gdicmn.i | 11 +++ wxPython/src/_misc.i | 4 + wxPython/src/gtk/_core.py | 18 +++++ wxPython/src/gtk/_core_wrap.cpp | 132 ++++++++++++++++++++++++++++++++ wxPython/src/gtk/_misc.py | 8 ++ wxPython/src/gtk/_misc_wrap.cpp | 102 ++++++++++++++++++++++++ wxPython/src/mac/_core.py | 18 +++++ wxPython/src/mac/_core_wrap.cpp | 132 ++++++++++++++++++++++++++++++++ wxPython/src/mac/_misc.py | 8 ++ wxPython/src/mac/_misc_wrap.cpp | 102 ++++++++++++++++++++++++ wxPython/src/msw/_core.py | 18 +++++ wxPython/src/msw/_core_wrap.cpp | 132 ++++++++++++++++++++++++++++++++ wxPython/src/msw/_misc.py | 8 ++ wxPython/src/msw/_misc_wrap.cpp | 102 ++++++++++++++++++++++++ 14 files changed, 795 insertions(+) diff --git a/wxPython/src/_gdicmn.i b/wxPython/src/_gdicmn.i index f819bd50d8..40b3874e16 100644 --- a/wxPython/src/_gdicmn.i +++ b/wxPython/src/_gdicmn.i @@ -516,10 +516,19 @@ public: wxPoint GetBottomRight() const; void SetBottomRight(const wxPoint &p); + wxPoint GetTopRight() const; + void SetTopRight(const wxPoint &p); + wxPoint GetBottomLeft() const; + void SetBottomLeft(const wxPoint &p); + // wxPoint GetLeftTop() const; // void SetLeftTop(const wxPoint &p); // wxPoint GetRightBottom() const; // void SetRightBottom(const wxPoint &p); +// wxPoint GetRightTop() const; +// void SetRightTop(const wxPoint &p); +// wxPoint GetLeftBottom() const; +// void SetLeftBottom(const wxPoint &p); int GetLeft() const; int GetTop() const; @@ -717,6 +726,7 @@ usually, but not necessarily, the larger one.", ""); %property(Bottom, GetBottom, SetBottom, doc="See `GetBottom` and `SetBottom`"); %property(BottomRight, GetBottomRight, SetBottomRight, doc="See `GetBottomRight` and `SetBottomRight`"); + %property(BottomLeft, GetBottomLeft, SetBottomLeft, doc="See `GetBottomLeft` and `SetBottomLeft`"); %property(Height, GetHeight, SetHeight, doc="See `GetHeight` and `SetHeight`"); %property(Left, GetLeft, SetLeft, doc="See `GetLeft` and `SetLeft`"); %property(Position, GetPosition, SetPosition, doc="See `GetPosition` and `SetPosition`"); @@ -724,6 +734,7 @@ usually, but not necessarily, the larger one.", ""); %property(Size, GetSize, SetSize, doc="See `GetSize` and `SetSize`"); %property(Top, GetTop, SetTop, doc="See `GetTop` and `SetTop`"); %property(TopLeft, GetTopLeft, SetTopLeft, doc="See `GetTopLeft` and `SetTopLeft`"); + %property(TopRight, GetTopRight, SetTopRight, doc="See `GetTopRight` and `SetTopRight`"); %property(Width, GetWidth, SetWidth, doc="See `GetWidth` and `SetWidth`"); %property(X, GetX, SetX, doc="See `GetX` and `SetX`"); %property(Y, GetY, SetY, doc="See `GetY` and `SetY`"); diff --git a/wxPython/src/_misc.i b/wxPython/src/_misc.i index 11ca06c834..2330298d19 100644 --- a/wxPython/src/_misc.i +++ b/wxPython/src/_misc.i @@ -366,9 +366,13 @@ public: int GetOSMajorVersion() const; int GetOSMinorVersion() const; + bool CheckOSVersion(int major, int minor) const; + int GetToolkitMajorVersion() const; int GetToolkitMinorVersion() const; + bool CheckToolkitVersion(int major, int minor) const; + bool IsUsingUniversalWidgets() const; wxOperatingSystemId GetOperatingSystemId() const; diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index 6bb56cd99b..1138962a0b 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -1184,6 +1184,22 @@ class Rect(object): """SetBottomRight(self, Point p)""" return _core_.Rect_SetBottomRight(*args, **kwargs) + def GetTopRight(*args, **kwargs): + """GetTopRight(self) -> Point""" + return _core_.Rect_GetTopRight(*args, **kwargs) + + def SetTopRight(*args, **kwargs): + """SetTopRight(self, Point p)""" + return _core_.Rect_SetTopRight(*args, **kwargs) + + def GetBottomLeft(*args, **kwargs): + """GetBottomLeft(self) -> Point""" + return _core_.Rect_GetBottomLeft(*args, **kwargs) + + def SetBottomLeft(*args, **kwargs): + """SetBottomLeft(self, Point p)""" + return _core_.Rect_SetBottomLeft(*args, **kwargs) + def GetLeft(*args, **kwargs): """GetLeft(self) -> int""" return _core_.Rect_GetLeft(*args, **kwargs) @@ -1408,6 +1424,7 @@ class Rect(object): Bottom = property(GetBottom,SetBottom,doc="See `GetBottom` and `SetBottom`") BottomRight = property(GetBottomRight,SetBottomRight,doc="See `GetBottomRight` and `SetBottomRight`") + BottomLeft = property(GetBottomLeft,SetBottomLeft,doc="See `GetBottomLeft` and `SetBottomLeft`") Height = property(GetHeight,SetHeight,doc="See `GetHeight` and `SetHeight`") Left = property(GetLeft,SetLeft,doc="See `GetLeft` and `SetLeft`") Position = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`") @@ -1415,6 +1432,7 @@ class Rect(object): Size = property(GetSize,SetSize,doc="See `GetSize` and `SetSize`") Top = property(GetTop,SetTop,doc="See `GetTop` and `SetTop`") TopLeft = property(GetTopLeft,SetTopLeft,doc="See `GetTopLeft` and `SetTopLeft`") + TopRight = property(GetTopRight,SetTopRight,doc="See `GetTopRight` and `SetTopRight`") Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`") X = property(GetX,SetX,doc="See `GetX` and `SetX`") Y = property(GetY,SetY,doc="See `GetY` and `SetY`") diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index f6f5f78abd..0d29af571e 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -6825,6 +6825,134 @@ fail: } +SWIGINTERN PyObject *_wrap_Rect_GetTopRight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxRect, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_GetTopRight" "', expected argument " "1"" of type '" "wxRect const *""'"); + } + arg1 = reinterpret_cast< wxRect * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxRect const *)arg1)->GetTopRight(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new wxPoint(static_cast< const wxPoint& >(result))), SWIGTYPE_p_wxPoint, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rect_SetTopRight(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + wxPoint temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Rect_SetTopRight",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRect, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_SetTopRight" "', expected argument " "1"" of type '" "wxRect *""'"); + } + arg1 = reinterpret_cast< wxRect * >(argp1); + { + arg2 = &temp2; + if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetTopRight((wxPoint const &)*arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rect_GetBottomLeft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxRect, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_GetBottomLeft" "', expected argument " "1"" of type '" "wxRect const *""'"); + } + arg1 = reinterpret_cast< wxRect * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxRect const *)arg1)->GetBottomLeft(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new wxPoint(static_cast< const wxPoint& >(result))), SWIGTYPE_p_wxPoint, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rect_SetBottomLeft(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + wxPoint temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Rect_SetBottomLeft",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRect, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_SetBottomLeft" "', expected argument " "1"" of type '" "wxRect *""'"); + } + arg1 = reinterpret_cast< wxRect * >(argp1); + { + arg2 = &temp2; + if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetBottomLeft((wxPoint const &)*arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Rect_GetLeft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxRect *arg1 = (wxRect *) 0 ; @@ -53801,6 +53929,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"Rect_SetTopLeft", (PyCFunction) _wrap_Rect_SetTopLeft, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_GetBottomRight", (PyCFunction)_wrap_Rect_GetBottomRight, METH_O, NULL}, { (char *)"Rect_SetBottomRight", (PyCFunction) _wrap_Rect_SetBottomRight, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Rect_GetTopRight", (PyCFunction)_wrap_Rect_GetTopRight, METH_O, NULL}, + { (char *)"Rect_SetTopRight", (PyCFunction) _wrap_Rect_SetTopRight, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Rect_GetBottomLeft", (PyCFunction)_wrap_Rect_GetBottomLeft, METH_O, NULL}, + { (char *)"Rect_SetBottomLeft", (PyCFunction) _wrap_Rect_SetBottomLeft, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_GetLeft", (PyCFunction)_wrap_Rect_GetLeft, METH_O, NULL}, { (char *)"Rect_GetTop", (PyCFunction)_wrap_Rect_GetTop, METH_O, NULL}, { (char *)"Rect_GetBottom", (PyCFunction)_wrap_Rect_GetBottom, METH_O, NULL}, diff --git a/wxPython/src/gtk/_misc.py b/wxPython/src/gtk/_misc.py index c564c231bb..9537d01e1c 100644 --- a/wxPython/src/gtk/_misc.py +++ b/wxPython/src/gtk/_misc.py @@ -1108,6 +1108,10 @@ class PlatformInformation(object): """GetOSMinorVersion(self) -> int""" return _misc_.PlatformInformation_GetOSMinorVersion(*args, **kwargs) + def CheckOSVersion(*args, **kwargs): + """CheckOSVersion(self, int major, int minor) -> bool""" + return _misc_.PlatformInformation_CheckOSVersion(*args, **kwargs) + def GetToolkitMajorVersion(*args, **kwargs): """GetToolkitMajorVersion(self) -> int""" return _misc_.PlatformInformation_GetToolkitMajorVersion(*args, **kwargs) @@ -1116,6 +1120,10 @@ class PlatformInformation(object): """GetToolkitMinorVersion(self) -> int""" return _misc_.PlatformInformation_GetToolkitMinorVersion(*args, **kwargs) + def CheckToolkitVersion(*args, **kwargs): + """CheckToolkitVersion(self, int major, int minor) -> bool""" + return _misc_.PlatformInformation_CheckToolkitVersion(*args, **kwargs) + def IsUsingUniversalWidgets(*args, **kwargs): """IsUsingUniversalWidgets(self) -> bool""" return _misc_.PlatformInformation_IsUsingUniversalWidgets(*args, **kwargs) diff --git a/wxPython/src/gtk/_misc_wrap.cpp b/wxPython/src/gtk/_misc_wrap.cpp index e2904efda4..7470b75a37 100644 --- a/wxPython/src/gtk/_misc_wrap.cpp +++ b/wxPython/src/gtk/_misc_wrap.cpp @@ -10271,6 +10271,56 @@ fail: } +SWIGINTERN PyObject *_wrap_PlatformInformation_CheckOSVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPlatformInfo *arg1 = (wxPlatformInfo *) 0 ; + int arg2 ; + int arg3 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "major",(char *) "minor", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PlatformInformation_CheckOSVersion",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPlatformInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatformInformation_CheckOSVersion" "', expected argument " "1"" of type '" "wxPlatformInfo const *""'"); + } + arg1 = reinterpret_cast< wxPlatformInfo * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PlatformInformation_CheckOSVersion" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PlatformInformation_CheckOSVersion" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxPlatformInfo const *)arg1)->CheckOSVersion(arg2,arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_PlatformInformation_GetToolkitMajorVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxPlatformInfo *arg1 = (wxPlatformInfo *) 0 ; @@ -10327,6 +10377,56 @@ fail: } +SWIGINTERN PyObject *_wrap_PlatformInformation_CheckToolkitVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPlatformInfo *arg1 = (wxPlatformInfo *) 0 ; + int arg2 ; + int arg3 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "major",(char *) "minor", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PlatformInformation_CheckToolkitVersion",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPlatformInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatformInformation_CheckToolkitVersion" "', expected argument " "1"" of type '" "wxPlatformInfo const *""'"); + } + arg1 = reinterpret_cast< wxPlatformInfo * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PlatformInformation_CheckToolkitVersion" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PlatformInformation_CheckToolkitVersion" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxPlatformInfo const *)arg1)->CheckToolkitVersion(arg2,arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_PlatformInformation_IsUsingUniversalWidgets(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxPlatformInfo *arg1 = (wxPlatformInfo *) 0 ; @@ -37428,8 +37528,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"PlatformInformation___ne__", (PyCFunction) _wrap_PlatformInformation___ne__, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PlatformInformation_GetOSMajorVersion", (PyCFunction)_wrap_PlatformInformation_GetOSMajorVersion, METH_O, NULL}, { (char *)"PlatformInformation_GetOSMinorVersion", (PyCFunction)_wrap_PlatformInformation_GetOSMinorVersion, METH_O, NULL}, + { (char *)"PlatformInformation_CheckOSVersion", (PyCFunction) _wrap_PlatformInformation_CheckOSVersion, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PlatformInformation_GetToolkitMajorVersion", (PyCFunction)_wrap_PlatformInformation_GetToolkitMajorVersion, METH_O, NULL}, { (char *)"PlatformInformation_GetToolkitMinorVersion", (PyCFunction)_wrap_PlatformInformation_GetToolkitMinorVersion, METH_O, NULL}, + { (char *)"PlatformInformation_CheckToolkitVersion", (PyCFunction) _wrap_PlatformInformation_CheckToolkitVersion, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PlatformInformation_IsUsingUniversalWidgets", (PyCFunction)_wrap_PlatformInformation_IsUsingUniversalWidgets, METH_O, NULL}, { (char *)"PlatformInformation_GetOperatingSystemId", (PyCFunction)_wrap_PlatformInformation_GetOperatingSystemId, METH_O, NULL}, { (char *)"PlatformInformation_GetPortId", (PyCFunction)_wrap_PlatformInformation_GetPortId, METH_O, NULL}, diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index 6bb56cd99b..1138962a0b 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -1184,6 +1184,22 @@ class Rect(object): """SetBottomRight(self, Point p)""" return _core_.Rect_SetBottomRight(*args, **kwargs) + def GetTopRight(*args, **kwargs): + """GetTopRight(self) -> Point""" + return _core_.Rect_GetTopRight(*args, **kwargs) + + def SetTopRight(*args, **kwargs): + """SetTopRight(self, Point p)""" + return _core_.Rect_SetTopRight(*args, **kwargs) + + def GetBottomLeft(*args, **kwargs): + """GetBottomLeft(self) -> Point""" + return _core_.Rect_GetBottomLeft(*args, **kwargs) + + def SetBottomLeft(*args, **kwargs): + """SetBottomLeft(self, Point p)""" + return _core_.Rect_SetBottomLeft(*args, **kwargs) + def GetLeft(*args, **kwargs): """GetLeft(self) -> int""" return _core_.Rect_GetLeft(*args, **kwargs) @@ -1408,6 +1424,7 @@ class Rect(object): Bottom = property(GetBottom,SetBottom,doc="See `GetBottom` and `SetBottom`") BottomRight = property(GetBottomRight,SetBottomRight,doc="See `GetBottomRight` and `SetBottomRight`") + BottomLeft = property(GetBottomLeft,SetBottomLeft,doc="See `GetBottomLeft` and `SetBottomLeft`") Height = property(GetHeight,SetHeight,doc="See `GetHeight` and `SetHeight`") Left = property(GetLeft,SetLeft,doc="See `GetLeft` and `SetLeft`") Position = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`") @@ -1415,6 +1432,7 @@ class Rect(object): Size = property(GetSize,SetSize,doc="See `GetSize` and `SetSize`") Top = property(GetTop,SetTop,doc="See `GetTop` and `SetTop`") TopLeft = property(GetTopLeft,SetTopLeft,doc="See `GetTopLeft` and `SetTopLeft`") + TopRight = property(GetTopRight,SetTopRight,doc="See `GetTopRight` and `SetTopRight`") Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`") X = property(GetX,SetX,doc="See `GetX` and `SetX`") Y = property(GetY,SetY,doc="See `GetY` and `SetY`") diff --git a/wxPython/src/mac/_core_wrap.cpp b/wxPython/src/mac/_core_wrap.cpp index 1930db7d82..deec045029 100644 --- a/wxPython/src/mac/_core_wrap.cpp +++ b/wxPython/src/mac/_core_wrap.cpp @@ -6824,6 +6824,134 @@ fail: } +SWIGINTERN PyObject *_wrap_Rect_GetTopRight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxRect, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_GetTopRight" "', expected argument " "1"" of type '" "wxRect const *""'"); + } + arg1 = reinterpret_cast< wxRect * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxRect const *)arg1)->GetTopRight(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new wxPoint(static_cast< const wxPoint& >(result))), SWIGTYPE_p_wxPoint, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rect_SetTopRight(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + wxPoint temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Rect_SetTopRight",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRect, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_SetTopRight" "', expected argument " "1"" of type '" "wxRect *""'"); + } + arg1 = reinterpret_cast< wxRect * >(argp1); + { + arg2 = &temp2; + if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetTopRight((wxPoint const &)*arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rect_GetBottomLeft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxRect, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_GetBottomLeft" "', expected argument " "1"" of type '" "wxRect const *""'"); + } + arg1 = reinterpret_cast< wxRect * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxRect const *)arg1)->GetBottomLeft(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new wxPoint(static_cast< const wxPoint& >(result))), SWIGTYPE_p_wxPoint, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rect_SetBottomLeft(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + wxPoint temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Rect_SetBottomLeft",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRect, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_SetBottomLeft" "', expected argument " "1"" of type '" "wxRect *""'"); + } + arg1 = reinterpret_cast< wxRect * >(argp1); + { + arg2 = &temp2; + if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetBottomLeft((wxPoint const &)*arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Rect_GetLeft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxRect *arg1 = (wxRect *) 0 ; @@ -53800,6 +53928,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"Rect_SetTopLeft", (PyCFunction) _wrap_Rect_SetTopLeft, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_GetBottomRight", (PyCFunction)_wrap_Rect_GetBottomRight, METH_O, NULL}, { (char *)"Rect_SetBottomRight", (PyCFunction) _wrap_Rect_SetBottomRight, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Rect_GetTopRight", (PyCFunction)_wrap_Rect_GetTopRight, METH_O, NULL}, + { (char *)"Rect_SetTopRight", (PyCFunction) _wrap_Rect_SetTopRight, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Rect_GetBottomLeft", (PyCFunction)_wrap_Rect_GetBottomLeft, METH_O, NULL}, + { (char *)"Rect_SetBottomLeft", (PyCFunction) _wrap_Rect_SetBottomLeft, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_GetLeft", (PyCFunction)_wrap_Rect_GetLeft, METH_O, NULL}, { (char *)"Rect_GetTop", (PyCFunction)_wrap_Rect_GetTop, METH_O, NULL}, { (char *)"Rect_GetBottom", (PyCFunction)_wrap_Rect_GetBottom, METH_O, NULL}, diff --git a/wxPython/src/mac/_misc.py b/wxPython/src/mac/_misc.py index 0235fec37b..f5a89755f3 100644 --- a/wxPython/src/mac/_misc.py +++ b/wxPython/src/mac/_misc.py @@ -1108,6 +1108,10 @@ class PlatformInformation(object): """GetOSMinorVersion(self) -> int""" return _misc_.PlatformInformation_GetOSMinorVersion(*args, **kwargs) + def CheckOSVersion(*args, **kwargs): + """CheckOSVersion(self, int major, int minor) -> bool""" + return _misc_.PlatformInformation_CheckOSVersion(*args, **kwargs) + def GetToolkitMajorVersion(*args, **kwargs): """GetToolkitMajorVersion(self) -> int""" return _misc_.PlatformInformation_GetToolkitMajorVersion(*args, **kwargs) @@ -1116,6 +1120,10 @@ class PlatformInformation(object): """GetToolkitMinorVersion(self) -> int""" return _misc_.PlatformInformation_GetToolkitMinorVersion(*args, **kwargs) + def CheckToolkitVersion(*args, **kwargs): + """CheckToolkitVersion(self, int major, int minor) -> bool""" + return _misc_.PlatformInformation_CheckToolkitVersion(*args, **kwargs) + def IsUsingUniversalWidgets(*args, **kwargs): """IsUsingUniversalWidgets(self) -> bool""" return _misc_.PlatformInformation_IsUsingUniversalWidgets(*args, **kwargs) diff --git a/wxPython/src/mac/_misc_wrap.cpp b/wxPython/src/mac/_misc_wrap.cpp index a883e44528..5f662e24cd 100644 --- a/wxPython/src/mac/_misc_wrap.cpp +++ b/wxPython/src/mac/_misc_wrap.cpp @@ -10263,6 +10263,56 @@ fail: } +SWIGINTERN PyObject *_wrap_PlatformInformation_CheckOSVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPlatformInfo *arg1 = (wxPlatformInfo *) 0 ; + int arg2 ; + int arg3 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "major",(char *) "minor", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PlatformInformation_CheckOSVersion",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPlatformInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatformInformation_CheckOSVersion" "', expected argument " "1"" of type '" "wxPlatformInfo const *""'"); + } + arg1 = reinterpret_cast< wxPlatformInfo * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PlatformInformation_CheckOSVersion" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PlatformInformation_CheckOSVersion" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxPlatformInfo const *)arg1)->CheckOSVersion(arg2,arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_PlatformInformation_GetToolkitMajorVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxPlatformInfo *arg1 = (wxPlatformInfo *) 0 ; @@ -10319,6 +10369,56 @@ fail: } +SWIGINTERN PyObject *_wrap_PlatformInformation_CheckToolkitVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPlatformInfo *arg1 = (wxPlatformInfo *) 0 ; + int arg2 ; + int arg3 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "major",(char *) "minor", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PlatformInformation_CheckToolkitVersion",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPlatformInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatformInformation_CheckToolkitVersion" "', expected argument " "1"" of type '" "wxPlatformInfo const *""'"); + } + arg1 = reinterpret_cast< wxPlatformInfo * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PlatformInformation_CheckToolkitVersion" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PlatformInformation_CheckToolkitVersion" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxPlatformInfo const *)arg1)->CheckToolkitVersion(arg2,arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_PlatformInformation_IsUsingUniversalWidgets(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxPlatformInfo *arg1 = (wxPlatformInfo *) 0 ; @@ -37489,8 +37589,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"PlatformInformation___ne__", (PyCFunction) _wrap_PlatformInformation___ne__, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PlatformInformation_GetOSMajorVersion", (PyCFunction)_wrap_PlatformInformation_GetOSMajorVersion, METH_O, NULL}, { (char *)"PlatformInformation_GetOSMinorVersion", (PyCFunction)_wrap_PlatformInformation_GetOSMinorVersion, METH_O, NULL}, + { (char *)"PlatformInformation_CheckOSVersion", (PyCFunction) _wrap_PlatformInformation_CheckOSVersion, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PlatformInformation_GetToolkitMajorVersion", (PyCFunction)_wrap_PlatformInformation_GetToolkitMajorVersion, METH_O, NULL}, { (char *)"PlatformInformation_GetToolkitMinorVersion", (PyCFunction)_wrap_PlatformInformation_GetToolkitMinorVersion, METH_O, NULL}, + { (char *)"PlatformInformation_CheckToolkitVersion", (PyCFunction) _wrap_PlatformInformation_CheckToolkitVersion, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PlatformInformation_IsUsingUniversalWidgets", (PyCFunction)_wrap_PlatformInformation_IsUsingUniversalWidgets, METH_O, NULL}, { (char *)"PlatformInformation_GetOperatingSystemId", (PyCFunction)_wrap_PlatformInformation_GetOperatingSystemId, METH_O, NULL}, { (char *)"PlatformInformation_GetPortId", (PyCFunction)_wrap_PlatformInformation_GetPortId, METH_O, NULL}, diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 9135aa2849..e91dc1f2c3 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -1184,6 +1184,22 @@ class Rect(object): """SetBottomRight(self, Point p)""" return _core_.Rect_SetBottomRight(*args, **kwargs) + def GetTopRight(*args, **kwargs): + """GetTopRight(self) -> Point""" + return _core_.Rect_GetTopRight(*args, **kwargs) + + def SetTopRight(*args, **kwargs): + """SetTopRight(self, Point p)""" + return _core_.Rect_SetTopRight(*args, **kwargs) + + def GetBottomLeft(*args, **kwargs): + """GetBottomLeft(self) -> Point""" + return _core_.Rect_GetBottomLeft(*args, **kwargs) + + def SetBottomLeft(*args, **kwargs): + """SetBottomLeft(self, Point p)""" + return _core_.Rect_SetBottomLeft(*args, **kwargs) + def GetLeft(*args, **kwargs): """GetLeft(self) -> int""" return _core_.Rect_GetLeft(*args, **kwargs) @@ -1408,6 +1424,7 @@ class Rect(object): Bottom = property(GetBottom,SetBottom,doc="See `GetBottom` and `SetBottom`") BottomRight = property(GetBottomRight,SetBottomRight,doc="See `GetBottomRight` and `SetBottomRight`") + BottomLeft = property(GetBottomLeft,SetBottomLeft,doc="See `GetBottomLeft` and `SetBottomLeft`") Height = property(GetHeight,SetHeight,doc="See `GetHeight` and `SetHeight`") Left = property(GetLeft,SetLeft,doc="See `GetLeft` and `SetLeft`") Position = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`") @@ -1415,6 +1432,7 @@ class Rect(object): Size = property(GetSize,SetSize,doc="See `GetSize` and `SetSize`") Top = property(GetTop,SetTop,doc="See `GetTop` and `SetTop`") TopLeft = property(GetTopLeft,SetTopLeft,doc="See `GetTopLeft` and `SetTopLeft`") + TopRight = property(GetTopRight,SetTopRight,doc="See `GetTopRight` and `SetTopRight`") Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`") X = property(GetX,SetX,doc="See `GetX` and `SetX`") Y = property(GetY,SetY,doc="See `GetY` and `SetY`") diff --git a/wxPython/src/msw/_core_wrap.cpp b/wxPython/src/msw/_core_wrap.cpp index c11de14c4a..5f73987f0b 100644 --- a/wxPython/src/msw/_core_wrap.cpp +++ b/wxPython/src/msw/_core_wrap.cpp @@ -6809,6 +6809,134 @@ fail: } +SWIGINTERN PyObject *_wrap_Rect_GetTopRight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxRect, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_GetTopRight" "', expected argument " "1"" of type '" "wxRect const *""'"); + } + arg1 = reinterpret_cast< wxRect * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxRect const *)arg1)->GetTopRight(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new wxPoint(static_cast< const wxPoint& >(result))), SWIGTYPE_p_wxPoint, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rect_SetTopRight(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + wxPoint temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Rect_SetTopRight",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRect, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_SetTopRight" "', expected argument " "1"" of type '" "wxRect *""'"); + } + arg1 = reinterpret_cast< wxRect * >(argp1); + { + arg2 = &temp2; + if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetTopRight((wxPoint const &)*arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rect_GetBottomLeft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxRect, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_GetBottomLeft" "', expected argument " "1"" of type '" "wxRect const *""'"); + } + arg1 = reinterpret_cast< wxRect * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxRect const *)arg1)->GetBottomLeft(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new wxPoint(static_cast< const wxPoint& >(result))), SWIGTYPE_p_wxPoint, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Rect_SetBottomLeft(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + wxPoint temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Rect_SetBottomLeft",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRect, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rect_SetBottomLeft" "', expected argument " "1"" of type '" "wxRect *""'"); + } + arg1 = reinterpret_cast< wxRect * >(argp1); + { + arg2 = &temp2; + if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetBottomLeft((wxPoint const &)*arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Rect_GetLeft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxRect *arg1 = (wxRect *) 0 ; @@ -53826,6 +53954,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"Rect_SetTopLeft", (PyCFunction) _wrap_Rect_SetTopLeft, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_GetBottomRight", (PyCFunction)_wrap_Rect_GetBottomRight, METH_O, NULL}, { (char *)"Rect_SetBottomRight", (PyCFunction) _wrap_Rect_SetBottomRight, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Rect_GetTopRight", (PyCFunction)_wrap_Rect_GetTopRight, METH_O, NULL}, + { (char *)"Rect_SetTopRight", (PyCFunction) _wrap_Rect_SetTopRight, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Rect_GetBottomLeft", (PyCFunction)_wrap_Rect_GetBottomLeft, METH_O, NULL}, + { (char *)"Rect_SetBottomLeft", (PyCFunction) _wrap_Rect_SetBottomLeft, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Rect_GetLeft", (PyCFunction)_wrap_Rect_GetLeft, METH_O, NULL}, { (char *)"Rect_GetTop", (PyCFunction)_wrap_Rect_GetTop, METH_O, NULL}, { (char *)"Rect_GetBottom", (PyCFunction)_wrap_Rect_GetBottom, METH_O, NULL}, diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index 0235fec37b..f5a89755f3 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -1108,6 +1108,10 @@ class PlatformInformation(object): """GetOSMinorVersion(self) -> int""" return _misc_.PlatformInformation_GetOSMinorVersion(*args, **kwargs) + def CheckOSVersion(*args, **kwargs): + """CheckOSVersion(self, int major, int minor) -> bool""" + return _misc_.PlatformInformation_CheckOSVersion(*args, **kwargs) + def GetToolkitMajorVersion(*args, **kwargs): """GetToolkitMajorVersion(self) -> int""" return _misc_.PlatformInformation_GetToolkitMajorVersion(*args, **kwargs) @@ -1116,6 +1120,10 @@ class PlatformInformation(object): """GetToolkitMinorVersion(self) -> int""" return _misc_.PlatformInformation_GetToolkitMinorVersion(*args, **kwargs) + def CheckToolkitVersion(*args, **kwargs): + """CheckToolkitVersion(self, int major, int minor) -> bool""" + return _misc_.PlatformInformation_CheckToolkitVersion(*args, **kwargs) + def IsUsingUniversalWidgets(*args, **kwargs): """IsUsingUniversalWidgets(self) -> bool""" return _misc_.PlatformInformation_IsUsingUniversalWidgets(*args, **kwargs) diff --git a/wxPython/src/msw/_misc_wrap.cpp b/wxPython/src/msw/_misc_wrap.cpp index 9ae93dd2b5..a867ef2e30 100644 --- a/wxPython/src/msw/_misc_wrap.cpp +++ b/wxPython/src/msw/_misc_wrap.cpp @@ -10263,6 +10263,56 @@ fail: } +SWIGINTERN PyObject *_wrap_PlatformInformation_CheckOSVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPlatformInfo *arg1 = (wxPlatformInfo *) 0 ; + int arg2 ; + int arg3 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "major",(char *) "minor", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PlatformInformation_CheckOSVersion",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPlatformInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatformInformation_CheckOSVersion" "', expected argument " "1"" of type '" "wxPlatformInfo const *""'"); + } + arg1 = reinterpret_cast< wxPlatformInfo * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PlatformInformation_CheckOSVersion" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PlatformInformation_CheckOSVersion" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxPlatformInfo const *)arg1)->CheckOSVersion(arg2,arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_PlatformInformation_GetToolkitMajorVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxPlatformInfo *arg1 = (wxPlatformInfo *) 0 ; @@ -10319,6 +10369,56 @@ fail: } +SWIGINTERN PyObject *_wrap_PlatformInformation_CheckToolkitVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPlatformInfo *arg1 = (wxPlatformInfo *) 0 ; + int arg2 ; + int arg3 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "major",(char *) "minor", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PlatformInformation_CheckToolkitVersion",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPlatformInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlatformInformation_CheckToolkitVersion" "', expected argument " "1"" of type '" "wxPlatformInfo const *""'"); + } + arg1 = reinterpret_cast< wxPlatformInfo * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PlatformInformation_CheckToolkitVersion" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PlatformInformation_CheckToolkitVersion" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxPlatformInfo const *)arg1)->CheckToolkitVersion(arg2,arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_PlatformInformation_IsUsingUniversalWidgets(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxPlatformInfo *arg1 = (wxPlatformInfo *) 0 ; @@ -37489,8 +37589,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"PlatformInformation___ne__", (PyCFunction) _wrap_PlatformInformation___ne__, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PlatformInformation_GetOSMajorVersion", (PyCFunction)_wrap_PlatformInformation_GetOSMajorVersion, METH_O, NULL}, { (char *)"PlatformInformation_GetOSMinorVersion", (PyCFunction)_wrap_PlatformInformation_GetOSMinorVersion, METH_O, NULL}, + { (char *)"PlatformInformation_CheckOSVersion", (PyCFunction) _wrap_PlatformInformation_CheckOSVersion, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PlatformInformation_GetToolkitMajorVersion", (PyCFunction)_wrap_PlatformInformation_GetToolkitMajorVersion, METH_O, NULL}, { (char *)"PlatformInformation_GetToolkitMinorVersion", (PyCFunction)_wrap_PlatformInformation_GetToolkitMinorVersion, METH_O, NULL}, + { (char *)"PlatformInformation_CheckToolkitVersion", (PyCFunction) _wrap_PlatformInformation_CheckToolkitVersion, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PlatformInformation_IsUsingUniversalWidgets", (PyCFunction)_wrap_PlatformInformation_IsUsingUniversalWidgets, METH_O, NULL}, { (char *)"PlatformInformation_GetOperatingSystemId", (PyCFunction)_wrap_PlatformInformation_GetOperatingSystemId, METH_O, NULL}, { (char *)"PlatformInformation_GetPortId", (PyCFunction)_wrap_PlatformInformation_GetPortId, METH_O, NULL}, -- 2.45.2