EINA_SAFETY_ON_NULL_RETURN_VAL(tc, EINA_FALSE);
- tw = e_tc_win_info_add(_WIN_ID, EINA_FALSE, "tc", 0, 0, 1, 1, 0);
+ tw = e_tc_win_info_add(_WIN_ID, EINA_FALSE, EINA_FALSE, "tc", 0, 0, 1, 1, 0);
EINA_SAFETY_ON_NULL_GOTO(tw, finish);
/* check RegisterWindow method */
struct tizen_policy *tizen_policy = NULL;
struct tizen_surface *tizen_surface = NULL;
+typedef struct {
+ Eina_List *list;
+ Eina_Bool retry;
+} Window_Info_List;
+
static void
_e_test_runner_cb_resource_id(void *data,
struct tizen_resource *tizen_resource EINA_UNUSED,
const char *name = NULL, *text = NULL;
Eldbus_Message_Iter *array, *ec;
Ecore_Window target_win = 0;
- Eina_List *list = data;
- Eina_Bool res;
+ Window_Info_List *info_list = data;
+ Eina_Bool res, animating = EINA_FALSE;
+
+ if (!!!info_list)
+ goto finish;
res = eldbus_message_error_get(msg, &name, &text);
EINA_SAFETY_ON_TRUE_GOTO(res, finish);
- res = eldbus_message_arguments_get(msg, "ua(usiiiiibb)", &target_win, &array);
+ res = eldbus_message_arguments_get(msg, "ua(usiiiiibbb)", &target_win, &array);
EINA_SAFETY_ON_FALSE_GOTO(res, finish);
while (eldbus_message_iter_get_and_next(array, 'r', &ec))
{
const char *win_name;
int x, y, w, h, layer;
- Eina_Bool visible, alpha;
+ Eina_Bool visible, alpha, effect = EINA_FALSE;
Ecore_Window native_win;
E_TC_Win *tw = NULL;
res = eldbus_message_iter_arguments_get(ec,
- "usiiiiibb",
- &native_win,
+ "usiiiiibbb",
+ &native_win,
&win_name,
&x,
&y,
&w,
&h,
&layer,
+ &effect,
&visible,
&alpha);
+
+ if (effect)
+ animating = EINA_TRUE;
+
if (!res)
{
WRN("Failed to get win info\n");
continue;
}
- tw = e_tc_win_info_add(native_win, alpha, win_name, x, y, w, h, layer);
- list = eina_list_append(list, tw);
+ tw = e_tc_win_info_add(native_win, alpha, effect, win_name, x, y, w, h, layer);
+ info_list->list = eina_list_append(info_list->list, tw);
}
+ if (animating)
+ info_list->retry = EINA_TRUE;
+
+
finish:
if ((name) || (text))
{
e_test_runner_req_win_info_list_get(E_Test_Runner *runner)
{
Eldbus_Pending *p;
- Eina_List *list = NULL;
- list = eina_list_append(list, NULL);
+ Window_Info_List *info_list = NULL;
- p = eldbus_proxy_call(runner->dbus.proxy,
- "GetWindowInfo",
- _cb_method_win_info_list_get,
- list,
- -1,
- "");
- EINA_SAFETY_ON_NULL_RETURN_VAL(p, NULL);
+ info_list = E_NEW(Window_Info_List, 1);
- elm_run();
- list = eina_list_remove(list, NULL);
+ while (info_list)
+ {
+ p = eldbus_proxy_call(runner->dbus.proxy,
+ "GetWindowInfo",
+ _cb_method_win_info_list_get,
+ info_list,
+ -1,
+ "");
+ EINA_SAFETY_ON_NULL_RETURN_VAL(p, NULL);
+
+ elm_run();
+
+ if (info_list->retry)
+ {
+ E_TC_Win *tw;
+ info_list->retry = EINA_FALSE;
+ EINA_LIST_FREE(info_list->list, tw)
+ {
+ if (tw)
+ e_tc_win_del(tw);
+ }
+
+ continue;
+ }
+
+ break;
+ }
- return list;
+ return info_list->list;
}
Eina_Bool
E_TC_Win *
e_tc_win_info_add(Ecore_Window native_win,
Eina_Bool alpha,
+ Eina_Bool animating,
const char *name,
int x, int y,
int w, int h,
tw->h = h;
tw->layer = layer;
tw->alpha = alpha;
+ tw->animating = animating;
return tw;
}
int layer; // value of E_Layer
int vis; // visibility
int alpha; // alpha window
+ Eina_Bool animating;
};
struct _E_TC
Eina_Bool e_test_runner_ev_wait(E_Test_Runner *runner, E_TC_Event_Type ev);
E_TC_Win *e_tc_win_add(E_TC_Win *parent, Elm_Win_Type type, Eina_Bool alpha, const char *name, int x, int y, int w, int h, Eina_Bool usr_geom, int layer, E_TC_Win_Color color);
-E_TC_Win *e_tc_win_info_add(Ecore_Window native_win, Eina_Bool alpha, const char *name, int x, int y, int w, int h, int layer);
+E_TC_Win *e_tc_win_info_add(Ecore_Window native_win, Eina_Bool alpha, Eina_Bool animating, const char *name, int x, int y, int w, int h, int layer);
void e_tc_win_del(E_TC_Win *tw);
void e_tc_win_geom_update(E_TC_Win *tw);
void e_tc_win_show(E_TC_Win *tw);