1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
ffi-efl
by Jérémy Zurcher
http://asynk.ch
== DESCRIPTION:
A ruby-ffi binding to efl libraries (Enlightenment Foundation Libraries).
== FEATURES/PROBLEMS:
* Not 1.8 compatible yet !!!
== 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.label_set "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:
* the spec/ and test/ folders
== REQUIREMENTS:
* You need a sane enlightenment foundation libraries installation,
for this you might like to use easy_e17.sh[http://omicron.homeip.net/projects/#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:
* https://github.com/jeremyz/ffi-efl
* http://cgit.asynk.ch/cgi-bin/cgit/ffi-efl/
* https://gitorious.org/ffi-efl
Gem:
* https://rubygems.org/gems/ffi-efl
== CREDITS:
Special thanks to:
* Lionel Orry
== LICENSE:
See MIT-LICENSE file.
|