diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-09 00:06:09 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-09 00:06:09 +0200 |
commit | 1070788ba72c54e3a48d27339367a8e597402b3a (patch) | |
tree | c5f12c7e6b8f4506bb290431e17221fa3a3054fa /lib | |
parent | 6aa471a79c90ed74541037d337b2ed6bb201beb4 (diff) | |
download | ffi-efl-1070788ba72c54e3a48d27339367a8e597402b3a.zip ffi-efl-1070788ba72c54e3a48d27339367a8e597402b3a.tar.gz |
add edje
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efl/edje.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/efl/edje.rb b/lib/efl/edje.rb new file mode 100644 index 0000000..ba00725 --- /dev/null +++ b/lib/efl/edje.rb @@ -0,0 +1,38 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'ffi' +# +module EFL + module EDJE + # + MAJOR = 0 + MINOR = 0 + REVISION = 1 + VERSION = [MAJOR,MINOR,REVISION].join '.' + # + extend FFI::Library + # + ffi_lib 'edje' + functions = [ + [ :edje_init, [ ], :int ], + [ :edje_shutdown, [], :int ], + ].each do |func| + begin + attach_function *func + rescue Object => e + puts "Could not attach #{func} #{e.message}" + end + end + # + def self.init + edje_init + end + # + def self.shutdown + edje_shutdown + end + # + end +end +# |