summaryrefslogtreecommitdiffstats
path: root/lib/efl/native/ecore_input.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-02-27 15:48:45 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-02-27 15:48:45 +0100
commitef44077310b4ebf8d3cb31ccb57d15b96a94c9d3 (patch)
treec2bb690ccc1be37c03f6dcdcf892fbf3e17f5067 /lib/efl/native/ecore_input.rb
parentdbb2c5713e11489dfaeb318a82785017f1794dde (diff)
parentb030c490265bb13ee98a650da419a033495042ed (diff)
downloadffi-efl-ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3.zip
ffi-efl-ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3.tar.gz
Merge branch 'wip'
Conflicts: tools/genruby.rb
Diffstat (limited to 'lib/efl/native/ecore_input.rb')
-rw-r--r--lib/efl/native/ecore_input.rb18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/efl/native/ecore_input.rb b/lib/efl/native/ecore_input.rb
index d1a81d0..ebb4289 100644
--- a/lib/efl/native/ecore_input.rb
+++ b/lib/efl/native/ecore_input.rb
@@ -1,18 +1,17 @@
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-
#
-require 'efl/ffi'
+require 'efl/native'
#
module Efl
#
module EcoreInput
#
- FCT_PREFIX = 'ecore_event_'
+ FCT_PREFIX = 'ecore_event_' 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, &block; 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
@@ -31,7 +30,7 @@ module Efl
#
# TYPEDEFS
# typedef uintptr_t Ecore_Window;
- typedef :uintptr_t, :ecore_window
+ typedef :pointer, :ecore_window
# typedef struct _Ecore_Event_Key Ecore_Event_Key;
typedef :pointer, :ecore_event_key
# typedef struct _Ecore_Event_Mouse_Button Ecore_Event_Mouse_Button;
@@ -44,9 +43,6 @@ module Efl
typedef :pointer, :ecore_event_mouse_io
# typedef struct _Ecore_Event_Modifiers Ecore_Event_Modifiers;
typedef :pointer, :ecore_event_modifiers
- typedef :pointer, :ecore_event_modifiers_p
- #
- # CALLBACKS
#
# VARIABLES
# EAPI extern int ECORE_EVENT_KEY_DOWN;
@@ -75,7 +71,7 @@ module Efl
# EAPI unsigned int ecore_event_modifier_mask(Ecore_Event_Modifier modifier);
[ :ecore_event_modifier_mask, [ :ecore_event_modifier ], :uint ],
# EAPI Ecore_Event_Modifier ecore_event_update_modifier(const char *key, Ecore_Event_Modifiers *modifiers, int inc);
- [ :ecore_event_update_modifier, [ :string, :ecore_event_modifiers_p, :int ], :ecore_event_modifier ],
+ [ :ecore_event_update_modifier, [ :string, :ecore_event_modifiers, :int ], :ecore_event_modifier ],
]
#
attach_fcts fcts