开发者

Ruby bindings for GTK+ 3?

I’ve spent some time learning Ruby, and I wanted to move over to some GUI programming. GNOME 3 is the environment mos开发者_JS百科t appealing to me at the moment, so I thought I would have a look at GTK+ 3. However, the GTK+ 3 documentation’s Getting Started examples in C were quite off-putting. Are there less scary Ruby bindings (and Hello World examples) available?

Edit: The GTK+ Language Bindings overview does not leave much room for hope.


After a quick chat on #ruby on freenode I learned that there are bindings for GTK+ 3 that are actively developmented:

https://github.com/mvz/ruby-gir-ffi

The project is still young. I'm looking forward to diving in and seeing what I can do too. Here's an introduction by the author: http://www.matijs.net/blog/2011/05/10/girffi-an-introduction


Right now there are gtk3 bindings. In fact there is a rubygem for gtk3. Just do:

$gem install gtk3


Ruby-GNOME2

Supports GTK+ 3 from version 1.2, released in January 2013.


Currently the Ruby Gnome project is only on GTK 2 but work has begun on GTK3 bindings. Take a look at this post on the Ruby Gnome2 forum: http://www.ruby-forum.com/topic/2715042#new (5th one down).

The project website has plenty of tutorials: http://ruby-gnome2.sourceforge.jp/

Installing it is pretty simple on Ubuntu:

sudo apt-get install libgtk2.0-dev
gem install gtk2

I'd start with this and move to GTK3 when there are stable bindings.

Ruby GIR bindings is interesting and I'll be keeping an eye on this but I don't think it'll be as simple to use as Ruby Gnome 2.


I don't know the situation around GNOME 3, sorry. But I do know the situation around KDE and QtRuby. Next stable release of KDE (in July) will contain updated version of QtRuby (it's in active development for now). You could try to start from now, but as for me, well, I'm waiting for the new version because of lack of some features, that I personally need.

There are some helpful IRC channels at Freenode, where you can ask for help: #qtruby, #kde-ruby, #kde-bindings.


Right now the main ruby-gnome project has no GTK 3 bindings.

The problem is lack of manpower.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜