Ejemplo n.º 1
0
EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *bt;
   Elm_Transit *trans;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("transit-basic", "Transit - Basic");
   elm_win_autodel_set(win, EINA_TRUE);

   bt = elm_button_add(win);
   elm_object_text_set(bt, "Resizing Effect");
   evas_object_show(bt);
   evas_object_move(bt, 50, 100);
   evas_object_resize(bt, 100, 50);

   trans = elm_transit_add();
   elm_transit_object_add(trans, bt);

   elm_transit_effect_resizing_add(trans, 100, 50, 300, 150);

   elm_transit_duration_set(trans, 5.0);
   elm_transit_go(trans);

   evas_object_resize(win, 400, 400);
   evas_object_show(win);

   elm_run();

   return 0;
}
/**
 * @brief Positive test case of elm_transit_add()
 */
static void utc_UIFW_elm_transit_add_func_01(void)
{
   	transit = elm_transit_add();

	if (!transit) {
		tet_infoline("elm_transit_add() failed in positive test case");
		tet_result(TET_FAIL);
		return;
	}
	tet_result(TET_PASS);
}
/**
 * @brief Negative test case of ug_init elm_transit_duration_set()
 */
static void utc_UIFW_elm_transit_duration_set_func_02(void)
{
	transit = elm_transit_add();
	elm_transit_duration_set(NULL, 3);

	if (elm_transit_duration_get(NULL) == 3) {
		tet_infoline("elm_transit_duration_set() failed in negative test case");
		tet_result(TET_FAIL);
		return;
	}
	tet_result(TET_PASS);
}
/**
 * @brief Negative test case of ug_init elm_transit_event_block_disabled_get()
 */
static void utc_UIFW_elm_transit_event_enabled_get_func_02(void)
{
	Eina_Bool r = EINA_FALSE;

	transit = elm_transit_add();
	elm_transit_event_enabled_set(transit, EINA_TRUE);
	r = elm_transit_event_enabled_get(NULL);

	if (r == EINA_TRUE) {
		tet_infoline("elm_transit_event_enabled_get() failed in negative test case");
		tet_result(TET_FAIL);
		return;
	}
	tet_result(TET_PASS);
}
static void
_transit_start(void *data, Evas_Object *o, void *event_info)
{
   Elm_Transit *trans = NULL;
   Eina_List *objs = data, *l;
   Evas_Object *obj;
   int i;

   trans = elm_transit_add();
   EINA_LIST_FOREACH(objs, l, obj)
      elm_transit_object_add(trans, obj);

   // FIXME: Should check if there's another transit going before starting a new
   // one

   for (i = 0; _transitions[i].label; i++)
     {
	if (_transitions[i].checked)
	  _transitions[i].transition_add_cb(trans);
     }

   elm_transit_duration_set(trans, 2.0);
   elm_transit_go(trans);
}
Ejemplo n.º 6
0
{
   Evas_Object *win, *bt;
   Elm_Transit *trans;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("transit-basic", "Transit - Basic");
   elm_win_autodel_set(win, EINA_TRUE);

   bt = elm_button_add(win);
   elm_object_text_set(bt, "Resizing Effect");
   evas_object_show(bt);
   evas_object_move(bt, 50, 100);
   evas_object_resize(bt, 100, 50);

   trans = elm_transit_add();
   elm_transit_object_add(trans, bt);

   elm_transit_effect_resizing_add(trans, 100, 50, 300, 150);

   elm_transit_duration_set(trans, 5.0);
   elm_transit_go(trans);

   evas_object_resize(win, 400, 400);
   evas_object_show(win);

   elm_run();

   return 0;
}
ELM_MAIN()