summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2010-08-15 09:10:15 +0000
committerTom Hacohen <tom@stosb.com>2010-08-15 09:10:15 +0000
commitb2b95df2bee67dc57892d291a147f47ac82b731a (patch)
treeba6d447e42e29927c22720cc032a16bfcfbf397d /legacy
parent063d8ffd647ffbbc9d4add59d674a225f6f7be36 (diff)
Evas: Removed deprecated 'lines' from Evas_Object_Textblock.
SVN revision: 51129
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_textblock.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c
index 831bf5b1e5..b2198cb9e8 100644
--- a/legacy/evas/src/lib/canvas/evas_object_textblock.c
+++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c
@@ -299,7 +299,6 @@ struct _Evas_Object_Textblock
299 Evas_Object_Textblock_Node_Text *text_nodes; 299 Evas_Object_Textblock_Node_Text *text_nodes;
300 Evas_Object_Textblock_Node_Format *format_nodes; 300 Evas_Object_Textblock_Node_Format *format_nodes;
301 Evas_Object_Textblock_Paragraph *paragraphs; 301 Evas_Object_Textblock_Paragraph *paragraphs;
302 Evas_Object_Textblock_Line *lines;
303 int last_w; 302 int last_w;
304 struct { 303 struct {
305 int l, r, t, b; 304 int l, r, t, b;
@@ -3049,7 +3048,6 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
3049 } 3048 }
3050 if (!calc_only) 3049 if (!calc_only)
3051 { 3050 {
3052 o->lines = c->par->lines;
3053 o->paragraphs = c->paragraphs; 3051 o->paragraphs = c->paragraphs;
3054 return; 3052 return;
3055 } 3053 }
@@ -3068,7 +3066,6 @@ _relayout(const Evas_Object *obj)
3068 o = (Evas_Object_Textblock *)(obj->object_data); 3066 o = (Evas_Object_Textblock *)(obj->object_data);
3069 paragraphs = o->paragraphs; 3067 paragraphs = o->paragraphs;
3070 o->paragraphs = NULL; 3068 o->paragraphs = NULL;
3071 o->lines = NULL;
3072 o->formatted.valid = 0; 3069 o->formatted.valid = 0;
3073 o->native.valid = 0; 3070 o->native.valid = 0;
3074 _layout(obj, 3071 _layout(obj,
@@ -3101,7 +3098,7 @@ _find_layout_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node_Text *
3101 3098
3102 o = (Evas_Object_Textblock *)(obj->object_data); 3099 o = (Evas_Object_Textblock *)(obj->object_data);
3103 if (!o->formatted.valid) _relayout(obj); 3100 if (!o->formatted.valid) _relayout(obj);
3104 EINA_INLIST_FOREACH(o->lines, ln) 3101 EINA_INLIST_FOREACH(o->paragraphs->lines, ln)
3105 { 3102 {
3106 Evas_Object_Textblock_Item *it; 3103 Evas_Object_Textblock_Item *it;
3107 Evas_Object_Textblock_Line *lnn; 3104 Evas_Object_Textblock_Line *lnn;
@@ -3148,7 +3145,7 @@ _find_layout_format_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node
3148 3145
3149 o = (Evas_Object_Textblock *)(obj->object_data); 3146 o = (Evas_Object_Textblock *)(obj->object_data);
3150 if (!o->formatted.valid) _relayout(obj); 3147 if (!o->formatted.valid) _relayout(obj);
3151 EINA_INLIST_FOREACH(o->lines, ln) 3148 EINA_INLIST_FOREACH(o->paragraphs->lines, ln)
3152 { 3149 {
3153 Evas_Object_Textblock_Format_Item *fi; 3150 Evas_Object_Textblock_Format_Item *fi;
3154 3151
@@ -3179,7 +3176,7 @@ _find_layout_line_num(const Evas_Object *obj, int line)
3179 Evas_Object_Textblock *o; 3176 Evas_Object_Textblock *o;
3180 3177
3181 o = (Evas_Object_Textblock *)(obj->object_data); 3178 o = (Evas_Object_Textblock *)(obj->object_data);
3182 EINA_INLIST_FOREACH(o->lines, ln) 3179 EINA_INLIST_FOREACH(o->paragraphs->lines, ln)
3183 { 3180 {
3184 if (ln->line_no == line) return ln; 3181 if (ln->line_no == line) return ln;
3185 } 3182 }
@@ -6099,7 +6096,8 @@ evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
6099 { 6096 {
6100 if (!o->text_nodes) 6097 if (!o->text_nodes)
6101 { 6098 {
6102 ln = o->lines; 6099 if (!o->paragraphs) return -1;
6100 ln = o->paragraphs->lines;
6103 if (!ln) return -1; 6101 if (!ln) return -1;
6104 if (cx) *cx = ln->x; 6102 if (cx) *cx = ln->x;
6105 if (cy) *cy = ln->y; 6103 if (cy) *cy = ln->y;
@@ -6198,7 +6196,7 @@ evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
6198 if (!o->formatted.valid) _relayout(cur->obj); 6196 if (!o->formatted.valid) _relayout(cur->obj);
6199 if (!cur->node) 6197 if (!cur->node)
6200 { 6198 {
6201 ln = o->lines; 6199 ln = o->paragraphs->lines;
6202 } 6200 }
6203 else 6201 else
6204 { 6202 {
@@ -6247,7 +6245,7 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
6247 if (!o->formatted.valid) _relayout(cur->obj); 6245 if (!o->formatted.valid) _relayout(cur->obj);
6248 x += o->style_pad.l; 6246 x += o->style_pad.l;
6249 y += o->style_pad.t; 6247 y += o->style_pad.t;
6250 EINA_INLIST_FOREACH(o->lines, ln) 6248 EINA_INLIST_FOREACH(o->paragraphs->lines, ln)
6251 { 6249 {
6252 if (ln->y > y) break; 6250 if (ln->y > y) break;
6253 if ((ln->y <= y) && ((ln->y + ln->h) > y)) 6251 if ((ln->y <= y) && ((ln->y + ln->h) > y))
@@ -6320,7 +6318,7 @@ evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
6320 o = (Evas_Object_Textblock *)(cur->obj->object_data); 6318 o = (Evas_Object_Textblock *)(cur->obj->object_data);
6321 if (!o->formatted.valid) _relayout(cur->obj); 6319 if (!o->formatted.valid) _relayout(cur->obj);
6322 y += o->style_pad.t; 6320 y += o->style_pad.t;
6323 EINA_INLIST_FOREACH(o->lines, ln) 6321 EINA_INLIST_FOREACH(o->paragraphs->lines, ln)
6324 { 6322 {
6325 if (ln->y > y) break; 6323 if (ln->y > y) break;
6326 if ((ln->y <= y) && ((ln->y + ln->h) > y)) 6324 if ((ln->y <= y) && ((ln->y + ln->h) > y))
@@ -6543,7 +6541,6 @@ evas_object_textblock_clear(Evas_Object *obj)
6543 { 6541 {
6544 _paragraphs_clear(obj, o->paragraphs); 6542 _paragraphs_clear(obj, o->paragraphs);
6545 o->paragraphs = NULL; 6543 o->paragraphs = NULL;
6546 o->lines = NULL;
6547 } 6544 }
6548 _evas_textblock_changed(o, obj); 6545 _evas_textblock_changed(o, obj);
6549} 6546}
@@ -6703,7 +6700,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
6703 context); 6700 context);
6704 clip = ENFN->context_clip_get(output, context, &cx, &cy, &cw, &ch); 6701 clip = ENFN->context_clip_get(output, context, &cx, &cy, &cw, &ch);
6705#define ITEM_WALK() \ 6702#define ITEM_WALK() \
6706 EINA_INLIST_FOREACH(o->lines, ln) \ 6703 EINA_INLIST_FOREACH(o->paragraphs->lines, ln) \
6707 { \ 6704 { \
6708 Evas_Object_Textblock_Item *it; \ 6705 Evas_Object_Textblock_Item *it; \
6709 \ 6706 \
@@ -7119,7 +7116,6 @@ evas_object_textblock_render_pre(Evas_Object *obj)
7119 7116
7120 paragraphs = o->paragraphs; 7117 paragraphs = o->paragraphs;
7121 o->paragraphs = NULL; 7118 o->paragraphs = NULL;
7122 o->lines = NULL;
7123 o->formatted.valid = 0; 7119 o->formatted.valid = 0;
7124 o->native.valid = 0; 7120 o->native.valid = 0;
7125 _layout(obj, 7121 _layout(obj,
@@ -7296,7 +7292,7 @@ _evas_object_textblock_rehint(Evas_Object *obj)
7296 Evas_Object_Textblock_Line *ln; 7292 Evas_Object_Textblock_Line *ln;
7297 7293
7298 o = (Evas_Object_Textblock *)(obj->object_data); 7294 o = (Evas_Object_Textblock *)(obj->object_data);
7299 EINA_INLIST_FOREACH(o->lines, ln) 7295 EINA_INLIST_FOREACH(o->paragraphs->lines, ln)
7300 { 7296 {
7301 Evas_Object_Textblock_Item *it; 7297 Evas_Object_Textblock_Item *it;
7302 7298