Merge branch 'master' of git://github.com/awakecoding/FreeRDP
# By Marc-André Moreau # Via Marc-André Moreau * 'master' of git://github.com/awakecoding/FreeRDP: freerdp: add new events for scaling and panning changes xfreerdp: add ParamChange event handler freerdp: add more settings for window panning and scaling winpr: add _WINRT platform detection macro
This commit is contained in:
commit
6621239946
@ -1520,6 +1520,18 @@ void xf_TerminateEventHandler(rdpContext* context, TerminateEventArgs* e)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void xf_ParamChangeEventHandler(rdpContext* context, ParamChangeEventArgs* e)
|
||||||
|
{
|
||||||
|
switch (e->id)
|
||||||
|
{
|
||||||
|
case FreeRDP_ScalingFactor:
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Client Interface
|
* Client Interface
|
||||||
*/
|
*/
|
||||||
@ -1643,6 +1655,7 @@ int xfreerdp_client_new(freerdp* instance, rdpContext* context)
|
|||||||
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
||||||
|
|
||||||
PubSub_SubscribeTerminate(context->pubSub, (pTerminateEventHandler) xf_TerminateEventHandler);
|
PubSub_SubscribeTerminate(context->pubSub, (pTerminateEventHandler) xf_TerminateEventHandler);
|
||||||
|
PubSub_SubscribeParamChange(context->pubSub, (pParamChangeEventHandler) xf_ParamChangeEventHandler);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,15 @@ DEFINE_EVENT_BEGIN(EmbedWindow)
|
|||||||
void* handle;
|
void* handle;
|
||||||
DEFINE_EVENT_END(EmbedWindow)
|
DEFINE_EVENT_END(EmbedWindow)
|
||||||
|
|
||||||
|
DEFINE_EVENT_BEGIN(PanningChange)
|
||||||
|
int XPan;
|
||||||
|
int YPan;
|
||||||
|
DEFINE_EVENT_END(PanningChange)
|
||||||
|
|
||||||
|
DEFINE_EVENT_BEGIN(ScalingFactorChange)
|
||||||
|
double ScalingFactor;
|
||||||
|
DEFINE_EVENT_END(ScalingFactorChange)
|
||||||
|
|
||||||
DEFINE_EVENT_BEGIN(ErrorInfo)
|
DEFINE_EVENT_BEGIN(ErrorInfo)
|
||||||
UINT32 code;
|
UINT32 code;
|
||||||
DEFINE_EVENT_END(ErrorInfo)
|
DEFINE_EVENT_END(ErrorInfo)
|
||||||
|
@ -609,6 +609,9 @@ typedef struct _RDPDR_PARALLEL RDPDR_PARALLEL;
|
|||||||
#define FreeRDP_WmClass 1549
|
#define FreeRDP_WmClass 1549
|
||||||
#define FreeRDP_EmbeddedWindow 1550
|
#define FreeRDP_EmbeddedWindow 1550
|
||||||
#define FreeRDP_SmartSizing 1551
|
#define FreeRDP_SmartSizing 1551
|
||||||
|
#define FreeRDP_XPan 1552
|
||||||
|
#define FreeRDP_YPan 1553
|
||||||
|
#define FreeRDP_ScalingFactor 1554
|
||||||
#define FreeRDP_SoftwareGdi 1601
|
#define FreeRDP_SoftwareGdi 1601
|
||||||
#define FreeRDP_LocalConnection 1602
|
#define FreeRDP_LocalConnection 1602
|
||||||
#define FreeRDP_AuthenticationOnly 1603
|
#define FreeRDP_AuthenticationOnly 1603
|
||||||
@ -677,6 +680,7 @@ typedef struct _RDPDR_PARALLEL RDPDR_PARALLEL;
|
|||||||
#define FreeRDP_UnicodeInput 2629
|
#define FreeRDP_UnicodeInput 2629
|
||||||
#define FreeRDP_FastPathInput 2630
|
#define FreeRDP_FastPathInput 2630
|
||||||
#define FreeRDP_MultiTouchInput 2631
|
#define FreeRDP_MultiTouchInput 2631
|
||||||
|
#define FreeRDP_MultiTouchGestures 2632
|
||||||
#define FreeRDP_BrushSupportLevel 2688
|
#define FreeRDP_BrushSupportLevel 2688
|
||||||
#define FreeRDP_GlyphSupportLevel 2752
|
#define FreeRDP_GlyphSupportLevel 2752
|
||||||
#define FreeRDP_GlyphCache 2753
|
#define FreeRDP_GlyphCache 2753
|
||||||
@ -976,7 +980,10 @@ struct rdp_settings
|
|||||||
ALIGN64 char* WmClass; /* 1549 */
|
ALIGN64 char* WmClass; /* 1549 */
|
||||||
ALIGN64 BOOL EmbeddedWindow; /* 1550 */
|
ALIGN64 BOOL EmbeddedWindow; /* 1550 */
|
||||||
ALIGN64 BOOL SmartSizing; /* 1551 */
|
ALIGN64 BOOL SmartSizing; /* 1551 */
|
||||||
UINT64 padding1600[1600 - 1552]; /* 1552 */
|
ALIGN64 int XPan; /* 1552 */
|
||||||
|
ALIGN64 int YPan; /* 1553 */
|
||||||
|
ALIGN64 double ScalingFactor; /* 1554 */
|
||||||
|
UINT64 padding1600[1600 - 1555]; /* 1555 */
|
||||||
|
|
||||||
/* Miscellaneous */
|
/* Miscellaneous */
|
||||||
ALIGN64 BOOL SoftwareGdi; /* 1601 */
|
ALIGN64 BOOL SoftwareGdi; /* 1601 */
|
||||||
@ -1101,7 +1108,8 @@ struct rdp_settings
|
|||||||
ALIGN64 BOOL UnicodeInput; /* 2629 */
|
ALIGN64 BOOL UnicodeInput; /* 2629 */
|
||||||
ALIGN64 BOOL FastPathInput; /* 2630 */
|
ALIGN64 BOOL FastPathInput; /* 2630 */
|
||||||
ALIGN64 BOOL MultiTouchInput; /* 2631 */
|
ALIGN64 BOOL MultiTouchInput; /* 2631 */
|
||||||
UINT64 padding2688[2688 - 2632]; /* 2632 */
|
ALIGN64 BOOL MultiTouchGestures; /* 2632 */
|
||||||
|
UINT64 padding2688[2688 - 2633]; /* 2633 */
|
||||||
|
|
||||||
/* Brush Capabilities */
|
/* Brush Capabilities */
|
||||||
ALIGN64 UINT32 BrushSupportLevel; /* 2688 */
|
ALIGN64 UINT32 BrushSupportLevel; /* 2688 */
|
||||||
@ -1310,6 +1318,9 @@ FREERDP_API void freerdp_dynamic_channel_collection_free(rdpSettings* settings);
|
|||||||
FREERDP_API BOOL freerdp_get_param_bool(rdpSettings* settings, int id);
|
FREERDP_API BOOL freerdp_get_param_bool(rdpSettings* settings, int id);
|
||||||
FREERDP_API int freerdp_set_param_bool(rdpSettings* settings, int id, BOOL param);
|
FREERDP_API int freerdp_set_param_bool(rdpSettings* settings, int id, BOOL param);
|
||||||
|
|
||||||
|
FREERDP_API int freerdp_get_param_int(rdpSettings* settings, int id);
|
||||||
|
FREERDP_API int freerdp_set_param_int(rdpSettings* settings, int id, int param);
|
||||||
|
|
||||||
FREERDP_API UINT32 freerdp_get_param_uint32(rdpSettings* settings, int id);
|
FREERDP_API UINT32 freerdp_get_param_uint32(rdpSettings* settings, int id);
|
||||||
FREERDP_API int freerdp_set_param_uint32(rdpSettings* settings, int id, UINT32 param);
|
FREERDP_API int freerdp_set_param_uint32(rdpSettings* settings, int id, UINT32 param);
|
||||||
|
|
||||||
@ -1319,6 +1330,9 @@ FREERDP_API int freerdp_set_param_uint64(rdpSettings* settings, int id, UINT64 p
|
|||||||
FREERDP_API char* freerdp_get_param_string(rdpSettings* settings, int id);
|
FREERDP_API char* freerdp_get_param_string(rdpSettings* settings, int id);
|
||||||
FREERDP_API int freerdp_set_param_string(rdpSettings* settings, int id, char* param);
|
FREERDP_API int freerdp_set_param_string(rdpSettings* settings, int id, char* param);
|
||||||
|
|
||||||
|
FREERDP_API double freerdp_get_param_double(rdpSettings* settings, int id);
|
||||||
|
FREERDP_API int freerdp_set_param_double(rdpSettings* settings, int id, double param);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -658,6 +658,10 @@ BOOL freerdp_get_param_bool(rdpSettings* settings, int id)
|
|||||||
return settings->MultiTouchInput;
|
return settings->MultiTouchInput;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case FreeRDP_MultiTouchGestures:
|
||||||
|
return settings->MultiTouchGestures;
|
||||||
|
break;
|
||||||
|
|
||||||
case FreeRDP_SoundBeepsEnabled:
|
case FreeRDP_SoundBeepsEnabled:
|
||||||
return settings->SoundBeepsEnabled;
|
return settings->SoundBeepsEnabled;
|
||||||
break;
|
break;
|
||||||
@ -1109,6 +1113,10 @@ int freerdp_set_param_bool(rdpSettings* settings, int id, BOOL param)
|
|||||||
settings->MultiTouchInput = param;
|
settings->MultiTouchInput = param;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case FreeRDP_MultiTouchGestures:
|
||||||
|
settings->MultiTouchGestures = param;
|
||||||
|
break;
|
||||||
|
|
||||||
case FreeRDP_SoundBeepsEnabled:
|
case FreeRDP_SoundBeepsEnabled:
|
||||||
settings->SoundBeepsEnabled = param;
|
settings->SoundBeepsEnabled = param;
|
||||||
break;
|
break;
|
||||||
@ -1204,6 +1212,55 @@ int freerdp_set_param_bool(rdpSettings* settings, int id, BOOL param)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int freerdp_get_param_int(rdpSettings* settings, int id)
|
||||||
|
{
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case FreeRDP_XPan:
|
||||||
|
return settings->XPan;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FreeRDP_YPan:
|
||||||
|
return settings->YPan;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int freerdp_set_param_int(rdpSettings* settings, int id, int param)
|
||||||
|
{
|
||||||
|
ParamChangeEventArgs e;
|
||||||
|
rdpContext* context = ((freerdp*) settings->instance)->context;
|
||||||
|
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case FreeRDP_XPan:
|
||||||
|
settings->XPan = param;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FreeRDP_YPan:
|
||||||
|
settings->YPan = param;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
settings->settings_modified[id] = 1;
|
||||||
|
|
||||||
|
EventArgsInit(&e, "freerdp");
|
||||||
|
e.id = id;
|
||||||
|
PubSub_OnParamChange(context->pubSub, context->instance, &e);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
UINT32 freerdp_get_param_uint32(rdpSettings* settings, int id)
|
UINT32 freerdp_get_param_uint32(rdpSettings* settings, int id)
|
||||||
{
|
{
|
||||||
switch (id)
|
switch (id)
|
||||||
@ -2225,3 +2282,44 @@ int freerdp_set_param_string(rdpSettings* settings, int id, char* param)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double freerdp_get_param_double(rdpSettings* settings, int id)
|
||||||
|
{
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case FreeRDP_ScalingFactor:
|
||||||
|
return settings->ScalingFactor;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int freerdp_set_param_double(rdpSettings* settings, int id, double param)
|
||||||
|
{
|
||||||
|
ParamChangeEventArgs e;
|
||||||
|
rdpContext* context = ((freerdp*) settings->instance)->context;
|
||||||
|
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case FreeRDP_ScalingFactor:
|
||||||
|
settings->ScalingFactor = param;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
settings->settings_modified[id] = 1;
|
||||||
|
|
||||||
|
EventArgsInit(&e, "freerdp");
|
||||||
|
e.id = id;
|
||||||
|
PubSub_OnParamChange(context->pubSub, context->instance, &e);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@ -323,6 +323,8 @@ static wEventType FreeRDP_Events[] =
|
|||||||
DEFINE_EVENT_ENTRY(WindowStateChange)
|
DEFINE_EVENT_ENTRY(WindowStateChange)
|
||||||
DEFINE_EVENT_ENTRY(ResizeWindow)
|
DEFINE_EVENT_ENTRY(ResizeWindow)
|
||||||
DEFINE_EVENT_ENTRY(EmbedWindow)
|
DEFINE_EVENT_ENTRY(EmbedWindow)
|
||||||
|
DEFINE_EVENT_ENTRY(PanningChange)
|
||||||
|
DEFINE_EVENT_ENTRY(ScalingFactorChange)
|
||||||
DEFINE_EVENT_ENTRY(ErrorInfo)
|
DEFINE_EVENT_ENTRY(ErrorInfo)
|
||||||
DEFINE_EVENT_ENTRY(ParamChange)
|
DEFINE_EVENT_ENTRY(ParamChange)
|
||||||
DEFINE_EVENT_ENTRY(Terminate)
|
DEFINE_EVENT_ENTRY(Terminate)
|
||||||
|
@ -128,6 +128,22 @@
|
|||||||
|
|
||||||
/* Windows (_WIN32) */
|
/* Windows (_WIN32) */
|
||||||
|
|
||||||
|
/* WinRT (_WINRT) */
|
||||||
|
|
||||||
|
#if defined(WINAPI_FAMILY)
|
||||||
|
#if (WINAPI_FAMILY == WINAPI_FAMILY_APP)
|
||||||
|
#ifndef _WINRT
|
||||||
|
#define _WINRT 1
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__cplusplus_winrt)
|
||||||
|
#ifndef _WINRT
|
||||||
|
#define _WINRT 1
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Linux (__linux__) */
|
/* Linux (__linux__) */
|
||||||
|
|
||||||
#if defined(linux) || defined(__linux)
|
#if defined(linux) || defined(__linux)
|
||||||
|
Loading…
Reference in New Issue
Block a user