1 |
/* -*- c-basic-offset: 8 -*- |
/* -*- c-basic-offset: 8 -*- |
2 |
rdesktop: A Remote Desktop Protocol client. |
rdesktop: A Remote Desktop Protocol client. |
3 |
Seamless Windows support |
Seamless Windows support |
4 |
Copyright (C) Peter Astrand <astrand@cendio.se> 2005-2007 |
Copyright 2005-2007 Peter Astrand <astrand@cendio.se> for Cendio AB |
5 |
|
Copyright 2007 Pierre Ossman <ossman@cendio.se> for Cendio AB |
6 |
|
|
7 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
8 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
32 |
extern RD_BOOL g_seamless_rdp; |
extern RD_BOOL g_seamless_rdp; |
33 |
static VCHANNEL *seamless_channel; |
static VCHANNEL *seamless_channel; |
34 |
static unsigned int seamless_serial; |
static unsigned int seamless_serial; |
35 |
|
static char icon_buf[1024]; |
36 |
|
|
37 |
static char * |
static char * |
38 |
seamless_get_token(char **s) |
seamless_get_token(char **s) |
137 |
} |
} |
138 |
else if (!strcmp("SETICON", tok1)) |
else if (!strcmp("SETICON", tok1)) |
139 |
{ |
{ |
140 |
unimpl("SeamlessRDP SETICON1\n"); |
int chunk, width, height, len; |
141 |
|
char byte[3]; |
142 |
|
|
143 |
|
if (!tok8) |
144 |
|
return False; |
145 |
|
|
146 |
|
id = strtoul(tok3, &endptr, 0); |
147 |
|
if (*endptr) |
148 |
|
return False; |
149 |
|
|
150 |
|
chunk = strtoul(tok4, &endptr, 0); |
151 |
|
if (*endptr) |
152 |
|
return False; |
153 |
|
|
154 |
|
width = strtoul(tok6, &endptr, 0); |
155 |
|
if (*endptr) |
156 |
|
return False; |
157 |
|
|
158 |
|
height = strtoul(tok7, &endptr, 0); |
159 |
|
if (*endptr) |
160 |
|
return False; |
161 |
|
|
162 |
|
byte[2] = '\0'; |
163 |
|
len = 0; |
164 |
|
while (*tok8 != '\0') |
165 |
|
{ |
166 |
|
byte[0] = *tok8; |
167 |
|
tok8++; |
168 |
|
if (*tok8 == '\0') |
169 |
|
return False; |
170 |
|
byte[1] = *tok8; |
171 |
|
tok8++; |
172 |
|
|
173 |
|
icon_buf[len] = strtol(byte, NULL, 16); |
174 |
|
len++; |
175 |
|
} |
176 |
|
|
177 |
|
ui_seamless_seticon(id, tok5, width, height, chunk, icon_buf, len); |
178 |
|
} |
179 |
|
else if (!strcmp("DELICON", tok1)) |
180 |
|
{ |
181 |
|
int width, height; |
182 |
|
|
183 |
|
if (!tok6) |
184 |
|
return False; |
185 |
|
|
186 |
|
id = strtoul(tok3, &endptr, 0); |
187 |
|
if (*endptr) |
188 |
|
return False; |
189 |
|
|
190 |
|
width = strtoul(tok5, &endptr, 0); |
191 |
|
if (*endptr) |
192 |
|
return False; |
193 |
|
|
194 |
|
height = strtoul(tok6, &endptr, 0); |
195 |
|
if (*endptr) |
196 |
|
return False; |
197 |
|
|
198 |
|
ui_seamless_delicon(id, tok4, width, height); |
199 |
} |
} |
200 |
else if (!strcmp("POSITION", tok1)) |
else if (!strcmp("POSITION", tok1)) |
201 |
{ |
{ |