aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-09-02 16:23:53 +0000
committerRichard M. Stallman1995-09-02 16:23:53 +0000
commitac3b02794fe3ecb390755298f74d3148860c477d (patch)
treec88bff25dc3598919770139ba077dd020eb4524a /src
parent39238ce7582ef9884cc398bd172c05052d9dba69 (diff)
downloademacs-ac3b02794fe3ecb390755298f74d3148860c477d.tar.gz
emacs-ac3b02794fe3ecb390755298f74d3148860c477d.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/dosfns.c43
1 files changed, 41 insertions, 2 deletions
diff --git a/src/dosfns.c b/src/dosfns.c
index ea9eb6618c9..2b4ca88fce1 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -44,7 +44,7 @@ Changes the number of rows to 25.")
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;
@@ -72,7 +72,7 @@ Changes the number of rows to 43 (EGA) or 50 (VGA).")
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;
@@ -159,6 +159,7 @@ you should call `unfocus-frame' afterwards.")
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
@@ -167,6 +168,41 @@ you should call `unfocus-frame' afterwards.")
167Lisp_Object Qmsdos_color_translate; 168Lisp_Object Qmsdos_color_translate;
168#endif 169#endif
169 170
171
172DEFUN ("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
184DEFUN ("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
196DEFUN ("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
205
170 206
171int dos_country_code; 207int dos_country_code;
172int dos_codepage; 208int dos_codepage;
@@ -228,6 +264,9 @@ syms_of_dosfns ()
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);