mirror of https://github.com/FreeRDP/FreeRDP
server: add sync and pointer update.
This commit is contained in:
parent
0f380a8817
commit
41f16251ed
|
@ -851,6 +851,9 @@ typedef struct _SURFACE_BITS_COMMAND SURFACE_BITS_COMMAND;
|
|||
#define PTR_MSG_TYPE_CACHED 0x0007
|
||||
#define PTR_MSG_TYPE_POINTER 0x0008
|
||||
|
||||
#define SYSPTR_NULL 0x00000000
|
||||
#define SYSPTR_DEFAULT 0x00007F00
|
||||
|
||||
#define CACHED_BRUSH 0x80
|
||||
|
||||
#define BMF_1BPP 0x1
|
||||
|
|
|
@ -33,7 +33,7 @@ enum SURFCMD_CMDTYPE
|
|||
CMDTYPE_STREAM_SURFACE_BITS = 0x0006
|
||||
};
|
||||
|
||||
enum SURFCMD_FRAME_ACTION
|
||||
enum SURFCMD_FRAMEACTION
|
||||
{
|
||||
SURFACECMD_FRAMEACTION_BEGIN = 0x0000,
|
||||
SURFACECMD_FRAMEACTION_END = 0x0001
|
||||
|
|
|
@ -330,10 +330,38 @@ static void update_send_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* su
|
|||
fastpath_send_surfcmd_surface_bits(rdp->fastpath, surface_bits_command);
|
||||
}
|
||||
|
||||
static void update_send_synchronize(rdpUpdate* update)
|
||||
{
|
||||
rdpRdp* rdp = (rdpRdp*)update->rdp;
|
||||
STREAM* s;
|
||||
|
||||
s = fastpath_update_pdu_init(rdp->fastpath);
|
||||
stream_write_uint8(s, FASTPATH_UPDATETYPE_SYNCHRONIZE); /* updateHeader (1 byte) */
|
||||
stream_write_uint16(s, 0); /* size (2 bytes) */
|
||||
fastpath_send_update_pdu(rdp->fastpath, s);
|
||||
}
|
||||
|
||||
static void update_send_pointer_system(rdpUpdate* update, POINTER_SYSTEM_UPDATE* pointer_system)
|
||||
{
|
||||
rdpRdp* rdp = (rdpRdp*)update->rdp;
|
||||
STREAM* s;
|
||||
|
||||
s = fastpath_update_pdu_init(rdp->fastpath);
|
||||
/* updateHeader (1 byte) */
|
||||
if (pointer_system->type == SYSPTR_NULL)
|
||||
stream_write_uint8(s, FASTPATH_UPDATETYPE_PTR_NULL);
|
||||
else
|
||||
stream_write_uint8(s, FASTPATH_UPDATETYPE_PTR_DEFAULT);
|
||||
stream_write_uint16(s, 0); /* size (2 bytes) */
|
||||
fastpath_send_update_pdu(rdp->fastpath, s);
|
||||
}
|
||||
|
||||
void update_register_server_callbacks(rdpUpdate* update)
|
||||
{
|
||||
update->BeginPaint = update_begin_paint;
|
||||
update->EndPaint = update_end_paint;
|
||||
update->Synchronize = update_send_synchronize;
|
||||
update->PointerSystem = update_send_pointer_system;
|
||||
update->SurfaceBits = update_send_surface_bits;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue