[EGIT] [core/efl] master 01/01: edje: Avoid string duplication when possible.
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=704d58d658ed4424a886c127f3bbe83afde1f2a1 commit 704d58d658ed4424a886c127f3bbe83afde1f2a1 Author: Woochanlee Date: Tue Jul 7 11:20:53 2020 +0100 edje: Avoid string duplication when possible. Summary: Most use case the part name dosen't contain the recursive name so we don't have to go through expensive eina_string_split operation. Reviewers: smohanty, cedric, Hermet, raster Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12045 --- src/lib/edje/edje_util.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index 4d9a9dc369..33d00488e5 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -5602,17 +5602,23 @@ _edje_real_part_text_text_source_description_get(Edje_Real_Part *ep, Edje_Real_P Edje_Real_Part * _edje_real_part_recursive_get(Edje **ed, const char *part) { - Edje_Real_Part *rp; - char **path; + if ((*ed)->collection && (*ed)->collection->alias) + { +Edje_Real_Part *rp; +char **path; - path = eina_str_split(part, EDJE_PART_PATH_SEPARATOR_STRING, 0); - if (!path) return NULL; +path = eina_str_split(part, EDJE_PART_PATH_SEPARATOR_STRING, 0); +if (!path) return NULL; - rp = _edje_real_part_recursive_get_helper(ed, path); +rp = _edje_real_part_recursive_get_helper(ed, path); + +free(*path); +free(path); + +return rp; + } - free(*path); - free(path); - return rp; + return _edje_real_part_get(*ed, part);; } Evas_Object * --
[EGIT] [core/efl] master 01/01: edje: Avoid string duplication when possible.
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8941514b467ce3e5d02c9b936d35a9d393989260 commit 8941514b467ce3e5d02c9b936d35a9d393989260 Author: Woochanlee Date: Thu Jul 16 11:37:10 2020 +0100 edje: Avoid string duplication when possible. Summary: Most use case the part name dosen't contain the recursive name so we don't have to go through expensive eina_string_split operation. Test Plan: edje-suite (34/37 edje-suite OK 0.67 s) elementary-test app launching on enlightenment Reviewers: raster, smohanty, Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12055 --- src/lib/edje/edje_util.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index 4d9a9dc369..f0102cd68c 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -5602,17 +5602,23 @@ _edje_real_part_text_text_source_description_get(Edje_Real_Part *ep, Edje_Real_P Edje_Real_Part * _edje_real_part_recursive_get(Edje **ed, const char *part) { - Edje_Real_Part *rp; - char **path; + if (strchr(part, EDJE_PART_PATH_SEPARATOR)) + { +Edje_Real_Part *rp; +char **path; - path = eina_str_split(part, EDJE_PART_PATH_SEPARATOR_STRING, 0); - if (!path) return NULL; +path = eina_str_split(part, EDJE_PART_PATH_SEPARATOR_STRING, 0); +if (!path) return NULL; - rp = _edje_real_part_recursive_get_helper(ed, path); +rp = _edje_real_part_recursive_get_helper(ed, path); + +free(*path); +free(path); + +return rp; + } - free(*path); - free(path); - return rp; + return _edje_real_part_get(*ed, part); } Evas_Object * --
[EGIT] [core/efl] master 01/01: edje_cc: Fix uninitialized scalar variable
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8198345e1f703e15bbd7b35cd0056285a25c9071 commit 8198345e1f703e15bbd7b35cd0056285a25c9071 Author: Woochanlee Date: Tue Sep 1 21:02:57 2020 +0900 edje_cc: Fix uninitialized scalar variable Summary: mo_path can using for fprintf in using_file function without initialize. fix coverity. Reviewers: Hermet, raster Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12120 --- src/bin/edje/edje_cc_out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c index d5060bbf5c..c2bfb82fd1 100644 --- a/src/bin/edje/edje_cc_out.c +++ b/src/bin/edje/edje_cc_out.c @@ -1717,7 +1717,7 @@ data_thread_mo(void *data, Ecore_Thread *thread EINA_UNUSED) Eina_List *ll; char *dir_path = NULL; - char mo_path[PATH_MAX]; + char mo_path[PATH_MAX] = {0}; char moid_str[50]; Eina_File *f = NULL; void *m = NULL; --
[EGIT] [core/efl] master 01/01: evas_outbuf: Fix memory leak.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=875f05cef53a973eee7fe25abdbcb824896f9d0e commit 875f05cef53a973eee7fe25abdbcb824896f9d0e Author: Woochanlee Date: Thu Sep 17 17:23:41 2020 +0900 evas_outbuf: Fix memory leak. Summary: In certain use cases, when image data is created twice, the existing memory pointer is isolated and a memory leak occurs. Reviewers: raster, Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8813 Differential Revision: https://phab.enlightenment.org/D12148 --- src/modules/evas/engines/buffer/evas_outbuf.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/engines/buffer/evas_outbuf.c b/src/modules/evas/engines/buffer/evas_outbuf.c index 545ff096ed..d143179f21 100644 --- a/src/modules/evas/engines/buffer/evas_outbuf.c +++ b/src/modules/evas/engines/buffer/evas_outbuf.c @@ -45,8 +45,9 @@ evas_buffer_outbuf_buf_update_fb(Outbuf *buf, int w, int h, Outbuf_Depth depth, if ((buf->depth == OUTBUF_DEPTH_ARGB_32BPP__) && (buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32 { - memset(buf->dest, 0, h * buf->dest_row_bytes); - buf->priv.back_buf = +memset(buf->dest, 0, h * buf->dest_row_bytes); +if (buf->priv.back_buf) evas_cache_image_drop(&buf->priv.back_buf->cache_entry); +buf->priv.back_buf = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(), w, h, buf->dest, 1, EVAS_COLORSPACE_ARGB); @@ -54,6 +55,7 @@ evas_buffer_outbuf_buf_update_fb(Outbuf *buf, int w, int h, Outbuf_Depth depth, else if ((buf->depth == OUTBUF_DEPTH_RGB_32BPP_888_) && (buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32 { +if (buf->priv.back_buf) evas_cache_image_drop(&buf->priv.back_buf->cache_entry); buf->priv.back_buf = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(), w, h, buf->dest, --
[EGIT] [core/efl] master 01/01: evas_main: Fix memory leak.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ca2900be8a109e3e205a8c49ff11a1f822ae96b7 commit ca2900be8a109e3e205a8c49ff11a1f822ae96b7 Author: Woochanlee Date: Thu Sep 17 17:23:10 2020 +0900 evas_main: Fix memory leak. Summary: If the inlist has only one item when it removed. the data is not freed in descturctor. Reviewers: Hermet, raster, vtorri Reviewed By: Hermet Subscribers: vtorri, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12147 --- src/lib/evas/canvas/evas_main.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index 6a84b0c59b..40d242339a 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c @@ -1523,8 +1523,11 @@ _evas_pointer_data_remove(Evas_Public_Data *edata, Evas_Device *pointer, Eina_Bo EINA_INLIST_FOREACH(pseat->pointers, pdata) if (pdata->pointer == pointer) { - pseat->pointers = eina_inlist_remove(pseat->pointers, EINA_INLIST_GET(pdata)); - if (!nofree) free(pdata); + if (!nofree) + { +pseat->pointers = eina_inlist_remove(pseat->pointers, EINA_INLIST_GET(pdata)); +free(pdata); + } hit = pseat; break; } @@ -1532,8 +1535,11 @@ _evas_pointer_data_remove(Evas_Public_Data *edata, Evas_Device *pointer, Eina_Bo EINA_SAFETY_ON_NULL_RETURN(hit); if (hit->pointers) return; hit->object.in = eina_list_free(hit->object.in); - edata->seats = eina_inlist_remove(edata->seats, EINA_INLIST_GET(hit)); - if (!nofree) free(hit); + if (!nofree) + { +edata->seats = eina_inlist_remove(edata->seats, EINA_INLIST_GET(hit)); +free(hit); + } } Eina_List * --
[EGIT] [core/efl] master 01/01: edje_util: Fix memory leak
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cfd17f145ace345f08581cd17b9328eaf56812e2 commit cfd17f145ace345f08581cd17b9328eaf56812e2 Author: Woochanlee Date: Tue Dec 8 12:16:22 2020 + edje_util: Fix memory leak Summary: evas_object_data_set call callc for internal node. It's not free before call evas_object_data_del or evas_object_data_set(obj, NULL) Reviewers: raster, cedric, Hermet Reviewed By: raster Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12205 --- src/lib/edje/edje_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index 4d9a9dc369..af465288e7 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -6384,6 +6384,7 @@ _edje_real_part_swallow_clear(Edje *ed, Edje_Real_Part *rp) rp); evas_object_clip_unset(rp->typedata.swallow->swallowed_object); evas_object_data_del(rp->typedata.swallow->swallowed_object, "\377 edje.swallowing_part"); + evas_object_data_del(rp->typedata.swallow->swallowed_object, ".edje"); _edje_callbacks_del(rp->typedata.swallow->swallowed_object, ed); _edje_callbacks_focus_del(rp->typedata.swallow->swallowed_object, ed); rp->typedata.swallow->swallowed_object = NULL; --
[EGIT] [core/efl] master 01/01: eo_base_class: Avoid useless memory alloc
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ed0c46fa3b915554474cb9b832fb56fb07666e34 commit ed0c46fa3b915554474cb9b832fb56fb07666e34 Author: Woochanlee Date: Thu Dec 24 11:47:03 2020 +0900 eo_base_class: Avoid useless memory alloc Summary: The pd->ext will be NULL when the target object on invalidate state or edje object or isolated object etc.. In above case, If data is NULL and ext is not needed, it seems there is no need to create a node. Reviewers: raster, cedric, Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12206 --- src/lib/eo/eo_base_class.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index c062833188..546b5d3999 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -362,6 +362,8 @@ _key_generic_set(const Eo *obj, Efl_Object_Data *pd, const char *key, const void } } } + else + if (!data) return NULL; ext = _efl_object_extension_need(pd); if (ext) --
[EGIT] [core/efl] master 01/01: elm_gesture_layer: fix config value type
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9a3127829950a886a2a81420cd281252d486dcf1 commit 9a3127829950a886a2a81420cd281252d486dcf1 Author: Woochanlee Date: Thu Dec 24 11:48:07 2020 +0900 elm_gesture_layer: fix config value type Summary: The value will read as unsigned char not double. @fix Reviewers: Hermet, raster, zmike Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12195 --- src/lib/elementary/elm_gesture_layer.c | 2 +- src/lib/elementary/elm_priv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_gesture_layer.c b/src/lib/elementary/elm_gesture_layer.c index 5e6932c0af..2fb1a43e2b 100644 --- a/src/lib/elementary/elm_gesture_layer.c +++ b/src/lib/elementary/elm_gesture_layer.c @@ -3589,7 +3589,7 @@ _rotate_test(Evas_Object *obj, Gesture_Info *gesture; Rotate_Type *st = NULL; - if (EINA_DBL_EQ(_elm_config->glayer_rotate_finger_enable, 0)) + if (!_elm_config->glayer_rotate_finger_enable) return; if (!pe) diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h index fe7b65297d..aee4b4d8d6 100644 --- a/src/lib/elementary/elm_priv.h +++ b/src/lib/elementary/elm_priv.h @@ -550,7 +550,7 @@ struct _Elm_Config doubleglayer_zoom_finger_factor; doubleglayer_zoom_wheel_factor; doubleglayer_zoom_distance_tolerance; - doubleglayer_rotate_finger_enable; + unsigned char glayer_rotate_finger_enable; doubleglayer_rotate_angular_tolerance; doubleglayer_line_min_length; doubleglayer_line_distance_tolerance; --
[EGIT] [core/efl] master 01/01: Intruduce Efl.Ui.Panel (Create Efl Ui Widget from elm widget(elm_panel))
jaehyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d9a222ecf59622ec9cf80a908b0a987d18f87b0f commit d9a222ecf59622ec9cf80a908b0a987d18f87b0f Author: Woochanlee Date: Thu Dec 20 11:32:28 2018 +0900 Intruduce Efl.Ui.Panel (Create Efl Ui Widget from elm widget(elm_panel)) Summary: Create Efl Ui Widget from elm widget(elm_panel) Test Plan: elementary_test -> efl_ui_panel Reviewers: woohyun, Jaehyun_Cho, segfaultxavi Reviewed By: Jaehyun_Cho, segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7238 --- data/elementary/themes/Makefile.am|1 + data/elementary/themes/default.edc|1 + data/elementary/themes/edc/efl/panel.edc | 831 + src/Makefile_Elementary.am|4 + src/bin/elementary/Makefile.am|1 + src/bin/elementary/meson.build|1 + src/bin/elementary/test.c |4 + src/bin/elementary/test_ui_panel.c| 159 src/lib/elementary/Elementary.h |1 + src/lib/elementary/efl_ui_panel.c | 1386 + src/lib/elementary/efl_ui_panel.eo| 95 ++ src/lib/elementary/efl_ui_panel_private.h | 81 ++ src/lib/elementary/meson.build|3 + 13 files changed, 2568 insertions(+) diff --git a/data/elementary/themes/Makefile.am b/data/elementary/themes/Makefile.am index 2e176633f7..7116e63b0c 100644 --- a/data/elementary/themes/Makefile.am +++ b/data/elementary/themes/Makefile.am @@ -1026,6 +1026,7 @@ elementary/themes/edc/efl/grid.edc \ elementary/themes/edc/efl/navigation_bar.edc \ elementary/themes/edc/efl/navigation_layout.edc \ elementary/themes/edc/efl/tags.edc \ +elementary/themes/edc/efl/panel.edc \ elementary/themes/edc/efl/nstate.edc \ elementary/themes/edc/efl/panes.edc \ elementary/themes/edc/efl/photocam.edc \ diff --git a/data/elementary/themes/default.edc b/data/elementary/themes/default.edc index d0e7126fd4..95f879a8a8 100644 --- a/data/elementary/themes/default.edc +++ b/data/elementary/themes/default.edc @@ -186,6 +186,7 @@ collections { #include "edc/efl/video.edc" #include "edc/efl/focus.edc" #include "edc/efl/tags.edc" +#include "edc/efl/panel.edc" #include "edc/efl/tooltip.edc" #include "edc/efl/photocam.edc" #include "edc/efl/progress.edc" diff --git a/data/elementary/themes/edc/efl/panel.edc b/data/elementary/themes/edc/efl/panel.edc new file mode 100644 index 00..aee2e31f6f --- /dev/null +++ b/data/elementary/themes/edc/efl/panel.edc @@ -0,0 +1,831 @@ +group { name: "efl/panel"; + data { + item: "handler_size" "30"; + } + parts { + part { name: "efl.content"; + type: SWALLOW; + description { state: "default" 0.0; + } + } + } +} +group { name: "efl/panel/scrollable/left"; + parts { + part { name: "efl.panel_area"; + type: SWALLOW; + description { state: "default" 0.0; +rel2.relative: 0.0 1.0; +align: 0.0 0.5; +fixed: 1 1; +visible: 0; + } + description { state: "visible" 0.0; +inherit: "default" 0.0; +visible: 1; + } + } + part { name: "efl.event_area"; + type: SWALLOW; + description { state: "default" 0.0; +rel1 { + relative: 1.0 0.0; + to: "efl.panel_area"; +} +rel2 { + relative: 1.0 1.0; + to: "efl.panel_area"; +} +align: 0.0 0.5; +fixed: 1 1; +visible: 0; + } + description { state: "visible" 0.0; +inherit: "default" 0.0; +visible: 1; + } + } + part { name: "access.outline"; + type: RECT; + repeat_events: 1; + description { state: "default" 0.0; +rel1.to: "efl.panel_area"; +rel2.to: "efl.panel_area"; +color: 0 0 0 0; + } + } + part { name: "bg"; + type: RECT; + description { state: "default" 0.0; +rel1.to: "efl.panel_area"; +rel2.to: "efl.panel_area"; +color: 64 64 64 255; +visible: 0; + } + description { state: "visible" 0.0; +inherit: "default" 0.0; +visible: 1; + } + } + part { name: "efl.content"; + type: SWALLOW; + description { state: "default&qu
[EGIT] [core/efl] master 07/07: efl_ui_win: Load config values into gesture manager.
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fe29a7a06db2935d006643429c3b204afcdad1af commit fe29a7a06db2935d006643429c3b204afcdad1af Author: Woochanlee Date: Fri Jan 4 08:03:52 2019 + efl_ui_win: Load config values into gesture manager. https://phab.enlightenment.org/T7544 The other config values will be added Later. Differential Revision: https://phab.enlightenment.org/D7540 --- src/lib/elementary/efl_ui_win.c | 21 + 1 file changed, 21 insertions(+) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index d66db964dd..eb5f7e0c42 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -4963,6 +4963,24 @@ _win_finalize_job_cb(void *data, const Eina_Value value) return value; } +static void +_gesture_manager_config_load(Eo *obj) +{ + Eina_Value val; + Efl_Canvas_Gesture_Manager *gm = efl_provider_find(obj, EFL_CANVAS_GESTURE_MANAGER_CLASS); + + eina_value_setup(&val, EINA_VALUE_TYPE_DOUBLE); + eina_value_set(&val, _elm_config->glayer_long_tap_start_timeout); + efl_gesture_manager_config_set(gm, "glayer_long_tap_start_timeout", &val); + + eina_value_set(&val, _elm_config->glayer_double_tap_timeout); + efl_gesture_manager_config_set(gm, "glayer_double_tap_timeout", &val); + + eina_value_setup(&val, EINA_VALUE_TYPE_INT); + eina_value_set(&val, _elm_config->glayer_tap_finger_size); + efl_gesture_manager_config_set(gm, "glayer_tap_finger_size", &val); +} + static Eo * _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_Ui_Win_Type type) { @@ -5684,6 +5702,9 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U } } + // Load the config values into gesutre manager. + _gesture_manager_config_load(obj); + return obj; } --
[EGIT] [core/efl] master 01/01: Gesture Manager: Add gestures and fix gesture managing, recognizer logic.
jaehyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=54175998d538e0b2173fc023bb822f1e6536e58f commit 54175998d538e0b2173fc023bb822f1e6536e58f Author: Woochanlee Date: Tue May 14 16:37:20 2019 +0900 Gesture Manager: Add gestures and fix gesture managing, recognizer logic. Summary: https://phab.enlightenment.org/T7544 Provides a way for a user to get a gesture manager, recognizer instance. Supports different recognizer properties for each target(Eo). Gesture, Touch Class Life-cycle re-implementation. for supporting multiple touches. Add below gestures. efl_canvas_gesture_tap efl_canvas_gesture_double_tap efl_canvas_gesture_triple_tap efl_canvas_gesture_long_tap efl_canvas_gesture_momentum efl_canvas_gesture_zoom efl_canvas_gesture_flick Test Plan: Simple test -> test_gesture_framework.c More test cases will upload. Reviewers: woohyun, smohanty, segfaultxavi, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: Jaehyun_Cho, segfaultxavi, cedric Tags: #efl, #do_not_merge Differential Revision: https://phab.enlightenment.org/D7579 --- src/Makefile_Evas.am | 40 ++- src/bin/elementary/test_gesture_framework.c| 281 ++-- src/lib/evas/Evas_Eo.h | 29 +- src/lib/evas/canvas/efl_canvas_object.eo | 6 +- src/lib/evas/canvas/evas_callbacks.c | 6 +- src/lib/evas/canvas/evas_object_main.c | 9 + src/lib/evas/gesture/efl_canvas_gesture.c | 19 +- src/lib/evas/gesture/efl_canvas_gesture.eo | 20 +- ...sture_tap.c => efl_canvas_gesture_double_tap.c} | 9 +- .../evas/gesture/efl_canvas_gesture_double_tap.eo | 9 + src/lib/evas/gesture/efl_canvas_gesture_flick.c| 30 ++ src/lib/evas/gesture/efl_canvas_gesture_flick.eo | 20 ++ src/lib/evas/gesture/efl_canvas_gesture_long_tap.c | 8 +- .../evas/gesture/efl_canvas_gesture_long_tap.eo| 5 +- src/lib/evas/gesture/efl_canvas_gesture_manager.c | 235 ++ src/lib/evas/gesture/efl_canvas_gesture_manager.eo | 8 +- src/lib/evas/gesture/efl_canvas_gesture_momentum.c | 24 ++ .../evas/gesture/efl_canvas_gesture_momentum.eo| 16 + src/lib/evas/gesture/efl_canvas_gesture_private.h | 141 +++- .../evas/gesture/efl_canvas_gesture_recognizer.c | 10 + .../evas/gesture/efl_canvas_gesture_recognizer.eo | 15 +- .../efl_canvas_gesture_recognizer_double_tap.c | 191 +++ .../efl_canvas_gesture_recognizer_double_tap.eo| 22 ++ .../gesture/efl_canvas_gesture_recognizer_flick.c | 354 + .../gesture/efl_canvas_gesture_recognizer_flick.eo | 9 + .../efl_canvas_gesture_recognizer_long_tap.c | 151 ++--- .../efl_canvas_gesture_recognizer_long_tap.eo | 16 +- .../efl_canvas_gesture_recognizer_momentum.c | 197 .../efl_canvas_gesture_recognizer_momentum.eo | 9 + .../gesture/efl_canvas_gesture_recognizer_tap.c| 56 +++- .../gesture/efl_canvas_gesture_recognizer_tap.eo | 3 +- .../efl_canvas_gesture_recognizer_triple_tap.c | 191 +++ .../efl_canvas_gesture_recognizer_triple_tap.eo| 22 ++ .../gesture/efl_canvas_gesture_recognizer_zoom.c | 275 .../gesture/efl_canvas_gesture_recognizer_zoom.eo | 9 + src/lib/evas/gesture/efl_canvas_gesture_tap.c | 3 +- src/lib/evas/gesture/efl_canvas_gesture_tap.eo | 5 +- src/lib/evas/gesture/efl_canvas_gesture_touch.c| 102 +++--- src/lib/evas/gesture/efl_canvas_gesture_touch.eo | 18 +- ...sture_tap.c => efl_canvas_gesture_triple_tap.c} | 9 +- .../evas/gesture/efl_canvas_gesture_triple_tap.eo | 9 + src/lib/evas/gesture/efl_canvas_gesture_types.eot | 13 + src/lib/evas/gesture/efl_canvas_gesture_zoom.c | 35 ++ src/lib/evas/gesture/efl_canvas_gesture_zoom.eo| 19 ++ src/lib/evas/gesture/efl_gesture_events.eo | 13 + src/lib/evas/gesture/meson.build | 50 +-- 46 files changed, 2442 insertions(+), 279 deletions(-) diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index 95ec86e756..9abbe585a3 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -59,16 +59,25 @@ evas_gesture_eolian_pub_files = \ lib/evas/gesture/efl_canvas_gesture.eo \ lib/evas/gesture/efl_canvas_gesture_tap.eo \ lib/evas/gesture/efl_canvas_gesture_long_tap.eo \ + lib/evas/gesture/efl_canvas_gesture_double_tap.eo \ + lib/evas/gesture/efl_canvas_gesture_triple_tap.eo \ + lib/evas/gesture/efl_canvas_gesture_momentum.eo \ + lib/evas/gesture/efl_canvas_gesture_flick.eo \ + lib/evas/gesture/efl_canvas_gesture_zoom.eo \ lib/evas/gesture/efl_canvas_gesture_recognizer.eo \ + lib/evas/gesture/efl_canvas_gesture_recognizer_tap.eo \ + lib/eva
[EGIT] [core/efl] master 01/01: evas_render: Process deferred callback in the sync render case.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9367dcc755ec82acf75b3b2cf7b7c99383c60e8e commit 9367dcc755ec82acf75b3b2cf7b7c99383c60e8e Author: Woochanlee Date: Wed Mar 27 13:11:15 2019 +0900 evas_render: Process deferred callback in the sync render case. Summary: The EVAS_CALLBACK_RENDER_POST callback has been deferred when the callback is registered during the render(inside_post_render flag on). In the sync render case, the logic to call deferred callbacks is missing, and callbacks are not being called in certain cases. @fix Reviewers: ManMower, Hermet Reviewed By: Hermet Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8478 --- src/lib/evas/canvas/evas_render.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index b476ff2930..e1891fc890 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -3600,6 +3600,7 @@ evas_render_updates_internal(Evas *eo_e, if (out->output) ENFN->output_flush(ENC, out->output, EVAS_RENDER_MODE_SYNC); _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_POST, NULL); + _deferred_callbacks_process(eo_e, evas); eina_evlog("-render_output_flush", eo_e, 0.0, NULL); } } --
[EGIT] [core/efl] master 01/01: C# bindings: Make efl_gesture_Manager.eo available to bindings
xartigas pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ebb34ef5182c8d0eda953d5c7221b27c2f559545 commit ebb34ef5182c8d0eda953d5c7221b27c2f559545 Author: Woochanlee Date: Tue Apr 2 18:39:23 2019 +0200 C# bindings: Make efl_gesture_Manager.eo available to bindings Summary: It was missing. The efl_gesture_manager has to using in efl_sharp. Reviewers: zmike, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7550 Differential Revision: https://phab.enlightenment.org/D7249 --- src/Makefile_Efl_Mono.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am index 7cdfc1d726..d8c9dc55ab 100644 --- a/src/Makefile_Efl_Mono.am +++ b/src/Makefile_Efl_Mono.am @@ -206,6 +206,8 @@ $(efl_eolian_type_files:%.eot=%.eot.cs) \ $(edje_eolian_type_files:%.eot=%.eot.cs) \ $(elm_eolian_type_files:%.eot=%.eot.cs) \ $(filter-out $(evas_eolian_blacklisted_files),$(evas_canvas_eolian_pub_files:%.eo=%.eo.cs)) \ +$(evas_gesture_eolian_pub_files:%.eo=%.eo.cs) \ +$(evas_gesture_eolian_type_files:%.eot=%.eot.cs) \ lib/evas/canvas/efl_canvas_image.eo.cs \ $(evas_canvas_eolian_type_files:%.eot=%.eot.cs) \ lib/eo/eina_types.eot.cs \ --
[EGIT] [core/efl] master 01/01: efl_ui_widget: Fix disabled set calling without meaning.
jaehyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=638a36ea9a4d0bb9c77f1312cf556589a1250fc6 commit 638a36ea9a4d0bb9c77f1312cf556589a1250fc6 Author: Woochanlee Date: Fri Apr 12 15:45:37 2019 +0900 efl_ui_widget: Fix disabled set calling without meaning. Summary: The efl_ui_widget_disabled_set calling even the state is not change when widget create and destroy. It broken backward compatibility. T7799 @fix Reviewers: bu5hm4n, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8600 --- src/lib/elementary/efl_ui_widget.c | 8 1 file changed, 8 insertions(+) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 15585ca731..c56990f8b3 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -1373,8 +1373,16 @@ _disabled_counter_get(Eo *widget) static void _mirror_disabled_state(Eo *obj, Elm_Widget_Smart_Data *pd, int disabled_delta) { + int prev_disabled = pd->disabled; + pd->disabled = (pd->parent_obj ? _disabled_counter_get(pd->parent_obj) : 0) + disabled_delta; + //The current disabled state is the same as the parent + //when the parent is assigned or changed, no further action is required. + if (((prev_disabled > 0 && pd->disabled > 0)) || + ((prev_disabled <= 0 && pd->disabled <= 0))) + return; + //we should not call disabled_set when things are invalidated //otherwise we will unleashe an amount of errors in efl_ui_layout if (efl_invalidated_get(obj)) return; --
[EGIT] [core/efl] efl-1.22 32/57: efl_ui_widget: Fix disabled set calling without meaning.
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=41189a00513fee921b0c2ecd61b74380f29ab90f commit 41189a00513fee921b0c2ecd61b74380f29ab90f Author: Woochanlee Date: Fri Apr 12 15:45:37 2019 +0900 efl_ui_widget: Fix disabled set calling without meaning. Summary: The efl_ui_widget_disabled_set calling even the state is not change when widget create and destroy. It broken backward compatibility. T7799 @fix Reviewers: bu5hm4n, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8600 --- src/lib/elementary/efl_ui_widget.c | 8 1 file changed, 8 insertions(+) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 15585ca731..c56990f8b3 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -1373,8 +1373,16 @@ _disabled_counter_get(Eo *widget) static void _mirror_disabled_state(Eo *obj, Elm_Widget_Smart_Data *pd, int disabled_delta) { + int prev_disabled = pd->disabled; + pd->disabled = (pd->parent_obj ? _disabled_counter_get(pd->parent_obj) : 0) + disabled_delta; + //The current disabled state is the same as the parent + //when the parent is assigned or changed, no further action is required. + if (((prev_disabled > 0 && pd->disabled > 0)) || + ((prev_disabled <= 0 && pd->disabled <= 0))) + return; + //we should not call disabled_set when things are invalidated //otherwise we will unleashe an amount of errors in efl_ui_layout if (efl_invalidated_get(obj)) return; --
[EGIT] [core/efl] master 01/01: elm_theme: Check the ref count to delete or unref.
jaehyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3cc9fc481caaae5fa941bff2f43d5f0f5d0bdb25 commit 3cc9fc481caaae5fa941bff2f43d5f0f5d0bdb25 Author: Woochanlee Date: Thu Apr 25 21:24:42 2019 +0900 elm_theme: Check the ref count to delete or unref. Summary: In case of the ref count bigger than 1. That means the eo_theme ref count is 2. In that case we need to call efl_unref when theme freed. other case we can delete eo_theme. @fix Reviewers: Jaehyun_Cho, woohyun, Hermet Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8714 --- src/lib/elementary/elm_theme.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c index 538b6fa8e4..62397d1c09 100644 --- a/src/lib/elementary/elm_theme.c +++ b/src/lib/elementary/elm_theme.c @@ -533,7 +533,10 @@ elm_theme_free(Elm_Theme *th) /* Destructs theme object and theme is deallocated in * _elm_theme_free_internal() in theme object desctructor. */ - efl_unref(th->eo_theme); + if (efl_ref_count(th->eo_theme) > 1) + efl_unref(th->eo_theme); + else + efl_del(th->eo_theme); } static void --
[EGIT] [core/efl] efl-1.22 58/84: elm_theme: Check the ref count to delete or unref.
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=c3bc21bc24822bd5a41e84cfb9c7dbec90408e30 commit c3bc21bc24822bd5a41e84cfb9c7dbec90408e30 Author: Woochanlee Date: Thu Apr 25 21:24:42 2019 +0900 elm_theme: Check the ref count to delete or unref. Summary: In case of the ref count bigger than 1. That means the eo_theme ref count is 2. In that case we need to call efl_unref when theme freed. other case we can delete eo_theme. @fix Reviewers: Jaehyun_Cho, woohyun, Hermet Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8714 --- src/lib/elementary/elm_theme.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c index 538b6fa8e4..62397d1c09 100644 --- a/src/lib/elementary/elm_theme.c +++ b/src/lib/elementary/elm_theme.c @@ -533,7 +533,10 @@ elm_theme_free(Elm_Theme *th) /* Destructs theme object and theme is deallocated in * _elm_theme_free_internal() in theme object desctructor. */ - efl_unref(th->eo_theme); + if (efl_ref_count(th->eo_theme) > 1) + efl_unref(th->eo_theme); + else + efl_del(th->eo_theme); } static void --
[EGIT] [core/efl] master 03/03: evas_object_textblock: Fix binary search fail.
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fdfb781e22ba42855ce11b495bfa6145fb48b17a commit fdfb781e22ba42855ce11b495bfa6145fb48b17a Author: Woochanlee Date: Thu May 2 14:34:04 2019 + evas_object_textblock: Fix binary search fail. D8610 Makes API Testcase fault. "<" is never searching. @fix Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8803 --- src/lib/evas/canvas/evas_object_textblock.c | 4 +++- src/tests/evas/evas_test_textblock.c| 7 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 0913fd30b7..bb8deab1ce 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -1271,8 +1271,8 @@ static const Escape_Value escape_values_e_common_sorted[] = { ESCAPE_VALUE("&", "\x26"), ESCAPE_VALUE("'", "\x27"), ESCAPE_VALUE(">", "\x3e"), - ESCAPE_VALUE(""", "\x22"), ESCAPE_VALUE("<", "\x3c"), + ESCAPE_VALUE(""", "\x22"), }; /** @@ -8185,6 +8185,8 @@ _markup_get_text_utf8_append(Eina_Strbuf *sbuf, const char *text) eina_strbuf_append(sbuf, "&"); else if (ch == '"') eina_strbuf_append(sbuf, """); +else if (ch == '\'') + eina_strbuf_append(sbuf, "'"); else if (ch == _PARAGRAPH_SEPARATOR) eina_strbuf_append(sbuf, ""); else if (ch == _REPLACEMENT_CHAR) diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c index b82e7e4aaa..dc3f22d136 100644 --- a/src/tests/evas/evas_test_textblock.c +++ b/src/tests/evas/evas_test_textblock.c @@ -3241,6 +3241,13 @@ EFL_START_TEST(evas_textblock_text_getters) fail_if(strcmp(tmp2, "aa")); free(tmp2); free(tmp); + +tmp = evas_textblock_text_markup_to_utf8(NULL, "<align=center>hello</align>>"'"); +fail_if(strcmp(tmp, "hello>\"\'")); +tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); +fail_if(strcmp(tmp2, "<align=center>hello</align>>"'")); +free(tmp2); +free(tmp); } /* complex markup set/get */ --
[EGIT] [core/efl] master 01/01: ecore_wl2: Add APIs to get window properies.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6162914be59354a5113f9b6d81a9c0f51fe8a1c5 commit 6162914be59354a5113f9b6d81a9c0f51fe8a1c5 Author: Woochanlee Date: Mon Dec 2 08:50:23 2019 -0500 ecore_wl2: Add APIs to get window properies. Summary: Creates APIs to get property. Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10743 --- src/lib/ecore_wl2/Ecore_Wl2.h| 44 src/lib/ecore_wl2/ecore_wl2_window.c | 34 2 files changed, 78 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 6f8f9dcd54..acca6d5f74 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -820,6 +820,13 @@ EAPI int ecore_wl2_window_surface_id_get(Ecore_Wl2_Window *window); */ EAPI void ecore_wl2_window_aspect_set(Ecore_Wl2_Window *window, int w, int h, unsigned int aspect); +/** + * @see evas_object_size_hint_aspect_get + * @ingroup Ecore_Wl2_Window_Group + * @since 1.24 + */ +EAPI void ecore_wl2_window_aspect_get(Ecore_Wl2_Window *window, int *w, int *h, unsigned int *aspect); + /** * Show a given Ecore_Wl2_Window * @@ -1008,6 +1015,18 @@ EAPI void ecore_wl2_window_rotation_set(Ecore_Wl2_Window *window, int rotation); */ EAPI void ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title); +/** + * Get the title of a given window + * + * @param window The window to set the title of + * + * @return A string if found, or NULL otherwise + * + * @ingroup Ecore_Wl2_Window_Group + * @since 1.24 + */ +EAPI const char *ecore_wl2_window_title_get(Ecore_Wl2_Window *window); + /** * Set the class of a given window * @@ -1019,6 +1038,19 @@ EAPI void ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title */ EAPI void ecore_wl2_window_class_set(Ecore_Wl2_Window *window, const char *clas); + +/** + * Get the class of a given window + * + * @param window The window to set the class of + * + * @return A string if found, or NULL otherwise + * + * @ingroup Ecore_Wl2_Window_Group + * @since 1.24 + */ +EAPI const char *ecore_wl2_window_class_get(Ecore_Wl2_Window *window); + /** * Get the geometry of a given window * @@ -1337,6 +1369,18 @@ EAPI Eina_Bool ecore_wl2_window_focus_skip_get(Ecore_Wl2_Window *window); */ EAPI void ecore_wl2_window_role_set(Ecore_Wl2_Window *window, const char *role); +/** + * Get the role of a given window + * + * @param window The window to set the class role + * + * @return A string if found, or NULL otherwise + * + * @ingroup Ecore_Wl2_Window_Group + * @since 1.24 + */ +EAPI const char *ecore_wl2_window_role_get(Ecore_Wl2_Window *window); + /** * Set if a given window is in floating mode * diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index d31dcafeb0..0085354d11 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1017,6 +1017,14 @@ ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title) ecore_wl2_display_flush(window->display); } +EAPI const char * +ecore_wl2_window_title_get(Ecore_Wl2_Window *window) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL); + + return window->title ? window->title : NULL; +} + EAPI void ecore_wl2_window_class_set(Ecore_Wl2_Window *window, const char *clas) { @@ -1033,6 +1041,14 @@ ecore_wl2_window_class_set(Ecore_Wl2_Window *window, const char *clas) ecore_wl2_display_flush(window->display); } +EAPI const char * +ecore_wl2_window_class_get(Ecore_Wl2_Window *window) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL); + + return window->class ? window->class : NULL; +} + EAPI void ecore_wl2_window_geometry_get(Ecore_Wl2_Window *window, int *x, int *y, int *w, int *h) { @@ -1367,6 +1383,14 @@ ecore_wl2_window_role_set(Ecore_Wl2_Window *window, const char *role) eina_stringshare_replace(&window->role, role); } +EAPI const char * +ecore_wl2_window_role_get(Ecore_Wl2_Window *window) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL); + + return window->role ? window->role : NULL; +} + EAPI void ecore_wl2_window_floating_mode_set(Ecore_Wl2_Window *window, Eina_Bool floating) { @@ -1403,6 +1427,16 @@ ecore_wl2_window_aspect_set(Ecore_Wl2_Window *window, int w, int h, unsigned int ecore_wl2_display_flush(window->display); } +EAPI void +ecore_wl2_window_aspect_get(Ecore_Wl2_Window *window, int *w, int *h, unsigned int *aspect) +{ + EINA_SAFETY_ON_NULL_RETURN(window); + + if (w) *w = window->aspect.w; + if (h) *h = window->aspect.h; + if (aspect) *aspect = window->aspect.aspect; +} + EAPI void ecore_wl2_window_weight_set(Ecore_Wl2_Window *window, double w, double h) { --
[EGIT] [core/efl] master 01/01: tests/ecore_wl2: Add test for ecore_wl2_window_aspect functions
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=12cb64cfadb7e1643f887bf0c0c32c9d47cd27df commit 12cb64cfadb7e1643f887bf0c0c32c9d47cd27df Author: Woochanlee Date: Mon Dec 2 08:51:49 2019 -0500 tests/ecore_wl2: Add test for ecore_wl2_window_aspect functions Summary: tests/ecore_wl2: Add test for ecore_wl2_window_aspect functions ref T8016 ref D10743 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D10747 --- src/tests/ecore_wl2/ecore_wl2_test_window.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c index e7d207639f..4641716a31 100644 --- a/src/tests/ecore_wl2/ecore_wl2_test_window.c +++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c @@ -335,15 +335,31 @@ EFL_START_TEST(wl2_window_activated) Ecore_Wl2_Window *win; Eina_Bool ret; + ret = ecore_wl2_window_activated_get(win); + + fail_if(ret != EINA_TRUE); +} +EFL_END_TEST + +EFL_START_TEST(wl2_window_aspect) +{ + Ecore_Wl2_Display *disp; + Ecore_Wl2_Window *win; + int w, h; + unsigned int aspect; + disp = _display_connect(); ck_assert(disp != NULL); win = _window_create(disp); ck_assert(win != NULL); - ret = ecore_wl2_window_activated_get(win); + ecore_wl2_window_aspect_set(win, 1, 1, 3); + ecore_wl2_window_aspect_get(win, &w, &h, &aspect); - fail_if(ret != EINA_TRUE); + fail_if(w != 1); + fail_if(h != 1); + fail_if(aspect != 3); } EFL_END_TEST @@ -362,7 +378,6 @@ EFL_START_TEST(wl2_window_available_rotation) win = _window_create(disp); ck_assert(win != NULL); - ecore_wl2_window_available_rotations_set(win, rots, 2); ret = ecore_wl2_window_available_rotations_get(win, &ret_rots, &ret_count); @@ -399,5 +414,6 @@ ecore_wl2_test_window(TCase *tc) tcase_add_test(tc, wl2_window_type); tcase_add_test(tc, wl2_window_activated); tcase_add_test(tc, wl2_window_available_rotation); +tcase_add_test(tc, wl2_window_aspect); } } --
[EGIT] [core/efl] master 01/01: gesture_manager: Changed function param to reduce internal function calls.
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fc456d2b77b00b33f6904f882cae69763b59f192 commit fc456d2b77b00b33f6904f882cae69763b59f192 Author: Woochanlee Date: Tue Dec 3 07:14:29 2019 + gesture_manager: Changed function param to reduce internal function calls. The filter_event function calling a lot of times when it runs. This can help performance by reducing the number of calls to the efl_data_scope_get() function. Reviewed-by: Hermet Park Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D10437 --- src/lib/evas/canvas/evas_callbacks.c | 16 +++- src/lib/evas/canvas/evas_main.c| 1 + src/lib/evas/gesture/efl_canvas_gesture_manager.c | 9 +++-- src/lib/evas/gesture/efl_canvas_gesture_manager.eo | 2 ++ src/lib/evas/gesture/efl_canvas_gesture_touch.c| 9 +++-- src/lib/evas/gesture/efl_canvas_gesture_touch.eo | 5 + src/lib/evas/include/evas_private.h| 4 ++-- 7 files changed, 19 insertions(+), 27 deletions(-) diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c index d19ce686da..d9aac154f8 100644 --- a/src/lib/evas/canvas/evas_callbacks.c +++ b/src/lib/evas/canvas/evas_callbacks.c @@ -393,7 +393,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data type == EVAS_CALLBACK_MULTI_DOWN || type == EVAS_CALLBACK_MOUSE_UP || type == EVAS_CALLBACK_MULTI_UP) - _efl_canvas_gesture_manager_filter_event(e->gesture_manager, eo_obj, event_info); + _efl_canvas_gesture_manager_filter_event(e->gmd, eo_obj, event_info); if (obj->is_smart) _evas_object_smart_callback_call_internal(eo_obj, efl_event_desc); @@ -817,17 +817,12 @@ void evas_object_callbacks_event_catcher_add(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, const Efl_Callback_Array_Item *array) { Evas_Callback_Type type = EVAS_CALLBACK_LAST; - void *gd = NULL; int i; for (i = 0; array[i].desc != NULL; i++) { if (obj->layer && obj->layer->evas && obj->layer->evas->gesture_manager) - { - if (!gd) gd = _efl_canvas_gesture_manager_private_data_get(obj->layer->evas->gesture_manager); - - _efl_canvas_gesture_manager_callback_add_hook(gd, obj->object, array[i].desc); - } + _efl_canvas_gesture_manager_callback_add_hook(obj->layer->evas->gmd, obj->object, array[i].desc); if (array[i].desc == EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK) { @@ -855,7 +850,6 @@ evas_object_callbacks_event_catcher_add(Eo *eo_obj EINA_UNUSED, Evas_Object_Prot void evas_object_callbacks_event_catcher_del(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, const Efl_Callback_Array_Item *array) { - void *gd = NULL; int i; if (!obj->layer || @@ -865,11 +859,7 @@ evas_object_callbacks_event_catcher_del(Eo *eo_obj EINA_UNUSED, Evas_Object_Prot for (i = 0; array[i].desc != NULL; i++) { if (obj->layer->evas->gesture_manager) - { - if (!gd) gd = _efl_canvas_gesture_manager_private_data_get(obj->layer->evas->gesture_manager); - - _efl_canvas_gesture_manager_callback_del_hook(gd, obj->object, array[i].desc); - } + _efl_canvas_gesture_manager_callback_del_hook(obj->layer->evas->gmd, obj->object, array[i].desc); if (array[i].desc == EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK) { diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index 6d4c07c95e..86a7881473 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c @@ -312,6 +312,7 @@ _evas_canvas_efl_object_constructor(Eo *eo_obj, Evas_Public_Data *e) eina_clist_init(&e->calc_done); efl_wref_add(efl_add(EFL_CANVAS_GESTURE_MANAGER_CLASS, eo_obj), &e->gesture_manager); + e->gmd = efl_data_scope_get(e->gesture_manager, EFL_CANVAS_GESTURE_MANAGER_CLASS); #define EVAS_ARRAY_SET(E, Array) \ eina_array_step_set(&E->Array, sizeof (E->Array), \ diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c index 2d821b5770..d5103186e1 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c @@ -153,19 +153,17 @@ _efl_canvas_gesture_manager_callback_del_hook(void *data, Eo *target, const Efl_ } void -_efl_canvas_gesture_manager_filter_event(Eo *obj, Eo *target, void *event) +_efl_canvas_gesture_manager_filter_event(void *data, Eo *target, void *event) { + Efl_Canvas_Gesture_Manager_Data *pd = data; Eina_List *l, *gesture_context; - Efl_Canvas_Gesture_Manager_Da
[EGIT] [core/efl] master 02/02: tests/ecore_wl2: Add test for ecore_wl2_window_title functions
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7d40e03ca701d8f4476c62b7aa42557786eb96b5 commit 7d40e03ca701d8f4476c62b7aa42557786eb96b5 Author: Woochanlee Date: Tue Dec 3 10:59:12 2019 -0500 tests/ecore_wl2: Add test for ecore_wl2_window_title functions Summary: tests/ecore_wl2: Add test for ecore_wl2_window_title functions ref T8016 ref D10743 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D10761 --- src/tests/ecore_wl2/ecore_wl2_test_window.c | 20 1 file changed, 20 insertions(+) diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c index 1db3078965..91c31f1a76 100644 --- a/src/tests/ecore_wl2/ecore_wl2_test_window.c +++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c @@ -369,6 +369,25 @@ EFL_START_TEST(wl2_window_aspect) } EFL_END_TEST +EFL_START_TEST(wl2_window_title) +{ + Ecore_Wl2_Display *disp; + Ecore_Wl2_Window *win; + const char *title; + + disp = _display_connect(); + ck_assert(disp != NULL); + + win = _window_create(disp); + ck_assert(win != NULL); + + ecore_wl2_window_title_set(win, "TEST"); + title = ecore_wl2_window_title_get(win); + + fail_if(strcmp(title, "TEST")); +} +EFL_END_TEST + EFL_START_TEST(wl2_window_class) { Ecore_Wl2_Display *disp; @@ -441,5 +460,6 @@ ecore_wl2_test_window(TCase *tc) tcase_add_test(tc, wl2_window_available_rotation); tcase_add_test(tc, wl2_window_aspect); tcase_add_test(tc, wl2_window_class); +tcase_add_test(tc, wl2_window_title); } } --
[EGIT] [core/efl] master 01/02: tests/ecore_wl2: Add test for ecore_wl2_window_class functions
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0bfdc94df82f416aebb1c151c01c336e28b02bfc commit 0bfdc94df82f416aebb1c151c01c336e28b02bfc Author: Woochanlee Date: Tue Dec 3 10:49:37 2019 -0500 tests/ecore_wl2: Add test for ecore_wl2_window_class functions Summary: tests/ecore_wl2: Add test for ecore_wl2_window_class functions ref T8016 ref D10743 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D10759 --- src/tests/ecore_wl2/ecore_wl2_test_window.c | 20 1 file changed, 20 insertions(+) diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c index e678ac4954..1db3078965 100644 --- a/src/tests/ecore_wl2/ecore_wl2_test_window.c +++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c @@ -369,6 +369,25 @@ EFL_START_TEST(wl2_window_aspect) } EFL_END_TEST +EFL_START_TEST(wl2_window_class) +{ + Ecore_Wl2_Display *disp; + Ecore_Wl2_Window *win; + const char *class; + + disp = _display_connect(); + ck_assert(disp != NULL); + + win = _window_create(disp); + ck_assert(win != NULL); + + ecore_wl2_window_class_set(win, "TEST"); + class = ecore_wl2_window_class_get(win); + + fail_if(strcmp(class, "TEST")); +} +EFL_END_TEST + EFL_START_TEST(wl2_window_available_rotation) { Ecore_Wl2_Display *disp; @@ -421,5 +440,6 @@ ecore_wl2_test_window(TCase *tc) tcase_add_test(tc, wl2_window_activated); tcase_add_test(tc, wl2_window_available_rotation); tcase_add_test(tc, wl2_window_aspect); +tcase_add_test(tc, wl2_window_class); } } --
[EGIT] [core/efl] master 01/01: tests/ecore_wl2: Add test for ecore_wl2_window_role functions
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=431f3b1fcef2b49b4c43539c51ad50fcd99a55bd commit 431f3b1fcef2b49b4c43539c51ad50fcd99a55bd Author: Woochanlee Date: Mon Dec 9 07:57:31 2019 -0500 tests/ecore_wl2: Add test for ecore_wl2_window_role functions Summary: tests/ecore_wl2: Add test for ecore_wl2_window_class functions ref T8016 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D10829 --- src/tests/ecore_wl2/ecore_wl2_test_window.c | 20 1 file changed, 20 insertions(+) diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c index 91c31f1a76..c392475d24 100644 --- a/src/tests/ecore_wl2/ecore_wl2_test_window.c +++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c @@ -433,6 +433,25 @@ EFL_START_TEST(wl2_window_available_rotation) } EFL_END_TEST +EFL_START_TEST(wl2_window_role) +{ + Ecore_Wl2_Display *disp; + Ecore_Wl2_Window *win; + const char *role; + + disp = _display_connect(); + ck_assert(disp != NULL); + + win = _window_create(disp); + ck_assert(win != NULL); + + ecore_wl2_window_role_set(win, "TEST"); + role = ecore_wl2_window_role_get(win); + + fail_if(strcmp(role, "TEST")); +} +EFL_END_TEST + void ecore_wl2_test_window(TCase *tc) { @@ -461,5 +480,6 @@ ecore_wl2_test_window(TCase *tc) tcase_add_test(tc, wl2_window_aspect); tcase_add_test(tc, wl2_window_class); tcase_add_test(tc, wl2_window_title); +tcase_add_test(tc, wl2_window_role); } } --
[EGIT] [core/efl] master 01/01: edje_entry: Fix resource leak.
jaehyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6830414e95652cff4f00d79cbbc9684186081508 commit 6830414e95652cff4f00d79cbbc9684186081508 Author: Woochanlee Date: Wed Dec 11 15:49:44 2019 +0900 edje_entry: Fix resource leak. Reviewers: Jaehyun_Cho, Hermet, ali.alzyod Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10854 --- src/lib/edje/edje_entry.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index e87576b4ac..14696182d1 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -4750,6 +4750,7 @@ _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx EINA_ } *itr = 0; + free(plain_text); plain_text = strdup(u_text); free(u_text); u_text = NULL; --
[EGIT] [core/efl] master 01/01: eina_rbtree: Clean array intead of flush.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0902bb4e013d3aed7432747357e6c3b97e40ab15 commit 0902bb4e013d3aed7432747357e6c3b97e40ab15 Author: Woochanlee Date: Wed Dec 11 10:13:39 2019 + eina_rbtree: Clean array intead of flush. It doesn't have to flush all of the time when it iterating. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10858 --- src/lib/eina/eina_rbtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_rbtree.c b/src/lib/eina/eina_rbtree.c index 8c074a42eb..b7373c7fbe 100644 --- a/src/lib/eina/eina_rbtree.c +++ b/src/lib/eina/eina_rbtree.c @@ -131,7 +131,7 @@ _eina_rbtree_iterator_free(Eina_Iterator_Rbtree *it) free(item); } - eina_array_flush(it->stack); + eina_array_clean(it->stack); eina_spinlock_take(&iterator_trash_lock); eina_array_push(&iterator_trash, it); --
[EGIT] [core/efl] master 01/01: eina_hash: Move hash_free_cb to avoid memory leak.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a2084ba22eb78c98ae3da416f32c88dc275f4808 commit a2084ba22eb78c98ae3da416f32c88dc275f4808 Author: Woochanlee Date: Thu Dec 19 09:43:36 2019 + eina_hash: Move hash_free_cb to avoid memory leak. Call hash_free_cb after finish deletion. ref T8530 Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10918 --- src/lib/eina/eina_hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/eina/eina_hash.c b/src/lib/eina/eina_hash.c index 64d298b513..d313e57d60 100644 --- a/src/lib/eina/eina_hash.c +++ b/src/lib/eina/eina_hash.c @@ -410,7 +410,6 @@ _eina_hash_del_by_hash_el(Eina_Hash *hash, hash_element), EINA_RBTREE_CMP_NODE_CB( _eina_hash_key_rbtree_cmp_node), (const void *)hash->key_cmp_cb); - _eina_hash_el_free(hash_element, hash); if (!hash_head->head) { @@ -431,6 +430,8 @@ _eina_hash_del_by_hash_el(Eina_Hash *hash, hash->buckets = NULL; } + _eina_hash_el_free(hash_element, hash); + return EINA_TRUE; } --
[EGIT] [core/efl] master 01/01: edje_load: Delete wrong free callback set for hash.
zmike pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8f5f63cafa9171f1e6582aa7ad080bfc86f6805e commit 8f5f63cafa9171f1e6582aa7ad080bfc86f6805e Author: Woochanlee Date: Tue Jan 7 10:13:04 2020 -0500 edje_load: Delete wrong free callback set for hash. Summary: This hash free callback already sets in the creating time. Invalid free callback is being called additionally. Therefore, the existing callback(_edje_user_definition_list_free_internal) could not be called, and a memory leak is occurring. Reviewers: zmike, cedric Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11030 --- src/lib/edje/edje_load.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c index 0e74db9fca..ed72971d1d 100644 --- a/src/lib/edje/edje_load.c +++ b/src/lib/edje/edje_load.c @@ -1542,8 +1542,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch Eina_List *l, *ll; it = eina_hash_iterator_data_new(collect); - /* the eud structs get manually freed below */ - eina_hash_free_cb_set(collect, (void*)eina_list_free); EINA_ITERATOR_FOREACH(it, l) { EINA_LIST_FOREACH(l, ll, eud) --
[EGIT] [core/efl] master 01/01: tests/ecore_wl2: Add test for ecore_wl2_window_xxx functions
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4ea865623df83b78830dc253bcddd7e64a7810ca commit 4ea865623df83b78830dc253bcddd7e64a7810ca Author: Woochanlee Date: Wed Jan 8 07:59:11 2020 -0500 tests/ecore_wl2: Add test for ecore_wl2_window_xxx functions Summary: Add below APIs. ecore_wl2_window_commit ecore_wl2_window_frame_callback_add, del ecore_wl2_window_free ecore_wl2_window_hide ecore_wl2_window_shell_surface_exists ecore_wl2_window_show ecore_wl2_window_update_begin + Fix ecore_wl2_activated_get() ref T8016 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D11007 --- src/tests/ecore_wl2/ecore_wl2_test_window.c | 508 +++- src/tests/ecore_wl2/meson.build | 10 +- 2 files changed, 501 insertions(+), 17 deletions(-) diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c index bb329195ef..66b76a3eb9 100644 --- a/src/tests/ecore_wl2/ecore_wl2_test_window.c +++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c @@ -7,26 +7,92 @@ #include #include #include +#include + +#ifdef GL_GLES +#include +#include +#endif #include "ecore_wl2_suite.h" +#define WIDTH 480 +#define HEIGHT 360 + +typedef struct _Test_Data { + Ecore_Wl2_Display *display; + Ecore_Wl2_Window *win; + Ecore_Wl2_Frame_Cb_Handle *frame_callback_handler; + Ecore_Event_Handler *handler; + + struct wl_surface *surface; + struct wl_egl_window *egl_window; + + int width; + int height; + int frame_callback_count; + +#ifdef GL_GLES + EGLDisplay egl_display; + EGLConfig egl_conf; + EGLSurface egl_surface; + EGLContext egl_context; +#endif +} Test_Data; + static Ecore_Wl2_Display * _display_connect(void) { - Ecore_Wl2_Display *disp; - - disp = ecore_wl2_display_connect(NULL); - return disp; + return ecore_wl2_display_connect(NULL); } static Ecore_Wl2_Window * _window_create(Ecore_Wl2_Display *disp) { - Ecore_Wl2_Window *win; + return ecore_wl2_window_new(disp, NULL, 100, 100, WIDTH, HEIGHT); +} - win = ecore_wl2_window_new(disp, NULL, 100, 100, 500, 500); - return win; +static struct wl_surface * +_surface_get(Ecore_Wl2_Window *win) +{ + return ecore_wl2_window_surface_get(win); +} + +#ifdef GL_GLES +static void +_init_egl(Test_Data *td) +{ + eglBindAPI(EGL_OPENGL_API); + EGLint num_config; + + EGLint attributes[] = { +EGL_RED_SIZE, 8, +EGL_GREEN_SIZE, 8, +EGL_BLUE_SIZE, 8, +EGL_NONE + }; + + td->egl_display = eglGetDisplay((EGLNativeDisplayType)ecore_wl2_display_get(td->display)); + eglInitialize(td->egl_display, NULL, NULL); + eglChooseConfig(td->egl_display, attributes, &td->egl_conf, 1, &num_config); + td->egl_context = eglCreateContext(td->egl_display, td->egl_conf, EGL_NO_CONTEXT, NULL); + + td->egl_window = wl_egl_window_create(td->surface, td->width, td->height); + td->egl_surface = eglCreateWindowSurface(td->egl_display, +td->egl_conf, td->egl_window, NULL); + + eglMakeCurrent(td->egl_display, td->egl_surface, td->egl_surface, td->egl_context); +} + +static void +_term_egl(Test_Data *td) +{ + eglDestroySurface(td->egl_display, td->egl_surface); + wl_egl_window_destroy(td->egl_window); + eglDestroyContext(td->egl_display, td->egl_context); + eglTerminate(td->egl_display); } +#endif EFL_START_TEST(wl2_window_new) { @@ -329,23 +395,93 @@ EFL_START_TEST(wl2_window_type) } EFL_END_TEST +#ifdef GL_GLES +static void +_test_activated_frame_cb(Ecore_Wl2_Window *win EINA_UNUSED, uint32_t timestamp EINA_UNUSED, void *data) +{ + Test_Data *td = data; + + td->frame_callback_count++; + if (td->frame_callback_count % 4 == 0) + glClearColor(0.0, 1.0, 0.0, 0.0); + else if (td->frame_callback_count % 4 == 1) + glClearColor(0.0, 0.0, 1.0, 0.0); + else if (td->frame_callback_count % 4 == 2) + glClearColor(0.0, 0.0, 0.0, 1.0); + else + glClearColor(1.0, 0.0, 0.0, 0.0); + glClear(GL_COLOR_BUFFER_BIT); + glFlush(); + + eglSwapBuffers(td->egl_display, td->egl_surface); + + ecore_wl2_window_commit(td->win, EINA_TRUE); +} + +static Eina_Bool +_test_activated_configure_complete(void *data, int type EINA_UNUSED, void *event EINA_UNUSED) +{ + Test_Data *td = data; + + td->frame_callback_handler = ecore_wl2_window_frame_callback_add(td->win, _test_activated_frame_cb, td); + ecore_wl2_window_commit(td->win, EINA_TRUE); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_test_activated_window_activate(void *data EINA_UNUSED, in
[EGIT] [core/efl] master 02/02: ecore_wl2: Move ecore_wl2_window_iconified, ecore_wl2_window_pending_get functions to be internal
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=52fa6aa1b5cacebab9d7db2fd4c532bcd7f1 commit 52fa6aa1b5cacebab9d7db2fd4c532bcd7f1 Author: Woochanlee Date: Wed Jan 8 08:00:25 2020 -0500 ecore_wl2: Move ecore_wl2_window_iconified, ecore_wl2_window_pending_get functions to be internal Summary: This iconified state doesn't match the compositor's. pending is only works for user manual buffer render case. So, no need for it to be a public. ref T8016 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D11039 --- src/lib/ecore_wl2/Ecore_Wl2.h | 25 - src/lib/ecore_wl2/ecore_wl2_internal.h | 25 + 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index d6dfaf1d28..c7105500b1 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1115,17 +1115,6 @@ EAPI void ecore_wl2_window_geometry_get(Ecore_Wl2_Window *window, int *x, int *y */ EAPI void ecore_wl2_window_geometry_set(Ecore_Wl2_Window *window, int x, int y, int w, int h); -/** - * Iconify a window - * - * @param win The window to iconifiy - * @param iconified The new iconified state to set - * - * @ingroup Ecore_Wl2_Window_Group - * @since 1.17 - */ -EAPI void ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool iconified); - /** * Set the type of a given window * @@ -2043,20 +2032,6 @@ EAPI void ecore_wl2_session_recovery_disable(void); */ EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush); -/** - * Check if a wayland window's surface is in the pending state. - * - * A surface is pending if it's been commit but we haven't received a - * frame callback for it yet. This mean's we're not ready to draw yet. - * - * @param window The window whose surface we want to check - * - * @return whether the window's surface is pending or not. - * - * @since 1.21 - */ -EAPI Eina_Bool ecore_wl2_window_pending_get(Ecore_Wl2_Window *window); - /** * Add a callback that fires when the window's surface_frame callback fires * diff --git a/src/lib/ecore_wl2/ecore_wl2_internal.h b/src/lib/ecore_wl2/ecore_wl2_internal.h index 2b6a965b10..cda98d6459 100644 --- a/src/lib/ecore_wl2/ecore_wl2_internal.h +++ b/src/lib/ecore_wl2/ecore_wl2_internal.h @@ -100,6 +100,31 @@ EAPI void ecore_wl2_window_buffer_attach(Ecore_Wl2_Window *win, void *buffer, in */ EAPI void ecore_wl2_window_buffer_transform_set(Ecore_Wl2_Window *window, int transform); +/** + * Iconify a window + * + * @param win The window to iconifiy + * @param iconified The new iconified state to set + * + * @ingroup Ecore_Wl2_Window_Group + * @since 1.17 + */ +EAPI void ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool iconified); + +/** + * Check if a wayland window's surface is in the pending state. + * + * A surface is pending if it's been commit but we haven't received a + * frame callback for it yet. This mean's we're not ready to draw yet. + * + * @param window The window whose surface we want to check + * + * @return whether the window's surface is pending or not. + * + * @since 1.21 + */ +EAPI Eina_Bool ecore_wl2_window_pending_get(Ecore_Wl2_Window *window); + # undef EAPI # define EAPI --
[EGIT] [core/efl] master 01/02: ecore_wl2: Add APIs to get window property.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=926cbb98af4757af991e55f7d4f4cd35195a5ff4 commit 926cbb98af4757af991e55f7d4f4cd35195a5ff4 Author: Woochanlee Date: Wed Jan 8 07:59:53 2020 -0500 ecore_wl2: Add APIs to get window property. Summary: Creates APIs to get property. +ecore_wl2_window_popup_input_get +ecore_wl2_window_input_region_get +ecore_wl2_window_opaque_region_get ref T8016 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D11038 --- src/lib/ecore_wl2/Ecore_Wl2.h| 40 src/lib/ecore_wl2/ecore_wl2_window.c | 30 +++ 2 files changed, 70 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 0631a5fe6d..d6dfaf1d28 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -917,6 +917,20 @@ EAPI void ecore_wl2_window_alpha_set(Ecore_Wl2_Window *window, Eina_Bool alpha); */ EAPI void ecore_wl2_window_opaque_region_set(Ecore_Wl2_Window *window, int x, int y, int w, int h); +/** + * Get the opaque region of the Ecore_Wl2_Window + * + * @param win The window + * @param x The left point of the region. + * @param y The top point of the region. + * @param w The width of the region. + * @param h The height of the region. + * + * @ingroup Ecore_Wl2_Window_Group + * @since 1.24 + */ +EAPI void ecore_wl2_window_opaque_region_get(Ecore_Wl2_Window *window, int *x, int *y, int *w, int *h); + /** * Set the input region of the Ecore_Wl2_Window. * @@ -935,6 +949,20 @@ EAPI void ecore_wl2_window_opaque_region_set(Ecore_Wl2_Window *window, int x, in */ EAPI void ecore_wl2_window_input_region_set(Ecore_Wl2_Window *window, int x, int y, int w, int h); +/** + * Get the input region of the Ecore_Wl2_Window. + * + * @param window The window to set the input region of + * @param x The left point of the region. + * @param y The top point of the region. + * @param w The width of the region. + * @param h The height of the region. + * + * @ingroup Ecore_Wl2_Window_Group + * @since 1.24 + */ +EAPI void ecore_wl2_window_input_region_get(Ecore_Wl2_Window *window, int *x, int *y, int *w, int *h); + /** * Get if a given window is maximized * @@ -1300,6 +1328,18 @@ EAPI Eina_Bool ecore_wl2_window_activated_get(const Ecore_Wl2_Window *window); */ EAPI void ecore_wl2_window_popup_input_set(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input); +/** + * @brief Get the seat for a popup window to be used with grab + * + * @param window The window + * + * @return Returns Ecore_Wl2_Input if the window has an input. + * + * @ingroup Ecore_Wl2_Window_Group + * @since 1.24 + */ +EAPI Ecore_Wl2_Input *ecore_wl2_window_popup_input_get(Ecore_Wl2_Window *window); + /** * Check if a window has a shell surface - without one it can't be visible. * diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 0085354d11..21c01c5a70 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -844,6 +844,17 @@ ecore_wl2_window_opaque_region_set(Ecore_Wl2_Window *window, int x, int y, int w window->pending.opaque = EINA_TRUE; } +EAPI void +ecore_wl2_window_opaque_region_get(Ecore_Wl2_Window *window, int *x, int *y, int *w, int *h) +{ + EINA_SAFETY_ON_NULL_RETURN(window); + + if (x) *x = window->opaque.x; + if (y) *y = window->opaque.y; + if (w) *w = window->opaque.w; + if (h) *h = window->opaque.h; +} + EAPI void ecore_wl2_window_input_region_set(Ecore_Wl2_Window *window, int x, int y, int w, int h) { @@ -893,6 +904,17 @@ ecore_wl2_window_input_region_set(Ecore_Wl2_Window *window, int x, int y, int w, window->pending.input = EINA_TRUE; } +EAPI void +ecore_wl2_window_input_region_get(Ecore_Wl2_Window *window, int *x, int *y, int *w, int *h) +{ + EINA_SAFETY_ON_NULL_RETURN(window); + + if (x) *x = window->input_rect.x; + if (y) *y = window->input_rect.y; + if (w) *w = window->input_rect.w; + if (h) *h = window->input_rect.h; +} + EAPI Eina_Bool ecore_wl2_window_maximized_get(Ecore_Wl2_Window *window) { @@ -1117,6 +1139,14 @@ ecore_wl2_window_popup_input_set(Ecore_Wl2_Window *window, Ecore_Wl2_Input *inpu window->grab = input; } +EAPI Ecore_Wl2_Input * +ecore_wl2_window_popup_input_get(Ecore_Wl2_Window *window) +{ + EINA_SAFETY_ON_NULL_RETURN(window); + + return window->grab; +} + EAPI Ecore_Wl2_Display * ecore_wl2_window_display_get(const Ecore_Wl2_Window *window) { --
[EGIT] [core/efl] master 01/01: tests/ecore_wl2: Add test for ecore_wl2_window_xxx functions
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2010c2ce132a4638f062a00b301c23bc41192b77 commit 2010c2ce132a4638f062a00b301c23bc41192b77 Author: Woochanlee Date: Tue Jan 14 08:24:22 2020 -0500 tests/ecore_wl2: Add test for ecore_wl2_window_xxx functions Summary: Add below APIs. ecore_wl2_window_commit ecore_wl2_window_frame_callback_add, del ecore_wl2_window_free ecore_wl2_window_hide ecore_wl2_window_shell_surface_exists ecore_wl2_window_show ecore_wl2_window_update_begin + Fix ecore_wl2_activated_get() ref T8016 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D11007 --- src/tests/ecore_wl2/ecore_wl2_test_window.c | 496 +++- src/tests/ecore_wl2/meson.build | 10 +- 2 files changed, 504 insertions(+), 2 deletions(-) diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c index ca843730af..86ff1145c3 100644 --- a/src/tests/ecore_wl2/ecore_wl2_test_window.c +++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c @@ -7,6 +7,12 @@ #include #include #include +#include + +#ifdef GL_GLES +#include +#include +#endif #include "ecore_wl2_suite.h" #include "ecore_wl2_tests_helpers.h" @@ -14,6 +20,27 @@ #define WIDTH 480 #define HEIGHT 360 +typedef struct _Test_Data { + Ecore_Wl2_Display *display; + Ecore_Wl2_Window *win; + Ecore_Wl2_Frame_Cb_Handle *frame_callback_handler; + Ecore_Event_Handler *handler; + + struct wl_surface *surface; + struct wl_egl_window *egl_window; + + int width; + int height; + int frame_callback_count; + +#ifdef GL_GLES + EGLDisplay egl_display; + EGLConfig egl_conf; + EGLSurface egl_surface; + EGLContext egl_context; +#endif +} Test_Data; + static Ecore_Wl2_Window * _window_create(Ecore_Wl2_Display *disp) { @@ -26,6 +53,42 @@ _surface_get(Ecore_Wl2_Window *win) return ecore_wl2_window_surface_get(win); } +#ifdef GL_GLES +static void +_init_egl(Test_Data *td) +{ + eglBindAPI(EGL_OPENGL_API); + EGLint num_config; + + EGLint attributes[] = { +EGL_RED_SIZE, 8, +EGL_GREEN_SIZE, 8, +EGL_BLUE_SIZE, 8, +EGL_NONE + }; + + td->egl_display = eglGetDisplay((EGLNativeDisplayType)ecore_wl2_display_get(td->display)); + eglInitialize(td->egl_display, NULL, NULL); + eglChooseConfig(td->egl_display, attributes, &td->egl_conf, 1, &num_config); + td->egl_context = eglCreateContext(td->egl_display, td->egl_conf, EGL_NO_CONTEXT, NULL); + + td->egl_window = wl_egl_window_create(td->surface, td->width, td->height); + td->egl_surface = eglCreateWindowSurface(td->egl_display, +td->egl_conf, td->egl_window, NULL); + + eglMakeCurrent(td->egl_display, td->egl_surface, td->egl_surface, td->egl_context); +} + +static void +_term_egl(Test_Data *td) +{ + eglDestroySurface(td->egl_display, td->egl_surface); + wl_egl_window_destroy(td->egl_window); + eglDestroyContext(td->egl_display, td->egl_context); + eglTerminate(td->egl_display); +} +#endif + EFL_START_TEST(wl2_window_new) { Ecore_Wl2_Display *disp; @@ -310,6 +373,94 @@ EFL_START_TEST(wl2_window_type) } EFL_END_TEST +#ifdef GL_GLES +static void +_test_activated_frame_cb(Ecore_Wl2_Window *win EINA_UNUSED, uint32_t timestamp EINA_UNUSED, void *data) +{ + Test_Data *td = data; + + td->frame_callback_count++; + if (td->frame_callback_count % 4 == 0) + glClearColor(0.0, 1.0, 0.0, 0.0); + else if (td->frame_callback_count % 4 == 1) + glClearColor(0.0, 0.0, 1.0, 0.0); + else if (td->frame_callback_count % 4 == 2) + glClearColor(0.0, 0.0, 0.0, 1.0); + else + glClearColor(1.0, 0.0, 0.0, 0.0); + glClear(GL_COLOR_BUFFER_BIT); + glFlush(); + + eglSwapBuffers(td->egl_display, td->egl_surface); + + ecore_wl2_window_commit(td->win, EINA_TRUE); +} + +static Eina_Bool +_test_activated_configure_complete(void *data, int type EINA_UNUSED, void *event EINA_UNUSED) +{ + Test_Data *td = data; + + td->frame_callback_handler = ecore_wl2_window_frame_callback_add(td->win, _test_activated_frame_cb, td); + ecore_wl2_window_commit(td->win, EINA_TRUE); + + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_test_activated_window_activate(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) +{ + //TC Pass + ecore_main_loop_quit(); + + return ECORE_CALLBACK_PASS_ON; +} + +EFL_START_TEST(wl2_window_activated) +{ + Test_Data *td; + + ecore_wl2_init(); + + td = calloc(1, sizeof(Test_Data)); + td->width = WIDTH; + td->height = HEIGHT; +
[EGIT] [core/efl] master 01/01: tests/ecore_wl2: Code clean up and Add, Modify TCs.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=87be474bb542a34ae69f0aa239b7f62e03661dd5 commit 87be474bb542a34ae69f0aa239b7f62e03661dd5 Author: Woochanlee Date: Tue Jan 21 08:13:52 2020 -0500 tests/ecore_wl2: Code clean up and Add, Modify TCs. Summary: Code clean up. Add flush, sync_is_done APIs. Modify input_find. ref T8016 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D1 --- src/tests/ecore_wl2/ecore_wl2_suite.c| 6 -- src/tests/ecore_wl2/ecore_wl2_suite.h| 12 ++- src/tests/ecore_wl2/ecore_wl2_test_display.c | 132 +++ src/tests/ecore_wl2/ecore_wl2_test_ecore_wl2.c | 11 -- src/tests/ecore_wl2/ecore_wl2_test_input.c | 52 ++--- src/tests/ecore_wl2/ecore_wl2_test_window.c | 81 +- src/tests/ecore_wl2/ecore_wl2_tests_helper_egl.h | 42 src/tests/ecore_wl2/ecore_wl2_tests_helpers.h| 38 ++- src/tests/ecore_wl2/meson.build | 1 + 9 files changed, 238 insertions(+), 137 deletions(-) diff --git a/src/tests/ecore_wl2/ecore_wl2_suite.c b/src/tests/ecore_wl2/ecore_wl2_suite.c index b6875c006d..90d16bea60 100644 --- a/src/tests/ecore_wl2/ecore_wl2_suite.c +++ b/src/tests/ecore_wl2/ecore_wl2_suite.c @@ -1,10 +1,4 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - #include "ecore_wl2_suite.h" -#include "../efl_check.h" -#include static const Efl_Test_Case etc[] = { diff --git a/src/tests/ecore_wl2/ecore_wl2_suite.h b/src/tests/ecore_wl2/ecore_wl2_suite.h index a8edf93074..b429bdbdbf 100644 --- a/src/tests/ecore_wl2/ecore_wl2_suite.h +++ b/src/tests/ecore_wl2/ecore_wl2_suite.h @@ -1,8 +1,16 @@ #ifndef _ECORE_WL2_SUITE_H # define _ECORE_WL2_SUITE_H -# include -# include "../efl_check.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "../efl_check.h" +#include +#include +#include +#include void ecore_wl2_test_init(TCase *tc); void ecore_wl2_test_display(TCase *tc); diff --git a/src/tests/ecore_wl2/ecore_wl2_test_display.c b/src/tests/ecore_wl2/ecore_wl2_test_display.c index fcc560311d..0ce4279fd4 100644 --- a/src/tests/ecore_wl2/ecore_wl2_test_display.c +++ b/src/tests/ecore_wl2/ecore_wl2_test_display.c @@ -1,13 +1,3 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include - #include "ecore_wl2_suite.h" #include "ecore_wl2_tests_helpers.h" @@ -183,21 +173,115 @@ EFL_START_TEST(wl2_display_compositor_version_get) } EFL_END_TEST -EFL_START_TEST(wl2_display_input_find_by_name) +Ecore_Wl2_Input *test_input; + +static Eina_Bool +_test_input_find_configure_complete(void *data, int type EINA_UNUSED, void *event EINA_UNUSED) +{ + Test_Data *td = data; + + /* NB: Enlightenment uses "seat0" here, but Weston uses "default" */ + if (getenv("E_START")) + test_input = ecore_wl2_display_input_find_by_name(td->display, "seat0"); + else + test_input = ecore_wl2_display_input_find_by_name(td->display, "default"); + + ck_assert(test_input != NULL); + test_input = NULL; + + if (getenv("E_START")) + { +test_input = ecore_wl2_display_input_find(td->display, 13); +ck_assert(test_input != NULL); + } + + ecore_main_loop_quit(); + + return ECORE_CALLBACK_PASS_ON; +} + +EFL_START_TEST(wl2_display_input_find) +{ + Test_Data *td; + + ecore_wl2_init(); + + td = calloc(1, sizeof(Test_Data)); + td->width = WIDTH; + td->height = HEIGHT; + + td->display = _display_connect(); + ck_assert(td->display != NULL); + + td->win = _window_create(td->display); + ck_assert(td->win != NULL); + + ecore_wl2_window_show(td->win); + + td->handler = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE, + _test_input_find_configure_complete, td); + + ecore_main_loop_begin(); + + ecore_wl2_shutdown(); + free(td); +} + +EFL_END_TEST + +EFL_START_TEST(wl2_display_flush) { Ecore_Wl2_Display *disp; - Ecore_Wl2_Input *input; disp = _display_connect(); ck_assert(disp != NULL); - /* NB: Enlightenment uses "seat0" here, but Weston uses "default" */ - if (getenv("E_START")) - input = ecore_wl2_display_input_find_by_name(disp, "seat0"); - else - input = ecore_wl2_display_input_find_by_name(disp, "default"); + //FIXME: Ambiguous way to check with code to make sure flushing was successful. + // We might think it's being verified by another TC that actually draws to the screen buffer ... +
[EGIT] [core/efl] master 02/05: ecore_wl2: Add ecore_wl2_input_default_input_get() API.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=46cfcf71903aea7422897eb66a2a5fa0c70f5bfa commit 46cfcf71903aea7422897eb66a2a5fa0c70f5bfa Author: Woochanlee Date: Wed Jan 22 07:37:23 2020 -0500 ecore_wl2: Add ecore_wl2_input_default_input_get() API. Summary: Gets default input which created by display. Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11132 --- src/lib/ecore_wl2/Ecore_Wl2.h | 25 + src/lib/ecore_wl2/ecore_wl2_input.c | 14 ++ 2 files changed, 39 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index eed6660c7e..294af10b5a 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1485,6 +1485,31 @@ EAPI Eina_Bool ecore_wl2_input_pointer_xy_get(const Ecore_Wl2_Input *input, int */ EAPI void ecore_wl2_input_pointer_set(Ecore_Wl2_Input *input, struct wl_surface *surface, int hot_x, int hot_y); +/** + * Set a specific cursor on a given seat + * + * @brief This function will try to find a matching cursor inside the existing + * cursor theme and set the pointer for the specified seat to be + * the specified cursor + * + * @param input The seat to set the cursor on + * @param cursor The name of the cursor to try and set + * + * @ingroup Ecore_Wl2_Input_Group + * @since 1.20 + */ +EAPI void ecore_wl2_input_cursor_from_name_set(Ecore_Wl2_Input *input, const char *cursor); + +/** + * Gets default input of a given display + * + * @param display The display + * + * @ingroup Ecore_Wl2_Input_Group + * @since 1.24 + */ +EAPI Ecore_Wl2_Input *ecore_wl2_input_default_input_get(const Ecore_Wl2_Display *ewd); + /** * @defgroup Ecore_Wl2_Output_Group Wayland Library Output Functions * @ingroup Ecore_Wl2_Group diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c index 92cc9a52bd..75a7366f82 100644 --- a/src/lib/ecore_wl2/ecore_wl2_input.c +++ b/src/lib/ecore_wl2/ecore_wl2_input.c @@ -1871,3 +1871,17 @@ ecore_wl2_input_pointer_xy_get(const Ecore_Wl2_Input *input, int *x, int *y) if (y) *y = input->pointer.sy; return EINA_TRUE; } + +EAPI Ecore_Wl2_Input * +ecore_wl2_input_default_input_get(const Ecore_Wl2_Display *ewd) +{ + Ecore_Wl2_Input *input; + + EINA_SAFETY_ON_NULL_RETURN_VAL(ewd, NULL); + EINA_SAFETY_ON_NULL_RETURN_VAL(ewd->inputs, NULL); + + input = ecore_wl2_display_input_find_by_name(ewd, "seat0"); + if (!input) input = ecore_wl2_display_input_find_by_name(ewd, "default"); + + return input; +} --
[EGIT] [core/efl] master 01/05: ecore_wl2: Add ecore_wl2_input_keyboard_repeat_set() API.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f1740535648a4d1c8d372376a727d23e61c68c5d commit f1740535648a4d1c8d372376a727d23e61c68c5d Author: Woochanlee Date: Wed Jan 22 07:37:11 2020 -0500 ecore_wl2: Add ecore_wl2_input_keyboard_repeat_set() API. Summary: Add API to set input's keyboard repeat. get API was already there. Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11131 --- src/lib/ecore_wl2/Ecore_Wl2.h | 11 +++ src/lib/ecore_wl2/ecore_wl2_input.c | 20 ++-- src/lib/ecore_wl2/ecore_wl2_private.h | 1 + 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 6a54812204..eed6660c7e 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1448,6 +1448,17 @@ EAPI Eina_Stringshare *ecore_wl2_input_name_get(Ecore_Wl2_Input *input); */ EAPI Eina_Bool ecore_wl2_input_keyboard_repeat_get(const Ecore_Wl2_Input *input, double *rate, double *delay); +/** + * Set the keyboard repeat rate and delay of an input + * @param input The input + * @param rate Pointer to store the repeat rate (in seconds) + * @param rate Pointer to store the repeat delay (in seconds) + * @return True if repeat is enabled + * @ingroup Ecore_Wl2_Input_Group + * @since 1.24 + */ +EAPI Eina_Bool ecore_wl2_input_keyboard_repeat_set(Ecore_Wl2_Input *input, double rate, double delay); + /** * Retrieves the mouse position of the seat * diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c index 6694f3687d..92cc9a52bd 100644 --- a/src/lib/ecore_wl2/ecore_wl2_input.c +++ b/src/lib/ecore_wl2/ecore_wl2_input.c @@ -1173,8 +1173,11 @@ _keyboard_cb_repeat_setup(void *data, struct wl_keyboard *keyboard EINA_UNUSED, } input->repeat.enabled = EINA_TRUE; - input->repeat.rate = (1.0 / rate); - input->repeat.delay = (delay / 1000.0); + if (!input->repeat.changed) + { +input->repeat.rate = (1.0 / rate); +input->repeat.delay = (delay / 1000.0); + } ev = malloc(sizeof(Ecore_Wl2_Event_Seat_Keymap_Changed)); if (ev) { @@ -1615,6 +1618,7 @@ _ecore_wl2_input_add(Ecore_Wl2_Display *display, unsigned int id, unsigned int v input->repeat.rate = 0.025; input->repeat.delay = 0.4; input->repeat.enabled = EINA_TRUE; + input->repeat.changed = EINA_FALSE; wl_array_init(&input->data.selection.types); wl_array_init(&input->data.drag.types); @@ -1813,6 +1817,18 @@ ecore_wl2_input_keymap_get(const Ecore_Wl2_Input *input) return input->xkb.keymap; } +EAPI Eina_Bool +ecore_wl2_input_keyboard_repeat_set(Ecore_Wl2_Input *input, double rate, double delay) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(input, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(input->wl.keyboard, EINA_FALSE); + input->repeat.rate = rate; + input->repeat.delay = delay; + input->repeat.changed = EINA_TRUE; + return input->repeat.enabled; +} + EAPI Eina_Bool ecore_wl2_input_keyboard_repeat_get(const Ecore_Wl2_Input *input, double *rate, double *delay) { diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index 5178e8f3ea..0f8b7ffc09 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -508,6 +508,7 @@ struct _Ecore_Wl2_Input double rate, delay; Eina_Bool enabled : 1; Eina_Bool repeating : 1; +Eina_Bool changed : 1; } repeat; struct --
[EGIT] [core/efl] master 05/05: Revert "ecore-wl2: Move ecore_wl2_window_output_find function to be internal"
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bcff657ed7abfc5b246620cb0ef2c0b5874106c8 commit bcff657ed7abfc5b246620cb0ef2c0b5874106c8 Author: Woochanlee Date: Wed Jan 22 07:41:58 2020 -0500 Revert "ecore-wl2: Move ecore_wl2_window_output_find function to be internal" Summary: This reverts commit 64dacb3d07f6ed74a53e4e38c25e27ebd9bfb6f7. User can't use ecore_wl2_output_dpi_get() , ecore_wl2_output_transform_get() APIs without this API. Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11154 --- src/lib/ecore_wl2/Ecore_Wl2.h | 12 src/lib/ecore_wl2/ecore_wl2_internal.h | 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 294af10b5a..da664939b7 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1120,6 +1120,18 @@ EAPI void ecore_wl2_window_type_set(Ecore_Wl2_Window *window, Ecore_Wl2_Window_T */ EAPI Ecore_Wl2_Window_Type ecore_wl2_window_type_get(Ecore_Wl2_Window *window); +/** + * Find the output that a given window is on + * + * @param window The window to find the output for + * + * @return An Ecore_Wl2_Output if found, or NULL otherwise + * + * @ingroup Ecore_Wl2_Window_Group + * @since 1.20 + */ +EAPI Ecore_Wl2_Output *ecore_wl2_window_output_find(Ecore_Wl2_Window *window); + /** * Set if window rotation is supported by the window manager * diff --git a/src/lib/ecore_wl2/ecore_wl2_internal.h b/src/lib/ecore_wl2/ecore_wl2_internal.h index 03d5e27b92..98dd5c1b5a 100644 --- a/src/lib/ecore_wl2/ecore_wl2_internal.h +++ b/src/lib/ecore_wl2/ecore_wl2_internal.h @@ -125,18 +125,6 @@ EAPI void ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool ico */ EAPI Eina_Bool ecore_wl2_window_pending_get(Ecore_Wl2_Window *window); -/** - * Find the output that a given window is on - * - * @param window The window to find the output for - * - * @return An Ecore_Wl2_Output if found, or NULL otherwise - * - * @ingroup Ecore_Wl2_Window_Group - * @since 1.20 - */ -EAPI Ecore_Wl2_Output *ecore_wl2_window_output_find(Ecore_Wl2_Window *window); - /** * @defgroup Ecore_Wl2_Dnd_Group Wayland Library Drag-n-Drop Functions * @ingroup Ecore_Wl2_Group --
[EGIT] [core/efl] master 04/05: tests/ecore_wl2: Add tests for move, resize, resizing_get functions.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0bf03036b7c395b5d7d54340e25783c5b920a984 commit 0bf03036b7c395b5d7d54340e25783c5b920a984 Author: Woochanlee Date: Wed Jan 22 07:41:39 2020 -0500 tests/ecore_wl2: Add tests for move, resize, resizing_get functions. Summary: Add ecore_wl2_window_move ecore_wl2_window_resize ecore_wl2_window_resizing_get ref T8016 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D11150 --- src/tests/ecore_wl2/ecore_wl2_test_window.c | 54 + 1 file changed, 54 insertions(+) diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c index b166b4ba4e..ab60ac2077 100644 --- a/src/tests/ecore_wl2/ecore_wl2_test_window.c +++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c @@ -883,6 +883,57 @@ EFL_START_TEST(wl2_window_update_begin) } EFL_END_TEST +EFL_START_TEST(wl2_window_move) +{ + Ecore_Wl2_Display *disp; + Ecore_Wl2_Window *win; + + disp = _display_connect(); + ck_assert(disp != NULL); + + win = _window_create(disp); + ck_assert(win != NULL); + + //FIXME: Need some discussion about how to validate this API in TC. + ecore_wl2_window_move(NULL, NULL); + ecore_wl2_window_move(win, NULL); +} +EFL_END_TEST + +EFL_START_TEST(wl2_window_resize) +{ + Ecore_Wl2_Display *disp; + Ecore_Wl2_Window *win; + + disp = _display_connect(); + ck_assert(disp != NULL); + + win = _window_create(disp); + ck_assert(win != NULL); + + //FIXME: Need some discussion about how to validate this API in TC. + ecore_wl2_window_resize(NULL, NULL, 0); + ecore_wl2_window_resize(win, NULL, 0); +} +EFL_END_TEST + +EFL_START_TEST(wl2_window_resizing_get) +{ + Ecore_Wl2_Display *disp; + Ecore_Wl2_Window *win; + Eina_Bool ret; + + disp = _display_connect(); + ck_assert(disp != NULL); + + win = _window_create(disp); + ck_assert(win != NULL); + + ret = ecore_wl2_window_resizing_get(win); + fail_if (ret == EINA_TRUE); +} +EFL_END_TEST + void ecore_wl2_test_window(TCase *tc) { @@ -922,5 +973,8 @@ ecore_wl2_test_window(TCase *tc) tcase_add_test(tc, wl2_window_input_region); tcase_add_test(tc, wl2_window_opaque_region); tcase_add_test(tc, wl2_window_popup_input); +tcase_add_test(tc, wl2_window_move); +tcase_add_test(tc, wl2_window_resize); +tcase_add_test(tc, wl2_window_resizing_get); } } --
[EGIT] [core/efl] master 03/05: Revert "ecore-wl2: Move ecore_wl2_input_cursor_from_name_set to be internal"
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e23dc58e200e89ed2eb72ee9931e0f1db83bfddf commit e23dc58e200e89ed2eb72ee9931e0f1db83bfddf Author: Woochanlee Date: Wed Jan 22 07:39:48 2020 -0500 Revert "ecore-wl2: Move ecore_wl2_input_cursor_from_name_set to be internal" Summary: This reverts commit 6a1d6b6705911dca8e9facc0fefc55e02c6e3694. This API is used publicly in Tizen, so we cannot make it internal. ref T8016 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D11147 --- src/lib/ecore_wl2/ecore_wl2_internal.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_internal.h b/src/lib/ecore_wl2/ecore_wl2_internal.h index 111b2cad30..03d5e27b92 100644 --- a/src/lib/ecore_wl2/ecore_wl2_internal.h +++ b/src/lib/ecore_wl2/ecore_wl2_internal.h @@ -579,21 +579,6 @@ EAPI void ecore_wl2_window_aux_hint_del(Ecore_Wl2_Window *window, int id); */ EAPI void ecore_wl2_display_terminate(Ecore_Wl2_Display *display); -/** - * Set a specific cursor on a given seat - * - * @brief This function will try to find a matching cursor inside the existing - * cursor theme and set the pointer for the specified seat to be - * the specified cursor - * - * @param input The seat to set the cursor on - * @param cursor The name of the cursor to try and set - * - * @ingroup Ecore_Wl2_Input_Group - * @since 1.20 - */ -EAPI void ecore_wl2_input_cursor_from_name_set(Ecore_Wl2_Input *input, const char *cursor); - # undef EAPI # define EAPI --
[EGIT] [core/efl] master 01/03: tests/ecore_wl2: Add dummy tests for ecore_wl2_* functions.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0bf3fd3866139d4f5bd28ce3dab64032439d194b commit 0bf3fd3866139d4f5bd28ce3dab64032439d194b Author: Woochanlee Date: Wed Jan 29 09:00:08 2020 -0500 tests/ecore_wl2: Add dummy tests for ecore_wl2_* functions. Summary: Add dummy tests for below functions. Updates will be... when there is a better verification method. ref T8016 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D11214 --- src/tests/ecore_wl2/ecore_wl2_suite.c | 1 + src/tests/ecore_wl2/ecore_wl2_suite.h | 1 + src/tests/ecore_wl2/ecore_wl2_test_ecore_wl2.c | 11 + src/tests/ecore_wl2/ecore_wl2_test_input.c | 56 ++ src/tests/ecore_wl2/ecore_wl2_test_output.c| 33 +++ src/tests/ecore_wl2/ecore_wl2_test_window.c| 20 + src/tests/ecore_wl2/meson.build| 3 +- 7 files changed, 124 insertions(+), 1 deletion(-) diff --git a/src/tests/ecore_wl2/ecore_wl2_suite.c b/src/tests/ecore_wl2/ecore_wl2_suite.c index 90d16bea60..9418de14c4 100644 --- a/src/tests/ecore_wl2/ecore_wl2_suite.c +++ b/src/tests/ecore_wl2/ecore_wl2_suite.c @@ -7,6 +7,7 @@ static const Efl_Test_Case etc[] = { "Display", ecore_wl2_test_display }, { "Window", ecore_wl2_test_window }, { "Input", ecore_wl2_test_input }, + { "Output", ecore_wl2_test_output }, #endif { NULL, NULL } }; diff --git a/src/tests/ecore_wl2/ecore_wl2_suite.h b/src/tests/ecore_wl2/ecore_wl2_suite.h index b429bdbdbf..111b388f28 100644 --- a/src/tests/ecore_wl2/ecore_wl2_suite.h +++ b/src/tests/ecore_wl2/ecore_wl2_suite.h @@ -16,5 +16,6 @@ void ecore_wl2_test_init(TCase *tc); void ecore_wl2_test_display(TCase *tc); void ecore_wl2_test_window(TCase *tc); void ecore_wl2_test_input(TCase *tc); +void ecore_wl2_test_output(TCase *tc); #endif diff --git a/src/tests/ecore_wl2/ecore_wl2_test_ecore_wl2.c b/src/tests/ecore_wl2/ecore_wl2_test_ecore_wl2.c index d8049cd352..662093c347 100644 --- a/src/tests/ecore_wl2/ecore_wl2_test_ecore_wl2.c +++ b/src/tests/ecore_wl2/ecore_wl2_test_ecore_wl2.c @@ -5,8 +5,19 @@ EFL_START_TEST(ecore_wl2_simple) } EFL_END_TEST +EFL_START_TEST(wl2_session_recovery_disable) +{ + //FIXME: Need some discussion about how to validate this API in TC. + ecore_wl2_session_recovery_disable(); +} +EFL_END_TEST + void ecore_wl2_test_init(TCase *tc) { tcase_add_test(tc, ecore_wl2_simple); + if (getenv("E_START")) + { +tcase_add_test(tc, wl2_session_recovery_disable); + } } diff --git a/src/tests/ecore_wl2/ecore_wl2_test_input.c b/src/tests/ecore_wl2/ecore_wl2_test_input.c index 2eb3aa6b38..12b1e45338 100644 --- a/src/tests/ecore_wl2/ecore_wl2_test_input.c +++ b/src/tests/ecore_wl2/ecore_wl2_test_input.c @@ -227,6 +227,60 @@ EFL_START_TEST(wl2_input_keyboard_repeat) } EFL_END_TEST +EFL_START_TEST(wl2_input_cursor_from_name_set) +{ + Ecore_Wl2_Display *disp; + Ecore_Wl2_Input *input; + Eina_Iterator *itr; + + disp = _display_connect(); + ck_assert(disp != NULL); + + itr = ecore_wl2_display_inputs_get(disp); + ck_assert(itr != NULL); + + EINA_ITERATOR_FOREACH(itr, input) + { +if (ecore_wl2_input_seat_capabilities_get(input) == +ECORE_WL2_SEAT_CAPABILITIES_POINTER) + { + //FIXME: Need some discussion about how to validate this API in TC. + ecore_wl2_input_cursor_from_name_set(input, NULL); + ecore_wl2_input_cursor_from_name_set(NULL, NULL); + } + } + + eina_iterator_free(itr); +} +EFL_END_TEST + +EFL_START_TEST(wl2_input_pointer_set) +{ + Ecore_Wl2_Display *disp; + Ecore_Wl2_Input *input; + Eina_Iterator *itr; + + disp = _display_connect(); + ck_assert(disp != NULL); + + itr = ecore_wl2_display_inputs_get(disp); + ck_assert(itr != NULL); + + EINA_ITERATOR_FOREACH(itr, input) + { +if (ecore_wl2_input_seat_capabilities_get(input) == +ECORE_WL2_SEAT_CAPABILITIES_POINTER) + { + //FIXME: Need some discussion about how to validate this API in TC. + ecore_wl2_input_pointer_set(input, NULL, 0, 0); + ecore_wl2_input_pointer_set(NULL, NULL, 0, 0); + } + } + + eina_iterator_free(itr); +} +EFL_END_TEST + void ecore_wl2_test_input(TCase *tc) { @@ -240,5 +294,7 @@ ecore_wl2_test_input(TCase *tc) tcase_add_test(tc, wl2_input_seat_capabilities); tcase_add_test(tc, wl2_input_pointer_xy); tcase_add_test(tc, wl2_input_keyboard_repeat); +tcase_add_test(tc, wl2_input_cursor_from_name_set); +tcase_add_test(tc, wl2_input_pointer_set); } } diff --git a/src/tests/ecore_wl2/ecore_wl2_test_outpu
[EGIT] [core/efl] master 03/03: ecore_wl2: Fix doc(delete tags).
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ec4ea2d06d6454ad2bc291e413d52ecc1504e3bc commit ec4ea2d06d6454ad2bc291e413d52ecc1504e3bc Author: Woochanlee Date: Wed Jan 29 09:01:51 2020 -0500 ecore_wl2: Fix doc(delete tags). Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11226 --- src/lib/ecore_wl2/Ecore_Wl2.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index da664939b7..c68890cd74 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -714,15 +714,15 @@ EAPI Ecore_Wl2_Window *ecore_wl2_display_window_find_by_surface(Ecore_Wl2_Displa * Gets the connected display object * * @brief This function is typically used by clients to get an - * existing Wayland display. + *existing Wayland display. * - * @param name The display target name. If @c NULL, the default - * display is assumed. + * @param name The display target name. If @c NULL, the default + *display is assumed. * - * @return The Ecore_Wl2_Display which was connected to + * @return The Ecore_Wl2_Display which was connected to * - * @ingroup Ecore_Wl2_Display_Group - * @since 1.24 + * @ingroup Ecore_Wl2_Display_Group + * @since 1.24 */ EAPI Ecore_Wl2_Display *ecore_wl2_connected_display_get(const char *name); --
[EGIT] [core/efl] master 01/02: evas_object_grid: Fix memory leak.
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=260964dbdd82354e6a616e3d3b96bd184fd139aa commit 260964dbdd82354e6a616e3d3b96bd184fd139aa Author: Woochanlee Date: Thu Jan 30 06:25:36 2020 + evas_object_grid: Fix memory leak. _evas_object_smart_clipped_init() (in evas_object_smart.c) is called when evas_object_grid is created. And a rectangle is created in the function. But, the rectangle is not deleted even though evas_objecct_grid is deleted. This patch fixes the problem by deleting it in smart_del fucntion. Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D11140 --- src/lib/evas/canvas/evas_object_grid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/evas/canvas/evas_object_grid.c b/src/lib/evas/canvas/evas_object_grid.c index 5dd69e10a9..72cb176ecc 100644 --- a/src/lib/evas/canvas/evas_object_grid.c +++ b/src/lib/evas/canvas/evas_object_grid.c @@ -187,6 +187,8 @@ _evas_object_grid_smart_del(Evas_Object *o) free(opt); l = eina_list_remove_list(l, l); } + + _evas_object_grid_parent_sc->del(o); } static void --
[EGIT] [core/efl] master 01/01: efl_ui_spin_button: Addded direction feature.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=739da4f736cec242042ba3a39d8a7c2417d924ab commit 739da4f736cec242042ba3a39d8a7c2417d924ab Author: Woochanlee Date: Tue Aug 21 13:52:28 2018 +0900 efl_ui_spin_button: Addded direction feature. Summary: The Spin_Button class supports two types(horizontal, vertical). User can use 'efl_ui_direction()' for spin_button. @feature Test Plan: elementary_test-> spin_button sample. Reviewers: Hermet, Jaehyun_Cho Subscribers: cedric, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6680 --- data/elementary/themes/edc/efl/datepicker.edc | 12 data/elementary/themes/edc/efl/spin_button.edc | 83 +++--- data/elementary/themes/edc/efl/timepicker.edc | 15 src/bin/elementary/test_ui_spin_button.c| 1 + src/lib/elementary/efl_ui_datepicker.c | 12 ++-- src/lib/elementary/efl_ui_spin_button.c | 92 - src/lib/elementary/efl_ui_spin_button.eo| 3 +- src/lib/elementary/efl_ui_spin_button_private.h | 2 + src/lib/elementary/efl_ui_timepicker.c | 8 +-- 9 files changed, 144 insertions(+), 84 deletions(-) diff --git a/data/elementary/themes/edc/efl/datepicker.edc b/data/elementary/themes/edc/efl/datepicker.edc index e15343af46..31eb20610a 100644 --- a/data/elementary/themes/edc/efl/datepicker.edc +++ b/data/elementary/themes/edc/efl/datepicker.edc @@ -331,15 +331,3 @@ group { "efl/datepicker/spin_button"; } } } - -group { "efl/datepicker/spin_button/text_button"; - inherit: "efl/spin_button/text_button"; -} - -group { "efl/datepicker/spin_button/inc_button"; - inherit: "efl/spin_button/inc_button:vertical"; -} - -group { "efl/datepicker/spin_button/dec_button"; - inherit: "efl/spin_button/dec_button:vertical"; -} diff --git a/data/elementary/themes/edc/efl/spin_button.edc b/data/elementary/themes/edc/efl/spin_button.edc index 4cb7783f1f..417d002154 100644 --- a/data/elementary/themes/edc/efl/spin_button.edc +++ b/data/elementary/themes/edc/efl/spin_button.edc @@ -1,4 +1,4 @@ -group { "efl/spin_button"; +group { "efl/spin_button/horizontal"; images.image: "vert_bar_inset.png" COMP; parts { rect { "clip"; @@ -53,11 +53,6 @@ group { "efl/spin_button"; scale; desc { "default"; fixed: 1 0; -rel1.to: "inset"; -rel1.offset: 1 1; -rel2.to: "inset"; -rel2.offset: 1 -2; -rel2.relative: 0.0 1.0; align: 0.0 0.5; min: 15 15; aspect: 1.0 1.0; aspect_preference: VERTICAL; @@ -67,11 +62,6 @@ group { "efl/spin_button"; scale; desc { "default"; fixed: 1 0; -rel1.to: "inset"; -rel1.offset: 1 1; -rel1.relative: 1.0 0.0; -rel2.to: "inset"; -rel2.offset: 1 -2; align: 1.0 0.5; min: 15 15; aspect: 1.0 1.0; aspect_preference: VERTICAL; @@ -160,47 +150,53 @@ group { "efl/spin_button"; } } -group { "efl/spin_button:vertical"; - inherit: "efl/spin_button"; +group { "efl/spin_button/vertical"; + inherit: "efl/spin_button/horizontal"; parts { + image { "inset"; nomouse; + desc { "default"; +min: 40 150; + } + } swallow { "efl.inc_button"; scale; desc { "default"; -rel1.to: "inset"; -rel1.offset: 1 1; -rel1.relative: 1.0 0.0; -rel2.to: "inset"; -rel2.offset: 1 -2; -align: 1.0 0.5; +rel.to: "inset"; +align: 0.5 0.0; +min: 40 40; +max: 40 40; +fixed: 1 1; } } - swallow { "efl.text_button"; + swallow { "efl.dec_button"; scale; desc { "default"; -vis; -rel1.to_y: "inset"; -rel1.to_x: "efl.dec_button"; -rel1.relative: 1.0 0.0; -rel1.offset: 1 1; -rel2.to_y: "inset"; -rel2.to_x: "efl.inc_button"; -rel2.relative: 0.0 1.0; -rel2.offset: -2 -2; - } - desc { "active"; -inherit: "default"; -hid; +rel.to: "inset"; +align: 0.5 1.0; +min: 40 40; +max: 40 40; +fixed: 1 1; } }
[EGIT] [core/efl] master 01/01: Clean up efl_ui_XXX eo files.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7655a0d267ef59ba530cf7ad52bbc176049904da commit 7655a0d267ef59ba530cf7ad52bbc176049904da Author: Woochanlee Date: Tue Sep 4 09:37:00 2018 +0900 Clean up efl_ui_XXX eo files. Summary: Delete unnecessary interface references. Delete unnecessary annotations. Reviewers: Hermet, Jaehyun_Cho, zmike Reviewed By: Hermet Subscribers: segfaultxavi, q66, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6945 --- src/lib/elementary/efl_ui_button.eo | 2 +- src/lib/elementary/efl_ui_check.c | 6 -- src/lib/elementary/efl_ui_check.eo | 1 - src/lib/elementary/efl_ui_focus_layer.eo| 2 +- src/lib/elementary/efl_ui_image.eo | 1 - src/lib/elementary/efl_ui_image_zoomable.eo | 2 +- src/lib/elementary/efl_ui_image_zoomable_pan.eo | 12 src/lib/elementary/efl_ui_scroller.eo | 3 +-- src/lib/elementary/efl_ui_textpath.eo | 2 +- src/lib/elementary/efl_ui_video.eo | 3 +-- src/lib/elementary/efl_ui_view_list_pan.eo | 6 -- src/lib/elementary/efl_ui_widget_part_shadow.eo | 2 +- src/lib/elementary/efl_ui_win.eo| 1 - 13 files changed, 7 insertions(+), 36 deletions(-) diff --git a/src/lib/elementary/efl_ui_button.eo b/src/lib/elementary/efl_ui_button.eo index 3ce8c7dcc3..64c0b7f3a5 100644 --- a/src/lib/elementary/efl_ui_button.eo +++ b/src/lib/elementary/efl_ui_button.eo @@ -1,5 +1,5 @@ class Efl.Ui.Button (Efl.Ui.Layout.Object, Efl.Ui.Clickable, Efl.Ui.Autorepeat, - Efl.Text, Efl.Text_Markup, Efl.Content, + Efl.Text, Efl.Content, Efl.Access.Widget.Action, Efl.Ui.Translatable) { [[Push-button widget diff --git a/src/lib/elementary/efl_ui_check.c b/src/lib/elementary/efl_ui_check.c index 4b38992e3b..4e1d197cdf 100644 --- a/src/lib/elementary/efl_ui_check.c +++ b/src/lib/elementary/efl_ui_check.c @@ -305,12 +305,6 @@ _efl_ui_check_selected_set(Eo *obj, Efl_Ui_Check_Data *sd, Eina_Bool value) efl_ui_nstate_value_set(obj, value); } -EOLIAN static void -_efl_ui_check_efl_ui_nstate_count_set(Eo *obj EINA_UNUSED, Efl_Ui_Check_Data *pd EINA_UNUSED, int nstate EINA_UNUSED) -{ - //NOP; -} - EOLIAN static void _efl_ui_check_efl_ui_nstate_value_set(Eo *obj, Efl_Ui_Check_Data *pd EINA_UNUSED, int state) { diff --git a/src/lib/elementary/efl_ui_check.eo b/src/lib/elementary/efl_ui_check.eo index 43b23fbcb5..ef0f76de79 100644 --- a/src/lib/elementary/efl_ui_check.eo +++ b/src/lib/elementary/efl_ui_check.eo @@ -25,7 +25,6 @@ class Efl.Ui.Check (Efl.Ui.Nstate, Efl.Access.Widget.Action) Efl.Ui.Widget.on_access_activate; Efl.Ui.Widget.theme_apply; Efl.Ui.Widget.widget_event; - Efl.Ui.Nstate.count { set; } Efl.Ui.Nstate.value { set; } Efl.Access.Object.state_set { get; } Efl.Access.Widget.Action.elm_actions { get; } diff --git a/src/lib/elementary/efl_ui_focus_layer.eo b/src/lib/elementary/efl_ui_focus_layer.eo index 8650981425..a5a3564168 100644 --- a/src/lib/elementary/efl_ui_focus_layer.eo +++ b/src/lib/elementary/efl_ui_focus_layer.eo @@ -1,4 +1,4 @@ -mixin Efl.Ui.Focus.Layer (Efl.Interface, Efl.Ui.Widget, Efl.Gfx.Entity, Efl.Ui.Widget_Focus_Manager) { +mixin Efl.Ui.Focus.Layer (Efl.Interface, Efl.Ui.Widget, Efl.Ui.Widget_Focus_Manager) { [[This defines the inheriting widget as focus layer A focus layer is the uppermost one which received input and handles all focus related events for as long as it exists and is visible. It's NOT possible to escape this layer with focus movement. diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo index a572d468d0..94ed732b88 100644 --- a/src/lib/elementary/efl_ui_image.eo +++ b/src/lib/elementary/efl_ui_image.eo @@ -107,7 +107,6 @@ class Efl.Ui.Image (Efl.Ui.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable, Efl.Layout.Signal.signal_emit; Efl.Layout.Group.group_size_min { get; } Efl.Layout.Group.group_size_max { get; } - //Efl.Canvas.Layout_Group.group_data { get; } Efl.Layout.Calc.calc_size_min; Efl.Layout.Calc.calc_force; Efl.Canvas.Object.clip { set; } diff --git a/src/lib/elementary/efl_ui_image_zoomable.eo b/src/lib/elementary/efl_ui_image_zoomable.eo index 7695b592ac..1baeff1755 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.eo +++ b/src/lib/elementary/efl_ui_image_zoomable.eo @@ -2,7 +2,7 @@ struct @extern Elm.Photocam.Error; struct @extern Elm.Photocam.Progress; -class Efl.Ui.Image_Zoomable (Efl.Ui.Widget, Efl.Ui.Image, Efl.Ui.Zoom, +class Efl.Ui.Image_Zoomable (Efl.Ui.Image, Efl.Ui.Zoom, Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar) {
[EGIT] [core/efl] master 01/01: ecore_wl2_window: Fix incorrectly implemented null check.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d702f714fef5ac0ef70832ad1b0c1914e365b11d commit d702f714fef5ac0ef70832ad1b0c1914e365b11d Author: Woochanlee Date: Wed Sep 19 07:01:01 2018 -0400 ecore_wl2_window: Fix incorrectly implemented null check. Summary: It checks 'window->xdg_toplevel' two times. Reviewers: ManMower, devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7065 --- src/lib/ecore_wl2/ecore_wl2_window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index a2171aa800..a2468cc4d0 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -999,7 +999,7 @@ ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title) eina_stringshare_replace(&window->title, title); if (!window->title) return; - if (!window->xdg_toplevel && !window->xdg_toplevel) return; + if (!window->xdg_toplevel && !window->zxdg_toplevel) return; if (window->xdg_toplevel) xdg_toplevel_set_title(window->xdg_toplevel, window->title); @@ -1015,7 +1015,7 @@ ecore_wl2_window_class_set(Ecore_Wl2_Window *window, const char *clas) eina_stringshare_replace(&window->class, clas); if (!window->class) return; - if (!window->xdg_toplevel && !window->xdg_toplevel) return; + if (!window->xdg_toplevel && !window->zxdg_toplevel) return; if (window->xdg_toplevel) xdg_toplevel_set_app_id(window->xdg_toplevel, window->class); --
[EGIT] [core/efl] master 01/01: efl_ui_format: remove supporting default TM format in interface.
xartigas pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a1478261b5df689b04c2223cdaf68dc91c4a6442 commit a1478261b5df689b04c2223cdaf68dc91c4a6442 Author: Woochanlee Date: Tue Nov 20 09:59:18 2018 +0100 efl_ui_format: remove supporting default TM format in interface. Summary: efl_ui_format printed ERR log in calendar use case. calendar only accept format as "B,b,h,m,y,Y" But it doesn't cover that and not supporting TM type. If there is other widget which one using format interface, It also has own accpeted format. So i think it should impelment on widget side. Test Plan: elementary_test -> efl_ui_calendar. Reviewers: Hermet, singh.amitesh, Jaehyun, zmike, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6871 --- src/lib/efl/interfaces/efl_ui_format.c | 9 -- src/lib/elementary/efl_ui_calendar.c | 42 src/lib/elementary/efl_ui_calendar.eo| 1 + src/lib/elementary/efl_ui_calendar_private.h | 1 + 4 files changed, 44 insertions(+), 9 deletions(-) diff --git a/src/lib/efl/interfaces/efl_ui_format.c b/src/lib/efl/interfaces/efl_ui_format.c index 4f3a867f27..e722d22654 100644 --- a/src/lib/efl/interfaces/efl_ui_format.c +++ b/src/lib/efl/interfaces/efl_ui_format.c @@ -92,18 +92,9 @@ _format_string_check(const char *fmt) static void _default_format_cb(void *data, Eina_Strbuf *str, const Eina_Value value) { - const Eina_Value_Type *type = eina_value_type_get(&value); Efl_Ui_Format_Data *sd = data; Eina_Value copy; - if (type == EINA_VALUE_TYPE_TM) - { -struct tm v; -eina_value_get(&value, &v); -eina_strbuf_append_strftime(str, sd->template, &v); -return; - } - if (sd->format_type == FORMAT_TYPE_DOUBLE) { double v = 0.0; diff --git a/src/lib/elementary/efl_ui_calendar.c b/src/lib/elementary/efl_ui_calendar.c index 1e05e58fa1..15ab19bfc7 100644 --- a/src/lib/elementary/efl_ui_calendar.c +++ b/src/lib/elementary/efl_ui_calendar.c @@ -1164,6 +1164,48 @@ _efl_ui_calendar_efl_ui_format_format_cb_set(Eo *obj, Efl_Ui_Calendar_Data *sd, evas_object_smart_changed(obj); } +static void +_calendar_format_cb(void *data, Eina_Strbuf *str, const Eina_Value value) +{ + Efl_Ui_Calendar_Data *sd = data; + const Eina_Value_Type *type = eina_value_type_get(&value); + struct tm v; + + if (type == EINA_VALUE_TYPE_TM) + { +eina_value_get(&value, &v); +eina_strbuf_append_strftime(str, sd->format_template, &v); + } +} + +static void +_calendar_format_free_cb(void *data) +{ + Efl_Ui_Calendar_Data *sd = data; + + if (sd && sd->format_template) + { +eina_stringshare_del(sd->format_template); +sd->format_template = NULL; + } +} + +EOLIAN static void +_efl_ui_calendar_efl_ui_format_format_string_set(Eo *obj, Efl_Ui_Calendar_Data *sd, const char *template) +{ + if (!template) return; + + eina_stringshare_replace(&sd->format_template, template); + + efl_ui_format_cb_set(obj, sd, _calendar_format_cb, _calendar_format_free_cb); +} + +EOLIAN static const char * +_efl_ui_calendar_efl_ui_format_format_string_get(const Eo *obj EINA_UNUSED, Efl_Ui_Calendar_Data *sd) +{ + return sd->format_template; +} + EOLIAN static void _efl_ui_calendar_first_day_of_week_set(Eo *obj, Efl_Ui_Calendar_Data *sd, Efl_Ui_Calendar_Weekday day) { diff --git a/src/lib/elementary/efl_ui_calendar.eo b/src/lib/elementary/efl_ui_calendar.eo index 4a6415f701..649b6536c4 100644 --- a/src/lib/elementary/efl_ui_calendar.eo +++ b/src/lib/elementary/efl_ui_calendar.eo @@ -112,6 +112,7 @@ class Efl.Ui.Calendar (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Efl.Access.Widge Efl.Ui.Widget.widget_event; Efl.Access.Widget.Action.elm_actions { get; } Efl.Ui.Format.format_cb { set; } + Efl.Ui.Format.format_string { set; get;} } events { changed: void; [[Emitted when the selected date in the calendar is changed]] diff --git a/src/lib/elementary/efl_ui_calendar_private.h b/src/lib/elementary/efl_ui_calendar_private.h index 6cce25d130..78446c612e 100644 --- a/src/lib/elementary/efl_ui_calendar_private.h +++ b/src/lib/elementary/efl_ui_calendar_private.h @@ -42,6 +42,7 @@ struct _Efl_Ui_Calendar_Data Efl_Ui_Calendar_Weekday first_week_day; unsigned charfirst_day_it; + const char *format_template; Efl_Ui_Format_Func_Cbformat_cb; Eina_Free_Cb format_free_cb; void*format_cb_data; --
[EGIT] [core/efl] master 01/01: elm_spinner: Fixed to apply the %d format.
jaehyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b8a24679a6f7995ccc1da19eb86c6c2ef6826d1a commit b8a24679a6f7995ccc1da19eb86c6c2ef6826d1a Author: Woochanlee Date: Wed Feb 19 21:09:15 2020 +0900 elm_spinner: Fixed to apply the %d format. Summary: The part object does not apply the logic in efl_ui_format, so it does not work correctly when you format it with %d. This is the commit that gets the necessary part of the logic of efl_ui_format. Test Plan: elementary_test Reviewers: Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11378 --- src/lib/elementary/elm_slider.c| 102 +++-- src/lib/elementary/elm_widget_slider.h | 1 + 2 files changed, 97 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/elm_slider.c b/src/lib/elementary/elm_slider.c index 2c6c26b84d..a533fd5188 100644 --- a/src/lib/elementary/elm_slider.c +++ b/src/lib/elementary/elm_slider.c @@ -1348,17 +1348,45 @@ _elm_slider_part_indicator_efl_ui_format_format_cb_set(Eo *obj, void *_pd EINA_U efl_canvas_group_change(pd->obj); } +static Eina_Bool +_do_format_string(Elm_Slider_Data *sd, Eina_Strbuf *str, const Eina_Value value) +{ + switch (sd->indi_format_int) + { + case 0: +{ + double v = 0.0; + if (!eina_value_double_convert(&value, &v)) + ERR("Format conversion failed"); + eina_strbuf_append_printf(str, sd->indi_template, v); + break; +} + case 1: +{ + int v = 0; + if (!eina_value_int_convert(&value, &v)) + ERR("Format conversion failed"); + eina_strbuf_append_printf(str, sd->indi_template, v); + break; +} + default: + return EINA_FALSE; + } + return EINA_TRUE; +} + static Eina_Bool _indi_default_format_cb(void *data, Eina_Strbuf *str, const Eina_Value value) { - const Eina_Value_Type *type = eina_value_type_get(&value); Elm_Slider_Data *sd = efl_data_scope_get(data, ELM_SLIDER_CLASS); - double v; - - if (type != EINA_VALUE_TYPE_DOUBLE) return EINA_FALSE; - eina_value_get(&value, &v); - eina_strbuf_append_printf(str, sd->indi_template, v); + if (!_do_format_string(sd, str, value)) + { +/* Fallback to just printing the value if format string fails (legacy behavior) */ +char *v = eina_value_to_string(&value); +eina_strbuf_append(str, v); +free(v); + } return EINA_TRUE; } @@ -1375,6 +1403,67 @@ _indi_default_format_free_cb(void *data) } } +static Eina_Bool +_is_valid_digit(char x) +{ + return ((x >= '0' && x <= '9') || (x == '.')) ? EINA_TRUE : EINA_FALSE; +} + +static Eina_Bool +_format_string_check(const char *fmt) +{ + const char *itr; + Eina_Bool found = EINA_FALSE; + Eina_Bool ret = EINA_FALSE; + + for (itr = fmt; *itr; itr++) + { +if (itr[0] != '%') continue; +if (itr[1] == '%') + { + itr++; + continue; + } + +if (!found) + { + found = EINA_TRUE; + for (itr++; *itr; itr++) + { + // FIXME: This does not properly support int64 or unsigned. + if ((*itr == 'd') || (*itr == 'u') || (*itr == 'i') || + (*itr == 'o') || (*itr == 'x') || (*itr == 'X')) +{ + ret = EINA_TRUE; + break; +} + else if ((*itr == 'f') || (*itr == 'F')) +{ + ret = EINA_FALSE; + break; +} + else if (_is_valid_digit(*itr)) +{ + continue; +} + else +{ + ERR("Format string '%s' has unknown format element '%c' in format. It must have one format element of type 's', 'f', 'F', 'd', 'u', 'i', 'o', 'x' or 'X'", fmt, *itr); + found = EINA_FALSE; + break; +} + } + if (!(*itr)) break; + } +else + { + break; + } + } + + return ret; +} + EOLIAN static void _elm_slider_part_indicator_efl_ui_format_format_string_set(Eo *obj, void *_pd EINA_UNUSED, const char *template, Efl_Ui_Format_String_
[EGIT] [core/efl] master 01/01: efl_gesture_manager: Fix incorrect override system config value.
zmike pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b319f15c99fdb9947d73b5abfb04a0fa155dd367 commit b319f15c99fdb9947d73b5abfb04a0fa155dd367 Author: Woochanlee Date: Thu Mar 12 09:09:34 2020 -0400 efl_gesture_manager: Fix incorrect override system config value. Summary: The glayer_tap_finger_size can get diffrent value on each profile. Need to get system config value and will set it for gesture manager. Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11485 --- src/lib/evas/gesture/efl_canvas_gesture_manager.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c index a05794fd91..48f515471c 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c @@ -3,7 +3,6 @@ #include "efl_canvas_gesture_private.h" #define MY_CLASS EFL_CANVAS_GESTURE_MANAGER_CLASS -#define EFL_GESTURE_RECOGNIZER_TYPE_TAP_FINGER_SIZE 10 typedef struct _Object_Gesture { @@ -150,7 +149,6 @@ _efl_canvas_gesture_manager_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_M /* this needs to always be present */ config = efl_provider_find(efl_main_loop_get(), EFL_CONFIG_INTERFACE); - efl_config_int_set(config, "glayer_tap_finger_size", EFL_GESTURE_RECOGNIZER_TYPE_TAP_FINGER_SIZE); efl_event_callback_add(config, EFL_CONFIG_EVENT_CONFIG_CHANGED, _gesture_manager_config_changed, pd); //Register all types of recognizers at very first time. @@ -162,7 +160,7 @@ _efl_canvas_gesture_manager_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_M efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_FLICK_CLASS, obj)); efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_ROTATE_CLASS, obj)); efl_gesture_manager_recognizer_register(obj, efl_add(EFL_CANVAS_GESTURE_RECOGNIZER_ZOOM_CLASS, obj)); - _update_finger_sizes(pd, EFL_GESTURE_RECOGNIZER_TYPE_TAP_FINGER_SIZE); + _update_finger_sizes(pd, efl_config_int_get(config, "glayer_tap_finger_size")); return obj; } --
[EGIT] [core/efl] master 02/02: ecore_wl2 : Organize window creation/deletion events.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9ca13ef5c10904b620407ce8981fadf2a903b180 commit 9ca13ef5c10904b620407ce8981fadf2a903b180 Author: Woochanlee Date: Tue May 26 11:49:16 2020 -0400 ecore_wl2 : Organize window creation/deletion events. Summary: Add create / destroy events. Call hide event when the window terminated if the window was visible. Reviewers: devilhorns, Hermet, raster Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11878 --- src/lib/ecore_wl2/Ecore_Wl2.h | 9 + src/lib/ecore_wl2/ecore_wl2.c | 8 +++- src/lib/ecore_wl2/ecore_wl2_private.h | 2 ++ src/lib/ecore_wl2/ecore_wl2_window.c | 25 + 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 4bee824e66..6a7d2507ec 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -320,6 +320,13 @@ typedef struct _Ecore_Wl2_Event_Window_Deactivate Ecore_Wl2_Window *event_win; } Ecore_Wl2_Event_Window_Deactivate; +typedef struct _Ecore_Wl2_Event_Window_Common +{ + Ecore_Wl2_Window *win; + Ecore_Wl2_Window *parent_win; + Ecore_Wl2_Window *event_win; +} Ecore_Wl2_Event_Window_Common; + typedef struct _Ecore_Wl2_Event_Window_Iconify_State_Change { Ecore_Wl2_Window *win; @@ -422,6 +429,8 @@ EAPI extern int ECORE_WL2_EVENT_WINDOW_ACTIVATE; /** @since 1.20 */ EAPI extern int ECORE_WL2_EVENT_WINDOW_DEACTIVATE; /** @since 1.20 */ EAPI extern int ECORE_WL2_EVENT_WINDOW_ICONIFY_STATE_CHANGE; /** @since 1.21 */ EAPI extern int ECORE_WL2_EVENT_WINDOW_OFFSCREEN; /** @since 1.21 */ +EAPI extern int ECORE_WL2_EVENT_WINDOW_CREATE; /** @since 1.25 */ +EAPI extern int ECORE_WL2_EVENT_WINDOW_DESTROY; /** @since 1.25 */ typedef struct _Ecore_Wl2_Surface_Interface { diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c index 33e06873cd..a07d3ce27c 100644 --- a/src/lib/ecore_wl2/ecore_wl2.c +++ b/src/lib/ecore_wl2/ecore_wl2.c @@ -58,6 +58,8 @@ EAPI int ECORE_WL2_EVENT_WINDOW_ACTIVATE = 0; EAPI int ECORE_WL2_EVENT_WINDOW_DEACTIVATE = 0; EAPI int ECORE_WL2_EVENT_WINDOW_ICONIFY_STATE_CHANGE = 0; EAPI int ECORE_WL2_EVENT_WINDOW_OFFSCREEN = 0; +EAPI int ECORE_WL2_EVENT_WINDOW_CREATE = 0; +EAPI int ECORE_WL2_EVENT_WINDOW_DESTROY = 0; EAPI int _ecore_wl2_event_window_www = -1; EAPI int _ecore_wl2_event_window_www_drag = -1; @@ -203,6 +205,8 @@ ecore_wl2_init(void) ECORE_WL2_EVENT_WINDOW_DEACTIVATE = ecore_event_type_new(); ECORE_WL2_EVENT_WINDOW_ICONIFY_STATE_CHANGE = ecore_event_type_new(); ECORE_WL2_EVENT_WINDOW_OFFSCREEN = ecore_event_type_new(); + ECORE_WL2_EVENT_WINDOW_CREATE = ecore_event_type_new(); + ECORE_WL2_EVENT_WINDOW_DESTROY = ecore_event_type_new(); if (!no_session_recovery) no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY"); @@ -277,7 +281,9 @@ ecore_wl2_shutdown(void) ECORE_WL2_EVENT_WINDOW_ACTIVATE, ECORE_WL2_EVENT_WINDOW_DEACTIVATE, ECORE_WL2_EVENT_WINDOW_ICONIFY_STATE_CHANGE, - ECORE_WL2_EVENT_WINDOW_OFFSCREEN); + ECORE_WL2_EVENT_WINDOW_OFFSCREEN + ECORE_WL2_EVENT_WINDOW_CREATE, + ECORE_WL2_EVENT_WINDOW_DESTROY); /* shutdown Ecore_Event */ ecore_event_shutdown(); diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index 0f8b7ffc09..e4d19bd1e0 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -266,6 +266,8 @@ struct _Ecore_Wl2_Window Eina_Bool has_buffer : 1; Eina_Bool updating : 1; Eina_Bool deferred_minimize : 1; + + Eina_Bool visible : 1; }; struct _Ecore_Wl2_Output diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 3ca227abbc..86ea5d3f90 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -519,6 +519,7 @@ _ecore_wl2_window_show_send(Ecore_Wl2_Window *window) if (window->parent) ev->parent_win = window->parent; ev->event_win = window; + window->visible = EINA_TRUE; ecore_event_add(ECORE_WL2_EVENT_WINDOW_SHOW, ev, NULL, NULL); } @@ -534,9 +535,27 @@ _ecore_wl2_window_hide_send(Ecore_Wl2_Window *window) if (window->parent) ev->parent_win = window->parent; ev->event_win = window; + window->visible = EINA_FALSE; ecore_event_add(ECORE_WL2_EVENT_WINDOW_HIDE, ev, NULL, NULL); } +static void +_ecore_wl2_window_create_destroy_send(Ecore_Wl2_Window *window, Eina_Bool create) +{ + Ecore_Wl2_Event_Window_Hide *ev; + + ev = calloc
[EGIT] [core/efl] master 01/01: edje_load : clean up vector resource when edje file freed.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=eb38000e3dd7a52a6af8daf17c6643dd86ff8f5c commit eb38000e3dd7a52a6af8daf17c6643dd86ff8f5c Author: Woochanlee Date: Wed May 27 12:32:11 2020 +0900 edje_load : clean up vector resource when edje file freed. Summary: Fix memory leak. Reviewers: cedric, Hermet, smohanty, bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11859 --- src/lib/edje/edje_load.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c index 2888f6b291..b3fa2e3d57 100644 --- a/src/lib/edje/edje_load.c +++ b/src/lib/edje/edje_load.c @@ -2121,6 +2121,9 @@ _edje_file_free(Edje_File *edf) { for (i = 0; i < edf->image_dir->entries_count; ++i) eina_stringshare_del(edf->image_dir->entries[i].entry); + + for (i = 0; i < edf->image_dir->vectors_count; ++i) + eina_stringshare_del(edf->image_dir->vectors[i].entry); } /* Sets have been added after edje received eet dictionary support */ @@ -2134,6 +2137,7 @@ _edje_file_free(Edje_File *edf) free(edf->image_dir->entries); free(edf->image_dir->sets); +free(edf->image_dir->vectors); free(edf->image_dir); } if (edf->sound_dir) --
[EGIT] [core/efl] master 01/01: ecore_wl2: Fix event type name.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=28d41f4e6cb7e07d3a2d7685151beb65edfd77c0 commit 28d41f4e6cb7e07d3a2d7685151beb65edfd77c0 Author: Woochanlee Date: Wed May 27 10:03:38 2020 -0400 ecore_wl2: Fix event type name. Summary: It's been missed commit 9ca13ef5c10904b620407ce8981fadf2a903b180 Reviewers: Hermet, devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11889 --- src/lib/ecore_wl2/ecore_wl2_window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index be5eff6e22..7d9de5775c 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -542,7 +542,7 @@ _ecore_wl2_window_hide_send(Ecore_Wl2_Window *window) static void _ecore_wl2_window_create_destroy_send(Ecore_Wl2_Window *window, Eina_Bool create) { - Ecore_Wl2_Event_Window_Hide *ev; + Ecore_Wl2_Event_Window_Common *ev; ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Common)); if (!ev) return; --
[EGIT] [core/efl] master 02/04: elm_gesture_layer: Arrange the logic for delete the target object in gesture cb.
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5ca1a8c8a7fed96260b7d3faa5a12f55ac790855 commit 5ca1a8c8a7fed96260b7d3faa5a12f55ac790855 Author: Woochanlee Date: Tue May 26 06:36:54 2020 + elm_gesture_layer: Arrange the logic for delete the target object in gesture cb. When the user receives the callback of gesture callback, erases the target object, the gesture layer is deleted. The memory is may broken and performing unnecessary operations during the logic. Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D11838 --- src/lib/elementary/elm_gesture_layer.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/lib/elementary/elm_gesture_layer.c b/src/lib/elementary/elm_gesture_layer.c index 1f729187df..9e1a787c4e 100644 --- a/src/lib/elementary/elm_gesture_layer.c +++ b/src/lib/elementary/elm_gesture_layer.c @@ -1145,11 +1145,12 @@ _pending_device_add(Eina_List *list, * user may cancel refeed of events by setting repeat events. * * @param obj The gesture-layer object. + * @param need_reset Clear all gestures data or not. * * @ingroup Elm_Gesture_Layer */ static Eina_Bool -_event_history_clear(Evas_Object *obj) +_event_history_clear(Evas_Object *obj, Eina_Bool need_reset) { int i; Gesture_Info *p; @@ -1179,16 +1180,17 @@ _event_history_clear(Evas_Object *obj) _states_reset(sd); /* we are ready to start testing for gestures again */ /* Clear all gestures intermediate data */ - { - /* FIXME: +1 because of the mistake in the enum. */ - Gesture_Info **gitr = sd->gesture + 1; - Tests_Array_Funcs *fitr = _glayer_tests_array + 1; - for (; fitr->reset; fitr++, gitr++) -{ - if (IS_TESTED_GESTURE(*gitr)) - fitr->reset(*gitr); -} - } + if (need_reset) + { +/* FIXME: +1 because of the mistake in the enum. */ +Gesture_Info **gitr = sd->gesture + 1; +Tests_Array_Funcs *fitr = _glayer_tests_array + 1; +for (; fitr->reset; fitr++, gitr++) + { + if (IS_TESTED_GESTURE(*gitr)) + fitr->reset(*gitr); + } + } /* Disable gesture layer so refeeded events won't be consumed by it */ _callbacks_unregister(obj); @@ -1263,7 +1265,7 @@ _clear_if_finished(Evas_Object *obj) } if (reset_s && (!all_undefined)) - return _event_history_clear(obj); + return _event_history_clear(obj, EINA_TRUE); return EINA_FALSE; } @@ -1348,6 +1350,7 @@ _event_process(void *data, ELM_GESTURE_LAYER_DATA_GET(data, sd); + evas_object_ref(sd->target); /* Start testing candidate gesture from here */ if (_pointer_event_make(data, event_info, event_type, &_pe)) pe = &_pe; @@ -1386,6 +1389,8 @@ _event_process(void *data, Eina_Bool states_reset = _clear_if_finished(data); if (sd->glayer_continues_enable) _continues_gestures_restart(data, states_reset); + + evas_object_unref(sd->target); } static Eina_Bool @@ -3812,7 +3817,7 @@ _elm_gesture_layer_efl_canvas_group_group_del(Eo *obj, Elm_Gesture_Layer_Data *s ecore_timer_del(sd->gest_taps_timeout); /* Then take care of clearing events */ - _event_history_clear(obj); + _event_history_clear(obj, EINA_FALSE); sd->pending = eina_list_free(sd->pending); EINA_LIST_FREE(sd->touched, data) --
[EGIT] [core/efl] master 01/01: elm_calendar: Do not pass NULL to function.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fc0281f32c34ee22b82819421f3f60746bda6b5c commit fc0281f32c34ee22b82819421f3f60746bda6b5c Author: Woochanlee Date: Thu Jun 11 16:34:16 2020 +0900 elm_calendar: Do not pass NULL to function. Summary: T7076 legacy calendar inc/dec button has auto repeat feature. for that if user click the button very quickly, we delete internal timer than it will pass to function. to prevent this, need to check NULL pointer. Reviewers: devilhorns, Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11966 --- src/lib/elementary/elm_calendar.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_calendar.c b/src/lib/elementary/elm_calendar.c index 6edefe3c5e..c58fc1cc15 100644 --- a/src/lib/elementary/elm_calendar.c +++ b/src/lib/elementary/elm_calendar.c @@ -971,8 +971,11 @@ _spin_value(void *data) if (_update_data(data, sd->month_btn_clicked, sd->spin_speed)) evas_object_smart_changed(data); - sd->interval = sd->interval / 1.05; - ecore_timer_interval_set(sd->spin_timer, sd->interval); + if (sd->spin_timer) + { +sd->interval = sd->interval / 1.05; +ecore_timer_interval_set(sd->spin_timer, sd->interval); + } return ECORE_CALLBACK_RENEW; } --
[EGIT] [core/efl] efl-1.24 27/31: elm_calendar: Do not pass NULL to function.
stefan pushed a commit to branch efl-1.24. http://git.enlightenment.org/core/efl.git/commit/?id=324029062b6ece6964872148e8e5d68cbacd911e commit 324029062b6ece6964872148e8e5d68cbacd911e Author: Woochanlee Date: Thu Jun 11 16:34:16 2020 +0900 elm_calendar: Do not pass NULL to function. Summary: T7076 legacy calendar inc/dec button has auto repeat feature. for that if user click the button very quickly, we delete internal timer than it will pass to function. to prevent this, need to check NULL pointer. Reviewers: devilhorns, Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11966 --- src/lib/elementary/elm_calendar.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_calendar.c b/src/lib/elementary/elm_calendar.c index 6edefe3c5e..c58fc1cc15 100644 --- a/src/lib/elementary/elm_calendar.c +++ b/src/lib/elementary/elm_calendar.c @@ -971,8 +971,11 @@ _spin_value(void *data) if (_update_data(data, sd->month_btn_clicked, sd->spin_speed)) evas_object_smart_changed(data); - sd->interval = sd->interval / 1.05; - ecore_timer_interval_set(sd->spin_timer, sd->interval); + if (sd->spin_timer) + { +sd->interval = sd->interval / 1.05; +ecore_timer_interval_set(sd->spin_timer, sd->interval); + } return ECORE_CALLBACK_RENEW; } --
[EGIT] [core/efl] efl-1.24 08/31: edje_load : clean up vector resource when edje file freed.
stefan pushed a commit to branch efl-1.24. http://git.enlightenment.org/core/efl.git/commit/?id=8419b7dfb1adb07b5d9b0c103dacb9e269408d4f commit 8419b7dfb1adb07b5d9b0c103dacb9e269408d4f Author: Woochanlee Date: Wed May 27 12:32:11 2020 +0900 edje_load : clean up vector resource when edje file freed. Summary: Fix memory leak. Reviewers: cedric, Hermet, smohanty, bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11859 --- src/lib/edje/edje_load.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c index 2888f6b291..b3fa2e3d57 100644 --- a/src/lib/edje/edje_load.c +++ b/src/lib/edje/edje_load.c @@ -2121,6 +2121,9 @@ _edje_file_free(Edje_File *edf) { for (i = 0; i < edf->image_dir->entries_count; ++i) eina_stringshare_del(edf->image_dir->entries[i].entry); + + for (i = 0; i < edf->image_dir->vectors_count; ++i) + eina_stringshare_del(edf->image_dir->vectors[i].entry); } /* Sets have been added after edje received eet dictionary support */ @@ -2134,6 +2137,7 @@ _edje_file_free(Edje_File *edf) free(edf->image_dir->entries); free(edf->image_dir->sets); +free(edf->image_dir->vectors); free(edf->image_dir); } if (edf->sound_dir) --
[EGIT] [core/efl] master 02/04: efl_net_dialer_http: Do curl shutdown in destructor
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=74832777f4057e86e8ccca7214bd7445881f3abd commit 74832777f4057e86e8ccca7214bd7445881f3abd Author: Woochanlee Date: Wed Apr 28 10:45:26 2021 +0100 efl_net_dialer_http: Do curl shutdown in destructor Summary: curl_global_init() in efl_net_dialer_http constructor. curl_global_cleanup() need to call when it destructor. Without this, module and libcurl internal data are leaking. Reviewers: Hermet, raster Reviewed By: raster Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12259 --- src/lib/ecore_con/efl_net_dialer_http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c index 7215d9a195..439acbc099 100644 --- a/src/lib/ecore_con/efl_net_dialer_http.c +++ b/src/lib/ecore_con/efl_net_dialer_http.c @@ -1198,6 +1198,8 @@ _efl_net_dialer_http_efl_object_destructor(Eo *o, Efl_Net_Dialer_Http_Data *pd) _secure_free(&pd->authentication.password); eina_stringshare_replace(&pd->ssl.ca, NULL); eina_stringshare_replace(&pd->ssl.crl, NULL); + + _c_shutdown(); } static void --