[EGIT] [core/efl] master 01/01: efl_ui_format: change Eina.Strbug to @in type
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2d477f5672e7748838fb9dd8d0d9d7d46799d7eb commit 2d477f5672e7748838fb9dd8d0d9d7d46799d7eb Author: Amitesh SinghDate: Tue Oct 17 14:03:36 2017 +0900 efl_ui_format: change Eina.Strbug to @in type --- src/lib/efl/interfaces/efl_ui_format.eo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/efl/interfaces/efl_ui_format.eo b/src/lib/efl/interfaces/efl_ui_format.eo index a140135ec1..4d02d30a7e 100644 --- a/src/lib/efl/interfaces/efl_ui_format.eo +++ b/src/lib/efl/interfaces/efl_ui_format.eo @@ -3,7 +3,7 @@ import eina_types; function Efl.Ui.Format_Func_Cb { [[Function pointer for format function hook]] params { - @out str: Eina.Strbuf; [[the formated string to be appended by user.]] + @in str: ptr(Eina.Strbuf); [[the formated string to be appended by user.]] @in value: const(any_value); [[The Eina.Value passed by $obj.]] } }; --
[EGIT] [core/efl] master 01/01: efl_ui_format: fix the namings and docs
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=329dcfccd79e6b31657c60bdacf797c7d2c8f0d3 commit 329dcfccd79e6b31657c60bdacf797c7d2c8f0d3 Author: Amitesh SinghDate: Tue Oct 17 13:37:26 2017 +0900 efl_ui_format: fix the namings and docs it is based on review comments by Gustavo and JP. --- src/lib/efl/interfaces/efl_ui_format.eo | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/efl/interfaces/efl_ui_format.eo b/src/lib/efl/interfaces/efl_ui_format.eo index 74d6249127..a140135ec1 100644 --- a/src/lib/efl/interfaces/efl_ui_format.eo +++ b/src/lib/efl/interfaces/efl_ui_format.eo @@ -3,8 +3,8 @@ import eina_types; function Efl.Ui.Format_Func_Cb { [[Function pointer for format function hook]] params { - @in str: ptr(Eina.Strbuf); - @in value: Eina.Value; + @out str: Eina.Strbuf; [[the formated string to be appended by user.]] + @in value: const(any_value); [[The Eina.Value passed by $obj.]] } }; @@ -12,16 +12,16 @@ interface Efl.Ui.Format { [[interface class for format_func]] methods { - @property func_cb @protected { + @property format_cb @protected { set { -[[Set the format function pointer to format the indicator string. +[[Set the format function pointer to format the string. ]] } values { func: Efl.Ui.Format_Func_Cb @nullable; [[The format function callback]] } } - @property unit @protected { + @property format_string @protected { [[Control the format string for a given units label If $NULL is passed on $format, it will make $obj's units --
[EGIT] [website/www] master 01/01: www chat icon - make wider and ad "talk with us" text
raster pushed a commit to branch master. http://git.enlightenment.org/website/www.git/commit/?id=fa8bd11263876a03dc780b96cc4c3eb59c5476f8 commit fa8bd11263876a03dc780b96cc4c3eb59c5476f8 Author: Carsten Haitzler (Rasterman)Date: Tue Oct 17 09:37:25 2017 +0900 www chat icon - make wider and ad "talk with us" text --- public_html/lib/tpl/e/css/modifications.css | 4 ++-- public_html/lib/tpl/e/footer.html | 29 +++-- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/public_html/lib/tpl/e/css/modifications.css b/public_html/lib/tpl/e/css/modifications.css index c649cf12..b2c3c236 100644 --- a/public_html/lib/tpl/e/css/modifications.css +++ b/public_html/lib/tpl/e/css/modifications.css @@ -712,8 +712,8 @@ table.columns-plugin td { z-index: 9997; transform-origin: bottom; transform: scale(1); - border-radius: 50%; - width: 60px; + border-radius: 30px; + width: 120px; height: 60px; } diff --git a/public_html/lib/tpl/e/footer.html b/public_html/lib/tpl/e/footer.html index 2ed724da..fdd3c7db 100644 --- a/public_html/lib/tpl/e/footer.html +++ b/public_html/lib/tpl/e/footer.html @@ -14,16 +14,25 @@ d.style.display = 'block'; } }" ->http://www.w3.org/2000/svg;> - - - - +> +http://www.w3.org/2000/svg;> + + + + + + + + + + + + + +
[EGIT] [tools/edi] master 01/01: welcome: Improve layout of project chooser
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=7bae93a8f81d3b0e62562017737b3608fca8ecd5 commit 7bae93a8f81d3b0e62562017737b3608fca8ecd5 Author: Andy WilliamsDate: Mon Oct 16 22:47:05 2017 +0100 welcome: Improve layout of project chooser Also remove lots of hacky layout code - make it as simple as we can --- data/extra/templates/eflproject.edc| 2 +- data/extra/templates/eflproject_python.edc | 2 +- src/bin/screens/edi_welcome.c | 39 +- 3 files changed, 13 insertions(+), 30 deletions(-) diff --git a/data/extra/templates/eflproject.edc b/data/extra/templates/eflproject.edc index 57ec59f..d0e3375 100644 --- a/data/extra/templates/eflproject.edc +++ b/data/extra/templates/eflproject.edc @@ -3,7 +3,7 @@ data { item: "file" "skeletons/eflproject.tar.gz"; item: "description" -"C EFL Project.Begin your C programming EFL project. All content is freely modifiable and distributable and licensed in the public-domain.Happy hacking!"; +"Begin your C programming EFL project. All content is freely modifiable and distributable and licensed in the public-domain.Happy hacking!"; } collections { diff --git a/data/extra/templates/eflproject_python.edc b/data/extra/templates/eflproject_python.edc index 98589bf..24cf5d5 100644 --- a/data/extra/templates/eflproject_python.edc +++ b/data/extra/templates/eflproject_python.edc @@ -3,7 +3,7 @@ data { item: "file" "skeletons/eflproject_python.tar.gz"; item: "description" -"Python EFL Project.Start your new EFL Python programming project. All code is in the public-domain, you are free to modify and distribute as you wish."; +"Start your new EFL Python programming project. All code is in the public-domain, you are free to modify and distribute as you wish."; } collections { diff --git a/src/bin/screens/edi_welcome.c b/src/bin/screens/edi_welcome.c index 177f6d8..cd9bf1b 100644 --- a/src/bin/screens/edi_welcome.c +++ b/src/bin/screens/edi_welcome.c @@ -404,8 +404,9 @@ _edi_welcome_button_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *e static Evas_Object * _content_get(void *data, Evas_Object *obj, const char *source) { - Evas_Object *table, *box, *frame, *image, *label, *entry, *rect; + Evas_Object *frame, *table, *image, *entry; Edi_Template *template = (Edi_Template *) data; + Eina_Slstr *content; if (strcmp(source, "elm.swallow.content")) return NULL; @@ -420,48 +421,30 @@ _content_get(void *data, Evas_Object *obj, const char *source) evas_object_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_table_padding_set(table, 5, 5); + elm_table_homogeneous_set(table, EINA_TRUE); evas_object_show(table); - - label = elm_label_add(table); - elm_object_text_set(label, template->title); - evas_object_show(label); - elm_table_pack(table, label, 0, 0, 1, 1); + elm_object_content_set(frame, table); image = elm_image_add(table); evas_object_size_hint_weight_set(image, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(image, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_min_set(image, 96 * elm_config_scale_get(), 96 * elm_config_scale_get()); elm_image_file_set(image, template->edje_path, "logo"); evas_object_show(image); - elm_table_pack(table, image, 0, 1, 1, 1); - rect = evas_object_rectangle_add(table); - evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_min_set(rect, 96 * elm_config_scale_get(), 96 * elm_config_scale_get()); - elm_table_pack(table, rect, 0, 1, 1, 1); - - box = elm_box_add(obj); - evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_show(box); - rect = evas_object_rectangle_add(table); - evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_min_set(rect, 300 * elm_config_scale_get(), 96 * elm_config_scale_get()); - elm_table_pack(table, rect, 1, 1, 1, 1); + elm_table_pack(table, image, 0, 0, 1, 1); - entry = elm_entry_add(box); + entry = elm_entry_add(table); evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_entry_editable_set(entry, EINA_FALSE); - elm_entry_scrollable_set(entry, EINA_TRUE); + elm_entry_scrollable_set(entry, EINA_FALSE); elm_entry_single_line_set(entry, EINA_FALSE); elm_entry_line_wrap_set(entry, ELM_WRAP_WORD); -
[EGIT] [core/efl] master 06/06: eina: rename parameter for doxygen
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=01147d084fe160063fc264a94c62c66369775374 commit 01147d084fe160063fc264a94c62c66369775374 Author: Bowon RyuDate: Mon Oct 16 13:39:30 2017 -0700 eina: rename parameter for doxygen Summary: Some parameter's name are different in annotations and statements, so it occurs doxygen warning. To fix it, rename that parameters. Test Plan: API Doxygen Revision Reviewers: raster, cedric, jpeg, myoungwoon, Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D5327 Signed-off-by: Cedric BAIL --- src/lib/eina/eina_matrix.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/eina/eina_matrix.h b/src/lib/eina/eina_matrix.h index 637694470d..64053e2deb 100644 --- a/src/lib/eina/eina_matrix.h +++ b/src/lib/eina/eina_matrix.h @@ -885,7 +885,7 @@ EAPI void eina_matrix4_multiply(Eina_Matrix4 *out, const Eina_Matrix4 *mat_a, * @param left The left value * @param bottom The bottom value * @param top The top value - * @param dneat The dnear value + * @param dnear The dnear value * @param dfar The dfar value * * @since 1.17 @@ -968,12 +968,12 @@ EAPI void eina_matrix2_values_get(const Eina_Matrix2 *m, double *xx, double *xy, /** * @brief Computes the inverse with check of the given matrix. * - * @param m The matrix to inverse. - * @param m2 The inverse matrix. + * @param out The matrix to inverse. + * @param mat The inverse matrix. * - * This function inverse the matrix @p m and stores the result in - * @p m2. No check is done on @p m or @p m2. If @p m can not be - * invertible, then @p m2 is set to the identity matrix. + * This function inverse the matrix @p out and stores the result in + * @p mat. No check is done on @p out or @p mat. If @p out can not be + * invertible, then @p mat is set to the identity matrix. * * @since 1.17 */ @@ -1017,8 +1017,8 @@ EAPI void eina_matrix2_copy(Eina_Matrix2 *dst, const Eina_Matrix2 *src); * @brief Multiplies two matrix. * * @param out The resulting matrix - * @param a The first member of the multiplication - * @param b The second member of the multiplication + * @param mat_a The first member of the multiplication + * @param mat_b The second member of the multiplication * * @since 1.17 */ @@ -1029,8 +1029,8 @@ EAPI void eina_matrix2_multiply(Eina_Matrix2 *out, const Eina_Matrix2 *mat_a, * @brief Multiplies two matrix with check. * * @param out The resulting matrix - * @param a The first member of the multiplication - * @param b The second member of the multiplication + * @param mat_a The first member of the multiplication + * @param mat_b The second member of the multiplication * * @since 1.17 */ --
[EGIT] [core/efl] master 01/06: edje_edit: duplicate assignment to variable.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=230810c4c4f03519fd3167244757983b865a94bc commit 230810c4c4f03519fd3167244757983b865a94bc Author: Subodh KumarDate: Mon Oct 16 13:27:35 2017 -0700 edje_edit: duplicate assignment to variable. Summary: Avoid duplicate assignment to same variable. @fix Reviewers: cedric, jpeg Reviewed By: cedric, jpeg Subscribers: shilpasingh, jpeg Differential Revision: https://phab.enlightenment.org/D5275 Signed-off-by: Cedric BAIL --- src/lib/edje/edje_edit.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index f12eeb355c..0a83ff0739 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -14186,9 +14186,6 @@ fill: size_abs = ((img->image.fill.abs_x == 0) && (img->image.fill.abs_y == 0)) ? EINA_FALSE : EINA_TRUE; } - - - attr_amount = smooth + type; attr_orig_amount = orig_rel + orig_abs; attr_size_amount = size_rel + size_abs; attr_amount = smooth + type + attr_orig_amount + attr_size_amount; @@ -14532,9 +14529,6 @@ fill_proxy: size_abs = ((pro->proxy.fill.abs_x == 0) && (pro->proxy.fill.abs_y == 0)) ? EINA_FALSE : EINA_TRUE; } - - - attr_amount = smooth + type; attr_orig_amount = orig_rel + orig_abs; attr_size_amount = size_rel + size_abs; attr_amount = smooth + type + attr_orig_amount + attr_size_amount; --
[EGIT] [core/efl] master 01/03: efl_ui_composition: flushing elements from outside!
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6f95bded5146eae1a697d61e57fe243ce8362558 commit 6f95bded5146eae1a697d61e57fe243ce8362558 Author: Marcel HollerbachDate: Mon Oct 16 16:43:32 2017 +0200 efl_ui_composition: flushing elements from outside! --- src/lib/elementary/efl_ui_focus_composition.c | 12 +--- src/lib/elementary/efl_ui_focus_composition.eo | 4 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_composition.c b/src/lib/elementary/efl_ui_focus_composition.c index b9f94847cb..427db3de3a 100644 --- a/src/lib/elementary/efl_ui_focus_composition.c +++ b/src/lib/elementary/efl_ui_focus_composition.c @@ -151,10 +151,8 @@ _efl_ui_focus_composition_dirty(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Da } EOLIAN static void -_efl_ui_focus_composition_efl_ui_focus_object_prepare_logical(Eo *obj, Efl_Ui_Focus_Composition_Data *pd) +_efl_ui_focus_composition_elements_flush(Eo *obj, Efl_Ui_Focus_Composition_Data *pd) { - efl_ui_focus_object_prepare_logical(efl_super(obj, MY_CLASS)); - if (!pd->dirty) return; efl_ui_focus_composition_prepare(obj); @@ -163,6 +161,14 @@ _efl_ui_focus_composition_efl_ui_focus_object_prepare_logical(Eo *obj, Efl_Ui_Fo } EOLIAN static void +_efl_ui_focus_composition_efl_ui_focus_object_prepare_logical(Eo *obj, Efl_Ui_Focus_Composition_Data *pd EINA_UNUSED) +{ + efl_ui_focus_object_prepare_logical(efl_super(obj, MY_CLASS)); + + efl_ui_focus_composition_elements_flush(obj); +} + +EOLIAN static void _efl_ui_focus_composition_custom_manager_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd, Efl_Ui_Focus_Manager *custom_manager) { pd->custom_manager = custom_manager; diff --git a/src/lib/elementary/efl_ui_focus_composition.eo b/src/lib/elementary/efl_ui_focus_composition.eo index 57f5d3818a..b03d0e7cd8 100644 --- a/src/lib/elementary/efl_ui_focus_composition.eo +++ b/src/lib/elementary/efl_ui_focus_composition.eo @@ -19,6 +19,10 @@ mixin Efl.Ui.Focus.Composition (Efl.Interface, Elm.Widget ) { logical_order : list @owned; [[The order to use]] } } + elements_flush { +[[Function that will emit prepare if this is marked as dirty]] + } + dirty @protected { [[ Mark this widget as dirty, the children can be considered to be changed after that call ]] --
[EGIT] [core/efl] master 02/03: efl_ui_focus_composition: support beeing a pure logical composition
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=38d41b4a2b6236b657fc4d30c88e58718f1f1ee4 commit 38d41b4a2b6236b657fc4d30c88e58718f1f1ee4 Author: Marcel HollerbachDate: Mon Oct 16 17:19:42 2017 +0200 efl_ui_focus_composition: support beeing a pure logical composition --- src/lib/elementary/efl_ui_focus_composition.c | 17 - src/lib/elementary/efl_ui_focus_composition.eo | 6 ++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_focus_composition.c b/src/lib/elementary/efl_ui_focus_composition.c index 427db3de3a..fe6af14367 100644 --- a/src/lib/elementary/efl_ui_focus_composition.c +++ b/src/lib/elementary/efl_ui_focus_composition.c @@ -16,6 +16,7 @@ typedef struct { Eina_List *adapters; Efl_Ui_Focus_Manager *registered, *custom_manager; Eina_Bool dirty; + Eina_Bool logical; } Efl_Ui_Focus_Composition_Data; static void @@ -49,7 +50,10 @@ _state_apply(Eo *obj, Efl_Ui_Focus_Composition_Data *pd) EINA_LIST_FOREACH(pd->register_target, n, o) { - efl_ui_focus_manager_calc_register(manager, o, obj, NULL); + if (!pd->logical) + efl_ui_focus_manager_calc_register(manager, o, obj, NULL); + else + efl_ui_focus_manager_calc_register_logical(manager, o, obj, NULL); pd->registered_targets = eina_list_append(pd->registered_targets, o); } @@ -180,6 +184,17 @@ _efl_ui_focus_composition_custom_manager_get(Eo *obj EINA_UNUSED, Efl_Ui_Focus_C return pd->custom_manager; } +EOLIAN static void +_efl_ui_focus_composition_logical_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd, Eina_Bool logical_mode) +{ + pd->logical = logical_mode; +} + +EOLIAN static Eina_Bool +_efl_ui_focus_composition_logical_mode_get(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd) +{ + return pd->logical; +} #include "efl_ui_focus_composition.eo.c" diff --git a/src/lib/elementary/efl_ui_focus_composition.eo b/src/lib/elementary/efl_ui_focus_composition.eo index b03d0e7cd8..ef724757f6 100644 --- a/src/lib/elementary/efl_ui_focus_composition.eo +++ b/src/lib/elementary/efl_ui_focus_composition.eo @@ -39,6 +39,12 @@ mixin Efl.Ui.Focus.Composition (Efl.Interface, Elm.Widget ) { custom_manager : Efl.Ui.Focus.Manager; } } + @property logical_mode @protected { + [[Set to true if all children should be registered as logicals]] + values { +logical_mode : bool; [[$true or $false]] + } + } } implements { Elm.Widget.focus_state_apply; --
[EGIT] [apps/ephoto] master 01/01: Meson: Update the default tag in options to be value.
okra pushed a commit to branch master. http://git.enlightenment.org/apps/ephoto.git/commit/?id=ad24a5a203acf97b67e122afd95786afa383656e commit ad24a5a203acf97b67e122afd95786afa383656e Author: Stephen HoustonDate: Mon Oct 16 09:48:31 2017 -0500 Meson: Update the default tag in options to be value. This fixes T6214 --- meson_options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt index bc7316b..fe7f83b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,4 @@ option('nls', type: 'boolean', -default: true, +value: true, description: 'enable localization: (default=true)') --
[EGIT] [core/efl] master 01/01: elm_slider: do not eat all key down events
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=44554a60444bb2a93a8aafb344f8099c25e024b2 commit 44554a60444bb2a93a8aafb344f8099c25e024b2 Author: Marcel HollerbachDate: Mon Oct 16 14:48:35 2017 +0200 elm_slider: do not eat all key down events --- src/lib/elementary/efl_ui_slider.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c index d3617c965c..89265330c9 100644 --- a/src/lib/elementary/efl_ui_slider.c +++ b/src/lib/elementary/efl_ui_slider.c @@ -571,7 +571,8 @@ _efl_ui_slider_elm_widget_widget_event(Eo *obj, Efl_Ui_Slider_Data *sd, const Ef if (eo_event->desc == EFL_EVENT_KEY_DOWN) { -_slider_elm_widget_widget_event(obj, sd, eo_event, src); +if (!_slider_elm_widget_widget_event(obj, sd, eo_event, src)) + return EINA_FALSE; } else if (eo_event->desc == EFL_EVENT_KEY_UP) { --
[EGIT] [core/efl] master 01/01: efl intf: Add format interface
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0088143ccbe78c51b5daabd6cf78eb763f546b25 commit 0088143ccbe78c51b5daabd6cf78eb763f546b25 Author: Amitesh SinghDate: Mon Oct 16 15:24:06 2017 +0900 efl intf: Add format interface Ref T6204 --- src/Makefile_Efl.am | 1 + src/lib/efl/Efl.h| 1 + src/lib/efl/interfaces/efl_interfaces_main.c | 1 + src/lib/efl/interfaces/efl_ui_format.eo | 44 4 files changed, 47 insertions(+) diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index dff5d3cef8..c7233047bc 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -75,6 +75,7 @@ efl_eolian_files = \ lib/efl/interfaces/efl_ui_item.eo \ lib/efl/interfaces/efl_ui_menu.eo \ lib/efl/interfaces/efl_ui_autorepeat.eo \ + lib/efl/interfaces/efl_ui_format.eo \ $(efl_eolian_legacy_files) \ $(NULL) diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 1b5a9bcfe7..e4c76495fe 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -135,6 +135,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; #include "interfaces/efl_ui_model_connect.eo.h" #include "interfaces/efl_ui_factory.eo.h" #include "interfaces/efl_ui_model_factory_connect.eo.h" +#include "interfaces/efl_ui_format.eo.h" /* Observable interface */ #include "interfaces/efl_observer.eo.h" diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index 778108e699..eb85ef2773 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -68,6 +68,7 @@ #include "interfaces/efl_ui_scrollable.eo.c" #include "interfaces/efl_ui_selectable.eo.c" #include "interfaces/efl_ui_zoom.eo.c" +#include "interfaces/efl_ui_format.eo.c" EAPI void __efl_internal_init(void) diff --git a/src/lib/efl/interfaces/efl_ui_format.eo b/src/lib/efl/interfaces/efl_ui_format.eo new file mode 100644 index 00..74d6249127 --- /dev/null +++ b/src/lib/efl/interfaces/efl_ui_format.eo @@ -0,0 +1,44 @@ +import eina_types; + +function Efl.Ui.Format_Func_Cb { + [[Function pointer for format function hook]] + params { + @in str: ptr(Eina.Strbuf); + @in value: Eina.Value; + } +}; + +interface Efl.Ui.Format +{ + [[interface class for format_func]] + methods { + @property func_cb @protected { + set { +[[Set the format function pointer to format the indicator string. +]] + } + values { +func: Efl.Ui.Format_Func_Cb @nullable; [[The format function callback]] + } + } + @property unit @protected { + [[Control the format string for a given units label + + If $NULL is passed on $format, it will make $obj's units + area to be hidden completely. If not, it'll set the format + string for the units label's text. The units label is + provided a floating point value, so the units text is up display + at most one floating point value. Note that the units label is + optional. Use a format string such as "%1.2f meters" for example. + + Note: The default format string is an integer percentage, + as in $"%.0f %%". + ]] + set { + } + values { +units: string @nullable; [[The format string for $obj's units label.]] + } + } + } +} --
[EGIT] [tools/edi] master 01/01: welcome: make _edi_welcome_user_fullname_get less complex.
netstar pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=cf476eaee78c2f67c4dc9cd5bf991c5812bd16e7 commit cf476eaee78c2f67c4dc9cd5bf991c5812bd16e7 Author: Al PooleDate: Mon Oct 16 10:34:59 2017 +0100 welcome: make _edi_welcome_user_fullname_get less complex. --- src/bin/screens/edi_welcome.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/bin/screens/edi_welcome.c b/src/bin/screens/edi_welcome.c index 78bd2d0..177f6d8 100644 --- a/src/bin/screens/edi_welcome.c +++ b/src/bin/screens/edi_welcome.c @@ -322,17 +322,11 @@ _edi_welcome_user_fullname_get(const char *username, char *fullname, size_t max) unsigned int n; if (!username) - return -1; + return 0; - errno = 0; p = getpwnam(username); if (p == NULL || max == 0) - { -if (errno == 0) - return 0; -else - return -1; - } + return 0; pos = strchr(p->pw_gecos, ','); if (!pos) @@ -347,6 +341,7 @@ _edi_welcome_user_fullname_get(const char *username, char *fullname, size_t max) memcpy(fullname, p->pw_gecos, n); fullname[n] = '\0'; + return 1; } @@ -370,7 +365,7 @@ _edi_welcome_project_details(Evas_Object *naviframe, Edi_Template *template) _edi_welcome_project_new_directory_row_add(_("Parent Path"), row++, content); _edi_welcome_project_new_input_row_add(_("Project Name"), NULL, row++, content); _edi_welcome_project_new_input_row_add(_("Project URL"), NULL, row++, content); - if (_edi_welcome_user_fullname_get(username, fullname, 1024) > 0) + if (_edi_welcome_user_fullname_get(username, fullname, sizeof(fullname))) _edi_welcome_project_new_input_row_add(_("Creator Name"), fullname, row++, content); else _edi_welcome_project_new_input_row_add(_("Creator Name"), username, row++, content); --
[EGIT] [core/efl] master 12/12: efl_ui_focus_manager_calc: maintain focus when focused element is unregistered
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=45b4cdee1966c5638edbe4e35b143ee50ff50dbb commit 45b4cdee1966c5638edbe4e35b143ee50ff50dbb Author: Marcel HollerbachDate: Mon Oct 16 09:55:53 2017 +0200 efl_ui_focus_manager_calc: maintain focus when focused element is unregistered this should fix T6216. --- src/lib/elementary/efl_ui_focus_manager_calc.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c index 5295934cbb..88cdcf764c 100644 --- a/src/lib/elementary/efl_ui_focus_manager_calc.c +++ b/src/lib/elementary/efl_ui_focus_manager_calc.c @@ -784,6 +784,7 @@ EOLIAN static void _efl_ui_focus_manager_calc_unregister(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Calc_Data *pd, Efl_Ui_Focus_Object *child) { Node *node; + Eina_Bool refocus = EINA_FALSE; node = eina_hash_find(pd->node_hash, ); @@ -791,6 +792,13 @@ _efl_ui_focus_manager_calc_unregister(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_ F_DBG("Manager: %p unregister %p", obj, child); + if (eina_list_last_data_get(pd->focus_stack) == node) + { +//unfocus the current head +efl_ui_focus_object_focus_set(child, EINA_FALSE); +refocus = EINA_TRUE; + } + //remove the object from the stack if it hasn't done that until now //after this it's not at the top anymore @@ -798,6 +806,13 @@ _efl_ui_focus_manager_calc_unregister(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_ //delete again from the list, for the case it was not at the top pd->focus_stack = eina_list_remove(pd->focus_stack, node); + if (refocus) + { +Node *n = eina_list_last_data_get(pd->focus_stack); +if (n) + efl_ui_focus_object_focus_set(n->focusable, EINA_TRUE); + } + //add all neighbors of the node to the dirty list for(int i = EFL_UI_FOCUS_DIRECTION_UP; i < NODE_DIRECTIONS_COUNT; i++) { --
[EGIT] [core/efl] master 03/12: elm_widget: support logical parents that are not elm_widgets
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0a814a0c716ff0f42da66ed7cb4e181ec5a5f983 commit 0a814a0c716ff0f42da66ed7cb4e181ec5a5f983 Author: Marcel HollerbachDate: Sun Oct 15 15:30:08 2017 +0200 elm_widget: support logical parents that are not elm_widgets --- src/lib/elementary/elm_widget.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 0ac87aab04..cbcdd8fc2a 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -467,26 +467,32 @@ _logical_parent_eval(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd) //update old logical parent; if (pd->logical.parent) { - ELM_WIDGET_DATA_GET(pd->logical.parent, logical_wd); - if (!logical_wd) + if (efl_isa(pd->logical.parent, ELM_WIDGET_CLASS)) { - ERR("Widget parent has the wrong type!"); - return NULL; + ELM_WIDGET_DATA_GET(pd->logical.parent, logical_wd); + if (!logical_wd) +{ + ERR("Widget parent has the wrong type!"); + return NULL; +} + logical_wd->logical.child_count --; } - logical_wd->logical.child_count --; old = pd->logical.parent; efl_weak_unref(>logical.parent); pd->logical.parent = NULL; } if (parent) { - ELM_WIDGET_DATA_GET(parent, logical_wd); - if (!logical_wd) + if (efl_isa(parent, ELM_WIDGET_CLASS)) { - ERR("Widget parent has the wrong type!"); - return NULL; + ELM_WIDGET_DATA_GET(parent, parent_wd); + if (!parent_wd) +{ + ERR("Widget parent has the wrong type!"); + return NULL; +} + parent_wd->logical.child_count ++; } - logical_wd->logical.child_count ++; pd->logical.parent = parent; efl_weak_ref(>logical.parent); } @@ -503,15 +509,14 @@ _full_eval(Eo *obj, Elm_Widget_Smart_Data *pd) old_parent = _logical_parent_eval(obj, pd); - if (old_parent) + if (efl_isa(old_parent, ELM_WIDGET_CLASS)) { //emit signal and focus eval old and new ELM_WIDGET_DATA_GET(old_parent, old_pd); _full_eval(old_parent, old_pd); - } - if (pd->logical.parent) + if (efl_isa(pd->logical.parent, ELM_WIDGET_CLASS)) { ELM_WIDGET_DATA_GET(pd->logical.parent, new_pd); _full_eval(pd->logical.parent, new_pd); --
[EGIT] [core/efl] master 06/12: elm_grid: port to composition
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2eefabae8eee6a8fe609df1c923d68d6b550b4bf commit 2eefabae8eee6a8fe609df1c923d68d6b550b4bf Author: Marcel HollerbachDate: Sun Oct 15 17:08:35 2017 +0200 elm_grid: port to composition --- src/lib/elementary/elm_grid.c | 13 +++-- src/lib/elementary/elm_grid.eo | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/lib/elementary/elm_grid.c b/src/lib/elementary/elm_grid.c index 90d310262d..65c96ff461 100644 --- a/src/lib/elementary/elm_grid.c +++ b/src/lib/elementary/elm_grid.c @@ -3,6 +3,7 @@ #endif #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED +#define EFL_UI_FOCUS_COMPOSITION_PROTECTED #include #include @@ -14,12 +15,12 @@ #define MY_CLASS_NAME_LEGACY "elm_grid" static void -_focus_order_flush(Eo *obj) +_elm_grid_efl_ui_focus_composition_prepare(Eo *obj, void *pd EINA_UNUSED) { Elm_Widget_Smart_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_CLASS); Eina_List *order = evas_object_grid_children_get(wpd->resize_obj); - efl_ui_focus_manager_calc_update_order(wpd->focus.manager, obj, order); + efl_ui_focus_composition_elements_set(obj, order); } static void @@ -125,7 +126,7 @@ _elm_grid_pack(Eo *obj, void *_pd EINA_UNUSED, Evas_Object *subobj, Evas_Coord x elm_widget_sub_object_add(obj, subobj); evas_object_grid_pack(wd->resize_obj, subobj, x, y, w, h); - _focus_order_flush(obj); + efl_ui_focus_composition_dirty(obj); } EOLIAN static void @@ -135,7 +136,7 @@ _elm_grid_unpack(Eo *obj, void *_pd EINA_UNUSED, Evas_Object *subobj) _elm_widget_sub_object_redirect_to_top(obj, subobj); evas_object_grid_unpack(wd->resize_obj, subobj); - _focus_order_flush(obj); + efl_ui_focus_composition_dirty(obj); } EOLIAN static void @@ -154,7 +155,7 @@ _elm_grid_clear(Eo *obj, void *_pd EINA_UNUSED, Eina_Bool clear) } evas_object_grid_clear(wd->resize_obj, clear); - _focus_order_flush(obj); + efl_ui_focus_composition_dirty(obj); } EAPI void @@ -170,7 +171,7 @@ elm_grid_pack_set(Evas_Object *subobj, ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); evas_object_grid_pack(wd->resize_obj, subobj, x, y, w, h); - _focus_order_flush(obj); + efl_ui_focus_composition_dirty(obj); } EAPI void diff --git a/src/lib/elementary/elm_grid.eo b/src/lib/elementary/elm_grid.eo index 92604eb7b1..8e50dafe7b 100644 --- a/src/lib/elementary/elm_grid.eo +++ b/src/lib/elementary/elm_grid.eo @@ -1,4 +1,4 @@ -class Elm.Grid (Elm.Widget) +class Elm.Grid (Elm.Widget, Efl.Ui.Focus.Composition) { [[Elementary grid class]] legacy_prefix: elm_grid; @@ -56,5 +56,6 @@ class Elm.Grid (Elm.Widget) class.constructor; Efl.Object.constructor; Elm.Widget.theme_apply; + Efl.Ui.Focus.Composition.prepare; } } --
[EGIT] [core/efl] master 08/12: elm_toolbar: port to composition
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f32359baba4ccc3d46643cd58a353ba160a3253d commit f32359baba4ccc3d46643cd58a353ba160a3253d Author: Marcel HollerbachDate: Sun Oct 15 17:44:18 2017 +0200 elm_toolbar: port to composition --- src/lib/elementary/elm_toolbar.c| 101 src/lib/elementary/elm_toolbar.eo | 4 +- src/lib/elementary/elm_widget_toolbar.h | 1 - 3 files changed, 38 insertions(+), 68 deletions(-) diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index 97d5074a2d..e9d9a1c123 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -2,6 +2,7 @@ # include "elementary_config.h" #endif +#define EFL_UI_FOCUS_COMPOSITION_PROTECTED #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED #define EFL_ACCESS_SELECTION_PROTECTED #define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED @@ -64,62 +65,6 @@ static const Elm_Action key_actions[] = { static void _item_select(Elm_Toolbar_Item_Data *it); -static void -_item_focus_eval(Elm_Toolbar_Item_Data *pd) -{ - Eina_Bool want = EINA_TRUE; - Efl_Ui_Focus_Object *widget; - Efl_Ui_Focus_Manager *manager; - - if (elm_wdg_item_disabled_get(pd->base->eo_obj)) - want = EINA_FALSE; - - if (!evas_object_visible_get(VIEW(pd))) - want = EINA_FALSE; - - if (pd->separator) - want = EINA_FALSE; - - if (!!pd->registered == !!want) return; - - //grab manager from widget - widget = WIDGET(pd); - manager = widget; - - if (want) - { -efl_ui_focus_manager_calc_register(manager, EO_OBJ(pd), widget, NULL); -pd->registered = manager; - } - else - { -efl_ui_focus_manager_calc_unregister(manager, EO_OBJ(pd)); -pd->registered = NULL; - } - -} - -static void -_item_focus_eval_all(Elm_Toolbar *obj, Elm_Toolbar_Data *pd) -{ - Elm_Toolbar_Item_Data *it; - Eina_List *order = NULL; - - EINA_INLIST_FOREACH(pd->items, it) - { -_item_focus_eval(it); -order = eina_list_append(order, EO_OBJ(it)); - } - - if (pd->more_item) - { -_item_focus_eval(pd->more_item); -order = eina_list_append(order, EO_OBJ(pd->more_item)); - } - - efl_ui_focus_manager_calc_update_order(obj, obj, order); -} - static int _toolbar_item_prio_compare_cb(const void *i1, const void *i2) @@ -949,7 +894,7 @@ EOLIAN static void _elm_toolbar_item_elm_widget_item_disabled_set(Eo *eo_id, Elm_Toolbar_Item_Data *sd, Eina_Bool disabled) { elm_wdg_item_disabled_set(efl_super(eo_id, ELM_TOOLBAR_ITEM_CLASS), disabled); - _item_focus_eval(sd); + efl_ui_focus_composition_dirty(WIDGET(sd)); } EOLIAN static void @@ -2359,12 +2304,7 @@ _elm_toolbar_item_efl_object_destructor(Eo *eo_item, Elm_Toolbar_Item_Data *item item->selected && next) _item_select(next); } } - - if (item->registered) - { -efl_ui_focus_manager_calc_unregister(item->registered, eo_item); -item->registered = NULL; - } + efl_ui_focus_composition_dirty(WIDGET(item)); _item_del(item); @@ -4109,10 +4049,41 @@ elm_toolbar_icon_order_lookup_get(const Evas_Object *obj EINA_UNUSED) return ELM_ICON_LOOKUP_FDO_THEME; } +static Eina_Bool +_part_of_chain(Elm_Toolbar_Item_Data *pd) +{ + Eina_Bool want = EINA_TRUE; + if (elm_wdg_item_disabled_get(pd->base->eo_obj)) + want = EINA_FALSE; + + if (!evas_object_visible_get(VIEW(pd))) + want = EINA_FALSE; + + if (pd->separator) + want = EINA_FALSE; + + return want; +} + EOLIAN static void -_elm_toolbar_efl_ui_focus_object_prepare_logical(Eo *obj, Elm_Toolbar_Data *pd) +_elm_toolbar_efl_ui_focus_composition_prepare(Eo *obj, Elm_Toolbar_Data *pd) { - _item_focus_eval_all(obj, pd); + Elm_Toolbar_Item_Data *it; + Eina_List *order = NULL; + + EINA_INLIST_FOREACH(pd->items, it) + { + if (_part_of_chain(it)) + order = eina_list_append(order, EO_OBJ(it)); + } + + if (pd->more_item) + { +if (_part_of_chain(pd->more_item)) + order = eina_list_append(order, EO_OBJ(pd->more_item)); + } + + efl_ui_focus_composition_elements_set(obj, order); } diff --git a/src/lib/elementary/elm_toolbar.eo b/src/lib/elementary/elm_toolbar.eo index 1ba5e8b36b..c194043b1e 100644 --- a/src/lib/elementary/elm_toolbar.eo +++ b/src/lib/elementary/elm_toolbar.eo @@ -23,7 +23,7 @@ enum Elm.Toolbar.Shrink_Mode last [[Indicates error if returned by elm_toolbar_shrink_mode_get()]] } -class Elm.Toolbar (Elm.Widget, Elm.Interface_Scrollable, Efl.Ui.Direction, +class Elm.Toolbar (Elm.Widget, Efl.Ui.Focus.Composition, Elm.Interface_Scrollable, Efl.Ui.Direction, Elm.Interface.Atspi_Widget_Action, Efl.Access.Selection, Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Menu) { @@ -344,7 +344,7 @@
[EGIT] [core/efl] master 01/12: elm_widget: also unregister if the logical parent changes
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4edba079c4f4d9c287c6284cd65ca3731cac6a6c commit 4edba079c4f4d9c287c6284cd65ca3731cac6a6c Author: Marcel HollerbachDate: Sun Oct 15 15:23:56 2017 +0200 elm_widget: also unregister if the logical parent changes --- src/lib/elementary/elm_widget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 5fbce1f57e..427f905225 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -355,6 +355,7 @@ _elm_widget_focus_state_apply(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED, El if (//check if we have changed the manager (current_state.manager != configured_state->manager) || + (current_state.parent != configured_state->parent) || //check if we are already registered but in a different state (current_state.logical != configured_state->logical)) { --
[EGIT] [core/efl] master 10/12: elm_menu: implement provider_find to walk the parent relation
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ac703d82291974788f26b0c13f946dc38fadcf68 commit ac703d82291974788f26b0c13f946dc38fadcf68 Author: Marcel HollerbachDate: Sun Oct 15 19:29:08 2017 +0200 elm_menu: implement provider_find to walk the parent relation it turns out elm_menu is special, it doesnt use parent_obj of elm_widget, it has his own parent field, which should be used. --- src/lib/elementary/elm_menu.c | 14 ++ src/lib/elementary/elm_menu.eo | 1 + 2 files changed, 15 insertions(+) diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c index 5348ea707f..d426464c32 100644 --- a/src/lib/elementary/elm_menu.c +++ b/src/lib/elementary/elm_menu.c @@ -1506,6 +1506,20 @@ _elm_menu_efl_access_selection_selected_child_get(Eo *obj EINA_UNUSED, Elm_Menu_ } +EOLIAN static Efl_Object* +_elm_menu_efl_object_provider_find(Eo *obj, Elm_Menu_Data *pd, const Efl_Object *klass) +{ + Efl_Object *result; + + result = efl_provider_find(pd->parent, klass); + + if (result) return result; + + return efl_provider_find(efl_super(obj, MY_CLASS), klass); +} + + + /* Internal EO APIs and hidden overrides */ #define ELM_MENU_EXTRA_OPS \ diff --git a/src/lib/elementary/elm_menu.eo b/src/lib/elementary/elm_menu.eo index e50c4e9549..094b12954b 100644 --- a/src/lib/elementary/elm_menu.eo +++ b/src/lib/elementary/elm_menu.eo @@ -68,6 +68,7 @@ class Elm.Menu (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Menu, Efl.Ui.Menu.first_item { get; } Efl.Ui.Menu.last_item { get; } Efl.Ui.Menu.items { get; } + Efl.Object.provider_find; } events { dismissed; [[Called when menu widget was dismissed]] --
[EGIT] [core/efl] master 07/12: elm_table: port to composition
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d712c1a9112aa82283c539064a580f193f5e7910 commit d712c1a9112aa82283c539064a580f193f5e7910 Author: Marcel HollerbachDate: Sun Oct 15 17:16:52 2017 +0200 elm_table: port to composition --- src/lib/elementary/elm_table.c | 24 ++-- src/lib/elementary/elm_table.eo | 4 ++-- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/lib/elementary/elm_table.c b/src/lib/elementary/elm_table.c index d9d16bb7ce..bee56656f7 100644 --- a/src/lib/elementary/elm_table.c +++ b/src/lib/elementary/elm_table.c @@ -3,6 +3,7 @@ #endif #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED +#define EFL_UI_FOCUS_COMPOSITION_PROTECTED #include #include @@ -15,12 +16,12 @@ #define MY_CLASS_NAME_LEGACY "elm_table" static void -_focus_order_flush(Eo *obj) +_elm_table_efl_ui_focus_composition_prepare(Eo *obj, void *pd EINA_UNUSED) { Elm_Widget_Smart_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_CLASS); Eina_List *order = evas_object_table_children_get(wpd->resize_obj); - efl_ui_focus_manager_calc_update_order(wpd->focus.manager, obj, order); + efl_ui_focus_composition_elements_set(obj, order); } static void @@ -239,7 +240,7 @@ _elm_table_pack(Eo *obj, void *_pd EINA_UNUSED, Evas_Object *subobj, int col, in elm_widget_sub_object_add(obj, subobj); evas_object_table_pack(wd->resize_obj, subobj, col, row, colspan, rowspan); - _focus_order_flush(obj); + efl_ui_focus_composition_dirty(obj); } EOLIAN static void @@ -270,7 +271,7 @@ _elm_table_pack_set(Eo *obj, void *_pd EINA_UNUSED, Evas_Object *subobj, int col ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); evas_object_table_pack(wd->resize_obj, subobj, col, row, colspan, rowspan); - _focus_order_flush(obj); + efl_ui_focus_composition_dirty(obj); } EAPI void @@ -305,7 +306,7 @@ _elm_table_clear(Eo *obj, void *_pd EINA_UNUSED, Eina_Bool clear) ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); evas_object_table_clear(wd->resize_obj, clear); - _focus_order_flush(obj); + efl_ui_focus_composition_dirty(obj); } EOLIAN static Evas_Object* @@ -330,19 +331,6 @@ _elm_table_efl_canvas_group_group_calculate(Eo *obj, void *pd EINA_UNUSED) evas_object_smart_calculate(wd->resize_obj); } -EOLIAN Eina_Bool -_elm_table_elm_widget_focus_state_apply(Eo *obj, void *pd EINA_UNUSED, Elm_Widget_Focus_State current_state, Elm_Widget_Focus_State *configured_state, Elm_Widget *redirect) -{ - Eina_Bool result = elm_obj_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, redirect); - - //later registering children are automatically set into the order of the internal table - if (configured_state->manager) - _focus_order_flush(obj); - - return result; -} - - /* Internal EO APIs and hidden overrides */ #define ELM_TABLE_EXTRA_OPS \ diff --git a/src/lib/elementary/elm_table.eo b/src/lib/elementary/elm_table.eo index 92a0c855b4..115d43c1c0 100644 --- a/src/lib/elementary/elm_table.eo +++ b/src/lib/elementary/elm_table.eo @@ -1,4 +1,4 @@ -class Elm.Table (Elm.Widget) +class Elm.Table (Elm.Widget, Efl.Ui.Focus.Composition) { [[Elementary table class]] legacy_prefix: elm_table; @@ -123,6 +123,6 @@ class Elm.Table (Elm.Widget) Efl.Canvas.Group.group_calculate; Elm.Widget.theme_apply; Elm.Widget.widget_sub_object_del; - Elm.Widget.focus_state_apply; + Efl.Ui.Focus.Composition.prepare; } } --
[EGIT] [core/efl] master 11/12: elm_toolbar: make the manager customisable
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=124586c8e4cc1521b7421582119c41a5156b77cf commit 124586c8e4cc1521b7421582119c41a5156b77cf Author: Marcel HollerbachDate: Sun Oct 15 19:44:35 2017 +0200 elm_toolbar: make the manager customisable so the toolbar items can be registered correctly --- src/lib/elementary/efl_ui_focus_composition.c | 30 +- src/lib/elementary/efl_ui_focus_composition.eo | 6 ++ src/lib/elementary/elm_toolbar.c | 2 ++ 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_composition.c b/src/lib/elementary/efl_ui_focus_composition.c index 051777d020..b9f94847cb 100644 --- a/src/lib/elementary/efl_ui_focus_composition.c +++ b/src/lib/elementary/efl_ui_focus_composition.c @@ -14,20 +14,27 @@ typedef struct { Eina_List *order, *targets_ordered; Eina_List *register_target, *registered_targets; Eina_List *adapters; - Efl_Ui_Focus_Manager *registered; + Efl_Ui_Focus_Manager *registered, *custom_manager; Eina_Bool dirty; } Efl_Ui_Focus_Composition_Data; static void _state_apply(Eo *obj, Efl_Ui_Focus_Composition_Data *pd) { + Efl_Ui_Focus_Manager *manager; + + if (pd->custom_manager) + manager = pd->custom_manager; + else + manager = pd->registered; + if (!pd->registered && pd->registered_targets) { Efl_Ui_Focus_Object *o; //remove all of them EINA_LIST_FREE(pd->registered_targets, o) { - efl_ui_focus_manager_calc_unregister(pd->registered, o); + efl_ui_focus_manager_calc_unregister(manager, o); } } else if (pd->registered) @@ -37,16 +44,16 @@ _state_apply(Eo *obj, Efl_Ui_Focus_Composition_Data *pd) //remove all of them EINA_LIST_FREE(pd->registered_targets, o) { - efl_ui_focus_manager_calc_unregister(pd->registered, o); + efl_ui_focus_manager_calc_unregister(manager, o); } EINA_LIST_FOREACH(pd->register_target, n, o) { - efl_ui_focus_manager_calc_register(pd->registered, o, obj, NULL); + efl_ui_focus_manager_calc_register(manager, o, obj, NULL); pd->registered_targets = eina_list_append(pd->registered_targets, o); } -efl_ui_focus_manager_calc_update_order(pd->registered, obj, eina_list_clone(pd->targets_ordered)); +efl_ui_focus_manager_calc_update_order(manager, obj, eina_list_clone(pd->targets_ordered)); } } @@ -155,6 +162,19 @@ _efl_ui_focus_composition_efl_ui_focus_object_prepare_logical(Eo *obj, Efl_Ui_Fo pd->dirty = EINA_FALSE; } +EOLIAN static void +_efl_ui_focus_composition_custom_manager_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd, Efl_Ui_Focus_Manager *custom_manager) +{ + pd->custom_manager = custom_manager; +} + +EOLIAN static Efl_Ui_Focus_Manager* +_efl_ui_focus_composition_custom_manager_get(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd) +{ + return pd->custom_manager; +} + + #include "efl_ui_focus_composition.eo.c" typedef struct { diff --git a/src/lib/elementary/efl_ui_focus_composition.eo b/src/lib/elementary/efl_ui_focus_composition.eo index 5d0f23b200..57f5d3818a 100644 --- a/src/lib/elementary/efl_ui_focus_composition.eo +++ b/src/lib/elementary/efl_ui_focus_composition.eo @@ -29,6 +29,12 @@ mixin Efl.Ui.Focus.Composition (Efl.Interface, Elm.Widget ) { You can use this function to call composition_elements. ]] } + @property custom_manager @protected { + [[Every widget will be registered in this manager]] + values { +custom_manager : Efl.Ui.Focus.Manager; + } + } } implements { Elm.Widget.focus_state_apply; diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index e9d9a1c123..8c69e640a7 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -2966,6 +2966,8 @@ _elm_toolbar_efl_object_constructor(Eo *obj, Elm_Toolbar_Data *_pd EINA_UNUSED) evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_TOOL_BAR); + efl_ui_focus_composition_custom_manager_set(obj, obj); + return obj; } --
[EGIT] [core/efl] master 04/12: efl_ui_focus_composition: introduce dirty and prepare
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=132eaba8d359a00e4d47d2112dd286d12468af0c commit 132eaba8d359a00e4d47d2112dd286d12468af0c Author: Marcel HollerbachDate: Sun Oct 15 16:02:39 2017 +0200 efl_ui_focus_composition: introduce dirty and prepare this can be used in a container that has his own item management api, Each item management call results in a dirty call, once we are called to prepare for logical movement we can simply flush the order. So we reduce the spam of order calls, which also safes runtime. --- src/lib/elementary/efl_ui_focus_composition.c | 21 + src/lib/elementary/efl_ui_focus_composition.eo | 12 2 files changed, 33 insertions(+) diff --git a/src/lib/elementary/efl_ui_focus_composition.c b/src/lib/elementary/efl_ui_focus_composition.c index 84ad2035c0..051777d020 100644 --- a/src/lib/elementary/efl_ui_focus_composition.c +++ b/src/lib/elementary/efl_ui_focus_composition.c @@ -2,6 +2,8 @@ # include "elementary_config.h" #endif +#define EFL_UI_FOCUS_COMPOSITION_PROTECTED + #include #include "elm_priv.h" #include "efl_ui_focus_composition_adapter.eo.h" @@ -13,6 +15,7 @@ typedef struct { Eina_List *register_target, *registered_targets; Eina_List *adapters; Efl_Ui_Focus_Manager *registered; + Eina_Bool dirty; } Efl_Ui_Focus_Composition_Data; static void @@ -134,6 +137,24 @@ _efl_ui_focus_composition_elm_widget_focus_state_apply(Eo *obj, Efl_Ui_Focus_Com return registered; } +EOLIAN static void +_efl_ui_focus_composition_dirty(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd) +{ + pd->dirty = EINA_TRUE; +} + +EOLIAN static void +_efl_ui_focus_composition_efl_ui_focus_object_prepare_logical(Eo *obj, Efl_Ui_Focus_Composition_Data *pd) +{ + efl_ui_focus_object_prepare_logical(efl_super(obj, MY_CLASS)); + + if (!pd->dirty) return; + + efl_ui_focus_composition_prepare(obj); + + pd->dirty = EINA_FALSE; +} + #include "efl_ui_focus_composition.eo.c" typedef struct { diff --git a/src/lib/elementary/efl_ui_focus_composition.eo b/src/lib/elementary/efl_ui_focus_composition.eo index 2f7cb8efe0..5d0f23b200 100644 --- a/src/lib/elementary/efl_ui_focus_composition.eo +++ b/src/lib/elementary/efl_ui_focus_composition.eo @@ -19,8 +19,20 @@ mixin Efl.Ui.Focus.Composition (Efl.Interface, Elm.Widget ) { logical_order : list @owned; [[The order to use]] } } + dirty @protected { + [[ Mark this widget as dirty, the children can be considered to be changed after that call + ]] + } + prepare @protected { + [[A call to prepare the children of this element, called if marked as dirty + + You can use this function to call composition_elements. + ]] + } } implements { Elm.Widget.focus_state_apply; + Efl.Ui.Focus.Object.prepare_logical; + @empty .prepare; } } --
[EGIT] [core/efl] master 05/12: elm_box: port to composition
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cb27a739686a8ae0673202c86a173e4055985084 commit cb27a739686a8ae0673202c86a173e4055985084 Author: Marcel HollerbachDate: Sun Oct 15 16:55:08 2017 +0200 elm_box: port to composition --- src/lib/elementary/elm_box.c | 45 --- src/lib/elementary/elm_box.eo | 4 ++-- 2 files changed, 19 insertions(+), 30 deletions(-) diff --git a/src/lib/elementary/elm_box.c b/src/lib/elementary/elm_box.c index 4641c15e19..ba71a6a496 100644 --- a/src/lib/elementary/elm_box.c +++ b/src/lib/elementary/elm_box.c @@ -3,6 +3,7 @@ #endif #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED +#define EFL_UI_FOCUS_COMPOSITION_PROTECTED #include #include @@ -23,12 +24,12 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = { }; static void -_focus_order_flush(Eo *obj, Elm_Box_Data *pd EINA_UNUSED) +_elm_box_efl_ui_focus_composition_prepare(Eo *obj, Elm_Box_Data *pd EINA_UNUSED) { Elm_Widget_Smart_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_CLASS); Eina_List *order = evas_object_box_children_get(wpd->resize_obj); - efl_ui_focus_manager_calc_update_order(wpd->focus.manager, obj, order); + efl_ui_focus_composition_elements_set(obj, order); } static void @@ -402,27 +403,27 @@ _elm_box_homogeneous_get(Eo *obj EINA_UNUSED, Elm_Box_Data *sd) } EOLIAN static void -_elm_box_pack_start(Eo *obj, Elm_Box_Data *pd, Evas_Object *subobj) +_elm_box_pack_start(Eo *obj, Elm_Box_Data *pd EINA_UNUSED, Evas_Object *subobj) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); elm_widget_sub_object_add(obj, subobj); evas_object_box_prepend(wd->resize_obj, subobj); - _focus_order_flush(obj, pd); + efl_ui_focus_composition_dirty(obj); } EOLIAN static void -_elm_box_pack_end(Eo *obj, Elm_Box_Data *pd, Evas_Object *subobj) +_elm_box_pack_end(Eo *obj, Elm_Box_Data *pd EINA_UNUSED, Evas_Object *subobj) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); elm_widget_sub_object_add(obj, subobj); evas_object_box_append(wd->resize_obj, subobj); - _focus_order_flush(obj, pd); + efl_ui_focus_composition_dirty(obj); } EOLIAN static void -_elm_box_pack_before(Eo *obj, Elm_Box_Data *pd, Evas_Object *subobj, Evas_Object *before) +_elm_box_pack_before(Eo *obj, Elm_Box_Data *pd EINA_UNUSED, Evas_Object *subobj, Evas_Object *before) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); @@ -430,41 +431,41 @@ _elm_box_pack_before(Eo *obj, Elm_Box_Data *pd, Evas_Object *subobj, Evas_Object evas_object_box_insert_before (wd->resize_obj, subobj, before); - _focus_order_flush(obj, pd); + efl_ui_focus_composition_dirty(obj); } EOLIAN static void -_elm_box_pack_after(Eo *obj, Elm_Box_Data *pd, Evas_Object *subobj, Evas_Object *after) +_elm_box_pack_after(Eo *obj, Elm_Box_Data *pd EINA_UNUSED, Evas_Object *subobj, Evas_Object *after) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); elm_widget_sub_object_add(obj, subobj); evas_object_box_insert_after (wd->resize_obj, subobj, after); - _focus_order_flush(obj, pd); + efl_ui_focus_composition_dirty(obj); } EOLIAN static void -_elm_box_clear(Eo *obj, Elm_Box_Data *pd) +_elm_box_clear(Eo *obj, Elm_Box_Data *pd EINA_UNUSED) { /* EINA_TRUE means to delete objects as well */ ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); evas_object_box_remove_all(wd->resize_obj, EINA_TRUE); - _focus_order_flush(obj, pd); + efl_ui_focus_composition_dirty(obj); } EOLIAN static void -_elm_box_unpack(Eo *obj, Elm_Box_Data *pd, Evas_Object *subobj) +_elm_box_unpack(Eo *obj, Elm_Box_Data *pd EINA_UNUSED, Evas_Object *subobj) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); if (evas_object_box_remove(wd->resize_obj, subobj)) _elm_widget_sub_object_redirect_to_top(obj, subobj); - _focus_order_flush(obj, pd); + efl_ui_focus_composition_dirty(obj); } EOLIAN static void -_elm_box_unpack_all(Eo *obj, Elm_Box_Data *pd) +_elm_box_unpack_all(Eo *obj, Elm_Box_Data *pd EINA_UNUSED) { Evas_Object_Box_Data *bd; Evas_Object_Box_Option *opt; @@ -488,7 +489,7 @@ _elm_box_unpack_all(Eo *obj, Elm_Box_Data *pd) _elm_widget_sub_object_redirect_to_top(obj, c); /* update size hints */ _sizing_eval(obj); - _focus_order_flush(obj, pd); + efl_ui_focus_composition_dirty(obj); } EAPI void @@ -651,18 +652,6 @@ _elm_box_class_constructor(Efl_Class *klass) { evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); } -EOLIAN Eina_Bool -_elm_box_elm_widget_focus_state_apply(Eo *obj, Elm_Box_Data *pd, Elm_Widget_Focus_State current_state, Elm_Widget_Focus_State *configured_state, Elm_Widget *redirect) -{ - Eina_Bool result = elm_obj_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, redirect); - - //later registering children are automatically set into the order of the internal table - if