[Xcb] More on types and xml-xcb

Jamey Sharp jamey at minilop.net
Wed Apr 6 22:39:17 PDT 2005


On Wed, Apr 06, 2005 at 08:06:34PM -0700, Josh Triplett wrote:
> My current plan to fix this is to retain the behavior of searching
> everything by default (and complaining in the face of ambiguity), but
> allowing you to specify a specific namespace for disambiguation.  For
> example, <field type="shape::OP" ... /> or <field type="glx::Pixmap" ...
> />.  (Suggestions for better syntax are certainly welcome, if you don't
> like that.)

The XMLish style would be a single colon (type="shape:OP"); I think I'd
prefer that.

> For now, I'm just going to make file-scope namespaces, which you can
> refer to using the value from the "header" field of the xcb tag in that
> file (which is also the basename of the file without the .xml
> extension).  In the long-term, it *might* be useful to have explicit
> namespaces instead.

Perhaps a better choice would be using the name of the extension; an
empty string (e.g., type=":PIXMAP") could refer to declarations not in
any extension.

It's not obvious to me that searching multiple places for a type
declaration is a good idea. If a type is multiply declared (as in
XCBPIXMAP and XCBGlxPIXMAP) you'd better know, when writing the
extension, which declaration you meant. But I suppose the current
behavior of giving an error if multiple declarations are found while
searching would be sufficient.

--Jamey


More information about the xcb mailing list