]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/image.i
A few changes to match header changes and let wxPython compile again
[wxWidgets.git] / wxPython / src / image.i
index e6d5614a7cd47b9aa5681f46ff1cc02076476ae2..04d1bb5d6251a0b24ccc7f06b4e023d2c81374f0 100644 (file)
@@ -170,17 +170,15 @@ public:
 };
 
 // Alternate constructors
-%new wxImage* wxNullImage();
-%new wxImage* wxEmptyImage(int width, int height);
+%new wxImage* wxEmptyImage(int width=0, int height=0);
 %new wxImage* wxImageFromMime(const wxString& name, const wxString& mimetype);
 %new wxImage* wxImageFromBitmap(const wxBitmap &bitmap);
 %{
-    wxImage* wxNullImage() {
-        return new wxImage;
-    }
-
-    wxImage* wxEmptyImage(int width, int height) {
-        return new wxImage(width, height);
+    wxImage* wxEmptyImage(int width=0, int height=0) {
+        if (width == 0 && height == 0)
+            return new wxImage;
+        else
+            return new wxImage(width, height);
     }
 
     wxImage* wxImageFromMime(const wxString& name, const wxString& mimetype) {
@@ -192,8 +190,22 @@ public:
     }
 %}
 
-
 void wxInitAllImageHandlers();
 
+
+%readonly
+%{
+#if 0
+%}
+
+extern wxImage    wxNullImage;
+
+%readwrite
+%{
+#endif
+%}
+
+
+
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------