diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-20 15:24:11 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-20 15:24:11 +0200 |
commit | 9a7cd18cd11e0f435443c62fa68871768b98d248 (patch) | |
tree | 1e34d56e4f5ad7cd1908ab6155cbcd7fc60bdee5 /lib/efl/ecore/ecore_input-ffi.rb | |
parent | 5a5e81dbf79ca4967b150ea4930255a2398ccab4 (diff) | |
download | ffi-efl-9a7cd18cd11e0f435443c62fa68871768b98d248.zip ffi-efl-9a7cd18cd11e0f435443c62fa68871768b98d248.tar.gz |
ffi-e17 renamed to ffi-efl
Diffstat (limited to 'lib/efl/ecore/ecore_input-ffi.rb')
-rw-r--r-- | lib/efl/ecore/ecore_input-ffi.rb | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/lib/efl/ecore/ecore_input-ffi.rb b/lib/efl/ecore/ecore_input-ffi.rb new file mode 100644 index 0000000..dde4d2e --- /dev/null +++ b/lib/efl/ecore/ecore_input-ffi.rb @@ -0,0 +1,78 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/ffi' +# +module Efl + # + module Ecoreinput + def self.method_missing m, *args, &block + return Efl::API.send 'ecore_input_'+m.to_s, *args, &block + end + end + # + module API + # + # + ffi_lib 'ecore' + # + # 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 +# +# EOF |