From d04418a701bccb2aa7944cbc62c10b9d97ff9764 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 27 Apr 2005 20:02:41 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/__core_rename.i | 2 ++ wxPython/src/__misc_rename.i | 1 + wxPython/src/gtk/_core.py | 2 ++ wxPython/src/gtk/_core_wrap.cpp | 6 +++++ wxPython/src/gtk/_gdi.py | 10 ++++++++ wxPython/src/gtk/_gdi_wrap.cpp | 34 +++++++++++++++++++++++++++ wxPython/src/gtk/_misc.py | 10 ++++++++ wxPython/src/gtk/_misc_wrap.cpp | 41 +++++++++++++++++++++++++++++++++ wxPython/src/mac/_core.py | 2 ++ wxPython/src/mac/_core_wrap.cpp | 6 +++++ wxPython/src/mac/_gdi.py | 10 ++++++++ wxPython/src/mac/_gdi_wrap.cpp | 34 +++++++++++++++++++++++++++ wxPython/src/mac/_misc.py | 10 ++++++++ wxPython/src/mac/_misc_wrap.cpp | 41 +++++++++++++++++++++++++++++++++ wxPython/src/msw/_core.py | 2 ++ wxPython/src/msw/_core_wrap.cpp | 6 +++++ wxPython/src/msw/_gdi.py | 10 ++++++++ wxPython/src/msw/_gdi_wrap.cpp | 34 +++++++++++++++++++++++++++ wxPython/src/msw/_misc.py | 10 ++++++++ wxPython/src/msw/_misc_wrap.cpp | 41 +++++++++++++++++++++++++++++++++ wxPython/wxPython/_core.py | 2 ++ wxPython/wxPython/_gdi.py | 1 + wxPython/wxPython/_misc.py | 1 + 23 files changed, 316 insertions(+) diff --git a/wxPython/src/__core_rename.i b/wxPython/src/__core_rename.i index ae14e79694..fc92a71874 100644 --- a/wxPython/src/__core_rename.i +++ b/wxPython/src/__core_rename.i @@ -302,6 +302,8 @@ %rename(USER_DASH) wxUSER_DASH; %rename(TRANSPARENT) wxTRANSPARENT; %rename(STIPPLE) wxSTIPPLE; +%rename(STIPPLE_MASK) wxSTIPPLE_MASK; +%rename(STIPPLE_MASK_OPAQUE) wxSTIPPLE_MASK_OPAQUE; %rename(BDIAGONAL_HATCH) wxBDIAGONAL_HATCH; %rename(CROSSDIAG_HATCH) wxCROSSDIAG_HATCH; %rename(FDIAGONAL_HATCH) wxFDIAGONAL_HATCH; diff --git a/wxPython/src/__misc_rename.i b/wxPython/src/__misc_rename.i index ce8883a9cd..260e963211 100644 --- a/wxPython/src/__misc_rename.i +++ b/wxPython/src/__misc_rename.i @@ -155,6 +155,7 @@ %rename(GenericFindWindowAtPoint) wxGenericFindWindowAtPoint; %rename(FindWindowAtPoint) wxFindWindowAtPoint; %rename(GetTopLevelParent) wxGetTopLevelParent; +%rename(LaunchDefaultBrowser) wxLaunchDefaultBrowser; %rename(GetKeyState) wxGetKeyState; %rename(WakeUpMainThread) wxWakeUpMainThread; %rename(MutexGuiEnter) wxMutexGuiEnter; diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index f530d9352e..bd98b8c10e 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -372,6 +372,8 @@ DOT_DASH = _core_.DOT_DASH USER_DASH = _core_.USER_DASH TRANSPARENT = _core_.TRANSPARENT STIPPLE = _core_.STIPPLE +STIPPLE_MASK = _core_.STIPPLE_MASK +STIPPLE_MASK_OPAQUE = _core_.STIPPLE_MASK_OPAQUE BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index 84fe7f95aa..07210d1c61 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -48620,6 +48620,12 @@ SWIGEXPORT(void) SWIG_init(void) { { PyDict_SetItemString(d,"STIPPLE", SWIG_From_int((int)(wxSTIPPLE))); } + { + PyDict_SetItemString(d,"STIPPLE_MASK", SWIG_From_int((int)(wxSTIPPLE_MASK))); + } + { + PyDict_SetItemString(d,"STIPPLE_MASK_OPAQUE", SWIG_From_int((int)(wxSTIPPLE_MASK_OPAQUE))); + } { PyDict_SetItemString(d,"BDIAGONAL_HATCH", SWIG_From_int((int)(wxBDIAGONAL_HATCH))); } diff --git a/wxPython/src/gtk/_gdi.py b/wxPython/src/gtk/_gdi.py index 7d4d700df8..deb69eba5d 100644 --- a/wxPython/src/gtk/_gdi.py +++ b/wxPython/src/gtk/_gdi.py @@ -512,6 +512,16 @@ class BrushPtr(Brush): self.__class__ = Brush _gdi_.Brush_swigregister(BrushPtr) +def BrushFromBitmap(*args, **kwargs): + """ + BrushFromBitmap(Bitmap stippleBitmap) -> Brush + + Constructs a stippled brush using a bitmap. + """ + val = _gdi_.new_BrushFromBitmap(*args, **kwargs) + val.thisown = 1 + return val + class Bitmap(GDIObject): """ The wx.Bitmap class encapsulates the concept of a platform-dependent diff --git a/wxPython/src/gtk/_gdi_wrap.cpp b/wxPython/src/gtk/_gdi_wrap.cpp index 025d6c864d..e64e881ce1 100644 --- a/wxPython/src/gtk/_gdi_wrap.cpp +++ b/wxPython/src/gtk/_gdi_wrap.cpp @@ -3663,6 +3663,39 @@ static PyObject *_wrap_new_Brush(PyObject *, PyObject *args, PyObject *kwargs) { } +static PyObject *_wrap_new_BrushFromBitmap(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxBitmap *arg1 = 0 ; + wxBrush *result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "stippleBitmap", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_BrushFromBitmap",kwnames,&obj0)) goto fail; + { + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxBitmap, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + if (arg1 == NULL) { + SWIG_null_ref("wxBitmap"); + } + if (SWIG_arg_fail(1)) SWIG_fail; + } + { + if (!wxPyCheckForApp()) SWIG_fail; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxBrush *)new wxBrush((wxBitmap const &)*arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxBrush, 1); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_delete_Brush(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxBrush *arg1 = (wxBrush *) 0 ; @@ -20528,6 +20561,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Pen___ne__", (PyCFunction) _wrap_Pen___ne__, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Pen_swigregister", Pen_swigregister, METH_VARARGS, NULL}, { (char *)"new_Brush", (PyCFunction) _wrap_new_Brush, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"new_BrushFromBitmap", (PyCFunction) _wrap_new_BrushFromBitmap, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"delete_Brush", (PyCFunction) _wrap_delete_Brush, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Brush_SetColour", (PyCFunction) _wrap_Brush_SetColour, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Brush_SetStyle", (PyCFunction) _wrap_Brush_SetStyle, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/gtk/_misc.py b/wxPython/src/gtk/_misc.py index b1481840b4..09c9eeeead 100644 --- a/wxPython/src/gtk/_misc.py +++ b/wxPython/src/gtk/_misc.py @@ -554,6 +554,16 @@ def GetTopLevelParent(*args, **kwargs): """GetTopLevelParent(Window win) -> Window""" return _misc_.GetTopLevelParent(*args, **kwargs) +def LaunchDefaultBrowser(*args, **kwargs): + """ + LaunchDefaultBrowser(String url) -> bool + + Launches the user's default browser and tells it to open the location + at ``url``. Returns ``True`` if the application was successfully + launched. + """ + return _misc_.LaunchDefaultBrowser(*args, **kwargs) + def GetKeyState(*args, **kwargs): """ GetKeyState(int key) -> bool diff --git a/wxPython/src/gtk/_misc_wrap.cpp b/wxPython/src/gtk/_misc_wrap.cpp index d1c40e7cf6..8f7c9fe1bd 100644 --- a/wxPython/src/gtk/_misc_wrap.cpp +++ b/wxPython/src/gtk/_misc_wrap.cpp @@ -6016,6 +6016,46 @@ static PyObject *_wrap_GetTopLevelParent(PyObject *, PyObject *args, PyObject *k } +static PyObject *_wrap_LaunchDefaultBrowser(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxString *arg1 = 0 ; + bool result; + bool temp1 = false ; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "url", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:LaunchDefaultBrowser",kwnames,&obj0)) goto fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = true; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)wxLaunchDefaultBrowser((wxString const &)*arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + { + if (temp1) + delete arg1; + } + return resultobj; + fail: + { + if (temp1) + delete arg1; + } + return NULL; +} + + static PyObject *_wrap_GetKeyState(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxKeyCode arg1 ; @@ -31498,6 +31538,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"GenericFindWindowAtPoint", (PyCFunction) _wrap_GenericFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"FindWindowAtPoint", (PyCFunction) _wrap_FindWindowAtPoint, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GetTopLevelParent", (PyCFunction) _wrap_GetTopLevelParent, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"LaunchDefaultBrowser", (PyCFunction) _wrap_LaunchDefaultBrowser, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GetKeyState", (PyCFunction) _wrap_GetKeyState, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"WakeUpMainThread", (PyCFunction) _wrap_WakeUpMainThread, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"MutexGuiEnter", (PyCFunction) _wrap_MutexGuiEnter, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index f530d9352e..bd98b8c10e 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -372,6 +372,8 @@ DOT_DASH = _core_.DOT_DASH USER_DASH = _core_.USER_DASH TRANSPARENT = _core_.TRANSPARENT STIPPLE = _core_.STIPPLE +STIPPLE_MASK = _core_.STIPPLE_MASK +STIPPLE_MASK_OPAQUE = _core_.STIPPLE_MASK_OPAQUE BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH diff --git a/wxPython/src/mac/_core_wrap.cpp b/wxPython/src/mac/_core_wrap.cpp index 84fe7f95aa..07210d1c61 100644 --- a/wxPython/src/mac/_core_wrap.cpp +++ b/wxPython/src/mac/_core_wrap.cpp @@ -48620,6 +48620,12 @@ SWIGEXPORT(void) SWIG_init(void) { { PyDict_SetItemString(d,"STIPPLE", SWIG_From_int((int)(wxSTIPPLE))); } + { + PyDict_SetItemString(d,"STIPPLE_MASK", SWIG_From_int((int)(wxSTIPPLE_MASK))); + } + { + PyDict_SetItemString(d,"STIPPLE_MASK_OPAQUE", SWIG_From_int((int)(wxSTIPPLE_MASK_OPAQUE))); + } { PyDict_SetItemString(d,"BDIAGONAL_HATCH", SWIG_From_int((int)(wxBDIAGONAL_HATCH))); } diff --git a/wxPython/src/mac/_gdi.py b/wxPython/src/mac/_gdi.py index 55ae2364fc..64aba87097 100644 --- a/wxPython/src/mac/_gdi.py +++ b/wxPython/src/mac/_gdi.py @@ -516,6 +516,16 @@ class BrushPtr(Brush): self.__class__ = Brush _gdi_.Brush_swigregister(BrushPtr) +def BrushFromBitmap(*args, **kwargs): + """ + BrushFromBitmap(Bitmap stippleBitmap) -> Brush + + Constructs a stippled brush using a bitmap. + """ + val = _gdi_.new_BrushFromBitmap(*args, **kwargs) + val.thisown = 1 + return val + class Bitmap(GDIObject): """ The wx.Bitmap class encapsulates the concept of a platform-dependent diff --git a/wxPython/src/mac/_gdi_wrap.cpp b/wxPython/src/mac/_gdi_wrap.cpp index 7456895c53..6865ca595f 100644 --- a/wxPython/src/mac/_gdi_wrap.cpp +++ b/wxPython/src/mac/_gdi_wrap.cpp @@ -3664,6 +3664,39 @@ static PyObject *_wrap_new_Brush(PyObject *, PyObject *args, PyObject *kwargs) { } +static PyObject *_wrap_new_BrushFromBitmap(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxBitmap *arg1 = 0 ; + wxBrush *result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "stippleBitmap", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_BrushFromBitmap",kwnames,&obj0)) goto fail; + { + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxBitmap, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + if (arg1 == NULL) { + SWIG_null_ref("wxBitmap"); + } + if (SWIG_arg_fail(1)) SWIG_fail; + } + { + if (!wxPyCheckForApp()) SWIG_fail; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxBrush *)new wxBrush((wxBitmap const &)*arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxBrush, 1); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_delete_Brush(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxBrush *arg1 = (wxBrush *) 0 ; @@ -20746,6 +20779,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Pen___ne__", (PyCFunction) _wrap_Pen___ne__, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Pen_swigregister", Pen_swigregister, METH_VARARGS, NULL}, { (char *)"new_Brush", (PyCFunction) _wrap_new_Brush, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"new_BrushFromBitmap", (PyCFunction) _wrap_new_BrushFromBitmap, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"delete_Brush", (PyCFunction) _wrap_delete_Brush, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Brush_SetColour", (PyCFunction) _wrap_Brush_SetColour, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Brush_SetStyle", (PyCFunction) _wrap_Brush_SetStyle, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/_misc.py b/wxPython/src/mac/_misc.py index cca3a2664c..5021d323f1 100644 --- a/wxPython/src/mac/_misc.py +++ b/wxPython/src/mac/_misc.py @@ -554,6 +554,16 @@ def GetTopLevelParent(*args, **kwargs): """GetTopLevelParent(Window win) -> Window""" return _misc_.GetTopLevelParent(*args, **kwargs) +def LaunchDefaultBrowser(*args, **kwargs): + """ + LaunchDefaultBrowser(String url) -> bool + + Launches the user's default browser and tells it to open the location + at ``url``. Returns ``True`` if the application was successfully + launched. + """ + return _misc_.LaunchDefaultBrowser(*args, **kwargs) + def GetKeyState(*args, **kwargs): """ GetKeyState(int key) -> bool diff --git a/wxPython/src/mac/_misc_wrap.cpp b/wxPython/src/mac/_misc_wrap.cpp index 7689111ac0..5339647de4 100644 --- a/wxPython/src/mac/_misc_wrap.cpp +++ b/wxPython/src/mac/_misc_wrap.cpp @@ -6008,6 +6008,46 @@ static PyObject *_wrap_GetTopLevelParent(PyObject *, PyObject *args, PyObject *k } +static PyObject *_wrap_LaunchDefaultBrowser(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxString *arg1 = 0 ; + bool result; + bool temp1 = false ; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "url", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:LaunchDefaultBrowser",kwnames,&obj0)) goto fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = true; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)wxLaunchDefaultBrowser((wxString const &)*arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + { + if (temp1) + delete arg1; + } + return resultobj; + fail: + { + if (temp1) + delete arg1; + } + return NULL; +} + + static PyObject *_wrap_GetKeyState(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxKeyCode arg1 ; @@ -31555,6 +31595,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"GenericFindWindowAtPoint", (PyCFunction) _wrap_GenericFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"FindWindowAtPoint", (PyCFunction) _wrap_FindWindowAtPoint, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GetTopLevelParent", (PyCFunction) _wrap_GetTopLevelParent, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"LaunchDefaultBrowser", (PyCFunction) _wrap_LaunchDefaultBrowser, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GetKeyState", (PyCFunction) _wrap_GetKeyState, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"WakeUpMainThread", (PyCFunction) _wrap_WakeUpMainThread, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"MutexGuiEnter", (PyCFunction) _wrap_MutexGuiEnter, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 957f027f68..43dc9907c4 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -372,6 +372,8 @@ DOT_DASH = _core_.DOT_DASH USER_DASH = _core_.USER_DASH TRANSPARENT = _core_.TRANSPARENT STIPPLE = _core_.STIPPLE +STIPPLE_MASK = _core_.STIPPLE_MASK +STIPPLE_MASK_OPAQUE = _core_.STIPPLE_MASK_OPAQUE BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH diff --git a/wxPython/src/msw/_core_wrap.cpp b/wxPython/src/msw/_core_wrap.cpp index ed38974dbc..6d96a18b9a 100644 --- a/wxPython/src/msw/_core_wrap.cpp +++ b/wxPython/src/msw/_core_wrap.cpp @@ -48672,6 +48672,12 @@ SWIGEXPORT(void) SWIG_init(void) { { PyDict_SetItemString(d,"STIPPLE", SWIG_From_int((int)(wxSTIPPLE))); } + { + PyDict_SetItemString(d,"STIPPLE_MASK", SWIG_From_int((int)(wxSTIPPLE_MASK))); + } + { + PyDict_SetItemString(d,"STIPPLE_MASK_OPAQUE", SWIG_From_int((int)(wxSTIPPLE_MASK_OPAQUE))); + } { PyDict_SetItemString(d,"BDIAGONAL_HATCH", SWIG_From_int((int)(wxBDIAGONAL_HATCH))); } diff --git a/wxPython/src/msw/_gdi.py b/wxPython/src/msw/_gdi.py index 016d34c4fe..676bb5bea8 100644 --- a/wxPython/src/msw/_gdi.py +++ b/wxPython/src/msw/_gdi.py @@ -520,6 +520,16 @@ class BrushPtr(Brush): self.__class__ = Brush _gdi_.Brush_swigregister(BrushPtr) +def BrushFromBitmap(*args, **kwargs): + """ + BrushFromBitmap(Bitmap stippleBitmap) -> Brush + + Constructs a stippled brush using a bitmap. + """ + val = _gdi_.new_BrushFromBitmap(*args, **kwargs) + val.thisown = 1 + return val + class Bitmap(GDIObject): """ The wx.Bitmap class encapsulates the concept of a platform-dependent diff --git a/wxPython/src/msw/_gdi_wrap.cpp b/wxPython/src/msw/_gdi_wrap.cpp index 3de1de56ee..a962cac27e 100644 --- a/wxPython/src/msw/_gdi_wrap.cpp +++ b/wxPython/src/msw/_gdi_wrap.cpp @@ -3706,6 +3706,39 @@ static PyObject *_wrap_new_Brush(PyObject *, PyObject *args, PyObject *kwargs) { } +static PyObject *_wrap_new_BrushFromBitmap(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxBitmap *arg1 = 0 ; + wxBrush *result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "stippleBitmap", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_BrushFromBitmap",kwnames,&obj0)) goto fail; + { + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxBitmap, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + if (arg1 == NULL) { + SWIG_null_ref("wxBitmap"); + } + if (SWIG_arg_fail(1)) SWIG_fail; + } + { + if (!wxPyCheckForApp()) SWIG_fail; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxBrush *)new wxBrush((wxBitmap const &)*arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxBrush, 1); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_delete_Brush(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxBrush *arg1 = (wxBrush *) 0 ; @@ -21470,6 +21503,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Pen___ne__", (PyCFunction) _wrap_Pen___ne__, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Pen_swigregister", Pen_swigregister, METH_VARARGS, NULL}, { (char *)"new_Brush", (PyCFunction) _wrap_new_Brush, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"new_BrushFromBitmap", (PyCFunction) _wrap_new_BrushFromBitmap, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"delete_Brush", (PyCFunction) _wrap_delete_Brush, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Brush_SetColour", (PyCFunction) _wrap_Brush_SetColour, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Brush_SetStyle", (PyCFunction) _wrap_Brush_SetStyle, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index cca3a2664c..5021d323f1 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -554,6 +554,16 @@ def GetTopLevelParent(*args, **kwargs): """GetTopLevelParent(Window win) -> Window""" return _misc_.GetTopLevelParent(*args, **kwargs) +def LaunchDefaultBrowser(*args, **kwargs): + """ + LaunchDefaultBrowser(String url) -> bool + + Launches the user's default browser and tells it to open the location + at ``url``. Returns ``True`` if the application was successfully + launched. + """ + return _misc_.LaunchDefaultBrowser(*args, **kwargs) + def GetKeyState(*args, **kwargs): """ GetKeyState(int key) -> bool diff --git a/wxPython/src/msw/_misc_wrap.cpp b/wxPython/src/msw/_misc_wrap.cpp index f58232461c..dbdd100e07 100644 --- a/wxPython/src/msw/_misc_wrap.cpp +++ b/wxPython/src/msw/_misc_wrap.cpp @@ -6007,6 +6007,46 @@ static PyObject *_wrap_GetTopLevelParent(PyObject *, PyObject *args, PyObject *k } +static PyObject *_wrap_LaunchDefaultBrowser(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxString *arg1 = 0 ; + bool result; + bool temp1 = false ; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "url", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:LaunchDefaultBrowser",kwnames,&obj0)) goto fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = true; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)wxLaunchDefaultBrowser((wxString const &)*arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + { + if (temp1) + delete arg1; + } + return resultobj; + fail: + { + if (temp1) + delete arg1; + } + return NULL; +} + + static PyObject *_wrap_GetKeyState(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxKeyCode arg1 ; @@ -31554,6 +31594,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"GenericFindWindowAtPoint", (PyCFunction) _wrap_GenericFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"FindWindowAtPoint", (PyCFunction) _wrap_FindWindowAtPoint, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GetTopLevelParent", (PyCFunction) _wrap_GetTopLevelParent, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"LaunchDefaultBrowser", (PyCFunction) _wrap_LaunchDefaultBrowser, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GetKeyState", (PyCFunction) _wrap_GetKeyState, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"WakeUpMainThread", (PyCFunction) _wrap_WakeUpMainThread, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"MutexGuiEnter", (PyCFunction) _wrap_MutexGuiEnter, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/wxPython/_core.py b/wxPython/wxPython/_core.py index a7d6af7009..2b8517bd44 100644 --- a/wxPython/wxPython/_core.py +++ b/wxPython/wxPython/_core.py @@ -318,6 +318,8 @@ wxDOT_DASH = wx._core.DOT_DASH wxUSER_DASH = wx._core.USER_DASH wxTRANSPARENT = wx._core.TRANSPARENT wxSTIPPLE = wx._core.STIPPLE +wxSTIPPLE_MASK = wx._core.STIPPLE_MASK +wxSTIPPLE_MASK_OPAQUE = wx._core.STIPPLE_MASK_OPAQUE wxBDIAGONAL_HATCH = wx._core.BDIAGONAL_HATCH wxCROSSDIAG_HATCH = wx._core.CROSSDIAG_HATCH wxFDIAGONAL_HATCH = wx._core.FDIAGONAL_HATCH diff --git a/wxPython/wxPython/_gdi.py b/wxPython/wxPython/_gdi.py index 0e09dad35d..d2d8e834a1 100644 --- a/wxPython/wxPython/_gdi.py +++ b/wxPython/wxPython/_gdi.py @@ -31,6 +31,7 @@ wxPen = wx._gdi.Pen wxPenPtr = wx._gdi.PenPtr wxBrush = wx._gdi.Brush wxBrushPtr = wx._gdi.BrushPtr +wxBrushFromBitmap = wx._gdi.BrushFromBitmap wxBitmap = wx._gdi.Bitmap wxBitmapPtr = wx._gdi.BitmapPtr wxEmptyBitmap = wx._gdi.EmptyBitmap diff --git a/wxPython/wxPython/_misc.py b/wxPython/wxPython/_misc.py index b94462ffa1..6ac4e858c0 100644 --- a/wxPython/wxPython/_misc.py +++ b/wxPython/wxPython/_misc.py @@ -189,6 +189,7 @@ wxGetActiveWindow = wx._misc.GetActiveWindow wxGenericFindWindowAtPoint = wx._misc.GenericFindWindowAtPoint wxFindWindowAtPoint = wx._misc.FindWindowAtPoint wxGetTopLevelParent = wx._misc.GetTopLevelParent +wxLaunchDefaultBrowser = wx._misc.LaunchDefaultBrowser wxGetKeyState = wx._misc.GetKeyState wxWakeUpMainThread = wx._misc.WakeUpMainThread wxMutexGuiEnter = wx._misc.MutexGuiEnter -- 2.45.2