xfreerdp: add UI events (experimental)
This commit is contained in:
parent
4b9093455a
commit
168a5eabf3
@ -881,6 +881,9 @@ BOOL xf_post_connect(freerdp* instance)
|
||||
|
||||
xf_cliprdr_init(xfi, channels);
|
||||
|
||||
if (xfi->ui.OnResizeWindow)
|
||||
xfi->ui.OnResizeWindow(instance, settings->DesktopWidth, settings->DesktopHeight);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1519,10 +1522,7 @@ xfInfo* xf_new(HANDLE hInstance, HANDLE hWndParent, int argc, char** argv)
|
||||
instance->context->argv = (char**) malloc(sizeof(char*) * argc);
|
||||
|
||||
for (index = 0; index < argc; index++)
|
||||
{
|
||||
printf("argv[%d]: %s\n", index, argv[index]);
|
||||
instance->context->argv[index] = _strdup(argv[index]);
|
||||
}
|
||||
|
||||
xfi = (xfInfo*) malloc(sizeof(xfInfo));
|
||||
ZeroMemory(xfi, sizeof(xfInfo));
|
||||
|
@ -82,12 +82,26 @@ struct xf_context
|
||||
};
|
||||
typedef struct xf_context xfContext;
|
||||
|
||||
/**
|
||||
* User Interface Events
|
||||
*/
|
||||
|
||||
typedef void (*pOnResizeWindow)(freerdp* instance, int width, int height);
|
||||
|
||||
struct rdp_ui
|
||||
{
|
||||
pOnResizeWindow OnResizeWindow;
|
||||
};
|
||||
typedef struct rdp_ui rdpUi;
|
||||
|
||||
struct xf_info
|
||||
{
|
||||
freerdp* instance;
|
||||
xfContext* context;
|
||||
rdpContext* _context;
|
||||
|
||||
rdpUi ui;
|
||||
|
||||
GC gc;
|
||||
int bpp;
|
||||
int xfds;
|
||||
|
@ -1292,6 +1292,9 @@ FREERDP_API int freerdp_set_param_bool(rdpSettings* settings, int id, BOOL param
|
||||
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 UINT64 freerdp_get_param_uint64(rdpSettings* settings, int id);
|
||||
FREERDP_API int freerdp_set_param_uint64(rdpSettings* settings, int id, UINT64 param);
|
||||
|
||||
FREERDP_API char* freerdp_get_param_string(rdpSettings* settings, int id);
|
||||
FREERDP_API int freerdp_set_param_string(rdpSettings* settings, int id, char* param);
|
||||
|
||||
|
@ -1785,6 +1785,38 @@ int freerdp_set_param_uint32(rdpSettings* settings, int id, UINT32 param)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT64 freerdp_get_param_uint64(rdpSettings* settings, int id)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case FreeRDP_ParentWindowId:
|
||||
return settings->ParentWindowId;
|
||||
break;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int freerdp_set_param_uint64(rdpSettings* settings, int id, UINT64 param)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case FreeRDP_ParentWindowId:
|
||||
settings->ParentWindowId = param;
|
||||
break;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
char* freerdp_get_param_string(rdpSettings* settings, int id)
|
||||
{
|
||||
switch (id)
|
||||
|
Loading…
Reference in New Issue
Block a user