Tizen Native API  5.0
EFL UTIL GESTURE

Handling global gesture events.

Required Header

#include <efl_util.h>

Overview

The EFL UTIL API provides functions to grab / select / activate global gestures and propagate these events to Ecore_Event.

Functions

efl_util_gesture_h efl_util_gesture_initialize (void)
 Initializes system and check if global gestures are supported.
int efl_util_gesture_deinitialize (efl_util_gesture_h gesture_h)
 Deinitializes system.
efl_util_gesture_data efl_util_gesture_edge_swipe_new (efl_util_gesture_h gesture_h, unsigned int fingers, efl_util_gesture_edge_e edge)
 Generates a edge swipe gesture's grab info handle.
int efl_util_gesture_edge_swipe_free (efl_util_gesture_h gesture_h, efl_util_gesture_data data)
 Frees a memory of edge swipe gesture's grab info handle.
int efl_util_gesture_edge_swipe_size_set (efl_util_gesture_data data, efl_util_gesture_edge_size_e edge_size, unsigned int start_point, unsigned int end_point)
 Sets a specific size of edge for edge swipe gesture.
efl_util_gesture_data efl_util_gesture_edge_drag_new (efl_util_gesture_h gesture_h, unsigned int fingers, efl_util_gesture_edge_e edge)
 Generates a edge drag gesture's grab info handle.
int efl_util_gesture_edge_drag_free (efl_util_gesture_h gesture_h, efl_util_gesture_data data)
 Frees a memory of edge drag gesture's grab info handle.
int efl_util_gesture_edge_drag_size_set (efl_util_gesture_data data, efl_util_gesture_edge_size_e edge_size, unsigned int start_point, unsigned int end_point)
 Sets a specific size of edge for edge drag gesture.
efl_util_gesture_data efl_util_gesture_tap_new (efl_util_gesture_h gesture_h, unsigned int fingers, unsigned int repeats)
 Generates a tap gesture's grab info handle.
int efl_util_gesture_tap_free (efl_util_gesture_h gesture_h, efl_util_gesture_data data)
 Frees a memory of tap gesture's grab info handle.
efl_util_gesture_data efl_util_gesture_palm_cover_new (efl_util_gesture_h gesture_h)
 Generates a palm cover gesture's grab info handle.
int efl_util_gesture_palm_cover_free (efl_util_gesture_h gesture_h, efl_util_gesture_data data)
 Frees a memory of palm cover gesture's grab info handle.
int efl_util_gesture_grab (efl_util_gesture_h gesture_h, efl_util_gesture_data data)
 Grabs a global gesture.
int efl_util_gesture_ungrab (efl_util_gesture_h gesture_h, efl_util_gesture_data data)
 Ungrabs a global gesture.
int efl_util_gesture_select (efl_util_gesture_h gesture_h, Evas_Object *window, efl_util_gesture_data data)
 Selects a global gesture on given window.
int efl_util_gesture_deselect (efl_util_gesture_h gesture_h, Evas_Object *window, efl_util_gesture_data data)
 Deselects a global gesture on given window.
int efl_util_gesture_activate_set (efl_util_gesture_h gesture_h, unsigned int type, Eina_Bool active)
 Activates or deactivates a global gesture.
int efl_util_gesture_activate_set_on_window (efl_util_gesture_h gesture_h, Evas_Object *window, unsigned int type, Eina_Bool active)
 Activates or deactivates a global gesture on given window.

Typedefs

typedef struct
_efl_util_gesture_h * 
efl_util_gesture_h
 Definition for the gesture handle.
typedef enum
_efl_util_gesture_type_e 
efl_util_gesture_type_e
 Enumeration of gesture type.
typedef enum
_efl_util_gesture_mode_e 
efl_util_gesture_mode_e
 Enumeration of gesture mode.
typedef enum
_efl_util_gesture_edge_e 
efl_util_gesture_edge_e
 Enumeration of gesture edge.
typedef enum
_efl_util_gesture_edge_size_e 
efl_util_gesture_edge_size_e
 Enumeration of gesture edge size.
typedef void * efl_util_gesture_data
 Definition for the gesture data handle.
typedef struct
_efl_util_event_gesture_edge_swipe_s 
efl_util_event_gesture_edge_swipe_s
 Definition for the edge swipe gesture's event data structure.
typedef struct
efl_util_event_gesture_edge_drag_s 
efl_util_event_gesture_edge_drag_s
 Definition for the edge drag gesture's event data structure.
typedef struct
_efl_util_event_gesture_tap_s 
efl_util_event_gesture_tap_s
 Definition for the tap gesture's event data structure.
typedef struct
_efl_util_event_gesture_palm_cover_s 
efl_util_event_gesture_palm_cover_s
 Definition for the palm cover gesture's event data structure.

Typedef Documentation

Definition for the edge drag gesture's event data structure.

Since :
4.0

Definition for the edge swipe gesture's event data structure.

Since :
4.0

Definition for the palm cover gesture's event data structure.

Since :
4.0

Definition for the tap gesture's event data structure.

Since :
4.0
typedef void* efl_util_gesture_data

Definition for the gesture data handle.

Since :
4.0

Enumeration of gesture edge.

Since :
4.0

Enumeration of gesture edge size.

Since :
4.0
typedef struct _efl_util_gesture_h* efl_util_gesture_h

Definition for the gesture handle.

Since :
4.0

Enumeration of gesture mode.

Since :
4.0

Enumeration of gesture type.

Since :
4.0

Enumeration Type Documentation

Enumeration of gesture edge.

Since :
4.0
Enumerator:
EFL_UTIL_GESTURE_EDGE_NONE 

None edge point

EFL_UTIL_GESTURE_EDGE_TOP 

Top edge position of screen

EFL_UTIL_GESTURE_EDGE_RIGHT 

Right edge position of screen

EFL_UTIL_GESTURE_EDGE_BOTTOM 

Bottom edge position of screen

EFL_UTIL_GESTURE_EDGE_LEFT 

Left edge position of screen

Enumeration of gesture edge size.

Since :
4.0
Enumerator:
EFL_UTIL_GESTURE_EDGE_SIZE_NONE 

None size of edge

EFL_UTIL_GESTURE_EDGE_SIZE_FULL 

Full size in the edge

EFL_UTIL_GESTURE_EDGE_SIZE_PARTIAL 

Part of edge

Enumeration of gesture mode.

Since :
4.0
Enumerator:
EFL_UTIL_GESTURE_MODE_NONE 

None gesture mode

EFL_UTIL_GESTURE_MODE_BEGIN 

Begin a gesture event

EFL_UTIL_GESTURE_MODE_UPDATE 

continually update a gesture event

EFL_UTIL_GESTURE_MODE_END 

End a gesture event

EFL_UTIL_GESTURE_MODE_DONE 

Occur a gesture event

Enumeration of gesture type.

Since :
4.0
Enumerator:
EFL_UTIL_GESTURE_TYPE_NONE 

None gesture type

EFL_UTIL_GESTURE_TYPE_EDGE_SWIPE 

Edge swipe gesture type

EFL_UTIL_GESTURE_TYPE_EDGE_DRAG 

Edge drag gesture type

EFL_UTIL_GESTURE_TYPE_TAP 

Tap gesture type

EFL_UTIL_GESTURE_TYPE_PALM_COVER 

Palm cover gesture type

EFL_UTIL_GESTURE_TYPE_PAN 

Pan gesture type

EFL_UTIL_GESTURE_TYPE_PINCH 

Pinch gesture type

EFL_UTIL_GESTURE_TYPE_PALM_SWIPE 

Palm swipe gesture type


Function Documentation

int efl_util_gesture_activate_set ( efl_util_gesture_h  gesture_h,
unsigned int  type,
Eina_Bool  active 
)

Activates or deactivates a global gesture.

Warning:
This is not for use by third-party applications.
Since :
4.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/gestureactivation
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]typeThe gesture type to activate /deactivate combined by efl_util_gesture_type_e to bitwise operation
[in]activeThe activated boolean value
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_PERMISSION_DENIEDPermission denied
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory allocation failure
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available
int efl_util_gesture_activate_set_on_window ( efl_util_gesture_h  gesture_h,
Evas_Object window,
unsigned int  type,
Eina_Bool  active 
)

Activates or deactivates a global gesture on given window.

Since :
4.0
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]windowThe efl window
[in]typeThe gesture type to activate /deactivate combined by efl_util_gesture_type_e to bitwise operation
[in]activeThe activated boolean value
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory allocation failure
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available

Deinitializes system.

Since :
4.0
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
See also:
efl_util_gesture_initialize()

Deselects a global gesture on given window.

Since :
4.0
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]windowThe efl window
[in]dataThe efl_util_gesture_data handle
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory allocation failure
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available

Frees a memory of edge drag gesture's grab info handle.

Since :
4.0
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]dataThe efl_util_gesture_data handle
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter

Generates a edge drag gesture's grab info handle.

Since :
4.0
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]fingersThe number of fingers
[in]edgeThe position of edge
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Returns:
efl_util_gesture_data on success, otherwise NULL
Return values:
efl_util_gesture_dataThe specific gesture data handle
Exceptions:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory allocation failure
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available
int efl_util_gesture_edge_drag_size_set ( efl_util_gesture_data  data,
efl_util_gesture_edge_size_e  edge_size,
unsigned int  start_point,
unsigned int  end_point 
)

Sets a specific size of edge for edge drag gesture.

Since :
4.0
Parameters:
[in]dataThe efl_util_gesture_data handle
[in]edge_sizeThe efl_util_gesture_edge_size_e enum
[in]start_pointThe start point of edge area
[in]end_pointThe end point of edge area
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available

Frees a memory of edge swipe gesture's grab info handle.

Since :
4.0
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]dataThe efl_util_gesture_data handle
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter

Generates a edge swipe gesture's grab info handle.

Since :
4.0
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]fingersThe number of fingers
[in]edgeThe position of edge
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Returns:
efl_util_gesture_data on success, otherwise NULL
Return values:
efl_util_gesture_dataThe specific gesture data handle
Exceptions:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory allocation failure
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available
int efl_util_gesture_edge_swipe_size_set ( efl_util_gesture_data  data,
efl_util_gesture_edge_size_e  edge_size,
unsigned int  start_point,
unsigned int  end_point 
)

Sets a specific size of edge for edge swipe gesture.

Since :
4.0
Parameters:
[in]dataThe efl_util_gesture_data handle
[in]edge_sizeThe efl_util_gesture_edge_size_e enum
[in]start_pointThe start point of edge area
[in]end_pointThe end point of edge area
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available

Grabs a global gesture.

Warning:
This is not for use by third-party applications.
Since :
4.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/gesturegrab
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]dataThe efl_util_gesture_data handle.
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_PERMISSION_DENIEDPermission denied
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory allocation failure
EFL_UTIL_ERROR_NOT_SUPPORTEDNot supported
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available

Initializes system and check if global gestures are supported.

Since :
4.0
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Returns:
efl_util_gesture_h on success, otherwise NULL
Return values:
efl_util_gesture_hThe global gesture handle
Exceptions:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory allocation failure
EFL_UTIL_ERROR_NOT_SUPPORTEDNot supported
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available
See also:
efl_util_gesture_deinitialize()

Frees a memory of palm cover gesture's grab info handle.

Since :
4.0
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]dataThe efl_util_gesture_data handle
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter

Generates a palm cover gesture's grab info handle.

Since :
4.0
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Returns:
efl_util_gesture_data on success, otherwise NULL
Return values:
efl_util_gesture_dataThe specific gesture data handle
Exceptions:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory allocation failure
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available

Selects a global gesture on given window.

Since :
4.0
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]windowThe efl window
[in]dataThe efl_util_gesture_data handle.
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory allocation failure
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available

Frees a memory of tap gesture's grab info handle.

Since :
4.0
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]dataThe efl_util_gesture_data handle
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
efl_util_gesture_data efl_util_gesture_tap_new ( efl_util_gesture_h  gesture_h,
unsigned int  fingers,
unsigned int  repeats 
)

Generates a tap gesture's grab info handle.

Since :
4.0
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]fingersThe number of fingers
[in]repeatsThe number of repeats
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Returns:
efl_util_gesture_data on success, otherwise NULL
Return values:
efl_util_gesture_dataThe specific gesture data handle
Exceptions:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory allocation failure
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available

Ungrabs a global gesture.

Warning:
This is not for use by third-party applications.
Since :
4.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/gesturegrab
Parameters:
[in]gesture_hThe efl_util_gesture_h handle
[in]dataThe efl_util_gesture_data handle.
Returns:
0 on success, otherwise a negative error value
Return values:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_PERMISSION_DENIEDPermission denied
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory allocation failure
EFL_UTIL_ERROR_NOT_SUPPORTEDNot supported
EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLEResource is not available

Variable Documentation

Definition for the edge swipe gesture event.

Since :
4.0

Definition for the edge swipe gesture event.

Since :
4.0

Definition for the palm cover gesture event.

Since :
4.0

Definition for the tap gesture event.

Since :
4.0