diff --git a/legacy/elementary/src/lib/elm_gesture_layer.eo b/legacy/elementary/src/lib/elm_gesture_layer.eo index ef6381a6a4..8497fcf0f1 100644 --- a/legacy/elementary/src/lib/elm_gesture_layer.eo +++ b/legacy/elementary/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/legacy/elementary/src/lib/elm_gesture_layer_common.h b/legacy/elementary/src/lib/elm_gesture_layer_common.h index fda0f60158..5a45635a40 100644 --- a/legacy/elementary/src/lib/elm_gesture_layer_common.h +++ b/legacy/elementary/src/lib/elm_gesture_layer_common.h @@ -4,41 +4,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 */ diff --git a/legacy/elementary/src/lib/elm_gesture_layer_legacy.h b/legacy/elementary/src/lib/elm_gesture_layer_legacy.h index 2a734c9951..f6f76e9dfe 100644 --- a/legacy/elementary/src/lib/elm_gesture_layer_legacy.h +++ b/legacy/elementary/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"