X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab1f7d2aa9cb1857cf87e105ebbd36a92676bbde..db679b8c836e69c111cdc31e62cf92cebe4f938f:/wxPython/src/_bitmap.i diff --git a/wxPython/src/_bitmap.i b/wxPython/src/_bitmap.i index 88e91c0d5e..83fa392e75 100644 --- a/wxPython/src/_bitmap.i +++ b/wxPython/src/_bitmap.i @@ -128,7 +128,9 @@ that a colour reduction may have to take place.", "", %extend { DocStr(wxBitmap(PyObject* listOfStrings), "Construct a Bitmap from a list of strings formatted as XPM data.", ""); - %name(BitmapFromXPMData) wxBitmap(PyObject* listOfStrings) { + + %RenameCtor(BitmapFromXPMData, wxBitmap(PyObject* listOfStrings)) + { char** cArray = NULL; wxBitmap* bmp; @@ -145,7 +147,9 @@ that a colour reduction may have to take place.", "", function for monochrome bitmaps (depth 1) in portable programs: in this case the bits parameter should contain an XBM image. For other bit depths, the behaviour is platform dependent.", ""); - %name(BitmapFromBits) wxBitmap(PyObject* bits, int width, int height, int depth=1 ) { + + %RenameCtor(BitmapFromBits, wxBitmap(PyObject* bits, int width, int height, int depth=1 )) + { char* buf; int length; PyString_AsStringAndSize(bits, &buf, &length); @@ -154,10 +158,6 @@ bit depths, the behaviour is platform dependent.", ""); } -#ifdef __WXMSW__ - void SetPalette(wxPalette& palette); -#endif - // wxGDIImage methods #ifdef __WXMSW__ long GetHandle(); @@ -208,7 +208,8 @@ file or explpicitly set for the bitmap. :see: `SetMask`, `wx.Mask` ", ""); - + + // MSW only? wxBitmap GetMaskBitmap() const; DocDeclStr( virtual void , SetMask(wxMask* mask), @@ -249,8 +250,8 @@ the ``type`` parameter.", ""); -#if wxUSE_PALETTE virtual wxPalette *GetPalette() const; +#ifdef __WXMSW__ virtual void SetPalette(const wxPalette& palette); #endif @@ -289,8 +290,8 @@ the ``type`` parameter.", ""); %pythoncode { def __nonzero__(self): return self.Ok() } %extend { - bool __eq__(const wxBitmap* other) { return other ? (*self == *other) : False; } - bool __ne__(const wxBitmap* other) { return other ? (*self != *other) : True; } + bool __eq__(const wxBitmap* other) { return other ? (*self == *other) : false; } + bool __ne__(const wxBitmap* other) { return other ? (*self != *other) : true; } } };