428
|
1 /* mswindows selection processing for XEmacs
|
|
2 Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
|
|
3
|
|
4 This file is part of XEmacs.
|
|
5
|
|
6 XEmacs is free software; you can redistribute it and/or modify it
|
|
7 under the terms of the GNU General Public License as published by the
|
|
8 Free Software Foundation; either version 2, or (at your option) any
|
|
9 later version.
|
|
10
|
|
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 for more details.
|
|
15
|
|
16 You should have received a copy of the GNU General Public License
|
|
17 along with XEmacs; see the file COPYING. If not, write to
|
|
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
19 Boston, MA 02111-1307, USA. */
|
|
20
|
|
21 /* Synched up with: Not synched with FSF. */
|
|
22
|
|
23 /* Authorship:
|
|
24
|
|
25 Written by Kevin Gallo for FSF Emacs.
|
|
26 Rewritten for mswindows by Jonathan Harris, December 1997 for 21.0.
|
442
|
27 Hacked by Alastair Houghton, July 2000 for enhanced clipboard support.
|
|
28 */
|
428
|
29
|
|
30 #include <config.h>
|
|
31 #include "lisp.h"
|
430
|
32 #include "frame.h"
|
428
|
33 #include "select.h"
|
442
|
34 #include "opaque.h"
|
|
35 #include "file-coding.h"
|
|
36 #include "buffer.h"
|
428
|
37
|
|
38 #include "console-msw.h"
|
|
39
|
442
|
40 /* A list of handles that we must release. Not accessible from Lisp. */
|
|
41 static Lisp_Object Vhandle_alist;
|
|
42
|
|
43 /* Test if this is an X symbol that we understand */
|
|
44 static int
|
|
45 x_sym_p (Lisp_Object value)
|
|
46 {
|
|
47 if (NILP (value) || INTP (value))
|
|
48 return 0;
|
|
49
|
|
50 /* Check for some of the X symbols */
|
|
51 if (EQ (value, QSTRING)) return 1;
|
|
52 if (EQ (value, QTEXT)) return 1;
|
|
53 if (EQ (value, QCOMPOUND_TEXT)) return 1;
|
|
54
|
|
55 return 0;
|
|
56 }
|
|
57
|
|
58 /* This converts a Lisp symbol to an MS-Windows clipboard format.
|
|
59 We have symbols for all predefined clipboard formats, but that
|
|
60 doesn't mean we support them all ;-)
|
|
61 The name of this function is actually a lie - it also knows about
|
|
62 integers and strings... */
|
|
63 static UINT
|
|
64 symbol_to_ms_cf (Lisp_Object value)
|
428
|
65 {
|
442
|
66 /* If it's NIL, we're in trouble. */
|
|
67 if (NILP (value)) return 0;
|
|
68
|
|
69 /* If it's an integer, assume it's a format ID */
|
|
70 if (INTP (value)) return (UINT) (XINT (value));
|
|
71
|
|
72 /* If it's a string, register the format(!) */
|
|
73 if (STRINGP (value))
|
593
|
74 /* !!#### more mule bogosity */
|
|
75 return RegisterClipboardFormat ((Extbyte *) XSTRING_DATA (value));
|
442
|
76
|
|
77 /* Check for Windows clipboard format symbols */
|
|
78 if (EQ (value, QCF_TEXT)) return CF_TEXT;
|
|
79 if (EQ (value, QCF_BITMAP)) return CF_BITMAP;
|
|
80 if (EQ (value, QCF_METAFILEPICT)) return CF_METAFILEPICT;
|
|
81 if (EQ (value, QCF_SYLK)) return CF_SYLK;
|
|
82 if (EQ (value, QCF_DIF)) return CF_DIF;
|
|
83 if (EQ (value, QCF_TIFF)) return CF_TIFF;
|
|
84 if (EQ (value, QCF_OEMTEXT)) return CF_OEMTEXT;
|
|
85 if (EQ (value, QCF_DIB)) return CF_DIB;
|
|
86 #ifdef CF_DIBV5
|
|
87 if (EQ (value, QCF_DIBV5)) return CF_DIBV5;
|
|
88 #endif
|
|
89 if (EQ (value, QCF_PALETTE)) return CF_PALETTE;
|
|
90 if (EQ (value, QCF_PENDATA)) return CF_PENDATA;
|
|
91 if (EQ (value, QCF_RIFF)) return CF_RIFF;
|
|
92 if (EQ (value, QCF_WAVE)) return CF_WAVE;
|
|
93 if (EQ (value, QCF_UNICODETEXT)) return CF_UNICODETEXT;
|
|
94 if (EQ (value, QCF_ENHMETAFILE)) return CF_ENHMETAFILE;
|
|
95 if (EQ (value, QCF_HDROP)) return CF_HDROP;
|
|
96 if (EQ (value, QCF_LOCALE)) return CF_LOCALE;
|
|
97 if (EQ (value, QCF_OWNERDISPLAY)) return CF_OWNERDISPLAY;
|
|
98 if (EQ (value, QCF_DSPTEXT)) return CF_DSPTEXT;
|
|
99 if (EQ (value, QCF_DSPBITMAP)) return CF_DSPBITMAP;
|
|
100 if (EQ (value, QCF_DSPMETAFILEPICT)) return CF_DSPMETAFILEPICT;
|
|
101 if (EQ (value, QCF_DSPENHMETAFILE)) return CF_DSPENHMETAFILE;
|
|
102
|
|
103 return 0;
|
|
104 }
|
|
105
|
|
106 /* This converts an MS-Windows clipboard format to its corresponding
|
|
107 Lisp symbol, or a Lisp integer otherwise. */
|
|
108 static Lisp_Object
|
|
109 ms_cf_to_symbol (UINT format)
|
|
110 {
|
|
111 switch (format)
|
|
112 {
|
|
113 case CF_TEXT: return QCF_TEXT;
|
|
114 case CF_BITMAP: return QCF_BITMAP;
|
|
115 case CF_METAFILEPICT: return QCF_METAFILEPICT;
|
|
116 case CF_SYLK: return QCF_SYLK;
|
|
117 case CF_DIF: return QCF_DIF;
|
|
118 case CF_TIFF: return QCF_TIFF;
|
|
119 case CF_OEMTEXT: return QCF_OEMTEXT;
|
|
120 case CF_DIB: return QCF_DIB;
|
|
121 #ifdef CF_DIBV5
|
|
122 case CF_DIBV5: return QCF_DIBV5;
|
|
123 #endif
|
|
124 case CF_PALETTE: return QCF_PALETTE;
|
|
125 case CF_PENDATA: return QCF_PENDATA;
|
|
126 case CF_RIFF: return QCF_RIFF;
|
|
127 case CF_WAVE: return QCF_WAVE;
|
|
128 case CF_UNICODETEXT: return QCF_UNICODETEXT;
|
|
129 case CF_ENHMETAFILE: return QCF_ENHMETAFILE;
|
|
130 case CF_HDROP: return QCF_HDROP;
|
|
131 case CF_LOCALE: return QCF_LOCALE;
|
|
132 case CF_OWNERDISPLAY: return QCF_OWNERDISPLAY;
|
|
133 case CF_DSPTEXT: return QCF_DSPTEXT;
|
|
134 case CF_DSPBITMAP: return QCF_DSPBITMAP;
|
|
135 case CF_DSPMETAFILEPICT: return QCF_DSPMETAFILEPICT;
|
|
136 case CF_DSPENHMETAFILE: return QCF_DSPENHMETAFILE;
|
|
137 default: return make_int ((int) format);
|
|
138 }
|
|
139 }
|
428
|
140
|
442
|
141 /* Test if the specified clipboard format is auto-released by the OS. If
|
|
142 not, we must remember the handle on Vhandle_alist, and free it if
|
|
143 the clipboard is emptied or if we set data with the same format. */
|
|
144 static int
|
|
145 cf_is_autofreed (UINT format)
|
|
146 {
|
|
147 switch (format)
|
|
148 {
|
|
149 /* This list comes from the SDK documentation */
|
|
150 case CF_DSPENHMETAFILE:
|
|
151 case CF_DSPMETAFILEPICT:
|
|
152 case CF_ENHMETAFILE:
|
|
153 case CF_METAFILEPICT:
|
|
154 case CF_BITMAP:
|
|
155 case CF_DSPBITMAP:
|
|
156 case CF_PALETTE:
|
|
157 case CF_DIB:
|
|
158 #ifdef CF_DIBV5
|
|
159 case CF_DIBV5:
|
|
160 #endif
|
|
161 case CF_DSPTEXT:
|
|
162 case CF_OEMTEXT:
|
|
163 case CF_TEXT:
|
|
164 case CF_UNICODETEXT:
|
|
165 return TRUE;
|
|
166
|
|
167 default:
|
|
168 return FALSE;
|
|
169 }
|
|
170 }
|
|
171
|
|
172 /* Do protocol to assert ourself as a selection owner.
|
|
173
|
|
174 Under mswindows, we:
|
|
175
|
|
176 * Only set the clipboard if (eq selection-name 'CLIPBOARD)
|
|
177
|
|
178 * Check if an X atom name has been passed. If so, convert to CF_TEXT
|
|
179 (or CF_UNICODETEXT) remembering to perform LF -> CR-LF conversion.
|
|
180
|
|
181 * Otherwise assume the data is formatted appropriately for the data type
|
|
182 that was passed.
|
|
183
|
|
184 Then set the clipboard as necessary.
|
|
185 */
|
|
186 static Lisp_Object
|
|
187 mswindows_own_selection (Lisp_Object selection_name,
|
|
188 Lisp_Object selection_value,
|
|
189 Lisp_Object how_to_add,
|
456
|
190 Lisp_Object selection_type,
|
|
191 int owned_p /* Not used */)
|
442
|
192 {
|
|
193 HGLOBAL hValue = NULL;
|
|
194 UINT cfType;
|
|
195 int is_X_type = FALSE;
|
|
196 Lisp_Object cfObject;
|
|
197 Lisp_Object data = Qnil;
|
|
198 int size;
|
|
199 void *src, *dst;
|
|
200 struct frame *f = NULL;
|
428
|
201
|
442
|
202 /* Only continue if we're trying to set the clipboard - mswindows doesn't
|
|
203 use the same selection model as X */
|
|
204 if (!EQ (selection_name, QCLIPBOARD))
|
|
205 return Qnil;
|
|
206
|
|
207 /* If this is one of the X-style atom name symbols, or NIL, convert it
|
|
208 as appropriate */
|
|
209 if (NILP (selection_type) || x_sym_p (selection_type))
|
|
210 {
|
|
211 /* Should COMPOUND_TEXT map to CF_UNICODETEXT? */
|
|
212 cfType = CF_TEXT;
|
|
213 cfObject = QCF_TEXT;
|
|
214 is_X_type = TRUE;
|
|
215 }
|
|
216 else
|
|
217 {
|
|
218 cfType = symbol_to_ms_cf (selection_type);
|
|
219
|
|
220 /* Only continue if we can figure out a clipboard type */
|
|
221 if (!cfType)
|
|
222 return Qnil;
|
|
223
|
|
224 cfObject = selection_type;
|
|
225 }
|
|
226
|
|
227 /* Convert things appropriately */
|
|
228 data = select_convert_out (selection_name,
|
|
229 cfObject,
|
|
230 selection_value);
|
428
|
231
|
442
|
232 if (NILP (data))
|
|
233 return Qnil;
|
|
234
|
|
235 if (CONSP (data))
|
|
236 {
|
|
237 if (!EQ (XCAR (data), cfObject))
|
|
238 cfType = symbol_to_ms_cf (XCAR (data));
|
|
239
|
|
240 if (!cfType)
|
|
241 return Qnil;
|
|
242
|
|
243 data = XCDR (data);
|
|
244 }
|
|
245
|
|
246 /* We support opaque or string values, but we only mention string
|
|
247 values for now... */
|
|
248 if (!OPAQUEP (data)
|
|
249 && !STRINGP (data))
|
|
250 return Qnil;
|
|
251
|
|
252 /* Compute the data length */
|
|
253 if (OPAQUEP (data))
|
|
254 size = XOPAQUE_SIZE (data);
|
|
255 else
|
|
256 size = XSTRING_LENGTH (data) + 1;
|
|
257
|
|
258 /* Find the frame */
|
430
|
259 f = selected_frame ();
|
442
|
260
|
|
261 /* Open the clipboard */
|
430
|
262 if (!OpenClipboard (FRAME_MSWINDOWS_HANDLE (f)))
|
428
|
263 return Qnil;
|
|
264
|
442
|
265 /* Allocate memory */
|
|
266 hValue = GlobalAlloc (GMEM_DDESHARE | GMEM_MOVEABLE, size);
|
|
267
|
|
268 if (!hValue)
|
428
|
269 {
|
|
270 CloseClipboard ();
|
442
|
271
|
|
272 return Qnil;
|
|
273 }
|
|
274
|
|
275 /* Copy the data */
|
|
276 if (OPAQUEP (data))
|
|
277 src = XOPAQUE_DATA (data);
|
|
278 else
|
|
279 src = XSTRING_DATA (data);
|
|
280
|
|
281 dst = GlobalLock (hValue);
|
|
282
|
|
283 if (!dst)
|
|
284 {
|
|
285 GlobalFree (hValue);
|
|
286 CloseClipboard ();
|
|
287
|
428
|
288 return Qnil;
|
|
289 }
|
442
|
290
|
|
291 memcpy (dst, src, size);
|
|
292
|
|
293 GlobalUnlock (hValue);
|
|
294
|
|
295 /* Empty the clipboard if we're replacing everything */
|
|
296 if (NILP (how_to_add) || EQ (how_to_add, Qreplace_all))
|
428
|
297 {
|
442
|
298 if (!EmptyClipboard ())
|
428
|
299 {
|
442
|
300 CloseClipboard ();
|
|
301 GlobalFree (hValue);
|
|
302
|
|
303 return Qnil;
|
|
304 }
|
428
|
305 }
|
442
|
306
|
|
307 /* Append is currently handled in select.el; perhaps this should change,
|
|
308 but it only really makes sense for ordinary text in any case... */
|
|
309
|
|
310 SetClipboardData (cfType, hValue);
|
|
311
|
|
312 if (!cf_is_autofreed (cfType))
|
|
313 {
|
|
314 Lisp_Object alist_elt = Qnil, rest;
|
|
315 Lisp_Object cfType_int = make_int (cfType);
|
|
316
|
|
317 /* First check if there's an element in the alist for this type
|
|
318 already. */
|
|
319 alist_elt = assq_no_quit (cfType_int, Vhandle_alist);
|
|
320
|
|
321 /* Add an element to the alist */
|
|
322 Vhandle_alist = Fcons (Fcons (cfType_int, make_opaque_ptr (hValue)),
|
|
323 Vhandle_alist);
|
|
324
|
|
325 if (!NILP (alist_elt))
|
|
326 {
|
|
327 /* Free the original handle */
|
|
328 GlobalFree ((HGLOBAL) get_opaque_ptr (XCDR (alist_elt)));
|
|
329
|
|
330 /* Remove the original one (adding first makes life easier, because
|
|
331 we don't have to special case this being the first element) */
|
|
332 for (rest = Vhandle_alist; !NILP (rest); rest = Fcdr (rest))
|
|
333 if (EQ (cfType_int, Fcar (XCDR (rest))))
|
|
334 {
|
|
335 XCDR (rest) = Fcdr (XCDR (rest));
|
|
336 break;
|
|
337 }
|
|
338 }
|
|
339 }
|
|
340
|
428
|
341 CloseClipboard ();
|
442
|
342
|
|
343 /* #### Should really return a time, though this is because of the
|
|
344 X model (by the looks of things) */
|
|
345 return Qnil;
|
428
|
346 }
|
|
347
|
|
348 static Lisp_Object
|
442
|
349 mswindows_available_selection_types (Lisp_Object selection_name)
|
|
350 {
|
|
351 Lisp_Object types = Qnil;
|
|
352 UINT format = 0;
|
|
353 struct frame *f = NULL;
|
|
354
|
|
355 if (!EQ (selection_name, QCLIPBOARD))
|
|
356 return Qnil;
|
|
357
|
|
358 /* Find the frame */
|
|
359 f = selected_frame ();
|
|
360
|
|
361 /* Open the clipboard */
|
|
362 if (!OpenClipboard (FRAME_MSWINDOWS_HANDLE (f)))
|
|
363 return Qnil;
|
|
364
|
|
365 /* #### ajh - Should there be an unwind-protect handler around this?
|
|
366 It could (well it probably won't, but it's always better to
|
|
367 be safe) run out of memory and leave the clipboard open... */
|
|
368
|
|
369 while ((format = EnumClipboardFormats (format)))
|
|
370 types = Fcons (ms_cf_to_symbol (format), types);
|
|
371
|
|
372 /* Close it */
|
|
373 CloseClipboard ();
|
|
374
|
|
375 return types;
|
|
376 }
|
|
377
|
|
378 static Lisp_Object
|
|
379 mswindows_register_selection_data_type (Lisp_Object type_name)
|
428
|
380 {
|
442
|
381 /* Type already checked in select.c */
|
593
|
382 /* !!#### more mule bogosity */
|
|
383 const char *name = (char *) XSTRING_DATA (type_name);
|
442
|
384 UINT format;
|
|
385
|
|
386 format = RegisterClipboardFormat (name);
|
|
387
|
|
388 if (format)
|
|
389 return make_int ((int) format);
|
|
390 else
|
|
391 return Qnil;
|
|
392 }
|
|
393
|
|
394 static Lisp_Object
|
|
395 mswindows_selection_data_type_name (Lisp_Object type_id)
|
|
396 {
|
|
397 UINT format;
|
|
398 int numchars;
|
|
399 char name_buf[128];
|
|
400
|
|
401 /* If it's an integer, convert to a symbol if appropriate */
|
|
402 if (INTP (type_id))
|
|
403 type_id = ms_cf_to_symbol (XINT (type_id));
|
|
404
|
|
405 /* If this is a symbol, return it */
|
|
406 if (SYMBOLP (type_id))
|
|
407 return type_id;
|
|
408
|
|
409 /* Find the format code */
|
|
410 format = symbol_to_ms_cf (type_id);
|
|
411
|
|
412 if (!format)
|
|
413 return Qnil;
|
|
414
|
|
415 /* Microsoft, stupid Microsoft */
|
|
416 numchars = GetClipboardFormatName (format, name_buf, 128);
|
|
417
|
|
418 if (numchars)
|
|
419 {
|
|
420 Lisp_Object name;
|
|
421
|
|
422 /* Do this properly - though we could support UNICODE (UCS-2) if
|
|
423 MULE could hack it. */
|
|
424 name = make_ext_string (name_buf, numchars,
|
|
425 Fget_coding_system (Qraw_text));
|
|
426
|
|
427 return name;
|
|
428 }
|
428
|
429
|
|
430 return Qnil;
|
|
431 }
|
|
432
|
442
|
433 static Lisp_Object
|
|
434 mswindows_get_foreign_selection (Lisp_Object selection_symbol,
|
|
435 Lisp_Object target_type)
|
428
|
436 {
|
442
|
437 HGLOBAL hValue = NULL;
|
|
438 UINT cfType;
|
|
439 Lisp_Object cfObject = Qnil, ret = Qnil, value = Qnil;
|
|
440 int is_X_type = FALSE;
|
|
441 int size;
|
|
442 void *data;
|
|
443 struct frame *f = NULL;
|
|
444 struct gcpro gcpro1;
|
|
445
|
|
446 /* Only continue if we're trying to read the clipboard - mswindows doesn't
|
|
447 use the same selection model as X */
|
|
448 if (!EQ (selection_symbol, QCLIPBOARD))
|
|
449 return Qnil;
|
428
|
450
|
442
|
451 /* If this is one of the X-style atom name symbols, or NIL, convert it
|
|
452 as appropriate */
|
|
453 if (NILP (target_type) || x_sym_p (target_type))
|
|
454 {
|
|
455 /* Should COMPOUND_TEXT map to CF_UNICODETEXT? */
|
|
456 cfType = CF_TEXT;
|
|
457 cfObject = QCF_TEXT;
|
|
458 is_X_type = TRUE;
|
|
459 }
|
|
460 else
|
|
461 {
|
|
462 cfType = symbol_to_ms_cf (target_type);
|
|
463
|
|
464 /* Only continue if we can figure out a clipboard type */
|
|
465 if (!cfType)
|
|
466 return Qnil;
|
|
467
|
|
468 cfObject = ms_cf_to_symbol (cfType);
|
|
469 }
|
|
470
|
|
471 /* Find the frame */
|
|
472 f = selected_frame ();
|
|
473
|
|
474 /* Open the clipboard */
|
|
475 if (!OpenClipboard (FRAME_MSWINDOWS_HANDLE (f)))
|
428
|
476 return Qnil;
|
|
477
|
442
|
478 /* Read the clipboard */
|
|
479 hValue = GetClipboardData (cfType);
|
|
480
|
|
481 if (!hValue)
|
428
|
482 {
|
442
|
483 CloseClipboard ();
|
428
|
484
|
442
|
485 return Qnil;
|
|
486 }
|
428
|
487
|
442
|
488 /* Find the data */
|
|
489 size = GlobalSize (hValue);
|
|
490 data = GlobalLock (hValue);
|
428
|
491
|
442
|
492 if (!data)
|
|
493 {
|
|
494 CloseClipboard ();
|
|
495
|
|
496 return Qnil;
|
428
|
497 }
|
|
498
|
442
|
499 /* Place it in a Lisp string */
|
|
500 TO_INTERNAL_FORMAT (DATA, (data, size),
|
|
501 LISP_STRING, ret,
|
|
502 Qbinary);
|
|
503
|
|
504 GlobalUnlock (data);
|
428
|
505 CloseClipboard ();
|
|
506
|
442
|
507 GCPRO1 (ret);
|
428
|
508
|
442
|
509 /* Convert this to the appropriate type. If we can't find anything,
|
|
510 then we return a cons of the form (DATA-TYPE . STRING), where the
|
|
511 string contains the raw binary data. */
|
|
512 value = select_convert_in (selection_symbol,
|
|
513 cfObject,
|
|
514 ret);
|
428
|
515
|
442
|
516 UNGCPRO;
|
430
|
517
|
442
|
518 if (NILP (value))
|
|
519 return Fcons (cfObject, ret);
|
|
520 else
|
|
521 return value;
|
428
|
522 }
|
|
523
|
|
524 static void
|
|
525 mswindows_disown_selection (Lisp_Object selection, Lisp_Object timeval)
|
|
526 {
|
|
527 if (EQ (selection, QCLIPBOARD))
|
442
|
528 {
|
|
529 BOOL success = OpenClipboard (NULL);
|
|
530 if (success)
|
|
531 {
|
|
532 success = EmptyClipboard ();
|
|
533 /* Close it regardless of whether empty worked. */
|
|
534 if (!CloseClipboard ())
|
|
535 success = FALSE;
|
|
536 }
|
|
537
|
|
538 /* #### return success ? Qt : Qnil; */
|
|
539 }
|
|
540 }
|
|
541
|
|
542 void
|
|
543 mswindows_destroy_selection (Lisp_Object selection)
|
|
544 {
|
|
545 /* Do nothing if this isn't for the clipboard. */
|
|
546 if (!EQ (selection, QCLIPBOARD))
|
|
547 return;
|
|
548
|
|
549 /* Right. We need to delete everything in Vhandle_alist. */
|
|
550 {
|
|
551 LIST_LOOP_2 (elt, Vhandle_alist)
|
|
552 GlobalFree ((HGLOBAL) get_opaque_ptr (XCDR (elt)));
|
|
553 }
|
|
554
|
|
555 Vhandle_alist = Qnil;
|
|
556 }
|
|
557
|
|
558 static Lisp_Object
|
|
559 mswindows_selection_exists_p (Lisp_Object selection,
|
|
560 Lisp_Object selection_type)
|
|
561 {
|
|
562 /* We used to be picky about the format, but now we support anything. */
|
|
563 if (EQ (selection, QCLIPBOARD))
|
|
564 {
|
|
565 if (NILP (selection_type))
|
|
566 return CountClipboardFormats () ? Qt : Qnil;
|
|
567 else
|
|
568 return IsClipboardFormatAvailable (symbol_to_ms_cf (selection_type))
|
|
569 ? Qt : Qnil;
|
|
570 }
|
|
571 else
|
|
572 return Qnil;
|
428
|
573 }
|
|
574
|
|
575
|
|
576 /************************************************************************/
|
|
577 /* initialization */
|
|
578 /************************************************************************/
|
|
579
|
|
580 void
|
|
581 console_type_create_select_mswindows (void)
|
|
582 {
|
|
583 CONSOLE_HAS_METHOD (mswindows, own_selection);
|
|
584 CONSOLE_HAS_METHOD (mswindows, disown_selection);
|
442
|
585 CONSOLE_HAS_METHOD (mswindows, selection_exists_p);
|
428
|
586 CONSOLE_HAS_METHOD (mswindows, get_foreign_selection);
|
442
|
587 CONSOLE_HAS_METHOD (mswindows, available_selection_types);
|
|
588 CONSOLE_HAS_METHOD (mswindows, register_selection_data_type);
|
|
589 CONSOLE_HAS_METHOD (mswindows, selection_data_type_name);
|
428
|
590 }
|
|
591
|
|
592 void
|
|
593 syms_of_select_mswindows (void)
|
|
594 {
|
|
595 }
|
|
596
|
|
597 void
|
|
598 vars_of_select_mswindows (void)
|
|
599 {
|
442
|
600 /* Initialise Vhandle_alist */
|
|
601 Vhandle_alist = Qnil;
|
|
602 staticpro (&Vhandle_alist);
|
428
|
603 }
|