40#define USE_UNICODE_CLIPBOARD
45#ifdef USE_UNICODE_CLIPBOARD
46#define RDP_CF_TEXT CF_UNICODETEXT
48#define RDP_CF_TEXT CF_TEXT
70#ifdef USE_UNICODE_CLIPBOARD
90 swap_endianess = (*inptr == 0xfffe);
96 uvalue = ((uvalue << 8) & 0xff00) + (uvalue >> 8);
98 *outptr++ = swap_endianess ? 0x0d00 : 0x0d;
141 DEBUG_CLIPBOARD((
"xclip_provide_selection: requestor=0x%08x, target=%s, property=%s, length=%u\n", (
unsigned) req->requestor, XGetAtomName(
This->display, req->target), XGetAtomName(
This->display, req->property), (
unsigned)
length));
143 XChangeProperty(
This->display, req->requestor, req->property,
146 xev.xselection.type = SelectionNotify;
147 xev.xselection.serial = 0;
148 xev.xselection.send_event =
True;
149 xev.xselection.requestor = req->requestor;
150 xev.xselection.selection = req->selection;
151 xev.xselection.target = req->target;
152 xev.xselection.property = req->property;
153 xev.xselection.time = req->time;
154 XSendEvent(
This->display, req->requestor,
False, NoEventMask, &xev);
165 DEBUG_CLIPBOARD((
"xclip_refuse_selection: requestor=0x%08x, target=%s, property=%s\n",
166 (
unsigned) req->requestor, XGetAtomName(
This->display, req->target),
167 XGetAtomName(
This->display, req->property)));
169 xev.xselection.type = SelectionNotify;
170 xev.xselection.serial = 0;
171 xev.xselection.send_event =
True;
172 xev.xselection.requestor = req->requestor;
173 xev.xselection.selection = req->selection;
174 xev.xselection.target = req->target;
175 xev.xselection.property =
None;
176 xev.xselection.time = req->time;
177 XSendEvent(
This->display, req->requestor,
False, NoEventMask, &xev);
184 if (
This->xclip.rdp_clipboard_request_format != 0)
187 This->xclip.rdp_clipboard_request_format = 0;
188 if (!
This->xclip.rdesktop_is_selection_owner)
209 XGetAtomName(
This->display,
target), (
unsigned) source_size));
211#ifdef USE_UNICODE_CLIPBOARD
212 if (
target ==
This->xclip.format_string_atom ||
215 size_t unicode_buffer_size;
216 char *unicode_buffer;
218 size_t unicode_buffer_size_remaining;
219 char *unicode_buffer_remaining;
220 char *data_remaining;
221 size_t data_size_remaining;
222 uint32 translated_data_size;
223 uint8 *translated_data;
235 char *locale_charset = nl_langinfo(CODESET);
239 DEBUG_CLIPBOARD((
"Locale charset %s not found in iconv. Unable to convert clipboard text.\n", locale_charset));
242 unicode_buffer_size = source_size * 4;
244 else if (
target ==
This->xclip.format_unicode_atom)
251 unicode_buffer_size = source_size;
253 else if (
target ==
This->xclip.format_utf8_string_atom)
263 unicode_buffer_size = source_size * 2;
270 unicode_buffer =
xmalloc(unicode_buffer_size);
271 unicode_buffer_size_remaining = unicode_buffer_size;
272 unicode_buffer_remaining = unicode_buffer;
273 data_remaining = (
char *)
source;
274 data_size_remaining = source_size;
275 iconv(
cd, (ICONV_CONST
char **) &data_remaining, &data_size_remaining,
276 &unicode_buffer_remaining, &unicode_buffer_size_remaining);
280 translated_data_size = unicode_buffer_size - unicode_buffer_size_remaining;
281 translated_data = utf16_lf2crlf((
uint8 *) unicode_buffer, &translated_data_size);
282 if (translated_data !=
NULL)
285 translated_data_size));
287 xfree(translated_data);
290 xfree(unicode_buffer);
297 uint8 *translated_data;
305 if (translated_data !=
NULL)
308 xfree(translated_data);
314 else if (
target ==
This->xclip.rdesktop_native_atom)
329 XDeleteProperty(
This->display,
This->wnd,
This->xclip.rdesktop_clipboard_target_atom);
330 XDeleteProperty(
This->display,
This->wnd,
This->xclip.rdesktop_primary_timestamp_target_atom);
331 XDeleteProperty(
This->display,
This->wnd,
This->xclip.rdesktop_clipboard_timestamp_target_atom);
337 XChangeProperty(
This->display, DefaultRootWindow(
This->display),
338 This->xclip.rdesktop_selection_notify_atom, XA_INTEGER, 32, PropModeReplace,
NULL, 0);
344 Window primary_owner, clipboard_owner;
346 if (
This->xclip.probing_selections)
348 DEBUG_CLIPBOARD((
"Already probing selections. Scheduling reprobe.\n"));
349 This->xclip.reprobe_selections =
True;
355 This->xclip.probing_selections =
True;
360 if (
This->xclip.auto_mode)
361 primary_owner = XGetSelectionOwner(
This->display,
This->xclip.primary_atom);
363 primary_owner =
None;
365 clipboard_owner = XGetSelectionOwner(
This->display,
This->xclip.clipboard_atom);
368 if (((primary_owner ==
This->wnd) || !
This->xclip.auto_mode) && (clipboard_owner ==
This->wnd))
372 if ((primary_owner !=
None) && (clipboard_owner !=
None))
374 This->xclip.primary_timestamp = 0;
375 This->xclip.clipboard_timestamp = 0;
376 XConvertSelection(
This->display,
This->xclip.primary_atom,
This->xclip.timestamp_atom,
377 This->xclip.rdesktop_primary_timestamp_target_atom,
This->wnd, CurrentTime);
378 XConvertSelection(
This->display,
This->xclip.clipboard_atom,
This->xclip.timestamp_atom,
379 This->xclip.rdesktop_clipboard_timestamp_target_atom,
This->wnd, CurrentTime);
384 if (primary_owner !=
None)
386 XConvertSelection(
This->display,
This->xclip.primary_atom,
This->xclip.targets_atom,
387 This->xclip.rdesktop_clipboard_target_atom,
This->wnd, CurrentTime);
392 if (clipboard_owner !=
None)
394 XConvertSelection(
This->display,
This->xclip.clipboard_atom,
This->xclip.targets_atom,
395 This->xclip.rdesktop_clipboard_target_atom,
This->wnd, CurrentTime);
419 unsigned long nitems, bytes_left;
420 XWindowAttributes wa;
422 Atom *supported_targets;
429 DEBUG_CLIPBOARD((
"xclip_handle_SelectionNotify: selection=%s, target=%s, property=%s\n",
430 XGetAtomName(
This->display,
event->selection),
431 XGetAtomName(
This->display,
event->target),
432 XGetAtomName(
This->display,
event->property)));
434 if (
event->target ==
This->xclip.timestamp_atom)
436 if (
event->selection ==
This->xclip.primary_atom)
439 This->xclip.rdesktop_primary_timestamp_target_atom, 0,
440 XMaxRequestSize(
This->display),
False, AnyPropertyType,
446 This->xclip.rdesktop_clipboard_timestamp_target_atom, 0,
447 XMaxRequestSize(
This->display),
False, AnyPropertyType,
458 if (
event->selection ==
This->xclip.primary_atom)
461 if (
This->xclip.primary_timestamp == 0)
462 This->xclip.primary_timestamp++;
463 XDeleteProperty(
This->display,
This->wnd,
This->xclip.rdesktop_primary_timestamp_target_atom);
465 (
unsigned)
This->xclip.primary_timestamp));
470 if (
This->xclip.clipboard_timestamp == 0)
471 This->xclip.clipboard_timestamp++;
472 XDeleteProperty(
This->display,
This->wnd,
This->xclip.rdesktop_clipboard_timestamp_target_atom);
474 (
unsigned)
This->xclip.clipboard_timestamp));
479 if (
This->xclip.primary_timestamp &&
This->xclip.clipboard_timestamp)
481 if (
This->xclip.primary_timestamp >
This->xclip.clipboard_timestamp)
484 XConvertSelection(
This->display,
This->xclip.primary_atom,
This->xclip.targets_atom,
485 This->xclip.rdesktop_clipboard_target_atom,
This->wnd,
491 XConvertSelection(
This->display,
This->xclip.clipboard_atom,
This->xclip.targets_atom,
492 This->xclip.rdesktop_clipboard_target_atom,
This->wnd,
500 if (
This->xclip.probing_selections &&
This->xclip.reprobe_selections)
507 res = XGetWindowProperty(
This->display,
This->wnd,
This->xclip.rdesktop_clipboard_target_atom,
508 0, XMaxRequestSize(
This->display),
False, AnyPropertyType,
523 XGetWindowAttributes(
This->display,
This->wnd, &wa);
524 if ((wa.your_event_mask | PropertyChangeMask) != wa.your_event_mask)
526 XSelectInput(
This->display,
This->wnd, (wa.your_event_mask | PropertyChangeMask));
529 This->xclip.incr_target =
event->target;
530 This->xclip.waiting_for_INCR = 1;
535 if (
event->target ==
This->xclip.targets_atom)
541 int text_target_satisfaction = 0;
542 Atom best_text_target = 0;
546 for (
i = 0;
i < nitems;
i++)
549 XGetAtomName(
This->display, supported_targets[
i])));
550 if (supported_targets[
i] ==
This->xclip.format_string_atom)
552 if (text_target_satisfaction < 1)
554 DEBUG_CLIPBOARD((
"Other party supports STRING, choosing that as best_target\n"));
555 best_text_target = supported_targets[
i];
556 text_target_satisfaction = 1;
559#ifdef USE_UNICODE_CLIPBOARD
560 else if (supported_targets[
i] ==
This->xclip.format_unicode_atom)
562 if (text_target_satisfaction < 2)
564 DEBUG_CLIPBOARD((
"Other party supports text/unicode, choosing that as best_target\n"));
565 best_text_target = supported_targets[
i];
566 text_target_satisfaction = 2;
569 else if (supported_targets[
i] ==
This->xclip.format_utf8_string_atom)
571 if (text_target_satisfaction < 3)
573 DEBUG_CLIPBOARD((
"Other party supports UTF8_STRING, choosing that as best_target\n"));
574 best_text_target = supported_targets[
i];
575 text_target_satisfaction = 3;
579 else if (supported_targets[
i] ==
This->xclip.rdesktop_clipboard_formats_atom)
581 if (
This->xclip.probing_selections && (text_target_satisfaction < 4))
583 DEBUG_CLIPBOARD((
"Other party supports native formats, choosing that as best_target\n"));
584 best_text_target = supported_targets[
i];
585 text_target_satisfaction = 4;
594 if ((best_text_target != 0)
595 && (!
This->xclip.probing_selections
596 || (best_text_target ==
This->xclip.rdesktop_clipboard_formats_atom)))
598 XConvertSelection(
This->display,
event->selection, best_text_target,
599 This->xclip.rdesktop_clipboard_target_atom,
This->wnd,
event->time);
604 DEBUG_CLIPBOARD((
"Unable to find a textual target to satisfy RDP clipboard text request\n"));
610 if (
This->xclip.probing_selections)
612 Window primary_owner, clipboard_owner;
620 clipboard_owner = XGetSelectionOwner(
This->display,
This->xclip.clipboard_atom);
622 if (
This->xclip.auto_mode)
623 primary_owner = XGetSelectionOwner(
This->display,
This->xclip.primary_atom);
625 primary_owner = clipboard_owner;
627 if (primary_owner != clipboard_owner)
632 This->xclip.rdesktop_is_selection_owner =
True;
649 if (
This->xclip.probing_selections)
651 DEBUG_CLIPBOARD((
"Unable to find suitable target. Using default text format.\n"));
653 This->xclip.rdesktop_is_selection_owner =
False;
675 unsigned long nitems, bytes_left;
676 unsigned char *prop_return;
680 DEBUG_CLIPBOARD((
"xclip_handle_SelectionRequest: selection=%s, target=%s, property=%s\n",
681 XGetAtomName(
This->display,
event->selection),
682 XGetAtomName(
This->display,
event->target),
683 XGetAtomName(
This->display,
event->property)));
685 if (
event->target ==
This->xclip.targets_atom)
690 else if (
event->target ==
This->xclip.timestamp_atom)
695 else if (
event->target ==
This->xclip.rdesktop_clipboard_formats_atom)
704 if (
This->xclip.has_selection_request)
706 DEBUG_CLIPBOARD((
"Error: Another clipboard request was already sent to the RDP server and not yet responded. Refusing this request.\n"));
710 if (
event->target ==
This->xclip.rdesktop_native_atom)
714 res = XGetWindowProperty(
This->display,
event->requestor,
716 XA_INTEGER, &
type, &
format, &nitems, &bytes_left,
720 DEBUG_CLIPBOARD((
"Requested native format but didn't specifiy which.\n"));
728 else if (
event->target ==
This->xclip.format_string_atom ||
event->target == XA_STRING)
733 else if (
event->target ==
This->xclip.format_utf8_string_atom)
735#ifdef USE_UNICODE_CLIPBOARD
738 DEBUG_CLIPBOARD((
"Requested target unavailable due to lack of Unicode support. (It was not in TARGETS, so why did you ask for it?!)\n"));
743 else if (
event->target ==
This->xclip.format_unicode_atom)
750 DEBUG_CLIPBOARD((
"Requested target unavailable. (It was not in TARGETS, so why did you ask for it?!)\n"));
757 This->xclip.has_selection_request =
True;
781 unsigned long nitems;
783 unsigned long bytes_left = 1;
785 XWindowAttributes wa;
789 if (
event->state == PropertyNewValue &&
This->xclip.waiting_for_INCR)
791 DEBUG_CLIPBOARD((
"x_clip_handle_PropertyNotify: This->xclip.waiting_for_INCR != 0\n"));
793 while (bytes_left > 0)
797 if ((XGetWindowProperty
809 XGetWindowAttributes(
This->display,
This->wnd, &wa);
810 XSelectInput(
This->display,
This->wnd,
811 (wa.your_event_mask ^ PropertyChangeMask));
813 This->xclip.waiting_for_INCR = 0;
815 if (
This->xclip.clip_buflen > 0)
818 (
This,
This->xclip.clip_buffer,
This->xclip.clip_buflen,
This->xclip.incr_target))
824 This->xclip.clip_buflen = 0;
833 This->xclip.clip_buflen += nitems;
838 XDeleteProperty(
This->display,
This->wnd,
This->xclip.rdesktop_clipboard_target_atom);
842 if ((
event->atom ==
This->xclip.rdesktop_selection_notify_atom) &&
843 (
event->window == DefaultRootWindow(
This->display)))
857 This->xclip.acquire_time =
This->last_gesturetime;
859 XSetSelectionOwner(
This->display,
This->xclip.primary_atom,
This->wnd,
This->xclip.acquire_time);
860 if (XGetSelectionOwner(
This->display,
This->xclip.primary_atom) !=
This->wnd)
861 warning(
"Failed to aquire ownership of PRIMARY clipboard\n");
863 XSetSelectionOwner(
This->display,
This->xclip.clipboard_atom,
This->wnd,
This->xclip.acquire_time);
864 if (XGetSelectionOwner(
This->display,
This->xclip.clipboard_atom) !=
This->wnd)
865 warning(
"Failed to aquire ownership of CLIPBOARD clipboard\n");
867 if (
This->xclip.formats_data)
885 This->xclip.has_selection_request =
False;
889 if (
This->xclip.selection_request.target ==
This->xclip.format_string_atom ||
This->xclip.selection_request.target == XA_STRING)
904#ifdef USE_UNICODE_CLIPBOARD
905 else if (
This->xclip.selection_request.target ==
This->xclip.format_utf8_string_atom)
914 char *utf8_data_remaining = utf8_data;
915 char *data_remaining = (
char *)
data;
917 if (utf8_data ==
NULL)
922 iconv(
cd, (ICONV_CONST
char **) &data_remaining, &length_remaining,
923 &utf8_data_remaining, &utf8_length_remaining);
930 else if (
This->xclip.selection_request.target ==
This->xclip.format_unicode_atom)
937 else if (
This->xclip.selection_request.target ==
This->xclip.rdesktop_native_atom)
943 DEBUG_CLIPBOARD((
"ui_clip_handle_data: BUG! I don't know how to convert selection target %s!\n", XGetAtomName(
This->display,
This->xclip.selection_request.target)));
945 This->xclip.has_selection_request =
False;
950 This->xclip.has_selection_request =
False;
960 This->xclip.has_selection_request =
False;
966 Window primary_owner, clipboard_owner;
969 This->xclip.rdp_clipboard_request_format =
format;
971 if (
This->xclip.probing_selections)
973 DEBUG_CLIPBOARD((
"ui_clip_request_data: Selection probe in progress. Cannot handle request.\n"));
980 if (
This->xclip.rdesktop_is_selection_owner)
982 XChangeProperty(
This->display,
This->wnd,
This->xclip.rdesktop_clipboard_target_atom,
983 XA_INTEGER, 32, PropModeReplace, (
unsigned char *) &
format, 1);
985 XConvertSelection(
This->display,
This->xclip.primary_atom,
This->xclip.rdesktop_native_atom,
986 This->xclip.rdesktop_clipboard_target_atom,
This->wnd, CurrentTime);
990 if (
This->xclip.auto_mode)
991 primary_owner = XGetSelectionOwner(
This->display,
This->xclip.primary_atom);
993 primary_owner =
None;
995 clipboard_owner = XGetSelectionOwner(
This->display,
This->xclip.clipboard_atom);
998 if ((primary_owner !=
None) && (clipboard_owner !=
None))
1000 This->xclip.primary_timestamp = 0;
1001 This->xclip.clipboard_timestamp = 0;
1002 XConvertSelection(
This->display,
This->xclip.primary_atom,
This->xclip.timestamp_atom,
1003 This->xclip.rdesktop_primary_timestamp_target_atom,
This->wnd, CurrentTime);
1004 XConvertSelection(
This->display,
This->xclip.clipboard_atom,
This->xclip.timestamp_atom,
1005 This->xclip.rdesktop_clipboard_timestamp_target_atom,
This->wnd, CurrentTime);
1010 if (primary_owner !=
None)
1012 XConvertSelection(
This->display,
This->xclip.primary_atom,
This->xclip.targets_atom,
1013 This->xclip.rdesktop_clipboard_target_atom,
This->wnd, CurrentTime);
1018 if (clipboard_owner !=
None)
1020 XConvertSelection(
This->display,
This->xclip.clipboard_atom,
This->xclip.targets_atom,
1021 This->xclip.rdesktop_clipboard_target_atom,
This->wnd, CurrentTime);
1060 This->xclip.primary_atom = XInternAtom(
This->display,
"PRIMARY",
False);
1061 This->xclip.clipboard_atom = XInternAtom(
This->display,
"CLIPBOARD",
False);
1062 This->xclip.targets_atom = XInternAtom(
This->display,
"TARGETS",
False);
1063 This->xclip.timestamp_atom = XInternAtom(
This->display,
"TIMESTAMP",
False);
1064 This->xclip.rdesktop_clipboard_target_atom =
1065 XInternAtom(
This->display,
"_RDESKTOP_CLIPBOARD_TARGET",
False);
1066 This->xclip.rdesktop_primary_timestamp_target_atom =
1067 XInternAtom(
This->display,
"_RDESKTOP_PRIMARY_TIMESTAMP_TARGET",
False);
1068 This->xclip.rdesktop_clipboard_timestamp_target_atom =
1069 XInternAtom(
This->display,
"_RDESKTOP_CLIPBOARD_TIMESTAMP_TARGET",
False);
1070 This->xclip.incr_atom = XInternAtom(
This->display,
"INCR",
False);
1071 This->xclip.format_string_atom = XInternAtom(
This->display,
"STRING",
False);
1072 This->xclip.format_utf8_string_atom = XInternAtom(
This->display,
"UTF8_STRING",
False);
1073 This->xclip.format_unicode_atom = XInternAtom(
This->display,
"text/unicode",
False);
1077 This->xclip.rdesktop_selection_notify_atom =
1078 XInternAtom(
This->display,
"_RDESKTOP_SELECTION_NOTIFY",
False);
1079 XSelectInput(
This->display, DefaultRootWindow(
This->display), PropertyChangeMask);
1082 This->xclip.rdesktop_native_atom = XInternAtom(
This->display,
"_RDESKTOP_NATIVE",
False);
1083 This->xclip.rdesktop_clipboard_formats_atom =
1084 XInternAtom(
This->display,
"_RDESKTOP_CLIPBOARD_FORMATS",
False);
1085 This->xclip.rdesktop_primary_owner_atom = XInternAtom(
This->display,
"_RDESKTOP_PRIMARY_OWNER",
False);
1086 This->xclip.rdesktop_clipboard_owner_atom = XInternAtom(
This->display,
"_RDESKTOP_CLIPBOARD_OWNER",
False);
1088 This->xclip.num_targets = 0;
1089 This->xclip.targets[
This->xclip.num_targets++] =
This->xclip.targets_atom;
1090 This->xclip.targets[
This->xclip.num_targets++] =
This->xclip.timestamp_atom;
1091 This->xclip.targets[
This->xclip.num_targets++] =
This->xclip.rdesktop_native_atom;
1092 This->xclip.targets[
This->xclip.num_targets++] =
This->xclip.rdesktop_clipboard_formats_atom;
1093#ifdef USE_UNICODE_CLIPBOARD
1094 This->xclip.targets[
This->xclip.num_targets++] =
This->xclip.format_utf8_string_atom;
1096 This->xclip.targets[
This->xclip.num_targets++] =
This->xclip.format_unicode_atom;
1097 This->xclip.targets[
This->xclip.num_targets++] =
This->xclip.format_string_atom;
1098 This->xclip.targets[
This->xclip.num_targets++] = XA_STRING;
1104 if (XGetSelectionOwner(
This->display,
This->xclip.primary_atom) ==
This->wnd)
1105 XSetSelectionOwner(
This->display,
This->xclip.primary_atom,
None,
This->xclip.acquire_time);
1106 if (XGetSelectionOwner(
This->display,
This->xclip.clipboard_atom) ==
This->wnd)
1107 XSetSelectionOwner(
This->display,
This->xclip.clipboard_atom,
None,
This->xclip.acquire_time);
char * strchr(const char *String, int ch)
RD_BOOL str_startswith(const char *s, const char *prefix)
void cliprdr_send_simple_native_format_announce(uint32 format)
void ui_clip_request_failed(void)
void cliprdr_send_data(uint8 *data, uint32 length)
void cliprdr_send_native_format_announce(uint8 *formats_data, uint32 formats_data_length)
void cliprdr_send_data_request(uint32 format)
RD_BOOL cliprdr_init(void)
void * xrealloc(void *oldmem, size_t size)
#define DEBUG_CLIPBOARD(args)
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
int iconv_close(iconv_t cd)
iconv_t iconv_open(const char *tocode, const char *fromcode)
size_t iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
#define memcpy(s1, s2, n)
static PLARGE_INTEGER Time
static void helper_cliprdr_send_response(RDPCLIENT *This, uint8 *data, uint32 length)
static void xclip_notify_change(RDPCLIENT *This)
static void crlf2lf(uint8 *data, uint32 *length)
static void xclip_probe_selections(RDPCLIENT *This)
void xclip_handle_PropertyNotify(RDPCLIENT *This, XPropertyEvent *event)
static void xclip_provide_selection(RDPCLIENT *This, XSelectionRequestEvent *req, Atom type, unsigned int format, uint8 *data, uint32 length)
void xclip_handle_SelectionRequest(RDPCLIENT *This, XSelectionRequestEvent *event)
void xclip_handle_SelectionNotify(RDPCLIENT *This, XSelectionEvent *event)
void ui_clip_request_data(RDPCLIENT *This, uint32 format)
static void xclip_clear_target_props(RDPCLIENT *This)
static void xclip_refuse_selection(RDPCLIENT *This, XSelectionRequestEvent *req)
void ui_clip_set_mode(RDPCLIENT *This, const char *optarg)
static void helper_cliprdr_send_empty_response(RDPCLIENT *This)
void ui_clip_handle_data(RDPCLIENT *This, uint8 *data, uint32 length)
void xclip_handle_SelectionClear(RDPCLIENT *This)
void ui_clip_format_announce(RDPCLIENT *This, uint8 *data, uint32 length)
static uint8 * lf2crlf(uint8 *data, uint32 *length)
static Bool xclip_send_data_with_convert(RDPCLIENT *This, uint8 *source, size_t source_size, Atom target)