Forum: Ruby-Gnome 2 Bindings generation tool?

986d656731e8d7d8a2c9d5fb2ab35305?d=identicon&s=25 Daniel Fort (tetraedr)
on 2010-07-25 20:40
(Received via mailing list)
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 :(

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.
3807680355002d0d5e8314a97333587e?d=identicon&s=25 Nikolai Weibull (Guest)
on 2010-08-09 19:26
(Received via mailing list)
On Sun, Jul 25, 2010 at 20:39, naquad <naquad@gmail.com> 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
http://p.sf.net/sfu/RIM-dev2dev
C838db9af1d90a87a828ecad8556b804?d=identicon&s=25 Guillaume Cottenceau (Guest)
on 2010-08-16 14:56
(Received via mailing list)
On Mon, Aug 9, 2010 at 7:25 PM, Nikolai Weibull <now@bitwi.se> wrote:
> On Sun, Jul 25, 2010 at 20:39, naquad <naquad@gmail.com> 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 :/

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

--
Guillaume Cottenceau - http://zarb.org/~gc/

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
8f6b8e99f52f0928287b01a006950f52?d=identicon&s=25 Matijs van Zuijlen (mvz)
on 2010-12-30 10:31
Guillaume Cottenceau 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 :/
>
> http://live.gnome.org/GObjectIntrospection
> 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:
   https://github.com/mvz/ruby-gir-ffi

Port of green shoes:
   https://github.com/mvz/green_shoes/tree/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.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.