Blame wxGTK-2.8.12-char.patch

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