e_test_util: Added some macro functions for test event.
[platform/core/uifw/e-tizen-testcase.git] / src / e_test_base.h
1 #ifndef __ET_TESTCASE_BASE__
2 #define __ET_TESTCASE_BASE__
3
4 #include "e_test_event.h"
5
6 using ::testing::Test;
7
8 class etTCBase : public ::testing::Test
9 {
10  public:
11    etTCBase();
12    ~etTCBase();
13
14  public:
15    etWin     *initFakeWin();
16    etWin     *initNormalWin(const char *name, Eina_Bool usr_geom);
17    etWin     *initNormalWin(const char *name, int x, int y, int w, int h);
18    etWin     *initNotiWin(const char *name, Eina_Bool usr_geom, Eina_Bool set_noti_level_normal);
19    etWin     *initNotiWin(const char *name, Eina_Bool set_noti_level_normal, int x, int y, int w, int h);
20
21    Eina_Bool  registerTCWin(etWin *tw);
22    Eina_Bool  deregisterTCWin(etWin *tw);
23    Eina_Bool  showTCWin(etWin *tw);
24    Eina_Bool  showActivateTCWin(etWin *tw);
25    Eina_Bool  removeTCWin(etWin *tw);
26
27  protected:
28    std::shared_ptr<eventItem> ev_result;
29    std::shared_ptr<visibleEventItem> ev_result_vis;
30    std::shared_ptr<rotationEventItem> ev_result_rot;
31    std::shared_ptr<focusEventItem> ev_result_focus;
32    std::shared_ptr<auxHintEventItem> ev_result_hint;
33
34  private:
35    Eina_List *tw_list = NULL;
36
37    int        numTw = 0;     // number of wins
38    int        numGeomTw = 0; // number of wins using usr_geom
39
40    etWin     *createWindow(Elm_Win_Type type, const char *name, Eina_Bool usr_geom, int x, int y, int w, int h);
41 };
42
43 #endif // end of __ET_TESTCASE_BASE__