X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9bcdb6310e16f4248574c0115efa4989035eb391..5f2502393e042e6e2c871ff94b7ccaf7a78b264d:/wxPython/src/_bitmap.i diff --git a/wxPython/src/_bitmap.i b/wxPython/src/_bitmap.i index 86edf04d2a..f98e9daa7c 100644 --- a/wxPython/src/_bitmap.i +++ b/wxPython/src/_bitmap.i @@ -17,7 +17,8 @@ %} -// Turn off the aquisition of the Global Interpreter Lock for this file +// Turn off the aquisition of the Global Interpreter Lock for the classes and +// functions in this file %threadWrapperOff //--------------------------------------------------------------------------- @@ -178,8 +179,9 @@ bit depths, the behaviour is platform dependent.", "", } #endif - bool Ok(); - + bool IsOk(); + %pythoncode { Ok = IsOk } + DocDeclStr( int , GetWidth(), "Gets the width of the bitmap in pixels.", ""); @@ -306,12 +308,21 @@ the ``type`` parameter.", ""); #endif #endif - %pythoncode { def __nonzero__(self): return self.Ok() } + %pythoncode { def __nonzero__(self): return self.IsOk() } %extend { bool __eq__(const wxBitmap* other) { return other ? (*self == *other) : false; } bool __ne__(const wxBitmap* other) { return other ? (*self != *other) : true; } } + + %property(Depth, GetDepth, SetDepth, doc="See `GetDepth` and `SetDepth`"); + %property(Height, GetHeight, SetHeight, doc="See `GetHeight` and `SetHeight`"); + %property(Mask, GetMask, SetMask, doc="See `GetMask` and `SetMask`"); + %property(Palette, GetPalette, doc="See `GetPalette`"); + %property(Size, GetSize, SetSize, doc="See `GetSize` and `SetSize`"); + %property(SubBitmap, GetSubBitmap, doc="See `GetSubBitmap`"); + %property(Width, GetWidth, SetWidth, doc="See `GetWidth` and `SetWidth`"); + }; @@ -523,6 +534,11 @@ public: // the distance between two rows int GetRowStride() const { return m_stride; } + %property(Height, GetHeight, doc="See `GetHeight`"); + %property(Origin, GetOrigin, doc="See `GetOrigin`"); + %property(RowStride, GetRowStride, doc="See `GetRowStride`"); + %property(Size, GetSize, doc="See `GetSize`"); + %property(Width, GetWidth, doc="See `GetWidth`"); }; @@ -588,6 +604,8 @@ public: pixels.nextPixel() pixels.MoveTo(self, 0, y) } + + %property(Pixels, GetPixels, doc="See `GetPixels`"); }; @@ -729,7 +747,7 @@ passed then BLACK is used. %extend { wxMask(const wxBitmap& bitmap, const wxColour& colour = wxNullColour) { - if ( !colour.Ok() ) + if ( !colour.IsOk() ) return new wxMask(bitmap, *wxBLACK); else return new wxMask(bitmap, colour); @@ -743,4 +761,6 @@ passed then BLACK is used. //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- + +// Turn GIL acquisition back on. %threadWrapperOn