X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/15665b4790c94192130f032508de2b3b8c6a2c97..d48ae46b24b5c9e1e76bea82fbf6fe557fa3f087:/wxPython/src/mac/_core.py diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index 48fa5b8045..dbe7f46a8c 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -8800,6 +8800,14 @@ class Window(EvtHandler): """ return _core_.Window_GetVirtualSizeTuple(*args, **kwargs) + def GetWindowBorderSize(*args, **kwargs): + """ + GetWindowBorderSize(self) -> Size + + Return the size of the left/right and top/bottom borders. + """ + return _core_.Window_GetWindowBorderSize(*args, **kwargs) + def GetBestVirtualSize(*args, **kwargs): """ GetBestVirtualSize(self) -> Size @@ -8913,6 +8921,15 @@ class Window(EvtHandler): """ return _core_.Window_IsRetained(*args, **kwargs) + def ToggleWindowStyle(*args, **kwargs): + """ + ToggleWindowStyle(self, int flag) -> bool + + Turn the flag on if it had been turned off before and vice versa, + returns True if the flag is turned on by this function call. + """ + return _core_.Window_ToggleWindowStyle(*args, **kwargs) + def SetExtraStyle(*args, **kwargs): """ SetExtraStyle(self, long exStyle) @@ -13692,7 +13709,10 @@ if default == 'ascii': import locale import codecs try: - default = locale.getdefaultlocale()[1] + if hasattr(locale, 'getpreferredencoding'): + default = locale.getpreferredencoding() + else: + default = locale.getdefaultlocale()[1] codecs.lookup(default) except (ValueError, LookupError, TypeError): default = _sys.getdefaultencoding()