Tizen Native API

Functions

double elm_config_glayer_long_tap_start_timeout_get (void)
 Get the duration for occurring long tap event of gesture layer.
void elm_config_glayer_long_tap_start_timeout_set (double long_tap_timeout)
 Set the duration for occurring long tap event of gesture layer.
double elm_config_glayer_double_tap_timeout_get (void)
 Get the duration for occurring double tap event of gesture layer.
void elm_config_glayer_double_tap_timeout_set (double double_tap_timeout)
 Set the duration for occurring double tap event of gesture layer.
void elm_gesture_layer_zoom_step_set (Elm_Gesture_Layer *obj, double step)
 This function sets step-value for zoom action.
double elm_gesture_layer_zoom_step_get (const Elm_Gesture_Layer *obj)
 This function returns step-value for zoom action.
void elm_gesture_layer_tap_finger_size_set (Elm_Gesture_Layer *obj, Evas_Coord sz)
 This function sets the gesture layer finger-size for taps If not set, this size taken from elm_config.
Evas_Coord elm_gesture_layer_tap_finger_size_get (const Elm_Gesture_Layer *obj)
 This function returns the gesture layer finger-size for taps.
void elm_gesture_layer_hold_events_set (Elm_Gesture_Layer *obj, Eina_Bool hold_events)
 This function is to make gesture-layer repeat events.
Eina_Bool elm_gesture_layer_hold_events_get (const Elm_Gesture_Layer *obj)
 Call this function to get repeat-events settings.
void elm_gesture_layer_rotate_step_set (Elm_Gesture_Layer *obj, double step)
 This function sets step-value for rotate action.
double elm_gesture_layer_rotate_step_get (const Elm_Gesture_Layer *obj)
 This function returns step-value for rotate action.
void elm_gesture_layer_cb_set (Elm_Gesture_Layer *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data)
 Use function to set callbacks to be notified about change of state of gesture.
Eina_Bool elm_gesture_layer_attach (Elm_Gesture_Layer *obj, Evas_Object *target)
 Attach a given gesture layer widget to an Evas object, thus setting the widget's target.
void elm_gesture_layer_line_min_length_set (Evas_Object *obj, int line_min_length)
 This function sets the gesture layer line min length of an object.
int elm_gesture_layer_line_min_length_get (const Evas_Object *obj)
 This function returns the gesture layer line min length of an object.
void elm_gesture_layer_zoom_distance_tolerance_set (Evas_Object *obj, Evas_Coord zoom_distance_tolerance)
 This function sets the gesture layer zoom distance tolerance of an object.
Evas_Coord elm_gesture_layer_zoom_distance_tolerance_get (const Evas_Object *obj)
 This function returns the gesture layer zoom distance tolerance of an object.
void elm_gesture_layer_line_distance_tolerance_set (Evas_Object *obj, Evas_Coord line_distance_tolerance)
 This function sets the gesture layer line distance tolerance of an object.
Evas_Coord elm_gesture_layer_line_distance_tolerance_get (const Evas_Object *obj)
 This function returns the gesture layer line distance tolerance of an object.
void elm_gesture_layer_line_angular_tolerance_set (Evas_Object *obj, double line_angular_tolerance)
 This function sets the gesture layer line angular tolerance of an object.
double elm_gesture_layer_line_angular_tolerance_get (const Evas_Object *obj)
 This function returns the gesture layer line angular tolerance of an object.
void elm_gesture_layer_zoom_wheel_factor_set (Evas_Object *obj, double zoom_wheel_factor)
 This function sets the gesture layer zoom wheel factor of an object.
double elm_gesture_layer_zoom_wheel_factor_get (const Evas_Object *obj)
 This function returns the gesture layer zoom wheel factor of an object.
void elm_gesture_layer_zoom_finger_factor_set (Evas_Object *obj, double zoom_finger_factor)
 This function sets the gesture layer zoom finger factor of an object.
double elm_gesture_layer_zoom_finger_factor_get (const Evas_Object *obj)
 This function returns the gesture layer zoom finger factor of an object.
void elm_gesture_layer_rotate_angular_tolerance_set (Evas_Object *obj, double rotate_angular_tolerance)
 This function sets the gesture layer rotate angular tolerance of an object.
double elm_gesture_layer_rotate_angular_tolerance_get (const Evas_Object *obj)
 This function returns the gesture layer rotate angular tolerance of an object.
void elm_gesture_layer_flick_time_limit_ms_set (Evas_Object *obj, unsigned int flick_time_limit_ms)
 This function sets the gesture layer flick time limit (in ms) of an object.
unsigned int elm_gesture_layer_flick_time_limit_ms_get (const Evas_Object *obj)
 This function returns the gesture layer flick time limit (in ms) of an object.
void elm_gesture_layer_long_tap_start_timeout_set (Evas_Object *obj, double long_tap_start_timeout)
 This function sets the gesture layer long tap start timeout of an object.
double elm_gesture_layer_long_tap_start_timeout_get (const Evas_Object *obj)
 this function returns the gesture layer long tap start timeout of an object
void elm_gesture_layer_continues_enable_set (Evas_Object *obj, Eina_Bool continues_enable)
 This function sets the gesture layer continues enable of an object.
Eina_Bool elm_gesture_layer_continues_enable_get (const Evas_Object *obj)
 This function returns the gesture layer continues enable of an object.
void elm_gesture_layer_double_tap_timeout_set (Evas_Object *obj, double double_tap_timeout)
 This function sets the gesture layer double tap timeout of an object.
double elm_gesture_layer_double_tap_timeout_get (const Evas_Object *obj)
 this function returns the gesture layer double tap timeout of an object
Evas_Objectelm_gesture_layer_add (Evas_Object *parent)
 Call this function to construct a new gesture-layer object.

Typedefs

typedef struct
_Elm_Gesture_Taps_Info 
Elm_Gesture_Taps_Info
 The structure type that holds taps info for the user.
typedef struct
_Elm_Gesture_Momentum_Info 
Elm_Gesture_Momentum_Info
 The structure type that holds momentum info for the user.
typedef struct
_Elm_Gesture_Line_Info 
Elm_Gesture_Line_Info
 The structure type that holds line info for the user.
typedef struct
_Elm_Gesture_Zoom_Info 
Elm_Gesture_Zoom_Info
 The structure type that holds zoom info for the user.
typedef struct
_Elm_Gesture_Rotate_Info 
Elm_Gesture_Rotate_Info
 The structure type that holds rotation info for the user.
typedef Evas_Event_Flags(* Elm_Gesture_Event_Cb )(void *data, void *event_info)
 User callback used to stream gesture info from the gesture layer.

gesture_layer_inheritance_tree.png

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 elm_gesture_layer_add with a parent object parameter. Next 'activate' gesture layer with a 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 elm_gesture_layer_cb_set call. By setting the callback you actually saying to gesture layer: I would like to know when the gesture Elm_Gesture_Type switches to state 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 elm_gesture_layer_cb_set)

The information reported by gesture layer to your callback is depending on Elm_Gesture_Type : Elm_Gesture_Taps_Info is the info reported for tap gestures: ELM_GESTURE_N_TAPS, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_N_TRIPLE_TAPS.

Elm_Gesture_Momentum_Info is info reported for momentum gestures: ELM_GESTURE_MOMENTUM.

Elm_Gesture_Line_Info is the info reported for line gestures: (this also contains Elm_Gesture_Momentum_Info internal structure) ELM_GESTURE_N_LINES, 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 Elementary Config.

Elm_Gesture_Zoom_Info is the info reported for ELM_GESTURE_ZOOM gesture.

Elm_Gesture_Rotate_Info is the info reported for 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 Elementary 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).

Supported elm_object common APIs.


Typedef Documentation

User callback used to stream gesture info from the gesture layer.

Remarks:
You should probably return EVAS_EVENT_FLAG_ON_HOLD if your widget acted upon the event, in an irreversible way.
Parameters:
dataThe user data
event_infoThe gesture report info
Returns:
The flag field to be applied on the causing event

Enumeration Type Documentation

This is a convenient macro around #_Elm_Gesture_State.

Enumerator:
ELM_GESTURE_STATE_UNDEFINED 

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

This is a convenient macro around #_Elm_Gesture_Type.

Enumerator:
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


Function Documentation

Get the duration for occurring double tap event of gesture layer.

Since :
2.3
Returns:
Timeout for double tap event of gesture layer.
Since (EFL) :
1.8
void elm_config_glayer_double_tap_timeout_set ( double  double_tap_timeout)

Set the duration for occurring double tap event of gesture layer.

Since :
2.3
Parameters:
[in]double_tap_timeoutTimeout for double tap event of gesture layer.
Since (EFL) :
1.8

Get the duration for occurring long tap event of gesture layer.

Since :
2.3
Returns:
Timeout for long tap event of gesture layer.
Since (EFL) :
1.8
void elm_config_glayer_long_tap_start_timeout_set ( double  long_tap_timeout)

Set the duration for occurring long tap event of gesture layer.

Since :
2.3
Parameters:
[in]long_tap_timeoutTimeout for long tap event of gesture layer.
Since (EFL) :
1.8

Call this function to construct a new gesture-layer object.

Since :
2.3
Parameters:
[in]parentThe gesture layer's parent widget.
Returns:
A new gesture layer object.
Remarks:
This does not activate the gesture layer. You have to call elm_gesture_layer_attach() in order to 'activate' gesture-layer.
Eina_Bool elm_gesture_layer_attach ( Elm_Gesture_Layer *  obj,
Evas_Object target 
)

Attach a given gesture layer widget to an Evas object, thus setting the widget's target.

Since :
2.3
Remarks:
A gesture layer target may be whichever Evas object one chooses. This will be object obj will listen all mouse and key events from, to report the gestures made upon it back.
Returns:
EINA_TRUE, on success, EINA_FALSE otherwise.
Parameters:
[in]objThe elm gesture layer object
[in]targetObject to attach to obj (target)
void elm_gesture_layer_cb_set ( Elm_Gesture_Layer *  obj,
Elm_Gesture_Type  idx,
Elm_Gesture_State  cb_type,
Elm_Gesture_Event_Cb  cb,
void *  data 
)

Use function to set callbacks to be notified about change of state of gesture.

Since :
2.3
Remarks:
When a user registers a callback with this function this means this gesture has to be tested.
When ALL callbacks for a gesture are set to NULL it means user isn't interested in gesture-state and it will not be tested.
Parameters:
[in]objThe elm gesture layer object
[in]idxThe gesture you would like to track its state.
[in]cb_typewhat event this callback tracks: START, MOVE, END, ABORT.
[in]cbcallback function pointer.
[in]datauser info to be sent to callback (usually, Smart Data)

This function returns the gesture layer continues enable of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
Returns:
continues enable
Since (EFL) :
1.8
void elm_gesture_layer_continues_enable_set ( Evas_Object obj,
Eina_Bool  continues_enable 
)

This function sets the gesture layer continues enable of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
[in]continues_enablecontinues enable
Since (EFL) :
1.8

this function returns the gesture layer double tap timeout of an object

Since :
2.3
Parameters:
[in]objgesture-layer.
Returns:
double tap timeout
Since (EFL) :
1.8
void elm_gesture_layer_double_tap_timeout_set ( Evas_Object obj,
double  double_tap_timeout 
)

This function sets the gesture layer double tap timeout of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
[in]double_tap_timeoutdouble tap timeout
Since (EFL) :
1.8

This function returns the gesture layer flick time limit (in ms) of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
Returns:
flick time limit (in ms)
Since (EFL) :
1.8
void elm_gesture_layer_flick_time_limit_ms_set ( Evas_Object obj,
unsigned int  flick_time_limit_ms 
)

This function sets the gesture layer flick time limit (in ms) of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
[in]flick_time_limit_msflick time limit (in ms)
Since (EFL) :
1.8
Eina_Bool elm_gesture_layer_hold_events_get ( const Elm_Gesture_Layer *  obj)

Call this function to get repeat-events settings.

Since :
2.3
Returns:
repeat events settings.
See also:
elm_gesture_layer_hold_events_set()
Parameters:
[in]objThe elm gesture layer object
void elm_gesture_layer_hold_events_set ( Elm_Gesture_Layer *  obj,
Eina_Bool  hold_events 
)

This function is to make gesture-layer repeat events.

Since :
2.3
Remarks:
Set this if you like to get the raw events only if gestures were not detected. Clear this if you like gesture layer to forward events as testing gestures.
Parameters:
[in]objThe elm gesture layer object
[in]hold_eventshold events or not.

This function returns the gesture layer line angular tolerance of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
Returns:
line angular tolerance
Since (EFL) :
1.8
void elm_gesture_layer_line_angular_tolerance_set ( Evas_Object obj,
double  line_angular_tolerance 
)

This function sets the gesture layer line angular tolerance of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
[in]line_angular_toleranceline angular tolerance
Since (EFL) :
1.8

This function returns the gesture layer line distance tolerance of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
Returns:
line distance tolerance
Since (EFL) :
1.8
void elm_gesture_layer_line_distance_tolerance_set ( Evas_Object obj,
Evas_Coord  line_distance_tolerance 
)

This function sets the gesture layer line distance tolerance of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
[in]line_distance_toleranceline distance tolerance
Since (EFL) :
1.8

This function returns the gesture layer line min length of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
Returns:
the length.
Since (EFL) :
1.8
void elm_gesture_layer_line_min_length_set ( Evas_Object obj,
int  line_min_length 
)

This function sets the gesture layer line min length of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
[in]line_min_lengththe length.
Since (EFL) :
1.8

this function returns the gesture layer long tap start timeout of an object

Since :
2.3
Parameters:
[in]objgesture-layer.
Returns:
long tap start timeout
Since (EFL) :
1.8
void elm_gesture_layer_long_tap_start_timeout_set ( Evas_Object obj,
double  long_tap_start_timeout 
)

This function sets the gesture layer long tap start timeout of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
[in]long_tap_start_timeoutlong tap start timeout
Since (EFL) :
1.8

This function returns the gesture layer rotate angular tolerance of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
Returns:
rotate angular tolerance
Since (EFL) :
1.8
void elm_gesture_layer_rotate_angular_tolerance_set ( Evas_Object obj,
double  rotate_angular_tolerance 
)

This function sets the gesture layer rotate angular tolerance of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
[in]rotate_angular_tolerancerotate angular tolerance
Since (EFL) :
1.8
double elm_gesture_layer_rotate_step_get ( const Elm_Gesture_Layer *  obj)

This function returns step-value for rotate action.

Since :
2.3
Returns:
rotate step value.
Parameters:
[in]objThe elm gesture layer object
void elm_gesture_layer_rotate_step_set ( Elm_Gesture_Layer *  obj,
double  step 
)

This function sets step-value for rotate action.

Since :
2.3
Remarks:
Set step to any positive value. Cancel step setting by setting to 0
Parameters:
[in]objThe elm gesture layer object
[in]stepnew rotate step value.
Evas_Coord elm_gesture_layer_tap_finger_size_get ( const Elm_Gesture_Layer *  obj)

This function returns the gesture layer finger-size for taps.

Since :
2.3
Returns:
Finger size that is currently used by Gesture Layer for taps.
Since (EFL) :
1.8
Parameters:
[in]objThe elm gesture layer object
void elm_gesture_layer_tap_finger_size_set ( Elm_Gesture_Layer *  obj,
Evas_Coord  sz 
)

This function sets the gesture layer finger-size for taps If not set, this size taken from elm_config.

Since :
2.3
Remarks:
Set to ZERO if you want GLayer to use system finger size value (default)
Since (EFL) :
1.8
Parameters:
[in]objThe elm gesture layer object
[in]szFinger size

This function returns the gesture layer zoom distance tolerance of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
Returns:
zoom distance tolerance
Since (EFL) :
1.8
void elm_gesture_layer_zoom_distance_tolerance_set ( Evas_Object obj,
Evas_Coord  zoom_distance_tolerance 
)

This function sets the gesture layer zoom distance tolerance of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
[in]zoom_distance_tolerancezoom distance tolerance
Since (EFL) :
1.8

This function returns the gesture layer zoom finger factor of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
Returns:
zoom finger factor
Since (EFL) :
1.8
void elm_gesture_layer_zoom_finger_factor_set ( Evas_Object obj,
double  zoom_finger_factor 
)

This function sets the gesture layer zoom finger factor of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
[in]zoom_finger_factorzoom finger factor
Since (EFL) :
1.8
double elm_gesture_layer_zoom_step_get ( const Elm_Gesture_Layer *  obj)

This function returns step-value for zoom action.

Since :
2.3
Returns:
zoom step value.
See also:
elm_gesture_layer_zoom_step_set()
Parameters:
[in]objThe elm gesture layer object
void elm_gesture_layer_zoom_step_set ( Elm_Gesture_Layer *  obj,
double  step 
)

This function sets step-value for zoom action.

Since :
2.3
Remarks:
Set step to any positive value. Cancel step setting by setting to 0
See also:
elm_gesture_layer_zoom_step_get()
Parameters:
[in]objThe elm gesture layer object
[in]stepnew zoom step value.

This function returns the gesture layer zoom wheel factor of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
Returns:
zoom wheel factor
Since (EFL) :
1.8
void elm_gesture_layer_zoom_wheel_factor_set ( Evas_Object obj,
double  zoom_wheel_factor 
)

This function sets the gesture layer zoom wheel factor of an object.

Since :
2.3
Parameters:
[in]objgesture-layer.
[in]zoom_wheel_factorzoom wheel factor
Since (EFL) :
1.8