[Kde-bindings] clib test app not working...

Ashley Winters jahqueel at yahoo.com
Wed Mar 24 17:36:39 UTC 2004


--- Richard Dale <Richard_Dale at tipitina.demon.co.uk> wrote:
> > Would it be possible to build new, better C bindings automatically
> > with kalyptus ?
> Yes it wouldn't be very difficult to generate ones which didn't need
> manual 
> edits. Ashley has suggested a library api called 'Mirror' for
> languages which 
> are too static to use Smoke.

You've effectively killed Mirror with your proxy bindings.

> I've personally got no ethusiasm for C
> bindings 
> at all though. No one actually wants to do GUI programming in C, they
> are 
> only for implementing bindings for other languages. And Smoke does
> that so 
> much better that I can't see the point.

This is very true... anyone who genuinely wants to use C for GUI
programming is going to be offended by even our best efforts to
/generate/ a usable Qt interface in it.

Everyone else wants C bindings for P/Invoke or JNI style function
calling. Since most languages are going out of their way to implement
transparent RPC mechanisms, we can just hijack those for Smoke
interfaces.

Here is the Smoke framework in a nutshell:

1. API parser (kalyptus currently, gcc in smoke v2)
2. Code generator (CxxToSmoke in kalyptus, RDF analyzer in smoke v2)
3. Runtime library (the "yacc output" Richard referred to earlier)

The runtime portion of Smoke is quite good, and I would put it up
against anyone else's language bindings. The glue portion of the
runtime needs work, since we want to have separate runtime libs for Qt
and KDE. The specific (cryptic) implementations of 1 and 2 could easily
be changed and improved without changing the runtime interface.

I'm hoping to make the code-generator easy to customize using XML
information in smoke v2. That way, we could distribute a definitive
Qt/KDE API. For example:

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:C="http://rdf.kde.org/lang/C++/">

  <rdf:Description 
   rdf:about="http://rdf.kde.org/lib/qt/3.3/kernel#
              QPainter::drawCubicBezier(const+QPointArray&,+int)"
   C:PPifndef="QT_NO_BEZIER">

</rdf:RDF>

That would modify the generated code to automatically #ifndef the
binding code for QPainter::drawCubicBezier. An entire file of such
customizations would be possible, thereby allowing distribution of
pre-generated code customized to a specific release of Qt/KDE, but
still allowing for variations in the base compile options.

Ashley Winters

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html



More information about the Kde-bindings mailing list