diff options
-rw-r--r-- | lib/efl/ffi.rb | 109 | ||||
-rw-r--r-- | lib/efl/native/ecore.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/ecore_evas.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/ecore_getopt.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/ecore_input.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/edje.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/eet.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/eina.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/eina_hash.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/eina_list.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/eina_log.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/eina_types.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/elementary.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/emap.rb | 2 | ||||
-rw-r--r-- | lib/efl/native/evas.rb | 2 | ||||
-rwxr-xr-x | tools/genruby.rb | 2 |
16 files changed, 47 insertions, 92 deletions
diff --git a/lib/efl/ffi.rb b/lib/efl/ffi.rb index 6aff583..422f173 100644 --- a/lib/efl/ffi.rb +++ b/lib/efl/ffi.rb @@ -6,21 +6,45 @@ require 'ffi' module Efl # module Native - class VersionStruct < FFI::Struct - layout :major, :int, - :minor, :int, - :micro, :int, - :revision, :int - - def full - [:major,:minor,:micro,:revision].collect { |e| self[e].to_s }.join '.' - end - end - end - # - module FFIHelper # - def attach_fcts fcts + extend FFI::Library + # + typedef :pointer, :char_p + typedef :pointer, :short_p + typedef :pointer, :int_p + typedef :pointer, :long_p + typedef :pointer, :float_p + typedef :pointer, :double_p + typedef :pointer, :uchar_p + typedef :pointer, :ushort_p + typedef :pointer, :uint_p + typedef :pointer, :ulong_p + typedef :pointer, :ufloat_p + typedef :pointer, :udouble_p + typedef :pointer, :void_p + typedef :pointer, :string_array + typedef :pointer, :string_array_p + typedef :uint_p, :uintptr_t + # + typedef :bool, :eina_bool + typedef :pointer, :eina_bool_p + typedef :pointer, :eina_list_p + typedef :pointer, :eina_hash_p + typedef :pointer, :eina_iterator_p + typedef :pointer, :eina_accessor_p + typedef :pointer, :evas_p + typedef :pointer, :evas_object_p + typedef :pointer, :evas_object_pp + typedef :pointer, :evas_gl_api_p + typedef :pointer, :ecore_getopt_p + typedef :pointer, :ecore_getopt_desc_p + typedef :pointer, :ecore_getopt_value_p + # + callback :eina_compare_cb, [ :void_p, :void_p ], :int + callback :eina_each_cb, [ :void_p, :void_p, :void_p ], :eina_bool + callback :eina_free_cb, [ :void_p ], :void + # + def self.attach_fcts fcts fcts.each do |func| begin attach_function(*func) @@ -30,55 +54,16 @@ module Efl end end # - def ffi_typedefs - @ffi_typedefs - end - # - def steal_ffitype mod, sym - typedef mod.ffi_typedefs[sym], sym - end - # - def self.extended mod - # - mod.extend FFI::Library - # - mod.typedef :pointer, :char_p - mod.typedef :pointer, :short_p - mod.typedef :pointer, :int_p - mod.typedef :pointer, :long_p - mod.typedef :pointer, :float_p - mod.typedef :pointer, :double_p - mod.typedef :pointer, :uchar_p - mod.typedef :pointer, :ushort_p - mod.typedef :pointer, :uint_p - mod.typedef :pointer, :ulong_p - mod.typedef :pointer, :ufloat_p - mod.typedef :pointer, :udouble_p - mod.typedef :pointer, :void_p - mod.typedef :pointer, :string_array - mod.typedef :pointer, :string_array_p - mod.typedef :uint_p, :uintptr_t - # - mod.typedef :bool, :eina_bool - mod.typedef :pointer, :eina_bool_p - mod.typedef :pointer, :eina_list_p - mod.typedef :pointer, :eina_hash_p - mod.typedef :pointer, :eina_iterator_p - mod.typedef :pointer, :eina_accessor_p - mod.typedef :pointer, :evas_p - mod.typedef :pointer, :evas_object_p - mod.typedef :pointer, :evas_object_pp - mod.typedef :pointer, :evas_gl_api_p - mod.typedef :pointer, :ecore_getopt_p - mod.typedef :pointer, :ecore_getopt_desc_p - mod.typedef :pointer, :ecore_getopt_value_p - # - mod.callback :eina_compare_cb, [ :void_p, :void_p ], :int - mod.callback :eina_each_cb, [ :void_p, :void_p, :void_p ], :eina_bool - mod.callback :eina_free_cb, [ :void_p ], :void - # + class VersionStruct < FFI::Struct + layout :major, :int, + :minor, :int, + :micro, :int, + :revision, :int + + def full + [:major,:minor,:micro,:revision].collect { |e| self[e].to_s }.join '.' + end end - # end # module ModuleHelper diff --git a/lib/efl/native/ecore.rb b/lib/efl/native/ecore.rb index c3ea8f2..bec6fdc 100644 --- a/lib/efl/native/ecore.rb +++ b/lib/efl/native/ecore.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'ecore' # # ENUMS diff --git a/lib/efl/native/ecore_evas.rb b/lib/efl/native/ecore_evas.rb index 3015ba6..3a6f356 100644 --- a/lib/efl/native/ecore_evas.rb +++ b/lib/efl/native/ecore_evas.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'ecore_evas' # # ENUMS diff --git a/lib/efl/native/ecore_getopt.rb b/lib/efl/native/ecore_getopt.rb index ddce66b..f84e15b 100644 --- a/lib/efl/native/ecore_getopt.rb +++ b/lib/efl/native/ecore_getopt.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'ecore' # # ENUMS diff --git a/lib/efl/native/ecore_input.rb b/lib/efl/native/ecore_input.rb index 88df1e1..d1a81d0 100644 --- a/lib/efl/native/ecore_input.rb +++ b/lib/efl/native/ecore_input.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'ecore_input' # # ENUMS diff --git a/lib/efl/native/edje.rb b/lib/efl/native/edje.rb index 16487c7..b198dbe 100644 --- a/lib/efl/native/edje.rb +++ b/lib/efl/native/edje.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'edje' # # ENUMS diff --git a/lib/efl/native/eet.rb b/lib/efl/native/eet.rb index 1cef096..7840406 100644 --- a/lib/efl/native/eet.rb +++ b/lib/efl/native/eet.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'eet' # # ENUMS diff --git a/lib/efl/native/eina.rb b/lib/efl/native/eina.rb index 70015b6..c28ae3d 100644 --- a/lib/efl/native/eina.rb +++ b/lib/efl/native/eina.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'eina' # # ENUMS diff --git a/lib/efl/native/eina_hash.rb b/lib/efl/native/eina_hash.rb index 95a1cca..b2c4386 100644 --- a/lib/efl/native/eina_hash.rb +++ b/lib/efl/native/eina_hash.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'eina' # # ENUMS diff --git a/lib/efl/native/eina_list.rb b/lib/efl/native/eina_list.rb index b24bce9..35a179a 100644 --- a/lib/efl/native/eina_list.rb +++ b/lib/efl/native/eina_list.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'eina' # # ENUMS diff --git a/lib/efl/native/eina_log.rb b/lib/efl/native/eina_log.rb index 1aabb3c..0aab2ec 100644 --- a/lib/efl/native/eina_log.rb +++ b/lib/efl/native/eina_log.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'eina' # # ENUMS diff --git a/lib/efl/native/eina_types.rb b/lib/efl/native/eina_types.rb index e23b0a4..16e3b48 100644 --- a/lib/efl/native/eina_types.rb +++ b/lib/efl/native/eina_types.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'eina' # # ENUMS diff --git a/lib/efl/native/elementary.rb b/lib/efl/native/elementary.rb index 2940033..699592d 100644 --- a/lib/efl/native/elementary.rb +++ b/lib/efl/native/elementary.rb @@ -20,8 +20,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'libelementary-ver-pre-svn-09.so.0' # # ENUMS diff --git a/lib/efl/native/emap.rb b/lib/efl/native/emap.rb index 7bad804..6fb4fdb 100644 --- a/lib/efl/native/emap.rb +++ b/lib/efl/native/emap.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'emap' # # ENUMS diff --git a/lib/efl/native/evas.rb b/lib/efl/native/evas.rb index d713bde..d7d99cc 100644 --- a/lib/efl/native/evas.rb +++ b/lib/efl/native/evas.rb @@ -19,8 +19,6 @@ module Efl # module Native # - extend Efl::FFIHelper - # ffi_lib 'evas' # # ENUMS diff --git a/tools/genruby.rb b/tools/genruby.rb index 4f1396f..fe8e90f 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -50,8 +50,6 @@ module Efl end # module Native - # - extend Efl::FFIHelper EOF FOOTER =<<-EOF end |