home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!wupost!sdd.hp.com!uakari.primate.wisc.edu!ames!data.nas.nasa.gov!taligent!apple!cambridge.apple.com!bill@cambridge.apple.com
- From: bill@cambridge.apple.com (Bill St. Clair)
- Newsgroups: comp.lang.lisp.mcl
- Subject: Re: main-screen-color-p
- Message-ID: <9208261602.AA14943@cambridge.apple.com>
- Date: 26 Aug 92 17:06:34 GMT
- Sender: info-mcl-request@cambridge.apple.com
- Lines: 54
- Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
- Full-Name: Bill St. Clair
- Original-To: wilcox@cmns.think.com, Henry Lieberman <lieber@MEDIA-LAB.MEDIA.MIT.EDU>
- Original-Cc: info-mcl
-
- >Date: Wed, 26 Aug 92 11:04:51 EDT
- >From: wilcox@cmns.think.com
- >To: info-mcl@cambridge.apple.com
- >Subject: main-screen-color-p
- >
- >Here's a quick way to tell if the main screen can display in color:
- >
- >(defun main-screen-color-p ()
- > "Is the main screen capable of displaying color?"
- > ;; *color-available* just tells you if color quickdraw is in ROM
- > ;; it doesn't tell you if the screen can display in color
- > ;; #_getmaindevice trap gives handle to screen containing menubar
- > (let ((screen (#_getmaindevice))
- > (gddevtype 0))
- > (#_testdeviceattribute screen gddevtype)
- > ))
-
- If you run this code on a machine where *color-available* is NIL,
- it will crash. Better would be:
-
- (defun main-screen-color-p ()
- "Is the main screen capable of displaying color?"
- ;; *color-available* just tells you if color quickdraw is in ROM
- ;; it doesn't tell you if the screen can display in color
- ;; #_getmaindevice trap gives handle to screen containing menubar
- (and *color-available*
- (let ((screen (#_getmaindevice))
- (gddevtype 0))
- (#_testdeviceattribute screen gddevtype)
- )))
-
- >Date: Wed, 26 Aug 92 11:35:14 -0400
- >From: Henry Lieberman <lieber@MEDIA-LAB.MEDIA.MIT.EDU>
- >To: info-mcl@MEDIA-LAB.MEDIA.MIT.EDU
- >Subject: main-screen-color-p
- >
- >
- >Main-Screen-Color-P still doesn't do it, I'm afraid.
- >On my machine, a color screen, it returns T, but when I set the
- >Monitors control panel to black-and-white, it still returns T.
- >
- >I think what most programs will want to know is whether color pixels
- >are actually reaching the user's retina, not if the screen has the
- >"capability" in some sense to do color display.
-
- It does the right thing in my hardware setup. Changing between 256 colors
- and 256 grays toggles the value returned. I've got an 8*24 GC board
- going to my color monitor. Maybe your monitor interface hardware is
- doing the wrong thing.
-
- For those of you with CD-ROM drives, there are a number of unexported
- functions having to do with graphics devices at the end of the file:
-
- "MCL 2.0 CD:Additional MCL Source Code:Lib:color.lisp"
-