From 14a98506d5def91fec032d202019d8e0e305624f Mon Sep 17 00:00:00 2001 From: Woochan Lee Date: Thu, 12 Jan 2017 16:36:19 -0800 Subject: [PATCH] elm_gesture_layer: update doc. Summary: Add description about gesture APIs. Some of the developers told me that they really have no idea what is this for when first see the API doc... Reviewers: Hermet, raster, jpeg, cedric Reviewed By: cedric Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4541 Signed-off-by: Cedric BAIL --- src/lib/elementary/elm_gesture_layer.eo | 18 ++++++++---- src/lib/elementary/elm_gesture_layer_common.h | 28 +++++++++++++++++++ 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/elm_gesture_layer.eo b/src/lib/elementary/elm_gesture_layer.eo index 1a863a5297..147b6682c5 100644 --- a/src/lib/elementary/elm_gesture_layer.eo +++ b/src/lib/elementary/elm_gesture_layer.eo @@ -38,9 +38,14 @@ class Elm.Gesture_Layer (Elm.Widget) eo_prefix: elm_obj_gesture_layer; methods { @property zoom_step { - [[Control step value for zoom action.]] - set {} - get {} + [[Control step value for zoom action.]] + set { + [[When recognizing the zoom gesture, it should be recognized as zooming larger + than step. + ]] + } + get { + } values { step: double; [[The zoom step value.]] } @@ -85,14 +90,15 @@ class Elm.Gesture_Layer (Elm.Widget) } } @property rotate_step { + [[This function returns step-value for rotate action.]] set { - [[This function sets the step value for rotate action. + [[Set to 0 to cancel step setting. - Set to 0 to cancel step setting. + When recognizing the rotate gesture, the rotated size must be larger + than step. ]] } get { - [[This function returns step-value for rotate action.]] } values { step: double; [[New rotate step value.]] diff --git a/src/lib/elementary/elm_gesture_layer_common.h b/src/lib/elementary/elm_gesture_layer_common.h index 5a45635a40..cf9f23b3a0 100644 --- a/src/lib/elementary/elm_gesture_layer_common.h +++ b/src/lib/elementary/elm_gesture_layer_common.h @@ -107,6 +107,8 @@ typedef Evas_Event_Flags (*Elm_Gesture_Event_Cb)(void *data, void *event_info); /** * This function sets the gesture layer line min length of an object * + * Sets the minimum line length at which the user's gesture will be recognized as a line. + * * @param obj gesture-layer. * @param line_min_length the length. * @@ -127,6 +129,10 @@ EAPI int elm_gesture_layer_line_min_length_get(const Evas_Object *obj); /** * This function sets the gesture layer zoom distance tolerance of an object * + * If the distance between the two tab events becomes larger or smaller + * than @c zoom_distance_tolerance, it is recognized as the start of the + * zoom gesture. + * * @param obj gesture-layer. * @param zoom_distance_tolerance zoom distance tolerance * @@ -147,6 +153,8 @@ EAPI Evas_Coord elm_gesture_layer_zoom_distance_tolerance_get(const Evas_Object /** * This function sets the gesture layer line distance tolerance of an object * + * Sets the minimum @c line_distance_tolerance length for the gesture to be recognized as a line. + * * @param obj gesture-layer. * @param line_distance_tolerance line distance tolerance * @@ -167,6 +175,8 @@ EAPI Evas_Coord elm_gesture_layer_line_distance_tolerance_get(const Evas_Object /** * This function sets the gesture layer line angular tolerance of an object * + * Sets the minimum @c line_angular_tolerance angle for the gesture to be recognized as a line. + * * @param obj gesture-layer. * @param line_angular_tolerance line angular tolerance * @@ -187,6 +197,8 @@ EAPI double elm_gesture_layer_line_angular_tolerance_get(const Evas_Object *obj) /** * This function sets the gesture layer zoom wheel factor of an object * + * Sets the zoom size when a mouse wheel event occurs. + * * @param obj gesture-layer. * @param zoom_wheel_factor zoom wheel factor * @@ -207,6 +219,9 @@ EAPI double elm_gesture_layer_zoom_wheel_factor_get(const Evas_Object *obj); /** * This function sets the gesture layer zoom finger factor of an object * + * Sets the zoom size by multiplaying the zoom value by @c zoom_finger_factor + * when zooming. + * * @param obj gesture-layer. * @param zoom_finger_factor zoom finger factor * @@ -227,6 +242,10 @@ EAPI double elm_gesture_layer_zoom_finger_factor_get(const Evas_Object *obj); /** * This function sets the gesture layer rotate angular tolerance of an object * + * Sets the minimum @c rotate_angular_tolerance angle for the gesture to be recognized as a rotate. + * Rotate should be rotated beyond the givin @c rotate_angular_tolerance to recognize + * the start of the rotate gestrue. + * * @param obj gesture-layer. * @param rotate_angular_tolerance rotate angular tolerance * @@ -247,6 +266,8 @@ EAPI double elm_gesture_layer_rotate_angular_tolerance_get(const Evas_Object *ob /** * This function sets the gesture layer flick time limit (in ms) of an object * + * Recognize as a flick when a gesture occurs over @c flick_time_limit_ms. + * * @param obj gesture-layer. * @param flick_time_limit_ms flick time limit (in ms) * @@ -267,6 +288,8 @@ EAPI unsigned int elm_gesture_layer_flick_time_limit_ms_get(const Evas_Object *o /** * This function sets the gesture layer long tap start timeout of an object * + * Recognize as a long tap when a tab occurs over @c long_tap_start_timeout. + * * @param obj gesture-layer. * @param long_tap_start_timeout long tap start timeout * @@ -287,6 +310,8 @@ EAPI double elm_gesture_layer_long_tap_start_timeout_get(const Evas_Object *obj) /** * This function sets the gesture layer continues enable of an object * + * An option that allows user to start a gesture even when user is in touch move state. + * * @param obj gesture-layer. * @param continues_enable continues enable * @@ -307,6 +332,9 @@ EAPI Eina_Bool elm_gesture_layer_continues_enable_get(const Evas_Object *obj); /** * This function sets the gesture layer double tap timeout of an object * + * When the time diffrence between two tabs is less than the @c double_tap_timeout value, + * it is recognized as a double tab. + * * @param obj gesture-layer. * @param double_tap_timeout double tap timeout *