[Xcb] Re: xcb-proto: prelimininary support for XTEST, XC-MISC, SYNC

Jamey Sharp jamey at minilop.net
Sat Jul 24 19:57:29 PDT 2004


Hey Mikko,

Sorry I dropped this thread for a while. I've been working on your
patches, though, among other things.

At this point, both SYNC and XC-MISC are committed. Some test code would
be nice. A port of a real application that uses them would be ideal. (I
have done some testing of XC-MISC, and it seems fine.)

When last we exchanged e-mails, you mentioned that you had some fixes to
your XTEST implementation, but I don't think I saw the result. I'm
interested in committing that too: could you send it to me?

On Wed, Jun 23, 2004 at 08:17:12PM +0300, Mikko Markus Torni wrote:
> On Tue, Jun 22, 2004 at 05:49:32PM -0700, Jamey Sharp wrote:
> > If you want, you could make XCB use this extension when it needs new
> > XIDs. The source file to change is xcb_xid.c; feel free to hack up the
> > _xcb_xid structure in xcbint.h too. This should be pretty easy to do,
> > and would be a fairly significant contribution to XCB.
> 
> I'll have a look at it.

I wound up implementing it myself, actually. I was thinking about XCB
defects, and decided this one was too embarrasingly easy to fix.

> I was trying to come up with something like this (example from SYNC
> implementation):
> 
> BITMASKREPLY(CARD32, `values_mask')
> CONDREPLY(CARD32, `counter', `R->values_mask & 0x00000001')
> CONDREPLY(CARD32, `value_type', `R->values_mask & 0x00000002')
> CONDREPLY(CARD32, `value', `R->values_mask & 0x00000004')
> etc...
> 
> This of course has the disadvantage of requiring a new conditional
> version for each field type.
> 
> Somehow there should be an (extensible?) way to specify properties for
> fields. By properties I mean ways to specify padding, conditionality and
> number of elements.

Well... m4 functions take variable-length argument lists, so it's easy
to create optional arguments. But I'm not sure what the generated C code
would look like on the reply side. In XCB's current design, replies are
not processed based on the request type in any way. So access to certain
fields (the list fields) has to be done through functions, because
there's no opportunity to dump data into an array of structures.
Conditional replies might have to operate in the same fashion, but I
don't know quite what that would mean.

Conditional parameters, on the other hand, are a bit more obvious (and
are more widely useful in the X protocol).

Anyway, I'm interested in seeing what you come up with.
-- 
Jamey Sharp <jamey at minilop.net> - http://minilop.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://freedesktop.org/pipermail/xcb/attachments/20040724/616ad79a/attachment.pgp


More information about the xcb mailing list