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
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?
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
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.