2 * Copyright (c) 2011-2015 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #define LOG_TAG "TIZEN_N_EFL_UTIL"
23 #include <Elementary.h>
24 #include <Ecore_Evas.h>
29 #endif /* end of X11 */
32 #include <Ecore_Wayland.h>
33 #include <wayland-client.h>
34 #include "tizen_notification-client-protocol.h"
35 #endif /* end of WAYLAND */
37 /* callback handler index */
38 #define CBH_NOTI_LEV 0
39 #define CBH_SCR_MODE 1
42 typedef void (*Efl_Util_Cb)(Evas_Object *, int, void *);
44 typedef struct _Efl_Util_Callback_Info
49 } Efl_Util_Callback_Info;
51 typedef struct _Efl_Util_Wl_Surface_Lv_Info
53 void *surface; /* wl_surface */
55 Eina_Bool wait_for_done;
56 } Efl_Util_Wl_Surface_Lv_Info;
58 typedef struct _Efl_Util_Data
60 Ecore_Event_Handler *handler; /* x11 client message handler */
63 Eina_List *info_list; /* list of callback info */
64 unsigned int atom; /* x11 atom */
65 } cb_handler[CBH_MAX];
67 /* wayland related stuffs */
72 struct wl_display *dpy;
75 struct tizen_notification *proto;
78 #endif /* end of WAYLAND */
82 static Efl_Util_Data _eflutil =
86 { NULL, 0 }, /* handler for notification level */
87 { NULL, 0 } /* handler for screen mode */
93 { NULL, NULL } /* tizen_notification protocol */
94 #endif /* end of WAYLAND */
98 static Eina_Bool _cb_info_add(Evas_Object *win, Efl_Util_Cb cb, void *data, int idx);
99 static Eina_Bool _cb_info_del_by_win(Evas_Object *win, int idx);
100 static Eina_List *_cb_info_list_get(int idx);
101 static Efl_Util_Callback_Info *_cb_info_find_by_win(Evas_Object *win, int idx);
103 static Efl_Util_Callback_Info *_cb_info_find_by_xwin(unsigned int xwin);
104 static Eina_Bool _cb_x11_client_msg(void *data, int type, void *event);
105 #endif /* end of X11 */
107 static Eina_Bool _wl_init(void);
108 static void _cb_wl_reg_global(void *data, struct wl_registry *reg, unsigned int name, const char *interface, unsigned int version);
109 static void _cb_wl_reg_global_remove(void *data, struct wl_registry *reg, unsigned int name);
110 static Efl_Util_Callback_Info *_cb_info_find_by_wlsurf(void *wlsurf, int idx);
111 static void _cb_wl_tz_noti_lv_done(void *data, struct tizen_notification *proto, struct wl_surface *surface, int32_t level, uint32_t state);
113 static const struct wl_registry_listener _wl_reg_listener =
116 _cb_wl_reg_global_remove
119 struct tizen_notification_listener _wl_tz_noti_lv_listener =
121 _cb_wl_tz_noti_lv_done
123 #endif /* end of WAYLAND */
126 _cb_info_add(Evas_Object *win,
131 Efl_Util_Callback_Info *info;
133 info = _cb_info_find_by_win(win, idx);
136 _eflutil.cb_handler[idx].info_list
137 = eina_list_remove(_eflutil.cb_handler[idx].info_list,
142 info = (Efl_Util_Callback_Info *)calloc(1, sizeof(Efl_Util_Callback_Info));
143 if (!info) return EINA_FALSE;
149 _eflutil.cb_handler[idx].info_list
150 = eina_list_append(_eflutil.cb_handler[idx].info_list,
154 if (!_eflutil.handler)
155 _eflutil.handler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE,
158 #endif /* end of X11 */
164 _cb_info_del_by_win(Evas_Object *win,
167 Efl_Util_Callback_Info *info;
170 info = _cb_info_find_by_win(win, idx);
171 if (!info) return EINA_FALSE;
173 _eflutil.cb_handler[idx].info_list
174 = eina_list_remove(_eflutil.cb_handler[idx].info_list,
178 count = eina_list_count(_eflutil.cb_handler[idx].info_list);
179 if ((count == 0) && (_eflutil.handler))
181 ecore_event_handler_del(_eflutil.handler);
182 _eflutil.handler = NULL;
189 _cb_info_list_get(int idx)
191 return _eflutil.cb_handler[idx].info_list;
194 static Efl_Util_Callback_Info *
195 _cb_info_find_by_win(Evas_Object *win,
199 Efl_Util_Callback_Info *info;
201 l = _cb_info_list_get(idx);
202 EINA_LIST_FOREACH(l, ll, info)
204 if (info->win == win) return info;
211 static Efl_Util_Callback_Info *
212 _cb_info_find_by_xwin(unsigned int xwin,
216 Efl_Util_Callback_Info *info;
219 l = _cb_info_list_get(idx);
220 EINA_LIST_FOREACH(l, ll, info)
222 xwin2 = elm_win_xwindow_get(info->win);
223 if (xwin == xwin2) return info;
230 _cb_x11_client_msg(void *data,
234 Ecore_X_Event_Client_Message *ev;
236 Efl_Util_Callback_Info *info;
239 if (!ev) return ECORE_CALLBACK_PASS_ON;
242 if (xwin == 0) return ECORE_CALLBACK_PASS_ON;
244 if (ev->message_type == _eflutil.atom.noti_lv)
246 info = _cb_info_find_by_xwin(xwin, CBH_NOTI_LEV);
248 /* permission denied */
249 if ((ev->data.l[1] == 0) &&
254 EFL_UTIL_ERROR_PERMISSION_DENIED,
258 else if (ev->message_type == _eflutil.atom.scr_mode)
260 info = _cb_info_find_by_xwin(xwin, CBH_SCR_MODE);
262 /* permission denied */
263 if ((ev->data.l[1] == 0) &&
268 EFL_UTIL_ERROR_PERMISSION_DENIED,
272 return ECORE_CALLBACK_PASS_ON;
274 #endif /* end of X11 */
280 struct wl_registry *reg;
282 if (_eflutil.wl.init) return EINA_TRUE;
284 _eflutil.wl.dpy = ecore_wl_display_get();
285 EINA_SAFETY_ON_NULL_RETURN_VAL(_eflutil.wl.dpy, EINA_FALSE);
287 reg = wl_display_get_registry(_eflutil.wl.dpy);
288 EINA_SAFETY_ON_NULL_RETURN_VAL(reg, EINA_FALSE);
290 wl_registry_add_listener(reg, &_wl_reg_listener, NULL);
292 _eflutil.wl.init = EINA_TRUE;
298 _cb_wl_reg_global(void *data,
299 struct wl_registry *reg,
301 const char *interface,
302 unsigned int version)
304 if (!strcmp(interface, "tizen_notification"))
306 struct tizen_notification *proto;
307 proto = wl_registry_bind(reg,
309 &tizen_notification_interface,
313 tizen_notification_add_listener(proto,
314 &_wl_tz_noti_lv_listener,
317 _eflutil.wl.noti_lv.hash = eina_hash_pointer_new(free);
318 _eflutil.wl.noti_lv.proto = proto;
323 _cb_wl_reg_global_remove(void *data,
324 struct wl_registry *reg,
327 _eflutil.wl.noti_lv.proto = NULL;
328 eina_hash_free(_eflutil.wl.noti_lv.hash);
331 static Efl_Util_Callback_Info *
332 _cb_info_find_by_wlsurf(void *wlsurf,
336 Efl_Util_Callback_Info *info;
337 Ecore_Wl_Window *wlwin2 = NULL;
338 void *wlsurf2 = NULL;
340 l = _cb_info_list_get(idx);
341 EINA_LIST_FOREACH(l, ll, info)
343 wlwin2 = elm_win_wl_window_get(info->win);
344 wlsurf2 = ecore_wl_window_surface_get(wlwin2);
345 if (wlsurf== wlsurf2) return info;
352 _cb_wl_tz_noti_lv_done(void *data,
353 struct tizen_notification *proto,
354 struct wl_surface *surface,
358 Efl_Util_Wl_Surface_Lv_Info *lv_info;
359 Efl_Util_Callback_Info *cb_info;
361 lv_info = eina_hash_find(_eflutil.wl.noti_lv.hash, &surface);
364 lv_info->level = level;
365 lv_info->wait_for_done = EINA_FALSE;
368 if (state != TIZEN_NOTIFICATION_ERROR_STATE_PERMISSION_DENIED) return;
370 cb_info = _cb_info_find_by_wlsurf((void *)surface, CBH_NOTI_LEV);
371 if (!cb_info) return;
372 if (!cb_info->cb) return;
374 cb_info->cb(cb_info->win,
375 EFL_UTIL_ERROR_PERMISSION_DENIED,
378 #endif /* end of WAYLAND */
381 efl_util_set_notification_window_level(Evas_Object *window,
382 efl_util_notification_level_e level)
384 EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER);
385 EINA_SAFETY_ON_FALSE_RETURN_VAL((level >= EFL_UTIL_NOTIFICATION_LEVEL_1) &&
386 (level <= EFL_UTIL_NOTIFICATION_LEVEL_TOP),
387 EFL_UTIL_ERROR_INVALID_PARAMETER);
390 Ecore_X_Window xwin = elm_win_xwindow_get(window);
393 Ecore_X_Window_Type window_type;
394 if (ecore_x_netwm_window_type_get(xwin, &window_type) == EINA_TRUE)
396 // success to get window type
397 if (window_type != ECORE_X_WINDOW_TYPE_NOTIFICATION)
399 // given EFL window's type is not notification type.
400 return EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE;
404 return EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE;
406 utilx_set_system_notification_level(ecore_x_display_get(), xwin, level);
407 return EFL_UTIL_ERROR_NONE;
409 #endif /* end of X11 */
413 Ecore_Wl_Window *wlwin;
414 struct wl_surface *surface;
415 Efl_Util_Wl_Surface_Lv_Info *lv_info;
417 type = elm_win_type_get(window);
418 EINA_SAFETY_ON_FALSE_RETURN_VAL((type == ELM_WIN_NOTIFICATION),
419 EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE);
421 wlwin = elm_win_wl_window_get(window);
426 while (!_eflutil.wl.noti_lv.proto)
427 wl_display_dispatch(_eflutil.wl.dpy);
429 surface = ecore_wl_window_surface_get(wlwin);
430 EINA_SAFETY_ON_NULL_RETURN_VAL(surface,
431 EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE);
433 lv_info = eina_hash_find(_eflutil.wl.noti_lv.hash, &surface);
436 lv_info = calloc(1, sizeof(Efl_Util_Wl_Surface_Lv_Info));
437 EINA_SAFETY_ON_NULL_RETURN_VAL(lv_info, EFL_UTIL_ERROR_OUT_OF_MEMORY);
439 lv_info->surface = surface;
440 lv_info->level = (int)level;
441 lv_info->wait_for_done = EINA_TRUE;
443 eina_hash_add(_eflutil.wl.noti_lv.hash,
449 lv_info->level = (int)level;
450 lv_info->wait_for_done = EINA_TRUE;
453 tizen_notification_set_level(_eflutil.wl.noti_lv.proto,
457 return EFL_UTIL_ERROR_NONE;
459 #endif /* end of WAYLAND */
461 return EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE;
465 efl_util_get_notification_window_level(Evas_Object *window,
466 efl_util_notification_level_e *level)
468 EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER);
469 EINA_SAFETY_ON_NULL_RETURN_VAL(level, EFL_UTIL_ERROR_INVALID_PARAMETER);
472 Ecore_X_Window_Type window_type;
473 Utilx_Notification_Level utilx_level;
474 Ecore_X_Window xwin = elm_win_xwindow_get(window);
477 if (ecore_x_netwm_window_type_get(xwin, &window_type) == EINA_TRUE)
479 // success to get window type
480 if (window_type != ECORE_X_WINDOW_TYPE_NOTIFICATION)
482 // given EFL window's type is not notification type.
483 return EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE;
486 utilx_level = utilx_get_system_notification_level(ecore_x_display_get(), xwin);
487 if (utilx_level == UTILX_NOTIFICATION_LEVEL_LOW)
488 *level = EFL_UTIL_NOTIFICATION_LEVEL_1;
489 else if(utilx_level == UTILX_NOTIFICATION_LEVEL_NORMAL)
490 *level = EFL_UTIL_NOTIFICATION_LEVEL_2;
491 else if(utilx_level == UTILX_NOTIFICATION_LEVEL_HIGH)
492 *level = EFL_UTIL_NOTIFICATION_LEVEL_3;
494 return EFL_UTIL_ERROR_INVALID_PARAMETER;
497 return EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE;
499 return EFL_UTIL_ERROR_NONE;
501 #endif /* end of X11 */
505 Ecore_Wl_Window *wlwin;
506 struct wl_surface *surface;
507 Efl_Util_Wl_Surface_Lv_Info *lv_info;
509 type = elm_win_type_get(window);
510 EINA_SAFETY_ON_FALSE_RETURN_VAL((type == ELM_WIN_NOTIFICATION),
511 EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE);
513 wlwin = elm_win_wl_window_get(window);
518 while (!_eflutil.wl.noti_lv.proto)
519 wl_display_dispatch(_eflutil.wl.dpy);
521 surface = ecore_wl_window_surface_get(wlwin);
522 EINA_SAFETY_ON_NULL_RETURN_VAL(surface,
523 EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE);
525 lv_info = eina_hash_find(_eflutil.wl.noti_lv.hash, &surface);
528 if (lv_info->wait_for_done)
530 if (ecore_wl_window_shell_surface_get(wlwin) ||
531 ecore_wl_window_xdg_surface_get(wlwin))
533 while (lv_info->wait_for_done)
536 wl_display_dispatch(_eflutil.wl.dpy);
541 *level = EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT;
542 return EFL_UTIL_ERROR_INVALID_PARAMETER;
546 switch (lv_info->level)
548 case TIZEN_NOTIFICATION_LEVEL_1: *level = EFL_UTIL_NOTIFICATION_LEVEL_1; break;
549 case TIZEN_NOTIFICATION_LEVEL_2: *level = EFL_UTIL_NOTIFICATION_LEVEL_2; break;
550 case TIZEN_NOTIFICATION_LEVEL_3: *level = EFL_UTIL_NOTIFICATION_LEVEL_3; break;
551 case TIZEN_NOTIFICATION_LEVEL_NONE: *level = EFL_UTIL_NOTIFICATION_LEVEL_NONE; break;
552 case TIZEN_NOTIFICATION_LEVEL_DEFAULT: *level = EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT; break;
553 case TIZEN_NOTIFICATION_LEVEL_MEDIUM: *level = EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM; break;
554 case TIZEN_NOTIFICATION_LEVEL_HIGH: *level = EFL_UTIL_NOTIFICATION_LEVEL_HIGH; break;
555 case TIZEN_NOTIFICATION_LEVEL_TOP: *level = EFL_UTIL_NOTIFICATION_LEVEL_TOP; break;
556 default: *level = EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT;
557 return EFL_UTIL_ERROR_INVALID_PARAMETER;
559 return EFL_UTIL_ERROR_NONE;
562 *level = EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT;
564 return EFL_UTIL_ERROR_NONE;
566 #endif /* end of WAYLAND */
567 return EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE;
571 efl_util_set_notification_window_level_error_cb(Evas_Object *window,
572 efl_util_notification_window_level_error_cb callback,
575 Eina_Bool ret = EINA_FALSE;
577 EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER);
578 EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EFL_UTIL_ERROR_INVALID_PARAMETER);
580 ret = _cb_info_add(window,
581 (Efl_Util_Cb)callback,
584 if (!ret) return EFL_UTIL_ERROR_OUT_OF_MEMORY;
587 if (!_eflutil.atom.noti_lv)
588 _eflutil.atom.noti_lv = ecore_x_atom_get("_E_NOTIFICATION_LEVEL_ACCESS_RESULT");
589 #endif /* end of X11 */
591 return EFL_UTIL_ERROR_NONE;
595 efl_util_unset_notification_window_level_error_cb(Evas_Object *window)
597 Eina_Bool ret = EINA_FALSE;
599 EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER);
601 ret = _cb_info_del_by_win(window, CBH_NOTI_LEV);
602 if (!ret) return EFL_UTIL_ERROR_OUT_OF_MEMORY;
604 return EFL_UTIL_ERROR_NONE;
608 efl_util_set_window_opaque_state(Evas_Object *window,
611 EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER);
612 EINA_SAFETY_ON_FALSE_RETURN_VAL(((opaque >= 0) && (opaque <= 1)),
613 EFL_UTIL_ERROR_INVALID_PARAMETER);
616 Ecore_X_Window xwin = elm_win_xwindow_get(window);
617 Ecore_X_Display *xdpy = ecore_x_display_get();
618 Utilx_Opaque_State state;
621 EINA_SAFETY_ON_NULL_RETURN_VAL(xwin, EFL_UTIL_ERROR_INVALID_PARAMETER);
622 EINA_SAFETY_ON_NULL_RETURN_VAL(xdpy, EFL_UTIL_ERROR_INVALID_PARAMETER);
625 state = UTILX_OPAQUE_STATE_ON;
627 state = UTILX_OPAQUE_STATE_OFF;
629 ret = utilx_set_window_opaque_state(xdpy, xwin, state);
632 return EFL_UTIL_ERROR_INVALID_PARAMETER;
634 return EFL_UTIL_ERROR_NONE;
635 #endif /* end of X11 */
638 Ecore_Wl_Window *wlwin;
641 wlwin = elm_win_wl_window_get(window);
646 evas_object_geometry_get(window, &x, &y, &w, &h);
649 ecore_wl_window_opaque_region_set(wlwin, x, y, w, h);
651 ecore_wl_window_opaque_region_set(wlwin, 0, 0, 0, 0);
653 return EFL_UTIL_ERROR_NONE;
656 return EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE;
657 #endif /* end of WAYLAND */
661 efl_util_set_window_screen_mode(Evas_Object *window,
662 efl_util_screen_mode_e mode)
668 EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER);
669 EINA_SAFETY_ON_FALSE_RETURN_VAL(((mode >= EFL_UTIL_SCREEN_MODE_DEFAULT) &&
670 (mode <= EFL_UTIL_SCREEN_MODE_ALWAYS_ON)),
671 EFL_UTIL_ERROR_INVALID_PARAMETER);
673 e = evas_object_evas_get(window);
674 EINA_SAFETY_ON_NULL_RETURN_VAL(e, EFL_UTIL_ERROR_INVALID_PARAMETER);
676 ee = ecore_evas_ecore_evas_get(e);
677 EINA_SAFETY_ON_NULL_RETURN_VAL(ee, EFL_UTIL_ERROR_INVALID_PARAMETER);
679 id = ecore_evas_aux_hint_id_get(ee, "wm.policy.win.lcd.lock");
680 if (mode == EFL_UTIL_SCREEN_MODE_ALWAYS_ON)
683 ecore_evas_aux_hint_add(ee, "wm.policy.win.lcd.lock", "1");
685 ecore_evas_aux_hint_val_set(ee, id, "1");
687 else if (mode == EFL_UTIL_SCREEN_MODE_DEFAULT)
690 ecore_evas_aux_hint_add(ee, "wm.policy.win.lcd.lock", "0");
692 ecore_evas_aux_hint_val_set(ee, id, "0");
695 return EFL_UTIL_ERROR_INVALID_PARAMETER;
697 return EFL_UTIL_ERROR_NONE;
701 efl_util_get_window_screen_mode(Evas_Object *window,
702 efl_util_screen_mode_e *mode)
709 EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER);
710 EINA_SAFETY_ON_NULL_RETURN_VAL(mode, EFL_UTIL_ERROR_INVALID_PARAMETER);
712 e = evas_object_evas_get(window);
713 EINA_SAFETY_ON_NULL_RETURN_VAL(e, EFL_UTIL_ERROR_INVALID_PARAMETER);
715 ee = ecore_evas_ecore_evas_get(e);
716 EINA_SAFETY_ON_NULL_RETURN_VAL(ee, EFL_UTIL_ERROR_INVALID_PARAMETER);
718 id = ecore_evas_aux_hint_id_get(ee, "wm.policy.win.lcd.lock");
719 EINA_SAFETY_ON_TRUE_RETURN_VAL((id == -1), EFL_UTIL_ERROR_INVALID_PARAMETER);
721 str = ecore_evas_aux_hint_val_get(ee, id);
722 EINA_SAFETY_ON_NULL_RETURN_VAL(str, EFL_UTIL_ERROR_INVALID_PARAMETER);
724 if (strncmp(str, "1", strlen("1")) == 0)
725 *mode = EFL_UTIL_SCREEN_MODE_ALWAYS_ON;
727 *mode = EFL_UTIL_SCREEN_MODE_DEFAULT;
729 return EFL_UTIL_ERROR_NONE;
733 efl_util_set_window_screen_mode_error_cb(Evas_Object *window,
734 efl_util_window_screen_mode_error_cb callback,
737 Eina_Bool ret = EINA_FALSE;
739 EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER);
740 EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EFL_UTIL_ERROR_INVALID_PARAMETER);
742 ret = _cb_info_add(window,
743 (Efl_Util_Cb)callback,
746 if (!ret) return EFL_UTIL_ERROR_OUT_OF_MEMORY;
749 if (!_eflutil.atom.scr_mode)
750 _eflutil.atom.scr_mode = ecore_x_atom_get("_E_SCREEN_MODE_ACCESS_RESULT");
751 #endif /* end of X11 */
753 return EFL_UTIL_ERROR_NONE;
757 efl_util_unset_window_screen_mode_error_cb(Evas_Object *window)
759 Eina_Bool ret = EINA_FALSE;
761 EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER);
763 ret = _cb_info_del_by_win(window, CBH_SCR_MODE);
764 if (!ret) return EFL_UTIL_ERROR_OUT_OF_MEMORY;
766 return EFL_UTIL_ERROR_NONE;
770 efl_util_input_initialize_generator(efl_util_input_device_type_e dev_type)
772 return EFL_UTIL_ERROR_NONE;
776 efl_util_input_deinitialize_generator(void)
782 efl_util_input_generate_key(const char *key_name,
785 return EFL_UTIL_ERROR_NONE;
789 efl_util_input_generate_touch(int idx,
790 efl_util_input_touch_type_e touch_type,
794 return EFL_UTIL_ERROR_NONE;
797 API efl_util_screenshot_h
798 efl_util_screenshot_initialize(int width,
805 efl_util_screenshot_take_tbm_surface(efl_util_screenshot_h screenshot)
811 efl_util_screenshot_deinitialize(efl_util_screenshot_h screenshot)
813 return EFL_UTIL_ERROR_NONE;