comparison src/dosfns.c @ 12990:93cc41315528

(Fmsdos_mouse_enable, Fmsdos_mouse_disable) (Fmsdos_mouse_init): New functions. (syms_of_dosfns): defsubr them. (Fmode25, Fmode4350): Call mouse_off unconditionally. (Fset_mouse_position): Return nil.
author Richard M. Stallman <rms@gnu.org>
date Sat, 02 Sep 1995 16:23:53 +0000
parents 8a1bd0598b49
children 59663cba4b02
comparison
equal deleted inserted replaced
12989:84916366643e 12990:93cc41315528
42 42
43 #ifdef HAVE_X_WINDOWS 43 #ifdef HAVE_X_WINDOWS
44 if (!inhibit_window_system) 44 if (!inhibit_window_system)
45 return Qnil; 45 return Qnil;
46 #endif 46 #endif
47 if (have_mouse) mouse_off (); 47 mouse_off ();
48 regs.x.ax = 3; 48 regs.x.ax = 3;
49 int86 (0x10, &regs, &regs); 49 int86 (0x10, &regs, &regs);
50 regs.x.ax = 0x1101; 50 regs.x.ax = 0x1101;
51 regs.h.bl = 0; 51 regs.h.bl = 0;
52 int86 (0x10, &regs, &regs); 52 int86 (0x10, &regs, &regs);
70 70
71 #ifdef HAVE_X_WINDOWS 71 #ifdef HAVE_X_WINDOWS
72 if (!inhibit_window_system) 72 if (!inhibit_window_system)
73 return Qnil; 73 return Qnil;
74 #endif 74 #endif
75 if (have_mouse) mouse_off (); 75 mouse_off ();
76 regs.x.ax = 3; 76 regs.x.ax = 3;
77 int86 (0x10, &regs, &regs); 77 int86 (0x10, &regs, &regs);
78 regs.x.ax = 0x1112; 78 regs.x.ax = 0x1112;
79 regs.h.bl = 0; 79 regs.h.bl = 0;
80 int86 (0x10, &regs, &regs); 80 int86 (0x10, &regs, &regs);
157 you should call `unfocus-frame' afterwards.") 157 you should call `unfocus-frame' afterwards.")
158 (frame, x, y) 158 (frame, x, y)
159 Lisp_Object frame, x, y; 159 Lisp_Object frame, x, y;
160 { 160 {
161 mouse_moveto (XINT (x), XINT (y)); 161 mouse_moveto (XINT (x), XINT (y));
162 return Qnil;
162 } 163 }
163 164
164 /* Function to translate colour names to integers. See lisp/term/pc-win.el 165 /* Function to translate colour names to integers. See lisp/term/pc-win.el
165 for its definition. */ 166 for its definition. */
166 167
167 Lisp_Object Qmsdos_color_translate; 168 Lisp_Object Qmsdos_color_translate;
168 #endif 169 #endif
170
171
172 DEFUN ("msdos-mouse-init", Fmsdos_mouse_init, Smsdos_mouse_init, 0, 0, "",
173 "Initialize and enable mouse if available.")
174 ()
175 {
176 if (have_mouse) {
177 have_mouse = 1;
178 mouse_init ();
179 return Qt;
180 }
181 return Qnil;
182 }
183
184 DEFUN ("msdos-mouse-enable", Fmsdos_mouse_enable, Smsdos_mouse_enable, 0, 0, "",
185 "Enable mouse if available.")
186 ()
187 {
188 if (have_mouse)
189 {
190 have_mouse = 1;
191 mouse_on ();
192 }
193 return have_mouse ? Qt : Qnil;
194 }
195
196 DEFUN ("msdos-mouse-disable", Fmsdos_mouse_disable, Smsdos_mouse_disable, 0, 0, "",
197 "Disable mouse if available.")
198 ()
199 {
200 mouse_off ();
201 if (have_mouse) have_mouse = -1;
202 return Qnil;
203 }
204
169 205
170 206
171 int dos_country_code; 207 int dos_country_code;
172 int dos_codepage; 208 int dos_codepage;
173 Lisp_Object Vdos_version; 209 Lisp_Object Vdos_version;
226 syms_of_dosfns () 262 syms_of_dosfns ()
227 { 263 {
228 defsubr (&Smode25); 264 defsubr (&Smode25);
229 defsubr (&Smode4350); 265 defsubr (&Smode4350);
230 defsubr (&Sint86); 266 defsubr (&Sint86);
267 defsubr (&Smsdos_mouse_init);
268 defsubr (&Smsdos_mouse_enable);
269 defsubr (&Smsdos_mouse_disable);
231 #ifndef HAVE_X_WINDOWS 270 #ifndef HAVE_X_WINDOWS
232 defsubr (&Smsdos_mouse_p); 271 defsubr (&Smsdos_mouse_p);
233 defsubr (&Sset_mouse_position); 272 defsubr (&Sset_mouse_position);
234 273
235 Qmsdos_color_translate = intern ("msdos-color-translate"); 274 Qmsdos_color_translate = intern ("msdos-color-translate");