summaryrefslogtreecommitdiff
path: root/src/examples/edje
diff options
context:
space:
mode:
authorkatpavalli <katpaga.a@samsung.com>2015-06-01 17:38:04 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-06-01 17:50:02 +0200
commitff1184df2eecdc2f1e1fe9b9711fa1423debbd5f (patch)
treefb0ca8a7f0f2efd2cc5f040b4181816cda02f6a1 /src/examples/edje
parentcae31f824a8508c4ff44b921c326aead5891f6cf (diff)
edje: add ability to change the language on one specific edje object.
Summary: Add a new property to edje_object.eo for setting the language on one Edje_Object. Test Plan: Test Code to test this implementation is done as part of efl/src/examples/edje/edje-text.c and efl/src/examples/edje/text.edc edje_cc -md <dir path>/efl/src/examples/edje/ text.edc && gcc -o edje-text edje-text.c `pkg-config --libs --cflags ecore-evas edje evas ecore eo` ./edje-text 1) Click On the text "Click here" The language gets changed as per the specific edje object. 2) Click on the text object at bottom. "Click here" The system language gets changed and the below two edje objects language are changed globally. Reviewers: cedric, shilpasingh Subscribers: poornima.srinivasan, govi, rajeshps, cedric Differential Revision: https://phab.enlightenment.org/D2559 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/examples/edje')
-rw-r--r--src/examples/edje/edje-text.c77
-rw-r--r--src/examples/edje/en_IN/domain_name.mobin75 -> 201 bytes
-rw-r--r--src/examples/edje/hi_IN/domain_name.mobin101 -> 260 bytes
-rw-r--r--src/examples/edje/ta_IN/domain_name.mobin86 -> 281 bytes
-rw-r--r--src/examples/edje/text.edc419
5 files changed, 463 insertions, 33 deletions
diff --git a/src/examples/edje/edje-text.c b/src/examples/edje/edje-text.c
index 39ab128655..7fc830c428 100644
--- a/src/examples/edje/edje-text.c
+++ b/src/examples/edje/edje-text.c
@@ -5,7 +5,7 @@
5 * buffer one). See stdout/stderr for output. 5 * buffer one). See stdout/stderr for output.
6 * 6 *
7 * @verbatim 7 * @verbatim
8 * edje_cc -md ~/efl/src/examples/edje/ text.edc && gcc -o edje-text edje-text.c `pkg-config --libs --cflags ecore-evas edje evas ecore` 8 * edje_cc -md . text.edc && gcc -o edje-text edje-text.c `pkg-config --libs --cflags ecore-evas edje evas ecore eo`
9 * @endverbatim 9 * @endverbatim
10 */ 10 */
11 11
@@ -23,9 +23,10 @@
23#include <Ecore_Evas.h> 23#include <Ecore_Evas.h>
24#include <Edje.h> 24#include <Edje.h>
25#include <locale.h> 25#include <locale.h>
26#include "Eo.h"
26 27
27#define WIDTH (300) 28#define WIDTH (500)
28#define HEIGHT (300) 29#define HEIGHT (500)
29 30
30static int lang_idx = 0; 31static int lang_idx = 0;
31static const char *lang[] = { 32static const char *lang[] = {
@@ -49,6 +50,18 @@ _on_text_change(void *data EINA_UNUSED, Evas_Object *obj, const char *part)
49static void 50static void
50_on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED) 51_on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED)
51{ 52{
53 char *env;
54 lang_idx = (lang_idx + 1) % (sizeof (lang) / sizeof (lang[0]));
55 fprintf(stderr, "Setting lang of this edje object to '%s'\n", lang[lang_idx]);
56 env = getenv("LANGUAGE");
57 setenv("LANGUAGE", lang[lang_idx], 1);
58 eo_do(o, edje_obj_language_set(lang[lang_idx]));
59 setenv("LANGUAGE", env, 1);
60}
61
62static void
63_on_mouse_down_text(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *event_info EINA_UNUSED)
64{
52 lang_idx = (lang_idx + 1) % (sizeof (lang)/ sizeof (lang[0])); 65 lang_idx = (lang_idx + 1) % (sizeof (lang)/ sizeof (lang[0]));
53 fprintf(stderr, "Setting lang to '%s'\n", lang[lang_idx]); 66 fprintf(stderr, "Setting lang to '%s'\n", lang[lang_idx]);
54 setenv("LANGUAGE", lang[lang_idx], 1); 67 setenv("LANGUAGE", lang[lang_idx], 1);
@@ -62,6 +75,9 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
62 Evas *evas; 75 Evas *evas;
63 Evas_Object *bg; 76 Evas_Object *bg;
64 Evas_Object *edje_obj; 77 Evas_Object *edje_obj;
78 Evas_Object *edje_obj_one;
79 Evas_Object *edje_obj_two;
80 Evas_Object *edje_obj_three;
65 81
66 if (!ecore_evas_init()) 82 if (!ecore_evas_init())
67 return EXIT_FAILURE; 83 return EXIT_FAILURE;
@@ -87,23 +103,66 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
87 ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE); 103 ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
88 104
89 edje_obj = edje_object_add(evas); 105 edje_obj = edje_object_add(evas);
90
91 edje_object_file_set(edje_obj, edje_file, "example_group"); 106 edje_object_file_set(edje_obj, edje_file, "example_group");
92 evas_object_move(edje_obj, 20, 20); 107 evas_object_move(edje_obj, 0, 20);
93 evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40); 108 evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40);
94 evas_object_show(edje_obj); 109 evas_object_show(edje_obj);
95 110 setenv("LANGUAGE", "en_IN", 1);
96 edje_language_set("en_IN"); 111 eo_do(edje_obj, edje_obj_language_set("en_IN"));
97 edje_object_text_change_cb_set(edje_obj, _on_text_change, NULL); 112 edje_object_text_change_cb_set(edje_obj, _on_text_change, NULL);
98 edje_object_part_text_set(edje_obj, "part_two", "<b>Click here"); 113 edje_object_part_text_set(edje_obj, "part_two", "<b>Click here");
99
100 edje_object_part_text_select_allow_set(edje_obj, "part_two", EINA_TRUE); 114 edje_object_part_text_select_allow_set(edje_obj, "part_two", EINA_TRUE);
101 edje_object_part_text_select_all(edje_obj, "part_two"); 115 edje_object_part_text_select_all(edje_obj, "part_two");
102 printf("selection: %s\n", edje_object_part_text_selection_get(edje_obj, "part_two")); 116 printf("selection: %s\n", edje_object_part_text_selection_get(edje_obj, "part_two"));
103 edje_object_part_text_select_none(edje_obj, "part_two"); 117 edje_object_part_text_select_none(edje_obj, "part_two");
104 printf("selection: %s\n", edje_object_part_text_selection_get(edje_obj, "part_two")); 118 printf("selection: %s\n", edje_object_part_text_selection_get(edje_obj, "part_two"));
105
106 evas_object_event_callback_add(edje_obj, EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down, NULL); 119 evas_object_event_callback_add(edje_obj, EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down, NULL);
120
121 edje_obj_one = edje_object_add(evas);
122 edje_object_file_set(edje_obj_one, edje_file, "example_group1");
123 evas_object_move(edje_obj_one, 0, 50);
124 evas_object_resize(edje_obj_one, WIDTH - 40, HEIGHT - 40);
125 evas_object_show(edje_obj_one);
126 eo_do(edje_obj_one, edje_obj_language_set("en_IN"));
127 edje_object_text_change_cb_set(edje_obj_one, _on_text_change, NULL);
128 edje_object_part_text_set(edje_obj_one, "part_two", "<b>Click here");
129 edje_object_part_text_select_allow_set(edje_obj_one, "part_two", EINA_TRUE);
130 edje_object_part_text_select_all(edje_obj_one, "part_two");
131 printf("selection: %s\n", edje_object_part_text_selection_get(edje_obj_one, "part_two"));
132 edje_object_part_text_select_none(edje_obj_one, "part_two");
133 printf("selection: %s\n", edje_object_part_text_selection_get(edje_obj_one, "part_two"));
134 evas_object_event_callback_add(edje_obj_one, EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down, NULL);
135
136 //Generic Language change
137 edje_obj_two = edje_object_add(evas);
138 edje_object_file_set(edje_obj_two, edje_file, "example_group2");
139 evas_object_move(edje_obj_two, 0, 250);
140 evas_object_resize(edje_obj_two, WIDTH - 40, HEIGHT - 40);
141 evas_object_show(edje_obj_two);
142 edje_language_set("en_IN");
143 edje_object_text_change_cb_set(edje_obj_two, _on_text_change, NULL);
144 edje_object_part_text_set(edje_obj_two, "part_two", "<b>Click here");
145 edje_object_part_text_select_allow_set(edje_obj_two, "part_two", EINA_TRUE);
146 edje_object_part_text_select_all(edje_obj_two, "part_two");
147 printf("selection: %s\n", edje_object_part_text_selection_get(edje_obj_two, "part_two"));
148 edje_object_part_text_select_none(edje_obj_two, "part_two");
149 printf("selection: %s\n", edje_object_part_text_selection_get(edje_obj_two, "part_two"));
150 evas_object_event_callback_add(edje_obj_two, EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down_text, NULL);
151
152 edje_obj_three = edje_object_add(evas);
153 edje_object_file_set(edje_obj_three, edje_file, "example_group3");
154 evas_object_move(edje_obj_three, 0, 350);
155 evas_object_resize(edje_obj_three, WIDTH - 40, HEIGHT - 40);
156 evas_object_show(edje_obj_three);
157 edje_object_text_change_cb_set(edje_obj_three, _on_text_change, NULL);
158 edje_object_part_text_set(edje_obj_three, "part_two", "<b>Click here");
159 edje_object_part_text_select_allow_set(edje_obj_three, "part_two", EINA_TRUE);
160 edje_object_part_text_select_all(edje_obj_three, "part_two");
161 printf("selection: %s\n", edje_object_part_text_selection_get(edje_obj_three, "part_two"));
162 edje_object_part_text_select_none(edje_obj_three, "part_two");
163 printf("selection: %s\n", edje_object_part_text_selection_get(edje_obj_three, "part_two"));
164 evas_object_event_callback_add(edje_obj_three, EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down_text, NULL);
165
107 ecore_evas_show(ee); 166 ecore_evas_show(ee);
108 167
109 ecore_main_loop_begin(); 168 ecore_main_loop_begin();
diff --git a/src/examples/edje/en_IN/domain_name.mo b/src/examples/edje/en_IN/domain_name.mo
index f723b0c042..0c1b2fcd16 100644
--- a/src/examples/edje/en_IN/domain_name.mo
+++ b/src/examples/edje/en_IN/domain_name.mo
Binary files differ
diff --git a/src/examples/edje/hi_IN/domain_name.mo b/src/examples/edje/hi_IN/domain_name.mo
index 3abf69472a..3901b8c2df 100644
--- a/src/examples/edje/hi_IN/domain_name.mo
+++ b/src/examples/edje/hi_IN/domain_name.mo
Binary files differ
diff --git a/src/examples/edje/ta_IN/domain_name.mo b/src/examples/edje/ta_IN/domain_name.mo
index 9d62babf84..bee3485208 100644
--- a/src/examples/edje/ta_IN/domain_name.mo
+++ b/src/examples/edje/ta_IN/domain_name.mo
Binary files differ
diff --git a/src/examples/edje/text.edc b/src/examples/edje/text.edc
index 4c0bf30a0d..ed0548d037 100644
--- a/src/examples/edje/text.edc
+++ b/src/examples/edje/text.edc
@@ -18,20 +18,20 @@ collections {
18 name: "example_group"; 18 name: "example_group";
19 max: 500 500; 19 max: 500 500;
20 min: 50 50; 20 min: 50 50;
21 translation { 21 translation {
22 file { 22 file {
23 locale: en_IN; 23 locale: en_IN;
24 source: domain_name.mo; 24 source: domain_name.mo; /* Can be either .po file or .mo file */
25 } 25 }
26 file { 26 file {
27 locale: hi_IN; 27 locale: hi_IN;
28 source: domain_name.mo; 28 source: domain_name.mo;
29 } 29 }
30 file { 30 file {
31 locale: ta_IN; 31 locale: ta_IN;
32 source: domain_name.mo; 32 source: domain_name.mo;
33 } 33 }
34 } 34 }
35 styles { 35 styles {
36 style { 36 style {
37 name: "textblock_style_en"; 37 name: "textblock_style_en";
@@ -49,7 +49,7 @@ collections {
49 tag: "b" "+ font_weight=Bold"; 49 tag: "b" "+ font_weight=Bold";
50 tag: "tab" "\t"; 50 tag: "tab" "\t";
51 } 51 }
52 style { 52 style {
53 name: "textblock_style_hi"; 53 name: "textblock_style_hi";
54 base: "font=Sans font_size=22 color=#00f wrap=word"; 54 base: "font=Sans font_size=22 color=#00f wrap=word";
55 tag: "br" "\n"; 55 tag: "br" "\n";
@@ -66,14 +66,15 @@ collections {
66 min: 50 50; 66 min: 50 50;
67 state: "default" 0.0; 67 state: "default" 0.0;
68 color: 0 0 255 255; /* blue */ 68 color: 0 0 255 255; /* blue */
69 rel1.relative: 0.0 0.0; 69 rel1.relative: 0.5 0.0;
70 rel2.relative: 1.0 0.5; 70 rel2.relative: 0.5 0.0;
71 text { 71 text {
72 text : "LOADING"; 72 text : "LOADING";
73 domain: "domain_name"; 73 domain: "domain_name";
74 font: "arial"; 74 font: "arial";
75 size: 22; 75 size: 22;
76 min: 1 1; 76 min: 1 1;
77 ellipsis: -1;
77 } 78 }
78 } 79 }
79 } 80 }
@@ -86,18 +87,142 @@ collections {
86 description { 87 description {
87 min: 50 50; 88 min: 50 50;
88 state: "default" 0.0; 89 state: "default" 0.0;
89 rel1.relative: 0.0 0.5; 90 rel1.relative: 0.0 0.25;
90 rel2.relative: 1.0 1.0; 91 rel2.relative: 0.5 0.0;
91 text { 92 text {
92 style: "textblock_style_en"; 93 style: "textblock_style_en";
93 min: 1 1; 94 min: 1 1;
95 ellipsis: -1;
94 } 96 }
95 } 97 }
96 description { 98 description {
97 inherit: "default" 0.0; 99 inherit: "default" 0.0;
98 state: "one" 0.0; 100 state: "one" 0.0;
99 text { 101 text {
100 style: "textblock_style_hi"; 102 style: "textblock_style_hi";
103 min: 1 1;
104 }
105 }
106 description {
107 inherit: "default" 0.0;
108 state: "two" 0.0;
109 text {
110 style: "textblock_style_ta";
111 min: 1 1;
112 }
113 }
114 }
115 }
116 programs {
117 program {
118 signal: "edje,language,hi_IN";
119 source: "edje";
120 script {
121 set_state(PART:"part_two", "one", 1.0);
122 }
123 }
124 program {
125 signal: "edje,language,ta_IN";
126 source: "edje";
127 script {
128 set_state(PART:"part_two", "two", 1.0);
129 }
130 }
131 program {
132 signal: "edje,language,en_IN";
133 source: "edje";
134 script {
135 set_state(PART:"part_two", "default", 1.0);
136 }
137 }
138 }
139 }
140 group {
141 name: "example_group1";
142 max: 500 500;
143 min: 50 50;
144 translation {
145 file {
146 locale: en_IN;
147 source: domain_name.mo;
148 }
149 file {
150 locale: hi_IN;
151 source: domain_name.mo;
152 }
153 file {
154 locale: ta_IN;
155 source: domain_name.mo;
156 }
157 }
158 styles {
159 style {
160 name: "textblock_style_en1";
161 base: "font=Sans font_size=22 color=#f00 wrap=word";
162 tag: "br" "\n";
163 tag: "hilight" "+ font_weight=Bold";
164 tag: "b" "+ font_weight=Bold";
165 tag: "tab" "\t";
166 }
167 style {
168 name: "textblock_style_ta1";
169 base: "font=Sans font_size=22 color=#000 wrap=word";
170 tag: "br" "\n";
171 tag: "hilight" "+ font_weight=Bold";
172 tag: "b" "+ font_weight=Bold";
173 tag: "tab" "\t";
174 }
175 style {
176 name: "textblock_style_hi1";
177 base: "font=Sans font_size=22 color=#00f wrap=word";
178 tag: "br" "\n";
179 tag: "hilight" "+ font_weight=Bold";
180 tag: "b" "+ font_weight=Bold";
181 tag: "tab" "\t";
182 }
183 }
184 parts {
185 part {
186 name: "part_one";
187 type: TEXT;
188 description {
189 min: 50 50;
190 state: "default" 0.0;
191 color: 0 0 255 255; /* blue */
192 rel1.relative: 0.5 0.25;
193 rel2.relative: 0.5 0.0;
194 text {
195 text : "LANG";
196 domain: "domain_name";
197 font: "arial";
198 size: 22;
199 min: 1 1;
200 ellipsis: -1;
201 }
202 }
203 }
204 part {
205 name: "part_two";
206 type: TEXTBLOCK;
207 select_mode: EXPLICIT;
208 source: "sel_group";
209 entry_mode: PLAIN;
210 description {
211 min: 50 50;
212 state: "default" 0.0;
213 rel1.relative: 0.0 0.5;
214 rel2.relative: 1.0 0.0;
215 text {
216 style: "textblock_style_en1";
217 min: 1 1;
218 ellipsis: -1;
219 }
220 }
221 description {
222 inherit: "default" 0.0;
223 state: "one" 0.0;
224 text {
225 style: "textblock_style_hi1";
101 min: 1 1; 226 min: 1 1;
102 } 227 }
103 } 228 }
@@ -105,13 +230,13 @@ collections {
105 inherit: "default" 0.0; 230 inherit: "default" 0.0;
106 state: "two" 0.0; 231 state: "two" 0.0;
107 text { 232 text {
108 style: "textblock_style_ta"; 233 style: "textblock_style_ta1";
109 min: 1 1; 234 min: 1 1;
110 } 235 }
111 } 236 }
112 } 237 }
113 } 238 }
114 programs { 239 programs {
115 program { 240 program {
116 signal: "edje,language,hi_IN"; 241 signal: "edje,language,hi_IN";
117 source: "edje"; 242 source: "edje";
@@ -119,14 +244,260 @@ collections {
119 set_state(PART:"part_two", "one", 1.0); 244 set_state(PART:"part_two", "one", 1.0);
120 } 245 }
121 } 246 }
122 program { 247 program {
123 signal: "edje,language,ta_IN"; 248 signal: "edje,language,ta_IN";
124 source: "edje"; 249 source: "edje";
125 script { 250 script {
126 set_state(PART:"part_two", "two", 1.0); 251 set_state(PART:"part_two", "two", 1.0);
127 } 252 }
128 } 253 }
129 program { 254 program {
255 signal: "edje,language,en_IN";
256 source: "edje";
257 script {
258 set_state(PART:"part_two", "default", 1.0);
259 }
260 }
261 }
262 }
263 group {
264 name: "example_group2";
265 max: 500 500;
266 min: 50 50;
267 translation {
268 file {
269 locale: en_IN;
270 source: domain_name.mo;
271 }
272 file {
273 locale: hi_IN;
274 source: domain_name.mo;
275 }
276 file {
277 locale: ta_IN;
278 source: domain_name.mo;
279 }
280 }
281 styles {
282 style {
283 name: "textblock_style_en2";
284 base: "font=Sans font_size=22 color=#f00 wrap=word";
285 tag: "br" "\n";
286 tag: "hilight" "+ font_weight=Bold";
287 tag: "b" "+ font_weight=Bold";
288 tag: "tab" "\t";
289 }
290 style {
291 name: "textblock_style_ta2";
292 base: "font=Sans font_size=22 color=#000 wrap=word";
293 tag: "br" "\n";
294 tag: "hilight" "+ font_weight=Bold";
295 tag: "b" "+ font_weight=Bold";
296 tag: "tab" "\t";
297 }
298 style {
299 name: "textblock_style_hi2";
300 base: "font=Sans font_size=22 color=#00f wrap=word";
301 tag: "br" "\n";
302 tag: "hilight" "+ font_weight=Bold";
303 tag: "b" "+ font_weight=Bold";
304 tag: "tab" "\t";
305 }
306 }
307 parts {
308 part {
309 name: "part_one";
310 type: TEXT;
311 description {
312 min: 50 50;
313 state: "default" 0.0;
314 color: 0 0 255 255; /* blue */
315 rel1.relative: 0.5 0.25;
316 rel2.relative: 0.5 0.0;
317 text {
318 text : "SYSTEM LANGUAGE";
319 domain: "domain_name";
320 font: "arial";
321 size: 22;
322 min: 1 1;
323 ellipsis: -1;
324 }
325 }
326 }
327 part {
328 name: "part_two";
329 type: TEXTBLOCK;
330 select_mode: EXPLICIT;
331 source: "sel_group";
332 entry_mode: PLAIN;
333 description {
334 min: 50 50;
335 state: "default" 0.0;
336 rel1.relative: 0.0 0.5;
337 rel2.relative: 1.0 0.0;
338 text {
339 style: "textblock_style_en2";
340 min: 1 1;
341 ellipsis: -1;
342 }
343 }
344 description {
345 inherit: "default" 0.0;
346 state: "one" 0.0;
347 text {
348 style: "textblock_style_hi2";
349 min: 1 1;
350 }
351 }
352 description {
353 inherit: "default" 0.0;
354 state: "two" 0.0;
355 text {
356 style: "textblock_style_ta2";
357 min: 1 1;
358 }
359 }
360 }
361 }
362 programs {
363 program {
364 signal: "edje,language,hi_IN";
365 source: "edje";
366 script {
367 set_state(PART:"part_two", "one", 1.0);
368 }
369 }
370 program {
371 signal: "edje,language,ta_IN";
372 source: "edje";
373 script {
374 set_state(PART:"part_two", "two", 1.0);
375 }
376 }
377 program {
378 signal: "edje,language,en_IN";
379 source: "edje";
380 script {
381 set_state(PART:"part_two", "default", 1.0);
382 }
383 }
384 }
385 }
386 group {
387 name: "example_group3";
388 max: 500 500;
389 min: 50 50;
390 translation {
391 file {
392 locale: en_IN;
393 source: domain_name.mo;
394 }
395 file {
396 locale: hi_IN;
397 source: domain_name.mo;
398 }
399 file {
400 locale: ta_IN;
401 source: domain_name.mo;
402 }
403 }
404 styles {
405 style {
406 name: "textblock_style_en3";
407 base: "font=Sans font_size=22 color=#f00 wrap=word";
408 tag: "br" "\n";
409 tag: "hilight" "+ font_weight=Bold";
410 tag: "b" "+ font_weight=Bold";
411 tag: "tab" "\t";
412 }
413 style {
414 name: "textblock_style_ta3";
415 base: "font=Sans font_size=22 color=#000 wrap=word";
416 tag: "br" "\n";
417 tag: "hilight" "+ font_weight=Bold";
418 tag: "b" "+ font_weight=Bold";
419 tag: "tab" "\t";
420 }
421 style {
422 name: "textblock_style_hi3";
423 base: "font=Sans font_size=22 color=#00f wrap=word";
424 tag: "br" "\n";
425 tag: "hilight" "+ font_weight=Bold";
426 tag: "b" "+ font_weight=Bold";
427 tag: "tab" "\t";
428 }
429 }
430 parts {
431 part {
432 name: "part_one";
433 type: TEXT;
434 description {
435 min: 50 50;
436 state: "default" 0.0;
437 color: 0 0 255 255; /* blue */
438 rel1.relative: 0.5 0.25;
439 rel2.relative: 0.5 0.0;
440 text {
441 text : "CHANGED";
442 domain: "domain_name";
443 font: "arial";
444 size: 22;
445 min: 1 1;
446 ellipsis: -1;
447 }
448 }
449 }
450 part {
451 name: "part_two";
452 type: TEXTBLOCK;
453 select_mode: EXPLICIT;
454 source: "sel_group";
455 entry_mode: PLAIN;
456 description {
457 min: 50 50;
458 state: "default" 0.0;
459 rel1.relative: 0.0 0.5;
460 rel2.relative: 1.0 0.0;
461 text {
462 style: "textblock_style_en3";
463 min: 1 1;
464 ellipsis: -1;
465 }
466 }
467 description {
468 inherit: "default" 0.0;
469 state: "one" 0.0;
470 text {
471 style: "textblock_style_hi3";
472 min: 1 1;
473 }
474 }
475 description {
476 inherit: "default" 0.0;
477 state: "two" 0.0;
478 text {
479 style: "textblock_style_ta3";
480 min: 1 1;
481 }
482 }
483 }
484 }
485 programs {
486 program {
487 signal: "edje,language,hi_IN";
488 source: "edje";
489 script {
490 set_state(PART:"part_two", "one", 1.0);
491 }
492 }
493 program {
494 signal: "edje,language,ta_IN";
495 source: "edje";
496 script {
497 set_state(PART:"part_two", "two", 1.0);
498 }
499 }
500 program {
130 signal: "edje,language,en_IN"; 501 signal: "edje,language,en_IN";
131 source: "edje"; 502 source: "edje";
132 script { 503 script {