e_test_helper: Added aux hint methods 17/258217/2
authorJunseok, Kim <juns.kim@samsung.com>
Wed, 12 May 2021 04:17:07 +0000 (13:17 +0900)
committerJunseok, Kim <juns.kim@samsung.com>
Wed, 12 May 2021 09:11:28 +0000 (18:11 +0900)
Added aux hint methods as below
- generateAuxHint : wrapper method of ecore_wl2_window_aux_hint_generate
- getAuxHintID : wrapper method of ecore_wl2_window_aux_hint_id_get
- getAuxHintValue : wrapper method of
ecore_wl2_window_aux_hint_value_get

Change-Id: I0d3c26130d7b1e68e53f1374a6f3b08aeb3e8ffc

src/e_test_event.cpp
src/e_test_event.h

index 4966a90c779efb0f9a7d8b7c43d81bb22e1bcf83..cd85f7ebb9f642616207f9b17e56dc7137fc9e19 100644 (file)
@@ -589,6 +589,45 @@ etRunner::delAuxHint(etWin *tw, int hint_id)
    return EINA_TRUE;
 }
 
+int
+etRunner::generateAuxHint(etWin *tw, const char *hint_key, const char *hint_val)
+{
+   Ecore_Wl2_Window *wlwin = NULL;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(tw, EINA_FALSE);
+
+   wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(tw->elm_win);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(wlwin, EINA_FALSE);
+
+   return ecore_wl2_window_aux_hint_generate(wlwin, hint_key, hint_val);
+}
+
+int
+etRunner::getAuxHintID(etWin *tw, const char *hint_key)
+{
+   Ecore_Wl2_Window *wlwin = NULL;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(tw, -1);
+
+   wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(tw->elm_win);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(wlwin, -1);
+
+   return ecore_wl2_window_aux_hint_id_get(wlwin, hint_key);
+}
+
+std::string
+etRunner::getAuxHintValue(etWin *tw, int hint_id)
+{
+   Ecore_Wl2_Window *wlwin = NULL;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(tw, std::string(""));
+
+   wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(tw->elm_win);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(wlwin, std::string(""));
+
+   return std::string(ecore_wl2_window_aux_hint_value_get(wlwin, hint_id));
+}
+
 Eina_Bool
 etRunner::setTCStart()
 {
index 0f611c31a4823311892ffe6e2e7c39098cf22742..624410275b9144360191ee41e0ef60c7ef4f2725 100644 (file)
@@ -255,6 +255,9 @@ public:
    Eina_Bool     addAuxHint(etWin *tw, int hint_id, const char *hint_key, const char *hint_val);
    Eina_Bool     changeAuxHint(etWin *tw, int hint_id, const char *hint_val);
    Eina_Bool     delAuxHint(etWin *tw, int hint_id);
+   int           generateAuxHint(etWin *tw, const char *hint_key, const char *hint_val);
+   int           getAuxHintID(etWin *tw, const char *hint_key);
+   std::string   getAuxHintValue(etWin *tw, int hint_id);
    Eina_Bool     setTCStart();
    Eina_Bool     setTCEnd();
    Eina_Bool     setTCTimeout(Eina_Bool set, int timeout);