Tizen Native API
3.0
|
Generate touch and key events.
Required Header
#include <efl_util.h>
Overview
The EFL UTIL API provides functions to initialize/deinitialize input devices and to generation touch / key events.
Functions | |
efl_util_inputgen_h | efl_util_input_initialize_generator (unsigned int dev_type) |
Initializes system and check input generate functions are supported, open devices generated events. | |
int | efl_util_input_deinitialize_generator (efl_util_inputgen_h inputgen_h) |
Deinitializes system and close opened devices. | |
int | efl_util_input_generate_key (efl_util_inputgen_h inputgen_h, const char *key_name, int pressed) |
Generates all of key events using a opened device. | |
int | efl_util_input_generate_touch (efl_util_inputgen_h inputgen_h, int idx, efl_util_input_touch_type_e touch_type, int x, int y) |
Generates a touch event using a opened device. | |
int | efl_util_input_generate_pointer (efl_util_inputgen_h inputgen_h, int buttons, efl_util_input_pointer_type_e pointer_type, int x, int y) |
Generate a pointer event using a opened device. | |
Typedefs | |
typedef struct _efl_util_inputgen_h * | efl_util_inputgen_h |
Definition for the input generator handle. |
Typedef Documentation
typedef struct _efl_util_inputgen_h* efl_util_inputgen_h |
Definition for the input generator handle.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
Enumeration Type Documentation
Enumeration of device type generated events.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Enumerator:
Enumeration of touch event types.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Enumerator:
Function Documentation
int efl_util_input_deinitialize_generator | ( | efl_util_inputgen_h | inputgen_h | ) |
Deinitializes system and close opened devices.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Privilege Level:
- platform
- Privilege:
- http://tizen.org/privilege/inputgenerator
- Parameters:
-
[in] inputgen_h The efl_util_inputgen_h handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
EFL_UTIL_ERROR_NONE Successful EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
int efl_util_input_generate_key | ( | efl_util_inputgen_h | inputgen_h, |
const char * | key_name, | ||
int | pressed | ||
) |
Generates all of key events using a opened device.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Privilege Level:
- platform
- Privilege:
- http://tizen.org/privilege/inputgenerator
- Parameters:
-
[in] inputgen_h The efl_util_inputgen_h handle [in] key_name The key name want to generate [in] pressed The value that select key press or release (0: release, 1: press)
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
EFL_UTIL_ERROR_NONE Successful EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate key
int efl_util_input_generate_pointer | ( | efl_util_inputgen_h | inputgen_h, |
int | buttons, | ||
efl_util_input_pointer_type_e | pointer_type, | ||
int | x, | ||
int | y | ||
) |
Generate a pointer event using a opened device.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Privilege Level:
- platform
- Privilege:
- http://tizen.org/privilege/inputgenerator
- Parameters:
-
[in] inputgen_h The efl_util_inputgen_h handle [in] buttons The number of button [in] pointer_type The pointer type (ex> EFL_UTIL_INPUT_POINTER_BUTTON_PRESS, EFL_UTIL_INPUT_POINTER_BUTTON_UP, EFL_UTIL_INPUT_POINTER_MOVE) [in] x x coordination to move [in] y y coordination to move
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
EFL_UTIL_ERROR_NONE Successful EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate pointer EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
int efl_util_input_generate_touch | ( | efl_util_inputgen_h | inputgen_h, |
int | idx, | ||
efl_util_input_touch_type_e | touch_type, | ||
int | x, | ||
int | y | ||
) |
Generates a touch event using a opened device.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Privilege Level:
- platform
- Privilege:
- http://tizen.org/privilege/inputgenerator
- Parameters:
-
[in] inputgen_h The efl_util_inputgen_h handle [in] idx The index of touched finger [in] touch_type The touch type (ex> EFL_UTIL_INPUT_TOUCH_BEGIN, EFL_UTIL_INPUT_TOUCH_UPDATE, EFL_UTIL_INPUT_TOUCH_END) [in] x The x axis of touch point [in] y The y axis of touch point
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
EFL_UTIL_ERROR_NONE Successful EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate touch
efl_util_inputgen_h efl_util_input_initialize_generator | ( | unsigned int | dev_type | ) |
Initializes system and check input generate functions are supported, open devices generated events.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Privilege Level:
- platform
- Privilege:
- http://tizen.org/privilege/inputgenerator
- Remarks:
- The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- The dev_type is changed into the unsigned int to perform bitwise operations. (Since 3.0)
- Parameters:
-
[in] dev_type The device type want to generate events (ex> EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN | EFL_UTIL_INPUT_DEVTYPE_KEYBOARD)
- Returns:
- efl_util_inputgen_h on success, otherwise
NULL
- Return values:
-
efl_util_inputgen_h The input generator handle
- Exceptions:
-
EFL_UTIL_ERROR_NONE Successful EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address EFL_UTIL_ERROR_INVALID_OPERATION Function not implemented EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure