efl_util: Remove version branching by profile
[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 2.3
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: 2.4) */
56    EFL_UTIL_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< @platform Function not implemented (@b Since: 2.4) */
57    EFL_UTIL_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< @platform Not supported (@b Since: 2.4) */
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: 2.4) */
60    EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL = TIZEN_ERROR_EFL_UTIL | 0x03,  /**< @platform Screenshot execution fail (@b Since: 2.4) */
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 2.3
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: 2.4) */
71    EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT = 10, /**< Default notification level. (@b Since: 2.4) */
72    EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM  = 20, /**< Higher notification level than default. (@b Since: 2.4) */
73    EFL_UTIL_NOTIFICATION_LEVEL_HIGH    = 30, /**< Higher notification level than medium. (@b Since: 2.4) */
74    EFL_UTIL_NOTIFICATION_LEVEL_TOP     = 40  /**< The highest notification level. (@b Since: 2.4) */
75 } efl_util_notification_level_e;
76
77 /**
78  * @brief Enumeration of screen mode.
79  * @since_tizen 2.4
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 2.3
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 2.4, 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 2.3
108  *
109  * @remarks This API can be used for a notification type window only.
110  *          Up to the version 2.4, 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 2.4
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 2.4
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 2.4
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 2.4
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 2.4
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 2.4
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 2.4
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 2.4
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 2.4
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 2.4
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 2.4
504  */
505 typedef struct _efl_util_screenshot_h * efl_util_screenshot_h;
506
507 /**
508  * @platform
509  * @brief Initializes the screenshot.
510  * @since_tizen 2.4
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 2.4
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 2.4
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  * @NOT_AVAILABLE_ON_TV
569  * @addtogroup CAPI_EFL_UTIL_GESTURE_MODULE
570  * @{
571  */
572
573 /**
574  * @brief Definition for the gesture handle.
575  * @since_tizen 4.0
576  */
577 typedef struct _efl_util_gesture_h * efl_util_gesture_h;
578
579 /**
580  * @brief Definition for the edge swipe gesture event.
581  * @since_tizen 4.0
582  */
583 API extern int EFL_UTIL_EVENT_GESTURE_EDGE_SWIPE;
584
585 /**
586  * @brief Definition for the edge swipe gesture event.
587  * @since_tizen 4.0
588  */
589 API extern int EFL_UTIL_EVENT_GESTURE_EDGE_DRAG;
590
591 /**
592  * @brief Definition for the tap gesture event.
593  * @since_tizen 4.0
594  */
595 API extern int EFL_UTIL_EVENT_GESTURE_TAP;
596
597 /**
598  * @brief Definition for the palm cover gesture event.
599  * @since_tizen 4.0
600  */
601 API extern int EFL_UTIL_EVENT_GESTURE_PALM_COVER;
602
603 /**
604  * @brief Enumeration of gesture type.
605  * @since_tizen 4.0
606  */
607 typedef enum _efl_util_gesture_type_e
608 {
609    EFL_UTIL_GESTURE_TYPE_NONE       = 0,        /**< None gesture type */
610    EFL_UTIL_GESTURE_TYPE_EDGE_SWIPE = (1 << 0), /**< Edge swipe gesture type */
611    EFL_UTIL_GESTURE_TYPE_EDGE_DRAG  = (1 << 1), /**< Edge drag gesture type */
612    EFL_UTIL_GESTURE_TYPE_TAP        = (1 << 2), /**< Tap gesture type */
613    EFL_UTIL_GESTURE_TYPE_PALM_COVER = (1 << 3), /**< Palm cover gesture type */
614    EFL_UTIL_GESTURE_TYPE_PAN        = (1 << 4), /**< Pan gesture type */
615    EFL_UTIL_GESTURE_TYPE_PINCH      = (1 << 5), /**< Pinch gesture type */
616    EFL_UTIL_GESTURE_TYPE_PALM_SWIPE = (1 << 6)  /**< Palm swipe gesture type */
617 } efl_util_gesture_type_e;
618
619 /**
620  * @brief Enumeration of gesture mode.
621  * @since_tizen 4.0
622  */
623 typedef enum _efl_util_gesture_mode_e
624 {
625    EFL_UTIL_GESTURE_MODE_NONE    = 0, /**< None gesture mode */
626    EFL_UTIL_GESTURE_MODE_BEGIN,       /**< Begin a gesture event */
627    EFL_UTIL_GESTURE_MODE_UPDATE,      /**< continually update a gesture event */
628    EFL_UTIL_GESTURE_MODE_END,         /**< End a gesture event */
629    EFL_UTIL_GESTURE_MODE_DONE         /**< Occur a gesture event */
630 } efl_util_gesture_mode_e;
631
632 /**
633  * @brief Enumeration of gesture edge.
634  * @since_tizen 4.0
635  */
636 typedef enum _efl_util_gesture_edge_e
637 {
638    EFL_UTIL_GESTURE_EDGE_NONE    = 0, /**< None edge point */
639    EFL_UTIL_GESTURE_EDGE_TOP,         /**< Top edge position of screen */
640    EFL_UTIL_GESTURE_EDGE_RIGHT,       /**< Right edge position of screen */
641    EFL_UTIL_GESTURE_EDGE_BOTTOM,      /**< Bottom edge position of screen */
642    EFL_UTIL_GESTURE_EDGE_LEFT         /**< Left edge position of screen */
643 } efl_util_gesture_edge_e;
644
645 /**
646  * @brief Enumeration of gesture edge size.
647  * @since_tizen 4.0
648  */
649 typedef enum _efl_util_gesture_edge_size_e
650 {
651    EFL_UTIL_GESTURE_EDGE_SIZE_NONE,    /**< None size of edge */
652    EFL_UTIL_GESTURE_EDGE_SIZE_FULL,    /**< Full size in the edge */
653    EFL_UTIL_GESTURE_EDGE_SIZE_PARTIAL  /**< Part of edge */
654 } efl_util_gesture_edge_size_e;
655
656 /**
657  * @brief Definition for the gesture data handle.
658  * @since_tizen 4.0
659  */
660 typedef void *efl_util_gesture_data;
661
662 /**
663  * @brief Definition for the edge swipe gesture's event data structure.
664  * @since_tizen 4.0
665  */
666 typedef struct _efl_util_event_gesture_edge_swipe_s
667 {
668    efl_util_gesture_mode_e mode;  /**< Mode of a gesture event */
669    unsigned int fingers;          /**< Number of fingers */
670    int sx;                        /**< Start x point of edge area */
671    int sy;                        /**< Start y point of edge area */
672    unsigned int edge;             /**< Start edge location */
673 } efl_util_event_gesture_edge_swipe_s;
674
675 /**
676  * @brief Definition for the edge drag gesture's event data structure.
677  * @since_tizen 4.0
678  */
679 typedef struct efl_util_event_gesture_edge_drag_s
680 {
681    efl_util_gesture_mode_e mode;  /**< Mode of a gesture event */
682    unsigned int fingers;          /**< Number of fingers */
683    int cx;                        /**< Center x point of edge area */
684    int cy;                        /**< Center y point of edge area */
685    unsigned int edge;             /**< Start edge location */
686 } efl_util_event_gesture_edge_drag_s;
687
688 /**
689  * @brief Definition for the tap gesture's event data structure.
690  * @since_tizen 4.0
691  */
692 typedef struct _efl_util_event_gesture_tap_s
693 {
694    efl_util_gesture_mode_e mode;  /**< Mode of a gesture event */
695    unsigned int fingers;          /**< Number of fingers */
696    unsigned int repeats;          /**< Number of tap repeats */
697 } efl_util_event_gesture_tap_s;
698
699 /**
700  * @brief Definition for the palm cover gesture's event data structure.
701  * @since_tizen 4.0
702  */
703 typedef struct _efl_util_event_gesture_palm_cover_s
704 {
705    efl_util_gesture_mode_e mode;  /**< Mode of a gesture event */
706    unsigned int duration;         /**< Duration time of gesture behavior */
707    int cx;                        /**< Center x point of edge area */
708    int cy;                        /**< Center y point of edge area */
709    unsigned int size;             /**< Size of touched area */
710    double pressure;               /**< Pressure of touched finger */
711 } efl_util_event_gesture_palm_cover_s;
712
713 /**
714  * @brief Initializes system and check if global gestures are supported.
715  * @since_tizen 4.0
716  * @remarks The specific error code can be obtained using the get_last_result() method.
717  *          Error codes are described in Exception section.
718  * @return #efl_util_gesture_h on success, otherwise @c NULL
719  * @retval #efl_util_gesture_h The global gesture handle
720  * @exception #EFL_UTIL_ERROR_NONE Successful
721  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
722  * @exception #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
723  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
724  * @see efl_util_gesture_deinitialize()
725  */
726 API efl_util_gesture_h efl_util_gesture_initialize(void);
727
728 /**
729  * @brief Deinitializes system.
730  * @since_tizen 4.0
731  * @param[in] gesture_h The #efl_util_gesture_h handle
732  * @return @c 0 on success, otherwise a negative error value
733  * @retval #EFL_UTIL_ERROR_NONE Successful
734  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
735  * @see efl_util_gesture_initialize()
736  */
737 API int efl_util_gesture_deinitialize(efl_util_gesture_h gesture_h);
738
739 /**
740  * @brief Generates a edge swipe gesture's grab info handle.
741  * @since_tizen 4.0
742  * @param[in] gesture_h The #efl_util_gesture_h handle
743  * @param[in] fingers   The number of fingers
744  * @param[in] edge      The position of edge
745  * @remarks The specific error code can be obtained using the get_last_result() method.
746  *          Error codes are described in Exception section.
747  * @return #efl_util_gesture_data on success, otherwise @c NULL
748  * @retval #efl_util_gesture_data The specific gesture data handle
749  * @exception #EFL_UTIL_ERROR_NONE Successful
750  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
751  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
752  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
753  */
754 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);
755
756 /**
757  * @brief Frees a memory of edge swipe gesture's grab info handle.
758  * @since_tizen 4.0
759  * @param[in] gesture_h The #efl_util_gesture_h handle
760  * @param[in] data      The #efl_util_gesture_data handle
761  * @return @c 0 on success, otherwise a negative error value
762  * @retval #EFL_UTIL_ERROR_NONE Successful
763  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
764  */
765 API int efl_util_gesture_edge_swipe_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
766
767
768 /**
769  * @brief Sets a specific size of edge for edge swipe gesture.
770  * @since_tizen 4.0
771  * @param[in] data        The #efl_util_gesture_data handle
772  * @param[in] edge_size   The #efl_util_gesture_edge_size_e enum
773  * @param[in] start_point The start point of edge area
774  * @param[in] end_point   The end point of edge area
775  * @return @c 0 on success, otherwise a negative error value
776  * @retval #EFL_UTIL_ERROR_NONE Successful
777  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
778  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
779  */
780 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);
781
782 /**
783  * @brief Generates a edge drag gesture's grab info handle.
784  * @since_tizen 4.0
785  * @param[in] gesture_h The #efl_util_gesture_h handle
786  * @param[in] fingers   The number of fingers
787  * @param[in] edge      The position of edge
788  * @remarks The specific error code can be obtained using the get_last_result() method.
789  *          Error codes are described in Exception section.
790  * @return #efl_util_gesture_data on success, otherwise @c NULL
791  * @retval #efl_util_gesture_data The specific gesture data handle
792  * @exception #EFL_UTIL_ERROR_NONE Successful
793  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
794  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
795  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
796  */
797 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);
798
799 /**
800  * @brief Frees a memory of edge drag gesture's grab info handle.
801  * @since_tizen 4.0
802  * @param[in] gesture_h The #efl_util_gesture_h handle
803  * @param[in] data      The #efl_util_gesture_data handle
804  * @return @c 0 on success, otherwise a negative error value
805  * @retval #EFL_UTIL_ERROR_NONE Successful
806  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
807  */
808 API int efl_util_gesture_edge_drag_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
809
810 /**
811  * @brief Sets a specific size of edge for edge drag gesture.
812  * @since_tizen 4.0
813  * @param[in] data        The #efl_util_gesture_data handle
814  * @param[in] edge_size   The #efl_util_gesture_edge_size_e enum
815  * @param[in] start_point The start point of edge area
816  * @param[in] end_point   The end point of edge area
817  * @return @c 0 on success, otherwise a negative error value
818  * @retval #EFL_UTIL_ERROR_NONE Successful
819  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
820  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
821  */
822 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);
823
824 /**
825  * @brief Generates a tap gesture's grab info handle.
826  * @since_tizen 4.0
827  * @param[in] gesture_h The #efl_util_gesture_h handle
828  * @param[in] fingers   The number of fingers
829  * @param[in] repeats   The number of repeats
830  * @remarks The specific error code can be obtained using the get_last_result() method.
831  *          Error codes are described in Exception section.
832  * @return #efl_util_gesture_data on success, otherwise @c NULL
833  * @retval #efl_util_gesture_data The specific gesture data handle
834  * @exception #EFL_UTIL_ERROR_NONE Successful
835  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
836  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
837  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
838  */
839 API efl_util_gesture_data efl_util_gesture_tap_new(efl_util_gesture_h gesture_h, unsigned int fingers, unsigned int repeats);
840
841 /**
842  * @brief Frees a memory of tap gesture's grab info handle.
843  * @since_tizen 4.0
844  * @param[in] gesture_h The #efl_util_gesture_h handle
845  * @param[in] data      The #efl_util_gesture_data handle
846  * @return @c 0 on success, otherwise a negative error value
847  * @retval #EFL_UTIL_ERROR_NONE Successful
848  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
849  */
850 API int efl_util_gesture_tap_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
851
852 /**
853  * @brief Generates a palm cover gesture's grab info handle.
854  * @since_tizen 4.0
855  * @param[in] gesture_h The #efl_util_gesture_h handle
856  * @remarks The specific error code can be obtained using the get_last_result() method.
857  *          Error codes are described in Exception section.
858  * @return #efl_util_gesture_data on success, otherwise @c NULL
859  * @retval #efl_util_gesture_data The specific gesture data handle
860  * @exception #EFL_UTIL_ERROR_NONE Successful
861  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
862  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
863  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
864  */
865 API efl_util_gesture_data efl_util_gesture_palm_cover_new(efl_util_gesture_h gesture_h);
866
867 /**
868  * @brief Frees a memory of palm cover gesture's grab info handle.
869  * @since_tizen 4.0
870  * @param[in] gesture_h The #efl_util_gesture_h handle
871  * @param[in] data      The #efl_util_gesture_data handle
872  * @return @c 0 on success, otherwise a negative error value
873  * @retval #EFL_UTIL_ERROR_NONE Successful
874  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
875  */
876 API int efl_util_gesture_palm_cover_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
877
878 /**
879  * @platform
880  * @brief Grabs a global gesture.
881  * @since_tizen 4.0
882  * @privlevel platform
883  * @privilege %http://tizen.org/privilege/gesturegrab
884  * @param[in] gesture_h The #efl_util_gesture_h handle
885  * @param[in] data      The #efl_util_gesture_data handle.
886  * @return @c 0 on success, otherwise a negative error value
887  * @retval #EFL_UTIL_ERROR_NONE Successful
888  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
889  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
890  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
891  * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
892  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
893  */
894 API int efl_util_gesture_grab(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
895
896 /**
897  * @platform
898  * @brief Ungrabs a global gesture.
899  * @since_tizen 4.0
900  * @privlevel platform
901  * @privilege %http://tizen.org/privilege/gesturegrab
902  * @param[in] gesture_h The #efl_util_gesture_h handle
903  * @param[in] data      The #efl_util_gesture_data handle.
904  * @return @c 0 on success, otherwise a negative error value
905  * @retval #EFL_UTIL_ERROR_NONE Successful
906  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
907  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
908  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
909  * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
910  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
911  */
912 API int efl_util_gesture_ungrab(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
913
914 /**
915  * @brief Selects a global gesture on given window.
916  * @since_tizen 4.0
917  * @param[in] gesture_h The #efl_util_gesture_h handle
918  * @param[in] window    The efl window
919  * @param[in] data      The #efl_util_gesture_data handle.
920  * @return @c 0 on success, otherwise a negative error value
921  * @retval #EFL_UTIL_ERROR_NONE Successful
922  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
923  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
924  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
925  */
926 API int efl_util_gesture_select(efl_util_gesture_h gesture_h, Evas_Object *window, efl_util_gesture_data data);
927
928 /**
929  * @brief Deselects a global gesture on given window.
930  * @since_tizen 4.0
931  * @param[in] gesture_h The #efl_util_gesture_h handle
932  * @param[in] window    The efl window
933  * @param[in] data      The #efl_util_gesture_data handle
934  * @return @c 0 on success, otherwise a negative error value
935  * @retval #EFL_UTIL_ERROR_NONE Successful
936  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
937  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
938  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
939  */
940 API int efl_util_gesture_deselect(efl_util_gesture_h gesture_h, Evas_Object *window, efl_util_gesture_data data);
941
942 /**
943  * @platform
944  * @brief Activates or deactivates a global gesture.
945  * @since_tizen 4.0
946  * @privlevel platform
947  * @privilege %http://tizen.org/privilege/gestureactivation
948  * @param[in] gesture_h The #efl_util_gesture_h handle
949  * @param[in] type      The gesture type to activate /deactivate combined by #efl_util_gesture_type_e to bitwise operation
950  * @param[in] active    The activated boolean value
951  * @return @c 0 on success, otherwise a negative error value
952  * @retval #EFL_UTIL_ERROR_NONE Successful
953  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
954  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
955  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
956  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
957  */
958 API int efl_util_gesture_activate_set(efl_util_gesture_h gesture_h, unsigned int type, Eina_Bool active);
959
960 /**
961  * @brief Activates or deactivates a global gesture on given window.
962  * @since_tizen 4.0
963  * @param[in] gesture_h The #efl_util_gesture_h handle
964  * @param[in] window    The efl window
965  * @param[in] type      The gesture type to activate /deactivate combined by #efl_util_gesture_type_e to bitwise operation
966  * @param[in] active    The activated boolean value
967  * @return @c 0 on success, otherwise a negative error value
968  * @retval #EFL_UTIL_ERROR_NONE Successful
969  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
970  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
971  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
972  */
973 API int efl_util_gesture_activate_set_on_window(efl_util_gesture_h gesture_h, Evas_Object *window, unsigned int type, Eina_Bool active);
974
975 /**
976  * @}
977  */
978
979 #ifdef __cplusplus
980 }
981 #endif
982 #endif /* __TIZEN_UI_EFL_UTIL_H__ */