Tizen Native API
|
Functions | |
void | elm_gesture_layer_cb_set (Evas_Object *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data) |
Sets callbacks to be notified about the change of state of a gesture. | |
Eina_Bool | elm_gesture_layer_hold_events_get (const Evas_Object *obj) |
Called to get repeat-events settings. | |
void | elm_gesture_layer_hold_events_set (Evas_Object *obj, Eina_Bool hold_events) |
Makes gesture-layer repeat events. | |
void | elm_gesture_layer_zoom_step_set (Evas_Object *obj, double step) |
Sets the step-value for zoom action. | |
double | elm_gesture_layer_zoom_step_get (const Evas_Object *obj) |
Gets the step-value for zoom action. | |
void | elm_gesture_layer_rotate_step_set (Evas_Object *obj, double step) |
Sets the step-value for rotate action. | |
double | elm_gesture_layer_rotate_step_get (const Evas_Object *obj) |
Gets the step-value for rotate action. | |
Eina_Bool | elm_gesture_layer_attach (Evas_Object *obj, Evas_Object *target) |
Attaches a given gesture layer widget to an Evas object, thus setting the widget's target. | |
Evas_Object * | elm_gesture_layer_add (Evas_Object *parent) |
Called to construct a new gesture-layer object. | |
void | elm_gesture_layer_line_min_length_set (Evas_Object *obj, int line_min_length) |
Sets the gesture layer line min length of an object. | |
int | elm_gesture_layer_line_min_length_get (const Evas_Object *obj) |
Gets 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) |
Sets the gesture layer zoom distance tolerance of an object. | |
Evas_Coord | elm_gesture_layer_zoom_distance_tolerance_get (const Evas_Object *obj) |
Gets 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) |
Sets the gesture layer line distance tolerance of an object. | |
Evas_Coord | elm_gesture_layer_line_distance_tolerance_get (const Evas_Object *obj) |
Gets the gesture layer line distance tolerance of an object. | |
void | elm_gesture_layer_line_angular_tolerance_set (Evas_Object *obj, double line_angular_tolerance) |
Sets the gesture layer line angular tolerance of an object. | |
double | elm_gesture_layer_line_angular_tolerance_get (const Evas_Object *obj) |
Gets the gesture layer line angular tolerance of an object. | |
void | elm_gesture_layer_zoom_wheel_factor_set (Evas_Object *obj, double zoom_wheel_factor) |
Sets the gesture layer zoom wheel factor of an object. | |
double | elm_gesture_layer_zoom_wheel_factor_get (const Evas_Object *obj) |
Gets the gesture layer zoom wheel factor of an object. | |
void | elm_gesture_layer_zoom_finger_factor_set (Evas_Object *obj, double zoom_finger_factor) |
Sets the gesture layer zoom finger factor of an object. | |
double | elm_gesture_layer_zoom_finger_factor_get (const Evas_Object *obj) |
Gets the gesture layer zoom finger factor of an object. | |
void | elm_gesture_layer_rotate_angular_tolerance_set (Evas_Object *obj, double rotate_angular_tolerance) |
Sets the gesture layer rotate angular tolerance of an object. | |
double | elm_gesture_layer_rotate_angular_tolerance_get (const Evas_Object *obj) |
Gets 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) |
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) |
Gets 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) |
Sets the gesture layer long tap start timeout of an object. | |
double | elm_gesture_layer_long_tap_start_timeout_get (const Evas_Object *obj) |
Gets the gesture layer long tap start timeout of an object. | |
void | elm_gesture_layer_continues_enable_set (Evas_Object *obj, Eina_Bool continues_enable) |
Sets the gesture layer continues enable of an object. | |
Eina_Bool | elm_gesture_layer_continues_enable_get (const Evas_Object *obj) |
Gets the gesture layer continues enable of an object. | |
void | elm_gesture_layer_double_tap_timeout_set (Evas_Object *obj, double double_tap_timeout) |
Sets the gesture layer double tap timeout of an object. | |
double | elm_gesture_layer_double_tap_timeout_get (const Evas_Object *obj) |
Gets the gesture layer double tap timeout of an object. | |
void | elm_gesture_layer_tap_finger_size_set (Evas_Object *obj, Evas_Coord sz) |
Sets the gesture layer finger-size for taps. | |
Evas_Coord | elm_gesture_layer_tap_finger_size_get (const Evas_Object *obj) |
Gets the gesture layer finger-size for taps. | |
Typedefs | |
typedef enum _Elm_Gesture_Type | Elm_Gesture_Type |
This is a convenient macro around _Elm_Gesture_Type. | |
typedef enum _Elm_Gesture_State | Elm_Gesture_State |
This is a convenient macro around _Elm_Gesture_State. | |
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. |
This provides basic gesture detection.
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 the gesture state. By using the gesture layer we make a standard interface.
In order to use Gesture Layer you start with elm_gesture_layer_add and a parent object parameter. Next 'activate' the gesture layer with a call to elm_gesture_layer_attach Usually with the same object as target (2nd parameter).
Now you need to tell the gesture layer what gestures you follow. This is done with elm_gesture_layer_cb_set call. By setting the callback you are actually telling the gesture layer: I would like to know when the gesture Elm_Gesture_Type switches to the 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 to this gesture to NULL
. (again with elm_gesture_layer_cb_set)
The information reported by the 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 the info reported for momentum gestures: ELM_GESTURE_MOMENTUM.
Elm_Gesture_Line_Info is the info reported for line gestures: (this also contains the 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 a flick-time-limit as defined in Elementary Config.
Elm_Gesture_Zoom_Info is the info reported for the ELM_GESTURE_ZOOM gesture.
Elm_Gesture_Rotate_Info is the info reported for the ELM_GESTURE_ROTATE gesture.
Gesture Layer Tweaks:
Note that line, flick, gestures can start without the need to remove fingers from the surface. When the user's fingers rest on the same-spot, the gesture ends and starts again when the fingers are moved.
Setting glayer_continues_enable to false
in Elementary Config changes this behavior, so the gesture starts when the user touches (a *DOWN event) touch-surface and ends when no fingers touch the surface (a *UP event).
Supported common elm_object APIs.
User callback used to stream gesture info from the gesture layer.
data | The user data |
event_info | The gesture report info |
enum _Elm_Gesture_State |
enum _Elm_Gesture_Type |
Enumeration of supported gesture types.
double elm_config_glayer_double_tap_timeout_get | ( | void | ) |
Gets the duration for occurrence of the double tap event of the gesture layer.
void elm_config_glayer_double_tap_timeout_set | ( | double | double_tap_timeout | ) |
Sets the duration for occurrence of the double tap event of the gesture layer.
[in] | double_tap_timeout | The timeout for the double tap event of the gesture layer |
double elm_config_glayer_long_tap_start_timeout_get | ( | void | ) |
Gets the duration for occurrence of the long tap event of the gesture layer.
void elm_config_glayer_long_tap_start_timeout_set | ( | double | long_tap_timeout | ) |
Sets the duration for occurrence of the long tap event of the gesture layer.
[in] | long_tap_timeout | The timeout for the long tap event of the gesture layer |
Evas_Object* elm_gesture_layer_add | ( | Evas_Object * | parent | ) |
Called to construct a new gesture-layer object.
[in] | parent | The gesture layer's parent widget |
Eina_Bool elm_gesture_layer_attach | ( | Evas_Object * | obj, |
Evas_Object * | target | ||
) |
Attaches a given gesture layer widget to an Evas object, thus setting the widget's target.
[in] | obj | The gesture layer to attach an object to |
[in] | target | The object to attach to obj (target) |
EINA_TRUE
on success, otherwise EINA_FALSE
on failure void elm_gesture_layer_cb_set | ( | Evas_Object * | obj, |
Elm_Gesture_Type | idx, | ||
Elm_Gesture_State | cb_type, | ||
Elm_Gesture_Event_Cb | cb, | ||
void * | data | ||
) |
Sets callbacks to be notified about the change of state of a gesture.
NULL
it means the user isn't interested in gesture-state and it is not tested.[in] | obj | The gesture-layer |
[in] | idx | The gesture whose state is tracked |
[in] | cb | The callback function pointer |
[in] | cb_type | The event type this callback tracks: START, MOVE, END, ABORT |
[in] | data | The user info to be sent to the callback (usually, Smart Data) |
Eina_Bool elm_gesture_layer_continues_enable_get | ( | const Evas_Object * | obj | ) |
Gets the gesture layer continues enable of an object.
[in] | obj | The gesture-layer |
void elm_gesture_layer_continues_enable_set | ( | Evas_Object * | obj, |
Eina_Bool | continues_enable | ||
) |
Sets the gesture layer continues enable of an object.
[in] | obj | The gesture-layer |
[in] | continues_enable | The continues enable |
double elm_gesture_layer_double_tap_timeout_get | ( | const Evas_Object * | obj | ) |
Gets the gesture layer double tap timeout of an object.
[in] | obj | The gesture-layer |
void elm_gesture_layer_double_tap_timeout_set | ( | Evas_Object * | obj, |
double | double_tap_timeout | ||
) |
Sets the gesture layer double tap timeout of an object.
[in] | obj | The gesture-layer |
[in] | double_tap_timeout | The double tap timeout |
unsigned int elm_gesture_layer_flick_time_limit_ms_get | ( | const Evas_Object * | obj | ) |
Gets the gesture layer flick time limit (in ms) of an object.
[in] | obj | The gesture-layer |
void elm_gesture_layer_flick_time_limit_ms_set | ( | Evas_Object * | obj, |
unsigned int | flick_time_limit_ms | ||
) |
Sets the gesture layer flick time limit (in ms) of an object.
[in] | obj | The gesture-layer |
[in] | flick_time_limit_ms | The flick time limit (in ms) |
Eina_Bool elm_gesture_layer_hold_events_get | ( | const Evas_Object * | obj | ) |
Called to get repeat-events settings.
[in] | obj | The gesture-layer |
void elm_gesture_layer_hold_events_set | ( | Evas_Object * | obj, |
Eina_Bool | hold_events | ||
) |
Makes gesture-layer repeat events.
[in] | obj | The gesture layer |
[in] | hold_events | The boolean value that indicates whether events are held |
double elm_gesture_layer_line_angular_tolerance_get | ( | const Evas_Object * | obj | ) |
Gets the gesture layer line angular tolerance of an object.
[in] | obj | The gesture-layer |
void elm_gesture_layer_line_angular_tolerance_set | ( | Evas_Object * | obj, |
double | line_angular_tolerance | ||
) |
Sets the gesture layer line angular tolerance of an object.
[in] | obj | The gesture-layer |
[in] | line_angular_tolerance | The line angular tolerance |
Evas_Coord elm_gesture_layer_line_distance_tolerance_get | ( | const Evas_Object * | obj | ) |
Gets the gesture layer line distance tolerance of an object.
[in] | obj | The gesture-layer |
void elm_gesture_layer_line_distance_tolerance_set | ( | Evas_Object * | obj, |
Evas_Coord | line_distance_tolerance | ||
) |
Sets the gesture layer line distance tolerance of an object.
[in] | obj | The gesture-layer |
[in] | line_distance_tolerance | The line distance tolerance |
int elm_gesture_layer_line_min_length_get | ( | const Evas_Object * | obj | ) |
Gets the gesture layer line min length of an object.
[in] | obj | The gesture-layer |
void elm_gesture_layer_line_min_length_set | ( | Evas_Object * | obj, |
int | line_min_length | ||
) |
Sets the gesture layer line min length of an object.
[in] | obj | The gesture-layer |
[in] | line_min_length | The length |
double elm_gesture_layer_long_tap_start_timeout_get | ( | const Evas_Object * | obj | ) |
Gets the gesture layer long tap start timeout of an object.
[in] | obj | The gesture-layer |
void elm_gesture_layer_long_tap_start_timeout_set | ( | Evas_Object * | obj, |
double | long_tap_start_timeout | ||
) |
Sets the gesture layer long tap start timeout of an object.
[in] | obj | The gesture-layer |
[in] | long_tap_start_timeout | The long tap start timeout |
double elm_gesture_layer_rotate_angular_tolerance_get | ( | const Evas_Object * | obj | ) |
Gets the gesture layer rotate angular tolerance of an object.
[in] | obj | The gesture-layer |
void elm_gesture_layer_rotate_angular_tolerance_set | ( | Evas_Object * | obj, |
double | rotate_angular_tolerance | ||
) |
Sets the gesture layer rotate angular tolerance of an object.
[in] | obj | The gesture-layer |
[in] | rotate_angular_tolerance | The rotate angular tolerance |
double elm_gesture_layer_rotate_step_get | ( | const Evas_Object * | obj | ) |
Gets the step-value for rotate action.
[in] | obj | The gesture-layer |
void elm_gesture_layer_rotate_step_set | ( | Evas_Object * | obj, |
double | step | ||
) |
Sets the step-value for rotate action.
0
.[in] | obj | The gesture-layer |
[in] | step | The new rotate step value |
Evas_Coord elm_gesture_layer_tap_finger_size_get | ( | const Evas_Object * | obj | ) |
Gets the gesture layer finger-size for taps.
[in] | obj | The gesture-layer |
void elm_gesture_layer_tap_finger_size_set | ( | Evas_Object * | obj, |
Evas_Coord | sz | ||
) |
Sets the gesture layer finger-size for taps.
[in] | obj | The gesture-layer |
[in] | sz | The finger size |
Evas_Coord elm_gesture_layer_zoom_distance_tolerance_get | ( | const Evas_Object * | obj | ) |
Gets the gesture layer zoom distance tolerance of an object.
[in] | obj | The gesture-layer |
void elm_gesture_layer_zoom_distance_tolerance_set | ( | Evas_Object * | obj, |
Evas_Coord | zoom_distance_tolerance | ||
) |
Sets the gesture layer zoom distance tolerance of an object.
[in] | obj | The gesture-layer |
[in] | zoom_distance_tolerance | The zoom distance tolerance |
double elm_gesture_layer_zoom_finger_factor_get | ( | const Evas_Object * | obj | ) |
Gets the gesture layer zoom finger factor of an object.
[in] | obj | The gesture-layer |
void elm_gesture_layer_zoom_finger_factor_set | ( | Evas_Object * | obj, |
double | zoom_finger_factor | ||
) |
Sets the gesture layer zoom finger factor of an object.
[in] | obj | The gesture-layer |
[in] | zoom_finger_factor | The zoom finger factor |
double elm_gesture_layer_zoom_step_get | ( | const Evas_Object * | obj | ) |
Gets the step-value for zoom action.
[in] | obj | The gesture-layer |
void elm_gesture_layer_zoom_step_set | ( | Evas_Object * | obj, |
double | step | ||
) |
Sets the step-value for zoom action.
0
.[in] | obj | The gesture-layer |
[in] | step | The new zoom step value |
double elm_gesture_layer_zoom_wheel_factor_get | ( | const Evas_Object * | obj | ) |
Gets the gesture layer zoom wheel factor of an object.
[in] | obj | The gesture-layer |
void elm_gesture_layer_zoom_wheel_factor_set | ( | Evas_Object * | obj, |
double | zoom_wheel_factor | ||
) |
Sets the gesture layer zoom wheel factor of an object.
[in] | obj | The gesture-layer |
[in] | zoom_wheel_factor | The zoom wheel factor |