Package version up to 0.7.27
[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 Deinitializes system and close opened devices.
345    * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
346    * @privlevel platform
347    * @privilege %http://tizen.org/privilege/inputgenerator
348    * @param[in] inputgen_h The #efl_util_inputgen_h handle
349    * @return @c 0 on success, otherwise a negative error value
350    * @retval #EFL_UTIL_ERROR_NONE Successful
351    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
352    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to deinitialize input generator
353    * @see efl_util_input_initialize_generator()
354    */
355 API int efl_util_input_deinitialize_generator(efl_util_inputgen_h inputgen_h);
356
357 /**
358    * @platform
359    * @brief Generates all of key events using a opened device.
360    * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
361    * @privlevel platform
362    * @privilege %http://tizen.org/privilege/inputgenerator
363    * @param[in] inputgen_h The #efl_util_inputgen_h handle
364    * @param[in] key_name The key name want to generate
365    * @param[in] pressed The value that select key press or release (0: release, 1: press)
366    * @return @c 0 on success, otherwise a negative error value
367    * @retval #EFL_UTIL_ERROR_NONE Successful
368    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
369    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate key
370    */
371 API int efl_util_input_generate_key(efl_util_inputgen_h inputgen_h, const char *key_name, int pressed);
372
373 /**
374    * @platform
375    * @brief Generates a touch event using a opened device.
376    * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
377    * @privlevel platform
378    * @privilege %http://tizen.org/privilege/inputgenerator
379    * @param[in] inputgen_h The #efl_util_inputgen_h handle
380    * @param[in] idx The index of touched finger
381    * @param[in] touch_type The touch type (ex> #EFL_UTIL_INPUT_TOUCH_BEGIN, #EFL_UTIL_INPUT_TOUCH_UPDATE, #EFL_UTIL_INPUT_TOUCH_END)
382    * @param[in] x The x axis of touch point
383    * @param[in] y The y axis of touch point
384    * @return @c 0 on success, otherwise a negative error value
385    * @retval #EFL_UTIL_ERROR_NONE Successful
386    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
387    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate touch
388    */
389 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);
390
391 /**
392    * @platform
393    * @brief Generates a pointer event using a opened device.
394    * @since_tizen 3.0
395    * @privlevel platform
396    * @privilege %http://tizen.org/privilege/inputgenerator
397    * @param[in] inputgen_h The #efl_util_inputgen_h handle
398    * @param[in] buttons The number of button
399    * @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)
400    * @param[in] x x coordination to move
401    * @param[in] y y coordination to move
402    * @return @c 0 on success, otherwise a negative error value
403    * @retval #EFL_UTIL_ERROR_NONE Successful
404    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
405    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate pointer
406    * @retval #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
407    * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
408    */
409 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);
410
411 /**
412    * @platform
413    * @brief Generates a wheel event using an opened device.
414    * @details Commonly wheel events are generated with one of two orientations, vertical and horizontal.
415    *          #efl_util_input_pointer_wheel_type_e has enums for orientations.
416    *          For each orientation there is a value which represents both size and direction.
417    *          For #EFL_UTIL_INPUT_POINTER_WHEEL_VERT, if the value is positive, the direction is "up", if it's negative, the direction is "down"
418    *          For #EFL_UTIL_INPUT_POINTER_WHEEL_HORZ, if the value is positive, the direction is "right", if it's negative, the direction is "left"
419    *          General mouse devices generate wheel events with value 1 or -1,
420    *          but some mouse devices have a smooth wheel which generates wheel events with value bigger than absolute 1.
421    * @since_tizen 5.5
422    * @privlevel platform
423    * @privilege %http://tizen.org/privilege/inputgenerator
424    * @param[in] inputgen_h The #efl_util_inputgen_h handle
425    * @param[in] wheel_type The wheel type (ex> #EFL_UTIL_INPUT_POINTER_WHEEL_VERT, #EFL_UTIL_INPUT_POINTER_WHEEL_HORZ)
426    * @param[in] value The wheel value
427    * @return @c 0 on success, otherwise a negative error value
428    * @retval #EFL_UTIL_ERROR_NONE Successful
429    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
430    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED No permission to generate a wheel event
431    * @retval #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
432    * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
433    * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
434    */
435 API int efl_util_input_generate_wheel(efl_util_inputgen_h inputgen_h, efl_util_input_pointer_wheel_type_e wheel_type, int value);
436
437 /**
438    * @platform
439    * @brief Generates a touch event using an opened device.
440    * @details Normally touch events are represented by a specific point (x, y).
441    *          But there are many contact points between touchscreen and fingers.
442    *          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.
443    *          To give information about the size of the touching cllipse, use @a radius_x and @a radius_y.
444    *          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.
445    *          General devices support 10 touch indices(0 ~ 9), but this may differ depending on the device.
446    *          Some devices may not support the @a palm value, and this value is closely dependent on device.
447    *          The value of @a x, @a y, @a radius_x, @a radius_y, @a pressure and @a palm must be greater than 0.
448    *          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.
449    * @since_tizen 5.5
450    * @privlevel platform
451    * @privilege %http://tizen.org/privilege/inputgenerator
452    * @param[in] inputgen_h The #efl_util_inputgen_h handle
453    * @param[in] idx The index of the touching finger, used in multi-touch
454    * @param[in] touch_type The touch type (ex> #EFL_UTIL_INPUT_TOUCH_BEGIN, #EFL_UTIL_INPUT_TOUCH_UPDATE, #EFL_UTIL_INPUT_TOUCH_END)
455    * @param[in] x The x coordinate of the touch point
456    * @param[in] y The y coordinate of the touch point
457    * @param[in] radius_x The x-axis radius of the touching ellipse before rotation
458    * @param[in] radius_y The y-axis radius of the touching ellipse before rotation
459    * @param[in] pressure The pressure on the contact touch area
460    * @param[in] angle The rotation angle of the touching ellipse, in degrees
461    * @param[in] palm The palm area of the contact touch area
462    * @return @c 0 on success, otherwise a negative error value
463    * @retval #EFL_UTIL_ERROR_NONE Successful
464    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
465    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED No permission to generate a touch event
466    * @retval #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
467    * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
468    * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
469    */
470 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);
471
472 /**
473  * @}
474  */
475
476 /**
477  * @addtogroup CAPI_EFL_UTIL_SCREENSHOT_MODULE
478  * @{
479  */
480
481 /**
482  * @platform
483  * @brief Definition for the screenshot handle.
484  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
485  */
486 typedef struct _efl_util_screenshot_h * efl_util_screenshot_h;
487
488 /**
489  * @platform
490  * @brief Initializes the screenshot.
491  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
492  * @privlevel platform
493  * @privilege %http://tizen.org/privilege/screenshot
494  * @remarks The specific error code can be obtained using the get_last_result()
495  * method. Error codes are described in Exception section.
496  * @param[in] width width of the screenshot surface
497  * @param[in] height height of the screenshot surface
498  * @return #efl_util_screenshot_h on success, otherwise @c NULL
499  * @retval #efl_util_screenshot_h  The screenshot handle
500  * @exception #EFL_UTIL_ERROR_NONE Successful
501  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
502  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
503  * @exception #EFL_UTIL_ERROR_SCREENSHOT_INIT_FAIL Initialization failure
504  * @exception #EFL_UTIL_ERROR_PERMISSION_DENIED No permission for screenshot
505  * @see efl_util_screenshot_deinitialize()
506  */
507 API efl_util_screenshot_h efl_util_screenshot_initialize(int width, int height);
508
509 /**
510  * @platform
511  * @brief Takes a screenshot and get a tbm_surface handle.
512  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
513  * @privlevel platform
514  * @privilege %http://tizen.org/privilege/screenshot
515  * @remarks The specific error code can be obtained using the get_last_result()
516  *          The #tbm_surface_h must be free by caller
517  * @param[in] screenshot #efl_util_screenshot_h handle
518  * @return #tbm_surface_h on success, otherwise @c NULL
519  * @retval #tbm_surface_h The TBM surface handle
520  * @exception #EFL_UTIL_ERROR_NONE Successful
521  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
522  * @exception #EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL Execution failure
523  * @exception #EFL_UTIL_ERROR_PERMISSION_DENIED No permission for screenshot
524  * @see efl_util_screenshot_initialize()
525  * @see efl_util_screenshot_deinitialize()
526  */
527 API tbm_surface_h efl_util_screenshot_take_tbm_surface(efl_util_screenshot_h screenshot);
528
529 /**
530  * @platform
531  * @brief Deinitializes the screenshot.
532  * @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
533  * @privlevel platform
534  * @privilege %http://tizen.org/privilege/screenshot
535  * @param[in]  screenshot  #efl_util_screenshot_h handle
536  * @return @c 0 on success, otherwise a negative error value
537  * @retval #EFL_UTIL_ERROR_NONE Successful
538  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
539  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED No permission for screenshot
540  * @see efl_util_screenshot_initialize()
541  */
542 API int efl_util_screenshot_deinitialize(efl_util_screenshot_h screenshot);
543
544 /**
545  * @}
546  */
547
548 /**
549  * @addtogroup CAPI_EFL_UTIL_GESTURE_MODULE
550  * @{
551  */
552
553 /**
554  * @brief Definition for the gesture handle.
555  * @since_tizen 4.0
556  */
557 typedef struct _efl_util_gesture_h * efl_util_gesture_h;
558
559 /**
560  * @brief Definition for the edge swipe gesture event.
561  * @since_tizen 4.0
562  */
563 API extern int EFL_UTIL_EVENT_GESTURE_EDGE_SWIPE;
564
565 /**
566  * @brief Definition for the edge swipe gesture event.
567  * @since_tizen 4.0
568  */
569 API extern int EFL_UTIL_EVENT_GESTURE_EDGE_DRAG;
570
571 /**
572  * @brief Definition for the tap gesture event.
573  * @since_tizen 4.0
574  */
575 API extern int EFL_UTIL_EVENT_GESTURE_TAP;
576
577 /**
578  * @brief Definition for the palm cover gesture event.
579  * @since_tizen 4.0
580  */
581 API extern int EFL_UTIL_EVENT_GESTURE_PALM_COVER;
582
583 /**
584  * @brief Enumeration of gesture type.
585  * @since_tizen 4.0
586  */
587 typedef enum _efl_util_gesture_type_e
588 {
589    EFL_UTIL_GESTURE_TYPE_NONE       = 0,        /**< None gesture type */
590    EFL_UTIL_GESTURE_TYPE_EDGE_SWIPE = (1 << 0), /**< Edge swipe gesture type */
591    EFL_UTIL_GESTURE_TYPE_EDGE_DRAG  = (1 << 1), /**< Edge drag gesture type */
592    EFL_UTIL_GESTURE_TYPE_TAP        = (1 << 2), /**< Tap gesture type */
593    EFL_UTIL_GESTURE_TYPE_PALM_COVER = (1 << 3), /**< Palm cover gesture type */
594    EFL_UTIL_GESTURE_TYPE_PAN        = (1 << 4), /**< Pan gesture type */
595    EFL_UTIL_GESTURE_TYPE_PINCH      = (1 << 5), /**< Pinch gesture type */
596    EFL_UTIL_GESTURE_TYPE_PALM_SWIPE = (1 << 6)  /**< Palm swipe gesture type */
597 } efl_util_gesture_type_e;
598
599 /**
600  * @brief Enumeration of gesture mode.
601  * @since_tizen 4.0
602  */
603 typedef enum _efl_util_gesture_mode_e
604 {
605    EFL_UTIL_GESTURE_MODE_NONE    = 0, /**< None gesture mode */
606    EFL_UTIL_GESTURE_MODE_BEGIN,       /**< Begin a gesture event */
607    EFL_UTIL_GESTURE_MODE_UPDATE,      /**< continually update a gesture event */
608    EFL_UTIL_GESTURE_MODE_END,         /**< End a gesture event */
609    EFL_UTIL_GESTURE_MODE_DONE         /**< Occur a gesture event */
610 } efl_util_gesture_mode_e;
611
612 /**
613  * @brief Enumeration of gesture edge.
614  * @since_tizen 4.0
615  */
616 typedef enum _efl_util_gesture_edge_e
617 {
618    EFL_UTIL_GESTURE_EDGE_NONE    = 0, /**< None edge point */
619    EFL_UTIL_GESTURE_EDGE_TOP,         /**< Top edge position of screen */
620    EFL_UTIL_GESTURE_EDGE_RIGHT,       /**< Right edge position of screen */
621    EFL_UTIL_GESTURE_EDGE_BOTTOM,      /**< Bottom edge position of screen */
622    EFL_UTIL_GESTURE_EDGE_LEFT         /**< Left edge position of screen */
623 } efl_util_gesture_edge_e;
624
625 /**
626  * @brief Enumeration of gesture edge size.
627  * @since_tizen 4.0
628  */
629 typedef enum _efl_util_gesture_edge_size_e
630 {
631    EFL_UTIL_GESTURE_EDGE_SIZE_NONE,    /**< None size of edge */
632    EFL_UTIL_GESTURE_EDGE_SIZE_FULL,    /**< Full size in the edge */
633    EFL_UTIL_GESTURE_EDGE_SIZE_PARTIAL  /**< Part of edge */
634 } efl_util_gesture_edge_size_e;
635
636 /**
637  * @brief Definition for the gesture data handle.
638  * @since_tizen 4.0
639  */
640 typedef void *efl_util_gesture_data;
641
642 /**
643  * @brief Definition for the edge swipe gesture's event data structure.
644  * @since_tizen 4.0
645  */
646 typedef struct _efl_util_event_gesture_edge_swipe_s
647 {
648    efl_util_gesture_mode_e mode;  /**< Mode of a gesture event */
649    unsigned int fingers;          /**< Number of fingers */
650    int sx;                        /**< Start x point of edge area */
651    int sy;                        /**< Start y point of edge area */
652    unsigned int edge;             /**< Start edge location */
653 } efl_util_event_gesture_edge_swipe_s;
654
655 /**
656  * @brief Definition for the edge drag gesture's event data structure.
657  * @since_tizen 4.0
658  */
659 typedef struct efl_util_event_gesture_edge_drag_s
660 {
661    efl_util_gesture_mode_e mode;  /**< Mode of a gesture event */
662    unsigned int fingers;          /**< Number of fingers */
663    int cx;                        /**< Center x point of edge area */
664    int cy;                        /**< Center y point of edge area */
665    unsigned int edge;             /**< Start edge location */
666 } efl_util_event_gesture_edge_drag_s;
667
668 /**
669  * @brief Definition for the tap gesture's event data structure.
670  * @since_tizen 4.0
671  */
672 typedef struct _efl_util_event_gesture_tap_s
673 {
674    efl_util_gesture_mode_e mode;  /**< Mode of a gesture event */
675    unsigned int fingers;          /**< Number of fingers */
676    unsigned int repeats;          /**< Number of tap repeats */
677 } efl_util_event_gesture_tap_s;
678
679 /**
680  * @brief Definition for the palm cover gesture's event data structure.
681  * @since_tizen 4.0
682  */
683 typedef struct _efl_util_event_gesture_palm_cover_s
684 {
685    efl_util_gesture_mode_e mode;  /**< Mode of a gesture event */
686    unsigned int duration;         /**< Duration time of gesture behavior */
687    int cx;                        /**< Center x point of edge area */
688    int cy;                        /**< Center y point of edge area */
689    unsigned int size;             /**< Size of touched area */
690    double pressure;               /**< Pressure of touched finger */
691 } efl_util_event_gesture_palm_cover_s;
692
693 /**
694  * @brief Initializes system and check if global gestures are supported.
695  * @since_tizen 4.0
696  * @remarks The specific error code can be obtained using the get_last_result() method.
697  *          Error codes are described in Exception section.
698  * @return #efl_util_gesture_h on success, otherwise @c NULL
699  * @retval #efl_util_gesture_h The global gesture handle
700  * @exception #EFL_UTIL_ERROR_NONE Successful
701  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
702  * @exception #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
703  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
704  * @see efl_util_gesture_deinitialize()
705  */
706 API efl_util_gesture_h efl_util_gesture_initialize(void);
707
708 /**
709  * @brief Deinitializes system.
710  * @since_tizen 4.0
711  * @param[in] gesture_h The #efl_util_gesture_h handle
712  * @return @c 0 on success, otherwise a negative error value
713  * @retval #EFL_UTIL_ERROR_NONE Successful
714  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
715  * @see efl_util_gesture_initialize()
716  */
717 API int efl_util_gesture_deinitialize(efl_util_gesture_h gesture_h);
718
719 /**
720  * @brief Generates a edge swipe gesture's grab info handle.
721  * @since_tizen 4.0
722  * @param[in] gesture_h The #efl_util_gesture_h handle
723  * @param[in] fingers   The number of fingers
724  * @param[in] edge      The position of edge
725  * @remarks The specific error code can be obtained using the get_last_result() method.
726  *          Error codes are described in Exception section.
727  * @return #efl_util_gesture_data on success, otherwise @c NULL
728  * @retval #efl_util_gesture_data The specific gesture data handle
729  * @exception #EFL_UTIL_ERROR_NONE Successful
730  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
731  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
732  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
733  */
734 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);
735
736 /**
737  * @brief Frees a memory of edge swipe gesture's grab info handle.
738  * @since_tizen 4.0
739  * @param[in] gesture_h The #efl_util_gesture_h handle
740  * @param[in] data      The #efl_util_gesture_data handle
741  * @return @c 0 on success, otherwise a negative error value
742  * @retval #EFL_UTIL_ERROR_NONE Successful
743  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
744  */
745 API int efl_util_gesture_edge_swipe_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
746
747
748 /**
749  * @brief Sets a specific size of edge for edge swipe gesture.
750  * @since_tizen 4.0
751  * @param[in] data        The #efl_util_gesture_data handle
752  * @param[in] edge_size   The #efl_util_gesture_edge_size_e enum
753  * @param[in] start_point The start point of edge area
754  * @param[in] end_point   The end point of edge area
755  * @return @c 0 on success, otherwise a negative error value
756  * @retval #EFL_UTIL_ERROR_NONE Successful
757  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
758  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
759  */
760 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);
761
762 /**
763  * @brief Generates a edge drag gesture's grab info handle.
764  * @since_tizen 4.0
765  * @param[in] gesture_h The #efl_util_gesture_h handle
766  * @param[in] fingers   The number of fingers
767  * @param[in] edge      The position of edge
768  * @remarks The specific error code can be obtained using the get_last_result() method.
769  *          Error codes are described in Exception section.
770  * @return #efl_util_gesture_data on success, otherwise @c NULL
771  * @retval #efl_util_gesture_data The specific gesture data handle
772  * @exception #EFL_UTIL_ERROR_NONE Successful
773  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
774  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
775  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
776  */
777 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);
778
779 /**
780  * @brief Frees a memory of edge drag gesture's grab info handle.
781  * @since_tizen 4.0
782  * @param[in] gesture_h The #efl_util_gesture_h handle
783  * @param[in] data      The #efl_util_gesture_data handle
784  * @return @c 0 on success, otherwise a negative error value
785  * @retval #EFL_UTIL_ERROR_NONE Successful
786  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
787  */
788 API int efl_util_gesture_edge_drag_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
789
790 /**
791  * @brief Sets a specific size of edge for edge drag gesture.
792  * @since_tizen 4.0
793  * @param[in] data        The #efl_util_gesture_data handle
794  * @param[in] edge_size   The #efl_util_gesture_edge_size_e enum
795  * @param[in] start_point The start point of edge area
796  * @param[in] end_point   The end point of edge area
797  * @return @c 0 on success, otherwise a negative error value
798  * @retval #EFL_UTIL_ERROR_NONE Successful
799  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
800  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
801  */
802 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);
803
804 /**
805  * @brief Generates a tap gesture's grab info handle.
806  * @since_tizen 4.0
807  * @param[in] gesture_h The #efl_util_gesture_h handle
808  * @param[in] fingers   The number of fingers
809  * @param[in] repeats   The number of repeats
810  * @remarks The specific error code can be obtained using the get_last_result() method.
811  *          Error codes are described in Exception section.
812  * @return #efl_util_gesture_data on success, otherwise @c NULL
813  * @retval #efl_util_gesture_data The specific gesture data handle
814  * @exception #EFL_UTIL_ERROR_NONE Successful
815  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
816  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
817  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
818  */
819 API efl_util_gesture_data efl_util_gesture_tap_new(efl_util_gesture_h gesture_h, unsigned int fingers, unsigned int repeats);
820
821 /**
822  * @brief Frees a memory of tap gesture's grab info handle.
823  * @since_tizen 4.0
824  * @param[in] gesture_h The #efl_util_gesture_h handle
825  * @param[in] data      The #efl_util_gesture_data handle
826  * @return @c 0 on success, otherwise a negative error value
827  * @retval #EFL_UTIL_ERROR_NONE Successful
828  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
829  */
830 API int efl_util_gesture_tap_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
831
832 /**
833  * @brief Generates a palm cover gesture's grab info handle.
834  * @since_tizen 4.0
835  * @param[in] gesture_h The #efl_util_gesture_h handle
836  * @remarks The specific error code can be obtained using the get_last_result() method.
837  *          Error codes are described in Exception section.
838  * @return #efl_util_gesture_data on success, otherwise @c NULL
839  * @retval #efl_util_gesture_data The specific gesture data handle
840  * @exception #EFL_UTIL_ERROR_NONE Successful
841  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
842  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
843  * @exception #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
844  */
845 API efl_util_gesture_data efl_util_gesture_palm_cover_new(efl_util_gesture_h gesture_h);
846
847 /**
848  * @brief Frees a memory of palm cover gesture's grab info handle.
849  * @since_tizen 4.0
850  * @param[in] gesture_h The #efl_util_gesture_h handle
851  * @param[in] data      The #efl_util_gesture_data handle
852  * @return @c 0 on success, otherwise a negative error value
853  * @retval #EFL_UTIL_ERROR_NONE Successful
854  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
855  */
856 API int efl_util_gesture_palm_cover_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
857
858 /**
859  * @platform
860  * @brief Grabs a global gesture.
861  * @since_tizen 4.0
862  * @privlevel platform
863  * @privilege %http://tizen.org/privilege/gesturegrab
864  * @param[in] gesture_h The #efl_util_gesture_h handle
865  * @param[in] data      The #efl_util_gesture_data handle.
866  * @return @c 0 on success, otherwise a negative error value
867  * @retval #EFL_UTIL_ERROR_NONE Successful
868  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
869  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
870  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
871  * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
872  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
873  */
874 API int efl_util_gesture_grab(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
875
876 /**
877  * @platform
878  * @brief Ungrabs a global gesture.
879  * @since_tizen 4.0
880  * @privlevel platform
881  * @privilege %http://tizen.org/privilege/gesturegrab
882  * @param[in] gesture_h The #efl_util_gesture_h handle
883  * @param[in] data      The #efl_util_gesture_data handle.
884  * @return @c 0 on success, otherwise a negative error value
885  * @retval #EFL_UTIL_ERROR_NONE Successful
886  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
887  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
888  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
889  * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED Not supported
890  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
891  */
892 API int efl_util_gesture_ungrab(efl_util_gesture_h gesture_h, efl_util_gesture_data data);
893
894 /**
895  * @brief Selects a global gesture on given window.
896  * @since_tizen 4.0
897  * @param[in] gesture_h The #efl_util_gesture_h handle
898  * @param[in] window    The efl window
899  * @param[in] data      The #efl_util_gesture_data handle.
900  * @return @c 0 on success, otherwise a negative error value
901  * @retval #EFL_UTIL_ERROR_NONE Successful
902  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
903  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
904  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
905  */
906 API int efl_util_gesture_select(efl_util_gesture_h gesture_h, Evas_Object *window, efl_util_gesture_data data);
907
908 /**
909  * @brief Deselects a global gesture on given window.
910  * @since_tizen 4.0
911  * @param[in] gesture_h The #efl_util_gesture_h handle
912  * @param[in] window    The efl window
913  * @param[in] data      The #efl_util_gesture_data handle
914  * @return @c 0 on success, otherwise a negative error value
915  * @retval #EFL_UTIL_ERROR_NONE Successful
916  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
917  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
918  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
919  */
920 API int efl_util_gesture_deselect(efl_util_gesture_h gesture_h, Evas_Object *window, efl_util_gesture_data data);
921
922 /**
923  * @platform
924  * @brief Activates or deactivates a global gesture.
925  * @since_tizen 4.0
926  * @privlevel platform
927  * @privilege %http://tizen.org/privilege/gestureactivation
928  * @param[in] gesture_h The #efl_util_gesture_h handle
929  * @param[in] type      The gesture type to activate /deactivate combined by #efl_util_gesture_type_e to bitwise operation
930  * @param[in] active    The activated boolean value
931  * @return @c 0 on success, otherwise a negative error value
932  * @retval #EFL_UTIL_ERROR_NONE Successful
933  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
934  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
935  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
936  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
937  */
938 API int efl_util_gesture_activate_set(efl_util_gesture_h gesture_h, unsigned int type, Eina_Bool active);
939
940 /**
941  * @brief Activates or deactivates a global gesture on given window.
942  * @since_tizen 4.0
943  * @param[in] gesture_h The #efl_util_gesture_h handle
944  * @param[in] window    The efl window
945  * @param[in] type      The gesture type to activate /deactivate combined by #efl_util_gesture_type_e to bitwise operation
946  * @param[in] active    The activated boolean value
947  * @return @c 0 on success, otherwise a negative error value
948  * @retval #EFL_UTIL_ERROR_NONE Successful
949  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
950  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
951  * @retval #EFL_UTIL_ERROR_NO_RESOURCE_AVAILABLE Resource is not available
952  */
953 API int efl_util_gesture_activate_set_on_window(efl_util_gesture_h gesture_h, Evas_Object *window, unsigned int type, Eina_Bool active);
954
955 /**
956  * @}
957  */
958
959 #ifdef __cplusplus
960 }
961 #endif
962 #endif /* __TIZEN_UI_EFL_UTIL_H__ */