work in progress
This commit is contained in:
parent
ebdf1ea6a2
commit
27cb96e577
@ -1611,9 +1611,29 @@ void xf_TerminateEventHandler(rdpContext* context, TerminateEventArgs* e)
|
||||
|
||||
void xf_ParamChangeEventHandler(rdpContext* context, ParamChangeEventArgs* e)
|
||||
{
|
||||
|
||||
xfContext* xfc = (xfContext*) context;
|
||||
|
||||
switch (e->id)
|
||||
{
|
||||
case FreeRDP_ScalingFactor:
|
||||
|
||||
xfc->currentWidth = xfc->originalWidth * xfc->settings->ScalingFactor;
|
||||
xfc->currentHeight = xfc->originalHeight * xfc->settings->ScalingFactor;
|
||||
|
||||
xf_transform_window(xfc);
|
||||
|
||||
//IFCALL(xfi->client->OnResizeWindow, xfi->instance, xfi->currentWidth, xfi->currentHeight);
|
||||
{
|
||||
ResizeWindowEventArgs e;
|
||||
|
||||
EventArgsInit(&e, "xfreerdp");
|
||||
e.width = (int) xfc->originalWidth * xfc->settings->ScalingFactor;
|
||||
e.height = (int) xfc->originalHeight * xfc->settings->ScalingFactor;
|
||||
PubSub_OnResizeWindow(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
}
|
||||
xf_draw_screen_scaled(xfc, 0, 0, 0, 0, FALSE);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -289,12 +289,12 @@ void xf_input_detect_pan(xfContext* xfc)
|
||||
|
||||
//IFCALL(xfi->client->OnPan, xfi->instance, 5, 0);
|
||||
{
|
||||
PanEventArgs e;
|
||||
PanningChangeEventArgs e;
|
||||
|
||||
EventArgsInit(&e, "xfreerdp");
|
||||
e.xdiff = 5;
|
||||
e.ydiff = 0;
|
||||
PubSub_OnPan(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
e.XPan = 5;
|
||||
e.YPan = 0;
|
||||
PubSub_OnPanningChange(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
}
|
||||
|
||||
px_vector = 0;
|
||||
@ -315,12 +315,12 @@ void xf_input_detect_pan(xfContext* xfc)
|
||||
|
||||
//IFCALL(xfi->client->OnPan, xfi->instance, -5, 0);
|
||||
{
|
||||
PanEventArgs e;
|
||||
PanningChangeEventArgs e;
|
||||
|
||||
EventArgsInit(&e, "xfreerdp");
|
||||
e.xdiff = -5;
|
||||
e.ydiff = 0;
|
||||
PubSub_OnPan(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
e.XPan = -5;
|
||||
e.YPan = 0;
|
||||
PubSub_OnPanningChange(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
}
|
||||
|
||||
px_vector = 0;
|
||||
@ -349,12 +349,12 @@ void xf_input_detect_pan(xfContext* xfc)
|
||||
*/
|
||||
//IFCALL(xfi->client->OnPan, xfi->instance, 0, 5);
|
||||
{
|
||||
PanEventArgs e;
|
||||
PanningChangeEventArgs e;
|
||||
|
||||
EventArgsInit(&e, "xfreerdp");
|
||||
e.xdiff = 0;
|
||||
e.ydiff = 5;
|
||||
PubSub_OnPan(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
e.XPan = 0;
|
||||
e.YPan = 5;
|
||||
PubSub_OnPanningChange(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
}
|
||||
|
||||
py_vector = 0;
|
||||
@ -374,12 +374,12 @@ void xf_input_detect_pan(xfContext* xfc)
|
||||
*/
|
||||
//IFCALL(xfi->client->OnPan, xfi->instance, 0, -5);
|
||||
{
|
||||
PanEventArgs e;
|
||||
PanningChangeEventArgs e;
|
||||
|
||||
EventArgsInit(&e, "xfreerdp");
|
||||
e.xdiff = 0;
|
||||
e.ydiff = -5;
|
||||
PubSub_OnPan(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
e.XPan = 0;
|
||||
e.YPan = -5;
|
||||
PubSub_OnPanningChange(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
}
|
||||
|
||||
py_vector = 0;
|
||||
|
@ -307,12 +307,12 @@ BOOL xf_kbd_handle_special_keys(xfContext* xfc, KeySym keysym)
|
||||
|
||||
//IFCALL(xfc->client->OnPan, xfi->instance, -5, 0);
|
||||
{
|
||||
PanEventArgs e;
|
||||
PanningChangeEventArgs e;
|
||||
|
||||
EventArgsInit(&e, "xfreerdp");
|
||||
e.xdiff = -5;
|
||||
e.ydiff = 0;
|
||||
PubSub_OnPan(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
e.XPan = -5;
|
||||
e.YPan = 0;
|
||||
PubSub_OnPanningChange(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -341,12 +341,12 @@ BOOL xf_kbd_handle_special_keys(xfContext* xfc, KeySym keysym)
|
||||
|
||||
//IFCALL(xfi->client->OnPan, xfi->instance, 5, 0);
|
||||
{
|
||||
PanEventArgs e;
|
||||
PanningChangeEventArgs e;
|
||||
|
||||
EventArgsInit(&e, "xfreerdp");
|
||||
e.xdiff = 5;
|
||||
e.ydiff = 0;
|
||||
PubSub_OnPan(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
e.XPan = 5;
|
||||
e.YPan = 0;
|
||||
PubSub_OnPanningChange(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -370,12 +370,12 @@ BOOL xf_kbd_handle_special_keys(xfContext* xfc, KeySym keysym)
|
||||
*/
|
||||
//IFCALL(xfi->client->OnPan, xfi->instance, 0, -5);
|
||||
{
|
||||
PanEventArgs e;
|
||||
PanningChangeEventArgs e;
|
||||
|
||||
EventArgsInit(&e, "xfreerdp");
|
||||
e.xdiff = 0;
|
||||
e.ydiff = -5;
|
||||
PubSub_OnPan(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
e.XPan = 0;
|
||||
e.YPan = -5;
|
||||
PubSub_OnPanningChange(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -402,12 +402,12 @@ BOOL xf_kbd_handle_special_keys(xfContext* xfc, KeySym keysym)
|
||||
*/
|
||||
//IFCALL(xfi->client->OnPan, xfi->instance, 0, 5);
|
||||
{
|
||||
PanEventArgs e;
|
||||
PanningChangeEventArgs e;
|
||||
|
||||
EventArgsInit(&e, "xfreerdp");
|
||||
e.xdiff = 0;
|
||||
e.ydiff = 5;
|
||||
PubSub_OnPan(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
e.XPan = 0;
|
||||
e.YPan = 5;
|
||||
PubSub_OnPanningChange(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -92,30 +92,6 @@ HANDLE freerdp_client_get_thread(rdpContext* context)
|
||||
return ((rdpClientContext*) context)->thread;
|
||||
}
|
||||
|
||||
double freerdp_client_get_scale(rdpContext* context)
|
||||
{
|
||||
return context->scale;
|
||||
}
|
||||
|
||||
void freerdp_client_set_scale(rdpContext* context, double newScale)
|
||||
{
|
||||
context->scale = newScale;
|
||||
|
||||
context->currentWidth = context->originalWidth * context->scale;
|
||||
context->currentHeight = context->originalHeight * context->scale;
|
||||
|
||||
//need to call transform window
|
||||
|
||||
{
|
||||
ResizeWindowEventArgs e;
|
||||
|
||||
EventArgsInit(&e, "xfreerdp");
|
||||
e.width = (int) xfc->originalWidth * xfc->scale;
|
||||
e.height = (int) xfc->originalHeight * xfc->scale;
|
||||
PubSub_OnResizeWindow(((rdpContext*) xfc)->pubSub, xfc, &e);
|
||||
}
|
||||
}
|
||||
|
||||
int freerdp_client_parse_command_line(rdpContext* context, int argc, char** argv)
|
||||
{
|
||||
int status;
|
||||
|
Loading…
Reference in New Issue
Block a user