X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70b7a5fe0cb26e15c52bcdeb730f43eb3838360f..3a9becbd5439254a77e7dbc0278d80117a397264:/wxPython/src/msw/_misc.py diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index cca3a2664c..c932576310 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -534,6 +534,15 @@ def SetCursor(*args, **kwargs): """SetCursor(Cursor cursor)""" return _misc_.SetCursor(*args, **kwargs) +def GetXDisplay(*args, **kwargs): + """ + GetXDisplay() -> void + + Returns a swigified pointer to the X11 display. Returns None on + other platforms. + """ + return _misc_.GetXDisplay(*args, **kwargs) + def BeginBusyCursor(*args, **kwargs): """BeginBusyCursor(Cursor cursor=wxHOURGLASS_CURSOR)""" return _misc_.BeginBusyCursor(*args, **kwargs) @@ -554,6 +563,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 @@ -1095,7 +1114,7 @@ class Timer(_core.EvtHandler): """GetId(self) -> int""" return _misc_.Timer_GetId(*args, **kwargs) - def Destroy(): + def Destroy(self): """NO-OP: Timers must be destroyed by normal refrence counting""" pass @@ -2628,6 +2647,7 @@ ART_COPY = cvar.ART_COPY ART_CUT = cvar.ART_CUT ART_PASTE = cvar.ART_PASTE ART_DELETE = cvar.ART_DELETE +ART_NEW = cvar.ART_NEW ART_UNDO = cvar.ART_UNDO ART_REDO = cvar.ART_REDO ART_QUIT = cvar.ART_QUIT @@ -5251,6 +5271,18 @@ class DropSourcePtr(DropSource): self.__class__ = DropSource _misc_.DropSource_swigregister(DropSourcePtr) +def DROP_ICON(filename): + """ + Returns either a `wx.Cursor` or `wx.Icon` created from the image file + ``filename``. This function is useful with the `wx.DropSource` class + which, depending on platform accepts either a icon or a cursor. + """ + img = wx.Image(filename) + if wx.Platform == '__WXGTK__': + return wx.IconFromBitmap(wx.BitmapFromImage(img)) + else: + return wx.CursorFromImage(img) + class DropTarget(object): """Proxy of C++ DropTarget class""" def __repr__(self):