diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-12 21:23:29 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-12 21:23:29 +0200 |
commit | 3a2eecb5bcf35120fcf3a9dcf1637459c99a6abe (patch) | |
tree | 591d46a4a6f0bcfbc200e9c4a92508ee26974eb8 /lib/e17/eina.rb | |
parent | 131839bfb26fadebc32ce86c10784e2ca2647bbc (diff) | |
download | ffi-efl-3a2eecb5bcf35120fcf3a9dcf1637459c99a6abe.zip ffi-efl-3a2eecb5bcf35120fcf3a9dcf1637459c99a6abe.tar.gz |
rename to ffi-e17
Diffstat (limited to 'lib/e17/eina.rb')
-rw-r--r-- | lib/e17/eina.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/e17/eina.rb b/lib/e17/eina.rb new file mode 100644 index 0000000..bdb3522 --- /dev/null +++ b/lib/e17/eina.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'ffi' +# +module E17 + module EINA + # + extend FFI::Library + # + ffi_lib 'eina' + [ + [ :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 + # + class << self + alias init eina_init + alias shutdown eina_shutdown + end + # + end +end +# +# EOF |