Basic infrastructure for receiving seamless ACK:s.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/branches/seamlessrdp-branch/rdesktop@1165 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
56b4c2714a
commit
62b1c67758
13
proto.h
13
proto.h
@ -282,17 +282,18 @@ void ui_seamless_restack_window(unsigned long id, unsigned long behind, unsigned
|
|||||||
void ui_seamless_settitle(unsigned long id, const char *title, unsigned long flags);
|
void ui_seamless_settitle(unsigned long id, const char *title, unsigned long flags);
|
||||||
void ui_seamless_setstate(unsigned long id, unsigned int state, unsigned long flags);
|
void ui_seamless_setstate(unsigned long id, unsigned int state, unsigned long flags);
|
||||||
void ui_seamless_syncbegin(unsigned long flags);
|
void ui_seamless_syncbegin(unsigned long flags);
|
||||||
|
void ui_seamless_ack(unsigned int serial);
|
||||||
/* lspci.c */
|
/* lspci.c */
|
||||||
BOOL lspci_init(void);
|
BOOL lspci_init(void);
|
||||||
/* seamless.c */
|
/* seamless.c */
|
||||||
BOOL seamless_init(void);
|
BOOL seamless_init(void);
|
||||||
void seamless_send_sync(void);
|
unsigned int seamless_send_sync(void);
|
||||||
void seamless_send_state(unsigned long id, unsigned int state, unsigned long flags);
|
unsigned int seamless_send_state(unsigned long id, unsigned int state, unsigned long flags);
|
||||||
void seamless_send_position(unsigned long id, int x, int y, int width, int height,
|
unsigned int seamless_send_position(unsigned long id, int x, int y, int width, int height,
|
||||||
unsigned long flags);
|
unsigned long flags);
|
||||||
void seamless_select_timeout(struct timeval *tv);
|
void seamless_select_timeout(struct timeval *tv);
|
||||||
void seamless_send_zchange(unsigned long id, unsigned long below, unsigned long flags);
|
unsigned int seamless_send_zchange(unsigned long id, unsigned long below, unsigned long flags);
|
||||||
void seamless_send_focus(unsigned long id, unsigned long flags);
|
unsigned int seamless_send_focus(unsigned long id, unsigned long flags);
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
45
seamless.c
45
seamless.c
@ -242,6 +242,16 @@ seamless_process_line(const char *line, void *data)
|
|||||||
|
|
||||||
ui_seamless_begin();
|
ui_seamless_begin();
|
||||||
}
|
}
|
||||||
|
else if (!strcmp("ACK", tok1))
|
||||||
|
{
|
||||||
|
unsigned int serial;
|
||||||
|
|
||||||
|
serial = strtoul(tok3, &endptr, 0);
|
||||||
|
if (*endptr)
|
||||||
|
return False;
|
||||||
|
|
||||||
|
ui_seamless_ack(serial);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
xfree(l);
|
xfree(l);
|
||||||
@ -297,7 +307,7 @@ seamless_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static unsigned int
|
||||||
seamless_send(const char *command, const char *format, ...)
|
seamless_send(const char *command, const char *format, ...)
|
||||||
{
|
{
|
||||||
STREAM s;
|
STREAM s;
|
||||||
@ -323,8 +333,6 @@ seamless_send(const char *command, const char *format, ...)
|
|||||||
s = channel_init(seamless_channel, len);
|
s = channel_init(seamless_channel, len);
|
||||||
out_uint8p(s, buf, len) s_mark_end(s);
|
out_uint8p(s, buf, len) s_mark_end(s);
|
||||||
|
|
||||||
seamless_serial++;
|
|
||||||
|
|
||||||
DEBUG_SEAMLESS(("SeamlessRDP sending:%s", buf));
|
DEBUG_SEAMLESS(("SeamlessRDP sending:%s", buf));
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -333,33 +341,36 @@ seamless_send(const char *command, const char *format, ...)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
channel_send(s, seamless_channel);
|
channel_send(s, seamless_channel);
|
||||||
|
|
||||||
|
return seamless_serial++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
unsigned int
|
||||||
seamless_send_sync()
|
seamless_send_sync()
|
||||||
{
|
{
|
||||||
if (!g_seamless_rdp)
|
if (!g_seamless_rdp)
|
||||||
return;
|
return (unsigned int) -1;
|
||||||
|
|
||||||
seamless_send("SYNC", "");
|
return seamless_send("SYNC", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
unsigned int
|
||||||
seamless_send_state(unsigned long id, unsigned int state, unsigned long flags)
|
seamless_send_state(unsigned long id, unsigned int state, unsigned long flags)
|
||||||
{
|
{
|
||||||
if (!g_seamless_rdp)
|
if (!g_seamless_rdp)
|
||||||
return;
|
return (unsigned int) -1;
|
||||||
|
|
||||||
seamless_send("STATE", "0x%08lx,0x%x,0x%lx", id, state, flags);
|
return seamless_send("STATE", "0x%08lx,0x%x,0x%lx", id, state, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
unsigned int
|
||||||
seamless_send_position(unsigned long id, int x, int y, int width, int height, unsigned long flags)
|
seamless_send_position(unsigned long id, int x, int y, int width, int height, unsigned long flags)
|
||||||
{
|
{
|
||||||
seamless_send("POSITION", "0x%08lx,%d,%d,%d,%d,0x%lx", id, x, y, width, height, flags);
|
return seamless_send("POSITION", "0x%08lx,%d,%d,%d,%d,0x%lx", id, x, y, width, height,
|
||||||
|
flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -379,21 +390,21 @@ seamless_select_timeout(struct timeval *tv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
unsigned int
|
||||||
seamless_send_zchange(unsigned long id, unsigned long below, unsigned long flags)
|
seamless_send_zchange(unsigned long id, unsigned long below, unsigned long flags)
|
||||||
{
|
{
|
||||||
if (!g_seamless_rdp)
|
if (!g_seamless_rdp)
|
||||||
return;
|
return (unsigned int) -1;
|
||||||
|
|
||||||
seamless_send("ZCHANGE", "0x%08lx,0x%08lx,0x%lx", id, below, flags);
|
return seamless_send("ZCHANGE", "0x%08lx,0x%08lx,0x%lx", id, below, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
unsigned int
|
||||||
seamless_send_focus(unsigned long id, unsigned long flags)
|
seamless_send_focus(unsigned long id, unsigned long flags)
|
||||||
{
|
{
|
||||||
if (!g_seamless_rdp)
|
if (!g_seamless_rdp)
|
||||||
return;
|
return (unsigned int) -1;
|
||||||
|
|
||||||
seamless_send("FOCUS", "0x%08lx,0x%lx", id, flags);
|
return seamless_send("FOCUS", "0x%08lx,0x%lx", id, flags);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user