Mercurial > hg > xemacs-beta
diff lisp/device.el @ 282:c42ec1d1cded r21-0b39
Import from CVS: tag r21-0b39
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:33:18 +0200 |
parents | 78f53ef88e17 |
children | 558f606b08ae |
line wrap: on
line diff
--- a/lisp/device.el Mon Aug 13 10:32:23 2007 +0200 +++ b/lisp/device.el Mon Aug 13 10:33:18 2007 +0200 @@ -63,6 +63,34 @@ (make-device 'tty tty (list 'terminal-type terminal-type 'controlling-process controlling-process))) +(defun device-pixel-width (&optional device) + "Return the width in pixels of DEVICE, or nil if unknown." + (let ((ds (device-system-metrics device 'size-device))) + (and ds (car ds)))) + +(defun device-pixel-height (&optional device) + "Return the height in pixels of DEVICE, or nil if unknown." + (let ((ds (device-system-metrics device 'size-device))) + (and ds (cdr ds)))) + +(defun device-mm-width (&optional device) + "Return the width in millimeters of DEVICE, or nil if unknown." + (let ((ds (device-system-metrics device 'size-device-mm))) + (and ds (car ds)))) + +(defun device-mm-height (&optional device) + "Return the height in millimeters of DEVICE, or nil if unknown." + (let ((ds (device-system-metrics device 'size-device-mm))) + (and ds (cdr ds)))) + +(defun device-bitplanes (&optional device) + "Return the number of bitplanes of DEVICE, or nil if unknown." + (device-system-metrics device 'num-bit-planes)) + +(defun device-color-cells (&optional device) + "Return the number of color cells of DEVICE, or nil if unknown." + (device-system-metrics device 'num-color-cells)) + (defun make-x-device (&optional display) "Create a new device connected to DISPLAY." (make-device 'x display))