[Xcb] Hello xcblist.

Barton C Massey bart at cs.pdx.edu
Wed Feb 3 21:58:20 PST 2010

In message <20100204012124.9ed00b6c.Highjinks at gmx.com> you wrote:
> Recently I've picked up Modula-3, and decided to do an XCB
> binding for it.

Cool.  I hadn't even thought about M3 in years.

> Looks like the best course of action would be to
> autogenerate the binding using the XML schema in the
> repository.

> Should I write my own parser? Extend the ones in the
> repository?  Any tips on where I should get started?

I'd look at hacking up the Python-based C code generator to
emit M3.  I think this will be the lowest-energy route.  The
modularity of that looks to me good enough that you should
be able to replace only a couple of files.

There are two general approaches to writing language
bindings for XCB.  One is to write a from-scratch binding
including a runtime entirely in the target language,
ignoring the existing XCB C library altogether.  The other
is to write just an XCB "stub generator" for the target
language, and use the target language's FFI to interface
with the "bottom half" XCB C library, much the way that Xlib

The second approach is generally preferred; it allows
target-language applications to freely mix FFI calls to
libraries that indirectly talk to XCB with direct XCB calls.
It also leverages the extensive work that has gone into the
XCB bottom half.

> Would the XCB team welcome an M3 binding?

We welcome bindings for any language!  If you're asking
about eventually moving it upstream, yes we would be
amenable to that once it's solidly working.

Good to meet you!


More information about the Xcb mailing list