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_Object * | elm_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 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:
-
data The user data event_info The gesture report info
- Returns:
- The flag field to be applied on the causing event
Enumeration Type Documentation
enum Elm_Gesture_State |
enum Elm_Gesture_Type |
This is a convenient macro around #_Elm_Gesture_Type.
- Enumerator:
Function Documentation
double elm_config_glayer_double_tap_timeout_get | ( | void | ) |
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_timeout Timeout for double tap event of gesture layer.
- Since (EFL) :
- 1.8
double elm_config_glayer_long_tap_start_timeout_get | ( | void | ) |
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_timeout Timeout for long tap event of gesture layer.
- Since (EFL) :
- 1.8
Evas_Object* elm_gesture_layer_add | ( | Evas_Object * | parent | ) |
Call this function to construct a new gesture-layer object.
- Since :
- 2.3
- Parameters:
-
[in] parent The 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] obj The elm gesture layer object [in] target Object 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] obj The elm gesture layer object [in] idx The gesture you would like to track its state. [in] cb_type what event this callback tracks: START, MOVE, END, ABORT. [in] cb callback function pointer. [in] data user info to be sent to callback (usually, Smart Data)
Eina_Bool elm_gesture_layer_continues_enable_get | ( | const Evas_Object * | obj | ) |
This function returns the gesture layer continues enable of an object.
- Since :
- 2.3
- Parameters:
-
[in] obj gesture-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] obj gesture-layer. [in] continues_enable continues enable
- Since (EFL) :
- 1.8
double elm_gesture_layer_double_tap_timeout_get | ( | const Evas_Object * | obj | ) |
this function returns the gesture layer double tap timeout of an object
- Since :
- 2.3
- Parameters:
-
[in] obj gesture-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] obj gesture-layer. [in] double_tap_timeout double tap timeout
- Since (EFL) :
- 1.8
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.
- Since :
- 2.3
- Parameters:
-
[in] obj gesture-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] obj gesture-layer. [in] flick_time_limit_ms flick 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] obj The 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] obj The elm gesture layer object [in] hold_events hold events or not.
double elm_gesture_layer_line_angular_tolerance_get | ( | const Evas_Object * | obj | ) |
This function returns the gesture layer line angular tolerance of an object.
- Since :
- 2.3
- Parameters:
-
[in] obj gesture-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] obj gesture-layer. [in] line_angular_tolerance line angular tolerance
- Since (EFL) :
- 1.8
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.
- Since :
- 2.3
- Parameters:
-
[in] obj gesture-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] obj gesture-layer. [in] line_distance_tolerance line distance tolerance
- Since (EFL) :
- 1.8
int elm_gesture_layer_line_min_length_get | ( | const Evas_Object * | obj | ) |
This function returns the gesture layer line min length of an object.
- Since :
- 2.3
- Parameters:
-
[in] obj gesture-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] obj gesture-layer. [in] line_min_length the length.
- Since (EFL) :
- 1.8
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
- Since :
- 2.3
- Parameters:
-
[in] obj gesture-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] obj gesture-layer. [in] long_tap_start_timeout long tap start timeout
- Since (EFL) :
- 1.8
double elm_gesture_layer_rotate_angular_tolerance_get | ( | const Evas_Object * | obj | ) |
This function returns the gesture layer rotate angular tolerance of an object.
- Since :
- 2.3
- Parameters:
-
[in] obj gesture-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] obj gesture-layer. [in] rotate_angular_tolerance rotate 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] obj The 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] obj The elm gesture layer object [in] step new 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] obj The 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] obj The elm gesture layer object [in] sz Finger size
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.
- Since :
- 2.3
- Parameters:
-
[in] obj gesture-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] obj gesture-layer. [in] zoom_distance_tolerance zoom distance tolerance
- Since (EFL) :
- 1.8
double elm_gesture_layer_zoom_finger_factor_get | ( | const Evas_Object * | obj | ) |
This function returns the gesture layer zoom finger factor of an object.
- Since :
- 2.3
- Parameters:
-
[in] obj gesture-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] obj gesture-layer. [in] zoom_finger_factor zoom 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] obj The 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] obj The elm gesture layer object [in] step new zoom step value.
double elm_gesture_layer_zoom_wheel_factor_get | ( | const Evas_Object * | obj | ) |
This function returns the gesture layer zoom wheel factor of an object.
- Since :
- 2.3
- Parameters:
-
[in] obj gesture-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] obj gesture-layer. [in] zoom_wheel_factor zoom wheel factor
- Since (EFL) :
- 1.8