ffi-efl

by Jérémy Zurcher
http://asynk.ch

DESCRIPTION:

A ruby-ffi binding to efl libraries (Enlightenment Foundation Libraries).

FEATURES/PROBLEMS:

  • pretty young project …

SYNOPSIS:

require 'efl/elementary'

Efl::Elm.init

on_exit = Proc.new do |data, evas_object, event_info|
    puts "EXIT #{data.read_string}"
    Efl::Elm.exit
end

win = Efl::Elm::ElmWin.new nil, "Window name" do |w|
    w.title = "My title"
    w.alpha = true
    w.move 300, 300
    w.resize 200, 100
    bg = Efl::Elm::ElmBg.new w  do |bg|
        bg.size_hint_weight_expand
        bg.size_hint_align_fill
        bg.evas_object_color_set 200,255,100,150
        bg.show
    end
    w.resize_object_add bg
    lb = Efl::Elm::ElmLabel.new w do |lb|
        lb.text = "Hello World!"
        lb.size_hint_weight_set 1.0, 1.0
    end
    lb.show
    w.resize_object_add lb
    w.smart_callback_add "delete,request", on_exit, FFI::MemoryPointer.from_string("my data")
end

win.show

Efl::Elm.run
Efl::Elm.shutdown

For more examples you may look at:

REQUIREMENTS:

  • You need a sane enlightenment foundation libraries installation, for this you might like to use easy_e17.sh.

DOWNLOAD/INSTALL:

From rubygems:

[sudo] gem install ffi-efl

or from the git repository on github:

git clone git://github.com/jeremyz/ffi-efl.git
cd ffi-efl
rake gem:install

RESOURCES:

You can find this project in a few places:

Online repositories:

Gem:

CREDITS:

Special thanks to:

  • Lionel Orry

LICENSE:

See MIT-LICENSE file.