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