[Kde-bindings] first step of QT4 binding for Perl5

Dongxu Ma dongxu.ma at gmail.com
Tue Jan 30 03:22:48 UTC 2007


Hi All,

some information. I wrote a tool to extract all proto/typedef/enum/class
from all QT cpp headers.
Yesterday it passed all files in v 4.2.2 release.
This is the first step I am thinking about to make a new PerlQT binding.
the procedue in my mind is:
1) grab all required information directly from cpp headers and store them as
YAML format as per
file basis;
2) define an interface policy to determine which one to export and which one
not; or possibly arrange
    an abstract API layer to wrap some interface changes;
3) manally write a typedef for all involved type/class(s);
4) generate stubs;
5) compile and link.

the idea is still rough. At this moment, I would like to discuss with you
all, try to get other ideas.

just check out from https://dongxu.googlecode.com/svn/trunk/PerlQT
The grammar is based on a famous parse module in Perl world -
Parse::RecDescent. Differred
from a formal compiler, it behaves a little bit fuzzy. Hope it works on
other release, since
I am not very sure I've got all QT-specific macros.

instructions:
$make gen_parse
and coffee, it will walk through nearly over 700 files

notes:
1) currently there is no proper parse result, I just print debug info into
each YAML file,
   just check the content in each of them;
2) unfortunately it only works on linux, GNU make and perl are required;

todos:
  pls pls feel free to give your idea/opinion on this tool, I do need some
other things.

-- 
Cheers, Dongxu
__END__
http://search.cpan.org/~dongxu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20070130/abc68cd2/attachment.html>


More information about the Kde-bindings mailing list