[EGIT] [core/efl] master 01/02: examples/evas: Use printf instead of fprintf(stdout, ...)
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a71b770bbc848bff2231bac1e75bf2a85885aca5 commit a71b770bbc848bff2231bac1e75bf2a85885aca5 Author: Bryce Harrington Date: Thu Apr 20 14:21:21 2017 +0900 examples/evas: Use printf instead of fprintf(stdout, ...) Summary: Applies the correction purely mechanically using the following shell command-line: src/examples/evas$ grep -sr 'fprintf(stdout' . | cut -d: -f1 | uniq | \ xargs sed -i "s/fprintf(stdout/printf(/" This fixes a few warnings about lack of a format string: warning: format not a string literal and no format arguments [-Wformat-security] fprintf(stdout, commands); Reviewers: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D4691 --- src/examples/evas/evas-3d-colorpick.c | 8 ++-- src/examples/evas/evas-3d-frustum.c | 18 - src/examples/evas/evas-3d-shadows.c | 22 +-- src/examples/evas/evas-aspect-hints.c | 10 ++--- src/examples/evas/evas-box.c| 28 +++--- src/examples/evas/evas-events.c | 50 - src/examples/evas/evas-hints.c | 28 +++--- src/examples/evas/evas-images.c | 24 ++-- src/examples/evas/evas-images2.c| 10 ++--- src/examples/evas/evas-images4.c| 8 ++-- src/examples/evas/evas-images5.c| 6 +-- src/examples/evas/evas-multiseat-events.c | 26 ++--- src/examples/evas/evas-object-manipulation-eo.c | 22 +-- src/examples/evas/evas-object-manipulation.c| 24 ++-- src/examples/evas/evas-smart-interface.c| 32 src/examples/evas/evas-smart-object.c | 22 +-- src/examples/evas/evas-stacking.c | 46 +++ src/examples/evas/evas-textblock-obstacles.c| 18 - src/examples/evas/evas-transparent.c| 6 +-- 19 files changed, 204 insertions(+), 204 deletions(-) diff --git a/src/examples/evas/evas-3d-colorpick.c b/src/examples/evas/evas-3d-colorpick.c index 71a4fca..751fe3e 100644 --- a/src/examples/evas/evas-3d-colorpick.c +++ b/src/examples/evas/evas-3d-colorpick.c @@ -193,7 +193,7 @@ _on_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, _recalculate_position(); } else - fprintf(stdout, "Down, Up for position of camera; Left, Right for scale of each node"); + printf("Down, Up for position of camera; Left, Right for scale of each node"); } static void _on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void *event_info) @@ -215,7 +215,7 @@ _on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *eo EINA diff_sec = ((float)time) / CLOCKS_PER_SEC / 10; if (flag) { - fprintf(stdout, "Boom! Time expended for color pick: %2.7f .\n", diff_sec); + printf("Boom! Time expended for color pick: %2.7f .\n", diff_sec); evas_canvas3d_node_scale_set(n, VEC_3(SMALL_SCALE)); } } @@ -227,7 +227,7 @@ _on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *eo EINA diff_sec = ((float)time) / CLOCKS_PER_SEC / 10; if (flag) { - fprintf(stdout, "Boom! Time expended for geometry pick: %2.7f .\n", diff_sec); + printf("Boom! Time expended for geometry pick: %2.7f .\n", diff_sec); evas_canvas3d_node_scale_set(n, VEC_3(BIG_SCALE)); } } @@ -356,7 +356,7 @@ int main(int argc, char **argv) if (!precision) precision = 30; if (!texture) texture = (char *)image_path; - fprintf(stdout, "row - %d, col - %d, precision of spheres - %d, texture - %s\n", + printf("row - %d, col - %d, precision of spheres - %d, texture - %s\n", row, col, precision, texture); ecore_evas = ecore_evas_new("opengl_x11", 10, 10, WIDTH, HEIGHT, NULL); diff --git a/src/examples/evas/evas-3d-frustum.c b/src/examples/evas/evas-3d-frustum.c index a107cd1..a9b60fb 100644 --- a/src/examples/evas/evas-3d-frustum.c +++ b/src/examples/evas/evas-3d-frustum.c @@ -65,12 +65,12 @@ Evas_Canvas3D_Frustum_Mode key = EVAS_CANVAS3D_FRUSTUM_MODE_AABB; static void _show_help() { - fprintf(stdout, "Press 'w'/'s' key to move far frustum plane from/to the camera\n"); - fprintf(stdout, "Press 't'/'g' key to move near frustum plane from/to the camera\n"); - fprintf(stdout, "Press '1'/'2' key to set camera to the first/second position\n"); - fprintf(stdout, "Press '3'/'4'/'5' key to set bounding sphere/aabb/central point mode\n"); - fprintf(stdout, "Press 'i', 'k', 'j', 'l', 'u' and 'o' keys to move mesh node in 3D\n"); - fprintf(stdout, "Press 'z', 'x', 'c', 'Z', 'X' and
[EGIT] [core/efl] master 01/01: elm_image: Fix file_set when preload is disabled
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=331bf9f74683aad72415e007af14c3d4713f112b commit 331bf9f74683aad72415e007af14c3d4713f112b Author: Jean-Philippe Andre Date: Thu Apr 20 18:29:26 2017 +0900 elm_image: Fix file_set when preload is disabled If we disable preload, then the second file set on an elm_image object would not trigger a deletion of the first image. As a consequence, both images would be visible... really bad if there's alpha or different dimensions! Thanks Anand Kumar for the report! @fix --- src/bin/elementary/test_image.c | 67 --- src/lib/elementary/efl_ui_image.c | 18 --- 2 files changed, 70 insertions(+), 15 deletions(-) diff --git a/src/bin/elementary/test_image.c b/src/bin/elementary/test_image.c index fc6bdf1..5da9f6c 100644 --- a/src/bin/elementary/test_image.c +++ b/src/bin/elementary/test_image.c @@ -347,7 +347,7 @@ _img_load_cancel_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info E } static void -_create_image(Evas_Object *data, Eina_Bool async, Eina_Bool preload) +_create_image(Evas_Object *data, Eina_Bool async, Eina_Bool preload, Eina_Bool logo) { Evas_Object *win = data; Evas_Object *im, *status_text; @@ -381,12 +381,15 @@ _create_image(Evas_Object *data, Eina_Bool async, Eina_Bool preload) evas_object_smart_callback_add(im, "load,cancel", _img_load_cancel_cb, status_text); STATUS_SET(status_text, "Loading image..."); - snprintf(buf, sizeof(buf) - 1, "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get()); + if (!logo) + snprintf(buf, sizeof(buf) - 1, "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get()); + else + snprintf(buf, sizeof(buf) - 1, "%s/images/logo.png", elm_app_data_dir_get()); elm_image_file_set(im, buf, NULL); } static void -_bt_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +_reload_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { Evas_Object *win = data; Evas_Object *im = evas_object_data_get(win, "im"); @@ -394,9 +397,37 @@ _bt_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUS Evas_Object *chk2 = evas_object_data_get(win, "chk2"); Eina_Bool async = elm_check_state_get(chk1); Eina_Bool preload = elm_check_state_get(chk2); + Eina_Bool logo = EINA_FALSE; + const char *file = NULL; + + elm_image_file_get(im, &file, NULL); + logo = (file && strstr(file, "logo")); evas_object_del(im); - _create_image(win, async, preload); + _create_image(win, async, preload, logo); +} + +static void +_switch_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + Evas_Object *win = data; + Evas_Object *im = evas_object_data_get(win, "im"); + char buf[PATH_MAX] = {0}; + Eina_Bool logo = EINA_FALSE; + const char *file = NULL; + + elm_image_file_get(im, &file, NULL); + logo = (file && strstr(file, "logo")); + + if (logo) + { +snprintf(buf, sizeof(buf) - 1, "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get()); + } + else + { +snprintf(buf, sizeof(buf) - 1, "%s/images/logo.png", elm_app_data_dir_get()); + } + elm_image_file_set(im, buf, NULL); } void @@ -414,7 +445,7 @@ test_load_image(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve evas_object_show(box); evas_object_data_set(win, "box", box); - _create_image(win, EINA_FALSE, EINA_FALSE); + _create_image(win, EINA_FALSE, EINA_FALSE, EINA_FALSE); hbox = elm_box_add(win); elm_box_horizontal_set(hbox, EINA_TRUE); @@ -448,12 +479,26 @@ test_load_image(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve evas_object_show(hbox); elm_box_pack_end(box, hbox); - bt = elm_button_add(win); - evas_object_size_hint_align_set(bt, 0.5, 0.0); - elm_object_text_set(bt, "Image Reload"); - evas_object_smart_callback_add(bt, "clicked", _bt_clicked, win); - elm_box_pack_end(box, bt); - evas_object_show(bt); + hbox = elm_box_add(win); + elm_box_horizontal_set(hbox, EINA_TRUE); + elm_box_align_set(hbox, 0.5, 0.5); + evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(hbox, EVAS_HINT_FILL, 0.0); + { + bt = elm_button_add(win); + elm_object_text_set(bt, "Image Reload"); + evas_object_smart_callback_add(bt, "clicked", _reload_clicked, win); + elm_box_pack_end(hbox, bt); + evas_object_show(bt); + + bt = elm_button_add(win); + elm_object_text_set(bt, "Image Switch"); + evas_object_smart_callback_add(bt, "clicked", _switch_clicked, win); + elm_box_pack_end(hbox, bt); + evas_object_show(bt); + } + evas_object_show(hbox); + elm_box_pack_end(box, hbox); evas_object_resize(win, 320, 480); evas_object_show(win);
[EGIT] [core/efl] efl-1.19 01/01: elm_image: Fix file_set when preload is disabled
jpeg pushed a commit to branch efl-1.19. http://git.enlightenment.org/core/efl.git/commit/?id=4eda12b5e1d6e968fb0b057f11c280a87916e93f commit 4eda12b5e1d6e968fb0b057f11c280a87916e93f Author: Jean-Philippe Andre Date: Thu Apr 20 18:29:26 2017 +0900 elm_image: Fix file_set when preload is disabled If we disable preload, then the second file set on an elm_image object would not trigger a deletion of the first image. As a consequence, both images would be visible... really bad if there's alpha or different dimensions! Thanks Anand Kumar for the report! @fix Also merges master commit: elm_image: Improve test case from previous patch --- src/bin/elementary/test_image.c | 74 +-- src/lib/elementary/efl_ui_image.c | 18 +++--- 2 files changed, 77 insertions(+), 15 deletions(-) diff --git a/src/bin/elementary/test_image.c b/src/bin/elementary/test_image.c index fc6bdf1..67f90dd 100644 --- a/src/bin/elementary/test_image.c +++ b/src/bin/elementary/test_image.c @@ -347,7 +347,7 @@ _img_load_cancel_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info E } static void -_create_image(Evas_Object *data, Eina_Bool async, Eina_Bool preload) +_create_image(Evas_Object *data, Eina_Bool async, Eina_Bool preload, Eina_Bool logo) { Evas_Object *win = data; Evas_Object *im, *status_text; @@ -381,12 +381,15 @@ _create_image(Evas_Object *data, Eina_Bool async, Eina_Bool preload) evas_object_smart_callback_add(im, "load,cancel", _img_load_cancel_cb, status_text); STATUS_SET(status_text, "Loading image..."); - snprintf(buf, sizeof(buf) - 1, "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get()); + if (!logo) + snprintf(buf, sizeof(buf) - 1, "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get()); + else + snprintf(buf, sizeof(buf) - 1, "%s/images/logo.png", elm_app_data_dir_get()); elm_image_file_set(im, buf, NULL); } static void -_bt_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +_reload_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { Evas_Object *win = data; Evas_Object *im = evas_object_data_get(win, "im"); @@ -394,9 +397,44 @@ _bt_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUS Evas_Object *chk2 = evas_object_data_get(win, "chk2"); Eina_Bool async = elm_check_state_get(chk1); Eina_Bool preload = elm_check_state_get(chk2); + Eina_Bool logo = EINA_FALSE; + const char *file = NULL; + + elm_image_file_get(im, &file, NULL); + logo = (file && strstr(file, "logo")); evas_object_del(im); - _create_image(win, async, preload); + _create_image(win, async, preload, logo); +} + +static void +_switch_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + Evas_Object *win = data; + Evas_Object *im = evas_object_data_get(win, "im"); + Evas_Object *chk1 = evas_object_data_get(win, "chk1"); + Evas_Object *chk2 = evas_object_data_get(win, "chk2"); + Eina_Bool async = elm_check_state_get(chk1); + Eina_Bool preload = elm_check_state_get(chk2); + char buf[PATH_MAX] = {0}; + Eina_Bool logo = EINA_FALSE; + const char *file = NULL; + + elm_image_file_get(im, &file, NULL); + logo = (file && strstr(file, "logo")); + + if (logo) + { +snprintf(buf, sizeof(buf) - 1, "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get()); + } + else + { +snprintf(buf, sizeof(buf) - 1, "%s/images/logo.png", elm_app_data_dir_get()); + } + + elm_image_async_open_set(im, async); + elm_image_preload_disabled_set(im, preload); + elm_image_file_set(im, buf, NULL); } void @@ -414,7 +452,7 @@ test_load_image(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve evas_object_show(box); evas_object_data_set(win, "box", box); - _create_image(win, EINA_FALSE, EINA_FALSE); + _create_image(win, EINA_FALSE, EINA_FALSE, EINA_FALSE); hbox = elm_box_add(win); elm_box_horizontal_set(hbox, EINA_TRUE); @@ -448,12 +486,26 @@ test_load_image(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve evas_object_show(hbox); elm_box_pack_end(box, hbox); - bt = elm_button_add(win); - evas_object_size_hint_align_set(bt, 0.5, 0.0); - elm_object_text_set(bt, "Image Reload"); - evas_object_smart_callback_add(bt, "clicked", _bt_clicked, win); - elm_box_pack_end(box, bt); - evas_object_show(bt); + hbox = elm_box_add(win); + elm_box_horizontal_set(hbox, EINA_TRUE); + elm_box_align_set(hbox, 0.5, 0.5); + evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(hbox, EVAS_HINT_FILL, 0.0); + { + bt = elm_button_add(win); + elm_object_text_set(bt, "Image Reload"); + evas_object_smart_callback_add(bt, "clicked", _reload_clicked, win); + elm_box_p
[EGIT] [core/efl] master 01/01: edje_cc: Keep script block during group inheritance
conr2d pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2cd1326c8d5407e2e89f01ba4b1f6c7ab6211fc3 commit 2cd1326c8d5407e2e89f01ba4b1f6c7ab6211fc3 Author: Jeeyong Um Date: Thu Apr 20 20:26:17 2017 +0900 edje_cc: Keep script block during group inheritance Currently, script block is removed when an edje group inherits from other group after defining its own script block. group { "somegroup"; script { ... } parts { ... } inherit: "othergroup"; // <= previous script block is removed here. } If parent group doesn't have script block, it doesn't need to overwrite previous one. This will keep script block and print warning when script block is overwritten. --- src/bin/edje/edje_cc_handlers.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 2c62ed3..aae16a2 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -4914,9 +4914,22 @@ st_collections_group_inherit(void) cd = eina_list_data_get(eina_list_last(codes)); cd->is_lua = cd2->is_lua; - cd->shared = STRDUP(cd2->shared); - cd->original = STRDUP(cd2->original); - script_override = EINA_TRUE; + if (cd2->shared) + { +if (cd->shared) + { + WRN("%s:%i. script block in group \"%s\" will be overwritten by inheriting " + "from group \"%s\".", file_in, line - 1, pc->part, pc2->part); + free(cd->shared); + } +if (cd->original) + free(cd->original); + +cd->shared = STRDUP(cd2->shared); +cd->original = STRDUP(cd2->original); + +script_override = EINA_TRUE; + } EINA_LIST_FOREACH(cd2->programs, l, cp2) { @@ -5267,8 +5280,10 @@ st_collections_group_program_source(void) static void ob_collections_group_script(void) { + Edje_Part_Collection *pc; Code *cd; + pc = eina_list_last_data_get(edje_collections); cd = eina_list_data_get(eina_list_last(codes)); if (!is_verbatim()) track_verbatim(1); @@ -5288,6 +5303,9 @@ ob_collections_group_script(void) free(cd->shared); free(cd->original); script_override = EINA_FALSE; + + WRN("%s:%i. Inherited script block in group \"%s\" is redefined. " + "This can break inherited edje programs.", file_in, line - 1, pc->part); } else { --
[EGIT] [core/efl] master 02/68: focus: update object definition
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=357715f091ddc085f4264fe2ec96d27f38c5bf49 commit 357715f091ddc085f4264fe2ec96d27f38c5bf49 Author: Marcel Hollerbach Date: Mon Oct 24 12:58:30 2016 +0200 focus: update object definition the event is now a bit better, since you only need to subscribe to one event instead of two, the new state is passed in the event. --- src/lib/elementary/efl_ui_focus_object.c | 14 +- src/lib/elementary/efl_ui_focus_object.eo | 12 +++- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_object.c b/src/lib/elementary/efl_ui_focus_object.c index 16d6c3b..220f146 100644 --- a/src/lib/elementary/efl_ui_focus_object.c +++ b/src/lib/elementary/efl_ui_focus_object.c @@ -6,20 +6,16 @@ #include "elm_priv.h" typedef struct { - + Eina_Bool old_focus; } Efl_Ui_Focus_Object_Data; EOLIAN static void -_efl_ui_focus_object_focus_set(Eo *obj, Efl_Ui_Focus_Object_Data *pd EINA_UNUSED, Eina_Bool focus) +_efl_ui_focus_object_focus_set(Eo *obj, Efl_Ui_Focus_Object_Data *pd, Eina_Bool focus) { - const Efl_Event_Description *desc; - - if (focus) - desc = EFL_UI_FOCUS_OBJECT_EVENT_FOCUS; - else - desc = EFL_UI_FOCUS_OBJECT_EVENT_UNFOCUS; + if (pd->old_focus == focus) return; - efl_event_callback_call(obj, desc, NULL); + efl_event_callback_call(obj, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED , (void*) (uintptr_t) focus); + pd->old_focus = focus; } diff --git a/src/lib/elementary/efl_ui_focus_object.eo b/src/lib/elementary/efl_ui_focus_object.eo index 9db36b2..4bbfb0b 100644 --- a/src/lib/elementary/efl_ui_focus_object.eo +++ b/src/lib/elementary/efl_ui_focus_object.eo @@ -3,17 +3,20 @@ mixin Efl.Ui.Focus.Object [[Functions of focusable objects]] methods { geometry_get { +[[The geometry which should be used to calculate the relations to others]] params { -@out rect : Eina.Rectangle; +@out rect : Eina.Rectangle; [[the geometry to use]] } } @property focus { [[This gets called by the manager and should never be called by someone else - It can be used by a implementation of a focus object to adapt to changes which are needed + It can be used by a implementation of a focus object to adapt to changes which are needed. + + The function is emitting the focus state events, if focus is different to the state before. ]] values { -focus : bool; +focus : bool; [[The state in which the object should be put]] } } } @@ -22,7 +25,6 @@ mixin Efl.Ui.Focus.Object @empty .focus.get; } events { -focus; -unfocus; +focus,changed : bool; [[Emitted if the focus state has changed]] } } \ No newline at end of file --
[EGIT] [core/efl] master 21/68: elm_widget: update focus register work
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b53f3edd15b0590d0c6059e2bfb8f5829a7a7ae8 commit b53f3edd15b0590d0c6059e2bfb8f5829a7a7ae8 Author: Marcel Hollerbach Date: Wed Dec 7 16:59:13 2016 +0100 elm_widget: update focus register work now it trackes changes of the parent manager. And registers more reliable. --- src/lib/elementary/elm_widget.c | 189 --- src/lib/elementary/elm_widget.eo | 8 ++ src/lib/elementary/elm_widget.h | 5 +- 3 files changed, 151 insertions(+), 51 deletions(-) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 0bc4cec..13479fc 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -205,7 +205,7 @@ _tree_unfocusable(Eo *obj) Elm_Widget *wid = obj; do { - ELM_WIDGET_DATA_GET(obj, wid_pd); + ELM_WIDGET_DATA_GET(wid, wid_pd); if (wid_pd->tree_unfocusable) return EINA_TRUE; } while((wid = elm_widget_parent_widget_get(wid))); @@ -213,33 +213,70 @@ _tree_unfocusable(Eo *obj) return EINA_FALSE; } + +static void _full_eval(Eo *obj, Elm_Widget_Smart_Data *pd); + static void +_manager_changed_cb(void *data, const Efl_Event *event EINA_UNUSED) +{ + ELM_WIDGET_DATA_GET(data, pd); + + _full_eval(data, pd); +} + +static Efl_Ui_Focus_Object* _focus_manager_eval(Eo *obj, Elm_Widget_Smart_Data *pd) { - Evas_Object *parent = obj; - Efl_Ui_Focus_Manager *new = NULL; + Evas_Object *provider = NULL; + Evas_Object *parent; + Efl_Ui_Focus_Manager *new = NULL, *old = NULL; - do + parent = elm_widget_parent_get(obj); + if (efl_isa(parent, EFL_UI_FOCUS_MANAGER_CLASS)) { -if (efl_isa(parent, EFL_UI_FOCUS_MANAGER_CLASS)) - new = parent; +new = parent; + } + else + { +new = efl_ui_focus_user_manager_get(parent); +provider = parent; } - while(!new && (parent = elm_widget_parent_get(parent))); - if (new != pd->focus.chained_manager) + if (new != pd->manager.manager ) { -efl_event_callback_call(obj, EFL_UI_FOCUS_USER_EVENT_MANAGER_CHANGED, new); -pd->focus.chained_manager = new; +old = pd->manager.manager; + +if (pd->manager.provider) + efl_event_callback_del(pd->manager.provider, EFL_UI_FOCUS_USER_EVENT_MANAGER_CHANGED, _manager_changed_cb, obj); + +pd->manager.manager = new; +pd->manager.provider = provider; + +if (pd->manager.provider) + efl_event_callback_add(pd->manager.provider, EFL_UI_FOCUS_USER_EVENT_MANAGER_CHANGED, _manager_changed_cb, obj); } - if (!new) - ERR("Failed to find manager object"); + + return old; +} + +EOLIAN static void +_elm_widget_focus_register(Eo *obj, Elm_Widget_Smart_Data *pd, + Efl_Ui_Focus_Manager *manager, + Efl_Ui_Focus_Object *logical, Eina_Bool full) +{ + if (full) + efl_ui_focus_manager_register(manager, obj, logical, NULL); + else + efl_ui_focus_manager_register_logical(manager, obj, logical); } + static void _focus_state_eval(Eo *obj, Elm_Widget_Smart_Data *pd) { Eina_Bool should = EINA_FALSE; Eina_Bool want_full = EINA_FALSE; + Efl_Ui_Focus_Manager *manager = efl_ui_focus_user_manager_get(obj); //there are two reasons to be registered, the child count is bigger than 0, or the widget is flagged to be able to handle focus if (pd->can_focus) @@ -257,18 +294,27 @@ _focus_state_eval(Eo *obj, Elm_Widget_Smart_Data *pd) if (pd->logical.child_count > 0) should = EINA_TRUE; + if (!manager || +//check if we have changed the manager +(pd->focus.manager != manager && should) || +//check if we are already registered but in a different state +(pd->focus.manager && should && want_full == pd->focus.logical) + ) + { +efl_ui_focus_manager_unregister(pd->focus.manager, obj); +pd->focus.manager = NULL; + } + //now register in the manager if (should && !pd->focus.manager) { -pd->focus.manager = efl_ui_focus_user_manager_get(obj); -pd->focus.logical = !want_full; - -if (pd->focus.manager != obj) +if (manager != obj) { - if (want_full) - efl_ui_focus_manager_register(pd->focus.manager, obj, pd->logical.parent, NULL); - else - efl_ui_focus_manager_register_logical(pd->focus.manager, obj, pd->logical.parent); + pd->focus.manager = manager; + + elm_obj_widget_focus_register(obj, pd->focus.manager, pd->logical.parent, want_full); + + pd->focus.logical = !want_full; } } else if (!should && pd->focus.manager) @@ -276,49 +322,85 @@ _focus_state_eval(Eo *obj, Elm_Widget_Smart_Data *pd) efl_ui_focus_manager_unregister(pd->focus.manager, obj); pd->focus.manager = NULL; } - else if (should && pd->fo
[EGIT] [core/efl] master 15/68: elm_widget: make sure we dont have a destructed logical parent
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e614c96466da7841729855948ffe04cd70150513 commit e614c96466da7841729855948ffe04cd70150513 Author: Marcel Hollerbach Date: Fri Nov 18 13:28:11 2016 +0100 elm_widget: make sure we dont have a destructed logical parent --- 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 62c0f70..6879b7a 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -256,6 +256,7 @@ _focus_state_eval(Eo *obj, Elm_Widget_Smart_Data *pd) logical_wd->logical.child_count ++; _focus_state_eval(parent, logical_wd); pd->logical.parent = parent; + efl_weak_ref(&pd->logical.parent); } } } --
[EGIT] [core/efl] master 29/68: efl_ui_focus_manager: more debug information
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0c1c2711f323309c051f35ce6b9376bcd4eb2c03 commit 0c1c2711f323309c051f35ce6b9376bcd4eb2c03 Author: Marcel Hollerbach Date: Mon Dec 12 19:10:19 2016 +0100 efl_ui_focus_manager: more debug information --- src/lib/elementary/efl_ui_focus_manager.c | 13 + src/lib/elementary/efl_ui_focus_manager.eo | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index c640450..a3c390e 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -1216,6 +1216,19 @@ _efl_ui_focus_manager_fetch(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus res->down = DIR_CLONE(EFL_UI_FOCUS_DIRECTION_DOWN); res->next = _next(n)->focusable; res->prev = _prev(n)->focusable; + switch(n->type) + { +case NODE_TYPE_LISTENER: + res->type = "listener"; +break; +case NODE_TYPE_ONLY_LOGICAL: + res->type = "logical"; +break; +case NODE_TYPE_NORMAL: + res->type = "normal"; +break; + } + res->parent = T(n).parent->focusable; res->redirect = n->type == NODE_TYPE_LISTENER ? n->data.listener.manager : NULL; #undef DIR_CLONE diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index e69c179..c110284 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -16,6 +16,8 @@ struct Efl.Ui.Focus.Relations{ down : list; next : Efl.Ui.Focus.Object; prev : Efl.Ui.Focus.Object; +type : string; +parent : Efl.Ui.Focus.Object; redirect : Efl.Ui.Focus.Manager; } --
[EGIT] [core/efl] master 07/68: elm_widget: make it a efl_ui_focus_object
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=97265254e6ebb52f334a6d3e623681edb0399160 commit 97265254e6ebb52f334a6d3e623681edb0399160 Author: Marcel Hollerbach Date: Fri Nov 4 17:43:40 2016 +0100 elm_widget: make it a efl_ui_focus_object it will register based on it can_focus flag --- src/lib/elementary/elm_widget.c | 103 ++- src/lib/elementary/elm_widget.eo | 5 +- src/lib/elementary/elm_widget.h | 3 ++ 3 files changed, 109 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 7521ebd..44f2f7e 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -199,6 +199,24 @@ elm_widget_focus_highlight_enabled_get(const Evas_Object *obj) return EINA_FALSE; } +static void +_focus_state_eval(Eo *obj, Elm_Widget_Smart_Data *pd) +{ + if (pd->can_focus && !pd->focus.manager) + { +pd->focus.manager = efl_ui_focus_user_manager_get(obj); +if (pd->focus.manager != obj) + efl_ui_focus_manager_register(pd->focus.manager, obj, pd->focus.manager, NULL); +else + pd->focus.manager = NULL; + } + else if (!pd->can_focus && pd->focus.manager) + { +efl_ui_focus_manager_unregister(pd->focus.manager, obj); +pd->focus.manager = NULL; + } +} + /** * @internal * @@ -1470,6 +1488,8 @@ _elm_widget_can_focus_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Bool can_focu } efl_event_callback_array_del(obj, focus_callbacks(), NULL); } + if (efl_finalized_get(obj)) + _focus_state_eval(obj, sd); } EOLIAN static Eina_Bool @@ -3866,11 +3886,30 @@ _elm_widget_theme_object_set(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *ed return ret; } +static void +_convert(Efl_Dbg_Info *info, Eina_List *ptr_list) +{ + Eina_List *n; + void *p; + int i = 0; + + EINA_LIST_FOREACH(ptr_list, n, p) + { +char name[100]; + +snprintf(name, sizeof(name), "Candidate %d", i); + +EFL_DBG_INFO_APPEND(info, name, EINA_VALUE_TYPE_UINT64, p); +i++; + } +} + EOLIAN static void _elm_widget_efl_object_dbg_info_get(Eo *eo_obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Efl_Dbg_Info *root) { efl_dbg_info_get(efl_super(eo_obj, MY_CLASS), root); - Efl_Dbg_Info *group = EFL_DBG_INFO_LIST_APPEND(root, MY_CLASS_NAME); + Efl_Ui_Focus_Relations *rel = NULL; + Efl_Dbg_Info *focus, *group = EFL_DBG_INFO_LIST_APPEND(root, MY_CLASS_NAME); EFL_DBG_INFO_APPEND(group, "Wid-Type", EINA_VALUE_TYPE_STRING, elm_widget_type_get(eo_obj)); EFL_DBG_INFO_APPEND(group, "Style", EINA_VALUE_TYPE_STRING, elm_widget_style_get(eo_obj)); @@ -3880,12 +3919,36 @@ _elm_widget_efl_object_dbg_info_get(Eo *eo_obj, Elm_Widget_Smart_Data *_pd EINA_ evas_object_scale_get(eo_obj)); EFL_DBG_INFO_APPEND(group, "Has focus", EINA_VALUE_TYPE_CHAR, elm_object_focus_get(eo_obj)); + EFL_DBG_INFO_APPEND(group, "Can focus", EINA_VALUE_TYPE_CHAR, + elm_widget_can_focus_get(eo_obj)); EFL_DBG_INFO_APPEND(group, "Disabled", EINA_VALUE_TYPE_CHAR, elm_widget_disabled_get(eo_obj)); EFL_DBG_INFO_APPEND(group, "Mirrored", EINA_VALUE_TYPE_CHAR, elm_widget_mirrored_get(eo_obj)); EFL_DBG_INFO_APPEND(group, "Automatic mirroring", EINA_VALUE_TYPE_CHAR, elm_widget_mirrored_automatic_get(eo_obj)); + + + rel = efl_ui_focus_manager_fetch(_pd->focus.manager, eo_obj); + if (rel) + { +focus = EFL_DBG_INFO_LIST_APPEND(group, "Focus"); + +EFL_DBG_INFO_APPEND(focus, "Next", EINA_VALUE_TYPE_UINT64 , rel->next); +EFL_DBG_INFO_APPEND(focus, "Prev", EINA_VALUE_TYPE_UINT64 , rel->prev); + +#define ADD_PTR_LIST(name) \ +Efl_Dbg_Info* name = EFL_DBG_INFO_LIST_APPEND(focus, " "#name" "); \ +_convert(name, rel->name); + +ADD_PTR_LIST(top) +ADD_PTR_LIST(down) +ADD_PTR_LIST(right) +ADD_PTR_LIST(left) + +#undef ADD_PTR_LIST + + } } EAPI Eina_Bool @@ -5821,9 +5884,23 @@ _elm_widget_efl_object_constructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSE sd->on_create = EINA_FALSE; elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_UNKNOWN); + return obj; } +EOLIAN static Efl_Object* +_elm_widget_efl_object_finalize(Eo *obj, Elm_Widget_Smart_Data *pd) +{ + Eo *eo; + + eo = efl_finalize(efl_super(obj, MY_CLASS)); + + _focus_state_eval(obj, pd); + + return eo; +} + + EOLIAN static void _elm_widget_efl_object_destructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED) { @@ -6090,5 +6167,29 @@ _elm_widget_efl_object_provider_find(Eo *obj, Elm_Widget_Smart_Data *pd, const E } +EOLIAN static Efl_Ui_Focus_Manager* +_elm_widget_efl_ui_focus_user_manager_get(Eo *obj, Elm_Widget_Smart_Data *pd) +{ + Evas_Object *parent = obj; + + do + { +if (efl_isa(parent,
[EGIT] [core/efl] master 05/68: focus: fix compilation
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=78e78910295c2321dd7a8855e2c1dcdb5820d484 commit 78e78910295c2321dd7a8855e2c1dcdb5820d484 Author: Marcel Hollerbach Date: Thu Oct 27 19:06:17 2016 +0200 focus: fix compilation it seems like eolian changed, so i need to import the eina_types --- src/lib/elementary/efl_ui_focus_object.eo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/efl_ui_focus_object.eo b/src/lib/elementary/efl_ui_focus_object.eo index 4bbfb0b..106d09c 100644 --- a/src/lib/elementary/efl_ui_focus_object.eo +++ b/src/lib/elementary/efl_ui_focus_object.eo @@ -1,3 +1,5 @@ +import eina_types; + mixin Efl.Ui.Focus.Object { [[Functions of focusable objects]] --
[EGIT] [core/efl] master 58/68: elm_widget: add unfocusable to debug informations
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=716ec352d134d82a35fba4276b62f0a92bc08b65 commit 716ec352d134d82a35fba4276b62f0a92bc08b65 Author: Marcel Hollerbach Date: Wed Dec 21 21:40:52 2016 +0100 elm_widget: add unfocusable to debug informations --- src/lib/elementary/elm_widget.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 6745de3..f7af9e6 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -4149,6 +4149,8 @@ _elm_widget_efl_object_dbg_info_get(Eo *eo_obj, Elm_Widget_Smart_Data *_pd EINA_ elm_widget_disabled_get(eo_obj)); EFL_DBG_INFO_APPEND(group, "Mirrored", EINA_VALUE_TYPE_CHAR, elm_widget_mirrored_get(eo_obj)); + EFL_DBG_INFO_APPEND(group, "Tree Unfocusable", EINA_VALUE_TYPE_CHAR, + elm_widget_tree_unfocusable_get(eo_obj)); EFL_DBG_INFO_APPEND(group, "Automatic mirroring", EINA_VALUE_TYPE_CHAR, elm_widget_mirrored_automatic_get(eo_obj)); --
[EGIT] [core/efl] master 25/68: efl_ui_focus_manager: unset redirect when destroyed
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8a216da3bba58b83da48659175d2ac1dea7636b6 commit 8a216da3bba58b83da48659175d2ac1dea7636b6 Author: Marcel Hollerbach Date: Mon Dec 12 19:09:03 2016 +0100 efl_ui_focus_manager: unset redirect when destroyed --- src/lib/elementary/efl_ui_focus_manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index e8c57a8..9d312ce 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -749,6 +749,8 @@ _efl_ui_focus_manager_efl_object_destructor(Eo *obj, Efl_Ui_Focus_Manager_Data * eina_hash_free(pd->node_hash); + efl_ui_focus_manager_redirect_set(obj, NULL); + if (pd->root) node_item_free(pd->root); pd->root = NULL; --
[EGIT] [core/efl] master 35/68: efl_ui_focus_manager: be more secure
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=200ad8ab50d4a0563fe0b63dd0176954004466df commit 200ad8ab50d4a0563fe0b63dd0176954004466df Author: Marcel Hollerbach Date: Mon Dec 19 19:24:45 2016 +0100 efl_ui_focus_manager: be more secure --- src/lib/elementary/efl_ui_focus_manager.c | 16 1 file changed, 16 insertions(+) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index cdf58bc..82a301c 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -516,6 +516,11 @@ _efl_ui_focus_manager_register_logical(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, E EINA_SAFETY_ON_NULL_RETURN_VAL(child, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(parent, EINA_FALSE); + if (redirect) + EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(redirect, MY_CLASS), EINA_FALSE); + + F_DBG("Manager: %p register %p %p %p", obj, child, parent, redirect); + pnode = node_get(obj, pd, parent); if (!pnode) return EINA_FALSE; @@ -538,6 +543,11 @@ _efl_ui_focus_manager_register(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Fo EINA_SAFETY_ON_NULL_RETURN_VAL(child, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(parent, EINA_FALSE); + if (redirect) + EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(redirect, MY_CLASS), EINA_FALSE); + + F_DBG("Manager: %p register %p %p %p", obj, child, parent, redirect); + pnode = node_get(obj, pd, parent); if (!pnode) return EINA_FALSE; @@ -562,6 +572,9 @@ _efl_ui_focus_manager_update_redirect(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Ef Node *node = node_get(obj, pd, child); if (!node) return EINA_FALSE; + if (redirect) + EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(redirect, MY_CLASS), EINA_FALSE); + node->redirect_manager = redirect; return EINA_TRUE; @@ -647,6 +660,9 @@ _efl_ui_focus_manager_unregister(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data if (!node) return; + F_DBG("Manager: %p unregister %p", obj, child); + + //remove the object from the stack if it hasnt dont that until now //after this its not at the top anymore //elm_widget_focus_set(node->focusable, EINA_FALSE); --
[EGIT] [core/efl] master 26/68: efl_ui_focus_manager: make next and prev searching deadlock prove
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1424875f0a1a49d112f58f4854caa2d97b686c40 commit 1424875f0a1a49d112f58f4854caa2d97b686c40 Author: Marcel Hollerbach Date: Mon Dec 12 19:09:34 2016 +0100 efl_ui_focus_manager: make next and prev searching deadlock prove --- src/lib/elementary/efl_ui_focus_manager.c | 30 +++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 9d312ce..7d2019d 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -949,6 +949,8 @@ _logical_movement(Efl_Ui_Focus_Manager_Data *pd EINA_UNUSED, Node *upper, Efl_Ui { Node* (*deliver)(Node *n); Node *result; + Eina_List *stack = NULL; + if (direction == EFL_UI_FOCUS_DIRECTION_NEXT) deliver = _next; else @@ -956,9 +958,25 @@ _logical_movement(Efl_Ui_Focus_Manager_Data *pd EINA_UNUSED, Node *upper, Efl_Ui //search as long as we have a none logical parent result = upper; - do { - result = deliver(result); - } while(result && result->type == NODE_TYPE_ONLY_LOGICAL); + do + { +//give up, if we have already been here +if (!!eina_list_data_find(stack, result)) + { + eina_list_free(stack); + ERR("Warning cycle detected\n"); + return NULL; + } + +stack = eina_list_append(stack, result); + +result = deliver(result); + } while(result && result->type != NODE_TYPE_NORMAL); + + if (result->type != NODE_TYPE_NORMAL) + abort(); + + eina_list_free(stack); return result; } @@ -1034,6 +1052,12 @@ _efl_ui_focus_manager_focus(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus node = node_get(pd, focus); if (!node) return; + if (node->type == NODE_TYPE_ONLY_LOGICAL) + { +ERR("Logical node cannot be focused"); +return; + } + //check if this is already the focused object old_focus = eina_list_last_data_get(pd->focus_stack); --
[EGIT] [core/efl] master 54/68: efl_ui_flip: migrate to new focus system
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bd5bf5e719e738945936638b27ca52fbe45a055f commit bd5bf5e719e738945936638b27ca52fbe45a055f Author: Marcel Hollerbach Date: Wed Dec 21 13:06:54 2016 +0100 efl_ui_flip: migrate to new focus system --- src/lib/elementary/efl_ui_flip.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/lib/elementary/efl_ui_flip.c b/src/lib/elementary/efl_ui_flip.c index 5e69761..fc8c3d7 100644 --- a/src/lib/elementary/efl_ui_flip.c +++ b/src/lib/elementary/efl_ui_flip.c @@ -1792,6 +1792,8 @@ _flip_content_set(Evas_Object *obj, //evas_object_smart_member_add(content, obj); evas_object_clip_set (content, front ? sd->front.clip : sd->back.clip); +if (efl_isa(content, ELM_WIDGET_CLASS) && sd->state != front) + elm_widget_tree_unfocusable_set(content, EINA_TRUE); } // force calc to contents are the right size before transition @@ -2012,6 +2014,13 @@ _internal_elm_flip_go_to(Evas_Object *obj, if (front) elm_object_focus_set(sd->front.content, EINA_TRUE); else elm_object_focus_set(sd->back.content, EINA_TRUE); } + + if (sd->front.content && efl_isa(sd->front.content, ELM_WIDGET_CLASS)) + elm_widget_tree_unfocusable_set(sd->front.content, !front); + if (sd->back.content && efl_isa(sd->back.content, ELM_WIDGET_CLASS)) + elm_widget_tree_unfocusable_set(sd->back.content, front); + + } EOLIAN static void --
[EGIT] [core/efl] master 40/68: efl_ui_focus_manager: allow settings of subsets
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f09dd5e3df812ae98846b9f42b090cdcafd7a644 commit f09dd5e3df812ae98846b9f42b090cdcafd7a644 Author: Marcel Hollerbach Date: Tue Dec 20 17:24:09 2016 +0100 efl_ui_focus_manager: allow settings of subsets those subsets will just be prepended. --- src/lib/elementary/efl_ui_focus_manager.c | 37 ++ src/lib/elementary/efl_ui_focus_manager.eo | 1 + 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 0412363..87afd28 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -613,6 +613,22 @@ _efl_ui_focus_manager_update_parent(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Da return EINA_TRUE; } +static Eina_List* +_set_a_without_b(Eina_List *a, Eina_List *b) +{ + Eina_List *a_out = NULL, *node; + void *data; + + a_out = eina_list_clone(a); + + EINA_LIST_FOREACH(b, node, data) + { +a_out = eina_list_remove(a_out, data); + } + + return a_out; +} + static Eina_Bool _equal_set(Eina_List *none_nodes, Eina_List *nodes) { @@ -631,7 +647,7 @@ _equal_set(Eina_List *none_nodes, Eina_List *nodes) } EOLIAN static Eina_Bool -_efl_ui_focus_manager_update_children(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *parent, Eina_List *order) +_efl_ui_focus_manager_update_children(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *parent, Eina_List *order, Eina_Bool subset) { Node *pnode; @@ -640,13 +656,24 @@ _efl_ui_focus_manager_update_children(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_ if (!pnode) return EINA_FALSE; - if (!_equal_set(order, T(pnode).children)) + if (!subset) { -ERR("Set of children is not equal"); -return EINA_FALSE; +if (!_equal_set(order, T(pnode).children)) + { + ERR("Set of children is not equal"); + return EINA_FALSE; + } +T(pnode).children = order; } + else + { +Eina_List *not_ordered; + +not_ordered = _set_a_without_b(T(pnode).children, order); - T(pnode).children = order; +eina_list_free(T(pnode).children); +T(pnode).children = eina_list_merge(order, not_ordered); + } return EINA_TRUE; } diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index fa8b4ed..9f85659 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -96,6 +96,7 @@ class Efl.Ui.Focus.Manager (Efl.Object) { params { parent : Efl.Ui.Focus.Object @nonull; [[the parent to update]] children : list; [[the list with the new order]] +subset : bool; [[$false to make sure childrenlist is the same size as the real logical children, $true to just add this order to the beginning of the children]] } return : bool; } --
[EGIT] [core/efl] master 14/68: efl_ui_focus_manager_sub: register the root as logical
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6264eb64e4adc8e9d61e01d799cffc39f613e1f3 commit 6264eb64e4adc8e9d61e01d799cffc39f613e1f3 Author: Marcel Hollerbach Date: Fri Nov 18 13:26:24 2016 +0100 efl_ui_focus_manager_sub: register the root as logical --- src/lib/elementary/efl_ui_focus_manager_sub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index 8732ec9..6dbfd66 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -111,8 +111,8 @@ _parent_set(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd, Efl_Ui_Focus_Manager *ma if (pd->manager) { - //register our own root in the upper manager - efl_ui_focus_manager_register(pd->manager, obj, pd->parent, obj); + //register our own root in the upper manager as logical + efl_ui_focus_manager_register_logical(pd->manager, obj, pd->parent); //listen to the manager efl_event_callback_array_add(pd->manager, parent_manager(), obj); --
[EGIT] [core/efl] master 23/68: efl_ui_focus_manager_sub: register the forwared itself
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0df0d9d358004d2e3f94e163f6818896a5e65e1e commit 0df0d9d358004d2e3f94e163f6818896a5e65e1e Author: Marcel Hollerbach Date: Wed Dec 7 22:27:36 2016 +0100 efl_ui_focus_manager_sub: register the forwared itself --- src/lib/elementary/efl_ui_focus_manager_sub.c | 13 +++-- src/lib/elementary/efl_ui_focus_manager_sub.eo | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index a610d55..89b6b4e 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -167,9 +167,18 @@ EFL_CALLBACKS_ARRAY_DEFINE(self_manager, EOLIAN static void _efl_ui_focus_manager_sub_efl_object_parent_set(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd EINA_UNUSED, Efl_Object *parent) { - efl_event_callback_array_del(efl_parent_get(obj), self_manager(), obj); + Eo *old_parent, *new_parent; + + old_parent = efl_parent_get(obj); + + efl_event_callback_forwarder_del(obj, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, old_parent); + efl_event_callback_array_del(old_parent, self_manager(), obj); + efl_parent_set(efl_super(obj, MY_CLASS), parent); - efl_event_callback_array_add(efl_parent_get(obj), self_manager(), obj); + + new_parent = efl_parent_get(obj); + efl_event_callback_forwarder_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, new_parent); + efl_event_callback_array_add(new_parent, self_manager(), obj); } EOLIAN static Efl_Object* diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.eo b/src/lib/elementary/efl_ui_focus_manager_sub.eo index d936fff..6fb78ef 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.eo +++ b/src/lib/elementary/efl_ui_focus_manager_sub.eo @@ -9,6 +9,8 @@ class Efl.Ui.Focus.Manager.Sub (Efl.Ui.Focus.Manager, Efl.Object) You can filter the border elements by overriding the border_elements property of the manager. This class is only working as composite object to a Efl.Ui.Focus.User and Efl.Ui.Focus.Object. + + The object itself does redirect the managers settings to the object where this object is attached ]] methods { } --
[EGIT] [core/efl] master 12/68: efl_ui_focus_manager: use data iterator not key iterator
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a5868fc81962a97ef9ba280d6fb33e15d38b421d commit a5868fc81962a97ef9ba280d6fb33e15d38b421d Author: Marcel Hollerbach Date: Wed Nov 16 20:50:20 2016 +0100 efl_ui_focus_manager: use data iterator not key iterator this saves one call to node_get --- src/lib/elementary/efl_ui_focus_manager.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 71ead77..f32e5ac 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -229,12 +229,12 @@ _calculate_node(Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *node, Dimens { Eina_Rectangle rect = EINA_RECTANGLE_INIT; Efl_Ui_Focus_Object *op; - Efl_Ui_Focus_Object **focus_key; int dim_min, dim_max; Eina_Iterator *nodes; int cur_pos_min = 0, cur_neg_min = 0; + Node *n; - nodes = eina_hash_iterator_key_new(pd->node_hash); + nodes = eina_hash_iterator_data_new(pd->node_hash); efl_ui_focus_object_geometry_get(node, &rect); *pos = NULL; @@ -251,17 +251,14 @@ _calculate_node(Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *node, Dimens dim_max = rect.x + rect.w; } - EINA_ITERATOR_FOREACH(nodes, focus_key) + EINA_ITERATOR_FOREACH(nodes, n) { -Node *n; Eina_Rectangle op_rect = EINA_RECTANGLE_INIT; int min, max; -op = *focus_key; +op = n->focusable; if (op == node) continue; -n = node_get(pd, op); - if (n->type == NODE_TYPE_ONLY_LOGICAL) continue; efl_ui_focus_object_geometry_get(op, &op_rect); --
[EGIT] [core/efl] master 16/68: elm_widget: add logical parent to interface
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4932ec5f63232f66eb67ec743613dc739f4ced79 commit 4932ec5f63232f66eb67ec743613dc739f4ced79 Author: Marcel Hollerbach Date: Sat Nov 19 12:46:21 2016 +0100 elm_widget: add logical parent to interface and evaluate all values correctly and emit the correct events --- src/lib/elementary/efl_ui_focus_user.eo | 10 +++ src/lib/elementary/elm_widget.c | 114 +--- src/lib/elementary/elm_widget.eo| 1 + src/lib/elementary/elm_widget.h | 3 +- 4 files changed, 89 insertions(+), 39 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_user.eo b/src/lib/elementary/efl_ui_focus_user.eo index cd242ee..da7389b 100644 --- a/src/lib/elementary/efl_ui_focus_user.eo +++ b/src/lib/elementary/efl_ui_focus_user.eo @@ -10,8 +10,18 @@ interface Efl.Ui.Focus.User { manager : Efl.Ui.Focus.Manager; [[The manager object]] } } +@property parent { +[[Describes which logical parent is used by this object]] +get { + +} +values { +logical_parent : Efl.Ui.Focus.Object; +} +} } events { manager,changed : Efl.Ui.Focus.Manager; [[emitted if a new manager is the parent for this one]] +logical,changed : Efl.Ui.Focus.Object; [[emitted if a new logical_parent should be used]] } } \ No newline at end of file diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 6879b7a..0bc4cec 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -214,6 +214,28 @@ _tree_unfocusable(Eo *obj) } static void +_focus_manager_eval(Eo *obj, Elm_Widget_Smart_Data *pd) +{ + Evas_Object *parent = obj; + Efl_Ui_Focus_Manager *new = NULL; + + do + { +if (efl_isa(parent, EFL_UI_FOCUS_MANAGER_CLASS)) + new = parent; + } + while(!new && (parent = elm_widget_parent_get(parent))); + + if (new != pd->focus.chained_manager) + { +efl_event_callback_call(obj, EFL_UI_FOCUS_USER_EVENT_MANAGER_CHANGED, new); +pd->focus.chained_manager = new; + } + if (!new) + ERR("Failed to find manager object"); +} + +static void _focus_state_eval(Eo *obj, Elm_Widget_Smart_Data *pd) { Eina_Bool should = EINA_FALSE; @@ -235,32 +257,6 @@ _focus_state_eval(Eo *obj, Elm_Widget_Smart_Data *pd) if (pd->logical.child_count > 0) should = EINA_TRUE; - //if we should register, make sure that the logical parent is up to date and setted up correctly - if (should) - { -Elm_Widget *parent; -parent = elm_widget_parent_widget_get(obj); -if (pd->logical.parent != parent) - { - //update old logical parent; - if (pd->logical.parent) - { - ELM_WIDGET_DATA_GET(pd->logical.parent, logical_wd); - logical_wd->logical.child_count --; - _focus_state_eval(pd->logical.parent, logical_wd); - pd->logical.parent = NULL; - } - if (parent) - { - ELM_WIDGET_DATA_GET(parent, logical_wd); - logical_wd->logical.child_count ++; - _focus_state_eval(parent, logical_wd); - pd->logical.parent = parent; - efl_weak_ref(&pd->logical.parent); - } - } - } - //now register in the manager if (should && !pd->focus.manager) { @@ -288,6 +284,41 @@ _focus_state_eval(Eo *obj, Elm_Widget_Smart_Data *pd) } } +static void +_event_cb_focus_state_eval(void *data EINA_UNUSED, const Efl_Event *event) +{ + ELM_WIDGET_DATA_GET(event->object, pd); + + _focus_state_eval(event->object, pd); +} + +static void +_logical_parent_eval(Eo *obj, Elm_Widget_Smart_Data *pd) +{ + Elm_Widget *parent; + parent = pd->parent_obj; + if (pd->logical.parent != parent) + { +//update old logical parent; +if (pd->logical.parent) + { + ELM_WIDGET_DATA_GET(pd->logical.parent, logical_wd); + logical_wd->logical.child_count --; + _focus_state_eval(pd->logical.parent, logical_wd); + pd->logical.parent = NULL; + } + efl_event_callback_call(obj, + EFL_UI_FOCUS_USER_EVENT_LOGICAL_CHANGED, parent); + if (parent) + { + ELM_WIDGET_DATA_GET(parent, logical_wd); + logical_wd->logical.child_count ++; + _focus_state_eval(parent, logical_wd); + pd->logical.parent = parent; + efl_weak_ref(&pd->logical.parent); + } + } +} /** * @internal * @@ -1256,6 +1287,9 @@ _elm_widget_sub_object_add(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj } sdc->parent_obj = obj; +_
[EGIT] [core/efl] master 28/68: efl_ui_focus_manager: do not depend on elm widget events
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6d1df04f245569b9ee615cbd62593c586645eb16 commit 6d1df04f245569b9ee615cbd62593c586645eb16 Author: Marcel Hollerbach Date: Mon Dec 12 20:03:53 2016 +0100 efl_ui_focus_manager: do not depend on elm widget events --- src/lib/elementary/efl_ui_focus_manager.c | 8 1 file changed, 8 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index c0aadc9..c640450 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -479,17 +479,9 @@ _node_new_geometery_cb(void *data, const Efl_Event *event) return; } -static void -_focus_in_cb(void *data, const Efl_Event *event) -{ - efl_ui_focus_manager_focus(data, event->object); -} - EFL_CALLBACKS_ARRAY_DEFINE(focusable_node, {EFL_GFX_EVENT_RESIZE, _node_new_geometery_cb}, {EFL_GFX_EVENT_MOVE, _node_new_geometery_cb}, -//FIXME this is not correctly N ELM WIDGETS EVENTS HERE -{ELM_WIDGET_EVENT_FOCUSED, _focus_in_cb} ); //= --
[EGIT] [core/efl] master 19/68: tests: update to recent changes
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d0859212a218f71f6b2b938dd11f40b7d8d9c74b commit d0859212a218f71f6b2b938dd11f40b7d8d9c74b Author: Marcel Hollerbach Date: Sat Dec 17 19:51:35 2016 +0100 tests: update to recent changes --- src/tests/elementary/elm_test_focus.c| 44 +--- src/tests/elementary/elm_test_focus_common.c | 17 +++ src/tests/elementary/elm_test_focus_common.h | 1 + src/tests/elementary/elm_test_focus_sub.c| 13 ++-- src/tests/elementary/focus_test_sub.eo | 1 - 5 files changed, 42 insertions(+), 34 deletions(-) diff --git a/src/tests/elementary/elm_test_focus.c b/src/tests/elementary/elm_test_focus.c index cf14dc3..250e3b1 100644 --- a/src/tests/elementary/elm_test_focus.c +++ b/src/tests/elementary/elm_test_focus.c @@ -48,20 +48,18 @@ END_TEST START_TEST(pos_check) { Efl_Ui_Focus_Manager *m; - Efl_Ui_Focus_Object *middle, *east, *west, *north, *south; + Efl_Ui_Focus_Object *middle, *east, *west, *north, *south, *root; elm_init(1, NULL); elm_focus_test_setup_cross(&middle, &south, &north, &east, &west); - m = efl_add(EFL_UI_FOCUS_MANAGER_CLASS, NULL, -efl_ui_focus_manager_root_set(efl_added, middle) - ); - - efl_ui_focus_manager_register(m, north, middle, NULL); - efl_ui_focus_manager_register(m, south, middle, NULL); - efl_ui_focus_manager_register(m, west, middle, NULL); - efl_ui_focus_manager_register(m, east, middle, NULL); + m = elm_focus_test_manager_new(&root); + efl_ui_focus_manager_register(m, middle, root, NULL); + efl_ui_focus_manager_register(m, north, root, NULL); + efl_ui_focus_manager_register(m, south, root, NULL); + efl_ui_focus_manager_register(m, west, root, NULL); + efl_ui_focus_manager_register(m, east, root, NULL); #define CHECK(obj, r,l,u,d) \ efl_ui_focus_manager_focus(m, obj); \ @@ -120,7 +118,7 @@ END_TEST START_TEST(border_check) { Efl_Ui_Focus_Manager *m; - Efl_Ui_Focus_Object *middle, *east, *west, *north, *south; + Efl_Ui_Focus_Object *middle, *east, *west, *north, *south, *root; Eina_List *list = NULL; Eina_Iterator *iter; Efl_Ui_Focus_Object *obj; @@ -129,13 +127,12 @@ START_TEST(border_check) elm_focus_test_setup_cross(&middle, &south, &north, &east, &west); - m = efl_add(EFL_UI_FOCUS_MANAGER_CLASS, NULL, - efl_ui_focus_manager_root_set(efl_added, middle) -); - efl_ui_focus_manager_register(m, south, middle, NULL); - efl_ui_focus_manager_register(m, north, middle, NULL); - efl_ui_focus_manager_register(m, east, middle, NULL); - efl_ui_focus_manager_register(m, west, middle, NULL); + m = elm_focus_test_manager_new(&root); + efl_ui_focus_manager_register(m, middle, root, NULL); + efl_ui_focus_manager_register(m, south, root, NULL); + efl_ui_focus_manager_register(m, north, root, NULL); + efl_ui_focus_manager_register(m, east, root, NULL); + efl_ui_focus_manager_register(m, west, root, NULL); iter = efl_ui_focus_manager_border_elements_get(m); @@ -160,18 +157,16 @@ END_TEST START_TEST(logical_chain) { Efl_Ui_Focus_Manager *m; + Efl_Ui_Focus_Object *lroot; int i = 0; elm_init(1, NULL); TEST_OBJ_NEW(root, 0, 0, 20, 20); - m = efl_add(EFL_UI_FOCUS_MANAGER_CLASS, NULL, -efl_ui_focus_manager_root_set(efl_added, root) - ); - fail_if(!m); + m = elm_focus_test_manager_new(&lroot); - efl_ui_focus_manager_focus(m, root); + fail_if(!m); i++; TEST_OBJ_NEW(child1, 0, i*20, 20, 20); @@ -195,9 +190,10 @@ START_TEST(logical_chain) TEST_OBJ_NEW(subchild23, 0, i*20, 20, 20); //register everything + efl_ui_focus_manager_register(m, root, lroot, NULL); efl_ui_focus_manager_register(m, child1, root, NULL); efl_ui_focus_manager_register(m, child2, root, NULL); - efl_ui_focus_manager_register_logical(m, child3, root); + efl_ui_focus_manager_register_logical(m, child3, root, NULL); efl_ui_focus_manager_register(m, subchild11, child1, NULL); efl_ui_focus_manager_register(m, subchild12, child1, NULL); efl_ui_focus_manager_register(m, subchild13, child1, NULL); @@ -205,6 +201,8 @@ START_TEST(logical_chain) efl_ui_focus_manager_register(m, subchild22, child3, NULL); efl_ui_focus_manager_register(m, subchild23, child3, NULL); + efl_ui_focus_manager_focus(m, root); + Efl_Object *logical_chain[] = { child1, subchild11, subchild12, subchild13, child2, subchild21, subchild22, subchild23, root, NULL diff --git a/src/tests/elementary/elm_test_focus_common.c b/src/tests/elementary/elm_test_focus_common.c index 402fac8..1e23553 100644 --- a/src/tests/elementary/elm_test_focus_common.c +++ b/src/tests/elementary/elm_test_focus_common.c @@ -38,6 +38,23 @@ elm_focus_test_setup_cross(Efl_Ui_Focus_Object **middle, *west = elm_focus_test_object_new("west", 0, 40, 20, 20); } + +Efl_Ui_Focus_Manager* +elm_focus_test_manager_new(Efl_Ui_Fo
[EGIT] [core/efl] master 50/68: efl_ui_frame: migrate to new focus system
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d481dd58ec772b29060bddffd3280264a2cf89cc commit d481dd58ec772b29060bddffd3280264a2cf89cc Author: Marcel Hollerbach Date: Wed Dec 21 11:41:55 2016 +0100 efl_ui_frame: migrate to new focus system when collapsed the subtree is unfocusable --- src/lib/elementary/efl_ui_frame.c | 3 +++ src/lib/elementary/elm_widget.c | 22 ++ 2 files changed, 25 insertions(+) diff --git a/src/lib/elementary/efl_ui_frame.c b/src/lib/elementary/efl_ui_frame.c index 6c453d4..e0568f5 100644 --- a/src/lib/elementary/efl_ui_frame.c +++ b/src/lib/elementary/efl_ui_frame.c @@ -135,6 +135,7 @@ _on_frame_clicked(void *data, elm_layout_signal_emit(data, "elm,action,toggle", "elm"); sd->collapsed++; sd->anim = EINA_TRUE; +elm_widget_tree_unfocusable_set(data, sd->collapsed); } efl_event_callback_legacy_call (data, EFL_UI_EVENT_CLICKED, NULL); @@ -234,6 +235,7 @@ _efl_ui_frame_collapse_set(Eo *obj, Efl_Ui_Frame_Data *sd, Eina_Bool collapse) sd->collapsed = !!collapse; sd->anim = EINA_FALSE; + elm_widget_tree_unfocusable_set(obj, sd->collapsed); _sizing_eval(obj, sd); } @@ -249,6 +251,7 @@ _efl_ui_frame_collapse_go(Eo *obj, Efl_Ui_Frame_Data *sd, Eina_Bool collapse) efl_event_callback_legacy_call (wd->resize_obj, EDJE_OBJECT_EVENT_RECALC, obj); sd->collapsed = collapse; + elm_widget_tree_unfocusable_set(obj, sd->collapsed); sd->anim = EINA_TRUE; } diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 33df392..6745de3 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -1702,6 +1702,25 @@ _elm_widget_child_can_focus_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd) return sd->child_can_focus; } +static void +_full_eval_children(Eo *obj, Elm_Widget_Smart_Data *sd) +{ + Eina_List *l; + Eo *child; + + _full_eval(obj, sd); + + EINA_LIST_FOREACH(sd->subobjs , l, child) + { +Elm_Widget_Smart_Data *sd_child; + +if (!efl_isa(child, ELM_WIDGET_CLASS)) continue; + +sd_child = efl_data_scope_get(child, ELM_WIDGET_CLASS); +_full_eval_children(child, sd_child); + } +} + /** * @internal * @@ -1724,6 +1743,9 @@ _elm_widget_tree_unfocusable_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Bool t if (sd->tree_unfocusable == tree_unfocusable) return; sd->tree_unfocusable = tree_unfocusable; elm_widget_focus_tree_unfocusable_handle(obj); + + //focus state eval on all children + _full_eval_children(obj, sd); } /** --
[EGIT] [core/efl] master 31/68: efl_ui_focus_manager: add log domain for focus movements
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d4bd5c99611ef36b6f747a67af05a77ae92fc868 commit d4bd5c99611ef36b6f747a67af05a77ae92fc868 Author: Marcel Hollerbach Date: Sat Dec 17 11:55:59 2016 +0100 efl_ui_focus_manager: add log domain for focus movements --- src/lib/elementary/efl_ui_focus_manager.c | 47 +- src/lib/elementary/efl_ui_focus_manager.eo | 2 ++ 2 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index c64e4bc..49974a1 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -13,9 +13,17 @@ #define DIRECTION_CHECK(dir) (dir >= 0 && dir < EFL_UI_FOCUS_DIRECTION_LAST) -//#define DEBUG +//#define CALC_DEBUG #define DEBUG_TUPLE(obj) efl_name_get(obj), efl_class_name_get(obj) +static int _focus_log_domain = -1; + +#define F_CRI(...) EINA_LOG_DOM_CRIT(_focus_log_domain, __VA_ARGS__) +#define F_ERR(...) EINA_LOG_DOM_ERR(_focus_log_domain, __VA_ARGS__) +#define F_WRN(...) EINA_LOG_DOM_WARN(_focus_log_domain, __VA_ARGS__) +#define F_INF(...) EINA_LOG_DOM_INFO(_focus_log_domain, __VA_ARGS__) +#define F_DBG(...) EINA_LOG_DOM_DBG(_focus_log_domain, __VA_ARGS__) + typedef struct { Eina_Bool positive; Efl_Ui_Focus_Object *anchor; @@ -290,7 +298,7 @@ _calculate_node(Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *node, Dimens || cur_neg_min == 0) //init case { //nuke the old and add -#ifdef DEBUG +#ifdef CALC_DEBUG printf("CORRECTION FOR %s-%s\n found anchor %s-%s in distance %d\n (%d,%d,%d,%d)\n (%d,%d,%d,%d)\n\n", DEBUG_TUPLE(node), DEBUG_TUPLE(op), tmp_dis, op_rect.x, op_rect.y, op_rect.w, op_rect.h, @@ -312,7 +320,7 @@ _calculate_node(Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *node, Dimens || cur_pos_min == 0) //init case { //nuke the old and add -#ifdef DEBUG +#ifdef CALC_DEBUG printf("CORRECTION FOR %s-%s\n found anchor %s-%s in distance %d\n (%d,%d,%d,%d)\n (%d,%d,%d,%d)\n\n", DEBUG_TUPLE(node), DEBUG_TUPLE(op), tmp_dis, op_rect.x, op_rect.y, op_rect.w, op_rect.h, @@ -343,7 +351,7 @@ _calculate_node(Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *node, Dimens } } -#ifdef DEBUG +#ifdef CALC_DEBUG static void _debug_node(Node *node) { @@ -410,7 +418,7 @@ dirty_flush_node(Efl_Ui_Focus_Manager *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Dat convert_border_set(pd, node, y_partners_neg, EFL_UI_FOCUS_DIRECTION_UP); convert_border_set(pd, node, y_partners_pos, EFL_UI_FOCUS_DIRECTION_DOWN); -#ifdef DEBUG +#ifdef CALC_DEBUG _debug_node(node); #endif } @@ -665,12 +673,14 @@ _efl_ui_focus_manager_unregister(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data } EOLIAN static void -_efl_ui_focus_manager_redirect_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Manager *redirect) +_efl_ui_focus_manager_redirect_set(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Manager *redirect) { printf("Now redirect %p\n", redirect); if (pd->redirect == redirect) return; + F_DBG("Manager: %p setting redirect from %p to %p", obj, pd->redirect, redirect); + if (pd->redirect) efl_wref_del(pd->redirect, &pd->redirect); @@ -974,9 +984,6 @@ _request_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_D dirty_flush(obj, pd, upper); -#ifdef DEBUG - _debug_node(upper); -#endif if (direction == EFL_UI_FOCUS_DIRECTION_PREV || direction == EFL_UI_FOCUS_DIRECTION_NEXT) dir = _logical_movement(pd, upper, direction); @@ -1027,9 +1034,11 @@ _efl_ui_focus_manager_focus(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus node = node_get(pd, focus); if (!node) return; + F_DBG("Manager: %p focusing object %p %s", obj, focus, efl_class_name_get(focus)); + if (node->type == NODE_TYPE_ONLY_LOGICAL) { -ERR("Logical node cannot be focused"); +ERR(" %p is logical, cannot be focused", obj); return; } @@ -1071,6 +1080,8 @@ _efl_ui_focus_manager_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, E EINA_SAFETY_ON_FALSE_RETURN_VAL(DIRECTION_CHECK(direction), NULL); + F_DBG("Manager: %p move to %d", obj, direction); + if (pd->redirect) { Efl_Ui_Focus_Object *old_candidate = NULL; @@ -1105,10 +1116,8 @@ _efl_ui_focus_manager_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, E efl_ui_focus_manager_focus(obj, candidate); } + F_DBG("Manager: %p moved to %s %s", obj, DEBUG_TUPLE(candidate)); -#ifdef DEBUG - printf("Focus, MOVE %s %s\n", DEBUG_TUPLE(candidate)); -#
[EGIT] [core/efl] master 11/68: elm_widget: enhance focus handling of the widget
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=37ce83cc047254984b206a896c7bd8d424693a05 commit 37ce83cc047254984b206a896c7bd8d424693a05 Author: Marcel Hollerbach Date: Wed Nov 16 19:01:30 2016 +0100 elm_widget: enhance focus handling of the widget widgets will now use there widget parent as logical parent. --- src/lib/elementary/elm_widget.c | 84 + src/lib/elementary/elm_widget.h | 5 +++ 2 files changed, 82 insertions(+), 7 deletions(-) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index ed1dbc5..62c0f70 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -199,22 +199,92 @@ elm_widget_focus_highlight_enabled_get(const Evas_Object *obj) return EINA_FALSE; } +static Eina_Bool +_tree_unfocusable(Eo *obj) +{ + Elm_Widget *wid = obj; + + do { + ELM_WIDGET_DATA_GET(obj, wid_pd); + + if (wid_pd->tree_unfocusable) return EINA_TRUE; + } while((wid = elm_widget_parent_widget_get(wid))); + + return EINA_FALSE; +} + static void _focus_state_eval(Eo *obj, Elm_Widget_Smart_Data *pd) { - if (pd->can_focus && !pd->focus.manager) + Eina_Bool should = EINA_FALSE; + Eina_Bool want_full = EINA_FALSE; + + //there are two reasons to be registered, the child count is bigger than 0, or the widget is flagged to be able to handle focus + if (pd->can_focus) + { +should = EINA_TRUE; +want_full = EINA_TRUE; +//can focus can be overridden by the following properties +if (pd->disabled) + should = EINA_FALSE; + +if (_tree_unfocusable(obj)) + should = EINA_FALSE; + } + + if (pd->logical.child_count > 0) + should = EINA_TRUE; + + //if we should register, make sure that the logical parent is up to date and setted up correctly + if (should) + { +Elm_Widget *parent; +parent = elm_widget_parent_widget_get(obj); +if (pd->logical.parent != parent) + { + //update old logical parent; + if (pd->logical.parent) + { + ELM_WIDGET_DATA_GET(pd->logical.parent, logical_wd); + logical_wd->logical.child_count --; + _focus_state_eval(pd->logical.parent, logical_wd); + pd->logical.parent = NULL; + } + if (parent) + { + ELM_WIDGET_DATA_GET(parent, logical_wd); + logical_wd->logical.child_count ++; + _focus_state_eval(parent, logical_wd); + pd->logical.parent = parent; + } + } + } + + //now register in the manager + if (should && !pd->focus.manager) { pd->focus.manager = efl_ui_focus_user_manager_get(obj); +pd->focus.logical = !want_full; + if (pd->focus.manager != obj) - efl_ui_focus_manager_register(pd->focus.manager, obj, pd->focus.manager, NULL); -else - pd->focus.manager = NULL; + { + if (want_full) + efl_ui_focus_manager_register(pd->focus.manager, obj, pd->logical.parent, NULL); + else + efl_ui_focus_manager_register_logical(pd->focus.manager, obj, pd->logical.parent); + } } - else if (!pd->can_focus && pd->focus.manager) + else if (!should && pd->focus.manager) { efl_ui_focus_manager_unregister(pd->focus.manager, obj); pd->focus.manager = NULL; } + else if (should && pd->focus.manager && pd->focus.logical && want_full) + { +//the case when we before registered as logical, but now wanted to be a normal node +efl_ui_focus_manager_unregister(pd->focus.manager, obj); +efl_ui_focus_manager_register(pd->focus.manager, obj, pd->focus.manager, NULL); + } } /** @@ -6187,7 +6257,7 @@ _elm_widget_efl_object_provider_find(Eo *obj, Elm_Widget_Smart_Data *pd, const E EOLIAN static Efl_Ui_Focus_Manager* -_elm_widget_efl_ui_focus_user_manager_get(Eo *obj, Elm_Widget_Smart_Data *pd) +_elm_widget_efl_ui_focus_user_manager_get(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED) { Evas_Object *parent = obj; @@ -6203,7 +6273,7 @@ _elm_widget_efl_ui_focus_user_manager_get(Eo *obj, Elm_Widget_Smart_Data *pd) } EOLIAN static void -_elm_widget_efl_ui_focus_object_geometry_get(Eo *obj, Elm_Widget_Smart_Data *pd, Eina_Rectangle *rect) +_elm_widget_efl_ui_focus_object_geometry_get(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED, Eina_Rectangle *rect) { if (!rect) return; diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index 3d14e88..bd04b0d 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h @@ -458,7 +458,12 @@ typedef struct _Elm_Widget_Smart_Data Eina_Bool provider_lookup : 1; /**< This is true wh
[EGIT] [core/efl] master 24/68: efl_ui_focus_manager: allow flushing of one single node
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=be251b04966f7bd73b4967a856269a71b3e9beab commit be251b04966f7bd73b4967a856269a71b3e9beab Author: Marcel Hollerbach Date: Mon Dec 12 13:56:52 2016 +0100 efl_ui_focus_manager: allow flushing of one single node this gives a massive performance boost --- src/lib/elementary/efl_ui_focus_manager.c | 58 +-- 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 5140f20..e8c57a8 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -406,30 +406,49 @@ convert_border_set(Efl_Ui_Focus_Manager_Data *pd, Node *node, Eina_List *focusab } static void -dirty_flush(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager_Data *pd) +dirty_flush_node(Efl_Ui_Focus_Manager *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Node *node) { - Node *node; + Eina_List *x_partners_pos, *x_partners_neg; + Eina_List *y_partners_pos, *y_partners_neg; + + _calculate_node(pd, node->focusable, DIMENSION_X, &x_partners_pos, &x_partners_neg); + _calculate_node(pd, node->focusable, DIMENSION_Y, &y_partners_pos, &y_partners_neg); + + convert_border_set(pd, node, x_partners_pos, EFL_UI_FOCUS_DIRECTION_RIGHT); + convert_border_set(pd, node, x_partners_neg, EFL_UI_FOCUS_DIRECTION_LEFT); + convert_border_set(pd, node, y_partners_neg, EFL_UI_FOCUS_DIRECTION_UP); + convert_border_set(pd, node, y_partners_pos, EFL_UI_FOCUS_DIRECTION_DOWN); + +#ifdef DEBUG + _debug_node(node); +#endif +} + +static void +dirty_flush(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager_Data *pd, Node *node) +{ + if (!eina_list_data_find(pd->dirty, node)) return; efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, NULL); - EINA_LIST_FREE(pd->dirty, node) - { -Eina_List *x_partners_pos, *x_partners_neg; -Eina_List *y_partners_pos, *y_partners_neg; + pd->dirty = eina_list_remove(pd->dirty, node); -_calculate_node(pd, node->focusable, DIMENSION_X, &x_partners_pos, &x_partners_neg); -_calculate_node(pd, node->focusable, DIMENSION_Y, &y_partners_pos, &y_partners_neg); + dirty_flush_node(obj, pd, node); +} -convert_border_set(pd, node, x_partners_pos, EFL_UI_FOCUS_DIRECTION_RIGHT); -convert_border_set(pd, node, x_partners_neg, EFL_UI_FOCUS_DIRECTION_LEFT); -convert_border_set(pd, node, y_partners_neg, EFL_UI_FOCUS_DIRECTION_UP); -convert_border_set(pd, node, y_partners_pos, EFL_UI_FOCUS_DIRECTION_DOWN); +static void +dirty_flush_all(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager_Data *pd) +{ + Node *node; -#ifdef DEBUG -_debug_node(node); -#endif + efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, NULL); + + EINA_LIST_FREE(pd->dirty, node) + { +dirty_flush_node(obj, pd, node); } } + static void dirty_add(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Node *dirty) { @@ -781,7 +800,7 @@ _efl_ui_focus_manager_border_elements_get(Eo *obj, Efl_Ui_Focus_Manager_Data *pd { Border_Elements_Iterator *it; - dirty_flush(obj, pd); + dirty_flush_all(obj, pd); it = calloc(1, sizeof(Border_Elements_Iterator)); @@ -957,6 +976,9 @@ _request_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_D return NULL; } + + dirty_flush(obj, pd, upper); + #ifdef DEBUG _debug_node(upper); #endif @@ -976,8 +998,6 @@ _request_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_D EOLIAN static Efl_Ui_Focus_Object* _efl_ui_focus_manager_request_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Direction direction) { - dirty_flush(obj, pd); - EINA_SAFETY_ON_FALSE_RETURN_VAL(DIRECTION_CHECK(direction), NULL); if (pd->redirect) @@ -1163,7 +1183,7 @@ _efl_ui_focus_manager_fetch(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus res = calloc(1, sizeof(Efl_Ui_Focus_Relations)); - dirty_flush(obj, pd); + dirty_flush(obj, pd, n); #define DIR_CLONE(dir) _convert(G(n).directions[dir].partners); --
[EGIT] [core/efl] master 20/68: efl_ui_focus_manager: fix up tracking and returning of data
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=67a697fedd098df087fb1a530a78cf846dca8953 commit 67a697fedd098df087fb1a530a78cf846dca8953 Author: Marcel Hollerbach Date: Wed Dec 7 16:48:00 2016 +0100 efl_ui_focus_manager: fix up tracking and returning of data a logical parent should not be in the border elements. The child should also be not deleted itself. If we do so correct deletion could fail. --- src/lib/elementary/efl_ui_focus_manager.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 2a04d61..05a4d6d 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -466,15 +466,7 @@ _focus_in_cb(void *data, const Efl_Event *event) efl_ui_focus_manager_focus(data, event->object); } -static void -_child_del(void *data, const Efl_Event *event) -{ - WRN("The manager itself catched a deletion of a child. BAD"); - efl_ui_focus_manager_unregister(data, event->object); -} - EFL_CALLBACKS_ARRAY_DEFINE(focusable_node, -{EFL_EVENT_DEL, _child_del}, {EFL_GFX_EVENT_RESIZE, _node_new_geometery_cb}, {EFL_GFX_EVENT_MOVE, _node_new_geometery_cb}, //FIXME this is not correctly N ELM WIDGETS EVENTS HERE @@ -681,15 +673,17 @@ _efl_ui_focus_manager_unregister(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data EOLIAN static void _efl_ui_focus_manager_redirect_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Manager *redirect) { + printf("Now redirect %p\n", redirect); + if (pd->redirect == redirect) return; if (pd->redirect) - efl_unref(pd->redirect); + efl_wref_del(pd->redirect, &pd->redirect); pd->redirect = redirect; if (pd->redirect) - efl_ref(pd->redirect); + efl_wref_add(pd->redirect, &pd->redirect); } EOLIAN static Efl_Ui_Focus_Manager * @@ -758,7 +752,8 @@ _iterator_next(Border_Elements_Iterator *it, void **data) { for(int i = 0 ;i < NODE_DIRECTIONS_COUNT; i++) { - if (!node->graph.directions[i].partners) + if (node->type != NODE_TYPE_ONLY_LOGICAL && + !node->graph.directions[i].partners) { *data = node->focusable; return EINA_TRUE; @@ -1033,9 +1028,12 @@ _efl_ui_focus_manager_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, E if (pd->redirect) { -return efl_ui_focus_manager_move(pd->redirect, direction); +candidate = efl_ui_focus_manager_move(pd->redirect, direction); +if (!candidate) + efl_ui_focus_manager_redirect_set(obj, NULL); } - else + + if (!pd->redirect) { candidate = efl_ui_focus_manager_request_move(obj, direction); if (candidate) --
[EGIT] [core/efl] master 34/68: efl_ui_focus_manager: fix sub manager logical handling
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=924033e88af2c188f32b9c84cb660beb36167e48 commit 924033e88af2c188f32b9c84cb660beb36167e48 Author: Marcel Hollerbach Date: Mon Dec 19 19:23:12 2016 +0100 efl_ui_focus_manager: fix sub manager logical handling --- src/lib/elementary/efl_ui_focus_manager.c | 5 - src/lib/elementary/efl_ui_focus_manager_sub.c | 16 ++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index b3ca8af..cdf58bc 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -674,7 +674,7 @@ _efl_ui_focus_manager_unregister(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data EOLIAN static void _efl_ui_focus_manager_redirect_set(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Manager *redirect) { - printf("Now redirect %p\n", redirect); + Efl_Ui_Focus_Manager *old_manager; if (pd->redirect == redirect) return; @@ -683,10 +683,13 @@ _efl_ui_focus_manager_redirect_set(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_U if (pd->redirect) efl_wref_del(pd->redirect, &pd->redirect); + old_manager = pd->redirect; pd->redirect = redirect; if (pd->redirect) efl_wref_add(pd->redirect, &pd->redirect); + + efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED , old_manager); } EOLIAN static Efl_Ui_Focus_Manager * diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index 42f9d19..a5c2c57 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -73,7 +73,7 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) elem = efl_parent_get(obj); manager = efl_ui_focus_user_manager_get(elem); - logical = efl_ui_focus_user_parent_get(elem); + logical = elem; borders = efl_ui_focus_manager_border_elements_get(obj); selection = NULL; @@ -136,8 +136,18 @@ _parent_manager_pre_flush(void *data, const Efl_Event *ev EINA_UNUSED) _border_flush(data, pd); } +static void +_redirect_changed_cb(void *data, const Efl_Event *ev) +{ + //if (efl_ui_focus_manager_redirect_get(ev->object) != data) return; + + MY_DATA(data, pd); + _border_flush(data, pd); +} + EFL_CALLBACKS_ARRAY_DEFINE(parent_manager, -{EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, _parent_manager_pre_flush} +{EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, _parent_manager_pre_flush}, +{EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, _redirect_changed_cb} ); static void @@ -206,12 +216,14 @@ _efl_ui_focus_manager_sub_efl_object_parent_set(Eo *obj, Efl_Ui_Focus_Manager_Su old_parent = efl_parent_get(obj); efl_event_callback_forwarder_del(obj, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, old_parent); + efl_event_callback_forwarder_del(obj, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, old_parent); efl_event_callback_array_del(old_parent, self_manager(), obj); efl_parent_set(efl_super(obj, MY_CLASS), parent); new_parent = efl_parent_get(obj); efl_event_callback_forwarder_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, new_parent); + efl_event_callback_forwarder_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, new_parent); efl_event_callback_array_add(new_parent, self_manager(), obj); } --
[EGIT] [core/efl] master 55/68: efl_ui_focus_manager: if there is no normal item then just do nothing
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8c8570ba6abb399afaa4b617d96430c5e9a85ae4 commit 8c8570ba6abb399afaa4b617d96430c5e9a85ae4 Author: Marcel Hollerbach Date: Wed Dec 21 13:19:47 2016 +0100 efl_ui_focus_manager: if there is no normal item then just do nothing --- src/lib/elementary/efl_ui_focus_manager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 7f650f3..7ce235a 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -1097,6 +1097,7 @@ _efl_ui_focus_manager_focus(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus if (focus == pd->root->focusable) { focus = _find_normal_node(pd->root); +if (!focus) return; } //check if node is part of this manager object --
[EGIT] [core/efl] master 13/68: efl_ui_focus_manager: a logical item should never get focus.
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f6aefb2d8848f1dbbee38754c87ef303fee3b55d commit f6aefb2d8848f1dbbee38754c87ef303fee3b55d Author: Marcel Hollerbach Date: Thu Nov 17 14:55:43 2016 +0100 efl_ui_focus_manager: a logical item should never get focus. --- src/lib/elementary/efl_ui_focus_manager.c | 14 -- src/lib/elementary/efl_ui_focus_manager.eo | 2 +- src/tests/elementary/elm_test_focus.c | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index f32e5ac..2a04d61 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -931,10 +931,20 @@ _prev(Node *node) static Node* _logical_movement(Efl_Ui_Focus_Manager_Data *pd EINA_UNUSED, Node *upper, Efl_Ui_Focus_Direction direction) { + Node* (*deliver)(Node *n); + Node *result; if (direction == EFL_UI_FOCUS_DIRECTION_NEXT) - return _next(upper); + deliver = _next; else - return _prev(upper); + deliver = _prev; + + //search as long as we have a none logical parent + result = upper; + do { + result = deliver(result); + } while(result && result->type == NODE_TYPE_ONLY_LOGICAL); + + return result; } EOLIAN static Efl_Ui_Focus_Object* diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index 9cf8a36..6fb68d0 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -59,7 +59,7 @@ class Efl.Ui.Focus.Manager (Efl.Object) { register_logical { [[Register a new item just for the logical parent. - This item can just be used as a parent for a child. It cannot be reached via coordinate wise movements. + The item can never get focus, it just help to build a tree out of the items who are getting focus. ]] params { child : Efl.Ui.Focus.Object @nonull; diff --git a/src/tests/elementary/elm_test_focus.c b/src/tests/elementary/elm_test_focus.c index 044d391..cf14dc3 100644 --- a/src/tests/elementary/elm_test_focus.c +++ b/src/tests/elementary/elm_test_focus.c @@ -197,7 +197,7 @@ START_TEST(logical_chain) //register everything efl_ui_focus_manager_register(m, child1, root, NULL); efl_ui_focus_manager_register(m, child2, root, NULL); - efl_ui_focus_manager_register(m, child3, root, NULL); + efl_ui_focus_manager_register_logical(m, child3, root); efl_ui_focus_manager_register(m, subchild11, child1, NULL); efl_ui_focus_manager_register(m, subchild12, child1, NULL); efl_ui_focus_manager_register(m, subchild13, child1, NULL); @@ -207,7 +207,7 @@ START_TEST(logical_chain) Efl_Object *logical_chain[] = { child1, subchild11, subchild12, subchild13, -child2, child3, subchild21, subchild22, subchild23, root, NULL +child2, subchild21, subchild22, subchild23, root, NULL }; for (i = 0; logical_chain[i]; ++i) { --
[EGIT] [core/efl] master 56/68: elm_box, grid, table: take the resize object as evas object
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=eb88bbe63db69f20efe5dfd69661adc85c01867f commit eb88bbe63db69f20efe5dfd69661adc85c01867f Author: Marcel Hollerbach Date: Wed Dec 21 19:30:21 2016 +0100 elm_box,grid,table: take the resize object as evas object --- src/lib/elementary/elm_box.c | 5 ++--- src/lib/elementary/elm_grid.c | 5 ++--- src/lib/elementary/elm_table.c | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/lib/elementary/elm_box.c b/src/lib/elementary/elm_box.c index 7b98c91..f8920db 100644 --- a/src/lib/elementary/elm_box.c +++ b/src/lib/elementary/elm_box.c @@ -25,9 +25,8 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = { static void _focus_order_flush(Eo *obj, Elm_Box_Data *pd EINA_UNUSED) { - Elm_Widget_Smart_Data *wpd; - Eina_List *order = evas_object_box_children_get(obj); - wpd = efl_data_scope_get(obj, ELM_WIDGET_CLASS); + 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_update_children(wpd->focus.manager, obj, order, EINA_TRUE); } diff --git a/src/lib/elementary/elm_grid.c b/src/lib/elementary/elm_grid.c index 6155d6a..886549a 100644 --- a/src/lib/elementary/elm_grid.c +++ b/src/lib/elementary/elm_grid.c @@ -16,9 +16,8 @@ static void _focus_order_flush(Eo *obj) { - Elm_Widget_Smart_Data *wpd; - Eina_List *order = evas_object_grid_children_get(obj); - wpd = efl_data_scope_get(obj, ELM_WIDGET_CLASS); + 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_update_children(wpd->focus.manager, obj, order, EINA_TRUE); } diff --git a/src/lib/elementary/elm_table.c b/src/lib/elementary/elm_table.c index 87da322..f32b4c3 100644 --- a/src/lib/elementary/elm_table.c +++ b/src/lib/elementary/elm_table.c @@ -17,9 +17,8 @@ static void _focus_order_flush(Eo *obj) { - Elm_Widget_Smart_Data *wpd; - Eina_List *order = evas_object_table_children_get(obj); - wpd = efl_data_scope_get(obj, ELM_WIDGET_CLASS); + 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_update_children(wpd->focus.manager, obj, order, EINA_TRUE); } --
[EGIT] [core/efl] master 08/68: efl_ui_win: make it a focus manager
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9aa7c63b2f2e4b4a0e2ce8628340dcbe22a33f1e commit 9aa7c63b2f2e4b4a0e2ce8628340dcbe22a33f1e Author: Marcel Hollerbach Date: Fri Nov 4 17:44:37 2016 +0100 efl_ui_win: make it a focus manager Added a focusmanager with the window itself as the root. --- src/lib/elementary/efl_ui_win.c | 9 - src/lib/elementary/efl_ui_win.eo | 8 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index c1d3f07..2bd0b93 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -164,6 +164,8 @@ struct _Efl_Ui_Win_Data Evas_Object *main_menu; + Efl_Ui_Focus_Manager *manager; + struct { const char *name; @@ -5214,11 +5216,16 @@ _efl_ui_win_efl_object_finalize(Eo *obj, Efl_Ui_Win_Data *_pd) } EOLIAN static Eo * -_efl_ui_win_efl_object_constructor(Eo *obj, Efl_Ui_Win_Data *_pd EINA_UNUSED) +_efl_ui_win_efl_object_constructor(Eo *obj, Efl_Ui_Win_Data *pd) { /* Do nothing. */ /* XXX: We are calling the constructor chain from the finalizer. It's * really bad and hacky. Needs fixing. */ + pd->manager = efl_add(EFL_UI_FOCUS_MANAGER_CLASS, NULL, +efl_ui_focus_manager_root_set(efl_added, obj) + ); + + efl_composite_attach(obj, pd->manager); return obj; } diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 90147dc..2e743af 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -97,7 +97,7 @@ enum Efl.Ui.Win.Indicator_Type legacy: efl_ui_win_indicator; type_unknown, [[Unknown indicator type]] - bg_opaque, [[The icon of indicator is opaque, the background of indicator is also opaque. + bg_opaque, [[The icon of indicator is opaque, the background of indicator is also opaque. The content of window is located the end of indicator. The area of indicator and window content are not overlapped]] bg_transparent, [[The icon of indicator is opaque, but the background is transparent. @@ -178,7 +178,7 @@ enum Efl.Ui.Win.Move_Resize_Mode class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window, Elm.Interface.Atspi_Component, Elm.Interface.Atspi_Widget_Action, Efl.Container, Efl.Input.State, Efl.Input.Interface, Efl.Screen, - Efl.Gfx.Size.Hint, Efl.Text, Efl.Config.Global, Efl.Part) + Efl.Gfx.Size.Hint, Efl.Text, Efl.Config.Global, Efl.Part, Efl.Ui.Focus.Manager ) { [[Efl UI window class]] legacy_prefix: elm_win; @@ -871,7 +871,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window, } move_resize_start { [[Start moving or resizing the window. - + The user can request the display server to start moving or resizing the window by combining modes from @Efl.Ui.Win.Move_Resize_Mode. This API can only be called if none of the following conditions is @@ -886,7 +886,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window, 1. Pointer (mouse or touch) down event, 2. @.move_resize_start called only once with a supported mode, 3. Pointer (mouse or touch) up event. - + If a pointer up event occurs after calling the function, it automatically ends the window move and resize operation. --
[EGIT] [core/efl] master 27/68: efl_ui_focus_manager: unset redirect when focusing new item
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=54145f488bd7a62318d8dd1b2fca50632791ba58 commit 54145f488bd7a62318d8dd1b2fca50632791ba58 Author: Marcel Hollerbach Date: Mon Dec 12 21:01:18 2016 +0100 efl_ui_focus_manager: unset redirect when focusing new item --- src/lib/elementary/efl_ui_focus_manager.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 7d2019d..c0aadc9 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -1058,6 +1058,12 @@ _efl_ui_focus_manager_focus(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus return; } + if (pd->redirect) + { +//first unset the redirect +efl_ui_focus_manager_redirect_set(obj, NULL); + } + //check if this is already the focused object old_focus = eina_list_last_data_get(pd->focus_stack); @@ -,7 +1117,6 @@ _efl_ui_focus_manager_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, E if (new_candidate) { //redirect does not have smth. but we do have. - efl_ui_focus_manager_redirect_set(obj, NULL); efl_ui_focus_manager_focus(obj, new_candidate); } } --
[EGIT] [core/efl] master 36/68: efl_ui_focus_manager: handle redirect objects in logical better
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a5c70065795dc371e78c24a9b4c30f6071a927c2 commit a5c70065795dc371e78c24a9b4c30f6071a927c2 Author: Marcel Hollerbach Date: Mon Dec 19 19:26:33 2016 +0100 efl_ui_focus_manager: handle redirect objects in logical better --- src/lib/elementary/efl_ui_focus_manager.c | 183 +++-- src/lib/elementary/efl_ui_focus_manager.eo | 4 + 2 files changed, 128 insertions(+), 59 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 82a301c..763f330 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -830,11 +830,16 @@ _no_history_element(Eina_Hash *node_hash) iter = eina_hash_iterator_data_new(node_hash); - if (!eina_iterator_next(iter, (void**)&upper)) - return NULL; - else - return upper; + do + { +if (!eina_iterator_next(iter, (void**)&upper)) + return NULL; + } + while (upper->type != NODE_TYPE_NORMAL); + eina_iterator_free(iter); + + return upper; } static Node* @@ -884,33 +889,39 @@ _next(Node *node) Node *n; //Case 1 we are having children - if (T(node).children) - return eina_list_data_get(T(node).children); + //But only enter the children if it does NOT have a redirect manager + if (T(node).children && !node->redirect_manager) + { +return eina_list_data_get(T(node).children); + } //case 2 we are the root and we dont have children, return ourself if (!T(node).parent) - return node; + { +return node; + } //case 3 we are not at the end of the parents list - n = _parent_item(node, EINA_TRUE); - if (n) - return n; - - //case 4 we are at the end of the parents list n = node; while(T(n).parent) { -Node *parent_next; +Node *parent; +Eina_List *lnode; -parent_next = _parent_item(n, EINA_TRUE); +parent = T(n).parent; +lnode = eina_list_data_find_list(T(parent).children, n); +lnode = eina_list_next(lnode); -if (parent_next) - return parent_next; +if (lnode) + { + return eina_list_data_get(lnode); + } -n = T(n).parent; +n = parent; } + //this is then the root again - return n; + return NULL; } static Node* @@ -920,17 +931,7 @@ _prev(Node *node) //this is the root there is no parent if (!T(node).parent) - { -Node *subtree; - -subtree = node; -//search the most down right item -while(T(subtree).children) - { - subtree = eina_list_last_data_get(T(subtree).children); - } -return subtree; - } + return NULL; n =_parent_item(node, EINA_FALSE); //case 1 there is a item in the parent previous to node, which has children @@ -972,12 +973,8 @@ _logical_movement(Efl_Ui_Focus_Manager_Data *pd EINA_UNUSED, Node *upper, Efl_Ui } stack = eina_list_append(stack, result); - result = deliver(result); - } while(result && result->type != NODE_TYPE_NORMAL); - - if (result->type != NODE_TYPE_NORMAL) - abort(); + } while(result && result->type != NODE_TYPE_NORMAL && !result->redirect_manager); eina_list_free(stack); @@ -989,7 +986,8 @@ _request_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_D { Node *dir = NULL; - upper = eina_list_last_data_get(pd->focus_stack); + if (!upper) + upper = eina_list_last_data_get(pd->focus_stack); if (!upper) { @@ -1040,6 +1038,23 @@ _efl_ui_focus_manager_request_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Dat } } +static Efl_Ui_Focus_Object* +_find_normal_node(Node *n) +{ + Eina_List *l; + Node *n2; + if (n->type == NODE_TYPE_NORMAL) return n->focusable; + + EINA_LIST_FOREACH(T(n).children , l, n2) + { +Efl_Ui_Focus_Object *r; + +r = _find_normal_node(n2); +if (r) return r; + } + return NULL; +} + EOLIAN static void _efl_ui_focus_manager_focus(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *focus) { @@ -1048,13 +1063,19 @@ _efl_ui_focus_manager_focus(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus EINA_SAFETY_ON_NULL_RETURN(focus); + //if we want to focus the root then just spin to the first normal + if (focus == pd->root->focusable) + { +focus = _find_normal_node(pd->root); + } + //check if node is part of this manager object - node = node_get(pd, focus); + node = node_get(obj, pd, focus); if (!node) return; F_DBG("Manager: %p focusing object %p %s", obj, focus, efl_class_name_get(focus)); - if (node->type == NODE_TYPE_ONLY_LOGICAL) + if (node->type == NODE_TYPE_ONLY_LOGICAL && !node->redirect_manager && pd->root != node) { ER
[EGIT] [core/efl] master 18/68: efl_ui_focus_manager_sub: update to recenent changes
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=669db4841ab525e9597596772ee0e43319cb1db2 commit 669db4841ab525e9597596772ee0e43319cb1db2 Author: Marcel Hollerbach Date: Tue Dec 6 14:36:37 2016 +0100 efl_ui_focus_manager_sub: update to recenent changes --- src/lib/elementary/efl_ui_focus_manager_sub.c | 75 +- src/lib/elementary/efl_ui_focus_manager_sub.eo | 6 ++- 2 files changed, 54 insertions(+), 27 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index 86d22d8..a610d55 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -6,11 +6,11 @@ #include "elm_priv.h" #define MY_CLASS EFL_UI_FOCUS_MANAGER_SUB_CLASS -#define MY_DATA(o, p) Efl_Ui_Focus_Manager_Sub_Data *pd = efl_data_scope_get(o, MY_CLASS); +#define MY_DATA(o, p) Efl_Ui_Focus_Manager_Sub_Data *p = efl_data_scope_get(o, MY_CLASS); typedef struct { +Efl_Ui_Focus_Manager *manager;//the manager where current_border is currently registered Eina_Bool self_dirty; Eina_List *current_border; //the current set of widgets which is registered as borders -Efl_Ui_Focus_Manager *manager;//the manager where current_border is currently registered } Efl_Ui_Focus_Manager_Sub_Data; static Eina_List* @@ -34,9 +34,15 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) { Eina_Iterator *borders; Eina_List *selection, *tmp; - Efl_Ui_Focus_Object *node; + Efl_Ui_Focus_Object *node, *logical; + Efl_Ui_Focus_Manager *manager; + Efl_Ui_Focus_Manager *elem; + elem = efl_parent_get(obj); + manager = efl_ui_focus_user_manager_get(elem); + logical = efl_ui_focus_user_parent_get(elem); borders = efl_ui_focus_manager_border_elements_get(obj); + selection = NULL; EINA_ITERATOR_FOREACH(borders, node) { @@ -50,7 +56,8 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) EINA_LIST_FREE(tmp, node) { -efl_ui_focus_manager_unregister(pd->manager, node); +if (node == elem) continue; +efl_ui_focus_manager_unregister(manager, node); } //set of the elements which are new without those which are currently registered @@ -59,7 +66,8 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) EINA_LIST_FREE(tmp, node) { -efl_ui_focus_manager_register(pd->manager, node, efl_ui_focus_user_parent_get(obj), obj); +if (node == elem) continue; +efl_ui_focus_manager_register(manager, node, logical, elem); } eina_list_free(pd->current_border); @@ -67,13 +75,19 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) } static void -_border_unregister(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Sub_Data *pd) +_border_unregister(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) { Efl_Ui_Focus_Object *node; + Efl_Ui_Focus_Manager *manager; + Efl_Ui_Focus_Manager *elem; + elem = efl_parent_get(obj); + + manager = efl_ui_focus_user_manager_get(elem); EINA_LIST_FREE(pd->current_border, node) { -efl_ui_focus_manager_unregister(pd->manager, node); +if (node == elem) continue; +efl_ui_focus_manager_unregister(manager, node); } pd->current_border = NULL; @@ -84,7 +98,7 @@ _parent_manager_pre_flush(void *data, const Efl_Event *ev EINA_UNUSED) { MY_DATA(data, pd); -if (!pd->self_dirty) return; //we are not interested +//if (!pd->self_dirty) return; //we are not interested _border_flush(data, pd); } @@ -94,9 +108,9 @@ EFL_CALLBACKS_ARRAY_DEFINE(parent_manager, ); static void -_self_manager_dirty(void *data EINA_UNUSED, const Efl_Event *ev) +_self_manager_dirty(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) { -MY_DATA(ev->object , pd); +MY_DATA(data, pd); pd->self_dirty = EINA_TRUE; } @@ -104,34 +118,41 @@ _self_manager_dirty(void *data EINA_UNUSED, const Efl_Event *ev) static void _logical_manager_change(void *data EINA_UNUSED, const Efl_Event *ev) { - MY_DATA(ev->object, pd); + MY_DATA(data, pd); Eina_List *n; Efl_Ui_Focus_User *b; + Efl_Ui_Focus_Manager *manager; + manager = efl_ui_focus_user_manager_get(ev->object); - EINA_LIST_FOREACH(pd->current_border , n, b) + EINA_LIST_FOREACH(pd->current_border, n, b) { -efl_ui_focus_manager_update_parent(pd->manager , b, ev->info); +if (b == ev->object) continue; +efl_ui_focus_manager_update_parent(manager, b, ev->info); } } static void -_manager_change(void *data EINA_UNUSED, const Efl_Event *ev) +_manager_change(void *data, const Efl_Event *ev) { - MY_DATA(ev->object, pd); - Eina_List *n; - Efl_Ui_Focus_User *b; + MY_DATA(data, pd); + Efl_Ui_Focus_Manager *manager; + Efl_Ui_Focus_Object *logical; + Efl_Ui_Focus_User *b; + Eina_List *n; - manager = efl_ui_focus_user_manage
[EGIT] [core/efl] master 09/68: efl_ui_focus_manager: new api for adding a logical widget
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f2248410b29f2ebabec4ce23d9e6d51fe4422ec4 commit f2248410b29f2ebabec4ce23d9e6d51fe4422ec4 Author: Marcel Hollerbach Date: Wed Nov 16 18:54:26 2016 +0100 efl_ui_focus_manager: new api for adding a logical widget a widget which is registered logically will not be used for right left top or down relations. --- src/lib/elementary/efl_ui_focus_manager.c | 42 +++--- src/lib/elementary/efl_ui_focus_manager.eo | 12 + 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 737a7b5..1a58f9b 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -36,6 +36,7 @@ struct _Border { typedef enum { NODE_TYPE_NORMAL = 0, NODE_TYPE_LISTENER = 1, + NODE_TYPE_ONLY_LOGICAL = 2, } Node_Type; struct _Node{ @@ -252,12 +253,17 @@ _calculate_node(Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *node, Dimens EINA_ITERATOR_FOREACH(nodes, focus_key) { +Node *n; Eina_Rectangle op_rect = EINA_RECTANGLE_INIT; int min, max; op = *focus_key; if (op == node) continue; +n = node_get(pd, op); + +if (n->type == NODE_TYPE_ONLY_LOGICAL) continue; + efl_ui_focus_object_geometry_get(op, &op_rect); if (dim == DIMENSION_X) @@ -430,6 +436,12 @@ dirty_flush(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager_Data *pd) static void dirty_add(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Node *dirty) { + if (dirty->type == NODE_TYPE_ONLY_LOGICAL) + { +ERR("Only not only logical nodes can be marked dirty"); +return; + } + //if (eina_list_data_find(pd->dirty, dirty)) return; pd->dirty = eina_list_remove(pd->dirty, dirty); pd->dirty = eina_list_append(pd->dirty, dirty); @@ -494,11 +506,29 @@ _register(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *child, No T(parent).children = eina_list_append(T(parent).children, node); } - //listen to changes - efl_event_callback_array_add(child, focusable_node(), obj); - return node; } +EOLIAN static Eina_Bool +_efl_ui_focus_manager_register_logical(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *child, Efl_Ui_Focus_Object *parent) +{ + Node *node = NULL; + Node *pnode = NULL; + + EINA_SAFETY_ON_NULL_RETURN_VAL(child, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(parent, EINA_FALSE); + + pnode = node_get(pd, parent); + if (!pnode) return EINA_FALSE; + + node = _register(obj, pd, child, pnode); + if (!node) return EINA_FALSE; + + node->type = NODE_TYPE_ONLY_LOGICAL; + + + return EINA_TRUE; +} + EOLIAN static Eina_Bool _efl_ui_focus_manager_register(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *child, Efl_Ui_Focus_Object *parent, Efl_Ui_Focus_Manager *redirect) @@ -515,6 +545,9 @@ _efl_ui_focus_manager_register(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Fo node = _register(obj, pd, child, pnode); if (!node) return EINA_FALSE; + //listen to changes + efl_event_callback_array_add(child, focusable_node(), obj); + if (!redirect) { node->type = NODE_TYPE_NORMAL; @@ -1021,6 +1054,9 @@ _efl_ui_focus_manager_root_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *p node = _register(obj, pd, root, NULL); + //listen to changes + efl_event_callback_array_add(node->focusable, focusable_node(), obj); + pd->root = node; } diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index 7db508d..9d68776 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -55,6 +55,18 @@ class Efl.Ui.Focus.Manager (Efl.Object) { } return : bool; [[$true if it was successfull $false if not]] } +register_logical { +[[Register a new item just for the logical parent. + + This item can just be used as a parent for a child. It cannot be reached via coordinate wise movements. +]] +params { +child : Efl.Ui.Focus.Object @nonull; +parent : Efl.Ui.Focus.Object @nonull; +} +return : bool; [[$true if it was successfull $false if not]] +} + update_redirect { [[Set a new redirect object for the given child --
[EGIT] [core/efl] master 10/68: elm_widget: add debugging informations for a manager in a widget
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1f8e6dcb371c0a91e17e80ebb86b3749072b4fef commit 1f8e6dcb371c0a91e17e80ebb86b3749072b4fef Author: Marcel Hollerbach Date: Wed Nov 16 18:58:57 2016 +0100 elm_widget: add debugging informations for a manager in a widget --- src/lib/elementary/efl_ui_focus_manager.c | 2 +- src/lib/elementary/efl_ui_focus_manager.eo | 1 + src/lib/elementary/elm_widget.c| 35 +++--- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 1a58f9b..71ead77 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -1118,7 +1118,7 @@ _efl_ui_focus_manager_fetch(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus res->down = DIR_CLONE(EFL_UI_FOCUS_DIRECTION_DOWN); res->next = _next(n)->focusable; res->prev = _prev(n)->focusable; - + res->redirect = n->type == NODE_TYPE_LISTENER ? n->data.listener.manager : NULL; #undef DIR_CLONE return res; diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index 9d68776..9cf8a36 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -16,6 +16,7 @@ struct Efl.Ui.Focus.Relations{ down : list; next : Efl.Ui.Focus.Object; prev : Efl.Ui.Focus.Object; +redirect : Efl.Ui.Focus.Manager; } class Efl.Ui.Focus.Manager (Efl.Object) { diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 44f2f7e..ed1dbc5 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -3887,13 +3887,12 @@ _elm_widget_theme_object_set(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *ed } static void -_convert(Efl_Dbg_Info *info, Eina_List *ptr_list) +_convert(Efl_Dbg_Info *info, Eina_Iterator *ptr_list) { - Eina_List *n; void *p; int i = 0; - EINA_LIST_FOREACH(ptr_list, n, p) + EINA_ITERATOR_FOREACH(ptr_list, p) { char name[100]; @@ -3902,6 +3901,8 @@ _convert(Efl_Dbg_Info *info, Eina_List *ptr_list) EFL_DBG_INFO_APPEND(info, name, EINA_VALUE_TYPE_UINT64, p); i++; } + + eina_iterator_free(ptr_list); } EOLIAN static void @@ -3928,18 +3929,20 @@ _elm_widget_efl_object_dbg_info_get(Eo *eo_obj, Elm_Widget_Smart_Data *_pd EINA_ EFL_DBG_INFO_APPEND(group, "Automatic mirroring", EINA_VALUE_TYPE_CHAR, elm_widget_mirrored_automatic_get(eo_obj)); - rel = efl_ui_focus_manager_fetch(_pd->focus.manager, eo_obj); if (rel) { focus = EFL_DBG_INFO_LIST_APPEND(group, "Focus"); -EFL_DBG_INFO_APPEND(focus, "Next", EINA_VALUE_TYPE_UINT64 , rel->next); -EFL_DBG_INFO_APPEND(focus, "Prev", EINA_VALUE_TYPE_UINT64 , rel->prev); +EFL_DBG_INFO_APPEND(focus, "manager", EINA_VALUE_TYPE_UINT64, _pd->focus.manager); + +EFL_DBG_INFO_APPEND(focus, "next", EINA_VALUE_TYPE_UINT64 , rel->next); +EFL_DBG_INFO_APPEND(focus, "prev", EINA_VALUE_TYPE_UINT64 , rel->prev); +EFL_DBG_INFO_APPEND(focus, "redirect", EINA_VALUE_TYPE_UINT64 , rel->redirect); #define ADD_PTR_LIST(name) \ -Efl_Dbg_Info* name = EFL_DBG_INFO_LIST_APPEND(focus, " "#name" "); \ -_convert(name, rel->name); +Efl_Dbg_Info* name = EFL_DBG_INFO_LIST_APPEND(focus, ""#name""); \ +_convert(name, eina_list_iterator_new(rel->name)); ADD_PTR_LIST(top) ADD_PTR_LIST(down) @@ -3949,6 +3952,22 @@ _elm_widget_efl_object_dbg_info_get(Eo *eo_obj, Elm_Widget_Smart_Data *_pd EINA_ #undef ADD_PTR_LIST } + + //if thats a focus manager, give usefull informations like the border elements + if (efl_isa(eo_obj, EFL_UI_FOCUS_MANAGER_CLASS)) + { +Efl_Dbg_Info *border; + +focus = EFL_DBG_INFO_LIST_APPEND(group, "Focus Manager"); +border = EFL_DBG_INFO_LIST_APPEND(focus, "Border Elements"); + +_convert(border, + efl_ui_focus_manager_border_elements_get(eo_obj) +); + +EFL_DBG_INFO_APPEND(focus, "redirect", EINA_VALUE_TYPE_UINT64, + efl_ui_focus_manager_redirect_get(eo_obj)); + } } EAPI Eina_Bool --
[EGIT] [core/efl] master 06/68: efl_ui_focus_manager: add new api to receive child configuration
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0eefeca64bd7cede4c9db7a0ba5cf95db79123bc commit 0eefeca64bd7cede4c9db7a0ba5cf95db79123bc Author: Marcel Hollerbach Date: Fri Nov 4 17:42:26 2016 +0100 efl_ui_focus_manager: add new api to receive child configuration --- src/lib/elementary/efl_ui_focus_manager.c | 41 ++ src/lib/elementary/efl_ui_focus_manager.eo | 19 ++ 2 files changed, 60 insertions(+) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 6a4f090..737a7b5 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -1048,4 +1048,45 @@ _efl_ui_focus_manager_efl_object_finalize(Eo *obj, Efl_Ui_Focus_Manager_Data *pd return result; } +static Eina_List* +_convert(Eina_List *node_list) +{ + Eina_List *n, *par = NULL; + Node *node; + + EINA_LIST_FOREACH(node_list, n, node) + par = eina_list_append(par, node->focusable); + + return par; +} + +EOLIAN static Efl_Ui_Focus_Relations* +_efl_ui_focus_manager_fetch(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *child) +{ + Efl_Ui_Focus_Relations *res; + Node *n; + + n = node_get(pd, child); + + if (!n) return NULL; + + res = calloc(1, sizeof(Efl_Ui_Focus_Relations)); + + dirty_flush(obj, pd); + +#define DIR_CLONE(dir) _convert(G(n).directions[dir].partners); + + res->right = DIR_CLONE(EFL_UI_FOCUS_DIRECTION_RIGHT); + res->left = DIR_CLONE(EFL_UI_FOCUS_DIRECTION_LEFT); + res->top = DIR_CLONE(EFL_UI_FOCUS_DIRECTION_UP); + res->down = DIR_CLONE(EFL_UI_FOCUS_DIRECTION_DOWN); + res->next = _next(n)->focusable; + res->prev = _prev(n)->focusable; + +#undef DIR_CLONE + + return res; +} + + #include "efl_ui_focus_manager.eo.c" \ No newline at end of file diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index f61b37e..7db508d 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -9,6 +9,14 @@ enum Efl.Ui.Focus.Direction { last = 6 } +struct Efl.Ui.Focus.Relations{ +right : list; +left : list; +top : list; +down : list; +next : Efl.Ui.Focus.Object; +prev : Efl.Ui.Focus.Object; +} class Efl.Ui.Focus.Manager (Efl.Object) { [[Calculates the directions of Efl.Ui.Focus.Direction @@ -120,6 +128,17 @@ class Efl.Ui.Focus.Manager (Efl.Object) { root : Efl.Ui.Focus.Object @nonull; [[Will be registered into this manager object]] } } +fetch { +[[This will fetch the data from a registered node + + Be aware this function will trigger all dirty nodes to be computed +]] +params { +child : Efl.Ui.Focus.Object; +} + +return : own(ptr(Efl.Ui.Focus.Relations)); +} } implements { Efl.Object.constructor; --
[EGIT] [core/efl] master 37/68: efl_ui_focus_manager: return the new candidate
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=13982b2bd9827d6a5a8c17ac507e888e97a0b4d2 commit 13982b2bd9827d6a5a8c17ac507e888e97a0b4d2 Author: Marcel Hollerbach Date: Mon Dec 19 19:53:01 2016 +0100 efl_ui_focus_manager: return the new candidate --- src/lib/elementary/efl_ui_focus_manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 763f330..e8981c4 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -1150,6 +1150,7 @@ _efl_ui_focus_manager_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, E n = T(n).parent; new_candidate = _request_move(obj, pd, direction, n); efl_ui_focus_manager_focus(obj, new_candidate); + candidate = new_candidate; } else { @@ -1162,6 +1163,7 @@ _efl_ui_focus_manager_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, E //redirect does not have smth. but we do have. efl_ui_focus_manager_focus(obj, new_candidate); } + candidate = new_candidate; } } --
[EGIT] [core/efl] master 41/68: elm_box: set the correct order
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c203087d3b8bccc9212ed981b3a8e1b8db64e247 commit c203087d3b8bccc9212ed981b3a8e1b8db64e247 Author: Marcel Hollerbach Date: Tue Dec 20 17:25:31 2016 +0100 elm_box: set the correct order --- src/lib/elementary/elm_box.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/elm_box.c b/src/lib/elementary/elm_box.c index 83501a7..7b98c91 100644 --- a/src/lib/elementary/elm_box.c +++ b/src/lib/elementary/elm_box.c @@ -22,6 +22,16 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = { {NULL, NULL} }; +static void +_focus_order_flush(Eo *obj, Elm_Box_Data *pd EINA_UNUSED) +{ + Elm_Widget_Smart_Data *wpd; + Eina_List *order = evas_object_box_children_get(obj); + wpd = efl_data_scope_get(obj, ELM_WIDGET_CLASS); + + efl_ui_focus_manager_update_children(wpd->focus.manager, obj, order, EINA_TRUE); +} + static void * _elm_box_list_data_get(const Eina_List *list) { @@ -463,25 +473,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 EINA_UNUSED, Evas_Object *subobj) +_elm_box_pack_start(Eo *obj, Elm_Box_Data *pd, 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); } EOLIAN static void -_elm_box_pack_end(Eo *obj, Elm_Box_Data *_pd EINA_UNUSED, Evas_Object *subobj) +_elm_box_pack_end(Eo *obj, Elm_Box_Data *pd, 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); } EOLIAN static void -_elm_box_pack_before(Eo *obj, Elm_Box_Data *_pd EINA_UNUSED, Evas_Object *subobj, Evas_Object *before) +_elm_box_pack_before(Eo *obj, Elm_Box_Data *pd, Evas_Object *subobj, Evas_Object *before) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); @@ -489,33 +501,37 @@ _elm_box_pack_before(Eo *obj, Elm_Box_Data *_pd EINA_UNUSED, Evas_Object *subobj evas_object_box_insert_before (wd->resize_obj, subobj, before); + _focus_order_flush(obj, pd); } EOLIAN static void -_elm_box_pack_after(Eo *obj, Elm_Box_Data *_pd EINA_UNUSED, Evas_Object *subobj, Evas_Object *after) +_elm_box_pack_after(Eo *obj, Elm_Box_Data *pd, 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); } EOLIAN static void -_elm_box_clear(Eo *obj, Elm_Box_Data *_pd EINA_UNUSED) +_elm_box_clear(Eo *obj, Elm_Box_Data *pd) { /* 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); } EOLIAN static void -_elm_box_unpack(Eo *obj, Elm_Box_Data *_pd EINA_UNUSED, Evas_Object *subobj) +_elm_box_unpack(Eo *obj, Elm_Box_Data *pd, 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); } EOLIAN static void @@ -537,6 +553,7 @@ _elm_box_unpack_all(Eo *obj, Elm_Box_Data *pd) evas_object_box_remove_all(wd->resize_obj, EINA_FALSE); /* update size hints */ _sizing_eval(obj); + _focus_order_flush(obj, pd); } EOLIAN static void --
[EGIT] [core/efl] master 03/68: focus: update documentation on all eo files
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ef3f302a65de8d5818b3f50daf38ae442c0c166f commit ef3f302a65de8d5818b3f50daf38ae442c0c166f Author: Marcel Hollerbach Date: Mon Oct 24 12:59:59 2016 +0200 focus: update documentation on all eo files we should now have a complete documentation of those eo files --- src/lib/elementary/efl_ui_focus_manager.eo | 17 +++-- src/lib/elementary/efl_ui_focus_manager_sub.eo | 16 +--- src/lib/elementary/efl_ui_focus_user.eo| 9 - 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index ab70c27..f61b37e 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -1,15 +1,20 @@ enum Efl.Ui.Focus.Direction { -right = 0, -left = 1, -down = 2, -up = 3, -next = 4, -prev = 5, +[[Those values are desribing a direction from the position of view from one item]] +right = 0, [[Coorinate-wise the next element on the right hand side ]] +left = 1, [[Coorinate-wise the next element on the left hand side ]] +down = 2, [[Coorinate-wise the next element on the down hand side ]] +up = 3, [[Coorinate-wise the next element on the up hand side ]] +next = 4, [[Logically-wise the next item in the logical tree]] +prev = 5, [[Logically-wise the prev item in the logical tree]] last = 6 } class Efl.Ui.Focus.Manager (Efl.Object) { +[[Calculates the directions of Efl.Ui.Focus.Direction + + Each registered item will get a other registered object into each direction, you can get those items for the currently focused item if you call request move +]] methods { move { [[Move the focus into the given direction diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.eo b/src/lib/elementary/efl_ui_focus_manager_sub.eo index 984b7e6..f56af23 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.eo +++ b/src/lib/elementary/efl_ui_focus_manager_sub.eo @@ -1,15 +1,25 @@ abstract Efl.Ui.Focus.Manager.Sub (Efl.Ui.Focus.Manager, Efl.Ui.Focus.Object, Efl.Ui.Focus.User) { +[[A abstract class to have a sub manager + + This submanager will register its border elements on the parent manager. The parent manager is found with the Efl.Ui.Focus.User interface. + + Each submanager also has to be a focus object, the object itself will be registered into the parent manager. It will be used as logical parent while registering the border elements. + + The border elements can be filtered by using the select_set function. +]] methods { select_set { +[[filters the given iterator for which elements should be registered in the upper manager]] params { -objects : iterator; +objects : iterator; [[The objects to filter]] } -return : list; +return : list; [[The rest set from objects to use]] } @property parent { +[[The logical parent which is used to register the object itself in the parent manager]] values { -node : Efl.Ui.Focus.Object; +node : Efl.Ui.Focus.Object; [[object to use]] } } } diff --git a/src/lib/elementary/efl_ui_focus_user.eo b/src/lib/elementary/efl_ui_focus_user.eo index 173988f..cd242ee 100644 --- a/src/lib/elementary/efl_ui_focus_user.eo +++ b/src/lib/elementary/efl_ui_focus_user.eo @@ -1,17 +1,16 @@ -mixin Efl.Ui.Focus.User { +interface Efl.Ui.Focus.User { +[[Interface which is used to handle the manager of a user]] methods { @property manager { +[[describes which manager is used to register or should be used to register this user]] get { } values { -manager : Efl.Ui.Focus.Manager; +manager : Efl.Ui.Focus.Manager; [[The manager object]] } } } -implements { -@empty .manager.get; -} events { manager,changed : Efl.Ui.Focus.Manager; [[emitted if a new manager is the parent for this one]] } --
[EGIT] [core/efl] master 30/68: efl_ui_focus_manager: restructure node struct
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=89cc2ca06a31f9e14877c71ba90f9b6d43a4b794 commit 89cc2ca06a31f9e14877c71ba90f9b6d43a4b794 Author: Marcel Hollerbach Date: Mon Dec 12 19:23:42 2016 +0100 efl_ui_focus_manager: restructure node struct a redirect can happen for logical OR normal --- src/lib/elementary/efl_ui_focus_manager.c | 38 +++--- src/lib/elementary/efl_ui_focus_manager.eo | 1 + src/lib/elementary/elm_widget.c| 2 +- 3 files changed, 11 insertions(+), 30 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index a3c390e..c64e4bc 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -35,7 +35,6 @@ struct _Border { typedef enum { NODE_TYPE_NORMAL = 0, - NODE_TYPE_LISTENER = 1, NODE_TYPE_ONLY_LOGICAL = 2, } Node_Type; @@ -44,15 +43,7 @@ struct _Node{ Efl_Ui_Focus_Object *focusable; Efl_Ui_Focus_Manager *manager; - - union { -struct { - Efl_Ui_Focus_Manager *manager; -} listener; -struct { - -} normal; - } data; + Efl_Ui_Focus_Manager *redirect_manager; struct _Tree_Node{ Node *parent; //the parent in the tree @@ -509,7 +500,7 @@ _register(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *child, No return node; } EOLIAN static Eina_Bool -_efl_ui_focus_manager_register_logical(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *child, Efl_Ui_Focus_Object *parent) +_efl_ui_focus_manager_register_logical(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *child, Efl_Ui_Focus_Object *parent, Efl_Ui_Focus_Manager *redirect) { Node *node = NULL; Node *pnode = NULL; @@ -524,7 +515,7 @@ _efl_ui_focus_manager_register_logical(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, E if (!node) return EINA_FALSE; node->type = NODE_TYPE_ONLY_LOGICAL; - + node->redirect_manager = redirect; return EINA_TRUE; } @@ -548,15 +539,8 @@ _efl_ui_focus_manager_register(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Fo //listen to changes efl_event_callback_array_add(child, focusable_node(), obj); - if (!redirect) - { -node->type = NODE_TYPE_NORMAL; - } - else - { -node->type = NODE_TYPE_LISTENER; -node->data.listener.manager = redirect; - } + node->type = NODE_TYPE_NORMAL; + node->redirect_manager = redirect; //mark dirty dirty_add(obj, pd, node); @@ -570,9 +554,8 @@ _efl_ui_focus_manager_update_redirect(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_ Node *node = node_get(pd, child); if (!node) return EINA_FALSE; - if (node->type != NODE_TYPE_LISTENER) return EINA_FALSE; - node->data.listener.manager = redirect; + node->redirect_manager = redirect; return EINA_TRUE; } @@ -1071,11 +1054,11 @@ _efl_ui_focus_manager_focus(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus efl_ui_focus_object_focus_set(node->focusable, EINA_TRUE); //now check if this is also a listener object - if (node->type == NODE_TYPE_LISTENER) + if (node->redirect_manager) { Efl_Ui_Focus_Manager *redirect; -redirect = node->data.listener.manager; +redirect = node->redirect_manager; efl_ui_focus_manager_redirect_set(obj, redirect); } @@ -1218,9 +1201,6 @@ _efl_ui_focus_manager_fetch(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus res->prev = _prev(n)->focusable; switch(n->type) { -case NODE_TYPE_LISTENER: - res->type = "listener"; -break; case NODE_TYPE_ONLY_LOGICAL: res->type = "logical"; break; @@ -1229,7 +1209,7 @@ _efl_ui_focus_manager_fetch(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus break; } res->parent = T(n).parent->focusable; - res->redirect = n->type == NODE_TYPE_LISTENER ? n->data.listener.manager : NULL; + res->redirect = n->redirect_manager; #undef DIR_CLONE return res; diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index c110284..12e47c7 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -66,6 +66,7 @@ class Efl.Ui.Focus.Manager (Efl.Object) { params { child : Efl.Ui.Focus.Object @nonull; parent : Efl.Ui.Focus.Object @nonull; +redirect : Efl.Ui.Focus.Manager; [[The redirect manager to set once this child is focused can be NULL for no redirect]] } return : bool; [[$true if it was successfull $false if not]] } diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 13479fc..9e27de3 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -267,7 +267,7 @@ _elm_widget_focus_register(Eo
[EGIT] [core/efl] master 39/68: efl_ui_focus_manager: handle logical end correctly.
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5b3fd27931778517a2b5a7f9c14b347c9522324f commit 5b3fd27931778517a2b5a7f9c14b347c9522324f Author: Marcel Hollerbach Date: Mon Dec 19 21:18:42 2016 +0100 efl_ui_focus_manager: handle logical end correctly. --- src/lib/elementary/efl_ui_focus_manager.c | 44 +-- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 986e03f..0412363 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -865,18 +865,14 @@ _coords_movement(Efl_Ui_Focus_Manager_Data *pd, Node *upper, Efl_Ui_Focus_Direct static Node* -_parent_item(Node *node, Eina_Bool next) +_prev_item(Node *node) { Node *parent; Eina_List *lnode; parent = T(node).parent; lnode = eina_list_data_find_list(T(parent).children, node); - - if (next) - lnode = eina_list_next(lnode); - else - lnode = eina_list_prev(lnode); + lnode = eina_list_prev(lnode); if (lnode) return eina_list_data_get(lnode); @@ -933,17 +929,24 @@ _prev(Node *node) if (!T(node).parent) return NULL; - n =_parent_item(node, EINA_FALSE); + n =_prev_item(node); //case 1 there is a item in the parent previous to node, which has children if (n && T(n).children) - return eina_list_last_data_get(T(n).children); + { +do + { + n = eina_list_last_data_get(T(n).children); + } +while (T(n).children); + +return n; + } //case 2 there is a item in the parent preivous to node, which has no children if (n) return n; //case 3 there is a no item in the parent provious to this one - //if (!n) return T(node).parent; } @@ -1300,26 +1303,15 @@ _efl_ui_focus_manager_class_destructor(Efl_Class *c EINA_UNUSED) EOLIAN static Efl_Ui_Focus_Object* _efl_ui_focus_manager_logical_end(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd) { - //we need to return the most lower right element Node *child = pd->root; - Efl_Ui_Focus_Object *last_normal = NULL; - while(T(child).children) - { -Efl_Ui_Focus_Object *tmp_last_normal; - -tmp_last_normal = _find_normal_node(child); -if (tmp_last_normal) - last_normal = tmp_last_normal; - -child = eina_list_last_data_get(T(child).children); - } + //we need to return the most lower right element - if (last_normal) - return last_normal; - else - return NULL; + while(T(child).children) + child = eina_list_last_data_get(T(child).children); + while (child->type != NODE_TYPE_NORMAL) + child = _prev(child); - return NULL; + return child ? child->focusable : NULL; } #include "efl_ui_focus_manager.eo.c" \ No newline at end of file --
[EGIT] [core/efl] master 38/68: efl_ui_focus_manager: fix error message
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6245e5a5794d150b0b6bdaa645438253c484fedf commit 6245e5a5794d150b0b6bdaa645438253c484fedf Author: Marcel Hollerbach Date: Mon Dec 19 19:56:06 2016 +0100 efl_ui_focus_manager: fix error message --- src/lib/elementary/efl_ui_focus_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index e8981c4..986e03f 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -1176,7 +1176,7 @@ _efl_ui_focus_manager_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, E efl_ui_focus_manager_focus(obj, candidate); } - F_DBG("Manager: %p moved to %s %s in direction %d", obj, DEBUG_TUPLE(candidate), direction); + F_DBG("Manager: %p moved to %p %s in direction %d", obj, candidate, efl_class_name_get(candidate), direction); return candidate; } --
[EGIT] [core/efl] master 22/68: efl_ui_focus_manager: handle redirect managers in a better way
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0f2657983f0b07ceea13a959fb86ed93096b7535 commit 0f2657983f0b07ceea13a959fb86ed93096b7535 Author: Marcel Hollerbach Date: Wed Dec 7 20:12:11 2016 +0100 efl_ui_focus_manager: handle redirect managers in a better way --- src/lib/elementary/efl_ui_focus_manager.c | 112 + src/lib/elementary/efl_ui_focus_manager.eo | 4 ++ 2 files changed, 85 insertions(+), 31 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 05a4d6d..5140f20 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -942,6 +942,37 @@ _logical_movement(Efl_Ui_Focus_Manager_Data *pd EINA_UNUSED, Node *upper, Efl_Ui return result; } +static Efl_Ui_Focus_Object* +_request_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Direction direction, Node *upper) +{ + Node *dir = NULL; + + upper = eina_list_last_data_get(pd->focus_stack); + + if (!upper) + { +upper = _no_history_element(pd->node_hash); +if (upper) + return upper->focusable; +return NULL; + + } +#ifdef DEBUG + _debug_node(upper); +#endif + if (direction == EFL_UI_FOCUS_DIRECTION_PREV +|| direction == EFL_UI_FOCUS_DIRECTION_NEXT) + dir = _logical_movement(pd, upper, direction); + else + dir = _coords_movement(pd, upper, direction); + + //return the widget + if (dir) + return dir->focusable; + else + return NULL; +} + EOLIAN static Efl_Ui_Focus_Object* _efl_ui_focus_manager_request_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Direction direction) { @@ -953,32 +984,19 @@ _efl_ui_focus_manager_request_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Dat return efl_ui_focus_manager_request_move(pd->redirect, direction); else { - Node *upper = NULL, *dir = NULL; +Node *upper = NULL; - upper = eina_list_last_data_get(pd->focus_stack); +upper = eina_list_last_data_get(pd->focus_stack); - if (!upper) - { - upper = _no_history_element(pd->node_hash); - if (upper) -return upper->focusable; - return NULL; +if (!upper) + { + upper = _no_history_element(pd->node_hash); + if (upper) + return upper->focusable; + return NULL; + } - } -#ifdef DEBUG - _debug_node(upper); -#endif - if (direction == EFL_UI_FOCUS_DIRECTION_PREV - || direction == EFL_UI_FOCUS_DIRECTION_NEXT) -dir = _logical_movement(pd, upper, direction); - else -dir = _coords_movement(pd, upper, direction); - - //return the widget - if (dir) - return dir->focusable; - else - return NULL; +return _request_move(obj, pd, direction, upper); } } @@ -1022,24 +1040,46 @@ _efl_ui_focus_manager_focus(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus EOLIAN static Efl_Ui_Focus_Object* _efl_ui_focus_manager_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Direction direction) { - Efl_Ui_Focus_Object *candidate; + Efl_Ui_Focus_Object *candidate = NULL; EINA_SAFETY_ON_FALSE_RETURN_VAL(DIRECTION_CHECK(direction), NULL); if (pd->redirect) { -candidate = efl_ui_focus_manager_move(pd->redirect, direction); +Efl_Ui_Focus_Object *old_candidate = NULL; +candidate = efl_ui_focus_manager_move(pd->redirect, direction); +old_candidate = efl_ui_focus_manager_focused(pd->redirect); + if (!candidate) - efl_ui_focus_manager_redirect_set(obj, NULL); - } + { + Efl_Ui_Focus_Object *new_candidate = NULL; + Node *n; + + //there is no candidate check if we have something for that direction + new_candidate = NULL; + n = eina_hash_find(pd->node_hash, &old_candidate); + + if (n) + new_candidate = _request_move(obj, pd, direction, n); - if (!pd->redirect) + if (new_candidate) + { + //redirect does not have smth. but we do have. + efl_ui_focus_manager_redirect_set(obj, NULL); + efl_ui_focus_manager_focus(obj, new_candidate); + } + } + + } + else { candidate = efl_ui_focus_manager_request_move(obj, direction); + if (candidate) efl_ui_focus_manager_focus(obj, candidate); } + #ifdef DEBUG printf("Focus, MOVE %s %s\n", DEBUG_TUPLE(candidate)); #endif @@ -1058,9 +1098,7 @@ _efl_ui_focus_manager_root_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *p } node = _register(obj, pd, root, NULL); - - //listen to ch
[EGIT] [core/efl] master 01/68: efl_ui: introduce a focus manager and sub manager object
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=01f46ae205bd964e5254793c79a5bc0648c045f5 commit 01f46ae205bd964e5254793c79a5bc0648c045f5 Author: Marcel Hollerbach Date: Thu Oct 20 22:59:05 2016 +0200 efl_ui: introduce a focus manager and sub manager object The Efl.Ui.Focus.Manager abstracts the creation of a localization graph and a logical tree. The localization graph is used to find a object right left up or down of a given object. The logical tree is used to iterate throuw the containers which are used to build a ui. Those managers can be used bound to some layer in the ui, so for example the window is a layer, the content of a scroller is a layer. With those layers, we can make sure that movements of a scroller for example just means that this graph of objects in the scroller needs to be recalculated, and not the complete ui. The advantage of having this to layer bound datastructures is that you can easily debug those graphs, since the complete layer of this managerobject can be calculated completly. --- src/Makefile_Elementary.am | 16 +- src/lib/elementary/Elementary.h| 14 + src/lib/elementary/efl_ui_focus_manager.c | 1051 src/lib/elementary/efl_ui_focus_manager.eo | 129 +++ src/lib/elementary/efl_ui_focus_manager_sub.c | 188 + src/lib/elementary/efl_ui_focus_manager_sub.eo | 25 + src/lib/elementary/efl_ui_focus_object.c | 30 + src/lib/elementary/efl_ui_focus_object.eo | 28 + src/lib/elementary/efl_ui_focus_user.eo| 18 + src/tests/elementary/elm_suite.c |2 + src/tests/elementary/elm_suite.h |2 + src/tests/elementary/elm_test_focus.c | 347 src/tests/elementary/elm_test_focus_common.c | 79 ++ src/tests/elementary/elm_test_focus_common.h | 28 + src/tests/elementary/elm_test_focus_sub.c | 242 ++ src/tests/elementary/focus_test.eo | 14 + src/tests/elementary/focus_test_sub.eo |8 + 17 files changed, 2220 insertions(+), 1 deletion(-) diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index f7f0016..3b7413b 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -118,6 +118,10 @@ elm_public_eolian_files = \ lib/elementary/efl_config_global.eo \ lib/elementary/efl_ui_clock.eo \ lib/elementary/efl_ui_image_factory.eo \ + lib/elementary/efl_ui_focus_manager.eo \ + lib/elementary/efl_ui_focus_manager_sub.eo \ + lib/elementary/efl_ui_focus_object.eo \ + lib/elementary/efl_ui_focus_user.eo \ $(NULL) # Private classes (not exposed or shipped) @@ -669,6 +673,9 @@ lib_elementary_libelementary_la_SOURCES = \ lib/elementary/efl_ui_clock.c \ lib/elementary/efl_ui_clock_private.h \ lib/elementary/efl_ui_image_factory.c \ + lib/elementary/efl_ui_focus_manager.c \ + lib/elementary/efl_ui_focus_manager_sub.c \ + lib/elementary/efl_ui_focus_object.c \ $(NULL) @@ -1332,7 +1339,14 @@ tests_elementary_elm_suite_SOURCES = \ tests/elementary/elm_code_test_widget.c \ tests/elementary/elm_code_test_widget_text.c \ tests/elementary/elm_code_test_widget_selection.c \ - tests/elementary/elm_code_test_widget_undo.c + tests/elementary/elm_code_test_widget_undo.c \ + tests/elementary/elm_test_focus_common.c \ + tests/elementary/elm_test_focus.c \ + tests/elementary/elm_test_focus_sub.c + +tests/elementary/tests_elementary_elm_suite-elm_test_focus.$(OBJEXT): tests/elementary/focus_test.eo.c tests/elementary/focus_test.eo.h + +tests/elementary/tests_elementary_elm_suite-elm_test_focus_sub.$(OBJEXT): tests/elementary/focus_test_sub.eo.c tests/elementary/focus_test_sub.eo.h tests_elementary_elm_suite_CPPFLAGS = \ -DTESTS_BUILD_DIR=\"${top_builddir}/src/tests/elementary\" \ diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h index d917a57..db56d7e 100644 --- a/src/lib/elementary/Elementary.h +++ b/src/lib/elementary/Elementary.h @@ -136,11 +136,25 @@ typedef struct _Elm_Version EAPI extern Elm_Version *elm_version; + /* include these first for general used definitions */ #include #include #include #include + +#ifdef EFL_EO_API_SUPPORT +# include "efl_ui_focus_object.eo.h" +# include "efl_ui_focus_manager.eo.h" +# include "efl_ui_focus_manager_sub.eo.h" +# include "efl_ui_focus_user.eo.h" +#else +# include "efl_ui_focus_object.eo.legacy.h" +# include "efl_ui_focus_manager.eo.legacy.h" +# include "efl_ui_focus_manager_sub.eo.legacy.h" +# include "efl_ui_focus_user.eo.legacy.h" +#endif + #include #include #include diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c new file mode 100644 index 000.
[EGIT] [core/efl] master 32/68: efl_ui_focus_manager_sub: focus the item in sub and main manager
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=09824ec4508d0c20bfe2f26654903e5f5f6981c4 commit 09824ec4508d0c20bfe2f26654903e5f5f6981c4 Author: Marcel Hollerbach Date: Sat Dec 17 19:45:56 2016 +0100 efl_ui_focus_manager_sub: focus the item in sub and main manager --- src/lib/elementary/efl_ui_focus_manager_sub.c | 44 --- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index 89b6b4e..42f9d19 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -30,6 +30,39 @@ _set_a_without_b(Eina_List *a, Eina_List *b) } static void +_focus_changed(void *data, const Efl_Event *event) +{ + Efl_Ui_Focus_Manager_Sub *m = data; + Efl_Ui_Focus_Manager *manager; + Elm_Widget *elem; + + elem = efl_parent_get(m); + manager = efl_ui_focus_user_manager_get(elem); + + //only do this when we are getting focus + if (!event->info) return; + + //if there is already the redirect, ignore this focus request + if (efl_ui_focus_manager_redirect_get(manager)) return; + + efl_ui_focus_manager_focus(m, event->object); +} + +static void +_register(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager *par_m, Efl_Ui_Focus_Object *node, Efl_Ui_Focus_Object *logical) +{ + efl_ui_focus_manager_register(par_m, node, logical, obj); + efl_event_callback_add(node, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _focus_changed, obj); +} + +static void +_unregister(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager *par_m, Efl_Ui_Focus_Object *node) +{ + efl_ui_focus_manager_unregister(par_m, node); + efl_event_callback_del(node, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _focus_changed, obj); +} + +static void _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) { Eina_Iterator *borders; @@ -57,7 +90,7 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) EINA_LIST_FREE(tmp, node) { if (node == elem) continue; -efl_ui_focus_manager_unregister(manager, node); +_unregister(obj, manager, node); } //set of the elements which are new without those which are currently registered @@ -67,7 +100,7 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) EINA_LIST_FREE(tmp, node) { if (node == elem) continue; -efl_ui_focus_manager_register(manager, node, logical, elem); +_register(obj, manager, node, logical); } eina_list_free(pd->current_border); @@ -87,7 +120,7 @@ _border_unregister(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) EINA_LIST_FREE(pd->current_border, node) { if (node == elem) continue; -efl_ui_focus_manager_unregister(manager, node); +_unregister(obj, manager, node); } pd->current_border = NULL; @@ -151,8 +184,9 @@ _manager_change(void *data, const Efl_Event *ev) EINA_LIST_FOREACH(pd->current_border , n, b) { if (b == ev->object) continue; -efl_ui_focus_manager_unregister(pd->manager, b); -efl_ui_focus_manager_register(manager, b, logical, ev->object); + +_unregister(data, manager, b); +_register(data, manager, b, logical); } //unregister the old manager, use the new pd->manager = manager; --
[EGIT] [core/efl] master 43/68: efl_ui_win: migrate to the new focus system
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ef8aed03854dabe9f7bb6d8689cd9f211bb1fd1c commit ef8aed03854dabe9f7bb6d8689cd9f211bb1fd1c Author: Marcel Hollerbach Date: Tue Dec 20 17:27:45 2016 +0100 efl_ui_win: migrate to the new focus system this means, focus requests are redirected to the new focus manager. --- src/lib/elementary/efl_ui_win.c | 42 - 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 2bd0b93..8dfe158 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -1683,20 +1683,42 @@ _key_action_move(Evas_Object *obj, const char *params) const char *dir = params; _elm_widget_focus_auto_show(obj); + + Efl_Ui_Focus_Direction focus_dir; + Efl_Ui_Focus_Object *o; + if (!strcmp(dir, "previous")) - elm_widget_focus_cycle(obj, ELM_FOCUS_PREVIOUS); + focus_dir = EFL_UI_FOCUS_DIRECTION_PREV; else if (!strcmp(dir, "next")) - elm_widget_focus_cycle(obj, ELM_FOCUS_NEXT); + focus_dir = EFL_UI_FOCUS_DIRECTION_NEXT; else if (!strcmp(dir, "left")) - elm_widget_focus_cycle(obj, ELM_FOCUS_LEFT); + focus_dir = EFL_UI_FOCUS_DIRECTION_LEFT; else if (!strcmp(dir, "right")) - elm_widget_focus_cycle(obj, ELM_FOCUS_RIGHT); + focus_dir = EFL_UI_FOCUS_DIRECTION_RIGHT; else if (!strcmp(dir, "up")) - elm_widget_focus_cycle(obj, ELM_FOCUS_UP); + focus_dir = EFL_UI_FOCUS_DIRECTION_UP; else if (!strcmp(dir, "down")) - elm_widget_focus_cycle(obj, ELM_FOCUS_DOWN); + focus_dir = EFL_UI_FOCUS_DIRECTION_DOWN; else return EINA_FALSE; + o = efl_ui_focus_manager_move(obj, focus_dir); + + if (!o && focus_dir == EFL_UI_FOCUS_DIRECTION_NEXT) + { +Efl_Ui_Focus_Object *root; + +root = efl_ui_focus_manager_root_get(obj); +efl_ui_focus_manager_focus(obj, root); + } + + if (!o && focus_dir == EFL_UI_FOCUS_DIRECTION_PREV) + { +Efl_Ui_Focus_Object *last; + +last = efl_ui_focus_manager_logical_end(obj); +efl_ui_focus_manager_focus(obj, last); + } + return EINA_TRUE; } @@ -2714,7 +2736,7 @@ _efl_ui_win_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Win_Data *sd) if ((sd->modal) && (evas_object_visible_get(obj))) _elm_win_modality_decrement(sd); - if ((sd->modal) && (sd->modal_count > 0)) + if ((sd->modal) && (sd->modal_count > 0)) ERR("Deleted modal win was blocked by another modal win which was created after creation of that win."); evas_object_event_callback_del_full(sd->legacy.edje, @@ -5221,12 +5243,14 @@ _efl_ui_win_efl_object_constructor(Eo *obj, Efl_Ui_Win_Data *pd) /* Do nothing. */ /* XXX: We are calling the constructor chain from the finalizer. It's * really bad and hacky. Needs fixing. */ - pd->manager = efl_add(EFL_UI_FOCUS_MANAGER_CLASS, NULL, + pd->manager = efl_add(EFL_UI_FOCUS_MANAGER_CLASS, obj, efl_ui_focus_manager_root_set(efl_added, obj) ); efl_composite_attach(obj, pd->manager); + efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, obj); + efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, obj); return obj; } @@ -5661,7 +5685,7 @@ _efl_ui_win_urgent_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Efl_Ui_Win_Urge Eina_Bool urgent_tmp = !!urgent; if (sd->urgent == urgent_tmp) return; - + sd->urgent = urgent_tmp; TRAP(sd, urgent_set, urgent_tmp); #ifdef HAVE_ELEMENTARY_X --
[EGIT] [core/efl] master 53/68: elm_grid: migrate to new focus system
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=996a5024952f0f45e9b5261fbcf5be0f6d850599 commit 996a5024952f0f45e9b5261fbcf5be0f6d850599 Author: Marcel Hollerbach Date: Wed Dec 21 12:29:06 2016 +0100 elm_grid: migrate to new focus system --- src/lib/elementary/elm_grid.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/lib/elementary/elm_grid.c b/src/lib/elementary/elm_grid.c index 20c1060..6155d6a 100644 --- a/src/lib/elementary/elm_grid.c +++ b/src/lib/elementary/elm_grid.c @@ -13,6 +13,17 @@ #define MY_CLASS_NAME "Elm_Grid" #define MY_CLASS_NAME_LEGACY "elm_grid" +static void +_focus_order_flush(Eo *obj) +{ + Elm_Widget_Smart_Data *wpd; + Eina_List *order = evas_object_grid_children_get(obj); + wpd = efl_data_scope_get(obj, ELM_WIDGET_CLASS); + + efl_ui_focus_manager_update_children(wpd->focus.manager, obj, order, EINA_TRUE); +} + + EOLIAN static Eina_Bool _elm_grid_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED) { @@ -198,6 +209,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); } EOLIAN static void @@ -207,6 +219,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); } EOLIAN static void @@ -225,6 +238,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); } EAPI void @@ -240,6 +254,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); } EAPI void --
[EGIT] [core/efl] master 45/68: elm_menu: mirgrate to the new focus
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=dfceeb78c31d6339406ff6cf086293d09568c9f2 commit dfceeb78c31d6339406ff6cf086293d09568c9f2 Author: Marcel Hollerbach Date: Tue Dec 20 17:29:26 2016 +0100 elm_menu: mirgrate to the new focus this just means the menu is registering a new manager, it is not really doing anything, its just there so the children which are searching for one are finiding one. Elm menu has not handled anything with keys in the past and will later learn to do so. --- src/lib/elementary/elm_menu.c | 10 ++ src/lib/elementary/elm_menu.eo | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c index 81e60d8..7a4b8e3 100644 --- a/src/lib/elementary/elm_menu.c +++ b/src/lib/elementary/elm_menu.c @@ -806,6 +806,16 @@ _elm_menu_efl_object_constructor(Eo *obj, Elm_Menu_Data *sd) { Eo *parent = NULL; + { + Efl_Ui_Focus_Manager *manager; + + manager = efl_add(EFL_UI_FOCUS_MANAGER_CLASS, NULL, +efl_ui_focus_manager_root_set(efl_added, obj) + ); + + efl_composite_attach(obj, manager); + } + obj = efl_constructor(efl_super(obj, MY_CLASS)); efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); diff --git a/src/lib/elementary/elm_menu.eo b/src/lib/elementary/elm_menu.eo index 7e2b9f5..2b8eef1 100644 --- a/src/lib/elementary/elm_menu.eo +++ b/src/lib/elementary/elm_menu.eo @@ -1,5 +1,5 @@ class Elm.Menu (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Menu, -Elm.Interface.Atspi.Selection) +Elm.Interface.Atspi.Selection, Efl.Ui.Focus.Manager) { [[Elementary menu class]] legacy_prefix: elm_menu; --
[EGIT] [core/efl] master 59/68: focus: update object definition
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b0568570936f1a2048e62c6dcde5f7e4ffb9d1a9 commit b0568570936f1a2048e62c6dcde5f7e4ffb9d1a9 Author: Marcel Hollerbach Date: Thu Dec 22 00:28:24 2016 +0100 focus: update object definition Summary: This introduces a new focus system and the migration to this system. Test Plan: run elementary_test Reviewers: cedric Differential Revision: https://phab.enlightenment.org/D4511 --- src/lib/elementary/elm_toolbar.c| 192 +++- src/lib/elementary/elm_toolbar.eo | 1 + src/lib/elementary/elm_toolbar_item.eo | 5 +- src/lib/elementary/elm_widget_toolbar.h | 1 + 4 files changed, 97 insertions(+), 102 deletions(-) diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index 4505e24..1b15924 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -54,17 +54,70 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = { }; static Eina_Bool _key_action_select(Evas_Object *obj, const char *params); -static Eina_Bool _key_action_move(Evas_Object *obj, const char *params); static void _sizing_eval(Evas_Object *obj); static const Elm_Action key_actions[] = { {"select", _key_action_select}, - {"move", _key_action_move}, {NULL, NULL} }; 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->registered == !!want) return; + + //grab manager from widget + widget = WIDGET(pd); + manager = efl_ui_focus_user_manager_get(widget); + + if (want) + { +efl_ui_focus_manager_register(manager, EO_OBJ(pd), widget, NULL); +pd->registered = manager; + } + else + { +efl_ui_focus_manager_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; + Elm_Widget_Smart_Data *wpd; + Eina_List *order = NULL; + + wpd = efl_data_scope_get(obj, ELM_WIDGET_CLASS); + 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_update_order(wpd->focus.manager, obj, order); +} + static int _toolbar_item_prio_compare_cb(const void *i1, const void *i2) @@ -594,6 +647,8 @@ _resize_job(void *data) eina_list_free(list); _mirrored_set(obj, elm_widget_mirrored_get(obj)); + + _item_focus_eval_all(obj, sd); } static void @@ -781,47 +836,6 @@ _elm_toolbar_elm_widget_on_focus(Eo *obj, Elm_Toolbar_Data *sd, Elm_Object_Item return EINA_TRUE; } -static Elm_Toolbar_Item_Data * -_focus_next_item_get(Evas_Object *obj, Eina_Bool reverse) -{ - ELM_TOOLBAR_DATA_GET(obj, sd); - Eina_List *list = NULL, *children_list; - Elm_Toolbar_Item_Data *it = NULL; - Evas_Object *it_obj = NULL; - - children_list = evas_object_box_children_get(sd->bx); - if (reverse) - children_list = eina_list_reverse(children_list); - list = children_list; - if (sd->focused_item) - { -ELM_TOOLBAR_ITEM_DATA_GET(sd->focused_item, focus_it); -list = eina_list_data_find_list(list, VIEW(focus_it)); -if (list) list = eina_list_next(list); - } - it_obj = eina_list_data_get(list); - if (it_obj) it = evas_object_data_get(it_obj, "item"); - else it = NULL; - - while (it && - (it->separator || - elm_object_item_disabled_get(EO_OBJ(it - { -if (list) list = eina_list_next(list); -if (!list) - { - it = NULL; - break; - } -it_obj = eina_list_data_get(list); -if (it_obj) it = evas_object_data_get(it_obj, "item"); -else it = NULL; - } - eina_list_free(children_list); - - return it; -} - EOLIAN static void _elm_toolbar_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Toolbar_Item_Data *it, Eina_Bool focused) { @@ -872,28 +886,6 @@ _elm_toolbar_item_elm_widget_item_focus_get(Eo *eo_it, Elm_Toolbar_Item_Data *it } static Eina_Bool -_item_focused_next( Evas_Object *obj, - Eina_Bool reverse, - Elm_Focus_Direction dir) -{ - ELM_TOOLBAR_DATA_GET(obj, sd); - Elm_Toolbar_Item_Data *next_focused_item; - - next_focused_item = _focus_next_item_get(obj, reverse); - if (!next_focused_item) - return EINA_FALSE; - - if ((sd->orientation ==
[EGIT] [core/efl] master 04/68: managersub: remove the select_set call
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b75b5f4c05c9452ae0e823d12cf559b2fa287f25 commit b75b5f4c05c9452ae0e823d12cf559b2fa287f25 Author: Marcel Hollerbach Date: Mon Oct 24 17:16:34 2016 +0200 managersub: remove the select_set call this can be done directly be inheriting border_elements and cutting down the set. --- src/lib/elementary/efl_ui_focus_manager_sub.c | 7 ++- src/lib/elementary/efl_ui_focus_manager_sub.eo | 10 +- src/tests/elementary/elm_test_focus_sub.c | 16 src/tests/elementary/focus_test_sub.eo | 1 - 4 files changed, 7 insertions(+), 27 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index 98fa075..8732ec9 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -38,7 +38,12 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) Efl_Ui_Focus_Object *node; borders = efl_ui_focus_manager_border_elements_get(obj); - selection = efl_ui_focus_manager_sub_select_set(obj, borders); + selection = NULL; + EINA_ITERATOR_FOREACH(borders, node) + { +selection = eina_list_append(selection, node); + } + eina_iterator_free(borders); //elements which are not in the current border elements tmp = eina_list_clone(pd->current_border); diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.eo b/src/lib/elementary/efl_ui_focus_manager_sub.eo index f56af23..a26020b 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.eo +++ b/src/lib/elementary/efl_ui_focus_manager_sub.eo @@ -6,16 +6,9 @@ abstract Efl.Ui.Focus.Manager.Sub (Efl.Ui.Focus.Manager, Efl.Ui.Focus.Object, Ef Each submanager also has to be a focus object, the object itself will be registered into the parent manager. It will be used as logical parent while registering the border elements. - The border elements can be filtered by using the select_set function. + You can filter the border elements by overriding the border_elements property of the manager. ]] methods { -select_set { -[[filters the given iterator for which elements should be registered in the upper manager]] -params { -objects : iterator; [[The objects to filter]] -} -return : list; [[The rest set from objects to use]] -} @property parent { [[The logical parent which is used to register the object itself in the parent manager]] values { @@ -24,7 +17,6 @@ abstract Efl.Ui.Focus.Manager.Sub (Efl.Ui.Focus.Manager, Efl.Ui.Focus.Object, Ef } } implements { -@empty .select_set; @empty Efl.Ui.Focus.Object.geometry_get; @empty Efl.Ui.Focus.Object.focus.get; @empty Efl.Ui.Focus.User.manager.get; diff --git a/src/tests/elementary/elm_test_focus_sub.c b/src/tests/elementary/elm_test_focus_sub.c index 3b253f5..f9012c6 100644 --- a/src/tests/elementary/elm_test_focus_sub.c +++ b/src/tests/elementary/elm_test_focus_sub.c @@ -5,22 +5,6 @@ typedef struct { } Focus_Test_Sub_Data; -EOLIAN static Eina_List* -_focus_test_sub_efl_ui_focus_manager_sub_select_set(Eo *obj EINA_UNUSED, Focus_Test_Sub_Data *pd EINA_UNUSED, Eina_Iterator *objects) -{ - Eina_List *list = NULL; - Efl_Ui_Focus_Object *o; - - EINA_ITERATOR_FOREACH(objects, o) - { -list = eina_list_append(list, o); - } - - eina_iterator_free(objects); - - return list; -} - EOLIAN static void _focus_test_sub_efl_ui_focus_object_geometry_get(Eo *obj EINA_UNUSED, Focus_Test_Sub_Data *pd EINA_UNUSED, Eina_Rectangle *rect EINA_UNUSED) { diff --git a/src/tests/elementary/focus_test_sub.eo b/src/tests/elementary/focus_test_sub.eo index 355acb9..60c6a43 100644 --- a/src/tests/elementary/focus_test_sub.eo +++ b/src/tests/elementary/focus_test_sub.eo @@ -1,6 +1,5 @@ class Focus.Test.Sub(Efl.Ui.Focus.Manager.Sub) { implements { -Efl.Ui.Focus.Manager.Sub.select_set; Efl.Ui.Focus.Object.geometry_get; Efl.Ui.Focus.Object.focus.get; Efl.Ui.Focus.User.manager.get; --
[EGIT] [core/efl] master 65/68: elm_list: migrate to new focus system
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c867ab64e04bdec5a9298a97e3e4a742980af076 commit c867ab64e04bdec5a9298a97e3e4a742980af076 Author: Marcel Hollerbach Date: Wed Jan 11 16:17:05 2017 +0100 elm_list: migrate to new focus system --- src/lib/elementary/elm_list.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c index 682de8c..c533f21 100644 --- a/src/lib/elementary/elm_list.c +++ b/src/lib/elementary/elm_list.c @@ -2332,6 +2332,7 @@ _item_new(Evas_Object *obj, (it->icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb, obj); elm_interface_atspi_accessible_type_set(it->icon, ELM_ATSPI_TYPE_DISABLED); +elm_widget_tree_unfocusable_set(it->icon, EINA_TRUE); } if (it->end) { @@ -2340,6 +2341,7 @@ _item_new(Evas_Object *obj, (it->end, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb, obj); elm_interface_atspi_accessible_type_set(it->end, ELM_ATSPI_TYPE_DISABLED); +elm_widget_tree_unfocusable_set(it->end, EINA_TRUE); } if (_elm_config->atspi_mode) --
[EGIT] [core/efl] master 46/68: elm_widget: evalulate show flag and call focus on super
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9b64e7316a2b475379febc83cf1b97de6e6fbab3 commit 9b64e7316a2b475379febc83cf1b97de6e6fbab3 Author: Marcel Hollerbach Date: Tue Dec 20 17:31:33 2016 +0100 elm_widget: evalulate show flag and call focus on super --- src/lib/elementary/elm_widget.c | 78 ++-- src/lib/elementary/elm_widget.eo | 7 ++-- 2 files changed, 72 insertions(+), 13 deletions(-) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 9e27de3..33df392 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -259,15 +259,18 @@ _focus_manager_eval(Eo *obj, Elm_Widget_Smart_Data *pd) return old; } -EOLIAN static void -_elm_widget_focus_register(Eo *obj, Elm_Widget_Smart_Data *pd, +EOLIAN static Eina_Bool +_elm_widget_focus_register(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED, Efl_Ui_Focus_Manager *manager, Efl_Ui_Focus_Object *logical, Eina_Bool full) { + if (full) efl_ui_focus_manager_register(manager, obj, logical, NULL); else efl_ui_focus_manager_register_logical(manager, obj, logical, NULL); + + return full; } @@ -282,20 +285,24 @@ _focus_state_eval(Eo *obj, Elm_Widget_Smart_Data *pd) if (pd->can_focus) { should = EINA_TRUE; -want_full = EINA_TRUE; //can focus can be overridden by the following properties if (pd->disabled) should = EINA_FALSE; if (_tree_unfocusable(obj)) should = EINA_FALSE; + +if (!evas_object_visible_get(obj)) + should = EINA_FALSE; + +if (should) + want_full = EINA_TRUE; } - if (pd->logical.child_count > 0) + if (!should && pd->logical.child_count > 0) should = EINA_TRUE; - if (!manager || -//check if we have changed the manager + if ( //check if we have changed the manager (pd->focus.manager != manager && should) || //check if we are already registered but in a different state (pd->focus.manager && should && want_full == pd->focus.logical) @@ -312,9 +319,10 @@ _focus_state_eval(Eo *obj, Elm_Widget_Smart_Data *pd) { pd->focus.manager = manager; - elm_obj_widget_focus_register(obj, pd->focus.manager, pd->logical.parent, want_full); + if (!pd->logical.parent) return; - pd->focus.logical = !want_full; + pd->focus.logical = +!elm_obj_widget_focus_register(obj, pd->focus.manager, pd->logical.parent, want_full); } } else if (!should && pd->focus.manager) @@ -744,6 +752,8 @@ _elm_widget_efl_gfx_visible_set(Eo *obj, Elm_Widget_Smart_Data *pd, Eina_Bool vi efl_gfx_visible_set(efl_super(obj, MY_CLASS), vis); + _focus_state_eval(obj, pd); + it = evas_object_smart_iterator_new(obj); EINA_ITERATOR_FOREACH(it, o) { @@ -4125,10 +4135,12 @@ _elm_widget_efl_object_dbg_info_get(Eo *eo_obj, Elm_Widget_Smart_Data *_pd EINA_ { focus = EFL_DBG_INFO_LIST_APPEND(group, "Focus"); +EFL_DBG_INFO_APPEND(focus, "type", EINA_VALUE_TYPE_STRING, rel->type); EFL_DBG_INFO_APPEND(focus, "manager", EINA_VALUE_TYPE_UINT64, _pd->focus.manager); - +EFL_DBG_INFO_APPEND(focus, "parent", EINA_VALUE_TYPE_UINT64, rel->parent); EFL_DBG_INFO_APPEND(focus, "next", EINA_VALUE_TYPE_UINT64 , rel->next); EFL_DBG_INFO_APPEND(focus, "prev", EINA_VALUE_TYPE_UINT64 , rel->prev); + EFL_DBG_INFO_APPEND(focus, "redirect", EINA_VALUE_TYPE_UINT64 , rel->redirect); #define ADD_PTR_LIST(name) \ @@ -4319,12 +4331,56 @@ elm_widget_focus_mouse_up_handle(Evas_Object *obj) } EOLIAN static void -_elm_widget_focus_mouse_up_handle(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED) +_elm_widget_focus_mouse_up_handle(Eo *obj, Elm_Widget_Smart_Data *pd) { if (!obj) return; if (!_is_focusable(obj)) return; elm_widget_focus_steal(obj, NULL); + + if (pd->focus.manager && !pd->focus.logical) + { +Efl_Ui_Focus_Manager *m, *m2 = obj, *old = NULL; + +/* + * The object we have clicked could be registered in a submanager. + * This means we need to look as long as possible to higher redirect managers. + * And set them to the redirect manager. + */ + +m = elm_widget_top_get(obj); +m2 = efl_ui_focus_user_manager_get(obj); + +if (m2 != m) + { +//first unset all redirect properties +old = m; +do + { + Efl_Ui_Focus_Manager *tmp; + tmp = efl_ui_focus_manager_redirect_get(old); + if (tmp) + efl_ui_focus_manager_redirect_set(old, NULL); + old = tmp; + } +while(old); +//now set the redirect path to the new object +
[EGIT] [core/efl] master 17/68: efl_ui_focus_manager_sub: register children correctly
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7eb1df349c30fb3ae2269be8f5a51bdc2b44d074 commit 7eb1df349c30fb3ae2269be8f5a51bdc2b44d074 Author: Marcel Hollerbach Date: Sun Dec 4 21:37:07 2016 +0100 efl_ui_focus_manager_sub: register children correctly --- src/lib/elementary/efl_ui_focus_manager_sub.c | 98 +- src/lib/elementary/efl_ui_focus_manager_sub.eo | 13 +--- 2 files changed, 37 insertions(+), 74 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index 6dbfd66..86d22d8 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -8,10 +8,9 @@ #define MY_CLASS EFL_UI_FOCUS_MANAGER_SUB_CLASS #define MY_DATA(o, p) Efl_Ui_Focus_Manager_Sub_Data *pd = efl_data_scope_get(o, MY_CLASS); typedef struct { -Efl_Ui_Focus_Manager *manager; -Efl_Ui_Focus_Manager *parent; Eina_Bool self_dirty; -Eina_List *current_border; +Eina_List *current_border; //the current set of widgets which is registered as borders +Efl_Ui_Focus_Manager *manager;//the manager where current_border is currently registered } Efl_Ui_Focus_Manager_Sub_Data; static Eina_List* @@ -60,7 +59,7 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) EINA_LIST_FREE(tmp, node) { -efl_ui_focus_manager_register(pd->manager, node, obj, obj); +efl_ui_focus_manager_register(pd->manager, node, efl_ui_focus_user_parent_get(obj), obj); } eina_list_free(pd->current_border); @@ -95,68 +94,54 @@ EFL_CALLBACKS_ARRAY_DEFINE(parent_manager, ); static void -_parent_set(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd, Efl_Ui_Focus_Manager *manager) +_self_manager_dirty(void *data EINA_UNUSED, const Efl_Event *ev) { -if (pd->manager) - { - //remove ourself from the manager - efl_ui_focus_manager_unregister(pd->manager, obj); - - - efl_event_callback_array_del(pd->manager, parent_manager(), obj); - _border_unregister(obj, pd); - } - -pd->manager = manager; - -if (pd->manager) - { - //register our own root in the upper manager as logical - efl_ui_focus_manager_register_logical(pd->manager, obj, pd->parent); +MY_DATA(ev->object , pd); - //listen to the manager - efl_event_callback_array_add(pd->manager, parent_manager(), obj); - _border_flush(obj, pd); - } +pd->self_dirty = EINA_TRUE; } static void -_self_parent_change(void *data EINA_UNUSED, const Efl_Event *ev) +_logical_manager_change(void *data EINA_UNUSED, const Efl_Event *ev) { -MY_DATA(ev->object , pd); - -if (pd->manager == ev->info) return; + MY_DATA(ev->object, pd); + Eina_List *n; + Efl_Ui_Focus_User *b; -_parent_set(ev->object, pd, ev->info); + EINA_LIST_FOREACH(pd->current_border , n, b) + { +efl_ui_focus_manager_update_parent(pd->manager , b, ev->info); + } } static void -_self_manager_dirty(void *data EINA_UNUSED, const Efl_Event *ev) +_manager_change(void *data EINA_UNUSED, const Efl_Event *ev) { -MY_DATA(ev->object , pd); + MY_DATA(ev->object, pd); + Eina_List *n; + Efl_Ui_Focus_User *b; + Efl_Ui_Focus_Manager *manager; -pd->self_dirty = EINA_TRUE; + manager = efl_ui_focus_user_manager_get(ev->info); + + //unregister from the old + efl_event_callback_array_del(pd->manager, parent_manager(), ev->object); + efl_event_callback_array_add(manager, parent_manager(), ev->object); + + EINA_LIST_FOREACH(pd->current_border , n, b) + { +efl_ui_focus_manager_unregister(pd->manager, b); +efl_ui_focus_manager_register(manager, b, efl_ui_focus_user_parent_get(ev->object), ev->object); + } + //unregister the old manager, use the new + pd->manager = manager; } EFL_CALLBACKS_ARRAY_DEFINE(self_manager, -{EFL_UI_FOCUS_USER_EVENT_MANAGER_CHANGED, _self_parent_change}, {EFL_UI_FOCUS_MANAGER_EVENT_COORDS_DIRTY, _self_manager_dirty}, +{EFL_UI_FOCUS_USER_EVENT_LOGICAL_CHANGED, _logical_manager_change}, +{EFL_UI_FOCUS_USER_EVENT_MANAGER_CHANGED, _manager_change} ); -EOLIAN static void -_efl_ui_focus_manager_sub_parent_set(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd, Efl_Ui_Focus_Object *node) -{ - if (node == pd->parent) return; - - pd->parent = node; - - efl_ui_focus_manager_update_parent(pd->manager, obj, node); -} - -EOLIAN static Efl_Ui_Focus_Object* -_efl_ui_focus_manager_sub_parent_get(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Sub_Data *pd EINA_UNUSED) -{ - return pd->parent; -} EOLIAN static Efl_Object* _efl_ui_focus_manager_sub_efl_object_constructor(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd EINA_UNUSED) @@ -171,23 +156,10 @@ _efl_ui_focus_manager_sub_efl_object_destructor(Eo *obj, Efl_Ui_Focus_Manager_Su { efl_event_callback_array_del(obj, self_manager(), NULL); - _parent_se
[EGIT] [core/efl] master 66/68: elementary: fix focus tests
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8afa54f1799355717b88dae55c42ee971530918b commit 8afa54f1799355717b88dae55c42ee971530918b Author: Marcel Hollerbach Date: Wed Apr 19 14:10:43 2017 +0200 elementary: fix focus tests --- src/Makefile_Elementary.am | 2 +- src/tests/elementary/focus_test.eo | 4 ++-- src/tests/elementary/focus_test_sub_main.eo | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index c57b830..a3ef0b3 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -1344,7 +1344,7 @@ tests_elementary_elm_suite_SOURCES = \ tests/elementary/elm_test_focus.c \ tests/elementary/elm_test_focus_sub.c -tests/elementary/tests_elementary_elm_suite-elm_test_focus.$(OBJEXT): tests/elementary/focus_test.eo.c tests/elementary/focus_test.eo.h +tests/elementary/tests_elementary_elm_suite-elm_test_focus_common.$(OBJEXT): tests/elementary/focus_test.eo.c tests/elementary/focus_test.eo.h tests/elementary/tests_elementary_elm_suite-elm_test_focus_sub.$(OBJEXT): tests/elementary/focus_test_sub_main.eo.c tests/elementary/focus_test_sub_main.eo.h diff --git a/src/tests/elementary/focus_test.eo b/src/tests/elementary/focus_test.eo index 7417cac..fa3f3e2 100644 --- a/src/tests/elementary/focus_test.eo +++ b/src/tests/elementary/focus_test.eo @@ -9,6 +9,6 @@ class Focus.Test(Efl.Object, Efl.Ui.Focus.Object) { implements { Efl.Object.constructor; Efl.Ui.Focus.Object.geometry_get; -Efl.Ui.Focus.Object.focus.set; +Efl.Ui.Focus.Object.focus { set; } } -} \ No newline at end of file +} diff --git a/src/tests/elementary/focus_test_sub_main.eo b/src/tests/elementary/focus_test_sub_main.eo index 3c417cd..39197ae 100644 --- a/src/tests/elementary/focus_test_sub_main.eo +++ b/src/tests/elementary/focus_test_sub_main.eo @@ -1,7 +1,7 @@ class Focus.Test.Sub.Main(Efl.Object, Efl.Ui.Focus.User, Efl.Ui.Focus.Object, Efl.Ui.Focus.Manager) { implements { -Efl.Ui.Focus.User.manager.get; -Efl.Ui.Focus.User.parent.get; +Efl.Ui.Focus.User.manager { get; } +Efl.Ui.Focus.User.parent { get; } Efl.Ui.Focus.Object.geometry_get; } -} \ No newline at end of file +} --
[EGIT] [core/efl] master 49/68: elm_table: migrate to new focus system
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7c35606d066784a918731ecf846596363ecdfb56 commit 7c35606d066784a918731ecf846596363ecdfb56 Author: Marcel Hollerbach Date: Wed Dec 21 11:05:49 2016 +0100 elm_table: migrate to new focus system --- src/lib/elementary/elm_table.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/lib/elementary/elm_table.c b/src/lib/elementary/elm_table.c index 09801e2..87da322 100644 --- a/src/lib/elementary/elm_table.c +++ b/src/lib/elementary/elm_table.c @@ -14,6 +14,16 @@ #define MY_CLASS_NAME "Elm_Table" #define MY_CLASS_NAME_LEGACY "elm_table" +static void +_focus_order_flush(Eo *obj) +{ + Elm_Widget_Smart_Data *wpd; + Eina_List *order = evas_object_table_children_get(obj); + wpd = efl_data_scope_get(obj, ELM_WIDGET_CLASS); + + efl_ui_focus_manager_update_children(wpd->focus.manager, obj, order, EINA_TRUE); +} + EOLIAN static Eina_Bool _elm_table_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED) { @@ -317,6 +327,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); } EOLIAN static void @@ -347,6 +358,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); } EAPI void @@ -381,6 +393,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); } EOLIAN static Evas_Object* --
[EGIT] [core/efl] master 44/68: elm_hover: migrate to new focus system
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1ecf648dd809953dc398ba21362f10a343589db8 commit 1ecf648dd809953dc398ba21362f10a343589db8 Author: Marcel Hollerbach Date: Tue Dec 20 17:28:36 2016 +0100 elm_hover: migrate to new focus system the hover will set itself as redirect once it is visible. And unset itself once it is hidden. --- src/lib/elementary/elm_hover.c| 23 +++ src/lib/elementary/elm_hover.eo | 2 +- src/lib/elementary/elm_widget_hover.h | 2 ++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c index f39711f..d6d1f52 100644 --- a/src/lib/elementary/elm_hover.c +++ b/src/lib/elementary/elm_hover.c @@ -646,14 +646,20 @@ _elm_hover_efl_gfx_size_set(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED, Evas_Coord } EOLIAN static void -_elm_hover_efl_gfx_visible_set(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED, Eina_Bool vis) +_elm_hover_efl_gfx_visible_set(Eo *obj, Elm_Hover_Data *pd, Eina_Bool vis) { if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_VISIBLE, 0, vis)) return; efl_gfx_visible_set(efl_super(obj, MY_CLASS), vis); - if (vis) _hov_show_do(obj); + if (vis) + { +_hov_show_do(obj); +//we just set ourself as redirect in the next upper manager +pd->redirected = efl_ui_focus_user_manager_get(pd->target); +efl_ui_focus_manager_redirect_set(pd->redirected, obj); + } else { // for backward compatibility @@ -661,6 +667,9 @@ _elm_hover_efl_gfx_visible_set(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED, Eina_Bo if (!eina_streq(dismissstr, "on")) _hide_signals_emit(obj); + +efl_ui_focus_manager_redirect_set(pd->redirected, NULL); +pd->redirected = NULL; } } @@ -679,13 +688,19 @@ elm_hover_add(Evas_Object *parent) } EOLIAN static Eo * -_elm_hover_efl_object_constructor(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED) +_elm_hover_efl_object_constructor(Eo *obj, Elm_Hover_Data *pd) { obj = efl_constructor(efl_super(obj, MY_CLASS)); efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_POPUP_MENU); + pd->manager = efl_add(EFL_UI_FOCUS_MANAGER_CLASS, NULL, +efl_ui_focus_manager_root_set(efl_added, obj) + ); + + efl_composite_attach(obj, pd->manager); + return obj; } @@ -716,8 +731,8 @@ _elm_hover_target_set(Eo *obj, Elm_Hover_Data *sd, Evas_Object *target) elm_widget_hover_object_set(target, obj); elm_layout_sizing_eval(obj); } -} +} EAPI void elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent) diff --git a/src/lib/elementary/elm_hover.eo b/src/lib/elementary/elm_hover.eo index ec9e77e..49c5568 100644 --- a/src/lib/elementary/elm_hover.eo +++ b/src/lib/elementary/elm_hover.eo @@ -7,7 +7,7 @@ enum Elm.Hover.Axis both [[ELM_HOVER_AXIS_BOTH -- both.]] } -class Elm.Hover (Elm.Layout, Efl.Ui.Clickable, Elm.Interface.Atspi_Widget_Action) +class Elm.Hover (Elm.Layout, Efl.Ui.Clickable, Elm.Interface.Atspi_Widget_Action, Efl.Ui.Focus.Manager) { [[Elementary hover class]] legacy_prefix: elm_hover; diff --git a/src/lib/elementary/elm_widget_hover.h b/src/lib/elementary/elm_widget_hover.h index 25fbe25..05b531c 100644 --- a/src/lib/elementary/elm_widget_hover.h +++ b/src/lib/elementary/elm_widget_hover.h @@ -46,6 +46,8 @@ struct _Elm_Hover_Data sizeof(_content_aliases[0]) - 1]; Eina_Bool on_del : 1; + Efl_Ui_Focus_Manager *manager; + Efl_Ui_Focus_Manager *redirected; }; /** --
[EGIT] [core/efl] master 52/68: efl_ui_focus_manager: there is the case that n can be NULL
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=23fd22836da977131b5366d936adb8845567789d commit 23fd22836da977131b5366d936adb8845567789d Author: Marcel Hollerbach Date: Wed Dec 21 12:28:44 2016 +0100 efl_ui_focus_manager: there is the case that n can be NULL --- src/lib/elementary/efl_ui_focus_manager.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 3ec1c7a..7f650f3 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -1178,10 +1178,13 @@ _efl_ui_focus_manager_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, E if (direction == EFL_UI_FOCUS_DIRECTION_NEXT || direction == EFL_UI_FOCUS_DIRECTION_PREV) { - n = T(n).parent; - new_candidate = _request_move(obj, pd, direction, n); - efl_ui_focus_manager_focus(obj, new_candidate); - candidate = new_candidate; + if (n) + { + n = T(n).parent; + new_candidate = _request_move(obj, pd, direction, n); + efl_ui_focus_manager_focus(obj, new_candidate); + candidate = new_candidate; + } } else { --
[EGIT] [core/efl] master 42/68: elm_interface_scrollable: use the submanager to register the children
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=44e40c7c5e4549e78008eb7b74b6ab1b7e1fcf9d commit 44e40c7c5e4549e78008eb7b74b6ab1b7e1fcf9d Author: Marcel Hollerbach Date: Tue Dec 20 17:25:57 2016 +0100 elm_interface_scrollable: use the submanager to register the children this adds the registered elements at the broder of the scrollable to the parents manager. scroller and gengrid works for registering --- src/lib/elementary/elm_interface_scrollable.c | 53 ++ src/lib/elementary/elm_interface_scrollable.eo | 5 ++- src/lib/elementary/elm_interface_scrollable.h | 2 + 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c index 249803f..a5c9854 100644 --- a/src/lib/elementary/elm_interface_scrollable.c +++ b/src/lib/elementary/elm_interface_scrollable.c @@ -4623,6 +4623,7 @@ _elm_interface_scrollable_class_constructor(Efl_Class *klass) evas_smart_legacy_type_register(MY_SCROLLABLE_INTERFACE_NAME_LEGACY, klass); } + /* Legacy ABI compatibility - APIs never worked and were hidden behind * EFL_EO_API_SUPPORT (from elm_interface.h) or inside internal headers. * Removed between 1.18 and 1.19. The symbols are kept purely for ABI @@ -4631,5 +4632,57 @@ _elm_interface_scrollable_class_constructor(Efl_Class *klass) EAPI void elm_pan_gravity_set(Elm_Pan *obj EINA_UNUSED, double x EINA_UNUSED, double y EINA_UNUSED) {} EAPI void elm_pan_gravity_get(const Elm_Pan *obj EINA_UNUSED, double *x EINA_UNUSED, double *y EINA_UNUSED) {} +EOLIAN static Efl_Object* +_elm_interface_scrollable_efl_object_constructor(Eo *obj, Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED) +{ + pd->manager = efl_add(EFL_UI_FOCUS_MANAGER_SUB_CLASS, obj, +efl_ui_focus_manager_root_set(efl_added, obj)); + + efl_composite_attach(obj, pd->manager); + + return efl_constructor(efl_super(obj, MY_SCROLLABLE_INTERFACE)); +} + +static Eina_Bool +_filter_cb(const void *iterator EINA_UNUSED, void *data, void *fdata) +{ + Eina_Rectangle geom; + + evas_object_geometry_get(data, &geom.x, &geom.y, &geom.w, &geom.h); + + return eina_rectangles_intersect(&geom, fdata); +} + +EOLIAN static Eina_Iterator* +_elm_interface_scrollable_efl_ui_focus_manager_border_elements_get(Eo *obj, Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED) +{ + Eina_Iterator *border_elements; + Eina_Rectangle *rect = calloc(1, sizeof(Eina_Rectangle)); + + border_elements = efl_ui_focus_manager_border_elements_get(efl_super(obj, MY_SCROLLABLE_INTERFACE)); + elm_interface_scrollable_content_viewport_geometry_get(obj, &rect->x, &rect->y, &rect->w, &rect->h); + + return eina_iterator_filter_new(border_elements, _filter_cb, free, rect); +} + +EOLIAN static void +_elm_interface_scrollable_efl_ui_focus_manager_focus(Eo *obj, Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *focus) +{ + Eina_Rectangle geom; + Eina_Rectangle obj_geom; + + efl_ui_focus_manager_focus(efl_super(obj, MY_SCROLLABLE_INTERFACE), focus); + + if (!focus) return; + + evas_object_geometry_get(focus, &geom.x, &geom.y, &geom.w, &geom.h); + evas_object_geometry_get(pd->content, &obj_geom.x, &obj_geom.y, &obj_geom.w, &obj_geom.h); + + geom.x = geom.x - obj_geom.x; + geom.y = geom.y - obj_geom.y; + + elm_interface_scrollable_region_bring_in(obj, geom.x, geom.y, geom.w, geom.h); +} + #include "elm_interface_scrollable.eo.c" #include "elm_pan.eo.c" diff --git a/src/lib/elementary/elm_interface_scrollable.eo b/src/lib/elementary/elm_interface_scrollable.eo index 2187c6f..3aff179 100644 --- a/src/lib/elementary/elm_interface_scrollable.eo +++ b/src/lib/elementary/elm_interface_scrollable.eo @@ -42,7 +42,7 @@ enum Elm.Scroller.Movement_Block } -mixin Elm.Interface_Scrollable(Efl.Ui.Scrollable, Efl.Canvas.Group) +mixin Elm.Interface_Scrollable(Efl.Ui.Scrollable, Efl.Canvas.Group, Efl.Ui.Focus.Manager) { [[Elm scrollable mixin]] eo_prefix: elm_interface_scrollable; @@ -679,8 +679,11 @@ mixin Elm.Interface_Scrollable(Efl.Ui.Scrollable, Efl.Canvas.Group) } implements { class.constructor; + Efl.Object.constructor; Efl.Canvas.Group.group_add; Efl.Canvas.Group.group_del; + Efl.Ui.Focus.Manager.border_elements.get; + Efl.Ui.Focus.Manager.focus; } events { changed; [[Called when content changed]] diff --git a/src/lib/elementary/elm_interface_scrollable.h b/src/lib/elementary/elm_interface_scrollable.h index 25245ec..385cd5e 100644 --- a/src/lib/elementary/elm_interface_scrollable.h +++ b/src/lib/elementary/elm_interface_scrollable.h @@ -237,6 +237,8 @@ struct _Elm_Scrollable_Smart_Interface_Data Eina_Bool go_down : 1; Eina_Bool loop_h : 1; Eina_Bool loop_v : 1; + + Efl_Ui_Focus_Manager *manager; }; #define ELM_SCROLLABLE_CHECK(obj, ...)
[EGIT] [core/efl] master 57/68: efl_ui_focus_manager: make setting a order easier
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5c48607460687b39e7014aa2eb3e5aeb41068291 commit 5c48607460687b39e7014aa2eb3e5aeb41068291 Author: Marcel Hollerbach Date: Wed Dec 21 20:23:55 2016 +0100 efl_ui_focus_manager: make setting a order easier --- src/lib/elementary/efl_ui_focus_manager.c | 96 -- src/lib/elementary/efl_ui_focus_manager.eo | 8 ++- src/lib/elementary/elm_box.c | 2 +- src/lib/elementary/elm_grid.c | 2 +- src/lib/elementary/elm_table.c | 2 +- 5 files changed, 74 insertions(+), 36 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 7ce235a..8056d05 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -646,35 +646,80 @@ _equal_set(Eina_List *none_nodes, Eina_List *nodes) return EINA_TRUE; } +EOLIAN static void +_efl_ui_focus_manager_update_order(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *parent, Eina_List *order) +{ + Node *pnode; + Efl_Ui_Focus_Object *o; + Eina_List *node_order = NULL, *not_ordered, *trash, *node_order_clean; + + pnode = node_get(obj, pd, parent); + + if (!pnode) + return; + + //get all nodes from the subset + EINA_LIST_FREE(order, o) + { +Node *tmp; + +tmp = eina_hash_find(pd->node_hash, &o); + +if (!tmp) continue; + +node_order = eina_list_append(node_order, tmp); + } + + not_ordered = _set_a_without_b(T(pnode).children, node_order); + trash = _set_a_without_b(node_order, T(pnode).children); + node_order_clean = _set_a_without_b(node_order, trash); + + eina_list_free(node_order); + eina_list_free(trash); + + T(pnode).children = eina_list_merge(node_order_clean, not_ordered); + + return; +} + EOLIAN static Eina_Bool -_efl_ui_focus_manager_update_children(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *parent, Eina_List *order, Eina_Bool subset) +_efl_ui_focus_manager_update_children(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *parent, Eina_List *order) { Node *pnode; + Efl_Ui_Focus_Object *o; + Eina_Bool fail = EINA_FALSE; + Eina_List *node_order = NULL; pnode = node_get(obj, pd, parent); if (!pnode) return EINA_FALSE; - if (!subset) + //get all nodes from the subset + EINA_LIST_FREE(order, o) { -if (!_equal_set(order, T(pnode).children)) - { - ERR("Set of children is not equal"); - return EINA_FALSE; - } -T(pnode).children = order; +Node *tmp; + +tmp = node_get(obj, pd, o); +if (!tmp) + fail = EINA_TRUE; +node_order = eina_list_append(node_order, tmp); } - else - { -Eina_List *not_ordered; -not_ordered = _set_a_without_b(T(pnode).children, order); + if (fail) + { +eina_list_free(node_order); +return EINA_FALSE; + } -eina_list_free(T(pnode).children); -T(pnode).children = eina_list_merge(order, not_ordered); + if (!_equal_set(node_order, T(pnode).children)) + { +ERR("Set of children is not equal"); +return EINA_FALSE; } + T(pnode).children = node_order; + return EINA_TRUE; } @@ -1068,23 +1113,6 @@ _efl_ui_focus_manager_request_move(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Dat } } -static Efl_Ui_Focus_Object* -_find_normal_node(Node *n) -{ - Eina_List *l; - Node *n2; - if (n->type == NODE_TYPE_NORMAL) return n->focusable; - - EINA_LIST_FOREACH(T(n).children , l, n2) - { -Efl_Ui_Focus_Object *r; - -r = _find_normal_node(n2); -if (r) return r; - } - return NULL; -} - EOLIAN static void _efl_ui_focus_manager_focus(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *focus) { @@ -1096,7 +1124,11 @@ _efl_ui_focus_manager_focus(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus //if we want to focus the root then just spin to the first normal if (focus == pd->root->focusable) { -focus = _find_normal_node(pd->root); +Node *f = _logical_movement(pd, pd->root, EFL_UI_FOCUS_DIRECTION_NEXT); + +if (f) + focus = f->focusable; + if (!focus) return; } diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index dd13e71..4c5f0fb 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -96,10 +96,16 @@ class Efl.Ui.Focus.Manager (Efl.Object) { params { parent : Efl.Ui.Focus.Object @nonull; [[the parent to update]] children : list; [[the list with the new order]] -subset : bool; [[$false to make sure childrenlist is the same size as the real log
[EGIT] [core/efl] master 51/68: efl_ui_focus_manager_sub: do not update if parent is NULL
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a3c44fcf6805f08716668f680c97320d3bc004ac commit a3c44fcf6805f08716668f680c97320d3bc004ac Author: Marcel Hollerbach Date: Wed Dec 21 11:42:41 2016 +0100 efl_ui_focus_manager_sub: do not update if parent is NULL is is actually a dangerous case, and should NEVER happen --- src/lib/elementary/efl_ui_focus_manager_sub.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index a5c2c57..5bd77f7 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -167,6 +167,8 @@ _logical_manager_change(void *data EINA_UNUSED, const Efl_Event *ev) Efl_Ui_Focus_Manager *manager; manager = efl_ui_focus_user_manager_get(ev->object); + if (!ev->info) return; + EINA_LIST_FOREACH(pd->current_border, n, b) { if (b == ev->object) continue; --
[EGIT] [core/efl] master 60/68: update according to cedrics review comments
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=74b432774617d9395e46beb7f7de33b1ba3699c3 commit 74b432774617d9395e46beb7f7de33b1ba3699c3 Author: Marcel Hollerbach Date: Fri Dec 23 13:48:00 2016 +0100 update according to cedrics review comments --- src/lib/elementary/efl_ui_focus_manager.c | 12 +++- src/lib/elementary/efl_ui_focus_manager_sub.c | 4 +--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 8056d05..75a60eb 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -844,7 +844,7 @@ _iterator_next(Border_Elements_Iterator *it, void **data) { Node *node; - while(eina_iterator_next(it->real_iterator, (void**)&node)) + EINA_ITERATOR_FOREACH(it->real_iterator, node) { for(int i = 0 ;i < NODE_DIRECTIONS_COUNT; i++) { @@ -902,15 +902,17 @@ _no_history_element(Eina_Hash *node_hash) iter = eina_hash_iterator_data_new(node_hash); - do + EINA_ITERATOR_FOREACH(iter, upper) { -if (!eina_iterator_next(iter, (void**)&upper)) - return NULL; +if (upper->type == NODE_TYPE_NORMAL) + break; } - while (upper->type != NODE_TYPE_NORMAL); eina_iterator_free(iter); + if (upper->type != NODE_TYPE_NORMAL) + return NULL; + return upper; } diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index 5bd77f7..8527b1f 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -122,8 +122,6 @@ _border_unregister(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) if (node == elem) continue; _unregister(obj, manager, node); } - - pd->current_border = NULL; } static void @@ -137,7 +135,7 @@ _parent_manager_pre_flush(void *data, const Efl_Event *ev EINA_UNUSED) } static void -_redirect_changed_cb(void *data, const Efl_Event *ev) +_redirect_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED) { //if (efl_ui_focus_manager_redirect_get(ev->object) != data) return; --
[EGIT] [core/efl] master 64/68: fix .eo file breaks
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=20a78af94f48ee525439805262156a6808145b6f commit 20a78af94f48ee525439805262156a6808145b6f Author: Marcel Hollerbach Date: Mon Jan 2 11:42:35 2017 +0100 fix .eo file breaks --- src/lib/elementary/efl_ui_focus_manager_sub.eo | 2 +- src/lib/elementary/efl_ui_focus_object.eo | 2 +- src/lib/elementary/elm_interface_scrollable.eo | 2 +- src/lib/elementary/elm_widget.eo | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.eo b/src/lib/elementary/efl_ui_focus_manager_sub.eo index 73af27a..9496d0e 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.eo +++ b/src/lib/elementary/efl_ui_focus_manager_sub.eo @@ -17,6 +17,6 @@ class Efl.Ui.Focus.Manager.Sub (Efl.Ui.Focus.Manager, Efl.Object) implements { Efl.Object.constructor; Efl.Object.destructor; -Efl.Object.parent.set; +Efl.Object.parent { set; } } } \ No newline at end of file diff --git a/src/lib/elementary/efl_ui_focus_object.eo b/src/lib/elementary/efl_ui_focus_object.eo index 106d09c..362ec3e 100644 --- a/src/lib/elementary/efl_ui_focus_object.eo +++ b/src/lib/elementary/efl_ui_focus_object.eo @@ -24,7 +24,7 @@ mixin Efl.Ui.Focus.Object } implements { @empty .geometry_get; -@empty .focus.get; +@empty .focus { get; } } events { focus,changed : bool; [[Emitted if the focus state has changed]] diff --git a/src/lib/elementary/elm_interface_scrollable.eo b/src/lib/elementary/elm_interface_scrollable.eo index ec8a76c..a1ae7d3 100644 --- a/src/lib/elementary/elm_interface_scrollable.eo +++ b/src/lib/elementary/elm_interface_scrollable.eo @@ -682,7 +682,7 @@ mixin Elm.Interface_Scrollable(Efl.Ui.Scrollable, Efl.Canvas.Group, Efl.Ui.Focus Efl.Object.constructor; Efl.Canvas.Group.group_add; Efl.Canvas.Group.group_del; - Efl.Ui.Focus.Manager.border_elements.get; + Efl.Ui.Focus.Manager.border_elements { get; } } events { changed; [[Called when content changed]] diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo index 639d2fe..894627f 100644 --- a/src/lib/elementary/elm_widget.eo +++ b/src/lib/elementary/elm_widget.eo @@ -858,10 +858,10 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, Elm.Inter Elm.Interface.Atspi_Accessible.parent { get; } Elm.Interface.Atspi_Accessible.attributes { get; } Elm.Interface.Atspi_Component.focus_grab; - Efl.Ui.Focus.User.manager.get; - Efl.Ui.Focus.User.parent.get; + Efl.Ui.Focus.User.manager { get; } + Efl.Ui.Focus.User.parent { get; } Efl.Ui.Focus.Object.geometry_get; - Efl.Ui.Focus.Object.focus.set; + Efl.Ui.Focus.Object.focus { set; } } events { moved; [[Called when widget moved]] --
[EGIT] [core/efl] master 67/68: elm_interface_scrollable: add focus override
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4450ff374f352819f1d49464d9f3b05634466a8b commit 4450ff374f352819f1d49464d9f3b05634466a8b Author: Marcel Hollerbach Date: Wed Apr 19 14:11:02 2017 +0200 elm_interface_scrollable: add focus override it seems this override got lost somewhere --- src/lib/elementary/elm_interface_scrollable.eo | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/elm_interface_scrollable.eo b/src/lib/elementary/elm_interface_scrollable.eo index a1ae7d3..58c8dba 100644 --- a/src/lib/elementary/elm_interface_scrollable.eo +++ b/src/lib/elementary/elm_interface_scrollable.eo @@ -683,6 +683,7 @@ mixin Elm.Interface_Scrollable(Efl.Ui.Scrollable, Efl.Canvas.Group, Efl.Ui.Focus Efl.Canvas.Group.group_add; Efl.Canvas.Group.group_del; Efl.Ui.Focus.Manager.border_elements { get; } + Efl.Ui.Focus.Manager.focus; } events { changed; [[Called when content changed]] --
[EGIT] [core/efl] master 33/68: efl_ui_focus_manager: better error messages
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a4616bb6fe45237e0312320725754aa252fc29e8 commit a4616bb6fe45237e0312320725754aa252fc29e8 Author: Marcel Hollerbach Date: Mon Dec 19 19:21:04 2016 +0100 efl_ui_focus_manager: better error messages --- src/lib/elementary/efl_ui_focus_manager.c | 43 +++ 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 49974a1..b3ca8af 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -136,7 +136,7 @@ node_new(Efl_Ui_Focus_Object *focusable, Efl_Ui_Focus_Manager *manager) } static Node* -node_get(Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *focusable) +node_get(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *focusable) { Node *ret; @@ -144,7 +144,7 @@ node_get(Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *focusable) if (ret) return ret; - ERR("Focusable %p not registered in manager", focusable); + ERR("Focusable %p (%s) not registered in manager %p", focusable, efl_class_name_get(focusable), obj); return NULL; } @@ -383,16 +383,16 @@ _debug_node(Node *node) #endif static void -convert_border_set(Efl_Ui_Focus_Manager_Data *pd, Node *node, Eina_List *focusable_list, Efl_Ui_Focus_Direction dir) +convert_border_set(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager_Data *pd, Node *node, Eina_List *focusable_list, Efl_Ui_Focus_Direction dir) { Eina_List *partners = NULL; - Efl_Ui_Focus_Object *obj; + Efl_Ui_Focus_Object *fobj; - EINA_LIST_FREE(focusable_list, obj) + EINA_LIST_FREE(focusable_list, fobj) { Node *entry; -entry = node_get(pd, obj); +entry = node_get(obj, pd, fobj); if (!entry) { CRI("Found a obj in graph without node-entry!"); @@ -413,10 +413,10 @@ dirty_flush_node(Efl_Ui_Focus_Manager *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Dat _calculate_node(pd, node->focusable, DIMENSION_X, &x_partners_pos, &x_partners_neg); _calculate_node(pd, node->focusable, DIMENSION_Y, &y_partners_pos, &y_partners_neg); - convert_border_set(pd, node, x_partners_pos, EFL_UI_FOCUS_DIRECTION_RIGHT); - convert_border_set(pd, node, x_partners_neg, EFL_UI_FOCUS_DIRECTION_LEFT); - convert_border_set(pd, node, y_partners_neg, EFL_UI_FOCUS_DIRECTION_UP); - convert_border_set(pd, node, y_partners_pos, EFL_UI_FOCUS_DIRECTION_DOWN); + convert_border_set(obj, pd, node, x_partners_pos, EFL_UI_FOCUS_DIRECTION_RIGHT); + convert_border_set(obj, pd, node, x_partners_neg, EFL_UI_FOCUS_DIRECTION_LEFT); + convert_border_set(obj, pd, node, y_partners_neg, EFL_UI_FOCUS_DIRECTION_UP); + convert_border_set(obj, pd, node, y_partners_pos, EFL_UI_FOCUS_DIRECTION_DOWN); #ifdef CALC_DEBUG _debug_node(node); @@ -471,7 +471,7 @@ _node_new_geometery_cb(void *data, const Efl_Event *event) Node *node; FOCUS_DATA(data) - node = node_get(pd, event->object); + node = node_get(data, pd, event->object); dirty_add(data, pd, node); @@ -516,7 +516,7 @@ _efl_ui_focus_manager_register_logical(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, E EINA_SAFETY_ON_NULL_RETURN_VAL(child, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(parent, EINA_FALSE); - pnode = node_get(pd, parent); + pnode = node_get(obj, pd, parent); if (!pnode) return EINA_FALSE; node = _register(obj, pd, child, pnode); @@ -538,7 +538,7 @@ _efl_ui_focus_manager_register(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Fo EINA_SAFETY_ON_NULL_RETURN_VAL(child, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(parent, EINA_FALSE); - pnode = node_get(pd, parent); + pnode = node_get(obj, pd, parent); if (!pnode) return EINA_FALSE; node = _register(obj, pd, child, pnode); @@ -557,10 +557,9 @@ _efl_ui_focus_manager_register(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Fo } EOLIAN static Eina_Bool -_efl_ui_focus_manager_update_redirect(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *child, Efl_Ui_Focus_Manager *redirect) +_efl_ui_focus_manager_update_redirect(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus_Object *child, Efl_Ui_Focus_Manager *redirect) { - Node *node = node_get(pd, child); - + Node *node = node_get(obj, pd, child); if (!node) return EINA_FALSE; node->redirect_manager = redirect; @@ -577,8 +576,8 @@ _efl_ui_focus_manager_update_parent(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Da EINA_SAFETY_ON_NULL_RETURN_VAL(parent_obj, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(child, EINA_FALSE); - node = node_get(pd, child); - parent = node_get(pd, parent_obj); + node = node_get(obj, pd, child); + parent = node_get(obj, pd, parent_obj); if (!node || !parent) return EINA_FALSE; @@ -623,7 +622,7 @@ _efl_ui
[EGIT] [core/efl] master 63/68: focus_tests: fix the test suite
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=800390bcb0bc8af19632ed75011556f9f050bf00 commit 800390bcb0bc8af19632ed75011556f9f050bf00 Author: Marcel Hollerbach Date: Fri Dec 23 20:11:12 2016 +0100 focus_tests: fix the test suite this brings back the working testsuite and fixes a bug in the submanager. --- src/Makefile_Elementary.am| 2 +- src/lib/elementary/efl_ui_focus_manager_sub.c | 32 +++--- src/tests/elementary/elm_test_focus.c | 9 ++--- src/tests/elementary/elm_test_focus_sub.c | 47 ++- src/tests/elementary/focus_test_sub.eo| 6 src/tests/elementary/focus_test_sub_main.eo | 7 6 files changed, 65 insertions(+), 38 deletions(-) diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 3b7413b..c57b830 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -1346,7 +1346,7 @@ tests_elementary_elm_suite_SOURCES = \ tests/elementary/tests_elementary_elm_suite-elm_test_focus.$(OBJEXT): tests/elementary/focus_test.eo.c tests/elementary/focus_test.eo.h -tests/elementary/tests_elementary_elm_suite-elm_test_focus_sub.$(OBJEXT): tests/elementary/focus_test_sub.eo.c tests/elementary/focus_test_sub.eo.h +tests/elementary/tests_elementary_elm_suite-elm_test_focus_sub.$(OBJEXT): tests/elementary/focus_test_sub_main.eo.c tests/elementary/focus_test_sub_main.eo.h tests_elementary_elm_suite_CPPFLAGS = \ -DTESTS_BUILD_DIR=\"${top_builddir}/src/tests/elementary\" \ diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index a1c0b21..6fee181 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -175,33 +175,41 @@ _logical_manager_change(void *data EINA_UNUSED, const Efl_Event *ev) } static void -_manager_change(void *data, const Efl_Event *ev) +_flush_manager(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd) { - MY_DATA(data, pd); - Efl_Ui_Focus_Manager *manager; - Efl_Ui_Focus_Object *logical; + Efl_Ui_Focus_Object *logical, *real_object; Efl_Ui_Focus_User *b; Eina_List *n; - logical = efl_ui_focus_user_parent_get(ev->object); - manager = efl_ui_focus_user_manager_get(ev->object); + real_object = efl_parent_get(obj); + + logical = efl_ui_focus_user_parent_get(real_object); + manager = efl_ui_focus_user_manager_get(real_object); //unregister from the old - efl_event_callback_array_del(pd->manager, parent_manager(), data); - efl_event_callback_array_add(manager, parent_manager(), data); + efl_event_callback_array_del(pd->manager, parent_manager(), obj); + efl_event_callback_array_add(manager, parent_manager(), obj); EINA_LIST_FOREACH(pd->current_border , n, b) { -if (b == ev->object) continue; +if (b == real_object) continue; -_unregister(data, manager, b); -_register(data, manager, b, logical); +_unregister(obj, manager, b); +_register(obj, manager, b, logical); } //unregister the old manager, use the new pd->manager = manager; } +static void +_manager_change(void *data, const Efl_Event *ev EINA_UNUSED) +{ + MY_DATA(data, pd); + + _flush_manager(data, pd); +} + EFL_CALLBACKS_ARRAY_DEFINE(self_manager, {EFL_UI_FOCUS_MANAGER_EVENT_COORDS_DIRTY, _self_manager_dirty}, {EFL_UI_FOCUS_USER_EVENT_LOGICAL_CHANGED, _logical_manager_change}, @@ -223,6 +231,8 @@ _efl_ui_focus_manager_sub_efl_object_parent_set(Eo *obj, Efl_Ui_Focus_Manager_Su new_parent = efl_parent_get(obj); _efl_ui_focus_manager_redirect_events_add(obj, new_parent); efl_event_callback_array_add(new_parent, self_manager(), obj); + + _flush_manager(obj, pd); } EOLIAN static Efl_Object* diff --git a/src/tests/elementary/elm_test_focus.c b/src/tests/elementary/elm_test_focus.c index 250e3b1..3908b40 100644 --- a/src/tests/elementary/elm_test_focus.c +++ b/src/tests/elementary/elm_test_focus.c @@ -93,6 +93,7 @@ START_TEST(redirect) elm_init(1, NULL); TEST_OBJ_NEW(root, 0, 0, 20, 20); + TEST_OBJ_NEW(root2, 0, 0, 20, 20); TEST_OBJ_NEW(one, 0, 0, 20, 20); TEST_OBJ_NEW(two, 20, 0, 20, 20); @@ -101,10 +102,11 @@ START_TEST(redirect) ); Efl_Ui_Focus_Manager *m2 = efl_add(EFL_UI_FOCUS_MANAGER_CLASS, NULL, -efl_ui_focus_manager_root_set(efl_added, one) +efl_ui_focus_manager_root_set(efl_added, root2) ); - efl_ui_focus_manager_register(m2, two, one, NULL); + efl_ui_focus_manager_register(m2, one, root2, NULL); + efl_ui_focus_manager_register(m2, two, root2, NULL); efl_ui_focus_manager_redirect_set(m, m2); efl_ui_focus_manager_focus(m2, one); @@ -205,7 +207,7 @@ START_TEST(logical_chain) Efl_Object *logical_chain[] = { child1, subchild11, subchild12, subchild13, -child2, subchild21, subchild22, subchild23, root, N
[EGIT] [core/efl] master 47/68: elm_scroller: migrate to new focus system
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=073c72acce552245eb1131331985484ee2bfd489 commit 073c72acce552245eb1131331985484ee2bfd489 Author: Marcel Hollerbach Date: Tue Dec 20 17:34:08 2016 +0100 elm_scroller: migrate to new focus system the scrollable interface is doing most of the work, if we know that something is already focused we just leave the action_move. --- src/lib/elementary/elm_scroller.c | 150 + src/lib/elementary/elm_scroller.eo | 1 + 2 files changed, 70 insertions(+), 81 deletions(-) diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c index 5f3a95c..c085031 100644 --- a/src/lib/elementary/elm_scroller.c +++ b/src/lib/elementary/elm_scroller.c @@ -80,6 +80,27 @@ _elm_scroller_proxy_set(Evas_Object *obj, Elm_Scroller_Data *sd, Evas_Object *pr evas_object_image_source_set(proxy, content); evas_object_show(proxy); } +//describe position of rect2 relative to rect1 +// 1 = top outside +// 2 = left outside +// 4 = bottom outside +// 8 = right outside +static char +_intersect_direction(Eina_Rectangle *rect1, Eina_Rectangle *rect2) +{ + char ret = 0; + + if (rect1->y > rect2->y) + ret |= 1; + if (rect1->x > rect2->x) + ret |= 2; + if (rect1->y + rect1->h < rect2->y + rect2->h) + ret |= 4; + if (rect1->x + rect1->w < rect2->x + rect2->w) + ret |= 8; + + return ret; +} static Eina_Bool _key_action_move(Evas_Object *obj, const char *params) @@ -88,8 +109,6 @@ _key_action_move(Evas_Object *obj, const char *params) const char *dir = params; Evas_Coord x = 0; Evas_Coord y = 0; - Evas_Coord c_x = 0; - Evas_Coord c_y = 0; Evas_Coord v_x = 0; Evas_Coord v_y = 0; Evas_Coord v_w = 0; @@ -98,16 +117,9 @@ _key_action_move(Evas_Object *obj, const char *params) Evas_Coord max_y = 0; Evas_Coord page_x = 0; Evas_Coord page_y = 0; + Evas_Coord step_x = 0; Evas_Coord step_y = 0; - Evas_Object *current_focus = NULL; - Eina_List *can_focus_list = NULL; - Evas_Object *new_focus = NULL; - Elm_Object_Item *new_focus_item = NULL; - Evas_Coord f_x = 0; - Evas_Coord f_y = 0; - Evas_Coord f_w = 0; - Evas_Coord f_h = 0; Evas_Coord pagesize_h = 0, pagesize_v = 0; Evas_Coord pagenumber_h = 0, pagenumber_v = 0; @@ -116,81 +128,45 @@ _key_action_move(Evas_Object *obj, const char *params) elm_interface_scrollable_page_size_get(obj, &page_x, &page_y); elm_interface_scrollable_content_viewport_geometry_get (obj, &v_x, &v_y, &v_w, &v_h); - evas_object_geometry_get(sd->content, &c_x, &c_y, &max_x, &max_y); + evas_object_geometry_get(sd->content, NULL, NULL, &max_x, &max_y); - _elm_widget_focus_auto_show(obj); + { + Efl_Ui_Focus_Object *focused; + Eina_Rectangle focused_geom, viewport; - current_focus = elm_widget_focused_object_get(obj); - evas_object_geometry_get(current_focus, &f_x, &f_y, &f_w, &f_h); - can_focus_list = elm_widget_can_focus_child_list_get(obj); + focused = efl_ui_focus_manager_focused(obj); - if ((current_focus == obj) || - ((!ELM_RECTS_INTERSECT - (x, y, v_w, v_h, (f_x - c_x), (f_y - c_y), f_w, f_h)) && -((!strcmp(dir, "left") && (f_x > v_x)) || -(!strcmp(dir, "right") && (f_x + f_w < v_x + v_w)) || -(!strcmp(dir, "up") && (f_y > v_y)) || -(!strcmp(dir, "down") && (f_y + f_h < v_y + v_h) - { -Eina_List *l; -Evas_Object *cur; -double weight = 0.0; - -EINA_LIST_FOREACH(can_focus_list, l, cur) - { - double cur_weight = 0.0; - - evas_object_geometry_get(cur, &f_x, &f_y, &f_w, &f_h); - if (ELM_RECTS_INTERSECT - (x, y, v_w, v_h, (f_x - c_x), (f_y - c_y), f_w, f_h)) - { - if ((f_x - c_x) > x) -cur_weight += ((f_x - c_x) - x) * ((f_x - c_x) - x); - if ((f_y - c_y) > y) -cur_weight += ((f_y - c_y) - y) * ((f_y - c_y) - y); - if (EINA_DBL_EQ(cur_weight, 0.0)) -{ - elm_widget_focus_steal(cur, NULL); - eina_list_free(can_focus_list); - return EINA_TRUE; -} - cur_weight = 1.0 / cur_weight; - if (cur_weight > weight) -{ - new_focus = cur; - weight = cur_weight; -} - } - } -if (new_focus) - { - elm_widget_focus_steal(new_focus, NULL); - eina_list_free(can_focus_list); - return EINA_TRUE; - } - } - else - { -Eina_Bool r = EINA_FALSE; - -if (!strcmp(dir, "left")) - r = elm_widget_focus_next_get(obj, ELM_FOCUS_LEFT, &new_focus, &new_foc
[EGIT] [core/efl] master 48/68: elm_interface_scrollable: fix bringing in of items
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7994fa3f684508c5ed07ca571ddec8353b13f471 commit 7994fa3f684508c5ed07ca571ddec8353b13f471 Author: Marcel Hollerbach Date: Tue Dec 20 18:21:58 2016 +0100 elm_interface_scrollable: fix bringing in of items --- src/lib/elementary/efl_ui_focus_manager.c | 1 + src/lib/elementary/efl_ui_focus_manager.eo | 1 + src/lib/elementary/elm_interface_scrollable.c | 28 ++ src/lib/elementary/elm_interface_scrollable.eo | 1 - 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 87afd28..3ec1c7a 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -1132,6 +1132,7 @@ _efl_ui_focus_manager_focus(Eo *obj, Efl_Ui_Focus_Manager_Data *pd, Efl_Ui_Focus //populate the new change if (old_focus) efl_ui_focus_object_focus_set(old_focus->focusable, EINA_FALSE); efl_ui_focus_object_focus_set(node->focusable, EINA_TRUE); +efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_FOCUSED, node->focusable); } else if (node->redirect_manager) { diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index 9f85659..dd13e71 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -176,5 +176,6 @@ class Efl.Ui.Focus.Manager (Efl.Object) { redirect,changed : Efl.Ui.Focus.Manager; [[Emitted when the redirect object has changed, the old manager is passed as event info]] pre,flush; [[Emitted once the graph calculationg will be performed]] coords,dirty; [[Emitted once the graph is dirty, this means there are potential changes in border_elements you want to know about]] +focused : Efl.Ui.Focus.Object; [[Emitted if the manager has focused a object]] } } \ No newline at end of file diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c index a5c9854..e92d7df 100644 --- a/src/lib/elementary/elm_interface_scrollable.c +++ b/src/lib/elementary/elm_interface_scrollable.c @@ -4632,6 +4632,28 @@ _elm_interface_scrollable_class_constructor(Efl_Class *klass) EAPI void elm_pan_gravity_set(Elm_Pan *obj EINA_UNUSED, double x EINA_UNUSED, double y EINA_UNUSED) {} EAPI void elm_pan_gravity_get(const Elm_Pan *obj EINA_UNUSED, double *x EINA_UNUSED, double *y EINA_UNUSED) {} +static void +_focused_element(void *data, const Efl_Event *event) +{ + Eina_Rectangle geom; + Eina_Rectangle obj_geom; + Efl_Ui_Focus_Object *obj = data; + Efl_Ui_Focus_Object *focus = event->info; + Elm_Scrollable_Smart_Interface_Data *pd; + + pd = efl_data_scope_get(obj, MY_SCROLLABLE_INTERFACE); + + if (!focus) return; + + evas_object_geometry_get(focus, &geom.x, &geom.y, &geom.w, &geom.h); + evas_object_geometry_get(pd->content, &obj_geom.x, &obj_geom.y, &obj_geom.w, &obj_geom.h); + + geom.x = geom.x - obj_geom.x; + geom.y = geom.y - obj_geom.y; + + elm_interface_scrollable_region_bring_in(obj, geom.x, geom.y, geom.w, geom.h); +} + EOLIAN static Efl_Object* _elm_interface_scrollable_efl_object_constructor(Eo *obj, Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED) { @@ -4640,6 +4662,12 @@ _elm_interface_scrollable_efl_object_constructor(Eo *obj, Elm_Scrollable_Smart_I efl_composite_attach(obj, pd->manager); + efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, obj); + efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH , obj); + efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_COORDS_DIRTY , obj); + efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_FOCUSED, obj); + efl_event_callback_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_FOCUSED, _focused_element, obj); + return efl_constructor(efl_super(obj, MY_SCROLLABLE_INTERFACE)); } diff --git a/src/lib/elementary/elm_interface_scrollable.eo b/src/lib/elementary/elm_interface_scrollable.eo index 3aff179..ec8a76c 100644 --- a/src/lib/elementary/elm_interface_scrollable.eo +++ b/src/lib/elementary/elm_interface_scrollable.eo @@ -683,7 +683,6 @@ mixin Elm.Interface_Scrollable(Efl.Ui.Scrollable, Efl.Canvas.Group, Efl.Ui.Focus Efl.Canvas.Group.group_add; Efl.Canvas.Group.group_del; Efl.Ui.Focus.Manager.border_elements.get; - Efl.Ui.Focus.Manager.focus; } events { changed; [[Called when content changed]] --
[EGIT] [core/efl] master 68/68: efl_ui_focus_manager: select the widget with the smallest distance
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=295940c0bc08eb00f33bb67f74e7b4d47e0d8bd3 commit 295940c0bc08eb00f33bb67f74e7b4d47e0d8bd3 Author: Marcel Hollerbach Date: Thu Apr 20 10:15:53 2017 +0200 efl_ui_focus_manager: select the widget with the smallest distance this improves the correctness-feeling when moving focus through a elementary application. --- src/lib/elementary/efl_ui_focus_manager.c | 39 +++ 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 41a5bee..abed31a 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -916,6 +916,16 @@ _no_history_element(Eina_Hash *node_hash) return upper; } +static void +_get_middle(Evas_Object *obj, Eina_Vector2 *elem) +{ + Eina_Rectangle geom; + + evas_object_geometry_get(obj, &geom.x, &geom.y, &geom.w, &geom.h); + elem->x = geom.x + geom.w/2; + elem->y = geom.y + geom.h/2; +} + static Node* _coords_movement(Efl_Ui_Focus_Manager_Data *pd, Node *upper, Efl_Ui_Focus_Direction direction) { @@ -932,9 +942,30 @@ _coords_movement(Efl_Ui_Focus_Manager_Data *pd, Node *upper, Efl_Ui_Focus_Direct } } - //if we havent found anything in the history, just use the first partner ... we have to start somewhere - //FIXME maybe decide coordinate wise? - return eina_list_data_get(G(upper).directions[direction].partners); + //if we havent found anything in the history, use the widget with the smallest distance + { + Eina_List *lst = G(upper).directions[direction].partners; + Eina_List *n; + Node *node, *min = NULL; + Eina_Vector2 elem, other; + float min_distance = 0.0; + + + _get_middle(upper->focusable, &elem); + + EINA_LIST_FOREACH(lst, n, node) +{ + _get_middle(node->focusable, &other); + float tmp = eina_vector2_distance_get(&other, &elem); + if (!min || tmp < min_distance) + { +min = node; +min_distance = tmp; + } +} + candidate = min; + } + return candidate; } @@ -1380,4 +1411,4 @@ _efl_ui_focus_manager_logical_end(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Data return child ? child->focusable : NULL; } -#include "efl_ui_focus_manager.eo.c" \ No newline at end of file +#include "efl_ui_focus_manager.eo.c" --
[EGIT] [core/efl] master 61/68: elementary: introduce helper functions for the redirects
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fb6c37f16f56efd9a73ace329bc09b6f07089f00 commit fb6c37f16f56efd9a73ace329bc09b6f07089f00 Author: Marcel Hollerbach Date: Fri Dec 23 13:48:46 2016 +0100 elementary: introduce helper functions for the redirects --- src/lib/elementary/efl_ui_focus_manager_sub.c | 6 ++ src/lib/elementary/efl_ui_focus_manager_sub.eo | 2 +- src/lib/elementary/efl_ui_win.c| 3 +-- src/lib/elementary/elm_interface_scrollable.c | 4 src/lib/elementary/elm_main.c | 18 ++ src/lib/elementary/elm_menu.c | 1 + src/lib/elementary/elm_priv.h | 3 +++ 7 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index 8527b1f..a1c0b21 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -215,15 +215,13 @@ _efl_ui_focus_manager_sub_efl_object_parent_set(Eo *obj, Efl_Ui_Focus_Manager_Su old_parent = efl_parent_get(obj); - efl_event_callback_forwarder_del(obj, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, old_parent); - efl_event_callback_forwarder_del(obj, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, old_parent); + _efl_ui_focus_manager_redirect_events_del(obj, old_parent); efl_event_callback_array_del(old_parent, self_manager(), obj); efl_parent_set(efl_super(obj, MY_CLASS), parent); new_parent = efl_parent_get(obj); - efl_event_callback_forwarder_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, new_parent); - efl_event_callback_forwarder_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, new_parent); + _efl_ui_focus_manager_redirect_events_add(obj, new_parent); efl_event_callback_array_add(new_parent, self_manager(), obj); } diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.eo b/src/lib/elementary/efl_ui_focus_manager_sub.eo index 6fb78ef..73af27a 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.eo +++ b/src/lib/elementary/efl_ui_focus_manager_sub.eo @@ -10,7 +10,7 @@ class Efl.Ui.Focus.Manager.Sub (Efl.Ui.Focus.Manager, Efl.Object) This class is only working as composite object to a Efl.Ui.Focus.User and Efl.Ui.Focus.Object. - The object itself does redirect the managers settings to the object where this object is attached + The object itself does redirect the managers events to the object where this object is attached ]] methods { } diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 8dfe158..eff2fd2 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -5249,8 +5249,7 @@ _efl_ui_win_efl_object_constructor(Eo *obj, Efl_Ui_Win_Data *pd) efl_composite_attach(obj, pd->manager); - efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, obj); - efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, obj); + _efl_ui_focus_manager_redirect_events_add(pd->manager, obj); return obj; } diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c index e92d7df..4c1e4a7 100644 --- a/src/lib/elementary/elm_interface_scrollable.c +++ b/src/lib/elementary/elm_interface_scrollable.c @@ -4662,10 +4662,6 @@ _elm_interface_scrollable_efl_object_constructor(Eo *obj, Elm_Scrollable_Smart_I efl_composite_attach(obj, pd->manager); - efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, obj); - efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH , obj); - efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_COORDS_DIRTY , obj); - efl_event_callback_forwarder_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_FOCUSED, obj); efl_event_callback_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_FOCUSED, _focused_element, obj); return efl_constructor(efl_super(obj, MY_SCROLLABLE_INTERFACE)); diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c index ef22141..bb1938a 100644 --- a/src/lib/elementary/elm_main.c +++ b/src/lib/elementary/elm_main.c @@ -31,6 +31,24 @@ static Elm_Version _version = { VMAJ, VMIN, VMIC, VREV }; EAPI Elm_Version *elm_version = &_version; +void +_efl_ui_focus_manager_redirect_events_del(Efl_Ui_Focus_Manager *manager, Eo *obj) +{ + efl_event_callback_forwarder_del(manager, EFL_UI_FOCUS_MANAGER_EVENT_PRE_FLUSH, obj); + efl_event_callback_forwarder_del(manager, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED, obj); + efl_event_callback_forwarder_del(manager, EFL_UI_FOCUS_MANAGER_EVENT_FOCUSED , obj); + efl_event_callback_forwarder_del(manager, EFL_UI_FOCUS_MANAGER_EVENT_COORDS_DIRTY, obj); +} + +void +_efl_ui_focus_manager_redirect_events_add(Efl_Ui_Focus
[EGIT] [core/efl] master 62/68: efl_ui_focus_manager: the order contains nodes not focusables
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3dfc546a2fd7a8bff13a58da012607c7253f9c26 commit 3dfc546a2fd7a8bff13a58da012607c7253f9c26 Author: Marcel Hollerbach Date: Fri Dec 23 13:49:12 2016 +0100 efl_ui_focus_manager: the order contains nodes not focusables --- src/lib/elementary/efl_ui_focus_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index 75a60eb..41a5bee 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -639,7 +639,7 @@ _equal_set(Eina_List *none_nodes, Eina_List *nodes) EINA_LIST_FOREACH(nodes, n, node) { -if (!eina_list_data_find(none_nodes, node->focusable)) +if (!eina_list_data_find(none_nodes, node)) return EINA_FALSE; } --
[E-devel] edje_cc on windows
Hello! Edje_cc fails to compile .edc file with scripts on windows. I try to compile with edje_cc file button.edc, which include group and programs scripts, on Linux and the result was OK(button.edj). But when I try to compile the same file on windows in cmd, it failed with error: "edje_cc: Critical. Compiling script code not clean" I create a task on Phabricator with example files and steps that I used - https://phab.enlightenment.org/T5410 Does anyone know how to solve this problem? With best regards, Tetiana Naumenko -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 01/01: eo: move Efl_Event definition back to C
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=da982535f603688021fdef6caf4681e523791261 commit da982535f603688021fdef6caf4681e523791261 Author: Daniel Kolesa Date: Thu Apr 20 16:14:18 2017 +0200 eo: move Efl_Event definition back to C It's not used anywhere in eo files and has a void pointer. --- src/lib/eo/Eo.h | 12 src/lib/eo/efl_object.eo | 8 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 11b36ca..178308a 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -216,11 +216,23 @@ typedef void (*Efl_Del_Intercept) (Eo *obj_id); */ typedef Eo Efl_Future; +/** + * @typedef Efl_Event + * A parameter passed in event callbacks holding extra event parameters. + */ +typedef struct _Efl_Event Efl_Event; + #include "efl_object_override.eo.h" #include "efl_object.eo.h" #include "efl_interface.eo.h" #define EO_CLASS EFL_OBJECT_CLASS +struct _Efl_Event { + Efl_Object *object; /**< The object the event was called on. */ + const Efl_Event_Description *desc; /**< The event description. */ + void *info; /**< Extra event information passed by the event caller. */ +}; + /** * @addtogroup Eo_Debug_Information Eo's Debug information helper. * @{ diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo index 9994db6..1d47eba 100644 --- a/src/lib/eo/efl_object.eo +++ b/src/lib/eo/efl_object.eo @@ -8,16 +8,8 @@ struct Efl.Event.Description { restart: bool; [[$true if when the event is triggered again from a callback, it should start from where it was]] } -struct Efl.Event { - [[Parameter passed in event callbacks holding extra event parameters]] - object: Efl.Object; [[The object the event was called on.]] - desc: ptr(const(Efl.Event.Description)); [[The event description.]] - info: void_ptr; [[Extra event information passed by the event caller.]] -} - type Efl.Event_Cb: __builtin_event_cb; [[An event callback prototype.]] - struct Efl.Callback_Array_Item { [[An item in an array of callback desc/func. --
[E-devel] EDI : unknown type name 'siginfo_t'
Dear Developers, i tried to compile EDI from git and get the following error : In file included from /usr/local/include/ecore-1/Ecore.h:333:0, from /usr/local/include/elementary-1/Elementary.h:61, from edi_config.c:9: /usr/local/include/ecore-1/Ecore_Common.h: At top level: /usr/local/include/ecore-1/Ecore_Common.h:591:4: error: unknown type name 'siginfo_t' siginfo_t data; /**< Signal info */ ^ if i add siginfo.h to Ecore_Common.h the error goes. But, not the right fix i think. Regards palla -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Does 'efl-js binding' is progressing?
Hi, I'm interesting about javascript binding. So, I tried to build efl with '--with-js' option. But I couldn't success it. I wonder it is my local issue or efl's issue. First, --with-js=nodejs is failed from autoconf. The 'nodejs-dev' package drop nodejs/src/node.h but autoconf's header usability check is failed. (because node.h refer to v8) So, eina_js_node.hh hang to #error block. (every defines are disabled). Second, --with-js=libv8 is also failed from eo_promise. In file included from ../src/bindings/cxx/eo_cxx/Eo.hh:9:0, from bin/efl_js/launcher_main.cc:13: ../src/bindings/cxx/eo_cxx/eo_promise.hh:11:27: fatal error: Ecore_Manual.hh: No such file or directory compilation terminated. I'm finding whether my environment problem or not. Has anyone ever succeeded it in a recent? (I'm trying on Ubuntu 16.04). Jiwon Kim. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] edje_cc on windows
Hi! Sometime ago, I had a similar problem with Edje_cc when I was trying to compile EFL without winbuilds (using dependencies in form of mingw64 libraries installed using MSYS2 pacman). Using winbuilds to compile the EFL - all worked well. I was trying 1.18.4 and one of 1.19 betas. Bests, Michal Butterweck > Dnia 20 kwietnia 2017 o 14:51 Tanya Naumenko > napisał(a): > > > Hello! > > Edje_cc fails to compile .edc file with scripts on windows. > I try to compile with edje_cc file button.edc, which include group and > programs scripts, on Linux and the result was OK(button.edj). > But when I try to compile the same file on windows in cmd, it failed > with error: > "edje_cc: Critical. Compiling script code not clean" > > I create a task on Phabricator with example files and steps that I used > - https://phab.enlightenment.org/T5410 > > Does anyone know how to solve this problem? > > With best regards, > Tetiana Naumenko > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 01/01: eo: move unbindable event APIs to C
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b780cf2af299ce17be260486bb7ab64badddbaec commit b780cf2af299ce17be260486bb7ab64badddbaec Author: Daniel Kolesa Date: Thu Apr 20 18:24:38 2017 +0200 eo: move unbindable event APIs to C In a few classes, this requires some manual expansion. This should not break anything but it's also fairly ugly; a better solution would be appreciated, for now we do this. Similar changes will be done to a few other Efl.Object APIs as well at later point. --- src/lib/elementary/elc_fileselector.c | 3 + src/lib/elementary/elm_fileselector.eo | 1 - src/lib/eo/Eo.h | 86 + src/lib/eo/efl_object.eo| 78 -- src/lib/eo/eo_base_class.c | 37 + src/lib/evas/canvas/efl_canvas_object.eo| 2 - src/lib/evas/canvas/evas_canvas3d_object.c | 4 ++ src/lib/evas/canvas/evas_canvas3d_object.eo | 2 - src/lib/evas/canvas/evas_object_main.c | 4 ++ 9 files changed, 134 insertions(+), 83 deletions(-) diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c index bcafeb5..74e84a3 100644 --- a/src/lib/elementary/elc_fileselector.c +++ b/src/lib/elementary/elc_fileselector.c @@ -3188,4 +3188,7 @@ _elm_fileselector_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA return &atspi_actions[0]; } +#define ELM_FILESELECTOR_EXTRA_OPS \ + EFL_OBJECT_OP_FUNC(efl_event_callback_legacy_call, _elm_fileselector_efl_object_event_callback_legacy_call) + #include "elm_fileselector.eo.c" diff --git a/src/lib/elementary/elm_fileselector.eo b/src/lib/elementary/elm_fileselector.eo index 426c85d..befb014 100644 --- a/src/lib/elementary/elm_fileselector.eo +++ b/src/lib/elementary/elm_fileselector.eo @@ -35,7 +35,6 @@ class Elm.Fileselector (Elm.Layout, Elm.Interface.Fileselector, class.constructor; class.destructor; Efl.Object.constructor; - Efl.Object.event_callback_legacy_call; Efl.Canvas.Group.group_add; Efl.Canvas.Group.group_del; Elm.Widget.focus_next; diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 178308a..fe67aa0 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -234,6 +234,92 @@ struct _Efl_Event { }; /** + * @brief Add a callback for an event with a specific priority. + * + * callbacks of the same priority are called in reverse order of creation. + * + * A callback is only executed on events emitted after this call finished. + * + * @param[in] desc The description of the event to listen to + * @param[in] priority The priority of the callback + * @param[in] cb the callback to call + * @param[in] data additional data to pass to the callback + * + * @return Return @c true when the callback has been successfully added. + */ +EOAPI Eina_Bool efl_event_callback_priority_add(Eo *obj, const Efl_Event_Description *desc, Efl_Callback_Priority priority, Efl_Event_Cb cb, const void *data); + +/** + * @brief Delete a callback with a specific data associated to it for an event. + * + * The callback will never be emitted again after this call, even if a event + * emission is going on. + * + * @param[in] desc The description of the event to listen to + * @param[in] func The callback to delete + * @param[in] user_data The data to compare + * + * @return Return @c true when the callback has been successfully removed. + */ +EOAPI Eina_Bool efl_event_callback_del(Eo *obj, const Efl_Event_Description *desc, Efl_Event_Cb func, const void *user_data); + +/** + * @brief Add an array of callbacks created by @ref EFL_CALLBACKS_ARRAY_DEFINE + * for an event with a specific priority. The array need to be sorted with @ref + * efl_callbacks_cmp if you are not using the @ref EFL_CALLBACKS_ARRAY_DEFINE + * macro. + * + * callbacks of the same priority are called in reverse order of creation. + * + * A callback from the array is only executed on events emitted after this + * call finished. + * + * @param[in] array An #Efl_Callback_Array_Item of events to listen to + * @param[in] priority The priority of the callback + * @param[in] data Additional data to pass to the callback + * + * @return Return @c true when the callback has been successfully added. + */ +EOAPI Eina_Bool efl_event_callback_array_priority_add(Eo *obj, const Efl_Callback_Array_Item *array, Efl_Callback_Priority priority, const void *data); + +/** + * @brief Del a callback array with a specific data associated to it for an + * event. The callbacks from the array will never be emitted again after this + * call, even if a event emission is going on. + * + * @param[in] array An #Efl_Callback_Array_Item of events to listen to + * @param[in] user_data The data to compare + * + * @return Return @c true when the callback has been successfully removed. + */ +EOAPI Eina_Bool efl_event_callback_array_del(Eo *obj, const Efl_
[EGIT] [core/efl] master 01/01: ecore_wl2: Don't crash when drag and drop is unsupported by compositor
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f45b63edbd6be572438a6ce2ecdcf630cf440720 commit f45b63edbd6be572438a6ce2ecdcf630cf440720 Author: Derek Foreman Date: Thu Apr 20 14:40:29 2017 -0500 ecore_wl2: Don't crash when drag and drop is unsupported by compositor Check for presence of data device manager so we don't crash if it's not there. --- src/lib/ecore_wl2/ecore_wl2_dnd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c index e6c108c..ea94ad2 100644 --- a/src/lib/ecore_wl2/ecore_wl2_dnd.c +++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c @@ -377,6 +377,7 @@ ecore_wl2_dnd_drag_types_set(Ecore_Wl2_Input *input, const char **types) EINA_SAFETY_ON_NULL_RETURN(input->display); manager = input->display->wl.data_device_manager; + if (!manager) return EINA_FALSE; if (input->data.types.data) { @@ -485,6 +486,7 @@ ecore_wl2_dnd_selection_set(Ecore_Wl2_Input *input, const char **types) EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, EINA_FALSE); manager = input->display->wl.data_device_manager; + if (!manager) return EINA_FALSE; if (input->data.types.data) { --
Re: [E-devel] edje_cc on windows
On Thu, 20 Apr 2017 15:51:01 +0300 Tanya Naumenko said: > Hello! > > Edje_cc fails to compile .edc file with scripts on windows. > I try to compile with edje_cc file button.edc, which include group and > programs scripts, on Linux and the result was OK(button.edj). > But when I try to compile the same file on windows in cmd, it failed > with error: > "edje_cc: Critical. Compiling script code not clean" > > I create a task on Phabricator with example files and steps that I used > - https://phab.enlightenment.org/T5410 > > Does anyone know how to solve this problem? > > With best regards, > Tetiana Naumenko this would mean embryo_cc which is executed by edje_cc to compile things is erroring out (returning an error code rather than success). why - don't know. but that's the core source of the issue. -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [EGIT] [core/efl] master 01/01: eo: move unbindable event APIs to C
Hi Daniel (q66), On 21 April 2017 at 01:26, Daniel Kolesa wrote: > q66 pushed a commit to branch master. > > http://git.enlightenment.org/core/efl.git/commit/?id= > b780cf2af299ce17be260486bb7ab64badddbaec > > commit b780cf2af299ce17be260486bb7ab64badddbaec > Author: Daniel Kolesa > Date: Thu Apr 20 18:24:38 2017 +0200 > > eo: move unbindable event APIs to C > > In a few classes, this requires some manual expansion. This should > not break anything but it's also fairly ugly; a better solution > would be appreciated, for now we do this. > > Similar changes will be done to a few other Efl.Object APIs as > well at later point. > Is this kind of trick a solution for internal only APIs? As you know I've marked a few APIs as beta and/or protected when really I wanted them to be just internal functions (that can be overriden, so not just C functions). If so, the alternative was to have either an @internal tag which generates apis in another header, or have separated eolian files that expand existing classes, etc... Quite ugly as well :) TIA, > --- > src/lib/elementary/elc_fileselector.c | 3 + > src/lib/elementary/elm_fileselector.eo | 1 - > src/lib/eo/Eo.h | 86 > + > src/lib/eo/efl_object.eo| 78 > -- > src/lib/eo/eo_base_class.c | 37 + > src/lib/evas/canvas/efl_canvas_object.eo| 2 - > src/lib/evas/canvas/evas_canvas3d_object.c | 4 ++ > src/lib/evas/canvas/evas_canvas3d_object.eo | 2 - > src/lib/evas/canvas/evas_object_main.c | 4 ++ > 9 files changed, 134 insertions(+), 83 deletions(-) > > diff --git a/src/lib/elementary/elc_fileselector.c > b/src/lib/elementary/elc_fileselector.c > index bcafeb5..74e84a3 100644 > --- a/src/lib/elementary/elc_fileselector.c > +++ b/src/lib/elementary/elc_fileselector.c > @@ -3188,4 +3188,7 @@ > _elm_fileselector_elm_interface_atspi_widget_action_elm_actions_get(Eo > *obj EINA > return &atspi_actions[0]; > } > > +#define ELM_FILESELECTOR_EXTRA_OPS \ > + EFL_OBJECT_OP_FUNC(efl_event_callback_legacy_call, > _elm_fileselector_efl_object_event_callback_legacy_call) > + > #include "elm_fileselector.eo.c" > diff --git a/src/lib/elementary/elm_fileselector.eo > b/src/lib/elementary/elm_fileselector.eo > index 426c85d..befb014 100644 > --- a/src/lib/elementary/elm_fileselector.eo > +++ b/src/lib/elementary/elm_fileselector.eo > @@ -35,7 +35,6 @@ class Elm.Fileselector (Elm.Layout, > Elm.Interface.Fileselector, >class.constructor; >class.destructor; >Efl.Object.constructor; > - Efl.Object.event_callback_legacy_call; >Efl.Canvas.Group.group_add; >Efl.Canvas.Group.group_del; >Elm.Widget.focus_next; > diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h > index 178308a..fe67aa0 100644 > --- a/src/lib/eo/Eo.h > +++ b/src/lib/eo/Eo.h > @@ -234,6 +234,92 @@ struct _Efl_Event { > }; > > /** > + * @brief Add a callback for an event with a specific priority. > + * > + * callbacks of the same priority are called in reverse order of creation. > + * > + * A callback is only executed on events emitted after this call finished. > + * > + * @param[in] desc The description of the event to listen to > + * @param[in] priority The priority of the callback > + * @param[in] cb the callback to call > + * @param[in] data additional data to pass to the callback > + * > + * @return Return @c true when the callback has been successfully added. > + */ > +EOAPI Eina_Bool efl_event_callback_priority_add(Eo *obj, const > Efl_Event_Description *desc, Efl_Callback_Priority priority, Efl_Event_Cb > cb, const void *data); > + > +/** > + * @brief Delete a callback with a specific data associated to it for an > event. > + * > + * The callback will never be emitted again after this call, even if a > event > + * emission is going on. > + * > + * @param[in] desc The description of the event to listen to > + * @param[in] func The callback to delete > + * @param[in] user_data The data to compare > + * > + * @return Return @c true when the callback has been successfully removed. > + */ > +EOAPI Eina_Bool efl_event_callback_del(Eo *obj, const > Efl_Event_Description *desc, Efl_Event_Cb func, const void *user_data); > + > +/** > + * @brief Add an array of callbacks created by @ref > EFL_CALLBACKS_ARRAY_DEFINE > + * for an event with a specific priority. The array need to be sorted > with @ref > + * efl_callbacks_cmp if you are not using the @ref > EFL_CALLBACKS_ARRAY_DEFINE > + * macro. > + * > + * callbacks of the same priority are called in reverse order of creation. > + * > + * A callback from the array is only executed on events emitted after > this > + * call finished. > + * > + * @param[in] array An #Efl_Callback_Array_Item of events to listen to > + * @param[in] priority The priority of the callback > + * @param[in] data Additional data to pass to the callback > + * > + *
Re: [E-devel] [EGIT] [core/efl] master 01/01: eo: move unbindable event APIs to C
Em qui, 20 de abr de 2017 às 22:14, Jean-Philippe André escreveu: > Hi Daniel (q66), > > On 21 April 2017 at 01:26, Daniel Kolesa wrote: > > > q66 pushed a commit to branch master. > > > > http://git.enlightenment.org/core/efl.git/commit/?id= > > b780cf2af299ce17be260486bb7ab64badddbaec > > > > commit b780cf2af299ce17be260486bb7ab64badddbaec > > Author: Daniel Kolesa > > Date: Thu Apr 20 18:24:38 2017 +0200 > > > > eo: move unbindable event APIs to C > > > > In a few classes, this requires some manual expansion. This should > > not break anything but it's also fairly ugly; a better solution > > would be appreciated, for now we do this. > > > > Similar changes will be done to a few other Efl.Object APIs as > > well at later point. > > > > Is this kind of trick a solution for internal only APIs? > As you know I've marked a few APIs as beta and/or protected when really I > wanted them to be just internal functions (that can be overriden, so not > just C functions). > > If so, the alternative was to have either an @internal tag which generates > apis in another header, or have separated eolian files that expand existing > classes, etc... Quite ugly as well :) His goal is to remove voidptr from Eo. These APIs that needs them will have manual bindings, like event callbacks, data get, etc. Makes total sense to me. > > TIA, > > > > --- > > src/lib/elementary/elc_fileselector.c | 3 + > > src/lib/elementary/elm_fileselector.eo | 1 - > > src/lib/eo/Eo.h | 86 > > + > > src/lib/eo/efl_object.eo| 78 > > -- > > src/lib/eo/eo_base_class.c | 37 + > > src/lib/evas/canvas/efl_canvas_object.eo| 2 - > > src/lib/evas/canvas/evas_canvas3d_object.c | 4 ++ > > src/lib/evas/canvas/evas_canvas3d_object.eo | 2 - > > src/lib/evas/canvas/evas_object_main.c | 4 ++ > > 9 files changed, 134 insertions(+), 83 deletions(-) > > > > diff --git a/src/lib/elementary/elc_fileselector.c > > b/src/lib/elementary/elc_fileselector.c > > index bcafeb5..74e84a3 100644 > > --- a/src/lib/elementary/elc_fileselector.c > > +++ b/src/lib/elementary/elc_fileselector.c > > @@ -3188,4 +3188,7 @@ > _elm_fileselector_elm_interface_atspi_widget_action_elm_actions_get(Eo > > *obj EINA > > return &atspi_actions[0]; > > } > > > > +#define ELM_FILESELECTOR_EXTRA_OPS \ > > + EFL_OBJECT_OP_FUNC(efl_event_callback_legacy_call, > > _elm_fileselector_efl_object_event_callback_legacy_call) > > + > > #include "elm_fileselector.eo.c" > > diff --git a/src/lib/elementary/elm_fileselector.eo > > b/src/lib/elementary/elm_fileselector.eo > > index 426c85d..befb014 100644 > > --- a/src/lib/elementary/elm_fileselector.eo > > +++ b/src/lib/elementary/elm_fileselector.eo > > @@ -35,7 +35,6 @@ class Elm.Fileselector (Elm.Layout, > > Elm.Interface.Fileselector, > >class.constructor; > >class.destructor; > >Efl.Object.constructor; > > - Efl.Object.event_callback_legacy_call; > >Efl.Canvas.Group.group_add; > >Efl.Canvas.Group.group_del; > >Elm.Widget.focus_next; > > diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h > > index 178308a..fe67aa0 100644 > > --- a/src/lib/eo/Eo.h > > +++ b/src/lib/eo/Eo.h > > @@ -234,6 +234,92 @@ struct _Efl_Event { > > }; > > > > /** > > + * @brief Add a callback for an event with a specific priority. > > + * > > + * callbacks of the same priority are called in reverse order of > creation. > > + * > > + * A callback is only executed on events emitted after this call > finished. > > + * > > + * @param[in] desc The description of the event to listen to > > + * @param[in] priority The priority of the callback > > + * @param[in] cb the callback to call > > + * @param[in] data additional data to pass to the callback > > + * > > + * @return Return @c true when the callback has been successfully added. > > + */ > > +EOAPI Eina_Bool efl_event_callback_priority_add(Eo *obj, const > > Efl_Event_Description *desc, Efl_Callback_Priority priority, Efl_Event_Cb > > cb, const void *data); > > + > > +/** > > + * @brief Delete a callback with a specific data associated to it for an > > event. > > + * > > + * The callback will never be emitted again after this call, even if a > > event > > + * emission is going on. > > + * > > + * @param[in] desc The description of the event to listen to > > + * @param[in] func The callback to delete > > + * @param[in] user_data The data to compare > > + * > > + * @return Return @c true when the callback has been successfully > removed. > > + */ > > +EOAPI Eina_Bool efl_event_callback_del(Eo *obj, const > > Efl_Event_Description *desc, Efl_Event_Cb func, const void *user_data); > > + > > +/** > > + * @brief Add an array of callbacks created by @ref > > EFL_CALLBACKS_ARRAY_DEFINE > > + * for an event with a specific priority. The array need to be sorted > > with @ref > > + * efl_callbac
[EGIT] [core/efl] master 02/02: ecore wl2: Fix compilation
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a33815eeef98481c7133b41a2c4c008ebd7013c7 commit a33815eeef98481c7133b41a2c4c008ebd7013c7 Author: Jean-Philippe Andre Date: Fri Apr 21 10:08:52 2017 +0900 ecore wl2: Fix compilation --- src/lib/ecore_wl2/ecore_wl2_dnd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c index ea94ad2..ab9533f 100644 --- a/src/lib/ecore_wl2/ecore_wl2_dnd.c +++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c @@ -377,7 +377,7 @@ ecore_wl2_dnd_drag_types_set(Ecore_Wl2_Input *input, const char **types) EINA_SAFETY_ON_NULL_RETURN(input->display); manager = input->display->wl.data_device_manager; - if (!manager) return EINA_FALSE; + if (!manager) return; if (input->data.types.data) { --
[EGIT] [core/efl] master 01/02: elm_image: Improve test case from previous patch
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9eb211845cf4be36c892722d2a008552c426d38f commit 9eb211845cf4be36c892722d2a008552c426d38f Author: Jean-Philippe Andre Date: Thu Apr 20 18:59:02 2017 +0900 elm_image: Improve test case from previous patch This refers to 331bf9f74683aad72415e007af14c3d4713f112b See also, for 1.19: 4eda12b5e1d6e968fb0b057f11c280a87916e93f --- src/bin/elementary/test_image.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/bin/elementary/test_image.c b/src/bin/elementary/test_image.c index 5da9f6c..67f90dd 100644 --- a/src/bin/elementary/test_image.c +++ b/src/bin/elementary/test_image.c @@ -412,6 +412,10 @@ _switch_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_ { Evas_Object *win = data; Evas_Object *im = evas_object_data_get(win, "im"); + Evas_Object *chk1 = evas_object_data_get(win, "chk1"); + Evas_Object *chk2 = evas_object_data_get(win, "chk2"); + Eina_Bool async = elm_check_state_get(chk1); + Eina_Bool preload = elm_check_state_get(chk2); char buf[PATH_MAX] = {0}; Eina_Bool logo = EINA_FALSE; const char *file = NULL; @@ -427,6 +431,9 @@ _switch_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_ { snprintf(buf, sizeof(buf) - 1, "%s/images/logo.png", elm_app_data_dir_get()); } + + elm_image_async_open_set(im, async); + elm_image_preload_disabled_set(im, preload); elm_image_file_set(im, buf, NULL); } --
Re: [E-devel] [EGIT] [core/efl] master 01/01: eo: move unbindable event APIs to C
On 21 April 2017 at 11:12, Gustavo Sverzut Barbieri wrote: > Em qui, 20 de abr de 2017 às 22:14, Jean-Philippe André > > escreveu: > > > Hi Daniel (q66), > > > > On 21 April 2017 at 01:26, Daniel Kolesa wrote: > > > > > q66 pushed a commit to branch master. > > > > > > http://git.enlightenment.org/core/efl.git/commit/?id= > > > b780cf2af299ce17be260486bb7ab64badddbaec > > > > > > commit b780cf2af299ce17be260486bb7ab64badddbaec > > > Author: Daniel Kolesa > > > Date: Thu Apr 20 18:24:38 2017 +0200 > > > > > > eo: move unbindable event APIs to C > > > > > > In a few classes, this requires some manual expansion. This should > > > not break anything but it's also fairly ugly; a better solution > > > would be appreciated, for now we do this. > > > > > > Similar changes will be done to a few other Efl.Object APIs as > > > well at later point. > > > > > > > Is this kind of trick a solution for internal only APIs? > > As you know I've marked a few APIs as beta and/or protected when really I > > wanted them to be just internal functions (that can be overriden, so not > > just C functions). > > > > If so, the alternative was to have either an @internal tag which > generates > > apis in another header, or have separated eolian files that expand > existing > > classes, etc... Quite ugly as well :) > > > His goal is to remove voidptr from Eo. These APIs that needs them will have > manual bindings, like event callbacks, data get, etc. > > Makes total sense to me. > Absolutely. Just wondering if the technique can be used for my needs :) I think it would work just fine as I want no bindings and no visibility in public headers. > > > > > TIA, > > > > > > > --- > > > src/lib/elementary/elc_fileselector.c | 3 + > > > src/lib/elementary/elm_fileselector.eo | 1 - > > > src/lib/eo/Eo.h | 86 > > > + > > > src/lib/eo/efl_object.eo| 78 > > > -- > > > src/lib/eo/eo_base_class.c | 37 + > > > src/lib/evas/canvas/efl_canvas_object.eo| 2 - > > > src/lib/evas/canvas/evas_canvas3d_object.c | 4 ++ > > > src/lib/evas/canvas/evas_canvas3d_object.eo | 2 - > > > src/lib/evas/canvas/evas_object_main.c | 4 ++ > > > 9 files changed, 134 insertions(+), 83 deletions(-) > > > > > > diff --git a/src/lib/elementary/elc_fileselector.c > > > b/src/lib/elementary/elc_fileselector.c > > > index bcafeb5..74e84a3 100644 > > > --- a/src/lib/elementary/elc_fileselector.c > > > +++ b/src/lib/elementary/elc_fileselector.c > > > @@ -3188,4 +3188,7 @@ > > _elm_fileselector_elm_interface_atspi_widget_action_elm_actions_get(Eo > > > *obj EINA > > > return &atspi_actions[0]; > > > } > > > > > > +#define ELM_FILESELECTOR_EXTRA_OPS \ > > > + EFL_OBJECT_OP_FUNC(efl_event_callback_legacy_call, > > > _elm_fileselector_efl_object_event_callback_legacy_call) > > > + > > > #include "elm_fileselector.eo.c" > > > diff --git a/src/lib/elementary/elm_fileselector.eo > > > b/src/lib/elementary/elm_fileselector.eo > > > index 426c85d..befb014 100644 > > > --- a/src/lib/elementary/elm_fileselector.eo > > > +++ b/src/lib/elementary/elm_fileselector.eo > > > @@ -35,7 +35,6 @@ class Elm.Fileselector (Elm.Layout, > > > Elm.Interface.Fileselector, > > >class.constructor; > > >class.destructor; > > >Efl.Object.constructor; > > > - Efl.Object.event_callback_legacy_call; > > >Efl.Canvas.Group.group_add; > > >Efl.Canvas.Group.group_del; > > >Elm.Widget.focus_next; > > > diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h > > > index 178308a..fe67aa0 100644 > > > --- a/src/lib/eo/Eo.h > > > +++ b/src/lib/eo/Eo.h > > > @@ -234,6 +234,92 @@ struct _Efl_Event { > > > }; > > > > > > /** > > > + * @brief Add a callback for an event with a specific priority. > > > + * > > > + * callbacks of the same priority are called in reverse order of > > creation. > > > + * > > > + * A callback is only executed on events emitted after this call > > finished. > > > + * > > > + * @param[in] desc The description of the event to listen to > > > + * @param[in] priority The priority of the callback > > > + * @param[in] cb the callback to call > > > + * @param[in] data additional data to pass to the callback > > > + * > > > + * @return Return @c true when the callback has been successfully > added. > > > + */ > > > +EOAPI Eina_Bool efl_event_callback_priority_add(Eo *obj, const > > > Efl_Event_Description *desc, Efl_Callback_Priority priority, > Efl_Event_Cb > > > cb, const void *data); > > > + > > > +/** > > > + * @brief Delete a callback with a specific data associated to it for > an > > > event. > > > + * > > > + * The callback will never be emitted again after this call, even if a > > > event > > > + * emission is going on. > > > + * > > > + * @param[in] desc The description of the event to listen to > > > + * @param[in] func The callback to delete > > > +
Re: [E-devel] edje_cc on windows
On Fri, Apr 21, 2017 at 1:40 AM, Carsten Haitzler wrote: > On Thu, 20 Apr 2017 15:51:01 +0300 Tanya Naumenko > said: > >> Hello! >> >> Edje_cc fails to compile .edc file with scripts on windows. >> I try to compile with edje_cc file button.edc, which include group and >> programs scripts, on Linux and the result was OK(button.edj). >> But when I try to compile the same file on windows in cmd, it failed >> with error: >> "edje_cc: Critical. Compiling script code not clean" >> >> I create a task on Phabricator with example files and steps that I used >> - https://phab.enlightenment.org/T5410 >> >> Does anyone know how to solve this problem? >> >> With best regards, >> Tetiana Naumenko > > this would mean embryo_cc which is executed by edje_cc to compile things is > erroring out (returning an error code rather than success). why - don't know. > but that's the core source of the issue. as i have said in the ticket, no problem here with mSYS2 + win-builds Vincent -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Does 'efl-js binding' is progressing?
On Thu, Apr 20, 2017 at 11:51 AM, Jiwon Kim wrote: > Hi, > > Hi > I'm interesting about javascript binding. > So, I tried to build efl with '--with-js' option. > But I couldn't success it. > > I wonder it is my local issue or efl's issue. > > First, --with-js=nodejs is failed from autoconf. > The 'nodejs-dev' package drop nodejs/src/node.h but autoconf's header > usability check is failed. > (because node.h refer to v8) > So, eina_js_node.hh hang to #error block. (every defines are disabled). > > It's been some time since I last used the default packages due to their age (Node 4.2). Currently I'm using node 5.12 from Node Source repositories below. The nodejs package alone from this repository contains the headers. https://github.com/nodesource/distributions#deb > Second, --with-js=libv8 is also failed from eo_promise. > > In file included from ../src/bindings/cxx/eo_cxx/Eo.hh:9:0, > from bin/efl_js/launcher_main.cc:13: > ../src/bindings/cxx/eo_cxx/eo_promise.hh:11:27: fatal error: > Ecore_Manual.hh: No such file or directory > compilation terminated. > > The same dating issue applies for libv8, as the shipped version is too old (3.14). But as I haven't tried to build this variant in a long time, I'm not sure it builds with newer v8 versions. I'm kinda busy now with other tasks but created an ticked on phab to check its status. https://phab.enlightenment.org/T5415 > > I'm finding whether my environment problem or not. > Has anyone ever succeeded it in a recent? > (I'm trying on Ubuntu 16.04). > > I just built the 1.19 tag in a clean environment with the node version mentioned above and everything worked fine. Could you try to update the packages and build again? If anything else appears just let me know. > Jiwon Kim. > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel Best, -- Lauro Moura Expertise Solutions "lauromoura" on FreeNode -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 02/02: focus: Review EO file and adjust doc a bit
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=966df3130aa84b837e8cd3ab3fc954eb0927cf74 commit 966df3130aa84b837e8cd3ab3fc954eb0927cf74 Author: Jean-Philippe Andre Date: Fri Apr 21 14:24:45 2017 +0900 focus: Review EO file and adjust doc a bit I was reading it to understand this new focus system. So I also made some cosmetic changes here and there in the file: wrap, fix a few typos, add missing docs. I'm not pretending that the doc is perfect now. This really was just a personal review. --- src/lib/elementary/efl_ui_focus_manager.eo | 151 +++-- src/lib/elementary/efl_ui_focus_manager_sub.eo | 25 ++-- src/lib/elementary/efl_ui_focus_object.eo | 20 ++-- src/lib/elementary/efl_ui_focus_user.eo| 29 ++--- 4 files changed, 137 insertions(+), 88 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index 4c5f0fb..1fb4f65 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -1,15 +1,23 @@ enum Efl.Ui.Focus.Direction { -[[Those values are desribing a direction from the position of view from one item]] -right = 0, [[Coorinate-wise the next element on the right hand side ]] -left = 1, [[Coorinate-wise the next element on the left hand side ]] -down = 2, [[Coorinate-wise the next element on the down hand side ]] -up = 3, [[Coorinate-wise the next element on the up hand side ]] +[[Those values are describing a direction from the position of view from + one item. + + @since 1.20 +]] +right = 0, [[Coordinate-wise the next element on the right-hand side]] +left = 1, [[Coordinate-wise the next element on the left-hand side]] +down = 2, [[Coordinate-wise the next element downward]] +up = 3, [[Coorinate-wise the next element upwards]] next = 4, [[Logically-wise the next item in the logical tree]] prev = 5, [[Logically-wise the prev item in the logical tree]] -last = 6 +last = 6 [[Last value for this enum, do not use]] } -struct Efl.Ui.Focus.Relations{ +struct Efl.Ui.Focus.Relations { +[[Structure holding the graph of relations between focussable objects. + + @since 1.20 +]] right : list; left : list; top : list; @@ -24,11 +32,15 @@ struct Efl.Ui.Focus.Relations{ class Efl.Ui.Focus.Manager (Efl.Object) { [[Calculates the directions of Efl.Ui.Focus.Direction - Each registered item will get a other registered object into each direction, you can get those items for the currently focused item if you call request move + Each registered item will get a other registered object into each + direction, you can get those items for the currently focused item if + you call request move. + + @since 1.20 ]] methods { move { -[[Move the focus into the given direction +[[Move the focus into the given direction. This call flushes all changes. This means all changes between the last flush and now are computed @@ -39,7 +51,9 @@ class Efl.Ui.Focus.Manager (Efl.Object) { return : Efl.Ui.Focus.Object; [[The element which is now focused]] } request_move { -[[Returns the object which would be the next object to focus in the given direction]] +[[Returns the object which would be the next object to focus in the + given direction. +]] params { direction : Efl.Ui.Focus.Direction; } @@ -48,102 +62,117 @@ class Efl.Ui.Focus.Manager (Efl.Object) { register { [[Register a new item in the graph. - The parent has to be none null, it will be used as the parent in the logical tree. - The redirect argument will be set as redirect property on that manager, once child gets focused. + $parent can not be $null, it will be used as the parent in the + logical tree. + $redirect will be set as redirect property on that manager, once + $child gets focused. ]] params { child : Efl.Ui.Focus.Object @nonull; [[The object to register]] -parent : Efl.Ui.Focus.Object @nonull; [[The parent to use in the logical tree]] -redirect : Efl.Ui.Focus.Manager; [[The redirect manager to set once this child is focused can be NULL for no redirect]] +parent : Efl.Ui.Focus.Object @nonull; [[The parent to use in +the logical tree]] +redirect : Efl.Ui.Focus.Manager; [[The redirect manager to set +once this child is focused can be NULL for no redirect]] } -return : bool; [[$true if it was successfull $false if not]] +
[EGIT] [core/efl] master 01/02: focus: Fix shadow variable warning
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=57a960d26bc743755c7dd0182fdab11a155014dc commit 57a960d26bc743755c7dd0182fdab11a155014dc Author: Jean-Philippe Andre Date: Fri Apr 21 14:52:30 2017 +0900 focus: Fix shadow variable warning --- src/lib/elementary/efl_ui_focus_manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager.c b/src/lib/elementary/efl_ui_focus_manager.c index abed31a..fb431a7 100644 --- a/src/lib/elementary/efl_ui_focus_manager.c +++ b/src/lib/elementary/efl_ui_focus_manager.c @@ -930,10 +930,10 @@ static Node* _coords_movement(Efl_Ui_Focus_Manager_Data *pd, Node *upper, Efl_Ui_Focus_Direction direction) { Node *candidate; - Eina_List *node; + Eina_List *node_list; //we are searcing which of the partners is lower to the history - EINA_LIST_REVERSE_FOREACH(pd->focus_stack, node, candidate) + EINA_LIST_REVERSE_FOREACH(pd->focus_stack, node_list, candidate) { if (eina_list_data_find(G(upper).directions[direction].partners, candidate)) { --
[EGIT] [bindings/python/python-efl] annotated tag v1.19.0 created (now b91b480)
This is an automated email from the git hooks/post-receive script. davemds pushed a change to annotated tag v1.19.0 in repository bindings/python/python-efl. at b91b480 (tag) tagging 8c7ad9f31ff41e88edd188aa2422385ee2977be7 (commit) replaces v1.18.0 tagged by Dave Andreoli on Fri Apr 21 08:49:51 2017 +0200 - Log - tagging 1.19 release Dave Andreoli (40): 1.19 development starts now small doc fix Remove ecore warning about subprocess incompatibility Eo: Eo_Event -> Efl_Event Makefile: go with py3 by default Silence some false compiler warnings Fix usage of EINA_LOG_* functions Edje_External: fix a wrong var name warnings-- warnings -- Test Externals: keep in sync with the C test Test External: more readable indentation Evas: Do not call xxx_callback_del if obj is NULL Tests: use correct FDO icon names some cc don't like the way cython use EINA_LOG macros Fix for cython 0.25 Fix Gengrid.item_insert_after to do the right thing Respect pep8 Silence lots of Eo errors Rename class names accordly to Eo recent changes New 1.19 API: elm.Panel.scrollable_content_size_get New 1.19 API: elm.Win.stack_* New 1.19 API: elm.Panel "toggled" signal New 1.19 API: elm.Progressbar.is_pulsing New 1.19 API: ELM_CALENDAR_REVERSE_DAILY whops, forgot compat wrappers for added enums Split 2 elm.Image tests in 2 files New 1.19 API: elm.Image.async_open + 4 new callbacks Make the new image test py2 compat New 1.19 API: elm.Naviframe "item,activated" cb New 1.19 API: elm.GengridItem.custom_size New 1.19 API: elm.ELM_INPUT_PANEL_LAYOUT_VOICE New 1.19 API: elm.Calendar.date_{min,max} Revert "New 1.19 API: elm.Win.stack_*" another win stack piece EcoreConUrl is no more an Eo object :( New 1.19 API: evas.Image.load_head_skip Fix file_download test Fix evas.Box test Prepare the 1.19 release Kai Huuhko (8): Follow Eo -> Efl renames Tests: Disable edje edit test that segfaults Elm.Genlist: Document new "indent" item style Elm.Spinner: Add two missing signals and fix documentation issues Emotion: Change default module_name to gstreamer1 Emotion: Document module names and mark module options as deprecated elm: Fix font_properties_get elm: Don't allow FontProperties to be freed manually --- No new revisions were added by this update. --
Re: [E-devel] Voting on EDD 2017 dates
Venue is confirmed for 30 people. When you guys make your bookings can you kindly email me off list so I can start a list. If we end up with more then 30 people i will need to inform the venue to ensure they have enough passwords for the wifi for those that will be attending. Also if you have questions regard hotels do let me know and I can help you find a hotel. Looking forward to meeting you guys and hosting the development weekend in Sunny and hot Malta. --- Regards, Jonathan Aquilina On 2017-04-11 22:50, Jonathan Aquilina wrote: > Dates are confirmed as available will get back to everyone shortly once > everything is confirmed > > Sent from my iPhone > > On 11 Apr 2017, at 21:43, Stefan Schmidt wrote: > > HEllo. > > On 04/10/2017 01:19 AM, Stefan Schmidt wrote: > Hello. > > On 04/06/2017 09:07 AM, Stefan Schmidt wrote: > Hello. > > On 03/31/2017 03:43 PM, Stefan Schmidt wrote: > Hello. > > Getting a suitable venue at the locations voted highest in the EDD 2017 > location voting took a longer time than we expected. We have found one > now in lovely Malta. > > To bring things further I put out another vote on the dates. Please try > to vote soon so we can getting things sorted out with the venue. > > https://phab.enlightenment.org/V28 > We have 10 votes so far which is not bad. If you want to attend but have > not voted yet you have until Sunday to do so. On Sunday we will close > the vote to finalize the date with the venue. Voting is closed now. With 12 out of 15 votes the winner is the 24+25.06 weekend. Please wait before making any bookings for this for now. We need to have another confirmation with the venue as there seem to have been a date mixup. Stay tuned before booking anything without the option to cancel. regards Stefan Schmidt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [website/www-content] master 01/01: Wiki page download-latest changed with summary [Update pyefl download link] by Davide Andreoli
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=342c3da0f2a43fa1db89613df1a09781f1916616 commit 342c3da0f2a43fa1db89613df1a09781f1916616 Author: Davide Andreoli Date: Thu Apr 20 23:53:59 2017 -0700 Wiki page download-latest changed with summary [Update pyefl download link] by Davide Andreoli --- pages/download-latest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/download-latest.txt b/pages/download-latest.txt index 0316884..c437e47 100644 --- a/pages/download-latest.txt +++ b/pages/download-latest.txt @@ -1,6 +1,6 @@ efl_v = 1.19.0 -python_efl_v = 1.18.0 +python_efl_v = 1.19.0 elm_v = In efl emotion_generic_players_v = In efl evas_generic_loaders_v= In efl --