[Xcb] Some comments on XCB
Josh Triplett
josh.trip at verizon.net
Fri May 20 23:43:33 PDT 2005
Carl Worth wrote:
> On Tue, 17 May 2005 12:56:10 -0700, Josh Triplett wrote:
>>>I recognized that there might be some difficulty in this area due to
>>>XCB's use of code generation, but anything that could be done to
>>>improve the current situation would be appreciated.
>>
>>No problem at all; fixed. Second and subsequent function parameters now
>>line up with the first.
>
> Fantastic! That's a great improvement, and largely solves the problem.
>
> But the "some difficulty" I mentioned also included getting from
> something like we now[*] have:
>
> XCBVoidCookie
> XCBChangeHosts (XCBConnection *c,
> CARD8 mode,
> CARD8 family,
> CARD16 address_len,
> const char *address);
>
> to the just-that-much-better version:
>
> XCBVoidCookie
> XCBChangeHosts (XCBConnection *c,
> CARD8 mode,
> CARD8 family,
> CARD16 address_len,
> const char *address);
>
> Feel free to accept or reject that challenge as you see fit.
>
> -Carl
>
> [*] This is assuming the function name is moved to start on its own
> line, which I think is essential, and I imagine must be trivial to
> do. Oh, and I've also added a space between the function name and the
> opening parenthesis.
No problem. Function declarations now look exactly as you suggest, and
in the process, I also lined up field names in structure declarations:
> typedef struct {
> XCBRenderGLYPH *data;
> int rem;
> int index;
> } XCBRenderGLYPHIter;
[...]
> typedef struct {
> CARD8 major_opcode;
> CARD8 minor_opcode;
> CARD16 length;
> XCBRenderPICTURE pid;
> XCBDRAWABLE drawable;
> XCBRenderPICTFORMAT format;
> CARD32 value_mask;
> } XCBRenderCreatePictureReq;
[...]
> XCBRenderQueryPictIndexValuesRep *
> XCBRenderQueryPictIndexValuesReply (XCBConnection *c,
> XCBRenderQueryPictIndexValuesCookie cookie,
> XCBGenericError **e);
>
> XCBVoidCookie
> XCBRenderCreatePicture (XCBConnection *c,
> XCBRenderPICTURE pid,
> XCBDRAWABLE drawable,
> XCBRenderPICTFORMAT format,
> CARD32 value_mask,
> const CARD32 *value_list);
- Josh Triplett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20050520/56bf806f/signature.pgp
More information about the xcb
mailing list