]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_core.py
making sure we don't say we are visible while in destruction
[wxWidgets.git] / wxPython / src / gtk / _core.py
index 292e6c7ad9f7e59b07b450ffd7a6da8933487b19..832b1d6e85236e00e69f3f6f06fde521c5fe03a3 100644 (file)
@@ -1160,7 +1160,7 @@ class Rect(object):
         Inflate(self, int dx, int dy) -> Rect
 
         Increase the rectangle size by dx in x direction and dy in y
         Inflate(self, int dx, int dy) -> Rect
 
         Increase the rectangle size by dx in x direction and dy in y
-        direction. Both or one of) parameters may be negative to decrease the
+        direction. Both (or one of) parameters may be negative to decrease the
         rectangle size.
         """
         return _core_.Rect_Inflate(*args, **kwargs)
         rectangle size.
         """
         return _core_.Rect_Inflate(*args, **kwargs)
@@ -1170,7 +1170,7 @@ class Rect(object):
         Deflate(self, int dx, int dy) -> Rect
 
         Decrease the rectangle size by dx in x direction and dy in y
         Deflate(self, int dx, int dy) -> Rect
 
         Decrease the rectangle size by dx in x direction and dy in y
-        direction. Both or one of) parameters may be negative to increase the
+        direction. Both (or one of) parameters may be negative to increase the
         rectngle size. This method is the opposite of Inflate.
         """
         return _core_.Rect_Deflate(*args, **kwargs)
         rectngle size. This method is the opposite of Inflate.
         """
         return _core_.Rect_Deflate(*args, **kwargs)
@@ -1197,10 +1197,18 @@ class Rect(object):
         """
         Intersect(self, Rect rect) -> Rect
 
         """
         Intersect(self, Rect rect) -> Rect
 
-        Return the intersectsion of this rectangle and rect.
+        Returns the intersectsion of this rectangle and rect.
         """
         return _core_.Rect_Intersect(*args, **kwargs)
 
         """
         return _core_.Rect_Intersect(*args, **kwargs)
 
+    def Union(*args, **kwargs):
+        """
+        Union(self, Rect rect) -> Rect
+
+        Returns the union of this rectangle and rect.
+        """
+        return _core_.Rect_Union(*args, **kwargs)
+
     def __add__(*args, **kwargs):
         """
         __add__(self, Rect rect) -> Rect
     def __add__(*args, **kwargs):
         """
         __add__(self, Rect rect) -> Rect
@@ -2399,6 +2407,12 @@ def ImageFromData(*args, **kwargs):
     val.thisown = 1
     return val
 
     val.thisown = 1
     return val
 
+def ImageFromDataWithAlpha(*args, **kwargs):
+    """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
+    val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
+    val.thisown = 1
+    return val
+
 def Image_CanRead(*args, **kwargs):
     """Image_CanRead(String name) -> bool"""
     return _core_.Image_CanRead(*args, **kwargs)
 def Image_CanRead(*args, **kwargs):
     """Image_CanRead(String name) -> bool"""
     return _core_.Image_CanRead(*args, **kwargs)
@@ -2730,7 +2744,7 @@ class EvtHandler(Object):
         return _core_.EvtHandler_Disconnect(*args, **kwargs)
 
     def _setOORInfo(*args, **kwargs):
         return _core_.EvtHandler_Disconnect(*args, **kwargs)
 
     def _setOORInfo(*args, **kwargs):
-        """_setOORInfo(self, PyObject _self)"""
+        """_setOORInfo(self, PyObject _self, bool incref=True)"""
         return _core_.EvtHandler__setOORInfo(*args, **kwargs)
 
     def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
         return _core_.EvtHandler__setOORInfo(*args, **kwargs)
 
     def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
@@ -5160,6 +5174,24 @@ def GetApp(*args, **kwargs):
     Return a reference to the current wx.App object.
     """
     return _core_.GetApp(*args, **kwargs)
     Return a reference to the current wx.App object.
     """
     return _core_.GetApp(*args, **kwargs)
+
+def SetDefaultPyEncoding(*args, **kwargs):
+    """
+    SetDefaultPyEncoding(string encoding)
+
+    Sets the encoding that wxPython will use when it needs to convert a
+    Python string or unicode object to or from a wxString.
+    """
+    return _core_.SetDefaultPyEncoding(*args, **kwargs)
+
+def GetDefaultPyEncoding(*args, **kwargs):
+    """
+    GetDefaultPyEncoding() -> string
+
+    Gets the current encoding that wxPython will use when it needs to
+    convert a Python string or unicode object to or from a wxString.
+    """
+    return _core_.GetDefaultPyEncoding(*args, **kwargs)
 #----------------------------------------------------------------------
 
 class PyOnDemandOutputWindow:
 #----------------------------------------------------------------------
 
 class PyOnDemandOutputWindow:
@@ -10288,6 +10320,8 @@ class GridBagSizer(FlexGridSizer):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
+        self._setOORInfo(self)
+
     def Add(*args, **kwargs):
         """
         Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
     def Add(*args, **kwargs):
         """
         Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
@@ -10756,6 +10790,16 @@ if RELEASE_VERSION != _core_.RELEASE_VERSION:
 
 #----------------------------------------------------------------------------
 
 
 #----------------------------------------------------------------------------
 
+# Set the default string conversion encoding from the locale
+import locale
+default = locale.getdefaultlocale()[1]
+if default:
+    wx.SetDefaultPyEncoding(default)
+del default
+del locale
+
+#----------------------------------------------------------------------------
+
 class PyDeadObjectError(AttributeError):
     pass
 
 class PyDeadObjectError(AttributeError):
     pass
 
@@ -10843,7 +10887,7 @@ def CallAfter(callable, *args, **kw):
 
 class FutureCall:
     """
 
 class FutureCall:
     """
-    A convenience class for wx.Timer, that calls the given callable
+    A convenience class for `wx.Timer`, that calls the given callable
     object once after the given amount of milliseconds, passing any
     positional or keyword args.  The return value of the callable is
     availbale after it has been run with the `GetResult` method.
     object once after the given amount of milliseconds, passing any
     positional or keyword args.  The return value of the callable is
     availbale after it has been run with the `GetResult` method.