comparison src/select-msw.c @ 416:ebe98a74bd68 r21-2-16

Import from CVS: tag r21-2-16
author cvs
date Mon, 13 Aug 2007 11:22:23 +0200
parents da8ed4261e83
children
comparison
equal deleted inserted replaced
415:a27f76b40c83 416:ebe98a74bd68
99 mswindows_own_selection (Lisp_Object selection_name, Lisp_Object selection_value) 99 mswindows_own_selection (Lisp_Object selection_name, Lisp_Object selection_value)
100 { 100 {
101 Lisp_Object converted_value = get_local_selection (selection_name, QSTRING); 101 Lisp_Object converted_value = get_local_selection (selection_name, QSTRING);
102 if (!NILP (converted_value) && 102 if (!NILP (converted_value) &&
103 CONSP (converted_value) && 103 CONSP (converted_value) &&
104 EQ (XCAR (converted_value), QSTRING)) 104 EQ (XCAR (converted_value), QSTRING) &&
105 /* pure mswindows behaviour only says we can own the selection
106 if it is the clipboard */
107 EQ (selection_name, QCLIPBOARD))
105 Fmswindows_set_clipboard (XCDR (converted_value)); 108 Fmswindows_set_clipboard (XCDR (converted_value));
106 109
107 return Qnil; 110 return Qnil;
108 } 111 }
109 112
160 } 163 }
161 164
162 static Lisp_Object 165 static Lisp_Object
163 mswindows_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type) 166 mswindows_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type)
164 { 167 {
165 return Fmswindows_get_clipboard (); 168 if (EQ (selection_symbol, QCLIPBOARD))
169 return Fmswindows_get_clipboard ();
170 else
171 return Qnil;
166 } 172 }
167 173
168 DEFUN ("mswindows-selection-exists-p", Fmswindows_selection_exists_p, 0, 0, 0, /* 174 DEFUN ("mswindows-selection-exists-p", Fmswindows_selection_exists_p, 0, 0, 0, /*
169 Whether there is an MS-Windows selection. 175 Whether there is an MS-Windows selection.
170 */ 176 */
182 } 188 }
183 189
184 static void 190 static void
185 mswindows_disown_selection (Lisp_Object selection, Lisp_Object timeval) 191 mswindows_disown_selection (Lisp_Object selection, Lisp_Object timeval)
186 { 192 {
187 Fmswindows_delete_selection (); 193 if (EQ (selection, QCLIPBOARD))
194 Fmswindows_delete_selection ();
188 } 195 }
189 196
190 197
191 /************************************************************************/ 198 /************************************************************************/
192 /* initialization */ 199 /* initialization */