[Xcb] Re: [E-devel] XCB/XCL

Bart Massey bart@cs.pdx.edu
Sat, 26 Apr 2003 14:05:57 -0700

OK, after dicussing with you and after long talks with Keith
Packard and Jamey today, I think what we need is a tiny
extension to XCB:

  XCBGenericResponse *XCBWaitResponse(XCBConnection *c)
  XCBGenericResponse *XCBPollResponse(XCBConnection *c)

where an XCBGenericResponse is either an XCBGenericRep
(consisting of reply data tagged by its sequence number), an
XCBGenericError, or an XCBGenericEvent.  XCBPollResponse
will return 0 if nothing is available, XCBWaitResponse will
block (duh).  Once a cookie's reply has been returned by
XCBPollResponse, the cookie becomes invalid for further use

I'm not sure who wants to write this bit: Jamey could
probably do it in a few minutes (heh) or I could do it
sometime next week, or someone else on XCB (Andy? David?
Keith Miller?)  could try it, or you could try it.  Most of
the needed bits seem to already be there.

I wanted to do something about tagging the returned reply
with a request code or reply data type. The problem is that
XCB has no internal queue for maintaining outstanding
requests.  The only information XCB has about outstanding
requests is that the connection's request sequence number is
higher than the sequence number of the last processed reply.
For now, I think you're gonna have to maintain your own
queue of information on the requests you've sent out.  Once
we get experience with your app, maybe we will want to build
a generic library for this style of interaction with XCB.

Does this seem to everyone involved like a sane way to


In message <20030426180447.60015617.raster@rasterman.com> you wrote:
> aaah i see - i'll need to check. good stuff - bytw where did you get the xshm
> protocol specs?