return tw;
}
+E_TC_Win_Color
+etTCBase::generateColor()
+{
+ return (E_TC_Win_Color)((numTw % E_TC_WIN_COLOR_CYAN) + 2);
+}
+
etWin *
-etTCBase::createWindow(Elm_Win_Type type, const char *name, Eina_Bool usr_geom, int x, int y, int w, int h)
+etTCBase::createWindow(Elm_Win_Type type, const char *name, Eina_Bool usr_geom, int x, int y, int w, int h, E_TC_Win_Color color)
{
Eina_Bool res = EINA_FALSE;
etWin *tw = new etWin();
numGeomTw++;
}
+ if (color == E_TC_WIN_COLOR_AUTO)
+ color = generateColor();
+
res = tw->init(NULL,
type,
EINA_FALSE,
name? name : "TCWin",
x, y, w, h, usr_geom,
- (E_TC_Win_Color) ((numTw % E_TC_WIN_COLOR_CYAN) + 2));
+ color);
EINA_SAFETY_ON_FALSE_GOTO(res, err);
tw->native_win = etRunner::get().getWinId(tw->elm_win);
}
etWin *
-etTCBase::initNormalWin(const char *name, Eina_Bool usr_geom)
+etTCBase::initNormalWin(const char *name, Eina_Bool usr_geom, E_TC_Win_Color color)
{
- etWin *tw = createWindow(ELM_WIN_BASIC, name, usr_geom, 0, 0, 0, 0);
+ etWin *tw = createWindow(ELM_WIN_BASIC, name, usr_geom, 0, 0, 0, 0, color);
return tw;
}
etWin *
-etTCBase::initNormalWin(const char *name, int x, int y, int w, int h)
+etTCBase::initNormalWin(const char *name, int x, int y, int w, int h, E_TC_Win_Color color)
{
- etWin *tw = createWindow(ELM_WIN_BASIC, name, EINA_TRUE, x, y, w, h);
+ etWin *tw = createWindow(ELM_WIN_BASIC, name, EINA_TRUE, x, y, w, h, color);
return tw;
}
etWin *
-etTCBase::initNotiWin(const char *name, Eina_Bool usr_geom, Eina_Bool set_noti_level_normal)
+etTCBase::initNotiWin(const char *name, Eina_Bool usr_geom, Eina_Bool set_noti_level_normal, E_TC_Win_Color color)
{
- etWin *tw = createWindow(ELM_WIN_NOTIFICATION, name, usr_geom, 0, 0, 0, 0);
+ etWin *tw = createWindow(ELM_WIN_NOTIFICATION, name, usr_geom, 0, 0, 0, 0, color);
if (set_noti_level_normal)
etRunner::get().setWinNotiLevel(tw, EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM);
}
etWin *
-etTCBase::initNotiWin(const char *name, Eina_Bool set_noti_level_normal, int x, int y, int w, int h)
+etTCBase::initNotiWin(const char *name, Eina_Bool set_noti_level_normal, int x, int y, int w, int h, E_TC_Win_Color color)
{
- etWin *tw = createWindow(ELM_WIN_NOTIFICATION, name, EINA_TRUE, x, y, w, h);
+ etWin *tw = createWindow(ELM_WIN_NOTIFICATION, name, EINA_TRUE, x, y, w, h, color);
if (set_noti_level_normal)
etRunner::get().setWinNotiLevel(tw, EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM);
public:
etWin *initFakeWin();
- etWin *initNormalWin(const char *name, Eina_Bool usr_geom);
- etWin *initNormalWin(const char *name, int x, int y, int w, int h);
- etWin *initNotiWin(const char *name, Eina_Bool usr_geom, Eina_Bool set_noti_level_normal);
- etWin *initNotiWin(const char *name, Eina_Bool set_noti_level_normal, int x, int y, int w, int h);
+ etWin *initNormalWin(const char *name, Eina_Bool usr_geom, E_TC_Win_Color color = E_TC_WIN_COLOR_AUTO);
+ etWin *initNormalWin(const char *name, int x, int y, int w, int h, E_TC_Win_Color color = E_TC_WIN_COLOR_AUTO);
+ etWin *initNotiWin(const char *name, Eina_Bool usr_geom, Eina_Bool set_noti_level_normal, E_TC_Win_Color color = E_TC_WIN_COLOR_AUTO);
+ etWin *initNotiWin(const char *name, Eina_Bool set_noti_level_normal, int x, int y, int w, int h, E_TC_Win_Color color = E_TC_WIN_COLOR_AUTO);
Eina_Bool registerTCWin(etWin *tw);
Eina_Bool deregisterTCWin(etWin *tw);
int numTw = 0; // number of wins
int numGeomTw = 0; // number of wins using usr_geom
- etWin *createWindow(Elm_Win_Type type, const char *name, Eina_Bool usr_geom, int x, int y, int w, int h);
+ etWin *createWindow(Elm_Win_Type type, const char *name, Eina_Bool usr_geom, int x, int y, int w, int h, E_TC_Win_Color color);
+ E_TC_Win_Color generateColor();
};
#endif // end of __ET_TESTCASE_BASE__