summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin (Beber) <beber@setibzh.com>2006-01-24 15:18:56 +0100
committerBertrand Jacquin (Beber) <beber@setibzh.com>2006-01-24 15:18:56 +0100
commit66e7272d0ee2bde61a50b2fb7c72b63e81c46624 (patch)
tree292336c4428d41bf8c0504f2e5806e3f968579ff
parente8520844bf4ffb44f9e431d81e2df99e244aaea7 (diff)
-rw-r--r--pres_core.c4
-rw-r--r--slide.c30
2 files changed, 30 insertions, 4 deletions
diff --git a/pres_core.c b/pres_core.c
index 341e70e..6a3a15f 100644
--- a/pres_core.c
+++ b/pres_core.c
@@ -137,7 +137,9 @@ slide_new(int slide)
137 else if (!strcmp(name, "text")) 137 else if (!strcmp(name, "text"))
138 { 138 {
139 str = strip_whitespace(pcd); 139 str = strip_whitespace(pcd);
140 printf ("slide_new before\n\n");
140 slide_text_add(o, str); 141 slide_text_add(o, str);
142 printf ("slide_new after\n\n");
141 free(str); 143 free(str);
142 } 144 }
143 else if (!strcmp(name, "list")) 145 else if (!strcmp(name, "list"))
@@ -185,7 +187,9 @@ slide_new(int slide)
185 ); 187 );
186 } 188 }
187 } 189 }
190 printf ("xtag_next_child before\n\n");
188 ctag = xtag_next_child(tag, NULL); 191 ctag = xtag_next_child(tag, NULL);
192 printf ("xtag_next_child after\n\n");
189 } 193 }
190 return o; 194 return o;
191} 195}
diff --git a/slide.c b/slide.c
index a0f1d49..aeb82a5 100644
--- a/slide.c
+++ b/slide.c
@@ -87,6 +87,7 @@ slide_title_add(Evas_Object *obj, const char *str)
87 si = _smart_item_text_next(sd); 87 si = _smart_item_text_next(sd);
88 si->type = TITLE; 88 si->type = TITLE;
89 si->text = strdup(str); 89 si->text = strdup(str);
90 printf ("slide_title_add\n\n");
90 _smart_reconfigure(sd); 91 _smart_reconfigure(sd);
91} 92}
92 93
@@ -99,6 +100,7 @@ slide_text_add(Evas_Object *obj, const char *str)
99 si = _smart_item_text_next(sd); 100 si = _smart_item_text_next(sd);
100 si->type = TEXT; 101 si->type = TEXT;
101 si->text = strdup(str); 102 si->text = strdup(str);
103 printf ("slide_text_add\n\n");
102 _smart_reconfigure(sd); 104 _smart_reconfigure(sd);
103} 105}
104 106
@@ -114,6 +116,7 @@ slide_image_add(Evas_Object *obj, const char *str, const char *size)
114 if (size) si->size_h = (double)atoi(size) / 100.0; 116 if (size) si->size_h = (double)atoi(size) / 100.0;
115 else si->size_h = 0.25; 117 else si->size_h = 0.25;
116 si->text = strdup(str); 118 si->text = strdup(str);
119 printf ("slide_image_add\n\n");
117 _smart_reconfigure(sd); 120 _smart_reconfigure(sd);
118} 121}
119 122
@@ -131,6 +134,7 @@ slide_edje_add(Evas_Object *obj, const char *str, const char *size, const char *
131 if (dimensions) 134 if (dimensions)
132 sscanf(dimensions, "%ix%i", &si->dim_w, &si->dim_h); 135 sscanf(dimensions, "%ix%i", &si->dim_w, &si->dim_h);
133 si->text = strdup(str); 136 si->text = strdup(str);
137 printf ("slide_edje_add\n\n");
134 _smart_reconfigure(sd); 138 _smart_reconfigure(sd);
135} 139}
136 140
@@ -143,6 +147,7 @@ slide_item_add(Evas_Object *obj, const char *str)
143 si = _smart_item_text_next(sd); 147 si = _smart_item_text_next(sd);
144 si->type = ITEM; 148 si->type = ITEM;
145 si->text = strdup(str); 149 si->text = strdup(str);
150 printf ("slide_item_add\n\n");
146 _smart_reconfigure(sd); 151 _smart_reconfigure(sd);
147} 152}
148 153
@@ -161,6 +166,7 @@ slide_video_add(Evas_Object *obj, const char *str, const char *size, const char
161 if (pos) sscanf(pos, "%i+%i", &si->pos_x, &si->pos_y); 166 if (pos) sscanf(pos, "%i+%i", &si->pos_x, &si->pos_y);
162 if (alpha) si->alpha = atoi(alpha); 167 if (alpha) si->alpha = atoi(alpha);
163 si->text = strdup(str); 168 si->text = strdup(str);
169 printf ("slide_video_add\n\n");
164 _smart_reconfigure(sd); 170 _smart_reconfigure(sd);
165} 171}
166 172
@@ -246,6 +252,7 @@ _smart_reconfigure(Smart_Data *sd)
246 y += padjust; 252 y += padjust;
247 if (si->type == TITLE) 253 if (si->type == TITLE)
248 { 254 {
255 printf("_smart_reconfigure: si->type == TITLE\n\n");
249 snprintf(buf, sizeof(buf), 256 snprintf(buf, sizeof(buf),
250 "font=%s size=%i wrap=word align=center color=#ffffffff " 257 "font=%s size=%i wrap=word align=center color=#ffffffff "
251 "outer_glow_color=#00000010 glow_color=#00000020 style=glow" 258 "outer_glow_color=#00000010 glow_color=#00000020 style=glow"
@@ -267,20 +274,26 @@ _smart_reconfigure(Smart_Data *sd)
267 } 274 }
268 else if (si->type == TEXT) 275 else if (si->type == TEXT)
269 { 276 {
277 printf("_smart_reconfigure: si->type == TEXT\n");
270 snprintf(buf, sizeof(buf), 278 snprintf(buf, sizeof(buf),
271 "font=%s size=%i wrap=word align=left color=#ffffffff " 279 "font=%s size=%i wrap=word align=left color=#ffffffff "
272 "outer_glow_color=#00000010 glow_color=#00000020 style=glow" 280 "outer_glow_color=#00000010 glow_color=#00000020 style=glow"
273 , 281 ,
274 "Vera", 282 "Vera",
275 (int)sd->h / 24); 283 (int)sd->h / 24);
284 printf ("passed snprintf\n");
276 evas_object_textblock_clear(si->obj); 285 evas_object_textblock_clear(si->obj);
286 printf ("passed evas_object_textblock_clear\n");
277// evas_object_textblock_format_insert(si->obj, buf); 287// evas_object_textblock_format_insert(si->obj, buf);
278 si->obj = realloc(si->obj, strlen (si->obj) + strlen(buf) + 1); 288 si->obj = malloc(strlen(buf) + strlen(si->text) + 1);
279 strcat (si->obj, buf); 289 strcpy (si->obj, buf);
280// evas_object_textblock_text_insert(si->obj, si->text); 290 printf ("passed strcpy\n");
281 si->obj = realloc(si->obj, strlen (si->obj) + strlen(si->text) + 1);
282 strcat (si->obj, si->text); 291 strcat (si->obj, si->text);
292 printf ("passed stracat\n");
293 printf ("si->obj : %s\n", si->obj);
294// evas_object_textblock_text_insert(si->obj, si->text);
283 evas_object_resize(si->obj, sd->w, 1); 295 evas_object_resize(si->obj, sd->w, 1);
296 printf ("passed evas_object_resize\n\n");
284// evas_object_textblock_format_size_get(si->obj, &w, &h); 297// evas_object_textblock_format_size_get(si->obj, &w, &h);
285// edje_extern_object_min_size_set(si->obj, w, h); 298// edje_extern_object_min_size_set(si->obj, w, h);
286 w = sd->w; 299 w = sd->w;
@@ -288,6 +301,7 @@ _smart_reconfigure(Smart_Data *sd)
288 } 301 }
289 else if (si->type == IMAGE) 302 else if (si->type == IMAGE)
290 { 303 {
304 printf("_smart_reconfigure: si->type == IMAGE\n\n");
291 int iw, ih; 305 int iw, ih;
292 306
293 evas_object_image_file_set(si->obj, si->text, NULL); 307 evas_object_image_file_set(si->obj, si->text, NULL);
@@ -319,6 +333,7 @@ _smart_reconfigure(Smart_Data *sd)
319 } 333 }
320 else if (si->type == EDJE) 334 else if (si->type == EDJE)
321 { 335 {
336 printf("_smart_reconfigure: si->type == EDGE\n\n");
322 int iw, ih; 337 int iw, ih;
323 338
324 edje_object_file_set(si->obj, si->text, "desktop/background"); 339 edje_object_file_set(si->obj, si->text, "desktop/background");
@@ -350,6 +365,7 @@ _smart_reconfigure(Smart_Data *sd)
350 } 365 }
351 else if (si->type == ITEM) 366 else if (si->type == ITEM)
352 { 367 {
368 printf("_smart_reconfigure: si->type == ITEM\n\n");
353 snprintf(buf, sizeof(buf), 369 snprintf(buf, sizeof(buf),
354 "font=%s size=%i wrap=word align=left color=#ffffffff " 370 "font=%s size=%i wrap=word align=left color=#ffffffff "
355 "outer_glow_color=#00000010 glow_color=#00000020 style=glow left_tab_stop=20%" 371 "outer_glow_color=#00000010 glow_color=#00000020 style=glow left_tab_stop=20%"
@@ -375,6 +391,7 @@ _smart_reconfigure(Smart_Data *sd)
375 } 391 }
376 else if (si->type == VIDEO) 392 else if (si->type == VIDEO)
377 { 393 {
394 printf("_smart_reconfigure: si->type == VIDEO\n\n");
378 int iw, ih; 395 int iw, ih;
379 396
380 emotion_object_file_set(si->obj, si->text); 397 emotion_object_file_set(si->obj, si->text);
@@ -419,12 +436,15 @@ _smart_reconfigure(Smart_Data *sd)
419 si->x = x + ((double)(sd->w - w) * si->align_x); 436 si->x = x + ((double)(sd->w - w) * si->align_x);
420 si->y = y; 437 si->y = y;
421 } 438 }
439 printf ("End tests\n");
422 si->w = w; 440 si->w = w;
423 si->h = h; 441 si->h = h;
424 y += h + (sd->h / 40); 442 y += h + (sd->h / 40);
425 evas_object_move(si->obj, sd->x + si->x, sd->y + si->y); 443 evas_object_move(si->obj, sd->x + si->x, sd->y + si->y);
426 evas_object_resize(si->obj, si->w, si->h); 444 evas_object_resize(si->obj, si->w, si->h);
445
427 WALK_ITEMS_END; 446 WALK_ITEMS_END;
447 printf ("passed WALK_ITEMS_END\n\n");
428} 448}
429 449
430static void 450static void
@@ -515,6 +535,7 @@ _smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
515 INTERNAL_ENTRY; 535 INTERNAL_ENTRY;
516 sd->x = x; 536 sd->x = x;
517 sd->y = y; 537 sd->y = y;
538 printf ("_smart_move\n\n");
518 _smart_reconfigure(sd); 539 _smart_reconfigure(sd);
519} 540}
520 541
@@ -524,6 +545,7 @@ _smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
524 INTERNAL_ENTRY; 545 INTERNAL_ENTRY;
525 sd->w = w; 546 sd->w = w;
526 sd->h = h; 547 sd->h = h;
548 printf ("_smart_resize\n\n");
527 _smart_reconfigure(sd); 549 _smart_reconfigure(sd);
528} 550}
529 551