[comp.windows.x] Pixmap depths

caag@inf.rl.ac.uk (Crispin Goswell) (09/09/89)

I am trying to figure out how to ask a server what Pixmap depths it will
support for a given screen.

A server can support pixmaps of depths which it will not
support as a window. Depth 1 on a colour server is a typical example.
Looking at the R3 protocol spec. I see that as part of the sign-on procedure,
the server will send a list of valid pixmap formats, a list of screens,
a list of allowed depths for each screen and a list of allowed visuals for
each depth (some of which may be empty lists).

For a pixmap to be used with a screen, it has to be of a depth supported by
that screen, but the screen may have no associated visual for that depth.

This is all well and good, but there seems to be no way with Xlib to find a list
of valid depths, or to enquire whether a particular screen will support pixmaps
of that depth if it cannot display them. Whilst on many servers the only depth
supported for a screen but with no visual will be depth 1, which is always a
supported depth, this may not always be the case.

Or am I missing something....?

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (09/11/89)

    there seems to be no way with Xlib to find a list
    of valid depths, or to enquire whether a particular screen will support
    pixmaps of that depth if it cannot display them.

Hmm, in R4 we're adding an interface so you can get the pixmap formats back,
which gives you the total set of depths, but it looks like we'll still be
missing a way to find out which non-window depths are supported on each
screen.  We'll look at this.