[Xcb] XCB convenient functions

Jamey Sharp jamey at minilop.net
Sat Apr 2 08:34:39 PST 2005


On Sat, Apr 02, 2005 at 04:59:43PM +0200, Vincent Torri wrote:
> Hello,

Hi Vincent!

> I've added some convenient functions in the cvs
> (xcb-util/convenient/xcb_convenient.*)
> 
> Do you think i should change the name of the functions, so that hthey
> match the XCB naming ? (like XCBConnectionDepthGet or
> XCBConnectionGetDepth instead of xcb_connection_depth_get)
> 
> do you have other functions that you would like to be added ?

It's all kind of up to you. There's no particular need for libraries
outside of XCB to match XCB's naming convention which, FWIW, is not a
convention I love: it was chosen to be similar to Xlib's naming. I think
it makes sense for XCBImage to be similar, since it's a clone of XImage.
Anything else can be considered separately.

Libraries definitely should be namespaced, though, in the sense that a
library named xcb_convenient should have functions named
xcb_convenient_* or XCBConvenient* or something. (Ironically, this makes
the name xcb_convenient quite... inconvenient...)

As for the scope of this particular library, "anything that's
convenient" is a very broad scope, so obviously more functions could be
added. Probably the scope should be narrowed, though I'm not sure what
to suggest. Regardless, that's easy to fix later: first you try building
stuff, then you find out whether it's what you actually wanted, and if
it isn't, then you try again.

--Jamey


More information about the xcb mailing list