Add cliprdr constants and event types.
This commit is contained in:
parent
1ca5c76903
commit
f5adaa10c1
@ -99,7 +99,26 @@ enum FRDP_EVENT_TYPE
|
||||
{
|
||||
FRDP_EVENT_TYPE_DEBUG = 0,
|
||||
FRDP_EVENT_TYPE_VIDEO_FRAME = 1,
|
||||
FRDP_EVENT_TYPE_REDRAW = 2
|
||||
FRDP_EVENT_TYPE_REDRAW = 2,
|
||||
FRDP_EVENT_TYPE_CB_SYNC = 3,
|
||||
FRDP_EVENT_TYPE_CB_FORMAT_LIST = 4,
|
||||
FRDP_EVENT_TYPE_CB_DATA_REQUEST = 5,
|
||||
FRDP_EVENT_TYPE_CB_DATA_RESPONSE = 6
|
||||
};
|
||||
|
||||
/**
|
||||
* Clipboard Formats
|
||||
*/
|
||||
enum FRDP_CB_FORMAT
|
||||
{
|
||||
CB_FORMAT_RAW = 0,
|
||||
CB_FORMAT_TEXT = 1,
|
||||
CB_FORMAT_DIB = 8,
|
||||
CB_FORMAT_UNICODETEXT = 13,
|
||||
CB_FORMAT_HTML = 0xD010,
|
||||
CB_FORMAT_PNG = 0xD011,
|
||||
CB_FORMAT_JPEG = 0xD012,
|
||||
CB_FORMAT_GIF = 0xD013
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -164,6 +164,31 @@ struct _FRDP_REDRAW_EVENT
|
||||
};
|
||||
typedef struct _FRDP_REDRAW_EVENT FRDP_REDRAW_EVENT;
|
||||
|
||||
typedef FRDP_EVENT FRDP_CB_SYNC_EVENT;
|
||||
|
||||
struct _FRDP_CB_FORMAT_LIST_EVENT
|
||||
{
|
||||
FRDP_EVENT event;
|
||||
uint16* formats;
|
||||
uint16 num_formats;
|
||||
};
|
||||
typedef struct _FRDP_CB_FORMAT_LIST_EVENT FRDP_CB_FORMAT_LIST_EVENT;
|
||||
|
||||
struct _FRDP_CB_DATA_REQUEST_EVENT
|
||||
{
|
||||
FRDP_EVENT event;
|
||||
uint16 format;
|
||||
};
|
||||
typedef struct _FRDP_CB_DATA_REQUEST_EVENT FRDP_CB_DATA_REQUEST_EVENT;
|
||||
|
||||
struct _FRDP_CB_DATA_RESPONSE_EVENT
|
||||
{
|
||||
FRDP_EVENT event;
|
||||
uint8* data;
|
||||
uint32 size;
|
||||
};
|
||||
typedef struct _FRDP_CB_DATA_RESPONSE_EVENT FRDP_CB_DATA_RESPONSE_EVENT;
|
||||
|
||||
typedef struct rdp_inst rdpInst;
|
||||
|
||||
#endif /* __RDP_TYPES_H */
|
||||
|
@ -40,6 +40,22 @@ FRDP_EVENT* freerdp_event_new(uint32 event_type, FRDP_EVENT_CALLBACK on_event_fr
|
||||
event = (FRDP_EVENT*)xmalloc(sizeof(FRDP_REDRAW_EVENT));
|
||||
memset(event, 0, sizeof(FRDP_REDRAW_EVENT));
|
||||
break;
|
||||
case FRDP_EVENT_TYPE_CB_SYNC:
|
||||
event = (FRDP_EVENT*)xmalloc(sizeof(FRDP_CB_SYNC_EVENT));
|
||||
memset(event, 0, sizeof(FRDP_CB_SYNC_EVENT));
|
||||
break;
|
||||
case FRDP_EVENT_TYPE_CB_FORMAT_LIST:
|
||||
event = (FRDP_EVENT*)xmalloc(sizeof(FRDP_CB_FORMAT_LIST_EVENT));
|
||||
memset(event, 0, sizeof(FRDP_CB_FORMAT_LIST_EVENT));
|
||||
break;
|
||||
case FRDP_EVENT_TYPE_CB_DATA_REQUEST:
|
||||
event = (FRDP_EVENT*)xmalloc(sizeof(FRDP_CB_DATA_REQUEST_EVENT));
|
||||
memset(event, 0, sizeof(FRDP_CB_DATA_REQUEST_EVENT));
|
||||
break;
|
||||
case FRDP_EVENT_TYPE_CB_DATA_RESPONSE:
|
||||
event = (FRDP_EVENT*)xmalloc(sizeof(FRDP_CB_DATA_RESPONSE_EVENT));
|
||||
memset(event, 0, sizeof(FRDP_CB_DATA_RESPONSE_EVENT));
|
||||
break;
|
||||
}
|
||||
if (event != NULL)
|
||||
{
|
||||
@ -68,6 +84,20 @@ void freerdp_event_free(FRDP_EVENT* event)
|
||||
xfree(vevent->visible_rects);
|
||||
}
|
||||
break;
|
||||
case FRDP_EVENT_TYPE_CB_FORMAT_LIST:
|
||||
{
|
||||
FRDP_CB_FORMAT_LIST_EVENT* cb_event = (FRDP_CB_FORMAT_LIST_EVENT*)event;
|
||||
|
||||
xfree(cb_event->formats);
|
||||
}
|
||||
break;
|
||||
case FRDP_EVENT_TYPE_CB_DATA_RESPONSE:
|
||||
{
|
||||
FRDP_CB_DATA_RESPONSE_EVENT* cb_event = (FRDP_CB_DATA_RESPONSE_EVENT*)event;
|
||||
|
||||
xfree(cb_event->data);
|
||||
}
|
||||
break;
|
||||
}
|
||||
xfree(event);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user