mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
freerdp: merge RDP_EVENT type with wMessage
This commit is contained in:
parent
f757623f7f
commit
3417a3aab5
@ -831,7 +831,7 @@ static UINT32 FREERDP_CC MyVirtualChannelWrite(UINT32 openHandle, void* pData, U
|
|||||||
return CHANNEL_RC_OK;
|
return CHANNEL_RC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT32 FREERDP_CC MyVirtualChannelEventPush(UINT32 openHandle, RDP_EVENT* event)
|
static UINT32 FREERDP_CC MyVirtualChannelEventPush(UINT32 openHandle, wMessage* event)
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
rdpChannels* channels;
|
rdpChannels* channels;
|
||||||
@ -1162,7 +1162,7 @@ int freerdp_channels_data(freerdp* instance, int channel_id, void* data, int dat
|
|||||||
* @param channels the channel manager instance
|
* @param channels the channel manager instance
|
||||||
* @param event an event object created by freerdp_event_new()
|
* @param event an event object created by freerdp_event_new()
|
||||||
*/
|
*/
|
||||||
FREERDP_API int freerdp_channels_send_event(rdpChannels* channels, RDP_EVENT* event)
|
FREERDP_API int freerdp_channels_send_event(rdpChannels* channels, wMessage* event)
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
const char* name = NULL;
|
const char* name = NULL;
|
||||||
@ -1206,7 +1206,7 @@ FREERDP_API int freerdp_channels_send_event(rdpChannels* channels, RDP_EVENT* ev
|
|||||||
if (lchannel_data->open_event_proc)
|
if (lchannel_data->open_event_proc)
|
||||||
{
|
{
|
||||||
lchannel_data->open_event_proc(lchannel_data->open_handle, CHANNEL_EVENT_USER,
|
lchannel_data->open_event_proc(lchannel_data->open_handle, CHANNEL_EVENT_USER,
|
||||||
event, sizeof(RDP_EVENT), sizeof(RDP_EVENT), 0);
|
event, sizeof(wMessage), sizeof(wMessage), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -1218,7 +1218,7 @@ FREERDP_API int freerdp_channels_send_event(rdpChannels* channels, RDP_EVENT* ev
|
|||||||
static void freerdp_channels_process_sync(rdpChannels* channels, freerdp* instance)
|
static void freerdp_channels_process_sync(rdpChannels* channels, freerdp* instance)
|
||||||
{
|
{
|
||||||
wMessage message;
|
wMessage message;
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
CHANNEL_OPEN_EVENT* item;
|
CHANNEL_OPEN_EVENT* item;
|
||||||
rdpChannel* lrdp_channel;
|
rdpChannel* lrdp_channel;
|
||||||
struct channel_data* lchannel_data;
|
struct channel_data* lchannel_data;
|
||||||
@ -1253,7 +1253,7 @@ static void freerdp_channels_process_sync(rdpChannels* channels, freerdp* instan
|
|||||||
}
|
}
|
||||||
else if (message.id == 1)
|
else if (message.id == 1)
|
||||||
{
|
{
|
||||||
event = (RDP_EVENT*) message.wParam;
|
event = (wMessage*) message.wParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ignore for now, the same event is being pushed on the In queue,
|
* Ignore for now, the same event is being pushed on the In queue,
|
||||||
@ -1320,16 +1320,16 @@ BOOL freerdp_channels_check_fds(rdpChannels* channels, freerdp* instance)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
RDP_EVENT* freerdp_channels_pop_event(rdpChannels* channels)
|
wMessage* freerdp_channels_pop_event(rdpChannels* channels)
|
||||||
{
|
{
|
||||||
wMessage message;
|
wMessage message;
|
||||||
RDP_EVENT* event = NULL;
|
wMessage* event = NULL;
|
||||||
|
|
||||||
if (MessageQueue_Peek(channels->MsgPipe->In, &message, TRUE))
|
if (MessageQueue_Peek(channels->MsgPipe->In, &message, TRUE))
|
||||||
{
|
{
|
||||||
if (message.id == 1)
|
if (message.id == 1)
|
||||||
{
|
{
|
||||||
event = (RDP_EVENT*) message.wParam;
|
event = (wMessage*) message.wParam;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,9 @@ void cliprdr_process_format_list_event(cliprdrPlugin* cliprdr, RDP_CB_FORMAT_LIS
|
|||||||
name = CFSTR_GIF; name_length = sizeof(CFSTR_GIF);
|
name = CFSTR_GIF; name_length = sizeof(CFSTR_GIF);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
name = "\0\0"; name_length = 2;
|
name = "\0\0";
|
||||||
|
name_length = 2;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cliprdr->use_long_format_names)
|
if (!cliprdr->use_long_format_names)
|
||||||
@ -282,7 +284,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 data
|
|||||||
|
|
||||||
cliprdr->num_format_names = 0;
|
cliprdr->num_format_names = 0;
|
||||||
|
|
||||||
svc_plugin_send_event((rdpSvcPlugin*) cliprdr, (RDP_EVENT*) cb_event);
|
svc_plugin_send_event((rdpSvcPlugin*) cliprdr, (wMessage*) cb_event);
|
||||||
cliprdr_send_format_list_response(cliprdr);
|
cliprdr_send_format_list_response(cliprdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,7 +292,7 @@ void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, wStream* s, UI
|
|||||||
{
|
{
|
||||||
/* where is this documented? */
|
/* where is this documented? */
|
||||||
#if 0
|
#if 0
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
|
|
||||||
if ((msgFlags & CB_RESPONSE_FAIL) != 0)
|
if ((msgFlags & CB_RESPONSE_FAIL) != 0)
|
||||||
{
|
{
|
||||||
@ -308,7 +310,7 @@ void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, wStream* s, UIN
|
|||||||
CliprdrChannel_DataRequest, NULL, NULL);
|
CliprdrChannel_DataRequest, NULL, NULL);
|
||||||
|
|
||||||
stream_read_UINT32(s, cb_event->format);
|
stream_read_UINT32(s, cb_event->format);
|
||||||
svc_plugin_send_event((rdpSvcPlugin*) cliprdr, (RDP_EVENT*) cb_event);
|
svc_plugin_send_event((rdpSvcPlugin*) cliprdr, (wMessage*) cb_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cliprdr_process_format_data_response_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_RESPONSE_EVENT* cb_event)
|
void cliprdr_process_format_data_response_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_RESPONSE_EVENT* cb_event)
|
||||||
@ -355,5 +357,5 @@ void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, wStream* s, UI
|
|||||||
CopyMemory(cb_event->data, stream_get_tail(s), dataLen);
|
CopyMemory(cb_event->data, stream_get_tail(s), dataLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
svc_plugin_send_event((rdpSvcPlugin*) cliprdr, (RDP_EVENT*) cb_event);
|
svc_plugin_send_event((rdpSvcPlugin*) cliprdr, (wMessage*) cb_event);
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ static void cliprdr_send_clip_caps(cliprdrPlugin* cliprdr)
|
|||||||
|
|
||||||
static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, wStream* s, UINT16 length, UINT16 flags)
|
static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, wStream* s, UINT16 length, UINT16 flags)
|
||||||
{
|
{
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
|
|
||||||
if (cliprdr->received_caps)
|
if (cliprdr->received_caps)
|
||||||
cliprdr_send_clip_caps(cliprdr);
|
cliprdr_send_clip_caps(cliprdr);
|
||||||
@ -241,7 +241,7 @@ static void cliprdr_process_receive(rdpSvcPlugin* plugin, wStream* s)
|
|||||||
stream_free(s);
|
stream_free(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cliprdr_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event)
|
static void cliprdr_process_event(rdpSvcPlugin* plugin, wMessage* event)
|
||||||
{
|
{
|
||||||
switch (GetMessageType(event->id))
|
switch (GetMessageType(event->id))
|
||||||
{
|
{
|
||||||
|
@ -158,7 +158,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, UINT32 ChannelId, BYTE* data, UIN
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int drdynvc_push_event(drdynvcPlugin* drdynvc, RDP_EVENT* event)
|
int drdynvc_push_event(drdynvcPlugin* drdynvc, wMessage* event)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ static void drdynvc_process_connect(rdpSvcPlugin* plugin)
|
|||||||
dvcman_init(drdynvc->channel_mgr);
|
dvcman_init(drdynvc->channel_mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void drdynvc_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event)
|
static void drdynvc_process_event(rdpSvcPlugin* plugin, wMessage* event)
|
||||||
{
|
{
|
||||||
freerdp_event_free(event);
|
freerdp_event_free(event);
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,6 @@
|
|||||||
typedef struct drdynvc_plugin drdynvcPlugin;
|
typedef struct drdynvc_plugin drdynvcPlugin;
|
||||||
|
|
||||||
int drdynvc_write_data(drdynvcPlugin* plugin, UINT32 ChannelId, BYTE* data, UINT32 data_size);
|
int drdynvc_write_data(drdynvcPlugin* plugin, UINT32 ChannelId, BYTE* data, UINT32 data_size);
|
||||||
int drdynvc_push_event(drdynvcPlugin* plugin, RDP_EVENT* event);
|
int drdynvc_push_event(drdynvcPlugin* plugin, wMessage* event);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -131,7 +131,7 @@ static int dvcman_create_listener(IWTSVirtualChannelManager* pChannelMgr,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dvcman_push_event(IWTSVirtualChannelManager* pChannelMgr, RDP_EVENT* pEvent)
|
static int dvcman_push_event(IWTSVirtualChannelManager* pChannelMgr, wMessage* pEvent)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
DVCMAN* dvcman = (DVCMAN*) pChannelMgr;
|
DVCMAN* dvcman = (DVCMAN*) pChannelMgr;
|
||||||
|
@ -49,15 +49,15 @@ void rail_send_channel_data(void* rail_object, void* data, size_t length)
|
|||||||
svc_plugin_send((rdpSvcPlugin*) plugin, s);
|
svc_plugin_send((rdpSvcPlugin*) plugin, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_free_rail_channel_event(RDP_EVENT* event)
|
static void on_free_rail_channel_event(wMessage* event)
|
||||||
{
|
{
|
||||||
rail_free_cloned_order(GetMessageType(event->id), event->user_data);
|
rail_free_cloned_order(GetMessageType(event->id), event->wParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rail_send_channel_event(void* rail_object, UINT16 event_type, void* param)
|
void rail_send_channel_event(void* rail_object, UINT16 event_type, void* param)
|
||||||
{
|
{
|
||||||
void * payload = NULL;
|
void * payload = NULL;
|
||||||
RDP_EVENT* out_event = NULL;
|
wMessage* out_event = NULL;
|
||||||
railPlugin* plugin = (railPlugin*) rail_object;
|
railPlugin* plugin = (railPlugin*) rail_object;
|
||||||
|
|
||||||
payload = rail_clone_order(event_type, param);
|
payload = rail_clone_order(event_type, param);
|
||||||
@ -111,13 +111,13 @@ static void rail_process_addin_args(rdpRailOrder* rail_order, rdpSettings* setti
|
|||||||
rail_send_client_exec_order(rail_order);
|
rail_send_client_exec_order(rail_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rail_recv_set_sysparams_event(rdpRailOrder* rail_order, RDP_EVENT* event)
|
static void rail_recv_set_sysparams_event(rdpRailOrder* rail_order, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_SYSPARAM_ORDER* sysparam;
|
RAIL_SYSPARAM_ORDER* sysparam;
|
||||||
|
|
||||||
/* Send System Parameters */
|
/* Send System Parameters */
|
||||||
|
|
||||||
sysparam = (RAIL_SYSPARAM_ORDER*) event->user_data;
|
sysparam = (RAIL_SYSPARAM_ORDER*) event->wParam;
|
||||||
memmove(&rail_order->sysparam, sysparam, sizeof(RAIL_SYSPARAM_ORDER));
|
memmove(&rail_order->sysparam, sysparam, sizeof(RAIL_SYSPARAM_ORDER));
|
||||||
|
|
||||||
rail_send_client_sysparams_order(rail_order);
|
rail_send_client_sysparams_order(rail_order);
|
||||||
@ -129,7 +129,7 @@ static void rail_recv_set_sysparams_event(rdpRailOrder* rail_order, RDP_EVENT* e
|
|||||||
rail_process_addin_args(rail_order, rail_order->settings);
|
rail_process_addin_args(rail_order, rail_order->settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rail_recv_exec_remote_app_event(rdpRailOrder* rail_order, RDP_EVENT* event)
|
static void rail_recv_exec_remote_app_event(rdpRailOrder* rail_order, wMessage* event)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* TODO: replace event system by an API to allow the execution
|
* TODO: replace event system by an API to allow the execution
|
||||||
@ -140,63 +140,63 @@ static void rail_recv_exec_remote_app_event(rdpRailOrder* rail_order, RDP_EVENT*
|
|||||||
//rail_process_addin_args(rail_order, data);
|
//rail_process_addin_args(rail_order, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rail_recv_activate_event(rdpRailOrder* rail_order, RDP_EVENT* event)
|
static void rail_recv_activate_event(rdpRailOrder* rail_order, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_ACTIVATE_ORDER* activate = (RAIL_ACTIVATE_ORDER*) event->user_data;
|
RAIL_ACTIVATE_ORDER* activate = (RAIL_ACTIVATE_ORDER*) event->wParam;
|
||||||
|
|
||||||
CopyMemory(&rail_order->activate, activate, sizeof(RAIL_ACTIVATE_ORDER));
|
CopyMemory(&rail_order->activate, activate, sizeof(RAIL_ACTIVATE_ORDER));
|
||||||
rail_send_client_activate_order(rail_order);
|
rail_send_client_activate_order(rail_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rail_recv_sysmenu_event(rdpRailOrder* rail_order, RDP_EVENT* event)
|
static void rail_recv_sysmenu_event(rdpRailOrder* rail_order, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_SYSMENU_ORDER* sysmenu = (RAIL_SYSMENU_ORDER*) event->user_data;
|
RAIL_SYSMENU_ORDER* sysmenu = (RAIL_SYSMENU_ORDER*) event->wParam;
|
||||||
|
|
||||||
CopyMemory(&rail_order->sysmenu, sysmenu, sizeof(RAIL_SYSMENU_ORDER));
|
CopyMemory(&rail_order->sysmenu, sysmenu, sizeof(RAIL_SYSMENU_ORDER));
|
||||||
rail_send_client_sysmenu_order(rail_order);
|
rail_send_client_sysmenu_order(rail_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rail_recv_syscommand_event(rdpRailOrder* rail_order, RDP_EVENT* event)
|
static void rail_recv_syscommand_event(rdpRailOrder* rail_order, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_SYSCOMMAND_ORDER* syscommand = (RAIL_SYSCOMMAND_ORDER*) event->user_data;
|
RAIL_SYSCOMMAND_ORDER* syscommand = (RAIL_SYSCOMMAND_ORDER*) event->wParam;
|
||||||
|
|
||||||
CopyMemory(&rail_order->syscommand, syscommand, sizeof(RAIL_SYSCOMMAND_ORDER));
|
CopyMemory(&rail_order->syscommand, syscommand, sizeof(RAIL_SYSCOMMAND_ORDER));
|
||||||
rail_send_client_syscommand_order(rail_order);
|
rail_send_client_syscommand_order(rail_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rail_recv_notify_event(rdpRailOrder* rail_order, RDP_EVENT* event)
|
static void rail_recv_notify_event(rdpRailOrder* rail_order, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_NOTIFY_EVENT_ORDER* notify = (RAIL_NOTIFY_EVENT_ORDER*) event->user_data;
|
RAIL_NOTIFY_EVENT_ORDER* notify = (RAIL_NOTIFY_EVENT_ORDER*) event->wParam;
|
||||||
|
|
||||||
CopyMemory(&rail_order->notify_event, notify, sizeof(RAIL_NOTIFY_EVENT_ORDER));
|
CopyMemory(&rail_order->notify_event, notify, sizeof(RAIL_NOTIFY_EVENT_ORDER));
|
||||||
rail_send_client_notify_event_order(rail_order);
|
rail_send_client_notify_event_order(rail_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rail_recv_window_move_event(rdpRailOrder* rail_order, RDP_EVENT* event)
|
static void rail_recv_window_move_event(rdpRailOrder* rail_order, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_WINDOW_MOVE_ORDER* window_move = (RAIL_WINDOW_MOVE_ORDER*) event->user_data;
|
RAIL_WINDOW_MOVE_ORDER* window_move = (RAIL_WINDOW_MOVE_ORDER*) event->wParam;
|
||||||
|
|
||||||
CopyMemory(&rail_order->window_move, window_move, sizeof(RAIL_WINDOW_MOVE_ORDER));
|
CopyMemory(&rail_order->window_move, window_move, sizeof(RAIL_WINDOW_MOVE_ORDER));
|
||||||
rail_send_client_window_move_order(rail_order);
|
rail_send_client_window_move_order(rail_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rail_recv_app_req_event(rdpRailOrder* rail_order, RDP_EVENT* event)
|
static void rail_recv_app_req_event(rdpRailOrder* rail_order, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_GET_APPID_REQ_ORDER* get_appid_req = (RAIL_GET_APPID_REQ_ORDER*) event->user_data;
|
RAIL_GET_APPID_REQ_ORDER* get_appid_req = (RAIL_GET_APPID_REQ_ORDER*) event->wParam;
|
||||||
|
|
||||||
CopyMemory(&rail_order->get_appid_req, get_appid_req, sizeof(RAIL_GET_APPID_REQ_ORDER));
|
CopyMemory(&rail_order->get_appid_req, get_appid_req, sizeof(RAIL_GET_APPID_REQ_ORDER));
|
||||||
rail_send_client_get_appid_req_order(rail_order);
|
rail_send_client_get_appid_req_order(rail_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rail_recv_langbarinfo_event(rdpRailOrder* rail_order, RDP_EVENT* event)
|
static void rail_recv_langbarinfo_event(rdpRailOrder* rail_order, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_LANGBAR_INFO_ORDER* langbar_info = (RAIL_LANGBAR_INFO_ORDER*) event->user_data;
|
RAIL_LANGBAR_INFO_ORDER* langbar_info = (RAIL_LANGBAR_INFO_ORDER*) event->wParam;
|
||||||
|
|
||||||
CopyMemory(&rail_order->langbar_info, langbar_info, sizeof(RAIL_LANGBAR_INFO_ORDER));
|
CopyMemory(&rail_order->langbar_info, langbar_info, sizeof(RAIL_LANGBAR_INFO_ORDER));
|
||||||
rail_send_client_langbar_info_order(rail_order);
|
rail_send_client_langbar_info_order(rail_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rail_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event)
|
static void rail_process_event(rdpSvcPlugin* plugin, wMessage* event)
|
||||||
{
|
{
|
||||||
railPlugin* rail = NULL;
|
railPlugin* rail = NULL;
|
||||||
rail = (railPlugin*) plugin;
|
rail = (railPlugin*) plugin;
|
||||||
|
@ -297,7 +297,7 @@ static void rdpdr_process_receive(rdpSvcPlugin* plugin, wStream* data_in)
|
|||||||
stream_free(data_in);
|
stream_free(data_in);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rdpdr_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event)
|
static void rdpdr_process_event(rdpSvcPlugin* plugin, wMessage* event)
|
||||||
{
|
{
|
||||||
freerdp_event_free(event);
|
freerdp_event_free(event);
|
||||||
}
|
}
|
||||||
|
@ -693,7 +693,7 @@ static void rdpsnd_process_connect(rdpSvcPlugin* plugin)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rdpsnd_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event)
|
static void rdpsnd_process_event(rdpSvcPlugin* plugin, wMessage* event)
|
||||||
{
|
{
|
||||||
freerdp_event_free(event);
|
freerdp_event_free(event);
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ static void sample_process_connect(rdpSvcPlugin* plugin)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sample_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event)
|
static void sample_process_event(rdpSvcPlugin* plugin, wMessage* event)
|
||||||
{
|
{
|
||||||
printf("sample_process_event:\n");
|
printf("sample_process_event:\n");
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ void tsmf_playback_ack(IWTSVirtualChannelCallback* pChannelCallback,
|
|||||||
stream_free(s);
|
stream_free(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback, RDP_EVENT* event)
|
BOOL tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback, wMessage* event)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
TSMF_CHANNEL_CALLBACK* callback = (TSMF_CHANNEL_CALLBACK*) pChannelCallback;
|
TSMF_CHANNEL_CALLBACK* callback = (TSMF_CHANNEL_CALLBACK*) pChannelCallback;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
void tsmf_playback_ack(IWTSVirtualChannelCallback* pChannelCallback,
|
void tsmf_playback_ack(IWTSVirtualChannelCallback* pChannelCallback,
|
||||||
UINT32 message_id, UINT64 duration, UINT32 data_size);
|
UINT32 message_id, UINT64 duration, UINT32 data_size);
|
||||||
BOOL tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback,
|
BOOL tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback,
|
||||||
RDP_EVENT* event);
|
wMessage* event);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -318,9 +318,9 @@ static void tsmf_presentation_restore_last_video_frame(TSMF_PRESENTATION* presen
|
|||||||
revent->width = presentation->last_width;
|
revent->width = presentation->last_width;
|
||||||
revent->height = presentation->last_height;
|
revent->height = presentation->last_height;
|
||||||
|
|
||||||
if (!tsmf_push_event(presentation->channel_callback, (RDP_EVENT*) revent))
|
if (!tsmf_push_event(presentation->channel_callback, (wMessage*) revent))
|
||||||
{
|
{
|
||||||
freerdp_event_free((RDP_EVENT*) revent);
|
freerdp_event_free((wMessage*) revent);
|
||||||
}
|
}
|
||||||
|
|
||||||
presentation->last_x = 0;
|
presentation->last_x = 0;
|
||||||
@ -414,9 +414,9 @@ static void tsmf_sample_playback_video(TSMF_SAMPLE* sample)
|
|||||||
sample->data = NULL;
|
sample->data = NULL;
|
||||||
sample->decoded_size = 0;
|
sample->decoded_size = 0;
|
||||||
|
|
||||||
if (!tsmf_push_event(sample->channel_callback, (RDP_EVENT*) vevent))
|
if (!tsmf_push_event(sample->channel_callback, (wMessage*) vevent))
|
||||||
{
|
{
|
||||||
freerdp_event_free((RDP_EVENT*) vevent);
|
freerdp_event_free((wMessage*) vevent);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -308,7 +308,7 @@ int android_receive_channel_data(freerdp* instance, int channelId, UINT8* data,
|
|||||||
|
|
||||||
void android_process_channel_event(rdpChannels* channels, freerdp* instance)
|
void android_process_channel_event(rdpChannels* channels, freerdp* instance)
|
||||||
{
|
{
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
|
|
||||||
event = freerdp_channels_pop_event(channels);
|
event = freerdp_channels_pop_event(channels);
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ static int df_receive_channel_data(freerdp* instance, int channelId, BYTE* data,
|
|||||||
|
|
||||||
static void df_process_cb_monitor_ready_event(rdpChannels* channels, freerdp* instance)
|
static void df_process_cb_monitor_ready_event(rdpChannels* channels, freerdp* instance)
|
||||||
{
|
{
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
RDP_CB_FORMAT_LIST_EVENT* format_list_event;
|
RDP_CB_FORMAT_LIST_EVENT* format_list_event;
|
||||||
|
|
||||||
event = freerdp_event_new(CliprdrChannel_Class, CliprdrChannel_FormatList, NULL, NULL);
|
event = freerdp_event_new(CliprdrChannel_Class, CliprdrChannel_FormatList, NULL, NULL);
|
||||||
@ -278,7 +278,7 @@ static void df_process_cb_monitor_ready_event(rdpChannels* channels, freerdp* in
|
|||||||
|
|
||||||
static void df_process_channel_event(rdpChannels* channels, freerdp* instance)
|
static void df_process_channel_event(rdpChannels* channels, freerdp* instance)
|
||||||
{
|
{
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
|
|
||||||
event = freerdp_channels_pop_event(channels);
|
event = freerdp_channels_pop_event(channels);
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ int tf_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int si
|
|||||||
|
|
||||||
void tf_process_cb_monitor_ready_event(rdpChannels* channels, freerdp* instance)
|
void tf_process_cb_monitor_ready_event(rdpChannels* channels, freerdp* instance)
|
||||||
{
|
{
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
RDP_CB_FORMAT_LIST_EVENT* format_list_event;
|
RDP_CB_FORMAT_LIST_EVENT* format_list_event;
|
||||||
|
|
||||||
event = freerdp_event_new(CliprdrChannel_Class, CliprdrChannel_FormatList, NULL, NULL);
|
event = freerdp_event_new(CliprdrChannel_Class, CliprdrChannel_FormatList, NULL, NULL);
|
||||||
@ -113,7 +113,7 @@ void tf_process_cb_monitor_ready_event(rdpChannels* channels, freerdp* instance)
|
|||||||
|
|
||||||
void tf_process_channel_event(rdpChannels* channels, freerdp* instance)
|
void tf_process_channel_event(rdpChannels* channels, freerdp* instance)
|
||||||
{
|
{
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
|
|
||||||
event = freerdp_channels_pop_event(channels);
|
event = freerdp_channels_pop_event(channels);
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ static void wf_cliprdr_process_cb_data_response_event(wfInfo* wfi, RDP_CB_DATA_R
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wf_process_cliprdr_event(wfInfo* wfi, RDP_EVENT* event)
|
void wf_process_cliprdr_event(wfInfo* wfi, wMessage* event)
|
||||||
{
|
{
|
||||||
switch (GetMessageType(event->id))
|
switch (GetMessageType(event->id))
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
void wf_cliprdr_init(wfInfo* wfi, rdpChannels* chanman);
|
void wf_cliprdr_init(wfInfo* wfi, rdpChannels* chanman);
|
||||||
void wf_cliprdr_uninit(wfInfo* wfi);
|
void wf_cliprdr_uninit(wfInfo* wfi);
|
||||||
void wf_process_cliprdr_event(wfInfo* wfi, RDP_EVENT* event);
|
void wf_process_cliprdr_event(wfInfo* wfi, wMessage* event);
|
||||||
BOOL wf_cliprdr_process_selection_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
BOOL wf_cliprdr_process_selection_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||||
BOOL wf_cliprdr_process_selection_request(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
BOOL wf_cliprdr_process_selection_request(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||||
BOOL wf_cliprdr_process_selection_clear(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
BOOL wf_cliprdr_process_selection_clear(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||||
|
@ -504,7 +504,7 @@ int wf_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int si
|
|||||||
|
|
||||||
void wf_process_channel_event(rdpChannels* channels, freerdp* instance)
|
void wf_process_channel_event(rdpChannels* channels, freerdp* instance)
|
||||||
{
|
{
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
|
|
||||||
event = freerdp_channels_pop_event(channels);
|
event = freerdp_channels_pop_event(channels);
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ void wf_rail_send_activate(wfInfo* wfi, HWND window, BOOL enabled)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void wf_process_rail_event(wfInfo* wfi, rdpChannels* chanman, RDP_EVENT* event)
|
void wf_process_rail_event(wfInfo* wfi, rdpChannels* chanman, wMessage* event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ void wf_rail_paint(wfInfo* wfi, rdpRail* rail, INT32 uleft, INT32 utop, UINT32 u
|
|||||||
void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail);
|
void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail);
|
||||||
void wf_rail_send_client_system_command(wfInfo* wfi, UINT32 windowId, UINT16 command);
|
void wf_rail_send_client_system_command(wfInfo* wfi, UINT32 windowId, UINT16 command);
|
||||||
void wf_rail_send_activate(wfInfo* wfi, HWND window, BOOL enabled);
|
void wf_rail_send_activate(wfInfo* wfi, HWND window, BOOL enabled);
|
||||||
void wf_process_rail_event(wfInfo* wfi, rdpChannels* chanman, RDP_EVENT* event);
|
void wf_process_rail_event(wfInfo* wfi, rdpChannels* chanman, wMessage* event);
|
||||||
void wf_rail_adjust_position(wfInfo* wfi, rdpWindow *window);
|
void wf_rail_adjust_position(wfInfo* wfi, rdpWindow *window);
|
||||||
void wf_rail_end_local_move(wfInfo* wfi, rdpWindow *window);
|
void wf_rail_end_local_move(wfInfo* wfi, rdpWindow *window);
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
#include <winpr/crt.h>
|
#include <winpr/crt.h>
|
||||||
|
#include <winpr/stream.h>
|
||||||
|
|
||||||
#include <freerdp/utils/event.h>
|
#include <freerdp/utils/event.h>
|
||||||
#include <winpr/stream.h>
|
|
||||||
#include <freerdp/client/cliprdr.h>
|
#include <freerdp/client/cliprdr.h>
|
||||||
|
|
||||||
#include "xf_cliprdr.h"
|
#include "xf_cliprdr.h"
|
||||||
@ -333,11 +333,11 @@ static void xf_cliprdr_send_raw_format_list(xfInfo* xfi)
|
|||||||
CliprdrChannel_FormatList, NULL, NULL);
|
CliprdrChannel_FormatList, NULL, NULL);
|
||||||
|
|
||||||
event->raw_format_data = (BYTE*) malloc(length);
|
event->raw_format_data = (BYTE*) malloc(length);
|
||||||
memcpy(event->raw_format_data, format_data, length);
|
CopyMemory(event->raw_format_data, format_data, length);
|
||||||
event->raw_format_data_size = length;
|
event->raw_format_data_size = length;
|
||||||
XFree(format_data);
|
XFree(format_data);
|
||||||
|
|
||||||
freerdp_channels_send_event(cb->channels, (RDP_EVENT*) event);
|
freerdp_channels_send_event(cb->channels, (wMessage*) event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xf_cliprdr_send_null_format_list(xfInfo* xfi)
|
static void xf_cliprdr_send_null_format_list(xfInfo* xfi)
|
||||||
@ -350,7 +350,7 @@ static void xf_cliprdr_send_null_format_list(xfInfo* xfi)
|
|||||||
|
|
||||||
event->num_formats = 0;
|
event->num_formats = 0;
|
||||||
|
|
||||||
freerdp_channels_send_event(cb->channels, (RDP_EVENT*) event);
|
freerdp_channels_send_event(cb->channels, (wMessage*) event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xf_cliprdr_send_supported_format_list(xfInfo* xfi)
|
static void xf_cliprdr_send_supported_format_list(xfInfo* xfi)
|
||||||
@ -368,7 +368,7 @@ static void xf_cliprdr_send_supported_format_list(xfInfo* xfi)
|
|||||||
for (i = 0; i < cb->num_format_mappings; i++)
|
for (i = 0; i < cb->num_format_mappings; i++)
|
||||||
event->formats[i] = cb->format_mappings[i].format_id;
|
event->formats[i] = cb->format_mappings[i].format_id;
|
||||||
|
|
||||||
freerdp_channels_send_event(cb->channels, (RDP_EVENT*) event);
|
freerdp_channels_send_event(cb->channels, (wMessage*) event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xf_cliprdr_send_format_list(xfInfo* xfi)
|
static void xf_cliprdr_send_format_list(xfInfo* xfi)
|
||||||
@ -401,7 +401,7 @@ static void xf_cliprdr_send_data_request(xfInfo* xfi, UINT32 format)
|
|||||||
|
|
||||||
event->format = format;
|
event->format = format;
|
||||||
|
|
||||||
freerdp_channels_send_event(cb->channels, (RDP_EVENT*) event);
|
freerdp_channels_send_event(cb->channels, (wMessage*) event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xf_cliprdr_send_data_response(xfInfo* xfi, BYTE* data, int size)
|
static void xf_cliprdr_send_data_response(xfInfo* xfi, BYTE* data, int size)
|
||||||
@ -415,7 +415,7 @@ static void xf_cliprdr_send_data_response(xfInfo* xfi, BYTE* data, int size)
|
|||||||
event->data = data;
|
event->data = data;
|
||||||
event->size = size;
|
event->size = size;
|
||||||
|
|
||||||
freerdp_channels_send_event(cb->channels, (RDP_EVENT*) event);
|
freerdp_channels_send_event(cb->channels, (wMessage*) event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xf_cliprdr_send_null_data_response(xfInfo* xfi)
|
static void xf_cliprdr_send_null_data_response(xfInfo* xfi)
|
||||||
@ -513,7 +513,7 @@ static void xf_cliprdr_get_requested_targets(xfInfo* xfi)
|
|||||||
event->num_formats = num;
|
event->num_formats = num;
|
||||||
XFree(data);
|
XFree(data);
|
||||||
|
|
||||||
freerdp_channels_send_event(cb->channels, (RDP_EVENT*) event);
|
freerdp_channels_send_event(cb->channels, (wMessage*) event);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -529,7 +529,7 @@ static BYTE* xf_cliprdr_process_requested_raw(BYTE* data, int* size)
|
|||||||
BYTE* outbuf;
|
BYTE* outbuf;
|
||||||
|
|
||||||
outbuf = (BYTE*) malloc(*size);
|
outbuf = (BYTE*) malloc(*size);
|
||||||
memcpy(outbuf, data, *size);
|
CopyMemory(outbuf, data, *size);
|
||||||
return outbuf;
|
return outbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -606,7 +606,7 @@ static BYTE* xf_cliprdr_process_requested_html(BYTE* data, int* size)
|
|||||||
inbuf = malloc(*size + 1);
|
inbuf = malloc(*size + 1);
|
||||||
ZeroMemory(inbuf, *size + 1);
|
ZeroMemory(inbuf, *size + 1);
|
||||||
|
|
||||||
memcpy(inbuf, data, *size);
|
CopyMemory(inbuf, data, *size);
|
||||||
}
|
}
|
||||||
|
|
||||||
outbuf = (BYTE*) malloc(*size + 200);
|
outbuf = (BYTE*) malloc(*size + 200);
|
||||||
@ -627,7 +627,7 @@ static BYTE* xf_cliprdr_process_requested_html(BYTE* data, int* size)
|
|||||||
}
|
}
|
||||||
/* StartHTML */
|
/* StartHTML */
|
||||||
snprintf(num, sizeof(num), "%010lu", (unsigned long) strlen((char*) outbuf));
|
snprintf(num, sizeof(num), "%010lu", (unsigned long) strlen((char*) outbuf));
|
||||||
memcpy(outbuf + 23, num, 10);
|
CopyMemory(outbuf + 23, num, 10);
|
||||||
if (in == NULL)
|
if (in == NULL)
|
||||||
{
|
{
|
||||||
strcat((char*) outbuf, "<HTML><BODY>");
|
strcat((char*) outbuf, "<HTML><BODY>");
|
||||||
@ -635,11 +635,11 @@ static BYTE* xf_cliprdr_process_requested_html(BYTE* data, int* size)
|
|||||||
strcat((char*) outbuf, "<!--StartFragment-->");
|
strcat((char*) outbuf, "<!--StartFragment-->");
|
||||||
/* StartFragment */
|
/* StartFragment */
|
||||||
snprintf(num, sizeof(num), "%010lu", (unsigned long) strlen((char*) outbuf));
|
snprintf(num, sizeof(num), "%010lu", (unsigned long) strlen((char*) outbuf));
|
||||||
memcpy(outbuf + 69, num, 10);
|
CopyMemory(outbuf + 69, num, 10);
|
||||||
strcat((char*) outbuf, (char*) inbuf);
|
strcat((char*) outbuf, (char*) inbuf);
|
||||||
/* EndFragment */
|
/* EndFragment */
|
||||||
snprintf(num, sizeof(num), "%010lu", (unsigned long) strlen((char*) outbuf));
|
snprintf(num, sizeof(num), "%010lu", (unsigned long) strlen((char*) outbuf));
|
||||||
memcpy(outbuf + 93, num, 10);
|
CopyMemory(outbuf + 93, num, 10);
|
||||||
strcat((char*) outbuf, "<!--EndFragment-->");
|
strcat((char*) outbuf, "<!--EndFragment-->");
|
||||||
if (in == NULL)
|
if (in == NULL)
|
||||||
{
|
{
|
||||||
@ -647,7 +647,7 @@ static BYTE* xf_cliprdr_process_requested_html(BYTE* data, int* size)
|
|||||||
}
|
}
|
||||||
/* EndHTML */
|
/* EndHTML */
|
||||||
snprintf(num, sizeof(num), "%010lu", (unsigned long) strlen((char*) outbuf));
|
snprintf(num, sizeof(num), "%010lu", (unsigned long) strlen((char*) outbuf));
|
||||||
memcpy(outbuf + 43, num, 10);
|
CopyMemory(outbuf + 43, num, 10);
|
||||||
|
|
||||||
*size = strlen((char*) outbuf) + 1;
|
*size = strlen((char*) outbuf) + 1;
|
||||||
free(inbuf);
|
free(inbuf);
|
||||||
@ -775,7 +775,7 @@ static BOOL xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target)
|
|||||||
bytes_left = length * format / 8;
|
bytes_left = length * format / 8;
|
||||||
DEBUG_X11("%d bytes", (int)bytes_left);
|
DEBUG_X11("%d bytes", (int)bytes_left);
|
||||||
cb->incr_data = (BYTE*) realloc(cb->incr_data, cb->incr_data_length + bytes_left);
|
cb->incr_data = (BYTE*) realloc(cb->incr_data, cb->incr_data_length + bytes_left);
|
||||||
memcpy(cb->incr_data + cb->incr_data_length, data, bytes_left);
|
CopyMemory(cb->incr_data + cb->incr_data_length, data, bytes_left);
|
||||||
cb->incr_data_length += bytes_left;
|
cb->incr_data_length += bytes_left;
|
||||||
XFree(data);
|
XFree(data);
|
||||||
data = NULL;
|
data = NULL;
|
||||||
@ -887,7 +887,7 @@ static void xf_cliprdr_process_cb_format_list_event(xfInfo* xfi, RDP_CB_FORMAT_L
|
|||||||
static void xf_cliprdr_process_text(clipboardContext* cb, BYTE* data, int size)
|
static void xf_cliprdr_process_text(clipboardContext* cb, BYTE* data, int size)
|
||||||
{
|
{
|
||||||
cb->data = (BYTE*) malloc(size);
|
cb->data = (BYTE*) malloc(size);
|
||||||
memcpy(cb->data, data, size);
|
CopyMemory(cb->data, data, size);
|
||||||
cb->data_length = size;
|
cb->data_length = size;
|
||||||
crlf2lf(cb->data, &cb->data_length);
|
crlf2lf(cb->data, &cb->data_length);
|
||||||
}
|
}
|
||||||
@ -961,7 +961,7 @@ static void xf_cliprdr_process_html(clipboardContext* cb, BYTE* data, int size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cb->data = (BYTE*) malloc(size - start + 1);
|
cb->data = (BYTE*) malloc(size - start + 1);
|
||||||
memcpy(cb->data, data + start, end - start);
|
CopyMemory(cb->data, data + start, end - start);
|
||||||
cb->data_length = end - start;
|
cb->data_length = end - start;
|
||||||
crlf2lf(cb->data, &cb->data_length);
|
crlf2lf(cb->data, &cb->data_length);
|
||||||
}
|
}
|
||||||
@ -1031,7 +1031,7 @@ static void xf_cliprdr_process_cb_data_response_event(xfInfo* xfi, RDP_CB_DATA_R
|
|||||||
cb->respond = NULL;
|
cb->respond = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void xf_process_cliprdr_event(xfInfo* xfi, RDP_EVENT* event)
|
void xf_process_cliprdr_event(xfInfo* xfi, wMessage* event)
|
||||||
{
|
{
|
||||||
switch (GetMessageType(event->id))
|
switch (GetMessageType(event->id))
|
||||||
{
|
{
|
||||||
@ -1148,7 +1148,7 @@ BOOL xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent)
|
|||||||
}
|
}
|
||||||
if (data)
|
if (data)
|
||||||
{
|
{
|
||||||
memcpy(&alt_format, data, 4);
|
CopyMemory(&alt_format, data, 4);
|
||||||
XFree(data);
|
XFree(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman);
|
void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman);
|
||||||
void xf_cliprdr_uninit(xfInfo* xfi);
|
void xf_cliprdr_uninit(xfInfo* xfi);
|
||||||
void xf_process_cliprdr_event(xfInfo* xfi, RDP_EVENT* event);
|
void xf_process_cliprdr_event(xfInfo* xfi, wMessage* event);
|
||||||
BOOL xf_cliprdr_process_selection_notify(xfInfo* xfi, XEvent* xevent);
|
BOOL xf_cliprdr_process_selection_notify(xfInfo* xfi, XEvent* xevent);
|
||||||
BOOL xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent);
|
BOOL xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent);
|
||||||
BOOL xf_cliprdr_process_selection_clear(xfInfo* xfi, XEvent* xevent);
|
BOOL xf_cliprdr_process_selection_clear(xfInfo* xfi, XEvent* xevent);
|
||||||
|
@ -242,14 +242,14 @@ void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail)
|
|||||||
rail->rail_DesktopNonMonitored = xf_rail_DesktopNonMonitored;
|
rail->rail_DesktopNonMonitored = xf_rail_DesktopNonMonitored;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xf_on_free_rail_client_event(RDP_EVENT* event)
|
static void xf_on_free_rail_client_event(wMessage* event)
|
||||||
{
|
{
|
||||||
rail_free_cloned_order(GetMessageType(event->id), event->user_data);
|
rail_free_cloned_order(GetMessageType(event->id), event->wParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xf_send_rail_client_event(rdpChannels* channels, UINT16 event_type, void* param)
|
static void xf_send_rail_client_event(rdpChannels* channels, UINT16 event_type, void* param)
|
||||||
{
|
{
|
||||||
RDP_EVENT* out_event = NULL;
|
wMessage* out_event = NULL;
|
||||||
void* payload = NULL;
|
void* payload = NULL;
|
||||||
|
|
||||||
payload = rail_clone_order(event_type, param);
|
payload = rail_clone_order(event_type, param);
|
||||||
@ -447,11 +447,11 @@ void xf_rail_end_local_move(xfInfo* xfi, rdpWindow *window)
|
|||||||
xfw->local_move.state = LMS_TERMINATING;
|
xfw->local_move.state = LMS_TERMINATING;
|
||||||
}
|
}
|
||||||
|
|
||||||
void xf_process_rail_get_sysparams_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
void xf_process_rail_get_sysparams_event(xfInfo* xfi, rdpChannels* channels, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_SYSPARAM_ORDER* sysparam;
|
RAIL_SYSPARAM_ORDER* sysparam;
|
||||||
|
|
||||||
sysparam = (RAIL_SYSPARAM_ORDER*) event->user_data;
|
sysparam = (RAIL_SYSPARAM_ORDER*) event->wParam;
|
||||||
|
|
||||||
sysparam->workArea.left = xfi->workArea.x;
|
sysparam->workArea.left = xfi->workArea.x;
|
||||||
sysparam->workArea.top = xfi->workArea.y;
|
sysparam->workArea.top = xfi->workArea.y;
|
||||||
@ -479,11 +479,11 @@ const char* error_code_names[] =
|
|||||||
"RAIL_EXEC_E_SESSION_LOCKED"
|
"RAIL_EXEC_E_SESSION_LOCKED"
|
||||||
};
|
};
|
||||||
|
|
||||||
void xf_process_rail_exec_result_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
void xf_process_rail_exec_result_event(xfInfo* xfi, rdpChannels* channels, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_EXEC_RESULT_ORDER* exec_result;
|
RAIL_EXEC_RESULT_ORDER* exec_result;
|
||||||
|
|
||||||
exec_result = (RAIL_EXEC_RESULT_ORDER*) event->user_data;
|
exec_result = (RAIL_EXEC_RESULT_ORDER*) event->wParam;
|
||||||
|
|
||||||
if (exec_result->execResult != RAIL_EXEC_S_OK)
|
if (exec_result->execResult != RAIL_EXEC_S_OK)
|
||||||
{
|
{
|
||||||
@ -497,9 +497,9 @@ void xf_process_rail_exec_result_event(xfInfo* xfi, rdpChannels* channels, RDP_E
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void xf_process_rail_server_sysparam_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
void xf_process_rail_server_sysparam_event(xfInfo* xfi, rdpChannels* channels, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_SYSPARAM_ORDER* sysparam = (RAIL_SYSPARAM_ORDER*) event->user_data;
|
RAIL_SYSPARAM_ORDER* sysparam = (RAIL_SYSPARAM_ORDER*) event->wParam;
|
||||||
|
|
||||||
switch (sysparam->param)
|
switch (sysparam->param)
|
||||||
{
|
{
|
||||||
@ -511,11 +511,11 @@ void xf_process_rail_server_sysparam_event(xfInfo* xfi, rdpChannels* channels, R
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void xf_process_rail_server_minmaxinfo_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
void xf_process_rail_server_minmaxinfo_event(xfInfo* xfi, rdpChannels* channels, wMessage* event)
|
||||||
{
|
{
|
||||||
rdpRail* rail;
|
rdpRail* rail;
|
||||||
rdpWindow* rail_window = NULL;
|
rdpWindow* rail_window = NULL;
|
||||||
RAIL_MINMAXINFO_ORDER* minmax = (RAIL_MINMAXINFO_ORDER*) event->user_data;
|
RAIL_MINMAXINFO_ORDER* minmax = (RAIL_MINMAXINFO_ORDER*) event->wParam;
|
||||||
|
|
||||||
rail = ((rdpContext*) xfi->context)->rail;
|
rail = ((rdpContext*) xfi->context)->rail;
|
||||||
rail_window = window_list_get_by_id(rail->list, minmax->windowId);
|
rail_window = window_list_get_by_id(rail->list, minmax->windowId);
|
||||||
@ -553,14 +553,14 @@ const char* movetype_names[] =
|
|||||||
"RAIL_WMSZ_KEYSIZE"
|
"RAIL_WMSZ_KEYSIZE"
|
||||||
};
|
};
|
||||||
|
|
||||||
void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChannels* channels, wMessage* event)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
rdpRail* rail;
|
rdpRail* rail;
|
||||||
int direction = 0;
|
int direction = 0;
|
||||||
Window child_window;
|
Window child_window;
|
||||||
rdpWindow* rail_window = NULL;
|
rdpWindow* rail_window = NULL;
|
||||||
RAIL_LOCALMOVESIZE_ORDER* movesize = (RAIL_LOCALMOVESIZE_ORDER*) event->user_data;
|
RAIL_LOCALMOVESIZE_ORDER* movesize = (RAIL_LOCALMOVESIZE_ORDER*) event->wParam;
|
||||||
|
|
||||||
rail = ((rdpContext*) xfi->context)->rail;
|
rail = ((rdpContext*) xfi->context)->rail;
|
||||||
rail_window = window_list_get_by_id(rail->list, movesize->windowId);
|
rail_window = window_list_get_by_id(rail->list, movesize->windowId);
|
||||||
@ -645,10 +645,10 @@ void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChannels* channe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void xf_process_rail_appid_resp_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
void xf_process_rail_appid_resp_event(xfInfo* xfi, rdpChannels* channels, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_GET_APPID_RESP_ORDER* appid_resp =
|
RAIL_GET_APPID_RESP_ORDER* appid_resp =
|
||||||
(RAIL_GET_APPID_RESP_ORDER*) event->user_data;
|
(RAIL_GET_APPID_RESP_ORDER*) event->wParam;
|
||||||
|
|
||||||
printf("Server Application ID Response PDU: windowId=0x%X "
|
printf("Server Application ID Response PDU: windowId=0x%X "
|
||||||
"applicationId=(length=%d dump)\n",
|
"applicationId=(length=%d dump)\n",
|
||||||
@ -657,16 +657,16 @@ void xf_process_rail_appid_resp_event(xfInfo* xfi, rdpChannels* channels, RDP_EV
|
|||||||
winpr_HexDump(appid_resp->applicationId.string, appid_resp->applicationId.length);
|
winpr_HexDump(appid_resp->applicationId.string, appid_resp->applicationId.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
void xf_process_rail_langbarinfo_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
void xf_process_rail_langbarinfo_event(xfInfo* xfi, rdpChannels* channels, wMessage* event)
|
||||||
{
|
{
|
||||||
RAIL_LANGBAR_INFO_ORDER* langbar =
|
RAIL_LANGBAR_INFO_ORDER* langbar =
|
||||||
(RAIL_LANGBAR_INFO_ORDER*) event->user_data;
|
(RAIL_LANGBAR_INFO_ORDER*) event->wParam;
|
||||||
|
|
||||||
printf("Language Bar Information PDU: languageBarStatus=0x%X\n",
|
printf("Language Bar Information PDU: languageBarStatus=0x%X\n",
|
||||||
langbar->languageBarStatus);
|
langbar->languageBarStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
void xf_process_rail_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
void xf_process_rail_event(xfInfo* xfi, rdpChannels* channels, wMessage* event)
|
||||||
{
|
{
|
||||||
switch (GetMessageType(event->id))
|
switch (GetMessageType(event->id))
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ void xf_rail_paint(xfInfo* xfi, rdpRail* rail, INT32 uleft, INT32 utop, UINT32 u
|
|||||||
void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail);
|
void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail);
|
||||||
void xf_rail_send_client_system_command(xfInfo* xfi, UINT32 windowId, UINT16 command);
|
void xf_rail_send_client_system_command(xfInfo* xfi, UINT32 windowId, UINT16 command);
|
||||||
void xf_rail_send_activate(xfInfo* xfi, Window xwindow, BOOL enabled);
|
void xf_rail_send_activate(xfInfo* xfi, Window xwindow, BOOL enabled);
|
||||||
void xf_process_rail_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event);
|
void xf_process_rail_event(xfInfo* xfi, rdpChannels* chanman, wMessage* event);
|
||||||
void xf_rail_adjust_position(xfInfo* xfi, rdpWindow *window);
|
void xf_rail_adjust_position(xfInfo* xfi, rdpWindow *window);
|
||||||
void xf_rail_end_local_move(xfInfo* xfi, rdpWindow *window);
|
void xf_rail_end_local_move(xfInfo* xfi, rdpWindow *window);
|
||||||
|
|
||||||
|
@ -375,7 +375,7 @@ static void xf_process_tsmf_redraw_event(xfInfo* xfi, RDP_REDRAW_EVENT* revent)
|
|||||||
revent->x, revent->y, revent->width, revent->height, revent->x, revent->y);
|
revent->x, revent->y, revent->width, revent->height, revent->x, revent->y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void xf_process_tsmf_event(xfInfo* xfi, RDP_EVENT* event)
|
void xf_process_tsmf_event(xfInfo* xfi, wMessage* event)
|
||||||
{
|
{
|
||||||
switch (GetMessageType(event->id))
|
switch (GetMessageType(event->id))
|
||||||
{
|
{
|
||||||
@ -400,7 +400,7 @@ void xf_tsmf_uninit(xfInfo* xfi)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void xf_process_tsmf_event(xfInfo* xfi, RDP_EVENT* event)
|
void xf_process_tsmf_event(xfInfo* xfi, wMessage* event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,6 +24,6 @@
|
|||||||
|
|
||||||
void xf_tsmf_init(xfInfo* xfi, long xv_port);
|
void xf_tsmf_init(xfInfo* xfi, long xv_port);
|
||||||
void xf_tsmf_uninit(xfInfo* xfi);
|
void xf_tsmf_uninit(xfInfo* xfi);
|
||||||
void xf_process_tsmf_event(xfInfo* xfi, RDP_EVENT* event);
|
void xf_process_tsmf_event(xfInfo* xfi, wMessage* event);
|
||||||
|
|
||||||
#endif /* __XF_TSMF_H */
|
#endif /* __XF_TSMF_H */
|
||||||
|
@ -969,7 +969,7 @@ int xf_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int si
|
|||||||
void xf_process_channel_event(rdpChannels* channels, freerdp* instance)
|
void xf_process_channel_event(rdpChannels* channels, freerdp* instance)
|
||||||
{
|
{
|
||||||
xfInfo* xfi;
|
xfInfo* xfi;
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
|
|
||||||
xfi = ((xfContext*) instance->context)->xfi;
|
xfi = ((xfContext*) instance->context)->xfi;
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ static int test_rdp_channel_data(freerdp* instance, int chan_id, BYTE* data, int
|
|||||||
|
|
||||||
static int event_processed;
|
static int event_processed;
|
||||||
|
|
||||||
static void event_process_callback(RDP_EVENT* event)
|
static void event_process_callback(wMessage* event)
|
||||||
{
|
{
|
||||||
printf("Event %d processed.\n", event->event_type);
|
printf("Event %d processed.\n", event->event_type);
|
||||||
event_processed = 1;
|
event_processed = 1;
|
||||||
@ -107,7 +107,7 @@ void test_cliprdr(void)
|
|||||||
rdpChannels* channels;
|
rdpChannels* channels;
|
||||||
rdpSettings settings = { 0 };
|
rdpSettings settings = { 0 };
|
||||||
freerdp instance = { 0 };
|
freerdp instance = { 0 };
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
RDP_CB_FORMAT_LIST_EVENT* format_list_event;
|
RDP_CB_FORMAT_LIST_EVENT* format_list_event;
|
||||||
RDP_CB_DATA_REQUEST_EVENT* data_request_event;
|
RDP_CB_DATA_REQUEST_EVENT* data_request_event;
|
||||||
RDP_CB_DATA_RESPONSE_EVENT* data_response_event;
|
RDP_CB_DATA_RESPONSE_EVENT* data_response_event;
|
||||||
|
@ -475,7 +475,7 @@ int stream_equal_dump(void * dataS, size_t sizeS, void * data, size_t size)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
static void test_on_free_rail_client_event(RDP_EVENT* event)
|
static void test_on_free_rail_client_event(wMessage* event)
|
||||||
{
|
{
|
||||||
if (event->event_class == RDP_EVENT_CLASS_RAIL)
|
if (event->event_class == RDP_EVENT_CLASS_RAIL)
|
||||||
{
|
{
|
||||||
@ -489,7 +489,7 @@ static void send_ui_event2plugin(
|
|||||||
void * data
|
void * data
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
RDP_EVENT* out_event = NULL;
|
wMessage* out_event = NULL;
|
||||||
void * payload = NULL;
|
void * payload = NULL;
|
||||||
|
|
||||||
payload = rail_clone_order(event_type, data);
|
payload = rail_clone_order(event_type, data);
|
||||||
@ -547,7 +547,7 @@ static int emulate_client_send_channel_data(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void save_event(RDP_EVENT* event, RAIL_EVENT* rail_event)
|
void save_event(wMessage* event, RAIL_EVENT* rail_event)
|
||||||
{
|
{
|
||||||
rail_event->event_type = event->event_type;
|
rail_event->event_type = event->event_type;
|
||||||
|
|
||||||
@ -610,7 +610,7 @@ void save_event(RDP_EVENT* event, RAIL_EVENT* rail_event)
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
static void process_events_and_channel_data_from_plugin(thread_param* param)
|
static void process_events_and_channel_data_from_plugin(thread_param* param)
|
||||||
{
|
{
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
|
|
||||||
param->th_count++;
|
param->th_count++;
|
||||||
while (param->th_to_finish == 0)
|
while (param->th_to_finish == 0)
|
||||||
|
@ -41,11 +41,11 @@ FREERDP_API int freerdp_channels_pre_connect(rdpChannels* channels, freerdp* ins
|
|||||||
FREERDP_API int freerdp_channels_post_connect(rdpChannels* channels, freerdp* instance);
|
FREERDP_API int freerdp_channels_post_connect(rdpChannels* channels, freerdp* instance);
|
||||||
FREERDP_API int freerdp_channels_data(freerdp* instance, int channel_id, void* data, int data_size,
|
FREERDP_API int freerdp_channels_data(freerdp* instance, int channel_id, void* data, int data_size,
|
||||||
int flags, int total_size);
|
int flags, int total_size);
|
||||||
FREERDP_API int freerdp_channels_send_event(rdpChannels* channels, RDP_EVENT* event);
|
FREERDP_API int freerdp_channels_send_event(rdpChannels* channels, wMessage* event);
|
||||||
FREERDP_API BOOL freerdp_channels_get_fds(rdpChannels* channels, freerdp* instance, void** read_fds,
|
FREERDP_API BOOL freerdp_channels_get_fds(rdpChannels* channels, freerdp* instance, void** read_fds,
|
||||||
int* read_count, void** write_fds, int* write_count);
|
int* read_count, void** write_fds, int* write_count);
|
||||||
FREERDP_API BOOL freerdp_channels_check_fds(rdpChannels* channels, freerdp* instance);
|
FREERDP_API BOOL freerdp_channels_check_fds(rdpChannels* channels, freerdp* instance);
|
||||||
FREERDP_API RDP_EVENT* freerdp_channels_pop_event(rdpChannels* channels);
|
FREERDP_API wMessage* freerdp_channels_pop_event(rdpChannels* channels);
|
||||||
FREERDP_API void freerdp_channels_close(rdpChannels* channels, freerdp* instance);
|
FREERDP_API void freerdp_channels_close(rdpChannels* channels, freerdp* instance);
|
||||||
|
|
||||||
FREERDP_API HANDLE freerdp_channels_get_event_handle(freerdp* instance);
|
FREERDP_API HANDLE freerdp_channels_get_event_handle(freerdp* instance);
|
||||||
|
@ -40,11 +40,11 @@
|
|||||||
/**
|
/**
|
||||||
* Clipboard Events
|
* Clipboard Events
|
||||||
*/
|
*/
|
||||||
typedef RDP_EVENT RDP_CB_MONITOR_READY_EVENT;
|
typedef wMessage RDP_CB_MONITOR_READY_EVENT;
|
||||||
|
|
||||||
struct _RDP_CB_FORMAT_LIST_EVENT
|
struct _RDP_CB_FORMAT_LIST_EVENT
|
||||||
{
|
{
|
||||||
RDP_EVENT event;
|
wMessage event;
|
||||||
UINT32* formats;
|
UINT32* formats;
|
||||||
UINT16 num_formats;
|
UINT16 num_formats;
|
||||||
BYTE* raw_format_data;
|
BYTE* raw_format_data;
|
||||||
@ -54,14 +54,14 @@ typedef struct _RDP_CB_FORMAT_LIST_EVENT RDP_CB_FORMAT_LIST_EVENT;
|
|||||||
|
|
||||||
struct _RDP_CB_DATA_REQUEST_EVENT
|
struct _RDP_CB_DATA_REQUEST_EVENT
|
||||||
{
|
{
|
||||||
RDP_EVENT event;
|
wMessage event;
|
||||||
UINT32 format;
|
UINT32 format;
|
||||||
};
|
};
|
||||||
typedef struct _RDP_CB_DATA_REQUEST_EVENT RDP_CB_DATA_REQUEST_EVENT;
|
typedef struct _RDP_CB_DATA_REQUEST_EVENT RDP_CB_DATA_REQUEST_EVENT;
|
||||||
|
|
||||||
struct _RDP_CB_DATA_RESPONSE_EVENT
|
struct _RDP_CB_DATA_RESPONSE_EVENT
|
||||||
{
|
{
|
||||||
RDP_EVENT event;
|
wMessage event;
|
||||||
BYTE* data;
|
BYTE* data;
|
||||||
UINT32 size;
|
UINT32 size;
|
||||||
};
|
};
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
struct _RDP_VIDEO_FRAME_EVENT
|
struct _RDP_VIDEO_FRAME_EVENT
|
||||||
{
|
{
|
||||||
RDP_EVENT event;
|
wMessage event;
|
||||||
BYTE* frame_data;
|
BYTE* frame_data;
|
||||||
UINT32 frame_size;
|
UINT32 frame_size;
|
||||||
UINT32 frame_pixfmt;
|
UINT32 frame_pixfmt;
|
||||||
@ -39,7 +39,7 @@ typedef struct _RDP_VIDEO_FRAME_EVENT RDP_VIDEO_FRAME_EVENT;
|
|||||||
|
|
||||||
struct _RDP_REDRAW_EVENT
|
struct _RDP_REDRAW_EVENT
|
||||||
{
|
{
|
||||||
RDP_EVENT event;
|
wMessage event;
|
||||||
INT16 x;
|
INT16 x;
|
||||||
INT16 y;
|
INT16 y;
|
||||||
INT16 width;
|
INT16 width;
|
||||||
|
@ -92,7 +92,7 @@ struct _IWTSVirtualChannelManager
|
|||||||
/* Push a virtual channel event.
|
/* Push a virtual channel event.
|
||||||
This is a FreeRDP extension to standard MS API. */
|
This is a FreeRDP extension to standard MS API. */
|
||||||
int (*PushEvent) (IWTSVirtualChannelManager* pChannelMgr,
|
int (*PushEvent) (IWTSVirtualChannelManager* pChannelMgr,
|
||||||
RDP_EVENT* pEvent);
|
wMessage* pEvent);
|
||||||
/* Find the channel or ID to send data to a specific endpoint. */
|
/* Find the channel or ID to send data to a specific endpoint. */
|
||||||
UINT32 (*GetChannelId) (IWTSVirtualChannel * channel);
|
UINT32 (*GetChannelId) (IWTSVirtualChannel * channel);
|
||||||
IWTSVirtualChannel* (*FindChannelById) (IWTSVirtualChannelManager* pChannelMgr,
|
IWTSVirtualChannel* (*FindChannelById) (IWTSVirtualChannelManager* pChannelMgr,
|
||||||
|
@ -83,7 +83,7 @@ typedef UINT32 (FREERDP_CC * PVIRTUALCHANNELWRITE)(UINT32 openHandle,
|
|||||||
void* pData, UINT32 dataLength, void* pUserData);
|
void* pData, UINT32 dataLength, void* pUserData);
|
||||||
|
|
||||||
typedef UINT32 (FREERDP_CC * PVIRTUALCHANNELEVENTPUSH)(UINT32 openHandle,
|
typedef UINT32 (FREERDP_CC * PVIRTUALCHANNELEVENTPUSH)(UINT32 openHandle,
|
||||||
RDP_EVENT* event);
|
wMessage* event);
|
||||||
|
|
||||||
struct _CHANNEL_ENTRY_POINTS
|
struct _CHANNEL_ENTRY_POINTS
|
||||||
{
|
{
|
||||||
|
@ -63,15 +63,4 @@ typedef struct _RECTANGLE_16 RECTANGLE_16;
|
|||||||
#include <freerdp/message.h>
|
#include <freerdp/message.h>
|
||||||
#include <winpr/collections.h>
|
#include <winpr/collections.h>
|
||||||
|
|
||||||
typedef struct _RDP_EVENT RDP_EVENT;
|
|
||||||
|
|
||||||
typedef void (*RDP_EVENT_CALLBACK) (RDP_EVENT* event);
|
|
||||||
|
|
||||||
struct _RDP_EVENT
|
|
||||||
{
|
|
||||||
UINT32 id;
|
|
||||||
RDP_EVENT_CALLBACK on_event_free_callback;
|
|
||||||
void* user_data;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __RDP_TYPES_H */
|
#endif /* __RDP_TYPES_H */
|
||||||
|
@ -27,9 +27,9 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FREERDP_API RDP_EVENT* freerdp_event_new(UINT16 event_class, UINT16 event_type,
|
FREERDP_API wMessage* freerdp_event_new(UINT16 event_class, UINT16 event_type,
|
||||||
RDP_EVENT_CALLBACK on_event_free_callback, void* user_data);
|
MESSAGE_FREE_FN on_event_free_callback, void* user_data);
|
||||||
FREERDP_API void freerdp_event_free(RDP_EVENT* event);
|
FREERDP_API void freerdp_event_free(wMessage* event);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ struct rdp_svc_plugin
|
|||||||
|
|
||||||
void (*connect_callback)(rdpSvcPlugin* plugin);
|
void (*connect_callback)(rdpSvcPlugin* plugin);
|
||||||
void (*receive_callback)(rdpSvcPlugin* plugin, wStream* data_in);
|
void (*receive_callback)(rdpSvcPlugin* plugin, wStream* data_in);
|
||||||
void (*event_callback)(rdpSvcPlugin* plugin, RDP_EVENT* event);
|
void (*event_callback)(rdpSvcPlugin* plugin, wMessage* event);
|
||||||
void (*terminate_callback)(rdpSvcPlugin* plugin);
|
void (*terminate_callback)(rdpSvcPlugin* plugin);
|
||||||
|
|
||||||
HANDLE thread;
|
HANDLE thread;
|
||||||
@ -61,7 +61,7 @@ extern "C" {
|
|||||||
|
|
||||||
FREERDP_API void svc_plugin_init(rdpSvcPlugin* plugin, CHANNEL_ENTRY_POINTS* pEntryPoints);
|
FREERDP_API void svc_plugin_init(rdpSvcPlugin* plugin, CHANNEL_ENTRY_POINTS* pEntryPoints);
|
||||||
FREERDP_API int svc_plugin_send(rdpSvcPlugin* plugin, wStream* data_out);
|
FREERDP_API int svc_plugin_send(rdpSvcPlugin* plugin, wStream* data_out);
|
||||||
FREERDP_API int svc_plugin_send_event(rdpSvcPlugin* plugin, RDP_EVENT* event);
|
FREERDP_API int svc_plugin_send_event(rdpSvcPlugin* plugin, wMessage* event);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -33,32 +33,32 @@
|
|||||||
#include <freerdp/client/tsmf.h>
|
#include <freerdp/client/tsmf.h>
|
||||||
#include <freerdp/rail.h>
|
#include <freerdp/rail.h>
|
||||||
|
|
||||||
static RDP_EVENT* freerdp_cliprdr_event_new(UINT16 event_type)
|
static wMessage* freerdp_cliprdr_event_new(UINT16 event_type)
|
||||||
{
|
{
|
||||||
RDP_EVENT* event = NULL;
|
wMessage* event = NULL;
|
||||||
|
|
||||||
switch (event_type)
|
switch (event_type)
|
||||||
{
|
{
|
||||||
case CliprdrChannel_MonitorReady:
|
case CliprdrChannel_MonitorReady:
|
||||||
event = (RDP_EVENT*) malloc(sizeof(RDP_CB_MONITOR_READY_EVENT));
|
event = (wMessage*) malloc(sizeof(RDP_CB_MONITOR_READY_EVENT));
|
||||||
ZeroMemory(event, sizeof(RDP_CB_MONITOR_READY_EVENT));
|
ZeroMemory(event, sizeof(RDP_CB_MONITOR_READY_EVENT));
|
||||||
event->id = MakeMessageId(CliprdrChannel, MonitorReady);
|
event->id = MakeMessageId(CliprdrChannel, MonitorReady);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CliprdrChannel_FormatList:
|
case CliprdrChannel_FormatList:
|
||||||
event = (RDP_EVENT*) malloc(sizeof(RDP_CB_FORMAT_LIST_EVENT));
|
event = (wMessage*) malloc(sizeof(RDP_CB_FORMAT_LIST_EVENT));
|
||||||
ZeroMemory(event, sizeof(RDP_CB_FORMAT_LIST_EVENT));
|
ZeroMemory(event, sizeof(RDP_CB_FORMAT_LIST_EVENT));
|
||||||
event->id = MakeMessageId(CliprdrChannel, FormatList);
|
event->id = MakeMessageId(CliprdrChannel, FormatList);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CliprdrChannel_DataRequest:
|
case CliprdrChannel_DataRequest:
|
||||||
event = (RDP_EVENT*) malloc(sizeof(RDP_CB_DATA_REQUEST_EVENT));
|
event = (wMessage*) malloc(sizeof(RDP_CB_DATA_REQUEST_EVENT));
|
||||||
ZeroMemory(event, sizeof(RDP_CB_DATA_REQUEST_EVENT));
|
ZeroMemory(event, sizeof(RDP_CB_DATA_REQUEST_EVENT));
|
||||||
event->id = MakeMessageId(CliprdrChannel, DataRequest);
|
event->id = MakeMessageId(CliprdrChannel, DataRequest);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CliprdrChannel_DataResponse:
|
case CliprdrChannel_DataResponse:
|
||||||
event = (RDP_EVENT*) malloc(sizeof(RDP_CB_DATA_RESPONSE_EVENT));
|
event = (wMessage*) malloc(sizeof(RDP_CB_DATA_RESPONSE_EVENT));
|
||||||
ZeroMemory(event, sizeof(RDP_CB_DATA_RESPONSE_EVENT));
|
ZeroMemory(event, sizeof(RDP_CB_DATA_RESPONSE_EVENT));
|
||||||
event->id = MakeMessageId(CliprdrChannel, DataResponse);
|
event->id = MakeMessageId(CliprdrChannel, DataResponse);
|
||||||
break;
|
break;
|
||||||
@ -67,19 +67,19 @@ static RDP_EVENT* freerdp_cliprdr_event_new(UINT16 event_type)
|
|||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
static RDP_EVENT* freerdp_tsmf_event_new(UINT16 event_type)
|
static wMessage* freerdp_tsmf_event_new(UINT16 event_type)
|
||||||
{
|
{
|
||||||
RDP_EVENT* event = NULL;
|
wMessage* event = NULL;
|
||||||
|
|
||||||
switch (event_type)
|
switch (event_type)
|
||||||
{
|
{
|
||||||
case TsmfChannel_VideoFrame:
|
case TsmfChannel_VideoFrame:
|
||||||
event = (RDP_EVENT*) malloc(sizeof(RDP_VIDEO_FRAME_EVENT));
|
event = (wMessage*) malloc(sizeof(RDP_VIDEO_FRAME_EVENT));
|
||||||
ZeroMemory(event, sizeof(RDP_VIDEO_FRAME_EVENT));
|
ZeroMemory(event, sizeof(RDP_VIDEO_FRAME_EVENT));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TsmfChannel_Redraw:
|
case TsmfChannel_Redraw:
|
||||||
event = (RDP_EVENT*) malloc(sizeof(RDP_REDRAW_EVENT));
|
event = (wMessage*) malloc(sizeof(RDP_REDRAW_EVENT));
|
||||||
ZeroMemory(event, sizeof(RDP_REDRAW_EVENT));
|
ZeroMemory(event, sizeof(RDP_REDRAW_EVENT));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -87,26 +87,26 @@ static RDP_EVENT* freerdp_tsmf_event_new(UINT16 event_type)
|
|||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
static RDP_EVENT* freerdp_rail_event_new(UINT16 event_type)
|
static wMessage* freerdp_rail_event_new(UINT16 event_type)
|
||||||
{
|
{
|
||||||
RDP_EVENT* event = NULL;
|
wMessage* event = NULL;
|
||||||
|
|
||||||
event = (RDP_EVENT*) malloc(sizeof(RDP_EVENT));
|
event = (wMessage*) malloc(sizeof(wMessage));
|
||||||
ZeroMemory(event, sizeof(RDP_EVENT));
|
ZeroMemory(event, sizeof(wMessage));
|
||||||
|
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
RDP_EVENT* freerdp_event_new(UINT16 event_class, UINT16 event_type,
|
wMessage* freerdp_event_new(UINT16 event_class, UINT16 event_type,
|
||||||
RDP_EVENT_CALLBACK on_event_free_callback, void* user_data)
|
MESSAGE_FREE_FN on_event_free_callback, void* user_data)
|
||||||
{
|
{
|
||||||
RDP_EVENT* event = NULL;
|
wMessage* event = NULL;
|
||||||
|
|
||||||
switch (event_class)
|
switch (event_class)
|
||||||
{
|
{
|
||||||
case DebugChannel_Class:
|
case DebugChannel_Class:
|
||||||
event = (RDP_EVENT*) malloc(sizeof(RDP_EVENT));
|
event = (wMessage*) malloc(sizeof(wMessage));
|
||||||
ZeroMemory(event, sizeof(RDP_EVENT));
|
ZeroMemory(event, sizeof(wMessage));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CliprdrChannel_Class:
|
case CliprdrChannel_Class:
|
||||||
@ -124,16 +124,15 @@ RDP_EVENT* freerdp_event_new(UINT16 event_class, UINT16 event_type,
|
|||||||
|
|
||||||
if (event)
|
if (event)
|
||||||
{
|
{
|
||||||
event->on_event_free_callback = on_event_free_callback;
|
event->wParam = user_data;
|
||||||
event->user_data = user_data;
|
event->Free = (void*) on_event_free_callback;
|
||||||
|
|
||||||
event->id = GetMessageId(event_class, event_type);
|
event->id = GetMessageId(event_class, event_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void freerdp_cliprdr_event_free(RDP_EVENT* event)
|
static void freerdp_cliprdr_event_free(wMessage* event)
|
||||||
{
|
{
|
||||||
switch (GetMessageType(event->id))
|
switch (GetMessageType(event->id))
|
||||||
{
|
{
|
||||||
@ -154,7 +153,7 @@ static void freerdp_cliprdr_event_free(RDP_EVENT* event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void freerdp_tsmf_event_free(RDP_EVENT* event)
|
static void freerdp_tsmf_event_free(wMessage* event)
|
||||||
{
|
{
|
||||||
switch (GetMessageType(event->id))
|
switch (GetMessageType(event->id))
|
||||||
{
|
{
|
||||||
@ -168,17 +167,17 @@ static void freerdp_tsmf_event_free(RDP_EVENT* event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void freerdp_rail_event_free(RDP_EVENT* event)
|
static void freerdp_rail_event_free(wMessage* event)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void freerdp_event_free(RDP_EVENT* event)
|
void freerdp_event_free(wMessage* event)
|
||||||
{
|
{
|
||||||
if (event)
|
if (event)
|
||||||
{
|
{
|
||||||
if (event->on_event_free_callback)
|
if (event->Free)
|
||||||
event->on_event_free_callback(event);
|
event->Free(event);
|
||||||
|
|
||||||
switch (GetMessageClass(event->id))
|
switch (GetMessageClass(event->id))
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,7 @@ static void svc_plugin_process_received(rdpSvcPlugin* plugin, void* pData, UINT3
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void svc_plugin_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event_in)
|
static void svc_plugin_process_event(rdpSvcPlugin* plugin, wMessage* event_in)
|
||||||
{
|
{
|
||||||
MessageQueue_Post(plugin->MsgPipe->In, NULL, 1, (void*) event_in, NULL);
|
MessageQueue_Post(plugin->MsgPipe->In, NULL, 1, (void*) event_in, NULL);
|
||||||
}
|
}
|
||||||
@ -171,7 +171,7 @@ static void svc_plugin_open_event(UINT32 openHandle, UINT32 event, void* pData,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CHANNEL_EVENT_USER:
|
case CHANNEL_EVENT_USER:
|
||||||
svc_plugin_process_event(plugin, (RDP_EVENT*) pData);
|
svc_plugin_process_event(plugin, (wMessage*) pData);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -179,7 +179,7 @@ static void svc_plugin_open_event(UINT32 openHandle, UINT32 event, void* pData,
|
|||||||
static void* svc_plugin_thread_func(void* arg)
|
static void* svc_plugin_thread_func(void* arg)
|
||||||
{
|
{
|
||||||
wStream* data;
|
wStream* data;
|
||||||
RDP_EVENT* event;
|
wMessage* event;
|
||||||
wMessage message;
|
wMessage message;
|
||||||
rdpSvcPlugin* plugin = (rdpSvcPlugin*) arg;
|
rdpSvcPlugin* plugin = (rdpSvcPlugin*) arg;
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ static void* svc_plugin_thread_func(void* arg)
|
|||||||
}
|
}
|
||||||
else if (message.id == 1)
|
else if (message.id == 1)
|
||||||
{
|
{
|
||||||
event = (RDP_EVENT*) message.wParam;
|
event = (wMessage*) message.wParam;
|
||||||
IFCALL(plugin->event_callback, plugin, event);
|
IFCALL(plugin->event_callback, plugin, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -322,7 +322,7 @@ int svc_plugin_send(rdpSvcPlugin* plugin, wStream* data_out)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
int svc_plugin_send_event(rdpSvcPlugin* plugin, RDP_EVENT* event)
|
int svc_plugin_send_event(rdpSvcPlugin* plugin, wMessage* event)
|
||||||
{
|
{
|
||||||
UINT32 status = 0;
|
UINT32 status = 0;
|
||||||
|
|
||||||
|
@ -278,6 +278,10 @@ WINPR_API void ObjectPool_Free(wObjectPool* pool);
|
|||||||
|
|
||||||
/* Message Queue */
|
/* Message Queue */
|
||||||
|
|
||||||
|
typedef struct _wMessage wMessage;
|
||||||
|
|
||||||
|
typedef void (*MESSAGE_FREE_FN)(wMessage* message);
|
||||||
|
|
||||||
struct _wMessage
|
struct _wMessage
|
||||||
{
|
{
|
||||||
UINT32 id;
|
UINT32 id;
|
||||||
@ -285,8 +289,8 @@ struct _wMessage
|
|||||||
void* wParam;
|
void* wParam;
|
||||||
void* lParam;
|
void* lParam;
|
||||||
UINT64 time;
|
UINT64 time;
|
||||||
|
MESSAGE_FREE_FN Free;
|
||||||
};
|
};
|
||||||
typedef struct _wMessage wMessage;
|
|
||||||
|
|
||||||
struct _wMessageQueue
|
struct _wMessageQueue
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user