gfx/pointer: add support to set pointer

Extend rdp_pointer with function SetPosition. Can then be used by
clients support setting pointer by server which might be used in
shadowing scenarios.
This commit is contained in:
Bernhard Miklautz 2015-01-13 17:12:02 +01:00
parent ee17750633
commit d625edbe97
3 changed files with 10 additions and 2 deletions

View File

@ -88,6 +88,7 @@ typedef void (*pPointer_Free)(rdpContext* context, rdpPointer* pointer);
typedef void (*pPointer_Set)(rdpContext* context, rdpPointer* pointer);
typedef void (*pPointer_SetNull)(rdpContext* context);
typedef void (*pPointer_SetDefault)(rdpContext* context);
typedef void (*pPointer_SetPosition)(rdpContext* context, UINT32 x, UINT32 y);
struct rdp_pointer
{
@ -97,7 +98,8 @@ struct rdp_pointer
pPointer_Set Set; /* 3 */
pPointer_SetNull SetNull; /* 4*/
pPointer_SetDefault SetDefault; /* 5 */
UINT32 paddingA[16 - 6]; /* 6 */
pPointer_SetPosition SetPosition; /* 6 */
UINT32 paddingA[16 - 7]; /* 7 */
UINT32 xPos; /* 16 */
UINT32 yPos; /* 17 */
@ -117,6 +119,7 @@ FREERDP_API void Pointer_Free(rdpContext* context, rdpPointer* pointer);
FREERDP_API void Pointer_Set(rdpContext* context, rdpPointer* pointer);
FREERDP_API void Pointer_SetNull(rdpContext* context);
FREERDP_API void Pointer_SetDefault(rdpContext* context);
FREERDP_API void Pointer_SetPosition(rdpContext* context, UINT32 x, UINT32 y);
/* Glyph Class */

View File

@ -35,7 +35,7 @@
void update_pointer_position(rdpContext* context, POINTER_POSITION_UPDATE* pointer_position)
{
Pointer_SetPosition(context, pointer_position->xPos, pointer_position->yPos);
}
void update_pointer_system(rdpContext* context, POINTER_SYSTEM_UPDATE* pointer_system)

View File

@ -148,6 +148,11 @@ void Pointer_SetDefault(rdpContext* context)
context->graphics->Pointer_Prototype->SetDefault(context);
}
void Pointer_SetPosition(rdpContext* context, UINT32 x, UINT32 y)
{
IFCALL(context->graphics->Pointer_Prototype->SetPosition, context, x, y);
}
void graphics_register_pointer(rdpGraphics* graphics, rdpPointer* pointer)
{
CopyMemory(graphics->Pointer_Prototype, pointer, sizeof(rdpPointer));