From: Mike McCormack Date: Fri, 4 Nov 2011 04:28:31 +0000 (+0900) Subject: [Elementary.h] Update documentation for gesture layer X-Git-Tag: REBUILDD-ARMEL-67367~80 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=116309ec87b3470d3535bbbee8b97e5cb85fe12e;p=framework%2Fuifw%2Felementary.git [Elementary.h] Update documentation for gesture layer --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 4d504d6..4b1e846 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -12366,10 +12366,66 @@ extern "C" { */ /* gesture layer */ - /** @defgroup Elm_Gesture_Layer Gesture Layer */ + /** + * @defgroup Elm_Gesture_Layer Gesture Layer + * Gesture Layer Usage: + * + * Use Gesture Layer to detect gestures. + * The advantage is that you don't have to implement + * gesture detection, just set callbacks of gesture state. + * By using gesture layer we make standard interface. + * + * In order to use Gesture Layer you start with @ref elm_gesture_layer_add + * with a parent object parameter. + * Next 'activate' gesture layer with a @ref elm_gesture_layer_attach + * call. Usually with same object as target (2nd parameter). + * + * Now you need to tell gesture layer what gestures you follow. + * This is done with @ref elm_gesture_layer_cb_set call. + * By setting the callback you actually saying to gesture layer: + * I would like to know when the gesture @ref Elm_Gesture_Types + * switches to state @ref Elm_Gesture_State. + * + * Next, you need to implement the actual action that follows the input + * in your callback. + * + * Note that if you like to stop being reported about a gesture, just set + * all callbacks referring this gesture to NULL. + * (again with @ref elm_gesture_layer_cb_set) + * + * The information reported by gesture layer to your callback is depending + * on @ref Elm_Gesture_Types: + * @ref Elm_Gesture_Taps_Info is the info reported for tap gestures: + * @ref ELM_GESTURE_N_TAPS, @ref ELM_GESTURE_N_LONG_TAPS, + * @ref ELM_GESTURE_N_DOUBLE_TAPS, @ref ELM_GESTURE_N_TRIPLE_TAPS. + * + * @ref Elm_Gesture_Momentum_Info is info reported for momentum gestures: + * @ref ELM_GESTURE_MOMENTUM. + * + * @ref Elm_Gesture_Line_Info is the info reported for line gestures: + * (this also contains @ref Elm_Gesture_Momentum_Info internal structure) + * @ref ELM_GESTURE_N_LINES, @ref ELM_GESTURE_N_FLICKS. + * Note that we consider a flick as a line-gesture that should be completed + * in flick-time-limit as defined in @ref Config. + * + * @ref Elm_Gesture_Zoom_Info is the info reported for @ref ELM_GESTURE_ZOOM gesture. + * + * @ref Elm_Gesture_Rotate_Info is the info reported for @ref ELM_GESTURE_ROTATE gesture. + * + * + * Gesture Layer Tweaks: + * + * Note that line, flick, gestures can start without the need to remove fingers from surface. + * When user fingers rests on same-spot gesture is ended and starts again when fingers moved. + * + * Setting glayer_continues_enable to false in @ref Config will change this behavior + * so gesture starts when user touches (a *DOWN event) touch-surface + * and ends when no fingers touches surface (a *UP event). + */ + /** * @enum _Elm_Gesture_Types - * Emum of supported gesture types. + * Enum of supported gesture types. * @ingroup Elm_Gesture_Layer */ enum _Elm_Gesture_Types @@ -12394,14 +12450,14 @@ extern "C" { /** * @typedef Elm_Gesture_Types - * Type for Emum of supported gesture types. + * gesture types enum * @ingroup Elm_Gesture_Layer */ typedef enum _Elm_Gesture_Types Elm_Gesture_Types; /** * @enum _Elm_Gesture_State - * Emum of gesture states. + * Enum of gesture states. * @ingroup Elm_Gesture_Layer */ enum _Elm_Gesture_State @@ -12412,9 +12468,10 @@ extern "C" { ELM_GESTURE_STATE_END, /**< Gesture completed */ ELM_GESTURE_STATE_ABORT /**< Onging gesture was ABORTed */ }; + /** * @typedef Elm_Gesture_State - * gesture states. + * gesture states enum * @ingroup Elm_Gesture_Layer */ typedef enum _Elm_Gesture_State Elm_Gesture_State; @@ -12483,7 +12540,7 @@ extern "C" { }; /** - * @typedef _Elm_Gesture_Line_Info + * @typedef Elm_Gesture_Line_Info * Holds line info for user * @ingroup Elm_Gesture_Layer */