X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f9bf356bd13606500a2c91029914f85e01e5d8cd..5ec5b47f47d626c417486e2ce2d167e44b3b66b6:/wxPython/src/msw/_core.py?ds=sidebyside diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 6b80b9fb50..f9cf4a8438 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -2070,7 +2070,7 @@ class FileSystemHandler(CPPFileSystemHandler): def __init__(self, *args, **kwargs): """__init__(self) -> FileSystemHandler""" _core_.FileSystemHandler_swiginit(self,_core_.new_FileSystemHandler(*args, **kwargs)) - self._setCallbackInfo(self, FileSystemHandler) + FileSystemHandler._setCallbackInfo(self, self, FileSystemHandler) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -3769,7 +3769,7 @@ class EvtHandler(Object): def _setOORInfo(*args, **kwargs): """_setOORInfo(self, PyObject _self, bool incref=True)""" val = _core_.EvtHandler__setOORInfo(*args, **kwargs) - args[0].thisown = 0 + args[0].this.own(False) return val def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): @@ -7007,13 +7007,12 @@ class PyApp(EvtHandler): Create a new application object, starting the bootstrap process. """ _core_.PyApp_swiginit(self,_core_.new_PyApp(*args, **kwargs)) - self._setCallbackInfo(self, PyApp, False) - self._setOORInfo(self, False) + self._setOORInfo(self, False);PyApp._setCallbackInfo(self, self, PyApp) __swig_destroy__ = _core_.delete_PyApp __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref=False)""" return _core_.PyApp__setCallbackInfo(*args, **kwargs) def GetAppName(*args, **kwargs): @@ -7248,7 +7247,7 @@ class PyApp(EvtHandler): def SetUseBestVisual(*args, **kwargs): """ - SetUseBestVisual(self, bool flag) + SetUseBestVisual(self, bool flag, bool forceTrueColour=False) Set whether the app should try to use the best available visual on systems where more than one is available, (Sun, SGI, XFree86 4, etc.) @@ -8801,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 @@ -8914,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) @@ -10336,7 +10352,7 @@ class Window(EvtHandler): if hasattr(self, '_setOORInfo'): self._setOORInfo(self) if hasattr(self, '_setCallbackInfo'): - self._setCallbackInfo(self, self.__class__) + self._setCallbackInfo(self, pre.__class__) def SendSizeEvent(self): self.GetEventHandler().ProcessEvent(wx.SizeEvent((-1,-1))) @@ -10605,12 +10621,10 @@ class PyValidator(Validator): def __init__(self, *args, **kwargs): """__init__(self) -> PyValidator""" _core_.PyValidator_swiginit(self,_core_.new_PyValidator(*args, **kwargs)) - - self._setCallbackInfo(self, PyValidator, 1) - self._setOORInfo(self) + self._setOORInfo(self);PyValidator._setCallbackInfo(self, self, PyValidator) def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=1)""" return _core_.PyValidator__setCallbackInfo(*args, **kwargs) _core_.PyValidator_swigregister(PyValidator) @@ -11381,7 +11395,7 @@ class ItemContainer(object): def Insert(*args, **kwargs): """ - Insert(self, String item, unsigned int pos, PyObject clientData=None) -> int + Insert(self, String item, int pos, PyObject clientData=None) -> int Insert an item into the control before the item at the ``pos`` index, optionally associating some data object with the item. @@ -11398,7 +11412,7 @@ class ItemContainer(object): def Delete(*args, **kwargs): """ - Delete(self, unsigned int n) + Delete(self, int n) Deletes the item at the zero-based index 'n' from the control. Note that it is an error (signalled by a `wx.PyAssertionError` exception if @@ -11409,7 +11423,7 @@ class ItemContainer(object): def GetClientData(*args, **kwargs): """ - GetClientData(self, unsigned int n) -> PyObject + GetClientData(self, int n) -> PyObject Returns the client data associated with the given item, (if any.) """ @@ -11417,7 +11431,7 @@ class ItemContainer(object): def SetClientData(*args, **kwargs): """ - SetClientData(self, unsigned int n, PyObject clientData) + SetClientData(self, int n, PyObject clientData) Associate the given client data with the item at position n. """ @@ -11425,7 +11439,7 @@ class ItemContainer(object): def GetCount(*args, **kwargs): """ - GetCount(self) -> unsigned int + GetCount(self) -> int Returns the number of items in the control. """ @@ -11441,7 +11455,7 @@ class ItemContainer(object): def GetString(*args, **kwargs): """ - GetString(self, unsigned int n) -> String + GetString(self, int n) -> String Returns the label of the item with the given index. """ @@ -11453,7 +11467,7 @@ class ItemContainer(object): def SetString(*args, **kwargs): """ - SetString(self, unsigned int n, String s) + SetString(self, int n, String s) Sets the label for the given item. """ @@ -12436,7 +12450,7 @@ class PySizer(Sizer): class. """ _core_.PySizer_swiginit(self,_core_.new_PySizer(*args, **kwargs)) - self._setCallbackInfo(self, PySizer);self._setOORInfo(self) + self._setOORInfo(self);PySizer._setCallbackInfo(self, self, PySizer) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -13699,7 +13713,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()