[EGIT] [core/efl] master 02/03: tests/elm: explicitly denote some error/warning messages in unit tests
zmike pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d3ef3d6af109fa028912ae2ec46a74a3ce2bf969 commit d3ef3d6af109fa028912ae2ec46a74a3ce2bf969 Author: Mike Blumenkrantz Date: Thu May 30 13:09:19 2019 -0400 tests/elm: explicitly denote some error/warning messages in unit tests Summary: these blocks intentionally trigger warnings/errors, so use test macros to indicate this Depends on D8969 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8970 --- src/tests/elementary/elm_test_check.c | 2 ++ src/tests/elementary/elm_test_photocam.c| 2 ++ src/tests/elementary/elm_test_progressbar.c | 2 ++ src/tests/elementary/elm_test_win.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/tests/elementary/elm_test_check.c b/src/tests/elementary/elm_test_check.c index e5f8273a69..9a02e4fbf5 100644 --- a/src/tests/elementary/elm_test_check.c +++ b/src/tests/elementary/elm_test_check.c @@ -41,8 +41,10 @@ EFL_START_TEST(elm_check_onoff_text) ck_assert_str_eq(elm_object_part_text_get(check, "off"), "OffText"); elm_object_style_set(check, "default"); + DISABLE_ABORT_ON_CRITICAL_START; ck_assert(elm_object_part_text_get(check, "on") == NULL); ck_assert(elm_object_part_text_get(check, "off") == NULL); + DISABLE_ABORT_ON_CRITICAL_END; } EFL_END_TEST diff --git a/src/tests/elementary/elm_test_photocam.c b/src/tests/elementary/elm_test_photocam.c index 8313fdb0d2..8de7a1530b 100644 --- a/src/tests/elementary/elm_test_photocam.c +++ b/src/tests/elementary/elm_test_photocam.c @@ -52,7 +52,9 @@ EFL_START_TEST(elm_photocam_file) ck_assert_int_eq(elm_photocam_file_set(photocam, buf), EVAS_LOAD_ERROR_NONE); ck_assert_str_eq(elm_photocam_file_get(photocam), buf); + DISABLE_ABORT_ON_CRITICAL_START; ck_assert_int_eq(elm_photocam_file_set(photocam, "non_existing.png"), EVAS_LOAD_ERROR_DOES_NOT_EXIST); + DISABLE_ABORT_ON_CRITICAL_END; ck_assert_str_eq(elm_photocam_file_get(photocam), "non_existing.png"); } EFL_END_TEST diff --git a/src/tests/elementary/elm_test_progressbar.c b/src/tests/elementary/elm_test_progressbar.c index 2ad2808de6..17abdb36af 100644 --- a/src/tests/elementary/elm_test_progressbar.c +++ b/src/tests/elementary/elm_test_progressbar.c @@ -36,7 +36,9 @@ EFL_START_TEST(elm_progressbar_custom_unit_check) win = win_add(NULL, "progressbar", ELM_WIN_BASIC); progressbar = elm_progressbar_add(win); + DISABLE_ABORT_ON_CRITICAL_START; elm_progressbar_unit_format_set(progressbar, format); + DISABLE_ABORT_ON_CRITICAL_END; elm_progressbar_value_set(progressbar, .50); ck_assert(!strcmp(elm_object_part_text_get(progressbar, "elm.text.status"), "50 percent (50%)")); } diff --git a/src/tests/elementary/elm_test_win.c b/src/tests/elementary/elm_test_win.c index 9327327f6e..bf98148534 100644 --- a/src/tests/elementary/elm_test_win.c +++ b/src/tests/elementary/elm_test_win.c @@ -459,7 +459,9 @@ EFL_START_TEST(elm_win_test_rotation) ck_assert_int_eq(elm_win_rotation_get(win), 90); elm_win_rotation_with_resize_set(win, 180); ck_assert_int_eq(elm_win_rotation_get(win), 180); + DISABLE_ABORT_ON_CRITICAL_START; ck_assert_int_eq(elm_win_rotation_get(NULL), -1); + DISABLE_ABORT_ON_CRITICAL_END; } EFL_END_TEST --
[EGIT] [core/efl] master 01/03: elm/gengrid: handle gengrid finding of nearest visible item when not realized
zmike pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ca5b68a6203a6947739c9e72c5bef5e6071de325 commit ca5b68a6203a6947739c9e72c5bef5e6071de325 Author: Mike Blumenkrantz Date: Thu May 30 13:09:10 2019 -0400 elm/gengrid: handle gengrid finding of nearest visible item when not realized Summary: FIXME-- @fix Depends on D8960 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8961 --- src/lib/elementary/elm_gengrid.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 8a5bd597ef..8c36f4b722 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -3505,7 +3505,7 @@ _elm_gengrid_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it) Evas_Coord ix = 0, iy = 0, iw = 0, ih = 0; // given item geometry Evas_Coord cx = 0, cy = 0, cw = 0, ch = 0; // candidate item geometry Eina_List *item_list = NULL, *l = NULL; - Elm_Object_Item *eo_item = NULL; + Elm_Object_Item *first_item, *eo_item = NULL; ELM_GENGRID_DATA_GET(obj, sd); Eina_Bool search_next = EINA_FALSE; @@ -3513,19 +3513,26 @@ _elm_gengrid_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it) ELM_GENGRID_ITEM_DATA_GET(eo_it, it); evas_object_geometry_get(sd->pan_obj, &vx, &vy, &vw, &vh); - evas_object_geometry_get(VIEW(it), &ix, &iy, &iw, &ih); // FIXME: check if the item is realized or not - - if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, ix, iy, iw, ih)) + if (it->realized) { -if (!elm_object_item_disabled_get(eo_it)) - return eo_it; -else - search_next = EINA_TRUE; +evas_object_geometry_get(VIEW(it), &ix, &iy, &iw, &ih); + +if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, ix, iy, iw, ih)) + { + if (!elm_object_item_disabled_get(eo_it)) + return eo_it; + else + search_next = EINA_TRUE; + } } item_list = elm_gengrid_realized_items_get(obj); + /* if first realized item is before parameter item then parameter item is +* off viewport towards bottom: start at end of list */ + first_item = eina_list_data_get(item_list); + ELM_GENGRID_ITEM_DATA_GET(first_item, first_it); - if ((iy < vy) || search_next) + if ((iy < vy) || search_next || (!first_it) || (first_it->position > it->position)) { EINA_LIST_FOREACH(item_list, l, eo_item) { @@ -3555,7 +3562,7 @@ _elm_gengrid_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it) } eina_list_free(item_list); - return eo_it; + return it->realized ? eo_it : NULL; } EOLIAN static Eina_Rect --
[EGIT] [core/efl] master 03/03: elm/fileselector_button: null fileselector model pointer on delete
zmike pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d1bc3ea258d64a698e9868698e0382ad2b182ca7 commit d1bc3ea258d64a698e9868698e0382ad2b182ca7 Author: Mike Blumenkrantz Date: Thu May 30 13:10:53 2019 -0400 elm/fileselector_button: null fileselector model pointer on delete Summary: the data for this object may be further referenced during deletion after this point without triggering errors, so ensure that pointers which are accessible with api functions do not persist after deletion @fix Depends on D8985 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8986 --- src/lib/elementary/elc_fileselector_button.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/elementary/elc_fileselector_button.c b/src/lib/elementary/elc_fileselector_button.c index df7259e09c..5e10e83063 100644 --- a/src/lib/elementary/elc_fileselector_button.c +++ b/src/lib/elementary/elc_fileselector_button.c @@ -243,8 +243,7 @@ _elm_fileselector_button_efl_canvas_group_group_add(Eo *obj, Elm_Fileselector_Bu EOLIAN static void _elm_fileselector_button_efl_canvas_group_group_del(Eo *obj, Elm_Fileselector_Button_Data *sd) { - if (sd->fsd.model) - efl_unref(sd->fsd.model); + efl_replace(&sd->fsd.model, NULL); eina_stringshare_del(sd->window_title); eina_stringshare_del(sd->fsd.path); if (sd->fsd.selection) --
[EGIT] [core/efl] master 01/01: efl_ui_active_view: reset count to -1 if no content is left
xartigas pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5292729e376338472a025c3bf27f6c80e755e445 commit 5292729e376338472a025c3bf27f6c80e755e445 Author: Marcel Hollerbach Date: Thu May 30 19:02:12 2019 +0200 efl_ui_active_view: reset count to -1 if no content is left Summary: otherwise we say content is active that is not active anymore. This fixes currently failing testcases. Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9057 --- src/lib/elementary/efl_ui_active_view_container.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/elementary/efl_ui_active_view_container.c b/src/lib/elementary/efl_ui_active_view_container.c index d1f2fcc9b6..30dadd698b 100644 --- a/src/lib/elementary/efl_ui_active_view_container.c +++ b/src/lib/elementary/efl_ui_active_view_container.c @@ -523,7 +523,10 @@ _unpack(Eo *obj, pd->curr.page = index -1; if (eina_list_count(pd->content_list) > 0 && efl_alive_get(obj)) efl_ui_active_view_active_index_set(obj, new_curr_page); +else + pd->curr.page = -1; } + //position has updated if (early_curr_page != pd->curr.page && early_curr_page != index && pd->indicator && !pd->transition) --
[EGIT] [core/efl] efl-1.22 04/119: evas_object_textblock: Fix binary search fail.
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=f41bec7b80986ede842f28571a00f55a886f3a8d commit f41bec7b80986ede842f28571a00f55a886f3a8d Author: Woochanlee Date: Thu May 2 14:34:04 2019 + evas_object_textblock: Fix binary search fail. D8610 Makes API Testcase fault. "<" is never searching. @fix Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8803 --- src/lib/evas/canvas/evas_object_textblock.c | 4 +++- src/tests/evas/evas_test_textblock.c| 7 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 0913fd30b7..bb8deab1ce 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -1271,8 +1271,8 @@ static const Escape_Value escape_values_e_common_sorted[] = { ESCAPE_VALUE("&", "\x26"), ESCAPE_VALUE("'", "\x27"), ESCAPE_VALUE(">", "\x3e"), - ESCAPE_VALUE(""", "\x22"), ESCAPE_VALUE("<", "\x3c"), + ESCAPE_VALUE(""", "\x22"), }; /** @@ -8185,6 +8185,8 @@ _markup_get_text_utf8_append(Eina_Strbuf *sbuf, const char *text) eina_strbuf_append(sbuf, "&"); else if (ch == '"') eina_strbuf_append(sbuf, """); +else if (ch == '\'') + eina_strbuf_append(sbuf, "'"); else if (ch == _PARAGRAPH_SEPARATOR) eina_strbuf_append(sbuf, ""); else if (ch == _REPLACEMENT_CHAR) diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c index b82e7e4aaa..dc3f22d136 100644 --- a/src/tests/evas/evas_test_textblock.c +++ b/src/tests/evas/evas_test_textblock.c @@ -3241,6 +3241,13 @@ EFL_START_TEST(evas_textblock_text_getters) fail_if(strcmp(tmp2, "aa")); free(tmp2); free(tmp); + +tmp = evas_textblock_text_markup_to_utf8(NULL, "hello >"'"); +fail_if(strcmp(tmp, "hello>\"\'")); +tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); +fail_if(strcmp(tmp2, "hello >"'")); +free(tmp2); +free(tmp); } /* complex markup set/get */ --
[EGIT] [core/efl] efl-1.22 85/119: elm/slider: avoid emitting double events when range slider value changes
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=66e28c89a6064b0625d9a4d5c53f1d3f554a7a0a commit 66e28c89a6064b0625d9a4d5c53f1d3f554a7a0a Author: Mike Blumenkrantz Date: Wed May 29 09:18:31 2019 -0400 elm/slider: avoid emitting double events when range slider value changes Summary: in range mode, there are two slider endpoints, but only one event should be emitted if a change is detected during update @fix Depends on D8967 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8968 --- src/lib/elementary/elm_slider.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_slider.c b/src/lib/elementary/elm_slider.c index d5a5f04ea8..54c433eda6 100644 --- a/src/lib/elementary/elm_slider.c +++ b/src/lib/elementary/elm_slider.c @@ -567,6 +567,7 @@ _elm_slider_val_fetch(Evas_Object *obj, Elm_Slider_Data *pd, Eina_Bool user_even double posx = 0.0, posy = 0.0, pos = 0.0, val; double posx2 = 0.0, posy2 = 0.0, pos2 = 0.0, val2; Eina_Bool inverted = EINA_FALSE; + Eina_Bool evented = EINA_FALSE; EFL_UI_SLIDER_DATA_GET(obj, sd); EFL_UI_SLIDER_INTERVAL_DATA_GET(obj, id); @@ -633,13 +634,15 @@ _elm_slider_val_fetch(Evas_Object *obj, Elm_Slider_Data *pd, Eina_Bool user_even efl_event_callback_legacy_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL); ecore_timer_del(pd->delay); pd->delay = ecore_timer_add(SLIDER_DELAY_CHANGED_INTERVAL, _delay_change, obj); + evented = EINA_TRUE; } } if (fabs(val2 - id->intvl_to) > DBL_EPSILON) { id->intvl_to = val2; -if (user_event) +/* avoid emitting two events and setting a timer twice */ +if (user_event && (!evented)) { efl_event_callback_legacy_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL); ecore_timer_del(pd->delay); --
[EGIT] [core/efl] efl-1.22 97/119: efl_ui/video: do not set 0x0 aspect hint
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=f011e8e59ad2455bff8bceb5ae90ddadc05a3ba5 commit f011e8e59ad2455bff8bceb5ae90ddadc05a3ba5 Author: Mike Blumenkrantz Date: Wed May 29 09:29:08 2019 -0400 efl_ui/video: do not set 0x0 aspect hint Summary: this is an error @fix Depends on D8982 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8983 --- src/lib/elementary/efl_ui_video.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/elementary/efl_ui_video.c b/src/lib/elementary/efl_ui_video.c index 75b6b155dc..c4281b9ea7 100644 --- a/src/lib/elementary/efl_ui_video.c +++ b/src/lib/elementary/efl_ui_video.c @@ -115,17 +115,17 @@ _efl_ui_video_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Video_Data *sd) Evas_Coord w = 0, h = 0; evas_object_size_hint_request_get(sd->emotion, &minw, &minh); - evas_object_size_hint_aspect_set - (sd->emotion, EVAS_ASPECT_CONTROL_BOTH, minw, minh); + if (minw && minh) + evas_object_size_hint_aspect_set + (sd->emotion, EVAS_ASPECT_CONTROL_BOTH, minw, minh); edje_object_size_min_calc(wd->resize_obj, &w, &h); if (w != 0 && h != 0) { minw = w; minh = h; +evas_object_size_hint_aspect_set(obj, EVAS_ASPECT_CONTROL_BOTH, minw, minh); } - - evas_object_size_hint_aspect_set(obj, EVAS_ASPECT_CONTROL_BOTH, minw, minh); } static void --
[EGIT] [core/efl] efl-1.22 76/119: elm/diskselector: trigger sizing eval during theme set only if finalized
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=0aa266467ef7fee5ca16aac207a26ef51cbe6beb commit 0aa266467ef7fee5ca16aac207a26ef51cbe6beb Author: Mike Blumenkrantz Date: Wed May 29 09:17:12 2019 -0400 elm/diskselector: trigger sizing eval during theme set only if finalized Summary: this can't be successfully completed until the object has been fully constructed @fix Depends on D8957 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8958 --- src/lib/elementary/elm_diskselector.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c index a018771136..ec40bc51ea 100644 --- a/src/lib/elementary/elm_diskselector.c +++ b/src/lib/elementary/elm_diskselector.c @@ -862,8 +862,11 @@ _elm_diskselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Diskselector_Data *sd) } } - _theme_data_get(obj); - _sizing_eval(obj); + if (efl_finalized_get(obj)) + { +_theme_data_get(obj); +_sizing_eval(obj); + } evas_event_thaw(evas); evas_event_thaw_eval(evas); --
[EGIT] [core/efl] efl-1.22 12/119: evil: explicitly define HAVE_DL$FUNC for dl functions
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=81703d1a5bc813e7e0c2abba798e47dbd2c49583 commit 81703d1a5bc813e7e0c2abba798e47dbd2c49583 Author: Mike Blumenkrantz Date: Fri Apr 26 09:09:00 2019 -0400 evil: explicitly define HAVE_DL$FUNC for dl functions these would normally be set by the build system when detecting the system's libdl functions, but since we are providing them then we must advertise the functionality to ensure that the right codepaths will be used Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8729 --- src/lib/evil/evil_dlfcn.h | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/lib/evil/evil_dlfcn.h b/src/lib/evil/evil_dlfcn.h index af18ed1ff9..c6d5d1acf2 100644 --- a/src/lib/evil/evil_dlfcn.h +++ b/src/lib/evil/evil_dlfcn.h @@ -143,7 +143,9 @@ struct Dl_info * @ingroup Evil_Dlfcn */ EAPI void *dlopen(const char* path, int mode); - +#ifndef HAVE_DLOPEN +#define HAVE_DLOPEN 1 +#endif /** * @brief Close a dynamic-link library. * @@ -191,7 +193,9 @@ EAPI int dlclose(void* handle); * @ingroup Evil_Dlfcn */ EAPI void *dlsym(void* handle, const char* symbol); - +#ifndef HAVE_DLSYM +#define HAVE_DLSYM 1 +#endif #ifdef _GNU_SOURCE /** @@ -218,7 +222,9 @@ EAPI void *dlsym(void* handle, const char* symbol); * @ingroup Evil_Dlfcn */ EAPI int dladdr (const void *addr, Dl_info *info); - +#ifndef HAVE_DLADDR +#define HAVE_DLADDR 1 +#endif #endif /* _GNU_SOURCE */ /** --
[EGIT] [core/efl] efl-1.22 07/119: csharp: Some docs improvements.
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=ece58cdf9d5379556b1070b8d1bf6c682e9ab786 commit ece58cdf9d5379556b1070b8d1bf6c682e9ab786 Author: Lauro Moura Date: Fri May 3 10:09:58 2019 +0200 csharp: Some docs improvements. Summary: - Silent missing docs warnign for API delegates - Document variables - Better docs for async functions Reviewers: segfaultxavi, vitor.sousa Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8809 --- .../eolian/mono/async_function_definition.hh | 32 +++--- src/bin/eolian_mono/eolian/mono/klass.hh | 14 ++ .../eolian_mono/eolian/mono/struct_definition.hh | 11 ++-- .../eolian_mono/eolian/mono/variable_definition.hh | 5 ++-- 4 files changed, 48 insertions(+), 14 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/async_function_definition.hh b/src/bin/eolian_mono/eolian/mono/async_function_definition.hh index f6a3ff5dc2..b3ab6d4102 100644 --- a/src/bin/eolian_mono/eolian/mono/async_function_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/async_function_definition.hh @@ -54,8 +54,20 @@ struct async_function_declaration_generator return true; if (!as_generator( -scope_tab << "System.Threading.Tasks.Task " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") << -" System.Threading.CancellationToken token = default(System.Threading.CancellationToken));\n" +scope_tab << "/// Async wrapper for .\n" +).generate(sink, attributes::unused, context)) + return false; + +// generate_parameter is not a proper as_generator-compatible generator, so we had to do an old fashioned loop +for (auto&& param : f.parameters) + if (!documentation(1).generate_parameter(sink, param, context)) +return false; + +if (!as_generator( +scope_tab << "/// Token to notify the async operation of external request to cancel.\n" +<< scope_tab << "/// An async task wrapping the result of the operation.\n" +<< scope_tab << "System.Threading.Tasks.Task " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") << +" System.Threading.CancellationToken token = default(System.Threading.CancellationToken));\n\n" ).generate(sink, f.parameters, context)) return false; @@ -88,12 +100,24 @@ struct async_function_definition_generator std::transform(f.parameters.begin(), f.parameters.end(), std::back_inserter(param_forwarding), parameter_forwarding); +if (!as_generator( +scope_tab << "/// Async wrapper for .\n" +).generate(sink, attributes::unused, context)) + return false; + +// generate_parameter is not a proper as_generator-compatible generator, so we had to do an old fashioned loop +for (auto&& param : f.parameters) + if (!documentation(1).generate_parameter(sink, param, context)) +return false; + if(!as_generator( -scope_tab << "public System.Threading.Tasks.Task " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") << " System.Threading.CancellationToken token = default(System.Threading.CancellationToken))\n" +scope_tab << "/// Token to notify the async operation of external request to cancel.\n" +<< scope_tab << "/// An async task wrapping the result of the operation.\n" +<< scope_tab << "public System.Threading.Tasks.Task " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") << " System.Threading.CancellationToken token = default(System.Threading.CancellationToken))\n" << scope_tab << "{\n" << scope_tab << scope_tab << "Eina.Future future = " << name_helpers::managed_method_name(f) << "(" << (string % ",") << ");\n" << scope_tab << scope_tab << "return Efl.Eo.Globals.WrapAsync(future, token);\n" -<< scope_tab << "}\n" +<< scope_tab << "}\n\n" ).generate(sink, std::make_tuple(f.parameters, param_forwarding), context)) return false; return true; diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index c81a23fe08..9d3711fb61 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh +++ b/src/bin/eolian_mono/eolian/mono/klass.hh @@ -465,9 +465,9 @@ struct klass // Native method definitions if(!as_generator( -indent << scope_tab << "#pragma warning disable CA1707, SA1300, SA1600\n\n" +indent << scope_tab << "#pragma warning disable CA1707, CS1591, SA1300, SA1600\n\n" << *(native_function_definition(cls)) -<< indent << scope_tab << "#
[EGIT] [core/efl] efl-1.22 117/119: tests/genlist: fix some shadowed variable warnings
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=45ce93259332ccddffbb73cd24f21c09a49a547c commit 45ce93259332ccddffbb73cd24f21c09a49a547c Author: Mike Blumenkrantz Date: Wed May 29 09:31:58 2019 -0400 tests/genlist: fix some shadowed variable warnings Summary: Depends on D9006 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9007 --- src/tests/elementary/elm_test_genlist.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tests/elementary/elm_test_genlist.c b/src/tests/elementary/elm_test_genlist.c index 430e2050c6..32ef040ebe 100644 --- a/src/tests/elementary/elm_test_genlist.c +++ b/src/tests/elementary/elm_test_genlist.c @@ -139,7 +139,7 @@ _item_content_get(void *data EINA_UNUSED, Evas_Object *obj, const char *part EIN EFL_START_TEST(elm_genlist_test_item_content) { Elm_Genlist_Item_Class *gtc; - Evas_Object *content, *parent; + Evas_Object *end, *parent; Elm_Object_Item *it; gtc = elm_genlist_item_class_new(); @@ -163,12 +163,12 @@ EFL_START_TEST(elm_genlist_test_item_content) ecore_main_loop_begin(); - content = elm_object_item_part_content_get(it, "elm.swallow.end"); - parent = elm_object_parent_widget_get(content); + end = elm_object_item_part_content_get(it, "elm.swallow.end"); + parent = elm_object_parent_widget_get(end); ck_assert_ptr_eq(parent, genlist); elm_genlist_item_all_contents_unset(it, NULL); - parent = elm_object_parent_widget_get(content); + parent = elm_object_parent_widget_get(end); ck_assert_ptr_eq(parent, win); } EFL_END_TEST --
[EGIT] [core/efl] efl-1.22 11/119: csharp: Fix property helper doc indent
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=a73850382cce8b291e77052fd619d318d6f482ec commit a73850382cce8b291e77052fd619d318d6f482ec Author: Lauro Moura Date: Mon May 6 13:35:31 2019 +0200 csharp: Fix property helper doc indent Summary: Documentation generators must received their indentation as parameter instead of explicit scope_tabs Fixes T7794 Reviewers: segfaultxavi, felipealmeida, vitor.sousa Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7794 Differential Revision: https://phab.enlightenment.org/D8818 --- src/bin/eolian_mono/eolian/mono/function_definition.hh | 2 +- src/bin/eolian_mono/eolian/mono/part_definition.hh | 2 +- src/bin/eolian_mono/eolian/mono/struct_definition.hh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh index 0dbd097f1d..d1ca5f573f 100644 --- a/src/bin/eolian_mono/eolian/mono/function_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh @@ -268,7 +268,7 @@ struct property_wrapper_definition_generator std::string managed_name = name_helpers::property_managed_name(property); if (!as_generator( - scope_tab << documentation + documentation(1) << scope_tab << (interface ? "" : "public ") << (is_static ? "static " : "") << type(true) << " " << managed_name << " {\n" ).generate(sink, std::make_tuple(property, prop_type), context)) return false; diff --git a/src/bin/eolian_mono/eolian/mono/part_definition.hh b/src/bin/eolian_mono/eolian/mono/part_definition.hh index 9c57587b33..484cd0d65a 100644 --- a/src/bin/eolian_mono/eolian/mono/part_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/part_definition.hh @@ -22,7 +22,7 @@ struct part_definition_generator return true; auto part_klass_name = name_helpers::klass_full_concrete_or_interface_name(part.klass); - return as_generator(scope_tab << documentation + return as_generator(documentation(1) << scope_tab << "public " << part_klass_name << " " << name_helpers::managed_part_name(part) << "\n" << scope_tab << "{\n" << scope_tab << scope_tab << "get\n" diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh index 14d3f7fdb3..ba50f2d2f9 100644 --- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh @@ -403,7 +403,7 @@ struct struct_definition_generator field_name[0] = std::toupper(field_name[0]); // Hack to allow 'static' as a field name if (!as_generator ( - indent << scope_tab << documentation + documentation(indent.n + 1) << indent << scope_tab << "public " << type << " " << string << ";\n" ) .generate(sink, std::make_tuple(field, field.type, name_helpers::to_field_name(field.name)), context)) --
[EGIT] [core/efl] efl-1.22 52/119: benchmarks: Fix copy-paste error
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=4d2c25456c2853987f34c07450e799f0aa0808ad commit 4d2c25456c2853987f34c07450e799f0aa0808ad Author: Christopher Michael Date: Wed May 22 08:45:24 2019 -0400 benchmarks: Fix copy-paste error Coverity reports this as a copy-paste error, and checking the code it certainly looks that way, so lets call the proper hash function here Fixes CID1401052 @fix --- src/benchmarks/eina/ecore_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/benchmarks/eina/ecore_hash.c b/src/benchmarks/eina/ecore_hash.c index 374a0e08da..76a5ad2e38 100644 --- a/src/benchmarks/eina/ecore_hash.c +++ b/src/benchmarks/eina/ecore_hash.c @@ -236,7 +236,7 @@ ecore_hash_hash_set(Ecore_Hash *hash, Ecore_Hash *set) hash->free_key(node->key); if (hash->free_value) - hash->free_key(node->value); + hash->free_value(node->value); node->key = old->key; node->value = old->value; --
[EGIT] [core/efl] efl-1.22 104/119: elm/genlist: unify all creation of calc jobs, skip if genlist is dead
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=46612245547ba222dcc0f9c313b1a4829c557386 commit 46612245547ba222dcc0f9c313b1a4829c557386 Author: Mike Blumenkrantz Date: Wed May 29 09:30:37 2019 -0400 elm/genlist: unify all creation of calc jobs, skip if genlist is dead Summary: there is no need to recalculate any genlist attributes if the genlist is dead @fix Depends on D8992 Reviewers: cedric, bu5hm4n Reviewed By: cedric, bu5hm4n Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8993 --- src/lib/elementary/elm_genlist.c | 59 ++-- 1 file changed, 26 insertions(+), 33 deletions(-) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index aaa78b89a4..d74466dc58 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -184,6 +184,14 @@ static const Elm_Action key_actions[] = { {NULL, NULL} }; +static inline void +_add_calc_job(Elm_Genlist_Data *sd) +{ + ELM_SAFE_FREE(sd->calc_job, ecore_job_del); + if (!efl_alive_get(sd->obj)) return; + sd->calc_job = ecore_job_add(_calc_job, sd->obj); +} + static void _size_cache_free(void *data) { @@ -321,14 +329,13 @@ _elm_genlist_pan_efl_gfx_entity_size_set(Eo *obj, Elm_Genlist_Pan_Data *psd, Ein } sd->pan_changed = EINA_TRUE; evas_object_smart_changed(obj); - ecore_job_del(sd->calc_job); // if the width changed we may have to resize content if scrollbar went // away or appeared to queue a job to deal with it. it should settle in // the end to a steady-state if (old.w != size.w) - sd->calc_job = ecore_job_add(_calc_job, psd->wobj); + _add_calc_job(sd); else - sd->calc_job = NULL; + ELM_SAFE_FREE(sd->calc_job, ecore_job_del); super: efl_gfx_entity_size_set(efl_super(obj, MY_PAN_CLASS), size); @@ -779,8 +786,7 @@ _must_recalc_idler(void *data) { ELM_GENLIST_DATA_GET(data, sd); - ecore_job_del(sd->calc_job); - sd->calc_job = ecore_job_add(_calc_job, data); + _add_calc_job(sd); sd->must_recalc_idler = NULL; return ECORE_CALLBACK_CANCEL; } @@ -953,8 +959,7 @@ _elm_genlist_elm_layout_sizing_eval(Eo *obj, Elm_Genlist_Data *sd) { itb->must_recalc = EINA_TRUE; } - ecore_job_del(sd->calc_job); - sd->calc_job = ecore_job_add(_calc_job, obj); + _add_calc_job(sd); } minw = vmw; minh = vmh; @@ -3561,8 +3566,8 @@ _elm_genlist_efl_ui_widget_theme_apply(Eo *obj, Elm_Genlist_Data *sd) itb->changed = EINA_TRUE; } - ecore_job_del(sd->calc_job); - sd->calc_job = ecore_job_add(_calc_job, obj); + if (sd->obj) + _add_calc_job(sd); elm_layout_sizing_eval(obj); evas_event_thaw(e); evas_event_thaw_eval(e); @@ -3684,8 +3689,7 @@ _item_block_del(Elm_Gen_Item *it) itb->items = eina_list_remove(itb->items, it); itb->count--; itb->changed = EINA_TRUE; - ecore_job_del(sd->calc_job); - sd->calc_job = ecore_job_add(_calc_job, sd->obj); + _add_calc_job(sd); if (itb->count < 1) { Item_Block *itbn; @@ -3833,8 +3837,7 @@ _elm_genlist_item_del_serious(Elm_Gen_Item *it) sd->group_items = eina_list_remove(sd->group_items, it); ELM_SAFE_FREE(sd->state, eina_inlist_sorted_state_free); - ecore_job_del(sd->calc_job); - sd->calc_job = ecore_job_add(_calc_job, sd->obj); + _add_calc_job(sd); ELM_SAFE_FREE(it->item, free); } @@ -4036,8 +4039,7 @@ _item_mouse_move_cb(void *data, else _item_position(it, VIEW(it), it->item->scrl_x, y_pos); - ecore_job_del(sd->calc_job); - sd->calc_job = ecore_job_add(_calc_job, sd->obj); + _add_calc_job(sd); } return; } @@ -4641,8 +4643,7 @@ newblock: itb->count++; itb->changed = EINA_TRUE; it->item->block = itb; - ecore_job_del(itb->sd->calc_job); - itb->sd->calc_job = ecore_job_add(_calc_job, itb->sd->obj); + _add_calc_job(itb->sd); if (itb->count > itb->sd->max_items_per_block) { @@ -4884,8 +4885,7 @@ _item_idle_enterer(void *data) if (wakeup) { // wake up mainloop -ecore_job_del(sd->calc_job); -sd->calc_job = ecore_job_add(_calc_job, data); +_add_calc_job(sd); } if (ok == ECORE_CALLBACK_CANCEL) sd->queue_idle_enterer = NULL; @@ -5130,8 +5130,7 @@ _item_mouse_up_cb(void *data, } else { - ecore_job_del(sd->calc_job); - sd->calc_job = ecore_job_add(_calc_job, sd->obj); + _add_calc_job(sd); } edje_object_signal_emit(VIEW(it), SIGNAL_REORDER_DISABLED, "elm"); if (_elm_config->atspi_mode) @@ -5521,8 +5520,7 @@ _
[EGIT] [core/efl] efl-1.22 112/119: elm/scroller: return immediately from updating focused scroll region without content
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=835058e688a3d2050320e819816a91ec405b0c91 commit 835058e688a3d2050320e819816a91ec405b0c91 Author: Mike Blumenkrantz Date: Wed May 29 09:31:23 2019 -0400 elm/scroller: return immediately from updating focused scroll region without content Summary: there is nothing to update here if the scroller has no content to update @fix Depends on D9000 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9001 --- src/lib/elementary/elm_scroller.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c index 1eec6d866e..26460f851e 100644 --- a/src/lib/elementary/elm_scroller.c +++ b/src/lib/elementary/elm_scroller.c @@ -879,6 +879,8 @@ _focused_element(void *data, const Efl_Event *event) pd = efl_data_scope_get(obj, ELM_INTERFACE_SCROLLABLE_MIXIN); if (!focus) return; + /* no scroller content set */ + if (!pd->pan_obj) return; geom = efl_ui_focus_object_focus_geometry_get(focus); pos = efl_gfx_entity_position_get(obj); --
[EGIT] [core/efl] efl-1.22 03/119: Fix for invalid ATSPI role on naviframe page element
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=a0878e49250eb3200b544342da8a4dfdff9c4e02 commit a0878e49250eb3200b544342da8a4dfdff9c4e02 Author: Radoslaw Cybulski Date: Tue Apr 30 11:59:53 2019 + Fix for invalid ATSPI role on naviframe page element ATSPI role page_tab was set on invalid object and thus ignored. Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8789 --- src/lib/elementary/elc_naviframe.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c index fa22902d90..7675b6103b 100644 --- a/src/lib/elementary/elc_naviframe.c +++ b/src/lib/elementary/elc_naviframe.c @@ -1283,8 +1283,6 @@ _item_new(Evas_Object *obj, ELM_NAVIFRAME_DATA_GET(obj, sd); eo_item = efl_add(ELM_NAVIFRAME_ITEM_CLASS, obj); - efl_access_object_role_set(eo_item, EFL_ACCESS_ROLE_PAGE_TAB); - efl_access_object_i18n_name_set(eo_item, (char*)title_label); if (!eo_item) { @@ -1295,9 +1293,13 @@ _item_new(Evas_Object *obj, ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it); //item base layout - VIEW_SET(it, elm_layout_add(obj)); + Eo *elem = elm_layout_add(obj); + VIEW_SET(it, elem); evas_object_smart_member_add(VIEW(it), obj); + efl_access_object_role_set(elem, EFL_ACCESS_ROLE_PAGE_TAB); + efl_access_object_i18n_name_set(elem, (char*)title_label); + if (!elm_widget_sub_object_add(obj, VIEW(it))) ERR("could not add %p as sub object of %p", VIEW(it), obj); --
[EGIT] [core/efl] efl-1.22 115/119: ecore-imf/xim: only call ecore_x_shutdown if init was previously called
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=35f39836779c2c08eff78a22883ed5ce53089f09 commit 35f39836779c2c08eff78a22883ed5ce53089f09 Author: Mike Blumenkrantz Date: Wed May 29 09:31:49 2019 -0400 ecore-imf/xim: only call ecore_x_shutdown if init was previously called Summary: this isn't a perfect fix, but it's probably the best that can be done given the current ecore-imf module api which calls the exit() module function unconditionally during module cleanup even if the module was never initialized @fix Depends on D9003 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9005 --- src/modules/ecore_imf/xim/ecore_imf_xim.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modules/ecore_imf/xim/ecore_imf_xim.c b/src/modules/ecore_imf/xim/ecore_imf_xim.c index ba5dad58ab..a4d567c376 100644 --- a/src/modules/ecore_imf/xim/ecore_imf_xim.c +++ b/src/modules/ecore_imf/xim/ecore_imf_xim.c @@ -130,6 +130,8 @@ static void _ecore_imf_xim_destroy_cb(XIM xim, XPointer call_data); static void _ecore_imf_xim_im_setup(XIM_Im_Info *info); +static unsigned int init_count; + static unsigned int _ecore_imf_xim_utf8_offset_to_index(const char *str, int offset) { @@ -752,6 +754,7 @@ xim_imf_module_create(void) if (!ecore_x_init(NULL)) return NULL; + init_count++; ctx = ecore_imf_context_new(&xim_class); DBG("ctx=%p", ctx); return ctx; @@ -760,7 +763,11 @@ xim_imf_module_create(void) static Ecore_IMF_Context * xim_imf_module_exit(void) { - ecore_x_shutdown(); + if (init_count) + { +ecore_x_shutdown(); +init_count--; + } DBG(" "); return NULL; } --
[EGIT] [core/efl] efl-1.22 116/119: tests/elm: explicitly denote cases where error messages are intentional
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=79cad6220390d44875e988ce294fa02d636021a5 commit 79cad6220390d44875e988ce294fa02d636021a5 Author: Mike Blumenkrantz Date: Wed May 29 09:31:54 2019 -0400 tests/elm: explicitly denote cases where error messages are intentional Summary: we want to make it clear in our tests where it is intended that warnings and errors may occur Depends on D9005 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9006 --- src/tests/elementary/elm_code_test_widget.c | 2 ++ src/tests/elementary/elm_test_genlist.c | 4 2 files changed, 6 insertions(+) diff --git a/src/tests/elementary/elm_code_test_widget.c b/src/tests/elementary/elm_code_test_widget.c index 0f7177c486..0c51630cbe 100644 --- a/src/tests/elementary/elm_code_test_widget.c +++ b/src/tests/elementary/elm_code_test_widget.c @@ -50,7 +50,9 @@ EFL_START_TEST(elm_code_widget_construct_nocode) elm_init(1, args); win = win_add(NULL, "entry", ELM_WIN_BASIC); + DISABLE_ABORT_ON_CRITICAL_START; widget = elm_code_widget_add(win, NULL); + DISABLE_ABORT_ON_CRITICAL_END; ck_assert(!widget); elm_shutdown(); diff --git a/src/tests/elementary/elm_test_genlist.c b/src/tests/elementary/elm_test_genlist.c index 1ffec17647..430e2050c6 100644 --- a/src/tests/elementary/elm_test_genlist.c +++ b/src/tests/elementary/elm_test_genlist.c @@ -75,14 +75,18 @@ verify_item_iteration_api(Elm_Object_Item *parent) { it = elm_genlist_nth_item_get(genlist, i); if (i == 11) + DISABLE_ABORT_ON_CRITICAL_START; // item #11 do not exists ck_assert_int_eq(elm_genlist_item_index_get(it), -1); + DISABLE_ABORT_ON_CRITICAL_END; else ck_assert_int_eq(elm_genlist_item_index_get(it), i + 1); if ((i == 0) || (i == 11)) + DISABLE_ABORT_ON_CRITICAL_START; // test first and item #11 (that do not exists) ck_assert_ptr_eq(elm_object_item_data_get(it), NULL); + DISABLE_ABORT_ON_CRITICAL_END; else ck_assert_ptr_eq(elm_object_item_data_get(it), (void*)(uintptr_t)i); } --
[EGIT] [core/efl] efl-1.22 81/119: elm/hovers: don't trigger more errors when setting null hover parent
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=9f4adbfda81b75b9234ece8c866d862db481094f commit 9f4adbfda81b75b9234ece8c866d862db481094f Author: Mike Blumenkrantz Date: Wed May 29 09:18:09 2019 -0400 elm/hovers: don't trigger more errors when setting null hover parent Summary: null is not a valid subobject, do not attempt to add it @fix Depends on D8963 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: devilhorns, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8964 --- src/lib/elementary/elm_hover.c | 3 ++- src/lib/elementary/elm_notify.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c index 271436f707..9579f162f0 100644 --- a/src/lib/elementary/elm_hover.c +++ b/src/lib/elementary/elm_hover.c @@ -759,7 +759,8 @@ elm_hover_parent_set(Evas_Object *obj, { ELM_HOVER_CHECK(obj); ELM_HOVER_DATA_GET(obj, sd); - efl_ui_widget_sub_object_add(parent, obj); + if (parent) + efl_ui_widget_sub_object_add(parent, obj); _parent_setup(obj, sd, parent); } diff --git a/src/lib/elementary/elm_notify.c b/src/lib/elementary/elm_notify.c index 0f1bbd37f4..ee734b9e39 100644 --- a/src/lib/elementary/elm_notify.c +++ b/src/lib/elementary/elm_notify.c @@ -537,7 +537,8 @@ elm_notify_parent_set(Evas_Object *obj, { ELM_NOTIFY_CHECK(obj); ELM_NOTIFY_DATA_GET(obj, sd); - efl_ui_widget_sub_object_add(parent, obj); + if (parent) + efl_ui_widget_sub_object_add(parent, obj); _parent_setup(obj, sd, parent); } --
[EGIT] [core/efl] efl-1.22 114/119: emotion: don't update crop clipper geometry if crop clipper doesn't exist
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=d8debc88f5e605559616e206286e3467afa7a3f8 commit d8debc88f5e605559616e206286e3467afa7a3f8 Author: Mike Blumenkrantz Date: Wed May 29 09:31:33 2019 -0400 emotion: don't update crop clipper geometry if crop clipper doesn't exist Summary: this object does not exist if no image border is set @fix Depends on D9002 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9003 --- src/lib/emotion/emotion_smart.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c index e2243c818d..d733e41029 100644 --- a/src/lib/emotion/emotion_smart.c +++ b/src/lib/emotion/emotion_smart.c @@ -204,12 +204,12 @@ _clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int evas_object_image_fill_set(sd->obj, 0, 0, 0, 0); evas_object_move(sd->obj, x, y); evas_object_resize(sd->obj, 0, 0); + if (!sd->crop.clipper) return; evas_object_move(sd->crop.clipper, x, y); evas_object_resize(sd->crop.clipper, 0, 0); } else { - evas_object_move(sd->crop.clipper, x, y); scale_w = (double)w / (double)(vid_w - sd->crop.l - sd->crop.r); scale_h = (double)h / (double)(vid_h - sd->crop.t - sd->crop.b); @@ -219,6 +219,8 @@ _clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int evas_object_image_fill_set(sd->obj, 0, 0, sd->fill.w * w, sd->fill.h * h); evas_object_resize(sd->obj, vid_w * scale_w, vid_h * scale_h); evas_object_move(sd->obj, x - sd->crop.l * scale_w, y - sd->crop.t * scale_h); + if (!sd->crop.clipper) return; + evas_object_move(sd->crop.clipper, x, y); evas_object_resize(sd->crop.clipper, w, h); } } --
[EGIT] [core/efl] efl-1.22 15/119: efl_ui_textpath: remove err log in none error case.
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=32af4629d4d9ee765b10f9bd4cf78c5850291f54 commit 32af4629d4d9ee765b10f9bd4cf78c5850291f54 Author: Hermet Park Date: Tue May 7 17:34:12 2019 +0900 efl_ui_textpath: remove err log in none error case. --- src/lib/elementary/efl_ui_textpath.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c index 9c045876b8..99b87b18b3 100644 --- a/src/lib/elementary/efl_ui_textpath.c +++ b/src/lib/elementary/efl_ui_textpath.c @@ -689,10 +689,7 @@ _efl_ui_textpath_circle_set(Eo *obj, Efl_Ui_Textpath_Data *pd, double x, double pd->circle.start_angle == start_angle && pd->direction == direction && _map_point_calc(pd) > 0) - { -ERR("Same circle"); return; - } pd->circle.x = x; pd->circle.y = y; pd->circle.radius = radius; --
[EGIT] [core/efl] efl-1.22 16/119: Evil: remove localtime_r as mingw-w64 defines it when _POSIX_C_SOURCE is defined
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=0435753280833b232855ab27e6d2307e8b8e6567 commit 0435753280833b232855ab27e6d2307e8b8e6567 Author: Vincent Torri Date: Wed May 8 10:14:45 2019 -0400 Evil: remove localtime_r as mingw-w64 defines it when _POSIX_C_SOURCE is defined Summary: localtime_r() is already defined by mingw-w64 when _POSIX_C_SOURCE is defined edit: also only define _POSIX_C_SOURCE (correctly) on windows Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8859 --- configure.ac | 1 + meson.build | 1 + src/lib/evil/evil_macro_wrapper.h | 14 -- src/lib/evil/evil_time.c | 10 -- src/lib/evil/evil_time.h | 23 +++ 5 files changed, 5 insertions(+), 44 deletions(-) diff --git a/configure.ac b/configure.ac index 1bfaccf274..eec9c661d3 100644 --- a/configure.ac +++ b/configure.ac @@ -298,6 +298,7 @@ if test "x${have_win32}" = "xyes" ; then # autotools macro and CXX is always set to g++ even if # it's not found. So we are using an internal variable # that does the work for now, may get broken in the future. +AC_DEFINE([_POSIX_C_SOURCE], [200809L], [Define the POSIX version]) if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.]) fi diff --git a/meson.build b/meson.build index 0a548dac0f..3f3f280493 100644 --- a/meson.build +++ b/meson.build @@ -102,6 +102,7 @@ foreach lang : ['c', 'objc', 'cpp'] add_global_arguments('-DEFL_BUILD=1', language: lang) add_global_arguments('-DELM_INTERNAL_API_ARGESFSDFEFC=1', language: lang) if sys_windows == true +add_global_arguments('-D_POSIX_C_SOURCE=200809L', language: lang) if (get_option('windows-version') == 'vista') add_global_arguments('-DWINVER=0x060', language: lang) add_global_arguments('-D_WIN32_WINNT=0x0600', language: lang) diff --git a/src/lib/evil/evil_macro_wrapper.h b/src/lib/evil/evil_macro_wrapper.h index ae748677b0..9eb1ac7a6e 100644 --- a/src/lib/evil/evil_macro_wrapper.h +++ b/src/lib/evil/evil_macro_wrapper.h @@ -45,20 +45,6 @@ #endif #define mkdir(dirname, mode) evil_mkdir(dirname, mode) -/* - * evil_time.h - */ - -/** - * @def localtime_r(t, r) - * - * Wrapper around evil_localtime_r(). - */ -#ifdef localtime_r -# undef localtime_r -#endif -#define localtime_r(t, r) evil_localtime_r(t, r) - /* * evil_unistd.h */ diff --git a/src/lib/evil/evil_time.c b/src/lib/evil/evil_time.c index 76c5a58657..90b63692fc 100644 --- a/src/lib/evil/evil_time.c +++ b/src/lib/evil/evil_time.c @@ -12,16 +12,6 @@ #include "evil_macro_wrapper.h" #include "evil_private.h" -struct tm * -evil_localtime_r(const time_t *timep, struct tm *result) -{ - __time64_t t = *timep; - - _localtime64_s(result, &t); - - return result; -} - /* * strptime * based on http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/time/strptime.c?rev=HEAD diff --git a/src/lib/evil/evil_time.h b/src/lib/evil/evil_time.h index 34607de5d1..00f538cae7 100644 --- a/src/lib/evil/evil_time.h +++ b/src/lib/evil/evil_time.h @@ -2,6 +2,9 @@ #define __EVIL_TIME_H__ +#include + + /** * @file evil_time.h * @brief The file that provides functions ported from Unix in time.h. @@ -14,26 +17,6 @@ */ -/** - * @brief Convert the calendar time to broken-time representation in a - * user supplied data. - * - * @param timep The calender time. - * @param result The broken-down time representation. - * @return The broken-down time representation. - * - * This function converts the calendar time @p timep to a broken-time - * representation. The result is stored in the buffer @p result - * supplied by the user. If @p timep or @p result are @c NULL, or if - * an error occurred, this function returns @c NULL and the values in - * @p result might be undefined. Otherwise it returns @p result. - * - * Conformity: Non applicable. - * - * Supported OS: Windows XP. - */ -EAPI struct tm *evil_localtime_r(const time_t *timep, struct tm *result); - /** * @brief Convert a string representation of time to a time tm structure . * --
[EGIT] [core/efl] efl-1.22 100/119: elm/popup: remove del callback for internal table object during destruction
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=ad201122dd3cdbd296c452f42b55f045e4b43ee3 commit ad201122dd3cdbd296c452f42b55f045e4b43ee3 Author: Mike Blumenkrantz Date: Wed May 29 09:29:45 2019 -0400 elm/popup: remove del callback for internal table object during destruction Summary: the table object's destruction is no longer relevant after this point and its callback can trigger unnecessary errors @fix Depends on D8986 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8988 --- src/lib/elementary/elc_popup.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c index 7cdf1edf0e..09527b28c2 100644 --- a/src/lib/elementary/elc_popup.c +++ b/src/lib/elementary/elc_popup.c @@ -234,7 +234,7 @@ _focus_changed_popup(void *data, const Efl_Event *ev) EFL_CALLBACKS_ARRAY_DEFINE(composition_cb, { EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _focus_changed_popup }, ) - +static void _on_table_del(void *data, Evas *e, Evas_Object *obj, void *event_info); EOLIAN static void _elm_popup_efl_canvas_group_group_del(Eo *obj, Elm_Popup_Data *sd) { @@ -248,6 +248,9 @@ _elm_popup_efl_canvas_group_group_del(Eo *obj, Elm_Popup_Data *sd) evas_object_event_callback_del (sd->content, EVAS_CALLBACK_DEL, _on_content_del); evas_object_event_callback_del(obj, EVAS_CALLBACK_SHOW, _on_show); + if (sd->tbl) + evas_object_event_callback_del_full(sd->tbl, EVAS_CALLBACK_DEL, +_on_table_del, obj); efl_event_callback_array_del(sd->notify, composition_cb(), obj); sd->last_button_number = 0; --
[EGIT] [core/efl] efl-1.22 106/119: elm/genlist: handle cache item deletion without errors
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=e0001422f2ce5ef21d5d7776d4a9dfae11132730 commit e0001422f2ce5ef21d5d7776d4a9dfae11132730 Author: Mike Blumenkrantz Date: Wed May 29 09:30:49 2019 -0400 elm/genlist: handle cache item deletion without errors Summary: @fix Depends on D8994 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8995 --- src/lib/elementary/elm_genlist.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 95d4841322..b14aebb478 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -1552,8 +1552,12 @@ _item_cache_free(Item_Cache *itc) if (!itc) return; evas_object_del(itc->spacer); - efl_wref_del(itc->base_view, &itc->base_view); - efl_del(itc->base_view); + /* does not exist if cache item has just been reused */ + if (itc->base_view) + { +efl_wref_del(itc->base_view, &itc->base_view); +efl_del(itc->base_view); + } itc->item_class = NULL; EINA_LIST_FREE(itc->contents, c) { --
[EGIT] [core/efl] efl-1.22 108/119: elm/index: create event_rect[0] earlier in construction
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=965256ef046d65334cdcdad480919ce63b5aec8d commit 965256ef046d65334cdcdad480919ce63b5aec8d Author: Mike Blumenkrantz Date: Wed May 29 09:30:59 2019 -0400 elm/index: create event_rect[0] earlier in construction Summary: this ensures that the object exists during init functions which make calls on it @fix Depends on D8996 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8997 --- src/lib/elementary/elm_index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_index.c b/src/lib/elementary/elm_index.c index c046080a6e..c771f61972 100644 --- a/src/lib/elementary/elm_index.c +++ b/src/lib/elementary/elm_index.c @@ -1045,6 +1045,7 @@ _elm_index_efl_canvas_group_group_add(Eo *obj, Elm_Index_Data *priv) ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); efl_canvas_group_add(efl_super(obj, MY_CLASS)); + priv->event_rect[0] = o = evas_object_rectangle_add(evas_object_evas_get(obj)); if (!elm_layout_theme_set (obj, "index", "base/vertical", elm_widget_style_get(obj))) @@ -1053,7 +1054,6 @@ _elm_index_efl_canvas_group_group_add(Eo *obj, Elm_Index_Data *priv) evas_object_event_callback_add (obj, EVAS_CALLBACK_RESIZE, _index_resize_cb, NULL); - priv->event_rect[0] = o = evas_object_rectangle_add(evas_object_evas_get(obj)); evas_object_color_set(o, 0, 0, 0, 0); elm_coords_finger_size_adjust(1, &minw, 1, &minh); evas_object_size_hint_min_set(o, minw, minh); --
[EGIT] [core/efl] efl-1.22 14/119: efl_ui_text: clear selection after cut
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=8d5b9c4807f218c88fb8f10fbd1ba401d156c56b commit 8d5b9c4807f218c88fb8f10fbd1ba401d156c56b Author: Ali Alzyod Date: Mon May 6 14:01:24 2019 +0200 efl_ui_text: clear selection after cut Test Plan: ``` #define EFL_EO_API_SUPPORT 1 #define EFL_BETA_API_SUPPORT 1 #include #include #include static void _gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) { efl_exit(0); } static void _gui_setup() { Eo *win, *box; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), efl_text_set(efl_added, "Hello World"), efl_ui_win_autodel_set(efl_added, EINA_TRUE)); // when the user clicks "close" on a window there is a request to delete efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL); box = efl_add(EFL_UI_BOX_CLASS, win, efl_content_set(win, efl_added), efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240))); efl_add(EFL_UI_TEXT_CLASS, box, efl_text_markup_set(efl_added, "Hello World.This is an Efl.Ui application!"), efl_text_interactive_selection_allowed_set(efl_added, EINA_TRUE), efl_text_multiline_set(efl_added,EINA_TRUE), efl_gfx_hint_weight_set(efl_added, 1.0, 0.9), efl_gfx_hint_align_set(efl_added, 0.5, 0.5), efl_pack(box, efl_added)); efl_add(EFL_UI_BUTTON_CLASS, box, efl_text_set(efl_added, "Quit"), efl_gfx_hint_weight_set(efl_added, 1.0, 0.1), efl_pack(box, efl_added), efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _gui_quit_cb, efl_added)); } EAPI_MAIN void efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) { _gui_setup(); } EFL_MAIN() ``` Reviewers: woohyun, bowonryu, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8833 --- src/lib/elementary/efl_ui_text.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c index ebb2dd539e..b92df12edb 100644 --- a/src/lib/elementary/efl_ui_text.c +++ b/src/lib/elementary/efl_ui_text.c @@ -1231,6 +1231,7 @@ _cut_cb(Eo *obj) _selection_store(EFL_UI_SELECTION_TYPE_CLIPBOARD, obj); efl_text_interactive_selection_cursors_get(obj, &start, &end); efl_canvas_text_range_delete(obj, start, end); + _efl_ui_text_select_none(obj, sd); } static void --
[EGIT] [core/efl] efl-1.22 88/119: ecore-evas: check for internal evas presence before using it during free
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=d0e60d9edd2c9d15fa30ef39fac05f44438d1e33 commit d0e60d9edd2c9d15fa30ef39fac05f44438d1e33 Author: Mike Blumenkrantz Date: Wed May 29 09:23:18 2019 -0400 ecore-evas: check for internal evas presence before using it during free Summary: some engines do not have an evas @fix Depends on D8971 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8972 --- src/lib/ecore_evas/ecore_evas.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index 8f8a0241b6..12e701c1d7 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -3450,7 +3450,12 @@ _ecore_evas_free(Ecore_Evas *ee) } ee->animator_count = 0; - efl_event_callback_array_del(ee->evas, animator_watch(), ee); + /* not present in extn engine */ + if (ee->evas) + { +efl_event_callback_array_del(ee->evas, animator_watch(), ee); +efl_event_callback_array_del(ee->evas, _ecore_evas_device_cbs(), ee); + } if (ee->anim) ecore_animator_del(ee->anim); ee->anim = NULL; @@ -3491,7 +3496,6 @@ _ecore_evas_free(Ecore_Evas *ee) ecore_timer_del(ee->prop.wm_rot.manual_mode.timer); _ecore_evas_aux_hint_free(ee); ee->prop.wm_rot.manual_mode.timer = NULL; - efl_event_callback_array_del(ee->evas, _ecore_evas_device_cbs(), ee); eina_hash_free(ee->prop.cursors); ee->prop.cursors = NULL; evas_free(ee->evas); --
[EGIT] [core/efl] efl-1.22 98/119: efl_ui/widget: skip updating access info during parent_set(NULL) if dead
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=1feb4e291187a558de9439cd7c356fec1a66c71c commit 1feb4e291187a558de9439cd7c356fec1a66c71c Author: Mike Blumenkrantz Date: Wed May 29 09:29:14 2019 -0400 efl_ui/widget: skip updating access info during parent_set(NULL) if dead Summary: no need to update access info for dead objects @fix Depends on D8983 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8984 --- src/lib/elementary/efl_ui_widget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 2180aeec61..19975d0b67 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -1447,6 +1447,7 @@ _efl_ui_widget_widget_parent_set(Eo *obj, Elm_Widget_Smart_Data *pd, Efl_Ui_Widg _mirror_disabled_state(obj, pd, disabled_delta); _full_eval(obj, pd); + if (!efl_alive_get(obj)) return; if (old_parent && _elm_config->atspi_mode) { Efl_Access_Object *aparent; --
[EGIT] [core/efl] efl-1.22 08/119: docfx: Filter out *Concrete classes (again)
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=9cb3b0aedfa71300d91c1f2af69c2e60a72ad8ca commit 9cb3b0aedfa71300d91c1f2af69c2e60a72ad8ca Author: Xavi Artigas Date: Fri May 3 15:28:15 2019 +0200 docfx: Filter out *Concrete classes (again) As the C# API settles down, some classes go in and out of public space. --- doc/docfx/filterConfig.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/docfx/filterConfig.yml b/doc/docfx/filterConfig.yml index 87d52fac80..04c2e0c8f3 100644 --- a/doc/docfx/filterConfig.yml +++ b/doc/docfx/filterConfig.yml @@ -3,6 +3,8 @@ apiRules: uidRegex: ^.*NativeMethods$ - exclude: uidRegex: ^.*NativeStruct$ +- exclude: +uidRegex: ^.*Concrete$ - include: uidRegex: ^Efl - include: --
[EGIT] [core/efl] efl-1.22 75/119: elm/diskselector: fix handling in theme data setup
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=1eaccf79328398a9b47f29ba218e0362a8035370 commit 1eaccf79328398a9b47f29ba218e0362a8035370 Author: Mike Blumenkrantz Date: Wed May 29 09:17:07 2019 -0400 elm/diskselector: fix handling in theme data setup Summary: the previous code checked for the object which was required to execute the remainder of the function, then returned if that object existed instead of continuing with the function. hello? @fix Depends on D8956 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8957 --- src/lib/elementary/elm_diskselector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c index fd2494f00c..a018771136 100644 --- a/src/lib/elementary/elm_diskselector.c +++ b/src/lib/elementary/elm_diskselector.c @@ -784,7 +784,7 @@ _theme_data_get(Evas_Object *obj) ELM_DISKSELECTOR_DATA_GET(obj, sd); blank = eina_list_data_get(sd->right_blanks); - if (blank) return; + if (!blank) return; str = edje_object_data_get(blank, "len_threshold"); if (str) sd->len_threshold = MAX(0, atoi(str)); --
[EGIT] [core/efl] efl-1.22 101/119: elm/code: check for cursor layout existence before emitting signals to it
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=c0e9a62efe53cee62ba64a5543cc2e4732955c49 commit c0e9a62efe53cee62ba64a5543cc2e4732955c49 Author: Mike Blumenkrantz Date: Wed May 29 09:29:51 2019 -0400 elm/code: check for cursor layout existence before emitting signals to it Summary: non-editable widgets do not have this object and will trigger errors @fix Depends on D8988 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8989 --- src/lib/elementary/elm_code_widget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c index 0720a5253b..e8ea5d2495 100644 --- a/src/lib/elementary/elm_code_widget.c +++ b/src/lib/elementary/elm_code_widget.c @@ -713,7 +713,8 @@ _elm_code_widget_cursor_move(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd, _elm_code_widget_refresh(widget, line_obj); else _elm_code_widget_fill_line(widget, pd, elm_code_file_line_get(pd->code->file, pd->cursor_line)); - elm_layout_signal_emit(pd->cursor_rect, "elm,action,show,cursor", "elm"); + if (pd->editable && pd->cursor_rect) + elm_layout_signal_emit(pd->cursor_rect, "elm,action,show,cursor", "elm"); } --
[EGIT] [core/efl] efl-1.22 107/119: elm/genlist: handle genlist finding of nearest visible item when not realized
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=e45b172bebf60feca4c6c6f64f5ddcab4543a806 commit e45b172bebf60feca4c6c6f64f5ddcab4543a806 Author: Mike Blumenkrantz Date: Wed May 29 09:30:54 2019 -0400 elm/genlist: handle genlist finding of nearest visible item when not realized Summary: FIXME-- @fix Depends on D8995 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8996 --- src/lib/elementary/elm_genlist.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index b14aebb478..e0c1e7bbb7 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -3351,7 +3351,7 @@ _elm_genlist_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it) Evas_Coord ix = 0, iy = 0, iw = 0, ih = 0; // given item geometry Evas_Coord cx = 0, cy = 0, cw = 0, ch = 0; // candidate item geometry Eina_List *item_list = NULL, *l = NULL; - Elm_Object_Item *eo_item = NULL; + Elm_Object_Item *first_item, *eo_item = NULL; ELM_GENLIST_DATA_GET(obj, sd); Eina_Bool search_next = EINA_FALSE; @@ -3359,19 +3359,27 @@ _elm_genlist_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it) ELM_GENLIST_ITEM_DATA_GET(eo_it, it); evas_object_geometry_get(sd->pan_obj, &vx, &vy, &vw, &vh); - evas_object_geometry_get(VIEW(it), &ix, &iy, &iw, &ih); // FIXME: check if the item is realized or not - if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, ix, iy, iw, ih)) + if (it->realized) { -if (!elm_object_item_disabled_get(eo_it)) - return eo_it; -else - search_next = EINA_TRUE; +evas_object_geometry_get(VIEW(it), &ix, &iy, &iw, &ih); + +if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, ix, iy, iw, ih)) + { + if (!elm_object_item_disabled_get(eo_it)) + return eo_it; + else + search_next = EINA_TRUE; + } } item_list = elm_genlist_realized_items_get(obj); + /* if first realized item is before parameter item then parameter item is +* off viewport towards bottom: start at end of list */ + first_item = eina_list_data_get(item_list); + ELM_GENLIST_ITEM_DATA_GET(first_item, first_it); - if ((iy < vy) || search_next) + if ((iy < vy) || search_next || (!first_it) || (first_it->position > it->position)) { EINA_LIST_FOREACH(item_list, l, eo_item) { @@ -3401,7 +3409,7 @@ _elm_genlist_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it) } eina_list_free(item_list); - return eo_it; + return it->realized ? eo_it : NULL; } EOLIAN static void --
[EGIT] [core/efl] efl-1.22 02/119: evas_object_image: save EVAS_IMAGE_CONTENT_HINT_DYNAMIC image
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=957d0574e45e6386e8e164ae2958395d6b4794c9 commit 957d0574e45e6386e8e164ae2958395d6b4794c9 Author: Shinwoo Kim Date: Thu May 2 20:50:24 2019 +0900 evas_object_image: save EVAS_IMAGE_CONTENT_HINT_DYNAMIC image Summary: evas_gl_common_image_content_hint_set makes RGBA_Image NULL if content hint is EVAS_IMAGE_CONTENT_HINT_DYNAMIC with 'sec_tbm_surface' and 'egl_tbm_ext'. efl_file_save(_efl_canvas_image_internal_efl_file_save_save) does not work in this case because ENFN->image_data_direct_get returns FALSE. This patch makes ENFN->image_data_direct_get work but you need to free its returned data after using it. Reviewers: Hermet, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8516 --- src/lib/evas/canvas/efl_canvas_image.c | 3 +- src/lib/evas/canvas/evas_object_image.c| 5 +- src/lib/evas/include/evas_private.h| 2 +- src/modules/evas/engines/gl_generic/evas_engine.c | 76 -- .../evas/engines/software_generic/evas_engine.c| 3 +- 5 files changed, 80 insertions(+), 9 deletions(-) diff --git a/src/lib/evas/canvas/efl_canvas_image.c b/src/lib/evas/canvas/efl_canvas_image.c index 9d4c6c4594..9b19be0775 100644 --- a/src/lib/evas/canvas/efl_canvas_image.c +++ b/src/lib/evas/canvas/efl_canvas_image.c @@ -722,7 +722,8 @@ _efl_canvas_image_efl_gfx_buffer_buffer_managed_get(Eo *eo_obj, void *_pd EINA_U if (!o->buffer_data_set || !o->engine_data || !ENFN->image_data_direct_get) return slice; - ENFN->image_data_direct_get(ENC, o->engine_data, plane, &slice, &cspace, EINA_FALSE); + ENFN->image_data_direct_get(ENC, o->engine_data, plane, &slice, &cspace, EINA_FALSE, NULL); + return slice; } diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 1d9ede0de7..289ffaaa3d 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -880,6 +880,7 @@ _efl_canvas_image_internal_efl_file_save_save(const Eo *eo_obj, Evas_Image_Data Evas_Colorspace want_cspace = EVAS_COLORSPACE_ARGB; Evas_Object_Protected_Data *obj; Eina_Bool unmap_it = EINA_FALSE; + Eina_Bool tofree = EINA_FALSE; int imagew, imageh, uvw, uvh; Eina_Rw_Slice slice = {}; DATA32 *data = NULL; @@ -932,7 +933,7 @@ _efl_canvas_image_internal_efl_file_save_save(const Eo *eo_obj, Evas_Image_Data Evas_Colorspace cs; Eina_Slice sl; -ok = ENFN->image_data_direct_get(ENC, pixels, 0, &sl, &cs, EINA_TRUE); +ok = ENFN->image_data_direct_get(ENC, pixels, 0, &sl, &cs, EINA_TRUE, &tofree); if (ok && (cs == want_cspace)) data = (DATA32 *)sl.mem; } @@ -966,6 +967,8 @@ _efl_canvas_image_internal_efl_file_save_save(const Eo *eo_obj, Evas_Image_Data if (unmap_it) ENFN->image_data_unmap(ENC, pixels, &slice); + if (tofree) free(data); + if (!ok) ERR("Image save failed."); return ok; diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 5a4bd9cc5e..7d6d1c452f 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1336,7 +1336,7 @@ struct _Evas_Func void *(*image_dirty_region) (void *engine, void *image, int x, int y, int w, int h); void *(*image_data_get) (void *engine, void *image, int to_write, DATA32 **image_data, int *err, Eina_Bool *tofree); void *(*image_data_put) (void *engine, void *image, DATA32 *image_data); - Eina_Bool (*image_data_direct_get) (void *engine, void *image, int plane, Eina_Slice *slice, Evas_Colorspace *cspace, Eina_Bool load); + Eina_Bool (*image_data_direct_get) (void *engine, void *image, int plane, Eina_Slice *slice, Evas_Colorspace *cspace, Eina_Bool load, Eina_Bool *tofree); void (*image_data_preload_request) (void *engine, void *image, const Eo *target); void (*image_data_preload_cancel) (void *engine, void *image, const Eo *target, Eina_Bool force); void *(*image_alpha_set)(void *engine, void *image, int has_alpha); diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index 2659498611..90fb3fc80b 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -301,20 +301,86 @@ eng_image_file_colorspace_get(void *engine EINA_UNUSED, void *image) static Eina_Bool eng_image_data_direct_get(void *engine EINA_UNUSED, void *image, int plane, Eina_Slice *slice, Evas_Colorspace *cspace, - Eina_Bool load) +
[EGIT] [core/efl] efl-1.22 113/119: elm_widget_item_static_focus: check for adapter existence in unrealize cb
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=625c2a022719cd2cd4a705f5746a70b4999c60cf commit 625c2a022719cd2cd4a705f5746a70b4999c60cf Author: Mike Blumenkrantz Date: Wed May 29 09:31:28 2019 -0400 elm_widget_item_static_focus: check for adapter existence in unrealize cb Summary: adapter can be null if it was previously destroyed @fix Depends on D9001 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9002 --- src/lib/elementary/elm_widget_item_static_focus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_widget_item_static_focus.c b/src/lib/elementary/elm_widget_item_static_focus.c index f75aacb956..f040cbcf4c 100644 --- a/src/lib/elementary/elm_widget_item_static_focus.c +++ b/src/lib/elementary/elm_widget_item_static_focus.c @@ -68,7 +68,7 @@ _unrealized_cb(void *data, const Efl_Event *ev EINA_UNUSED) if (pd) /* if the obect is dead pd is NULL */ { //only delete the adapter when not focused, this will lead to awfull artifacts -if (!efl_ui_focus_object_focus_get(pd->adapter)) +if (pd->adapter && (!efl_ui_focus_object_focus_get(pd->adapter))) { pd->in_unrealize = EINA_TRUE; efl_del(pd->adapter); --
[EGIT] [core/efl] efl-1.22 103/119: elm/gen*: only call focus_object_setup_order_non_recursive if realized
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=188e2a141ffabeb9ede97fcc63ed47391d38c256 commit 188e2a141ffabeb9ede97fcc63ed47391d38c256 Author: Mike Blumenkrantz Date: Wed May 29 09:30:31 2019 -0400 elm/gen*: only call focus_object_setup_order_non_recursive if realized Summary: this function cannot process unrealized items @fix Depends on D8990 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8992 --- src/lib/elementary/elm_gengrid.c | 3 ++- src/lib/elementary/elm_genlist.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 24d5aa0c38..2708fee6a3 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -5867,7 +5867,8 @@ _elm_gengrid_item_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Elm_Gen _elm_widget_full_eval(wid); } - efl_ui_focus_object_setup_order_non_recursive(efl_super(obj, ELM_GENGRID_ITEM_CLASS)); + if (pd->realized) + efl_ui_focus_object_setup_order_non_recursive(efl_super(obj, ELM_GENGRID_ITEM_CLASS)); } EOLIAN static Efl_Ui_Focus_Object* diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index c82a023fd6..aaa78b89a4 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -8924,7 +8924,8 @@ _elm_genlist_item_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Elm_Gen _elm_widget_full_eval(wid); } - efl_ui_focus_object_setup_order_non_recursive(efl_super(obj, ELM_GENLIST_ITEM_CLASS)); + if (pd->realized) + efl_ui_focus_object_setup_order_non_recursive(efl_super(obj, ELM_GENLIST_ITEM_CLASS)); } EOLIAN static Eina_Bool --
[EGIT] [core/efl] efl-1.22 79/119: elm/gengrid: more null checks for setting mirrored state during construction
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=38194d9816803110fa61122a142ddcaf54a5f986 commit 38194d9816803110fa61122a142ddcaf54a5f986 Author: Mike Blumenkrantz Date: Wed May 29 09:17:55 2019 -0400 elm/gengrid: more null checks for setting mirrored state during construction Summary: sd->obj is only non-null later in construction, so add even more checks for it here @fix Depends on D8961 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8962 --- src/lib/elementary/elm_gengrid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index ae6855bad0..9405299444 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -3592,7 +3592,7 @@ _mirrored_set(Evas_Object *obj, ELM_GENGRID_DATA_GET(obj, sd); - if (efl_finalized_get(sd->obj)) + if (sd->obj && efl_finalized_get(sd->obj)) _item_cache_zero(sd); efl_ui_mirrored_set(efl_super(obj, MY_CLASS), rtl); --
[EGIT] [core/efl] efl-1.22 86/119: elm/slider: check for interval/range state before using that functionality
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=2cc5f8f9aa157cbde6f53bc810cdf55b15f0a07e commit 2cc5f8f9aa157cbde6f53bc810cdf55b15f0a07e Author: Mike Blumenkrantz Date: Wed May 29 09:22:25 2019 -0400 elm/slider: check for interval/range state before using that functionality Summary: the part elm.dragable2.slider only exists when the slider is set to range mode, so verify that this mode is active before attempting to use that part @fix Depends on D8968 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8969 --- src/lib/elementary/elm_slider.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/lib/elementary/elm_slider.c b/src/lib/elementary/elm_slider.c index 54c433eda6..25c48595fd 100644 --- a/src/lib/elementary/elm_slider.c +++ b/src/lib/elementary/elm_slider.c @@ -578,10 +578,13 @@ _elm_slider_val_fetch(Evas_Object *obj, Elm_Slider_Data *pd, Eina_Bool user_even if (efl_ui_dir_is_horizontal(sd->dir, EINA_TRUE)) pos = posx; else pos = posy; - efl_ui_drag_value_get(efl_part(wd->resize_obj, "elm.dragable2.slider"), - &posx2, &posy2); - if (efl_ui_dir_is_horizontal(sd->dir, EINA_TRUE)) pos2 = posx2; - else pos2 = posy2; + if (pd->intvl_enable) + { +efl_ui_drag_value_get(efl_part(wd->resize_obj, "elm.dragable2.slider"), + &posx2, &posy2); +if (efl_ui_dir_is_horizontal(sd->dir, EINA_TRUE)) pos2 = posx2; +else pos2 = posy2; + } rtl = efl_ui_mirrored_get(obj); if ((!rtl && _is_inverted(sd->dir)) || @@ -594,10 +597,10 @@ _elm_slider_val_fetch(Evas_Object *obj, Elm_Slider_Data *pd, Eina_Bool user_even } val = (pos * (sd->val_max - sd->val_min)) + sd->val_min; - val2 = (pos2 * (sd->val_max - sd->val_min)) + sd->val_min; if (pd->intvl_enable) { +val2 = (pos2 * (sd->val_max - sd->val_min)) + sd->val_min; if (!inverted) { if (val > id->intvl_to) @@ -638,7 +641,7 @@ _elm_slider_val_fetch(Evas_Object *obj, Elm_Slider_Data *pd, Eina_Bool user_even } } - if (fabs(val2 - id->intvl_to) > DBL_EPSILON) + if (pd->intvl_enable && fabs(val2 - id->intvl_to) > DBL_EPSILON) { id->intvl_to = val2; /* avoid emitting two events and setting a timer twice */ @@ -652,7 +655,7 @@ _elm_slider_val_fetch(Evas_Object *obj, Elm_Slider_Data *pd, Eina_Bool user_even } void -_elm_slider_val_set(Evas_Object *obj, Elm_Slider_Data *pd EINA_UNUSED) +_elm_slider_val_set(Evas_Object *obj, Elm_Slider_Data *pd) { Eina_Bool rtl; double pos, pos2; @@ -691,8 +694,9 @@ _elm_slider_val_set(Evas_Object *obj, Elm_Slider_Data *pd EINA_UNUSED) efl_ui_drag_value_set(efl_part(wd->resize_obj, "elm.dragable.slider"), pos, pos); - efl_ui_drag_value_set(efl_part(wd->resize_obj, "elm.dragable2.slider"), - pos2, pos2); + if (pd->intvl_enable) + efl_ui_drag_value_set(efl_part(wd->resize_obj, "elm.dragable2.slider"), + pos2, pos2); // emit accessibility event also if value was changed by API if (_elm_config->atspi_mode) --
[EGIT] [core/efl] efl-1.22 118/119: tests/elm_focus: explicitly set widgets to expand+fill in test
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=57dc7cec55254b6d4923c3d6978bbfe2710c298e commit 57dc7cec55254b6d4923c3d6978bbfe2710c298e Author: Mike Blumenkrantz Date: Wed May 29 09:32:06 2019 -0400 tests/elm_focus: explicitly set widgets to expand+fill in test Summary: some widgets do not create a minimum size for themselves, resulting in a 0x0 layout which can affect tests that rely on object visibility to succeed without errors Depends on D9007 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9008 --- src/tests/elementary/elm_test_widget_focus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/elementary/elm_test_widget_focus.c b/src/tests/elementary/elm_test_widget_focus.c index 6b8ac871ea..40753b6cc6 100644 --- a/src/tests/elementary/elm_test_widget_focus.c +++ b/src/tests/elementary/elm_test_widget_focus.c @@ -168,6 +168,8 @@ EFL_START_TEST(elm_test_widget_focus_simple_widget) for (int i = 0; simple_widgets[i].name; ++i) { o = simple_widgets[i].constructor(win); +evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); +evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_box_pack_end(box, o); evas_object_show(o); --
[EGIT] [core/efl] efl-1.22 01/119: edje doc: fix corrupted grouping.
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=3bcd52d5cbece4cc99f0ace7adc4b1db9852a3db commit 3bcd52d5cbece4cc99f0ace7adc4b1db9852a3db Author: Hermet Park Date: Thu May 2 18:37:38 2019 +0900 edje doc: fix corrupted grouping. there were some corrupted pair of group scopes, Edje class size, text were under the both Edje Object and Edje Part Edje Communication Interface Message, Edje Perspective were wrongly same. Swallow, Box, Tabe were under the Edje Text Part. This fixes all of them. --- src/lib/edje/Edje_Common.h | 807 +++-- src/lib/edje/Edje_Legacy.h | 111 +++ 2 files changed, 456 insertions(+), 462 deletions(-) diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h index 66b8216dda..aa6b66267f 100644 --- a/src/lib/edje/Edje_Common.h +++ b/src/lib/edje/Edje_Common.h @@ -80,6 +80,39 @@ struct _Edje_Size_Class Evas_Coordmaxh; }; +/** + * @defgroup Edje_Object_Communication_Interface_Message Edje Communication Interface: Message + * @ingroup Edje_Object_Group + * + * @brief Functions that deal with messages. + * + * Edje has two communication interfaces between @b code and @b theme. + * Signals and messages. + * + * Edje messages are one of the communication interfaces between + * @b code and a given Edje object's @b theme. With messages, one can + * communicate values like strings, float numbers and integer + * numbers. Moreover, messages can be identified by integer + * numbers. See #Edje_Message_Type for the full list of message types. + * + * @note Messages must be handled by scripts. + * + * @{ + */ + +/** + * @brief Processes all queued up edje messages. + * + * This function triggers the processing of messages addressed to any + * (alive) edje objects. + * + */ +EAPI void edje_message_signal_process (void); + +/** + * @} + */ + /** * @defgroup Edje_Object_Communication_Interface_Signal Edje Communication Interface: Signal * @ingroup Edje_Object_Group @@ -112,6 +145,98 @@ typedef Efl_Signal_Cb Edje_Signal_Cb; */ EAPI void * edje_object_signal_callback_extra_data_get(void); + +#ifdef EFL_BETA_API_SUPPORT +/** + * @brief Gets seat data passed to callbacks. + * + * @return The seat data for that callback. + * + * When a callback is initiated by an input event from a seat, we try to + * provide seat information with it. + * + * Signals fired as programmed responses to these signals will also try + * to carry the seat data along. + * + * This returns an opaque pointer to the seat data. + * + * @see edje_object_signal_callback_add() for more on Edje signals. + * @since 1.21 + */ +EAPI void *edje_object_signal_callback_seat_data_get(void); +#endif + + + +/** + * @} + */ + +/** + * @defgroup Edje_Audio Edje Audio + * @ingroup Edje + * + * @brief Functions to manipulate audio abilities in edje. + * + * Perspective is a graphical tool that makes objects represented in 2D + * look like they have a 3D appearance. + * + * Edje allows us to use perspective on any edje object. This group of + * functions deal with the use of perspective, by creating and configuring + * a perspective object that must set to a edje object or a canvas, + * affecting all the objects inside that have no particular perspective + * set already. + * + * @{ + */ + +/** + * Identifiers of Edje message types, which can be sent back and forth + * code and a given Edje object's theme file/group. + * + * @see edje_audio_channel_mute_set() + * @see edje_audio_channel_mute_get() + * + * @since 1.9 + */ +typedef enum _Edje_Channel +{ + EDJE_CHANNEL_EFFECT = 0, /**< Standard audio effects */ + EDJE_CHANNEL_BACKGROUND = 1, /**< Background audio sounds */ + EDJE_CHANNEL_MUSIC = 2, /**< Music audio */ + EDJE_CHANNEL_FOREGROUND = 3, /**< Foreground audio sounds */ + EDJE_CHANNEL_INTERFACE = 4, /**< Sounds related to the interface */ + EDJE_CHANNEL_INPUT = 5, /**< Sounds related to regular input */ + EDJE_CHANNEL_ALERT = 6, /**< Sounds for major alerts */ + EDJE_CHANNEL_ALL = 7 /**< All audio channels (convenience) */ +} Edje_Channel; + +/** + * @brief Sets the mute state of audio for the process as a whole. + * + * @param channel The channel to set the mute state of + * @param mute The mute state + * + * This sets the mute (no output) state of audio for the given channel. + * + * @see edje_audio_channel_mute_get() + * + * @since 1.9 + */ +EAPI void edje_audio_channel_mute_set(Edje_Channel channel, Eina_Bool mute); + +/** + * @brief Gets the mute state of the given channel. + * + * @param channel The channel to get the mute state of + * @return The mute state of the channel + * + * @see edje_audio_channel_mute_set() + * + * @since 1.9 + */ +EAPI Eina_Bool edje_audio_channel_mute_get(Edje_Channel channel); + /** * @} */ @@ -917,6 +1042,48 @@ EAPI const Edje_External_Type *edje_external_type_get (const char * * @{
[EGIT] [core/efl] efl-1.22 84/119: elm/map: ignore zoom events during construction which cannot be handled
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=25f3766f32fadacbe5622851426a091ca18fcdd3 commit 25f3766f32fadacbe5622851426a091ca18fcdd3 Author: Mike Blumenkrantz Date: Wed May 29 09:18:26 2019 -0400 elm/map: ignore zoom events during construction which cannot be handled Summary: sd->obj is null until after the object is finalized, so this codepath cannot be processed until then @fix Depends on D8966 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8967 --- src/lib/elementary/elm_map.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c index 71deea0b58..469e9a67ef 100644 --- a/src/lib/elementary/elm_map.c +++ b/src/lib/elementary/elm_map.c @@ -1159,14 +1159,16 @@ _zoom_do(Elm_Map_Data *sd, ecore_timer_del(sd->zoom_timer); sd->zoom_timer = NULL; } - else + else if (sd->obj) efl_event_callback_legacy_call (sd->obj, EFL_UI_EVENT_ZOOM_START, NULL); if (sd->obj) - sd->zoom_timer = ecore_timer_add(0.25, _zoom_timeout_cb, sd->obj); - efl_event_callback_legacy_call - (sd->obj, EFL_UI_EVENT_ZOOM_CHANGE, NULL); + { +sd->zoom_timer = ecore_timer_add(0.25, _zoom_timeout_cb, sd->obj); +efl_event_callback_legacy_call + (sd->obj, EFL_UI_EVENT_ZOOM_CHANGE, NULL); + } efl_event_callback_legacy_call (sd->pan_obj, ELM_PAN_EVENT_CHANGED, NULL); --
[EGIT] [core/efl] efl-1.22 23/119: elementary genlist: fix potential uninitialized variable.
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=1a90af6f76bbac28680ca2870b03aeae34d6705f commit 1a90af6f76bbac28680ca2870b03aeae34d6705f Author: Vincent Torri Date: Fri May 10 10:01:59 2019 -0400 elementary genlist: fix potential uninitialized variable. Test Plan: compilation Reviewers: raster, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8874 --- src/lib/elementary/elm_genlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 0a893b72d0..c82a023fd6 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -6768,7 +6768,7 @@ _elm_genlist_item_sorted_insert(Eo *obj, Elm_Genlist_Data *sd, const Elm_Genlist { // Inlist is not sorted! Elm_Gen_Item *prev_rel = NULL; - int cmp; + int cmp = 0; EINA_INLIST_FOREACH(sd->items, rel) { --
[EGIT] [core/efl] efl-1.22 77/119: elm/entry: use edje functions directly for interacting with edje objects
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=50134d81ece9200e96f594973e7ec38f6a81cf5e commit 50134d81ece9200e96f594973e7ec38f6a81cf5e Author: Mike Blumenkrantz Date: Wed May 29 09:17:18 2019 -0400 elm/entry: use edje functions directly for interacting with edje objects Summary: this eliminates a number of errors triggered when processing class hierarchy to reach the desired subobject with these edje functions @fix Depends on D8958 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8959 --- src/lib/elementary/elm_entry.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index f749522143..03a54d8c53 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -1385,19 +1385,19 @@ _show_region_hook(void *data EINA_UNUSED, Evas_Object *obj, Eina_Rect r) } EOLIAN static Eina_Bool -_elm_entry_efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, Evas_Object *sobj) +_elm_entry_efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Entry_Data *sd, Evas_Object *sobj) { Eina_Bool ret = EINA_FALSE; /* unfortunately entry doesn't follow the signal pattern * elm,state,icon,{visible,hidden}, so we have to replicate this * smart function */ - if (sobj == elm_layout_content_get(obj, "elm.swallow.icon")) + if (sobj == edje_object_part_swallow_get(sd->scr_edje, "elm.swallow.icon")) { -elm_layout_signal_emit(obj, "elm,action,hide,icon", "elm"); +edje_object_signal_emit(sd->scr_edje, "elm,action,hide,icon", "elm"); } - else if (sobj == elm_layout_content_get(obj, "elm.swallow.end")) + else if (sobj == edje_object_part_swallow_get(sd->scr_edje, "elm.swallow.end")) { -elm_layout_signal_emit(obj, "elm,action,hide,end", "elm"); +edje_object_signal_emit(sd->scr_edje, "elm,action,hide,end", "elm"); } ret = elm_widget_sub_object_del(efl_super(obj, MY_CLASS), sobj); @@ -5217,27 +5217,27 @@ _elm_entry_scrollable_get(const Eo *obj EINA_UNUSED, Elm_Entry_Data *sd) } EOLIAN static void -_elm_entry_icon_visible_set(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, Eina_Bool setting) +_elm_entry_icon_visible_set(Eo *obj, Elm_Entry_Data *sd, Eina_Bool setting) { - if (!elm_layout_content_get(obj, "elm.swallow.icon")) return; + if (!edje_object_part_swallow_get(sd->scr_edje, "elm.swallow.icon")) return; if (setting) - elm_layout_signal_emit(obj, "elm,action,show,icon", "elm"); + edje_object_signal_emit(sd->scr_edje, "elm,action,show,icon", "elm"); else - elm_layout_signal_emit(obj, "elm,action,hide,icon", "elm"); + edje_object_signal_emit(sd->scr_edje, "elm,action,hide,icon", "elm"); elm_layout_sizing_eval(obj); } EOLIAN static void -_elm_entry_end_visible_set(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, Eina_Bool setting) +_elm_entry_end_visible_set(Eo *obj, Elm_Entry_Data *sd, Eina_Bool setting) { - if (!elm_layout_content_get(obj, "elm.swallow.end")) return; + if (!edje_object_part_swallow_get(sd->scr_edje, "elm.swallow.end")) return; if (setting) - elm_layout_signal_emit(obj, "elm,action,show,end", "elm"); + edje_object_signal_emit(sd->scr_edje, "elm,action,show,end", "elm"); else - elm_layout_signal_emit(obj, "elm,action,hide,end", "elm"); + edje_object_signal_emit(sd->scr_edje, "elm,action,hide,end", "elm"); elm_layout_sizing_eval(obj); } --
[EGIT] [core/efl] efl-1.22 26/119: efl_canvas_animation: reply on the correct API
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=27a220f2ecfd1e7e9b9651481e322df483e05ba9 commit 27a220f2ecfd1e7e9b9651481e322df483e05ba9 Author: Marcel Hollerbach Date: Mon Apr 29 11:11:10 2019 +0200 efl_canvas_animation: reply on the correct API the animation itself does not implement the player interface, and nothing forces it to do so. Additionally, we should ask the reference object for the current progress. Not the animation object. This fixes pos_set / pos_get. Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D8783 --- src/lib/evas/canvas/efl_canvas_animation_player.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.c b/src/lib/evas/canvas/efl_canvas_animation_player.c index 063f932d49..42fb2c4127 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_player.c +++ b/src/lib/evas/canvas/efl_canvas_animation_player.c @@ -286,9 +286,9 @@ _efl_canvas_animation_player_efl_player_pos_get(const Eo *eo_obj, { //TODO: this is not correct Efl_Canvas_Animation *anim = efl_animation_player_animation_get(eo_obj); - double length = efl_player_length_get(anim); + double length = efl_animation_duration_get(anim); - return length * efl_player_progress_get(anim); + return length * efl_player_progress_get(eo_obj); } EOLIAN static void @@ -301,7 +301,7 @@ _efl_canvas_animation_player_efl_player_pos_set(Eo *eo_obj, return; EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); - double length = efl_player_length_get(anim); + double length = efl_animation_duration_get(anim); pd->progress = sec / length; efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj)); } --
[EGIT] [core/efl] efl-1.22 09/119: model: Add some missing docs bits.
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=0ddffe74aba6029daa4b7b1c80ddd647184022c5 commit 0ddffe74aba6029daa4b7b1c80ddd647184022c5 Author: Lauro Moura Date: Fri May 3 15:30:00 2019 +0200 model: Add some missing docs bits. Reviewers: cedric, segfaultxavi Reviewed By: cedric, segfaultxavi Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8810 --- src/lib/efl/interfaces/efl_model.eo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/efl/interfaces/efl_model.eo b/src/lib/efl/interfaces/efl_model.eo index 981158f9be..d9d789d556 100644 --- a/src/lib/efl/interfaces/efl_model.eo +++ b/src/lib/efl/interfaces/efl_model.eo @@ -83,9 +83,9 @@ interface @beta Efl.Model The future can also be canceled if the model itself gets destroyed. ]] params { - @in property: string; + @in property: string; [[Property name.]] } - return: future; + return: future; [[Future to be resolved when the property changes to anything other than error:EAGAIN]] } children_slice_get { [[Get children slice OR full range. --
[EGIT] [core/efl] efl-1.22 91/119: eldbus: don't print warnings for user-canceled calls
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=97f8c738efbe41f29e2b675a8c85dd334248e701 commit 97f8c738efbe41f29e2b675a8c85dd334248e701 Author: Mike Blumenkrantz Date: Wed May 29 09:23:44 2019 -0400 eldbus: don't print warnings for user-canceled calls Summary: these are intentionally canceled and not something to be concerned with @fix Depends on D8974 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8976 --- src/lib/eldbus/eldbus_proxy.c | 6 -- src/lib/elementary/elm_atspi_bridge.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/eldbus/eldbus_proxy.c b/src/lib/eldbus/eldbus_proxy.c index fdd4fc7b3a..a28fe9f0e4 100644 --- a/src/lib/eldbus/eldbus_proxy.c +++ b/src/lib/eldbus/eldbus_proxy.c @@ -814,8 +814,10 @@ _props_get_all(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending) if (eldbus_message_error_get(msg, &name, &error_msg)) { -WRN("Error getting all properties of %s %s, error message: %s %s", -proxy->obj->name, proxy->obj->path, name, error_msg); +/* don't print warnings for user-canceled calls */ +if (!eina_streq(name, "org.enlightenment.DBus.Canceled")) + WRN("Error getting all properties of %s %s, error message: %s %s", + proxy->obj->name, proxy->obj->path, name, error_msg); return; } diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index 9341b64981..6ec5fd7729 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -4510,7 +4510,9 @@ _screen_reader_enabled_get(void *data, const Eldbus_Message *msg, Eldbus_Pending if (eldbus_message_error_get(msg, &errname, &errmsg)) { -WRN("%s %s", errname, errmsg); +/* don't print warnings for user-canceled calls */ +if (!eina_streq(errname, "org.enlightenment.DBus.Canceled")) + WRN("%s %s", errname, errmsg); return; } if (!eldbus_message_arguments_get(msg, "v", &variant)) --
[EGIT] [core/efl] efl-1.22 29/119: eina - value - test - cats warnings on 32bit to get some silence
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=096d99f6f89c868aab6007d6eee572acf7f16f05 commit 096d99f6f89c868aab6007d6eee572acf7f16f05 Author: Carsten Haitzler (Rasterman) Date: Mon May 13 14:12:28 2019 +0100 eina - value - test - cats warnings on 32bit to get some silence longs will be truncated on 32bit in these tests so be explicit to not have warinings. note - eina value tests are broken on 32bit anyway already - the conversions to/from long types are broken and fail. this doesn't fix that. --- src/tests/eina/eina_test_value.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/eina/eina_test_value.c b/src/tests/eina/eina_test_value.c index a9e6e47de2..fc137df621 100644 --- a/src/tests/eina/eina_test_value.c +++ b/src/tests/eina/eina_test_value.c @@ -100,7 +100,7 @@ EFL_START_TEST(eina_value_test_simple) fail_unless(eina_value_int64_get(value, &i64)); fail_if(eina_value_long_get(value, &l)); fail_unless(eina_value_long_convert(value, &l)); - fail_unless(l == 0x0011223344556677); + fail_unless(l == (long)0x0011223344556677); fail_unless(i64 == 0x0011223344556677); eina_value_flush(value); @@ -157,7 +157,7 @@ EFL_START_TEST(eina_value_test_simple) fail_unless(eina_value_uint64_get(value, &u64)); fail_if(eina_value_ulong_get(value, &ul)); fail_unless(eina_value_ulong_convert(value, &ul)); - fail_unless(ul == 0x1122334455667788); + fail_unless(ul == (unsigned long)0x1122334455667788); fail_unless(u64 == 0x1122334455667788); eina_value_flush(value); --
[EGIT] [core/efl] efl-1.22 87/119: efl_ui/button: check icon swallow existence before getting its content
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=ff1dfde419109ab7df611eb86dbc763a1c66949c commit ff1dfde419109ab7df611eb86dbc763a1c66949c Author: Mike Blumenkrantz Date: Wed May 29 09:23:12 2019 -0400 efl_ui/button: check icon swallow existence before getting its content Summary: some button styles do not have this part @fix Depends on D8970 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8971 --- src/lib/elementary/efl_ui_button.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/efl_ui_button.c b/src/lib/elementary/efl_ui_button.c index a3c1c4dbfc..5e13b83787 100644 --- a/src/lib/elementary/efl_ui_button.c +++ b/src/lib/elementary/efl_ui_button.c @@ -430,6 +430,7 @@ _icon_signal_emit(Evas_Object *obj) char buf[64]; if (!elm_widget_resize_object_get(obj)) return; + if (!edje_object_part_exists(obj, "elm.swallow.content")) return; snprintf(buf, sizeof(buf), "elm,state,icon,%s", elm_layout_content_get(obj, "icon") ? "visible" : "hidden"); --
[EGIT] [core/efl] efl-1.22 44/119: efl_mono: generate efl_canvas_text.eo.cs
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=1e1b126794e3618da175f1aaa02cbb03c855e594 commit 1e1b126794e3618da175f1aaa02cbb03c855e594 Author: Jaehyun Cho Date: Fri May 17 17:35:00 2019 +0900 efl_mono: generate efl_canvas_text.eo.cs To use canvas text in efl csharp bindings, it is permitted to generate efl_canvas_text.eo.cs. --- src/Makefile_Efl_Mono.am | 1 - src/bindings/mono/meson.build | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am index 5c6d57e626..64c171ba93 100644 --- a/src/Makefile_Efl_Mono.am +++ b/src/Makefile_Efl_Mono.am @@ -130,7 +130,6 @@ include Makefile_Eolian_Mono_Helper.am ### Efl C Sharp Binding evas_eolian_blacklisted_files = \ -lib/evas/canvas/efl_canvas_text.eo.cs \ lib/evas/canvas/efl_canvas_scene3d.eo.cs \ lib/evas/canvas/evas_canvas3d_camera.eo.cs \ lib/evas/canvas/evas_canvas3d_light.eo.cs \ diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build index e7c5e00d9a..0e0d5e38e9 100644 --- a/src/bindings/mono/meson.build +++ b/src/bindings/mono/meson.build @@ -42,7 +42,6 @@ mono_sublibs = [ blacklisted_files = [ 'efl_class.eo', - 'efl_canvas_text.eo', 'efl_canvas_scene3d.eo', 'evas_canvas3d_camera.eo', 'evas_canvas3d_light.eo', --
[EGIT] [core/efl] efl-1.22 24/119: libunibreak: add missing __has_attribute definitions for old compilers
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=727fd04740285b6760fe353592a10db147c6 commit 727fd04740285b6760fe353592a10db147c6 Author: Romain Naour Date: Tue Apr 16 21:33:44 2019 +0200 libunibreak: add missing __has_attribute definitions for old compilers __has_attribute has been introduced with gcc 5 [1]. [1] https://www.gnu.org/software/gcc/gcc-5/changes.html Fixes: http://autobuild.buildroot.net/results/64ab825048fac1654b0d0698740ddf857fcc0afa/build-end.log Signed-off-by: Cedric BAIL --- src/static_libs/libunibreak/wordbreak.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/static_libs/libunibreak/wordbreak.c b/src/static_libs/libunibreak/wordbreak.c index 017e0fd091..50c830c7cc 100644 --- a/src/static_libs/libunibreak/wordbreak.c +++ b/src/static_libs/libunibreak/wordbreak.c @@ -209,6 +209,9 @@ static void set_wordbreaks( posLast = posCur; break; } +#ifndef __has_attribute +# define __has_attribute(x) 0 +#endif #if __has_attribute(fallthrough) __attribute__((fallthrough)); #endif @@ -325,6 +328,9 @@ static void set_wordbreaks( wbcSeqStart = wbcCur; posLast = posCur; } +#ifndef __has_attribute +# define __has_attribute(x) 0 +#endif #if __has_attribute(fallthrough) __attribute__((fallthrough)); #endif --
[EGIT] [core/efl] efl-1.22 89/119: ecore-x: protect ecore_x_shutdown from creating a negative init count
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=846ea9373a32f3a0624b12929a2f7d05e9b91a29 commit 846ea9373a32f3a0624b12929a2f7d05e9b91a29 Author: Mike Blumenkrantz Date: Wed May 29 09:23:23 2019 -0400 ecore-x: protect ecore_x_shutdown from creating a negative init count Summary: @fix Depends on D8972 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8973 --- src/lib/ecore_x/ecore_x.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/lib/ecore_x/ecore_x.c b/src/lib/ecore_x/ecore_x.c index ae357df542..a6695e9b19 100644 --- a/src/lib/ecore_x/ecore_x.c +++ b/src/lib/ecore_x/ecore_x.c @@ -889,6 +889,11 @@ _ecore_x_shutdown2(void) EAPI int ecore_x_shutdown(void) { + if (!_ecore_x_init_count) + { +CRI("Calling ecore_x_shutdown without init! BUG!"); +return 0; + } if (--_ecore_x_init_count != 0) return _ecore_x_init_count; if (_ecore_x_shutdown()) return _ecore_x_init_count; --
[EGIT] [core/efl] efl-1.22 13/119: elm_entry: speed up setting text (check if same text is already set), fix setting same text pointer
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=546805650ea7e8c0c6fa61306c09c6dfff11b35f commit 546805650ea7e8c0c6fa61306c09c6dfff11b35f Author: Ali Alzyod Date: Tue Apr 23 15:46:47 2019 + elm_entry: speed up setting text (check if same text is already set), fix setting same text pointer This patch deal with two cases: 1- Setting text in Entry (elm_entry_entry_set) , as the one get using (elm_entry_entry_get), caused the entry to become empty. * becase entry string was free inside the elm_entry_entry_set function, without checking new passed string. Now we check if same string was passed to the function, then nothing need to be changed. ``` // Old Behaviour : Entry will become empty // New Behaviour : Entry will Skip setting same text elm_entry_entry_set(app->entry, elm_entry_entry_get(app->entry)); ``` 2- Setting text in Entry (elm_entry_entry_set) , with same content string. * internally entry will set empty string then set passed string, which will case recalculation and re-render the entry element. Now we check if same string data that is passed to the function is the same of the entry content, then nothing need to be changed. ``` // This will be skiped internally since same text is set elm_entry_entry_set(app->entry, "a"); elm_entry_entry_set(app->entry, "a"); //skipped ``` Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8572 --- src/lib/elementary/elm_entry.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index 7478a40fd8..2a6ad77518 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -3314,6 +3314,7 @@ static Eina_Bool _elm_entry_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, const char *entry) { int len = 0; + const char * current_text = NULL; if (!entry) entry = ""; if (!_elm_layout_part_aliasing_eval(obj, &part, EINA_TRUE)) @@ -3327,8 +3328,6 @@ _elm_entry_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, const char *e } evas_event_freeze(evas_object_evas_get(obj)); - ELM_SAFE_FREE(sd->text, eina_stringshare_del); - sd->changed = EINA_TRUE; /* Clear currently pending job if there is one */ if (sd->append_text_idler) @@ -3345,6 +3344,14 @@ _elm_entry_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, const char *e sd->append_text_left = NULL; } + /* If old and new text are the same do nothing */ + current_text = edje_object_part_text_get(sd->entry_edje, "elm.text"); + if (current_text == entry || !strcmp(entry, current_text)) + goto done; + + ELM_SAFE_FREE(sd->text, eina_stringshare_del); + sd->changed = EINA_TRUE; + /* Need to clear the entry first */ sd->cursor_pos = edje_object_part_text_cursor_pos_get (sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN); @@ -3356,6 +3363,7 @@ _elm_entry_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, const char *e else _elm_entry_guide_update(obj, EINA_FALSE); +done: evas_event_thaw(evas_object_evas_get(obj)); evas_event_thaw_eval(evas_object_evas_get(obj)); return EINA_TRUE; --
[EGIT] [core/efl] efl-1.22 19/119: eio: correctly set reference count of cached child object.
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=98b00ab6ac8c941eefc12ce589d017cc587cd025 commit 98b00ab6ac8c941eefc12ce589d017cc587cd025 Author: Cedric BAIL Date: Thu Apr 25 15:38:20 2019 -0700 eio: correctly set reference count of cached child object. Reviewed-by: SangHyeon Jade Lee Differential Revision: https://phab.enlightenment.org/D8793 --- src/lib/eio/efl_io_model.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/eio/efl_io_model.c b/src/lib/eio/efl_io_model.c index 300dac0e21..185af29061 100644 --- a/src/lib/eio/efl_io_model.c +++ b/src/lib/eio/efl_io_model.c @@ -956,6 +956,8 @@ _efl_io_model_efl_model_children_slice_get(Eo *obj, Efl_Io_Model_Data *pd, // NOTE: We are assuming here that the parent model will outlive all its children child_data->filter.cb = pd->filter.cb, child_data->filter.data = pd->filter.data); +else + efl_ref(info->object); eina_value_array_append(&array, info->object); efl_wref_add(info->object, &info->object); --
[EGIT] [core/efl] efl-1.22 94/119: efl_ui/layout: do not trigger sizing eval on subobj delete if layout is dead
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=5498f65275f56ddd5cb73eab0c067ab347e47d93 commit 5498f65275f56ddd5cb73eab0c067ab347e47d93 Author: Mike Blumenkrantz Date: Wed May 29 09:26:08 2019 -0400 efl_ui/layout: do not trigger sizing eval on subobj delete if layout is dead Summary: @fix Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8980 --- src/lib/elementary/efl_ui_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index 6cf5c4cfe1..3be4eb3334 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -576,7 +576,7 @@ _efl_ui_layout_base_efl_ui_widget_widget_sub_object_del(Eo *obj, Efl_Ui_Layout_D } // No need to resize object during destruction - if (wd->resize_obj && (!efl_invalidated_get(obj))) + if (wd->resize_obj && efl_alive_get(obj)) elm_layout_sizing_eval(obj); return EINA_TRUE; --
[EGIT] [core/efl] efl-1.22 18/119: navigation_layout: set efl.content y-axis align to 0.0
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=b21263b0fe8f2e756baa77b185a57e938599ccaa commit b21263b0fe8f2e756baa77b185a57e938599ccaa Author: Yeongjong Lee Date: Thu May 9 15:42:13 2019 +0900 navigation_layout: set efl.content y-axis align to 0.0 Summary: If `efl.content` min size is greater than edc area size, `efl.bar` and `efl.content` are overlapped because default y-align is 0.5. This patch avoid it. Test Plan: Sample code: ``` // gcc -o efl_ui_stack_example efl_ui_stack_example.c `pkg-config --cflags --libs elementary` EAPI_MAIN void efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) { Eo *win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get()); Eo *stack = efl_add(EFL_UI_STACK_CLASS, win); efl_content_set(win, stack); Eo *nl = efl_add(EFL_UI_NAVIGATION_LAYOUT_CLASS, stack, efl_ui_stack_push(stack, efl_added)); Eo *bn = efl_add(EFL_UI_NAVIGATION_BAR_CLASS, stack); efl_text_set(bn, "Title Text"); efl_ui_navigation_layout_bar_set(nl, bn); Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, nl, efl_text_set(efl_added, "Button 1"), efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(50, 80)), efl_content_set(nl, efl_added)); efl_gfx_entity_size_set(win, EINA_SIZE2D(100, 80)); } EFL_MAIN() ``` Reviewers: Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8868 --- data/elementary/themes/edc/efl/navigation_layout.edc | 1 + 1 file changed, 1 insertion(+) diff --git a/data/elementary/themes/edc/efl/navigation_layout.edc b/data/elementary/themes/edc/efl/navigation_layout.edc index 4319453b96..9947d6d313 100644 --- a/data/elementary/themes/edc/efl/navigation_layout.edc +++ b/data/elementary/themes/edc/efl/navigation_layout.edc @@ -21,6 +21,7 @@ group { "efl/navigation_layout"; relative: 0.0 1.0; } rel2.to_x: "base"; +align: 0.5 0.0; } } } --
[EGIT] [core/efl] efl-1.22 83/119: elm: fix value of datadir when running in tree
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=67e9e1cad489402c5fbbe51078c8e0661efacdf9 commit 67e9e1cad489402c5fbbe51078c8e0661efacdf9 Author: Mike Blumenkrantz Date: Wed May 29 09:18:20 2019 -0400 elm: fix value of datadir when running in tree Summary: this makes it possible to successfully run elm_test out of the tree without installing @fix Depends on D8965 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8966 --- src/lib/elementary/elm_main.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c index 6913901bb5..4f86977eb3 100644 --- a/src/lib/elementary/elm_main.c +++ b/src/lib/elementary/elm_main.c @@ -587,7 +587,22 @@ elm_app_data_dir_get(void) if (app_data_dir) return app_data_dir; _prefix_check(); if (!app_pfx) return ""; - app_data_dir = eina_prefix_data_get(app_pfx); + /* only used to run inside efl src tree */ + if (getenv("EFL_RUN_IN_TREE")) + { +/* "/some/path/to/repo/build/src" */ +const char *path = elm_app_prefix_dir_get(); +/* "/some/path/to/repo/build/" */ +const char *last_sep = strrchr(path, '/'); +Eina_Strbuf *buf = eina_strbuf_new(); +eina_strbuf_append_length(buf, path, last_sep - path + 1); +eina_strbuf_append(buf, "data/elementary"); +app_data_dir = eina_strbuf_string_steal(buf); +eina_strbuf_free(buf); +/* yes this leaks app_data_dir but it's a one time allocation who cares */ + } + else + app_data_dir = eina_prefix_data_get(app_pfx); return app_data_dir; } --
[EGIT] [core/efl] efl-1.22 102/119: elm/gengrid: trigger unrealize event after unsetting unrealized flag
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=8849a0daeed862634c17773f6dbbadff27832149 commit 8849a0daeed862634c17773f6dbbadff27832149 Author: Mike Blumenkrantz Date: Wed May 29 09:29:57 2019 -0400 elm/gengrid: trigger unrealize event after unsetting unrealized flag Summary: this flag is accessed by other components (e.g., focus) during the event and so it must reflect the emitted event @fix Depends on D8989 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8990 --- src/lib/elementary/elm_gengrid.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index abd4ad209e..24d5aa0c38 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -1255,8 +1255,7 @@ _elm_gengrid_item_unrealize(Elm_Gen_Item *it, if (GG_IT(it)->wsd->reorder_it == it) return; evas_event_freeze(evas_object_evas_get(WIDGET(it))); - if (!calc) - efl_event_callback_legacy_call(WIDGET(it), ELM_GENGRID_EVENT_UNREALIZED, EO_OBJ(it)); + ELM_SAFE_FREE(it->long_timer, ecore_timer_del); _view_clear(VIEW(it), &(it->texts), NULL); @@ -1268,6 +1267,8 @@ _elm_gengrid_item_unrealize(Elm_Gen_Item *it, it->realized = EINA_FALSE; it->want_unrealize = EINA_FALSE; + if (!calc) + efl_event_callback_legacy_call(WIDGET(it), ELM_GENGRID_EVENT_UNREALIZED, EO_OBJ(it)); { ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd); --
[EGIT] [core/efl] efl-1.22 22/119: Ecore_Exe: fix warning on Windows
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=48ed63bf3e69d3113b4ea8fe8ca35f66ebf4f4b7 commit 48ed63bf3e69d3113b4ea8fe8ca35f66ebf4f4b7 Author: Vincent Torri Date: Thu May 9 14:09:08 2019 -0400 Ecore_Exe: fix warning on Windows Summary: ExitProcess() has not the signature expected by CreateRemoteThread() Test Plan: compilation Reviewers: raster, zmike, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8870 --- src/lib/ecore/ecore_exe_win32.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c index 7ca179a482..69e80dafbf 100644 --- a/src/lib/ecore/ecore_exe_win32.c +++ b/src/lib/ecore/ecore_exe_win32.c @@ -260,6 +260,15 @@ _ecore_exe_thread_procedure(LPVOID data EINA_UNUSED) return 1; } +static DWORD __stdcall +_ecore_exe_exit_process(void *data) +{ + UINT *code; + code = (UINT *)data; + ExitProcess(*code); + return 1; +} + static BOOL CALLBACK _ecore_exe_enum_windows_procedure(HWND window, LPARAM data) @@ -267,6 +276,7 @@ _ecore_exe_enum_windows_procedure(HWND window, Ecore_Exe *obj = (Ecore_Exe *) data; Ecore_Exe_Data *exe = efl_data_scope_get(obj, ECORE_EXE_CLASS); DWORD thread_id; + UINT code = 0; if (!exe) return EINA_FALSE; thread_id = GetWindowThreadProcessId(window, NULL); @@ -295,7 +305,8 @@ _ecore_exe_enum_windows_procedure(HWND window, /* Exit process */ if (CreateRemoteThread(exe->process, NULL, 0, - (LPTHREAD_START_ROUTINE)ExitProcess, NULL, + (LPTHREAD_START_ROUTINE)_ecore_exe_exit_process, + &code, 0, NULL)) return EINA_FALSE; --
[EGIT] [core/efl] efl-1.22 96/119: efl_ui/progressbar: check for part existence before using parts
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=f8ce1c057846d4ecc8732e0bcd1ee1ed73d6b576 commit f8ce1c057846d4ecc8732e0bcd1ee1ed73d6b576 Author: Mike Blumenkrantz Date: Wed May 29 09:28:47 2019 -0400 efl_ui/progressbar: check for part existence before using parts Summary: some progressbar styles do not have certain parts, so it's necessary to check part existence on theme load to avoid triggering unnecessary errors @fix Depends on D8981 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8982 --- src/lib/elementary/efl_ui_progressbar.c | 68 - src/lib/elementary/efl_ui_progressbar_private.h | 3 ++ 2 files changed, 48 insertions(+), 23 deletions(-) diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c index c65d9bdcff..bbe0b0b86f 100644 --- a/src/lib/elementary/efl_ui_progressbar.c +++ b/src/lib/elementary/efl_ui_progressbar.c @@ -44,13 +44,14 @@ static const Elm_Layout_Part_Alias_Description _content_aliases[] = }; static Efl_Ui_Progress_Status * -_progress_status_new(const char *part_name, double val) +_progress_status_new(const char *part_name, double val, Eina_Bool exists) { Efl_Ui_Progress_Status *ps; ps = calloc(1, sizeof(Efl_Ui_Progress_Status)); if (!ps) return NULL; ps->part_name = eina_stringshare_add(part_name); ps->val = val; + ps->part_exists = exists; return ps; } @@ -114,14 +115,16 @@ _units_set(Evas_Object *obj) eina_strbuf_reset(sd->format_strbuf); sd->format_cb(sd->format_cb_data, sd->format_strbuf, val); +eina_value_flush(&val); + +if (!sd->has_status_text_part) return; + if (elm_widget_is_legacy(obj)) elm_layout_text_set(obj, "elm.text.status", eina_strbuf_string_get(sd->format_strbuf)); else elm_layout_text_set(obj, "efl.text.status", eina_strbuf_string_get(sd->format_strbuf)); - -eina_value_flush(&val); } - else + else if (sd->has_status_text_part) { if (elm_widget_is_legacy(obj)) elm_layout_text_set(obj, "elm.text.status", NULL); @@ -150,6 +153,7 @@ _val_set(Evas_Object *obj) WRN("progressbar min and max are equal."); continue; } +if (!ps->part_exists) continue; pos = (ps->val - ps->val_min)/(ps->val_max - ps->val_min); if ((!rtl && _is_inverted(sd->dir)) || @@ -238,6 +242,16 @@ _efl_ui_progressbar_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Progressbar_Data * Eina_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC; ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC); char *group; + const char *statuspart[] = + { + "efl.text.status", + "elm.text.status", + }; + const char *curprogresspart[] = + { + "efl.cur.progressbar", + "elm.cur.progressbar", + }; group = _efl_ui_progressbar_theme_group_get(obj, sd); if (group) @@ -275,6 +289,8 @@ _efl_ui_progressbar_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Progressbar_Data * if (sd->format_cb && (!sd->pulse)) elm_layout_signal_emit(obj, "efl,state,units,visible", "efl"); } + sd->has_status_text_part = edje_object_part_exists(obj, statuspart[elm_widget_is_legacy(obj)]); + sd->has_cur_progressbar_part = edje_object_part_exists(obj, curprogresspart[elm_widget_is_legacy(obj)]); if (_is_horizontal(sd->dir)) evas_object_size_hint_min_set @@ -300,6 +316,13 @@ _efl_ui_progressbar_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Progressbar_Data * elm_layout_signal_emit(obj, "efl,state,inverted,off", "efl"); } + { +Efl_Ui_Progress_Status *ps; +const Eina_List *l; +EINA_LIST_FOREACH(sd->progress_status, l, ps) + ps->part_exists = edje_object_part_exists(obj, ps->part_name); + } + _units_set(obj); _val_set(obj); @@ -328,11 +351,10 @@ _access_state_cb(void *data EINA_UNUSED, Evas_Object *obj) Eina_Strbuf *buf; buf = eina_strbuf_new(); - const char *txt; - if (elm_widget_is_legacy(obj)) - txt = elm_layout_text_get(obj, "elm.text.status"); - else - txt = elm_layout_text_get(obj, "efl.text.status"); + const char *txt = NULL; + EFL_UI_PROGRESSBAR_DATA_GET(obj, sd); + if (sd->format_strbuf) + txt = eina_strbuf_string_get(sd->format_strbuf); if (txt) eina_strbuf_append(buf, txt); @@ -528,7 +550,7 @@ _progress_part_min_max_set(Eo *obj, Efl_Ui_Progressbar_Data *sd, const char *par } if (!existing_ps) { - ps = _progress_status_new(part_name, min); + ps = _progress_status_new(part_name, min, edje_object_part_exists(obj, part_name)); ps->val_min = min; ps->val_max = max; sd->progress_status = ein
[EGIT] [core/efl] efl-1.22 69/119: eina/file: use INFO log level when eina_file_open fails
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=3ad96c110ada0e7df6c46170eb4af321ef544707 commit 3ad96c110ada0e7df6c46170eb4af321ef544707 Author: Mike Blumenkrantz Date: Wed May 29 09:16:30 2019 -0400 eina/file: use INFO log level when eina_file_open fails Summary: this function is commonly used to detect the existence of files using its return value. for this purpose, printing warnings any time the file cannot be opened is spammy and not very helpful in the context of detecting actual errors. Depends on D8950 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8951 --- src/lib/eina/eina_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_file.c b/src/lib/eina/eina_file.c index 827775b8c2..cc53f65cce 100644 --- a/src/lib/eina/eina_file.c +++ b/src/lib/eina/eina_file.c @@ -877,7 +877,7 @@ eina_file_open(const char *path, Eina_Bool shared) return n; on_error: - WRN("Could not open file [%s].", filename); + INF("Could not open file [%s].", filename); eina_stringshare_del(filename); if (fd >= 0) close(fd); --
[EGIT] [core/efl] efl-1.22 74/119: elm/colorselector: return early from theme apply if object is not yet finalized
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=47f86fe2b5867bdcdd22486e59db4d4b02df8fbd commit 47f86fe2b5867bdcdd22486e59db4d4b02df8fbd Author: Mike Blumenkrantz Date: Wed May 29 09:17:00 2019 -0400 elm/colorselector: return early from theme apply if object is not yet finalized Summary: the remainder of this function cannot be handled until objects are set up later in construction @fix Depends on D8955 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: devilhorns, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8956 --- src/lib/elementary/elm_colorselector.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/elementary/elm_colorselector.c b/src/lib/elementary/elm_colorselector.c index 831ff3be78..0a5a9b6280 100644 --- a/src/lib/elementary/elm_colorselector.c +++ b/src/lib/elementary/elm_colorselector.c @@ -1334,6 +1334,9 @@ _elm_colorselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Colorselector_Data *sd int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)); if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret; + /* none of the below objects are created before finalize */ + if (!efl_finalized_get(obj)) return int_ret; + if ((sd->mode == ELM_COLORSELECTOR_PALETTE) || (sd->mode == ELM_COLORSELECTOR_ALL) || (sd->mode == ELM_COLORSELECTOR_BOTH)) --
[EGIT] [core/efl] efl-1.22 105/119: elm/genlist: trigger unrealize event after unsetting unrealized flag
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=0646b9eaf728848a84346abf54be5b7119464077 commit 0646b9eaf728848a84346abf54be5b7119464077 Author: Mike Blumenkrantz Date: Wed May 29 09:30:43 2019 -0400 elm/genlist: trigger unrealize event after unsetting unrealized flag Summary: this flag is accessed by other components (e.g., focus) during the event and so it must reflect the emitted event @fix Depends on D8993 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8994 --- src/lib/elementary/elm_genlist.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index d74466dc58..95d4841322 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -716,8 +716,7 @@ _elm_genlist_item_unrealize(Elm_Gen_Item *it, e = evas_object_evas_get(WIDGET(it)); evas_event_freeze(e); - if (!calc) - efl_event_callback_legacy_call(WIDGET(it), ELM_GENLIST_EVENT_UNREALIZED, EO_OBJ(it)); + ELM_SAFE_FREE(it->long_timer, ecore_timer_del); _view_clear(VIEW(it), &(it->texts), NULL); @@ -726,9 +725,8 @@ _elm_genlist_item_unrealize(Elm_Gen_Item *it, elm_wdg_item_track_cancel(EO_OBJ(it)); _item_unrealize(it); - - it->realized = EINA_FALSE; - it->want_unrealize = EINA_FALSE; + if (!calc) + efl_event_callback_legacy_call(WIDGET(it), ELM_GENLIST_EVENT_UNREALIZED, EO_OBJ(it)); evas_event_thaw(e); evas_event_thaw_eval(e); --
[EGIT] [core/efl] efl-1.22 92/119: efl_ui/check: check icon swallow existence before getting its content
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=742dbc50f939e7f17b75102a77fbf1a3161c3c22 commit 742dbc50f939e7f17b75102a77fbf1a3161c3c22 Author: Mike Blumenkrantz Date: Wed May 29 09:25:08 2019 -0400 efl_ui/check: check icon swallow existence before getting its content Summary: some check styles do not have this part @fix Depends on D8977 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8978 --- src/lib/elementary/efl_ui_check.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/efl_ui_check.c b/src/lib/elementary/efl_ui_check.c index 6056e5c572..e13577a407 100644 --- a/src/lib/elementary/efl_ui_check.c +++ b/src/lib/elementary/efl_ui_check.c @@ -480,6 +480,7 @@ _icon_signal_emit(Evas_Object *obj) char buf[64]; if (!elm_widget_resize_object_get(obj)) return; + if (!edje_object_part_exists(obj, "elm.swallow.content")) return; snprintf(buf, sizeof(buf), "elm,state,icon,%s", elm_layout_content_get(obj, "icon") ? "visible" : "hidden"); --
[EGIT] [core/efl] efl-1.22 10/119: csharp: Add docs for aliases
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=00a9d0cda7ad2c39cf3f66cf487c576872d9172e commit 00a9d0cda7ad2c39cf3f66cf487c576872d9172e Author: Lauro Moura Date: Fri May 3 16:21:58 2019 +0200 csharp: Add docs for aliases Summary: Fixes T7689 Reviewers: vitor.sousa, segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7689 Differential Revision: https://phab.enlightenment.org/D8808 --- .../eolian_mono/eolian/mono/alias_definition.hh| 27 -- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/alias_definition.hh b/src/bin/eolian_mono/eolian/mono/alias_definition.hh index f9c7f435ca..a6cfadbca5 100644 --- a/src/bin/eolian_mono/eolian/mono/alias_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/alias_definition.hh @@ -33,21 +33,34 @@ struct alias_definition_generator if (!name_helpers::open_namespaces(sink, alias.namespaces, context)) return false; + std::string alias_type; + if (!as_generator(eolian_mono::type).generate(std::back_inserter(alias_type), alias.base_type, context)) + return false; + std::string const alias_name = utils::remove_all(alias.eolian_name, '_'); if (!as_generator( - "public struct " << alias_name << "\n" + documentation + << "public struct " << alias_name << "\n" << "{\n" - << scope_tab << "private " << type << " payload;\n" - << scope_tab << "public static implicit operator " << alias_name << "(" << type << " x)\n" + << scope_tab << "private " << alias_type << " payload;\n\n" + + << scope_tab << "/// Converts an instance of " << alias_type << " to this struct.\n" + << scope_tab << "/// The value to be converted.\n" + << scope_tab << "/// A struct with the given value.\n" + << scope_tab << "public static implicit operator " << alias_name << "(" << alias_type << " value)\n" << scope_tab << "{\n" - << scope_tab << scope_tab << "return new " << alias_name << "{payload=x};\n" + << scope_tab << scope_tab << "return new " << alias_name << "{payload=value};\n" << scope_tab << "}\n\n" - << scope_tab << "public static implicit operator " << type << "(" << alias_name << " x)\n" + + << scope_tab << "/// Converts an instance of this struct to " << alias_type << ".\n" + << scope_tab << "/// The value to be converted packed in this struct.\n" + << scope_tab << "/// The actual value the alias is wrapping.\n" + << scope_tab << "public static implicit operator " << alias_type << "(" << alias_name << " value)\n" << scope_tab << "{\n" - << scope_tab << scope_tab << "return x.payload;\n" + << scope_tab << scope_tab << "return value.payload;\n" << scope_tab << "}\n\n" << "}\n\n" - ).generate(sink, std::make_tuple(alias.base_type, alias.base_type, alias.base_type), context)) + ).generate(sink, alias, context)) return false; if (!name_helpers::close_namespaces(sink, alias.namespaces, context)) --
[EGIT] [core/efl] efl-1.22 78/119: elm/gengrid: handle cache item deletion without errors
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=1dfe25e6597111f33fb12098f8143fb9c35abd80 commit 1dfe25e6597111f33fb12098f8143fb9c35abd80 Author: Mike Blumenkrantz Date: Wed May 29 09:17:24 2019 -0400 elm/gengrid: handle cache item deletion without errors Summary: @fix Depends on D8959 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8960 --- src/lib/elementary/elm_gengrid.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 76e540a9db..ae6855bad0 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -162,8 +162,12 @@ _item_cache_free(Item_Cache *itc) if (!itc) return; evas_object_del(itc->spacer); - efl_wref_del(itc->base_view, &itc->base_view); - efl_del(itc->base_view); + /* does not exist if cache item has just been reused */ + if (itc->base_view) + { +efl_wref_del(itc->base_view, &itc->base_view); +efl_del(itc->base_view); + } eina_stringshare_del(itc->item_style); EINA_LIST_FREE(itc->contents, c) evas_object_del(c); --
[EGIT] [core/efl] efl-1.22 90/119: efl/io_model: check for parent object existence before removing wref
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=a4ca4573147bea343662017b664dd441f0bae390 commit a4ca4573147bea343662017b664dd441f0bae390 Author: Mike Blumenkrantz Date: Wed May 29 09:23:29 2019 -0400 efl/io_model: check for parent object existence before removing wref Summary: if the wref automatically removes this pointer then there's no need to remove the wref on the pointer @fix Depends on D8973 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8974 --- src/lib/eio/efl_io_model.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eio/efl_io_model.c b/src/lib/eio/efl_io_model.c index 185af29061..3383aac058 100644 --- a/src/lib/eio/efl_io_model.c +++ b/src/lib/eio/efl_io_model.c @@ -1045,7 +1045,7 @@ _efl_io_model_efl_object_invalidate(Eo *obj , Efl_Io_Model_Data *priv) _efl_io_model_efl_model_monitor_del(priv); // Unlink the object from the parent - if (priv->info) + if (priv->info && priv->info->object) { efl_wref_del(priv->info->object, &priv->info->object); priv->info->object = NULL; --
[EGIT] [core/efl] efl-1.22 70/119: eina/prefix: ignore magic files when running in tree
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=d88d5f67e09acfaa84409e963fde8547dd99e80c commit d88d5f67e09acfaa84409e963fde8547dd99e80c Author: Mike Blumenkrantz Date: Wed May 29 09:16:35 2019 -0400 eina/prefix: ignore magic files when running in tree Summary: this just can't work. @fix Depends on D8951 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8952 --- src/lib/eina/eina_prefix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_prefix.c b/src/lib/eina/eina_prefix.c index 51ec9b3136..87ce27ec7f 100644 --- a/src/lib/eina/eina_prefix.c +++ b/src/lib/eina/eina_prefix.c @@ -506,7 +506,7 @@ eina_prefix_new(const char *argv0, void *symbol, const char *envprefix, datadir = tmp; } } - if (magicsharefile) + if (magicsharefile && (!getenv("EFL_RUN_IN_TREE"))) { magic = alloca(strlen(magicsharefile) + 1); strcpy(magic, magicsharefile); --
[EGIT] [core/efl] efl-1.22 80/119: elm/gengrid: handle focus events when no previous focus item was set
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=6f1d16330a795d538b5e8ea2470cefda9d1d22a3 commit 6f1d16330a795d538b5e8ea2470cefda9d1d22a3 Author: Mike Blumenkrantz Date: Wed May 29 09:18:01 2019 -0400 elm/gengrid: handle focus events when no previous focus item was set Summary: this triggers fewer error messages @fix Depends on D8962 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8963 --- src/lib/elementary/elm_gengrid.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 9405299444..abd4ad209e 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -4340,8 +4340,11 @@ _gengrid_element_focused(void *data, const Efl_Event *ev) Efl_Ui_Widget *focused = efl_ui_focus_manager_focus_get(ev->object); Elm_Widget_Item *item = NULL, *old_item = NULL; - item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, focused); - old_item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, ev->info); + /* there may be no focus during widget setup */ + if (focused) + item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, focused); + if (ev->info) + old_item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, ev->info); if (old_item) { --
[EGIT] [core/efl] efl-1.22 110/119: elm/list: return early from min_limit_cb if list object is dead
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=cd06f3d7c23920df2c118856c62986e705cdc1ca commit cd06f3d7c23920df2c118856c62986e705cdc1ca Author: Mike Blumenkrantz Date: Wed May 29 09:31:12 2019 -0400 elm/list: return early from min_limit_cb if list object is dead Summary: no further recalculating should be done on dead objects @fix Depends on D8998 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8999 --- src/lib/elementary/elm_list.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c index da40668a02..06b9e5f76e 100644 --- a/src/lib/elementary/elm_list.c +++ b/src/lib/elementary/elm_list.c @@ -751,6 +751,7 @@ _elm_list_content_min_limit_cb(Evas_Object *obj, if ((sd->mode == ELM_LIST_LIMIT) || (sd->mode == ELM_LIST_EXPAND)) return; + if (!efl_alive_get(obj)) return; sd->scr_minw = !!w; sd->scr_minh = !!h; --
[EGIT] [core/efl] efl-1.22 17/119: Evil: fix warning on 64 bits
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=32ccb1b8e218663f0c1f698118c380188e81f4ab commit 32ccb1b8e218663f0c1f698118c380188e81f4ab Author: Vincent Torri Date: Wed May 8 12:19:00 2019 -0400 Evil: fix warning on 64 bits Summary: int is 32 bits, HANDLE is void *, so cast to uintptr_t in between Test Plan: compilation Reviewers: raster, cedric, zmike Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8865 --- src/lib/evil/evil_fcntl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/evil/evil_fcntl.c b/src/lib/evil/evil_fcntl.c index 26d596a030..e222f2bf73 100644 --- a/src/lib/evil/evil_fcntl.c +++ b/src/lib/evil/evil_fcntl.c @@ -44,7 +44,7 @@ int fcntl(int fd, int cmd, ...) HANDLE h; DWORD flag; -h = _is_socket(fd) ? (HANDLE)fd : (HANDLE)_get_osfhandle(fd); +h = _is_socket(fd) ? (HANDLE)(uintptr_t)fd : (HANDLE)_get_osfhandle(fd); if (h == INVALID_HANDLE_VALUE) return -1; @@ -64,7 +64,7 @@ int fcntl(int fd, int cmd, ...) HANDLE h; long flag; -h = _is_socket(fd) ? (HANDLE)fd : (HANDLE)_get_osfhandle(fd); +h = _is_socket(fd) ? (HANDLE)(uintptr_t)fd : (HANDLE)_get_osfhandle(fd); if (h == INVALID_HANDLE_VALUE) return -1; --
[EGIT] [core/efl] efl-1.22 72/119: elm/layout: do not trigger sizing eval on subobj deletion if no resize_obj set
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=94656d0e01abad757063ec2bdc58811e81c33bf9 commit 94656d0e01abad757063ec2bdc58811e81c33bf9 Author: Mike Blumenkrantz Date: Wed May 29 09:16:48 2019 -0400 elm/layout: do not trigger sizing eval on subobj deletion if no resize_obj set Summary: this has no effect since the resize_obj is what determines sizing @fix Depends on D8953 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8954 --- src/lib/elementary/efl_ui_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index fa47bc1d1f..ce06374b51 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -575,7 +575,7 @@ _efl_ui_layout_base_efl_ui_widget_widget_sub_object_del(Eo *obj, Efl_Ui_Layout_D } // No need to resize object during destruction - if (!efl_invalidated_get(obj)) + if (wd->resize_obj && (!efl_invalidated_get(obj))) elm_layout_sizing_eval(obj); return EINA_TRUE; --
[EGIT] [core/efl] efl-1.22 68/119: efl_canvas_layout: permit part_type_get on invalid parts
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=99150febbf8d79bb23c11c76ef719b6f6b88bb09 commit 99150febbf8d79bb23c11c76ef719b6f6b88bb09 Author: Mike Blumenkrantz Date: Wed May 29 09:15:13 2019 -0400 efl_canvas_layout: permit part_type_get on invalid parts Summary: this is the only way to determine whether a part is invalid, so it should be usable without triggering errors @fix Depends on D8948 Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8949 --- src/lib/edje/edje_part_invalid.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/edje/edje_part_invalid.c b/src/lib/edje/edje_part_invalid.c index d36491d674..89527d1fdc 100644 --- a/src/lib/edje/edje_part_invalid.c +++ b/src/lib/edje/edje_part_invalid.c @@ -37,7 +37,12 @@ _efl_canvas_layout_part_invalid_efl_canvas_layout_part_state_get(const Eo *proxy if (val) *val = 0.0; } -EDJE_PART_INVALID_CONST(Efl_Canvas_Layout_Part_Type, 0, efl_canvas_layout_part_type_get, _efl_canvas_layout_part_invalid_efl_canvas_layout_part_part_type_get) +EOLIAN static Efl_Canvas_Layout_Part_Type +_efl_canvas_layout_part_invalid_efl_canvas_layout_part_part_type_get(const Eo *proxy EINA_UNUSED, void *_pd EINA_UNUSED) +{ + return EFL_CANVAS_LAYOUT_PART_TYPE_NONE; +} + EDJE_PART_INVALID_CONST(Eina_Rect, EINA_RECT_ZERO(), efl_gfx_entity_geometry_get, _efl_canvas_layout_part_invalid_efl_gfx_entity_geometry_get) EDJE_PART_INVALID(Eina_Bool, 0, efl_ui_drag_value_set, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_value_set, double dx, double dy) EDJE_PART_INVALID_CONST(Eina_Bool, 0, efl_ui_drag_value_get, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_value_get, double *dx, double *dy) --
[EGIT] [core/efl] efl-1.22 06/119: efl_mono: fix to load libevas.so based on efl.Libs.Evas
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=096ebb3678f53619f58af3bb0b0584bda6585a0f commit 096ebb3678f53619f58af3bb0b0584bda6585a0f Author: Jaehyun Cho Date: Fri May 3 16:42:42 2019 +0900 efl_mono: fix to load libevas.so based on efl.Libs.Evas libevas.so is loaded based on efl.Libs.Evas in efl_libs.cs. Therefore, the hard coded string "evas" is replaced with efl.Libs.Evas. --- src/bindings/mono/efl_mono/efl_all.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings/mono/efl_mono/efl_all.cs b/src/bindings/mono/efl_mono/efl_all.cs index 9a49730093..873bd67e48 100644 --- a/src/bindings/mono/efl_mono/efl_all.cs +++ b/src/bindings/mono/efl_mono/efl_all.cs @@ -30,7 +30,7 @@ static class UnsafeNativeMethods static UnsafeNativeMethods() { -_evas_init = new Efl.Eo.FunctionWrapper("evas", "evas_init"); +_evas_init = new Efl.Eo.FunctionWrapper(efl.Libs.Evas, "evas_init"); } public static void evas_init() --
[EGIT] [core/efl] efl-1.22 82/119: elm: don't attempt to load clouseau when running in tree
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=b792bd83b6932269f8a0b422769a70b25967cf0b commit b792bd83b6932269f8a0b422769a70b25967cf0b Author: Mike Blumenkrantz Date: Wed May 29 09:18:15 2019 -0400 elm: don't attempt to load clouseau when running in tree Summary: clouseau doesn't work anyway Depends on D8964 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8965 --- src/lib/elementary/elm_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c index f3438364e3..6913901bb5 100644 --- a/src/lib/elementary/elm_main.c +++ b/src/lib/elementary/elm_main.c @@ -346,6 +346,7 @@ _elm_old_clouseau_reload() static Eina_Bool _elm_clouseau_load() { + if (getenv("EFL_RUN_IN_TREE")) return EINA_FALSE; if (!_clouseau_info.is_init) { _clouseau_info.handle = eina_module_new( --
[EGIT] [core/efl] efl-1.22 95/119: efl_ui/layout: only freeze internal layout during delete if it exists
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=af2613a3dc849f9e39cdba25a3a7437f259de4df commit af2613a3dc849f9e39cdba25a3a7437f259de4df Author: Mike Blumenkrantz Date: Wed May 29 09:26:15 2019 -0400 efl_ui/layout: only freeze internal layout during delete if it exists Summary: if the layout object does not exist here then there is nothing to freeze @fix Depends on D8980 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8981 --- src/lib/elementary/efl_ui_layout.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index 3be4eb3334..05e742aac0 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -769,7 +769,9 @@ _efl_ui_layout_base_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Layout_Data *sd) ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); - elm_layout_freeze(obj); + /* freeze edje object if it exists */ + if (wd->resize_obj) + elm_layout_freeze(obj); EINA_LIST_FREE(sd->subs, sub_d) { --
[EGIT] [core/efl] efl-1.22 99/119: elm/fileselector: return early in theme_apply during construction
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=10fda3410b73927be6c7e78c972bfcd547bb68df commit 10fda3410b73927be6c7e78c972bfcd547bb68df Author: Mike Blumenkrantz Date: Wed May 29 09:29:20 2019 -0400 elm/fileselector: return early in theme_apply during construction Summary: the remainder of this function is used to setup styles for subobjects which don't yet exist at this point @fix Depends on D8984 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8985 --- src/lib/elementary/elc_fileselector.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c index 9283dc3190..3e4d66fe49 100644 --- a/src/lib/elementary/elc_fileselector.c +++ b/src/lib/elementary/elc_fileselector.c @@ -234,6 +234,7 @@ _elm_fileselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Fileselector_Data *sd) int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)); if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret; + if (!efl_finalized_get(obj)) return int_ret; style = elm_widget_style_get(obj); _mirrored_set(obj, efl_ui_mirrored_get(obj)); --
[EGIT] [core/efl] efl-1.22 21/119: ecore: make sure that ecore stay initialized during the full test.
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=ad8ab44d7a149ff68b0f6a455c6fb12cfec74757 commit ad8ab44d7a149ff68b0f6a455c6fb12cfec74757 Author: Cedric BAIL Date: Thu Mar 28 17:09:14 2019 -0700 ecore: make sure that ecore stay initialized during the full test. efl_app_test_promise.c is slightly special and corrective action have to be taken to make sure that ecore_init return the right value when the no fork mode of libcheck is used. Reviewed-by: Mike Blumenkrantz Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8566 --- src/tests/ecore/efl_app_test_promise.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/ecore/efl_app_test_promise.c b/src/tests/ecore/efl_app_test_promise.c index 91d3f802d7..1a9019368d 100644 --- a/src/tests/ecore/efl_app_test_promise.c +++ b/src/tests/ecore/efl_app_test_promise.c @@ -1407,6 +1407,7 @@ EFL_START_TEST(efl_test_future_then) Eina_Value *ret = NULL; Eina_Error err = 0; + ecore_init(); efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, efl_main_test, NULL); ecore_init_ex(1, argv); ret = efl_loop_begin(efl_main_loop_get()); @@ -1415,6 +1416,7 @@ EFL_START_TEST(efl_test_future_then) ck_assert_ptr_eq(eina_value_type_get(ret), EINA_VALUE_TYPE_ERROR); eina_value_get(ret, &err); ck_assert_int_eq(err, EAGAIN); + ecore_shutdown(); } EFL_END_TEST --
[EGIT] [core/efl] efl-1.22 67/119: edje/load: (more) correctly handle part updates after changing edje group
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=40c8c1736e80d434725fd659ec488c0c9571875c commit 40c8c1736e80d434725fd659ec488c0c9571875c Author: Mike Blumenkrantz Date: Wed May 29 09:15:06 2019 -0400 edje/load: (more) correctly handle part updates after changing edje group Summary: if a part changes its type, verify that the new type is compatible AND exists before attempting to re-set the previous state, otherwise take action and print warning @fix Depends on D8947 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8948 --- src/lib/edje/edje_load.c | 167 +-- 1 file changed, 103 insertions(+), 64 deletions(-) diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c index a323f93a9f..fa2f4f7d58 100644 --- a/src/lib/edje/edje_load.c +++ b/src/lib/edje/edje_load.c @@ -779,6 +779,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch int group_path_started = 0; Evas_Object *nested_smart = NULL; char lang[PATH_MAX]; + Eina_Hash *part_match = NULL; /* Get data pointer of top-of-stack */ int idx = eina_array_count(nested) - 1; @@ -797,6 +798,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch evas_event_freeze(tev); collect = _edje_object_collect(ed); + if (collect) + part_match = eina_hash_string_superfast_new(NULL); if (_edje_lua_script_only(ed)) _edje_lua_script_only_shutdown(ed); @@ -938,6 +941,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch Eina_Bool memerr = EINA_FALSE; ep = ed->collection->parts[n]; + if (part_match) +eina_hash_add(part_match, ep->name, (void*)1); if (ep->nested_children_count) /* Add object to nested parts list */ { @@ -1592,83 +1597,116 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch { Evas_Object *child = NULL; - switch (eud->type) + if (!eina_hash_find(part_match, eud->part)) { - case EDJE_USER_SWALLOW: -edje_object_part_swallow(obj, eud->part, eud->u.swallow.child); -child = eud->u.swallow.child; -break; - - case EDJE_USER_BOX_PACK: -boxes = eina_list_append(boxes, eud); -eud = NULL; -break; - - case EDJE_USER_TABLE_PACK: -edje_object_part_table_pack(obj, eud->part, eud->u.table.child, -eud->u.table.col, eud->u.table.row, -eud->u.table.colspan, eud->u.table.rowspan); -child = eud->u.table.child; -break; +/* part no longer exists */ +switch (eud->type) + { + case EDJE_USER_SWALLOW: + child = eud->u.swallow.child; + break; + case EDJE_USER_BOX_PACK: + child = eud->u.box.child; + break; + case EDJE_USER_TABLE_PACK: + child = eud->u.table.child; + break; + case EDJE_USER_STRING: + case EDJE_USER_DRAG_STEP: + case EDJE_USER_DRAG_PAGE: + case EDJE_USER_DRAG_VALUE: + case EDJE_USER_DRAG_SIZE: + case EDJE_USER_TEXT_STYLE: + case EDJE_USER_TEXT_EXPAND: + default: + break; + } +if (child) + { + WRN("Container part '%s' no longer exists, hiding previously-contained child object", eud->part); + evas_object_hide(child); + } + } + else + { +switch (eud->type) + { + case EDJE_USER_SWALLOW: +
[EGIT] [core/efl] efl-1.22 71/119: efl_ui_focus_manager/calc: handle redirect setting if no previous redirect set
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=1eccc02cfd6563a95dd7d63f1eab76b5cbe39ace commit 1eccc02cfd6563a95dd7d63f1eab76b5cbe39ace Author: Mike Blumenkrantz Date: Wed May 29 09:16:41 2019 -0400 efl_ui_focus_manager/calc: handle redirect setting if no previous redirect set Summary: use same pointer for conditional to improve readability, avoid passing null to efl_ui_focus_manager_reset_history() which cannot be passed null @fix Depends on D8952 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8953 --- src/lib/elementary/efl_ui_focus_manager_calc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c index 3ccb48e8a6..29b52f2eb6 100644 --- a/src/lib/elementary/efl_ui_focus_manager_calc.c +++ b/src/lib/elementary/efl_ui_focus_manager_calc.c @@ -821,15 +821,16 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_redirect_set(Eo *obj, Efl_Ui_Foc old_manager = pd->redirect; - if (pd->redirect) - efl_event_callback_del(pd->redirect, EFL_EVENT_DEL, _redirect_del, obj); + if (old_manager) + efl_event_callback_del(old_manager, EFL_EVENT_DEL, _redirect_del, obj); pd->redirect = redirect; if (pd->redirect) efl_event_callback_add(pd->redirect, EFL_EVENT_DEL, _redirect_del, obj); - efl_ui_focus_manager_reset_history(old_manager); + if (old_manager) + efl_ui_focus_manager_reset_history(old_manager); //adjust focus property of the most upper element if (_focus_manager_active_get(obj)) --
[EGIT] [core/efl] efl-1.22 48/119: docs: remove obsolete docgen from the tree
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=45a5ad898532c07bd8859640e9c43f0072e13520 commit 45a5ad898532c07bd8859640e9c43f0072e13520 Author: Daniel Kolesa Date: Tue May 21 15:43:02 2019 +0200 docs: remove obsolete docgen from the tree This has long been replaced with tools/edocgen.git and most likely does not even work. --- src/Makefile_Elua.am | 15 +- src/scripts/elua/apps/README-docgen.md |9 - src/scripts/elua/apps/docgen/doctree.lua | 1427 --- src/scripts/elua/apps/docgen/keyref.lua | 41 - src/scripts/elua/apps/docgen/mono.lua| 614 -- src/scripts/elua/apps/docgen/stats.lua | 274 - src/scripts/elua/apps/docgen/util.lua| 50 - src/scripts/elua/apps/docgen/writer.lua | 397 --- src/scripts/elua/apps/gendoc.lua | 1804 -- src/scripts/elua/apps/gendoc.sh | 38 - 10 files changed, 1 insertion(+), 4668 deletions(-) diff --git a/src/Makefile_Elua.am b/src/Makefile_Elua.am index 069a33c0ef..f172a228b9 100644 --- a/src/Makefile_Elua.am +++ b/src/Makefile_Elua.am @@ -57,21 +57,10 @@ include Makefile_Elua_Helper.am endif eluaapps_files = \ - scripts/elua/apps/lualian.lua \ - scripts/elua/apps/gendoc.lua \ - scripts/elua/apps/gendoc.sh \ - scripts/elua/apps/README-docgen.md + scripts/elua/apps/lualian.lua EXTRA_DIST2 += $(eluaapps_files) -eluadocgen_files = \ - scripts/elua/apps/docgen/doctree.lua \ - scripts/elua/apps/docgen/keyref.lua \ - scripts/elua/apps/docgen/stats.lua \ - scripts/elua/apps/docgen/util.lua \ - scripts/elua/apps/docgen/writer.lua - -EXTRA_DIST2 += $(eluadocgen_files) eluamodules_files = \ scripts/elua/modules/benchmark.lua \ scripts/elua/modules/getopt.lua \ @@ -108,8 +97,6 @@ eluaappsdir = $(datadir)/elua/apps eluaapps_DATA = $(eluaapps_files) eluamodulesdir = $(datadir)/elua/modules eluamodules_DATA = $(eluamodules_files) -eluadocgendir = $(datadir)/elua/apps/docgen -eluadocgen_DATA = $(eluadocgen_files) eluaeinadir = $(eluamodulesdir)/eina eluaeina_DATA = $(eluaeina_files) eluacoredir = $(datadir)/elua/core diff --git a/src/scripts/elua/apps/README-docgen.md b/src/scripts/elua/apps/README-docgen.md deleted file mode 100644 index 9b501ddfc2..00 --- a/src/scripts/elua/apps/README-docgen.md +++ /dev/null @@ -1,9 +0,0 @@ -# docgen - -This is the upcoming documentation generator for EFL. It takes documentation -described in Eo files and turns it into a DokuWiki structure (with possibility -of adapting it to other systems later on). - -Use the supplied build.sh script to generate. By default, it assumes that a -directory called "dokuwiki" is present in the current directory, so symlink -your dokuwiki setup into it (or change the path). diff --git a/src/scripts/elua/apps/docgen/doctree.lua b/src/scripts/elua/apps/docgen/doctree.lua deleted file mode 100644 index 45171ca255..00 --- a/src/scripts/elua/apps/docgen/doctree.lua +++ /dev/null @@ -1,1427 +0,0 @@ -local util = require("util") - -local eolian = require("eolian") - -local keyref = require("docgen.keyref") -local dutil = require("docgen.util") - --- writer has to be loaded late to prevent cycles -local writer - -local M = {} -local eos = eolian:new() - -local get_cache = function(o, nm) -local ret = o[nm] -if not ret then -ret = {} -o[nm] = ret -return ret, false -end -return ret, true -end - -local matches_filter = function(obj) -local ns = obj:nspaces_get() -if #ns and (ns[1] == "efl" or ns[1] == "eina") then -return true -end - -return false -end - -M.Node = util.Object:clone { -scope = { -UNKNOWN = eolian.object_scope.UNKNOWN, -PUBLIC = eolian.object_scope.PUBLIC, -PRIVATE = eolian.object_scope.PRIVATE, -PROTECTED = eolian.object_scope.PROTECTED -}, - -__ctor = function(self, obj) -self._obj = obj -assert(self._obj) -end, - -name_get = function(self) -return self._obj:name_get() -end, - -short_name_get = function(self) -return self._obj:short_name_get() -end, - -namespaces_get = function(self) -return self._obj:namespaces_get():to_array() -end, - -nspaces_get = function(self, root) -local tbl = self:namespaces_get() --- temporary workaround -if type(tbl) ~= "table" then -tbl = tbl:to_array() -end -for i = 1, #tbl do -tbl[i] = tbl[i]:lower() -end - -tbl[#tbl + 1] = self:short_name_get():lower() -if root ~= nil then -tbl[#tbl + 1] = not not root -end -return tbl -end -} -local Node = M.Node - -local gen_doc_refd = function(str) -if not writer then -writer = require("docgen.writer") -end -if not str then -
[EGIT] [core/efl] efl-1.22 65/119: gl_generic: handle image orientation setting when texture has not been created
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=705096d01760fb3a45a8e848dcca014c468f046e commit 705096d01760fb3a45a8e848dcca014c468f046e Author: Mike Blumenkrantz Date: Wed May 29 09:14:08 2019 -0400 gl_generic: handle image orientation setting when texture has not been created Summary: this occurs when orientation is set during image construction @fix Reviewers: segfaultxavi, cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl_rendering Differential Revision: https://phab.enlightenment.org/D8916 --- src/modules/evas/engines/gl_generic/evas_engine.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index 90fb3fc80b..100a88bf2c 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -1154,9 +1154,12 @@ eng_image_orient_set(void *engine, void *image, Evas_Image_Orient orient) im_new->cached = EINA_FALSE; im_new->orient = orient; - im_new->tex = im->tex; - im_new->tex->references++; - im_new->tex->pt->references++; + if (im->tex) + { +im_new->tex = im->tex; +im_new->tex->references++; +im_new->tex->pt->references++; + } evas_gl_common_image_free(im); return im_new; --
[EGIT] [core/efl] efl-1.22 46/119: Efl.Ui.Textpath: draw text immediately in the position.set
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=84d7293b6abd7caff0b9cbc8c6550de0220ad128 commit 84d7293b6abd7caff0b9cbc8c6550de0220ad128 Author: Shinwoo Kim Date: Tue May 21 10:47:58 2019 +0900 Efl.Ui.Textpath: draw text immediately in the position.set Summary: Efl.Ui.Textpath was drawing its text on the job. Because of this, textpath was slower than other objects which are scrolling on the same scroller. So this patch makes textpath not use job in the position.set. Reviewers: Hermet, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8924 --- src/lib/elementary/efl_ui_textpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c index 554714369f..cc032d144f 100644 --- a/src/lib/elementary/efl_ui_textpath.c +++ b/src/lib/elementary/efl_ui_textpath.c @@ -676,7 +676,7 @@ _efl_ui_textpath_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Textpath_Data *pd, { efl_gfx_entity_position_set(efl_super(obj, MY_CLASS), pos); _path_data_get(obj, pd, EINA_FALSE); - _sizing_eval(pd); + _text_draw(pd); } EOLIAN static void --
[EGIT] [core/efl] efl-1.22 49/119: eina: move builtin detection to eina_config.h
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=a9e625874d0b367f0b254304061d59f193757107 commit a9e625874d0b367f0b254304061d59f193757107 Author: Marcel Hollerbach Date: Tue May 21 12:28:47 2019 -0400 eina: move builtin detection to eina_config.h Summary: this means we don't need to handle this in the buildtool at all. Reviewers: vtorri, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8553 --- src/lib/eina/eina_config.h.in | 20 +--- src/lib/eina/eina_inline_cpu.x | 10 +- src/lib/eina/meson.build | 12 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/lib/eina/eina_config.h.in b/src/lib/eina/eina_config.h.in index c040cc5341..7f81542a36 100644 --- a/src/lib/eina/eina_config.h.in +++ b/src/lib/eina/eina_config.h.in @@ -23,6 +23,14 @@ # include #endif +#ifdef __has_builtin +# define EINA_HAS_BUILTIN(x) __has_builtin(x) +#elif (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) +# define EINA_HAS_BUILTIN(x) 1 +#else +# define EINA_HAS_BUILTIN(x) 0 // Compatibility for the rest of the world +#endif + #ifdef EINA_MAGIC_DEBUG # undef EINA_MAGIC_DEBUG #endif @@ -90,17 +98,23 @@ #ifdef EINA_HAVE_BSWAP16 # undef EINA_HAVE_BSWAP16 #endif -@EINA_CONFIGURE_HAVE_BSWAP16@ +#if EINA_HAS_BUILTIN(__builtin_bswap16) +# define EINA_HAVE_BSWAP16 +#endif #ifdef EINA_HAVE_BSWAP32 # undef EINA_HAVE_BSWAP32 #endif -@EINA_CONFIGURE_HAVE_BSWAP32@ +#if EINA_HAS_BUILTIN(__builtin_bswap32) +# define EINA_HAVE_BSWAP32 +#endif #ifdef EINA_HAVE_BSWAP64 # undef EINA_HAVE_BSWAP64 #endif -@EINA_CONFIGURE_HAVE_BSWAP64@ +#if EINA_HAS_BUILTIN(__builtin_bswap64) +# define EINA_HAVE_BSWAP64 +#endif #ifdef EINA_HAVE_BYTESWAP_H # undef EINA_HAVE_BYTESWAP_H diff --git a/src/lib/eina/eina_inline_cpu.x b/src/lib/eina/eina_inline_cpu.x index d26bdcce7c..035e5b188b 100644 --- a/src/lib/eina/eina_inline_cpu.x +++ b/src/lib/eina/eina_inline_cpu.x @@ -27,18 +27,10 @@ # include #endif -#ifdef __has_builtin -# define EINA_HAS_BUILTIN(x) __has_builtin(x) -#elif (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) -# define EINA_HAS_BUILTIN(x) 1 -#else -# define EINA_HAS_BUILTIN(x) 0 // Compatibility for the rest of the world -#endif - static inline unsigned short eina_swap16(unsigned short x) { -#if defined EINA_HAVE_BSWAP16 && EINA_HAS_BUILTIN(__builtin_bswap16) +#if defined EINA_HAVE_BSWAP16 return __builtin_bswap16(x); #elif defined _MSC_VER /* Windows. Apparently in . */ return _byteswap_ushort(x); diff --git a/src/lib/eina/meson.build b/src/lib/eina/meson.build index bfb484e877..e4bce4fc96 100644 --- a/src/lib/eina/meson.build +++ b/src/lib/eina/meson.build @@ -326,18 +326,6 @@ if cc.has_header('byteswap.h') eina_config.set('EINA_HAVE_BYTESWAP_H', '1') endif -if cc.has_header_symbol('byteswap.h', 'bswap_16') - eina_config.set('EINA_HAVE_BSWAP16', '1') -endif - -if cc.has_header_symbol('byteswap.h', 'bswap_32') - eina_config.set('EINA_HAVE_BSWAP32', '1') -endif - -if cc.has_header_symbol('byteswap.h', 'bswap_64') - eina_config.set('EINA_HAVE_BSWAP64', '1') -endif - if cc.has_header_symbol('pthread.h', 'pthread_spin_init') eina_config.set('EINA_HAVE_POSIX_SPINLOCK', '1') endif --
[EGIT] [core/efl] efl-1.22 53/119: evas_render: deduplicate mapped mask render code
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=1e83977742e557b522049ee2ff011596c5a2194e commit 1e83977742e557b522049ee2ff011596c5a2194e Author: Mike Blumenkrantz Date: Mon May 13 11:44:02 2019 -0400 evas_render: deduplicate mapped mask render code Summary: this code block was repeated multiple times throughout the function no functional changes Reviewers: cedric, kimcinoo Reviewed By: kimcinoo Subscribers: kimcinoo, #reviewers, #committers Tags: #efl_rendering Differential Revision: https://phab.enlightenment.org/D8837 --- src/lib/evas/canvas/evas_render.c | 110 -- 1 file changed, 33 insertions(+), 77 deletions(-) diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index e1891fc890..64fedeb948 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -1731,6 +1731,36 @@ _evas_render_mapped_context_clip_set(Evas_Public_Data *evas, Evas_Object *eo_obj } } +static void +_evas_render_mapped_mask(Evas_Public_Data *evas, Evas_Object_Protected_Data *obj, Evas_Object_Protected_Data *mask, + Evas_Proxy_Render_Data *proxy_render_data, void *output, void *ctx, int off_x, int off_y, int level, Eina_Bool do_async) +{ + if (!mask) return; + + // This path can be hit when we're multiplying masks on top of each other... + Evas_Object_Protected_Data *prev_mask = obj->clip.prev_mask; + Eina_Bool redraw = mask->mask->redraw || !mask->mask->surface; + + RD(level, " has mask: %s redraw:%d sfc:%p prev_mask:%p\n", + RDNAME(mask), mask->mask->redraw, mask->mask->surface, prev_mask); + if (prev_mask && !_mask_apply_inside_proxy(proxy_render_data, prev_mask)) + { +RD(level, " discard prev mask and redraw (guessed outside proxy)\n"); +prev_mask = NULL; +redraw = EINA_TRUE; + } + if (redraw) + evas_render_mask_subrender(evas, output, mask, prev_mask, level + 1, do_async); + + if (mask->mask->surface) + { +ENFN->context_clip_image_set(ENC, ctx, mask->mask->surface, + mask->cur->geometry.x + off_x, + mask->cur->geometry.y + off_y, + evas, do_async); + } +} + Eina_Bool evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *context, @@ -2052,31 +2082,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, off_y); /* Clipper masks */ - if (mask) -{ - // This path can be hit when we're multiplying masks on top of each other... - Evas_Object_Protected_Data *prev_mask = obj->clip.prev_mask; - Eina_Bool redraw = mask->mask->redraw || !mask->mask->surface; - - RD(level, " has mask: %s redraw:%d sfc:%p prev_mask:%p\n", - RDNAME(mask), mask->mask->redraw, mask->mask->surface, prev_mask); - if (prev_mask && !_mask_apply_inside_proxy(proxy_render_data, prev_mask)) - { -RD(level, " discard prev mask and redraw (guessed outside proxy)\n"); -prev_mask = NULL; -redraw = EINA_TRUE; - } - if (redraw) - evas_render_mask_subrender(evas, output, mask, prev_mask, level + 1, do_async); - - if (mask->mask->surface) - { -ENFN->context_clip_image_set(ENC, ctx, mask->mask->surface, - mask->cur->geometry.x + off_x, - mask->cur->geometry.y + off_y, - evas, do_async); - } -} + _evas_render_mapped_mask(evas, obj, mask, proxy_render_data, output, ctx, off_x, off_y, level, do_async); } if (obj->cur->cache.clip.visible || !proxy_src_clip) @@ -2121,32 +2127,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, /* Clipper masks */ if (obj->cur->clipper && (mapped > 1) && _evas_render_object_is_mask(obj->cur->clipper)) -{ - // This path can be hit when we're multiplying masks on top of each other... - Evas_Object_Protected_Data *mask = obj->cur->clipper; - Evas_Object_Protected_Data *prev_mask = obj->clip.prev_mask; -
[EGIT] [core/efl] efl-1.22 62/119: efl_ui_relative_layout: prevent infinite loop in chain calculation
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=ce49884b1601cabef5d338e891ee20d5f256cf7c commit ce49884b1601cabef5d338e891ee20d5f256cf7c Author: Yeongjong Lee Date: Wed May 29 17:24:30 2019 +0900 efl_ui_relative_layout: prevent infinite loop in chain calculation Test Plan: test code ``` EAPI_MAIN int elm_main(int argc, char **argv) { Eo *win, *layout, *btn1, *btn2, *btn3; win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get()); layout = efl_add(EFL_UI_RELATIVE_LAYOUT_CLASS, win, efl_content_set(win, efl_added)); btn1 = efl_add(EFL_UI_BUTTON_CLASS, layout); btn2 = efl_add(EFL_UI_BUTTON_CLASS, layout); efl_ui_relative_layout_relation_right_set(layout, btn1, btn2, 0.0); efl_ui_relative_layout_relation_right_set(layout, btn2, btn1, 0.0); efl_ui_relative_layout_relation_left_set(layout, btn2, btn1, 1.0); efl_ui_relative_layout_relation_left_set(layout, btn1, btn2, 1.0); elm_run(); return 0; } ELM_MAIN() ``` Reviewers: Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9032 --- src/lib/elementary/efl_ui_relative_layout.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_relative_layout.c b/src/lib/elementary/efl_ui_relative_layout.c index 491c52f8af..9845f00d48 100644 --- a/src/lib/elementary/efl_ui_relative_layout.c +++ b/src/lib/elementary/efl_ui_relative_layout.c @@ -217,7 +217,15 @@ _child_chain_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool axis) // find head head = child; while (head == head->calc.to[START]->calc.to[END]) - head = head->calc.to[START]; + { +head = head->calc.to[START]; +if (head == child) + { + ERR("%c-axis circular dependency when calculating \"%s\"(%p).", + axis ? 'Y' : 'X', efl_class_name_get(child->obj), child->obj); + return EINA_TRUE; + } + } //calculate weight_sum aspect_type = !axis ? EFL_GFX_HINT_ASPECT_VERTICAL : EFL_GFX_HINT_ASPECT_HORIZONTAL; --
[EGIT] [core/efl] efl-1.22 109/119: elm/interface_scrollable: return immediately from setting region if no content
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=d9f7972035f3f35d61b394fddbd0cfde3715ee41 commit d9f7972035f3f35d61b394fddbd0cfde3715ee41 Author: Mike Blumenkrantz Date: Wed May 29 09:31:06 2019 -0400 elm/interface_scrollable: return immediately from setting region if no content Summary: this is a valid case and should be handled without erroring @fix Depends on D8997 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8998 --- src/lib/elementary/elm_interface_scrollable.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c index 6ac896e242..9db380ed68 100644 --- a/src/lib/elementary/elm_interface_scrollable.c +++ b/src/lib/elementary/elm_interface_scrollable.c @@ -1964,6 +1964,7 @@ _elm_scroll_wanted_region_set(Evas_Object *obj) return; sid->content_info.resized = EINA_FALSE; + if (!sid->pan_obj) return; /* Flip to RTL cords only if init in RTL mode */ if (sid->is_mirrored) --
[EGIT] [core/efl] efl-1.22 56/119: efl_ui_focus_manager_sub: handle manager change when tree is set to unfocusable
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=30af2c5637e96a19bd491245d5abfe673ec673b8 commit 30af2c5637e96a19bd491245d5abfe673ec673b8 Author: Mike Blumenkrantz Date: Thu May 23 09:32:00 2019 -0400 efl_ui_focus_manager_sub: handle manager change when tree is set to unfocusable Summary: in this case, the event is emitted and no manager exists because the objects are not focusable @fix Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8935 --- 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 4fb2733610..ee80ce40d2 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -158,6 +158,8 @@ _logical_manager_change(void *data EINA_UNUSED, const Efl_Event *ev) if (!ev->info) return; manager = efl_ui_focus_object_focus_manager_get(ev->object); + /* no manager is set when object trees become unfocusable */ + if (!manager) return; EINA_LIST_FOREACH(pd->current_border, n, b) { if (b == ev->object) continue; --
[EGIT] [core/efl] efl-1.22 93/119: efl_ui/layout: do not trigger sizing eval on hint change if object is dead
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=43b781ea4b257ff4981fd73f26286ab7df688fe3 commit 43b781ea4b257ff4981fd73f26286ab7df688fe3 Author: Mike Blumenkrantz Date: Wed May 29 09:25:24 2019 -0400 efl_ui/layout: do not trigger sizing eval on hint change if object is dead Summary: this fixes a huge number of errors during object deletion @fix Depends on D8979 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8987 --- src/lib/elementary/efl_ui_layout.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index e96d66a018..6cf5c4cfe1 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -144,6 +144,7 @@ _on_sub_object_size_hint_change(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { + if (!efl_alive_get(data)) return; ELM_WIDGET_DATA_GET_OR_RETURN(data, wd); elm_layout_sizing_eval(data); } --
[EGIT] [core/efl] efl-1.22 41/119: docfx: Use the public repo url for www-content
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=358858dd2677411c07596bcb8b768d286332b1b7 commit 358858dd2677411c07596bcb8b768d286332b1b7 Author: Xavi Artigas Date: Thu May 16 18:06:46 2019 +0200 docfx: Use the public repo url for www-content Otherwise, you need to have credentials, etc. --- doc/docfx/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/docfx/setup.sh b/doc/docfx/setup.sh index eb15787c2e..3cf9d60e3b 100755 --- a/doc/docfx/setup.sh +++ b/doc/docfx/setup.sh @@ -36,7 +36,7 @@ fi # Clone whole Content site # rm -rf www-content -git clone --depth 1 git+ssh://g...@git.enlightenment.org/website/www-content.git www-content +git clone --depth 1 https://g...@git.enlightenment.org/website/www-content.git www-content # # Copy all pages related to C# (those inside a folder called 'csharp') to the articles folder --
[EGIT] [core/efl] efl-1.22 54/119: evas/render: fix proxy clipping when source_clip is disabled
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=d159c7880fe09c44a6af8cd182194a6274ab618f commit d159c7880fe09c44a6af8cd182194a6274ab618f Author: Mike Blumenkrantz Date: Thu May 23 09:31:42 2019 -0400 evas/render: fix proxy clipping when source_clip is disabled Summary: when source_clip is disabled, the clipper used should be the one used by the proxy object. previously this would never be the case, meaning that disabling source_clip had no effect @fix Depends on D8879 Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8880 --- src/lib/evas/canvas/evas_render.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 64fedeb948..09c698bf16 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -1649,11 +1649,12 @@ _proxy_context_clip(Evas_Public_Data *evas, void *ctx, Evas_Proxy_Render_Data *p if (!proxy_render_data) return EINA_TRUE; if (proxy_render_data->source_clip) { +Evas_Object_Protected_Data *src_obj = proxy_render_data->src_obj; /* trust cache.clip since we clip like the source */ ENFN->context_clip_clip(ENC, ctx, -obj->cur->cache.clip.x + off_x, -obj->cur->cache.clip.y + off_y, -obj->cur->cache.clip.w, obj->cur->cache.clip.h); +src_obj->cur->cache.clip.x + off_x, +src_obj->cur->cache.clip.y + off_y, +src_obj->cur->cache.clip.w, src_obj->cur->cache.clip.h); ENFN->context_clip_get(ENC, ctx, NULL, NULL, &cw, &ch); return ((cw > 0) && (ch > 0)); } @@ -2128,9 +2129,9 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, if (obj->cur->clipper && (mapped > 1) && _evas_render_object_is_mask(obj->cur->clipper)) _evas_render_mapped_mask(evas, obj, obj->cur->clipper, proxy_render_data, output, ctx, off_x, off_y, level, do_async); - else if (!proxy_src_clip) + else if (!proxy_src_clip && proxy_render_data) { - if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y)) + if (!_proxy_context_clip(evas, ctx, proxy_render_data, proxy_render_data->proxy_obj, off_x, off_y)) goto on_empty_clip; } @@ -2181,9 +2182,9 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, proxy_render_data, off_x, off_y); } -else +else if (proxy_render_data) { - if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y)) + if (!_proxy_context_clip(evas, ctx, proxy_render_data, proxy_render_data->proxy_obj, off_x, off_y)) goto on_empty_clip; } } @@ -2239,9 +2240,9 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, ENFN->context_clip_clip(ENC, ctx, ecx, ecy, ecw, ech); } - else + else if (proxy_render_data) { - if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y)) + if (!_proxy_context_clip(evas, ctx, proxy_render_data, proxy_render_data->proxy_obj, off_x, off_y)) goto on_empty_clip; } } --
[EGIT] [core/efl] efl-1.22 66/119: ecore/timer: fix handling of timer freeze during construction
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=c494cb3e74d08dc9b4e154548aa42f20b76e498a commit c494cb3e74d08dc9b4e154548aa42f20b76e498a Author: Mike Blumenkrantz Date: Wed May 29 09:14:56 2019 -0400 ecore/timer: fix handling of timer freeze during construction Summary: timer has no loop pointer until it is finalized @fix Depends on D8918 Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8947 --- src/lib/ecore/ecore_timer.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c index 37280e8ee3..96b1a13a51 100644 --- a/src/lib/ecore/ecore_timer.c +++ b/src/lib/ecore/ecore_timer.c @@ -321,13 +321,15 @@ ecore_timer_freeze(Ecore_Timer *timer) EOLIAN static void _efl_loop_timer_efl_object_event_freeze(Eo *obj, Efl_Loop_Timer_Data *timer) { - double now; + double now = 0.0; efl_event_freeze(efl_super(obj, MY_CLASS)); // Timer already frozen if (timer->frozen) return; - now = efl_loop_time_get(timer->loop); + /* not set if timer is not finalized */ + if (timer->loop) + now = efl_loop_time_get(timer->loop); /* only if timer interval has been set */ if (timer->initialized) timer->pending = timer->at - now; --
[EGIT] [core/efl] efl-1.22 58/119: efl_ui_textpath: redraw text properly.
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=680ab7b37738a3d41110ecb61dca37f3883b7211 commit 680ab7b37738a3d41110ecb61dca37f3883b7211 Author: Hermet Park Date: Mon May 27 14:36:44 2019 +0900 efl_ui_textpath: redraw text properly. It needs redraw since text draw depends on the obj' size. --- src/lib/elementary/efl_ui_textpath.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c index cc032d144f..523c531a80 100644 --- a/src/lib/elementary/efl_ui_textpath.c +++ b/src/lib/elementary/efl_ui_textpath.c @@ -682,7 +682,9 @@ _efl_ui_textpath_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Textpath_Data *pd, EOLIAN static void _efl_ui_textpath_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Textpath_Data *pd EINA_UNUSED, Eina_Size2D sz) { + Eina_Size2D psize = efl_gfx_entity_size_get(obj); efl_gfx_entity_size_set(efl_super(obj, MY_CLASS), sz); + if (psize.w != sz.w || psize.h != sz.h) _text_draw(pd); } EOLIAN static void --
[EGIT] [core/efl] efl-1.22 111/119: elm/map: move setting initial zoom to later in construction
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=bde555d622f945cea1ccda93675482a970a0474b commit bde555d622f945cea1ccda93675482a970a0474b Author: Mike Blumenkrantz Date: Wed May 29 09:31:17 2019 -0400 elm/map: move setting initial zoom to later in construction Summary: this ensures that all necessary objects exist in order to successfully perform the zoom @fix Depends on D8999 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9000 --- src/lib/elementary/elm_map.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c index 469e9a67ef..b1f226cf16 100644 --- a/src/lib/elementary/elm_map.c +++ b/src/lib/elementary/elm_map.c @@ -1159,16 +1159,13 @@ _zoom_do(Elm_Map_Data *sd, ecore_timer_del(sd->zoom_timer); sd->zoom_timer = NULL; } - else if (sd->obj) + else efl_event_callback_legacy_call (sd->obj, EFL_UI_EVENT_ZOOM_START, NULL); - if (sd->obj) - { -sd->zoom_timer = ecore_timer_add(0.25, _zoom_timeout_cb, sd->obj); -efl_event_callback_legacy_call - (sd->obj, EFL_UI_EVENT_ZOOM_CHANGE, NULL); - } + sd->zoom_timer = ecore_timer_add(0.25, _zoom_timeout_cb, sd->obj); + efl_event_callback_legacy_call + (sd->obj, EFL_UI_EVENT_ZOOM_CHANGE, NULL); efl_event_callback_legacy_call (sd->pan_obj, ELM_PAN_EVENT_CHANGED, NULL); @@ -4183,8 +4180,6 @@ _elm_map_efl_canvas_group_group_add(Eo *obj, Elm_Map_Data *priv) id_num++; _grid_all_create(priv); - _zoom_do(priv, 0); - priv->mode = EFL_UI_ZOOM_MODE_MANUAL; if (!elm_need_efreet()) @@ -4321,6 +4316,7 @@ _elm_map_efl_object_constructor(Eo *obj, Elm_Map_Data *sd) evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); efl_access_object_role_set(obj, EFL_ACCESS_ROLE_IMAGE_MAP); legacy_object_focus_handle(obj); + _zoom_do(sd, 0); return obj; } --
[EGIT] [core/efl] efl-1.22 61/119: efl_ui_suite: fix errors in focus tests
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=fd2defe9b209022f785d11d2968eb4a233d56247 commit fd2defe9b209022f785d11d2968eb4a233d56247 Author: Marcel Hollerbach Date: Tue May 28 12:01:50 2019 -0400 efl_ui_suite: fix errors in focus tests Summary: there have been a few cases where things were just wrong. Like missing regular nodes in a focus manager that received focus, and stuff like this. This now fixes all those cases. Reviewers: zmike, cedric, segfaultxavi Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9021 --- src/Makefile_Elementary.am | 1 + src/lib/elementary/Efl_Ui.h | 1 + src/tests/elementary/efl_ui_test_focus.c| 258 ++-- src/tests/elementary/efl_ui_test_focus_common.c | 27 ++- src/tests/elementary/efl_ui_test_focus_common.h | 3 +- src/tests/elementary/focus_manager_test.eo | 4 + src/tests/elementary/meson.build| 3 +- 7 files changed, 145 insertions(+), 152 deletions(-) diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index f0e2b638cf..35bd781e96 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -156,6 +156,7 @@ elm_private_eolian_files = \ lib/elementary/efl_ui_focus_parent_provider_standard.eo \ lib/elementary/efl_ui_state_model.eo \ tests/elementary/focus_test.eo \ + tests/elementary/focus_manager_test.eo \ tests/elementary/focus_test_sub_main.eo \ lib/elementary/efl_ui_selection_manager.eo \ lib/elementary/efl_datetime_manager.eo \ diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h index 246ebf8456..719bb26270 100644 --- a/src/lib/elementary/Efl_Ui.h +++ b/src/lib/elementary/Efl_Ui.h @@ -152,6 +152,7 @@ typedef Eo Efl_Ui_Focus_Manager; # ifdef EFL_BETA_API_SUPPORT EAPI void efl_ui_focus_relation_free(Efl_Ui_Focus_Relations *rel); # endif +# include # include # include # include diff --git a/src/tests/elementary/efl_ui_test_focus.c b/src/tests/elementary/efl_ui_test_focus.c index 16fce9fb05..38a2ac0200 100644 --- a/src/tests/elementary/efl_ui_test_focus.c +++ b/src/tests/elementary/efl_ui_test_focus.c @@ -2,13 +2,11 @@ EFL_START_TEST(focus_unregister_twice) { - Efl_Ui_Focus_Object *r1 = efl_add_ref(FOCUS_TEST_CLASS, NULL); - Efl_Ui_Focus_Object *r2 = efl_add_ref(FOCUS_TEST_CLASS, NULL); + Efl_Ui_Focus_Object *r1, *r2; - Efl_Ui_Focus_Manager *m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, -efl_ui_focus_manager_root_set(efl_added, r1) - ); + Efl_Ui_Focus_Manager *m = focus_test_manager_new(&r1, EINA_TRUE); + r2 = efl_add_ref(FOCUS_TEST_CLASS, NULL); fail_if(!efl_ui_focus_manager_calc_register(m, r2, r1, NULL)); efl_ui_focus_manager_calc_unregister(m, r1); @@ -16,7 +14,6 @@ EFL_START_TEST(focus_unregister_twice) efl_ui_focus_manager_calc_unregister(m, r1); efl_unref(r2); - efl_unref(r1); efl_unref(m); } @@ -24,20 +21,22 @@ EFL_END_TEST EFL_START_TEST(focus_register_twice) { - Efl_Ui_Focus_Object *r1 = focus_test_object_new("r1", 0, 0, 10, 10); - Efl_Ui_Focus_Object *r2 = focus_test_object_new("r2", 0, 10, 10, 10); + Efl_Ui_Focus_Object *r1, *r2, *r3; - Efl_Ui_Focus_Manager *m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, -efl_ui_focus_manager_root_set(efl_added, r1) - ); + Efl_Ui_Focus_Manager *m = focus_test_manager_new(&r1, EINA_TRUE); + Efl_Ui_Focus_Manager *m2 = focus_test_manager_new(&r3, EINA_TRUE); + + r2 = efl_add_ref(FOCUS_TEST_CLASS, NULL); fail_if(!efl_ui_focus_manager_calc_register(m, r2, r1, NULL)); //same confguration don't error out fail_if(!efl_ui_focus_manager_calc_register(m, r2, r1, NULL)); + + EXPECT_ERROR_START; //different confidurations error out - fail_if(efl_ui_focus_manager_calc_register(m, r2, r1, r1)); + fail_if(efl_ui_focus_manager_calc_register(m, r2, r1, m2)); + EXPECT_ERROR_END; - efl_unref(r1); efl_unref(m); } @@ -50,7 +49,7 @@ EFL_START_TEST(pos_check) focus_test_setup_cross(&middle, &south, &north, &east, &west); - m = focus_test_manager_new(&root); + m = focus_test_manager_new(&root, EINA_TRUE); efl_ui_focus_manager_calc_register(m, middle, root, NULL); efl_ui_focus_manager_calc_register(m, north, root, NULL); efl_ui_focus_manager_calc_register(m, south, root, NULL); @@ -122,7 +121,7 @@ EFL_START_TEST(pos_check2) south_east = focus_test_object_new("south_east", 60, 60, 5, 5); south_west = focus_test_object_new("south_west", 20, 60, 5, 5); - m = focus_test_manager_new(&root); + m = focus_test_manager_new(&root, EINA_TRUE); efl_ui_focus_manager_calc_register(m, middle, root, NULL); efl_ui_focus_manager_calc_register(m, north_east, root, NULL); efl_ui_fo
[EGIT] [core/efl] efl-1.22 59/119: ecore_evas win32: fix warning reported by clang
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=2e7df123e3f3327490d980ce491f3d9b73077d52 commit 2e7df123e3f3327490d980ce491f3d9b73077d52 Author: Vincent Torri Date: Mon May 27 15:58:51 2019 +0900 ecore_evas win32: fix warning reported by clang Test Plan: compilation Reviewers: zmike, raster, cedric, Hermet Reviewed By: Hermet Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9025 --- src/modules/ecore_evas/engines/win32/ecore_evas_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c index 9a5bd15914..39def9d49f 100644 --- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c +++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c @@ -1013,7 +1013,7 @@ _ecore_evas_win32_alpha_set(Ecore_Evas *ee, int alpha) #warning "We need to handle window with alpha channel." /* Ecore_Evas_Engine_Data_Win32 *wdata = ee->engine.data; */ alpha = !!alpha; - if ((ee->alpha == alpha)) return; + if (ee->alpha == alpha) return; if (!strcmp(ee->driver, "software_gdi")) { --
[EGIT] [core/efl] efl-1.22 63/119: Efl.Ui.Flip: Silence warning
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=4e8dc270f973bec08ff99c5f7f26707e48c550da commit 4e8dc270f973bec08ff99c5f7f26707e48c550da Author: Xavi Artigas Date: Wed May 29 15:13:32 2019 +0200 Efl.Ui.Flip: Silence warning The Efl.Ui.Orientation enum is actually made of flags, which we can OR together, and it includes bitmasks for easier manipulation. gcc expects switch() statemenets to include all enum values and nothing but the valid enum values, which is abit too restrictive for flags. Casting to int removes the warning. --- src/lib/elementary/efl_ui_flip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_flip.c b/src/lib/elementary/efl_ui_flip.c index 71dc20e076..3c1379585c 100644 --- a/src/lib/elementary/efl_ui_flip.c +++ b/src/lib/elementary/efl_ui_flip.c @@ -2044,7 +2044,7 @@ _flip_dir_to_efl_ui_dir(Elm_Flip_Direction dir) static Elm_Flip_Direction _efl_ui_dir_to_flip_dir(Efl_Ui_Dir dir) { - switch (dir) + switch ((int)dir) // The cast silences warnings about missing enum values and non-existing case labels { case EFL_UI_DIR_RIGHT: case EFL_UI_DIR_HORIZONTAL: --
[EGIT] [core/efl] efl-1.22 33/119: evas/scale_sample: call alloca for the scanline buffer after clamping width
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=4d9bcb4b739cb2c15248aa9c09905a5001e6d605 commit 4d9bcb4b739cb2c15248aa9c09905a5001e6d605 Author: Mike Blumenkrantz Date: Mon May 13 11:44:27 2019 -0400 evas/scale_sample: call alloca for the scanline buffer after clamping width Summary: this is already a risky call for larger scanlines, so use the clamped value to further reduce the chance of blowing out the stack Depends on D8839 Reviewers: cedric, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, #reviewers, #committers Tags: #efl_rendering Differential Revision: https://phab.enlightenment.org/D8840 --- src/lib/evas/common/evas_scale_sample.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/evas/common/evas_scale_sample.c b/src/lib/evas/common/evas_scale_sample.c index 6fc54de00b..d043ba3414 100644 --- a/src/lib/evas/common/evas_scale_sample.c +++ b/src/lib/evas/common/evas_scale_sample.c @@ -140,9 +140,6 @@ _evas_common_scale_rgba_sample_scale_mask(int y, DATA32 *buf, *dst_ptr; int x; - /* a scanline buffer */ - buf = alloca(dst_clip_w * sizeof(DATA32)); - /* clamp/map to mask geometry */ if (EINA_UNLIKELY(dst_clip_x < mask_x)) dst_clip_x = mask_x; @@ -153,6 +150,9 @@ _evas_common_scale_rgba_sample_scale_mask(int y, if (EINA_UNLIKELY(dst_clip_y + dst_clip_h > mask_y + (int)mask_ie->cache_entry.h)) dst_clip_h = mask_y + mask_ie->cache_entry.h - dst_clip_y; + /* a scanline buffer */ + buf = alloca(dst_clip_w * sizeof(DATA32)); + dptr = dptr + dst_w * y; for (; y < dst_clip_h; y++) { --
[EGIT] [core/efl] efl-1.22 64/119: edje/calc: correctly handle swallow/group objects as clippers for state clips
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=ab4c08126e6fd815c2a877e7a4fcd8dc4f4e2f64 commit ab4c08126e6fd815c2a877e7a4fcd8dc4f4e2f64 Author: Mike Blumenkrantz Date: Wed May 29 09:13:10 2019 -0400 edje/calc: correctly handle swallow/group objects as clippers for state clips Summary: in the case where the clipper being set was an indirect object, it's necessary to resolve the lookup for that part and use the actual part object to avoid setting a placeholder rect as the clipper @fix Depends on D8850 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8851 --- src/lib/edje/edje_calc.c | 44 +++- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index ea64b867c6..21de682451 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -114,6 +114,31 @@ _edje_calc_params_clear(Edje_Calc_Params *p) } } +static inline Eo * +_edje_calc_get_part_object(const Edje_Real_Part *ep) +{ + if ((ep->type == EDJE_RP_TYPE_SWALLOW) && ep->typedata.swallow && + ep->typedata.swallow->swallowed_object) + return ep->typedata.swallow->swallowed_object; + return ep->object; +} + +static inline void +_edje_calc_handle_state_clip(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *pf) +{ + Edje_Real_Part *clip_part = NULL; + Eo *clip_obj = ed->base.clipper; + + if ((pf->ext) && (pf->ext->clip_to) && (pf->ext->clip_to->object)) + clip_part = pf->ext->clip_to; + else if (ep->part->clip_to_id >= 0) + clip_part = ed->table_parts[ep->part->clip_to_id % ed->table_parts_size]; + + if (clip_part) + clip_obj = _edje_calc_get_part_object(clip_part); + evas_object_clip_set(_edje_calc_get_part_object(ep), clip_obj); +} + void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2, FLOAT_T v3, FLOAT_T v4) { @@ -4778,14 +4803,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta /* handle clip overrides */ if (ed->has_state_clip) - { - if ((pf->ext) && (pf->ext->clip_to) && (pf->ext->clip_to->object)) -evas_object_clip_set(ep->object, pf->ext->clip_to->object); - else if (ep->part->clip_to_id >= 0) -evas_object_clip_set(ep->object, ed->table_parts[ep->part->clip_to_id % ed->table_parts_size]->object); - else -evas_object_clip_set(ep->object, ed->base.clipper); - } + _edje_calc_handle_state_clip(ed, ep, pf); break; case EDJE_PART_TYPE_TEXT: @@ -5043,15 +5061,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta (ep->typedata.swallow->swallowed_object)) { if (ed->has_state_clip) - { - if ((pf->ext) && (pf->ext->clip_to) && (pf->ext->clip_to->object)) - evas_object_clip_set(ep->typedata.swallow->swallowed_object, pf->ext->clip_to->object); - else if (ep->part->clip_to_id >= 0) - evas_object_clip_set(ep->typedata.swallow->swallowed_object, ed->table_parts[ep->part->clip_to_id % ed->table_parts_size]->object); - else - evas_object_clip_set(ep->typedata.swallow->swallowed_object, ed->base.clipper); - } - + _edje_calc_handle_state_clip(ed, ep, pf); if (pf->visible) { Eina_Bool vis = EINA_TRUE; --
[EGIT] [core/efl] efl-1.22 25/119: eina: refactor and simplify vpath.
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=3276462202bd83aff74925585dd47ec3558c0475 commit 3276462202bd83aff74925585dd47ec3558c0475 Author: Cedric BAIL Date: Fri May 10 14:28:49 2019 -0700 eina: refactor and simplify vpath. Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8882 --- src/lib/eina/eina_vpath.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/lib/eina/eina_vpath.c b/src/lib/eina/eina_vpath.c index a0c6a2acae..1e19ffca49 100644 --- a/src/lib/eina/eina_vpath.c +++ b/src/lib/eina/eina_vpath.c @@ -257,18 +257,10 @@ _eina_vpath_resolve(const char *path, char *str, size_t size) { const char *p, *end, *meta; char *name; -int max_len = strlen(path); Eina_Bool found = EINA_FALSE; -for (p = path + 2; p <= path + max_len - 2; p++) - { - if ((p[0] ==':') && (p[1] == ')')) - { - end = p; - found = EINA_TRUE; - break; - } - } +end = p = strstr(path + 2, ":)"); +if (p) found = EINA_TRUE; p += 2; if (!found) --
[EGIT] [core/efl] efl-1.22 40/119: csharp: fix formatting in generated .eo.cs codes
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=72a9d087261a2a5bdff3cc5c1033a885bc386190 commit 72a9d087261a2a5bdff3cc5c1033a885bc386190 Author: WooHyun Jung Date: Thu May 16 10:02:28 2019 +0200 csharp: fix formatting in generated .eo.cs codes Summary: There was duplicated scope_tab, so I removed it. Test Plan: - ./autogen --enable-csharp-bindings - make Reviewers: lauromoura, felipealmeida, Jaehyun_Cho, YOhoho, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8901 --- src/bin/eolian_mono/eolian/mono/events.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh index b5e6e4a7f1..350dd57ad4 100644 --- a/src/bin/eolian_mono/eolian/mono/events.hh +++ b/src/bin/eolian_mono/eolian/mono/events.hh @@ -337,7 +337,7 @@ struct event_definition_generator auto sub_context = change_indentation(indent.inc().inc(), context); - if (!as_generator(scope_tab(6) << wrapper_args_type << " args = new " << wrapper_args_type << "();\n" + if (!as_generator(wrapper_args_type << " args = new " << wrapper_args_type << "();\n" << scope_tab(6) << "args.arg = ").generate(arg_initializer_sink, attributes::unused, context)) return false; if (!(*etype).original_type.visit(unpack_event_args_visitor{arg_initializer_sink, &sub_context, *etype})) --
[EGIT] [core/efl] efl-1.22 34/119: evas/image: fix broken auto_fill mechanism when manually changing fill
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=08397042f4283dfd5a91e552c7393124be03ec88 commit 08397042f4283dfd5a91e552c7393124be03ec88 Author: Mike Blumenkrantz Date: Mon May 13 11:45:13 2019 -0400 evas/image: fix broken auto_fill mechanism when manually changing fill Summary: if auto_fill is set (which is the default for image objects), manually setting the fill for the image would previously only persist until the image was resized, at which point the auto_fill would activate and re-set the image's fill to be the same as the image's object geometry this fixes the auto_fill behavior to stop modifying the image's fill geometry if the fill is manually changed by the user, which fixes using fill on most image objects @fix Reviewers: cedric, Hermet Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8879 --- src/lib/evas/canvas/evas_object_image.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 289ffaaa3d..dd8041b35a 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -561,30 +561,36 @@ _efl_canvas_image_internal_efl_gfx_image_border_center_fill_get(const Eo *eo_obj return (Efl_Gfx_Border_Fill_Mode)o->cur->border.fill; } +static void +_toggle_fill_listener(Eo *eo_obj, Evas_Image_Data *o) +{ + if (!o->filled) + evas_object_event_callback_del(eo_obj, EVAS_CALLBACK_RESIZE, +evas_object_image_filled_resize_listener); + else + evas_object_event_callback_add(eo_obj, EVAS_CALLBACK_RESIZE, +evas_object_image_filled_resize_listener, +NULL); +} + EOLIAN static void _efl_canvas_image_internal_efl_gfx_fill_fill_auto_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool setting) { Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); + Eina_Size2D sz; setting = !!setting; o->filled_set = 1; if (o->filled == setting) return; evas_object_async_block(obj); o->filled = setting; - if (!o->filled) - evas_object_event_callback_del(eo_obj, EVAS_CALLBACK_RESIZE, -evas_object_image_filled_resize_listener); - else - { -Eina_Size2D sz; -sz = efl_gfx_entity_size_get(eo_obj); -_evas_image_fill_set(eo_obj, o, 0, 0, sz.w, sz.h); + _toggle_fill_listener(eo_obj, o); -evas_object_event_callback_add(eo_obj, EVAS_CALLBACK_RESIZE, - evas_object_image_filled_resize_listener, - NULL); - } + if (!o->filled) return; + + sz = efl_gfx_entity_size_get(eo_obj); + _evas_image_fill_set(eo_obj, o, 0, 0, sz.w, sz.h); } EOLIAN static Eina_Bool @@ -650,6 +656,7 @@ _efl_canvas_image_internal_efl_gfx_fill_fill_set(Eo *eo_obj, Evas_Image_Data *o, // Should (0,0,0,0) reset the filled flag to true? o->filled = EINA_FALSE; o->filled_set = EINA_TRUE; + _toggle_fill_listener(eo_obj, o); _evas_image_fill_set(eo_obj, o, fill.x, fill.y, fill.w, fill.h); } --