void EtEventLoop::WaitForDestroy()
{
- printf("###########################\n");
- printf("Destroy Wait Timer Start!!!\n");
- printf("###########################\n");
this->SetWaitWorkTime(E_TEST_WORK_TIME);
this->RunTimer();
elm_run();
~EtEventLoop();
/* requests */
- Eina_Bool Init();
- void Shutdown();
Eina_Bool RegisterWin(EtWin *tw);
Eina_Bool DeregisterWin(EtWin *tw);
Eina_Bool SetWinStack(EtWin *tw,
Eina_Bool WaitEvent(E_TC_Event_Type ev);
/* methods */
+ Eina_Bool Init();
+ void Shutdown();
void Work();
void PrintWinInfoList();
void SetWaitWorkTime(double time) { this->time_for_wait_work_ = time; };
chk_ev_state_not_idle_ = EINA_FALSE;
chk_cb_called_ = 0;
};
- ~EtTestTzsh()
+ ~EtTestTzsh()
{
gLoop->WaitForDestroy();
if (tz_scrsaver_mng)
- tzsh_screensaver_manager_service_destroy(tz_scrsaver_mng);
+ tzsh_screensaver_manager_service_destroy(tz_scrsaver_mng);
if (tz_scrsaver)
- tzsh_screensaver_service_destroy(tz_scrsaver);
+ tzsh_screensaver_service_destroy(tz_scrsaver);
if (tzsh)
- tzsh_destroy(tzsh);
+ tzsh_destroy(tzsh);
- if (tw)
+ if (tw_base)
{
- gLoop->DeregisterWin(tw);
- delete tw;
+ gLoop->DeregisterWin(tw_base);
+ delete tw_base;
}
if (gLoop->HasLastWinInfoList())
gLoop->FreeLastWinInfoList();
};
protected:
- EtWin *tw = NULL;
+ EtWin *tw_base = NULL;
Eina_Bool InitTC()
{
Eina_Bool result = EINA_FALSE;
- this->tw = new EtWin();
- result = this->tw->Init(NULL,
- ELM_WIN_BASIC,
- EINA_FALSE,
- "EtWin Tzsh",
- 0, 0, 0, 0, EINA_FALSE,
- (E_Layer) 0,
- E_TC_WIN_COLOR_RED);
+ this->tw_base = new EtWin();
+ result = this->tw_base->Init(NULL,
+ ELM_WIN_BASIC,
+ EINA_FALSE,
+ "EtWin Tzsh",
+ 0, 0, 0, 0, EINA_FALSE,
+ (E_Layer) 0,
+ E_TC_WIN_COLOR_RED);
EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
- this->tw->native_win = gLoop->GetWinId(this->tw->elm_win);
+ this->tw_base->native_win = gLoop->GetWinId(this->tw_base->elm_win);
- result = gLoop->RegisterWin(this->tw);
+ result = gLoop->RegisterWin(this->tw_base);
EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
return EINA_TRUE;
};
/******************
- callbacks
-*******************/
+ callbacks
+ *******************/
static void
_cb_state_change(void *data,
tzsh_screensaver_manager_service_h service,
this->tzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
ASSERT_TRUE(this->tzsh != NULL);
- this->tz_win = elm_win_window_id_get(this->tw->elm_win);
+ this->tz_win = elm_win_window_id_get(this->tw_base->elm_win);
ASSERT_NE(0, this->tz_win);
this->tz_scrsaver = tzsh_screensaver_service_create(this->tzsh, this->tz_win);
ASSERT_TRUE(tz_scrsaver != NULL);
- this->tw->UpdateGeometry();
- this->tw->Show();
+ this->tw_base->UpdateGeometry();
+ this->tw_base->Show();
gLoop->WaitEvent(E_TC_EVENT_TYPE_VIS_ON);
list = gLoop->GetWinInfoList();
EINA_LIST_CAST_FOREACH(list, l, tw, EtWin*)
{
- if (tw->native_win != this->tw->native_win)
+ if (tw->native_win != this->tw_base->native_win)
continue;
// check layer
this->tzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
ASSERT_TRUE(this->tzsh != NULL);
- this->tz_win = elm_win_window_id_get(this->tw->elm_win);
+ this->tz_win = elm_win_window_id_get(this->tw_base->elm_win);
ASSERT_NE(0, this->tz_win);
this->tz_scrsaver_mng = tzsh_screensaver_manager_service_create(this->tzsh, this->tz_win);
gLoop->WaitForDestroy();
if (tw_register)
- gLoop->DeregisterWin(tw_register);
+ gLoop->DeregisterWin(tw_register);
- if (tw)
+ if (tw_base)
{
- delete tw;
+ delete tw_base;
}
if (gLoop->HasLastWinInfoList())
protected:
const int rots[4] = {0, 90, 180, 270};
- EtWin *tw = NULL;
+ EtWin *tw_base = NULL;
EtWin *tw_register = NULL;
int saved_rot_ = 0;
Eina_Bool InitTC()
- {
- Eina_Bool result = EINA_FALSE;
+ {
+ Eina_Bool result = EINA_FALSE;
- this->tw = new EtWin();
- result = this->tw->Init(NULL,
- ELM_WIN_BASIC,
- EINA_FALSE,
- "EtWin Rotation",
- 0, 0, 400, 400, EINA_FALSE,
- E_LAYER_CLIENT_NORMAL,
- E_TC_WIN_COLOR_BLUE);
- EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
- this->tw->native_win = gLoop->GetWinId(this->tw->elm_win);
+ this->tw_base = new EtWin();
+ result = this->tw_base->Init(NULL,
+ ELM_WIN_BASIC,
+ EINA_FALSE,
+ "EtWin Rotation",
+ 0, 0, 400, 400, EINA_FALSE,
+ E_LAYER_CLIENT_NORMAL,
+ E_TC_WIN_COLOR_BLUE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
+ this->tw_base->native_win = gLoop->GetWinId(this->tw_base->elm_win);
- // available rotations
- elm_win_wm_rotation_available_rotations_set(this->tw->elm_win,
- this->rots, 4);
+ // available rotations
+ elm_win_wm_rotation_available_rotations_set(this->tw_base->elm_win,
+ this->rots, 4);
- result = gLoop->RegisterWin(this->tw);
- EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
+ result = gLoop->RegisterWin(this->tw_base);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
- this->tw_register = this->tw;
+ this->tw_register = this->tw_base;
- this->tw->UpdateGeometry();
- this->tw->Show();
- gLoop->WaitEvent(E_TC_EVENT_TYPE_VIS_ON);
+ this->tw_base->UpdateGeometry();
+ this->tw_base->Show();
+ gLoop->WaitEvent(E_TC_EVENT_TYPE_VIS_ON);
- return EINA_TRUE;
- };
+ return EINA_TRUE;
+ };
Eina_Bool TestWinRotation(EtWin *tw, int rot)
{
result = this->InitTC();
ASSERT_TRUE(result);
- result = gLoop->GetWinInfo(this->tw);
+ result = gLoop->GetWinInfo(this->tw_base);
ASSERT_TRUE(result);
- this->saved_rot_ = this->tw->rot;
+ this->saved_rot_ = this->tw_base->rot;
for (rot = ((this->saved_rot_ + 90) % 360);
rot == this->saved_rot_;
/* hard coded, reverse portrait(180) mode is disabled in mobile */
if (rot == 180) continue;
- result = this->TestWinRotation(this->tw, rot);
+ result = this->TestWinRotation(this->tw_base, rot);
ASSERT_TRUE(result);
}
}