]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/_core.py
wxDEFAULT_STATUSBAR_STYLE
[wxWidgets.git] / wxPython / src / msw / _core.py
index 466d17fe0beaff5178e9d59670ce09dacdf79fc1..065a985f493dcf8a4d83c7133ed047a5db690010 100644 (file)
@@ -85,6 +85,7 @@ SIMPLE_BORDER = _core_.SIMPLE_BORDER
 STATIC_BORDER = _core_.STATIC_BORDER
 TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
 NO_BORDER = _core_.NO_BORDER
 STATIC_BORDER = _core_.STATIC_BORDER
 TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
 NO_BORDER = _core_.NO_BORDER
+DEFAULT_CONTROL_BORDER = _core_.DEFAULT_CONTROL_BORDER
 TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
 WANTS_CHARS = _core_.WANTS_CHARS
 POPUP_WINDOW = _core_.POPUP_WINDOW
 TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
 WANTS_CHARS = _core_.WANTS_CHARS
 POPUP_WINDOW = _core_.POPUP_WINDOW
@@ -2033,6 +2034,9 @@ def MemoryFSHandler_RemoveFile(*args, **kwargs):
     """MemoryFSHandler_RemoveFile(String filename)"""
     return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
 
     """MemoryFSHandler_RemoveFile(String filename)"""
     return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
 
+IMAGE_ALPHA_TRANSPARENT = _core_.IMAGE_ALPHA_TRANSPARENT
+IMAGE_ALPHA_THRESHOLD = _core_.IMAGE_ALPHA_THRESHOLD
+IMAGE_ALPHA_OPAQUE = _core_.IMAGE_ALPHA_OPAQUE
 #---------------------------------------------------------------------------
 
 class ImageHandler(Object):
 #---------------------------------------------------------------------------
 
 class ImageHandler(Object):
@@ -2241,6 +2245,15 @@ class Image(Object):
         """
         return _core_.Image_InitAlpha(*args, **kwargs)
 
         """
         return _core_.Image_InitAlpha(*args, **kwargs)
 
+    def IsTransparent(*args, **kwargs):
+        """
+        IsTransparent(self, int x, int y, unsigned char threshold=IMAGE_ALPHA_THRESHOLD) -> bool
+
+        Returns True if this pixel is masked or has an alpha value less than
+        the spcified threshold.
+        """
+        return _core_.Image_IsTransparent(*args, **kwargs)
+
     def FindFirstUnusedColour(*args, **kwargs):
         """
         FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
     def FindFirstUnusedColour(*args, **kwargs):
         """
         FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
@@ -2253,7 +2266,7 @@ class Image(Object):
 
     def ConvertAlphaToMask(*args, **kwargs):
         """
 
     def ConvertAlphaToMask(*args, **kwargs):
         """
-        ConvertAlphaToMask(self, byte threshold=128) -> bool
+        ConvertAlphaToMask(self, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
 
         If the image has alpha channel, this method converts it to mask. All pixels
         with alpha value less than ``threshold`` are replaced with mask colour and the
 
         If the image has alpha channel, this method converts it to mask. All pixels
         with alpha value less than ``threshold`` are replaced with mask colour and the
@@ -2355,27 +2368,58 @@ class Image(Object):
         return _core_.Image_Paste(*args, **kwargs)
 
     def GetData(*args, **kwargs):
         return _core_.Image_Paste(*args, **kwargs)
 
     def GetData(*args, **kwargs):
-        """GetData(self) -> PyObject"""
+        """
+        GetData(self) -> PyObject
+
+        Returns a string containing a copy of the RGB bytes of the image.
+        """
         return _core_.Image_GetData(*args, **kwargs)
 
     def SetData(*args, **kwargs):
         return _core_.Image_GetData(*args, **kwargs)
 
     def SetData(*args, **kwargs):
-        """SetData(self, PyObject data)"""
+        """
+        SetData(self, buffer data)
+
+        Resets the Image's RGB data from a buffer of RGB bytes.  Accepts
+        either a string or a buffer object holding the data and the length of
+        the data must be width*height*3.
+        """
         return _core_.Image_SetData(*args, **kwargs)
 
     def GetDataBuffer(*args, **kwargs):
         return _core_.Image_SetData(*args, **kwargs)
 
     def GetDataBuffer(*args, **kwargs):
-        """GetDataBuffer(self) -> PyObject"""
+        """
+        GetDataBuffer(self) -> PyObject
+
+        Returns a writable Python buffer object that is pointing at the RGB
+        image data buffer inside the wx.Image.
+        """
         return _core_.Image_GetDataBuffer(*args, **kwargs)
 
     def SetDataBuffer(*args, **kwargs):
         return _core_.Image_GetDataBuffer(*args, **kwargs)
 
     def SetDataBuffer(*args, **kwargs):
-        """SetDataBuffer(self, PyObject data)"""
+        """
+        SetDataBuffer(self, buffer data)
+
+        Sets the internal image data pointer to point at a Python buffer
+        object.  This can save a copy of the data but you must ensure that the
+        buffer object lives longer than the wx.Image does.
+        """
         return _core_.Image_SetDataBuffer(*args, **kwargs)
 
     def GetAlphaData(*args, **kwargs):
         return _core_.Image_SetDataBuffer(*args, **kwargs)
 
     def GetAlphaData(*args, **kwargs):
-        """GetAlphaData(self) -> PyObject"""
+        """
+        GetAlphaData(self) -> PyObject
+
+        Returns a string containing a copy of the alpha bytes of the image.
+        """
         return _core_.Image_GetAlphaData(*args, **kwargs)
 
     def SetAlphaData(*args, **kwargs):
         return _core_.Image_GetAlphaData(*args, **kwargs)
 
     def SetAlphaData(*args, **kwargs):
-        """SetAlphaData(self, PyObject data)"""
+        """
+        SetAlphaData(self, buffer alpha)
+
+        Resets the Image's alpha data from a buffer of bytes.  Accepts either
+        a string or a buffer object holding the data and the length of the
+        data must be width*height.
+        """
         return _core_.Image_SetAlphaData(*args, **kwargs)
 
     def GetAlphaBuffer(*args, **kwargs):
         return _core_.Image_SetAlphaData(*args, **kwargs)
 
     def GetAlphaBuffer(*args, **kwargs):
@@ -2383,7 +2427,7 @@ class Image(Object):
         return _core_.Image_GetAlphaBuffer(*args, **kwargs)
 
     def SetAlphaBuffer(*args, **kwargs):
         return _core_.Image_GetAlphaBuffer(*args, **kwargs)
 
     def SetAlphaBuffer(*args, **kwargs):
-        """SetAlphaBuffer(self, PyObject data)"""
+        """SetAlphaBuffer(self, buffer alpha)"""
         return _core_.Image_SetAlphaBuffer(*args, **kwargs)
 
     def SetMaskColour(*args, **kwargs):
         return _core_.Image_SetAlphaBuffer(*args, **kwargs)
 
     def SetMaskColour(*args, **kwargs):
@@ -2528,25 +2572,46 @@ def ImageFromStreamMime(*args, **kwargs):
     return val
 
 def EmptyImage(*args, **kwargs):
     return val
 
 def EmptyImage(*args, **kwargs):
-    """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
+    """
+    EmptyImage(int width=0, int height=0, bool clear=True) -> Image
+
+    Construct an empty image of a given size, optionally setting all
+    pixels to black.
+    """
     val = _core_.new_EmptyImage(*args, **kwargs)
     val.thisown = 1
     return val
 
 def ImageFromBitmap(*args, **kwargs):
     val = _core_.new_EmptyImage(*args, **kwargs)
     val.thisown = 1
     return val
 
 def ImageFromBitmap(*args, **kwargs):
-    """ImageFromBitmap(Bitmap bitmap) -> Image"""
+    """
+    ImageFromBitmap(Bitmap bitmap) -> Image
+
+    Construct an Image from a `wx.Bitmap`.
+    """
     val = _core_.new_ImageFromBitmap(*args, **kwargs)
     val.thisown = 1
     return val
 
 def ImageFromData(*args, **kwargs):
     val = _core_.new_ImageFromBitmap(*args, **kwargs)
     val.thisown = 1
     return val
 
 def ImageFromData(*args, **kwargs):
-    """ImageFromData(int width, int height, unsigned char data) -> Image"""
+    """
+    ImageFromData(int width, int height, buffer data) -> Image
+
+    Construct an Image from a buffer of RGB bytes.  Accepts either a
+    string or a buffer object holding the data and the length of the data
+    must be width*height*3.
+    """
     val = _core_.new_ImageFromData(*args, **kwargs)
     val.thisown = 1
     return val
 
 def ImageFromDataWithAlpha(*args, **kwargs):
     val = _core_.new_ImageFromData(*args, **kwargs)
     val.thisown = 1
     return val
 
 def ImageFromDataWithAlpha(*args, **kwargs):
-    """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
+    """
+    ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image
+
+    Construct an Image from a buffer of RGB bytes with an Alpha channel.
+    Accepts either a string or a buffer object holding the data and the
+    length of the data must be width*height*3.
+    """
     val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
     val.thisown = 1
     return val
     val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
     val.thisown = 1
     return val