13434
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
1 /* Win32 Selection processing for emacs
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
2 Copyright (C) 1993, 1994 Free Software Foundation.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
3
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
4 This file is part of GNU Emacs.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
5
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
6 GNU Emacs is free software; you can redistribute it and/or modify
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
7 it under the terms of the GNU General Public License as published by
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
8 the Free Software Foundation; either version 2, or (at your option)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
9 any later version.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
10
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
11 GNU Emacs is distributed in the hope that it will be useful,
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
14 GNU General Public License for more details.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
15
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
16 You should have received a copy of the GNU General Public License
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
17 along with GNU Emacs; see the file COPYING. If not, write to
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
19
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
20 /* Written by Kevin Gallo */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
21
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
22 #include <config.h>
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
23 #include "lisp.h"
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
24 #include "w32term.h" /* for all of the win32 includes */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
25 #include "dispextern.h" /* frame.h seems to want this */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
26 #include "frame.h" /* Need this to get the X window of selected_frame */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
27 #include "blockinput.h"
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
28
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
29 #if 0
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
30 DEFUN ("win32-open-clipboard", Fwin32_open_clipboard, Swin32_open_clipboard, 0, 1, 0,
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
31 "This opens the clipboard with the given frame pointer.")
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
32 (frame)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
33 Lisp_Object frame;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
34 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
35 BOOL ok = FALSE;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
36
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
37 if (!NILP (frame))
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
38 CHECK_LIVE_FRAME (frame, 0);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
39
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
40 BLOCK_INPUT;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
41
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
42 ok = OpenClipboard ((!NILP (frame) && FRAME_WIN32_P (XFRAME (frame))) ? FRAME_WIN32_WINDOW (XFRAME (frame)) : NULL);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
43
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
44 UNBLOCK_INPUT;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
45
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
46 return (ok ? frame : Qnil);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
47 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
48
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
49 DEFUN ("win32-empty-clipboard", Fwin32_empty_clipboard, Swin32_empty_clipboard, 0, 0, 0,
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
50 "This empties the clipboard and assigns ownership to the window which opened the clipboard.")
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
51 ()
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
52 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
53 BOOL ok = FALSE;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
54
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
55 BLOCK_INPUT;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
56
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
57 ok = EmptyClipboard ();
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
58
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
59 UNBLOCK_INPUT;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
60
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
61 return (ok ? Qt : Qnil);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
62 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
63
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
64 DEFUN ("win32-close-clipboard", Fwin32_close_clipboard, Swin32_close_clipboard, 0, 0, 0,
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
65 "This closes the clipboard.")
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
66 ()
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
67 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
68 BOOL ok = FALSE;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
69
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
70 BLOCK_INPUT;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
71
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
72 ok = CloseClipboard ();
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
73
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
74 UNBLOCK_INPUT;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
75
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
76 return (ok ? Qt : Qnil);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
77 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
78
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
79 #endif
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
80
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
81 DEFUN ("win32-set-clipboard-data", Fwin32_set_clipboard_data, Swin32_set_clipboard_data, 1, 2, 0,
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
82 "This sets the clipboard data to the given text.")
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
83 (string, frame)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
84 Lisp_Object string, frame;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
85 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
86 BOOL ok = TRUE;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
87 HANDLE htext;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
88
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
89 CHECK_STRING (string, 0);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
90
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
91 if (!NILP (frame))
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
92 CHECK_LIVE_FRAME (frame, 0);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
93
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
94 BLOCK_INPUT;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
95
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
96 /* Allocate twice the amount so we can convert lf to cr-lf */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
97
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
98 if ((htext = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, (2 * XSTRING (string)->size) + 1)) == NULL)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
99 goto error;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
100
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
101 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
102 unsigned char *lptext;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
103
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
104 if ((lptext = (unsigned char *)GlobalLock (htext)) == NULL)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
105 goto error;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
106
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
107 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
108 int i = XSTRING (string)->size;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
109 int newsize = XSTRING (string)->size;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
110 register char *p1 = XSTRING (string)->data;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
111 register char *p2 = lptext;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
112
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
113 while (i--)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
114 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
115 if (*p1 == '\n')
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
116 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
117 newsize++;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
118 *p2++ = '\r';
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
119 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
120
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
121 *p2++ = *p1++;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
122 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
123
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
124 *p2 = 0;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
125 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
126
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
127 GlobalUnlock (htext);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
128 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
129
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
130 if (!OpenClipboard ((!NILP (frame) && FRAME_WIN32_P (XFRAME (frame))) ? FRAME_WIN32_WINDOW (XFRAME (frame)) : NULL))
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
131 goto error;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
132
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
133 ok = EmptyClipboard () && SetClipboardData (CF_TEXT, htext);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
134
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
135 CloseClipboard ();
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
136
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
137 if (ok) goto done;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
138
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
139 error:
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
140
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
141 ok = FALSE;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
142 if (htext) GlobalFree (htext);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
143
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
144 done:
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
145 UNBLOCK_INPUT;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
146
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
147 return (ok ? string : Qnil);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
148 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
149
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
150 DEFUN ("win32-get-clipboard-data", Fwin32_get_clipboard_data, Swin32_get_clipboard_data, 0, 1, 0,
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
151 "This gets the clipboard data in text format.")
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
152 (frame)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
153 Lisp_Object frame;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
154 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
155 HANDLE htext;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
156 Lisp_Object ret = Qnil;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
157
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
158 if (!NILP (frame))
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
159 CHECK_LIVE_FRAME (frame, 0);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
160
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
161 BLOCK_INPUT;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
162
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
163 if (!OpenClipboard ((!NILP (frame) && FRAME_WIN32_P (XFRAME (frame))) ? FRAME_WIN32_WINDOW (XFRAME (frame)) : NULL))
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
164 goto done;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
165
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
166 if ((htext = GetClipboardData (CF_TEXT)) == NULL)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
167 goto closeclip;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
168
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
169
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
170 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
171 unsigned char *lptext;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
172 int nbytes;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
173
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
174 if ((lptext = (unsigned char *)GlobalLock (htext)) == NULL)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
175 goto closeclip;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
176
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
177 nbytes = strlen (lptext);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
178
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
179 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
180 char *buf = (char *) xmalloc (nbytes);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
181 register char *p1 = lptext;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
182 register char *p2 = buf;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
183 int i = nbytes;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
184
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
185 if (buf == NULL) goto closeclip;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
186
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
187 while (i--)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
188 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
189 if (p1[0] == '\r' && i && p1[1] == '\n')
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
190 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
191 p1++;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
192 i--;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
193 nbytes--;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
194 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
195
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
196 *p2++ = *p1++;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
197 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
198
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
199 ret = make_string (buf, nbytes);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
200
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
201 xfree (buf);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
202 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
203
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
204 GlobalUnlock (htext);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
205 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
206
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
207 closeclip:
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
208 CloseClipboard ();
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
209
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
210 done:
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
211 UNBLOCK_INPUT;
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
212
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
213 return (ret);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
214 }
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
215
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
216 void
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
217 syms_of_win32select ()
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
218 {
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
219 #if 0
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
220 defsubr (&Swin32_open_clipboard);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
221 defsubr (&Swin32_empty_clipboard);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
222 defsubr (&Swin32_close_clipboard);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
223 #endif
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
224 defsubr (&Swin32_set_clipboard_data);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
225 defsubr (&Swin32_get_clipboard_data);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
226 }
|