[Xcb] XCB naming conventions technical problems

Vincent Torri vtorri at univ-evry.fr
Thu Sep 14 13:08:06 PDT 2006


i'm also hacking that stylesheet :)

> What do import.py, size.py  and type.py do? They do not seem
> to be called before the xsl processor gets called?

I don't know

> * Within the stylesheet there are a lot snippets like
> ..."XCB{$ext}Init"...
> If I transform them to
> ..."xcb_{$ext}_init"...
> and $ext is empty because it is an unqualified type the
> result will be
> "xcb__init"

It's normal, as that string is present only in extension files. I have 
solved that by changing in the extensions xml description the 
extension-name field with _render instead of Render (for the render 
extension), and use :


> * Renaming types e.g. from WINDOW to window_t can be done in
> two places: In xproto.xml or by appending "_t" in various
> places in c-clients.xsl.

definitely not in xproto.xml

i've not solved yet that problem

> When doing the former, the created functions for requests
> would e.g. look like "xcb_create_window_t_checked" which is
> not wanted. The other way, appending "_t" in the stylesheet
> is quite complicated because many places need to be
> adjusted. I tried for an hour but it still does not compile
> correctly (But maybe Josh could do it).

i'm trying that way. I have some good results, but there is some work. 
Lots of.

> After giving up (there were more problems), I did a small
> xml->c converter for a subset in python which seems to me
> simpler and better readable (although less error checking
> presently). This raises the question: would a move from xsl
> to python be viable or is python too much of a dependency?

I remember that someone (Josh, iirc) wanted to do something in python, but 
I can't remember if it was for the generation of the header / source 


More information about the Xcb mailing list