From 5cf7fa7670a3160ad01171116b392a3a6757463f Mon Sep 17 00:00:00 2001 From: ali Date: Fri, 20 Dec 2019 09:49:41 +0100 Subject: [PATCH] efl.text.style: rename methods/properties and add text_ prefix Summary: efl.text.style: rename methods and properties this change will avoid conflict in the future with other interfaces or class methods. ``` Efl.Text_Style.text_color { set; get; } Efl.Text_Style.text_backing_type { set; get; } Efl.Text_Style.text_background_color { set; get;} //this was backing_color Efl.Text_Style.text_underline_type { set; } Efl.Text_Style.text_underline_color { set; get; } Efl.Text_Style.text_underline2_color { set; get; } Efl.Text_Style.text_underline_dashed_color { set; get; } Efl.Text_Style.text_underline_height { set; } Efl.Text_Style.text_underline_dashed_width { set; } Efl.Text_Style.text_underline_dashed_gap { set; } Efl.Text_Style.text_strikethrough_type { set; } Efl.Text_Style.text_strikethrough_color { set; get; } Efl.Text_Style.text_effect_type { set; } Efl.Text_Style.text_shadow_direction { set; } Efl.Text_Style.text_outline_color { set; get; } Efl.Text_Style.text_shadow_color { set; get; } Efl.Text_Style.text_glow_color { set; get; } Efl.Text_Style.text_glow2_color { set; get; } ``` T8533 Reviewers: woohyun, segfaultxavi, bu5hm4n, zmike, cedric Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10897 --- src/bin/elementary/test_efl_ui_text.c | 2 +- src/bin/elementary/test_photocam.c | 2 +- .../elementary/efl_canvas_layout_text.c | 2 +- src/lib/edje/edje_part_text.c | 100 +++++++++--------- src/lib/edje/edje_private.h | 2 +- src/lib/edje/efl_canvas_layout_part_text.eo | 36 +++---- src/lib/efl/interfaces/efl_text_style.eo | 62 +++++------ src/lib/elementary/efl_ui_textbox.c | 4 +- src/lib/evas/canvas/efl_canvas_textblock.eo | 74 ++++++------- src/lib/evas/canvas/evas_object_textblock.c | 78 +++++++------- src/tests/edje/edje_test_text.c | 10 +- src/tests/evas/evas_test_textblock.c | 4 +- 12 files changed, 189 insertions(+), 187 deletions(-) diff --git a/src/bin/elementary/test_efl_ui_text.c b/src/bin/elementary/test_efl_ui_text.c index 066e73295a..1d098c1052 100644 --- a/src/bin/elementary/test_efl_ui_text.c +++ b/src/bin/elementary/test_efl_ui_text.c @@ -166,7 +166,7 @@ test_efl_ui_text(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve efl_text_font_family_set(en, "Sans"); efl_text_font_size_set(en, 12); efl_text_font_width_set(en, EFL_TEXT_FONT_WIDTH_ULTRACONDENSED); - efl_text_normal_color_set(en, 255, 255, 255, 255); + efl_text_color_set(en, 255, 255, 255, 255); efl_text_set(en, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\n" diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c index 166f669a42..de7b827a84 100644 --- a/src/bin/elementary/test_photocam.c +++ b/src/bin/elementary/test_photocam.c @@ -819,7 +819,7 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE efl_gfx_hint_weight_set(efl_added, 1, 0), efl_text_font_family_set(efl_added, "Sans"), efl_text_font_size_set(efl_added, 10), - efl_text_normal_color_set(efl_added, 255, 255, 255, 255), + efl_text_color_set(efl_added, 255, 255, 255, 255), efl_pack(bx, efl_added) ); diff --git a/src/examples/elementary/efl_canvas_layout_text.c b/src/examples/elementary/efl_canvas_layout_text.c index bafd0dd2e5..268dd487d0 100644 --- a/src/examples/elementary/efl_canvas_layout_text.c +++ b/src/examples/elementary/efl_canvas_layout_text.c @@ -134,7 +134,7 @@ efl_main(void *data EINA_UNUSED, efl_text_markup_set(efl_part(layout, "text"), "This is an example text. This is a layout text part."); efl_text_wrap_set(efl_part(layout, "text"), wraps[wrap_itr].wrap); - efl_text_normal_color_set(efl_part(layout, "text"), 255, 255, 0, 255); + efl_text_color_set(efl_part(layout, "text"), 255, 255, 0, 255); efl_text_font_family_set(efl_part(layout, "text"), "Serif"); efl_text_font_size_set(efl_part(layout, "text"), 12); diff --git a/src/lib/edje/edje_part_text.c b/src/lib/edje/edje_part_text.c index 876c4ab7af..575779e868 100644 --- a/src/lib/edje/edje_part_text.c +++ b/src/lib/edje/edje_part_text.c @@ -41,9 +41,9 @@ _efl_canvas_layout_part_text_efl_text_markup_markup_set(Eo *obj, /* More Efl.Text.* API (@since 1.22) */ EOLIAN static void -_efl_canvas_layout_part_text_efl_text_style_backing_type_set(Eo *obj, +_efl_canvas_layout_part_text_efl_text_style_text_background_type_set(Eo *obj, void *_pd EINA_UNUSED, - Efl_Text_Style_Backing_Type type) + Efl_Text_Style_Background_Type type) { Edje_User_Defined *eud; @@ -53,19 +53,19 @@ _efl_canvas_layout_part_text_efl_text_style_backing_type_set(Eo *obj, eud = _edje_user_text_style_definition_fetch(pd->ed, pd->part); eud->u.text_style.types |= EDJE_PART_TEXT_PROP_NONE; - efl_text_backing_type_set(pd->rp->object, type); + efl_text_background_type_set(pd->rp->object, type); } -EOLIAN static Efl_Text_Style_Backing_Type -_efl_canvas_layout_part_text_efl_text_style_backing_type_get(const Eo *obj, +EOLIAN static Efl_Text_Style_Background_Type +_efl_canvas_layout_part_text_efl_text_style_text_background_type_get(const Eo *obj, void *_pd EINA_UNUSED) { PROXY_DATA_GET(obj, pd); if (pd->rp->part->type == EDJE_PART_TYPE_TEXT) - return EFL_TEXT_STYLE_BACKING_TYPE_DISABLED; + return EFL_TEXT_STYLE_BACKGROUND_TYPE_DISABLED; - return efl_text_backing_type_get(pd->rp->object); + return efl_text_background_type_get(pd->rp->object); } #define TEXT_COLOR_IMPL(x, X) \ @@ -82,7 +82,7 @@ _efl_canvas_layout_part_text_efl_text_style_ ##x ##_color_set(Eo *obj, \ eud = _edje_user_text_style_definition_fetch(pd->ed, pd->part); \ \ eud->u.text_style.types |= EDJE_PART_TEXT_PROP_COLOR_ ##X; \ - efl_text_ ##x ##_color_set(pd->rp->object, r, g, b, a); \ + efl_ ##x ##_color_set(pd->rp->object, r, g, b, a); \ } \ \ EOLIAN static void \ @@ -93,22 +93,22 @@ _efl_canvas_layout_part_text_efl_text_style_ ##x ##_color_get(const Eo *obj, \ PROXY_DATA_GET(obj, pd); \ *r = *g = *b = *a = 0; \ if (pd->rp->part->type == EDJE_PART_TYPE_TEXT) return; \ - efl_text_ ##x ##_color_get(pd->rp->object, r, g, b, a); \ + efl_ ##x ##_color_get(pd->rp->object, r, g, b, a); \ } -TEXT_COLOR_IMPL(backing, BACKING) -TEXT_COLOR_IMPL(glow, GLOW) -TEXT_COLOR_IMPL(glow2, GLOW2) -TEXT_COLOR_IMPL(normal, NORMAL) -TEXT_COLOR_IMPL(outline, OUTLINE) -TEXT_COLOR_IMPL(shadow, SHADOW) -TEXT_COLOR_IMPL(strikethrough, STRIKETHROUGH) -TEXT_COLOR_IMPL(underline, UNDERLINE) -TEXT_COLOR_IMPL(underline2, UNDERLINE2) -TEXT_COLOR_IMPL(underline_dashed, UNDERLINE_DASHED) +TEXT_COLOR_IMPL(text_background, BACKING) +TEXT_COLOR_IMPL(text_glow, GLOW) +TEXT_COLOR_IMPL(text_glow2, GLOW2) +TEXT_COLOR_IMPL(text, NORMAL) +TEXT_COLOR_IMPL(text_outline, OUTLINE) +TEXT_COLOR_IMPL(text_shadow, SHADOW) +TEXT_COLOR_IMPL(text_strikethrough, STRIKETHROUGH) +TEXT_COLOR_IMPL(text_underline, UNDERLINE) +TEXT_COLOR_IMPL(text_underline2, UNDERLINE2) +TEXT_COLOR_IMPL(text_underline_dashed, UNDERLINE_DASHED) EOLIAN static void -_efl_canvas_layout_part_text_efl_text_style_effect_type_set(Eo *obj, +_efl_canvas_layout_part_text_efl_text_style_text_effect_type_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Text_Style_Effect_Type type) { @@ -201,7 +201,7 @@ _efl_canvas_layout_part_text_efl_text_font_font_size_get(const Eo *obj, } EOLIAN static void -_efl_canvas_layout_part_text_efl_text_style_shadow_direction_set(Eo *obj, +_efl_canvas_layout_part_text_efl_text_style_text_shadow_direction_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Text_Style_Shadow_Direction type) { @@ -217,7 +217,7 @@ _efl_canvas_layout_part_text_efl_text_style_shadow_direction_set(Eo *obj, } EOLIAN static void -_efl_canvas_layout_part_text_efl_text_style_strikethrough_type_set(Eo *obj, +_efl_canvas_layout_part_text_efl_text_style_text_strikethrough_type_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Text_Style_Strikethrough_Type type) { @@ -233,7 +233,7 @@ _efl_canvas_layout_part_text_efl_text_style_strikethrough_type_set(Eo *obj, } EOLIAN static void -_efl_canvas_layout_part_text_efl_text_style_underline_type_set(Eo *obj, +_efl_canvas_layout_part_text_efl_text_style_text_underline_type_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Text_Style_Underline_Type type) { @@ -250,7 +250,7 @@ _efl_canvas_layout_part_text_efl_text_style_underline_type_set(Eo *obj, } EOLIAN static void -_efl_canvas_layout_part_text_efl_text_style_underline_height_set(Eo *obj, +_efl_canvas_layout_part_text_efl_text_style_text_underline_height_set(Eo *obj, void *_pd EINA_UNUSED, double value) { @@ -266,7 +266,7 @@ _efl_canvas_layout_part_text_efl_text_style_underline_height_set(Eo *obj, } EOLIAN static void -_efl_canvas_layout_part_text_efl_text_style_underline_dashed_width_set(Eo *obj, +_efl_canvas_layout_part_text_efl_text_style_text_underline_dashed_width_set(Eo *obj, void *_pd EINA_UNUSED, int value) { @@ -282,7 +282,7 @@ _efl_canvas_layout_part_text_efl_text_style_underline_dashed_width_set(Eo *obj, } EOLIAN static void -_efl_canvas_layout_part_text_efl_text_style_underline_dashed_gap_set(Eo *obj, +_efl_canvas_layout_part_text_efl_text_style_text_underline_dashed_gap_set(Eo *obj, void *_pd EINA_UNUSED, int value) { @@ -353,28 +353,28 @@ _canvas_layout_user_text_collect(Edje *ed, Edje_User_Defined *eud) Edje_Part_Text_Prop *prop; prop = _prop_new(props, EDJE_PART_TEXT_PROP_BACKING_TYPE); - prop->val.backing = efl_text_backing_type_get(rp->object); + prop->val.backing = efl_text_background_type_get(rp->object); } #define STYLE_COLOR_COLLECT(x, X) \ if (eud->u.text_style.types & EDJE_PART_TEXT_PROP_COLOR_ ##X) \ { \ Edje_Part_Text_Prop *prop; \ prop = _prop_new(props, EDJE_PART_TEXT_PROP_COLOR_ ##X); \ - efl_text_ ##x ##_color_get(rp->object, \ + efl_ ##x ##_color_get(rp->object, \ &prop->val.color.r, &prop->val.color.g, \ &prop->val.color.b, &prop->val.color.a); \ } \ - STYLE_COLOR_COLLECT(backing, BACKING) - STYLE_COLOR_COLLECT(glow, GLOW) - STYLE_COLOR_COLLECT(glow2, GLOW2) - STYLE_COLOR_COLLECT(normal, NORMAL) - STYLE_COLOR_COLLECT(outline, OUTLINE) - STYLE_COLOR_COLLECT(shadow, SHADOW) - STYLE_COLOR_COLLECT(strikethrough, STRIKETHROUGH) - STYLE_COLOR_COLLECT(underline, UNDERLINE) - STYLE_COLOR_COLLECT(underline2, UNDERLINE2) - STYLE_COLOR_COLLECT(underline_dashed, UNDERLINE_DASHED) + STYLE_COLOR_COLLECT(text_background, BACKING) + STYLE_COLOR_COLLECT(text_glow, GLOW) + STYLE_COLOR_COLLECT(text_glow2, GLOW2) + STYLE_COLOR_COLLECT(text, NORMAL) + STYLE_COLOR_COLLECT(text_outline, OUTLINE) + STYLE_COLOR_COLLECT(text_shadow, SHADOW) + STYLE_COLOR_COLLECT(text_strikethrough, STRIKETHROUGH) + STYLE_COLOR_COLLECT(text_underline, UNDERLINE) + STYLE_COLOR_COLLECT(text_underline2, UNDERLINE2) + STYLE_COLOR_COLLECT(text_underline_dashed, UNDERLINE_DASHED) #undef STYLE_COLOR_COLLECT if (eud->u.text_style.types & EDJE_PART_TEXT_PROP_EFFECT_TYPE) @@ -468,7 +468,7 @@ _canvas_layout_user_text_apply(Edje_User_Defined *eud, Eo *obj, { case EDJE_PART_TEXT_PROP_BACKING_TYPE: - efl_text_backing_type_set( + efl_text_background_type_set( efl_part(obj, eud->part), prop->val.backing); @@ -476,7 +476,7 @@ _canvas_layout_user_text_apply(Edje_User_Defined *eud, Eo *obj, #define STYLE_COLOR_CASE(x, X) \ case EDJE_PART_TEXT_PROP_COLOR_##X : \ - efl_text_##x ##_color_set(efl_part(obj, \ + efl_##x ##_color_set(efl_part(obj, \ eud->part), \ prop->val.color.r, \ prop->val.color.g, \ @@ -484,16 +484,16 @@ _canvas_layout_user_text_apply(Edje_User_Defined *eud, Eo *obj, prop->val.color.a); \ break; - STYLE_COLOR_CASE(backing, BACKING) - STYLE_COLOR_CASE(glow, GLOW) - STYLE_COLOR_CASE(glow2, GLOW2) - STYLE_COLOR_CASE(normal, NORMAL) - STYLE_COLOR_CASE(outline, OUTLINE) - STYLE_COLOR_CASE(shadow, SHADOW) - STYLE_COLOR_CASE(strikethrough, STRIKETHROUGH) - STYLE_COLOR_CASE(underline, UNDERLINE) - STYLE_COLOR_CASE(underline2, UNDERLINE2) - STYLE_COLOR_CASE(underline_dashed, UNDERLINE_DASHED) + STYLE_COLOR_CASE(text_background, BACKING) + STYLE_COLOR_CASE(text_glow, GLOW) + STYLE_COLOR_CASE(text_glow2, GLOW2) + STYLE_COLOR_CASE(text, NORMAL) + STYLE_COLOR_CASE(text_outline, OUTLINE) + STYLE_COLOR_CASE(text_shadow, SHADOW) + STYLE_COLOR_CASE(text_strikethrough, STRIKETHROUGH) + STYLE_COLOR_CASE(text_underline, UNDERLINE) + STYLE_COLOR_CASE(text_underline2, UNDERLINE2) + STYLE_COLOR_CASE(text_underline_dashed, UNDERLINE_DASHED) #undef STYLE_COLOR_CASE case EDJE_PART_TEXT_PROP_EFFECT_TYPE: diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index c572d74991..9a293e2e33 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -2316,7 +2316,7 @@ typedef struct int ni; // number integer int nd; // number double Efl_Text_Format_Wrap wrap; - Efl_Text_Style_Backing_Type backing; + Efl_Text_Style_Background_Type backing; Efl_Text_Style_Underline_Type underline; struct { diff --git a/src/lib/edje/efl_canvas_layout_part_text.eo b/src/lib/edje/efl_canvas_layout_part_text.eo index cacf430a57..ed3cc4ec04 100644 --- a/src/lib/edje/efl_canvas_layout_part_text.eo +++ b/src/lib/edje/efl_canvas_layout_part_text.eo @@ -40,23 +40,23 @@ Efl.Text_Markup, Efl.Text_Format, Efl.Text_Font, Efl.Text_Style Efl.Text_Format.wrap { set; get; } Efl.Text_Font.font_family { set; get; } Efl.Text_Font.font_size { set; get; } - Efl.Text_Style.normal_color { set; get; } - Efl.Text_Style.backing_type { set; get; } - Efl.Text_Style.backing_color { set; get;} - Efl.Text_Style.underline_type { set; } - Efl.Text_Style.underline_color { set; get; } - Efl.Text_Style.underline2_color { set; get; } - Efl.Text_Style.underline_dashed_color { set; get; } - Efl.Text_Style.underline_height { set; } - Efl.Text_Style.underline_dashed_width { set; } - Efl.Text_Style.underline_dashed_gap { set; } - Efl.Text_Style.strikethrough_type { set; } - Efl.Text_Style.strikethrough_color { set; get; } - Efl.Text_Style.effect_type { set; } - Efl.Text_Style.shadow_direction { set; } - Efl.Text_Style.outline_color { set; get; } - Efl.Text_Style.shadow_color { set; get; } - Efl.Text_Style.glow_color { set; get; } - Efl.Text_Style.glow2_color { set; get; } + Efl.Text_Style.text_color { set; get; } + Efl.Text_Style.text_background_type { set; get; } + Efl.Text_Style.text_background_color { set; get;} + Efl.Text_Style.text_underline_type { set; } + Efl.Text_Style.text_underline_color { set; get; } + Efl.Text_Style.text_underline2_color { set; get; } + Efl.Text_Style.text_underline_dashed_color { set; get; } + Efl.Text_Style.text_underline_height { set; } + Efl.Text_Style.text_underline_dashed_width { set; } + Efl.Text_Style.text_underline_dashed_gap { set; } + Efl.Text_Style.text_strikethrough_type { set; } + Efl.Text_Style.text_strikethrough_color { set; get; } + Efl.Text_Style.text_effect_type { set; } + Efl.Text_Style.text_shadow_direction { set; } + Efl.Text_Style.text_outline_color { set; get; } + Efl.Text_Style.text_shadow_color { set; get; } + Efl.Text_Style.text_glow_color { set; get; } + Efl.Text_Style.text_glow2_color { set; get; } } } diff --git a/src/lib/efl/interfaces/efl_text_style.eo b/src/lib/efl/interfaces/efl_text_style.eo index 9b66595558..17c209e01d 100644 --- a/src/lib/efl/interfaces/efl_text_style.eo +++ b/src/lib/efl/interfaces/efl_text_style.eo @@ -1,8 +1,9 @@ -enum @beta Efl.Text_Style_Backing_Type +enum @beta Efl.Text_Style_Background_Type { - [[Whether to add a background colored rectangle (backing) to each line of text or not.]] - disabled = 0, [[Do not use backing.]] - enabled, [[Use backing.]] + [[Whether to add a background colored rectangle (background) to each line of text or not.]] + disabled = 0, [[Do not use background.]] + enabled, [[Use background.]] + } enum @beta Efl.Text_Style_Strikethrough_Type @@ -10,6 +11,7 @@ enum @beta Efl.Text_Style_Strikethrough_Type [[Whether to add a strike-through decoration to the displayed text or not.]] disabled = 0, [[Do not use strike-through.]] enabled, [[Use strike-through.]] + } enum @beta Efl.Text_Style_Effect_Type @@ -62,7 +64,7 @@ interface @beta Efl.Text_Style { ]] c_prefix: efl_text; methods { - @property normal_color { + @property text_color { [[Color of text, excluding decorations like, shadow, outline or glow.]] values { @@ -73,15 +75,15 @@ interface @beta Efl.Text_Style { } } - @property backing_type { + @property text_background_type { [[Enables rendering of a background rectangle behind each line of text.]] values { - type: Efl.Text_Style_Backing_Type; [[Backing type.]] + type: Efl.Text_Style_Background_Type; [[Background type.]] } } - @property backing_color { + @property text_background_color { [[Color of the background rectangle (backing) behind each line of text.]] values { @@ -92,7 +94,7 @@ interface @beta Efl.Text_Style { } } - @property underline_type { + @property text_underline_type { [[Underline style for the text.]] values { @@ -100,7 +102,7 @@ interface @beta Efl.Text_Style { } } - @property underline_color + @property text_underline_color { [[Color of normal underline style.]] values @@ -112,9 +114,9 @@ interface @beta Efl.Text_Style { } } - @property underline_height + @property text_underline_height { - [[Width (in pixels) of the single underline when @.underline_type is + [[Width (in pixels) of the single underline when @.text_underline_type is @Efl.Text_Style_Underline_Type.single.]] values { @@ -122,9 +124,9 @@ interface @beta Efl.Text_Style { } } - @property underline_dashed_color + @property text_underline_dashed_color { - [[Color of the dashed underline. Only valid when @.underline_type is + [[Color of the dashed underline. Only valid when @.text_underline_type is @Efl.Text_Style_Underline_Type.dashed.]] values { @@ -135,9 +137,9 @@ interface @beta Efl.Text_Style { } } - @property underline_dashed_width + @property text_underline_dashed_width { - [[Length (in pixels) of the dashes when @.underline_type is + [[Length (in pixels) of the dashes when @.text_underline_type is @Efl.Text_Style_Underline_Type.dashed.]] values { @@ -145,9 +147,9 @@ interface @beta Efl.Text_Style { } } - @property underline_dashed_gap + @property text_underline_dashed_gap { - [[Length (in pixels) of the gaps between the dashes when @.underline_type is + [[Length (in pixels) of the gaps between the dashes when @.text_underline_type is @Efl.Text_Style_Underline_Type.dashed.]] values { @@ -155,9 +157,9 @@ interface @beta Efl.Text_Style { } } - @property underline2_color + @property text_underline2_color { - [[Color of the secondary underline. Only valid when @.underline_type is + [[Color of the secondary underline. Only valid when @.text_underline_type is @Efl.Text_Style_Underline_Type.double.]] values { @@ -168,7 +170,7 @@ interface @beta Efl.Text_Style { } } - @property strikethrough_type { + @property text_strikethrough_type { [[Enables crossed-out text.]] values { @@ -176,7 +178,7 @@ interface @beta Efl.Text_Style { } } - @property strikethrough_color + @property text_strikethrough_color { [[Color of the line striking through the text.]] values @@ -188,14 +190,14 @@ interface @beta Efl.Text_Style { } } - @property effect_type { + @property text_effect_type { [[Controls a number of decorations around the text, like shadow, outline and glow, including combinations of them.]] values { type: Efl.Text_Style_Effect_Type; [[Effect type.]] } } - @property outline_color + @property text_outline_color { [[Color of the text outline.]] values @@ -207,7 +209,7 @@ interface @beta Efl.Text_Style { } } - @property shadow_direction + @property text_shadow_direction { [[Direction of shadow effect.]] values @@ -216,7 +218,7 @@ interface @beta Efl.Text_Style { } } - @property shadow_color + @property text_shadow_color { [[Color of the shadow.]] values @@ -228,7 +230,7 @@ interface @beta Efl.Text_Style { } } - @property glow_color + @property text_glow_color { [[Color of the glow decoration.]] values @@ -240,11 +242,11 @@ interface @beta Efl.Text_Style { } } - @property glow2_color + @property text_glow2_color { [[Color of the secondary glow decoration. This is the color of the inner glow (where it touches the text) which - gradually fades into @.glow_color as it reaches the edge. + gradually fades into @.text_glow_color as it reaches the edge. ]] values { @@ -255,7 +257,7 @@ interface @beta Efl.Text_Style { } } - @property gfx_filter + @property text_gfx_filter { [[Program that applies a special filter diff --git a/src/lib/elementary/efl_ui_textbox.c b/src/lib/elementary/efl_ui_textbox.c index 456f9f8889..26e09f0f72 100644 --- a/src/lib/elementary/efl_ui_textbox.c +++ b/src/lib/elementary/efl_ui_textbox.c @@ -1925,7 +1925,7 @@ _update_text_theme(Eo *obj, Efl_Ui_Textbox_Data *sd) colorcode = edje_object_data_get(wd->resize_obj, "style.color"); if (colorcode && _format_color_parse(colorcode, strlen(colorcode), &r, &g, &b, &a)) { - efl_text_normal_color_set(sd->text_obj, r, g, b, a); + efl_text_color_set(sd->text_obj, r, g, b, a); } // Guide Text @@ -1943,7 +1943,7 @@ _update_text_theme(Eo *obj, Efl_Ui_Textbox_Data *sd) colorcode = edje_object_data_get(wd->resize_obj, "guide.style.color"); if (colorcode && _format_color_parse(colorcode, strlen(colorcode), &r, &g, &b, &a)) { - efl_text_normal_color_set(sd->text_guide_obj, r, g, b, a); + efl_text_color_set(sd->text_guide_obj, r, g, b, a); } } diff --git a/src/lib/evas/canvas/efl_canvas_textblock.eo b/src/lib/evas/canvas/efl_canvas_textblock.eo index d183574817..978c502b2c 100644 --- a/src/lib/evas/canvas/efl_canvas_textblock.eo +++ b/src/lib/evas/canvas/efl_canvas_textblock.eo @@ -10,7 +10,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, Note: No text will be rendered until a font, a font size and a font color are specified. This can be accomplished using @Efl.Text_Font.font_family, @Efl.Text_Font.font_size and - @Efl.Text_Style.normal_color. + @Efl.Text_Style.text_color. Alternatively, @.style_apply can be used providing the attributes $font, $font_size and $color. ]] methods { @@ -139,53 +139,53 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, - $color: Color code for the text (See bottom for the complete list of supported codes). Default value is $[rgba(0,0,0,0)] meaning that no text will be rendered. Requires $font and $font_size. - See @Efl.Text_Style.normal_color. + See @Efl.Text_Style.text_color. - $underline_color: Color code for the text underline (See bottom for the complete list of supported codes). Default value is $[rgba(0,0,0,0)] meaning that no underline will be rendered. Requires $underline. - See @Efl.Text_Style.underline_color. + See @Efl.Text_Style.text_underline_color. - $underline2_color: Color code for the secondary text underline (See bottom for the complete list of supported codes). Only valid when $[underline=double]. Default value is $[rgba(0,0,0,0)] meaning that secondary underline will not be rendered. - See @Efl.Text_Style.underline2_color. + See @Efl.Text_Style.text_underline2_color. - $underline_dash_color: Color code for the dashed underline (See bottom for the complete list of supported codes). Only valid when $[underline=dashed]. Default value is $[rgba(0,0,0,0)] meaning that dashed underline will not be rendered. - See @Efl.Text_Style.underline_dashed_color. + See @Efl.Text_Style.text_underline_dashed_color. - $outline_color: Color code for the text outline (See bottom for the complete list of supported codes). Only valid when the $style attribute includes an outline. Default value is $[rgba(0,0,0,0)] meaning that no outline will be rendered. - See @Efl.Text_Style.outline_color. + See @Efl.Text_Style.text_outline_color. - $shadow_color: Color code for the text shadow (See bottom for the complete list of supported codes). Only valid when the $style attribute includes a shadow. Default value is $[rgba(0,0,0,0)] meaning that no shadow will be rendered. - See @Efl.Text_Style.shadow_color. + See @Efl.Text_Style.text_shadow_color. - $glow_color: Color code for the glow component of the text (See bottom for the complete list of supported codes). Only valid when the $style attribute includes a glow. Default value is $[rgba(0,0,0,0)] meaning that no glow will be rendered. - See @Efl.Text_Style.glow_color. + See @Efl.Text_Style.text_glow_color. - $glow2_color: Color code for the secondary (inner) glow component of the text (See bottom for the complete list of supported codes). Only valid when the $style attribute includes a glow. Default value is $[rgba(0,0,0,0)] meaning that only the primary $glow_color will be used. - See @Efl.Text_Style.glow2_color. + See @Efl.Text_Style.text_glow2_color. - $backing_color: Color code for the background of the text (See bottom for the complete list of supported codes). Use a fully transparent color to disable the background. Default value is $[rgba(0,0,0,0)] meaning that no backing will be rendered. Requires $backing. - See @Efl.Text_Style.backing_color. + See @Efl.Text_Style.text_background_color. - $strikethrough_color: Color code for the line striking through the text (See bottom for the complete list of supported codes). Only valid when $[strikethrough=on] Default value is $[rgba(0,0,0,0)] meaning that no strike-through line will be rendered. - See @Efl.Text_Style.strikethrough_color. + See @Efl.Text_Style.text_strikethrough_color. - $align: Horizontal alignment of the text. The value can either be a decimal number ($[0.0] means "left" and $[1.0] means "right"), a percentage ($[0%] means "left" and $[100%] means "right") or one of: @@ -230,17 +230,17 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, $dashed (A dashed line under the text). Default value is $off. Requires either $underline_color, $underline2_color or $underline_dash_color. - See @Efl.Text_Style.underline_type. + See @Efl.Text_Style.text_underline_type. - $strikethrough: Enables crossed-out text. Possible values are $on and $off. Default value is $off. Requires $strikethrough_color. - See @Efl.Text_Style.strikethrough_type. + See @Efl.Text_Style.text_strikethrough_type. - $backing: Enables background color for the text. Possible values are $on and $off. Default value is $off. Requires $backing_color. - See @Efl.Text_Style.backing_type. + See @Efl.Text_Style.text_background_type. - $style: Controls a number of decorations around the text, like shadow, outline and glow, including combinations of them. Possible values are $plain (No decoration, alias for $off and $none), @@ -252,7 +252,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, Default value is $plain. Requires either $shadow_color, $glow_color or $outline_color. Examples: $[style=outline], $[style=shadow,bottom_right], $[style=outline_shadow,bottom]. - See @Efl.Text_Style.effect_type and @Efl.Text_Style.shadow_direction. + See @Efl.Text_Style.text_effect_type and @Efl.Text_Style.text_shadow_direction. - $tabstops: Size (in pixels) of the tab character. The value must be a number greater than one. Default value is $[32]. @@ -311,15 +311,15 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, - $underline_dash_width: Length (in pixels) of the dashes when $underline is $dashed. Default value is $[6]. - See @Efl.Text_Style.underline_dashed_width. + See @Efl.Text_Style.text_underline_dashed_width. - $underline_dash_gap: Length (in pixels) of the gaps between the dashes when $underline is $dashed. Default value is $[2]. - See @Efl.Text_Style.underline_dashed_gap. + See @Efl.Text_Style.text_underline_dashed_gap. - $underline_height: Width (in pixels) of the single underline when $underline is $single. Default value is $[1]. - See @Efl.Text_Style.underline_height. + See @Efl.Text_Style.text_underline_height. - $gfx_filter: Experimental filter name. See @Efl.Gfx.Filter for more information. @@ -457,25 +457,25 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, Efl.Text_Font.font_slant { get; set; } Efl.Text_Font.font_width { get; set; } Efl.Text_Font.font_bitmap_scalable { get; set; } - Efl.Text_Style.normal_color { get; set; } - Efl.Text_Style.backing_type { get; set; } - Efl.Text_Style.backing_color { get; set; } - Efl.Text_Style.underline_type { get; set; } - Efl.Text_Style.underline_color { get; set; } - Efl.Text_Style.underline_height { get; set; } - Efl.Text_Style.underline_dashed_color { get; set; } - Efl.Text_Style.underline_dashed_width { get; set; } - Efl.Text_Style.underline_dashed_gap { get; set; } - Efl.Text_Style.underline2_color { get; set; } - Efl.Text_Style.strikethrough_type { get; set; } - Efl.Text_Style.strikethrough_color { get; set; } - Efl.Text_Style.effect_type { get; set; } - Efl.Text_Style.outline_color { get; set; } - Efl.Text_Style.shadow_direction { get; set; } - Efl.Text_Style.shadow_color { get; set; } - Efl.Text_Style.glow_color { get; set; } - Efl.Text_Style.glow2_color { get; set; } - Efl.Text_Style.gfx_filter { get; set; } + Efl.Text_Style.text_color { get; set; } + Efl.Text_Style.text_background_type { get; set; } + Efl.Text_Style.text_background_color { get; set; } + Efl.Text_Style.text_underline_type { get; set; } + Efl.Text_Style.text_underline_color { get; set; } + Efl.Text_Style.text_underline_height { get; set; } + Efl.Text_Style.text_underline_dashed_color { get; set; } + Efl.Text_Style.text_underline_dashed_width { get; set; } + Efl.Text_Style.text_underline_dashed_gap { get; set; } + Efl.Text_Style.text_underline2_color { get; set; } + Efl.Text_Style.text_strikethrough_type { get; set; } + Efl.Text_Style.text_strikethrough_color { get; set; } + Efl.Text_Style.text_effect_type { get; set; } + Efl.Text_Style.text_outline_color { get; set; } + Efl.Text_Style.text_shadow_direction { get; set; } + Efl.Text_Style.text_shadow_color { get; set; } + Efl.Text_Style.text_glow_color { get; set; } + Efl.Text_Style.text_glow2_color { get; set; } + Efl.Text_Style.text_gfx_filter { get; set; } Efl.Text_Format.ellipsis { get; set; } Efl.Text_Format.wrap { get; set; } Efl.Text_Format.multiline { get; set; } diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 0c31bd8189..c15da53564 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -16345,40 +16345,40 @@ _efl_canvas_textblock_efl_text_font_font_bitmap_scalable_get(const Eo *obj EINA_ if (changed) _canvas_text_format_changed(obj, o); static void -_efl_canvas_textblock_efl_text_style_normal_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) { ASYNC_BLOCK; _FMT_COLOR_SET(normal); } static void -_efl_canvas_textblock_efl_text_style_normal_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) { _FMT_COLOR_RET(normal); } static void -_efl_canvas_textblock_efl_text_style_backing_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Efl_Text_Style_Backing_Type type EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_background_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Efl_Text_Style_Background_Type type EINA_UNUSED) { ASYNC_BLOCK; _FMT_SET(backing, type); } -static Efl_Text_Style_Backing_Type -_efl_canvas_textblock_efl_text_style_backing_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) +static Efl_Text_Style_Background_Type +_efl_canvas_textblock_efl_text_style_text_background_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) { return _FMT(backing); } static void -_efl_canvas_textblock_efl_text_style_backing_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_background_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) { ASYNC_BLOCK; _FMT_COLOR_SET(backing); } static void -_efl_canvas_textblock_efl_text_style_backing_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_background_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) { _FMT_COLOR_RET(backing); } @@ -16396,7 +16396,7 @@ static struct }; static void -_efl_canvas_textblock_efl_text_style_underline_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Efl_Text_Style_Underline_Type type EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Efl_Text_Style_Underline_Type type EINA_UNUSED) { ASYNC_BLOCK; _FMT_SET(underline, _style_underline_map[type].underline_single); @@ -16406,111 +16406,111 @@ _efl_canvas_textblock_efl_text_style_underline_type_set(Eo *obj EINA_UNUSED, Efl } static Efl_Text_Style_Underline_Type -_efl_canvas_textblock_efl_text_style_underline_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) { return _FMT(underline); } static void -_efl_canvas_textblock_efl_text_style_underline_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) { ASYNC_BLOCK; _FMT_COLOR_SET(underline); } static void -_efl_canvas_textblock_efl_text_style_underline_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) { _FMT_COLOR_RET(underline); } static void -_efl_canvas_textblock_efl_text_style_underline_height_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, double height EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline_height_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, double height EINA_UNUSED) { ASYNC_BLOCK; _FMT_SET(underline_height, height); } static double -_efl_canvas_textblock_efl_text_style_underline_height_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline_height_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) { return _FMT(underline_height); } static void -_efl_canvas_textblock_efl_text_style_underline_dashed_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline_dashed_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) { ASYNC_BLOCK; _FMT_COLOR_SET(underline_dash); } static void -_efl_canvas_textblock_efl_text_style_underline_dashed_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline_dashed_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) { _FMT_COLOR_RET(underline_dash); } static void -_efl_canvas_textblock_efl_text_style_underline_dashed_width_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, int width EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline_dashed_width_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, int width EINA_UNUSED) { ASYNC_BLOCK; _FMT_SET(underline_dash_width, width); } static int -_efl_canvas_textblock_efl_text_style_underline_dashed_width_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline_dashed_width_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) { return _FMT(underline_dash_width); } static void -_efl_canvas_textblock_efl_text_style_underline_dashed_gap_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, int gap EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline_dashed_gap_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, int gap EINA_UNUSED) { ASYNC_BLOCK; _FMT_SET(underline_dash_gap, gap); } static int -_efl_canvas_textblock_efl_text_style_underline_dashed_gap_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline_dashed_gap_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) { return _FMT(underline_dash_width); } static void -_efl_canvas_textblock_efl_text_style_underline2_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline2_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) { ASYNC_BLOCK; _FMT_COLOR_SET(underline2); } static void -_efl_canvas_textblock_efl_text_style_underline2_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_underline2_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) { _FMT_COLOR_RET(underline2); } static void -_efl_canvas_textblock_efl_text_style_strikethrough_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Efl_Text_Style_Strikethrough_Type type EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_strikethrough_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Efl_Text_Style_Strikethrough_Type type EINA_UNUSED) { ASYNC_BLOCK; _FMT_SET(strikethrough, type); } static Efl_Text_Style_Strikethrough_Type -_efl_canvas_textblock_efl_text_style_strikethrough_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_strikethrough_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) { return _FMT(strikethrough); } static void -_efl_canvas_textblock_efl_text_style_strikethrough_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_strikethrough_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) { ASYNC_BLOCK; _FMT_COLOR_SET(strikethrough); } static void -_efl_canvas_textblock_efl_text_style_strikethrough_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_strikethrough_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) { _FMT_COLOR_RET(strikethrough); } @@ -16578,7 +16578,7 @@ _get_dir_from_map(Efl_Text_Style_Shadow_Direction dir) } static void -_efl_canvas_textblock_efl_text_style_effect_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Efl_Text_Style_Effect_Type type EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_effect_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Efl_Text_Style_Effect_Type type EINA_UNUSED) { ASYNC_BLOCK; _FMT_INFO_SET_START(effect, type); @@ -16590,26 +16590,26 @@ _efl_canvas_textblock_efl_text_style_effect_type_set(Eo *obj EINA_UNUSED, Efl_Ca } static Efl_Text_Style_Effect_Type -_efl_canvas_textblock_efl_text_style_effect_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_effect_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) { return _FMT_INFO(effect); } static void -_efl_canvas_textblock_efl_text_style_outline_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_outline_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) { ASYNC_BLOCK; _FMT_COLOR_SET(outline); } static void -_efl_canvas_textblock_efl_text_style_outline_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_outline_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) { _FMT_COLOR_RET(outline); } static void -_efl_canvas_textblock_efl_text_style_shadow_direction_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Efl_Text_Style_Shadow_Direction type EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_shadow_direction_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Efl_Text_Style_Shadow_Direction type EINA_UNUSED) { ASYNC_BLOCK; _FMT_INFO_SET_START(shadow_direction, type); @@ -16619,52 +16619,52 @@ _efl_canvas_textblock_efl_text_style_shadow_direction_set(Eo *obj EINA_UNUSED, E } static Efl_Text_Style_Shadow_Direction -_efl_canvas_textblock_efl_text_style_shadow_direction_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_shadow_direction_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) { return _FMT_INFO(shadow_direction); } static void -_efl_canvas_textblock_efl_text_style_shadow_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_shadow_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) { ASYNC_BLOCK; _FMT_COLOR_SET(shadow); } static void -_efl_canvas_textblock_efl_text_style_shadow_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_shadow_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) { _FMT_COLOR_RET(shadow); } static void -_efl_canvas_textblock_efl_text_style_glow_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_glow_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) { ASYNC_BLOCK; _FMT_COLOR_SET(glow); } static void -_efl_canvas_textblock_efl_text_style_glow_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_glow_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) { _FMT_COLOR_RET(glow); } static void -_efl_canvas_textblock_efl_text_style_glow2_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_glow2_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) { ASYNC_BLOCK; _FMT_COLOR_SET(glow2); } static void -_efl_canvas_textblock_efl_text_style_glow2_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_glow2_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED) { _FMT_COLOR_RET(glow2); } static void -_efl_canvas_textblock_efl_text_style_gfx_filter_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, +_efl_canvas_textblock_efl_text_style_text_gfx_filter_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, const char *gfx_filter_name) { ASYNC_BLOCK; @@ -16688,7 +16688,7 @@ _efl_canvas_textblock_efl_text_style_gfx_filter_set(Eo *obj EINA_UNUSED, Efl_Can } static const char * -_efl_canvas_textblock_efl_text_style_gfx_filter_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) +_efl_canvas_textblock_efl_text_style_text_gfx_filter_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED) { return _FMT(gfx_filter)?_FMT(gfx_filter->name):NULL; } diff --git a/src/tests/edje/edje_test_text.c b/src/tests/edje/edje_test_text.c index fc5e67a442..a66132c1d8 100644 --- a/src/tests/edje/edje_test_text.c +++ b/src/tests/edje/edje_test_text.c @@ -180,7 +180,7 @@ START_TEST(edje_test_text_color) efl_file_key_set(layout, "test"); ck_assert(!efl_file_load(layout)); - efl_text_normal_color_set(efl_part(layout, "text"), 255, 255, 255, 255); + efl_text_color_set(efl_part(layout, "text"), 255, 255, 255, 255); } END_TEST @@ -195,9 +195,9 @@ _basic_check(Eo *layout, Eina_Bool set) // Just normal_color is enough if (set) { - efl_text_normal_color_set(efl_part(layout, "text"), + efl_text_color_set(efl_part(layout, "text"), 255, 255, 255, 255); - efl_text_backing_color_set(efl_part(layout, "text"), + efl_text_background_color_set(efl_part(layout, "text"), 255, 255, 255, 255); efl_text_glow_color_set(efl_part(layout, "text"), 255, 255, 255, 255); @@ -217,13 +217,13 @@ _basic_check(Eo *layout, Eina_Bool set) 255, 255, 255, 255); } - efl_text_normal_color_get(efl_part(layout, "text"), &r, &g, &b, &a); + efl_text_color_get(efl_part(layout, "text"), &r, &g, &b, &a); ck_assert_int_eq(r, 255); ck_assert_int_eq(g, 255); ck_assert_int_eq(b, 255); ck_assert_int_eq(a, 255); - efl_text_backing_color_get(efl_part(layout, "text"), &r, &g, &b, &a); + efl_text_background_color_get(efl_part(layout, "text"), &r, &g, &b, &a); ck_assert_int_eq(r, 255); ck_assert_int_eq(g, 255); ck_assert_int_eq(b, 255); diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c index 94849a57e1..e2442c7163 100644 --- a/src/tests/evas/evas_test_textblock.c +++ b/src/tests/evas/evas_test_textblock.c @@ -4649,7 +4649,7 @@ EFL_START_TEST(efl_canvas_textblock_style) ck_assert_int_eq(efl_text_wrap_get(txt), EFL_TEXT_FORMAT_WRAP_NONE); efl_canvas_textblock_style_apply(txt, "backing=on"); - ck_assert_int_eq(efl_text_backing_type_get(txt), EFL_TEXT_STYLE_BACKING_TYPE_ENABLED); + ck_assert_int_eq(efl_text_background_type_get(txt), EFL_TEXT_STYLE_BACKGROUND_TYPE_ENABLED); efl_canvas_textblock_style_apply(txt, "style=far_soft_shadow"); ck_assert_int_eq(efl_text_effect_type_get(txt), EFL_TEXT_STYLE_EFFECT_TYPE_FAR_SOFT_SHADOW); @@ -4667,7 +4667,7 @@ EFL_START_TEST(efl_canvas_textblock_style) ck_assert_int_eq(efl_text_shadow_direction_get(txt), EFL_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM); efl_canvas_textblock_style_apply(txt, "color=#EF596C"); - efl_text_normal_color_get(txt, &r, &g, &b, &a); + efl_text_color_get(txt, &r, &g, &b, &a); ck_assert_int_eq(r, 0xEF); ck_assert_int_eq(g, 0x59); ck_assert_int_eq(b, 0x6C);