Mercurial > emacs
changeset 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 | 84916366643e |
children | 00db8b604656 |
files | src/dosfns.c |
diffstat | 1 files changed, 41 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dosfns.c Sat Sep 02 16:23:03 1995 +0000 +++ b/src/dosfns.c Sat Sep 02 16:23:53 1995 +0000 @@ -44,7 +44,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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);