[Xcb] Bug 6254: remove XCB's xproto/X11 dependency

Jamey Sharp jamey at minilop.net
Tue Mar 14 15:25:49 PST 2006


On Tue, Mar 14, 2006 at 09:04:23AM -0800, Ian Osgood wrote:
> On Mar 14, 2006, at 12:08 AM, Jamey Sharp wrote:
> > I like "developer-friendly" where possible, but one response to
> > this is that I don't expect many people to program directly to XCB.
> > Usually  some toolkit is preferable; only the authors of toolkits,
> > and some  libraries like Cairo and libGL, should care much about
> > XCB's API. My preference would be an API that closely reflects the
> > protocol documentation. A  bit of typing won't kill anyone.
> 
> The problem is the documentation for the constants uses their short
> names, and many of the constants are used in multiple requests.  What
> would you name the enum that contains XCBNone?  Does the XSLT have a
> function to define an arbitrary XCB namespace constant as an
> alternative?

Maybe it should. These are the kinds of questions I've been hoping other
people would answer since about January 2002, it looks like, and your
answers sound as reasonable as any. Remember that coding on this project
began in July or August 2001... [1]

I did have an XCBCONSTANT macro in the old m4 days, and once upon a time
I was using it for this sort of purpose. There was a time, in fact, when
I had the contents of Xmd.h and X.h copy/pasted into some XCB header
file. I took that out partly because I hadn't yet designed a decent
naming scheme for those constants, and partly because using identical
names meant that you couldn't #include X.h and xcb.h in the same source
file -- a big problem for XCL.

> Personally, I am easily persuaded that XCBWindowClassInputOutput is a
> good thing: self-documenting and avoids name conflicts. Code should be
> written to aid the reader, not the writer.  Those who want shorter or
> more traditional names know where to find X.h.

Sounds like you and I are on the same page then.

--Jamey

[1] Auggh! I'm missing some early history in the XCB repository. It
doesn't seem to be in CVS either, so this isn't GIT's fault.
-------------- 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/20060314/bf3eeae9/attachment.pgp


More information about the Xcb mailing list