X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9416aa89ca06d0fb20b1002e026d2c7ac7aa6a17..0e980f91092ded629a7b014ff0d2238b1c8940c5:/wxPython/src/gdi.i

diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i
index 159bea062e..192668dbab 100644
--- a/wxPython/src/gdi.i
+++ b/wxPython/src/gdi.i
@@ -105,11 +105,12 @@ public:
 %new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1);
 %new wxBitmap* wxBitmapFromXPMData(PyObject* listOfStrings);
 %new wxBitmap* wxBitmapFromIcon(const wxIcon& icon);
+%new wxBitmap* wxBitmapFromBits(char* bits, int width, int height, int depth = 1 );
 
-#ifdef __WXMSW__
-%new wxBitmap* wxBitmapFromData(PyObject* data, long type,
-                                int width, int height, int depth = 1);
-#endif
+//  #ifdef __WXMSW__
+//  %new wxBitmap* wxBitmapFromData(PyObject* data, long type,
+//                                  int width, int height, int depth = 1);
+//  #endif
 
 
 
@@ -137,6 +138,7 @@ public:
         return cArray;
     }
 
+
     wxBitmap* wxBitmapFromXPMData(PyObject* listOfStrings) {
         char**    cArray = NULL;
         wxBitmap* bmp;
@@ -155,18 +157,21 @@ public:
     }
 
 
+    wxBitmap* wxBitmapFromBits(char* bits, int width, int height, int depth = 1 ) {
+        return new wxBitmap(bits, width, height, depth);
+    }
 
-#ifdef __WXMSW__
-    wxBitmap* wxBitmapFromData(PyObject* data, long type,
-                               int width, int height, int depth = 1) {
-        if (! PyString_Check(data)) {
-            PyErr_SetString(PyExc_TypeError, "Expected string object");
-            return NULL;
-        }
 
-        return new wxBitmap((void*)PyString_AsString(data), type, width, height, depth);
-    }
-#endif
+//  #ifdef __WXMSW__
+//      wxBitmap* wxBitmapFromData(PyObject* data, long type,
+//                                 int width, int height, int depth = 1) {
+//          if (! PyString_Check(data)) {
+//              PyErr_SetString(PyExc_TypeError, "Expected string object");
+//              return NULL;
+//          }
+//          return new wxBitmap((void*)PyString_AsString(data), type, width, height, depth);
+//      }
+//  #endif
 %}
 
 //---------------------------------------------------------------------------
@@ -442,7 +447,7 @@ public:
     ~wxPen();
 
     int GetCap();
-    wxColour& GetColour();
+    wxColour GetColour();
 
     int GetJoin();
     int GetStyle();
@@ -482,7 +487,7 @@ public:
     wxBrush(const wxColour& colour, int style=wxSOLID);
     ~wxBrush();
 
-    wxColour& GetColour();
+    wxColour GetColour();
     wxBitmap * GetStipple();
     int GetStyle();
     bool Ok();
@@ -567,12 +572,12 @@ public:
     %name(GetSizeTuple)void GetSize(int* OUTPUT, int* OUTPUT);
     wxSize GetSize();
     wxSize GetSizeMM();
-    wxColour& GetTextBackground();
+    wxColour GetTextBackground();
     void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT);
     %name(GetFullTextExtent)void GetTextExtent(const wxString& string,
                        long *OUTPUT, long *OUTPUT, long *OUTPUT, long* OUTPUT,
                        const wxFont* font = NULL);
-    wxColour& GetTextForeground();
+    wxColour GetTextForeground();
     void GetUserScale(double *OUTPUT, double *OUTPUT);
     long LogicalToDeviceX(long x);
     long LogicalToDeviceXRel(long x);