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