clyne@redcloud.ucar.edu (John Clyne) (02/14/89)
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 library and have apriori knowledge of the device. Cgi itself does not seem to support this. Thanks in advance - jc John Clyne (clyne@bierstadt.ucar.edu) National Center for Atmospheric Research P.O. 3000 Boulder, Co. 80302
hart@leadsv.UUCP (Howard Hart) (02/19/89)
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