aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1995-09-02 16:23:53 +0000
committerRichard M. Stallman <[email protected]>1995-09-02 16:23:53 +0000
commitac3b02794fe3ecb390755298f74d3148860c477d (patch)
treec88bff25dc3598919770139ba077dd020eb4524a
parent39238ce7582ef9884cc398bd172c05052d9dba69 (diff)
(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.
-rw-r--r--src/dosfns.c43
1 files changed, 41 insertions, 2 deletions
diff --git a/src/dosfns.c b/src/dosfns.c
index ea9eb6618c..2b4ca88fce 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -44,7 +44,7 @@ Changes the number of rows to 25.")
if (!inhibit_window_system)
return Qnil;
#endif
- if (have_mouse) mouse_off ();
+ mouse_off ();
regs.x.ax = 3;
int86 (0x10, &regs, &regs);
regs.x.ax = 0x1101;
@@ -72,7 +72,7 @@ Changes the number of rows to 43 (EGA) or 50 (VGA).")
if (!inhibit_window_system)
return Qnil;
#endif
- if (have_mouse) mouse_off ();
+ mouse_off ();
regs.x.ax = 3;
int86 (0x10, &regs, &regs);
regs.x.ax = 0x1112;
@@ -159,6 +159,7 @@ you should call `unfocus-frame' afterwards.")
Lisp_Object frame, x, y;
{
mouse_moveto (XINT (x), XINT (y));
+ return Qnil;
}
/* Function to translate colour names to integers. See lisp/term/pc-win.el
@@ -167,6 +168,41 @@ you should call `unfocus-frame' afterwards.")
Lisp_Object Qmsdos_color_translate;
#endif
+
+DEFUN ("msdos-mouse-init", Fmsdos_mouse_init, Smsdos_mouse_init, 0, 0, "",
+ "Initialize and enable mouse if available.")
+ ()
+{
+ if (have_mouse) {
+ have_mouse = 1;
+ mouse_init ();
+ return Qt;
+ }
+ return Qnil;
+}
+
+DEFUN ("msdos-mouse-enable", Fmsdos_mouse_enable, Smsdos_mouse_enable, 0, 0, "",
+ "Enable mouse if available.")
+ ()
+{
+ if (have_mouse)
+ {
+ have_mouse = 1;
+ mouse_on ();
+ }
+ return have_mouse ? Qt : Qnil;
+}
+
+DEFUN ("msdos-mouse-disable", Fmsdos_mouse_disable, Smsdos_mouse_disable, 0, 0, "",
+ "Disable mouse if available.")
+ ()
+{
+ mouse_off ();
+ if (have_mouse) have_mouse = -1;
+ return Qnil;
+}
+
+
int dos_country_code;
int dos_codepage;
@@ -228,6 +264,9 @@ syms_of_dosfns ()
defsubr (&Smode25);
defsubr (&Smode4350);
defsubr (&Sint86);
+ defsubr (&Smsdos_mouse_init);
+ defsubr (&Smsdos_mouse_enable);
+ defsubr (&Smsdos_mouse_disable);
#ifndef HAVE_X_WINDOWS
defsubr (&Smsdos_mouse_p);
defsubr (&Sset_mouse_position);