From 12f7cd64f1642130b82f112b57e7a7993932cf1f Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Mon, 18 Mar 2013 23:43:17 -0700 Subject: work on new(color) cursors --- xorg/X11R7.6/rdp/rdpup.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'xorg/X11R7.6/rdp/rdpup.c') diff --git a/xorg/X11R7.6/rdp/rdpup.c b/xorg/X11R7.6/rdp/rdpup.c index d1d654de..78263b55 100644 --- a/xorg/X11R7.6/rdp/rdpup.c +++ b/xorg/X11R7.6/rdp/rdpup.c @@ -1,5 +1,5 @@ /* -Copyright 2005-2012 Jay Sorg +Copyright 2005-2013 Jay Sorg Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that @@ -1365,6 +1365,36 @@ rdpup_set_cursor(short x, short y, char *cur_data, char *cur_mask) return 0; } +/******************************************************************************/ +int +rdpup_set_cursor_ex(short x, short y, char *cur_data, char *cur_mask, int bpp) +{ + int size; + int Bpp; + + if (g_connected) + { + LLOGLN(10, (" rdpup_set_cursor_ex")); + Bpp = (bpp == 0) ? 3 : (bpp + 7) / 8; + size = 10 + 32 * (32 * Bpp) + 32 * (32 / 8); + rdpup_pre_check(size); + out_uint16_le(g_out_s, 51); /* set cursor ex */ + out_uint16_le(g_out_s, size); /* size */ + g_count++; + x = MAX(0, x); + x = MIN(31, x); + y = MAX(0, y); + y = MIN(31, y); + out_uint16_le(g_out_s, x); + out_uint16_le(g_out_s, y); + out_uint16_le(g_out_s, bpp); + out_uint8a(g_out_s, cur_data, 32 * (32 * Bpp)); + out_uint8a(g_out_s, cur_mask, 32 * (32 / 8)); + } + + return 0; +} + /******************************************************************************/ int rdpup_create_os_surface(int rdpindex, int width, int height) -- cgit v1.2.1