summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_object_text.c')
-rw-r--r--src/lib/evas/canvas/evas_object_text.c48
1 files changed, 22 insertions, 26 deletions
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index 0820b60..419dd49 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -379,7 +379,7 @@ evas_object_text_add(Evas *e)
379EOLIAN static Eo * 379EOLIAN static Eo *
380_evas_text_eo_base_constructor(Eo *eo_obj, Evas_Text_Data *o EINA_UNUSED) 380_evas_text_eo_base_constructor(Eo *eo_obj, Evas_Text_Data *o EINA_UNUSED)
381{ 381{
382 eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor()); 382 eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS));
383 evas_object_text_init(eo_obj); 383 evas_object_text_init(eo_obj);
384 384
385 return eo_obj; 385 return eo_obj;
@@ -477,7 +477,7 @@ _evas_text_efl_text_properties_font_set(Eo *eo_obj, Evas_Text_Data *o, const cha
477 _evas_object_text_recalc(eo_obj, o->cur.text); 477 _evas_object_text_recalc(eo_obj, o->cur.text);
478 o->changed = 1; 478 o->changed = 1;
479 if (o->has_filter) 479 if (o->has_filter)
480 eo_do(eo_obj, evas_filter_changed_set(EINA_TRUE)); 480 evas_filter_changed_set(eo_obj, EINA_TRUE);
481 evas_object_change(eo_obj, obj); 481 evas_object_change(eo_obj, obj);
482 evas_object_clip_dirty(eo_obj, obj); 482 evas_object_clip_dirty(eo_obj, obj);
483 evas_object_coords_recalc(eo_obj, obj); 483 evas_object_coords_recalc(eo_obj, obj);
@@ -673,7 +673,7 @@ _evas_object_text_pad_get(const Eo *eo_obj, Evas_Text_Data *o, int *l, int *r, i
673 if (!o->has_filter) 673 if (!o->has_filter)
674 evas_text_style_pad_get(o->cur.style, l, r, t, b); 674 evas_text_style_pad_get(o->cur.style, l, r, t, b);
675 else 675 else
676 eo_do(eo_obj, efl_gfx_filter_padding_get(l, r, t, b)); 676 efl_gfx_filter_padding_get(eo_obj, l, r, t, b);
677} 677}
678 678
679/** 679/**
@@ -999,7 +999,7 @@ _evas_text_ellipsis_set(Eo *eo_obj, Evas_Text_Data *o, double ellipsis)
999 o->cur.ellipsis = ellipsis; 999 o->cur.ellipsis = ellipsis;
1000 o->changed = 1; 1000 o->changed = 1;
1001 if (o->has_filter) 1001 if (o->has_filter)
1002 eo_do(eo_obj, evas_filter_changed_set(EINA_TRUE)); 1002 evas_filter_changed_set(eo_obj, EINA_TRUE);
1003 evas_object_change(eo_obj, obj); 1003 evas_object_change(eo_obj, obj);
1004 evas_object_clip_dirty(eo_obj, obj); 1004 evas_object_clip_dirty(eo_obj, obj);
1005} 1005}
@@ -1013,19 +1013,19 @@ _evas_text_ellipsis_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o)
1013EOLIAN static void 1013EOLIAN static void
1014_evas_text_eo_base_dbg_info_get(Eo *eo_obj, Evas_Text_Data *o EINA_UNUSED, Eo_Dbg_Info *root) 1014_evas_text_eo_base_dbg_info_get(Eo *eo_obj, Evas_Text_Data *o EINA_UNUSED, Eo_Dbg_Info *root)
1015{ 1015{
1016 eo_do_super(eo_obj, MY_CLASS, eo_dbg_info_get(root)); 1016 eo_dbg_info_get(eo_super(eo_obj, MY_CLASS), root);
1017 Eo_Dbg_Info *group = EO_DBG_INFO_LIST_APPEND(root, MY_CLASS_NAME); 1017 Eo_Dbg_Info *group = EO_DBG_INFO_LIST_APPEND(root, MY_CLASS_NAME);
1018 1018
1019 const char *text; 1019 const char *text;
1020 int size; 1020 int size;
1021 eo_do(eo_obj, efl_text_properties_font_get(&text, &size)); 1021 efl_text_properties_font_get(eo_obj, &text, &size);
1022 EO_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text); 1022 EO_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text);
1023 EO_DBG_INFO_APPEND(group, "Text size", EINA_VALUE_TYPE_INT, size); 1023 EO_DBG_INFO_APPEND(group, "Text size", EINA_VALUE_TYPE_INT, size);
1024 1024
1025 eo_do(eo_obj, text = efl_text_properties_font_source_get()); 1025 text = efl_text_properties_font_source_get(eo_obj);
1026 EO_DBG_INFO_APPEND(group, "Font source", EINA_VALUE_TYPE_STRING, text); 1026 EO_DBG_INFO_APPEND(group, "Font source", EINA_VALUE_TYPE_STRING, text);
1027 1027
1028 eo_do(eo_obj, text = efl_text_get()); 1028 text = efl_text_get(eo_obj);
1029 EO_DBG_INFO_APPEND(group, "Text", EINA_VALUE_TYPE_STRING, text); 1029 EO_DBG_INFO_APPEND(group, "Text", EINA_VALUE_TYPE_STRING, text);
1030} 1030}
1031 1031
@@ -1058,7 +1058,7 @@ _evas_text_efl_text_text_set(Eo *eo_obj, Evas_Text_Data *o, const char *_text)
1058 1058
1059 o->changed = 1; 1059 o->changed = 1;
1060 if (o->has_filter) 1060 if (o->has_filter)
1061 eo_do(eo_obj, evas_filter_changed_set(EINA_TRUE)); 1061 evas_filter_changed_set(eo_obj, EINA_TRUE);
1062 evas_object_change(eo_obj, obj); 1062 evas_object_change(eo_obj, obj);
1063 evas_object_clip_dirty(eo_obj, obj); 1063 evas_object_clip_dirty(eo_obj, obj);
1064 evas_object_coords_recalc(eo_obj, obj); 1064 evas_object_coords_recalc(eo_obj, obj);
@@ -1305,8 +1305,7 @@ _evas_text_style_set(Eo *eo_obj, Evas_Text_Data *o, Evas_Text_Style_Type style)
1305 if (o->items) w = obj->cur->geometry.w + (l - pl) + (r - pr); 1305 if (o->items) w = obj->cur->geometry.w + (l - pl) + (r - pr);
1306 h = obj->cur->geometry.h + (t - pt) + (b - pb); 1306 h = obj->cur->geometry.h + (t - pt) + (b - pb);
1307 1307
1308 eo_do_super(eo_obj, MY_CLASS, 1308 efl_gfx_size_set(eo_super(eo_obj, MY_CLASS), w, h);
1309 efl_gfx_size_set(w, h));
1310 evas_object_change(eo_obj, obj); 1309 evas_object_change(eo_obj, obj);
1311} 1310}
1312 1311
@@ -1610,7 +1609,7 @@ _evas_text_eo_base_destructor(Eo *eo_obj, Evas_Text_Data *o EINA_UNUSED)
1610{ 1609{
1611 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); 1610 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
1612 evas_object_text_free(eo_obj, obj); 1611 evas_object_text_free(eo_obj, obj);
1613 eo_do_super(eo_obj, MY_CLASS, eo_destructor()); 1612 eo_destructor(eo_super(eo_obj, MY_CLASS));
1614} 1613}
1615 1614
1616static void 1615static void
@@ -2189,7 +2188,7 @@ _evas_object_text_rehint(Evas_Object *eo_obj)
2189 _evas_object_text_recalc(eo_obj, o->cur.text); 2188 _evas_object_text_recalc(eo_obj, o->cur.text);
2190 o->changed = 1; 2189 o->changed = 1;
2191 if (o->has_filter) 2190 if (o->has_filter)
2192 eo_do(eo_obj, evas_filter_changed_set(EINA_TRUE)); 2191 evas_filter_changed_set(eo_obj, EINA_TRUE);
2193 evas_object_change(eo_obj, obj); 2192 evas_object_change(eo_obj, obj);
2194 evas_object_clip_dirty(eo_obj, obj); 2193 evas_object_clip_dirty(eo_obj, obj);
2195 evas_object_coords_recalc(eo_obj, obj); 2194 evas_object_coords_recalc(eo_obj, obj);
@@ -2271,13 +2270,11 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text)
2271 int min; 2270 int min;
2272 2271
2273 min = w + l + r < obj->cur->geometry.w || obj->cur->geometry.w == 0 ? w + l + r : obj->cur->geometry.w; 2272 min = w + l + r < obj->cur->geometry.w || obj->cur->geometry.w == 0 ? w + l + r : obj->cur->geometry.w;
2274 eo_do_super(eo_obj, MY_CLASS, 2273 efl_gfx_size_set(eo_super(eo_obj, MY_CLASS), min, h + t + b);
2275 efl_gfx_size_set(min, h + t + b));
2276 } 2274 }
2277 else 2275 else
2278 { 2276 {
2279 eo_do_super(eo_obj, MY_CLASS, 2277 efl_gfx_size_set(eo_super(eo_obj, MY_CLASS), w + l + r, h + t + b);
2280 efl_gfx_size_set(w + l + r, h + t + b));
2281 } 2278 }
2282//// obj->cur->cache.geometry.validity = 0; 2279//// obj->cur->cache.geometry.validity = 0;
2283 } 2280 }
@@ -2285,8 +2282,7 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text)
2285 { 2282 {
2286 int t = 0, b = 0, l = 0, r = 0; 2283 int t = 0, b = 0, l = 0, r = 0;
2287 _evas_object_text_pad_get(eo_obj, o, &l, &r, &t, &b); 2284 _evas_object_text_pad_get(eo_obj, o, &l, &r, &t, &b);
2288 eo_do_super(eo_obj, MY_CLASS, 2285 efl_gfx_size_set(eo_super(eo_obj, MY_CLASS), 0, o->max_ascent + o->max_descent + t + b);
2289 efl_gfx_size_set(0, o->max_ascent + o->max_descent + t + b));
2290//// obj->cur->cache.geometry.validity = 0; 2286//// obj->cur->cache.geometry.validity = 0;
2291 } 2287 }
2292 o->last_computed.w = obj->cur->geometry.w; 2288 o->last_computed.w = obj->cur->geometry.w;
@@ -2299,47 +2295,47 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text)
2299EAPI void 2295EAPI void
2300evas_object_text_font_source_set(Eo *obj, const char *font_source) 2296evas_object_text_font_source_set(Eo *obj, const char *font_source)
2301{ 2297{
2302 eo_do((Eo *) obj, efl_text_properties_font_source_set(font_source)); 2298 efl_text_properties_font_source_set((Eo *) obj, font_source);
2303} 2299}
2304 2300
2305EAPI const char * 2301EAPI const char *
2306evas_object_text_font_source_get(const Eo *obj) 2302evas_object_text_font_source_get(const Eo *obj)
2307{ 2303{
2308 const char *font_source = 0; 2304 const char *font_source = 0;
2309 eo_do((Eo *) obj, font_source = efl_text_properties_font_source_get()); 2305 font_source = efl_text_properties_font_source_get((Eo *) obj);
2310 return font_source; 2306 return font_source;
2311} 2307}
2312 2308
2313EAPI void 2309EAPI void
2314evas_object_text_font_set(Eo *obj, const char *font, Evas_Font_Size size) 2310evas_object_text_font_set(Eo *obj, const char *font, Evas_Font_Size size)
2315{ 2311{
2316 eo_do((Eo *) obj, efl_text_properties_font_set(font, size)); 2312 efl_text_properties_font_set((Eo *) obj, font, size);
2317} 2313}
2318 2314
2319EAPI void 2315EAPI void
2320evas_object_text_font_get(const Eo *obj, const char **font, Evas_Font_Size *size) 2316evas_object_text_font_get(const Eo *obj, const char **font, Evas_Font_Size *size)
2321{ 2317{
2322 eo_do((Eo *) obj, efl_text_properties_font_get(font, size)); 2318 efl_text_properties_font_get((Eo *) obj, font, size);
2323} 2319}
2324 2320
2325EAPI void 2321EAPI void
2326evas_object_text_text_set(Eo *obj, const char *text) 2322evas_object_text_text_set(Eo *obj, const char *text)
2327{ 2323{
2328 eo_do((Eo *) obj, efl_text_set(text)); 2324 efl_text_set((Eo *) obj, text);
2329} 2325}
2330 2326
2331EAPI const char * 2327EAPI const char *
2332evas_object_text_text_get(const Eo *obj) 2328evas_object_text_text_get(const Eo *obj)
2333{ 2329{
2334 const char *ret; 2330 const char *ret;
2335 return eo_do_ret((Eo *) obj, ret, efl_text_get()); 2331 return efl_text_get((Eo *) obj);
2336} 2332}
2337 2333
2338EOLIAN static void 2334EOLIAN static void
2339_evas_text_efl_gfx_filter_filter_program_set(Eo *obj, Evas_Text_Data *pd EINA_UNUSED, const char *code, const char *name) 2335_evas_text_efl_gfx_filter_filter_program_set(Eo *obj, Evas_Text_Data *pd EINA_UNUSED, const char *code, const char *name)
2340{ 2336{
2341 pd->has_filter = (code != NULL); 2337 pd->has_filter = (code != NULL);
2342 eo_do_super(obj, MY_CLASS, efl_gfx_filter_program_set(code, name)); 2338 efl_gfx_filter_program_set(eo_super(obj, MY_CLASS), code, name);
2343} 2339}
2344 2340
2345EAPI void 2341EAPI void