Author: manolo
Date: 2012-05-11 08:53:59 -0700 (Fri, 11 May 2012)
New Revision: 9482
Log:
FLTK1 compatibility: make the Fl_Pixmap constructors use the intermediate 
fltk3::Pixmap_I class.

Modified:
   branches/branch-3.0/include/FL/Fl_Pixmap.H
   branches/branch-3.0/include/fltk3/Wrapper.h

Modified: branches/branch-3.0/include/FL/Fl_Pixmap.H
===================================================================
--- branches/branch-3.0/include/FL/Fl_Pixmap.H  2012-05-11 12:19:04 UTC (rev 
9481)
+++ branches/branch-3.0/include/FL/Fl_Pixmap.H  2012-05-11 15:53:59 UTC (rev 
9482)
@@ -33,7 +33,7 @@
 #include "Fl_Image.H"
 
 FLTK3_WRAPPER_INTERFACE_BEGIN(Fl_Pixmap, Pixmap)
-FLTK3_WRAPPER_INTERFACE_IMAGE(Fl_Pixmap, Pixmap)
+FLTK3_WRAPPER_INTERFACE_PIXMAP(Fl_Pixmap, Pixmap)
 FLTK3_WRAPPER_INTERFACE_END()
 
 class FL_EXPORT Fl_Pixmap : public Fl_Image {
@@ -51,22 +51,22 @@
   Fl_Pixmap() {}
 
   explicit Fl_Pixmap(char * const * D) {
-    _p = new fltk3::Pixmap(D);
+    _p = new fltk3::Pixmap_I((const uchar * const *)D);
     _p->wrapper(this);
   }
   
   explicit Fl_Pixmap(uchar * const * D) {
-    _p = new fltk3::Pixmap(D);
+    _p = new fltk3::Pixmap_I((const uchar * const *)D);
     _p->wrapper(this);
   }
   
   explicit Fl_Pixmap(const char * const * D) {
-    _p = new fltk3::Pixmap(D);
+    _p = new fltk3::Pixmap_I((const uchar * const *)D);
     _p->wrapper(this);
   }
   
   explicit Fl_Pixmap(const uchar * const * D) {
-    _p = new fltk3::Pixmap(D);
+    _p = new fltk3::Pixmap_I(D);
     _p->wrapper(this);
   }
   

Modified: branches/branch-3.0/include/fltk3/Wrapper.h
===================================================================
--- branches/branch-3.0/include/fltk3/Wrapper.h 2012-05-11 12:19:04 UTC (rev 
9481)
+++ branches/branch-3.0/include/fltk3/Wrapper.h 2012-05-11 15:53:59 UTC (rev 
9482)
@@ -265,6 +265,10 @@
 #define FLTK3_WRAPPER_INTERFACE_IMAGE_CTOR_TILED(type3) \
   type3##_I(fltk3::Image* bits, int W, int H) : type3(bits, W, H) { } 
 
+#define FLTK3_WRAPPER_INTERFACE_IMAGE_CTOR_PIXMAP(type3) \
+  type3##_I(const uchar * const * D) : type3(D) { } 
+
+
 #define FLTK3_WRAPPER_INTERFACE_IMAGE_BODY(type3) \
   Image *copy(int W, int H) { \
   FLTK3_IMAGE_VCALLS_WRAPPER_RET(Image *, copy(W, H), CopyWH) \
@@ -303,6 +307,10 @@
   FLTK3_WRAPPER_INTERFACE_IMAGE_CTOR_3ARGS(type3) \
   FLTK3_WRAPPER_INTERFACE_IMAGE_BODY(type3)
 
+#define FLTK3_WRAPPER_INTERFACE_PIXMAP(type1, type3) \
+  FLTK3_WRAPPER_INTERFACE_IMAGE_CTOR_PIXMAP(type3) \
+  FLTK3_WRAPPER_INTERFACE_IMAGE_BODY(type3)
+
 #define FLTK3_WRAPPER_INTERFACE_TILED(type1, type3) \
   FLTK3_WRAPPER_INTERFACE_IMAGE_CTOR_TILED(type3) \
   FLTK3_WRAPPER_INTERFACE_IMAGE_BODY(type3)

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to