Bindings generation tool?

Hello.

I’ve been examining ruby-gtk2 C sources and it very looks like they
were generated with some kind of code generation tool.
True/False?

The reason why I’m asking about this is that I need Scintilla text
editing widget, but I can’t find any existing bindings :frowning:

Also a bit off-topic question: I’ve got a program with embedded ruby
interpreter and a some ruby classes/functions/etc…
the question is: how do I pass C’s GtkWidget object to Ruby as
instance one of the ruby-gtk2 wrapper classes?

Thank you.

On Sun, Jul 25, 2010 at 20:39, naquad [email protected] wrote:

I’ve been examining ruby-gtk2 C sources and it very looks like they
were generated with some kind of code generation tool.
True/False?

False.


This SF.net email is sponsored by

Make an app they can’t live without
Enter the BlackBerry Developer Challenge

On Mon, Aug 9, 2010 at 7:25 PM, Nikolai W. [email protected] wrote:

On Sun, Jul 25, 2010 at 20:39, naquad [email protected] wrote:

I’ve been examining ruby-gtk2 C sources and it very looks like they
were generated with some kind of code generation tool.
True/False?

False.

It’s possible they’ve been partially generated with. I for myself
remember I wrote a small script converting GTK+ C headers to a Ruby
skeleton source. I used it to add some missing stuff for GTK+ 2.6 and
later. Then I manually tweaked the generated if necessary. But that
kind of thing produces probably source that looks like it was
generated.

PS: the future of gobject-based bindings is dynamic bindings; too bad
noone has enough time to do it for ruby :confused:

http://live.gnome.org/GObjectIntrospection
http://wiki.github.com/mvz/ruby-gir-ffi/


Guillaume C. - Guillaume Cottenceau


This SF.net email is sponsored by

Make an app they can’t live without
Enter the BlackBerry Developer Challenge

Guillaume C. wrote in post #933331:

PS: the future of gobject-based bindings is dynamic bindings; too bad
noone has enough time to do it for ruby :confused:

Projects/GObjectIntrospection - GNOME Wiki!
http://wiki.github.com/mvz/ruby-gir-ffi/

Hello,

My little ruby-gir-ffi project is steadily progressing, nearing version
0.0.5. The resulting bindings are a lot more like C than the existing
ruby-gtk2, and you need to cast to and from GValues by hand a lot, but
you can create simple working Gtk+ applications.

The gem is called gir_ffi, by the way. It uses ffi to call the c
libraries.

The source:
GitHub - mvz/gir_ffi: Auto-generate bindings for GObject based libraries at run time using FFI

Port of green shoes:
GitHub - mvz/green_shoes at gir_ffi

Port of a more classic Gtk+ application:
https://github.com/mvz/pinhole/tree/gir_ffi

There may be crashes, there may be core dumps. Comments, questions and
suggestions welcome.

Regards,
Matijs.