Function: display-mouse-p
display-mouse-p is a byte-compiled function defined in frame.el.gz.
Signature
(display-mouse-p &optional DISPLAY)
Documentation
Return non-nil if DISPLAY has a mouse available.
DISPLAY can be a display name, a frame, or nil (meaning the selected frame's display).
Probably introduced at or before Emacs version 21.1.
Source Code
;; Defined in /usr/src/emacs/lisp/frame.el.gz
(defun display-mouse-p (&optional display)
"Return non-nil if DISPLAY has a mouse available.
DISPLAY can be a display name, a frame, or nil (meaning the selected
frame's display)."
(let ((frame-type (framep-on-display display)))
(cond
((eq frame-type 'pc)
(msdos-mouse-p))
((eq frame-type 'w32)
(with-no-warnings
(> w32-num-mouse-buttons 0)))
((memq frame-type '(x ns))
t) ;; We assume X and NeXTstep *always* have a pointing device
(t
(or (and (featurep 'xt-mouse)
xterm-mouse-mode)
;; t-mouse is distributed with the GPM package. It doesn't have
;; a toggle.
(featurep 't-mouse)
;; No way to check whether a w32 console has a mouse, assume
;; it always does.
(boundp 'w32-use-full-screen-buffer))))))