summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2020-03-18 17:03:07 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2020-03-20 12:04:40 +0100
commit2359386d5d683c50f9217890f97863a19f298904 (patch)
treec012e122cba66533ead5086f63b080cbe468a105
parent2754bc93e684c6ed9a6c3ff6b81c759f830f6210 (diff)
exactness: remove support for legacy .rec format
From now on we will only go with the new .exu format. All tests have been converted two and a half years ago already. If there still is a need for this in some corner cases the external exactness application still has support for this. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11537
-rw-r--r--src/bin/exactness/exactness.c17
-rw-r--r--src/bin/exactness/injector.c4
-rw-r--r--src/bin/exactness/inspect.c25
-rw-r--r--src/bin/exactness/player.c16
-rw-r--r--src/lib/exactness/Exactness.h9
-rw-r--r--src/lib/exactness/legacy_file.c875
-rw-r--r--src/lib/exactness/meson.build1
7 files changed, 5 insertions, 942 deletions
diff --git a/src/bin/exactness/exactness.c b/src/bin/exactness/exactness.c
index c594b28a60..ed999658c9 100644
--- a/src/bin/exactness/exactness.c
+++ b/src/bin/exactness/exactness.c
@@ -184,15 +184,6 @@ _run_test_compare(const List_Entry *ent)
184 _exu_imgs_unpack(path, currentdir, ent->name); 184 _exu_imgs_unpack(path, currentdir, ent->name);
185 goto found; 185 goto found;
186 } 186 }
187 else
188 {
189 sprintf(path, "%s/%s.rec", base_dir, ent->name);
190 if (ecore_file_exists(path))
191 {
192 sprintf(origdir, "%s/%s", _dest_dir, ORIG_SUBDIR);
193 goto found;
194 }
195 }
196 } 187 }
197found: 188found:
198 do 189 do
@@ -226,12 +217,6 @@ _run_command_prepare(const List_Entry *ent, char *buf)
226 is_exu = EINA_TRUE; 217 is_exu = EINA_TRUE;
227 sprintf(scn_path, "%s/%s.exu", base_dir, ent->name); 218 sprintf(scn_path, "%s/%s.exu", base_dir, ent->name);
228 if (ecore_file_exists(scn_path)) goto ok; 219 if (ecore_file_exists(scn_path)) goto ok;
229 else
230 {
231 is_exu = EINA_FALSE;
232 sprintf(scn_path, "%s/%s.rec", base_dir, ent->name);
233 if (ecore_file_exists(scn_path)) goto ok;
234 }
235 } 220 }
236 fprintf(stderr, "Test %s not found in the provided base directories\n", ent->name); 221 fprintf(stderr, "Test %s not found in the provided base directories\n", ent->name);
237 return EINA_FALSE; 222 return EINA_FALSE;
@@ -432,7 +417,7 @@ static const Ecore_Getopt optdesc = {
432 "A pixel perfect test suite for EFL based applications.", 417 "A pixel perfect test suite for EFL based applications.",
433 0, 418 0,
434 { 419 {
435 ECORE_GETOPT_APPEND('b', "base-dir", "The location of the exu/rec files.", ECORE_GETOPT_TYPE_STR), 420 ECORE_GETOPT_APPEND('b', "base-dir", "The location of the exu files.", ECORE_GETOPT_TYPE_STR),
436 ECORE_GETOPT_STORE_STR('o', "output", "The location of the images."), 421 ECORE_GETOPT_STORE_STR('o', "output", "The location of the images."),
437 ECORE_GETOPT_STORE_STR('w', "wrap", "Use a custom command to launch the tests (e.g valgrind)."), 422 ECORE_GETOPT_STORE_STR('w', "wrap", "Use a custom command to launch the tests (e.g valgrind)."),
438 ECORE_GETOPT_STORE_USHORT('j', "jobs", "The number of jobs to run in parallel."), 423 ECORE_GETOPT_STORE_USHORT('j', "jobs", "The number of jobs to run in parallel."),
diff --git a/src/bin/exactness/injector.c b/src/bin/exactness/injector.c
index 928de47a62..7530fd8806 100644
--- a/src/bin/exactness/injector.c
+++ b/src/bin/exactness/injector.c
@@ -241,10 +241,6 @@ _src_open()
241 { 241 {
242 _src_unit = exactness_unit_file_read(_src_filename); 242 _src_unit = exactness_unit_file_read(_src_filename);
243 } 243 }
244 else if (!strcmp(_src_filename + strlen(_src_filename) - 4,".rec"))
245 {
246 _src_unit = legacy_rec_file_read(_src_filename);
247 }
248 if (!_src_unit) return EINA_FALSE; 244 if (!_src_unit) return EINA_FALSE;
249 _cur_event_list = _src_unit->actions; 245 _cur_event_list = _src_unit->actions;
250 Exactness_Action *act = eina_list_data_get(_cur_event_list); 246 Exactness_Action *act = eina_list_data_get(_cur_event_list);
diff --git a/src/bin/exactness/inspect.c b/src/bin/exactness/inspect.c
index 384cda81b6..eeb108b95b 100644
--- a/src/bin/exactness/inspect.c
+++ b/src/bin/exactness/inspect.c
@@ -1238,7 +1238,7 @@ _image_read(const char *filename)
1238 1238
1239static const Ecore_Getopt optdesc = { 1239static const Ecore_Getopt optdesc = {
1240 "exactness_inspect", 1240 "exactness_inspect",
1241 "%prog [options] [<rec file> | <file1 file2>]", 1241 "%prog [options] [<exu file> | <file1 file2>]",
1242 NULL, 1242 NULL,
1243 "(C) 2016 Enlightenment", 1243 "(C) 2016 Enlightenment",
1244 "BSD", 1244 "BSD",
@@ -1310,7 +1310,7 @@ main(int argc, char *argv[])
1310 } 1310 }
1311 if ((clean || delay || shot || list_get || stabilize || pack) && args == argc) 1311 if ((clean || delay || shot || list_get || stabilize || pack) && args == argc)
1312 { 1312 {
1313 fprintf(stderr, "Expected scenario (.rec/.exu) as the last argument.\n"); 1313 fprintf(stderr, "Expected scenario (.exu) as the last argument.\n");
1314 ecore_getopt_help(stderr, &optdesc); 1314 ecore_getopt_help(stderr, &optdesc);
1315 goto end; 1315 goto end;
1316 } 1316 }
@@ -1370,15 +1370,6 @@ main(int argc, char *argv[])
1370 goto end; 1370 goto end;
1371 } 1371 }
1372 } 1372 }
1373 else if (!strcmp(ext, ".rec"))
1374 {
1375 if (!unit) unit = legacy_rec_file_read(src_file);
1376 else
1377 {
1378 fprintf(stderr, "%s - scenario already provided\n", src_file);
1379 goto end;
1380 }
1381 }
1382 else if (!strcmp(ext, ".png")) 1373 else if (!strcmp(ext, ".png"))
1383 { 1374 {
1384 Exactness_Image *ex_img = _image_read(src_file); 1375 Exactness_Image *ex_img = _image_read(src_file);
@@ -1391,7 +1382,7 @@ main(int argc, char *argv[])
1391 } 1382 }
1392 else 1383 else
1393 { 1384 {
1394 fprintf(stderr, "Correct extension (.exu/.rec/.png) required\n"); 1385 fprintf(stderr, "Correct extension (.exu/.png) required\n");
1395 goto end; 1386 goto end;
1396 } 1387 }
1397 } 1388 }
@@ -1423,16 +1414,6 @@ main(int argc, char *argv[])
1423 units_filenames = eina_list_append(units_filenames, argv[arg]); 1414 units_filenames = eina_list_append(units_filenames, argv[arg]);
1424 _units = eina_list_append(_units, ex_unit); 1415 _units = eina_list_append(_units, ex_unit);
1425 } 1416 }
1426 else if (!strcmp(ext, ".rec"))
1427 {
1428 Exactness_Unit *ex_unit = legacy_rec_file_read(argv[arg]);
1429 if (!ex_unit)
1430 {
1431 fprintf(stderr, "Issue while reading %s\n", argv[arg]);
1432 goto end;
1433 }
1434 _units = eina_list_append(_units, ex_unit);
1435 }
1436 else if (!strcmp(ext, ".png")) 1417 else if (!strcmp(ext, ".png"))
1437 { 1418 {
1438 Exactness_Unit *ex_unit = calloc(1, sizeof(*ex_unit)); 1419 Exactness_Unit *ex_unit = calloc(1, sizeof(*ex_unit));
diff --git a/src/bin/exactness/player.c b/src/bin/exactness/player.c
index f95008f616..cca1d37a0e 100644
--- a/src/bin/exactness/player.c
+++ b/src/bin/exactness/player.c
@@ -770,10 +770,6 @@ _src_open()
770 { 770 {
771 _src_unit = exactness_unit_file_read(_src_filename); 771 _src_unit = exactness_unit_file_read(_src_filename);
772 } 772 }
773 else if (_src_type == FTYPE_REC)
774 {
775 _src_unit = legacy_rec_file_read(_src_filename);
776 }
777 if (!_src_unit) return EINA_FALSE; 773 if (!_src_unit) return EINA_FALSE;
778 if (_stabilize_shots) 774 if (_stabilize_shots)
779 { 775 {
@@ -885,7 +881,7 @@ static const Ecore_Getopt optdesc = {
885 " Otherwise the given path is considered as a directory\n" 881 " Otherwise the given path is considered as a directory\n"
886 " where shots will be stored.\n" 882 " where shots will be stored.\n"
887 " If omitted, the output type (exu or dir) is determined\n" 883 " If omitted, the output type (exu or dir) is determined\n"
888 " by the given test extension (resp. exu or rec)."), 884 " by the given test extension"),
889 ECORE_GETOPT_STORE_STR('t', "test", "Test to run on the given application"), 885 ECORE_GETOPT_STORE_STR('t', "test", "Test to run on the given application"),
890 ECORE_GETOPT_STORE_TRUE('s', "show-on-screen", "Show on screen."), 886 ECORE_GETOPT_STORE_TRUE('s', "show-on-screen", "Show on screen."),
891 ECORE_GETOPT_STORE_TRUE(0, "scan-objects", "Extract information of all the objects at every shot."), 887 ECORE_GETOPT_STORE_TRUE(0, "scan-objects", "Extract information of all the objects at every shot."),
@@ -1014,15 +1010,6 @@ int main(int argc, char **argv)
1014 _dest = "./output.exu"; 1010 _dest = "./output.exu";
1015 } 1011 }
1016 } 1012 }
1017 else if (!strcmp(_src_filename + strlen(_src_filename) - 4,".rec"))
1018 {
1019 _src_type = FTYPE_REC;
1020 if (_dest_type == FTYPE_UNKNOWN)
1021 {
1022 _dest_type = FTYPE_DIR;
1023 _dest = ".";
1024 }
1025 }
1026 char *slash = strrchr(_src_filename, '/'); 1013 char *slash = strrchr(_src_filename, '/');
1027 if (slash) _test_name = strdup(slash + 1); 1014 if (slash) _test_name = strdup(slash + 1);
1028 else _test_name = strdup(_src_filename); 1015 else _test_name = strdup(_src_filename);
@@ -1158,7 +1145,6 @@ int main(int argc, char **argv)
1158 { 1145 {
1159 Exactness_Unit *tmp = NULL; 1146 Exactness_Unit *tmp = NULL;
1160 if (_src_type == FTYPE_EXU) tmp = exactness_unit_file_read(_src_filename); 1147 if (_src_type == FTYPE_EXU) tmp = exactness_unit_file_read(_src_filename);
1161 if (_src_type == FTYPE_REC) tmp = legacy_rec_file_read(_src_filename);
1162 _dest_unit->actions = tmp->actions; 1148 _dest_unit->actions = tmp->actions;
1163 _dest_unit->codes = tmp->codes; 1149 _dest_unit->codes = tmp->codes;
1164 } 1150 }
diff --git a/src/lib/exactness/Exactness.h b/src/lib/exactness/Exactness.h
index d5587c3fbf..33c448cf58 100644
--- a/src/lib/exactness/Exactness.h
+++ b/src/lib/exactness/Exactness.h
@@ -253,15 +253,6 @@ EAPI Eina_Bool exactness_image_compare(Exactness_Image *img1, Exactness_Image *i
253EAPI void exactness_image_free(Exactness_Image *img); 253EAPI void exactness_image_free(Exactness_Image *img);
254 254
255/** 255/**
256 * @brief Read a legacy file and convert it to an unit
257 *
258 * @param filename Name of the legacy file
259 *
260 * @return the unit
261 */
262EAPI Exactness_Unit *legacy_rec_file_read(const char *filename);
263
264/**
265 * @} 256 * @}
266 */ 257 */
267 258
diff --git a/src/lib/exactness/legacy_file.c b/src/lib/exactness/legacy_file.c
deleted file mode 100644
index ae496a15b2..0000000000
--- a/src/lib/exactness/legacy_file.c
+++ /dev/null
@@ -1,875 +0,0 @@
1#include <stdio.h>
2#include <limits.h>
3#include <sys/types.h>
4#include <sys/stat.h>
5#include <unistd.h>
6
7#include <Eina.h>
8#include <Eet.h>
9#include <Evas.h>
10
11#include "Exactness.h"
12
13#define CACHE_FILE_ENTRY "cache"
14
15enum _Tsuite_Event_Type
16{ /* Add any supported events here */
17 TSUITE_EVENT_NOT_SUPPORTED = 0,
18 TSUITE_EVENT_MOUSE_IN,
19 TSUITE_EVENT_MOUSE_OUT,
20 TSUITE_EVENT_MOUSE_DOWN,
21 TSUITE_EVENT_MOUSE_UP,
22 TSUITE_EVENT_MOUSE_MOVE,
23 TSUITE_EVENT_MOUSE_WHEEL,
24 TSUITE_EVENT_MULTI_DOWN,
25 TSUITE_EVENT_MULTI_UP,
26 TSUITE_EVENT_MULTI_MOVE,
27 TSUITE_EVENT_KEY_DOWN,
28 TSUITE_EVENT_KEY_UP,
29 TSUITE_EVENT_KEY_DOWN_WITH_KEYCODE,
30 TSUITE_EVENT_KEY_UP_WITH_KEYCODE,
31 TSUITE_EVENT_TAKE_SHOT
32};
33typedef enum _Tsuite_Event_Type Tsuite_Event_Type;
34
35struct _eet_event_type_mapping
36{
37 Tsuite_Event_Type t;
38 const char *name;
39};
40typedef struct _eet_event_type_mapping eet_event_type_mapping;
41
42struct _Variant_Type_st
43{
44 const char *type;
45 Eina_Bool unknow : 1;
46};
47typedef struct _Variant_Type_st Variant_Type_st;
48
49struct _Variant_st
50{
51 Variant_Type_st t;
52 void *data; /* differently than the union type, we
53 * don't need to pre-allocate the memory
54 * for the field*/
55};
56typedef struct _Variant_st Variant_st;
57
58struct _Timer_Data
59{
60 unsigned int recent_event_time;
61 Eina_List *current_event;
62};
63typedef struct _Timer_Data Timer_Data;
64
65struct _Tsuite_Data
66{
67 int serial; /**< Serial number of current-file */
68 Timer_Data *td;
69};
70typedef struct _Tsuite_Data Tsuite_Data;
71
72struct _mouse_in_mouse_out
73{
74 unsigned int timestamp;
75 int n_evas;
76};
77
78struct _mouse_down_mouse_up
79{
80 int b;
81 Evas_Button_Flags flags;
82 unsigned int timestamp;
83 int n_evas;
84};
85
86struct _mouse_move
87{
88 int x;
89 int y;
90 unsigned int timestamp;
91 int n_evas;
92};
93
94struct _mouse_wheel
95{
96 int direction;
97 int z;
98 unsigned int timestamp;
99 int n_evas;
100};
101
102struct _key_down_key_up
103{
104 unsigned int timestamp;
105 const char *keyname;
106 const char *key;
107 const char *string;
108 const char *compose;
109 int n_evas;
110};
111
112struct _key_down_key_up_with_keycode
113{
114 unsigned int timestamp;
115 const char *keyname;
116 const char *key;
117 const char *string;
118 const char *compose;
119 int n_evas;
120 unsigned int keycode;
121};
122
123struct _multi_event
124{
125 int d;
126 int b; /* In case of simple mouse down/up, corresponds to the button */
127 int x;
128 int y;
129 double rad;
130 double radx;
131 double rady;
132 double pres;
133 double ang;
134 double fx;
135 double fy;
136 Evas_Button_Flags flags;
137 unsigned int timestamp;
138 int n_evas;
139};
140
141struct _multi_move
142{
143 int d;
144 int x;
145 int y;
146 double rad;
147 double radx;
148 double rady;
149 double pres;
150 double ang;
151 double fx;
152 double fy;
153 unsigned int timestamp;
154 int n_evas;
155};
156
157typedef struct _mouse_in_mouse_out mouse_in_mouse_out;
158typedef struct _mouse_down_mouse_up mouse_down_mouse_up;
159typedef struct _mouse_move mouse_move;
160typedef struct _mouse_wheel mouse_wheel;
161typedef struct _multi_event multi_event;
162typedef struct _multi_move multi_move;
163typedef struct _key_down_key_up key_down_key_up;
164typedef struct _key_down_key_up_with_keycode key_down_key_up_with_keycode;
165typedef struct _mouse_in_mouse_out take_screenshot;
166
167/* START - EET support typedefs */
168#define TSUITE_EVENT_MOUSE_IN_STR "tsuite_event_mouse_in"
169#define TSUITE_EVENT_MOUSE_OUT_STR "tsuite_event_mouse_out"
170#define TSUITE_EVENT_MOUSE_DOWN_STR "tsuite_event_mouse_down"
171#define TSUITE_EVENT_MOUSE_UP_STR "tsuite_event_mouse_up"
172#define TSUITE_EVENT_MOUSE_MOVE_STR "tsuite_event_mouse_move"
173#define TSUITE_EVENT_MOUSE_WHEEL_STR "tsuite_event_mouse_wheel"
174#define TSUITE_EVENT_MULTI_DOWN_STR "tsuite_event_multi_down"
175#define TSUITE_EVENT_MULTI_UP_STR "tsuite_event_multi_up"
176#define TSUITE_EVENT_MULTI_MOVE_STR "tsuite_event_multi_move"
177#define TSUITE_EVENT_KEY_DOWN_STR "tsuite_event_key_down"
178#define TSUITE_EVENT_KEY_UP_STR "tsuite_event_key_up"
179#define TSUITE_EVENT_KEY_DOWN_WITH_KEYCODE_STR "tsuite_event_key_down_with_keycode"
180#define TSUITE_EVENT_KEY_UP_WITH_KEYCODE_STR "tsuite_event_key_up_with_keycode"
181#define TSUITE_EVENT_TAKE_SHOT_STR "tsuite_event_take_shot"
182
183struct _Lists_st
184{
185 Eina_List *variant_list;
186 unsigned int first_timestamp;
187};
188typedef struct _Lists_st Lists_st;
189
190struct _data_desc
191{
192 Eet_Data_Descriptor *take_screenshot;
193 Eet_Data_Descriptor *mouse_in_mouse_out;
194 Eet_Data_Descriptor *mouse_down_mouse_up;
195 Eet_Data_Descriptor *mouse_move;
196 Eet_Data_Descriptor *mouse_wheel;
197 Eet_Data_Descriptor *multi_event;
198 Eet_Data_Descriptor *multi_move;
199 Eet_Data_Descriptor *key_down_key_up;
200 Eet_Data_Descriptor *key_down_key_up_with_keycode;
201
202 /* list, variant EET desc support */
203 Eet_Data_Descriptor *lists_descriptor;
204 Eet_Data_Descriptor *variant_descriptor;
205 Eet_Data_Descriptor *variant_unified_descriptor;
206};
207typedef struct _data_desc data_desc;
208/* END - EET support typedefs */
209
210static data_desc *_desc = NULL; /* this struct holds descs (alloc on init) */
211
212static eet_event_type_mapping eet_mapping[] = {
213 { TSUITE_EVENT_MOUSE_IN, TSUITE_EVENT_MOUSE_IN_STR },
214 { TSUITE_EVENT_MOUSE_OUT, TSUITE_EVENT_MOUSE_OUT_STR },
215 { TSUITE_EVENT_MOUSE_DOWN, TSUITE_EVENT_MOUSE_DOWN_STR },
216 { TSUITE_EVENT_MOUSE_UP, TSUITE_EVENT_MOUSE_UP_STR },
217 { TSUITE_EVENT_MOUSE_MOVE, TSUITE_EVENT_MOUSE_MOVE_STR },
218 { TSUITE_EVENT_MOUSE_WHEEL, TSUITE_EVENT_MOUSE_WHEEL_STR },
219 { TSUITE_EVENT_MULTI_DOWN, TSUITE_EVENT_MULTI_DOWN_STR },
220 { TSUITE_EVENT_MULTI_UP, TSUITE_EVENT_MULTI_UP_STR },
221 { TSUITE_EVENT_MULTI_MOVE, TSUITE_EVENT_MULTI_MOVE_STR },
222 { TSUITE_EVENT_KEY_DOWN, TSUITE_EVENT_KEY_DOWN_STR },
223 { TSUITE_EVENT_KEY_UP, TSUITE_EVENT_KEY_UP_STR },
224 { TSUITE_EVENT_KEY_DOWN_WITH_KEYCODE, TSUITE_EVENT_KEY_DOWN_WITH_KEYCODE_STR },
225 { TSUITE_EVENT_KEY_UP_WITH_KEYCODE, TSUITE_EVENT_KEY_UP_WITH_KEYCODE_STR },
226 { TSUITE_EVENT_TAKE_SHOT, TSUITE_EVENT_TAKE_SHOT_STR },
227 { TSUITE_EVENT_NOT_SUPPORTED, NULL }
228};
229
230static Tsuite_Event_Type
231_event_mapping_type_get(const char *name)
232{
233 int i;
234 for (i = 0; eet_mapping[i].name != NULL; ++i)
235 if (strcmp(name, eet_mapping[i].name) == 0)
236 return eet_mapping[i].t;
237
238 return TSUITE_EVENT_NOT_SUPPORTED;
239}
240
241static unsigned int
242_evt_time_get(unsigned int tm, Variant_st *v)
243{
244 if (!v) return tm;
245 switch(_event_mapping_type_get(v->t.type))
246 {
247 case TSUITE_EVENT_MOUSE_IN:
248 {
249 mouse_in_mouse_out *t = v->data;
250 return t->timestamp;
251 }
252 case TSUITE_EVENT_MOUSE_OUT:
253 {
254 mouse_in_mouse_out *t = v->data;
255 return t->timestamp;
256 }
257 case TSUITE_EVENT_MOUSE_DOWN:
258 {
259 mouse_down_mouse_up *t = v->data;
260 return t->timestamp;
261 }
262 case TSUITE_EVENT_MOUSE_UP:
263 {
264 mouse_down_mouse_up *t = v->data;
265 return t->timestamp;
266 }
267 case TSUITE_EVENT_MOUSE_MOVE:
268 {
269 mouse_move *t = v->data;
270 return t->timestamp;
271 }
272 case TSUITE_EVENT_MOUSE_WHEEL:
273 {
274 mouse_wheel *t = v->data;
275 return t->timestamp;
276 }
277 case TSUITE_EVENT_MULTI_DOWN:
278 {
279 multi_event *t = v->data;
280 return t->timestamp;
281 }
282 case TSUITE_EVENT_MULTI_UP:
283 {
284 multi_event *t = v->data;
285 return t->timestamp;
286 }
287 case TSUITE_EVENT_MULTI_MOVE:
288 {
289 multi_move *t = v->data;
290 return t->timestamp;
291 }
292 case TSUITE_EVENT_KEY_DOWN:
293 {
294 key_down_key_up *t = v->data;
295 return t->timestamp;
296 }
297 case TSUITE_EVENT_KEY_UP:
298 {
299 key_down_key_up *t = v->data;
300 return t->timestamp;
301 }
302 case TSUITE_EVENT_KEY_DOWN_WITH_KEYCODE:
303 {
304 key_down_key_up_with_keycode *t = v->data;
305 return t->timestamp;
306 }
307 case TSUITE_EVENT_KEY_UP_WITH_KEYCODE:
308 {
309 key_down_key_up_with_keycode *t = v->data;
310 return t->timestamp;
311 }
312 case TSUITE_EVENT_TAKE_SHOT:
313 {
314 take_screenshot *t = v->data;
315 return t->timestamp;
316 }
317 default: /* All non-input events are not handeled */
318 return tm;
319 break;
320 }
321}
322
323static Lists_st *
324_free_events(Lists_st *st)
325{
326 Variant_st *v;
327 if (!st) goto end;
328 EINA_LIST_FREE(st->variant_list, v)
329 {
330 free(v->data);
331 free(v);
332 }
333
334 free(st); /* Allocated when reading data from EET file */
335end:
336 return NULL;
337}
338
339static const char *
340_variant_type_get(const void *data, Eina_Bool *unknow)
341{
342 const Variant_Type_st *type = data;
343 int i;
344
345 if (unknow)
346 *unknow = type->unknow;
347
348 for (i = 0; eet_mapping[i].name != NULL; ++i)
349 if (strcmp(type->type, eet_mapping[i].name) == 0)
350 return eet_mapping[i].name;
351
352 if (unknow)
353 *unknow = EINA_FALSE;
354
355 return type->type;
356} /* _variant_type_get */
357
358static Eina_Bool
359_variant_type_set(const char *type,
360 void *data,
361 Eina_Bool unknow)
362{
363 Variant_Type_st *vt = data;
364
365 vt->type = type;
366 vt->unknow = unknow;
367 return EINA_TRUE;
368} /* _variant_type_set */
369
370/* START Event struct descriptors */
371static Eet_Data_Descriptor *
372_take_screenshot_desc_make(void)
373{
374 Eet_Data_Descriptor_Class eddc;
375 Eet_Data_Descriptor *_d;
376 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, take_screenshot);
377 _d = eet_data_descriptor_stream_new(&eddc);
378
379 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, take_screenshot, "timestamp",
380 timestamp, EET_T_UINT);
381 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, take_screenshot, "n_evas",
382 n_evas, EET_T_INT);
383
384 return _d;
385}
386
387static Eet_Data_Descriptor *
388_mouse_in_mouse_out_desc_make(void)
389{
390 Eet_Data_Descriptor_Class eddc;
391 Eet_Data_Descriptor *_d;
392 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, mouse_in_mouse_out);
393 _d = eet_data_descriptor_stream_new(&eddc);
394
395 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_in_mouse_out, "timestamp",
396 timestamp, EET_T_UINT);
397 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_in_mouse_out, "n_evas",
398 n_evas, EET_T_INT);
399
400 return _d;
401}
402
403static Eet_Data_Descriptor *
404_mouse_down_mouse_up_desc_make(void)
405{
406 Eet_Data_Descriptor_Class eddc;
407 Eet_Data_Descriptor *_d;
408 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, mouse_down_mouse_up);
409 _d = eet_data_descriptor_stream_new(&eddc);
410
411 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_down_mouse_up, "b", b, EET_T_INT);
412 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_down_mouse_up, "flags",
413 flags, EET_T_INT);
414
415 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_down_mouse_up, "timestamp",
416 timestamp, EET_T_UINT);
417 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_down_mouse_up, "n_evas",
418 n_evas, EET_T_INT);
419
420 return _d;
421}
422
423static Eet_Data_Descriptor *
424_mouse_move_desc_make(void)
425{
426 Eet_Data_Descriptor_Class eddc;
427 Eet_Data_Descriptor *_d;
428 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, mouse_move);
429 _d = eet_data_descriptor_stream_new(&eddc);
430
431 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_move, "x", x, EET_T_INT);
432 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_move, "y", y, EET_T_INT);
433 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_move, "timestamp",
434 timestamp, EET_T_UINT);
435 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_move, "n_evas",
436 n_evas, EET_T_INT);
437
438 return _d;
439}
440
441static Eet_Data_Descriptor *
442_mouse_wheel_desc_make(void)
443{
444 Eet_Data_Descriptor_Class eddc;
445 Eet_Data_Descriptor *_d;
446 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, mouse_wheel);
447 _d = eet_data_descriptor_stream_new(&eddc);
448
449 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_wheel, "direction",
450 direction, EET_T_INT);
451
452 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_wheel, "z", z, EET_T_INT);
453 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_wheel, "timestamp",
454 timestamp, EET_T_UINT);
455 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, mouse_wheel, "n_evas",
456 n_evas, EET_T_INT);
457
458 return _d;
459}
460
461static Eet_Data_Descriptor *
462_key_down_key_up_desc_make(void)
463{
464 Eet_Data_Descriptor_Class eddc;
465 Eet_Data_Descriptor *_d;
466 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, key_down_key_up);
467 _d = eet_data_descriptor_stream_new(&eddc);
468
469 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up, "timestamp",
470 timestamp, EET_T_UINT);
471
472 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up, "keyname",
473 keyname, EET_T_STRING);
474
475 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up, "key",
476 key, EET_T_STRING);
477
478 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up, "string",
479 string, EET_T_STRING);
480
481 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up, "compose",
482 compose, EET_T_STRING);
483 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up, "n_evas",
484 n_evas, EET_T_INT);
485
486 return _d;
487}
488
489static Eet_Data_Descriptor *
490_key_down_key_up_with_keycode_desc_make(void)
491{
492 Eet_Data_Descriptor_Class eddc;
493 Eet_Data_Descriptor *_d;
494 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, key_down_key_up_with_keycode);
495 _d = eet_data_descriptor_stream_new(&eddc);
496
497 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up_with_keycode, "timestamp",
498 timestamp, EET_T_UINT);
499
500 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up_with_keycode, "keyname",
501 keyname, EET_T_STRING);
502
503 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up_with_keycode, "key",
504 key, EET_T_STRING);
505
506 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up_with_keycode, "string",
507 string, EET_T_STRING);
508
509 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up_with_keycode, "compose",
510 compose, EET_T_STRING);
511 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up_with_keycode, "n_evas",
512 n_evas, EET_T_INT);
513 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, key_down_key_up_with_keycode, "keycode",
514 keycode, EET_T_INT);
515
516 return _d;
517}
518
519static Eet_Data_Descriptor *
520_multi_event_desc_make(void)
521{
522 Eet_Data_Descriptor_Class eddc;
523 Eet_Data_Descriptor *_d;
524 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, multi_event);
525 _d = eet_data_descriptor_stream_new(&eddc);
526
527 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "d", d, EET_T_UINT);
528 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "b", b, EET_T_UINT);
529 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "x", x, EET_T_UINT);
530 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "y", y, EET_T_UINT);
531 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "rad", rad, EET_T_DOUBLE);
532 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "radx", radx, EET_T_DOUBLE);
533 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "rady", rady, EET_T_DOUBLE);
534 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "pres", pres, EET_T_DOUBLE);
535 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "ang", ang, EET_T_DOUBLE);
536 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "fx", fx, EET_T_DOUBLE);
537 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "fy", fy, EET_T_DOUBLE);
538 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "flags", flags, EET_T_INT);
539 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "timestamp",
540 timestamp, EET_T_UINT);
541 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_event, "n_evas",
542 n_evas, EET_T_INT);
543
544 return _d;
545}
546
547static Eet_Data_Descriptor *
548_multi_move_desc_make(void)
549{
550 Eet_Data_Descriptor_Class eddc;
551 Eet_Data_Descriptor *_d;
552 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, multi_move);
553 _d = eet_data_descriptor_stream_new(&eddc);
554
555 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_move, "d", d, EET_T_UINT);
556 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_move, "x", x, EET_T_UINT);
557 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_move, "y", y, EET_T_UINT);
558 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_move, "rad", rad, EET_T_DOUBLE);
559 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_move, "radx", radx, EET_T_DOUBLE);
560 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_move, "rady", rady, EET_T_DOUBLE);
561 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_move, "pres", pres, EET_T_DOUBLE);
562 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_move, "ang", ang, EET_T_DOUBLE);
563 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_move, "fx", fx, EET_T_DOUBLE);
564 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_move, "fy", fy, EET_T_DOUBLE);
565 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_move, "timestamp",
566 timestamp, EET_T_UINT);
567 EET_DATA_DESCRIPTOR_ADD_BASIC(_d, multi_move, "n_evas",
568 n_evas, EET_T_INT);
569
570 return _d;
571}
572
573/* declaring types */
574static data_desc *
575_data_descriptors_init(void)
576{
577 if (_desc) /* Was allocated */
578 return _desc;
579
580 _desc = calloc(1, sizeof(data_desc));
581
582 Eet_Data_Descriptor_Class eddc;
583
584 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Lists_st);
585 _desc->lists_descriptor = eet_data_descriptor_file_new(&eddc);
586
587 _desc->take_screenshot = _take_screenshot_desc_make();
588 _desc->mouse_in_mouse_out = _mouse_in_mouse_out_desc_make();
589 _desc->mouse_down_mouse_up = _mouse_down_mouse_up_desc_make();
590 _desc->mouse_move = _mouse_move_desc_make();
591 _desc->mouse_wheel = _mouse_wheel_desc_make();
592 _desc->multi_event = _multi_event_desc_make();
593 _desc->multi_move = _multi_move_desc_make();
594 _desc->key_down_key_up = _key_down_key_up_desc_make();
595 _desc->key_down_key_up_with_keycode = _key_down_key_up_with_keycode_desc_make();
596
597 /* for variant */
598 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Variant_st);
599 _desc->variant_descriptor = eet_data_descriptor_file_new(&eddc);
600
601 eddc.version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
602 eddc.func.type_get = _variant_type_get;
603 eddc.func.type_set = _variant_type_set;
604 _desc->variant_unified_descriptor = eet_data_descriptor_stream_new(&eddc);
605
606 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
607 TSUITE_EVENT_MOUSE_IN_STR, _desc->mouse_in_mouse_out);
608
609 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
610 TSUITE_EVENT_MOUSE_OUT_STR, _desc->mouse_in_mouse_out);
611
612 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
613 TSUITE_EVENT_MOUSE_DOWN_STR, _desc->mouse_down_mouse_up);
614
615 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
616 TSUITE_EVENT_MOUSE_UP_STR, _desc->mouse_down_mouse_up);
617
618 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
619 TSUITE_EVENT_MOUSE_MOVE_STR, _desc->mouse_move);
620
621 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
622 TSUITE_EVENT_MOUSE_WHEEL_STR, _desc->mouse_wheel);
623
624 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
625 TSUITE_EVENT_MULTI_DOWN_STR, _desc->multi_event);
626
627 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
628 TSUITE_EVENT_MULTI_UP_STR, _desc->multi_event);
629
630 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
631 TSUITE_EVENT_MULTI_MOVE_STR, _desc->multi_move);
632
633 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
634 TSUITE_EVENT_KEY_DOWN_STR, _desc->key_down_key_up);
635
636 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
637 TSUITE_EVENT_KEY_UP_STR, _desc->key_down_key_up);
638
639 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
640 TSUITE_EVENT_KEY_DOWN_WITH_KEYCODE_STR, _desc->key_down_key_up_with_keycode);
641
642 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
643 TSUITE_EVENT_KEY_UP_WITH_KEYCODE_STR, _desc->key_down_key_up_with_keycode);
644
645 EET_DATA_DESCRIPTOR_ADD_MAPPING(_desc->variant_unified_descriptor,
646 TSUITE_EVENT_TAKE_SHOT_STR, _desc->take_screenshot);
647
648
649 EET_DATA_DESCRIPTOR_ADD_VARIANT(_desc->variant_descriptor,
650 Variant_st, "data", data, t, _desc->variant_unified_descriptor);
651
652 EET_DATA_DESCRIPTOR_ADD_BASIC(_desc->lists_descriptor,
653 Lists_st, "first_timestamp", first_timestamp, EET_T_UINT);
654 EET_DATA_DESCRIPTOR_ADD_LIST(_desc->lists_descriptor,
655 Lists_st, "variant_list", variant_list, _desc->variant_descriptor);
656
657 return _desc;
658}
659
660static void
661_data_descriptors_shutdown(void)
662{
663 if (_desc)
664 {
665 eet_data_descriptor_free(_desc->mouse_in_mouse_out);
666 eet_data_descriptor_free(_desc->mouse_down_mouse_up);
667 eet_data_descriptor_free(_desc->mouse_move);
668 eet_data_descriptor_free(_desc->mouse_wheel);
669 eet_data_descriptor_free(_desc->multi_event);
670 eet_data_descriptor_free(_desc->multi_move);
671 eet_data_descriptor_free(_desc->key_down_key_up);
672 eet_data_descriptor_free(_desc->key_down_key_up_with_keycode);
673 eet_data_descriptor_free(_desc->take_screenshot);
674 eet_data_descriptor_free(_desc->lists_descriptor);
675 eet_data_descriptor_free(_desc->variant_descriptor);
676 eet_data_descriptor_free(_desc->variant_unified_descriptor);
677
678 free(_desc);
679 _desc = NULL;
680 /* FIXME: Should probably only init and shutdown once */
681 }
682}
683
684EAPI Exactness_Unit *
685legacy_rec_file_read(const char *filename)
686{
687 Lists_st *vr_list;
688 Eina_List *itr;
689 Variant_st *v, *prev_v = NULL;
690 Exactness_Unit *unit = NULL;
691 Eet_File *fp = eet_open(filename, EET_FILE_MODE_READ);
692 if (!fp)
693 {
694 printf("Failed to open input file <%s>.\n", filename);
695 return NULL;
696 }
697
698 /* Read events list */
699 _data_descriptors_init();
700 vr_list = eet_data_read(fp, _desc->lists_descriptor, CACHE_FILE_ENTRY);
701 eet_close(fp);
702 _data_descriptors_shutdown();
703
704 unit = calloc(1, sizeof(*unit));
705
706 EINA_LIST_FOREACH(vr_list->variant_list, itr, v)
707 {
708 Exactness_Action *act = calloc(1, sizeof(*act));
709 Tsuite_Event_Type old_type = _event_mapping_type_get(v->t.type);
710 unsigned int vtm = _evt_time_get(0, v);
711 if (!vtm) continue;
712 switch (old_type)
713 {
714 case TSUITE_EVENT_MOUSE_IN:
715 {
716 mouse_in_mouse_out *d_i = v->data;
717 act->type = EXACTNESS_ACTION_MOUSE_IN;
718 act->n_evas = d_i->n_evas;
719 break;
720 }
721 case TSUITE_EVENT_MOUSE_OUT:
722 {
723 mouse_in_mouse_out *d_i = v->data;
724 act->type = EXACTNESS_ACTION_MOUSE_OUT;
725 act->n_evas = d_i->n_evas;
726 break;
727 }
728 case TSUITE_EVENT_MOUSE_DOWN:
729 case TSUITE_EVENT_MOUSE_UP:
730 {
731 mouse_down_mouse_up *d_i = v->data;
732 Exactness_Action_Multi_Event *d_o = calloc(1, sizeof(*d_o));
733 d_o->b = d_i->b;
734 d_o->flags = d_i->flags;
735 if (old_type == TSUITE_EVENT_MOUSE_DOWN)
736 act->type = EXACTNESS_ACTION_MULTI_DOWN;
737 else
738 act->type = EXACTNESS_ACTION_MULTI_UP;
739 act->n_evas = d_i->n_evas;
740 act->data = d_o;
741 break;
742 }
743 case TSUITE_EVENT_MOUSE_MOVE:
744 {
745 mouse_move *d_i = v->data;
746 Exactness_Action_Multi_Move *d_o = calloc(1, sizeof(*d_o));
747 d_o->x = d_i->x;
748 d_o->y = d_i->y;
749 act->type = EXACTNESS_ACTION_MULTI_MOVE;
750 act->n_evas = d_i->n_evas;
751 act->data = d_o;
752 break;
753 }
754 case TSUITE_EVENT_MOUSE_WHEEL:
755 {
756 mouse_wheel *d_i = v->data;
757 Exactness_Action_Mouse_Wheel *d_o = calloc(1, sizeof(*d_o));
758 d_o->direction = d_i->direction;
759 d_o->z = d_i->z;
760 act->type = EXACTNESS_ACTION_MOUSE_WHEEL;
761 act->n_evas = d_i->n_evas;
762 act->data = d_o;
763 break;
764 }
765 case TSUITE_EVENT_MULTI_DOWN:
766 case TSUITE_EVENT_MULTI_UP:
767 {
768 multi_event *d_i = v->data;
769 Exactness_Action_Multi_Event *d_o = calloc(1, sizeof(*d_o));
770 d_o->d = d_i->d;
771 d_o->b = d_i->b;
772 d_o->x = d_i->x;
773 d_o->y = d_i->y;
774 d_o->rad = d_i->rad;
775 d_o->radx = d_i->radx;
776 d_o->rady = d_i->rady;
777 d_o->pres = d_i->pres;
778 d_o->ang = d_i->ang;
779 d_o->fx = d_i->fx;
780 d_o->fy = d_i->fy;
781 d_o->flags = d_i->flags;
782 if (old_type == TSUITE_EVENT_MULTI_DOWN)
783 act->type = EXACTNESS_ACTION_MULTI_DOWN;
784 else
785 act->type = EXACTNESS_ACTION_MULTI_UP;
786 act->n_evas = d_i->n_evas;
787 act->data = d_o;
788 break;
789 }
790 case TSUITE_EVENT_MULTI_MOVE:
791 {
792 multi_move *d_i = v->data;
793 Exactness_Action_Multi_Move *d_o = calloc(1, sizeof(*d_o));
794 d_o->d = d_i->d;
795 d_o->x = d_i->x;
796 d_o->y = d_i->y;
797 d_o->rad = d_i->rad;
798 d_o->radx = d_i->radx;
799 d_o->rady = d_i->rady;
800 d_o->pres = d_i->pres;
801 d_o->ang = d_i->ang;
802 d_o->fx = d_i->fx;
803 d_o->fy = d_i->fy;
804 act->type = EXACTNESS_ACTION_MULTI_MOVE;
805 act->n_evas = d_i->n_evas;
806 act->data = d_o;
807 break;
808 }
809 case TSUITE_EVENT_KEY_DOWN:
810 case TSUITE_EVENT_KEY_UP:
811 {
812 key_down_key_up *d_i = v->data;
813 Exactness_Action_Key_Down_Up *d_o = calloc(1, sizeof(*d_o));
814 d_o->keyname = d_i->keyname;
815 d_o->key = d_i->key;
816 d_o->string = d_i->string;
817 d_o->compose = d_i->compose;
818 if (old_type == TSUITE_EVENT_KEY_DOWN)
819 act->type = EXACTNESS_ACTION_KEY_DOWN;
820 else
821 act->type = EXACTNESS_ACTION_KEY_UP;
822 act->n_evas = d_i->n_evas;
823 act->data = d_o;
824 break;
825 }
826 case TSUITE_EVENT_KEY_DOWN_WITH_KEYCODE:
827 case TSUITE_EVENT_KEY_UP_WITH_KEYCODE:
828 {
829 key_down_key_up_with_keycode *d_i = v->data;
830 Exactness_Action_Key_Down_Up *d_o = calloc(1, sizeof(*d_o));
831 d_o->keyname = d_i->keyname;
832 d_o->key = d_i->key;
833 d_o->string = d_i->string;
834 d_o->compose = d_i->compose;
835 d_o->keycode = d_i->keycode;
836 if (old_type == TSUITE_EVENT_KEY_DOWN_WITH_KEYCODE)
837 act->type = EXACTNESS_ACTION_KEY_DOWN;
838 else
839 act->type = EXACTNESS_ACTION_KEY_UP;
840 act->n_evas = d_i->n_evas;
841 act->data = d_o;
842 break;
843 }
844 case TSUITE_EVENT_TAKE_SHOT:
845 {
846 take_screenshot *d_i = v->data;
847 act->type = EXACTNESS_ACTION_TAKE_SHOT;
848 act->n_evas = d_i->n_evas;
849 break;
850 }
851 default: break;
852 }
853 if (!prev_v)
854 {
855 if (vr_list->first_timestamp)
856 act->delay_ms = _evt_time_get(0, v) - vr_list->first_timestamp;
857 else
858 act->delay_ms = 0;
859 }
860 else
861 {
862 if (vtm > _evt_time_get(0, prev_v))
863 act->delay_ms = vtm - _evt_time_get(0, prev_v);
864 else act->delay_ms = 0;
865 }
866 unit->actions = eina_list_append(unit->actions, act);
867 prev_v = v;
868 }
869#ifdef DEBUG_TSUITE
870 printf("%s number of actions in the scenario <%d>\n", __func__, eina_list_count(unit->actions));
871#endif
872 _free_events(vr_list);
873
874 return unit;
875}
diff --git a/src/lib/exactness/meson.build b/src/lib/exactness/meson.build
index 82929b301d..11ba1173a4 100644
--- a/src/lib/exactness/meson.build
+++ b/src/lib/exactness/meson.build
@@ -4,7 +4,6 @@ exactness_deps = []
4exactness_src = [ 4exactness_src = [
5 'Exactness.h', 5 'Exactness.h',
6 'exactness_private.h', 6 'exactness_private.h',
7 'legacy_file.c',
8 'unit.c' 7 'unit.c'
9] 8]
10 9