-
Notifications
You must be signed in to change notification settings - Fork 0
/
wxGTK-2.8.12-char.patch
100 lines (98 loc) · 4.9 KB
/
wxGTK-2.8.12-char.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
diff -up wxGTK-2.8.12/src/gtk/bdiag.xbm.char wxGTK-2.8.12/src/gtk/bdiag.xbm
--- wxGTK-2.8.12/src/gtk/bdiag.xbm.char 2011-03-22 13:19:01.000000000 +0100
+++ wxGTK-2.8.12/src/gtk/bdiag.xbm 2016-02-20 10:38:50.000000000 +0100
@@ -1,6 +1,6 @@
#define bdiag_width 16
#define bdiag_height 16
-static char bdiag_bits[] = {
+static unsigned char bdiag_bits[] = {
0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04,
0x02, 0x02, 0x01, 0x01, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10,
0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01};
diff -up wxGTK-2.8.12/src/gtk/cdiag.xbm.char wxGTK-2.8.12/src/gtk/cdiag.xbm
--- wxGTK-2.8.12/src/gtk/cdiag.xbm.char 2011-03-22 13:19:01.000000000 +0100
+++ wxGTK-2.8.12/src/gtk/cdiag.xbm 2016-02-20 10:38:50.000000000 +0100
@@ -1,6 +1,6 @@
#define cdiag_width 16
#define cdiag_height 16
-static char cdiag_bits[] = {
+static unsigned char cdiag_bits[] = {
0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24,
0x42, 0x42, 0x81, 0x81, 0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18,
0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0x81, 0x81};
diff -up wxGTK-2.8.12/src/gtk/cross.xbm.char wxGTK-2.8.12/src/gtk/cross.xbm
--- wxGTK-2.8.12/src/gtk/cross.xbm.char 2011-03-22 13:19:01.000000000 +0100
+++ wxGTK-2.8.12/src/gtk/cross.xbm 2016-02-20 10:38:50.000000000 +0100
@@ -1,6 +1,6 @@
#define cross_width 15
#define cross_height 15
-static char cross_bits[] = {
+static unsigned char cross_bits[] = {
0x84, 0x10, 0x84, 0x10, 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
0x84, 0x10, 0xff, 0x7f, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
0xff, 0x7f, 0x84, 0x10, 0x84, 0x10};
diff -up wxGTK-2.8.12/src/gtk/dcclient.cpp.char wxGTK-2.8.12/src/gtk/dcclient.cpp
--- wxGTK-2.8.12/src/gtk/dcclient.cpp.char 2016-02-20 10:38:50.000000000 +0100
+++ wxGTK-2.8.12/src/gtk/dcclient.cpp 2016-02-20 10:49:11.000000000 +0100
@@ -427,13 +427,24 @@ void wxWindowDC::SetUpDC()
if (!hatch_bitmap)
{
+#define CREATE_FROM_XBM_DATA(name) \
+ gdk_bitmap_create_from_data \
+ ( \
+ NULL, \
+ reinterpret_cast<gchar *>(name ## _bits), \
+ name ## _width, \
+ name ## _height \
+ )
+
hatch_bitmap = hatches;
- hatch_bitmap[0] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, bdiag_bits, bdiag_width, bdiag_height );
- hatch_bitmap[1] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cdiag_bits, cdiag_width, cdiag_height );
- hatch_bitmap[2] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, fdiag_bits, fdiag_width, fdiag_height );
- hatch_bitmap[3] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cross_bits, cross_width, cross_height );
- hatch_bitmap[4] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, horiz_bits, horiz_width, horiz_height );
- hatch_bitmap[5] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, verti_bits, verti_width, verti_height );
+ hatch_bitmap[0] = CREATE_FROM_XBM_DATA(bdiag);
+ hatch_bitmap[1] = CREATE_FROM_XBM_DATA(cdiag);
+ hatch_bitmap[2] = CREATE_FROM_XBM_DATA(fdiag);
+ hatch_bitmap[3] = CREATE_FROM_XBM_DATA(cross);
+ hatch_bitmap[4] = CREATE_FROM_XBM_DATA(horiz);
+ hatch_bitmap[5] = CREATE_FROM_XBM_DATA(verti);
+
+#undef CREATE_FROM_XBM_DATA
}
}
diff -up wxGTK-2.8.12/src/gtk/fdiag.xbm.char wxGTK-2.8.12/src/gtk/fdiag.xbm
--- wxGTK-2.8.12/src/gtk/fdiag.xbm.char 2011-03-22 13:19:01.000000000 +0100
+++ wxGTK-2.8.12/src/gtk/fdiag.xbm 2016-02-20 10:38:50.000000000 +0100
@@ -1,6 +1,6 @@
#define fdiag_width 16
#define fdiag_height 16
-static char fdiag_bits[] = {
+static unsigned char fdiag_bits[] = {
0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20,
0x40, 0x40, 0x80, 0x80, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08,
0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80};
diff -up wxGTK-2.8.12/src/gtk/horiz.xbm.char wxGTK-2.8.12/src/gtk/horiz.xbm
--- wxGTK-2.8.12/src/gtk/horiz.xbm.char 2011-03-22 13:19:01.000000000 +0100
+++ wxGTK-2.8.12/src/gtk/horiz.xbm 2016-02-20 10:38:50.000000000 +0100
@@ -1,6 +1,6 @@
#define horiz_width 15
#define horiz_height 15
-static char horiz_bits[] = {
+static unsigned char horiz_bits[] = {
0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0x7f, 0x00, 0x00, 0x00, 0x00};
diff -up wxGTK-2.8.12/src/gtk/verti.xbm.char wxGTK-2.8.12/src/gtk/verti.xbm
--- wxGTK-2.8.12/src/gtk/verti.xbm.char 2011-03-22 13:19:02.000000000 +0100
+++ wxGTK-2.8.12/src/gtk/verti.xbm 2016-02-20 10:38:50.000000000 +0100
@@ -1,6 +1,6 @@
#define verti_width 15
#define verti_height 15
-static char verti_bits[] = {
+static unsigned char verti_bits[] = {
0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
0x84, 0x10, 0x84, 0x10, 0x84, 0x10};