ff3df3162372eed3637c4de973aa189a13e421fd
[platform/core/api/efl-util.git] / include / efl_util.h.in
1 /*
2  * Copyright (c) 2011-2015 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_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: $TZ_CFG_VER_24_OR_30$) */
56    EFL_UTIL_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< @platform Function not implemented (@b Since: $TZ_CFG_VER_24_OR_30$) */
57    EFL_UTIL_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< @platform Not supported (@b Since: $TZ_CFG_VER_24_OR_30$) */
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: $TZ_CFG_VER_24_OR_30$) */
60    EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL = TIZEN_ERROR_EFL_UTIL | 0x03  /**< @platform Screenshot execution fail (@b Since: $TZ_CFG_VER_24_OR_30$) */
61 } efl_util_error_e;
62
63 /**
64  * @brief Enumeration of notification window's priority level.
65  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
66  */
67 typedef enum
68 {
69    EFL_UTIL_NOTIFICATION_LEVEL_1, /**< Default notification level. (Deprecated since $TZ_CFG_VER_24_OR_30$. Use EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT instead.) */
70    EFL_UTIL_NOTIFICATION_LEVEL_2, /**< Higher notification level than default. (Deprecated since $TZ_CFG_VER_24_OR_30$. Use EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM instead.) */
71    EFL_UTIL_NOTIFICATION_LEVEL_3, /**< The highest notification level. (Deprecated since $TZ_CFG_VER_24_OR_30$. Use EFL_UTIL_NOTIFICATION_LEVEL_TOP instead.) */
72    EFL_UTIL_NOTIFICATION_LEVEL_NONE    = -1, /**< No (reset) notification level. This value makes the window place in normal layer. (@b Since: $TZ_CFG_VER_24_OR_30$) */
73    EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT = 10, /**< Default notification level. (@b Since: $TZ_CFG_VER_24_OR_30$) */
74    EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM  = 20, /**< Higher notification level than default. (@b Since: $TZ_CFG_VER_24_OR_30$) */
75    EFL_UTIL_NOTIFICATION_LEVEL_HIGH    = 30, /**< Higher notification level than medium. (@b Since: $TZ_CFG_VER_24_OR_30$) */
76    EFL_UTIL_NOTIFICATION_LEVEL_TOP     = 40  /**< The highest notification level. (@b Since: $TZ_CFG_VER_24_OR_30$) */
77 } efl_util_notification_level_e;
78
79 /**
80  * @brief Enumeration of screen mode.
81  * @since_tizen $TZ_CFG_VER_24_OR_30$
82  */
83 typedef enum
84 {
85    EFL_UTIL_SCREEN_MODE_DEFAULT, /**< The mode which turns the screen off after a timeout. */
86    EFL_UTIL_SCREEN_MODE_ALWAYS_ON, /**< The mode which keeps the screen turned on. */
87 } efl_util_screen_mode_e;
88
89 /**
90  * @brief Sets the priority level for the specified notification window.
91  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
92  * @privlevel public
93  * @privilege %http://tizen.org/privilege/window.priority.set
94  * @remarks This API can be used for a notification type window only.
95  *          Up to the version $TZ_CFG_VER_24_OR_231$, it supports as async APIs.
96  *          But it is synchronous call since Tizen 3.0
97  * @param[in] window The EFL window
98  * @param[in] level The notification window level
99  * @return @c 0 on success, otherwise a negative error value
100  * @retval #EFL_UTIL_ERROR_NONE Successful
101  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
102  * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE Window type not supported
103  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
104  */
105 API int efl_util_set_notification_window_level(Evas_Object *window, efl_util_notification_level_e level);
106
107 /**
108  * @brief Gets the priority level for the specified notification window.
109  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
110  *
111  * @remarks This API can be used for a notification type window only.
112  *          Up to the version $TZ_CFG_VER_24_OR_231$, it supports as async APIs.
113  *          But it is synchronous call since Tizen 3.0
114  * @param[in] window The EFL window
115  * @param[out] level The notification window level
116  * @return @c 0 on success, otherwise a negative error value
117  * @retval #EFL_UTIL_ERROR_NONE Successful
118  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
119  * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE Window type not supported
120  */
121 API int efl_util_get_notification_window_level(Evas_Object *window, efl_util_notification_level_e *level);
122
123 /**
124  * @deprecated Deprecated since 3.0.
125  * @brief Called when an error occurs for setting notification window level
126  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
127  * @remarks An application can check error by the return value of efl_util_set_notification_window_level since 3.0.
128  * @param[in] window The EFL window
129  * @param[in] error_code The error code (#EFL_UTIL_ERROR_PERMISSION_DENIED)
130  * @param[in] user_data The user data passed from the callback registration function
131  * @see efl_util_set_notification_window_level_error_cb()
132  * @see efl_util_unset_notification_window_level_error_cb()
133  */
134 typedef void (*efl_util_notification_window_level_error_cb)(Evas_Object *window, int error_code, void *user_data);
135
136 /**
137  * @deprecated Deprecated since 3.0. Use the return value of efl_util_set_notification_window_level() instead.
138  * @brief Registers a callback function to be invoked when an error which set the notification level occurs.
139  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
140  * @remarks An application can check error by the return value of efl_util_set_notification_window_level since 3.0.
141  * @param[in] window The EFL window
142  * @param[in] callback The callback function to register
143  * @param[in] user_data The user data to be passed to the callback function
144  * @return @c 0 on success, otherwise a negative error value
145  * @retval #EFL_UTIL_ERROR_NONE Successful
146  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
147  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Out of memory
148  * @post efl_util_notification_window_level_error_cb() will be invoked.
149  * @see efl_util_unset_notification_window_level_error_cb()
150  * @see efl_util_notification_window_level_error_cb()
151  */
152 API int efl_util_set_notification_window_level_error_cb(Evas_Object *window, efl_util_notification_window_level_error_cb callback, void *user_data) TIZEN_DEPRECATED_API;
153
154 /**
155  * @deprecated Deprecated since 3.0. Use the return value of efl_util_set_notification_window_level() instead.
156  * @brief Unregisters the callback function.
157  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
158  * @remarks An application can check error by the return value of efl_util_set_notification_window_level since 3.0.
159  * @param[in] window The EFL window
160  * @return @c 0 on success, otherwise a negative error value
161  * @retval #EFL_UTIL_ERROR_NONE Successful
162  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
163  * @see efl_util_set_notification_window_level_error_cb()
164  */
165 API int efl_util_unset_notification_window_level_error_cb(Evas_Object *window) TIZEN_DEPRECATED_API;
166
167 /**
168  * @brief Sets the alpha window's visual state to opaque state
169  * @details This API sets the alpha window's visual state to opaque state.
170  *          If the alpha window sets the visual state to the opaque,
171  *          then the window manager could handle it as the opaque window while calculating visibility.
172  *          This API will have no effect when used by a non-alpha window.
173  * @since_tizen $TZ_CFG_VER_24_OR_30$
174  * @param[in] window The EFL window
175  * @param[in] opaque The value that indicates whether the window has set a visual state to opaque (0: unset, 1: set)
176  * @return @c 0 on success, otherwise a negative error value
177  * @retval #EFL_UTIL_ERROR_NONE Successful
178  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
179  */
180 API int efl_util_set_window_opaque_state(Evas_Object *window, int opaque);
181
182 /**
183  * @brief Sets the window's screen mode.
184  * @details This API is useful when the application need to keep the display turned on.
185  *          If the application set the mode to #EFL_UTIL_SCREEN_MODE_ALWAYS_ON to its window and the window is shown wholly or partially,
186  *          the window manager requests the display system to keep the display on as long as the window is shown.
187  *          If the window is no longer shown, then the window manger request the display system to go back to normal operation.
188  *          Default screen mode of window is #EFL_UTIL_SCREEN_MODE_DEFAULT.
189  * @since_tizen $TZ_CFG_VER_24_OR_30$
190  * @privlevel public
191  * @privilege %http://tizen.org/privilege/display
192  * @remarks This API needs the privilege.
193  *          If the application which is not get the privilege use this API, the window manager generates the permission deny error.
194  *          The application can notice this error if it set the callback function using the efl_util_set_window_screen_mode_error_cb() (non-wearable only).
195  * @param[in] window The EFL window
196  * @param[in] mode The screen mode
197  * @return @c 0 on success, otherwise a negative error value
198  * @retval #EFL_UTIL_ERROR_NONE Successful
199  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
200  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
201  */
202 API int efl_util_set_window_screen_mode(Evas_Object *window, efl_util_screen_mode_e mode);
203
204 /**
205  * @brief Gets the screen mode of the specified window.
206  * @since_tizen $TZ_CFG_VER_24_OR_30$
207  * @param[in] window The EFL window
208  * @param[out] mode The screen mode
209  * @return @c 0 on success, otherwise a negative error value
210  * @retval #EFL_UTIL_ERROR_NONE Successful
211  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
212  */
213 API int efl_util_get_window_screen_mode(Evas_Object *window, efl_util_screen_mode_e *mode);
214
215 /**
216  * @deprecated Deprecated since 3.0.
217  * @brief Called when an error occurs for setting window's screen mode
218  * @since_tizen $TZ_CFG_NONWEARABLE_24
219  * @remarks An application can check error by the return value of efl_util_set_window_screen_mode since 3.0.
220  * @param[in] window The EFL window
221  * @param[in] error_code The error code (#EFL_UTIL_ERROR_PERMISSION_DENIED)
222  * @param[in] user_data The user data passed from the callback registration function
223  * @see efl_util_set_window_screen_mode_error_cb()
224  * @see efl_util_unset_window_screen_mode_error_cb()
225  */
226 typedef void (*efl_util_window_screen_mode_error_cb)(Evas_Object *window, int error_code, void *user_data);
227
228 /**
229  * @deprecated Deprecated since 3.0. Use the return value of efl_util_set_window_screen_mode() instead.
230  * @brief Registers a callback function to be invoked when an error which set the screen mode.
231  * @since_tizen $TZ_CFG_NONWEARABLE_24
232  * @remarks An application can check error by the return value of efl_util_set_window_screen_mode since 3.0.
233  * @param[in] window The EFL window
234  * @param[in] callback The callback function to register
235  * @param[in] user_data The user data to be passed to the callback function
236  * @return @c 0 on success, otherwise a negative error value
237  * @retval #EFL_UTIL_ERROR_NONE Successful
238  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
239  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Out of memory
240  * @post  efl_util_window_screen_mode_error_cb() will be invoked.
241  * @see efl_util_unset_window_screen_mode_error_cb()
242  * @see efl_util_window_screen_mode_error_cb()
243  */
244 API int efl_util_set_window_screen_mode_error_cb(Evas_Object *window, efl_util_window_screen_mode_error_cb callback, void *user_data) TIZEN_DEPRECATED_API;
245
246 /**
247  * @deprecated Deprecated since 3.0. Use the return value of efl_util_set_window_screen_mode() instead.
248  * @brief Unregisters the callback function.
249  * @since_tizen $TZ_CFG_NONWEARABLE_24
250  * @remarks An application can check error by the return value of efl_util_set_window_screen_mode since 3.0.
251  * @param[in] window The EFL window
252  * @return @c 0 on success, otherwise a negative error value
253  * @retval #EFL_UTIL_ERROR_NONE Successful
254  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
255  * @see efl_util_set_window_screen_mode_error_cb()
256  */
257 API int efl_util_unset_window_screen_mode_error_cb(Evas_Object *window) TIZEN_DEPRECATED_API;
258
259 /**
260  * @brief Sets the user's preferred brightness of the specified window.
261  * @details This API is useful when the application need to change the brightness of the screen when it is appeared on the screen.
262  *          If the application sets the brightness 0 to 100 to its window and the application window is shown wholly or partially,
263  *          the window manager requests the display system to change the brightness of the screen using user's preferred brightness.
264  *          If the window is no longer shown, then the window manger request the display system to go back to default brightness.
265  *          If the brightness is less than 0, this means to use the default screen brightness.
266  * @since_tizen 3.0
267  * @privlevel public
268  * @privilege %http://tizen.org/privilege/display
269  * @remarks This API needs the privilege.
270  *          If the application which is not get the privilege use this API, the window manager generates the permission deny error.
271  * @param[in] window The EFL window
272  * @param[in] brightness The preferred brightness
273  * @return @c 0 on success, otherwise a negative error value
274  * @retval #EFL_UTIL_ERROR_NONE Successful
275  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
276  * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied
277  * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Out of memory
278  * @see efl_util_get_window_brightness()
279  */
280 API int efl_util_set_window_brightness(Evas_Object *window, int brightness);
281
282 /**
283  * @brief Gets the user's preferred brightness of the specified window.
284  * @since_tizen 3.0
285  * @param[in] window The EFL window
286  * @param[out] brightness The preferred brightness
287  * @return @c 0 on success, otherwise a negative error value
288  * @retval #EFL_UTIL_ERROR_NONE Successful
289  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
290  * @see efl_util_set_window_brightness()
291  */
292 API int efl_util_get_window_brightness(Evas_Object *window, int *brightness);
293
294
295 /**
296  * @}
297  */
298
299 /**
300  * @addtogroup CAPI_EFL_UTIL_INPUT_MODULE
301  * @{
302  */
303
304  /**
305   * @platform
306   * @brief Definition for the input generator handle.
307   * @since_tizen $TZ_CFG_VER_24_OR_30$
308   */
309
310  typedef struct _efl_util_inputgen_h * efl_util_inputgen_h;
311
312 /**
313  * @platform
314  * @brief Enumeration of device type generated events.
315  * @since_tizen $TZ_CFG_VER_24_OR_30$
316  */
317 typedef enum
318 {
319    EFL_UTIL_INPUT_DEVTYPE_NONE = 0x0, /**< (Deprecated since 3.0.) */
320    EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN = (1 << 0), /**< Touch Screen device */
321    EFL_UTIL_INPUT_DEVTYPE_KEYBOARD = (1 << 1), /**< Keyboard device */
322    EFL_UTIL_INPUT_DEVTYPE_POINTER = (1 << 2), /**< Mouse device (Since 3.0) */
323    EFL_UTIL_INPUT_DEVTYPE_ALL = EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN |
324                                 EFL_UTIL_INPUT_DEVTYPE_KEYBOARD, /**< Both of touch screen and keyboard device (Deprecated since 3.0. Check all enumerations using OR operand instead) */
325    EFL_UTIL_INPUT_DEVTYPE_MAX = (1 << 10) /**< (Deprecated since 3.0.) */
326 } efl_util_input_device_type_e;
327
328 /**
329  * @platform
330  * @brief Enumeration of touch event types.
331  * @since_tizen $TZ_CFG_VER_24_OR_30$
332  */
333 typedef enum
334 {
335    EFL_UTIL_INPUT_TOUCH_NONE, /**< (Deprecated since 3.0.) */
336    EFL_UTIL_INPUT_TOUCH_BEGIN, /**< Finger press. It is same a behavior put your finger on touch screen */
337    EFL_UTIL_INPUT_TOUCH_UPDATE, /**< Finger move. It is same a behavior move your finger on touch screen */
338    EFL_UTIL_INPUT_TOUCH_END, /**< Finger release. It is same a behavior release your finger on touch screen */
339    EFL_UTIL_INPUT_TOUCH_MAX = 10 /**< (Deprecated since 3.0.) */
340 } efl_util_input_touch_type_e;
341
342 /**
343  * @platform
344  * @brief Enumeration of pointer event types.
345  * @since_tizen 3.0
346  */
347 typedef enum
348 {
349    EFL_UTIL_INPUT_POINTER_BUTTON_DOWN, /**< Mouse button press. */
350    EFL_UTIL_INPUT_POINTER_BUTTON_UP, /**< Mouse move. */
351    EFL_UTIL_INPUT_POINTER_MOVE, /**< Mouse button release. */
352 } efl_util_input_pointer_type_e;
353
354 /**
355    * @platform
356    * @brief Initializes system and check input generate functions are supported, open devices generated events.
357    * @since_tizen $TZ_CFG_VER_24_OR_30$
358    * @privlevel platform
359    * @privilege %http://tizen.org/privilege/inputgenerator
360    * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
361    * @remarks The dev_type is changed into the unsigned int to perform bitwise operations. (Since 3.0)
362    * @param[in] dev_type The device type want to generate events (ex> #EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN | #EFL_UTIL_INPUT_DEVTYPE_KEYBOARD)
363    * @return #efl_util_inputgen_h on success, otherwise @c NULL
364    * @retval #efl_util_inputgen_h The input generator handle
365    * @exception #EFL_UTIL_ERROR_NONE Successful
366    * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
367    * @exception #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
368    * @exception #EFL_UTIL_ERROR_INVALID_OPERATION Function not implemented
369    * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
370    * @see efl_util_input_deinitialize_generator()
371    */
372 API efl_util_inputgen_h efl_util_input_initialize_generator(unsigned int dev_type);
373
374 /**
375    * @platform
376    * @brief Deinitializes system and close opened devices.
377    * @since_tizen $TZ_CFG_VER_24_OR_30$
378    * @privlevel platform
379    * @privilege %http://tizen.org/privilege/inputgenerator
380    * @param[in] inputgen_h The #efl_util_inputgen_h handle
381    * @return @c 0 on success, otherwise a negative error value
382    * @retval #EFL_UTIL_ERROR_NONE Successful
383    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
384    * @see efl_util_input_initialize_generator()
385    */
386 API int efl_util_input_deinitialize_generator(efl_util_inputgen_h inputgen_h);
387
388 /**
389    * @platform
390    * @brief Generates all of key events using a opened device.
391    * @since_tizen $TZ_CFG_VER_24_OR_30$
392    * @privlevel platform
393    * @privilege %http://tizen.org/privilege/inputgenerator
394    * @param[in] inputgen_h The #efl_util_inputgen_h handle
395    * @param[in] key_name The key name want to generate
396    * @param[in] pressed The value that select key press or release (0: release, 1: press)
397    * @return @c 0 on success, otherwise a negative error value
398    * @retval #EFL_UTIL_ERROR_NONE Successful
399    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
400    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate key
401    */
402 API int efl_util_input_generate_key(efl_util_inputgen_h inputgen_h, const char *key_name, int pressed);
403
404 /**
405    * @platform
406    * @brief Generates a touch event using a opened device.
407    * @since_tizen $TZ_CFG_VER_24_OR_30$
408    * @privlevel platform
409    * @privilege %http://tizen.org/privilege/inputgenerator
410    * @param[in] inputgen_h The #efl_util_inputgen_h handle
411    * @param[in] idx The index of touched finger
412    * @param[in] touch_type The touch type (ex> #EFL_UTIL_INPUT_TOUCH_BEGIN, #EFL_UTIL_INPUT_TOUCH_UPDATE, #EFL_UTIL_INPUT_TOUCH_END)
413    * @param[in] x The x axis of touch point
414    * @param[in] y The y axis of touch point
415    * @return @c 0 on success, otherwise a negative error value
416    * @retval #EFL_UTIL_ERROR_NONE Successful
417    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
418    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate touch
419    */
420 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);
421
422 /**
423    * @platform
424    * @brief Generate a pointer event using a opened device.
425    * @since_tizen 3.0
426    * @privlevel platform
427    * @privilege %http://tizen.org/privilege/inputgenerator
428    * @param[in] inputgen_h The #efl_util_inputgen_h handle
429    * @param[in] buttons The number of button
430    * @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)
431    * @param[in] x x coordination to move
432    * @param[in] y y coordination to move
433    * @return @c 0 on success, otherwise a negative error value
434    * @retval #EFL_UTIL_ERROR_NONE Successful
435    * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
436    * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate pointer
437    * @retval #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address
438    * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
439    */
440 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);
441
442 /**
443  * @}
444  */
445
446 /**
447  * @addtogroup CAPI_EFL_UTIL_SCREENSHOT_MODULE
448  * @{
449  */
450
451 /**
452  * @platform
453  * @brief Definition for the screenshot handle.
454  * @since_tizen $TZ_CFG_VER_24_OR_30$
455  */
456 typedef struct _efl_util_screenshot_h * efl_util_screenshot_h;
457
458 /**
459  * @platform
460  * @brief Initializes the screenshot.
461  * @since_tizen $TZ_CFG_VER_24_OR_30$
462  * @privlevel platform
463  * @privilege %http://tizen.org/privilege/screenshot
464  * @remarks The specific error code can be obtained using the get_last_result()
465  * method. Error codes are described in Exception section.
466  * @param[in] width width of the screenshot surface
467  * @param[in] height height of the screenshot surface
468  * @return #efl_util_screenshot_h on success, otherwise @c NULL
469  * @retval #efl_util_screenshot_h  The screenshot handle
470  * @exception #EFL_UTIL_ERROR_NONE Successful
471  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
472  * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure
473  * @exception #EFL_UTIL_ERROR_SCREENSHOT_INIT_FAIL Initialization failure
474  * @see efl_util_screenshot_deinitialize()
475  */
476 API efl_util_screenshot_h efl_util_screenshot_initialize(int width, int height);
477
478 /**
479  * @platform
480  * @brief Takes a screenshot and get a tbm_surface handle.
481  * @since_tizen $TZ_CFG_VER_24_OR_30$
482  * @privlevel platform
483  * @privilege %http://tizen.org/privilege/screenshot
484  * @remarks The specific error code can be obtained using the get_last_result()
485  *          The #tbm_surface_h must be free by caller
486  * @param[in] screenshot efl_util_screenshot_h handle
487  * @return #tbm_surface_h on success, otherwise @c NULL
488  * @retval #tbm_surface_h The TBM surface handle
489  * @exception #EFL_UTIL_ERROR_NONE Successful
490  * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
491  * @exception #EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL Execution failure
492  * @see efl_util_screenshot_initialize()
493  * @see efl_util_screenshot_deinitialize()
494  */
495 API tbm_surface_h efl_util_screenshot_take_tbm_surface(efl_util_screenshot_h screenshot);
496
497 /**
498  * @platform
499  * @brief Deinitializes the screenshot.
500  * @since_tizen $TZ_CFG_VER_24_OR_30$
501  * @privlevel platform
502  * @privilege %http://tizen.org/privilege/screenshot
503  * @param[in]  screenshot  efl_util_screenshot_h handle
504  * @return @c 0 on success, otherwise a negative error value
505  * @retval #EFL_UTIL_ERROR_NONE Successful
506  * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
507  * @see efl_util_screenshot_initialize()
508  */
509 API int efl_util_screenshot_deinitialize(efl_util_screenshot_h screenshot);
510
511 /**
512  * @}
513  */
514
515 #ifdef __cplusplus
516 }
517 #endif
518 #endif /* __TIZEN_UI_EFL_UTIL_H__ */