Support fullscreen option.
[platform/upstream/expedite.git] / src / bin / ui.c
1 #include "main.h"
2
3 #include <Eo.h>
4
5 #define PROTO
6 #include "tests.h"
7 #undef PROTO
8
9 static double wfps = 0.0;
10
11 static double t_start = 0.0;
12 static double t_loop = 0.0;
13 static int    f_start = 0;
14 static int    f_loop = 0;
15 static char   data_dir[4096];
16
17 int async_render = 0;
18 Eina_List *menu = NULL;
19
20 static Evas_Object *o_bg = NULL;
21 static Evas_Object *o_wallpaper = NULL;
22 static Evas_Object *o_title = NULL;
23 static Evas_Object *o_byline = NULL;
24 static Evas_Object *o_menu_logo = NULL;
25 static Evas_Object *o_menu_icon = NULL;
26 static Evas_Object *o_menu_icon_sel = NULL;
27 static Evas_Object *o_menu_icon_sel2 = NULL;
28 static Evas_Object *o_menu_text_sel = NULL;
29 static Evas_Object *o_menu_title = NULL;
30 static int          menu_sel = 0;
31 static int          menu_active = 0;
32 static double       menu_anim = 0.0;
33 static double       menu_anim_sel = 0.0;
34
35 static double       p_fps = 0.0;
36
37 static void (*key_func) (char *key) = NULL;
38 static void (*loop_func) (double t, int f) = NULL;
39
40 double weights[] =
41 {
42    0.0, // no test 0
43    0.0, // all tests 0
44
45    50.4851, // test 1
46    97.3703, // test 2
47    10.0000, // test 3
48    87.3703, // ...
49    10.0000,
50
51    150.0000, // test 6
52    10.0000,
53    150.0000,
54    10.0000,
55    150.0000,
56
57    10.0000, // test 11
58    150.0000,
59    10.0000,
60    10.6493,
61    38.4818,
62
63    40.7314, // test 16
64    32.0866,
65    21.3337,
66    21.2167,
67    71.6141,
68
69    64.8893, // test 21
70    95.0880,
71    121.0438,
72    41.2646,
73    162.7149,
74
75    89.1650, // test 26
76    105.3571,
77    40.9657,
78    98.4671,
79    28.4322,
80
81    60.000, // test 31
82    75.5507,
83    51.6601,
84    135.4753,
85    38.2705,
86
87    35.9915, // test 36
88    31.9500,
89    22.6752,
90    38.2702,
91    37.4459,
92
93    37.2009, // test 41
94    34.5459,
95    38.5043,
96    50.0000,
97    37.0282,
98
99    55.8886, // test 46
100    17.2535,
101    23.1457,
102    36.9874,
103    37.9336,
104
105    17.1830, // test 51
106    20.7521,
107    29.0141,
108    131.6784,
109    13.6851,
110
111    23.4462, // test 56
112    14.7573,
113    36.5261,
114    5.0000,
115    5.0000,
116
117    24.3482, // test 61
118    10.4611,
119    86.0290,
120    82.0735,
121    18.6459,
122
123    37.4608, // test 66
124    32.4417,
125    11.5449,
126    5.0000,
127    11.4172,
128
129    13.3682, // test 71
130    10.0324,
131    10.0584,
132    10.0170,
133    5.4029,
134
135    10.6349, // test 76
136    21.7728,
137    12.7933,
138    19.4177,
139    34.4192,
140
141    23.9110, // test 81
142    22.8287,
143    41.2399,
144    30.1383,
145    22.0342,
146
147    38.2952, // test 86
148    5.5560,
149    0.5000,
150    1.000,
151    10.000,
152
153    5.000, // test 91
154    1.000, // test 92 (line)
155    10.000, // test 93 Image Blend Many Smooth Down Scaled
156    
157    20.000, // MASK
158    20.000, // MASK 2
159    20.000, // MASK 3
160    20.000, // MASK 4
161
162    20.000, // test 96
163    20.000, // MASK 6
164    20.000, // MASK 7
165    20.000, // MASK 8
166    20.000, // MASK 9
167
168    20.000, // test 101
169    20.000, // MASK 11
170    20.000, // MASK 12
171    20.000, // MASK 13
172    20.000, // MASK 14
173
174    20.000, // test 106 MASK 15
175    1.000,
176    2.000,
177    1.000,
178    2.000,
179
180    1.000, // test 111
181    2.000,
182    1.000,
183    2.000,
184    1.000,
185
186    2.000,   // test 116
187    10.000,
188    10.000,
189
190    0.0, // Exit
191
192    0.0, // no final test - add a 0 at the end anyway to pad
193    0.0,
194    0.0,
195    0.0,
196    0.0,
197    0.0
198 };
199
200 static void
201 _ui_exit(void)
202 {
203    Menu_Item *mi;
204
205    EINA_LIST_FREE(menu, mi)
206      {
207         free(mi->icon);
208         free(mi->text);
209         free(mi);
210      }
211    ecore_main_loop_quit();
212 }
213
214 extern const char *profile;
215 extern int win_w, win_h;
216 extern int loops;
217
218 static int test_item = -1;
219
220 static void
221 _ui_menu_show(Eina_Bool visibility)
222 {
223    eo_do(o_menu_logo, efl_gfx_visible_set(visibility));
224    eo_do(o_menu_title, efl_gfx_visible_set(visibility));
225    eo_do(o_menu_icon, efl_gfx_visible_set(visibility));
226    eo_do(o_menu_icon_sel, efl_gfx_visible_set(visibility));
227    /* FIXME: ask if it's ok o_menu_icon_sel2 == NULL */
228    eo_do(o_menu_icon_sel2, efl_gfx_visible_set(visibility));
229    eo_do(o_menu_text_sel, efl_gfx_visible_set(visibility));
230    eo_do(o_title, efl_gfx_visible_set(visibility));
231    eo_do(o_byline, efl_gfx_visible_set(visibility));
232 }
233
234 static void
235 _ui_select(void)
236 {
237    Eina_List *l;
238    int i;
239    void (*func) (void) = NULL;
240
241    _ui_menu_show(EINA_FALSE);
242    for (i = 0, l = menu; l; l = l->next, i++)
243      {
244         Menu_Item *mi;
245
246         mi = l->data;
247         eo_do(mi->o_icon, efl_gfx_visible_set(EINA_FALSE));
248         if (i == menu_sel)
249           func = mi->func;
250      }
251    eo_do(o_title, efl_gfx_visible_set(EINA_FALSE));
252    eo_do(o_byline, efl_gfx_visible_set(EINA_FALSE));
253
254    menu_active = 0;
255    if (func) func();
256 }
257
258 static Eina_Bool
259 _ui_key(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
260         const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
261 {
262    Evas_Event_Key_Down *ev = event_info;
263
264    if (key_func)
265      {
266         key_func(ev->keyname);
267         return EINA_TRUE;
268      }
269
270    if ((!strcmp(ev->keyname, "Escape")) ||
271        (!strcmp(ev->keyname, "q")) ||
272        (!strcmp(ev->keyname, "Q")))
273      {
274         _ui_exit();
275      }
276    if (menu_active)
277      {
278         if (!strcmp(ev->keyname, "Left")) menu_sel++;
279         if (!strcmp(ev->keyname, "Right")) menu_sel--;
280         if (menu_sel < 0) menu_sel = 0;
281         else if ((unsigned int)menu_sel >= eina_list_count(menu)) menu_sel = eina_list_count(menu) - 1;
282         menu_anim_sel = menu_sel;
283         if (!strcmp(ev->keyname, "Return")) _ui_select();
284      }
285
286    return EINA_TRUE;
287 }
288
289 static Evas_Coord down_x, down_y;
290 static int down_menu_sel = 0;
291
292 static Eina_Bool
293 _ui_mouse_down(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
294                const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
295 {
296    Evas_Event_Mouse_Down *ev = event_info;
297
298    if (ev->button != 1) return EINA_TRUE;
299    if (menu_active)
300      {
301         down_x = ev->canvas.x;
302         down_y = ev->canvas.y;
303         down_menu_sel = menu_sel;
304      }
305
306    return EINA_TRUE;
307 }
308
309 static Eina_Bool
310 _ui_mouse_up(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
311              const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
312 {
313    Evas_Event_Mouse_Up *ev = event_info;
314
315    if (ev->button != 1) return EINA_TRUE;
316    if (menu_active)
317      {
318         Evas_Coord dx, dy;
319
320         dx = ev->canvas.x - down_x;
321         dy = ev->canvas.y - down_y;
322         if ((((dx * dx) + (dy * dy)) < (20 * 20)) &&
323             (menu_sel == down_menu_sel))
324           _ui_select();
325      }
326    else
327      {
328         evas_event_feed_key_down(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
329         evas_event_feed_key_up(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
330      }
331
332    return EINA_TRUE;
333 }
334
335 static Eina_Bool
336 _ui_mouse_move(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
337                const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
338 {
339    Evas_Event_Mouse_Move *ev = event_info;
340
341    if (ev->buttons != 1) return EINA_TRUE;
342    if (menu_active)
343      {
344         menu_sel = down_menu_sel + ((ev->cur.canvas.x - down_x) / 25);
345         /* scroll */
346         if (menu_sel < 0) menu_sel = 0;
347         else if ((unsigned int)menu_sel >= eina_list_count(menu))
348           menu_sel = eina_list_count(menu) - 1;
349         menu_anim_sel = menu_sel;
350      }
351
352    return EINA_TRUE;
353 }
354
355 static void
356 _ui_menu_item_full_add(Eina_Bool test,
357                        char *icon, char *text,
358                        void (*func) (void))
359 {
360    Menu_Item *mi;
361
362    mi = malloc(sizeof(Menu_Item));
363    mi->o_icon = eo_add(EVAS_IMAGE_CLASS, evas);
364    eo_do(mi->o_icon, efl_file_set(build_path(icon), NULL),
365          efl_gfx_size_set(32, 32),
366          efl_gfx_fill_set(0, 0, 32, 32));
367    mi->test = test;
368    mi->icon = strdup(icon);
369    mi->text = strdup(text);
370    mi->func = func;
371    menu = eina_list_append(menu, mi);
372    eo_do(o_menu_icon_sel2, efl_gfx_stack_raise());
373 }
374
375 #define _ui_menu_item_add(Icon, Text, Func) _ui_menu_item_full_add(EINA_TRUE, Icon, Text, Func)
376
377 EO_CALLBACKS_ARRAY_DEFINE(ui_callbacks,
378                           { EVAS_OBJECT_EVENT_KEY_DOWN, _ui_key },
379                           { EVAS_OBJECT_EVENT_MOUSE_DOWN, _ui_mouse_down },
380                           { EVAS_OBJECT_EVENT_MOUSE_UP, _ui_mouse_up },
381                           { EVAS_OBJECT_EVENT_MOUSE_MOVE, _ui_mouse_move });
382
383 void
384 ui_setup(unsigned int ui_w, unsigned int ui_h)
385 {
386    Evas_Object *o;
387    Evas_Coord x, y, w, h;
388
389    win_w = ui_w;
390    win_h = ui_h;
391
392    o = eo_add(EVAS_RECTANGLE_CLASS, evas);
393    eo_do(o, efl_gfx_position_set(0, 0),
394          efl_gfx_size_set(win_w, win_h),
395          efl_gfx_color_set(0, 0, 0, 0),
396          efl_gfx_stack_layer_set(1000),
397          evas_obj_focus_set(1),
398          efl_gfx_visible_set(EINA_TRUE),
399          eo_event_callback_array_add(ui_callbacks(), NULL));
400    o_bg = o;
401
402    o = eo_add(EVAS_RECTANGLE_CLASS, evas);
403    eo_do(o, efl_gfx_position_set(0, 0),
404          efl_gfx_size_set(win_w, win_h),
405          efl_gfx_color_set(255, 255, 255, 255),
406          efl_gfx_stack_layer_set(-99),
407          efl_gfx_visible_set(EINA_TRUE));
408    o_wallpaper = o;
409
410    o = eo_add(EVAS_TEXT_CLASS, evas);
411    eo_do(o, efl_text_properties_font_set("Vera-Bold", 10),
412          efl_text_set("EXPEDITE"),
413          efl_gfx_stack_layer_set(100),
414          efl_gfx_color_set(0, 0, 0, 100),
415          evas_obj_pass_events_set(1),
416          efl_gfx_size_get(&w, &h));
417    x = (win_w - w) / 2;
418    y = 0;
419    eo_do(o, efl_gfx_position_set(x, y),
420          efl_gfx_visible_set(EINA_TRUE));
421    o_title = o;
422
423    o = eo_add(EVAS_TEXT_CLASS, evas);
424    eo_do(o, efl_text_properties_font_set("Vera", 9),
425          efl_text_set("LEFT/RIGHT - select, ENTER - select, ESCAPE - exit."),
426          efl_gfx_stack_layer_set(100),
427          efl_gfx_color_set(0, 0, 0, 60),
428          evas_obj_pass_events_set(1),
429          efl_gfx_size_get(&w, NULL));
430    x = (win_w - w) / 2;
431    y = h + 2;
432    eo_do(o, efl_gfx_position_set(x, y),
433          efl_gfx_visible_set(EINA_TRUE));
434    o_byline = o;
435
436    o = eo_add(EVAS_IMAGE_CLASS, evas);
437    eo_do(o, efl_gfx_position_set((win_w - 120) / 2, ((win_h - 160) / 2)),
438          efl_file_set(build_path("e-logo.png"), NULL),
439          efl_gfx_fill_set(0, 0, 120, 160),
440          efl_gfx_size_set(120, 160),
441          efl_gfx_stack_layer_set(-98),
442          efl_gfx_color_set(255, 255, 255, 255),
443          efl_gfx_visible_set(EINA_TRUE));
444    o_menu_logo = o;
445
446    o = eo_add(EVAS_IMAGE_CLASS, evas);
447    eo_do(o, efl_gfx_position_set(win_w - 128, - 128),
448          efl_gfx_fill_set(0, 0, 256, 256),
449          efl_gfx_size_set(256, 256),
450          efl_gfx_visible_set(EINA_TRUE));
451    o_menu_icon = o;
452
453    o = eo_add(EVAS_IMAGE_CLASS, evas);
454    eo_do(o, efl_gfx_position_set(0, 0),
455          efl_file_set(build_path("icon_sel.png"), NULL),
456          efl_gfx_size_set(48, 48),
457          efl_gfx_fill_set(0, 0, 48, 48));
458    o_menu_icon_sel = o;
459
460    o = eo_add(EVAS_IMAGE_CLASS, evas);
461    eo_do(o, efl_gfx_position_set(0, 0),
462          efl_file_set(build_path("text_sel.png"), NULL),
463          efl_gfx_size_set(96, 32),
464          efl_gfx_fill_set(0, 0, 96, 32),
465          evas_obj_image_border_set(7, 7, 7, 7));
466    o_menu_text_sel = o;
467
468    o = eo_add(EVAS_TEXT_CLASS, evas);
469    eo_do(o, efl_text_properties_font_set("Vera", 10),
470          efl_text_set(""),
471          efl_gfx_color_set(0, 0, 0, 100),
472          evas_obj_pass_events_set(1),
473          efl_gfx_size_get(&w, &h));
474    x = (win_w - w) / 2;
475    y = (win_h - h) / 2;
476    eo_do(o, efl_gfx_position_set(x, y));
477    o_menu_title = o;
478
479    _ui_menu_item_full_add(EINA_FALSE, "e.png", "About", about_start);
480    _ui_menu_item_full_add(EINA_FALSE, "e.png", "All Tests", ui_all);
481 #define UI
482 #include "tests.h"
483 #undef UI
484    _ui_menu_item_full_add(EINA_FALSE, "exit.png", "Exit", _ui_exit);
485
486 #ifdef HAVE_SYNC
487    /* make sure disk io isn't going to turn up unexpectedly */
488    sync();
489    sync();
490    sync();
491 #endif
492    
493    printf("\n#####Test Start#####\n"
494           "profile: %s\n"
495           "window size: %i, %i\n"
496           "loop count: %i\n"
497           "engine: %s\n",
498           profile,
499           win_w, win_h,
500           loops,
501           choosen_engine);
502
503    menu_active = 1;
504 }
505
506 void
507 ui_num(int n)
508 {
509    Menu_Item *mi;
510
511    mi = eina_list_nth(menu, n);
512    if (mi)
513      {
514         if (!mi->test)
515           return;
516         menu_sel = n;
517         if (one_test) test_item = menu_sel;
518         _ui_select();
519      }
520 }
521
522 Eina_Bool
523 ui_loop(void *data EINA_UNUSED)
524 {
525    static int first = 1;
526    static double pt = 0.0;
527    double t, t2;
528
529    eo_do(o_bg, efl_gfx_size_set(win_w, win_h));
530    eo_do(o_wallpaper, efl_gfx_size_set(win_w, win_h));
531
532    if (loop_func)
533      {
534         t = get_time();
535         f_loop++;
536         f_start++;
537         if ((t - t_loop) >= 1.0)
538           {
539              //      ui_fps((double)f_loop / (t - t_loop));
540              t_loop = t;
541              f_loop = 0;
542           }
543         loop_func(t - t_start, f_start);
544         return EINA_TRUE;
545      }
546
547    t2 = get_time();
548    if (first)
549      {
550         t = 0.1;
551         pt = t2;
552      }
553    else
554      {
555         t = t2 - pt;
556         pt = t2;
557      }
558    first = 0;
559
560    /* menu layout */
561    if (menu_active)
562      {
563         Eina_List *l;
564         Menu_Item *mi;
565         int i = 0;
566         static double tr = 0.0;
567         double tt;
568
569         tt = t;
570         tt += tr;
571         while (tt > 0.001)
572           {
573              menu_anim = (menu_anim * 0.995) + (menu_anim_sel * 0.005);
574              tt -= 0.001;
575           }
576         tr = tt;
577         EINA_LIST_FOREACH(menu, l, mi)
578           {
579              char buf[4096];
580              Evas_Coord x, y, w, h, tw, th;
581              Evas_Coord len;
582              double a;
583              Evas_Object *o;
584
585              o = mi->o_icon;
586              eo_do(o_menu_logo, efl_gfx_size_get(&w, &h));
587              len = ((w * 3) + 10) / 4;
588              eo_do(o, efl_gfx_size_get(&w, &h));
589              x = (win_w / 2)
590                 + (sin((menu_anim - (double)i) * 0.33) * len)
591                 - (w / 2);
592              y = (win_h / 2)
593                 + (cos((menu_anim - (double)i) * 0.33) * len)
594                 - (h / 2);
595              eo_do(o, efl_gfx_position_set(x, y));
596              a = menu_anim - (double)i;
597              if (a < 0) a = -a;
598              a = 255 - (30 * a);
599              eo_do(o, efl_gfx_color_set(a, a, a, a),
600                    efl_gfx_visible_set(EINA_TRUE));
601
602              if (i == menu_sel)
603                {
604                   a = menu_anim - (double)i;
605                   if (a < 0) a = -a;
606                   a = 255 - (255 * a);
607
608                   o = o_menu_icon_sel;
609                   eo_do(o, efl_gfx_position_set(x - ((48 - w) / 2), y - ((48 - h) / 2)),
610                         efl_gfx_color_set(a, a, a, a));
611
612                   o = o_menu_title;
613                   eo_do(o, efl_gfx_color_set(a, a, a, a),
614                         efl_text_set(mi->text),
615                         efl_gfx_size_get(&tw, &th));
616                   x = (win_w - tw) / 2;
617                   y = (win_h / 2) + len + 48;
618                   eo_do(o, efl_gfx_position_set(x, y));
619
620                   o = o_menu_text_sel;
621                   w = tw + 24;
622                   h = 28;
623                   x = x - 12;
624                   y = y + ((th - h) / 2);
625                   eo_do(o, efl_gfx_position_set(x, y),
626                         efl_gfx_size_set(w, h),
627                         efl_gfx_fill_set(0, 0, w, h),
628                         efl_gfx_color_set(a, a, a, a));
629
630                   o = o_menu_icon;
631                   snprintf(buf, 4096, "%s%s", data_dir, mi->icon);
632                   eo_do(o, efl_file_set(buf, NULL),
633                         efl_gfx_color_set(a / 2, a / 2, a / 2, a / 2));
634                }
635              i++;
636           }
637         eo_do(o_menu_logo, efl_gfx_position_set((win_w - 120) / 2, ((win_h - 160) / 2)),
638               efl_gfx_visible_set(EINA_TRUE));
639         _ui_menu_show(EINA_TRUE);
640      }
641    else
642      {
643      }
644
645    return EINA_TRUE;
646 }
647
648 void
649 ui_menu(void)
650 {
651    eo_do(o_title, efl_gfx_visible_set(EINA_TRUE));
652    eo_do(o_byline, efl_gfx_visible_set(EINA_TRUE),
653          efl_text_set
654          ("LEFT/RIGHT - select, ENTER - select, ESCAPE - exit."));
655    menu_active = 1;
656    key_func = NULL;
657    loop_func = NULL;
658
659    ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_TIMER);
660 }
661
662 void
663 ui_func_set(void (*kfunc) (char *key), void (*lfunc) (double t, int f))
664 {
665    key_func = kfunc;
666    loop_func = lfunc;
667    t_loop = t_start = get_time();
668    f_loop = f_start = 0;
669    ui_fps(0.0);
670
671    ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_CUSTOM);
672    ecore_animator_custom_tick();
673
674 }
675
676 void
677 ui_all(void)
678 {
679    Eina_List *l;
680    Menu_Item *mi;
681    int i = 0;
682    double t, t0;
683
684    _ui_menu_show(EINA_FALSE);
685
686    /* warm up the cpu with some spinning */
687    t0 = time(NULL);
688    for (;;)
689      {
690         t = time(NULL);
691         if (t - t0 > 2) break;
692      }
693
694    p_fps = 0;
695    wfps = 0;
696
697    EINA_LIST_FOREACH(menu, l, mi)
698      {
699         i++;
700
701         if (!mi->test)
702           continue;
703
704         menu_sel = i - 1;
705         test_item = menu_sel;
706         _ui_select();
707         break;
708      }
709 }
710
711 void
712 ui_fps(double fps)
713 {
714    p_fps += fps;
715    if (fps > 0.0 && test_item > 0)
716      {
717         Menu_Item *mi;
718
719         key_func("Escape");
720
721         /* This does not give time to delete the objects of the previous test
722            and make the result of next test less accurate. Benefit we do not
723            loose track of any of the cost anymore (Would be better to force
724            an empty render and account that to the previous test). */
725
726         wfps += (fps * weights[test_item]);
727
728         test_item++;
729         mi = eina_list_nth(menu, test_item);
730         if (one_test || !mi->test)
731           {
732              char datestr[1024];
733              struct tm *tim;
734              time_t now;
735              double avgw = 0.0;
736              unsigned int i;
737              unsigned int t_count;
738
739              t_count = EINA_C_ARRAY_LENGTH(weights) - 3;
740              for (i = 2; i < EINA_C_ARRAY_LENGTH(weights) - 1; i++)
741                avgw += weights[i];
742              avgw /= t_count;
743
744              now = time(NULL);
745              tim = localtime(&now);
746              if (tim) strftime(datestr, sizeof(datestr), "%Y-%m-%d %H:%M:%S", tim);
747              else snprintf(datestr, sizeof(datestr), "unknown");
748
749              if (cmp_report)
750                printf("%5.2f , EVAS SPEED (WEIGHTED), "
751                       "tn, %i , "
752                       "t, %s , "
753                       "ev , %i.%i.%i.%i , "
754                       "p , %s , "
755                       "sz , %i , %i , "
756                       "c , %i , "
757                       "e , %s , "
758                       "fs , %i\n",
759                       wfps / (t_count * avgw),
760                       // fps / t_count,
761                       t_count,
762                       datestr,
763                       evas_version->major,
764                       evas_version->minor,
765                       evas_version->micro,
766                       evas_version->revision,
767                       profile,
768                       win_w, win_h,
769                       loops,
770                       choosen_engine,
771                       fullscreen);
772              else
773                printf("\n#####Test Result#####\n"
774                       "evas fps speed: %5.2f\n"
775                       "evas fps speed(weighted): %5.2f\n"
776                       "testcase count: %i\n"
777                       "date: %s\n"
778                       "evas version: %i.%i.%i.%i\n"
779                       "profile: %s\n"
780                       "window size: %i, %i\n"
781                       "loop count: %i\n"
782                       "engine: %s\n"
783                       "full screen: %i\n",
784                       (p_fps / t_count),
785                       (wfps / avgw) / t_count,
786                       t_count,
787                       datestr,
788                       evas_version->major, evas_version->minor, evas_version->micro,
789                       evas_version->revision,
790                       profile,
791                       win_w, win_h,
792                       loops,
793                       choosen_engine,
794                       fullscreen);
795
796              ecore_main_loop_quit();
797           }
798         else
799           {
800              menu_sel = test_item;
801              _ui_select();
802           }
803      }
804 }