Ruby-EFL

In summer 2004 I started to write Ruby bindings for the EFL.

My aim is to bring rubyists the power to write Edje-enabled applications, i.e. I will focus on ecore, edje and esmart. The complete evas API will be implemented later, as you often only need a small subset of the library in Edje apps.

Status

  • ruby-evas: so-so. The main API is in a good shape. Support for image objects is still lacking some important bits.
  • ruby-edje: almost complete! :) Message queue stuff is about 50% done :)
  • ruby-ecore: good. con-, ipc- and config-modules not supported though
  • ruby-esmart: almost complete (well, easy enough, since it's not a very large API)

Documentation

HTML documentation is now available at http://docs.code-monkey.de/.

Get the code now

git clone git://code-monkey.de/ruby-evas
git clone git://code-monkey.de/ruby-edje
git clone git://code-monkey.de/ruby-ecore
git clone git://code-monkey.de/ruby-esmart

The docs are still lacking examples, so here's a script that shows off some of the API :)

#!/usr/bin/ruby

require "ecore"
require "ecore_x"
require "evas"
require "ecore_evas"
require "edje"

ee = Ecore::Evas::SoftwareX11.new
ee.title = "ruby-evas/edje/ecore \o/"

ee.borderless = true
ee.shaped = true

edje = Edje::Edje.new(ee.evas)
edje.load("/home/tilman/.e/apps/euphoria/themes/winter.eet", "euphoria")

edje.on_signal("PLAY", "*") do |signal, src|
    puts "got signal #{signal} on #{src}"
end

edje.on_signal("QUIT", "*") do
    Ecore::main_loop_quit
end

w, h = edje.get_size_max
ee.set_size_max(w, h)

w, h = edje.get_size_min
ee.set_size_min(w, h)

edje.resize(w, h)
ee.resize(w, h)

edje.show
ee.show

Ecore::main_loop_begin