Mercurial > hg > xemacs-beta
comparison src/select-gtk.c @ 2620:5e906dd5c3e9
[xemacs-hg @ 2005-02-28 20:21:43 by aidan]
(Revised) General X11 selection cleanup. Content negotiation for incoming
data, UTF8_STRING support, the ability to paste images (purely cosmetic at
this point), TIMESTAMP as one of the selection types offered,
author | aidan |
---|---|
date | Mon, 28 Feb 2005 20:21:50 +0000 |
parents | ecf1ebac70d8 |
children | 304aebb79cd3 |
comparison
equal
deleted
inserted
replaced
2619:935833be8506 | 2620:5e906dd5c3e9 |
---|---|
156 #if 0 /* #### MULTIPLE doesn't work yet */ | 156 #if 0 /* #### MULTIPLE doesn't work yet */ |
157 if (EQ (target_symbol, QMULTIPLE)) | 157 if (EQ (target_symbol, QMULTIPLE)) |
158 target_symbol = fetch_multiple_target (selection_data); | 158 target_symbol = fetch_multiple_target (selection_data); |
159 #endif | 159 #endif |
160 | 160 |
161 temp_obj = Fget_selection_timestamp (selection_symbol); | 161 temp_obj = get_selection_raw_time(selection_symbol); |
162 | 162 |
163 if (NILP (temp_obj)) | 163 if (NILP (temp_obj)) |
164 { | 164 { |
165 /* We don't appear to have the selection. */ | 165 /* We don't appear to have the selection. */ |
166 gtk_decline_selection_request (selection_data); | 166 gtk_decline_selection_request (selection_data); |
253 Lisp_Object selection_symbol, local_selection_time_lisp; | 253 Lisp_Object selection_symbol, local_selection_time_lisp; |
254 guint32 local_selection_time; | 254 guint32 local_selection_time; |
255 | 255 |
256 selection_symbol = atom_to_symbol (d, selection); | 256 selection_symbol = atom_to_symbol (d, selection); |
257 | 257 |
258 local_selection_time_lisp = Fget_selection_timestamp (selection_symbol); | 258 local_selection_time_lisp = get_selection_raw_time (selection_symbol); |
259 | 259 |
260 /* We don't own the selection, so that's fine. */ | 260 /* We don't own the selection, so that's fine. */ |
261 if (NILP (local_selection_time_lisp)) | 261 if (NILP (local_selection_time_lisp)) |
262 return; | 262 return; |
263 | 263 |
426 | 426 |
427 gtk_selection_owner_set (selecting_window, | 427 gtk_selection_owner_set (selecting_window, |
428 selection_atom, | 428 selection_atom, |
429 thyme); | 429 thyme); |
430 | 430 |
431 /* We do NOT use time_to_lisp() here any more, like we used to. | 431 /* [[ We do NOT use time_to_lisp() here any more, like we used to. |
432 That assumed equivalence of time_t and Time, which is not | 432 That assumed equivalence of time_t and Time, which is not |
433 necessarily the case (e.g. under OSF on the Alphas, where | 433 necessarily the case (e.g. under OSF on the Alphas, where |
434 Time is a 64-bit quantity and time_t is a 32-bit quantity). | 434 Time is a 64-bit quantity and time_t is a 32-bit quantity). |
435 | 435 |
436 Opaque pointers are the clean way to go here. | 436 Opaque pointers are the clean way to go here. ]] |
437 */ | 437 |
438 See my comment on the same issue in select-x.c -- Aidan. */ | |
438 return make_opaque (&thyme, sizeof (thyme)); | 439 return make_opaque (&thyme, sizeof (thyme)); |
439 } | 440 } |
440 | 441 |
441 static void | 442 static void |
442 gtk_disown_selection (Lisp_Object selection, Lisp_Object timeval) | 443 gtk_disown_selection (Lisp_Object selection, Lisp_Object timeval) |