From ac3b02794fe3ecb390755298f74d3148860c477d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 2 Sep 1995 16:23:53 +0000 Subject: [PATCH] (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. --- src/dosfns.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file 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.") if (!inhibit_window_system) return Qnil; #endif - if (have_mouse) mouse_off (); + mouse_off (); regs.x.ax = 3; int86 (0x10, ®s, ®s); 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, ®s, ®s); 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); -- 2.39.2