[Xcb] XCB naming conventions

Jamey Sharp jamey at minilop.net
Wed Sep 13 12:04:53 PDT 2006


On Wed, Sep 13, 2006 at 02:19:05PM -0400, Jeremy A. Kolb wrote:
> xcb_window_new
> xcb_glx_create_context.

I love this. But I still want to release on Friday, and I kind of hate
to break everyone's code just before release. Of course, we're not going
to break it afterwards, so now is the time if it's going to happen.

> XcbWindow
> XcbGlxContext

I don't love this quite as much. I'd be OK with following Cairo's
example of xcb_window_t or something.

This should let us eliminate the distinction between *Rep, which is a
type, and *Reply, which is a function -- using *_reply_t and *_reply
would be nice. If there are more abbreviations in the auto-generated
names, we should eliminate those too: for example, *Req would become
*_request_t.

Thoughts on CARD8 etc.? It would be good if we were using a different
name than Xlib uses: the current hack to make that work is painful.

> We think this would be much easier to read.  What's everyone think?  This 
> would require changes to ecore/x11/mesa/xcb-utils etc. But nothing a good 
> sed script wouldn't be able to handle.

If we have a prototype source conversion tool by, say, about 8am UTC
tomorrow, then I'd seriously consider this proposal.

I also want feedback from others on how awful this mechanical change to
the API is for them though.

It'd help a lot if someone also put together the patch to c-client.xsl
that generates the desired naming convention, and posted the
git-format-patch output to the list. Note a complete solution in the XSL
probably requires making sure it can find word boundaries in xcb-proto
names. That may require small changes to some xcb-proto declarations.

--Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20060913/2576045a/attachment.pgp


More information about the Xcb mailing list