diff options
authorTom Hacohen <>2010-11-25 16:40:39 +0000
committerTom Hacohen <>2010-11-25 16:40:39 +0000
commit0a90736d7110bef6c866dbd1d64eb370c7a8f553 (patch)
parentba990a568177f39d423a9d7bca571a3d0a931baa (diff)
Expedite: Added a new test for textblock text appending.
SVN revision: 54990
5 files changed, 180 insertions, 3 deletions
diff --git a/src/bin/ b/src/bin/
index ec1299c..3814735 100644
--- a/src/bin/
+++ b/src/bin/
@@ -90,6 +90,7 @@ text_change.c \
90textblock_basic.c \ 90textblock_basic.c \
91textblock_intl.c \ 91textblock_intl.c \
92textblock_auto_align.c \ 92textblock_auto_align.c \
93textblock_text_append.c \
93rect_blend.c \ 94rect_blend.c \
94rect_blend_pow2.c \ 95rect_blend_pow2.c \
95rect_solid.c \ 96rect_solid.c \
diff --git a/src/bin/main.c b/src/bin/main.c
index 2707479..8e406ae 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -1360,8 +1360,6 @@ _engine_args(int argc, char **argv)
1360int 1360int
1361main(int argc, char **argv) 1361main(int argc, char **argv)
1362{ 1362{
1363 int i;
1365#if defined (HAVE_EVAS_SOFTWARE_XLIB) || defined (HAVE_EVAS_XRENDER_X11) ||defined (HAVE_EVAS_OPENGL_X11) || defined (HAVE_EVAS_SOFTWARE_16_X11) 1363#if defined (HAVE_EVAS_SOFTWARE_XLIB) || defined (HAVE_EVAS_XRENDER_X11) ||defined (HAVE_EVAS_OPENGL_X11) || defined (HAVE_EVAS_SOFTWARE_16_X11)
1366 XInitThreads(); 1364 XInitThreads();
1367#endif 1365#endif
diff --git a/src/bin/tests.h b/src/bin/tests.h
index 79ca9db..9182130 100644
--- a/src/bin/tests.h
+++ b/src/bin/tests.h
@@ -66,6 +66,7 @@
66#include "textblock_basic.c" 66#include "textblock_basic.c"
67#include "textblock_intl.c" 67#include "textblock_intl.c"
68#include "textblock_auto_align.c" 68#include "textblock_auto_align.c"
69#include "textblock_text_append.c"
69#include "rect_blend.c" 70#include "rect_blend.c"
70#include "rect_blend_pow2.c" 71#include "rect_blend_pow2.c"
71#include "rect_solid.c" 72#include "rect_solid.c"
diff --git a/src/bin/textblock_text_append.c b/src/bin/textblock_text_append.c
new file mode 100644
index 0000000..61417f4
--- /dev/null
+++ b/src/bin/textblock_text_append.c
@@ -0,0 +1,178 @@
1#undef FNAME
2#undef NAME
3#undef ICON
5/* metadata */
6#define FNAME textblock_text_append_start
7#define NAME "Textblock text_append"
8#define ICON "text.png"
10#ifndef PROTO
11# ifndef UI
12# include "main.h"
14/* standard var */
15static int done = 0;
17/* private data */
18static Evas_Object *o_text;
20/* setup */
21static void _setup(void)
23 Evas_Object *o;
24 Evas_Textblock_Style *st;
26 o = evas_object_textblock_add(evas);
27 o_text = o;
28 st = evas_textblock_style_new();
29 evas_textblock_style_set
30 (st,
31 "DEFAULT='font=Sans font_size=10 color=#000000 wrap=word'"
32 "br='\n'"
33 "ps='ps'"
34 );
35 evas_object_textblock_style_set(o, st);
36 evas_textblock_style_free(st);
37 evas_object_textblock_clear(o);
39 evas_object_textblock_text_markup_set
40 (o,
41 "This test just appends and removes text from different paragraphs, it's "
42 "not a very visual test, it's included for benchmarking purposes."
44"Enlightenment is the flagship and original name bearer for this project. Once it was just a humble window manager for X11 that wanted to do things differently. To do them better, but it has expanded. This can be confusing so when we refer to Enlightenment, we may mean the project as a whole or just the window manager proper. The libraries behind Enlightenment are referred to as EFL collectively, each with a specific name and purpose."
46"The window manager is a lean, fast, modular and very extensible window manager for X11 and Linux. It is classed as a \"desktop shell\" providing the things you need to operate your desktop (or laptop), but is not a whole application suite. This covered launching applications, managing their windows and doing other system tasks like suspending, reboots, managing files etc.<br>"
47"Platform Support<br>"
48"Linux BSD Windows Apple"
50"Enlightenment and EFL support several platforms, though Linux is the primary platform of choice for our developers, some make efforts to make things work on FreeBSD and other BSD's, Solaris, MacOS X, Windows (XP, Vista, 7 etc.), Windows CE and more. Compatibility will vary, but most of core EFL support all Linuxes, BSD's, Solaris and other UNIX-like OS's. Mac support should work mostly thanks to the X11 support in OS X, and Windows support exists for most of the core libraries (XP, Vista, 7, CE)."
52"Please contact us for more information if you have problems with support in your platform. Just remember we have limited resources and most of them focus on the core open-source targets.<br>"
53"Proven effectiveness"
55"Enlightenment libraries already power millions of systems, from mobile phones to set top boxes, desktops, laptops, game systems and more. It is only now being recognized for its forward-thinking approaches, as products and designers want to do more than the boring functional user experiences of the past. This is where EFL excels."
57" is shipping millions of set top boxes in France, powered by EFL. The Openmoko Freerunner sold thousands of devices with EFL on them. Yellow Dog Linux for the Sony PS3 ships with Enlightenment as the default. EFL has been used on printers, netbooks and more."
59"Building Blocks"
61"Enlightenment, the window manager is built on top of building blocks known as EFL (the Enlightenment Foundation Libraries). There are more than can be sensibly put into the simple block diagram above, but this covers the essentials.<br>"
62"Simple E stack"
64"Pretty much any application written using Core EFL libraries will use one or more of these depending on its needs. It may only need the lower level ones or use all of them to the top of the stack. Each library fulfills a purpose, so it may be skipped if not needed.<br>"
65"Core<ps>Core EFL components are:<ps> * Evas<br>"
66" * Eina<br>"
67" * Edje<br>"
68" * Eet<br>"
69" * Ecore<br>"
70" * Efreet<br>"
71" * E_Dbus<br>"
72" * Embryo<br>"
73" * Eeze<br>"
74" * Elementary (window manager will use this in 0.18)<ps>Binding support exists for several languages such as:<ps> * Python<br>"
75" * Javascript<br>"
76" * Perl<br>"
77" * C++<br>"
78" * Ruby<ps>There are other libraries and applications which build on core EFL and function on other systems too, providing more functionality, examples, and utility:<ps> * Emotion<br>"
79" * Ethumb<br>"
80" * Exquisite<br>"
81" * Eve<br>"
82" * Edje Editor<br>"
83" * E UPnP<br>"
84" * Enesim<br>"
85" * Expedite<br>"
86" * Epdf<br>"
87" * Exchange<br>"
88" * Eweather<br>"
89" * Rage<br>"
90" * Evil<br>"
91" * Exalt<ps> <br>"
93"Laptop<ps>Enlightenment and EFL use desktop Linux systems as a primary method of development because it is fast and simple to do so, but all of it is written with the express goal in mind of also working on devices from Mobile Phones, to Televisions, Netbooks and more.<br>"
94"Phone<ps>We have run and tested on x86-32, x86-64, Atom, Power-PC, ARM (ARM9, ARM11, Cortex-A8 and more), MIPS, Sparc, and many other architectures. The suggested minimum RAM required for a full Linux system + EFL application is 16MB, but you may be able to get by on 8MB. For full functionality 64MB or more is suggested. As little as a 200Mhz ARM core will provide sufficient processing power (depending on needs).<br>"
95"Various Processors<ps>Screens from even less than QVGA (320x240 or 240x320) screens all the way up to and beyond full-HD (1920x1080) are covered by EFL. It has the ability to scale user interfaces to almost any sane resolution, as well as adapt to differing input device resolutions, from mouse and stylus to fat fingers. It can draw displays from e-paper through 8-bit paletted displays, 16bit beautifully dithered ones all the way to full 24/32bit OLED beauties.<br>"
98"Enlightenment is built by designers and programmers who want others to be able to do more with less. Some of Enlightenment's libraries do not do anything with graphics at all, but it is the ones that do that are the shining stars of the Enlightenment world.<ps>Evas is the canvas layer. It is not a drawing library. It is not like OpenGL, Cairo, XRender, GDI, DirectFB etc. It is a scene graph library that retains state of all objects in it. They are created then manipulated until they are no longer needed, at which point they are deleted. This allows the programmer to work in terms that a designer thinks of. It is direct mapping, as opposed to having to convert the concepts into drawing commands in the right order, calculate minimum drawing calls needed to get the job done etc.<ps>Evas also handles abstracting the rendering mechanism. With zero changes the same application can move from software to OpenGL rendering, as they all use an abstracted scene graph to describe the world (canvas) to Evas. Evas supports multiple targets, but the most useful are the high-speed software rendering engines and OpenGL (as well as OpenGL-ES 2.0).<ps>Evas not only does quality rendering and compositing, but also can scale, rotate and fully 3D transform objects, allowing for sought-after 3D effects in your interfaces. It supplies these abilities in both software and OpenGL rendering, so you are never caught with unexpected loss of features. The software rendering is even fast enough to provide the 3D without any acceleration on devices for simple uses.<ps>Edje is a meta-object design library that is somewhere between Flash, PSD, SVG and HTML+CSS. It separates design out from code and into a dynamically loaded data file. This file is compressed and loaded very quickly, along with being cached and shared betweeen instances.<ps>This allows design to be provided at runtime by different design (EDJ) files, leaving the programmer to worry about overall application implementation and coarse grained UI as opposed to needing to worry about all the little details that the artists may vary even until the day before shipping the product.<br>"
99 );
100 evas_object_move(o_text, 0, 0);
101 evas_object_resize(o_text, win_w, win_h);
103 evas_object_show(o);
105 done = 0;
108/* cleanup */
109static void _cleanup(void)
111 evas_object_del(o_text);
114/* loop - do things */
115static void _loop(double t, int f)
117 Evas_Textblock_Cursor *cur;
118 static Evas_Textblock_Cursor *cur2;
119 cur = (Evas_Textblock_Cursor *) evas_object_textblock_cursor_get(o_text);
120 evas_textblock_cursor_text_append(cur, "*");
121 evas_textblock_cursor_char_delete(cur);
123 evas_textblock_cursor_paragraph_char_first(cur);
124 if (!cur2)
125 {
126 cur2 = evas_object_textblock_cursor_new(o_text);
127 evas_textblock_cursor_paragraph_last(cur2);
128 evas_textblock_cursor_paragraph_char_first(cur2);
129 }
130 if (!evas_textblock_cursor_compare(cur, cur2))
131 evas_textblock_cursor_paragraph_first(cur);
132 else
133 evas_textblock_cursor_paragraph_next(cur);
138/* prepend special key handlers if interactive (before STD) */
139static void _key(char *key)
141 KEY_STD;
155/* template stuff - ignore */
156# endif
159#ifdef UI
160_ui_menu_item_add(ICON, NAME, FNAME);
163#ifdef PROTO
164void FNAME(void);
167#ifndef PROTO
168# ifndef UI
169void FNAME(void)
171 ui_func_set(_key, _loop);
172 _setup();
174# endif
176#undef FNAME
177#undef NAME
178#undef ICON
diff --git a/src/bin/ui.c b/src/bin/ui.c
index 13c2eb5..14b4c25 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -253,7 +253,6 @@ _ui_all(void)
253static void 253static void
254_ui_num(int n) 254_ui_num(int n)
255{ 255{
256 Eina_List *l;
257 double fps = 0.0; 256 double fps = 0.0;
258 double wfps = 0.0; 257 double wfps = 0.0;
259 int t_count = 0; 258 int t_count = 0;