[Xcb] Suggestions for improvements on predefined atoms

Barton C Massey bart at cs.pdx.edu
Mon Oct 6 10:19:07 PDT 2008


In message <20081006121626.7f0da7b8 at before> you wrote:
> I have some suggestions on improving predefined atoms in XCB:
> 
> 1. Why aren't there any predefined atom-definitions in the
> proto-package? As they are part of the protocol I think
> they should go there.

Makes sense.  Patch welcome.  You'll want to define a new
type for atoms in the XML schema, then modify Eamon's Python
code generator to generate an include file with the
predefined atoms and their values in them.  This would also
be good as you can initialize the atoms at definition time
in the header file, instead of the weird thing we're doing
now.  You'll have to hack up atom.c a bit, as it is doing
some magic hashing with gperf.

> 2. Shouldn't the predefined atom-defs in xcb_atom.h take a
> XCB_-prefix to avoid name-clashes?

Also makes sense.  The patch for your previous suggestion
should take care of this.  Make sure you update existing
code in the XCB libraries that uses the names in xcb_atom.h
to reflect the new include file and prefixed names.

    Bart


More information about the Xcb mailing list