Tizen Native API  3.0
EFL UTIL INPUT

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 :
2.4

Enumeration Type Documentation

Enumeration of device type generated events.

Warning:
This is not for use by third-party applications.
Since :
2.4
Enumerator:
EFL_UTIL_INPUT_DEVTYPE_NONE 

(Deprecated since 3.0.)

EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN 

Touch Screen device

EFL_UTIL_INPUT_DEVTYPE_KEYBOARD 

Keyboard device

EFL_UTIL_INPUT_DEVTYPE_POINTER 

Mouse device (Since 3.0)

EFL_UTIL_INPUT_DEVTYPE_ALL 

Both of touch screen and keyboard device (Deprecated since 3.0. Check all enumerations using OR operand instead)

EFL_UTIL_INPUT_DEVTYPE_MAX 

(Deprecated since 3.0.)

Enumeration of pointer event types.

Warning:
This is not for use by third-party applications.
Since :
3.0
Enumerator:
EFL_UTIL_INPUT_POINTER_BUTTON_DOWN 

Mouse button press.

EFL_UTIL_INPUT_POINTER_BUTTON_UP 

Mouse move.

EFL_UTIL_INPUT_POINTER_MOVE 

Mouse button release.

Enumeration of touch event types.

Warning:
This is not for use by third-party applications.
Since :
2.4
Enumerator:
EFL_UTIL_INPUT_TOUCH_NONE 

(Deprecated since 3.0.)

EFL_UTIL_INPUT_TOUCH_BEGIN 

Finger press. It is same a behavior put your finger on touch screen

EFL_UTIL_INPUT_TOUCH_UPDATE 

Finger move. It is same a behavior move your finger on touch screen

EFL_UTIL_INPUT_TOUCH_END 

Finger release. It is same a behavior release your finger on touch screen

EFL_UTIL_INPUT_TOUCH_MAX 

(Deprecated since 3.0.)


Function Documentation

Deinitializes system and close opened devices.

Warning:
This is not for use by third-party applications.
Since :
2.4
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/inputgenerator
Parameters:
[in]inputgen_hThe efl_util_inputgen_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_input_initialize_generator()
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 :
2.4
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/inputgenerator
Parameters:
[in]inputgen_hThe efl_util_inputgen_h handle
[in]key_nameThe key name want to generate
[in]pressedThe 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_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_PERMISSION_DENIEDHas 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_hThe efl_util_inputgen_h handle
[in]buttonsThe number of button
[in]pointer_typeThe pointer type (ex> EFL_UTIL_INPUT_POINTER_BUTTON_PRESS, EFL_UTIL_INPUT_POINTER_BUTTON_UP, EFL_UTIL_INPUT_POINTER_MOVE)
[in]xx coordination to move
[in]yy coordination to move
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_DENIEDHas no permission to generate pointer
EFL_UTIL_ERROR_NO_SUCH_DEVICENo such device or address
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory 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 :
2.4
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/inputgenerator
Parameters:
[in]inputgen_hThe efl_util_inputgen_h handle
[in]idxThe index of touched finger
[in]touch_typeThe touch type (ex> EFL_UTIL_INPUT_TOUCH_BEGIN, EFL_UTIL_INPUT_TOUCH_UPDATE, EFL_UTIL_INPUT_TOUCH_END)
[in]xThe x axis of touch point
[in]yThe y axis of touch point
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_DENIEDHas no permission to generate touch

Initializes system and check input generate functions are supported, open devices generated events.

Warning:
This is not for use by third-party applications.
Since :
2.4
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_typeThe 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_hThe input generator handle
Exceptions:
EFL_UTIL_ERROR_NONESuccessful
EFL_UTIL_ERROR_INVALID_PARAMETERInvalid parameter
EFL_UTIL_ERROR_NO_SUCH_DEVICENo such device or address
EFL_UTIL_ERROR_INVALID_OPERATIONFunction not implemented
EFL_UTIL_ERROR_OUT_OF_MEMORYMemory allocation failure
See also:
efl_util_input_deinitialize_generator()