diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-27 15:48:45 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-27 15:48:45 +0100 |
commit | ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3 (patch) | |
tree | c2bb690ccc1be37c03f6dcdcf892fbf3e17f5067 /lib/efl/native/eina.rb | |
parent | dbb2c5713e11489dfaeb318a82785017f1794dde (diff) | |
parent | b030c490265bb13ee98a650da419a033495042ed (diff) | |
download | ffi-efl-ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3.zip ffi-efl-ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3.tar.gz |
Merge branch 'wip'
Conflicts:
tools/genruby.rb
Diffstat (limited to 'lib/efl/native/eina.rb')
-rw-r--r-- | lib/efl/native/eina.rb | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/efl/native/eina.rb b/lib/efl/native/eina.rb index c28ae3d..cd014e9 100644 --- a/lib/efl/native/eina.rb +++ b/lib/efl/native/eina.rb @@ -1,18 +1,17 @@ #! /usr/bin/env ruby # -*- coding: UTF-8 -*- # -require 'efl/ffi' +require 'efl/native' # module Efl # module Eina # - FCT_PREFIX = 'eina_' + FCT_PREFIX = 'eina_' unless const_defined? :FCT_PREFIX # - def self.method_missing m, *args, &block - sym, args_s = ModuleHelper.find_function m, FCT_PREFIX - self.module_eval "def self.#{m} *args, █ r=Efl::Native.#{sym}(#{args_s}); yield r if block_given?; r; end" - self.send m, *args, &block + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block end # end @@ -21,18 +20,13 @@ module Efl # ffi_lib 'eina' # - # ENUMS - # # TYPEDEFS # typedef struct _Eina_Version Eina_Version; typedef :pointer, :eina_version - typedef :pointer, :eina_version_p - # - # CALLBACKS # # VARIABLES # EAPI extern Eina_Version *eina_version; - attach_variable :eina_version, :eina_version_p + attach_variable :eina_version, :eina_version # # FUNCTIONS fcts = [ @@ -45,7 +39,7 @@ module Efl # EAPI int eina_threads_shutdown(void); [ :eina_threads_shutdown, [ ], :int ], # EAPI Eina_Bool eina_main_loop_is(void); - [ :eina_main_loop_is, [ ], :eina_bool ], + [ :eina_main_loop_is, [ ], :bool ], # EAPI void eina_main_loop_define(void); [ :eina_main_loop_define, [ ], :void ], ] |