[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Dec 8 15:44:28 1997 
Subject:Re: COLOUR OR BLACK AND WHITE TERMINAL PROCEDURE 
From:Aaron Sloman See text for reply address 
Volume-ID:971208.02 

shu96jsp@reading.ac.uk (James Pascoe) writes:

> Dear all,
>
> Could anybody please tell me if there is a procedure that when called will
> deliver a boolean response as to whether or not the host terminal is using
> a colour or a black and white display?

See REF xpt_screeninfo

define is_blackwhite_display(widget);
    XDefaultDepthOfScreen(XtScreen(widget)) == 1
enddefine;

This works if you have created a widget (e.g. rc_window in
rc_graphic). I don't know how to get a suitable argument for
XDefaultDepthOfScreen if you have not yet created a widget, though
it should be possible to find the screenptr associated with the
current display. Maybe you can find a way to use one of these

    XDefaultScreenOfDisplay(displayptr) -> screenptr
    DefaultScreenOfDisplay(displayptr) -> screenptr
    XScreenOfDisplay(displayptr, screen_num) -> screenptr
    ScreenOfDisplay(displayptr, screen_num) -> screenptr

See ref XlibMacros

Aaron
-- 
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman at cs.bham.ac.uk(||| MAKE BULK EMAIL ADVERTS ILLEGAL |||)
Phone: +44-121-414-4775 (Sec 3711)       Fax:   +44-121-414-4281