input_generator: add a API to set touch count
[platform/core/api/efl-util.git] / include / efl_util.h
1 /*
2  * Copyright (c) 2011-2017 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __TIZEN_UI_EFL_UTIL_H__
18 #define __TIZEN_UI_EFL_UTIL_H__
19
20 #include <tizen.h>
21 #include <Evas.h>
22 #include <tbm_surface.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 #ifdef __GNUC__
29 # if __GNUC__ >= 4
30 #  ifndef API
31 #   define API __attribute__ ((visibility("default")))
32 #  endif
33 # endif
34 #endif
35
36 /**
37  * @file efl_util.h
38  */
39
40 /**
41  * @addtogroup CAPI_EFL_UTIL_WIN_PROPERTY_MODULE
42  * @{
43  */
44
45 /**
46  * @brief Enumeration for EFL UTIL ERROR.
47  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
48  */
49 typedef enum
50 {
51    EFL_UTIL_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
52    EFL_UTIL_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
53    EFL_UTIL_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
54    EFL_UTIL_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
55    EFL_UTIL_ERROR_NO_SUCH_DEVICE = TIZEN_ERROR_NO_SUCH_DEVICE, /**< @platform No such device or address (@b Since: @if WEARABLE 3.0 @else 2.4 @endif) */
56    EFL_UTIL_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< @platform Function not implemented (@b Since: @if WEARABLE 3.0 @else 2.4 @endif) */
57    EFL_UTIL_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< @platform Not supported (@b Since: @if WEARABLE 3.0 @else 2.4 @endif) */
58    EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE = TIZEN_ERROR_EFL_UTIL | 0x01, /**< Window type not supported */
59    EFL_UTIL_ERROR_SCREENSHOT_INIT_FAIL = TIZEN_ERROR_EFL_UTIL | 0x02,  /**< @platform Screenshot initialization fail (@b Since: @if WEARABLE 3.0 @else 2.4 @endif) */
60    EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL = TIZEN_ERROR_EFL_UTIL | 0x03,  /**< @platform Screenshot execution fail (@b Since: @if WEARABLE 3.0 @else 2.4 @endif) */
61    EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE = TIZEN_ERROR_EFL_UTIL | 0x04 /**< Resource is not available (@b Since: 4.0) */
62 } efl_util_error_e;
63
64 /**
65  * @brief Enumeration of notification window's priority level.
66  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
67  */
68 typedef enum
69 {
70    EFL_UTIL_NOTIFICATION_LEVEL_NONE    = -1, /**< No (reset) notification level. This value makes the window place in normal layer. (@b Since: @if WEARABLE 3.0 @else 2.4 @endif) */
71    EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT = 10, /**< Default notification level. (@b Since: @if WEARABLE 3.0 @else 2.4 @endif) */
72    EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM  = 20, /**< Higher notification level than default. (@b Since: @if WEARABLE 3.0 @else 2.4 @endif) */
73    EFL_UTIL_NOTIFICATION_LEVEL_HIGH    = 30, /**< Higher notification level than medium. (@b Since: @if WEARABLE 3.0 @else 2.4 @endif) */
74    EFL_UTIL_NOTIFICATION_LEVEL_TOP     = 40  /**< The highest notification level. (@b Since: @if WEARABLE 3.0 @else 2.4 @endif) */
75 } efl_util_notification_level_e;
76
77 /**
78  * @brief Enumeration of screen mode.
79  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
80  */
81 typedef enum
82 {
83    EFL_UTIL_SCREEN_MODE_DEFAULT, /**< The mode which turns the screen off after a timeout. */
84    EFL_UTIL_SCREEN_MODE_ALWAYS_ON, /**< The mode which keeps the screen turned on. */
85 } efl_util_screen_mode_e;
86
87 /**
88  * @brief Sets the priority level for the specified notification window.
89  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
90  * @privlevel public
91  * @privilege %http://tizen.org/privilege/window.priority.set
92  * @remarks This API can be used for a notification type window only.
93  *          Up to the version @if WEARABLE 2.3.1 @else 2.4 @endif, it supports as async APIs.
94  *          But it is synchronous call since Tizen 3.0
95  * @param[in] window The EFL window
96  * @param[in] level The notification window level
97  * @return @c 0 on success, otherwise a negative error value
98  * @retval #EFL_UTIL_ERROR_NONE Successful
99  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
100  * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE Window type not supported
101  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
102  */
103 API int efl_util_set_notification_window_level(Evas_Object *window, efl_util_notification_level_e level);
104
105 /**
106  * @brief Gets the priority level for the specified notification window.
107  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
108  *
109  * @remarks This API can be used for a notification type window only.
110  *          Up to the version @if WEARABLE 2.3.1 @else 2.4 @endif, it supports as async APIs.
111  *          But it is synchronous call since Tizen 3.0
112  * @param[in] window The EFL window
113  * @param[out] level The notification window level
114  * @return @c 0 on success, otherwise a negative error value
115  * @retval #EFL_UTIL_ERROR_NONE Successful
116  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
117  * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE Window type not supported
118  */
119 API int efl_util_get_notification_window_level(Evas_Object *window, efl_util_notification_level_e *level);
120
121 /**
122  * @brief Sets the alpha window's visual state to opaque state.
123  * @details This API sets the alpha window's visual state to opaque state.
124  *          If the alpha window sets the visual state to the opaque,
125  *          then the window manager could handle it as the opaque window while calculating visibility.
126  *          This API will have no effect when used by a non-alpha window.
127  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
128  * @param[in] window The EFL window
129  * @param[in] opaque The value that indicates whether the window has set a visual state to opaque (0: unset, 1: set)
130  * @return @c 0 on success, otherwise a negative error value
131  * @retval #EFL_UTIL_ERROR_NONE Successful
132  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
133  */
134 API int efl_util_set_window_opaque_state(Evas_Object *window, int opaque);
135
136 /**
137  * @brief Sets the window's screen mode.
138  * @details This API is useful when the application need to keep the display turned on.
139  *          If the application set the mode to #EFL_UTIL_SCREEN_MODE_ALWAYS_ON to its window and the window is shown wholly or partially,
140  *          the window manager requests the display system to keep the display on as long as the window is shown.
141  *          If the window is no longer shown, then the window manger request the display system to go back to normal operation.
142  *          Default screen mode of window is #EFL_UTIL_SCREEN_MODE_DEFAULT.
143  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
144  * @privlevel public
145  * @privilege %http://tizen.org/privilege/display
146  * @remarks This API needs the privilege.
147  *          If the application which is not get the privilege use this API, the window manager generates the permission deny error.
148  * @param[in] window The EFL window
149  * @param[in] mode The screen mode
150  * @return @c 0 on success, otherwise a negative error value
151  * @retval #EFL_UTIL_ERROR_NONE Successful
152  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
153  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
154  */
155 API int efl_util_set_window_screen_mode(Evas_Object *window, efl_util_screen_mode_e mode);
156
157 /**
158  * @brief Gets the screen mode of the specified window.
159  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
160  * @param[in] window The EFL window
161  * @param[out] mode The screen mode
162  * @return @c 0 on success, otherwise a negative error value
163  * @retval #EFL_UTIL_ERROR_NONE Successful
164  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
165  */
166 API int efl_util_get_window_screen_mode(Evas_Object *window, efl_util_screen_mode_e *mode);
167
168 /**
169  * @brief Sets the user's preferred brightness of the specified window.
170  * @details This API is useful when the application need to change the brightness of the screen when it is appeared on the screen.
171  *          If the application sets the brightness 0 to 100 to its window and the application window is shown wholly or partially,
172  *          the window manager requests the display system to change the brightness of the screen using user's preferred brightness.
173  *          If the window is no longer shown, then the window manger request the display system to go back to default brightness.
174  *          If the brightness is less than 0, this means to use the default screen brightness.
175  * @since_tizen 3.0
176  * @privlevel public
177  * @privilege %http://tizen.org/privilege/display
178  * @remarks This API needs the privilege.
179  *          If the application which is not get the privilege use this API, the window manager generates the permission deny error.
180  * @param[in] window The EFL window
181  * @param[in] brightness The preferred brightness
182  * @return @c 0 on success, otherwise a negative error value
183  * @retval #EFL_UTIL_ERROR_NONE Successful
184  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
185  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
186  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Out of memory
187  * @see efl_util_get_window_brightness()
188  */
189 API int efl_util_set_window_brightness(Evas_Object *window, int brightness);
190
191 /**
192  * @brief Gets the user's preferred brightness of the specified window.
193  * @since_tizen 3.0
194  * @param[in] window The EFL window
195  * @param[out] brightness The preferred brightness
196  * @return @c 0 on success, otherwise a negative error value
197  * @retval #EFL_UTIL_ERROR_NONE Successful
198  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
199  * @see efl_util_set_window_brightness()
200  */
201 API int efl_util_get_window_brightness(Evas_Object *window, int *brightness);
202
203
204 /**
205  * @}
206  */
207
208 /**
209  * @addtogroup CAPI_EFL_UTIL_INPUT_MODULE
210  * @{
211  */
212
213  /**
214   * @platform
215   * @brief Definition for the input generator handle.
216   * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
217   */
218
219  typedef struct _efl_util_inputgen_h * efl_util_inputgen_h;
220
221 /**
222  * @platform
223  * @brief Enumeration of device type generated events.
224  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
225  */
226 typedef enum
227 {
228    EFL_UTIL_INPUT_DEVTYPE_NONE = 0x0, /**< (Deprecated since 3.0.) */
229    EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN = (1 << 0), /**< Touch Screen device */
230    EFL_UTIL_INPUT_DEVTYPE_KEYBOARD = (1 << 1), /**< Keyboard device */
231    EFL_UTIL_INPUT_DEVTYPE_POINTER = (1 << 2), /**< Mouse device (Since 3.0) */
232    EFL_UTIL_INPUT_DEVTYPE_ALL = EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN |
233                                 EFL_UTIL_INPUT_DEVTYPE_KEYBOARD, /**< Both of touch screen and keyboard device (Deprecated since 3.0. Check all enumerations using OR operand instead) */
234    EFL_UTIL_INPUT_DEVTYPE_MAX = (1 << 10) /**< (Deprecated since 3.0.) */
235 } efl_util_input_device_type_e;
236
237 /**
238  * @platform
239  * @brief Enumeration of touch event types.
240  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
241  */
242 typedef enum
243 {
244    EFL_UTIL_INPUT_TOUCH_NONE, /**< (Deprecated since 3.0.) */
245    EFL_UTIL_INPUT_TOUCH_BEGIN, /**< Finger press. It is same a behavior put your finger on touch screen */
246    EFL_UTIL_INPUT_TOUCH_UPDATE, /**< Finger move. It is same a behavior move your finger on touch screen */
247    EFL_UTIL_INPUT_TOUCH_END, /**< Finger release. It is same a behavior release your finger on touch screen */
248    EFL_UTIL_INPUT_TOUCH_MAX = 10 /**< (Deprecated since 3.0.) */
249 } efl_util_input_touch_type_e;
250
251 /**
252  * @platform
253  * @brief Enumeration of pointer event types.
254  * @since_tizen 3.0
255  */
256 typedef enum
257 {
258    EFL_UTIL_INPUT_POINTER_BUTTON_DOWN, /**< Mouse button press. */
259    EFL_UTIL_INPUT_POINTER_BUTTON_UP, /**< Mouse move. */
260    EFL_UTIL_INPUT_POINTER_MOVE, /**< Mouse button release. */
261 } efl_util_input_pointer_type_e;
262
263 /**
264  * @platform
265  * @brief Enumeration of pointer wheel event types.
266  * @since_tizen 5.5
267  */
268 typedef enum
269 {
270    EFL_UTIL_INPUT_POINTER_WHEEL_VERT, /**< Vertical wheel. */
271    EFL_UTIL_INPUT_POINTER_WHEEL_HORZ, /**< Horizontal wheel. */
272 } efl_util_input_pointer_wheel_type_e;
273
274 /**
275    * @platform
276    * @brief Initializes system and check input generate functions are supported, open devices generated events.
277    * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
278    * @privlevel platform
279    * @privilege %http://tizen.org/privilege/inputgenerator
280    * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
281    * @remarks The dev_type is changed into the unsigned int to perform bitwise operations. (Since 3.0)
282    * @param[in] dev_type The device type want to generate events (ex> #EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN | #EFL_UTIL_INPUT_DEVTYPE_KEYBOARD)
283    * @return #efl_util_inputgen_h on success, otherwise @c NULL
284    * @retval #efl_util_inputgen_h The input generator handle
285    * @exception #EFL_UTIL_ERROR_NONE Successful
286    * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
287    * @exception #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
288    * @exception #EFL_UTIL_ERROR_INVALID_OPERATION Function not implemented
289    * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
290    * @exception #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to initialize input generator
291    * @see efl_util_input_deinitialize_generator()
292    */
293 API efl_util_inputgen_h efl_util_input_initialize_generator(unsigned int dev_type);
294
295 /**
296    * @platform
297    * @brief Initializes system, check input generate functions are supported and then open events generator devices with given name.
298    * @since_tizen 4.0
299    * @privlevel platform
300    * @privilege %http://tizen.org/privilege/inputgenerator
301    * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
302    * @remarks The dev_type is changed into the unsigned int to perform bitwise operations.
303    * @param[in] dev_type The device type want to generate events (ex> #EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN | #EFL_UTIL_INPUT_DEVTYPE_KEYBOARD)
304    * @param[in] name The device name (maximum 31 characters)
305    * @return #efl_util_inputgen_h on success, otherwise @c NULL
306    * @retval #efl_util_inputgen_h The input generator handle
307    * @exception #EFL_UTIL_ERROR_NONE Successful
308    * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
309    * @exception #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
310    * @exception #EFL_UTIL_ERROR_INVALID_OPERATION Function not implemented
311    * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
312    * @exception #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to initialize input generator
313    * @see efl_util_input_deinitialize_generator()
314    */
315 API efl_util_inputgen_h efl_util_input_initialize_generator_with_name(unsigned int dev_type, const char *name);
316
317 /**
318    * @platform
319    * @brief Initializes the system, checks if input generated functions are supported and then open events generator devices synchronously.
320    * @since_tizen 5.0
321    * @privlevel platform
322    * @privilege %http://tizen.org/privilege/inputgenerator
323    * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
324    * @remarks @a dev_type is changed into the unsigned int to perform bitwise operations.
325    * @remarks If the @a name is NULL, it will be set to "Input Generator"
326    * @remarks The returned object should be released with efl_util_input_deinitialize_generator().
327    * @param[in] dev_type The device type to generate events, values of #efl_util_input_device_type_e combined with bitwise 'or'\n
328    *            Example: #EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN | #EFL_UTIL_INPUT_DEVTYPE_KEYBOARD
329    * @param[in] name The device name (maximum 31 characters, can be NULL)
330    * @return #efl_util_inputgen_h on success, otherwise @c NULL
331    * @retval #efl_util_inputgen_h The input generator handle
332    * @exception #EFL_UTIL_ERROR_NONE Successful
333    * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
334    * @exception #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
335    * @exception #EFL_UTIL_ERROR_INVALID_OPERATION Function not implemented
336    * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
337    * @exception #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to initialize input generator
338    * @see efl_util_input_deinitialize_generator()
339    */
340 API efl_util_inputgen_h efl_util_input_initialize_generator_with_sync(unsigned int dev_type, const char *name);
341
342 /**
343    * @platform
344    * @brief Requests to set the maximum touch count.
345    * @since_tizen 6.5
346    * @privlevel platform
347    * @privilege %http://tizen.org/privilege/inputgenerator
348    * @remarks If you would like to generate more touch count supported than the display server supports,
349               you can use this API to increase the maximum touch count.
350               Note that this API returns success only when there is no configuration enabled
351               about maximum touch count in the display server.
352    * @param[in] max_count The maximum number of touches want to generate.
353    * @return @c 0 on success, otherwise a negative error value
354    * @retval #EFL_UTIL_ERROR_NONE Successful
355    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
356    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to deinitialize input generator
357    * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
358    */
359 API int efl_util_input_set_touch_count(int max_count);
360
361 /**
362    * @platform
363    * @brief Deinitializes system and close opened devices.
364    * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
365    * @privlevel platform
366    * @privilege %http://tizen.org/privilege/inputgenerator
367    * @param[in] inputgen_h The #efl_util_inputgen_h handle
368    * @return @c 0 on success, otherwise a negative error value
369    * @retval #EFL_UTIL_ERROR_NONE Successful
370    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
371    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to deinitialize input generator
372    * @see efl_util_input_initialize_generator()
373    */
374 API int efl_util_input_deinitialize_generator(efl_util_inputgen_h inputgen_h);
375
376 /**
377    * @platform
378    * @brief Generates all of key events using a opened device.
379    * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
380    * @privlevel platform
381    * @privilege %http://tizen.org/privilege/inputgenerator
382    * @param[in] inputgen_h The #efl_util_inputgen_h handle
383    * @param[in] key_name The key name want to generate
384    * @param[in] pressed The value that select key press or release (0: release, 1: press)
385    * @return @c 0 on success, otherwise a negative error value
386    * @retval #EFL_UTIL_ERROR_NONE Successful
387    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
388    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate key
389    */
390 API int efl_util_input_generate_key(efl_util_inputgen_h inputgen_h, const char *key_name, int pressed);
391
392 /**
393    * @platform
394    * @brief Generates a touch event using a opened device.
395    * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
396    * @privlevel platform
397    * @privilege %http://tizen.org/privilege/inputgenerator
398    * @param[in] inputgen_h The #efl_util_inputgen_h handle
399    * @param[in] idx The index of touched finger
400    * @param[in] touch_type The touch type (ex> #EFL_UTIL_INPUT_TOUCH_BEGIN, #EFL_UTIL_INPUT_TOUCH_UPDATE, #EFL_UTIL_INPUT_TOUCH_END)
401    * @param[in] x The x axis of touch point
402    * @param[in] y The y axis of touch point
403    * @return @c 0 on success, otherwise a negative error value
404    * @retval #EFL_UTIL_ERROR_NONE Successful
405    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
406    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate touch
407    */
408 API 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);
409
410 /**
411    * @platform
412    * @brief Generates a pointer event using a opened device.
413    * @since_tizen 3.0
414    * @privlevel platform
415    * @privilege %http://tizen.org/privilege/inputgenerator
416    * @param[in] inputgen_h The #efl_util_inputgen_h handle
417    * @param[in] buttons The number of button
418    * @param[in] pointer_type The pointer type (ex> #EFL_UTIL_INPUT_POINTER_BUTTON_PRESS, #EFL_UTIL_INPUT_POINTER_BUTTON_UP, #EFL_UTIL_INPUT_POINTER_MOVE)
419    * @param[in] x x coordination to move
420    * @param[in] y y coordination to move
421    * @return @c 0 on success, otherwise a negative error value
422    * @retval #EFL_UTIL_ERROR_NONE Successful
423    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
424    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate pointer
425    * @retval #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
426    * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
427    */
428 API 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);
429
430 /**
431    * @platform
432    * @brief Generates a wheel event using an opened device.
433    * @details Commonly wheel events are generated with one of two orientations, vertical and horizontal.
434    *          #efl_util_input_pointer_wheel_type_e has enums for orientations.
435    *          For each orientation there is a value which represents both size and direction.
436    *          For #EFL_UTIL_INPUT_POINTER_WHEEL_VERT, if the value is positive, the direction is "up", if it's negative, the direction is "down"
437    *          For #EFL_UTIL_INPUT_POINTER_WHEEL_HORZ, if the value is positive, the direction is "right", if it's negative, the direction is "left"
438    *          General mouse devices generate wheel events with value 1 or -1,
439    *          but some mouse devices have a smooth wheel which generates wheel events with value bigger than absolute 1.
440    * @since_tizen 5.5
441    * @privlevel platform
442    * @privilege %http://tizen.org/privilege/inputgenerator
443    * @param[in] inputgen_h The #efl_util_inputgen_h handle
444    * @param[in] wheel_type The wheel type (ex> #EFL_UTIL_INPUT_POINTER_WHEEL_VERT, #EFL_UTIL_INPUT_POINTER_WHEEL_HORZ)
445    * @param[in] value The wheel value
446    * @return @c 0 on success, otherwise a negative error value
447    * @retval #EFL_UTIL_ERROR_NONE Successful
448    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
449    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED No permission to generate a wheel event
450    * @retval #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
451    * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
452    * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
453    */
454 API int efl_util_input_generate_wheel(efl_util_inputgen_h inputgen_h, efl_util_input_pointer_wheel_type_e wheel_type, int value);
455
456 /**
457    * @platform
458    * @brief Generates a touch event using an opened device.
459    * @details Normally touch events are represented by a specific point (x, y).
460    *          But there are many contact points between touchscreen and fingers.
461    *          The coordinates (x, y) are the center of the contact area, and the area where the finger and the touchscreen come into contact is represented with an ellipse.
462    *          To give information about the size of the touching cllipse, use @a radius_x and @a radius_y.
463    *          The value of @a idx is touch index used in multi-touch. 0 means first touch, 1 means second touch and the index increases further.
464    *          General devices support 10 touch indices(0 ~ 9), but this may differ depending on the device.
465    *          Some devices may not support the @a palm value, and this value is closely dependent on device.
466    *          The value of @a x, @a y, @a radius_x, @a radius_y, @a pressure and @a palm must be greater than 0.
467    *          The @a angle is the angle between the vertical edge of the device and the y-axis of the ellipse. If the @a angle is 0, then the ellipse's y-axis is parallel to the device's vertical edge.
468    * @since_tizen 5.5
469    * @privlevel platform
470    * @privilege %http://tizen.org/privilege/inputgenerator
471    * @param[in] inputgen_h The #efl_util_inputgen_h handle
472    * @param[in] idx The index of the touching finger, used in multi-touch
473    * @param[in] touch_type The touch type (ex> #EFL_UTIL_INPUT_TOUCH_BEGIN, #EFL_UTIL_INPUT_TOUCH_UPDATE, #EFL_UTIL_INPUT_TOUCH_END)
474    * @param[in] x The x coordinate of the touch point
475    * @param[in] y The y coordinate of the touch point
476    * @param[in] radius_x The x-axis radius of the touching ellipse before rotation
477    * @param[in] radius_y The y-axis radius of the touching ellipse before rotation
478    * @param[in] pressure The pressure on the contact touch area
479    * @param[in] angle The rotation angle of the touching ellipse, in degrees
480    * @param[in] palm The palm area of the contact touch area
481    * @return @c 0 on success, otherwise a negative error value
482    * @retval #EFL_UTIL_ERROR_NONE Successful
483    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
484    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED No permission to generate a touch event
485    * @retval #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
486    * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
487    * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
488    */
489 API int efl_util_input_generate_touch_axis(efl_util_inputgen_h inputgen_h, int idx, efl_util_input_touch_type_e touch_type, int x, int y, double radius_x, double radius_y, double pressure, double angle, double palm);
490
491 /**
492  * @}
493  */
494
495 /**
496  * @addtogroup CAPI_EFL_UTIL_SCREENSHOT_MODULE
497  * @{
498  */
499
500 /**
501  * @platform
502  * @brief Definition for the screenshot handle.
503  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
504  */
505 typedef struct _efl_util_screenshot_h * efl_util_screenshot_h;
506
507 /**
508  * @platform
509  * @brief Initializes the screenshot.
510  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
511  * @privlevel platform
512  * @privilege %http://tizen.org/privilege/screenshot
513  * @remarks The specific error code can be obtained using the get_last_result()
514  * method. Error codes are described in Exception section.
515  * @param[in] width width of the screenshot surface
516  * @param[in] height height of the screenshot surface
517  * @return #efl_util_screenshot_h on success, otherwise @c NULL
518  * @retval #efl_util_screenshot_h  The screenshot handle
519  * @exception #EFL_UTIL_ERROR_NONE Successful
520  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
521  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
522  * @exception #EFL_UTIL_ERROR_SCREENSHOT_INIT_FAIL Initialization failure
523  * @exception #EFL_UTIL_ERROR_PERMISSION_DENIED No permission for screenshot
524  * @see efl_util_screenshot_deinitialize()
525  */
526 API efl_util_screenshot_h efl_util_screenshot_initialize(int width, int height);
527
528 /**
529  * @platform
530  * @brief Takes a screenshot and get a tbm_surface handle.
531  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
532  * @privlevel platform
533  * @privilege %http://tizen.org/privilege/screenshot
534  * @remarks The specific error code can be obtained using the get_last_result()
535  *          The #tbm_surface_h must be free by caller
536  * @param[in] screenshot #efl_util_screenshot_h handle
537  * @return #tbm_surface_h on success, otherwise @c NULL
538  * @retval #tbm_surface_h The TBM surface handle
539  * @exception #EFL_UTIL_ERROR_NONE Successful
540  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
541  * @exception #EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL Execution failure
542  * @exception #EFL_UTIL_ERROR_PERMISSION_DENIED No permission for screenshot
543  * @see efl_util_screenshot_initialize()
544  * @see efl_util_screenshot_deinitialize()
545  */
546 API tbm_surface_h efl_util_screenshot_take_tbm_surface(efl_util_screenshot_h screenshot);
547
548 /**
549  * @platform
550  * @brief Deinitializes the screenshot.
551  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
552  * @privlevel platform
553  * @privilege %http://tizen.org/privilege/screenshot
554  * @param[in]  screenshot  #efl_util_screenshot_h handle
555  * @return @c 0 on success, otherwise a negative error value
556  * @retval #EFL_UTIL_ERROR_NONE Successful
557  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
558  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED No permission for screenshot
559  * @see efl_util_screenshot_initialize()
560  */
561 API int efl_util_screenshot_deinitialize(efl_util_screenshot_h screenshot);
562
563 /**
564  * @}
565  */
566
567 /**
568  * @addtogroup CAPI_EFL_UTIL_GESTURE_MODULE
569  * @{
570  */
571
572 /**
573  * @brief Definition for the gesture handle.
574  * @since_tizen 4.0
575  */
576 typedef struct _efl_util_gesture_h * efl_util_gesture_h;
577
578 /**
579  * @brief Definition for the edge swipe gesture event.
580  * @since_tizen 4.0
581  */
582 API extern int EFL_UTIL_EVENT_GESTURE_EDGE_SWIPE;
583
584 /**
585  * @brief Definition for the edge swipe gesture event.
586  * @since_tizen 4.0
587  */
588 API extern int EFL_UTIL_EVENT_GESTURE_EDGE_DRAG;
589
590 /**
591  * @brief Definition for the tap gesture event.
592  * @since_tizen 4.0
593  */
594 API extern int EFL_UTIL_EVENT_GESTURE_TAP;
595
596 /**
597  * @brief Definition for the palm cover gesture event.
598  * @since_tizen 4.0
599  */
600 API extern int EFL_UTIL_EVENT_GESTURE_PALM_COVER;
601
602 /**
603  * @brief Enumeration of gesture type.
604  * @since_tizen 4.0
605  */
606 typedef enum _efl_util_gesture_type_e
607 {
608    EFL_UTIL_GESTURE_TYPE_NONE       = 0,        /**< None gesture type */
609    EFL_UTIL_GESTURE_TYPE_EDGE_SWIPE = (1 << 0), /**< Edge swipe gesture type */
610    EFL_UTIL_GESTURE_TYPE_EDGE_DRAG  = (1 << 1), /**< Edge drag gesture type */
611    EFL_UTIL_GESTURE_TYPE_TAP        = (1 << 2), /**< Tap gesture type */
612    EFL_UTIL_GESTURE_TYPE_PALM_COVER = (1 << 3), /**< Palm cover gesture type */
613    EFL_UTIL_GESTURE_TYPE_PAN        = (1 << 4), /**< Pan gesture type */
614    EFL_UTIL_GESTURE_TYPE_PINCH      = (1 << 5), /**< Pinch gesture type */
615    EFL_UTIL_GESTURE_TYPE_PALM_SWIPE = (1 << 6)  /**< Palm swipe gesture type */
616 } efl_util_gesture_type_e;
617
618 /**
619  * @brief Enumeration of gesture mode.
620  * @since_tizen 4.0
621  */
622 typedef enum _efl_util_gesture_mode_e
623 {
624    EFL_UTIL_GESTURE_MODE_NONE    = 0, /**< None gesture mode */
625    EFL_UTIL_GESTURE_MODE_BEGIN,       /**< Begin a gesture event */
626    EFL_UTIL_GESTURE_MODE_UPDATE,      /**< continually update a gesture event */
627    EFL_UTIL_GESTURE_MODE_END,         /**< End a gesture event */
628    EFL_UTIL_GESTURE_MODE_DONE         /**< Occur a gesture event */
629 } efl_util_gesture_mode_e;
630
631 /**
632  * @brief Enumeration of gesture edge.
633  * @since_tizen 4.0
634  */
635 typedef enum _efl_util_gesture_edge_e
636 {
637    EFL_UTIL_GESTURE_EDGE_NONE    = 0, /**< None edge point */
638    EFL_UTIL_GESTURE_EDGE_TOP,         /**< Top edge position of screen */
639    EFL_UTIL_GESTURE_EDGE_RIGHT,       /**< Right edge position of screen */
640    EFL_UTIL_GESTURE_EDGE_BOTTOM,      /**< Bottom edge position of screen */
641    EFL_UTIL_GESTURE_EDGE_LEFT         /**< Left edge position of screen */
642 } efl_util_gesture_edge_e;
643
644 /**
645  * @brief Enumeration of gesture edge size.
646  * @since_tizen 4.0
647  */
648 typedef enum _efl_util_gesture_edge_size_e
649 {
650    EFL_UTIL_GESTURE_EDGE_SIZE_NONE,    /**< None size of edge */
651    EFL_UTIL_GESTURE_EDGE_SIZE_FULL,    /**< Full size in the edge */
652    EFL_UTIL_GESTURE_EDGE_SIZE_PARTIAL  /**< Part of edge */
653 } efl_util_gesture_edge_size_e;
654
655 /**
656  * @brief Definition for the gesture data handle.
657  * @since_tizen 4.0
658  */
659 typedef void *efl_util_gesture_data;
660
661 /**
662  * @brief Definition for the edge swipe gesture's event data structure.
663  * @since_tizen 4.0
664  */
665 typedef struct _efl_util_event_gesture_edge_swipe_s
666 {
667    efl_util_gesture_mode_e mode;  /**< Mode of a gesture event */
668    unsigned int fingers;          /**< Number of fingers */
669    int sx;                        /**< Start x point of edge area */
670    int sy;                        /**< Start y point of edge area */
671    unsigned int edge;             /**< Start edge location */
672 } efl_util_event_gesture_edge_swipe_s;
673
674 /**
675  * @brief Definition for the edge drag gesture's event data structure.
676  * @since_tizen 4.0
677  */
678 typedef struct efl_util_event_gesture_edge_drag_s
679 {
680    efl_util_gesture_mode_e mode;  /**< Mode of a gesture event */
681    unsigned int fingers;          /**< Number of fingers */
682    int cx;                        /**< Center x point of edge area */
683    int cy;                        /**< Center y point of edge area */
684    unsigned int edge;             /**< Start edge location */
685 } efl_util_event_gesture_edge_drag_s;
686
687 /**
688  * @brief Definition for the tap gesture's event data structure.
689  * @since_tizen 4.0
690  */
691 typedef struct _efl_util_event_gesture_tap_s
692 {
693    efl_util_gesture_mode_e mode;  /**< Mode of a gesture event */
694    unsigned int fingers;          /**< Number of fingers */
695    unsigned int repeats;          /**< Number of tap repeats */
696 } efl_util_event_gesture_tap_s;
697
698 /**
699  * @brief Definition for the palm cover gesture's event data structure.
700  * @since_tizen 4.0
701  */
702 typedef struct _efl_util_event_gesture_palm_cover_s
703 {
704    efl_util_gesture_mode_e mode;  /**< Mode of a gesture event */
705    unsigned int duration;         /**< Duration time of gesture behavior */
706    int cx;                        /**< Center x point of edge area */
707    int cy;                        /**< Center y point of edge area */
708    unsigned int size;             /**< Size of touched area */
709    double pressure;               /**< Pressure of touched finger */
710 } efl_util_event_gesture_palm_cover_s;
711
712 /**
713  * @brief Initializes system and check if global gestures are supported.
714  * @since_tizen 4.0
715  * @remarks The specific error code can be obtained using the get_last_result() method.
716  *          Error codes are described in Exception section.
717  * @return #efl_util_gesture_h on success, otherwise @c NULL
718  * @retval #efl_util_gesture_h The global gesture handle
719  * @exception #EFL_UTIL_ERROR_NONE Successful
720  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
721  * @exception #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
722  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
723  * @see efl_util_gesture_deinitialize()
724  */
725 API efl_util_gesture_h efl_util_gesture_initialize(void);
726
727 /**
728  * @brief Deinitializes system.
729  * @since_tizen 4.0
730  * @param[in] gesture_h The #efl_util_gesture_h handle
731  * @return @c 0 on success, otherwise a negative error value
732  * @retval #EFL_UTIL_ERROR_NONE Successful
733  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
734  * @see efl_util_gesture_initialize()
735  */
736 API int efl_util_gesture_deinitialize(efl_util_gesture_h gesture_h);
737
738 /**
739  * @brief Generates a edge swipe gesture's grab info handle.
740  * @since_tizen 4.0
741  * @param[in] gesture_h The #efl_util_gesture_h handle
742  * @param[in] fingers   The number of fingers
743  * @param[in] edge      The position of edge
744  * @remarks The specific error code can be obtained using the get_last_result() method.
745  *          Error codes are described in Exception section.
746  * @return #efl_util_gesture_data on success, otherwise @c NULL
747  * @retval #efl_util_gesture_data The specific gesture data handle
748  * @exception #EFL_UTIL_ERROR_NONE Successful
749  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
750  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
751  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
752  */
753 API 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);
754
755 /**
756  * @brief Frees a memory of edge swipe gesture's grab info handle.
757  * @since_tizen 4.0
758  * @param[in] gesture_h The #efl_util_gesture_h handle
759  * @param[in] data      The #efl_util_gesture_data handle
760  * @return @c 0 on success, otherwise a negative error value
761  * @retval #EFL_UTIL_ERROR_NONE Successful
762  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
763  */
764 API int efl_util_gesture_edge_swipe_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
765
766
767 /**
768  * @brief Sets a specific size of edge for edge swipe gesture.
769  * @since_tizen 4.0
770  * @param[in] data        The #efl_util_gesture_data handle
771  * @param[in] edge_size   The #efl_util_gesture_edge_size_e enum
772  * @param[in] start_point The start point of edge area
773  * @param[in] end_point   The end point of edge area
774  * @return @c 0 on success, otherwise a negative error value
775  * @retval #EFL_UTIL_ERROR_NONE Successful
776  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
777  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
778  */
779 API 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);
780
781 /**
782  * @brief Generates a edge drag gesture's grab info handle.
783  * @since_tizen 4.0
784  * @param[in] gesture_h The #efl_util_gesture_h handle
785  * @param[in] fingers   The number of fingers
786  * @param[in] edge      The position of edge
787  * @remarks The specific error code can be obtained using the get_last_result() method.
788  *          Error codes are described in Exception section.
789  * @return #efl_util_gesture_data on success, otherwise @c NULL
790  * @retval #efl_util_gesture_data The specific gesture data handle
791  * @exception #EFL_UTIL_ERROR_NONE Successful
792  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
793  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
794  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
795  */
796 API 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);
797
798 /**
799  * @brief Frees a memory of edge drag gesture's grab info handle.
800  * @since_tizen 4.0
801  * @param[in] gesture_h The #efl_util_gesture_h handle
802  * @param[in] data      The #efl_util_gesture_data handle
803  * @return @c 0 on success, otherwise a negative error value
804  * @retval #EFL_UTIL_ERROR_NONE Successful
805  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
806  */
807 API int efl_util_gesture_edge_drag_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
808
809 /**
810  * @brief Sets a specific size of edge for edge drag gesture.
811  * @since_tizen 4.0
812  * @param[in] data        The #efl_util_gesture_data handle
813  * @param[in] edge_size   The #efl_util_gesture_edge_size_e enum
814  * @param[in] start_point The start point of edge area
815  * @param[in] end_point   The end point of edge area
816  * @return @c 0 on success, otherwise a negative error value
817  * @retval #EFL_UTIL_ERROR_NONE Successful
818  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
819  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
820  */
821 API 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);
822
823 /**
824  * @brief Generates a tap gesture's grab info handle.
825  * @since_tizen 4.0
826  * @param[in] gesture_h The #efl_util_gesture_h handle
827  * @param[in] fingers   The number of fingers
828  * @param[in] repeats   The number of repeats
829  * @remarks The specific error code can be obtained using the get_last_result() method.
830  *          Error codes are described in Exception section.
831  * @return #efl_util_gesture_data on success, otherwise @c NULL
832  * @retval #efl_util_gesture_data The specific gesture data handle
833  * @exception #EFL_UTIL_ERROR_NONE Successful
834  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
835  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
836  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
837  */
838 API efl_util_gesture_data efl_util_gesture_tap_new(efl_util_gesture_h gesture_h, unsigned int fingers, unsigned int repeats);
839
840 /**
841  * @brief Frees a memory of tap gesture's grab info handle.
842  * @since_tizen 4.0
843  * @param[in] gesture_h The #efl_util_gesture_h handle
844  * @param[in] data      The #efl_util_gesture_data handle
845  * @return @c 0 on success, otherwise a negative error value
846  * @retval #EFL_UTIL_ERROR_NONE Successful
847  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
848  */
849 API int efl_util_gesture_tap_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
850
851 /**
852  * @brief Generates a palm cover gesture's grab info handle.
853  * @since_tizen 4.0
854  * @param[in] gesture_h The #efl_util_gesture_h handle
855  * @remarks The specific error code can be obtained using the get_last_result() method.
856  *          Error codes are described in Exception section.
857  * @return #efl_util_gesture_data on success, otherwise @c NULL
858  * @retval #efl_util_gesture_data The specific gesture data handle
859  * @exception #EFL_UTIL_ERROR_NONE Successful
860  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
861  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
862  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
863  */
864 API efl_util_gesture_data efl_util_gesture_palm_cover_new(efl_util_gesture_h gesture_h);
865
866 /**
867  * @brief Frees a memory of palm cover gesture's grab info handle.
868  * @since_tizen 4.0
869  * @param[in] gesture_h The #efl_util_gesture_h handle
870  * @param[in] data      The #efl_util_gesture_data handle
871  * @return @c 0 on success, otherwise a negative error value
872  * @retval #EFL_UTIL_ERROR_NONE Successful
873  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
874  */
875 API int efl_util_gesture_palm_cover_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
876
877 /**
878  * @platform
879  * @brief Grabs a global gesture.
880  * @since_tizen 4.0
881  * @privlevel platform
882  * @privilege %http://tizen.org/privilege/gesturegrab
883  * @param[in] gesture_h The #efl_util_gesture_h handle
884  * @param[in] data      The #efl_util_gesture_data handle.
885  * @return @c 0 on success, otherwise a negative error value
886  * @retval #EFL_UTIL_ERROR_NONE Successful
887  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
888  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
889  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
890  * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
891  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
892  */
893 API int efl_util_gesture_grab(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
894
895 /**
896  * @platform
897  * @brief Ungrabs a global gesture.
898  * @since_tizen 4.0
899  * @privlevel platform
900  * @privilege %http://tizen.org/privilege/gesturegrab
901  * @param[in] gesture_h The #efl_util_gesture_h handle
902  * @param[in] data      The #efl_util_gesture_data handle.
903  * @return @c 0 on success, otherwise a negative error value
904  * @retval #EFL_UTIL_ERROR_NONE Successful
905  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
906  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
907  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
908  * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
909  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
910  */
911 API int efl_util_gesture_ungrab(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
912
913 /**
914  * @brief Selects a global gesture on given window.
915  * @since_tizen 4.0
916  * @param[in] gesture_h The #efl_util_gesture_h handle
917  * @param[in] window    The efl window
918  * @param[in] data      The #efl_util_gesture_data handle.
919  * @return @c 0 on success, otherwise a negative error value
920  * @retval #EFL_UTIL_ERROR_NONE Successful
921  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
922  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
923  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
924  */
925 API int efl_util_gesture_select(efl_util_gesture_h gesture_h, Evas_Object *window, efl_util_gesture_data data);
926
927 /**
928  * @brief Deselects a global gesture on given window.
929  * @since_tizen 4.0
930  * @param[in] gesture_h The #efl_util_gesture_h handle
931  * @param[in] window    The efl window
932  * @param[in] data      The #efl_util_gesture_data handle
933  * @return @c 0 on success, otherwise a negative error value
934  * @retval #EFL_UTIL_ERROR_NONE Successful
935  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
936  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
937  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
938  */
939 API int efl_util_gesture_deselect(efl_util_gesture_h gesture_h, Evas_Object *window, efl_util_gesture_data data);
940
941 /**
942  * @platform
943  * @brief Activates or deactivates a global gesture.
944  * @since_tizen 4.0
945  * @privlevel platform
946  * @privilege %http://tizen.org/privilege/gestureactivation
947  * @param[in] gesture_h The #efl_util_gesture_h handle
948  * @param[in] type      The gesture type to activate /deactivate combined by #efl_util_gesture_type_e to bitwise operation
949  * @param[in] active    The activated boolean value
950  * @return @c 0 on success, otherwise a negative error value
951  * @retval #EFL_UTIL_ERROR_NONE Successful
952  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
953  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
954  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
955  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
956  */
957 API int efl_util_gesture_activate_set(efl_util_gesture_h gesture_h, unsigned int type, Eina_Bool active);
958
959 /**
960  * @brief Activates or deactivates a global gesture on given window.
961  * @since_tizen 4.0
962  * @param[in] gesture_h The #efl_util_gesture_h handle
963  * @param[in] window    The efl window
964  * @param[in] type      The gesture type to activate /deactivate combined by #efl_util_gesture_type_e to bitwise operation
965  * @param[in] active    The activated boolean value
966  * @return @c 0 on success, otherwise a negative error value
967  * @retval #EFL_UTIL_ERROR_NONE Successful
968  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
969  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
970  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
971  */
972 API int efl_util_gesture_activate_set_on_window(efl_util_gesture_h gesture_h, Evas_Object *window, unsigned int type, Eina_Bool active);
973
974 /**
975  * @}
976  */
977
978 #ifdef __cplusplus
979 }
980 #endif
981 #endif /* __TIZEN_UI_EFL_UTIL_H__ */