kernel/qplatformcursor.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6QList<QPlatformCursor *> QPlatformCursorPrivate::getInstances() -
7{ -
8 QList<QPlatformCursor *> result; -
9 for (QForeachContainer<__typeof__(QGuiApplicationPrivate::screen_list)> _container_(QGuiApplicationPrivate::screen_list); !_container_.brk && _container_.i != _container_.e; __extension__ ({ ++_container_.brk; ++_container_.i; })) for (const QScreen *screen = *_container_.i;; __extension__ ({--_container_.brk; break;})) -
10 if (QPlatformCursor *cursor = screen->handle()->cursor())
never evaluated: QPlatformCursor *cursor = screen->handle()->cursor()
0
11 result.push_back(cursor);
never executed: result.push_back(cursor);
0
12 return result;
never executed: return result;
0
13} -
14QPlatformCursor::QPlatformCursor() -
15{ -
16} -
17 -
18QPoint QPlatformCursor::pos() const -
19{ -
20 -
21 return QGuiApplicationPrivate::lastCursorPosition.toPoint();
never executed: return QGuiApplicationPrivate::lastCursorPosition.toPoint();
0
22} -
23 -
24void QPlatformCursor::setPos(const QPoint &pos) -
25{ -
26 (void)pos;; -
27 QMessageLogger("kernel/qplatformcursor.cpp", 122, __PRETTY_FUNCTION__).warning("This plugin does not support QCursor::setPos()"); -
28}
never executed: }
0
29static QPlatformCursorImage *systemCursorTable[Qt::LastCursor+1]; -
30static bool systemCursorTableInit = false; -
31 -
32 -
33static const uchar cur_arrow_bits[] = { -
34 0x07, 0x00, 0x39, 0x00, 0xc1, 0x01, 0x02, 0x0e, 0x02, 0x10, 0x02, 0x08, -
35 0x04, 0x04, 0x04, 0x02, 0x04, 0x04, 0x88, 0x08, 0x48, 0x11, 0x28, 0x22, -
36 0x10, 0x44, 0x00, 0x28, 0x00, 0x10, 0x00, 0x00 }; -
37static const uchar mcur_arrow_bits[] = { -
38 0x07, 0x00, 0x3f, 0x00, 0xff, 0x01, 0xfe, 0x0f, 0xfe, 0x1f, 0xfe, 0x0f, -
39 0xfc, 0x07, 0xfc, 0x03, 0xfc, 0x07, 0xf8, 0x0f, 0x78, 0x1f, 0x38, 0x3e, -
40 0x10, 0x7c, 0x00, 0x38, 0x00, 0x10, 0x00, 0x00 }; -
41 -
42static const unsigned char cur_up_arrow_bits[] = { -
43 0x80, 0x00, 0x40, 0x01, 0x40, 0x01, 0x20, 0x02, 0x20, 0x02, 0x10, 0x04, -
44 0x10, 0x04, 0x08, 0x08, 0x78, 0x0f, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, -
45 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0xc0, 0x01}; -
46static const unsigned char mcur_up_arrow_bits[] = { -
47 0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0xe0, 0x03, 0xe0, 0x03, 0xf0, 0x07, -
48 0xf0, 0x07, 0xf8, 0x0f, 0xf8, 0x0f, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, -
49 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01}; -
50 -
51static const unsigned char cur_cross_bits[] = { -
52 0xc0, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, -
53 0x7f, 0x7f, 0x01, 0x40, 0x7f, 0x7f, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, -
54 0x40, 0x01, 0x40, 0x01, 0xc0, 0x01, 0x00, 0x00}; -
55static const unsigned char mcur_cross_bits[] = { -
56 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, -
57 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, -
58 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00}; -
59 -
60static const uchar cur_ibeam_bits[] = { -
61 0x00, 0x00, 0xe0, 0x03, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, -
62 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, -
63 0x80, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00 }; -
64static const uchar mcur_ibeam_bits[] = { -
65 0xf0, 0x07, 0xf0, 0x07, 0xf0, 0x07, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, -
66 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, -
67 0xf0, 0x07, 0xf0, 0x07, 0xf0, 0x07, 0x00, 0x00 }; -
68 -
69static const uchar cur_ver_bits[] = { -
70 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f, -
71 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0xf0, 0x0f, -
72 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00 }; -
73static const uchar mcur_ver_bits[] = { -
74 0x00, 0x00, 0x80, 0x03, 0xc0, 0x07, 0xe0, 0x0f, 0xf0, 0x1f, 0xf8, 0x3f, -
75 0xfc, 0x7f, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0xfc, 0x7f, 0xf8, 0x3f, -
76 0xf0, 0x1f, 0xe0, 0x0f, 0xc0, 0x07, 0x80, 0x03 }; -
77 -
78static const uchar cur_hor_bits[] = { -
79 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x30, 0x18, -
80 0x38, 0x38, 0xfc, 0x7f, 0xfc, 0x7f, 0x38, 0x38, 0x30, 0x18, 0x20, 0x08, -
81 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -
82static const uchar mcur_hor_bits[] = { -
83 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x60, 0x0c, 0x70, 0x1c, 0x78, 0x3c, -
84 0xfc, 0x7f, 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0xff, 0xfc, 0x7f, 0x78, 0x3c, -
85 0x70, 0x1c, 0x60, 0x0c, 0x40, 0x04, 0x00, 0x00 }; -
86static const uchar cur_bdiag_bits[] = { -
87 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x3e, -
88 0x00, 0x37, 0x88, 0x23, 0xd8, 0x01, 0xf8, 0x00, 0x78, 0x00, 0xf8, 0x00, -
89 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -
90static const uchar mcur_bdiag_bits[] = { -
91 0x00, 0x00, 0xc0, 0x7f, 0x80, 0x7f, 0x00, 0x7f, 0x00, 0x7e, 0x04, 0x7f, -
92 0x8c, 0x7f, 0xdc, 0x77, 0xfc, 0x63, 0xfc, 0x41, 0xfc, 0x00, 0xfc, 0x01, -
93 0xfc, 0x03, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00 }; -
94static const uchar cur_fdiag_bits[] = { -
95 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0xf8, 0x00, 0x78, 0x00, -
96 0xf8, 0x00, 0xd8, 0x01, 0x88, 0x23, 0x00, 0x37, 0x00, 0x3e, 0x00, 0x3c, -
97 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00 }; -
98static const uchar mcur_fdiag_bits[] = { -
99 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0x03, 0xfc, 0x01, 0xfc, 0x00, -
100 0xfc, 0x41, 0xfc, 0x63, 0xdc, 0x77, 0x8c, 0x7f, 0x04, 0x7f, 0x00, 0x7e, -
101 0x00, 0x7f, 0x80, 0x7f, 0xc0, 0x7f, 0x00, 0x00 }; -
102 -
103 -
104static const uchar forbidden_bits[] = { -
105 0x00,0x00,0x00,0x80,0x1f,0x00,0xe0,0x7f,0x00,0xf0,0xf0,0x00,0x38,0xc0,0x01, -
106 0x7c,0x80,0x03,0xec,0x00,0x03,0xce,0x01,0x07,0x86,0x03,0x06,0x06,0x07,0x06, -
107 0x06,0x0e,0x06,0x06,0x1c,0x06,0x0e,0x38,0x07,0x0c,0x70,0x03,0x1c,0xe0,0x03, -
108 0x38,0xc0,0x01,0xf0,0xe0,0x00,0xe0,0x7f,0x00,0x80,0x1f,0x00,0x00,0x00,0x00 }; -
109 -
110static const uchar forbiddenm_bits[] = { -
111 0x80,0x1f,0x00,0xe0,0x7f,0x00,0xf0,0xff,0x00,0xf8,0xff,0x01,0xfc,0xf0,0x03, -
112 0xfe,0xc0,0x07,0xfe,0x81,0x07,0xff,0x83,0x0f,0xcf,0x07,0x0f,0x8f,0x0f,0x0f, -
113 0x0f,0x1f,0x0f,0x0f,0x3e,0x0f,0x1f,0xfc,0x0f,0x1e,0xf8,0x07,0x3e,0xf0,0x07, -
114 0xfc,0xe0,0x03,0xf8,0xff,0x01,0xf0,0xff,0x00,0xe0,0x7f,0x00,0x80,0x1f,0x00}; -
115 -
116 -
117static const uchar wait_data_bits[] = { -
118 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
119 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0x00, -
120 0x00, 0x04, 0x40, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x08, 0x20, 0x00, -
121 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, -
122 0x00, 0x50, 0x15, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x40, 0x05, 0x00, -
123 0x00, 0x80, 0x02, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x20, 0x08, 0x00, -
124 0x00, 0x10, 0x10, 0x00, 0x00, 0x08, 0x21, 0x00, 0x00, 0x88, 0x22, 0x00, -
125 0x00, 0x48, 0x25, 0x00, 0x00, 0xa8, 0x2a, 0x00, 0x00, 0xfc, 0x7f, 0x00, -
126 0x00, 0x04, 0x40, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, -
127 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
128 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -
129static const uchar wait_mask_bits[] = { -
130 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
131 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0x00, -
132 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, -
133 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, -
134 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xc0, 0x07, 0x00, -
135 0x00, 0x80, 0x03, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0xe0, 0x0f, 0x00, -
136 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, -
137 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xfc, 0x7f, 0x00, -
138 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, -
139 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
140 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -
141 -
142static const uchar hsplit_bits[] = { -
143 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
144 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
145 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, -
146 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, -
147 0x00, 0x41, 0x82, 0x00, 0x80, 0x41, 0x82, 0x01, 0xc0, 0x7f, 0xfe, 0x03, -
148 0x80, 0x41, 0x82, 0x01, 0x00, 0x41, 0x82, 0x00, 0x00, 0x40, 0x02, 0x00, -
149 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, -
150 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, -
151 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
152 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
153 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -
154static const uchar hsplitm_bits[] = { -
155 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
156 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
157 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, -
158 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe2, 0x47, 0x00, 0x00, 0xe3, 0xc7, 0x00, -
159 0x80, 0xe3, 0xc7, 0x01, 0xc0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x07, -
160 0xc0, 0xff, 0xff, 0x03, 0x80, 0xe3, 0xc7, 0x01, 0x00, 0xe3, 0xc7, 0x00, -
161 0x00, 0xe2, 0x47, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, -
162 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, -
163 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
164 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
165 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -
166static const uchar vsplit_bits[] = { -
167 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
168 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
169 0x00, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00, -
170 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, -
171 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, -
172 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, -
173 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, -
174 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, -
175 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
176 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
177 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -
178static const uchar vsplitm_bits[] = { -
179 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
180 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, -
181 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xf0, 0x07, 0x00, -
182 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, -
183 0x00, 0xc0, 0x01, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, -
184 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, -
185 0x80, 0xff, 0xff, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, -
186 0x00, 0xc0, 0x01, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf0, 0x07, 0x00, -
187 0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, -
188 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
189 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -
190static const uchar phand_bits[] = { -
191 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, -
192 0x7e, 0x04, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, -
193 0x08, 0x08, 0x00, 0x00, 0x70, 0x14, 0x00, 0x00, 0x08, 0x22, 0x00, 0x00, -
194 0x30, 0x41, 0x00, 0x00, 0xc0, 0x20, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, -
195 0x80, 0x08, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, -
196 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
197 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
198 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
199 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
200 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
201 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -
202static const uchar phandm_bits[] = { -
203 0xfe, 0x01, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, -
204 0xff, 0x0f, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, -
205 0xfc, 0x1f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, -
206 0xf8, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, -
207 0xc0, 0x1f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, -
208 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
209 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
210 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
211 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
212 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
213 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -
214 -
215static const uchar size_all_data_bits[] = { -
216 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
217 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
218 0x00, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00, -
219 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, -
220 0x00, 0x80, 0x00, 0x00, 0x00, 0x81, 0x40, 0x00, 0x80, 0x81, 0xc0, 0x00, -
221 0xc0, 0xff, 0xff, 0x01, 0x80, 0x81, 0xc0, 0x00, 0x00, 0x81, 0x40, 0x00, -
222 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, -
223 0x00, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, -
224 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
225 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
226 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -
227static const uchar size_all_mask_bits[] = { -
228 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
229 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, -
230 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xf0, 0x07, 0x00, -
231 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc2, 0x21, 0x00, -
232 0x00, 0xc3, 0x61, 0x00, 0x80, 0xc3, 0xe1, 0x00, 0xc0, 0xff, 0xff, 0x01, -
233 0xe0, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0x01, 0x80, 0xc3, 0xe1, 0x00, -
234 0x00, 0xc3, 0x61, 0x00, 0x00, 0xc2, 0x21, 0x00, 0x00, 0xc0, 0x01, 0x00, -
235 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xe0, 0x03, 0x00, -
236 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
237 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
238 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -
239 -
240static const uchar whatsthis_bits[] = { -
241 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0xf0, 0x07, 0x00, -
242 0x09, 0x18, 0x0e, 0x00, 0x11, 0x1c, 0x0e, 0x00, 0x21, 0x1c, 0x0e, 0x00, -
243 0x41, 0x1c, 0x0e, 0x00, 0x81, 0x1c, 0x0e, 0x00, 0x01, 0x01, 0x07, 0x00, -
244 0x01, 0x82, 0x03, 0x00, 0xc1, 0xc7, 0x01, 0x00, 0x49, 0xc0, 0x01, 0x00, -
245 0x95, 0xc0, 0x01, 0x00, 0x93, 0xc0, 0x01, 0x00, 0x21, 0x01, 0x00, 0x00, -
246 0x20, 0xc1, 0x01, 0x00, 0x40, 0xc2, 0x01, 0x00, 0x40, 0x02, 0x00, 0x00, -
247 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
248 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
249 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
250 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
251 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -
252static const uchar whatsthism_bits[] = { -
253 0x01, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x07, 0x00, 0x07, 0xf8, 0x0f, 0x00, -
254 0x0f, 0xfc, 0x1f, 0x00, 0x1f, 0x3e, 0x1f, 0x00, 0x3f, 0x3e, 0x1f, 0x00, -
255 0x7f, 0x3e, 0x1f, 0x00, 0xff, 0x3e, 0x1f, 0x00, 0xff, 0x9d, 0x0f, 0x00, -
256 0xff, 0xc3, 0x07, 0x00, 0xff, 0xe7, 0x03, 0x00, 0x7f, 0xe0, 0x03, 0x00, -
257 0xf7, 0xe0, 0x03, 0x00, 0xf3, 0xe0, 0x03, 0x00, 0xe1, 0xe1, 0x03, 0x00, -
258 0xe0, 0xe1, 0x03, 0x00, 0xc0, 0xe3, 0x03, 0x00, 0xc0, 0xe3, 0x03, 0x00, -
259 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
260 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
261 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
262 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
263 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -
264 -
265static const uchar busy_bits[] = { -
266 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, -
267 0x09, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, -
268 0x41, 0xe0, 0xff, 0x00, 0x81, 0x20, 0x80, 0x00, 0x01, 0xe1, 0xff, 0x00, -
269 0x01, 0x42, 0x40, 0x00, 0xc1, 0x47, 0x40, 0x00, 0x49, 0x40, 0x55, 0x00, -
270 0x95, 0x80, 0x2a, 0x00, 0x93, 0x00, 0x15, 0x00, 0x21, 0x01, 0x0a, 0x00, -
271 0x20, 0x01, 0x11, 0x00, 0x40, 0x82, 0x20, 0x00, 0x40, 0x42, 0x44, 0x00, -
272 0x80, 0x41, 0x4a, 0x00, 0x00, 0x40, 0x55, 0x00, 0x00, 0xe0, 0xff, 0x00, -
273 0x00, 0x20, 0x80, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, -
274 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
275 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
276 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -
277static const uchar busym_bits[] = { -
278 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, -
279 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, -
280 0x7f, 0xe0, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, -
281 0xff, 0xc3, 0x7f, 0x00, 0xff, 0xc7, 0x7f, 0x00, 0x7f, 0xc0, 0x7f, 0x00, -
282 0xf7, 0x80, 0x3f, 0x00, 0xf3, 0x00, 0x1f, 0x00, 0xe1, 0x01, 0x0e, 0x00, -
283 0xe0, 0x01, 0x1f, 0x00, 0xc0, 0x83, 0x3f, 0x00, 0xc0, 0xc3, 0x7f, 0x00, -
284 0x80, 0xc1, 0x7f, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xe0, 0xff, 0x00, -
285 0x00, 0xe0, 0xff, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, -
286 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
287 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
288 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -
289 -
290 -
291static const uchar openhand_bits[] = { -
292 0x80,0x01,0x58,0x0e,0x64,0x12,0x64,0x52,0x48,0xb2,0x48,0x92, -
293 0x16,0x90,0x19,0x80,0x11,0x40,0x02,0x40,0x04,0x40,0x04,0x20, -
294 0x08,0x20,0x10,0x10,0x20,0x10,0x00,0x00}; -
295static const uchar openhandm_bits[] = { -
296 0x80,0x01,0xd8,0x0f,0xfc,0x1f,0xfc,0x5f,0xf8,0xff,0xf8,0xff, -
297 0xfe,0xff,0xff,0xff,0xff,0x7f,0xfe,0x7f,0xfc,0x7f,0xfc,0x3f, -
298 0xf8,0x3f,0xf0,0x1f,0xe0,0x1f,0x00,0x00}; -
299static const uchar closedhand_bits[] = { -
300 0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x0d,0x48,0x32,0x08,0x50, -
301 0x10,0x40,0x18,0x40,0x04,0x40,0x04,0x20,0x08,0x20,0x10,0x10, -
302 0x20,0x10,0x20,0x10,0x00,0x00,0x00,0x00}; -
303static const uchar closedhandm_bits[] = { -
304 0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x0d,0xf8,0x3f,0xf8,0x7f, -
305 0xf0,0x7f,0xf8,0x7f,0xfc,0x7f,0xfc,0x3f,0xf8,0x3f,0xf0,0x1f, -
306 0xe0,0x1f,0xe0,0x1f,0x00,0x00,0x00,0x00}; -
307 -
308void QPlatformCursorImage::createSystemCursor(int id) -
309{ -
310 if (!systemCursorTableInit) {
never evaluated: !systemCursorTableInit
0
311 for (int i = 0; i <= Qt::LastCursor; i++)
never evaluated: i <= Qt::LastCursor
0
312 systemCursorTable[i] = 0;
never executed: systemCursorTable[i] = 0;
0
313 systemCursorTableInit = true; -
314 }
never executed: }
0
315 switch (id) { -
316 -
317 case Qt::ArrowCursor: -
318 systemCursorTable[Qt::ArrowCursor] = -
319 new QPlatformCursorImage(cur_arrow_bits, mcur_arrow_bits, 16, 16, 0, 0); -
320 break;
never executed: break;
0
321 -
322 case Qt::UpArrowCursor: -
323 systemCursorTable[Qt::UpArrowCursor] = -
324 new QPlatformCursorImage(cur_up_arrow_bits, mcur_up_arrow_bits, 16, 16, 7, 0); -
325 break;
never executed: break;
0
326 -
327 case Qt::CrossCursor: -
328 systemCursorTable[Qt::CrossCursor] = -
329 new QPlatformCursorImage(cur_cross_bits, mcur_cross_bits, 16, 16, 7, 7); -
330 break;
never executed: break;
0
331 -
332 case Qt::IBeamCursor: -
333 systemCursorTable[Qt::IBeamCursor] = -
334 new QPlatformCursorImage(cur_ibeam_bits, mcur_ibeam_bits, 16, 16, 7, 7); -
335 break;
never executed: break;
0
336 -
337 case Qt::SizeVerCursor: -
338 systemCursorTable[Qt::SizeVerCursor] = -
339 new QPlatformCursorImage(cur_ver_bits, mcur_ver_bits, 16, 16, 7, 7); -
340 break;
never executed: break;
0
341 -
342 case Qt::SizeHorCursor: -
343 systemCursorTable[Qt::SizeHorCursor] = -
344 new QPlatformCursorImage(cur_hor_bits, mcur_hor_bits, 16, 16, 7, 7); -
345 break;
never executed: break;
0
346 -
347 case Qt::SizeBDiagCursor: -
348 systemCursorTable[Qt::SizeBDiagCursor] = -
349 new QPlatformCursorImage(cur_bdiag_bits, mcur_bdiag_bits, 16, 16, 7, 7); -
350 break;
never executed: break;
0
351 -
352 case Qt::SizeFDiagCursor: -
353 systemCursorTable[Qt::SizeFDiagCursor] = -
354 new QPlatformCursorImage(cur_fdiag_bits, mcur_fdiag_bits, 16, 16, 7, 7); -
355 break;
never executed: break;
0
356 -
357 case Qt::BlankCursor: -
358 systemCursorTable[Qt::BlankCursor] = -
359 new QPlatformCursorImage(0, 0, 0, 0, 0, 0); -
360 break;
never executed: break;
0
361 -
362 -
363 case Qt::ForbiddenCursor: -
364 systemCursorTable[Qt::ForbiddenCursor] = -
365 new QPlatformCursorImage(forbidden_bits, forbiddenm_bits, 20, 20, 10, 10); -
366 break;
never executed: break;
0
367 -
368 -
369 case Qt::WaitCursor: -
370 systemCursorTable[Qt::WaitCursor] = -
371 new QPlatformCursorImage(wait_data_bits, wait_mask_bits, 32, 32, 15, 15); -
372 break;
never executed: break;
0
373 -
374 case Qt::SplitVCursor: -
375 systemCursorTable[Qt::SplitVCursor] = -
376 new QPlatformCursorImage(vsplit_bits, vsplitm_bits, 32, 32, 15, 15); -
377 break;
never executed: break;
0
378 -
379 case Qt::SplitHCursor: -
380 systemCursorTable[Qt::SplitHCursor] = -
381 new QPlatformCursorImage(hsplit_bits, hsplitm_bits, 32, 32, 15, 15); -
382 break;
never executed: break;
0
383 -
384 case Qt::SizeAllCursor: -
385 systemCursorTable[Qt::SizeAllCursor] = -
386 new QPlatformCursorImage(size_all_data_bits, size_all_mask_bits, 32, 32, 15, 15); -
387 break;
never executed: break;
0
388 -
389 case Qt::PointingHandCursor: -
390 systemCursorTable[Qt::PointingHandCursor] = -
391 new QPlatformCursorImage(phand_bits, phandm_bits, 32, 32, 0, 0); -
392 break;
never executed: break;
0
393 -
394 case Qt::WhatsThisCursor: -
395 systemCursorTable[Qt::WhatsThisCursor] = -
396 new QPlatformCursorImage(whatsthis_bits, whatsthism_bits, 32, 32, 0, 0); -
397 break;
never executed: break;
0
398 case Qt::BusyCursor: -
399 systemCursorTable[Qt::BusyCursor] = -
400 new QPlatformCursorImage(busy_bits, busym_bits, 32, 32, 0, 0); -
401 break;
never executed: break;
0
402 -
403 case Qt::OpenHandCursor: -
404 systemCursorTable[Qt::OpenHandCursor] = -
405 new QPlatformCursorImage(openhand_bits, openhandm_bits, 16, 16, 8, 8); -
406 break;
never executed: break;
0
407 case Qt::ClosedHandCursor: -
408 systemCursorTable[Qt::ClosedHandCursor] = -
409 new QPlatformCursorImage(closedhand_bits, closedhandm_bits, 16, 16, 8, 8); -
410 break;
never executed: break;
0
411 default: -
412 QMessageLogger("kernel/qplatformcursor.cpp", 525, __PRETTY_FUNCTION__).warning("Unknown system cursor %d", id); -
413 }
never executed: }
0
414}
never executed: }
0
415void QPlatformCursorImage::set(Qt::CursorShape id) -
416{ -
417 QPlatformCursorImage *cursor = 0; -
418 if (id >= 0 && id <= Qt::LastCursor) {
never evaluated: id >= 0
never evaluated: id <= Qt::LastCursor
0
419 if (!systemCursorTable[id])
never evaluated: !systemCursorTable[id]
0
420 createSystemCursor(id);
never executed: createSystemCursor(id);
0
421 cursor = systemCursorTable[id]; -
422 }
never executed: }
0
423 -
424 if (cursor == 0) {
never evaluated: cursor == 0
0
425 if (!systemCursorTable[Qt::ArrowCursor])
never evaluated: !systemCursorTable[Qt::ArrowCursor]
0
426 createSystemCursor(Qt::ArrowCursor);
never executed: createSystemCursor(Qt::ArrowCursor);
0
427 cursor = systemCursorTable[Qt::ArrowCursor]; -
428 }
never executed: }
0
429 cursorImage = cursor->cursorImage; -
430 hot = cursor->hot; -
431}
never executed: }
0
432 -
433 -
434 -
435 -
436 -
437 -
438void QPlatformCursorImage::set(const QImage &image, int hx, int hy) -
439{ -
440 hot.setX(hx); -
441 hot.setY(hy); -
442 cursorImage = image; -
443}
never executed: }
0
444void QPlatformCursorImage::set(const uchar *data, const uchar *mask, -
445 int width, int height, int hx, int hy) -
446{ -
447 hot.setX(hx); -
448 hot.setY(hy); -
449 -
450 cursorImage = QImage(width,height, QImage::Format_Indexed8); -
451 -
452 if (!width || !height || !data || !mask || cursorImage.isNull())
never evaluated: !width
never evaluated: !height
never evaluated: !data
never evaluated: !mask
never evaluated: cursorImage.isNull()
0
453 return;
never executed: return;
0
454 -
455 cursorImage.setColorCount(3); -
456 cursorImage.setColor(0, 0xff000000); -
457 cursorImage.setColor(1, 0xffffffff); -
458 cursorImage.setColor(2, 0x00000000); -
459 -
460 int bytesPerLine = (width + 7) / 8; -
461 int p = 0; -
462 int d, m; -
463 -
464 int x = -1, w = 0; -
465 -
466 uchar *cursor_data = cursorImage.bits(); -
467 int bpl = cursorImage.bytesPerLine(); -
468 for (int i = 0; i < height; i++)
never evaluated: i < height
0
469 { -
470 for (int j = 0; j < bytesPerLine; j++, data++, mask++)
never evaluated: j < bytesPerLine
0
471 { -
472 for (int b = 0; b < 8 && j*8+b < width; b++)
never evaluated: b < 8
never evaluated: j*8+b < width
0
473 { -
474 d = *data & (1 << b); -
475 m = *mask & (1 << b); -
476 if (d && m) p = 0;
never executed: p = 0;
never evaluated: d
never evaluated: m
0
477 else if (!d && m) p = 1;
never executed: p = 1;
never evaluated: !d
never evaluated: m
0
478 else p = 2;
never executed: p = 2;
0
479 cursor_data[j*8+b] = p; -
480 -
481 -
482 if (x < 0 && m)
never evaluated: x < 0
never evaluated: m
0
483 x = j*8+b;
never executed: x = j*8+b;
0
484 else if (x >= 0 && !m) {
never evaluated: x >= 0
never evaluated: !m
0
485 x = -1; -
486 w = 0; -
487 }
never executed: }
0
488 if (m)
never evaluated: m
0
489 w++;
never executed: w++;
0
490 }
never executed: }
0
491 }
never executed: }
0
492 if (x >= 0) {
never evaluated: x >= 0
0
493 x = -1; -
494 w = 0; -
495 }
never executed: }
0
496 cursor_data += bpl; -
497 }
never executed: }
0
498 -
499}
never executed: }
0
500 -
501 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial