From 0887b48f9febce515b21c1dcbed721efaa04fe6a Mon Sep 17 00:00:00 2001 From: SangHyeon Jade Lee Date: Wed, 11 Dec 2019 15:54:27 +0900 Subject: [PATCH 01/16] efl_ui : stablized factory classes. Summary: for mvvm publizing, caching factory and layout factory need to be out of beta. Reviewers: cedric, bu5hm4n, segfaultxavi Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10855 --- src/lib/elementary/efl_ui_caching_factory.eo | 2 +- src/lib/elementary/efl_ui_layout_factory.eo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_ui_caching_factory.eo b/src/lib/elementary/efl_ui_caching_factory.eo index e3a6c6b7b7..4fdb43dd5d 100644 --- a/src/lib/elementary/efl_ui_caching_factory.eo +++ b/src/lib/elementary/efl_ui_caching_factory.eo @@ -1,6 +1,6 @@ parse efl_app; -class @beta Efl.Ui.Caching_Factory extends Efl.Ui.Widget_Factory +class Efl.Ui.Caching_Factory extends Efl.Ui.Widget_Factory { [[Efl UI Factory that provides object caching. diff --git a/src/lib/elementary/efl_ui_layout_factory.eo b/src/lib/elementary/efl_ui_layout_factory.eo index 4640004bec..cb5fc638cf 100644 --- a/src/lib/elementary/efl_ui_layout_factory.eo +++ b/src/lib/elementary/efl_ui_layout_factory.eo @@ -1,4 +1,4 @@ -class @beta Efl.Ui.Layout_Factory extends Efl.Ui.Caching_Factory +class Efl.Ui.Layout_Factory extends Efl.Ui.Caching_Factory { [[@Efl.Ui.Factory that creates @Efl.Ui.Layout objects with caching. From de06ddb3edd30d4b92bba80e5200f5d6f3cf32e8 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 16 Dec 2019 17:23:50 +0900 Subject: [PATCH 02/16] ui position_manager: fix doc typo. --- src/lib/elementary/efl_ui_position_manager_list.eo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_position_manager_list.eo b/src/lib/elementary/efl_ui_position_manager_list.eo index ade5a1f3cf..d62d077ef8 100644 --- a/src/lib/elementary/efl_ui_position_manager_list.eo +++ b/src/lib/elementary/efl_ui_position_manager_list.eo @@ -4,7 +4,7 @@ class @beta Efl.Ui.Position_Manager.List extends Efl.Object { [[Implementation of @Efl.Ui.Position_Manager.Entity for a list - Every item in the list will get at least his minsize applied, changes to the misize are listened to and change + Every item in the list will get at least his min size applied, changes to the min size are listened to and change the layout of all items. This supports the vertical and horizontal orientation. ]] implements { From dfc9a3eef32e08ba3b6b746e6722d0ea897c79e9 Mon Sep 17 00:00:00 2001 From: WooHyun Jung Date: Mon, 16 Dec 2019 10:29:18 +0100 Subject: [PATCH 03/16] elm_slider: remove unused file Summary: Just removed elm_slider_eo.legacy.h which did not have any dependency with other files Test Plan: 1. sudo ninja install 2. elementary_test 3. Slider Reviewers: segfaultxavi, bu5hm4n, zmike Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10876 --- src/lib/elementary/elm_slider_eo.legacy.h | 17 ----------------- src/lib/elementary/meson.build | 1 - 2 files changed, 18 deletions(-) delete mode 100644 src/lib/elementary/elm_slider_eo.legacy.h diff --git a/src/lib/elementary/elm_slider_eo.legacy.h b/src/lib/elementary/elm_slider_eo.legacy.h deleted file mode 100644 index cbca7aa864..0000000000 --- a/src/lib/elementary/elm_slider_eo.legacy.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _ELM_SLIDER_EO_LEGACY_H_ -#define _ELM_SLIDER_EO_LEGACY_H_ - -#ifndef _ELM_SLIDER_EO_CLASS_TYPE -#define _ELM_SLIDER_EO_CLASS_TYPE - -typedef Eo Elm_Slider; - -#endif - -#ifndef _ELM_SLIDER_EO_TYPES -#define _ELM_SLIDER_EO_TYPES - - -#endif - -#endif diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 61d33e059d..8872c2c25c 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -687,7 +687,6 @@ elementary_pub_headers = [ 'elm_segment_control_eo.legacy.h', 'elm_segment_control_item_eo.legacy.h', 'elm_separator_eo.legacy.h', - 'elm_slider_eo.legacy.h', 'elm_slider_part_indicator_eo.legacy.h', 'elm_slideshow_eo.legacy.h', 'elm_slideshow_item_eo.legacy.h', From 16efc25ceb3a7fbf4605fb808748dcdbc004e6fb Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Mon, 16 Dec 2019 11:35:35 +0100 Subject: [PATCH 04/16] elm_test: workarounds for canvas_textblock style The horizontally scrollable single-line text input box does not currently visible. This patch turns it into a vertically scrollable multiline input box, with an arbitrary minsize. Also, make the label unselectable. --- src/bin/elementary/test_canvas_textblock.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bin/elementary/test_canvas_textblock.c b/src/bin/elementary/test_canvas_textblock.c index 1c20ac5f09..92d2fb0a4f 100644 --- a/src/bin/elementary/test_canvas_textblock.c +++ b/src/bin/elementary/test_canvas_textblock.c @@ -34,12 +34,17 @@ test_canvas_textblock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void efl_add(EFL_UI_TEXTBOX_CLASS, box, efl_gfx_hint_weight_set(efl_added, 1, 0), + efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE), + efl_text_interactive_editable_set(efl_added, EINA_FALSE), efl_text_set(efl_added, "Live style editor. Enter a style string below:"), efl_pack(box, efl_added)); input = efl_add(EFL_UI_TEXTBOX_CLASS, box, efl_gfx_hint_weight_set(efl_added, 1, 0), efl_text_set(efl_added, "font=Sans font_size=24 color=white"), + efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 48)), + efl_text_multiline_set(efl_added, EINA_TRUE), + efl_text_wrap_set(efl_added, EFL_TEXT_FORMAT_WRAP_WORD), efl_pack(box, efl_added)); efl_ui_textbox_scrollable_set(input, EINA_TRUE); From 68e9bf9c14b58c682d5151f73b21f920905bd320 Mon Sep 17 00:00:00 2001 From: Ali Alzyod Date: Mon, 16 Dec 2019 19:10:36 +0100 Subject: [PATCH 05/16] efl_canvas_textblock: allow style_apply with wrap=none Summary: 1- passing style_apply("wrap=none") had no effect previously, and now disable wraping 2- style_all_get() by default return "wrap=word", but now return "wrap=none" refer to T8523 Reviewers: segfaultxavi, woohyun, cedric Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10888 --- src/lib/evas/canvas/efl_canvas_textblock.eo | 2 +- src/lib/evas/canvas/evas_object_textblock.c | 7 ++++++- src/tests/evas/evas_test_textblock.c | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/efl_canvas_textblock.eo b/src/lib/evas/canvas/efl_canvas_textblock.eo index 2c00967374..7c6cf8e0e6 100644 --- a/src/lib/evas/canvas/efl_canvas_textblock.eo +++ b/src/lib/evas/canvas/efl_canvas_textblock.eo @@ -274,7 +274,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, "char" - Wraps at any character "mixed" - Wrap at words if possible, if not at any character "hyphenation" - Hyphenate if possible, if not wrap at words if possible, if not at any character - "" - Don't wrap + "none" - Don't wrap, this is the default value wrap= Left margin diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index e68f70351a..63f725f00c 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -2921,6 +2921,8 @@ _default_format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, wrap = EFL_TEXT_FORMAT_WRAP_MIXED; else if (!strcmp("hyphenation", param)) wrap = EFL_TEXT_FORMAT_WRAP_HYPHENATION; + else if (!strcmp("none", param)) + wrap = EFL_TEXT_FORMAT_WRAP_NONE; if (_FMT_INFO(wrap) != wrap) { @@ -3304,9 +3306,12 @@ _format_string_get(const Eo *eo_obj, Evas_Object_Textblock_Format *fmt) case EFL_TEXT_FORMAT_WRAP_HYPHENATION: wrap_value_str = "hyphenation"; break; - default: + case EFL_TEXT_FORMAT_WRAP_WORD: wrap_value_str = "word"; break; + default: + wrap_value_str = "none"; + break; } PRINTF_APPEND_STR(wrapstr, wrap_value_str); diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c index 16fd38f437..94849a57e1 100644 --- a/src/tests/evas/evas_test_textblock.c +++ b/src/tests/evas/evas_test_textblock.c @@ -4628,6 +4628,7 @@ EFL_START_TEST(efl_canvas_textblock_style) fail_if(!strstr(style, "font=DejaVuSans,UnDotum,malayalam")); // default value fail_if(!strstr(style, "font_width=normal")); + fail_if(!strstr(style, "wrap=none")); // from functions fail_if(!strstr(style, "font_weight=extrabold")); @@ -4641,6 +4642,9 @@ EFL_START_TEST(efl_canvas_textblock_style) efl_canvas_textblock_style_apply(txt, "font_width=ultracondensed"); ck_assert_int_eq(efl_text_font_width_get(txt), EFL_TEXT_FONT_WIDTH_ULTRACONDENSED); + efl_canvas_textblock_style_apply(txt, "wrap=word"); + ck_assert_int_eq(efl_text_wrap_get(txt), EFL_TEXT_FORMAT_WRAP_WORD); + efl_canvas_textblock_style_apply(txt, "wrap=none"); ck_assert_int_eq(efl_text_wrap_get(txt), EFL_TEXT_FORMAT_WRAP_NONE); From be8d1afd1e4ec0fa920705a053d4e6aba2e659b1 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 17 Dec 2019 17:17:34 +0900 Subject: [PATCH 06/16] evas mapping: fix memory leak. These two dynamically allocated properties were not freed. free them when cow data is reset. --- src/lib/evas/canvas/efl_gfx_mapping.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/evas/canvas/efl_gfx_mapping.c b/src/lib/evas/canvas/efl_gfx_mapping.c index cebab06fb2..b05239b369 100644 --- a/src/lib/evas/canvas/efl_gfx_mapping.c +++ b/src/lib/evas/canvas/efl_gfx_mapping.c @@ -138,7 +138,7 @@ static const Gfx_Map gfx_mapping_cow_default = { #define PIVOT_REF(_pivot) (_pivot ? efl_xref((Eo *) _pivot, eo_obj) : NULL) #define PIVOT_UNREF(_pivot) (_pivot ? efl_xunref(_pivot, eo_obj) : NULL) -static inline void _map_ops_clean(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd); +static inline void _map_clean(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd); // ---------------------------------------------------------------------------- @@ -174,8 +174,7 @@ _efl_gfx_mapping_efl_object_destructor(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd) { if (pd->cow) { - _map_ops_clean(eo_obj, pd); - free(pd->cow->points); + _map_clean(eo_obj, pd); eina_cow_free(gfx_mapping_cow, (const Eina_Cow_Data **) &pd->cow); } efl_destructor(efl_super(eo_obj, MY_CLASS)); @@ -365,7 +364,7 @@ _map_calc(const Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Mapping_Dat if (!op->pivot.pivot) { EINA_SAFETY_ERROR("safety check failed: op->pivot.pivot == NULL"); - if (map_alloc) free(m); + if (map_alloc) evas_map_free(m); return NULL; } @@ -471,8 +470,10 @@ _efl_gfx_mapping_update(Eo *eo_obj) } static inline void -_map_ops_clean(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd) +_map_clean(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd) { + free(pd->cow->points); + if (pd->cow->map) evas_map_free(pd->cow->map); if (pd->cow->ops) { Gfx_Map_Pivot *pivot; @@ -514,7 +515,7 @@ _efl_gfx_mapping_mapping_reset(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd) alpha = pd->cow->alpha; smooth = pd->cow->smooth; - _map_ops_clean(eo_obj, pd); + _map_clean(eo_obj, pd); if (pd->cow->event_cbs) efl_event_callback_array_del(eo_obj, _geometry_changes(), obj); From 0f52bbb00e49d93c564b4b95ddf1c1726076a317 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 27 Nov 2019 09:43:11 +0100 Subject: [PATCH 07/16] ecore_evas: add double header include safety Reported-By: https://lgtm.com/projects/g/Enlightenment/efl Reviewed-by: Chris Michael Differential Revision: https://phab.enlightenment.org/D10887 --- src/modules/ecore_evas/engines/extn/ecore_evas_extn_engine.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_engine.h b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_engine.h index dd82f50293..a6aad2492f 100644 --- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_engine.h +++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_engine.h @@ -1,3 +1,6 @@ +#ifndef _ECORE_EVAS_EXTN_ENGINE_H_ +#define _ECORE_EVAS_EXTN_ENGINE_H_ + #ifdef HAVE_CONFIG_H # include #endif @@ -222,3 +225,5 @@ struct _Ipc_Data_Ev_Key_Down unsigned int timestamp; Evas_Event_Flags event_flags; }; + +#endif /*_ECORE_EVAS_EXTN_ENGINE_H_*/ From bfc095104cf286485672ea78049ca2677e6e5fea Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Tue, 17 Dec 2019 20:04:01 +0900 Subject: [PATCH 08/16] csharp: apply same form of "Since EFL" to all manual bindings .cs files The following form of "Since EFL" is applied to descriptions of all manual bindings .cs files. /// Since EFL 1.XX. --- .../mono/efl_mono/efl_csharp_application.cs | 2 +- .../mono/eina_mono/eina_environment.cs | 6 ++--- src/bindings/mono/eina_mono/eina_hash.cs | 2 +- src/bindings/mono/eina_mono/eina_slice.cs | 6 ++--- src/bindings/mono/eina_mono/eina_value.cs | 2 +- .../mono/eldbus_mono/eldbus_object.cs | 4 +-- src/bindings/mono/eo_mono/iwrapper.cs | 4 +-- src/bindings/mono/eo_mono/workaround.cs | 25 +++++++++++++------ 8 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/bindings/mono/efl_mono/efl_csharp_application.cs b/src/bindings/mono/efl_mono/efl_csharp_application.cs index 63d9aacae8..17a777ec42 100644 --- a/src/bindings/mono/efl_mono/efl_csharp_application.cs +++ b/src/bindings/mono/efl_mono/efl_csharp_application.cs @@ -43,7 +43,7 @@ public enum Components : Int32 /// /// Elementary Widget toolkit: Elm. /// it's depend of . - /// Since EFL 1.24 + /// Since EFL 1.24. /// Ui = Basic | 0x2, diff --git a/src/bindings/mono/eina_mono/eina_environment.cs b/src/bindings/mono/eina_mono/eina_environment.cs index 7cef31cbf1..e7f847b4e2 100644 --- a/src/bindings/mono/eina_mono/eina_environment.cs +++ b/src/bindings/mono/eina_mono/eina_environment.cs @@ -16,7 +16,7 @@ internal static class Environment /// /// Returns the value of the environment variable named name. /// - /// Since EFL 1.24 + /// Since EFL 1.24. /// /// The name of the variable to be retrieved /// The value of the variable. null if not set. @@ -28,7 +28,7 @@ internal static class Environment /// /// Sets a native environment variable. /// - /// Since EFL 1.24 + /// Since EFL 1.24. /// /// The name of the variable /// The value to be set. @@ -50,4 +50,4 @@ internal static partial class NativeCustomExportFunctions public static extern Eina.Error efl_mono_native_setenv(string name, string value, int overwrite); } -} \ No newline at end of file +} diff --git a/src/bindings/mono/eina_mono/eina_hash.cs b/src/bindings/mono/eina_mono/eina_hash.cs index c254d58ae5..5b6f4735c1 100644 --- a/src/bindings/mono/eina_mono/eina_hash.cs +++ b/src/bindings/mono/eina_mono/eina_hash.cs @@ -196,7 +196,7 @@ public static class HashNativeFunctions /// Wrapper around native dictionary mapping keys to values. /// -/// Since EFL 1.23. +/// Since EFL 1.23. /// public class Hash : IEnumerable>, IDisposable { diff --git a/src/bindings/mono/eina_mono/eina_slice.cs b/src/bindings/mono/eina_mono/eina_slice.cs index c7a1fd984f..e47da1071c 100644 --- a/src/bindings/mono/eina_mono/eina_slice.cs +++ b/src/bindings/mono/eina_mono/eina_slice.cs @@ -49,7 +49,7 @@ public interface ISliceBase /// Pointer to a slice of native memory. /// -/// Since EFL 1.23. +/// Since EFL 1.23. /// [StructLayout(LayoutKind.Sequential)] public struct Slice : ISliceBase, IEquatable @@ -114,7 +114,7 @@ public struct Slice : ISliceBase, IEquatable => (Length == other.Length) ^ (Mem == other.Mem); /// Returns whether lhs is equal to rhs. - /// Since EFL 1.24 + /// Since EFL 1.24. /// /// The left hand side of the operator. /// The right hand side of the operator. @@ -134,7 +134,7 @@ public struct Slice : ISliceBase, IEquatable /// Pointer to a slice of native memory. /// -/// Since EFL 1.23. +/// Since EFL 1.23. /// [StructLayout(LayoutKind.Sequential)] public struct RwSlice : ISliceBase, IEquatable diff --git a/src/bindings/mono/eina_mono/eina_value.cs b/src/bindings/mono/eina_mono/eina_value.cs index 2a2508e08b..5b203812da 100644 --- a/src/bindings/mono/eina_mono/eina_value.cs +++ b/src/bindings/mono/eina_mono/eina_value.cs @@ -927,7 +927,7 @@ static class ValueTypeMethods /// marshall_type_impl.hh in the generator). User-facing API still uses Eina.ValueType /// normally. /// -/// Since EFL 1.23. +/// Since EFL 1.23. /// [EditorBrowsable(EditorBrowsableState.Never)] public class ValueTypeBox diff --git a/src/bindings/mono/eldbus_mono/eldbus_object.cs b/src/bindings/mono/eldbus_mono/eldbus_object.cs index 3c77d258c4..ed78fc7a15 100644 --- a/src/bindings/mono/eldbus_mono/eldbus_object.cs +++ b/src/bindings/mono/eldbus_mono/eldbus_object.cs @@ -292,9 +292,7 @@ public class Object : System.IDisposable /// /// Decrease object reference. /// If reference == 0 object will be freed and all its children. - /// - /// Since EFL 1.23. - /// + /// Since EFL 1.23. /// public void Unref() { diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs index c84433c23e..ed61634328 100644 --- a/src/bindings/mono/eo_mono/iwrapper.cs +++ b/src/bindings/mono/eo_mono/iwrapper.cs @@ -1034,7 +1034,7 @@ internal static class ClassRegister /// /// For internal usage by generated code. /// -/// Since EFL 1.24 +/// Since EFL 1.24. /// class MarshalEoNoMove : ICustomMarshaler { @@ -1117,7 +1117,7 @@ class MarshalEoNoMove : ICustomMarshaler /// /// For internal usage by generated code. /// -/// Since EFL 1.24 +/// Since EFL 1.24. /// class MarshalEoMove : ICustomMarshaler { diff --git a/src/bindings/mono/eo_mono/workaround.cs b/src/bindings/mono/eo_mono/workaround.cs index de8ab97efd..7b0ceab056 100644 --- a/src/bindings/mono/eo_mono/workaround.cs +++ b/src/bindings/mono/eo_mono/workaround.cs @@ -111,7 +111,10 @@ internal struct EflObjectOps namespace Efl { -///This struct holds the description of a specific event (Since EFL 1.22). +/// +/// This struct holds the description of a specific event. +/// Since EFL 1.22. +/// [StructLayout(LayoutKind.Sequential)] internal struct EventDescription { @@ -164,25 +167,31 @@ internal struct EventDescription /// /// A parameter passed in event callbacks holding extra event parameters. /// This is the full event information passed to callbacks in C. -/// (Since EFL 1.22) +/// Since EFL 1.22. /// [StructLayout(LayoutKind.Sequential)] [Efl.Eo.BindingEntity] internal struct Event { - /// The object the callback was called on. - /// (Since EFL 1.22) + /// + /// The object the callback was called on. + /// Since EFL 1.22. + /// public Efl.Object Object; - /// The event description. - /// (Since EFL 1.22) + /// + /// The event description. + /// Since EFL 1.22. + /// public Efl.EventDescription Desc; - /// Extra event information passed by the event caller. + /// + /// Extra event information passed by the event caller. /// Must be cast to the event type declared in the EO file. Keep in mind that: /// 1) Objects are passed as a normal Eo*. Event subscribers can call functions on these objects. /// 2) Structs, built-in types and containers are passed as const pointers, with one level of indirection. - /// (Since EFL 1.22) + /// Since EFL 1.22. + /// public System.IntPtr Info; /// Constructor for Event. From 3bfc73a95ae2b0eeb473ace10eacafa5802eca93 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Tue, 17 Dec 2019 13:53:25 +0100 Subject: [PATCH 09/16] docs: Add missing docs for Efl.Canvas.Object_Animation --- .../canvas/efl_canvas_object_animation.eo | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/src/lib/evas/canvas/efl_canvas_object_animation.eo b/src/lib/evas/canvas/efl_canvas_object_animation.eo index 49146a6b81..3a4aa87a0a 100644 --- a/src/lib/evas/canvas/efl_canvas_object_animation.eo +++ b/src/lib/evas/canvas/efl_canvas_object_animation.eo @@ -1,5 +1,9 @@ mixin @beta Efl.Canvas.Object_Animation requires Efl.Object { + [[A mixin that provides animation capabilities to @Efl.Canvas.Object. + + By including this mixin canvas objects can be animated just by calling @.animation_start. + ]] methods { @property animation { [[The animation that is currently played on the canvas object. @@ -13,43 +17,50 @@ mixin @beta Efl.Canvas.Object_Animation requires Efl.Object } } @property animation_progress { - [[The current progress of the animation, between 0.0 and 1.0. + [[The current progress of the animation, between $[0.0] and $[1.0]. - Even if the animation is going backwards (speed < 0.0). the progress will still go from 0.0 to 1.0. + Even if the animation is going backwards (speed < 0.0) the progress will still go from $[0.0] to $[1.0]. - If there is no animation going on, this will return -1.0. + If there is no animation going on, this will return $[-1.0]. ]] get { } values { - progress : double; [[The progress the animation applying is currently in.]] + progress : double; [[Current progress of the animation.]] } } @property animation_pause { - [[Pause the animation + [[Pause the animation. - The animation will not be unset. When $pause is unset, the animation will be resumed at the same progress it has right now. + @.animation will not be unset. When $pause is $false, the animation will be resumed at the same progress it + was when it was paused. ]] values { - pause : bool; + pause : bool; [[Paused state.]] } } animation_start { [[Start a new animation. - If there is a animation going on, this is stopped. The previous @.animation object will be replaced. The lifetime is adjusted accordingly. + If there is an animation going on, it is stopped and the previous @.animation object is replaced. + Its lifetime is adjusted accordingly. ]] params { - animation : Efl.Canvas.Animation @move; [[The animation to start. When not needed anymore, the reference that was passed is given up.]] - speed : double; [[The speed of the playback. `1.0` is normal playback. Negative values mean backward playback.]] - starting_progress : double; [[The progress to start, must be between 0.0 and 1.0.]] + animation : Efl.Canvas.Animation @move; [[The animation to start. When not needed anymore, + the reference that was passed is given up.]] + speed : double; [[The speed of the playback. $[1.0] is normal playback. Negative values mean reverse playback. + ]] + starting_progress : double; [[The progress point where to start. Must be between $[0.0] and $[1.0]. + Useful to revert an animation which has already started. + ]] } } animation_stop { [[Stop the animation. - After this call, @.animation will return $null. The reference that was taken during @.animation_start will be given up on. + After this call, @.animation will return $null. + The reference that was taken during @.animation_start will be given up. ]] } } From 0265f4fd5565e01bba0c2228f4f981a644dcaee1 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Fri, 13 Dec 2019 11:47:47 +0100 Subject: [PATCH 10/16] docs: Add detailed text styling information Summary: More detailed descriptions for each attribute. Relationship between attributes. Default values. Links to direct API methods for the corresponding property. General text overhaul and formatting. Test Plan: Builds and passes tests. Generate docgen or DocFX documentation and enjoy your new Text styling descriptions! Reviewers: ali.alzyod Reviewed By: ali.alzyod Subscribers: AbdullehGhujeh, cedric, #reviewers, #committers, woohyun, bu5hm4n Tags: #efl Differential Revision: https://phab.enlightenment.org/D10873 --- src/lib/efl/interfaces/efl_text_font.eo | 88 ++-- src/lib/efl/interfaces/efl_text_format.eo | 78 ++-- src/lib/efl/interfaces/efl_text_style.eo | 209 +++++---- src/lib/evas/canvas/efl_canvas_textblock.eo | 494 +++++++++----------- 4 files changed, 413 insertions(+), 456 deletions(-) diff --git a/src/lib/efl/interfaces/efl_text_font.eo b/src/lib/efl/interfaces/efl_text_font.eo index 836835c2a6..dce81a7e10 100644 --- a/src/lib/efl/interfaces/efl_text_font.eo +++ b/src/lib/efl/interfaces/efl_text_font.eo @@ -1,53 +1,53 @@ import efl_gfx_types; enum @beta Efl.Text_Font_Weight { - [[Type of font weight]] - normal, [[Normal font weight]] - thin, [[Thin font weight]] - ultralight, [[Ultralight font weight]] - extralight, [[Extralight font weight]] - light, [[Light font weight]] - book, [[Book font weight]] - medium, [[Medium font weight]] - semibold, [[Semibold font weight]] - bold, [[Bold font weight]] - ultrabold, [[Ultrabold font weight]] - extrabold, [[Extrabold font weight]] - black, [[Black font weight]] - extrablack, [[Extrablack font weight]] + [[Type of font weight.]] + normal, [[Normal font weight.]] + thin, [[Thin font weight.]] + ultralight, [[Ultralight font weight.]] + extralight, [[Extralight font weight.]] + light, [[Light font weight.]] + book, [[Book font weight.]] + medium, [[Medium font weight.]] + semibold, [[Semibold font weight.]] + bold, [[Bold font weight.]] + ultrabold, [[Ultrabold font weight.]] + extrabold, [[Extrabold font weight.]] + black, [[Black font weight.]] + extrablack, [[Extrablack font weight.]] } enum @beta Efl.Text_Font_Width { - [[Type of font width]] - normal, [[Normal font width]] - ultracondensed, [[Ultracondensed font width]] - extracondensed, [[Extracondensed font width]] - condensed, [[Condensed font width]] - semicondensed, [[Semicondensed font width]] - semiexpanded, [[Semiexpanded font width]] - expanded, [[Expanded font width]] - extraexpanded, [[Extraexpanded font width]] - ultraexpanded, [[Ultraexpanded font width]] + [[Type of font width.]] + normal, [[Normal font width.]] + ultracondensed, [[Ultracondensed font width.]] + extracondensed, [[Extracondensed font width.]] + condensed, [[Condensed font width.]] + semicondensed, [[Semicondensed font width.]] + semiexpanded, [[Semiexpanded font width.]] + expanded, [[Expanded font width.]] + extraexpanded, [[Extraexpanded font width.]] + ultraexpanded, [[Ultraexpanded font width.]] } enum @beta Efl.Text_Font_Slant { - [[Type of font slant]] - normal, [[Normal font slant]] - oblique, [[Oblique font slant]] - italic, [[Italic font slant]] + [[Type of font slant.]] + normal, [[Normal font slant.]] + oblique, [[Oblique font slant.]] + italic, [[Italic font slant.]] } /* FIXME: It needs to support "normal" option for non-color bitmap font. For supporting "normal" option, S/W glyph drawing engine should be updated. */ enum @beta Efl.Text_Font_Bitmap_Scalable { - [[Scalable of bitmap fonts + [[Scalable of bitmap fonts. ]] none = 0, [[Disable scalable feature for bitmap fonts.]] color = (1 << 0), [[Enable scalable feature for color bitmap fonts.]] } interface @beta Efl.Text_Font { - [[Font settings of the text + [[Font settings for text. ]] c_prefix: efl_text; methods { @@ -105,42 +105,42 @@ interface @beta Efl.Text_Font { } @property font_fallbacks { - [[Comma-separated list of font fallbacks + [[Comma-separated list of font fallbacks. Will be used in case the primary font isn't available. ]] values { - font_fallbacks: string; [[Font name fallbacks]] + font_fallbacks: string; [[List of fallback font names.]] } } @property font_weight { [[Type of weight of the displayed font - Default is @Efl.Text_Font_Weight.normal\. + Default is @Efl.Text_Font_Weight.normal. ]] values { - font_weight: Efl.Text_Font_Weight; [[Font weight]] + font_weight: Efl.Text_Font_Weight; [[Font weight.]] } } @property font_slant { - [[Type of slant of the displayed font + [[Type of slant of the displayed font. - Default is @Efl.Text_Font_Slant.normal\. + Default is @Efl.Text_Font_Slant.normal. ]] values { - style: Efl.Text_Font_Slant; [[Font slant]] + style: Efl.Text_Font_Slant; [[Font slant.]] } } @property font_width { - [[Type of width of the displayed font + [[Type of width of the displayed font. - Default is @Efl.Text_Font_Width.normal\. + Default is @Efl.Text_Font_Width.normal. ]] values { - width: Efl.Text_Font_Width; [[Font width]] + width: Efl.Text_Font_Width; [[Font width.]] } } @@ -153,19 +153,19 @@ interface @beta Efl.Text_Font { "auto" to use the system locale, or "none". ]] values { - lang: string; [[Language]] + lang: string; [[Language code.]] } } @property font_bitmap_scalable { [[The bitmap fonts have fixed size glyphs for several available sizes. Basically, it is not scalable. But, it needs to be scalable for some use cases. - (ex. colorful emoji fonts) + (e.g. colorful emoji fonts) - Default is @Efl.Text_Font_Bitmap_Scalable.none\. + Default is @Efl.Text_Font_Bitmap_Scalable.none. ]] values { - scalable: Efl.Text_Font_Bitmap_Scalable; [[Scalable]] + scalable: Efl.Text_Font_Bitmap_Scalable; [[Scalable.]] } } } diff --git a/src/lib/efl/interfaces/efl_text_format.eo b/src/lib/efl/interfaces/efl_text_format.eo index 7ecc8fead4..05d5226407 100644 --- a/src/lib/efl/interfaces/efl_text_format.eo +++ b/src/lib/efl/interfaces/efl_text_format.eo @@ -1,22 +1,23 @@ enum @beta Efl.Text_Format_Wrap { - [[Wrap mode of the text (not in effect if not multiline)]] - none, [[No wrapping]] - char, [[Wrap mode character]] - word, [[Wrap mode word]] - mixed, [[Wrap mode mixed]] - hyphenation [[Wrap mode hyphenation]] + [[Wrapping policy of the text.]] + none, [[No wrapping.]] + char, [[Wrap at character boundaries.]] + word, [[Wrap at word boundaries.]] + mixed, [[Wrap at word boundaries if possible, at any character if not.]] + hyphenation [[Hyphenate if possible, otherwise try word boundaries or + at any character.]] } enum @beta Efl.Text_Format_Horizontal_Alignment_Auto_Type { - [[Auto-horizontal alignment of the text]] - none, [[No auto-alignment rule]] - normal, [[Respects LTR/RTL (bidirectional) settings]] - locale, [[Respects locale's langauge settings]] - end [[Text is places at opposite side of LTR/RTL (bidirectional) settings]] + [[Auto-horizontal alignment of the text.]] + none, [[No auto-alignment rule.]] + normal, [[Respects LTR/RTL (bidirectional) settings.]] + locale, [[Respects locale's language settings.]] + end [[Text is placed at opposite side of LTR/RTL (bidirectional) settings.]] } interface @beta Efl.Text_Format { - [[The look and layout of the text + [[The look and layout of the text. The text format can affect the geometry of the text object, as well as how characters are presented. @@ -24,83 +25,96 @@ interface @beta Efl.Text_Format { c_prefix: efl_text; methods { @property ellipsis { - [[Ellipsis value (number from -1.0 to 1.0)]] + [[Controls automatic addition of ellipsis "..." to replace text which cannot be shown. + The value must be a number indicating the position of the ellipsis inside the visible text. + $[0.0] means the beginning of the text, $[1.0] means the end of the text, and values in between + mean the proportional position inside the text. + Any value smaller than 0 or greater than 1 disables ellipsis. + ]] values { - value: double; [[Ellipsis value]] + value: double; [[Ellipsis value.]] } } @property wrap { - [[Wrap mode for use in the text]] + [[Wrapping policy of the text. Requires @.multiline to be $true.]] values { - wrap: Efl.Text_Format_Wrap; [[Wrap mode]] + wrap: Efl.Text_Format_Wrap; [[Wrap mode.]] } } @property multiline { - [[Multiline is enabled or not]] + [[Enables text to span multiple lines. + + When $false, new-line characters are ignored and no text wrapping occurs. + ]] values { - enabled: bool; [[$true if multiline is enabled, $false otherwise]] + enabled: bool; [[$true if multiline is enabled.]] } } @property horizontal_align_auto_type { - [[Horizontal alignment of text]] + [[Horizontal alignment of text.]] values { - value: Efl.Text_Format_Horizontal_Alignment_Auto_Type; [[Alignment type]] + value: Efl.Text_Format_Horizontal_Alignment_Auto_Type; [[Alignment type.]] } } @property horizontal_align { - [[Horizontal alignment of text]] + [[Horizontal alignment of text. $[0.0] means "left" + and $[1.0] means "right".]] values { - value: double; [[Horizontal alignment value]] + value: double; [[Alignment value between $[0.0] and $[1.0].]] } } @property vertical_align { - [[Vertical alignment of text]] + [[Vertical alignment of text.$[0.0] means "top" + and $[1.0] means "bottom"]] values { - value: double; [[Vertical alignment value]] + value: double; [[Alignment value between $[0.0] and $[1.0].]] } } @property linegap { - [[Minimal line gap (top and bottom) for each line in the text + [[Minimal line gap (top and bottom) for each line in the text. $value is absolute size. ]] values { - value: double; [[Line gap value]] + value: double; [[Line gap value, in pixels.]] } } @property linerelgap { - [[Relative line gap (top and bottom) for each line in the text + [[Relative line gap (top and bottom) for each line in the text. The original line gap value is multiplied by $value. ]] values { - value: double; [[Relative line gap value]] + value: double; [[Relative line gap value. $[1.0] means original size.]] } } @property tabstops { - [[Tabstops value]] + [[Size of the tab character.]] values { - value: int; [[Tapstops value]] + value: int; [[Size in pixels.]] } } @property password { - [[Whether text is a password]] + [[Enabling this causes all characters to be replaced by @.replacement_char. + + This is useful for password input boxes. + ]] values { - enabled: bool; [[$true if the text is a password, $false otherwise]] + enabled: bool; [[$true if the text is a password.]] } } diff --git a/src/lib/efl/interfaces/efl_text_style.eo b/src/lib/efl/interfaces/efl_text_style.eo index c42433b317..9b66595558 100644 --- a/src/lib/efl/interfaces/efl_text_style.eo +++ b/src/lib/efl/interfaces/efl_text_style.eo @@ -1,248 +1,257 @@ enum @beta Efl.Text_Style_Backing_Type { - [[Whether to apply backing style to the displayed text or not]] - disabled = 0, [[Do not use backing]] - enabled, [[Use backing style]] + [[Whether to add a background colored rectangle (backing) to each line of text or not.]] + disabled = 0, [[Do not use backing.]] + enabled, [[Use backing.]] } enum @beta Efl.Text_Style_Strikethrough_Type { - [[Whether to apply strikethrough style to the displayed text or not]] - disabled = 0, [[Do not use strikethrough]] - enabled, [[Use strikethrough style]] + [[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 { - [[Effect to apply to the displayed text]] - none = 0, [[No effect]] + [[Effect to apply to the displayed text.]] + none = 0, [[No effect.]] // colored with shadow_color - shadow, [[Shadow effect]] - far_shadow, [[Far shadow effect]] - soft_shadow, [[Soft shadow effect]] - far_soft_shadow, [[Far and soft shadow effect]] + shadow, [[Shadow effect.]] + far_shadow, [[Far shadow effect.]] + soft_shadow, [[Soft shadow effect.]] + far_soft_shadow, [[Far and soft shadow effect.]] // colored with glow_color - glow, [[Glow effect]] + glow, [[Glow effect.]] // colored with outline_color - outline, [[Outline effect]] - soft_outline, [[Soft outline effect]] + outline, [[Outline effect.]] + soft_outline, [[Soft outline effect.]] // colored with outline_color + shadow_color - outline_shadow, [[Outline shadow effect]] - outline_soft_shadow, [[Outline soft shadow effect]] + outline_shadow, [[Outline + shadow effect.]] + outline_soft_shadow, [[Outline + soft shadow effect.]] } enum @beta Efl.Text_Style_Shadow_Direction { - [[Direction of the shadow style, if used]] - bottom_right = 0, [[Shadow towards bottom right]] - bottom, [[Shadow towards botom]] - bottom_left, [[Shadow towards bottom left]] - left, [[Shadow towards left]] - top_left, [[Shadow towards top left]] - top, [[Shadow towards top]] - top_right, [[Shadow towards top right]] - right, [[Shadow towards right]] + [[Direction of the shadow.]] + bottom_right = 0, [[Shadow towards bottom right.]] + bottom, [[Shadow towards bottom.]] + bottom_left, [[Shadow towards bottom left.]] + left, [[Shadow towards left.]] + top_left, [[Shadow towards top left.]] + top, [[Shadow towards top.]] + top_right, [[Shadow towards top right.]] + right, [[Shadow towards right.]] } enum @beta Efl.Text_Style_Underline_Type { - [[Underline type of the displayed text]] - off = 0, [[Text without underline]] - on, [[Underline enabled]] - single, [[Underlined with a signle line]] - double, [[Underlined with a double line]] - dashed, [[Underlined with a dashed line]] + [[Type of underline of the displayed text.]] + off = 0, [[Text without underline.]] + on, [[Underline enabled.]] + single, [[Underlined with a single line.]] + double, [[Underlined with a double line.]] + dashed, [[Underlined with a dashed line.]] } interface @beta Efl.Text_Style { - [[Style to apply to the text + [[Decorations to add to the text. - A style can be coloring, effects, underline, strikethrough etc. + Decorations can be coloring, effects, underlines, strike-through etc. ]] c_prefix: efl_text; methods { @property normal_color { - [[Color of text, excluding style]] + [[Color of text, excluding decorations like, shadow, outline or glow.]] values { - r: ubyte; [[Red component]] - g: ubyte; [[Green component]] - b: ubyte; [[Blue component]] - a: ubyte; [[Alpha component]] + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] } } @property backing_type { - [[Enable or disable backing 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_Backing_Type; [[Backing type.]] } } @property backing_color { - [[Backing color]] + [[Color of the background rectangle (backing) behind each line of text.]] values { - r: ubyte; [[Red component]] - g: ubyte; [[Green component]] - b: ubyte; [[Blue component]] - a: ubyte; [[Alpha component]] + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] } } @property underline_type { - [[Sets an underline style on the text]] + [[Underline style for the text.]] values { - type: Efl.Text_Style_Underline_Type; [[Underline type]] + type: Efl.Text_Style_Underline_Type; [[Underline type.]] } } @property underline_color { - [[Color of normal underline style]] + [[Color of normal underline style.]] values { - r: ubyte; [[Red component]] - g: ubyte; [[Green component]] - b: ubyte; [[Blue component]] - a: ubyte; [[Alpha component]] + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] } } @property underline_height { - [[Height of underline style]] + [[Width (in pixels) of the single underline when @.underline_type is + @Efl.Text_Style_Underline_Type.single.]] values { - height: double; [[Height]] + height: double; [[Underline width in pixels.]] } } @property underline_dashed_color { - [[Color of dashed underline style]] + [[Color of the dashed underline. Only valid when @.underline_type is + @Efl.Text_Style_Underline_Type.dashed.]] values { - r: ubyte; [[Red component]] - g: ubyte; [[Green component]] - b: ubyte; [[Blue component]] - a: ubyte; [[Alpha component]] + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] } } @property underline_dashed_width { - [[Width of dashed underline style]] + [[Length (in pixels) of the dashes when @.underline_type is + @Efl.Text_Style_Underline_Type.dashed.]] values { - width: int; [[Width]] + width: int; [[Dash length in pixels.]] } } @property underline_dashed_gap { - [[Gap of dashed underline style]] + [[Length (in pixels) of the gaps between the dashes when @.underline_type is + @Efl.Text_Style_Underline_Type.dashed.]] values { - gap: int; [[Gap]] + gap: int; [[Gap length in pixels.]] } } @property underline2_color { - [[Color of underline2 style]] + [[Color of the secondary underline. Only valid when @.underline_type is + @Efl.Text_Style_Underline_Type.double.]] values { - r: ubyte; [[Red component]] - g: ubyte; [[Green component]] - b: ubyte; [[Blue component]] - a: ubyte; [[Alpha component]] + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] } } @property strikethrough_type { - [[Type of strikethrough style]] + [[Enables crossed-out text.]] values { - type: Efl.Text_Style_Strikethrough_Type; [[Strikethrough type]] + type: Efl.Text_Style_Strikethrough_Type; [[Strike-through type.]] } } @property strikethrough_color { - [[Color of strikethrough_style]] + [[Color of the line striking through the text.]] values { - r: ubyte; [[Red component]] - g: ubyte; [[Green component]] - b: ubyte; [[Blue component]] - a: ubyte; [[Alpha component]] + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] } } @property effect_type { - [[Type of effect used for the displayed text]] + [[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]] + type: Efl.Text_Style_Effect_Type; [[Effect type.]] } } @property outline_color { - [[Color of outline effect]] + [[Color of the text outline.]] values { - r: ubyte; [[Red component]] - g: ubyte; [[Green component]] - b: ubyte; [[Blue component]] - a: ubyte; [[Alpha component]] + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] } } @property shadow_direction { - [[Direction of shadow effect]] + [[Direction of shadow effect.]] values { - type: Efl.Text_Style_Shadow_Direction; [[Shadow direction]] + type: Efl.Text_Style_Shadow_Direction; [[Shadow direction.]] } } @property shadow_color { - [[Color of shadow effect]] + [[Color of the shadow.]] values { - r: ubyte; [[Red component]] - g: ubyte; [[Green component]] - b: ubyte; [[Blue component]] - a: ubyte; [[Alpha component]] + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] } } @property glow_color { - [[Color of glow effect]] + [[Color of the glow decoration.]] values { - r: ubyte; [[Red component]] - g: ubyte; [[Green component]] - b: ubyte; [[Blue component]] - a: ubyte; [[Alpha component]] + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] } } @property glow2_color { - [[Second color of the glow effect]] + [[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. + ]] values { - r: ubyte; [[Red component]] - g: ubyte; [[Green component]] - b: ubyte; [[Blue component]] - a: ubyte; [[Alpha component]] + r: ubyte; [[Red component.]] + g: ubyte; [[Green component.]] + b: ubyte; [[Blue component.]] + a: ubyte; [[Alpha component.]] } } diff --git a/src/lib/evas/canvas/efl_canvas_textblock.eo b/src/lib/evas/canvas/efl_canvas_textblock.eo index 7c6cf8e0e6..3b686918ee 100644 --- a/src/lib/evas/canvas/efl_canvas_textblock.eo +++ b/src/lib/evas/canvas/efl_canvas_textblock.eo @@ -6,7 +6,13 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, Efl.Text_Markup, Efl.Ui.I18n { [[This is the Canvas-level text class. This class only takes care of rendering text, - if you need user interaction consider the classes in $Efl.Ui.]] + if you need user interaction consider the classes in $[Efl.Ui]. + + 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. + Alternatively, @.style_apply can be used providing the attributes $font, $font_size and $color. + ]] methods { @property is_empty { [[Whether the object is empty (no text) or not. @@ -80,337 +86,265 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, } } style_apply { - [[Applies a style to the text object. Applied style attributes override old ones, leaving other attributes - unaffected. - This is similar to setting individual style attributes using properties like @Efl.Text_Font.font_slant or - @Efl.Text_Format.wrap. + [[Applies several style attributes at once using a formatting string. + Given style attributes override previous values, leaving other attributes unaffected. + This is akin to setting individual style attributes using properties like + @Efl.Text_Font.font_slant or @Efl.Text_Format.wrap, for example. - The style can be set as "attribute"="Value". - Multible attribute can be set at once separated by space. + The formatting string is a whitespace-separated list of $[attribute=value] pairs. - The following styling attributes are accepted: + The following attributes are accepted: - - Font - - Font fallback - - Font size - - Font source - - Font weight - - Font style - - Font width - - Language - - Color - - Underline Color - - Second Underline Color - - Underline Dash Color - - Outline Color - - Shadow Color - - First Glow Color - - Second Glow Color - - Backing Color - - Strikethrough Color - - Horizontal Align - - Vertical Align - - Wrap - - Left margin - - Right margin - - Underline - - Strikethrough - - Backing - - Style - - Tabstops - - Line size - - Relative line size - - Line gap - - Relative line gap - - Item - - Line fill - - Ellipsis - - Password - - Underline dash width - - Underline dash gap - - Underline height + - $font: Name of the font to use. + Default value is empty, meaning that no text will be rendered. + Requires $font_size and $font_color. + See @Efl.Text_Font.font_family. - Font - This sets the name of the font to be used. - font= + - $font_fallbacks: Comma-delimited list of fonts to try if finding the primary font fails. + Example: $[font_fallbacks=consolas,courier,monospace]. + Default value is empty. + See @Efl.Text_Font.font_fallbacks. - Font fallback - A comma delimited list of fonts to try if finding the primary font fails. - font_fallbacks= + - $font_size: Height of font, in points. + Default value is 0. + Requires $font and $font_color. + See @Efl.Text_Font.font_size. - Font size - This sets the the size of font in points to be used. - font_size= + - $font_source: Path to the file containing the font to use. + Example: $[font_source=/usr/share/fonts/Sans.ttf]. + Default value is empty. + See @Efl.Text_Font.font_source. - Font source - Specify source from which to search for the font. - font_source= + - $font_weight: Thickness of the font. The value must be one of: $normal, $thin, $ultralight, $extralight, + $light, $book, $medium, $semibold, $bold, $ultrabold, $extrabold, $black and $extrablack. + Default value is $normal. + See @Efl.Text_Font.font_weight. - Font weight - Sets the weight of the font. The value must be one of: - "normal" - "thin" - "ultralight" - "extralight" - "light" - "book" - "medium" - "semibold" - "bold" - "ultrabold" - "extrabold" - "black" - "extrablack" - font_weight= + - $font_style: Style of the font. The value must be one of: $normal, $oblique and $italic. + Default value is $normal. + See @Efl.Text_Font.font_slant. - Font style - Sets the style of the font. The value must be one of: - "normal" - "oblique" - "italic" - font_style=