summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2015-08-02 18:03:04 +0300
committerDaniel Hirt <daniel.hirt@samsung.com>2015-08-31 12:49:38 +0300
commit0be1c90c747d3fd7037b8c435b0373553fa1d2f4 (patch)
treef9c1bbcf6cc88055dac19813458c29eeb2175828
parent030f299401ecaee7dd288428dde0fe861fe7f209 (diff)
Evas Textblock: Modify items_get Debug API logic
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index d4d739fca5..824c1825df 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -12342,17 +12342,24 @@ _evas_textblock_par_rects_get(const Evas_Object *obj)
12342 return rects; 12342 return rects;
12343} 12343}
12344 12344
12345typedef struct
12346{
12347 int idx;
12348 Evas_Coord x, y, w, h;
12349 Eina_Rectangle *rect;
12350} Textblock_Item_Debug_Data;
12351
12345EAPI Eina_List * 12352EAPI Eina_List *
12346_evas_textblock_items_get(const Evas_Object *obj) 12353_evas_textblock_items_get(const Evas_Object *obj)
12347{ 12354{
12348 Eina_List *rects = NULL; 12355 Eina_List *rects = NULL;
12349 Eina_Rectangle *rect;
12350 Evas_Object_Textblock_Paragraph *par; 12356 Evas_Object_Textblock_Paragraph *par;
12351 Evas_Textblock_Data *o = eo_data_scope_get(obj, MY_CLASS); 12357 Evas_Textblock_Data *o = eo_data_scope_get(obj, MY_CLASS);
12352 12358
12353 EINA_INLIST_FOREACH(o->paragraphs, par) 12359 EINA_INLIST_FOREACH(o->paragraphs, par)
12354 { 12360 {
12355 Evas_Object_Textblock_Line *ln; 12361 Evas_Object_Textblock_Line *ln;
12362 int idx = 0;
12356 12363
12357 if (!par->visible) break; 12364 if (!par->visible) break;
12358 12365
@@ -12361,8 +12368,14 @@ _evas_textblock_items_get(const Evas_Object *obj)
12361 Evas_Object_Textblock_Item *it; 12368 Evas_Object_Textblock_Item *it;
12362 EINA_INLIST_FOREACH(ln->items, it) 12369 EINA_INLIST_FOREACH(ln->items, it)
12363 { 12370 {
12364 rect = eina_rectangle_new(it->x, par->y + ln->y, it->w, it->h); 12371 Textblock_Item_Debug_Data *d = calloc(1, sizeof(Textblock_Item_Debug_Data));
12365 rects = eina_list_append(rects, rect); 12372 d->idx = idx++;
12373 d->w = it->w;
12374 d->h = it->h;
12375 d->x = it->x;
12376 d->y = ln->y;
12377 d->rect = eina_rectangle_new(it->x, par->y + ln->y, it->w, it->h);
12378 rects = eina_list_append(rects, d);
12366 } 12379 }
12367 } 12380 }
12368 12381