Esempio n. 1
0
/* Process a colour pointer PDU */
static void
process_colour_pointer_common(STREAM s, int bpp)
{
    uint16 width, height, cache_idx, masklen, datalen;
    uint16 x, y;
    uint8 *mask;
    uint8 *data;
    RD_HCURSOR cursor;

    in_uint16_le(s, cache_idx);
    in_uint16_le(s, x);
    in_uint16_le(s, y);
    in_uint16_le(s, width);
    in_uint16_le(s, height);
    in_uint16_le(s, masklen);
    in_uint16_le(s, datalen);
    in_uint8p(s, data, datalen);
    in_uint8p(s, mask, masklen);
    if ((width != 32) || (height != 32))
    {
        warning("process_colour_pointer_common: " "width %d height %d\n", width, height);
    }

    /* keep hotspot within cursor bounding box */
    x = MIN(x, width - 1);
    y = MIN(y, height - 1);
    cursor = ui_create_cursor(x, y, width, height, mask, data, bpp);
    ui_set_cursor(cursor);
    cache_put_cursor(cache_idx, cursor);
}
Esempio n. 2
0
/* Process a colour pointer PDU */
static void process_colour_pointer_common(STREAM s, int bpp) {
	uint16 width, height, cache_idx, masklen, datalen;
	sint16 x, y;
	uint8 *mask;
	uint8 *data;
	RD_HCURSOR cursor;

	in_uint16_le(s, cache_idx);
	in_uint16_le(s, x);
	in_uint16_le(s, y);
	in_uint16_le(s, width);
	in_uint16_le(s, height);
	in_uint16_le(s, masklen);
	in_uint16_le(s, datalen);
	in_uint8p(s, data, datalen);
	in_uint8p(s, mask, masklen);
	if ((width != 32) || (height != 32)) {
		warning("process_colour_pointer_common: " "width %d height %d\n",
				width, height);
	}
	/* sometimes x or y is out of bounds */
	x = MAX(x, 0);
	x = MIN(x, width - 1);
	y = MAX(y, 0);
	y = MIN(y, height - 1);
	// TODO cursor = ui_create_cursor(x, y, width, height, mask, data, bpp);
	// TODO ui_set_cursor(cursor);
	cache_put_cursor(cache_idx, cursor);
}
Esempio n. 3
0
File: rdp.c Progetto: RPG-7/reactos
/* Process a colour pointer PDU */
void
process_colour_pointer_pdu(STREAM s)
{
	uint16 x, y, width, height, cache_idx, masklen, datalen;
	uint8 *mask, *data;
	HCURSOR cursor;

	in_uint16_le(s, cache_idx);
	in_uint16_le(s, x);
	in_uint16_le(s, y);
	in_uint16_le(s, width);
	in_uint16_le(s, height);
	in_uint16_le(s, masklen);
	in_uint16_le(s, datalen);
	in_uint8p(s, data, datalen);
	in_uint8p(s, mask, masklen);
	cursor = ui_create_cursor(x, y, width, height, mask, data);
	ui_set_cursor(cursor);
	cache_put_cursor(cache_idx, cursor);
}