From 3d539c11316ad051cfb0bf575f6f58e757cc39ae Mon Sep 17 00:00:00 2001 From: SangHyeon Jade Lee Date: Fri, 20 Sep 2019 10:40:01 +0900 Subject: [PATCH 01/50] efl_ui : fix possible memory leak on model compressing Summary: fix memory leak of model compressing on binbuf and allocated data. Reviewers: cedric, bu5hm4n, zmike Reviewed By: cedric, zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10037 --- src/lib/elementary/efl_ui_exact_model.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_ui_exact_model.c b/src/lib/elementary/efl_ui_exact_model.c index eba69854b9..23b97db7e9 100644 --- a/src/lib/elementary/efl_ui_exact_model.c +++ b/src/lib/elementary/efl_ui_exact_model.c @@ -95,10 +95,19 @@ _efl_ui_exact_model_slot_compress(unsigned int index, Eina_List *compressed, uns unsigned char *zmem; zmem = calloc(EFL_UI_EXACT_MODEL_CONTENT, sizeof (unsigned int)); - if (!zmem) return compressed; + if (!zmem) + { + if (cbuf) eina_binbuf_free(cbuf); + return compressed; + } tbuf = eina_binbuf_manage_new(zmem, EFL_UI_EXACT_MODEL_CONTENT_LENGTH, EINA_TRUE); - if (!tbuf) return compressed; + if (!tbuf) + { + if (cbuf) eina_binbuf_free(cbuf); + if (zmem) free(zmem); + return compressed; + } z = emile_compress(tbuf, EMILE_LZ4, EMILE_COMPRESSOR_FAST); From 3b53749149f69aa865d011f7c4b8635c5c2ab110 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Mon, 23 Sep 2019 10:41:46 +0200 Subject: [PATCH 02/50] docs: Typos in Efl.Object --- src/lib/eo/efl_object.eo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo index 02827dc8c1..68082f54c6 100644 --- a/src/lib/eo/efl_object.eo +++ b/src/lib/eo/efl_object.eo @@ -289,7 +289,7 @@ abstract Efl.Object ]] } event_global_thaw @static { - [[Gobally thaw events for ALL EFL OBJECTS. + [[Globally thaw events for ALL EFL OBJECTS. Allows event callbacks to be called for all EFL objects after they have been disabled by @.event_global_freeze. The amount of thaws must match @@ -347,7 +347,7 @@ abstract Efl.Object } } children_iterator_new { - [[Get an iterator on all childrens]] + [[Get an iterator on all children.]] return: iterator @move @no_unused; [[Children iterator]] } composite_attach @beta { From af5f37bd465edaa7eb9b8479df6e08788366447c Mon Sep 17 00:00:00 2001 From: Ross Vandegrift Date: Sun, 22 Sep 2019 23:30:25 +0000 Subject: [PATCH 03/50] Use EFL version for doc tarball, not meson version Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D10070 --- doc/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/meson.build b/doc/meson.build index b6bce8bf52..11e80dfadc 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -182,8 +182,8 @@ doc_target += custom_target('doxygen', ) compress_target = custom_target('package_doc_tar', - command: [tar, '-C', meson.build_root(), '-cf', 'efl-'+meson.version()+'.tar', 'html', 'man'], - output: 'efl-'+meson.version()+'.tar', + command: [tar, '-C', meson.build_root(), '-cf', 'efl-'+meson.project_version()+'.tar', 'html', 'man'], + output: 'efl-'+meson.project_version()+'.tar', depends: doc_target, build_by_default: false ) From 654e783d28b1a13fd4cf08f5ef0d4a5b171d3a39 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 20 Sep 2019 09:04:16 -0400 Subject: [PATCH 04/50] elm/layout: remove check for finalize in efl_canvas_group_change impl this used to be a thing in order to prevent widgets from spamming themselves with recalcs during construction, but since that's no longer possible we can remove this and also resolve an issue where legacy widgets failed to correctly calculate their min size if no text was set Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D10043 --- src/lib/elementary/efl_ui_layout.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index ed730a920f..98f731fdea 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -1801,7 +1801,6 @@ _elm_layout_efl_canvas_group_change(Eo *obj, Elm_Layout_Data *ld) { Efl_Ui_Layout_Data *sd; - if (!efl_finalized_get(obj)) return; sd = efl_data_scope_safe_get(obj, EFL_UI_LAYOUT_BASE_CLASS); EINA_SAFETY_ON_NULL_RETURN(sd); if (sd->frozen) return; From fe8715e9f6082da8c6b6e65b8c944b80730b8d4e Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Sat, 21 Sep 2019 04:28:24 +0000 Subject: [PATCH 05/50] test: Add a logic to check a size of Check If I pack a check without any api calls into a box, then it doesn't have the hint_min size which is defined on check edc. I guess there are problems on sizing logic currently, so this patch helps people to test the problem. Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D10038 --- src/bin/elementary/test_check.c | 4 ++++ src/tests/elementary/elm_test_check.c | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/bin/elementary/test_check.c b/src/bin/elementary/test_check.c index 9633f141c2..40ca00dfbe 100644 --- a/src/bin/elementary/test_check.c +++ b/src/bin/elementary/test_check.c @@ -115,6 +115,10 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf evas_object_show(ck); evas_object_show(ic); + ck = elm_check_add(win); + elm_box_pack_end(bx, ck); + evas_object_show(ck); + ck = elm_check_add(win); elm_box_pack_end(bx, ck); elm_object_text_set(ck, "text is visible when check state is true."); diff --git a/src/tests/elementary/elm_test_check.c b/src/tests/elementary/elm_test_check.c index 74af40f235..4881aaa876 100644 --- a/src/tests/elementary/elm_test_check.c +++ b/src/tests/elementary/elm_test_check.c @@ -6,6 +6,32 @@ #include #include "elm_suite.h" +EFL_START_TEST(elm_test_check_size) +{ + Evas_Object *win, *check, *box; + int width, height; + + win = elm_win_util_standard_add("check", "Check"); + + box = elm_box_add(win); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, box); + evas_object_show(box); + + check = elm_check_add(box); + elm_box_pack_end(box, check); + evas_object_show(check); + + evas_object_show(win); + + get_me_to_those_events(check); + + evas_object_size_hint_min_get(check, &width, &height); + ck_assert_int_gt(width, 0); + ck_assert_int_gt(height, 0); +} +EFL_END_TEST + EFL_START_TEST(elm_test_check_legacy_type_check) { Evas_Object *win, *check; @@ -122,6 +148,7 @@ EFL_END_TEST void elm_test_check(TCase *tc) { + tcase_add_test(tc, elm_test_check_size); tcase_add_test(tc, elm_test_check_legacy_type_check); tcase_add_test(tc, elm_test_check_onoff_text); tcase_add_test(tc, elm_test_check_state); From f7e183b851634de0ebc749568fe74cadbc9284f1 Mon Sep 17 00:00:00 2001 From: WooHyun Jung Date: Mon, 23 Sep 2019 10:48:02 +0200 Subject: [PATCH 06/50] efl_ui_scrollable: remove ui_scrollable_interactive and move all into ui_scrollable Summary: Based on the discussion T7883, there is no reason to keep those interfaces separately. So, now, efl_ui_scrollable will support the events and methods together. @ref T7883 Reviewers: eagleeye, bu5hm4n, zmike, segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7883 Differential Revision: https://phab.enlightenment.org/D10072 --- src/lib/efl/Efl.h | 1 - src/lib/efl/interfaces/efl_interfaces_main.c | 1 - src/lib/efl/interfaces/efl_ui_scrollable.eo | 165 +++++++++++++++++ .../efl_ui_scrollable_interactive.eo | 169 ------------------ src/lib/efl/interfaces/meson.build | 1 - src/lib/elementary/efl_ui_collection.c | 2 +- src/lib/elementary/efl_ui_collection.eo | 4 +- src/lib/elementary/efl_ui_image_zoomable.c | 2 +- src/lib/elementary/efl_ui_image_zoomable.eo | 4 +- src/lib/elementary/efl_ui_list_view.eo | 2 +- src/lib/elementary/efl_ui_panel.eo | 2 +- src/lib/elementary/efl_ui_scroll_manager.c | 40 ++--- src/lib/elementary/efl_ui_scroll_manager.eo | 26 +-- src/lib/elementary/efl_ui_scroller.c | 2 +- src/lib/elementary/efl_ui_scroller.eo | 4 +- src/lib/elementary/efl_ui_widget.c | 2 +- .../elementary/elm_interface_scrollable.eo | 2 +- 17 files changed, 211 insertions(+), 218 deletions(-) delete mode 100644 src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 403750ac93..db6e21b9c4 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -106,7 +106,6 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; #include "interfaces/efl_ui_draggable.eo.h" #include "interfaces/efl_ui_scrollable.eo.h" #include "interfaces/efl_ui_scrollbar.eo.h" -#include "interfaces/efl_ui_scrollable_interactive.eo.h" #include "interfaces/efl_ui_text_selectable.eo.h" #include "interfaces/efl_ui_container_selectable.eo.h" #include "interfaces/efl_ui_zoom.eo.h" diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index f9d7b801c2..36e962bc1e 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -74,7 +74,6 @@ #include "interfaces/efl_ui_draggable.eo.c" #include "interfaces/efl_ui_scrollable.eo.c" -#include "interfaces/efl_ui_scrollable_interactive.eo.c" #include "interfaces/efl_ui_scrollbar.eo.c" #include "interfaces/efl_ui_container_selectable.eo.c" #include "interfaces/efl_ui_text_selectable.eo.c" diff --git a/src/lib/efl/interfaces/efl_ui_scrollable.eo b/src/lib/efl/interfaces/efl_ui_scrollable.eo index 1bffa592af..520cdd1d13 100644 --- a/src/lib/efl/interfaces/efl_ui_scrollable.eo +++ b/src/lib/efl/interfaces/efl_ui_scrollable.eo @@ -1,7 +1,172 @@ +import eina_types; +import efl_ui_layout_orientable; + interface @beta Efl.Ui.Scrollable { [[Efl UI scrollable interface]] event_prefix: efl_ui; + methods { + @property content_pos { + [[The content position]] + set { + } + get { + } + values { + pos: Eina.Position2D; [[The position is virtual value, (0, 0) starting at the top-left.]] + } + } + @property content_size { + [[The content size]] + get { + } + values { + size: Eina.Size2D; [[The content size in pixels.]] + } + } + @property viewport_geometry { + [[The viewport geometry]] + get { + } + values { + rect: Eina.Rect; [[It is absolute geometry.]] + } + } + @property bounce_enabled { + [[Bouncing behavior + + When scrolling, the scroller may "bounce" when reaching the edge of the + content object. This is a visual way to indicate the end has been reached. + This is enabled by default for both axes. This API will determine if it's enabled + for the given axis with the boolean parameters for each one.]] + set { + } + get { + } + values { + horiz: bool; [[Horizontal bounce policy.]] + vert: bool; [[Vertical bounce policy.]] + } + } + @property scroll_freeze { + [[Freeze property + This function will freeze scrolling movement (by input of a user). + Unlike @.movement_block, this function freezes bidirectionally. + If you want to freeze in only one direction, + see @.movement_block.set. + ]] + get { + } + set { + } + values { + freeze: bool; [[$true if freeze, $false otherwise]] + } + } + @property scroll_hold { + [[Hold property + When hold turns on, it only scrolls by holding action. + ]] + get { + } + set { + } + values { + hold: bool; [[$true if hold, $false otherwise]] + } + } + @property looping { + [[Controls an infinite loop for a scroller.]] + set { + } + get { + } + values { + loop_h: bool; [[The scrolling horizontal loop]] + loop_v: bool; [[The Scrolling vertical loop]] + } + } + @property movement_block { + [[Blocking of scrolling (per axis). + + This function will block scrolling movement (by input of a user) in + a given direction. You can disable movements in the X axis, the Y + axis or both. + The default value is @Efl.Ui.Layout_Orientation.default meaning that movements are + allowed in both directions. + ]] + set { + } + get { + } + values { + block: Efl.Ui.Layout_Orientation(Efl.Ui.Layout_Orientation.default); [[Which axis (or axes) to block]] + } + } + @property gravity { + [[Control scrolling gravity on the scrollable + + The gravity defines how the scroller will adjust its view + when the size of the scroller contents increases. + + The scroller will adjust the view to glue itself as follows: + $[x=0.0] to stay where it is relative to the left edge of the content. + $[x=1.0] to stay where it is relative to the right edge of the content. + $[y=0.0] to stay where it is relative to the top edge of the content. + $[y=1.0] to stay where it is relative to the bottom edge of the content. + ]] + set { + } + get { + } + values { + x: double(0.0); [[Horizontal scrolling gravity.]] + y: double(0.0); [[Vertical scrolling gravity.]] + } + } + @property match_content { + [[Prevent the scrollable from being smaller than the minimum size of the content. + + By default the scroller will be as small as its design allows, + irrespective of its content. This will make the scroller minimum size the + right size horizontally and/or vertically to perfectly fit its content in + that direction.]] + set { + } + values { + w: bool; [[Whether to limit the minimum horizontal size]] + h: bool; [[Whether to limit the minimum vertical size]] + } + } + @property step_size { + [[Control the step size + + Use this call to set step size. + This value is used when scroller scroll by arrow key event.]] + set { + } + get { + } + values { + step: Eina.Position2D; [[The step size in pixels]] + } + } + scroll { + [[Show a specific virtual region within the scroller content object. + + This will ensure all (or part if it does not fit) of the designated + region in the virtual content object (0, 0 starting at the top-left of the + virtual content object) is shown within the scroller. This allows the scroller to "smoothly slide" + to this location (if configuration in general calls for transitions). It + may not jump immediately to the new location and make take a while and + show other content along the way. + ]] + params { + @in rect: Eina.Rect; [[The position where to scroll. and The size user want to see]] + @in animation: bool; [[Whether to scroll with animation or not]] + } + } + } events { scroll,started: void; [[Called when scroll operation starts]] scroll,changed: void; [[Called when scrolling]] diff --git a/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo b/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo deleted file mode 100644 index f931632382..0000000000 --- a/src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo +++ /dev/null @@ -1,169 +0,0 @@ -import eina_types; -import efl_ui_layout_orientable; - -interface @beta Efl.Ui.Scrollable_Interactive extends Efl.Ui.Scrollable -{ - c_prefix: efl_ui_scrollable; - methods { - @property content_pos { - [[The content position]] - set { - } - get { - } - values { - pos: Eina.Position2D; [[The position is virtual value, (0, 0) starting at the top-left.]] - } - } - @property content_size { - [[The content size]] - get { - } - values { - size: Eina.Size2D; [[The content size in pixels.]] - } - } - @property viewport_geometry { - [[The viewport geometry]] - get { - } - values { - rect: Eina.Rect; [[It is absolute geometry.]] - } - } - @property bounce_enabled { - [[Bouncing behavior - - When scrolling, the scroller may "bounce" when reaching the edge of the - content object. This is a visual way to indicate the end has been reached. - This is enabled by default for both axes. This API will determine if it's enabled - for the given axis with the boolean parameters for each one.]] - set { - } - get { - } - values { - horiz: bool; [[Horizontal bounce policy.]] - vert: bool; [[Vertical bounce policy.]] - } - } - @property scroll_freeze { - [[Freeze property - This function will freeze scrolling movement (by input of a user). - Unlike @.movement_block, this function freezes bidirectionally. - If you want to freeze in only one direction, - see @.movement_block.set. - ]] - get { - } - set { - } - values { - freeze: bool; [[$true if freeze, $false otherwise]] - } - } - @property scroll_hold { - [[Hold property - When hold turns on, it only scrolls by holding action. - ]] - get { - } - set { - } - values { - hold: bool; [[$true if hold, $false otherwise]] - } - } - @property looping { - [[Controls an infinite loop for a scroller.]] - set { - } - get { - } - values { - loop_h: bool; [[The scrolling horizontal loop]] - loop_v: bool; [[The Scrolling vertical loop]] - } - } - @property movement_block { - [[Blocking of scrolling (per axis). - - This function will block scrolling movement (by input of a user) in - a given direction. You can disable movements in the X axis, the Y - axis or both. - The default value is @Efl.Ui.Layout_Orientation.default meaning that movements are - allowed in both directions. - ]] - set { - } - get { - } - values { - block: Efl.Ui.Layout_Orientation(Efl.Ui.Layout_Orientation.default); [[Which axis (or axes) to block]] - } - } - @property gravity { - [[Control scrolling gravity on the scrollable - - The gravity defines how the scroller will adjust its view - when the size of the scroller contents increases. - - The scroller will adjust the view to glue itself as follows: - $[x=0.0] to stay where it is relative to the left edge of the content. - $[x=1.0] to stay where it is relative to the right edge of the content. - $[y=0.0] to stay where it is relative to the top edge of the content. - $[y=1.0] to stay where it is relative to the bottom edge of the content. - ]] - set { - } - get { - } - values { - x: double(0.0); [[Horizontal scrolling gravity.]] - y: double(0.0); [[Vertical scrolling gravity.]] - } - } - @property match_content { - [[Prevent the scrollable from being smaller than the minimum size of the content. - - By default the scroller will be as small as its design allows, - irrespective of its content. This will make the scroller minimum size the - right size horizontally and/or vertically to perfectly fit its content in - that direction.]] - set { - } - values { - w: bool; [[Whether to limit the minimum horizontal size]] - h: bool; [[Whether to limit the minimum vertical size]] - } - } - @property step_size { - [[Control the step size - - Use this call to set step size. - This value is used when scroller scroll by arrow key event.]] - set { - } - get { - } - values { - step: Eina.Position2D; [[The step size in pixels]] - } - } - scroll { - [[Show a specific virtual region within the scroller content object. - - This will ensure all (or part if it does not fit) of the designated - region in the virtual content object (0, 0 starting at the top-left of the - virtual content object) is shown within the scroller. This allows the scroller to "smoothly slide" - to this location (if configuration in general calls for transitions). It - may not jump immediately to the new location and make take a while and - show other content along the way. - ]] - params { - @in rect: Eina.Rect; [[The position where to scroll. and The size user want to see]] - @in animation: bool; [[Whether to scroll with animation or not]] - } - } - } -} diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index 58d90ebbe3..f59d5bbb78 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -9,7 +9,6 @@ pub_legacy_eo_files = [ 'efl_input_device.eo', 'efl_ui_draggable.eo', 'efl_ui_scrollable.eo', - 'efl_ui_scrollable_interactive.eo', 'efl_ui_scrollbar.eo', 'efl_ui_container_selectable.eo', 'efl_ui_text_selectable.eo', diff --git a/src/lib/elementary/efl_ui_collection.c b/src/lib/elementary/efl_ui_collection.c index 82e21d3dc1..9494fae9ab 100644 --- a/src/lib/elementary/efl_ui_collection.c +++ b/src/lib/elementary/efl_ui_collection.c @@ -470,7 +470,7 @@ _efl_ui_collection_efl_ui_layout_orientable_orientation_get(const Eo *obj EINA_U } EOLIAN static void -_efl_ui_collection_efl_ui_scrollable_interactive_match_content_set(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd, Eina_Bool w, Eina_Bool h) +_efl_ui_collection_efl_ui_scrollable_match_content_set(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd, Eina_Bool w, Eina_Bool h) { if (pd->match_content.w == w && pd->match_content.h == h) return; diff --git a/src/lib/elementary/efl_ui_collection.eo b/src/lib/elementary/efl_ui_collection.eo index 43eacec9af..b6125f8560 100644 --- a/src/lib/elementary/efl_ui_collection.eo +++ b/src/lib/elementary/efl_ui_collection.eo @@ -5,7 +5,7 @@ class @beta Efl.Ui.Collection extends Efl.Ui.Layout_Base implements Efl.Ui.Focus.Manager_Sub, Efl.Ui.Widget_Focus_Manager composites - Efl.Ui.Scrollable_Interactive, + Efl.Ui.Scrollable, Efl.Ui.Scrollbar, Efl.Ui.Focus.Manager { @@ -77,7 +77,7 @@ class @beta Efl.Ui.Collection extends Efl.Ui.Layout_Base implements Efl.Pack_Linear.pack_unpack_at; Efl.Pack_Linear.pack_index_get; Efl.Pack_Linear.pack_content_get; - Efl.Ui.Scrollable_Interactive.match_content { set; } + Efl.Ui.Scrollable.match_content { set; } Efl.Ui.Widget_Focus_Manager.focus_manager_create; Efl.Ui.Widget.focus_state_apply; Efl.Ui.Focus.Manager.move; diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index fc2eb60879..44836ab05b 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -2703,7 +2703,7 @@ _efl_ui_image_zoomable_image_region_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, } EOLIAN static void -_efl_ui_image_zoomable_efl_ui_scrollable_interactive_scroll(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Eina_Rect rc, Eina_Bool animation) +_efl_ui_image_zoomable_efl_ui_scrollable_scroll(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Eina_Rect rc, Eina_Bool animation) { int rx, ry, rw, rh; diff --git a/src/lib/elementary/efl_ui_image_zoomable.eo b/src/lib/elementary/efl_ui_image_zoomable.eo index cc8ae5dac9..4b48388dd1 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.eo +++ b/src/lib/elementary/efl_ui_image_zoomable.eo @@ -3,7 +3,7 @@ struct @extern Elm.Photocam.Error; [[Photocam error information.]] struct @extern Elm.Photocam.Progress; [[Photocam progress information.]] class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom - composites Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar + composites Efl.Ui.Scrollable, Efl.Ui.Scrollbar { [[Elementary Image Zoomable class]] methods { @@ -52,7 +52,7 @@ class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom Efl.Ui.Widget.theme_apply; Efl.Ui.Focus.Object.on_focus_update; Efl.Ui.Widget.widget_input_event_handler; - Efl.Ui.Scrollable_Interactive.scroll; + Efl.Ui.Scrollable.scroll; Efl.Access.Widget.Action.elm_actions { get; } Efl.File.load; Efl.File.unload; diff --git a/src/lib/elementary/efl_ui_list_view.eo b/src/lib/elementary/efl_ui_list_view.eo index 37db3fb183..d552ce4793 100644 --- a/src/lib/elementary/efl_ui_list_view.eo +++ b/src/lib/elementary/efl_ui_list_view.eo @@ -13,7 +13,7 @@ class @beta Efl.Ui.List_View extends Efl.Ui.Layout_Base implements Efl.Ui.Container_Selectable, Efl.Ui.List_View_Model, Efl.Ui.Widget_Focus_Manager composites - Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar + Efl.Ui.Scrollable, Efl.Ui.Scrollbar { methods { @property homogeneous { diff --git a/src/lib/elementary/efl_ui_panel.eo b/src/lib/elementary/efl_ui_panel.eo index f02845eb1c..57d716b869 100644 --- a/src/lib/elementary/efl_ui_panel.eo +++ b/src/lib/elementary/efl_ui_panel.eo @@ -18,7 +18,7 @@ struct @beta Efl.Ui.Panel_Scroll_Info class @beta Efl.Ui.Panel extends Efl.Ui.Layout_Base implements Efl.Ui.Focus.Layer, Efl.Content, Efl.Access.Widget.Action - composites Efl.Ui.Scrollable_Interactive + composites Efl.Ui.Scrollable { [[Elementary panel class]] methods { diff --git a/src/lib/elementary/efl_ui_scroll_manager.c b/src/lib/elementary/efl_ui_scroll_manager.c index db5fe303a2..c210752d5b 100644 --- a/src/lib/elementary/efl_ui_scroll_manager.c +++ b/src/lib/elementary/efl_ui_scroll_manager.c @@ -253,13 +253,13 @@ _efl_ui_scroll_manager_edge_right(Efl_Ui_Scroll_Manager_Data *sd) } EOLIAN static Eina_Size2D -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_content_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) +_efl_ui_scroll_manager_efl_ui_scrollable_content_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) { return efl_ui_pan_content_size_get(sd->pan_obj); } EOLIAN static Eina_Rect -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_viewport_geometry_get(const Eo *obj EINA_UNUSED, +_efl_ui_scroll_manager_efl_ui_scrollable_viewport_geometry_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) { if (!sd->pan_obj) return EINA_RECT(0, 0, 0, 0); @@ -268,21 +268,21 @@ _efl_ui_scroll_manager_efl_ui_scrollable_interactive_viewport_geometry_get(const } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_match_content_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool w, Eina_Bool h) +_efl_ui_scroll_manager_efl_ui_scrollable_match_content_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool w, Eina_Bool h) { sd->match_content_w = !!w; sd->match_content_h = !!h; } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_step_size_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Position2D step) +_efl_ui_scroll_manager_efl_ui_scrollable_step_size_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Position2D step) { sd->step.x = step.x * elm_config_scale_get(); sd->step.y = step.y * elm_config_scale_get(); } EOLIAN static Eina_Position2D -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_step_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) +_efl_ui_scroll_manager_efl_ui_scrollable_step_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) { return EINA_POSITION2D(sd->step.x, sd->step.y); } @@ -408,7 +408,7 @@ _efl_ui_scroll_manager_bounce_eval(Efl_Ui_Scroll_Manager_Data *sd) } EOLIAN static Eina_Position2D -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_content_pos_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) +_efl_ui_scroll_manager_efl_ui_scrollable_content_pos_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) { if (!sd->pan_obj) return EINA_POSITION2D(0, 0); @@ -416,7 +416,7 @@ _efl_ui_scroll_manager_efl_ui_scrollable_interactive_content_pos_get(const Eo *o } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_content_pos_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Position2D pos) +_efl_ui_scroll_manager_efl_ui_scrollable_content_pos_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Position2D pos) { Evas_Coord x = pos.x, y = pos.y; Eina_Position2D min = {0, 0}, max = {0, 0}, cur = {0, 0}; @@ -2309,25 +2309,25 @@ _efl_ui_scroll_manager_pan_set(Eo *obj, Efl_Ui_Scroll_Manager_Data *sd, Eo *pan) } EOLIAN static Eina_Bool -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_scroll_hold_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) +_efl_ui_scroll_manager_efl_ui_scrollable_scroll_hold_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) { return sd->hold; } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_scroll_hold_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool hold) +_efl_ui_scroll_manager_efl_ui_scrollable_scroll_hold_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool hold) { sd->hold = hold; } EOLIAN static Eina_Bool -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_scroll_freeze_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) +_efl_ui_scroll_manager_efl_ui_scrollable_scroll_freeze_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) { return sd->freeze; } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_scroll_freeze_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool freeze) +_efl_ui_scroll_manager_efl_ui_scrollable_scroll_freeze_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool freeze) { sd->freeze = freeze; if (sd->freeze) @@ -2339,21 +2339,21 @@ _efl_ui_scroll_manager_efl_ui_scrollable_interactive_scroll_freeze_set(Eo *obj E } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_bounce_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool horiz, Eina_Bool vert) +_efl_ui_scroll_manager_efl_ui_scrollable_bounce_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool horiz, Eina_Bool vert) { sd->bounce_horiz = !!horiz; sd->bounce_vert = !!vert; } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_bounce_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool *horiz, Eina_Bool *vert) +_efl_ui_scroll_manager_efl_ui_scrollable_bounce_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool *horiz, Eina_Bool *vert) { if (horiz) *horiz = sd->bounce_horiz; if (vert) *vert = sd->bounce_vert; } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_scroll(Eo *obj, Efl_Ui_Scroll_Manager_Data *sd, Eina_Rect rect, Eina_Bool animation) +_efl_ui_scroll_manager_efl_ui_scrollable_scroll(Eo *obj, Efl_Ui_Scroll_Manager_Data *sd, Eina_Rect rect, Eina_Bool animation) { _scroll_manager_animators_drop(obj); if (animation) @@ -2381,7 +2381,7 @@ _efl_ui_scroll_manager_efl_ui_scrollable_interactive_scroll(Eo *obj, Efl_Ui_Scro } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_gravity_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, double x, double y) +_efl_ui_scroll_manager_efl_ui_scrollable_gravity_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, double x, double y) { sd->gravity_x = x; sd->gravity_y = y; @@ -2391,26 +2391,26 @@ _efl_ui_scroll_manager_efl_ui_scrollable_interactive_gravity_set(Eo *obj EINA_UN } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_gravity_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, double *x, double *y) +_efl_ui_scroll_manager_efl_ui_scrollable_gravity_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, double *x, double *y) { if (x) *x = sd->gravity_x; if (y) *y = sd->gravity_y; } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_movement_block_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Efl_Ui_Layout_Orientation block) +_efl_ui_scroll_manager_efl_ui_scrollable_movement_block_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Efl_Ui_Layout_Orientation block) { sd->block = block; } EOLIAN static Efl_Ui_Layout_Orientation -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_movement_block_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) +_efl_ui_scroll_manager_efl_ui_scrollable_movement_block_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd) { return sd->block; } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_looping_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool loop_h, Eina_Bool loop_v) +_efl_ui_scroll_manager_efl_ui_scrollable_looping_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool loop_h, Eina_Bool loop_v) { if (sd->loop_h == loop_h && sd->loop_v == loop_v) return; @@ -2419,7 +2419,7 @@ _efl_ui_scroll_manager_efl_ui_scrollable_interactive_looping_set(Eo *obj EINA_UN } EOLIAN static void -_efl_ui_scroll_manager_efl_ui_scrollable_interactive_looping_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool *loop_h, Eina_Bool *loop_v) +_efl_ui_scroll_manager_efl_ui_scrollable_looping_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Bool *loop_h, Eina_Bool *loop_v) { *loop_h = sd->loop_h; *loop_v = sd->loop_v; diff --git a/src/lib/elementary/efl_ui_scroll_manager.eo b/src/lib/elementary/efl_ui_scroll_manager.eo index c08734c393..63a0e7107c 100644 --- a/src/lib/elementary/efl_ui_scroll_manager.eo +++ b/src/lib/elementary/efl_ui_scroll_manager.eo @@ -1,6 +1,6 @@ class @beta Efl.Ui.Scroll.Manager extends Efl.Object implements Efl.Ui.I18n, - Efl.Ui.Scrollable_Interactive, + Efl.Ui.Scrollable, Efl.Ui.Scrollbar { [[Efl ui scroll manager class]] @@ -25,21 +25,21 @@ class @beta Efl.Ui.Scroll.Manager extends Efl.Object implements Efl.Object.constructor; Efl.Object.destructor; Efl.Ui.I18n.mirrored { set; } - Efl.Ui.Scrollable_Interactive.content_pos { set; get; } - Efl.Ui.Scrollable_Interactive.content_size{ get; } - Efl.Ui.Scrollable_Interactive.viewport_geometry{ get; } - Efl.Ui.Scrollable_Interactive.bounce_enabled { set; get; } - Efl.Ui.Scrollable_Interactive.scroll_freeze { get; set; } - Efl.Ui.Scrollable_Interactive.scroll_hold { get; set; } - Efl.Ui.Scrollable_Interactive.looping { get; set; } - Efl.Ui.Scrollable_Interactive.movement_block { get; set; } - Efl.Ui.Scrollable_Interactive.gravity { get; set; } - Efl.Ui.Scrollable_Interactive.match_content { set; } - Efl.Ui.Scrollable_Interactive.step_size { set; get; } + Efl.Ui.Scrollable.content_pos { set; get; } + Efl.Ui.Scrollable.content_size{ get; } + Efl.Ui.Scrollable.viewport_geometry{ get; } + Efl.Ui.Scrollable.bounce_enabled { set; get; } + Efl.Ui.Scrollable.scroll_freeze { get; set; } + Efl.Ui.Scrollable.scroll_hold { get; set; } + Efl.Ui.Scrollable.looping { get; set; } + Efl.Ui.Scrollable.movement_block { get; set; } + Efl.Ui.Scrollable.gravity { get; set; } + Efl.Ui.Scrollable.match_content { set; } + Efl.Ui.Scrollable.step_size { set; get; } Efl.Ui.Scrollbar.bar_mode { get; set; } Efl.Ui.Scrollbar.bar_size { get; } Efl.Ui.Scrollbar.bar_position { get; set; } Efl.Ui.Scrollbar.bar_visibility_update; - Efl.Ui.Scrollable_Interactive.scroll; + Efl.Ui.Scrollable.scroll; } } diff --git a/src/lib/elementary/efl_ui_scroller.c b/src/lib/elementary/efl_ui_scroller.c index af9f6e88b4..92b99527bf 100644 --- a/src/lib/elementary/efl_ui_scroller.c +++ b/src/lib/elementary/efl_ui_scroller.c @@ -361,7 +361,7 @@ _efl_ui_scroller_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Scroller_Data *sd) } EOLIAN static void -_efl_ui_scroller_efl_ui_scrollable_interactive_match_content_set(Eo *obj EINA_UNUSED, +_efl_ui_scroller_efl_ui_scrollable_match_content_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroller_Data *sd, Eina_Bool match_content_w, Eina_Bool match_content_h) diff --git a/src/lib/elementary/efl_ui_scroller.eo b/src/lib/elementary/efl_ui_scroller.eo index b3cfeec9cb..9355d9dbae 100644 --- a/src/lib/elementary/efl_ui_scroller.eo +++ b/src/lib/elementary/efl_ui_scroller.eo @@ -3,7 +3,7 @@ class @beta Efl.Ui.Scroller extends Efl.Ui.Layout_Base implements Efl.Ui.Widget_Focus_Manager, Efl.Content composites - Efl.Ui.Scrollable_Interactive, + Efl.Ui.Scrollable, Efl.Ui.Scrollbar { [[Efl ui scroller class]] @@ -18,6 +18,6 @@ class @beta Efl.Ui.Scroller extends Efl.Ui.Layout_Base implements Efl.Ui.Widget.focus_state_apply; Efl.Ui.Widget.widget_input_event_handler; Efl.Ui.Widget_Focus_Manager.focus_manager_create; - Efl.Ui.Scrollable_Interactive.match_content { set; } + Efl.Ui.Scrollable.match_content { set; } } } diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 6d5c780b95..6835688c52 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -182,7 +182,7 @@ _elm_scrollable_is(const Evas_Object *obj) efl_isa(obj, ELM_INTERFACE_SCROLLABLE_MIXIN); else return - efl_isa(obj, EFL_UI_SCROLLABLE_INTERACTIVE_INTERFACE); + efl_isa(obj, EFL_UI_SCROLLABLE_INTERFACE); } static void diff --git a/src/lib/elementary/elm_interface_scrollable.eo b/src/lib/elementary/elm_interface_scrollable.eo index 86725b59bd..82ed4722d3 100644 --- a/src/lib/elementary/elm_interface_scrollable.eo +++ b/src/lib/elementary/elm_interface_scrollable.eo @@ -28,7 +28,7 @@ enum Elm.Scroller.Single_Direction last [[Internal. Sentinel value to indicate last enum field during iteration.]] } -mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrollable, Efl.Ui.Focus.Manager_Sub, Efl.Ui.Widget_Focus_Manager +mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Focus.Manager_Sub, Efl.Ui.Widget_Focus_Manager { [[Elm scrollable mixin]] c_prefix: elm_interface_scrollable; From c02dcf696614556b49b6e65b94f1471759e9aa77 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 20 Sep 2019 10:36:17 +0200 Subject: [PATCH 07/50] efl_ui_textpath: make sure variables are not uses uninitialized First and last could have been uninitialized for their first use in some cases. Make sure we set the x y coordinates to 0 to begin with. Coverity IDs: 1401458, 1404747 Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D10044 --- src/lib/elementary/efl_ui_textpath.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c index 2f9515840c..a3bac40522 100644 --- a/src/lib/elementary/efl_ui_textpath.c +++ b/src/lib/elementary/efl_ui_textpath.c @@ -577,7 +577,8 @@ _path_start_angle_adjust(Eo *obj, Efl_Ui_Textpath_Data *pd) { Eina_Rect r; Efl_Ui_Textpath_Segment *seg; - Eina_Vector2 first, last; + Eina_Vector2 first = { 0, 0 }; + Eina_Vector2 last = { 0, 0 }; int remained_w, len; double rad, t, offset_angle; From 87c8e2718cf79c5b3ccd2148efa63162ebdd784f Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 20 Sep 2019 10:46:02 +0200 Subject: [PATCH 08/50] efl_ui_selection_manager: free allocated memory after local use This temporary allocation is only used in this block and goes out of scope when leaving. Make sure we free the resource before this happens. Coverity ID: 1402653 Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D10045 --- src/lib/elementary/efl_ui_selection_manager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/efl_ui_selection_manager.c b/src/lib/elementary/efl_ui_selection_manager.c index 1c2e7c7cac..38b1766b9c 100644 --- a/src/lib/elementary/efl_ui_selection_manager.c +++ b/src/lib/elementary/efl_ui_selection_manager.c @@ -2429,6 +2429,7 @@ _wl_general_converter(char *target, Sel_Manager_Selection *sel, void *data, int memcpy(tmp, data, size); if (data_ret) *data_ret = tmp; if (size_ret) *size_ret = size; + if (!data_ret) free(tmp); } } else From 885d5b5b689e14152e9273ae89ba3f4d0bb5049b Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 20 Sep 2019 11:19:51 +0200 Subject: [PATCH 09/50] efl_ui_exact_model: fix always true condition The tbuf binbuffer has already been freed the line above, which means this condition would always be true as !tbuf would always result in true. As a result the rest of the function has never been executed. Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D10046 --- src/lib/elementary/efl_ui_exact_model.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_ui_exact_model.c b/src/lib/elementary/efl_ui_exact_model.c index 23b97db7e9..b12cfba8bd 100644 --- a/src/lib/elementary/efl_ui_exact_model.c +++ b/src/lib/elementary/efl_ui_exact_model.c @@ -81,10 +81,11 @@ _efl_ui_exact_model_slot_compress(unsigned int index, Eina_List *compressed, uns _efl_ui_exact_model_list_find(list_index, compressed, &l); tbuf = eina_binbuf_manage_new((unsigned char *) buffer, EFL_UI_EXACT_MODEL_CONTENT_LENGTH, EINA_TRUE); + if (!tbuf) return compressed; + cbuf = emile_compress(tbuf, EMILE_LZ4, EMILE_COMPRESSOR_FAST); eina_binbuf_free(tbuf); - - if (!tbuf || !cbuf) return compressed; + if (!cbuf) return compressed; // Make sure the list has all the buffer up to the needed one filled with valid data if (list_index) From a819a954bfa005f77b296fddf9de4bfd59f9486f Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 20 Sep 2019 12:11:39 +0200 Subject: [PATCH 10/50] elementary_codegen: check before use to avoid use after free These might or might not have been freed already, depending on the breaks form the above loop. Before we are having a use after free here better check on it before free'ing another time. Coverity IDs: 1402671, 1402701 Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D10047 --- src/bin/elementary/elementary_codegen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/elementary/elementary_codegen.c b/src/bin/elementary/elementary_codegen.c index 2f8324f448..28ed576f25 100644 --- a/src/bin/elementary/elementary_codegen.c +++ b/src/bin/elementary/elementary_codegen.c @@ -701,9 +701,13 @@ _programs_parse(Evas_Object *ed) } edje_edit_string_free(description); + description = NULL; edje_edit_string_free(sig); + sig = NULL; edje_edit_string_free(source); + source = NULL; free(apiname); + apiname = NULL; } edje_edit_string_list_free(programs); From 5ff0c3cc15879d58f356237d94d831eb409000c8 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 23 Sep 2019 09:42:22 +0200 Subject: [PATCH 11/50] eina_log: do not fallback to INFO when we run with systemd support INFO is a way too verbose log domain, this lead to the fact that we spammed journald before the first frame with ~200-300 messages (depending on the setup) which is quite a lot. Additionally, this also lead to the fact that we often TIMEOUT our own tests. Reviewed-by: Stefan Schmidt Differential Revision: https://phab.enlightenment.org/D10075 --- src/lib/eina/eina_log.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lib/eina/eina_log.c b/src/lib/eina/eina_log.c index 319c9d1c75..713da88350 100644 --- a/src/lib/eina/eina_log.c +++ b/src/lib/eina/eina_log.c @@ -1562,10 +1562,6 @@ eina_log_init(void) // Global log level if ((level = getenv(EINA_LOG_ENV_LEVEL))) _log_level = atoi(level); -#ifdef HAVE_SYSTEMD - else if (getenv("NOTIFY_SOCKET") && (_print_cb == eina_log_print_cb_journald)) - _log_level = EINA_LOG_LEVEL_INFO; -#endif // Register UNKNOWN domain, the default logger EINA_LOG_DOMAIN_GLOBAL = eina_log_domain_register("", NULL); From 696627ffcd980fa0bbf1d59da6a14b11965d57f0 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 23 Sep 2019 12:56:11 +0200 Subject: [PATCH 12/50] elm_test: mark image_zoomable test as non-legacy Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10053 --- src/bin/elementary/test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c index 27abd2656d..bf90382bd4 100644 --- a/src/bin/elementary/test.c +++ b/src/bin/elementary/test.c @@ -860,7 +860,7 @@ add_tests: ADD_TEST(NULL, "Images", "Photocam", test_photocam); ADD_TEST(NULL, "Images", "Photocam Remote", test_photocam_remote); ADD_TEST(NULL, "Images", "Photocam Icon", test_photocam_icon); - ADD_TEST(NULL, "Images", "Image Zoomable animation", test_image_zoomable_animated); + ADD_TEST_EO(NULL, "Images", "Image Zoomable animation", test_image_zoomable_animated); ADD_TEST(NULL, "Images", "Photo", test_photo); ADD_TEST(NULL, "Images", "Thumb", test_thumb); ADD_TEST(NULL, "Images", "Image", test_image); From dd5e7c7019710ea3ed35ff7f953d161ed4867434 Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Mon, 23 Sep 2019 19:37:10 +0900 Subject: [PATCH 13/50] efl_ui_tab_pager: fix infinite selected calls Since tab_pager's _select() and tab_bar's _selection_change_cb() cause calling each other infinitely. --- src/lib/elementary/efl_ui_tab_pager.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_tab_pager.c b/src/lib/elementary/efl_ui_tab_pager.c index 745a1dcb72..eb347ab99f 100644 --- a/src/lib/elementary/efl_ui_tab_pager.c +++ b/src/lib/elementary/efl_ui_tab_pager.c @@ -14,7 +14,10 @@ static void _select(Eo *obj EINA_UNUSED, Efl_Ui_Tab_Page *page) { - efl_ui_selectable_selected_set(efl_ui_tab_page_tab_bar_item_get(page), EINA_TRUE); + Efl_Ui_Tab_Bar_Default_Item *item = efl_ui_tab_page_tab_bar_item_get(page); + + if (!efl_ui_selectable_selected_get(item)) + efl_ui_selectable_selected_set(item, EINA_TRUE); } static void From eb2c1311ae37cb54611145d54ac31c9d6557a988 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 23 Sep 2019 21:12:07 +0900 Subject: [PATCH 14/50] ector engine: +null checking. Null pixels is allowed when drawing region is 0, In that case, the pixel buffer can be destroyed earlier by vg. @fix --- .../evas/engines/software_generic/evas_engine.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c index c85de3e4d3..e0577863b6 100644 --- a/src/modules/evas/engines/software_generic/evas_engine.c +++ b/src/modules/evas/engines/software_generic/evas_engine.c @@ -4430,12 +4430,15 @@ _draw_thread_ector_surface_set(void *data) if (surface) { pixels = evas_cache_image_pixels(&surface->cache_entry); - w = surface->cache_entry.w; - h = surface->cache_entry.h; - x = ector_surface->x; - y = ector_surface->y; - // clear the surface before giving to ector - if (ector_surface->clear) memset(pixels, 0, (w * h * 4)); + if (pixels) + { + w = surface->cache_entry.w; + h = surface->cache_entry.h; + x = ector_surface->x; + y = ector_surface->y; + // clear the surface before giving to ector + if (ector_surface->clear) memset(pixels, 0, (w * h * 4)); + } } ector_buffer_pixels_set(ector_surface->ector, pixels, w, h, 0, EFL_GFX_COLORSPACE_ARGB8888, EINA_TRUE); From 98c2a75bda3fdea34a8ae9c3751b7893e3d5f830 Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Thu, 19 Sep 2019 09:49:39 +0000 Subject: [PATCH 15/50] elementary: unref objects when memory allocation fails in factory The objects referenced are unreferenced when memory allocation fails in elementary factory. Differential Revision: https://phab.enlightenment.org/D9968 --- src/lib/elementary/efl_ui_caching_factory.c | 21 ++++++++++----------- src/lib/elementary/efl_ui_widget_factory.c | 19 +++++++++---------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/lib/elementary/efl_ui_caching_factory.c b/src/lib/elementary/efl_ui_caching_factory.c index 245830f161..09ec342845 100644 --- a/src/lib/elementary/efl_ui_caching_factory.c +++ b/src/lib/elementary/efl_ui_caching_factory.c @@ -180,6 +180,7 @@ _efl_ui_caching_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Caching_Factory_Data *pd, Eina_Iterator *models, Efl_Gfx_Entity *parent) { + Efl_Ui_Caching_Factory_Request *r; Efl_Ui_Caching_Factory_Group_Request *gr; Efl_Gfx_Entity *w = NULL; Efl_Model *model; @@ -187,7 +188,6 @@ _efl_ui_caching_factory_efl_ui_factory_create(Eo *obj, if (pd->cache && pd->style && !pd->klass) { - Efl_Ui_Caching_Factory_Request *r; Eina_Future **all; int count = 0; @@ -199,11 +199,7 @@ _efl_ui_caching_factory_efl_ui_factory_create(Eo *obj, r->factory = efl_ref(obj); all = calloc(1, sizeof (Eina_Future *)); - if (!all) - { - free(r); - return efl_loop_future_rejected(obj, ENOMEM); - } + if (!all) goto alloc_array_error; EINA_ITERATOR_FOREACH(models, model) { @@ -213,11 +209,7 @@ _efl_ui_caching_factory_efl_ui_factory_create(Eo *obj, .data = r); all = realloc(all, (count + 1) * sizeof (Eina_Future *)); - if (!all) - { - free(r); - return efl_loop_future_rejected(obj, ENOMEM); - } + if (!all) goto alloc_array_error; } eina_iterator_free(models); @@ -274,6 +266,13 @@ _efl_ui_caching_factory_efl_ui_factory_create(Eo *obj, .success_type = EINA_VALUE_TYPE_ARRAY, .data = gr, .free = _efl_ui_caching_factory_group_cleanup); + +alloc_array_error: + efl_unref(r->parent); + efl_unref(r->factory); + free(r); + eina_iterator_free(models); + return efl_loop_future_rejected(obj, ENOMEM); } static void diff --git a/src/lib/elementary/efl_ui_widget_factory.c b/src/lib/elementary/efl_ui_widget_factory.c index 4b1523dd01..ffb02753d9 100644 --- a/src/lib/elementary/efl_ui_widget_factory.c +++ b/src/lib/elementary/efl_ui_widget_factory.c @@ -201,11 +201,7 @@ _efl_ui_widget_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Widget_Factory_Data r->factory = efl_ref(obj); f = calloc(count + 1, sizeof (Eina_Future *)); - if (!f) - { - free(r); - return efl_loop_future_rejected(obj, ENOMEM); - } + if (!f) goto alloc_array_error; EINA_ITERATOR_FOREACH(models, model) { @@ -214,11 +210,7 @@ _efl_ui_widget_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Widget_Factory_Data .free = _efl_ui_widget_factory_single_cleanup); f = realloc(f, (count + 1) * sizeof (Eina_Future *)); - if (!f) - { - free(r); - return efl_loop_future_rejected(obj, ENOMEM); - } + if (!f) goto alloc_array_error; } eina_iterator_free(models); @@ -227,6 +219,13 @@ _efl_ui_widget_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Widget_Factory_Data return efl_future_then(obj, eina_future_all_array(f), .data = r, .free = _efl_ui_widget_factory_create_cleanup); + +alloc_array_error: + efl_unref(r->parent); + efl_unref(r->factory); + free(r); + eina_iterator_free(models); + return efl_loop_future_rejected(obj, ENOMEM); } static void From 8b2cae5b07150c641124978f92f0727a579b6b17 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 19 Sep 2019 09:28:57 -0400 Subject: [PATCH 16/50] ci: add back target to do out-of-tree test build this is necessary in order to ensure that our headers are usable ref T8228 Reviewed-by: Stefan Schmidt Differential Revision: https://phab.enlightenment.org/D10036 --- .ci/build-example.sh | 16 ++++++++++++++++ .ci/ci-build-test.sh | 23 +++++++++++++++++++++++ .ci/example/meson.build | 13 +++++++++++++ .ci/example/src/main.c | 11 +++++++++++ .ci/example/src/meson.build | 12 ++++++++++++ .travis.yml | 10 +++------- 6 files changed, 78 insertions(+), 7 deletions(-) create mode 100755 .ci/build-example.sh create mode 100755 .ci/ci-build-test.sh create mode 100644 .ci/example/meson.build create mode 100644 .ci/example/src/main.c create mode 100644 .ci/example/src/meson.build diff --git a/.ci/build-example.sh b/.ci/build-example.sh new file mode 100755 index 0000000000..0e1a16b099 --- /dev/null +++ b/.ci/build-example.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +if [ -d /usr/local/lib64 ] ; then + export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig +else + export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig +fi +cd .ci/example + +#build the example +mkdir build +meson . build +ninja -C build all + diff --git a/.ci/ci-build-test.sh b/.ci/ci-build-test.sh new file mode 100755 index 0000000000..67b39dec5e --- /dev/null +++ b/.ci/ci-build-test.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e +. .ci/travis.sh +travis_fold compile_test compile_test +if [ "$DISTRO" != "" ] ; then + if [ "$1" = "coverity" ] ; then + exit 0 + fi + if [ "$1" = "mingw" ] ; then + exit 0 + fi + if [ "$1" = "release-ready" ] ; then + exit 0 + fi + docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) .ci/build-example.sh +else + exit 0 + #FIXME: we don't install efl_ui.pc on osx? + export PATH="$(brew --prefix gettext)/bin:$PATH" + .ci/build-example.sh +fi +travis_endfold compile_test diff --git a/.ci/example/meson.build b/.ci/example/meson.build new file mode 100644 index 0000000000..b3d698afc0 --- /dev/null +++ b/.ci/example/meson.build @@ -0,0 +1,13 @@ +project( + 'efl-example', 'c', + version : '0.0.1', + default_options: [ 'c_std=gnu99', 'warning_level=2' ], + meson_version : '>= 0.38.0') + +eina = dependency('eina', version : '>=1.20.99') +efl = dependency('efl-ui', version : '>=1.20.99') +elm = dependency('elementary', version : '>=1.20.99') + +inc = include_directories('.') +subdir('src') + diff --git a/.ci/example/src/main.c b/.ci/example/src/main.c new file mode 100644 index 0000000000..1d1230e496 --- /dev/null +++ b/.ci/example/src/main.c @@ -0,0 +1,11 @@ +#define EFL_BETA_API_SUPPORT 1 +#define EFL_NOLEGACY_API_SUPPORT +#include + + +EAPI_MAIN void +efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) +{ + return 0; +} +EFL_MAIN() diff --git a/.ci/example/src/meson.build b/.ci/example/src/meson.build new file mode 100644 index 0000000000..47673e9145 --- /dev/null +++ b/.ci/example/src/meson.build @@ -0,0 +1,12 @@ +src = files([ + 'main.c', +]) + +deps = [eina, efl, elm] + +executable('efl_example', src, + dependencies : deps, + include_directories : inc, + install : true +) + diff --git a/.travis.yml b/.travis.yml index 9af193ac9d..08c9fc2cd1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -103,15 +103,11 @@ script: if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CI_BUILD_TYPE" == "" ]]; then .ci/ci-make-benchmark.sh "$CI_BUILD_TYPE" fi - #- .ci/ci-make-install.sh "$CI_BUILD_TYPE" + - .ci/ci-make-install.sh "$CI_BUILD_TYPE" - .ci/ci-make-check.sh "$CI_BUILD_TYPE" - .ci/ci-make-distcheck.sh "$CI_BUILD_TYPE" - #- | - #if [[ "$DISTRO" == "" ]] && [[ "$TRAVIS_OS_NAME" != "linux" ]] ; then - #true - #elif [[ "$CI_BUILD_TYPE" != "release-ready" ]] ; then - #docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) .ci/build-efl-app.sh - #fi + - | + - .ci/ci-build-test.sh "$CI_BUILD_TYPE" before_cache: - .ci/ci-ccache-stats.sh - | From 74becf76c0247a7a4169c58eb07ea5733dd78366 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Mon, 23 Sep 2019 15:26:23 +0200 Subject: [PATCH 17/50] eolian: allow read-only stringshare in events While the type cannot be moved to the callee, it at least provides a hint that it's a stringshare, leeting people ref it instead of copying. --- src/lib/eolian/database_validate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c index a24105c607..d0bf40d17a 100644 --- a/src/lib/eolian/database_validate.c +++ b/src/lib/eolian/database_validate.c @@ -646,11 +646,11 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash) } /* any type past builtin value types and containers is not allowed, * any_value is allowed but passed as const reference, any_value_ref - * is not; string is allowed, but mutable strings or stringshares are + * is not; string and stringshare is allowed, but mutable strings are * not and neither are string buffers, the type is never owned by the * callee, so all strings passed in are unowned and read-only */ - if (kwid >= KW_any_value_ref && kwid != KW_string) + if (kwid >= KW_any_value_ref && kwid != KW_string && kwid != KW_stringshare) { _eo_parser_log(&tp->base, "forbidden event type"); return _reset_stable(vals, was_stable, EINA_FALSE); From b6c713c937a64115b2b23b9adcbb13912edfb8a0 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 23 Sep 2019 14:11:51 +0200 Subject: [PATCH 18/50] eina_log: ensure that we do not spam journald with our intree binaries EFL_RUN_IN_TREE is set for all binaries that are executed during build time, and test suites. With this commit we are ensuring that we are not sending messages during that time to journald, otherwise we would waste a lot of time + we would create a lot of unneccessary log messages. (eina test suite runtime with journald hook: 11.21s without journald hook: 0.57s) Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D10076 --- src/lib/eina/eina_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_log.c b/src/lib/eina/eina_log.c index 713da88350..81be34a1b2 100644 --- a/src/lib/eina/eina_log.c +++ b/src/lib/eina/eina_log.c @@ -1538,7 +1538,7 @@ eina_log_init(void) #endif #ifdef HAVE_SYSTEMD - if (getenv("NOTIFY_SOCKET")) + if (getenv("NOTIFY_SOCKET") && !getenv("EFL_RUN_IN_TREE")) _print_cb = eina_log_print_cb_journald; #endif From 527ca2e6c08ddeaef315007f8959519b27af5a2d Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 20 Sep 2019 13:01:04 -0400 Subject: [PATCH 19/50] theme: remove dead popup theme groups these widgets were removed ref T8231 Reviewed-by: Xavi Artigas Differential Revision: https://phab.enlightenment.org/D10054 --- data/elementary/themes/edc/efl/popup.edc | 43 ------------------------ 1 file changed, 43 deletions(-) diff --git a/data/elementary/themes/edc/efl/popup.edc b/data/elementary/themes/edc/efl/popup.edc index b81d878ae6..1db84cb683 100644 --- a/data/elementary/themes/edc/efl/popup.edc +++ b/data/elementary/themes/edc/efl/popup.edc @@ -29,8 +29,6 @@ group { "efl/popup"; } group { "efl/alert_popup"; - alias: "efl/scroll_alert_popup"; - alias: "efl/text_alert_popup"; images.image: "rounded_square.png" COMP; parts { alias: "title" "efl.text.title"; @@ -123,8 +121,6 @@ group { "efl/alert_popup"; group { "efl/popup/backwall"; alias: "efl/alert_popup/backwall"; - alias: "efl/scroll_alert_popup/backwall"; - alias: "efl/text_alert_popup/backwall"; parts { rect { "base"; desc { "default"; @@ -174,8 +170,6 @@ group { "efl/popup/backwall"; } group { "efl/alert_popup/button_layout1"; - alias: "efl/scroll_alert_popup/button_layout1"; - alias: "efl/text_alert_popup/button_layout1"; parts { swallow { "efl.button1"; } @@ -183,8 +177,6 @@ group { "efl/alert_popup/button_layout1"; } group { "efl/alert_popup/button_layout2"; - alias: "efl/scroll_alert_popup/button_layout2"; - alias: "efl/text_alert_popup/button_layout2"; parts { spacer { "div1"; desc { "default"; @@ -209,8 +201,6 @@ group { "efl/alert_popup/button_layout2"; } group { "efl/alert_popup/button_layout3"; - alias: "efl/scroll_alert_popup/button_layout3"; - alias: "efl/text_alert_popup/button_layout3"; parts { spacer { "div1"; desc { "default"; @@ -251,45 +241,12 @@ group { "efl/alert_popup/button_layout3"; group { "efl/alert_popup/left_button"; inherit: "efl/button"; - alias: "efl/scroll_alert_popup/left_button"; - alias: "efl/text_alert_popup/left_button"; } group { "efl/alert_popup/right_button"; inherit: "efl/button"; - alias: "efl/scroll_alert_popup/right_button"; - alias: "efl/text_alert_popup/right_button"; } group { "efl/alert_popup/button"; inherit: "efl/button"; - alias: "efl/scroll_alert_popup/button"; - alias: "efl/text_alert_popup/button"; -} - -group { "efl/scroll_alert_popup/scroller"; - inherit: "efl/scroller"; - alias: "efl/text_alert_popup/scroller"; - parts { - swallow { "efl.content"; - desc { "default"; - rel1.offset: 0 0; - rel2.offset: 0 0; - } - } - spacer { "inset"; - desc { "default"; - hid; - } - } - spacer { "shadow"; - desc { "default"; - hid; - } - } - } -} - -group { "efl/text_alert_popup/text"; - inherit: "efl/text"; } From 659e0fc00c8f828b0fb5b56516d9bdde99c4851b Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 20 Sep 2019 12:51:18 -0400 Subject: [PATCH 20/50] theme: efl/photocam -> efl/image_zoomable the theme group for a class should match its class name ref T8231 Reviewed-by: Xavi Artigas Differential Revision: https://phab.enlightenment.org/D10052 --- data/elementary/themes/default.edc | 2 +- .../themes/edc/efl/{photocam.edc => image_zoomable.edc} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename data/elementary/themes/edc/efl/{photocam.edc => image_zoomable.edc} (98%) diff --git a/data/elementary/themes/default.edc b/data/elementary/themes/default.edc index 26c0270ab2..cc29760931 100644 --- a/data/elementary/themes/default.edc +++ b/data/elementary/themes/default.edc @@ -190,7 +190,7 @@ collections { #include "edc/efl/tags.edc" #include "edc/efl/panel.edc" #include "edc/efl/tooltip.edc" -#include "edc/efl/photocam.edc" +#include "edc/efl/image_zoomable.edc" #include "edc/efl/progress.edc" #include "edc/efl/border.edc" #include "edc/efl/spin.edc" diff --git a/data/elementary/themes/edc/efl/photocam.edc b/data/elementary/themes/edc/efl/image_zoomable.edc similarity index 98% rename from data/elementary/themes/edc/efl/photocam.edc rename to data/elementary/themes/edc/efl/image_zoomable.edc index e69f7ed355..8f4492c33f 100644 --- a/data/elementary/themes/edc/efl/photocam.edc +++ b/data/elementary/themes/edc/efl/image_zoomable.edc @@ -1,4 +1,4 @@ -group { name: "efl/photocam"; +group { name: "efl/image_zoomable"; inherit: "efl/scroller"; images.image: "knob_round_busy.png" COMP; images.image: "glow_round_corners.png" COMP; From f18201749c4b6571fc2c2a97fad520fff0d73059 Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Fri, 20 Sep 2019 05:26:41 +0000 Subject: [PATCH 21/50] gesture: fix it not to lose information by dividing division of integer by integer results integer. this patch fix the case to make a division result more precise. Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D10039 --- src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c index 190e476312..0bd41f55b6 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c @@ -71,7 +71,7 @@ _zoom_compute(Efl_Canvas_Gesture_Recognizer_Zoom_Data *pd, Evas_Coord diam = _finger_gap_length_get(xx1, yy1, xx2, yy2, &x, &y); - zd->radius = diam / 2; + zd->radius = diam / 2.0; if (!pd->zoom_base) { @@ -202,7 +202,7 @@ _efl_canvas_gesture_recognizer_zoom_efl_canvas_gesture_recognizer_recognize(Eo * pd->zoom_st.cur.pos.y, &x, &y); - zd->radius = pd->zoom_base / 2; + zd->radius = pd->zoom_base / 2.0; if ((efl_gesture_state_get(gesture) != EFL_GESTURE_STARTED) && (efl_gesture_state_get(gesture) != EFL_GESTURE_UPDATED)) From e79d6bd0af5748bc26f3af713058d5847df8c807 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Mon, 23 Sep 2019 14:00:25 +0000 Subject: [PATCH 22/50] eina_array: do not mix declaration and definition fix warning when used in C90 code. Reviewed-by: Stefan Schmidt Differential Revision: https://phab.enlightenment.org/D10077 --- src/lib/eina/eina_inline_array.x | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/eina/eina_inline_array.x b/src/lib/eina/eina_inline_array.x index f3c11f67a4..d750782ce8 100644 --- a/src/lib/eina/eina_inline_array.x +++ b/src/lib/eina/eina_inline_array.x @@ -95,15 +95,16 @@ eina_array_count(const Eina_Array *array) static inline Eina_Bool eina_array_find(const Eina_Array *array, const void *data, unsigned int *out_idx) { + unsigned int i; + if (!array) return EINA_FALSE; - unsigned int i = 0; - for (; i < array->count; i++) + for (i = 0; i < array->count; i++) { if (array->data[i] == data) { if (out_idx) *out_idx = i; - + return EINA_TRUE; } } From 883ef612b771d44c6170f05655de723fa3a2e9e5 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Mon, 23 Sep 2019 18:05:07 +0200 Subject: [PATCH 23/50] docs: Efl.Ui.Widget_Scroller_Content updated docs Summary: Ref T8254 Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8254 Differential Revision: https://phab.enlightenment.org/D10082 --- .../efl_ui_widget_scrollable_content.eo | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/lib/elementary/efl_ui_widget_scrollable_content.eo b/src/lib/elementary/efl_ui_widget_scrollable_content.eo index 9dba617de1..2b0c24b22a 100644 --- a/src/lib/elementary/efl_ui_widget_scrollable_content.eo +++ b/src/lib/elementary/efl_ui_widget_scrollable_content.eo @@ -3,14 +3,14 @@ parse efl_text_format; mixin @beta Efl.Ui.Widget_Scrollable_Content requires Efl.Object { - [[Efl widget scrollable content mixin + [[Mixin helper to add scrollable content to widgets. - This can be used to provide scrollable contents and text for widgets. When a scrollable - text or content is set, this mixin will create and manage an internal scroller object which + This can be used to provide scrollable contents and text for widgets. When @.scrollable_content or + @.scrollable_text is set, this mixin will create and manage an internal scroller object which will be the container of that text or content. - Only a single content or text can be set at any given time. Setting @.scrollable_content - will unset @.scrollable_text and vice versa. + Only a single content or text can be set at any given time. Setting @.scrollable_text + will unset @.scrollable_content. @since 1.23 ]] @@ -21,34 +21,32 @@ mixin @beta Efl.Ui.Widget_Scrollable_Content requires Efl.Object @property scrollable_content_did_group_calc @protected @beta { [[Widgets can call this function during their @Efl.Canvas.Group.group_calculate implementation after the super call to determine whether the internal scroller - has performed sizing calculations. + has already performed sizing calculations. - The optimal_size,calc event will have been emitted during the super call if - this method returns $true. - - In the case that this returns $true, it's likely that the widget should be completing - its internal sizing calculations from the @[Efl.Ui.Widget_Scrollable_Content.optimal_size,calc] callback using + If this property is $true, the @[Efl.Ui.Widget_Scrollable_Content.optimal_size,calc] event will have been + emitted during the super call. In this case it's likely that the widget should be completing + its internal sizing calculations from that event using: efl_canvas_group_calculate(efl_super(ev->object, EFL_UI_WIDGET_SCROLLABLE_CONTENT_MIXIN)); - in order to skip the scrollable sizing calc. + in order to skip the scrollable sizing calculation. @since 1.23 ]] get {} values { - did_group_calc: bool; [[Whether the internal scroller has done sizing calcs.]] + did_group_calc: bool; [[Whether the internal scroller has already done sizing calculations.]] } } @property scrollable_content { [[This is the content which will be placed in the internal scroller. - If a scrollable text string is set, this will return $NULL. + If a @.scrollable_text string is set, this property will be $NULL. @since 1.23 ]] set { - return: bool; [[True on success]] + return: bool; [[$true on success.]] } get {} values { From 03da60997e76d1604b4554e60866283591b98e0d Mon Sep 17 00:00:00 2001 From: Lauro Moura Date: Mon, 23 Sep 2019 13:33:52 -0300 Subject: [PATCH 24/50] cxx: Fix some warnings from -Wextra Summary: - As we don't have C++17's [[fallthrough]], rely on GCC'd detection of fallthrough comments. See https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/ - Replaced some copy constructors with typecast operators. Previously, a constructor with remove_const/remove_cv were used to allow const iterators to be constructed from non-const iterators. This had the side effect of making these constructors actual copy constructors for non const lists. As we did not define other special constructors/operators, the rule of 5 were violated for these cases. This commit replaces these constructors with actual typecast operators that promote non const iterators to their const counterparts. - Cast a Eina_Bool/bool narrowing conversion - Add a missing break statement from D10050 Reviewers: zmike, brunobelo, felipealmeida Reviewed By: brunobelo Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9934 --- src/bindings/cxx/eina_cxx/eina_inlist.hh | 7 ++++--- src/bindings/cxx/eina_cxx/eina_ptrarray.hh | 4 ++-- src/bindings/cxx/eina_cxx/eina_ptrlist.hh | 4 ++-- src/lib/eolian_cxx/grammar/html_escaped_string.hpp | 3 ++- src/lib/eolian_cxx/grammar/klass_def.hpp | 3 ++- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/bindings/cxx/eina_cxx/eina_inlist.hh b/src/bindings/cxx/eina_cxx/eina_inlist.hh index 0092989cb7..8804034d11 100644 --- a/src/bindings/cxx/eina_cxx/eina_inlist.hh +++ b/src/bindings/cxx/eina_cxx/eina_inlist.hh @@ -101,11 +101,12 @@ struct _inlist_iterator : _list(list), _node(node) {} /** - * @brief Copy constructor. Creates a copy of the given iterator. + * @brief Create a const iterator from this one. * @param other Other iterator. */ - _inlist_iterator(_inlist_iterator::type> const& other) - : _list(other._list), _node(other._node) {} + operator _inlist_iterator() { + return _inlist_iterator{_list, _node}; + } /** * @brief Move the iterator to the next position in the list. diff --git a/src/bindings/cxx/eina_cxx/eina_ptrarray.hh b/src/bindings/cxx/eina_cxx/eina_ptrarray.hh index b5de9d7290..b2f6ef515b 100644 --- a/src/bindings/cxx/eina_cxx/eina_ptrarray.hh +++ b/src/bindings/cxx/eina_cxx/eina_ptrarray.hh @@ -46,9 +46,9 @@ struct _ptr_array_iterator { } - _ptr_array_iterator(_ptr_array_iterator::type> const& other) - : _ptr(other._ptr) + operator _ptr_array_iterator() { + return _ptr_array_iterator{_ptr}; } _ptr_array_iterator& operator++() { diff --git a/src/bindings/cxx/eina_cxx/eina_ptrlist.hh b/src/bindings/cxx/eina_cxx/eina_ptrlist.hh index 03b836ab6f..988658b2fa 100644 --- a/src/bindings/cxx/eina_cxx/eina_ptrlist.hh +++ b/src/bindings/cxx/eina_cxx/eina_ptrlist.hh @@ -62,9 +62,9 @@ struct _ptr_list_iterator : _ptr_list_iterator_base : _ptr_list_iterator_base(list, node) { } - _ptr_list_iterator(_ptr_list_iterator const& other) - : _ptr_list_iterator_base(static_cast<_ptr_list_iterator_base const&>(other)) + operator _ptr_list_iterator() { + return _ptr_list_iterator{_list, _node}; } _ptr_list_iterator& operator++() diff --git a/src/lib/eolian_cxx/grammar/html_escaped_string.hpp b/src/lib/eolian_cxx/grammar/html_escaped_string.hpp index 371afcda24..5bbad79c0f 100644 --- a/src/lib/eolian_cxx/grammar/html_escaped_string.hpp +++ b/src/lib/eolian_cxx/grammar/html_escaped_string.hpp @@ -26,7 +26,8 @@ struct html_escaped_string_generator case '\'': out.append("'"); break; case '<': out.append("<"); break; case '>': out.append(">"); break; - case '\\': if (pos < input.size() - 1) pos++; // Deliberate fallthrough + case '\\': if (pos < input.size() - 1) pos++; + // fall through default: out.append(&input[pos], 1); break; } } diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp index b1f6c383a3..a7a01cc243 100644 --- a/src/lib/eolian_cxx/grammar/klass_def.hpp +++ b/src/lib/eolian_cxx/grammar/klass_def.hpp @@ -495,7 +495,7 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni complex.subtypes.push_back({stp , unit , ::eolian_type_c_type_get(stp) - , eolian_type_is_move(stp) + , static_cast(eolian_type_is_move(stp)) , is_by::value}); stp = eolian_type_next_type_get(stp); } @@ -532,6 +532,7 @@ inline void type_def::set(Eolian_Expression_Type eolian_exp_type) break; case EOLIAN_EXPR_STRING: set("string", "const char *"); + break; case EOLIAN_EXPR_BOOL: set("bool", "Eina_Bool"); break; From 74cfe457c32669f0ac2b96bf18b093488acb7595 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 23 Sep 2019 09:30:03 -0400 Subject: [PATCH 25/50] efl_ui/layout: move 'frozen' struct member to be a bool bitflag this is already handled by edje, all we really want here is a flag to avoid more eo lookups internally when calling canvas_group_change Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10079 --- src/lib/elementary/efl_ui_layout.c | 21 ++++++++++----------- src/lib/elementary/elm_widget_layout.h | 3 +-- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index 98f731fdea..bcc947ba22 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -1834,26 +1834,25 @@ EOLIAN static int _efl_ui_layout_base_efl_layout_calc_calc_freeze(Eo *obj, Efl_Ui_Layout_Data *sd) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 0); - - if ((sd->frozen)++ != 0) return sd->frozen; - - edje_object_freeze(wd->resize_obj); - - return 1; + sd->frozen = EINA_TRUE; + return edje_object_freeze(wd->resize_obj); } EOLIAN static int _efl_ui_layout_base_efl_layout_calc_calc_thaw(Eo *obj, Efl_Ui_Layout_Data *sd) { + int ret; ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 0); - if (--(sd->frozen) != 0) return sd->frozen; + ret = edje_object_thaw(wd->resize_obj); - edje_object_thaw(wd->resize_obj); + if (!ret) + { + sd->frozen = EINA_FALSE; + efl_canvas_group_change(obj); + } - efl_canvas_group_change(obj); - - return 0; + return ret; } EOLIAN void diff --git a/src/lib/elementary/elm_widget_layout.h b/src/lib/elementary/elm_widget_layout.h index 62949cae15..0997ccbb0d 100644 --- a/src/lib/elementary/elm_widget_layout.h +++ b/src/lib/elementary/elm_widget_layout.h @@ -62,10 +62,9 @@ typedef struct _Efl_Ui_Layout_Data Eina_Bool updating : 1; } connect; - int frozen; /**< Layout freeze counter */ - unsigned int finger_size_multiplier_x, finger_size_multiplier_y; /**< multipliers for finger_size during group_calc */ + Eina_Bool frozen; /**< Layout freeze state */ Eina_Bool can_access : 1; /**< This is true when all text(including textblock) parts can be accessible by accessibility. */ Eina_Bool destructed_is : 1; /**< This flag indicates if Efl.Ui.Layout destructor was called. This is needed to avoid unnecessary calculation of subobject deletion during layout object's deletion. */ Eina_Bool file_set : 1; /**< This flag indicates if Efl.Ui.Layout source is set from a file*/ From 1260333ae55dfc4dae54086a22b42d90fbb13511 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 23 Sep 2019 10:06:26 -0400 Subject: [PATCH 26/50] build: fix EFL_VERSION_MICRO define this was never pulled in from the build system and thus was never actually defined Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10078 --- src/lib/efl/Efl_Config.h.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/efl/Efl_Config.h.in b/src/lib/efl/Efl_Config.h.in index 1673cd04e9..56732f2c1c 100644 --- a/src/lib/efl/Efl_Config.h.in +++ b/src/lib/efl/Efl_Config.h.in @@ -11,6 +11,7 @@ #define EFL_VERSION_MAJOR @EFL_VERSION_MAJOR@ #define EFL_VERSION_MINOR @EFL_VERSION_MINOR@ +#define EFL_VERSION_MICRO @EFL_VERSION_MICRO@ #define EFL_BUILD_ID "@EFL_BUILD_ID@" #endif From 802f414b257aa0203d47abe2d01c788ae276cd91 Mon Sep 17 00:00:00 2001 From: Woochanlee Date: Mon, 23 Sep 2019 06:17:45 +0000 Subject: [PATCH 27/50] ecore_thread: Fix arguments to match with the function call. see the _eina_thread_internal() function r = c->func((void*) c->data, eina_thread_self()); The second param has been missed in ecore_thread_worker, ecore_direct_worker functions. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10073 --- src/lib/ecore/ecore_thread.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c index a2c6489d3f..05ab26cdea 100644 --- a/src/lib/ecore/ecore_thread.c +++ b/src/lib/ecore/ecore_thread.c @@ -164,7 +164,7 @@ static Eina_Bool have_main_loop_thread = 0; static Eina_Trash *_ecore_thread_worker_trash = NULL; static int _ecore_thread_worker_count = 0; -static void *_ecore_thread_worker(void *); +static void *_ecore_thread_worker(void *, Eina_Thread); static Ecore_Pthread_Worker *_ecore_thread_worker_new(void); static PH(get_main_loop_thread) (void) @@ -468,8 +468,9 @@ _ecore_direct_worker_cleanup(void *data) } static void * -_ecore_direct_worker(Ecore_Pthread_Worker *work) +_ecore_direct_worker(void *data, Eina_Thread t EINA_UNUSED) { + Ecore_Pthread_Worker *work = data; eina_thread_cancellable_set(EINA_FALSE, NULL); eina_thread_name_set(eina_thread_self(), "Ethread-feedback"); work->self = PHS(); @@ -497,7 +498,7 @@ _ecore_thread_worker_cleanup(void *data EINA_UNUSED) } static void * -_ecore_thread_worker(void *data EINA_UNUSED) +_ecore_thread_worker(void *data EINA_UNUSED, Eina_Thread t EINA_UNUSED) { eina_thread_cancellable_set(EINA_FALSE, NULL); EINA_THREAD_CLEANUP_PUSH(_ecore_thread_worker_cleanup, NULL); From 63ebd0e9cc54bdbc48dac0cc0bca1892a8fde94a Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sat, 21 Sep 2019 11:09:24 +0200 Subject: [PATCH 28/50] efl_ui_focus_managr_sub: fix a err message with this commit there are a few errors less, for the case a object is destroyed while registered as a border element in the sub manager. This adds a few more callbacks to the list of callbacks, however, i could not messure a big performance impact. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10067 --- src/lib/elementary/efl_ui_focus_manager_sub.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index ee80ce40d2..7a2de74003 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -29,11 +29,22 @@ _set_a_without_b(Eina_List *a, Eina_List *b) return a_out; } +static void +_invalidate_cb(void *data, const Efl_Event *ev) +{ + MY_DATA(data, pd); + + EINA_SAFETY_ON_NULL_RETURN(pd); + + pd->current_border = eina_list_remove(pd->current_border, ev->object); +} + static void _register(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager *par_m, Efl_Ui_Focus_Object *node, Efl_Ui_Focus_Object *logical) { if (par_m) efl_ui_focus_manager_calc_register(par_m, node, logical, obj); + efl_event_callback_add(node, EFL_EVENT_INVALIDATE, _invalidate_cb, obj); } static void @@ -41,6 +52,7 @@ _unregister(Efl_Ui_Focus_Manager *obj EINA_UNUSED, Efl_Ui_Focus_Manager *par_m, { if (par_m) efl_ui_focus_manager_calc_unregister(par_m, node); + efl_event_callback_del(node, EFL_EVENT_INVALIDATE, _invalidate_cb, obj); } static void From 534021632cfad8732cf80082561c63cc6e89df6e Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sat, 21 Sep 2019 11:06:26 +0200 Subject: [PATCH 29/50] efl_ui_position_manager: review cache accesses in position manager grid and list, there are caches for the sizes, so the access within placing the item is faster. The cache sometimes is invalidated, which means, it must be rebuild before accessing it. This commit is the result of reviewing all the accesses, that the correct item is available. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10065 --- src/lib/elementary/efl_ui_position_manager_grid.c | 2 ++ src/lib/elementary/efl_ui_position_manager_list.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/lib/elementary/efl_ui_position_manager_grid.c b/src/lib/elementary/efl_ui_position_manager_grid.c index 206bc73221..bc3124abdc 100644 --- a/src/lib/elementary/efl_ui_position_manager_grid.c +++ b/src/lib/elementary/efl_ui_position_manager_grid.c @@ -448,6 +448,8 @@ _reposition_content(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd) if (pd->max_min_size.w <= 0 || pd->max_min_size.h <= 0) return; if (!eina_inarray_count(pd->group_cache)) return; + _size_cache_require(obj, pd); + //space size contains the amount of space that is outside the viewport (either to the top or to the left) space_size.w = (MAX(pd->last_viewport_size.w - pd->viewport.w, 0))*pd->scroll_position.x; space_size.h = (MAX(pd->last_viewport_size.h - pd->viewport.h, 0))*pd->scroll_position.y; diff --git a/src/lib/elementary/efl_ui_position_manager_list.c b/src/lib/elementary/efl_ui_position_manager_list.c index d4bedb819c..cee6730137 100644 --- a/src/lib/elementary/efl_ui_position_manager_list.c +++ b/src/lib/elementary/efl_ui_position_manager_list.c @@ -417,6 +417,8 @@ _efl_ui_position_manager_list_efl_ui_position_manager_entity_position_single_ite if (!pd->size) return EINA_RECT(0,0,0,0); + cache_require(obj, pd); + //space size contains the amount of space that is outside the viewport (either to the top or to the left) space_size.w = (MAX(pd->abs_size.w - pd->viewport.w, 0))*pd->scroll_position.x; space_size.h = (MAX(pd->abs_size.h - pd->viewport.h, 0))*pd->scroll_position.y; From acad0bd163863831cd18f87d769f277da2cbf30c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 20 Sep 2019 13:59:32 -0400 Subject: [PATCH 30/50] theme: add 'required' to efl/datepicker parts ref T8231 Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10059 --- data/elementary/themes/edc/efl/datepicker.edc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/data/elementary/themes/edc/efl/datepicker.edc b/data/elementary/themes/edc/efl/datepicker.edc index 31eb20610a..cdc76e38e6 100644 --- a/data/elementary/themes/edc/efl/datepicker.edc +++ b/data/elementary/themes/edc/efl/datepicker.edc @@ -97,7 +97,7 @@ group { "efl/datepicker"; align: 1.0 1.0; } } - swallow { "efl.field0"; + swallow { "efl.field0"; required; mouse; scale; desc { "default"; @@ -125,7 +125,7 @@ group { "efl/datepicker"; align: 0.0 0.5; } } - swallow { "efl.field1"; + swallow { "efl.field1"; required; mouse; scale; desc { "default"; @@ -156,7 +156,7 @@ group { "efl/datepicker"; align: 1.0 0.5; } } - swallow { "efl.field2"; + swallow { "efl.field2"; required; mouse; scale; desc { "default"; @@ -215,7 +215,7 @@ group { "efl/datepicker/spin_button"; vis; } } - swallow { "efl.inc_button"; + swallow { "efl.inc_button"; required; scale; desc { "default"; align: 0.5 0.0; @@ -224,7 +224,7 @@ group { "efl/datepicker/spin_button"; fixed: 1 1; } } - swallow { "efl.dec_button"; + swallow { "efl.dec_button"; required; scale; desc { "default"; align: 0.5 1.0; @@ -233,7 +233,7 @@ group { "efl/datepicker/spin_button"; fixed: 1 1; } } - swallow { "efl.entry"; + swallow { "efl.entry"; required; clip: "clip"; desc { "default"; fixed: 1 1; @@ -246,7 +246,7 @@ group { "efl/datepicker/spin_button"; vis; } } - swallow { "efl.text_button"; + swallow { "efl.text_button"; required; scale; desc { "default"; rel.to_x: "base"; From c4f87b46a67a8e816796b2d3da6346032a27ef48 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 20 Sep 2019 13:56:23 -0400 Subject: [PATCH 31/50] theme: add 'required' to efl/scroller group parts ref T8231 Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10058 --- data/elementary/themes/edc/efl/scroller.edc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/data/elementary/themes/edc/efl/scroller.edc b/data/elementary/themes/edc/efl/scroller.edc index 871fe65400..d53f6d5663 100644 --- a/data/elementary/themes/edc/efl/scroller.edc +++ b/data/elementary/themes/edc/efl/scroller.edc @@ -170,7 +170,7 @@ group { name: "efl/scroller"; fixed: 1 1; } } - part { name: "efl.dragable.vbar"; type: RECT; + part { name: "efl.dragable.vbar"; type: RECT; required; clip_to: "sb_vbar"; scale: 1; dragable.x: 0 0 0; @@ -451,7 +451,7 @@ group { name: "efl/scroller"; fixed: 1 1; } } - part { name: "efl.dragable.hbar"; type: RECT; + part { name: "efl.dragable.hbar"; type: RECT; required; clip_to: "sb_hbar"; scale: 1; dragable.x: 1 1 0; @@ -687,7 +687,7 @@ group { name: "efl/scroller"; rel2.to: "efl.background"; } } - part { name: "efl.background"; type: SWALLOW; + part { name: "efl.background"; type: SWALLOW; required; clip_to: "clipper"; description { state: "default" 0.0; rel1.offset: 1 1; @@ -697,7 +697,7 @@ group { name: "efl/scroller"; rel2.to_y: "sb_hbar"; } } - part { name: "efl.content"; type: SWALLOW; + part { name: "efl.content"; type: SWALLOW; required; clip_to: "clipper"; description { state: "default" 0.0; rel1.offset: 1 1; @@ -730,7 +730,7 @@ group { name: "efl/scroller"; color: 255 255 255 128; } } - part { name: "efl.overlay"; type: SWALLOW; + part { name: "efl.overlay"; type: SWALLOW; required; clip_to: "clipper"; description { state: "default" 0.0; rel1.to: "efl.content"; @@ -1285,12 +1285,12 @@ group { name: "efl/scroller:popup/no_inset_shadow"; group { name: "efl/scroller/contents"; parts { - part { name: "efl.content"; + part { name: "efl.content"; required; type: SWALLOW; description { state: "default" 0.0; } } - part { name: "efl.content_r"; + part { name: "efl.content_r"; required; type: SWALLOW; description { state: "default" 0.0; fixed: 1 1; @@ -1304,7 +1304,7 @@ group { name: "efl/scroller/contents"; } } } - part { name: "efl.content_b"; + part { name: "efl.content_b"; required; type: SWALLOW; description { state: "default" 0.0; fixed: 1 1; @@ -1318,7 +1318,7 @@ group { name: "efl/scroller/contents"; } } } - part { name: "efl.content_rb"; + part { name: "efl.content_rb"; required; type: SWALLOW; description { state: "default" 0.0; fixed: 1 1; From db71c0764668aeee2830a19b0153a3c87aadc58a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 20 Sep 2019 13:38:21 -0400 Subject: [PATCH 32/50] theme: add 'required' to efl/popup (and related group) parts ref T8231 Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10057 --- data/elementary/themes/edc/efl/popup.edc | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/data/elementary/themes/edc/efl/popup.edc b/data/elementary/themes/edc/efl/popup.edc index 1db84cb683..ed75534791 100644 --- a/data/elementary/themes/edc/efl/popup.edc +++ b/data/elementary/themes/edc/efl/popup.edc @@ -15,12 +15,12 @@ group { "efl/popup"; image.normal: "rounded_square.png"; } } - swallow { "efl.background"; + swallow { "efl.background"; required; desc { "default"; rel.to: "bg"; } } - swallow { "efl.content"; + swallow { "efl.content"; required; desc { "default"; rel.to: "base"; } @@ -39,7 +39,7 @@ group { "efl/alert_popup"; image.normal: "rounded_square.png"; } } - swallow { "efl.background"; + swallow { "efl.background"; required; desc { "default"; rel.to: "bg"; } @@ -65,7 +65,7 @@ group { "efl/alert_popup"; min: 0 20; } } - textblock { "efl.text.title"; + textblock { "efl.text.title"; required; scale; desc { "default"; fixed: 1 1; @@ -80,7 +80,7 @@ group { "efl/alert_popup"; vis; } } - swallow { "efl.buttons"; + swallow { "efl.buttons"; required; desc { "default"; fixed: 0 1; rel.to: "base"; @@ -93,7 +93,7 @@ group { "efl/alert_popup"; min: 0 30; } } - swallow { "efl.content"; + swallow { "efl.content"; required; desc { "default"; rel1.to_x: "base"; rel1.to_y: "title_bg"; @@ -131,7 +131,7 @@ group { "efl/popup/backwall"; hid; } } - swallow { "efl.content"; + swallow { "efl.content"; required; desc { "default"; rel.to: "base"; hid; @@ -171,7 +171,7 @@ group { "efl/popup/backwall"; group { "efl/alert_popup/button_layout1"; parts { - swallow { "efl.button1"; + swallow { "efl.button1"; required; } } } @@ -185,13 +185,13 @@ group { "efl/alert_popup/button_layout2"; min: 5 5; } } - swallow { "efl.button1"; + swallow { "efl.button1"; required; desc { "default"; rel2.to_x: "div1"; rel2.relative: 0.0 1.0; } } - swallow { "efl.button2"; + swallow { "efl.button2"; required; desc { "default"; rel1.to_x: "div1"; rel1.relative: 1.0 0.0; @@ -216,13 +216,13 @@ group { "efl/alert_popup/button_layout3"; min: 5 5; } } - swallow { "efl.button1"; + swallow { "efl.button1"; required; desc { "default"; rel2.to_x: "div1"; rel2.relative: 0.0 1.0; } } - swallow { "efl.button2"; + swallow { "efl.button2"; required; desc { "default"; rel1.to_x: "div1"; rel2.to_x: "div2"; @@ -230,7 +230,7 @@ group { "efl/alert_popup/button_layout3"; rel2.relative: 0.0 1.0; } } - swallow { "efl.button3"; + swallow { "efl.button3"; required; desc { "default"; rel1.to_x: "div2"; rel1.relative: 1.0 0.0; From 40b22d644d48795476ff9a442b4d9779de04d9fd Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 20 Sep 2019 13:38:08 -0400 Subject: [PATCH 33/50] theme: add 'required' to efl/bg group parts ref T8231 Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10056 --- data/elementary/themes/edc/efl/bg.edc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/elementary/themes/edc/efl/bg.edc b/data/elementary/themes/edc/efl/bg.edc index 98c449d79e..f66ef6517e 100644 --- a/data/elementary/themes/edc/efl/bg.edc +++ b/data/elementary/themes/edc/efl/bg.edc @@ -20,11 +20,11 @@ group { "efl/bg"; color: 64 64 64 255; } } - part { name: "efl.rectangle"; type: SWALLOW; + part { name: "efl.rectangle"; type: SWALLOW; required; description { state: "default" 0.0; } } - part { name: "efl.background"; type: SWALLOW; + part { name: "efl.background"; type: SWALLOW; required; clip_to: "clipper"; description { state: "default" 0.0; fixed: 1 1; @@ -38,9 +38,9 @@ group { "efl/bg"; fill.smooth: 0; } } - part { name: "efl.content"; type: SWALLOW; + part { name: "efl.content"; type: SWALLOW; required; description { state: "default" 0.0; } } } -} \ No newline at end of file +} From e65ebc61fa0632f922fc7433a9b31394046df1e4 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 23 Sep 2019 18:59:27 +0100 Subject: [PATCH 34/50] build - update README and meson options to match echother in defaults update some defaults like move to gl-es by default, tslib off by default as this really makes efl simpler to confgure ... by default with less things to change to get stuff working. --- README | 202 +++++++++++----------------------------------- meson_options.txt | 4 +- 2 files changed, 47 insertions(+), 159 deletions(-) diff --git a/README b/README index fe6894c29e..8c305b7cdb 100644 --- a/README +++ b/README @@ -210,9 +210,9 @@ Ecore main-loop and event queue. //BSD 2-Clause license// -This is a library to wrap/deal with Xlib as well as optionally XCB to -make dealing with X11 less painful and less footwork as well as being -glue to tie these into the Ecore main-loop and event queue. +This is a library to wrap/deal with Xlib make dealing with X11 less painful +and less footwork as well as being glue to tie these into the Ecore main-loop +and event queue. @@ -464,7 +464,7 @@ Required by default: * libxcursor * libxp * libxi (2.2 or newer) - * libgl (opengl/glx or opengl-es2/egl) + * opengl(mesa etc.) (opengl/glx/full or opengl-es2/egl) * giflib * util-linux (limbount + libblkid) * systemd / libudev @@ -473,18 +473,41 @@ Required by default: * libspectre * librsvg -Recommended requirements (highly recommended): +You might want webp support so disable fewer loaders and remove webp +from the disablers with: - * harfbuzz - * libwebp - * libunwind (where available) + -Devas-loaders-disabler=json -Enable these with configure options: +Wayland support: - --enable-xinput22 \ - --enable-image-loader-webp \ - --enable-harfbuzz \ - --enable-multisense +You may also want wayland support when on Linux. This enables support +for EFL to trget wayland support for client applications. To do this +supply: + + -Dwl=true + +Framebuffer support: + +This requires linux frame-buffer support, headers etc. This supports +basic frame-buffers like /dev/fb as well as input via /dev/input for +keyboards and mice in a basic way. Enable this with: + + -Dfb=true + +For more modern framebuffer support you may want drm/kms rendering +support so enable this. This is what you also want for wayland +compositor support in enlightenment as it will want to be able to +render to a moder framebuffer tarbet with atomic buffer swapping. To +do this provide: + + -Ddrm=true + +You may want to change the install prefix for EFL with: + + --prefix=/path/to/prefix + +The default prefix if not given is "/usr/local". Many people like to +use prefixes like /opt/e or /opt/efl or /home/USERNAME/software etc. COMPILER FLAGS -------------- @@ -495,159 +518,24 @@ that to ensure ABI stability you should use the exact same CFLAGS / CXXFLAGS for all the build of EFL and any applications/libraries that depend on them. -Other possible recommendations: - - * scim - -Enable this with: - - --enable-scim - -Framebuffer support: - -This requires linux frame-buffer support, headers etc. This supports -basic frame-buffers like /dev/fb as well as input via /dev/input for -keyboards and mice in a basic way. Enable this with: - - --enable-fb - -This also turns on support for touch-screens via tslib. Not everyone -has tslib, so you may want to disable it with: - - --disable-tslib - -You likely don't need static libraries most of the time so you can -disable them with: - - --disable-static - -You may want to change the install prefix for EFL with: - - --prefix=/path/to/prefix - -The default prefix if not given is "/usr/local". Many people like to -use prefixes like /opt/e or /opt/efl or /home/USERNAME/software etc. - -You may want to enable valgrind support if you plan on doing debugging -with EFL or apps built on top of EFL. This requires an install of -valgrind first. You can enable this with: - - --enable-valgrind - -You may want to enable xine support in emotion, as this library -provides fairly solid support for a lot of codecs and DVD navigation -support and more. You can enable it with: - - --enable-xine - -Wayland is also supported fairly solidly in EFL 1.8. It is not -required by default due to it being new and not that widely spread. -You can enable Wayland support with: - - --enable-wayland \ - --enable-elput \ - --enable-drm - -For faster rendering when dithering down to lower-than 24/32bpp, you -can try: - - --with-evas-dither-mask=small - -But this will drop quality slightly, using a small 16x16 ordered -dither mask rather than the default 128x128. This should save a little -memory too in the binary size of Evas. - There are many other configure options that can be used, but in general it is not a good idea to go enabling or disabling things unless you wish to break things. The defaults are well tested, with the above recommended options also being well tested. Go much further and your mileage may vary wildly. Disabling features is a good way of -breaking EFL functionality, so it is not recommended. The defaults +breaking EFL functionality, so it is not recommended to mess with +these without understanding the implications. The defaults have been carefully considered to provide full functionality so users will not be missing anything. -VALGRIND DEPENDENCY -------------------- - -EFL uses the concept of memory pools (mempool) and this will confuse -valgrind memcheck tool. By using memory pool, the memory is still -owned by EFL, then valgrind won't alert on memory leaks or use of -unused memory. EFL will use memcheck.h from valgrind to declare its -memory pools to valgrind, producing better debugging results. - -However valgrind is only available to limited platforms, making it -hard for us to declare it a mandatory requirement. Based on ---with-profile={dev,debug} valgrind will be used if available or will -be issued a warning. You can force valgrind with --enable-valgrind, or -disable it and the warning with --disable-valgrind. - -EFL does NOT link to valgrind libraries. Then there is NO runtime -dependency on valgrind. - - -BULLET PHYSICS DEPENDENCY -------------------------- - -EFL comes with EPhysics (a physics wrapper library) enabled by -default. To build it the user must have BulletPhysics engine installed. - -More information about BulletPhysics can be obtained in the upstream project -web site at http://bulletphysics.org - -We have received many reports about BulletPhysics installation and distros -packages in bad shape, some without even a package. If your distro doesn't -ship a BulletPhysics package or you want to build it from source code follow -the instructions below: - -**Required Packages:** - -You should have cmake installed. Bullet comes with autotools and cmake build -systems, do not use the autotools alternative, it's unstable, bogus and hasn't -been maintained for quite some time. - -**Download the tarball from:** - -http://code.google.com/p/bullet/downloads/list - -**NOTE:** - -The current supported version is 2.80 or greater. - -**Compiling and Installing:** - -Uncompress it to (say) ~/bullet and: - - cd ~/bullet/build - cmake .. -DBUILD_CPU_DEMOS=OFF -DBUILD_DEMOS=OFF -DBUILD_SHARED_LIBS=ON - make - sudo make install - sudo ldconfig - -**Ubuntu Users:** - -Alternatively Ubuntu users have the option to install the BulletPhysics from -our official EFL PPA: - -https://launchpad.net/~efl/+archive/trunk - - -PROFILES --------- - -EFL build is based on "profiles". It will default to "dev" for -unreleased software and "release" for official tarballs. One can -change it with --with-profile=NAME, where NAME is one of: - - * **dev**: extra checks useful to test software. - * **debug**: superset of dev, with debug features and assert(). - * **release**: optimizations and less checks so it runs faster. - - CRYPTOGRAPHY ------------ -EFL officially uses "openssl" library to do signature, cipher and related. -Alternatively one can use "gnutls" (some distros are strict about licenses -and want gnutls instead of openssl) or disable it. One can change it with ---with-crypto=NAME, where NAME is one of: "openssl", "gnutls" and "none". +EFL officially offers openssl or gnutls as cryptography backends. By +default it uses "openssl" to do signature, cipher and related. Alternatively +one can use "gnutls" (some distros are strict about licenses and want gnutls +instead of openssl) You can switch to gnutls with: + + -Dcrypto=gnutls + diff --git a/meson_options.txt b/meson_options.txt index 8f5deb17a5..33e74dedbb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -67,7 +67,7 @@ option('eeze', option('opengl', type : 'combo', choices : ['full', 'es-egl', 'none'], - value : 'full', + value : 'es-egl', description : 'Type of OpenGL support in efl' ) @@ -170,7 +170,7 @@ option('xinput22', option('tslib', type : 'boolean', - value : true, + value : false, description : 'Framebuffer (/dev/fb / fbcon) touchscreen tslib support in efl' ) From b5e5117992e2e8601cfa786f90614a4a2e0be39c Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Mon, 23 Sep 2019 15:27:14 -0400 Subject: [PATCH 35/50] docs: Clarify behavior of NULL in Efl.Pack_Linear. Summary: Depends on D10023 Reviewers: zmike, bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8210 Differential Revision: https://phab.enlightenment.org/D10024 --- src/lib/efl/interfaces/efl_pack_linear.eo | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lib/efl/interfaces/efl_pack_linear.eo b/src/lib/efl/interfaces/efl_pack_linear.eo index 0d152ec613..f23886e35f 100644 --- a/src/lib/efl/interfaces/efl_pack_linear.eo +++ b/src/lib/efl/interfaces/efl_pack_linear.eo @@ -36,29 +36,35 @@ interface Efl.Pack_Linear extends Efl.Pack return: bool; [[$false if $subobj could not be packed.]] } pack_before { - [[Prepend an object before an existing sub-object. + [[Prepend an object before the $existing sub-object. When this container is deleted, it will request deletion of the given $subobj. Use @Efl.Pack.unpack to remove $subobj from this container without deleting it. + + If $existing is $NULL this method behaves like @.pack_begin. ]] params { @in subobj: Efl.Gfx.Entity; [[Object to pack before $existing.]] - @in existing: const(Efl.Gfx.Entity); [[Existing reference sub-object.]] + @in existing: const(Efl.Gfx.Entity); [[Existing reference sub-object. Must already belong to the container + or be $NULL.]] } return: bool; [[$false if $existing could not be found or $subobj could not be packed.]] } pack_after { - [[Append an object after an existing sub-object. + [[Append an object after the $existing sub-object. When this container is deleted, it will request deletion of the given $subobj. Use @Efl.Pack.unpack to remove $subobj from this container without deleting it. + + If $existing is $NULL this method behaves like @.pack_end. ]] params { @in subobj: Efl.Gfx.Entity; [[Object to pack after $existing.]] - @in existing: const(Efl.Gfx.Entity); [[Existing reference sub-object.]] + @in existing: const(Efl.Gfx.Entity); [[Existing reference sub-object. Must already belong to the container + or be $NULL.]] } return: bool; [[$false if $existing could not be found or $subobj could not be packed.]] From 059e48ff0ef3f084e459e9542e47ba67c9e3f5c1 Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Mon, 23 Sep 2019 15:27:34 -0400 Subject: [PATCH 36/50] efl: improve test in checking the return value during Eina_Value get operation. Summary: Depends on D10061 Reviewers: zmike, bu5hm4n, SanghyeonLee, segfaultxavi, felipealmeida, lauromoura Reviewed By: bu5hm4n Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10062 --- src/tests/efl/efl_test_composite_model.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests/efl/efl_test_composite_model.c b/src/tests/efl/efl_test_composite_model.c index 5a7d3f21ab..abae4c3666 100644 --- a/src/tests/efl/efl_test_composite_model.c +++ b/src/tests/efl/efl_test_composite_model.c @@ -51,9 +51,9 @@ _children_slice_get_then(void *data EINA_UNUSED, p_true = efl_model_property_get(child, "test_p_true"); p_false = efl_model_property_get(child, "test_p_false"); - eina_value_int_get(p_int, &v_int); - eina_value_bool_get(p_true, &v_true); - eina_value_bool_get(p_false, &v_false); + fail_if(!eina_value_int_get(p_int, &v_int)); + fail_if(!eina_value_bool_get(p_true, &v_true)); + fail_if(!eina_value_bool_get(p_false, &v_false)); fail_if(v_int != base_ints[i]); fail_if(v_true != EINA_TRUE); From 27ec3c7c671e44dcaa94621e832614ba0f7e9b3c Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Mon, 23 Sep 2019 15:27:45 -0400 Subject: [PATCH 37/50] theme: add 'required' to efl/timepicker parts Summary: ref T8231 Reviewers: zmike, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8231 Differential Revision: https://phab.enlightenment.org/D10083 --- data/elementary/themes/edc/efl/timepicker.edc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/elementary/themes/edc/efl/timepicker.edc b/data/elementary/themes/edc/efl/timepicker.edc index d045e732e4..050a470068 100644 --- a/data/elementary/themes/edc/efl/timepicker.edc +++ b/data/elementary/themes/edc/efl/timepicker.edc @@ -105,7 +105,7 @@ group { "efl/timepicker"; align: 1.0 1.0; } } - swallow { "efl.field0"; + swallow { "efl.field0"; required; mouse; scale; desc { "default"; @@ -197,7 +197,7 @@ group { "efl/timepicker"; max: 0 0; } } - swallow { "efl.field1"; + swallow { "efl.field1"; required; mouse; scale; desc { "default"; @@ -289,7 +289,7 @@ group { "efl/timepicker"; max: 0 0; } } - swallow { "efl.field2"; + swallow { "efl.field2"; required; mouse; scale; desc { "default"; From 84dd06aa667e063b7868d3f2898f5500f88a7255 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Mon, 23 Sep 2019 15:27:47 -0400 Subject: [PATCH 38/50] theme: add 'required' to efl/spin_button group parts Summary: ref T8231 Reviewers: zmike, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8231 Differential Revision: https://phab.enlightenment.org/D10084 --- data/elementary/themes/edc/efl/spin_button.edc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/data/elementary/themes/edc/efl/spin_button.edc b/data/elementary/themes/edc/efl/spin_button.edc index cca7f1d479..070144de28 100644 --- a/data/elementary/themes/edc/efl/spin_button.edc +++ b/data/elementary/themes/edc/efl/spin_button.edc @@ -36,7 +36,7 @@ group { "efl/spin_button/horizontal"; vis; } } - swallow { "efl.entry"; + swallow { "efl.entry"; required; clip: "clip"; desc { "default"; fixed: 1 1; @@ -49,7 +49,7 @@ group { "efl/spin_button/horizontal"; vis; } } - swallow { "efl.dec_button"; + swallow { "efl.dec_button"; required; scale; desc { "default"; fixed: 1 0; @@ -58,7 +58,7 @@ group { "efl/spin_button/horizontal"; aspect: 1.0 1.0; aspect_preference: VERTICAL; } } - swallow { "efl.inc_button"; + swallow { "efl.inc_button"; required; scale; desc { "default"; fixed: 1 0; @@ -67,7 +67,7 @@ group { "efl/spin_button/horizontal"; aspect: 1.0 1.0; aspect_preference: VERTICAL; } } - swallow { "efl.text_button"; + swallow { "efl.text_button"; required; scale; desc { "default"; vis; @@ -158,7 +158,7 @@ group { "efl/spin_button/vertical"; min: 40 150; } } - swallow { "efl.inc_button"; + swallow { "efl.inc_button"; required; scale; desc { "default"; rel.to: "inset"; @@ -168,7 +168,7 @@ group { "efl/spin_button/vertical"; fixed: 1 1; } } - swallow { "efl.dec_button"; + swallow { "efl.dec_button"; required; scale; desc { "default"; rel.to: "inset"; @@ -178,7 +178,7 @@ group { "efl/spin_button/vertical"; fixed: 1 1; } } - swallow { "efl.text_button"; + swallow { "efl.text_button"; required; scale; desc { "default"; rel.to_x: "inset"; From 5f5f62d6bd4c93033058330a826ecad7056aeb25 Mon Sep 17 00:00:00 2001 From: Lauro Moura Date: Mon, 23 Sep 2019 15:27:49 -0400 Subject: [PATCH 39/50] tests: Initialize variables and quiet warning. Summary: The switch does not cover all Align enum values. Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10085 --- src/tests/elementary/efl_ui_test_popup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/elementary/efl_ui_test_popup.c b/src/tests/elementary/efl_ui_test_popup.c index 82c992adaa..d15df256c2 100644 --- a/src/tests/elementary/efl_ui_test_popup.c +++ b/src/tests/elementary/efl_ui_test_popup.c @@ -642,7 +642,7 @@ verify_anchor(Eo *popup, Eo **align_buttons, Align align, Eina_Size2D *popup_sz) else anchor_geom = win_geom; - Evas_Coord x, y; + Evas_Coord x = 0, y = 0; /* click the button to trigger changing the align on the popup * this could be done manually, but we're trying to copy the elm_test case From b90bcbd3b59ef2dc525a453c6d19adfd811acbbd Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Mon, 23 Sep 2019 15:27:50 -0400 Subject: [PATCH 40/50] theme: add 'required' to efl/button:anchor group parts Summary: ref T8231 Reviewers: zmike, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8231 Differential Revision: https://phab.enlightenment.org/D10086 --- data/elementary/themes/edc/efl/button.edc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/elementary/themes/edc/efl/button.edc b/data/elementary/themes/edc/efl/button.edc index 4a9e2dae82..203e467cc7 100644 --- a/data/elementary/themes/edc/efl/button.edc +++ b/data/elementary/themes/edc/efl/button.edc @@ -493,7 +493,7 @@ group { name: "efl/button:anchor"; color: 255 255 255 64; } } - swallow { "efl.background"; nomouse; + swallow { "efl.background"; nomouse; required; desc { "default"; rel1.to: "base"; rel2.to: "base"; @@ -504,7 +504,7 @@ group { name: "efl/button:anchor"; visible: 1; } } - swallow { "efl.content"; nomouse; + swallow { "efl.content"; nomouse; required; clip_to: "icon_clip"; desc { "default"; fixed: 1 0; From 04ce5058c1b0654c7f1fe8ea4ae69efb8b7ecba9 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 23 Sep 2019 20:54:35 +0100 Subject: [PATCH 41/50] ci - osx - switch to full gl option on osx --- .ci/ci-configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/ci-configure.sh b/.ci/ci-configure.sh index 8aac3dae7d..54ed89d4a5 100755 --- a/.ci/ci-configure.sh +++ b/.ci/ci-configure.sh @@ -101,6 +101,6 @@ else export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:/usr/local/Cellar/libffi/$LIBFFI_VER/lib/pkgconfig" export CC="ccache gcc" travis_fold meson meson - mkdir build && meson build -Decore-imf-loaders-disabler=scim,ibus -Dx11=false -Davahi=false -Dbindings=luajit -Deeze=false -Dsystemd=false -Dnls=false -Dcocoa=true -Demotion-loaders-disabler=gstreamer,gstreamer1,libvlc,xine + mkdir build && meson build -Dopengl=full -Decore-imf-loaders-disabler=scim,ibus -Dx11=false -Davahi=false -Dbindings=luajit -Deeze=false -Dsystemd=false -Dnls=false -Dcocoa=true -Demotion-loaders-disabler=gstreamer,gstreamer1,libvlc,xine travis_endfold meson fi From 0c0db1650aa81374b6628ce604455655f8349a30 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 23 Sep 2019 22:09:22 +0200 Subject: [PATCH 42/50] doc: wrap comment for EFL_UI_CLICKABLE_PART_BIND docs in edc Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10089 --- data/elementary/themes/edc/efl/macros.edc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/elementary/themes/edc/efl/macros.edc b/data/elementary/themes/edc/efl/macros.edc index 4705310ea3..449d46e545 100644 --- a/data/elementary/themes/edc/efl/macros.edc +++ b/data/elementary/themes/edc/efl/macros.edc @@ -1,7 +1,9 @@ /** - * A macro for defining the programms that are needed to redirect the mouse events of a part to the implementation of Efl.Ui.Clickable. + * A macro for defining the programms that are needed to redirect the mouse + * events of a part to the implementation of Efl.Ui.Clickable. * - * The Widget using this has to call the method bind_to_theme of Efl.Ui.Clickable_Util in order to redirect the here called signals to real events that can be used in code. + * The Widget using this has to call the method bind_to_theme of Efl.Ui.Clickable_Util + * in order to redirect the here called signals to real events that can be used in code. * The resulting events on the widget will be from the Efl.Ui.Clickable class. */ From 6714c821f787f4acf52005bfea8091049b503365 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 23 Sep 2019 16:03:26 -0400 Subject: [PATCH 43/50] efl_ui_pack: allow NULL as existing parameter in after and before Summary: with this commit all implementations of Efl.Pack_Linear to permit NULL as existing parameter, this is verified with a spec test unit. fixes T8210 Reviewers: zmike, segfaultxavi Reviewed By: zmike Subscribers: woohyun, Jaehyun_Cho, YOhoho, segfaultxavi, zmike, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8210 Differential Revision: https://phab.enlightenment.org/D10023 --- src/lib/elementary/efl_ui_collection.c | 6 ++-- src/lib/elementary/efl_ui_group_item.c | 21 ++++++++++-- .../elementary/efl_ui_spotlight_container.c | 6 ++-- src/lib/elementary/efl_ui_tab_bar.c | 6 ++-- .../elementary/spec/efl_test_pack_linear.c | 32 +++++++++++++++++++ 5 files changed, 63 insertions(+), 8 deletions(-) diff --git a/src/lib/elementary/efl_ui_collection.c b/src/lib/elementary/efl_ui_collection.c index 9494fae9ab..dde77ab9b0 100644 --- a/src/lib/elementary/efl_ui_collection.c +++ b/src/lib/elementary/efl_ui_collection.c @@ -821,7 +821,8 @@ EOLIAN static Eina_Bool _efl_ui_collection_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing) { Eina_List *subobj_list = eina_list_data_find_list(pd->items, existing); - EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE); + if (existing) + EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE); if (!register_item(obj, pd, subobj)) return EINA_FALSE; @@ -835,7 +836,8 @@ EOLIAN static Eina_Bool _efl_ui_collection_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing) { Eina_List *subobj_list = eina_list_data_find_list(pd->items, existing); - EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE); + if (existing) + EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE); if (!register_item(obj, pd, subobj)) return EINA_FALSE; diff --git a/src/lib/elementary/efl_ui_group_item.c b/src/lib/elementary/efl_ui_group_item.c index 5dd3a6bafe..361bd0e06d 100644 --- a/src/lib/elementary/efl_ui_group_item.c +++ b/src/lib/elementary/efl_ui_group_item.c @@ -149,10 +149,19 @@ _efl_ui_group_item_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Group_Item_Data * EINA_SAFETY_ON_TRUE_RETURN_VAL(subobj == obj, EINA_FALSE); Eo *container = efl_ui_item_container_get(obj); EINA_SAFETY_ON_NULL_RETURN_VAL(container, EINA_FALSE); + int group_index = efl_pack_index_get(container, obj); //FIXME, maybe we should check if existing is really part of this group _register_item(obj, pd, subobj); - HANDLE_REG_CALL(efl_pack_before(container, subobj, existing)); + if (existing) + { + HANDLE_REG_CALL(efl_pack_before(container, subobj, existing)); + } + else + { + HANDLE_REG_CALL(efl_pack_at(container, subobj, group_index + 1)); + } + } EOLIAN static Eina_Bool @@ -161,10 +170,18 @@ _efl_ui_group_item_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Group_Item_Data *p EINA_SAFETY_ON_TRUE_RETURN_VAL(subobj == obj, EINA_FALSE); Eo *container = efl_ui_item_container_get(obj); EINA_SAFETY_ON_NULL_RETURN_VAL(container, EINA_FALSE); + int group_index = efl_pack_index_get(container, obj); //FIXME, maybe we should check if existing is really part of this group _register_item(obj, pd, subobj); - HANDLE_REG_CALL(efl_pack_after(container, subobj, existing)); + if (existing) + { + HANDLE_REG_CALL(efl_pack_after(container, subobj, existing)); + } + else + { + HANDLE_REG_CALL(efl_pack_at(container, subobj, group_index + eina_list_count(pd->registered_items))); + } } EOLIAN static Eina_Bool diff --git a/src/lib/elementary/efl_ui_spotlight_container.c b/src/lib/elementary/efl_ui_spotlight_container.c index 50a8e9a014..608aca1d3c 100644 --- a/src/lib/elementary/efl_ui_spotlight_container.c +++ b/src/lib/elementary/efl_ui_spotlight_container.c @@ -317,7 +317,8 @@ _efl_ui_spotlight_container_efl_pack_linear_pack_before(Eo *obj EINA_UNUSED, const Efl_Gfx_Entity *existing) { int index = eina_list_data_idx(pd->content_list, (void *)existing); - EINA_SAFETY_ON_FALSE_RETURN_VAL(index >= 0, EINA_FALSE); + if (existing) + EINA_SAFETY_ON_FALSE_RETURN_VAL(index >= 0, EINA_FALSE); if (!_register_child(obj, pd, subobj)) return EINA_FALSE; pd->content_list = eina_list_prepend_relative(pd->content_list, subobj, existing); @@ -332,7 +333,8 @@ _efl_ui_spotlight_container_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED, const Efl_Gfx_Entity *existing) { int index = eina_list_data_idx(pd->content_list, (void *)existing); - EINA_SAFETY_ON_FALSE_RETURN_VAL(index >= 0, EINA_FALSE); + if (existing) + EINA_SAFETY_ON_FALSE_RETURN_VAL(index >= 0, EINA_FALSE); if (!_register_child(obj, pd, subobj)) return EINA_FALSE; pd->content_list = eina_list_append_relative(pd->content_list, subobj, existing); diff --git a/src/lib/elementary/efl_ui_tab_bar.c b/src/lib/elementary/efl_ui_tab_bar.c index db7c169653..ff831f8c3d 100644 --- a/src/lib/elementary/efl_ui_tab_bar.c +++ b/src/lib/elementary/efl_ui_tab_bar.c @@ -188,7 +188,8 @@ _efl_ui_tab_bar_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Tab_Bar_Data *pd, Efl_G EOLIAN static Eina_Bool _efl_ui_tab_bar_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Tab_Bar_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing) { - EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_pack_index_get(pd->bx, existing) >= 0, EINA_FALSE); + if (existing) + EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_pack_index_get(pd->bx, existing) >= 0, EINA_FALSE); EINA_SAFETY_ON_FALSE_RETURN_VAL(_register_item(obj, pd, subobj), EINA_FALSE); return efl_pack_before(pd->bx, subobj, existing); } @@ -196,7 +197,8 @@ _efl_ui_tab_bar_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Tab_Bar_Data *pd, Ef EOLIAN static Eina_Bool _efl_ui_tab_bar_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Tab_Bar_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing) { - EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_pack_index_get(pd->bx, existing) >= 0, EINA_FALSE); + if (existing) + EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_pack_index_get(pd->bx, existing) >= 0, EINA_FALSE); EINA_SAFETY_ON_FALSE_RETURN_VAL(_register_item(obj, pd, subobj), EINA_FALSE); return efl_pack_after(pd->bx, subobj, existing); } diff --git a/src/tests/elementary/spec/efl_test_pack_linear.c b/src/tests/elementary/spec/efl_test_pack_linear.c index b66f449b8d..0ecaacd432 100644 --- a/src/tests/elementary/spec/efl_test_pack_linear.c +++ b/src/tests/elementary/spec/efl_test_pack_linear.c @@ -182,6 +182,21 @@ EFL_START_TEST(pack_before3) } EFL_END_TEST +EFL_START_TEST(pack_before4) +{ + Efl_Ui_Widget *wid[3]; + Efl_Ui_Widget *inv = create_test_widget(); + + _fill_array(wid); + + for (int i = 0; i < 3; i++) + efl_pack_end(widget, wid[i]); + + ck_assert_int_eq(efl_pack_before(widget, inv, NULL), EINA_TRUE); + ck_assert_ptr_eq(efl_pack_content_get(widget, 0), inv); +} +EFL_END_TEST + EFL_START_TEST(pack_after1) { Efl_Ui_Widget *wid[3]; @@ -247,6 +262,21 @@ EFL_START_TEST(pack_after3) } EFL_END_TEST +EFL_START_TEST(pack_after4) +{ + Efl_Ui_Widget *wid[3]; + Efl_Ui_Widget *inv = create_test_widget(); + + _fill_array(wid); + + for (int i = 0; i < 3; i++) + efl_pack_end(widget, wid[i]); + + ck_assert_int_eq(efl_pack_after(widget, inv, NULL), EINA_TRUE); + ck_assert_ptr_eq(efl_pack_content_get(widget, 3), inv); +} +EFL_END_TEST + EFL_START_TEST(pack_at1) { for (int x = -3; x < 3; ++x) @@ -449,9 +479,11 @@ efl_pack_linear_behavior_test(TCase *tc) tcase_add_test(tc, pack_before1); tcase_add_test(tc, pack_before2); tcase_add_test(tc, pack_before3); + tcase_add_test(tc, pack_before4); tcase_add_test(tc, pack_after1); tcase_add_test(tc, pack_after2); tcase_add_test(tc, pack_after3); + tcase_add_test(tc, pack_after4); tcase_add_test(tc, pack_at1); tcase_add_test(tc, pack_at2); tcase_add_test(tc, pack_at3); From 5de77bd005cf9383bd98fd29c7e23a3ca725aa57 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Mon, 23 Sep 2019 16:09:36 -0400 Subject: [PATCH 44/50] theme: add 'required' to efl/tab_pager group parts Summary: ref T8231 Reviewers: zmike, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8231 Differential Revision: https://phab.enlightenment.org/D10087 --- data/elementary/themes/edc/efl/tab_pager.edc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/elementary/themes/edc/efl/tab_pager.edc b/data/elementary/themes/edc/efl/tab_pager.edc index fb63e58a61..11ea591441 100644 --- a/data/elementary/themes/edc/efl/tab_pager.edc +++ b/data/elementary/themes/edc/efl/tab_pager.edc @@ -5,7 +5,7 @@ group { "efl/tab_pager"; desc { "default"; } } - swallow { "efl.tab_root"; + swallow { "efl.tab_root"; required; scale; desc { "default"; rel.to: "base"; @@ -15,7 +15,7 @@ group { "efl/tab_pager"; fixed: 0 1; } } - swallow { "efl.page_root"; + swallow { "efl.page_root"; required; scale; desc { "default"; rel1.to: "efl.tab_root"; @@ -23,7 +23,7 @@ group { "efl/tab_pager"; rel1.relative: 0 1; } } - swallow { "efl.event"; + swallow { "efl.event"; required; scale; repeat_events: 1; desc { "default"; From 88888a00a6e043749c94f36cea5311c1e4519759 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 23 Sep 2019 21:14:50 +0100 Subject: [PATCH 45/50] osx - require full opengl for gl support on osx the default still is gl-es as documented. you need to explicitly turn on full opengl to get gl support on osx because thats all the engine does. document this exception for osx (having gl magically being full on osx and gle-es elsewhere is another option but then we need different os specific defaults for this which is kind of bad in other ways). --- README | 2 +- src/modules/evas/engines/meson.build | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README b/README index 8c305b7cdb..10b88d15e0 100644 --- a/README +++ b/README @@ -464,7 +464,7 @@ Required by default: * libxcursor * libxp * libxi (2.2 or newer) - * opengl(mesa etc.) (opengl/glx/full or opengl-es2/egl) + * opengl(mesa etc.) (opengl/glx/full or opengl-es2/egl. full opengl only on osx - must be explicitly specified to be full to have support) * giflib * util-linux (limbount + libblkid) * systemd / libudev diff --git a/src/modules/evas/engines/meson.build b/src/modules/evas/engines/meson.build index 72fe9c567b..d0c1b8fe24 100644 --- a/src/modules/evas/engines/meson.build +++ b/src/modules/evas/engines/meson.build @@ -13,19 +13,29 @@ if sys_windows == true ] endif +have_gl_engine = false + if get_option('opengl') != 'none' engines += [ - ['gl_generic', []], ['gl_x11', ['x11']], - ['gl_drm', ['drm']], - ['gl_cocoa', ['cocoa']], + ['gl_drm', ['drm']] ] + have_gl_engine = true +endif + +if get_option('opengl') == 'full' + engines += [['gl_cocoa', ['cocoa']]] + have_gl_engine = true endif if get_option('opengl') == 'es-egl' engines += [['wayland_egl', ['wl']]] + have_gl_engine = true endif +if have_gl_engine + engines += [['gl_generic', []]] +endif foreach engine_conf : engines engine = engine_conf[0] From 7dcce72eb7bf248ff2d8b1b26a181f3a74392863 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Mon, 23 Sep 2019 16:51:17 -0400 Subject: [PATCH 46/50] docs: Add documentation for Efl.Ui.Scroller Summary: These docs were missing. Ref T7891 Test Plan: Only docs changed Reviewers: zmike, woohyun, bu5hm4n Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7891 Differential Revision: https://phab.enlightenment.org/D10019 --- src/lib/elementary/efl_ui_scroller.eo | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_scroller.eo b/src/lib/elementary/efl_ui_scroller.eo index 9355d9dbae..43fcc4f26e 100644 --- a/src/lib/elementary/efl_ui_scroller.eo +++ b/src/lib/elementary/efl_ui_scroller.eo @@ -6,7 +6,18 @@ class @beta Efl.Ui.Scroller extends Efl.Ui.Layout_Base implements Efl.Ui.Scrollable, Efl.Ui.Scrollbar { - [[Efl ui scroller class]] + [[Widget container that allows objects bigger than itself to be put inside it, and provides + scrolling functionality so the whole content is visible. + + Some widgets have scrolling capabilities (like @Efl.Ui.List) that allow big content + to be shown inside a small viewport, using the well-known scrollbar objects. + Some other widgets (like @Efl.Ui.Box, for example) cannot scroll by themselves and + therefore would not be fully visible when placed inside a viewport smaller than them. + + The @Efl.Ui.Scroller is a helper class that provides scrolling capabilities for widgets + which don't have them. In the above example, simply putting the @Efl.Ui.Box inside a + @Efl.Ui.Scroller (using @Efl.Content.content.set) would give it the ability to scroll. + ]] implements { Efl.Object.constructor; Efl.Object.finalize; From 15897cd9c38002cfed85d312dd559c6fa4da4cb2 Mon Sep 17 00:00:00 2001 From: Bruno da Silva Belo Date: Mon, 23 Sep 2019 20:50:27 -0300 Subject: [PATCH 47/50] efl-mono: Additional blank line between all methods. Summary: For better indentation, adding a blank line in the end of methods. Test Plan: using efl_ui_layout.eo.cs, efl_access_object.eo.cs, efl_part.eo.cs and efl_ui_factory_bind.eo.cs as references, apply changes to the code then check the diffs of after and before of the references files Reviewers: lauromoura, felipealmeida Reviewed By: lauromoura Subscribers: cedric, felipealmeida, lauromoura Tags: PHID-PROJ-uhnmnvlvunw6jgoqdnd4, #efl_language_bindings, #refactoring Maniphest Tasks: T8167 Differential Revision: https://phab.enlightenment.org/D9712 --- .../eolian/mono/alias_definition.hh | 4 +-- .../eolian_mono/eolian/mono/documentation.hh | 7 ++-- .../eolian/mono/enum_definition.hh | 2 +- src/bin/eolian_mono/eolian/mono/events.hh | 11 +++--- .../eolian/mono/function_declaration.hh | 4 +-- .../eolian/mono/function_definition.hh | 30 ++++++++-------- .../eolian/mono/function_helpers.hh | 34 +++++++++---------- src/bin/eolian_mono/eolian/mono/klass.hh | 24 ++++++------- .../eolian_mono/eolian/mono/name_helpers.hh | 2 +- src/bin/eolian_mono/eolian/mono/parameter.hh | 24 ++++++------- .../eolian/mono/part_definition.hh | 2 +- .../eolian/mono/struct_definition.hh | 6 ++-- .../eolian_mono/eolian/mono/struct_fields.hh | 2 +- 13 files changed, 75 insertions(+), 77 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/alias_definition.hh b/src/bin/eolian_mono/eolian/mono/alias_definition.hh index 12d9ce78f9..d4a4b5d47f 100644 --- a/src/bin/eolian_mono/eolian/mono/alias_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/alias_definition.hh @@ -62,8 +62,8 @@ struct alias_definition_generator << scope_tab << "public static implicit operator " << alias_type << "(" << alias_name << " value)\n" << scope_tab << "{\n" << scope_tab << scope_tab << "return value.payload;\n" - << scope_tab << "}\n\n" - << "}\n\n" + << scope_tab << "}\n" + << "}\n" ).generate(sink, alias, context)) return false; diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh b/src/bin/eolian_mono/eolian/mono/documentation.hh index 2b4ed87a8d..234ce49430 100644 --- a/src/bin/eolian_mono/eolian/mono/documentation.hh +++ b/src/bin/eolian_mono/eolian/mono/documentation.hh @@ -23,7 +23,7 @@ struct documentation_generator int scope_size = 0; - documentation_generator(int scope_size) + documentation_generator(int scope_size = 0) : scope_size(scope_size) {} @@ -595,9 +595,8 @@ struct documentation_generator else ref = ""; - if (!as_generator( - scope_tab << "/// " << summary << " See " << ref << "\n" - ).generate(sink, param, context)) + if (!as_generator(scope_tab(scope_size) << "/// " << summary << " See " << ref << "\n") + .generate(sink, param, context)) return false; } return true; diff --git a/src/bin/eolian_mono/eolian/mono/enum_definition.hh b/src/bin/eolian_mono/eolian/mono/enum_definition.hh index 4dae3cc7aa..c5ab79ae66 100644 --- a/src/bin/eolian_mono/eolian/mono/enum_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/enum_definition.hh @@ -45,7 +45,7 @@ struct enum_definition_generator return false; } - if(!as_generator("}\n\n").generate(sink, attributes::unused, context)) return false; + if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false; if(!name_helpers::close_namespaces(sink, enum_.namespaces, context)) return false; diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh index 14a7f9b5ce..6c5f12ea2a 100644 --- a/src/bin/eolian_mono/eolian/mono/events.hh +++ b/src/bin/eolian_mono/eolian/mono/events.hh @@ -255,7 +255,7 @@ struct event_argument_wrapper_generator << scope_tab << "/// Actual event payload.\n" << scope_tab << "/// " << documentation_string << "\n" << scope_tab << "public " << type << " arg { get; set; }\n" - << "}\n" + << "}\n\n" ).generate(sink, std::make_tuple(evt.documentation.summary, *etype), context); } } const event_argument_wrapper {}; @@ -279,9 +279,8 @@ struct event_declaration_generator if (evt.type.is_engaged()) wrapper_args_type = "<" + name_helpers::managed_event_args_name(evt) + ">"; - if (!as_generator( - documentation(1) - ).generate(sink, evt, context)) return false; + if (!as_generator(documentation(1)) + .generate(sink, evt, context)) return false; if (evt.type.is_engaged()) if (!as_generator( scope_tab << "/// \n" @@ -427,7 +426,7 @@ struct event_definition_generator << scope_tab << scope_tab << scope_tab << "return;\n" << scope_tab << scope_tab << "}\n\n" << event_native_call - << scope_tab << "}\n" + << scope_tab << "}\n\n" ).generate(sink, nullptr, context)) return false; @@ -479,7 +478,7 @@ struct event_definition_generator << scope_tab << scope_tab << scope_tab << scope_tab << "RemoveNativeEventHandler(" << library_name << ", key, value);\n" << scope_tab << scope_tab << scope_tab << "}\n" // End of lock block << scope_tab << scope_tab << "}\n" - << scope_tab << "}\n" + << scope_tab << "}\n\n" ).generate(sink, attributes::unused, context); } }; diff --git a/src/bin/eolian_mono/eolian/mono/function_declaration.hh b/src/bin/eolian_mono/eolian/mono/function_declaration.hh index 4532746be2..734700c676 100644 --- a/src/bin/eolian_mono/eolian/mono/function_declaration.hh +++ b/src/bin/eolian_mono/eolian/mono/function_declaration.hh @@ -27,11 +27,11 @@ struct function_declaration_generator if(f.scope != attributes::member_scope::scope_public) return true; - if(!as_generator(documentation).generate(sink, f, context)) + if(!as_generator(documentation(1)).generate(sink, f, context)) return false; return as_generator - (eolian_mono::type(true) << " " << string << "(" << (parameter % ", ") << ");\n") + (scope_tab << eolian_mono::type(true) << " " << string << "(" << (parameter % ", ") << ");\n\n") .generate(sink, std::make_tuple(f.return_type, name_helpers::managed_method_name(f), f.parameters), context); } }; diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh index a0f28df305..df72f2ce6c 100644 --- a/src/bin/eolian_mono/eolian/mono/function_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh @@ -119,7 +119,7 @@ struct native_function_definition_generator << indent << scope_tab << "var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);\n" << indent << scope_tab << "if (ws != null)\n" << indent << scope_tab << "{\n" - << eolian_mono::native_function_definition_preamble() + << indent << scope_tab << scope_tab << eolian_mono::native_function_definition_preamble() << "\n" << indent << scope_tab << scope_tab << "try\n" << indent << scope_tab << scope_tab << "{\n" << indent << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "_ret_var = " : "") @@ -131,7 +131,7 @@ struct native_function_definition_generator << indent << scope_tab << scope_tab << scope_tab << "Eina.Log.Warning($\"Callback error: {e.ToString()}\");\n" << indent << scope_tab << scope_tab << scope_tab << "Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);\n" << indent << scope_tab << scope_tab << "}\n\n" - << eolian_mono::native_function_definition_epilogue(*klass) << "\n" + << indent << eolian_mono::native_function_definition_epilogue(*klass) << "\n" << indent << scope_tab << "}\n" << indent << scope_tab << "else\n" << indent << scope_tab << "{\n" @@ -204,14 +204,14 @@ struct function_definition_generator if(!as_generator (scope_tab << eolian_mono::function_scope_get(f) << ((do_super && !f.is_static) ? "virtual " : "") << (f.is_static ? "static " : "") << return_type << " " << string << "(" << (parameter % ", ") - << ") {\n " - << eolian_mono::function_definition_preamble() + << ") {\n" + << scope_tab(2) << eolian_mono::function_definition_preamble() << klass_full_native_inherit_name(f.klass) << "." << string << "_ptr.Value.Delegate(" << self << ((!f.is_static && (f.parameters.size() > 0)) ? "," : "") << (argument_invocation % ", ") << ");\n" - << eolian_mono::function_definition_epilogue() - << " }\n") + << scope_tab(2) << eolian_mono::function_definition_epilogue() + << scope_tab(1) << "}\n\n") .generate(sink, std::make_tuple(name_helpers::managed_method_name(f), f.parameters, f, f.c_name, f.parameters, f), context)) return false; @@ -268,11 +268,11 @@ struct property_extension_method_definition_generator if (property.setter.is_engaged()) { attributes::type_def prop_type = property.setter->parameters[0].type; - if (!as_generator("public static Efl.BindableProperty<" << type(true) << "> " << managed_name << "(this Efl.Ui.ItemFactory fac, Efl.Csharp.ExtensionTag<" - << name_helpers::klass_full_concrete_or_interface_name(cls) - << ", T>magic = null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << " {\n" + if (!as_generator(scope_tab << "public static Efl.BindableProperty<" << type(true) << "> " << managed_name << "(this Efl.Ui.ItemFactory fac, Efl.Csharp.ExtensionTag<" + << name_helpers::klass_full_concrete_or_interface_name(cls) + << ", T>magic = null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << " {\n" << scope_tab << scope_tab << "return new Efl.BindableProperty<" << type(true) << ">(\"" << property.name << "\", fac);\n" - << scope_tab << "}\n" + << scope_tab << "}\n\n" ).generate(sink, std::make_tuple(prop_type, prop_type), context)) return false; } @@ -285,11 +285,11 @@ struct property_extension_method_definition_generator if (property.setter.is_engaged()) { attributes::type_def prop_type = property.setter->parameters[0].type; - if (!as_generator("public static Efl.BindableProperty<" << type(true) << "> " << managed_name << "(this Efl.BindablePart part, Efl.Csharp.ExtensionTag<" - << name_helpers::klass_full_concrete_or_interface_name(cls) - << ", T>magic = null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << " {\n" + if (!as_generator(scope_tab << "public static Efl.BindableProperty<" << type(true) << "> " << managed_name << "(this Efl.BindablePart part, Efl.Csharp.ExtensionTag<" + << name_helpers::klass_full_concrete_or_interface_name(cls) + << ", T>magic = null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << " {\n" << scope_tab << scope_tab << "return new Efl.BindableProperty<" << type(true) << ">(part.PartName, \"" << property.name << "\", part.Binder);\n" - << scope_tab << "}\n" + << scope_tab << "}\n\n" ).generate(sink, std::make_tuple(prop_type, prop_type), context)) return false; } @@ -522,7 +522,7 @@ struct property_wrapper_definition_generator return false; } - if (!as_generator(scope_tab << "}\n").generate(sink, attributes::unused, context)) + if (!as_generator(scope_tab << "}\n\n").generate(sink, attributes::unused, context)) return false; return true; diff --git a/src/bin/eolian_mono/eolian/mono/function_helpers.hh b/src/bin/eolian_mono/eolian/mono/function_helpers.hh index 5f7cf67877..26146f7774 100644 --- a/src/bin/eolian_mono/eolian/mono/function_helpers.hh +++ b/src/bin/eolian_mono/eolian/mono/function_helpers.hh @@ -34,14 +34,14 @@ struct native_function_definition_preamble_generator return false; if (!as_generator( - *(scope_tab << scope_tab << native_convert_in_variable) - << *(scope_tab << scope_tab << native_convert_out_variable) - << *(scope_tab << scope_tab << native_convert_function_pointer) - << scope_tab << scope_tab << scope_tab << native_convert_return_variable + *(native_convert_in_variable) + << *(native_convert_out_variable) + << *(native_convert_function_pointer) + << native_convert_return_variable ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.parameters, f.return_type), context)) return false; - return as_generator("\n").generate(sink, attributes::unused, context); + return as_generator("").generate(sink, attributes::unused, context); } }; @@ -57,11 +57,11 @@ struct function_definition_preamble_generator return false; if (!as_generator( - *(scope_tab << scope_tab << convert_in_variable) - << *(scope_tab << scope_tab << convert_out_variable) - << *(scope_tab << scope_tab << convert_function_pointer) - << scope_tab << scope_tab << convert_return_variable - ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.parameters, f.return_type), context)) + *(convert_in_variable) + << *(convert_out_variable) + << *(convert_function_pointer) + << convert_return_variable + ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.parameters, f.return_type), context)) return false; return true; @@ -82,9 +82,9 @@ struct native_function_definition_epilogue_generator return false; if (!as_generator( - *(scope_tab << scope_tab << native_convert_out_assign(*klass)) - << *(scope_tab << scope_tab << native_convert_in_ptr_assign) - << scope_tab << scope_tab << native_convert_return(*klass) + *(native_convert_out_assign(*klass)) + << *(native_convert_in_ptr_assign) + << scope_tab(2) << native_convert_return(*klass) ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.return_type), context)) return false; @@ -99,10 +99,10 @@ struct function_definition_epilogue_generator bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const { if (!as_generator( - scope_tab << scope_tab << "Eina.Error.RaiseIfUnhandledException();\n" - << *(scope_tab << scope_tab << convert_out_assign) - << *(scope_tab << scope_tab << convert_in_ptr_assign) - << scope_tab << scope_tab << convert_return + "Eina.Error.RaiseIfUnhandledException();\n" + << *(convert_out_assign) + << *(convert_in_ptr_assign) + << scope_tab(2) << convert_return << "\n" ).generate(sink, std::make_tuple(f.parameters, f.parameters, f.return_type), context)) return false; diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index 80ac37c141..f33026444f 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh +++ b/src/bin/eolian_mono/eolian/mono/klass.hh @@ -127,10 +127,10 @@ struct klass if(!as_generator("\n{\n").generate(sink, attributes::unused, iface_cxt)) return false; - if(!as_generator(*(scope_tab << function_declaration)).generate(sink, cls.functions, iface_cxt)) + if(!as_generator(*(function_declaration)).generate(sink, cls.functions, iface_cxt)) return false; - if(!as_generator(*(scope_tab << async_function_declaration)).generate(sink, cls.functions, iface_cxt)) + if(!as_generator(*(async_function_declaration)).generate(sink, cls.functions, iface_cxt)) return false; if(!as_generator(*(event_declaration)).generate(sink, cls.events, iface_cxt)) @@ -147,7 +147,7 @@ struct klass return false; // End of interface declaration - if(!as_generator("}\n").generate(sink, attributes::unused, iface_cxt)) return false; + if(!as_generator("}\n\n").generate(sink, attributes::unused, iface_cxt)) return false; } // Events arguments go in the top namespace to avoid the Concrete suffix clutter in interface events. @@ -213,7 +213,7 @@ struct klass ( scope_tab << "[System.Runtime.InteropServices.DllImport(" << context_find_tag(concrete_cxt).actual_library_name(cls.filename) << ")] internal static extern System.IntPtr\n" - << scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n" + << scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n\n" << scope_tab << "/// Initializes a new instance of the class.\n" << scope_tab << "/// Internal usage: This is used when interacting with C code and should not be used directly.\n" << scope_tab << "/// The native pointer to be wrapped.\n" @@ -262,7 +262,7 @@ struct klass scope_tab << "private static IntPtr GetEflClassStatic()\n" << scope_tab << "{\n" << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n" - << scope_tab << "}\n" + << scope_tab << "}\n\n" ).generate(sink, attributes::unused, concrete_cxt)) return false; @@ -342,7 +342,7 @@ struct klass scope_tab << "private static IntPtr GetEflClassStatic()\n" << scope_tab << "{\n" << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n" - << scope_tab << "}\n" + << scope_tab << "}\n\n" ).generate(sink, attributes::unused, inherit_cxt)) return false; @@ -370,8 +370,8 @@ struct klass << "#pragma warning disable CS1591\n" // Disabling warnings as DocFx will hide these classes <<"public static class " << (string % "_") << name_helpers::klass_inherit_name(cls) << "_ExtensionMethods {\n" - << *((scope_tab << property_extension_method_definition(cls)) << "\n") - << *((scope_tab << part_extension_method_definition(cls)) << "\n") + << *(property_extension_method_definition(cls)) + << *(part_extension_method_definition(cls)) << "}\n" << "#pragma warning restore CS1591\n" << "#endif\n") @@ -416,7 +416,7 @@ struct klass { if(!as_generator( indent << scope_tab << "private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(" - << indent << context_find_tag(context).actual_library_name(cls.filename) << ");\n" + << context_find_tag(context).actual_library_name(cls.filename) << ");\n\n" ).generate(sink, attributes::unused, inative_cxt)) return false; } @@ -466,7 +466,7 @@ struct klass if(!as_generator( indent << scope_tab << scope_tab << "return descs;\n" - << indent << scope_tab << "}\n" + << indent << scope_tab << "}\n\n" ).generate(sink, attributes::unused, inative_cxt)) return false; @@ -532,7 +532,7 @@ struct klass if(!as_generator( scope_tab << "[System.Runtime.InteropServices.DllImport(" << context_find_tag(context).actual_library_name(cls.filename) << ")] internal static extern System.IntPtr\n" - << scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n" + << scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n\n" ).generate(sink, attributes::unused, context)) return false; @@ -607,7 +607,7 @@ struct klass return true; // Self events - if (!as_generator(*(event_definition(cls, cls))).generate(sink, cls.events, context)) + if (!as_generator(*(event_definition(cls, cls)) << "\n").generate(sink, cls.events, context)) return false; // Inherited events diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh b/src/bin/eolian_mono/eolian/mono/name_helpers.hh index e68de6bf66..08b2bc997a 100644 --- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh +++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh @@ -508,7 +508,7 @@ bool open_namespaces(OutputIterator sink, std::vector namespaces, C template bool close_namespaces(OutputIterator sink, std::vector const& namespaces, Context const& context) { - auto close_namespace = (lit("}") % "\n\n" ) << "\n\n"; + auto close_namespace = (lit("}") % "\n" ) << "\n\n"; return as_generator(close_namespace).generate(sink, namespaces, context); } diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh b/src/bin/eolian_mono/eolian/mono/parameter.hh index 52afaf456e..4050c60866 100644 --- a/src/bin/eolian_mono/eolian/mono/parameter.hh +++ b/src/bin/eolian_mono/eolian/mono/parameter.hh @@ -1071,7 +1071,7 @@ struct convert_return_generator else if (helpers::need_struct_conversion(regular)) { return as_generator( - "return _ret_var;\n" + "return _ret_var;" ).generate(sink, nullptr, context); } else if (ret_type.c_type == "Eina_Binbuf *" || ret_type.c_type == "const Eina_Binbuf *") @@ -1119,7 +1119,7 @@ struct convert_return_generator } else if (ret_type.c_type != "void") { - return as_generator("return _ret_var;\n").generate(sink, ret_type, context); + return as_generator("return _ret_var;").generate(sink, ret_type, context); } return true; } @@ -1289,13 +1289,13 @@ struct native_convert_return_generator if (ret_type.is_ptr && helpers::need_pointer_conversion(regular) && !helpers::need_struct_conversion_in_return(ret_type, attributes::parameter_direction::unknown) ) { return as_generator( - "return Eina.PrimitiveConversion.ManagedToPointerAlloc(_ret_var);\n" + "return Eina.PrimitiveConversion.ManagedToPointerAlloc(_ret_var);" ).generate(sink, attributes::unused, context); } else if (helpers::need_struct_conversion(regular)) { return as_generator( - "return _ret_var;\n" + "return _ret_var;" ).generate(sink, nullptr, context); } else if (ret_type.c_type == "const char *") @@ -1308,12 +1308,12 @@ struct native_convert_return_generator return false; } return as_generator( - "return _ret_var;\n" + "return _ret_var;" ).generate(sink, attributes::unused, context); } else { - return as_generator("return _ret_var;\n" + return as_generator("return _ret_var;" ).generate(sink, attributes::unused, context); } } @@ -1326,12 +1326,12 @@ struct native_convert_return_generator return false; } return as_generator( - "return _ret_var;\n" + "return _ret_var;" ).generate(sink, attributes::unused, context); } else { - return as_generator("return _ret_var;\n") + return as_generator("return _ret_var;") .generate(sink, attributes::unused, context); } } @@ -1341,7 +1341,7 @@ struct native_convert_return_generator .generate(sink, attributes::unused, context)) return false; - return as_generator("return _ret_var.Handle;\n") + return as_generator("return _ret_var.Handle;") .generate(sink, attributes::unused, context); } else if (ret_type.c_type == "Eina_Hash *" || ret_type.c_type == "const Eina_Hash *") @@ -1359,7 +1359,7 @@ struct native_convert_return_generator .generate(sink, attributes::unused, context)) return false; - return as_generator("return _ret_var.Handle;\n") + return as_generator("return _ret_var.Handle;") .generate(sink, attributes::unused, context); } else if (ret_type.c_type == "Eina_Array *" || ret_type.c_type == "const Eina_Array *" @@ -1386,11 +1386,11 @@ struct native_convert_return_generator return false; } - return as_generator("return _ret_var.Handle;\n") + return as_generator("return _ret_var.Handle;") .generate(sink, attributes::unused, context); } else if (ret_type.c_type != "void") - return as_generator("return _ret_var;\n").generate(sink, ret_type, context); + return as_generator("return _ret_var;").generate(sink, ret_type, context); return true; } diff --git a/src/bin/eolian_mono/eolian/mono/part_definition.hh b/src/bin/eolian_mono/eolian/mono/part_definition.hh index 3569f438d5..f3811b96fc 100644 --- a/src/bin/eolian_mono/eolian/mono/part_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/part_definition.hh @@ -60,7 +60,7 @@ struct part_extension_method_definition_generator << ", T> x=null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << "\n" << scope_tab << "{\n" << scope_tab << scope_tab << "return new " << bindableClass << "<" << part_klass_name << ">(\"" << part.name << "\" ,fac);\n" - << scope_tab << "}\n" + << scope_tab << "}\n\n" ).generate(sink, attributes::unused, context)) return false; diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh index fe96e2d175..7fb4c0cf2f 100644 --- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh @@ -370,12 +370,12 @@ struct struct_internal_definition_generator } if (!as_generator(indent << scope_tab << scope_tab << "return _external_struct;\n" - << indent << scope_tab << "}\n\n").generate(sink, nullptr, context)) + << indent << scope_tab << "}\n").generate(sink, nullptr, context)) return false; // close internal class - if(!as_generator(indent << "}\n\n" - << indent << "#pragma warning restore CS1591\n\n" + if(!as_generator(indent << "}\n" + << indent << "#pragma warning restore CS1591\n" ).generate(sink, attributes::unused, context)) return false; return true; diff --git a/src/bin/eolian_mono/eolian/mono/struct_fields.hh b/src/bin/eolian_mono/eolian/mono/struct_fields.hh index 02b2cbec6e..9a0225e9d1 100644 --- a/src/bin/eolian_mono/eolian/mono/struct_fields.hh +++ b/src/bin/eolian_mono/eolian/mono/struct_fields.hh @@ -42,7 +42,7 @@ struct field_argument_docs_generator template bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const { - if (!as_generator("/// " << documentation_string << "") + if (!as_generator(current_indentation(context) << "/// " << documentation_string << "") .generate(sink, std::make_tuple(name_helpers::to_field_name(field.name), field.documentation.summary), context)) return false; return true; From 3b1f7bea75dc5e9753ace4e886174b4afdb0515a Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Tue, 24 Sep 2019 10:20:43 +0900 Subject: [PATCH 48/50] efl_gfx_path: Support 'l' command for optimized path. Summary: If there is no 'l' command for path optimization, refer to the previous cmd. If the previous command is 'm', use 'l'. Test Plan: [Example SVG] ''' ''' Reviewers: Hermet, smohanty, kimcinoo Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10074 --- src/lib/efl/interfaces/efl_gfx_path.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/efl/interfaces/efl_gfx_path.c b/src/lib/efl/interfaces/efl_gfx_path.c index 38f22ecb9f..447b234c72 100644 --- a/src/lib/efl/interfaces/efl_gfx_path.c +++ b/src/lib/efl/interfaces/efl_gfx_path.c @@ -1377,6 +1377,13 @@ _next_command(char *path, char *cmd, double *arr, int *count) path++; *count = _number_count(*cmd); } + else + { + if (*cmd == 'm') + { + *cmd = 'l'; + } + } if ( *count == 7) { // special case for arc command From 44d362e1ef9f0ab1375dde2948fa0ba80ee935cf Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 24 Sep 2019 11:46:50 +0900 Subject: [PATCH 49/50] evas vg: fix gradient stroke fill memory leaks. There were continous creation of gradient objects, We can stop it by caching it properly, Also, fix mismatched ref/unref counts. --- src/lib/evas/canvas/efl_canvas_vg_shape.c | 5 ++++- src/static_libs/vg_common/vg_common_json.c | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape.c b/src/lib/evas/canvas/efl_canvas_vg_shape.c index 4abdb13af8..6ddec04869 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_shape.c +++ b/src/lib/evas/canvas/efl_canvas_vg_shape.c @@ -23,6 +23,8 @@ _efl_canvas_vg_shape_fill_set(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Shape_Data *pd, Efl_Canvas_Vg_Node *f) { + if (pd->fill == f) return; + Efl_Canvas_Vg_Node *tmp = pd->fill; pd->fill = efl_ref(f); @@ -40,8 +42,9 @@ _efl_canvas_vg_shape_stroke_fill_set(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Shape_Data *pd, Efl_Canvas_Vg_Node *f) { - Efl_Canvas_Vg_Node *tmp = pd->fill; + if (pd->stroke.fill == f) return; + Efl_Canvas_Vg_Node *tmp = pd->stroke.fill; pd->stroke.fill = efl_ref(f); efl_unref(tmp); } diff --git a/src/static_libs/vg_common/vg_common_json.c b/src/static_libs/vg_common/vg_common_json.c index 910a4055e1..3b3d114503 100644 --- a/src/static_libs/vg_common/vg_common_json.c +++ b/src/static_libs/vg_common/vg_common_json.c @@ -177,13 +177,25 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l if (node->mGradient.type == GradientLinear) { - grad = efl_add(EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS, parent); + char *key = _get_key_val(shape); + grad = efl_key_data_get(shape, key); + if (!grad) + { + grad = efl_add(EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS, parent); + efl_key_data_set(shape, key, grad); + } efl_gfx_gradient_linear_start_set(grad, node->mGradient.start.x, node->mGradient.start.y); efl_gfx_gradient_linear_end_set(grad, node->mGradient.end.x, node->mGradient.end.y); } else if (node->mGradient.type == GradientRadial) { - grad = efl_add(EFL_CANVAS_VG_GRADIENT_RADIAL_CLASS, parent); + char *key = _get_key_val(shape); + grad = efl_key_data_get(shape, key); + if (!grad) + { + grad = efl_add(EFL_CANVAS_VG_GRADIENT_RADIAL_CLASS, parent); + efl_key_data_set(shape, key, grad); + } efl_gfx_gradient_radial_center_set(grad, node->mGradient.center.x, node->mGradient.center.y); efl_gfx_gradient_radial_focal_set(grad, node->mGradient.focal.x, node->mGradient.focal.y); efl_gfx_gradient_radial_radius_set(grad, node->mGradient.cradius); From 06d328ffd114c791491fbe3fbc22bcbffd02560c Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Tue, 24 Sep 2019 11:52:30 +0900 Subject: [PATCH 50/50] efl_gfx_path: Add optimized path command Summary: If 'L' is removed due to optimization, it should be supported like 3b1f7be If the previous command is 'M', use 'L'. Test Plan: N/A Reviewers: Hermet, smohanty, kimcinoo Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10104 --- src/lib/efl/interfaces/efl_gfx_path.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/efl/interfaces/efl_gfx_path.c b/src/lib/efl/interfaces/efl_gfx_path.c index 447b234c72..85be89ce71 100644 --- a/src/lib/efl/interfaces/efl_gfx_path.c +++ b/src/lib/efl/interfaces/efl_gfx_path.c @@ -1380,9 +1380,9 @@ _next_command(char *path, char *cmd, double *arr, int *count) else { if (*cmd == 'm') - { - *cmd = 'l'; - } + *cmd = 'l'; + else if (*cmd == 'M') + *cmd = 'L'; } if ( *count == 7) {