27#ifdef WITH_DEBUG_SEAMLESS
28#define DEBUG_SEAMLESS(args) printf args;
30#define DEBUG_SEAMLESS(args)
61 char *tok1, *tok2, *tok3, *tok4, *tok5, *tok6, *tok7, *tok8;
79 if (!
strcmp(
"CREATE", tok1))
103 else if (!
strcmp(
"DESTROY", tok1))
108 id =
strtoul(tok3, &endptr, 0);
119 else if (!
strcmp(
"DESTROYGRP", tok1))
124 id =
strtoul(tok3, &endptr, 0);
134 else if (!
strcmp(
"SETICON", tok1))
136 unimpl(
"SeamlessRDP SETICON1\n");
138 else if (!
strcmp(
"POSITION", tok1))
145 id =
strtoul(tok3, &endptr, 0);
169 else if (!
strcmp(
"ZCHANGE", tok1))
171 unsigned long behind;
173 id =
strtoul(tok3, &endptr, 0);
177 behind =
strtoul(tok4, &endptr, 0);
187 else if (!
strcmp(
"TITLE", tok1))
192 id =
strtoul(tok3, &endptr, 0);
202 else if (!
strcmp(
"STATE", tok1))
209 id =
strtoul(tok3, &endptr, 0);
223 else if (!
strcmp(
"DEBUG", tok1))
227 else if (!
strcmp(
"SYNCBEGIN", tok1))
238 else if (!
strcmp(
"SYNCEND", tok1))
249 else if (!
strcmp(
"HELLO", tok1))
260 else if (!
strcmp(
"ACK", tok1))
270 else if (!
strcmp(
"HIDE", tok1))
281 else if (!
strcmp(
"UNHIDE", tok1))
304 warning(
"SeamlessRDP: Invalid request:%s\n",
line);
314 static char *rest =
NULL;
317 pkglen =
s->end -
s->p;
322 printf(
"seamless recv:\n");
335 if (!
This->seamless_rdp)
338 This->seamless.serial = 0;
340 This->seamless.channel =
343 return (
This->seamless.channel !=
NULL);
376 printf(
"seamless send:\n");
377 hexdump(
s->channel_hdr + 8,
s->end -
s->channel_hdr - 8);
382 return This->seamless.serial++;
389 if (!
This->seamless_rdp)
390 return (
unsigned int) -1;
399 if (!
This->seamless_rdp)
400 return (
unsigned int) -1;
409 return seamless_send(
This,
"POSITION",
"0x%08lx,%d,%d,%d,%d,0x%lx",
id,
x,
y,
width,
height,
420 if (
This->seamless_rdp)
434 if (!
This->seamless_rdp)
435 return (
unsigned int) -1;
445 if (!
This->seamless_rdp)
446 return (
unsigned int) -1;
int strcmp(const char *String1, const char *String2)
UINT32 strtoul(const char *String, char **Terminator, UINT32 Base)
char * strchr(const char *String, int ch)
struct outqueuenode * head
VCHANNEL * channel_register(char *name, uint32 flags, void(*callback)(STREAM))
STREAM channel_init(VCHANNEL *channel, uint32 length)
void channel_send(STREAM s, VCHANNEL *channel)
#define SEAMLESSRDP_POSITION_TIMER
#define CHANNEL_OPTION_ENCRYPT_RDP
#define CHANNEL_OPTION_INITIALIZED
#define SEAMLESSRDP_HELLO_HIDDEN
#define out_uint8p(s, v, n)
void ui_seamless_destroy_window(unsigned long id, unsigned long flags)
void ui_seamless_create_window(unsigned long id, unsigned long group, unsigned long parent, unsigned long flags)
void ui_seamless_hide_desktop(void)
RD_BOOL seamless_init(void)
char * xstrdup(const char *s)
void ui_seamless_settitle(unsigned long id, const char *title, unsigned long flags)
void ui_seamless_unhide_desktop(void)
void ui_seamless_restack_window(unsigned long id, unsigned long behind, unsigned long flags)
void unimpl(char *format,...)
RD_BOOL str_handle_lines(const char *input, char **rest, str_handle_lines_t linehandler, void *data)
void ui_seamless_destroy_group(unsigned long id, unsigned long flags)
void ui_seamless_setstate(unsigned long id, unsigned int state, unsigned long flags)
unsigned int seamless_send_sync(void)
void ui_seamless_ack(unsigned int serial)
void hexdump(unsigned char *p, unsigned int len)
void ui_seamless_begin(RD_BOOL hidden)
void ui_seamless_move_window(unsigned long id, int x, int y, int width, int height, unsigned long flags)
void ui_seamless_syncbegin(unsigned long flags)
#define timercmp(tvp, uvp, cmp)
#define STRNCPY(dst, src, n)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLuint GLenum GLsizei const GLchar * buf
_Check_return_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
unsigned int seamless_send_position(RDPCLIENT *This, unsigned long id, int x, int y, int width, int height, unsigned long flags)
static BOOL seamless_process_line(RDPCLIENT *This, const char *line, void *data)
#define DEBUG_SEAMLESS(args)
unsigned int seamless_send_focus(RDPCLIENT *This, unsigned long id, unsigned long flags)
unsigned int seamless_send_zchange(RDPCLIENT *This, unsigned long id, unsigned long below, unsigned long flags)
static BOOL seamless_line_handler(RDPCLIENT *This, const char *line, void *data)
static char * seamless_get_token(char **s)
unsigned int seamless_send_state(RDPCLIENT *This, unsigned long id, unsigned int state, unsigned long flags)
static unsigned int seamless_send(RDPCLIENT *This, const char *command, const char *format,...)
void seamless_select_timeout(RDPCLIENT *This, struct timeval *tv)
static void seamless_process(RDPCLIENT *This, STREAM s)