summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_textblock.c
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2018-11-06 16:53:03 +0200
committerDaniel Hirt <hirt.danny@gmail.com>2018-11-06 18:13:21 +0200
commit6285cfe366e7f60b862f19981062bdd2afe08c7c (patch)
tree7d0fbce24afd24e799ab4cdcc5dc46aec9fb1114 /src/lib/evas/canvas/evas_object_textblock.c
parente1fc2ea48f14cb56548bfef9b972854ac5957110 (diff)
Efl text style: remove 'underline2_type' property
This moves the logic to the 'underline_type' property, in which we define the type.
Diffstat (limited to 'src/lib/evas/canvas/evas_object_textblock.c')
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index e028f31..faca317 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -15800,11 +15800,26 @@ _efl_canvas_text_efl_text_style_backing_color_get(const Eo *obj EINA_UNUSED, Efl
15800 _FMT_COLOR_RET(backing); 15800 _FMT_COLOR_RET(backing);
15801} 15801}
15802 15802
15803static struct
15804{
15805 Eina_Bool underline_single : 1;
15806 Eina_Bool underline_double : 1;
15807 Eina_Bool underline_dashed : 1;
15808} _style_underline_map[] = {
15809 { 0, 0, 0 },
15810 { 1, 0, 0 },
15811 { 1, 1, 0 },
15812 { 0, 0, 1 }
15813};
15814
15803static void 15815static void
15804_efl_canvas_text_efl_text_style_underline_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, Efl_Text_Style_Underline_Type type EINA_UNUSED) 15816_efl_canvas_text_efl_text_style_underline_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, Efl_Text_Style_Underline_Type type EINA_UNUSED)
15805{ 15817{
15806 ASYNC_BLOCK; 15818 ASYNC_BLOCK;
15807 _FMT_SET(underline, type); 15819 _FMT_SET(underline, _style_underline_map[type].underline_single);
15820 _FMT_SET(underline2, _style_underline_map[type].underline_double);
15821 _FMT_SET(underline_dash, _style_underline_map[type].underline_dashed);
15822
15808} 15823}
15809 15824
15810static Efl_Text_Style_Underline_Type 15825static Efl_Text_Style_Underline_Type
@@ -15879,19 +15894,6 @@ _efl_canvas_text_efl_text_style_underline_dashed_gap_get(const Eo *obj EINA_UNUS
15879} 15894}
15880 15895
15881static void 15896static void
15882_efl_canvas_text_efl_text_style_underline2_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, Efl_Text_Style_Underline_Type type EINA_UNUSED)
15883{
15884 ASYNC_BLOCK;
15885 _FMT_SET(underline2, type);
15886}
15887
15888static Efl_Text_Style_Underline_Type
15889_efl_canvas_text_efl_text_style_underline2_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED)
15890{
15891 return _FMT(underline2);
15892}
15893
15894static void
15895_efl_canvas_text_efl_text_style_underline2_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) 15897_efl_canvas_text_efl_text_style_underline2_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED)
15896{ 15898{
15897 ASYNC_BLOCK; 15899 ASYNC_BLOCK;