e_test_event: add method for transient_for_below 14/232114/2
authorJunseok, Kim <juns.kim@samsung.com>
Tue, 28 Apr 2020 09:13:09 +0000 (18:13 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Wed, 29 Apr 2020 00:32:57 +0000 (00:32 +0000)
Change-Id: Ie7cc00546b3d2188f4afcbeeeda8d738b46826d3

src/e_test_event.cpp
src/e_test_event.h

index c738dcc..fefe171 100644 (file)
@@ -73,6 +73,7 @@ static void _cb_method_window_register(void *data, const Eldbus_Message *msg, El
 static void _cb_method_zone_rotation_change(void *data, const Eldbus_Message *msg, Eldbus_Pending *p);
 static void _cb_method_window_effect(void *data, const Eldbus_Message *msg, Eldbus_Pending *p);
 static void _cb_method_set_tc_start_end(void *data, const Eldbus_Message *msg, Eldbus_Pending *p);
 static void _cb_method_zone_rotation_change(void *data, const Eldbus_Message *msg, Eldbus_Pending *p);
 static void _cb_method_window_effect(void *data, const Eldbus_Message *msg, Eldbus_Pending *p);
 static void _cb_method_set_tc_start_end(void *data, const Eldbus_Message *msg, Eldbus_Pending *p);
+static void _cb_method_transient_for_below(void *data, const Eldbus_Message *msg, Eldbus_Pending *p);
 
 /* callbacks - signal */
 static void _cb_signal_vis_changed(void *data, const Eldbus_Message *msg);
 
 /* callbacks - signal */
 static void _cb_signal_vis_changed(void *data, const Eldbus_Message *msg);
@@ -397,6 +398,30 @@ etRunner::setWinTransientFor(etWin *tw_child,
 }
 
 Eina_Bool
 }
 
 Eina_Bool
+etRunner::setWinTransientForBelow(etWin *tw_child,
+                                  etWin *tw_parent,
+                                  Eina_Bool set)
+{
+   Eina_Bool accepted = EINA_FALSE;
+   Eldbus_Pending *p = NULL;
+
+   p = eldbus_proxy_call(dbus.ds_proxy,
+                         "SetWindowTransientForBelow",
+                         _cb_method_transient_for_below,
+                         &accepted,
+                         -1,
+                         "uub",
+                         tw_child->native_win,
+                         tw_parent->native_win,
+                         set);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(p, EINA_FALSE);
+
+   work();
+
+   return accepted;
+}
+
+Eina_Bool
 etRunner::setWinNotiLevel(etWin *tw,
                           efl_util_notification_level_e lv)
 {
 etRunner::setWinNotiLevel(etWin *tw,
                           efl_util_notification_level_e lv)
 {
@@ -1751,6 +1776,33 @@ finish:
    etRunner::get().finishWork();
 }
 
    etRunner::get().finishWork();
 }
 
+static void
+_cb_method_transient_for_below(void *data,
+                               const Eldbus_Message *msg,
+                               Eldbus_Pending *p)
+{
+   const char *name = NULL, *text = NULL;
+   Eina_Bool res = EINA_FALSE;
+   Eina_Bool *accept = (Eina_Bool *)data;
+
+   *accept = EINA_FALSE;
+
+   res = eldbus_message_error_get(msg, &name, &text);
+   EINA_SAFETY_ON_TRUE_GOTO(res, finish);
+
+   res = eldbus_message_arguments_get(msg, "b", accept);
+   EINA_SAFETY_ON_FALSE_GOTO(res, finish);
+   EINA_SAFETY_ON_FALSE_GOTO(*accept, finish);
+
+finish:
+   if ((name) || (text))
+     {
+        ERR("errname: %s errmsg: %s\n", name, text);
+     }
+
+   etRunner::get().finishWork();
+}
+
 /* callbacks - signal */
 static void
 _cb_signal_vis_changed(void *data,
 /* callbacks - signal */
 static void
 _cb_signal_vis_changed(void *data,
index 198ee36..a237982 100644 (file)
@@ -134,6 +134,7 @@ public:
    Eina_Bool     setWinRaise(etWin *tw);
    Eina_Bool     setWinLower(etWin *tw);
    Eina_Bool     setWinTransientFor(etWin *tw_child, etWin *tw_parent, Eina_Bool set);
    Eina_Bool     setWinRaise(etWin *tw);
    Eina_Bool     setWinLower(etWin *tw);
    Eina_Bool     setWinTransientFor(etWin *tw_child, etWin *tw_parent, Eina_Bool set);
+   Eina_Bool     setWinTransientForBelow(etWin *tw_child, etWin *tw_parent, Eina_Bool set);
    Eina_Bool     setWinNotiLevel(etWin *tw, efl_util_notification_level_e lv);
    efl_util_notification_level_e getWinNotiLevel(etWin *tw);
    Eina_Bool     setFocusSkip(etWin *tw, Eina_Bool set);
    Eina_Bool     setWinNotiLevel(etWin *tw, efl_util_notification_level_e lv);
    efl_util_notification_level_e getWinNotiLevel(etWin *tw);
    Eina_Bool     setFocusSkip(etWin *tw, Eina_Bool set);