1 #ifndef __ET_EVENT_LOOP_H__
2 #define __ET_EVENT_LOOP_H__
4 #include <gtest/gtest.h>
7 #include "e_test_util.h"
8 #include "e_test_win.h"
16 worker.waitTime = 0.0;
19 tzlaunch_effect = NULL;
20 tzlaunch_splash = NULL;
21 ev.expire_timer = NULL;
22 ev.request = E_TC_EVENT_TYPE_NONE;
23 ev.response = E_TC_EVENT_TYPE_NONE;
37 static etRunner &get() { return inst; }
49 Eldbus_Connection *conn;
54 struct tizen_policy *tzPolicy;
55 struct tizen_surface *tzSurface;
56 struct tizen_launch_effect *tzlaunch_effect;
57 struct tizen_launch_splash *tzlaunch_splash;
59 Eina_List *listWinInfo;
61 public: /* TODO: make it hidden */
64 Ecore_Timer *expire_timer;
65 E_TC_Event_Type request;
66 E_TC_Event_Type response;
68 Eldbus_Signal_Handler *sh;
71 Eina_Stringshare *name;
77 unsigned int state_smcb;
97 void work(double time);
99 void printWinInfoList();
100 void setWaitTime(double time) { worker.waitTime = time; };
103 void addTimer(double time);
104 void waitForDestroy();
106 Eina_Bool registerWin(etWin *tw);
107 Eina_Bool deregisterWin(etWin *tw);
108 Eina_Bool resetRegisterWin();
109 Eina_Bool setWinActivate(etWin *tw);
110 Eina_Bool setWinIconic(etWin *tw, Eina_Bool set);
111 Eina_Bool setWinStack(etWin *tw, etWin *sibiling, Eina_Bool above);
112 Eina_Bool setWinTransientFor(etWin *tw_child, etWin *tw_parent, Eina_Bool set);
113 Eina_Bool setWinNotiLevel(etWin *tw, efl_util_notification_level_e lv);
114 efl_util_notification_level_e getWinNotiLevel(etWin *tw);
115 Eina_Bool setFocusSkip(etWin *tw, Eina_Bool set);
116 Eina_Bool setZoneRotation(int angle);
117 Eina_Bool getWinInfo(etWin *tw);
118 Eina_List *getWinInfoList();
119 void freeWinInfoList(Eina_List *list);
120 void freeLastWinInfoList();
121 Eina_Bool hasLastWinInfoList() { return !!listWinInfo; };
122 void setLastWinInfoList(Eina_List *list);
123 Ecore_Window getWinId(Evas_Object *elm_win);
124 struct wl_surface *getWlSurface(Evas_Object *elm_win);
125 Eina_Bool setDpms(Eina_Bool on);
126 Eina_Bool feedMouseDown(int x, int y);
127 Eina_Bool feedMouseMove(int x, int y);
128 Eina_Bool feedMouseUp(int x, int y);
129 Eina_Bool feedKeyDown(const char *key);
130 Eina_Bool feedKeyUp(const char *key);
131 Eina_Bool generateMouseDown(int x, int y);
132 Eina_Bool generateMouseMove(int x, int y);
133 Eina_Bool generateMouseUp(int x, int y);
134 Eina_Bool generateKeyPress(const char *key);
135 Eina_Bool generateKeyRelease(const char *key);
136 void generateKeyEvent(const char *keyname, double delay);
137 Eina_Bool generateTouchDown(int idx, int x, int y);
138 Eina_Bool generateTouchMove(int idx, int x, int y);
139 Eina_Bool generateTouchUp(int idx, int x, int y);
140 Eina_Bool setSplashLaunch(const char *path, int type);
141 Eina_Bool setSplashOwner();
142 Eina_Bool setWindowEffectType(etWin *tw, E_TC_Window_Effect_type type);
143 Eina_Bool freezeEvent();
144 Eina_Bool thawEvent();
145 Eina_Bool waitEvent(E_TC_Event_Type ev);
147 Eldbus_Proxy *getDbusProxy() { return dbus.proxy; }
148 Eldbus_Object *getDbusObject() { return dbus.obj; }
149 int getLogDomain() { return logDomain; }
152 Eina_Bool initProtocols();
153 efl_util_inputgen_h inputGenerator = NULL;
156 #endif // end of __ET_EVENT_LOOP_H__