Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler) Newsgroups: comp.windows.x Subject: Re: Why can't I query the GC in X (or can I)? Message-ID: <8902132032.AA01164@EXPIRE.LCS.MIT.EDU> Date: 13 Feb 89 20:32:42 GMT References: <8902102148.AA17801@dinorah.wustl.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 18 The protocol doesn't provide readback for at least two reasons, but one is that GCs weren't really intended to be shared among multiple clients, and it was expected that clients would cache GC contents anyway, at least for performance. I note that the CLX interface *does* allow readback, although the necessity to do so is reduced by the ability to have scoped changes to individual attributes, e.g.: (with-gcontext (gc :line-width 1 :foreground pix) ) which changes two attributes during and then reverts them. It's quite possible that not having readback in the C Xlib is bogus. If people want to mount a campaign with good arguments as to why this functionality should exist, please do so. I've noticed that the structure that GC is a pointer to has an XGCValues structure in it, with the comment that it is a "shadow structure of values." Is it ever safe to look at that? The GC structure is supposed to be "opaque", there is currently no guarantee that the structure will be the same in all implementations.