summaryrefslogtreecommitdiff
path: root/src/bin/elementary
diff options
context:
space:
mode:
authorAli Alzyod <ali198724@gmail.com>2019-11-28 16:55:26 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2019-11-28 16:55:27 +0900
commit7bdb63d045cf3377abb7966d018da10c4e8d6b13 (patch)
tree18d5ddd1391f755bca294fee486d1740b55dba38 /src/bin/elementary
parentfa1aa10d792129a031ec16b20d73aa99804359de (diff)
Polish text interface methods
Summary: This patch is set to rename some properties of `Efl.Text_Font` & `Efl.Text_Format` interfaces. 1- efl_text_font_set/get become (efl_text_font_family_set/get, efl_text_font_size_set/get) 2- efl_text_valign/halign become efl_text_vertical/horizontal_align 3- efl_text_halign_auto_type become efl_text_horizontal_align_auto_type Reviewers: ali.alzyod, woohyun, segfaultxavi, bu5hm4n, zmike, cedric Reviewed By: woohyun Subscribers: zmike, #committers, #reviewers, cedric Tags: #efl Differential Revision: https://phab.enlightenment.org/D10716
Diffstat (limited to 'src/bin/elementary')
-rw-r--r--src/bin/elementary/test_efl_ui_text.c12
-rw-r--r--src/bin/elementary/test_gfx_filters.c7
-rw-r--r--src/bin/elementary/test_photocam.c3
-rw-r--r--src/bin/elementary/test_ui_relative_container.c6
4 files changed, 16 insertions, 12 deletions
diff --git a/src/bin/elementary/test_efl_ui_text.c b/src/bin/elementary/test_efl_ui_text.c
index e060067..24870b5 100644
--- a/src/bin/elementary/test_efl_ui_text.c
+++ b/src/bin/elementary/test_efl_ui_text.c
@@ -67,7 +67,8 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
67 67
68 en = _create_label(win, bx); 68 en = _create_label(win, bx);
69 efl_text_markup_set(en, "You can also <b>ENTER</b> markup!"); 69 efl_text_markup_set(en, "You can also <b>ENTER</b> markup!");
70 efl_text_font_set(en, "Sans", 14); 70 efl_text_font_family_set(en, "Sans");
71 efl_text_font_size_set(en, 14);
71 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD); 72 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD);
72 efl_text_multiline_set(en, EINA_TRUE); 73 efl_text_multiline_set(en, EINA_TRUE);
73 74
@@ -76,7 +77,8 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
76 "You can use the text -> markup helper\nto make coding easier."); 77 "You can use the text -> markup helper\nto make coding easier.");
77 efl_text_markup_set(en, markup); 78 efl_text_markup_set(en, markup);
78 free(markup); 79 free(markup);
79 efl_text_font_set(en, "Sans", 14); 80 efl_text_font_family_set(en, "Sans");
81 efl_text_font_size_set(en, 14);
80 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD); 82 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD);
81 efl_text_multiline_set(en, EINA_TRUE); 83 efl_text_multiline_set(en, EINA_TRUE);
82 84
@@ -85,7 +87,8 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
85 "You can use markup -&gt; text helpers<ps>to make coding easier."); 87 "You can use markup -&gt; text helpers<ps>to make coding easier.");
86 efl_text_set(en, markup); 88 efl_text_set(en, markup);
87 free(markup); 89 free(markup);
88 efl_text_font_set(en, "Sans", 14); 90 efl_text_font_family_set(en, "Sans");
91 efl_text_font_size_set(en, 14);
89 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD); 92 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD);
90 efl_text_multiline_set(en, EINA_TRUE); 93 efl_text_multiline_set(en, EINA_TRUE);
91} 94}
@@ -161,7 +164,8 @@ test_efl_ui_text(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
161 efl_text_interactive_editable_set(en, EINA_TRUE); 164 efl_text_interactive_editable_set(en, EINA_TRUE);
162 efl_ui_text_scrollable_set(en, EINA_TRUE); 165 efl_ui_text_scrollable_set(en, EINA_TRUE);
163 166
164 efl_text_font_set(en, "Sans", 12); 167 efl_text_font_family_set(en, "Sans");
168 efl_text_font_size_set(en, 12);
165 efl_text_font_width_set(en, EFL_TEXT_FONT_WIDTH_ULTRACONDENSED); 169 efl_text_font_width_set(en, EFL_TEXT_FONT_WIDTH_ULTRACONDENSED);
166 efl_text_normal_color_set(en, 255, 255, 255, 255); 170 efl_text_normal_color_set(en, 255, 255, 255, 255);
167 171
diff --git a/src/bin/elementary/test_gfx_filters.c b/src/bin/elementary/test_gfx_filters.c
index 35360b6..988c076 100644
--- a/src/bin/elementary/test_gfx_filters.c
+++ b/src/bin/elementary/test_gfx_filters.c
@@ -294,11 +294,9 @@ _font_size_change(void *data, const Efl_Event *ev)
294{ 294{
295 Eo *win = data; 295 Eo *win = data;
296 Eo *text; 296 Eo *text;
297 const char *font;
298 297
299 text = efl_key_wref_get(win, "text"); 298 text = efl_key_wref_get(win, "text");
300 efl_text_font_get(text, &font, NULL); 299 efl_text_font_size_set(text, elm_spinner_value_get(ev->object));
301 efl_text_font_set(text, font, elm_spinner_value_get(ev->object));
302} 300}
303 301
304static void 302static void
@@ -462,7 +460,8 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
462 // Note: No TEXT object with EO APIs 460 // Note: No TEXT object with EO APIs
463 o = text = evas_object_text_add(evas_object_evas_get(win)); 461 o = text = evas_object_text_add(evas_object_evas_get(win));
464 efl_event_callback_add(o, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _text_resize, NULL); 462 efl_event_callback_add(o, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _text_resize, NULL);
465 efl_text_font_set(o, "Sans:style=Bold", default_font_size); 463 efl_text_font_family_set(o, "Sans:style=Bold");
464 efl_text_font_size_set(o, default_font_size);
466 efl_gfx_entity_scale_set(text, elm_config_scale_get()); 465 efl_gfx_entity_scale_set(text, elm_config_scale_get());
467 efl_text_set(o, "EFL"); 466 efl_text_set(o, "EFL");
468 efl_gfx_entity_visible_set(o, 1); 467 efl_gfx_entity_visible_set(o, 1);
diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c
index 78aa528..72d9b2f 100644
--- a/src/bin/elementary/test_photocam.c
+++ b/src/bin/elementary/test_photocam.c
@@ -817,7 +817,8 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
817 efl_text_set(efl_added, "Clicking the image will play/pause animation."), 817 efl_text_set(efl_added, "Clicking the image will play/pause animation."),
818 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 818 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
819 efl_gfx_hint_weight_set(efl_added, 1, 0), 819 efl_gfx_hint_weight_set(efl_added, 1, 0),
820 efl_text_font_set(efl_added, "Sans", 10), 820 efl_text_font_family_set(efl_added, "Sans"),
821 efl_text_font_size_set(efl_added, 10),
821 efl_text_normal_color_set(efl_added, 255, 255, 255, 255), 822 efl_text_normal_color_set(efl_added, 255, 255, 255, 255),
822 efl_pack(bx, efl_added) 823 efl_pack(bx, efl_added)
823 ); 824 );
diff --git a/src/bin/elementary/test_ui_relative_container.c b/src/bin/elementary/test_ui_relative_container.c
index 40e2c1a..4b5ca73 100644
--- a/src/bin/elementary/test_ui_relative_container.c
+++ b/src/bin/elementary/test_ui_relative_container.c
@@ -156,7 +156,7 @@ _setter_add(Eo *vbox, Eo *btn, Options option)
156 efl_add(EFL_UI_TEXT_CLASS, hbox, 156 efl_add(EFL_UI_TEXT_CLASS, hbox,
157 efl_text_set(efl_added, text), 157 efl_text_set(efl_added, text),
158 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 158 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
159 efl_text_valign_set(efl_added, 0.5), 159 efl_text_vertical_align_set(efl_added, 0.5),
160 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(40, 0)), 160 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(40, 0)),
161 efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND), 161 efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND),
162 efl_pack(hbox, efl_added)); 162 efl_pack(hbox, efl_added));
@@ -210,14 +210,14 @@ _button_frame_add(Eo *box, Eo *btn)
210 efl_add(EFL_UI_TEXT_CLASS, hbox, 210 efl_add(EFL_UI_TEXT_CLASS, hbox,
211 efl_text_set(efl_added, "to"), 211 efl_text_set(efl_added, "to"),
212 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 212 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
213 efl_text_halign_set(efl_added, 0.5), 213 efl_text_horizontal_align_set(efl_added, 0.5),
214 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(60, 0)), 214 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(60, 0)),
215 efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND), 215 efl_gfx_hint_weight_set(efl_added, 0, EFL_GFX_HINT_EXPAND),
216 efl_pack(hbox, efl_added)); 216 efl_pack(hbox, efl_added));
217 217
218 efl_add(EFL_UI_TEXT_CLASS, hbox, 218 efl_add(EFL_UI_TEXT_CLASS, hbox,
219 efl_text_set(efl_added, "relative"), 219 efl_text_set(efl_added, "relative"),
220 efl_text_halign_set(efl_added, 0.5), 220 efl_text_horizontal_align_set(efl_added, 0.5),
221 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 221 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
222 efl_pack(hbox, efl_added)); 222 efl_pack(hbox, efl_added));
223 223