summaryrefslogtreecommitdiffstats
path: root/lib/efl/native/ecore_input.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-05-05 00:13:06 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-05-05 00:13:06 +0200
commitf3d11962e77d25d19a312b4baa1a390539b2187b (patch)
treed7a3842583a0607cba272a85b210f5947ed9ec57 /lib/efl/native/ecore_input.rb
parente4baccaefd209a25daa3ff8d5277fe86aca1d379 (diff)
downloadffi-efl-f3d11962e77d25d19a312b4baa1a390539b2187b.zip
ffi-efl-f3d11962e77d25d19a312b4baa1a390539b2187b.tar.gz
all FFI into one module Efl::Native
Diffstat (limited to 'lib/efl/native/ecore_input.rb')
-rw-r--r--lib/efl/native/ecore_input.rb133
1 files changed, 67 insertions, 66 deletions
diff --git a/lib/efl/native/ecore_input.rb b/lib/efl/native/ecore_input.rb
index d14409e..e06ed2f 100644
--- a/lib/efl/native/ecore_input.rb
+++ b/lib/efl/native/ecore_input.rb
@@ -9,75 +9,76 @@ module Efl
#
def self.method_missing m, *args, &block
sym = 'ecore_event_'+m.to_s
- raise NameError.new "#{self.name}.#{sym} (#{m})" if not Efl::EcoreInput::Native.respond_to? sym
- self.module_eval "def self.#{m} *args, &block; r=Efl::EcoreInput::Native.#{sym}(*args); yield r if block_given?; r; end"
+ raise NameError.new "#{self.name}.#{sym} (#{m})" if not Efl::Native.respond_to? sym
+ self.module_eval "def self.#{m} *args, &block; r=Efl::Native.#{sym}(*args); yield r if block_given?; r; end"
self.send m, *args, &block
end
#
- module Native
- #
- extend Efl::FFIHelper
- #
- ffi_lib 'ecore_input'
- #
- # ENUMS
- # typedef enum _Ecore_Event_Modifier {...} Ecore_Event_Modifier;
- enum :ecore_event_modifier, [ :ecore_none, :ecore_shift, :ecore_ctrl, :ecore_alt, :ecore_win, :ecore_scroll, :ecore_caps, :ecore_last ]
- # typedef enum _Ecore_Event_Press {...} Ecore_Event_Press;
- enum :ecore_event_press, [ :ecore_down, :ecore_up ]
- # typedef enum _Ecore_Event_IO {...} Ecore_Event_IO;
- enum :ecore_event_io, [ :ecore_in, :ecore_out ]
- #
- # TYPEDEFS
- # typedef uintptr_t Ecore_Window;
- typedef :uintptr_t, :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;
- typedef :pointer, :ecore_event_mouse_button
- # typedef struct _Ecore_Event_Mouse_Wheel Ecore_Event_Mouse_Wheel;
- typedef :pointer, :ecore_event_mouse_wheel
- # typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move;
- typedef :pointer, :ecore_event_mouse_move
- # typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO;
- 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
- #
- # FUNCTIONS
- fcts = [
- # EAPI extern int ECORE_EVENT_KEY_DOWN;
- # FIXME
- # EAPI extern int ECORE_EVENT_KEY_UP;
- # FIXME
- # EAPI extern int ECORE_EVENT_MOUSE_BUTTON_DOWN;
- # FIXME
- # EAPI extern int ECORE_EVENT_MOUSE_BUTTON_UP;
- # FIXME
- # EAPI extern int ECORE_EVENT_MOUSE_MOVE;
- # FIXME
- # EAPI extern int ECORE_EVENT_MOUSE_WHEEL;
- # FIXME
- # EAPI extern int ECORE_EVENT_MOUSE_IN;
- # FIXME
- # EAPI extern int ECORE_EVENT_MOUSE_OUT;
- # FIXME
- # EAPI int ecore_event_init(void);
- [ :ecore_event_init, [ ], :int ],
- # EAPI int ecore_event_shutdown(void);
- [ :ecore_event_shutdown, [ ], :int ],
- # 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 ],
- ]
- #
- attach_fcts fcts
- #
- end
+ end
+ #
+ module Native
+ #
+ extend Efl::FFIHelper
+ #
+ ffi_lib 'ecore_input'
+ #
+ # ENUMS
+ # typedef enum _Ecore_Event_Modifier {...} Ecore_Event_Modifier;
+ enum :ecore_event_modifier, [ :ecore_none, :ecore_shift, :ecore_ctrl, :ecore_alt, :ecore_win, :ecore_scroll, :ecore_caps, :ecore_last ]
+ # typedef enum _Ecore_Event_Press {...} Ecore_Event_Press;
+ enum :ecore_event_press, [ :ecore_down, :ecore_up ]
+ # typedef enum _Ecore_Event_IO {...} Ecore_Event_IO;
+ enum :ecore_event_io, [ :ecore_in, :ecore_out ]
+ #
+ # TYPEDEFS
+ # typedef uintptr_t Ecore_Window;
+ typedef :uintptr_t, :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;
+ typedef :pointer, :ecore_event_mouse_button
+ # typedef struct _Ecore_Event_Mouse_Wheel Ecore_Event_Mouse_Wheel;
+ typedef :pointer, :ecore_event_mouse_wheel
+ # typedef struct _Ecore_Event_Mouse_Move Ecore_Event_Mouse_Move;
+ typedef :pointer, :ecore_event_mouse_move
+ # typedef struct _Ecore_Event_Mouse_IO Ecore_Event_Mouse_IO;
+ 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
+ #
+ # FUNCTIONS
+ fcts = [
+ # EAPI extern int ECORE_EVENT_KEY_DOWN;
+ # FIXME
+ # EAPI extern int ECORE_EVENT_KEY_UP;
+ # FIXME
+ # EAPI extern int ECORE_EVENT_MOUSE_BUTTON_DOWN;
+ # FIXME
+ # EAPI extern int ECORE_EVENT_MOUSE_BUTTON_UP;
+ # FIXME
+ # EAPI extern int ECORE_EVENT_MOUSE_MOVE;
+ # FIXME
+ # EAPI extern int ECORE_EVENT_MOUSE_WHEEL;
+ # FIXME
+ # EAPI extern int ECORE_EVENT_MOUSE_IN;
+ # FIXME
+ # EAPI extern int ECORE_EVENT_MOUSE_OUT;
+ # FIXME
+ # EAPI int ecore_event_init(void);
+ [ :ecore_event_init, [ ], :int ],
+ # EAPI int ecore_event_shutdown(void);
+ [ :ecore_event_shutdown, [ ], :int ],
+ # 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 ],
+ ]
+ #
+ attach_fcts fcts
+ #
end
end
#