e61311e4ff7238d7bb4ec96dedebbbc180d38df1
[platform/upstream/expedite.git] / src / bin / about.c
1 #include "main.h"
2
3 static Evas_Object *o_text = NULL;
4
5 static void
6 _setup(void)
7 {
8    Evas_Object *o;
9
10    o = efl_add(EFL_CANVAS_TEXTBLOCK_CLASS, evas);
11    efl_gfx_entity_position_set(o, EINA_POSITION2D(10, 40));
12    efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w - 20, win_h - 50));
13    efl_gfx_entity_visible_set(o, EINA_TRUE);
14
15    efl_text_font_family_set(o, "Vera");
16    efl_text_font_size_set(o, 10);
17    efl_text_color_set(o, 0, 0, 0, 255);
18    efl_text_multiline_set(o, EINA_TRUE);
19    efl_text_horizontal_align_set(o, 0.5);
20    efl_text_wrap_set(o, EFL_TEXT_FORMAT_WRAP_WORD);
21
22    efl_text_markup_set
23      (o,
24       "Enlightenment used to be a window manager project, but "
25       "since has changed a lot to become a miniature desktop and mobile "
26       "device environment all of its own. It is now made up of many "
27       "components (libraries and applications) that have specific uses. "
28       "It is very large, and so requires more testing and demonstration."
29       "</center>"
30       "</br>"
31       "<center>"
32       "Expedite is a full test suite for Evas, which is one of the "
33       "core components of the Enlightenment Foundation Libraries. Evas "
34       "handles the realtime display canvas used by EFL applications to "
35       "render to many targets, including framebuffer, X11, OpenGL, memory, "
36       "DirectFB and other targets to boot. It handles high level graphic "
37       "layout descriptions that applications set up, dealing with the hard "
38       "work of doing the drawing for them.");
39
40    o_text = o;
41    ui_fps(0.0);
42 }
43
44 static void
45 _cleanup(void)
46 {
47    efl_del(o_text);
48    o_text = NULL;
49 }
50
51 static void
52 _loop(double t EINA_UNUSED,
53       int f EINA_UNUSED)
54 {
55 }
56
57 static void
58 _key(const char *key)
59 {
60    if ((!strcmp(key, "Escape")) || (!strcmp(key, "q")) || (!strcmp(key, "Q")))
61      {
62         _cleanup();
63         ui_menu();
64      }
65 }
66
67 void
68 about_start(void)
69 {
70    _setup();
71    ui_func_set(_key, _loop);
72 }