mirror of https://github.com/FreeRDP/FreeRDP
core: added OnPan, xfreerdp: modified special keys
This commit is contained in:
parent
e4dfa00c27
commit
1640652ee0
|
@ -284,12 +284,17 @@ BOOL xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym)
|
|||
|| xf_kbd_key_pressed(xfi,
|
||||
XK_Control_R)))
|
||||
{
|
||||
/*
|
||||
xfi->offset_x -= 5;
|
||||
|
||||
xf_transform_window(xfi);
|
||||
|
||||
xf_draw_screen_scaled(xfi, 0, 0, 0, 0, FALSE);
|
||||
printf("pan left : %d\n", xfi->offset_x);
|
||||
*/
|
||||
|
||||
IFCALL(xfi->client->OnPan, xfi->instance, -5, 0);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -302,15 +307,19 @@ BOOL xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym)
|
|||
|| xf_kbd_key_pressed(xfi,
|
||||
XK_Control_R)))
|
||||
{
|
||||
xfi->offset_x += 5;
|
||||
/*
|
||||
if (xfi->offset_x > 0)
|
||||
xfi->offset_x = 0;
|
||||
*/
|
||||
xfi->offset_x += 5;
|
||||
|
||||
//if (xfi->offset_x > 0)
|
||||
// xfi->offset_x = 0;
|
||||
|
||||
xf_transform_window(xfi);
|
||||
|
||||
xf_draw_screen_scaled(xfi, 0, 0, 0, 0, FALSE);
|
||||
printf("pan right : %d\n", xfi->offset_x);
|
||||
*/
|
||||
|
||||
IFCALL(xfi->client->OnPan, xfi->instance, 5, 0);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -323,12 +332,15 @@ BOOL xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym)
|
|||
|| xf_kbd_key_pressed(xfi,
|
||||
XK_Control_R)))
|
||||
{
|
||||
/*
|
||||
xfi->offset_y -= 5;
|
||||
|
||||
xf_transform_window(xfi);
|
||||
|
||||
xf_draw_screen_scaled(xfi, 0, 0, 0, 0, FALSE);
|
||||
printf("pan up : %d\n", xfi->offset_y);
|
||||
*/
|
||||
IFCALL(xfi->client->OnPan, xfi->instance, 0, -5);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -341,18 +353,22 @@ BOOL xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym)
|
|||
|| xf_kbd_key_pressed(xfi,
|
||||
XK_Control_R)))
|
||||
{
|
||||
xfi->offset_y += 5;
|
||||
/*
|
||||
if (xfi->offset_y > 0)
|
||||
xfi->offset_y = 0;
|
||||
*/
|
||||
xfi->offset_y += 5;
|
||||
|
||||
//if (xfi->offset_y > 0)
|
||||
//xfi->offset_y = 0;
|
||||
|
||||
xf_transform_window(xfi);
|
||||
|
||||
xf_draw_screen_scaled(xfi, 0, 0, 0, 0, FALSE);
|
||||
printf("pan down : %d\n", xfi->offset_y);
|
||||
*/
|
||||
IFCALL(xfi->client->OnPan, xfi->instance, 0, 5);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -40,12 +40,15 @@ typedef void (*pOnWindowStateChange)(freerdp* instance, int state);
|
|||
typedef void (*pOnErrorInfo)(freerdp* instance, UINT32 code);
|
||||
typedef void (*pOnParamChange)(freerdp* instance, int id);
|
||||
|
||||
typedef void (*pOnPan)(freerdp* instance, int xdiff, int ydiff);
|
||||
|
||||
struct rdp_client
|
||||
{
|
||||
pOnResizeWindow OnResizeWindow;
|
||||
pOnWindowStateChange OnWindowStateChange;
|
||||
pOnErrorInfo OnErrorInfo;
|
||||
pOnParamChange OnParamChange;
|
||||
pOnPan OnPan;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue