home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / lisp / mcl / 1317 < prev    next >
Encoding:
Text File  |  1992-08-26  |  910 b   |  23 lines

  1. Path: sparky!uunet!usc!sdd.hp.com!uakari.primate.wisc.edu!ames!data.nas.nasa.gov!taligent!apple!cambridge.apple.com!wilcox@cmns.think.com
  2. From: wilcox@cmns.think.com
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: main-screen-color-p
  5. Message-ID: <9208261504.AA11331@cmns-sun.think.com>
  6. Date: 26 Aug 92 15:04:51 GMT
  7. Sender: info-mcl-request@cambridge.apple.com
  8. Lines: 11
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10. Original-To: info-mcl@cambridge.apple.com
  11.  
  12. Here's a quick way to tell if the main screen can display in color:
  13.  
  14. (defun main-screen-color-p ()
  15.   "Is the main screen capable of displaying color?"
  16.   ;; *color-available* just tells you if color quickdraw is in ROM
  17.   ;; it doesn't tell you if the screen can display in color
  18.   ;; #_getmaindevice trap gives handle to screen containing menubar
  19.   (let ((screen (#_getmaindevice))
  20.         (gddevtype 0))
  21.     (#_testdeviceattribute screen gddevtype)
  22.     ))
  23.