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-2006 |
Copyright (C) Peter Astrand <astrand@cendio.se> 2005-2007 |
5 |
|
|
6 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
7 |
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 |
8 |
the Free Software Foundation; either version 2 of the License, or |
the Free Software Foundation; either version 2 of the License, or |
9 |
(at your option) any later version. |
(at your option) any later version. |
10 |
|
|
11 |
This program is distributed in the hope that it will be useful, |
This program is distributed in the hope that it will be useful, |
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
GNU General Public License for more details. |
GNU General Public License for more details. |
15 |
|
|
16 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License |
17 |
along with this program; if not, write to the Free Software |
along with this program; if not, write to the Free Software |
18 |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 |
#include <stdarg.h> |
#include <stdarg.h> |
23 |
#include <assert.h> |
#include <assert.h> |
24 |
|
|
|
/* #define WITH_DEBUG_SEAMLESS */ |
|
|
|
|
25 |
#ifdef WITH_DEBUG_SEAMLESS |
#ifdef WITH_DEBUG_SEAMLESS |
26 |
#define DEBUG_SEAMLESS(args) printf args; |
#define DEBUG_SEAMLESS(args) printf args; |
27 |
#else |
#else |
28 |
#define DEBUG_SEAMLESS(args) |
#define DEBUG_SEAMLESS(args) |
29 |
#endif |
#endif |
30 |
|
|
31 |
extern BOOL g_seamless_rdp; |
extern RD_BOOL g_seamless_rdp; |
32 |
static VCHANNEL *seamless_channel; |
static VCHANNEL *seamless_channel; |
33 |
static unsigned int seamless_serial; |
static unsigned int seamless_serial; |
34 |
|
|
56 |
} |
} |
57 |
|
|
58 |
|
|
59 |
static BOOL |
static RD_BOOL |
60 |
seamless_process_line(const char *line, void *data) |
seamless_process_line(const char *line, void *data) |
61 |
{ |
{ |
62 |
char *p, *l; |
char *p, *l; |
118 |
ui_seamless_destroy_window(id, flags); |
ui_seamless_destroy_window(id, flags); |
119 |
|
|
120 |
} |
} |
121 |
|
else if (!strcmp("DESTROYGRP", tok1)) |
122 |
|
{ |
123 |
|
if (!tok4) |
124 |
|
return False; |
125 |
|
|
126 |
|
id = strtoul(tok3, &endptr, 0); |
127 |
|
if (*endptr) |
128 |
|
return False; |
129 |
|
|
130 |
|
flags = strtoul(tok4, &endptr, 0); |
131 |
|
if (*endptr) |
132 |
|
return False; |
133 |
|
|
134 |
|
ui_seamless_destroy_group(id, flags); |
135 |
|
} |
136 |
else if (!strcmp("SETICON", tok1)) |
else if (!strcmp("SETICON", tok1)) |
137 |
{ |
{ |
138 |
unimpl("SeamlessRDP SETICON1\n"); |
unimpl("SeamlessRDP SETICON1\n"); |
224 |
} |
} |
225 |
else if (!strcmp("DEBUG", tok1)) |
else if (!strcmp("DEBUG", tok1)) |
226 |
{ |
{ |
227 |
printf("SeamlessRDP:%s\n", line); |
DEBUG_SEAMLESS(("SeamlessRDP:%s\n", line)); |
228 |
} |
} |
229 |
else if (!strcmp("SYNCBEGIN", tok1)) |
else if (!strcmp("SYNCBEGIN", tok1)) |
230 |
{ |
{ |
298 |
} |
} |
299 |
|
|
300 |
|
|
301 |
static BOOL |
static RD_BOOL |
302 |
seamless_line_handler(const char *line, void *data) |
seamless_line_handler(const char *line, void *data) |
303 |
{ |
{ |
304 |
if (!seamless_process_line(line, data)) |
if (!seamless_process_line(line, data)) |
331 |
} |
} |
332 |
|
|
333 |
|
|
334 |
BOOL |
RD_BOOL |
335 |
seamless_init(void) |
seamless_init(void) |
336 |
{ |
{ |
337 |
if (!g_seamless_rdp) |
if (!g_seamless_rdp) |