Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-lcc!pyramid!leadsv!hart From: hart@leadsv.UUCP (Howard Hart) Newsgroups: comp.graphics Subject: Re: Sun cgi help Summary: get screendepth programatically Keywords: suntools,screendepth Message-ID: <6018@leadsv.UUCP> Date: 18 Feb 89 21:31:12 GMT References: <1399@ncar.ucar.edu> Reply-To: hart@leadsv.LEADS.LMSC.COM.UUCP (Howard Hart) Distribution: comp.graphics Organization: LMSC-LEADS, Sunnyvale, Ca. Lines: 20 In article <1399@ncar.ucar.edu> clyne@redcloud.ucar.edu.UUCP () writes: >Could someone tell me how to detect the type of device. i.e color or >monochrome, programatically on a Sun. I need to initialize Sun's cgi > See page 109 of the Sunview programmer's manual or look through the last few months of Sunspots articles. I think someone has posted a new way to check screen depth about once a week there :-). The basic idea is define and open a pixwin, then reference the screen depth via: Pixwin *pw; int depth = pw->pw_pixrect->pr_depth; where depths of 1 mean monochrome and depths > 1 (8 bits deep) mean color displays. -- Howard C. Hart UUCP: { sun!sunncal, pyramid }!leadsv!hart Lockheed Missiles and Space Co. Orgn 59-53, Bldg 593 Ph: (408) 743-2253 or -7353 Sunnyvale, CA 94086