Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!sdd.hp.com!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: mouse@lightning.mcrcim.mcgill.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: Questions about X Colors Message-ID: <9105032332.AA04146@lightning.McRCIM.McGill.EDU> Date: 3 May 91 23:32:20 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 32 > 1) How can I determine the precision of the RGB values? That is, how > many high bits are actually valid? This is the bits-per-rgb value in the XVisualInfo structure you get back from XGetVisualInfo or XMatchVisualInfo. > 2) How can I figure out if a pixel is read only or read/write > (besides trying to re-write it) I don't think you can. The theory is, I think, that you shouldn't care: if you allocated it, you know, and if you didn't allocate it, you have no business trying to change it. (I don't entirely agree with this, but that's irrelevant.) What are you doing that you care, and why isn't just trying to write the current rgb triple into it good enough? > 3) How can I get statistics about the cells in the current colormap? > For example, how many are read/only, how many are allocated > read/write for another client, how many my client has allocate > read/write? What is the "current" colormap? In any case, I know of no way to get such information. Of course, the mostly-negative answers to questions 2 and 3 apply only to the core X protocol. Extensions could be (and perhaps have been, though I know of none) written that allow doing these things. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu