Elm_Gesture_Layer

## Data Structures

struct | _Elm_Gesture_Taps_Info
| Struct holds taps info for user. More...
struct | _Elm_Gesture_Momentum_Info
| Struct holds momentum info for user x1 and y1 are not necessarily in sync x1 holds x value of x direction starting point and same holds for y1. More...
struct | _Elm_Gesture_Line_Info
| Struct holds line info for user. More...
struct | _Elm_Gesture_Zoom_Info
| Struct holds zoom info for user. More...
struct | _Elm_Gesture_Rotate_Info
| Struct holds rotation info for user. More...

## Macros

#define | ELM_GESTURE_LAYER_CLASS elm_gesture_layer_class_get()
| Elementary gesture layer class.

## Typedefs

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

## Functions

static void | _mouse_down_cb (void *data, Evas *e, Evas_Object *obj, void *event_info)
| For all mouse* / multi_* functions wethen send this event to _event_process function.
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
void | elm_gesture_layer_tap_finger_size_set (Evas_Object *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 Evas_Object *obj)
| This function returns the gesture layer finger-size for taps.
EOAPI void | elm_obj_gesture_layer_zoom_step_set (Eo *obj, double step)
| Control step value for zoom action.
EOAPI double | elm_obj_gesture_layer_zoom_step_get (const Eo *obj)
| Control step value for zoom action.
EOAPI void | elm_obj_gesture_layer_tap_finger_size_set (Eo *obj, int sz)
| This function sets the gesture layer finger-size for taps.
EOAPI int | elm_obj_gesture_layer_tap_finger_size_get (const Eo *obj)
| This function returns the gesture layer finger-size for taps.
EOAPI void | elm_obj_gesture_layer_hold_events_set (Eo *obj, Eina_Bool hold_events)
| This function makes gesture-layer repeat events.
EOAPI Eina_Bool | elm_obj_gesture_layer_hold_events_get (const Eo *obj)
| Get the repeat-events setting.
EOAPI void | elm_obj_gesture_layer_rotate_step_set (Eo *obj, double step)
| This function returns step-value for rotate action.
EOAPI double | elm_obj_gesture_layer_rotate_step_get (const Eo *obj)
| This function returns step-value for rotate action.
EOAPI void | elm_obj_gesture_layer_cb_set (Eo *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data)
| Set the gesture state change callback.
EOAPI Eina_Bool | elm_obj_gesture_layer_attach (Eo *obj, Efl_Canvas_Object *target)
| Attach a gesture layer widget to an Evas object (setting the widget's target).
EOAPI void | elm_obj_gesture_layer_cb_del (Eo *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data)
| Remove a gesture callback.
EOAPI void | elm_obj_gesture_layer_cb_add (Eo *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data)
| Add a gesture state change callback.

## Detailed Description

## Typedef Documentation

## Elm_Gesture_Event_Cb

typedef Evas_Event_Flags(* Elm_Gesture_Event_Cb) (void *data, void *event_info)

User callback used to stream gesture info from gesture layer.

Parameters

  data | user data
  event_info | gesture report info Returns a flag field to be applied on the causing event. You should probably return EVAS_EVENT_FLAG_ON_HOLD if your widget acted upon the event, in an irreversible way.

## Function Documentation

## _mouse_down_cb()

void _mouse_down_cb | ( | void * | data,
|  | Evas * | e,
|  | Evas_Object * | obj,
|  | void * | event_info )

static

For all mouse* / multi_* functions wethen send this event to _event_process function.

Parameters

  data | The gesture-layer object.
  event_info | Pointer to recent input event.

References EINA_UNUSED, and EVAS_CALLBACK_MOUSE_DOWN.

## elm_gesture_layer_line_min_length_set()

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.

Sets the minimum line length at which the user's gesture will be recognized as a line.

Parameters

  obj | gesture-layer.
  line_min_length | the length.

Since
  1.8

## elm_gesture_layer_line_min_length_get()

int elm_gesture_layer_line_min_length_get | ( | const Evas_Object * | obj | ) |

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

Parameters

  obj | gesture-layer.

Returns
  the length.

Since
  1.8

## elm_gesture_layer_zoom_distance_tolerance_set()

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.

If the distance between the two tab events becomes larger or smaller than `zoom_distance_tolerance`, it is recognized as the start of the zoom gesture.

Parameters

  obj | gesture-layer.
  zoom_distance_tolerance | zoom distance tolerance

Since
  1.8

## elm_gesture_layer_zoom_distance_tolerance_get()

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.

Parameters

  obj | gesture-layer.

Returns
  zoom distance tolerance

Since
  1.8

## elm_gesture_layer_line_distance_tolerance_set()

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.

Sets the minimum `line_distance_tolerance` length for the gesture to be recognized as a line.

Parameters

  obj | gesture-layer.
  line_distance_tolerance | line distance tolerance

Since
  1.8

## elm_gesture_layer_line_distance_tolerance_get()

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.

Parameters

  obj | gesture-layer.

Returns
  line distance tolerance

Since
  1.8

## elm_gesture_layer_line_angular_tolerance_set()

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.

Sets the minimum `line_angular_tolerance` angle for the gesture to be recognized as a line.

Parameters

  obj | gesture-layer.
  line_angular_tolerance | line angular tolerance

Since
  1.8

## elm_gesture_layer_line_angular_tolerance_get()

double elm_gesture_layer_line_angular_tolerance_get | ( | const Evas_Object * | obj | ) |

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

Parameters

  obj | gesture-layer.

Returns
  line angular tolerance

Since
  1.8

## elm_gesture_layer_zoom_wheel_factor_set()

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.

Sets the zoom size when a mouse wheel event occurs.

Parameters

  obj | gesture-layer.
  zoom_wheel_factor | zoom wheel factor

Since
  1.8

## elm_gesture_layer_zoom_wheel_factor_get()

double elm_gesture_layer_zoom_wheel_factor_get | ( | const Evas_Object * | obj | ) |

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

Parameters

  obj | gesture-layer.

Returns
  zoom wheel factor

Since
  1.8

## elm_gesture_layer_zoom_finger_factor_set()

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.

Sets the zoom size by multiplaying the zoom value by `zoom_finger_factor` when zooming.

Parameters

  obj | gesture-layer.
  zoom_finger_factor | zoom finger factor

Since
  1.8

## elm_gesture_layer_zoom_finger_factor_get()

double elm_gesture_layer_zoom_finger_factor_get | ( | const Evas_Object * | obj | ) |

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

Parameters

  obj | gesture-layer.

Returns
  zoom finger factor

Since
  1.8

## elm_gesture_layer_rotate_angular_tolerance_set()

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.

Sets the minimum `rotate_angular_tolerance` angle for the gesture to be recognized as a rotate. Rotate should be rotated beyond the givin `rotate_angular_tolerance` to recognize the start of the rotate gesture.

Parameters

  obj | gesture-layer.
  rotate_angular_tolerance | rotate angular tolerance

Since
  1.8

## elm_gesture_layer_rotate_angular_tolerance_get()

double elm_gesture_layer_rotate_angular_tolerance_get | ( | const Evas_Object * | obj | ) |

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

Parameters

  obj | gesture-layer.

Returns
  rotate angular tolerance

Since
  1.8

## elm_gesture_layer_flick_time_limit_ms_set()

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.

Recognize as a flick when a gesture occurs over `flick_time_limit_ms`.

Parameters

  obj | gesture-layer.
  flick_time_limit_ms | flick time limit (in ms)

Since
  1.8

## elm_gesture_layer_flick_time_limit_ms_get()

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.

Parameters

  obj | gesture-layer.

Returns
  flick time limit (in ms)

Since
  1.8

## elm_gesture_layer_long_tap_start_timeout_set()

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.

Recognize as a long tap when a tab occurs over `long_tap_start_timeout`, if set negative value, timeout will be 0.

Parameters

  obj | gesture-layer.
  long_tap_start_timeout | long tap start timeout

Since
  1.8

## elm_gesture_layer_long_tap_start_timeout_get()

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

Parameters

  obj | gesture-layer.

Returns
  long tap start timeout

Since
  1.8

## elm_gesture_layer_continues_enable_set()

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.

An option that allows user to start a gesture even when user is in touch move state.

Parameters

  obj | gesture-layer.
  continues_enable | continues enable

Since
  1.8

## elm_gesture_layer_continues_enable_get()

Eina_Bool elm_gesture_layer_continues_enable_get | ( | const Evas_Object * | obj | ) |

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

Parameters

  obj | gesture-layer.

Returns
  continues enable

Since
  1.8

## elm_gesture_layer_double_tap_timeout_set()

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.

When the time difference between two tabs is less than the `double_tap_timeout` value, it is recognized as a double tab, if set negative value, timeout will be 0.

Parameters

  obj | gesture-layer.
  double_tap_timeout | double tap timeout

Since
  1.8

## elm_gesture_layer_double_tap_timeout_get()

double elm_gesture_layer_double_tap_timeout_get | ( | const Evas_Object * | obj | ) |

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

Parameters

  obj | gesture-layer.

Returns
  double tap timeout

Since
  1.8

## elm_gesture_layer_tap_finger_size_set()

void elm_gesture_layer_tap_finger_size_set | ( | Evas_Object * | obj,
|  | Evas_Coord | sz )

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

Set to ZERO if you want GLayer to use system finger size value (default)

Parameters

  obj | gesture-layer.
  sz | Finger size

Since
  1.8

References elm_obj_gesture_layer_tap_finger_size_set().

## elm_gesture_layer_tap_finger_size_get()

Evas_Coord elm_gesture_layer_tap_finger_size_get | ( | const Evas_Object * | obj | ) |

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

Parameters

  obj | gesture-layer.

Returns
  Finger size that is currently used by Gesture Layer for taps.

Since
  1.8

References elm_obj_gesture_layer_tap_finger_size_get().

## elm_obj_gesture_layer_zoom_step_set()

EOAPI void elm_obj_gesture_layer_zoom_step_set | ( | Eo * | obj,
|  | double | step )

Control step value for zoom action.

When recognizing the zoom gesture, it should be recognized as zooming larger than step.

Parameters

  [in] | obj | The object.
  [in] | step | The zoom step value.

Referenced by elm_gesture_layer_zoom_step_set().

## elm_obj_gesture_layer_zoom_step_get()

EOAPI double elm_obj_gesture_layer_zoom_step_get | ( | const Eo * | obj | ) |

Control step value for zoom action.

Parameters

  [in] | obj | The object.

Returns
  The zoom step value.

Referenced by elm_gesture_layer_zoom_step_get().

## elm_obj_gesture_layer_tap_finger_size_set()

EOAPI void elm_obj_gesture_layer_tap_finger_size_set | ( | Eo * | obj,
|  | int | sz )

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

If not set, it's taken from elm_config. Set to 0 if you want GLayer to use the system finger size value (default).

Parameters

  [in] | obj | The object.
  [in] | sz | The finger size.

Since
  1.8

Referenced by elm_gesture_layer_tap_finger_size_set().

## elm_obj_gesture_layer_tap_finger_size_get()

EOAPI int elm_obj_gesture_layer_tap_finger_size_get | ( | const Eo * | obj | ) |

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

Parameters

  [in] | obj | The object.

Returns
  The finger size.

Since
  1.8

Referenced by elm_gesture_layer_tap_finger_size_get().

## elm_obj_gesture_layer_hold_events_set()

EOAPI void elm_obj_gesture_layer_hold_events_set | ( | Eo * | obj,
|  | Eina_Bool | hold_events )

This function makes gesture-layer repeat events.

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] | obj | The object.
  [in] | hold_events | If `true` get events only if gesture was not detected, `false` otherwise

Referenced by elm_gesture_layer_hold_events_set().

## elm_obj_gesture_layer_hold_events_get()

EOAPI Eina_Bool elm_obj_gesture_layer_hold_events_get | ( | const Eo * | obj | ) |

Get the repeat-events setting.

Parameters

  [in] | obj | The object.

Returns
  If `true` get events only if gesture was not detected, `false` otherwise

Referenced by elm_gesture_layer_hold_events_get().

## elm_obj_gesture_layer_rotate_step_set()

EOAPI void elm_obj_gesture_layer_rotate_step_set | ( | Eo * | obj,
|  | double | step )

This function returns step-value for rotate action.

Set to 0 to cancel step setting.

When recognizing the rotate gesture, the rotated size must be larger than step.

Parameters

  [in] | obj | The object.
  [in] | step | New rotate step value.

Referenced by elm_gesture_layer_rotate_step_set().

## elm_obj_gesture_layer_rotate_step_get()

EOAPI double elm_obj_gesture_layer_rotate_step_get | ( | const Eo * | obj | ) |

This function returns step-value for rotate action.

Parameters

  [in] | obj | The object.

Returns
  New rotate step value.

Referenced by elm_gesture_layer_rotate_step_get().

## elm_obj_gesture_layer_cb_set()

EOAPI void elm_obj_gesture_layer_cb_set | ( | Eo * | obj,
|  | Elm_Gesture_Type | idx,
|  | Elm_Gesture_State | cb_type,
|  | Elm_Gesture_Event_Cb | cb,
|  | void * | data )

Set the gesture state change callback.

When all callbacks for the gesture are set to `null`, it means this gesture is disabled.

Parameters

  [in] | obj | The object.
  [in] | idx | The gesture you want to track state of.
  [in] | cb_type | The event the callback tracks (START, MOVE, END, ABORT).
  [in] | cb | The callback itself.
  [in] | data | Custom data to be passed.

Referenced by elm_gesture_layer_cb_set().

## elm_obj_gesture_layer_attach()

EOAPI Eina_Bool elm_obj_gesture_layer_attach | ( | Eo * | obj,
|  | Efl_Canvas_Object * | target )

Attach a gesture layer widget to an Evas object (setting the widget's target).

A gesture layer's target may be any Evas object. This object will be used to listen to mouse and key events.

Parameters

  [in] | obj | The object.
  [in] | target | The object to attach.

Returns
  `true` on success, `false` otherwise.

Referenced by elm_gesture_layer_attach().

## elm_obj_gesture_layer_cb_del()

EOAPI void elm_obj_gesture_layer_cb_del | ( | Eo * | obj,
|  | Elm_Gesture_Type | idx,
|  | Elm_Gesture_State | cb_type,
|  | Elm_Gesture_Event_Cb | cb,
|  | void * | data )

Remove a gesture callback.

Parameters

  [in] | obj | The object.
  [in] | idx | The gesture you want to track state of.
  [in] | cb_type | The event the callback tracks (START, MOVE, END, ABORT).
  [in] | cb | The callback itself.
  [in] | data | Custom callback data.

Referenced by elm_gesture_layer_cb_del().

## elm_obj_gesture_layer_cb_add()

EOAPI void elm_obj_gesture_layer_cb_add | ( | Eo * | obj,
|  | Elm_Gesture_Type | idx,
|  | Elm_Gesture_State | cb_type,
|  | Elm_Gesture_Event_Cb | cb,
|  | void * | data )

Add a gesture state change callback.

When all callbacks for the gesture are set to `null`, it means this gesture is disabled.

If a function was already set for this gesture/type/state, it will be replaced by the new one. For ABI compat, callbacks added by elm_obj_gesture_layer_cb_add will be removed. It is recommended to use only one of these functions for a gesture object.

Parameters

  [in] | obj | The object.
  [in] | idx | The gesture you want to track state of.
  [in] | cb_type | The event the callback tracks (START, MOVE, END, ABORT).
  [in] | cb | The callback itself.
  [in] | data | Custom data to be passed.

Referenced by elm_gesture_layer_cb_add().