summaryrefslogtreecommitdiffstats
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
parentignore (diff)
downloadepresent-66e7272d0ee2bde61a50b2fb7c72b63e81c46624.tar.gz
-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)
else if (!strcmp(name, "text"))
{
str = strip_whitespace(pcd);
+ printf ("slide_new before\n\n");
slide_text_add(o, str);
+ printf ("slide_new after\n\n");
free(str);
}
else if (!strcmp(name, "list"))
@@ -185,7 +187,9 @@ slide_new(int slide)
);
}
}
+ printf ("xtag_next_child before\n\n");
ctag = xtag_next_child(tag, NULL);
+ printf ("xtag_next_child after\n\n");
}
return o;
}
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)
si = _smart_item_text_next(sd);
si->type = TITLE;
si->text = strdup(str);
+ printf ("slide_title_add\n\n");
_smart_reconfigure(sd);
}
@@ -99,6 +100,7 @@ slide_text_add(Evas_Object *obj, const char *str)
si = _smart_item_text_next(sd);
si->type = TEXT;
si->text = strdup(str);
+ printf ("slide_text_add\n\n");
_smart_reconfigure(sd);
}
@@ -114,6 +116,7 @@ slide_image_add(Evas_Object *obj, const char *str, const char *size)
if (size) si->size_h = (double)atoi(size) / 100.0;
else si->size_h = 0.25;
si->text = strdup(str);
+ printf ("slide_image_add\n\n");
_smart_reconfigure(sd);
}
@@ -131,6 +134,7 @@ slide_edje_add(Evas_Object *obj, const char *str, const char *size, const char *
if (dimensions)
sscanf(dimensions, "%ix%i", &si->dim_w, &si->dim_h);
si->text = strdup(str);
+ printf ("slide_edje_add\n\n");
_smart_reconfigure(sd);
}
@@ -143,6 +147,7 @@ slide_item_add(Evas_Object *obj, const char *str)
si = _smart_item_text_next(sd);
si->type = ITEM;
si->text = strdup(str);
+ printf ("slide_item_add\n\n");
_smart_reconfigure(sd);
}
@@ -161,6 +166,7 @@ slide_video_add(Evas_Object *obj, const char *str, const char *size, const char
if (pos) sscanf(pos, "%i+%i", &si->pos_x, &si->pos_y);
if (alpha) si->alpha = atoi(alpha);
si->text = strdup(str);
+ printf ("slide_video_add\n\n");
_smart_reconfigure(sd);
}
@@ -246,6 +252,7 @@ _smart_reconfigure(Smart_Data *sd)
y += padjust;
if (si->type == TITLE)
{
+ printf("_smart_reconfigure: si->type == TITLE\n\n");
snprintf(buf, sizeof(buf),
"font=%s size=%i wrap=word align=center color=#ffffffff "
"outer_glow_color=#00000010 glow_color=#00000020 style=glow"
@@ -267,20 +274,26 @@ _smart_reconfigure(Smart_Data *sd)
}
else if (si->type == TEXT)
{
+ printf("_smart_reconfigure: si->type == TEXT\n");
snprintf(buf, sizeof(buf),
"font=%s size=%i wrap=word align=left color=#ffffffff "
"outer_glow_color=#00000010 glow_color=#00000020 style=glow"
,
"Vera",
(int)sd->h / 24);
+ printf ("passed snprintf\n");
evas_object_textblock_clear(si->obj);
+ printf ("passed evas_object_textblock_clear\n");
// evas_object_textblock_format_insert(si->obj, buf);
- si->obj = realloc(si->obj, strlen (si->obj) + strlen(buf) + 1);
- strcat (si->obj, buf);
-// evas_object_textblock_text_insert(si->obj, si->text);
- si->obj = realloc(si->obj, strlen (si->obj) + strlen(si->text) + 1);
+ si->obj = malloc(strlen(buf) + strlen(si->text) + 1);
+ strcpy (si->obj, buf);
+ printf ("passed strcpy\n");
strcat (si->obj, si->text);
+ printf ("passed stracat\n");
+ printf ("si->obj : %s\n", si->obj);
+// evas_object_textblock_text_insert(si->obj, si->text);
evas_object_resize(si->obj, sd->w, 1);
+ printf ("passed evas_object_resize\n\n");
// evas_object_textblock_format_size_get(si->obj, &w, &h);
// edje_extern_object_min_size_set(si->obj, w, h);
w = sd->w;
@@ -288,6 +301,7 @@ _smart_reconfigure(Smart_Data *sd)
}
else if (si->type == IMAGE)
{
+ printf("_smart_reconfigure: si->type == IMAGE\n\n");
int iw, ih;
evas_object_image_file_set(si->obj, si->text, NULL);
@@ -319,6 +333,7 @@ _smart_reconfigure(Smart_Data *sd)
}
else if (si->type == EDJE)
{
+ printf("_smart_reconfigure: si->type == EDGE\n\n");
int iw, ih;
edje_object_file_set(si->obj, si->text, "desktop/background");
@@ -350,6 +365,7 @@ _smart_reconfigure(Smart_Data *sd)
}
else if (si->type == ITEM)
{
+ printf("_smart_reconfigure: si->type == ITEM\n\n");
snprintf(buf, sizeof(buf),
"font=%s size=%i wrap=word align=left color=#ffffffff "
"outer_glow_color=#00000010 glow_color=#00000020 style=glow left_tab_stop=20%"
@@ -375,6 +391,7 @@ _smart_reconfigure(Smart_Data *sd)
}
else if (si->type == VIDEO)
{
+ printf("_smart_reconfigure: si->type == VIDEO\n\n");
int iw, ih;
emotion_object_file_set(si->obj, si->text);
@@ -419,12 +436,15 @@ _smart_reconfigure(Smart_Data *sd)
si->x = x + ((double)(sd->w - w) * si->align_x);
si->y = y;
}
+ printf ("End tests\n");
si->w = w;
si->h = h;
y += h + (sd->h / 40);
evas_object_move(si->obj, sd->x + si->x, sd->y + si->y);
evas_object_resize(si->obj, si->w, si->h);
+
WALK_ITEMS_END;
+ printf ("passed WALK_ITEMS_END\n\n");
}
static void
@@ -515,6 +535,7 @@ _smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
INTERNAL_ENTRY;
sd->x = x;
sd->y = y;
+ printf ("_smart_move\n\n");
_smart_reconfigure(sd);
}
@@ -524,6 +545,7 @@ _smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
INTERNAL_ENTRY;
sd->w = w;
sd->h = h;
+ printf ("_smart_resize\n\n");
_smart_reconfigure(sd);
}