[Xcb] bind from XML (was: Objective-C binding)

Florent Monnier fmonnier at linux-nantes.fr.eu.org
Sat May 13 12:12:23 PDT 2006


Hi Jamey,

> > I have seen that everything in the XML files is made for the C language
> > since every key words are C ones (enum, union, ...) and I really don't
> > care of it.
>
> Things are named after C keywords, yes, but that doesn't make them
> C-specific. We've tried to keep their semantics language-independent.

That's sounds very nice :-)

> > I really don't care if the key-words are something or something else.
>
> Yes, I don't care either. I was joking about that.

oops, OK! I understand

> > > <field name="child">
> > >   <type>WINDOW</type>
> > >   <const>0</type>
> > > </field>
> >
> > s/const/type/ ?
>
> Of course I meant to write <const>0</const>. 0 isn't a type, it's a
> value. (I'd accept <value>0</value>, for example.)

ok, so it was  s/type/const/

[...]
> In this case, 0 is drawn from the WINDOW type, really. That's why I
> claim the current description is sufficient for OCaml and other
> languages: the WINDOW type needs to contain 0 as well as all the other
> 29-bit unsigned integers anyway. That's what I was trying to say about
> being "able to lift an integer into a WINDOW".
[...]
> The X protocol has no pointers. I wrote 0 because for the case you
> brought up, an integer 0 appears on the wire. You may have been mislead
> by the protocol authors using the name "None" for this 0 value.

Thanks a lot for explaining me this.
Indeed I had mis-understood this point.

> > (IMHO attributes are often more easy to parse than PCData,
> > it's only a personal point of view, maybe not shared with other peoples.)
>
> I see your point regarding SAX.
<my_life>
Before to use OCaml, I had first learned PHP where indeed I was using the 
expat binding which is SAX. But in OCaml I'm not using the expat binding but 
the DOM parser written by Nicolas Cannasse.
IMHO, from my own point of view, attrs are more easy than pcdata when parsing 
à la COM too.
</my_life>

I don't know what is the preference of the majority of the peoples.


-- Regards
florent


More information about the Xcb mailing list