Blame wxGTK-2.8.12-char.patch

Dan Horák 8c6322
diff -up wxGTK-2.8.12/src/gtk/bdiag.xbm.char wxGTK-2.8.12/src/gtk/bdiag.xbm
Dan Horák 8c6322
--- wxGTK-2.8.12/src/gtk/bdiag.xbm.char	2011-03-22 13:19:01.000000000 +0100
Dan Horák 8c6322
+++ wxGTK-2.8.12/src/gtk/bdiag.xbm	2016-02-20 10:38:50.000000000 +0100
Dan Horák 8c6322
@@ -1,6 +1,6 @@
Dan Horák 8c6322
 #define bdiag_width 16
Dan Horák 8c6322
 #define bdiag_height 16
Dan Horák 8c6322
-static char bdiag_bits[] = {
Dan Horák 8c6322
+static unsigned char bdiag_bits[] = {
Dan Horák 8c6322
    0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04,
Dan Horák 8c6322
    0x02, 0x02, 0x01, 0x01, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10,
Dan Horák 8c6322
    0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01};
Dan Horák 8c6322
diff -up wxGTK-2.8.12/src/gtk/cdiag.xbm.char wxGTK-2.8.12/src/gtk/cdiag.xbm
Dan Horák 8c6322
--- wxGTK-2.8.12/src/gtk/cdiag.xbm.char	2011-03-22 13:19:01.000000000 +0100
Dan Horák 8c6322
+++ wxGTK-2.8.12/src/gtk/cdiag.xbm	2016-02-20 10:38:50.000000000 +0100
Dan Horák 8c6322
@@ -1,6 +1,6 @@
Dan Horák 8c6322
 #define cdiag_width 16
Dan Horák 8c6322
 #define cdiag_height 16
Dan Horák 8c6322
-static char cdiag_bits[] = {
Dan Horák 8c6322
+static unsigned char cdiag_bits[] = {
Dan Horák 8c6322
    0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24,
Dan Horák 8c6322
    0x42, 0x42, 0x81, 0x81, 0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18,
Dan Horák 8c6322
    0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0x81, 0x81};
Dan Horák 8c6322
diff -up wxGTK-2.8.12/src/gtk/cross.xbm.char wxGTK-2.8.12/src/gtk/cross.xbm
Dan Horák 8c6322
--- wxGTK-2.8.12/src/gtk/cross.xbm.char	2011-03-22 13:19:01.000000000 +0100
Dan Horák 8c6322
+++ wxGTK-2.8.12/src/gtk/cross.xbm	2016-02-20 10:38:50.000000000 +0100
Dan Horák 8c6322
@@ -1,6 +1,6 @@
Dan Horák 8c6322
 #define cross_width 15
Dan Horák 8c6322
 #define cross_height 15
Dan Horák 8c6322
-static char cross_bits[] = {
Dan Horák 8c6322
+static unsigned char cross_bits[] = {
Dan Horák 8c6322
    0x84, 0x10, 0x84, 0x10, 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
Dan Horák 8c6322
    0x84, 0x10, 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
Dan Horák 8c6322
    0xff, 0x7f, 0x84, 0x10, 0x84, 0x10};
Dan Horák 8c6322
diff -up wxGTK-2.8.12/src/gtk/dcclient.cpp.char wxGTK-2.8.12/src/gtk/dcclient.cpp
Dan Horák 8c6322
--- wxGTK-2.8.12/src/gtk/dcclient.cpp.char	2016-02-20 10:38:50.000000000 +0100
Dan Horák 8c6322
+++ wxGTK-2.8.12/src/gtk/dcclient.cpp	2016-02-20 10:49:11.000000000 +0100
Dan Horák 8c6322
@@ -427,13 +427,24 @@ void wxWindowDC::SetUpDC()
Dan Horák 8c6322
 
Dan Horák 8c6322
     if (!hatch_bitmap)
Dan Horák 8c6322
     {
Dan Horák 8c6322
+#define CREATE_FROM_XBM_DATA(name) \
Dan Horák 8c6322
+        gdk_bitmap_create_from_data \
Dan Horák 8c6322
+        ( \
Dan Horák 8c6322
+            NULL, \
Dan Horák 8c6322
+            reinterpret_cast<gchar *>(name ## _bits), \
Dan Horák 8c6322
+            name ## _width, \
Dan Horák 8c6322
+            name ## _height \
Dan Horák 8c6322
+        )
Dan Horák 8c6322
+
Dan Horák 8c6322
         hatch_bitmap    = hatches;
Dan Horák 8c6322
-        hatch_bitmap[0] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, bdiag_bits, bdiag_width, bdiag_height );
Dan Horák 8c6322
-        hatch_bitmap[1] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cdiag_bits, cdiag_width, cdiag_height );
Dan Horák 8c6322
-        hatch_bitmap[2] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, fdiag_bits, fdiag_width, fdiag_height );
Dan Horák 8c6322
-        hatch_bitmap[3] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cross_bits, cross_width, cross_height );
Dan Horák 8c6322
-        hatch_bitmap[4] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, horiz_bits, horiz_width, horiz_height );
Dan Horák 8c6322
-        hatch_bitmap[5] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, verti_bits, verti_width, verti_height );
Dan Horák 8c6322
+        hatch_bitmap[0] = CREATE_FROM_XBM_DATA(bdiag);
Dan Horák 8c6322
+        hatch_bitmap[1] = CREATE_FROM_XBM_DATA(cdiag);
Dan Horák 8c6322
+        hatch_bitmap[2] = CREATE_FROM_XBM_DATA(fdiag);
Dan Horák 8c6322
+        hatch_bitmap[3] = CREATE_FROM_XBM_DATA(cross);
Dan Horák 8c6322
+        hatch_bitmap[4] = CREATE_FROM_XBM_DATA(horiz);
Dan Horák 8c6322
+        hatch_bitmap[5] = CREATE_FROM_XBM_DATA(verti);
Dan Horák 8c6322
+
Dan Horák 8c6322
+#undef CREATE_FROM_XBM_DATA
Dan Horák 8c6322
     }
Dan Horák 8c6322
 }
Dan Horák 8c6322
 
Dan Horák 8c6322
diff -up wxGTK-2.8.12/src/gtk/fdiag.xbm.char wxGTK-2.8.12/src/gtk/fdiag.xbm
Dan Horák 8c6322
--- wxGTK-2.8.12/src/gtk/fdiag.xbm.char	2011-03-22 13:19:01.000000000 +0100
Dan Horák 8c6322
+++ wxGTK-2.8.12/src/gtk/fdiag.xbm	2016-02-20 10:38:50.000000000 +0100
Dan Horák 8c6322
@@ -1,6 +1,6 @@
Dan Horák 8c6322
 #define fdiag_width 16
Dan Horák 8c6322
 #define fdiag_height 16
Dan Horák 8c6322
-static char fdiag_bits[] = {
Dan Horák 8c6322
+static unsigned char fdiag_bits[] = {
Dan Horák 8c6322
    0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20,
Dan Horák 8c6322
    0x40, 0x40, 0x80, 0x80, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08,
Dan Horák 8c6322
    0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80};
Dan Horák 8c6322
diff -up wxGTK-2.8.12/src/gtk/horiz.xbm.char wxGTK-2.8.12/src/gtk/horiz.xbm
Dan Horák 8c6322
--- wxGTK-2.8.12/src/gtk/horiz.xbm.char	2011-03-22 13:19:01.000000000 +0100
Dan Horák 8c6322
+++ wxGTK-2.8.12/src/gtk/horiz.xbm	2016-02-20 10:38:50.000000000 +0100
Dan Horák 8c6322
@@ -1,6 +1,6 @@
Dan Horák 8c6322
 #define horiz_width 15
Dan Horák 8c6322
 #define horiz_height 15
Dan Horák 8c6322
-static char horiz_bits[] = {
Dan Horák 8c6322
+static unsigned char horiz_bits[] = {
Dan Horák 8c6322
    0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Dan Horák 8c6322
    0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Dan Horák 8c6322
    0xff, 0x7f, 0x00, 0x00, 0x00, 0x00};
Dan Horák 8c6322
diff -up wxGTK-2.8.12/src/gtk/verti.xbm.char wxGTK-2.8.12/src/gtk/verti.xbm
Dan Horák 8c6322
--- wxGTK-2.8.12/src/gtk/verti.xbm.char	2011-03-22 13:19:02.000000000 +0100
Dan Horák 8c6322
+++ wxGTK-2.8.12/src/gtk/verti.xbm	2016-02-20 10:38:50.000000000 +0100
Dan Horák 8c6322
@@ -1,6 +1,6 @@
Dan Horák 8c6322
 #define verti_width 15
Dan Horák 8c6322
 #define verti_height 15
Dan Horák 8c6322
-static char verti_bits[] = {
Dan Horák 8c6322
+static unsigned char verti_bits[] = {
Dan Horák 8c6322
    0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
Dan Horák 8c6322
    0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
Dan Horák 8c6322
    0x84, 0x10, 0x84, 0x10, 0x84, 0x10};