[Xcb] Server-side XCB
Barton C Massey
bart at cs.pdx.edu
Tue Aug 10 15:23:55 PDT 2010
Wow. That's pretty cool.
I personally would not be averse to a fourth incarnation of
the client-side bindings using a template language. However
I would be sympathetic if the authors of the current Python
bits disagreed. :-) If nothing else, we're learning a lot
about protocol metaprogramming in this project.
Thanks for looking at this!
Bart
In message <4C6029A4.2090707 at dbservice.com> you wrote:
> I started looking into using xcb to generate the server-side protocol
> bindings. The first attempt is already available for preliminary review
> at http://lists.x.org/archives/xorg-devel/2010-August/011774.html.
> Unlike libxcb, which generates the source files in pure python, I've
> chosen to use a template language. I find it much easier to read,
> understand and edit.
>
> To generate the source files, I first parse the xml file and store it as
> python objects (lists, dictionaries, classes etc). Then I pass all those
> to the template which generates the source files. The template language
> I use is from http://www.makotemplates.org, but any other template
> language would work equally well. Speed is not the issue here,
> readability and portability is much more important.
>
> I will need to extend the python code and move some of the logic out of
> the templates into the python script (xcb-gen.py), things like
> ('_').join(field.type.name) should not be in the template files. Maybe
> some of that code could go into xcbgen.
>
> tom
>
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
More information about the Xcb
mailing list