summaryrefslogtreecommitdiffstats
path: root/lib/efl/native/eina.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/efl/native/eina.rb')
-rw-r--r--lib/efl/native/eina.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/efl/native/eina.rb b/lib/efl/native/eina.rb
index c28ae3d..a971e34 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
@@ -26,13 +25,12 @@ module Efl
# 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, :pointer
#
# FUNCTIONS
fcts = [