245 |
while (out < end) |
while (out < end) |
246 |
{ |
{ |
247 |
value = (uint16) g_colmap[*(data++)]; |
value = (uint16) g_colmap[*(data++)]; |
248 |
|
|
249 |
if (g_xserver_be) |
if (g_xserver_be) |
250 |
{ |
{ |
251 |
*(out++) = value >> 8; |
*(out++) = value >> 8; |
268 |
while (out < end) |
while (out < end) |
269 |
{ |
{ |
270 |
value = g_colmap[*(data++)]; |
value = g_colmap[*(data++)]; |
271 |
|
|
272 |
if (g_xserver_be) |
if (g_xserver_be) |
273 |
{ |
{ |
274 |
*(out++) = value >> 16; |
*(out++) = value >> 16; |
408 |
} |
} |
409 |
|
|
410 |
static void |
static void |
411 |
translate16to16(uint16 * data, uint16 * out, uint16 * end) |
translate16to16(uint16 * data, uint8 * out, uint8 * end) |
412 |
{ |
{ |
413 |
|
uint16 pixel; |
414 |
uint16 value; |
uint16 value; |
415 |
|
|
416 |
if (g_xserver_be) |
while (out < end) |
417 |
{ |
{ |
418 |
while (out < end) |
pixel = *(data++); |
419 |
|
|
420 |
|
if (g_host_be) |
421 |
{ |
{ |
422 |
value = *data; |
BSWAP16(pixel); |
|
BSWAP16(value); |
|
|
*out = value; |
|
|
data++; |
|
|
out++; |
|
423 |
} |
} |
424 |
|
|
425 |
} |
value = make_colour(split_colour16(pixel)); |
426 |
else |
|
427 |
{ |
if (g_xserver_be) |
428 |
while (out < end) |
{ |
429 |
|
*(out++) = value >> 8; |
430 |
|
*(out++) = value; |
431 |
|
} |
432 |
|
else |
433 |
{ |
{ |
434 |
*out = *data; |
*(out++) = value; |
435 |
out++; |
*(out++) = value >> 8; |
|
data++; |
|
436 |
} |
} |
437 |
} |
} |
438 |
} |
} |
439 |
|
|
|
|
|
440 |
static void |
static void |
441 |
translate16to24(uint16 * data, uint8 * out, uint8 * end) |
translate16to24(uint16 * data, uint8 * out, uint8 * end) |
442 |
{ |
{ |
592 |
translate16to24((uint16 *) data, out, end); |
translate16to24((uint16 *) data, out, end); |
593 |
break; |
break; |
594 |
case 16: |
case 16: |
595 |
translate16to16((uint16 *) data, (uint16 *) out, |
translate16to16((uint16 *) data, out, end); |
|
(uint16 *) end); |
|
596 |
break; |
break; |
597 |
} |
} |
598 |
break; |
break; |
700 |
|
|
701 |
g_visual = vi.visual; |
g_visual = vi.visual; |
702 |
g_owncolmap = False; |
g_owncolmap = False; |
703 |
calculate_shifts(vi.red_mask, &g_red_shift_r, &g_red_shift_l); |
calculate_shifts(vi.red_mask, &g_red_shift_r, &g_red_shift_l); |
704 |
calculate_shifts(vi.blue_mask, &g_blue_shift_r, &g_blue_shift_l); |
calculate_shifts(vi.blue_mask, &g_blue_shift_r, &g_blue_shift_l); |
705 |
calculate_shifts(vi.green_mask, &g_green_shift_r, &g_green_shift_l); |
calculate_shifts(vi.green_mask, &g_green_shift_r, &g_green_shift_l); |
706 |
} |
} |
707 |
|
|
821 |
|
|
822 |
#define NULL_POINTER_MASK "\x80" |
#define NULL_POINTER_MASK "\x80" |
823 |
#define NULL_POINTER_DATA "\x0\x0\x0" |
#define NULL_POINTER_DATA "\x0\x0\x0" |
824 |
|
|
825 |
BOOL |
BOOL |
826 |
ui_create_window(void) |
ui_create_window(void) |
827 |
{ |
{ |
916 |
ui_destroy_window(void) |
ui_destroy_window(void) |
917 |
{ |
{ |
918 |
ui_destroy_cursor(g_null_cursor); |
ui_destroy_cursor(g_null_cursor); |
919 |
|
|
920 |
if (g_IC != NULL) |
if (g_IC != NULL) |
921 |
XDestroyIC(g_IC); |
XDestroyIC(g_IC); |
922 |
|
|