]> git.eshelyaron.com Git - emacs.git/commitdiff
(display-images-p): New function.
authorEli Zaretskii <eliz@gnu.org>
Tue, 17 Jul 2001 12:58:19 +0000 (12:58 +0000)
committerEli Zaretskii <eliz@gnu.org>
Tue, 17 Jul 2001 12:58:19 +0000 (12:58 +0000)
lisp/frame.el

index 7720b796e8f25b962da016a8bfdc63a2bad7d5c9..c888334aad485d62ca78e4c3e69962ec0ba3dbd6 100644 (file)
@@ -904,6 +904,18 @@ DISPLAY can be a display name, a frame, or nil (meaning the selected
 frame's display)."
   (not (null (memq (framep-on-display display) '(x w32 mac)))))
 
+(defun display-images-p (&optional display)
+  "Return non-nil if DISPLAY can display images.
+
+DISPLAY can be a display name, a frame, or nil (meaning the selected
+frame's display)."
+  (and (display-graphic-p display)
+       (fboundp 'image-mask-p)
+       (fboundp 'image-size)
+       ;; FIXME: this will need to be revisited when the Windows port
+       ;; supports images.
+       (not (eq (framep-on-display display) 'w32))))
+
 (defalias 'display-multi-frame-p 'display-graphic-p)
 (defalias 'display-multi-font-p 'display-graphic-p)