Lines Matching +full:display +full:- +full:width +full:- +full:chars

7 /* for creating built-in cursors */
12 unsigned int width, height, colors, chars; in cursor_parse_xpm() local
17 /* parse header line: width, height, #colors, #chars */ in cursor_parse_xpm()
19 &width, &height, &colors, &chars) != 4) { in cursor_parse_xpm()
24 if (chars != 1) { in cursor_parse_xpm()
25 fprintf(stderr, "%s: chars != 1 not supported\n", __func__); in cursor_parse_xpm()
48 c = cursor_alloc(width, height); in cursor_parse_xpm()
54 c->data[pixel] = ctab[idx]; in cursor_parse_xpm()
63 uint32_t *data = c->data; in cursor_print_ascii_art()
66 for (y = 0; y < c->height; y++) { in cursor_print_ascii_art()
68 for (x = 0; x < c->width; x++, data++) { in cursor_print_ascii_art()
93 QEMUCursor *cursor_alloc(uint16_t width, uint16_t height) in cursor_alloc() argument
96 size_t datasize = width * height * sizeof(uint32_t); in cursor_alloc()
99 if (width > 512 || height > 512) { in cursor_alloc()
104 c->width = width; in cursor_alloc()
105 c->height = height; in cursor_alloc()
106 c->refcount = 1; in cursor_alloc()
112 c->refcount++; in cursor_ref()
120 c->refcount--; in cursor_unref()
121 if (c->refcount) in cursor_unref()
128 return DIV_ROUND_UP(c->width, 8); in cursor_get_mono_bpl()
135 uint32_t *data = c->data; in cursor_set_mono()
144 * https://docs.microsoft.com/en-us/windows-hardware/drivers/display/drawing-monochrome-pointers in cursor_set_mono()
147 for (y = 0; y < c->height; y++) { in cursor_set_mono()
149 for (x = 0; x < c->width; x++, data++) { in cursor_set_mono()
179 data = c->data; in cursor_set_mono()
180 for (y = 0; y < c->height; y++) { in cursor_set_mono()
181 for (x = 0; x < c->width; x++, data++) { in cursor_set_mono()
183 ((x > 0 && data[-1] == inverted) || in cursor_set_mono()
184 (x + 1 < c->width && data[1] == inverted) || in cursor_set_mono()
185 (y > 0 && data[-c->width] == inverted) || in cursor_set_mono()
186 (y + 1 < c->height && data[c->width] == inverted))) { in cursor_set_mono()
191 data = c->data; in cursor_set_mono()
192 for (x = 0; x < c->width * c->height; x++, data++) { in cursor_set_mono()
202 uint32_t *data = c->data; in cursor_get_mono_mask()
207 memset(mask, 0, bpl * c->height); in cursor_get_mono_mask()
208 for (y = 0; y < c->height; y++) { in cursor_get_mono_mask()
210 for (x = 0; x < c->width; x++, data++) { in cursor_get_mono_mask()