diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-29 16:53:57 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-29 16:53:57 +0100 |
commit | 0241b168d235107611e3a238ce67a9a093b9e7d8 (patch) | |
tree | 742215d529a5a3f843c7529101062cf6df604c26 /lib/efl | |
parent | 35ebdabec5c965aec425f3aeeefe90b0d3369367 (diff) | |
download | ffi-efl-0241b168d235107611e3a238ce67a9a093b9e7d8.zip ffi-efl-0241b168d235107611e3a238ce67a9a093b9e7d8.tar.gz |
parse elm_gesture_layer.h, generate elm_gesture_layer.rb
Diffstat (limited to 'lib/efl')
-rw-r--r-- | lib/efl/elementary_all.rb | 3 | ||||
-rw-r--r-- | lib/efl/elm/elm_gesture_layer.rb | 22 | ||||
-rw-r--r-- | lib/efl/native/elm/elm_gesture_layer.rb | 76 |
3 files changed, 99 insertions, 2 deletions
diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb index 2c88f1b..6beba13 100644 --- a/lib/efl/elementary_all.rb +++ b/lib/efl/elementary_all.rb @@ -36,8 +36,7 @@ require 'efl/elm/elm_focus' require 'efl/elm/elm_frame' require 'efl/elm/elm_gengrid' require 'efl/elm/elm_genlist' -#require 'efl/elm/elm_gesture_layer' -#require 'efl/elm/elm_getting_started' +require 'efl/elm/elm_gesture_layer' #require 'efl/elm/elm_glview' require 'efl/elm/elm_grid' require 'efl/elm/elm_hover' diff --git a/lib/efl/elm/elm_gesture_layer.rb b/lib/efl/elm/elm_gesture_layer.rb new file mode 100644 index 0000000..7b4c99d --- /dev/null +++ b/lib/efl/elm/elm_gesture_layer.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_gesture_layer' +# +module Efl + # + module Elm + # + class ElmGestureLayer < ElmObject + # + include Helper + constructor :elm_gesture_layer_add + search_prefixes 'elm_gesture_layer_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_gesture_layer.rb b/lib/efl/native/elm/elm_gesture_layer.rb new file mode 100644 index 0000000..6a3aba4 --- /dev/null +++ b/lib/efl/native/elm/elm_gesture_layer.rb @@ -0,0 +1,76 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmGestureLayer + # + FCT_PREFIX = 'elm_gesture_layer_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # ENUMS + # typedef enum {...} Elm_Gesture_Type; + enum :elm_gesture_type, [ :elm_gesture_first, 0, :elm_gesture_n_taps, 1, :elm_gesture_n_long_taps, 2, :elm_gesture_n_double_taps, 3, + :elm_gesture_n_triple_taps, 4, :elm_gesture_momentum, 5, :elm_gesture_n_lines, 6, :elm_gesture_n_flicks, 7, :elm_gesture_zoom, 8, :elm_gesture_rotate, + 9, :elm_gesture_last, 10 ] + # typedef enum {...} Elm_Gesture_State; + enum :elm_gesture_state, [ :elm_gesture_state_undefined, -1, :elm_gesture_state_start, 0, :elm_gesture_state_move, 1, :elm_gesture_state_end, + 2, :elm_gesture_state_abort, 3 ] + # + # TYPEDEFS + # typedef struct _Elm_Gesture_Taps_Info Elm_Gesture_Taps_Info; + typedef :pointer, :elm_gesture_taps_info + # typedef struct _Elm_Gesture_Momentum_Info Elm_Gesture_Momentum_Info; + typedef :pointer, :elm_gesture_momentum_info + # typedef struct _Elm_Gesture_Line_Info Elm_Gesture_Line_Info; + typedef :pointer, :elm_gesture_line_info + # typedef struct _Elm_Gesture_Zoom_Info Elm_Gesture_Zoom_Info; + typedef :pointer, :elm_gesture_zoom_info + # typedef struct _Elm_Gesture_Rotate_Info Elm_Gesture_Rotate_Info; + typedef :pointer, :elm_gesture_rotate_info + # + # CALLBACKS + # typedef Evas_Event_Flags (*Elm_Gesture_Event_Cb) (void *data, void *event_info); + callback :elm_gesture_event_cb, [ :pointer, :pointer ], :evas_event_flags + # + # FUNCTIONS + fcts = [ + # EAPI void elm_gesture_layer_cb_set(Evas_Object *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data); + [ :elm_gesture_layer_cb_set, [ :evas_object, :elm_gesture_type, :elm_gesture_state, :elm_gesture_event_cb, :pointer ], :void ], + # EAPI Eina_Bool elm_gesture_layer_hold_events_get(const Evas_Object *obj); + [ :elm_gesture_layer_hold_events_get, [ :evas_object ], :bool ], + # EAPI void elm_gesture_layer_hold_events_set(Evas_Object *obj, Eina_Bool hold_events); + [ :elm_gesture_layer_hold_events_set, [ :evas_object, :bool ], :void ], + # EAPI void elm_gesture_layer_zoom_step_set(Evas_Object *obj, double step); + [ :elm_gesture_layer_zoom_step_set, [ :evas_object, :double ], :void ], + # EAPI double elm_gesture_layer_zoom_step_get(const Evas_Object *obj); + [ :elm_gesture_layer_zoom_step_get, [ :evas_object ], :double ], + # EAPI void elm_gesture_layer_rotate_step_set(Evas_Object *obj, double step); + [ :elm_gesture_layer_rotate_step_set, [ :evas_object, :double ], :void ], + # EAPI double elm_gesture_layer_rotate_step_get(const Evas_Object *obj); + [ :elm_gesture_layer_rotate_step_get, [ :evas_object ], :double ], + # EAPI Eina_Bool elm_gesture_layer_attach(Evas_Object *obj, Evas_Object *target); + [ :elm_gesture_layer_attach, [ :evas_object, :evas_object ], :bool ], + # EAPI Evas_Object *elm_gesture_layer_add(Evas_Object *parent); + [ :elm_gesture_layer_add, [ :evas_object ], :evas_object ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF |