diff options
author | Larry <larry.olj@gmail.com> | 2016-01-21 20:35:36 -0200 |
---|---|---|
committer | Felipe Magno de Almeida <felipe@expertisesolutions.com.br> | 2016-02-09 14:14:08 -0200 |
commit | 1c68ef9a7f985afe5eeca391516eb54dfee59201 (patch) | |
tree | fdeb6da081e13862b23978affaa6225071df534a | |
parent | 9381604c1922eaebc8d076df7b0dfe4be53d4321 (diff) | |
download | elementary-1c68ef9a7f985afe5eeca391516eb54dfee59201.tar.gz |
elm_gesture_layer: move enums to .eo
-rw-r--r-- | src/lib/elm_gesture_layer.eo | 43 | ||||
-rw-r--r-- | src/lib/elm_gesture_layer_common.h | 35 | ||||
-rw-r--r-- | src/lib/elm_gesture_layer_legacy.h | 4 |
3 files changed, 39 insertions, 43 deletions
diff --git a/src/lib/elm_gesture_layer.eo b/src/lib/elm_gesture_layer.eo index ef6381a6a..8497fcf0f 100644 --- a/src/lib/elm_gesture_layer.eo +++ b/src/lib/elm_gesture_layer.eo @@ -1,3 +1,34 @@ +enum Elm.Gesture.Type +{ + [[ + Enum of supported gesture types. + ]] + legacy: elm_gesture; + first = 0, + n_taps, [[N fingers single taps]] + n_long_taps, [[N fingers single long-taps]] + n_double_taps, [[N fingers double-single taps]] + n_triple_taps, [[N fingers triple-single taps]] + momentum, [[Reports momentum in the direction of move]] + n_lines, [[N fingers line gesture]] + n_flicks, [[N fingers flick gesture]] + zoom, [[Zoom]] + rotate, [[Rotate]] + last +} + +enum Elm.Gesture.State +{ + [[ + Enum of gesture states. + ]] + undefined = -1, [[Gesture not started]] + start, [[Gesture started]] + move, [[Gesture is ongoing]] + end, [[Gesture completed]] + abort [[Ongoing gesture was aborted]] +} + class Elm.Gesture_Layer (Elm.Widget) { eo_prefix: elm_obj_gesture_layer; @@ -72,8 +103,8 @@ class Elm.Gesture_Layer (Elm.Widget) ]] } values { - idx: Elm_Gesture_Type; [[The gesture you want to track state of.]] - cb_type: Elm_Gesture_State; [[The event the callback tracks (START, MOVE, END, ABORT).]] + idx: Elm.Gesture.Type; [[The gesture you want to track state of.]] + cb_type: Elm.Gesture.State; [[The event the callback tracks (START, MOVE, END, ABORT).]] cb: Elm_Gesture_Event_Cb; [[The callback itself.]] data: void * @optional; [[Custom data to be passed.]] } @@ -93,8 +124,8 @@ class Elm.Gesture_Layer (Elm.Widget) cb_del { [[Remove a gesture callback.]] params { - @in idx: Elm_Gesture_Type; [[The gesture you want to track state of.]] - @in cb_type: Elm_Gesture_State; [[The event the callback tracks (START, MOVE, END, ABORT).]] + @in idx: Elm.Gesture.Type; [[The gesture you want to track state of.]] + @in cb_type: Elm.Gesture.State; [[The event the callback tracks (START, MOVE, END, ABORT).]] @in cb: Elm_Gesture_Event_Cb; [[The callback itself.]] @in data: void * @nullable; [[Custom callback data.]] } @@ -111,8 +142,8 @@ class Elm.Gesture_Layer (Elm.Widget) use only one of these functions for a gesture object. ]] params { - @in idx: Elm_Gesture_Type; [[The gesture you want to track state of.]] - @in cb_type: Elm_Gesture_State; [[The event the callback tracks (START, MOVE, END, ABORT).]] + @in idx: Elm.Gesture.Type; [[The gesture you want to track state of.]] + @in cb_type: Elm.Gesture.State; [[The event the callback tracks (START, MOVE, END, ABORT).]] @in cb: Elm_Gesture_Event_Cb; [[The callback itself.]] @in data: void * @optional; [[Custom data to be passed.]] } diff --git a/src/lib/elm_gesture_layer_common.h b/src/lib/elm_gesture_layer_common.h index fda0f6015..5a45635a4 100644 --- a/src/lib/elm_gesture_layer_common.h +++ b/src/lib/elm_gesture_layer_common.h @@ -5,41 +5,6 @@ */ /** - * Enum of supported gesture types. - */ -typedef enum -{ - ELM_GESTURE_FIRST = 0, - - ELM_GESTURE_N_TAPS, /**< N fingers single taps */ - ELM_GESTURE_N_LONG_TAPS, /**< N fingers single long-taps */ - ELM_GESTURE_N_DOUBLE_TAPS, /**< N fingers double-single taps */ - ELM_GESTURE_N_TRIPLE_TAPS, /**< N fingers triple-single taps */ - - ELM_GESTURE_MOMENTUM, /**< Reports momentum in the direction of move */ - - ELM_GESTURE_N_LINES, /**< N fingers line gesture */ - ELM_GESTURE_N_FLICKS, /**< N fingers flick gesture */ - - ELM_GESTURE_ZOOM, /**< Zoom */ - ELM_GESTURE_ROTATE, /**< Rotate */ - - ELM_GESTURE_LAST -} Elm_Gesture_Type; - -/** - * Enum of gesture states. - */ -typedef enum -{ - ELM_GESTURE_STATE_UNDEFINED = -1, /**< Gesture not STARTed */ - ELM_GESTURE_STATE_START, /**< Gesture STARTed */ - ELM_GESTURE_STATE_MOVE, /**< Gesture is ongoing */ - ELM_GESTURE_STATE_END, /**< Gesture completed */ - ELM_GESTURE_STATE_ABORT /**< Ongoing gesture was ABORTed */ -} Elm_Gesture_State; - -/** * Holds taps info for user */ typedef struct _Elm_Gesture_Taps_Info Elm_Gesture_Taps_Info; diff --git a/src/lib/elm_gesture_layer_legacy.h b/src/lib/elm_gesture_layer_legacy.h index 2a734c995..f6f76e9df 100644 --- a/src/lib/elm_gesture_layer_legacy.h +++ b/src/lib/elm_gesture_layer_legacy.h @@ -1,3 +1,5 @@ +#include "elm_gesture_layer.eo.legacy.h" + /** * Call this function to construct a new gesture-layer object. * @@ -50,5 +52,3 @@ EAPI void elm_gesture_layer_tap_longpress_cb_add(Evas_Object *obj, Elm_Gesture_S * @ingroup Elm_Gesture_Layer */ EAPI void elm_gesture_layer_tap_longpress_cb_del(Evas_Object *obj, Elm_Gesture_State state, Elm_Gesture_Event_Cb cb, void *data); - -#include "elm_gesture_layer.eo.legacy.h" |