Skip to content
Ruby-FFI bindings for GObjectIntrospectionRepository
Ruby Shell
Find file
Pull request Compare This branch is 2572 commits behind mvz:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples
lib
tasks
test
.autotest
.bnsignore
.gitignore
COPYING.LIB
DESIGN.rdoc
Gemfile
History.txt
README.rdoc
Rakefile
TODO.rdoc
gir_ffi.gemspec
gir_ffi.watchr

README.rdoc

GirFFI

by Matijs van Zuijlen

www.github.com/mvz/ruby-gir-ffi

Description

Ruby-FFI-based binding of the GObject Introspection Repository

Features/Problems

  • Create bindings to GObject-based libraries at runtime

  • Not done yet

Synopsis

require 'gir_ffi'

GirFFI.setup :Gtk
Gtk.init
win = Gtk::Window.new :toplevel

Requirements

  • Ruby-FFI of course

  • gobject-introspection installed with some introspection data

  • The `rr` and `shoulda` gems for testing.

The current implementation needs the actual libraries to be available under the name ending in just `.so`. On Debian and Ubuntu at least, this means you have to install the -dev packages of any library you may want to access. The following set of packages should do the trick: `libgirepository1.0-dev` (at least version 0.10), and either `gir1.2-gtk-3.0` and `libgtk-3-dev`, or `gir1.2-gtk-2.0` and `libgtk2.0-dev`.

Hacking

This is still very much a work in progress. You can start exploring by running the example programs in the examples/ folder. Some illustrate what works, some are a test bed for how things should work. Have a look at `rake -T`. Feel free to file bugs or send pull requests.

Install

  • sudo gem install gir_ffi

License

Copyright © 2009–2011 Matijs van Zuijlen

GirFFI is free software, distributed under the terms of the GNU Lesser General Public License, version 2.1 or later. See the file COPYING.LIB for more information.

Something went wrong with that request. Please try again.