Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

GTK+ to Gt Automagic Conversion

e8johan (605347) writes | more than 11 years ago

User Journal 0

I've been working on a script to automagically wrap the GTK+ classes into a C++ suite. First I started with the GTK+ header files, but they do not provide all the info, so now I'm going after the html documentation.

I've got a small bash script to find the interesting files, then, for each such file, a Perl scrict is called. This perlscript is supposed to find all properties, events, relations, methods, etc. and simply output a class header and an implementation.I've been working on a script to automagically wrap the GTK+ classes into a C++ suite. First I started with the GTK+ header files, but they do not provide all the info, so now I'm going after the html documentation.

I've got a small bash script to find the interesting files, then, for each such file, a Perl scrict is called. This perlscript is supposed to find all properties, events, relations, methods, etc. and simply output a class header and an implementation.

With my current version I find all the info that I need, but I only present it as a table. The next step will be to exchange the backend with a C++ code generator and hopefully, simply compile away. I know that their might be some fuzz with the GWidget base class, but doing 1 class out of 120 is pretty good, compared to that I actually concidered doing it all by hand.

I would like to thank Larry Wall and everyone else who has made Perl such a nice and powerful language!

cancel ×

0 comments

Sorry! There are no comments related to the filter you selected.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?