[Xcb] char* in structs ;)
Jeremy Kolb
jkolb at brandeis.edu
Wed Jun 15 10:08:51 PDT 2005
Quoting Jamey Sharp <jamey at minilop.net>:
> On Wed, 2005-06-15 at 08:26 -0400, Jeremy Kolb wrote:
> > Hey Jamey!
>
> Hi Jeremy!
>
> > Quoting Jamey Sharp <jamey at minilop.net>:
> > > 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.
> >
> > Let's see if I can remember...
>
> I know, I put that one off a long time. :-)
>
> > within the reply is a list of the
> > AttributeInfos. One of the fields is a string, another is the length of
> said
> > string. If you say it works correctly then I'll take another look.
>
> Yeah, I think it should be fine. It'll generate iterators and you'll
> have to use them; hopefully that's OK. :-)
>
Excellent.
> > > 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.
> >
> > Well the user can provide the display with the standard -display paramter
> (:1,
> > host:display ...) I'm just not sure what the functions are to make use
> of
> > that.
>
> Oh, OK. I consider that outside the scope of XCB: it won't save your
> display string for you. You should save it yourself if you want it.
> Also, obviously, XCB doesn't do command-line argument processing for you
> either. :-)
>
Right I know that, what I'm asking is... if I have the string, how do I
generate the appropriate connection. I believe in xlib you can do dpy=
XOpenDisplay(display_string).
Or something like that, I don't have any code in front of me and I don't know
xlib that well so I may be lying. Is this sort of thing outside of the scope
of XCB or am I blind (very distinct possibility ;)).
Jeremy
More information about the xcb
mailing list