[Xcb] char* in structs ;)

Jamey Sharp jamey at minilop.net
Wed Jun 15 00:21:46 PDT 2005


On Tue, 2005-06-07 at 23:19 -0400, Jeremy A. Kolb wrote:
> Ok.  In XV there is an AttributeInfo struct, a list of which are returned 
> from a reply.
> 
> Now all the headers that I can find show that this struct has a name_size 
> parameter (the docs are way sketchy), but in the client side code it 
> references a char* name in the struct (still can't find where this is 
> defined, but it exists).  So it looks like we're going to need a way of 
> returning a struct with a list in it of variable size.  I believe we 
> talked about this before for GLX but discovered that it wasn't needed?

Are you saying that there's only one of these AttributeInfo structures
in the reply in question? I'm pretty sure this case works fine if you
return a list of AttributeInfos; and I suspect it would happen to be OK
for a single AttributeInfo as long as it's the last thing in the reply.

> On another note: how can I get the current display (eg. ":1" or 
> "host:display") in XCB?

getenv("DISPLAY") is the only answer I have to that question... but what
are you trying to do? If you want the screen number out of the DISPLAY,
for example, you should save it yourself when opening the XCBConnection.

--Jamey



More information about the xcb mailing list