[EGIT] [core/efl] master 01/02: Efl: add class interfaces (color/text/size)
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2f838acd4ef0f3f914bb5d03081aef2fd1f412b5 commit 2f838acd4ef0f3f914bb5d03081aef2fd1f412b5 Author: Jee-Yong Um <jc9...@samsung.com> Date: Wed Nov 8 19:04:26 2017 +0900 Efl: add class interfaces (color/text/size) Summary: implement Efl.Gfx.Class interface Reviewers: jpeg, cedric Subscribers: taxi2se, herdsman Differential Revision: https://phab.enlightenment.org/D4403 --- src/Makefile_Edje.am | 1 + src/Makefile_Efl.am | 3 + src/lib/edje/Edje_Eo.h| 1 + src/lib/edje/Edje_Legacy.h| 143 +++- src/lib/edje/edje_global.eo | 12 ++ src/lib/edje/edje_main.c | 5 + src/lib/edje/edje_object.eo | 226 ++--- src/lib/edje/edje_private.h | 2 + src/lib/edje/edje_smart.c | 10 ++ src/lib/edje/edje_types.eot | 9 - src/lib/edje/edje_util.c | 231 ++ src/lib/efl/Efl.h | 3 + src/lib/efl/interfaces/efl_gfx_color_class.eo | 85 ++ src/lib/efl/interfaces/efl_gfx_size_class.eo | 49 ++ src/lib/efl/interfaces/efl_gfx_text_class.eo | 43 + src/lib/efl/interfaces/efl_gfx_types.eot | 8 + src/lib/efl/interfaces/efl_interfaces_main.c | 4 + src/lib/efl/interfaces/efl_text_properties.eo | 4 +- 18 files changed, 545 insertions(+), 294 deletions(-) diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am index b4299f171e..cf7d9f2655 100644 --- a/src/Makefile_Edje.am +++ b/src/Makefile_Edje.am @@ -5,6 +5,7 @@ edje_eolian_files = \ lib/edje/efl_canvas_layout_calc.eo \ lib/edje/efl_canvas_layout_signal.eo \ lib/edje/efl_canvas_layout_group.eo \ + lib/edje/edje_global.eo \ lib/edje/edje_object.eo \ lib/edje/efl_canvas_layout_part.eo \ lib/edje/efl_canvas_layout_part_box.eo \ diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index c4e866aaa3..f9cdc7fe3c 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -76,6 +76,9 @@ efl_eolian_files = \ lib/efl/interfaces/efl_ui_menu.eo \ lib/efl/interfaces/efl_ui_autorepeat.eo \ lib/efl/interfaces/efl_ui_format.eo \ + lib/efl/interfaces/efl_gfx_color_class.eo \ + lib/efl/interfaces/efl_gfx_text_class.eo \ + lib/efl/interfaces/efl_gfx_size_class.eo \ $(efl_eolian_legacy_files) \ $(NULL) diff --git a/src/lib/edje/Edje_Eo.h b/src/lib/edje/Edje_Eo.h index 877f3bea07..37c5db5ce0 100644 --- a/src/lib/edje/Edje_Eo.h +++ b/src/lib/edje/Edje_Eo.h @@ -3,6 +3,7 @@ #include "efl_canvas_layout_calc.eo.h" #include "efl_canvas_layout_signal.eo.h" #include "efl_canvas_layout_group.eo.h" +#include "edje_global.eo.h" #include "edje_object.eo.h" #include "edje_edit.eo.h" diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h index 24a913675f..edd30e25da 100644 --- a/src/lib/edje/Edje_Legacy.h +++ b/src/lib/edje/Edje_Legacy.h @@ -1213,6 +1213,147 @@ EAPI Eina_Bool edje_object_color_class_set(Evas_Object *obj, const char * color_ EAPI Eina_Bool edje_object_color_class_get(const Evas_Object *obj, const char * color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3); /** + * @brief Delete the object color class. + * + * This function deletes any values at the object level for the specified + * object and color class. + * + * Deleting the color class will revert it to the values defined by + * edje_color_class_set() or the color class defined in the theme file. + * + * Deleting the color class will emit the signal "color_class,del" for the + * given Edje object. + * + * @param[in] color_class The color class to be deleted. + * + * @ingroup Edje_Object + */ +EAPI void edje_object_color_class_del(Evas_Object *obj, const char *color_class); + +/** + * @brief Delete all color classes defined in object level. + * + * This function deletes any color classes defined in object level. + * Clearing color classes will revert the color of all edje parts to + * the values defined in global level or theme file. + * + * @return @c true, on success or @c false, on error + * + * @since 1.17.0 + * + * @ingroup Edje_Object + */ +EAPI Eina_Bool edje_object_color_class_clear(const Evas_Object *obj); + +/** + * @brief Sets Edje text class. + * + * This function sets the text class for the Edje. + * + * @param[in] text_class The text class name + * @param[in] font Font name + * @param[in] size Font Size + * + * @return @c true, on success or @c false, on error + * + * @ingroup Edje_Object + */ +EAPI Eina_Bool edje_object_text_class_set(Evas_Object *obj, const char * tex
[EGIT] [core/efl] master 01/01: edje_cc: update reference about LazEDC syntax
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fff984c96b38cada3f7140e1efdc31db472a3def commit fff984c96b38cada3f7140e1efdc31db472a3def Author: Jee-Yong Um <jc9...@samsung.com> Date: Mon Apr 25 11:55:18 2016 -0400 edje_cc: update reference about LazEDC syntax Summary: add programs block to the sample code of LazEDC, and add comment about possibility to omit "default" when part description inherits from "default". Reviewers: Hermet, zmike Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3915 --- src/bin/edje/edje_cc_handlers.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index c9d35c6..a5e43a7 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -1009,10 +1009,12 @@ New_Statement_Handler statement_handlers[] = rel1.relative: 0.5 0; rel2.relative: 1 1; } - desc { "t2"; inherit: "default"; + desc { "t2"; +inherit: "default"; color: 0 255 0 255; } - desc { "t3"; inherit: "default"; + desc { "t3"; +inherit; // "default" can be omitted. color: 0 0 255 255; } } --
[EGIT] [core/efl] master 01/02: edje: add note to the reference of .part_object_get()
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=076037bd55a9d9f4ffe66200f2f30e264e32eb10 commit 076037bd55a9d9f4ffe66200f2f30e264e32eb10 Author: Jee-Yong Um <jc9...@samsung.com> Date: Fri Apr 22 15:17:01 2016 -0700 edje: add note to the reference of .part_object_get() Summary: For EDJE_RP_TYPE_SWALLOW objects (like GROUP, SWALLOW, EXTERNAL), edje_object_part_object_get() will return NULL or transparent rectangle. The note is added to have developers use edje_object_part_swallow_get() in that case. Reviewers: jpeg, Hermet, cedric Reviewed By: cedric Subscribers: Hermet Differential Revision: https://phab.enlightenment.org/D3859 Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- src/lib/edje/edje_object.eo | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo index 305684c..5e5cf5b 100644 --- a/src/lib/edje/edje_object.eo +++ b/src/lib/edje/edje_object.eo @@ -1202,7 +1202,11 @@ class Edje.Object (Evas.Smart_Clipped, Efl.File) because it's meant to be managed by Edje, solely. You are safe to query information about its current state (with evas_object_visible_get() or \@ref evas_object_color_get() for - example), though.]] + example), though. + + Note: If the type of Edje part is GROUP, SWALLOW or EXTERNAL, + returned handle by this function will indicate nothing or transparent + rectangle for events. Use @.part_swallow_get() in that case.]] return: const(Evas.Object)*; [[A pointer to the Evas object implementing the given part, or $null on failure (e.g. the given part doesn't exist)]] params { --
[EGIT] [core/efl] master 01/01: genlist: scroll to item when calc is done
sanghyeonlee pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=87b12327c3356ac8233cb5a08260625221239153 commit 87b12327c3356ac8233cb5a08260625221239153 Author: Jee-Yong Um <jc9...@samsung.com> Date: Tue Apr 19 13:59:59 2016 +0900 genlist: scroll to item when calc is done Summary: If elm_genlist_item_bring_in() is called immediately after appending item, genlist will not scroll to the last one but stop in the middle. This patch blocks genlist from scrolling to not calculated item. Test Plan: 1. Uncompress attached file 2. make 3. ./test Reviewers: cedric, SanghyeonLee Reviewed By: SanghyeonLee Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3861 --- src/lib/elementary/elm_genlist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index f204537..1e8ec97 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -582,6 +582,9 @@ _item_scroll(Elm_Genlist_Data *sd) dw = it->item->block->w; dh = oh; + // hold on scrolling to item until block size calculation is finished. + if (dw < 1) return; + switch (sd->scroll_to_type) { case ELM_GENLIST_ITEM_SCROLLTO_TOP: --
[EGIT] [core/efl] master 04/04: elementary: remove redundant reswallow logic in elm_layout
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3f17d0d090b98cb1b60526da4eadf754d54c052c commit 3f17d0d090b98cb1b60526da4eadf754d54c052c Author: Jee-Yong Um <jc9...@samsung.com> Date: Mon Apr 18 16:33:41 2016 -0700 elementary: remove redundant reswallow logic in elm_layout Summary: When theme is changed by elm_layout_theme/file_set, _edje_object_file_set_internal will be called internally and it updates swallowed objects. Elm.Layout doesn't need to reswallow its child objects. (with current code, searching cost for real part occurs.) Reviewers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3898 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elementary/elm_layout.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c index 6569d79..2995a32 100644 --- a/src/lib/elementary/elm_layout.c +++ b/src/lib/elementary/elm_layout.c @@ -224,23 +224,6 @@ _parts_signals_emit(Elm_Layout_Smart_Data *sd) } static void -_parts_swallow_fix(Elm_Layout_Smart_Data *sd, Elm_Widget_Smart_Data *wd) -{ - Eina_List *l; - Elm_Layout_Sub_Object_Data *sub_d; - - EINA_LIST_FOREACH(sd->subs, l, sub_d) - { -if (sub_d->type == SWALLOW) - { - if (sub_d->part) - edje_object_part_swallow(wd->resize_obj, -sub_d->part, sub_d->obj); - } - } -} - -static void _parts_text_fix(Elm_Layout_Smart_Data *sd) { const Eina_List *l; @@ -333,7 +316,6 @@ _visuals_refresh(Evas_Object *obj, ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); - _parts_swallow_fix(sd, wd); _parts_text_fix(sd); _parts_signals_emit(sd); _parts_cursors_apply(sd); --
[EGIT] [core/efl] master 02/04: edje: add test for edje_object_part_box_insert_after()
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=11cdd13945f43fa720672587565e6f4ccaa122ae commit 11cdd13945f43fa720672587565e6f4ccaa122ae Author: Jee-Yong Um <jc9...@samsung.com> Date: Mon Apr 18 16:17:45 2016 -0700 edje: add test for edje_object_part_box_insert_after() Summary: This test checks the validity of edje_object_part_box_insert_after(). It depends on D3733. Reviewers: jpeg, cedric Differential Revision: https://phab.enlightenment.org/D3833 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/Makefile_Edje.am | 4 +++- src/tests/edje/data/test_box.edc | 14 ++ src/tests/edje/edje_test_edje.c | 40 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am index 54bf1ce..a25592b 100644 --- a/src/Makefile_Edje.am +++ b/src/Makefile_Edje.am @@ -255,6 +255,7 @@ tests/edje/data/test_snapshot.edc \ tests/edje/data/test_size_class.edc \ tests/edje/data/test_color_class.edc \ tests/edje/data/test_swallows.edc \ +tests/edje/data/test_box.edc \ tests/edje/data/filter.lua @@ -299,7 +300,8 @@ EDJE_TEST_FILES = tests/edje/data/test_layout.edj \ tests/edje/data/test_snapshot.edj \ tests/edje/data/test_size_class.edj \ tests/edje/data/test_swallows.edj \ - tests/edje/data/test_color_class.edj + tests/edje/data/test_color_class.edj \ +tests/edje/data/test_box.edj noinst_DATA += $(EDJE_TEST_FILES) CLEANFILES += $(EDJE_TEST_FILES) diff --git a/src/tests/edje/data/test_box.edc b/src/tests/edje/data/test_box.edc new file mode 100644 index 000..b89fa84 --- /dev/null +++ b/src/tests/edje/data/test_box.edc @@ -0,0 +1,14 @@ +collections { + group { "test_group"; + parts { + part { name: "box"; +type: BOX; +description { state: "default" 0.0; + box { + layout: "horizontal"; + } +} + } + } + } +} diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c index 658f115..a576ac3 100644 --- a/src/tests/edje/edje_test_edje.c +++ b/src/tests/edje/edje_test_edje.c @@ -381,6 +381,45 @@ START_TEST(edje_test_swallows) } END_TEST +START_TEST(edje_test_box) +{ + Evas *evas; + Evas_Object *obj, *sobj, *sobjs[5]; + const Evas_Object *box; + Eina_Iterator *it; + int i; + + evas = EDJE_TEST_INIT_EVAS(); + + obj = edje_object_add(evas); + fail_unless(edje_object_file_set(obj, test_layout_get("test_box.edj"), "test_group")); + + for (i = 0; i < 5; i++) + { +sobjs[i] = evas_object_rectangle_add(evas); +fail_if(!sobjs[i]); + } + + edje_object_part_box_append(obj, "box", sobjs[3]); + edje_object_part_box_prepend(obj, "box", sobjs[1]); + edje_object_part_box_insert_before(obj, "box", sobjs[0], sobjs[1]); + edje_object_part_box_insert_after(obj, "box", sobjs[4], sobjs[3]); + edje_object_part_box_insert_at(obj, "box", sobjs[2], 2); + + box = edje_object_part_object_get(obj, "box"); + it = evas_object_box_iterator_new(box); + + i = 0; + EINA_ITERATOR_FOREACH(it, sobj) + { +fail_if(sobj != sobjs[i++]); + } + eina_iterator_free(it); + + EDJE_TEST_FREE_EVAS(); +} +END_TEST + void edje_test_edje(TCase *tc) { tcase_add_test(tc, edje_test_edje_init); @@ -395,4 +434,5 @@ void edje_test_edje(TCase *tc) tcase_add_test(tc, edje_test_size_class); tcase_add_test(tc, edje_test_color_class); tcase_add_test(tc, edje_test_swallows); + tcase_add_test(tc, edje_test_box); } --
[EGIT] [core/efl] master 01/01: list: fix item highlight geometry correctly
jaehyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f7a4a2b2a04d3135f874bc0760db90a247b8f270 commit f7a4a2b2a04d3135f874bc0760db90a247b8f270 Author: Jee-Yong Um <jc9...@samsung.com> Date: Fri Apr 8 17:47:11 2016 +0900 list: fix item highlight geometry correctly Summary: Calculation for item highlight geometry is incorrect when item is larger than viewport geometry. This patch adjusts highlight geometry to fit visible item size. Test Plan: enventor (look "Settings-Text Editor-Font Names" list) Reviewers: Jaehyun_Cho Subscribers: jpeg, cedric Differential Revision: https://phab.enlightenment.org/D3738 --- src/lib/elementary/elm_list.c | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c index 14164dc..9a0e71b 100644 --- a/src/lib/elementary/elm_list.c +++ b/src/lib/elementary/elm_list.c @@ -3097,30 +3097,27 @@ _elm_list_item_coordinates_adjust(Elm_List_Item_Data *it, Evas_Coord *w, Evas_Coord *h) { - ELM_LIST_DATA_GET_FROM_ITEM(it, sd); - Evas_Coord ix, iy, iw, ih, vx, vy, vw, vh; - evas_object_geometry_get(sd->hit_rect, , , , ); + elm_interface_scrollable_content_viewport_geometry_get(WIDGET(it), , , , ); evas_object_geometry_get(VIEW(it), , , , ); + + if (iy < vy) + iy = vy; + + if ((iy + ih) > (vy + vh)) + ih = (vy + vh - iy); + + if (ix < vx) + ix = vx; + + if ((ix + iw) > (vx + vw)) + iw = (vx + vw - ix); + *x = ix; *y = iy; *w = iw; *h = ih; - if (!sd->h_mode) - { -if (ELM_RECTS_X_AXIS_OUT(ix, iy, iw, ih, vx, vy, vw, vh)) - *y = iy - ih; -else if (iy < vy) - *y = iy + ih; - } - else - { -if (ELM_RECTS_Y_AXIS_OUT(ix, iy, iw, ih, vx, vy, vw, vh)) - *x = ix - iw; -else if (ix < vx) - *x = ix + iw; - } } EOLIAN static void --
[EGIT] [core/efl] master 01/01: edje_cc: fix parsing error when some keywords are used as part name
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e260f23c94bbc8d5175337e1a1a50fe5d97ded7e commit e260f23c94bbc8d5175337e1a1a50fe5d97ded7e Author: Jee-Yong Um <jc9...@samsung.com> Date: Tue Mar 29 17:35:04 2016 +0900 edje_cc: fix parsing error when some keywords are used as part name Summary: Some keywords cause parsing error when they are used as part name. For example, group { "some_group"; parts { box { "box"; } } } The part name "box" should be processed by wildcard handler, but this is pushed into stack. (collections.group.parts.part.box ...) This patch pushes token into stack only when it doesn't have quotes. @fix Reviewers: cedric, raster, jpeg Reviewed By: jpeg Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3841 --- src/bin/edje/edje_cc_parse.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/bin/edje/edje_cc_parse.c b/src/bin/edje/edje_cc_parse.c index 31eab32..542079a 100644 --- a/src/bin/edje/edje_cc_parse.c +++ b/src/bin/edje/edje_cc_parse.c @@ -185,14 +185,17 @@ static void new_object(void) { const char *id; - New_Object_Handler *oh; + New_Object_Handler *oh = NULL; New_Statement_Handler *sh; fill_object_statement_hashes(); id = stack_id(); - oh = eina_hash_find(_new_object_hash, id); - if (!oh) - oh = eina_hash_find(_new_object_short_hash, id); + if (!had_quote) + { +oh = eina_hash_find(_new_object_hash, id); +if (!oh) + oh = eina_hash_find(_new_object_short_hash, id); + } if (oh) { if (oh->func) oh->func(); --
[EGIT] [core/efl] master 02/02: edje: add edje_object_box_part_insert_after()
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=aa920444224785527ce718fb2f41adcd45a0cdd0 commit aa920444224785527ce718fb2f41adcd45a0cdd0 Author: Jee-Yong Um <jc9...@samsung.com> Date: Mon Mar 28 11:24:02 2016 -0700 edje: add edje_object_box_part_insert_after() Summary: In evas and elm box, function for inserting child object after referenced one is available, but edje doesn't have it. This adds edje_object_box_part_insert_after() API. @feature Reviewers: raster, jpeg, cedric Reviewed By: jpeg Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3733 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/edje/edje_object.eo | 30 - src/lib/edje/edje_private.h | 1 + src/lib/edje/edje_util.c| 47 + 3 files changed, 73 insertions(+), 5 deletions(-) diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo index 63f4c22..be0c902 100644 --- a/src/lib/edje/edje_object.eo +++ b/src/lib/edje/edje_object.eo @@ -1030,7 +1030,8 @@ class Edje.Object (Evas.Smart_Clipped, Efl.File) Adds child to the box indicated by part, in the position given by pos. - See also @.part_box_append(), @.part_box_prepend() and @.part_box_insert_before()]] + See also @.part_box_append(), @.part_box_prepend(), + @.part_box_insert_before() and @.part_box_insert_after()]] return: bool; [[$true: Successfully added. $false: An error occurred.]] @@ -1097,7 +1098,8 @@ class Edje.Object (Evas.Smart_Clipped, Efl.File) Prepends child to the box indicated by part. - See also @.part_box_append(), @.part_box_insert_before() and @.part_box_insert_at()]] + See also @.part_box_append(), @.part_box_insert_before(), + @.part_box_insert_after and @.part_box_insert_at()]] return: bool; [[$true: Successfully added. $false: An error occurred.]] @@ -1594,7 +1596,25 @@ class Edje.Object (Evas.Smart_Clipped, Efl.File) Inserts child in the box given by part, in the position marked by reference. - See also @.part_box_append(), @.part_box_prepend() and @.part_box_insert_at()]] + See also @.part_box_append(), @.part_box_prepend(), + @.part_box_insert_after() and @.part_box_insert_at()]] + + return: bool; [[$true: Successfully added. + $false: An error occurred.]] + params { +@in part: const(char)*; [[The part name]] +@in child: Evas.Object *; [[The object to insert]] +@in reference: const(Evas.Object)*; [[The object to be used as reference]] + } + } + part_box_insert_after { + [[Adds an object to the box. + + Inserts child in the box given by part, in the position marked by + reference. + + See also @.part_box_append(), @.part_box_prepend(), + @.part_box_insert_before() and @.part_box_insert_at()]] return: bool; [[$true: Successfully added. $false: An error occurred.]] @@ -1680,8 +1700,8 @@ class Edje.Object (Evas.Smart_Clipped, Efl.File) Appends child to the box indicated by part. - See also @.part_box_prepend(), @.part_box_insert_before() - and @.part_box_insert_at()]] + See also @.part_box_prepend(), @.part_box_insert_before(), + @.part_box_insert_after() and @.part_box_insert_at()]] return: bool; [[$true: Successfully added. $false: An error occurred.]] diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index 402c50f..517a2ca 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -2428,6 +2428,7 @@ Edje_Part_Description_Text *_edje_real_part_text_text_source_description_get(Edj Eina_Bool _edje_real_part_box_append(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj); Eina_Bool _edje_real_part_box_prepend(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj); Eina_Bool _edje_real_part_box_insert_before(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref); +Eina_Bool _edje_real_part_box_insert_after(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref); Eina_Bool _edje_real_part_box_insert_at(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, unsigned int pos); Evas_Object *_edje_real_part_box_remove(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj); Evas_Object *_edje_real_part_box_remove_at(Edje *ed, Edje_Real_Part *rp, unsigned int pos); diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index cb6300d..97e00f9 100644 --- a/
[EGIT] [core/efl] master 02/02: edje_cc: support hexadecimal color code
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=984a8f7f90e7457a3055101ec236a0f4288e179e commit 984a8f7f90e7457a3055101ec236a0f4288e179e Author: Jee-Yong Um <jc9...@samsung.com> Date: Mon Mar 28 15:36:41 2016 +0900 edje_cc: support hexadecimal color code Summary: Support hexadecimal color code in EDC. Four types of color code are acceptable. All values below mean 'Red'. (255 0 0 255) color: "#F00"; color: "#F00F"; color: "#FF"; color: "#FFFF"; Color code tables are usually provided with hexadecimal numbers. Supporting hexadecimal color code will allow developers to skip manual conversion hex to decimal. Test Plan: Test case will provided with seperated commit. Reviewers: cedric, jpeg, raster Reviewed By: raster Subscribers: raster Differential Revision: https://phab.enlightenment.org/D3831 --- src/bin/edje/edje_cc.h | 1 + src/bin/edje/edje_cc_handlers.c | 191 src/bin/edje/edje_cc_out.c | 99 + 3 files changed, 255 insertions(+), 36 deletions(-) diff --git a/src/bin/edje/edje_cc.h b/src/bin/edje/edje_cc.h index 159d7ca..65299b5 100644 --- a/src/bin/edje/edje_cc.h +++ b/src/bin/edje/edje_cc.h @@ -253,6 +253,7 @@ void edje_cc_handlers_pop_notify(const char *token); int get_param_index(char *str); void color_tree_root_free(void); +void convert_color_code(char *str, int *r, int *g, int *b, int *a); /* global vars */ extern Eina_List *ext_dirs; diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 26f53ca..382f4bc 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -2803,14 +2803,34 @@ static void st_color_class_color(void) { Edje_Color_Class *cc; - - check_arg_count(4); + int nargs = get_arg_count(); cc = eina_list_data_get(eina_list_last(edje_file->color_classes)); - cc->r = parse_int_range(0, 0, 255); - cc->g = parse_int_range(1, 0, 255); - cc->b = parse_int_range(2, 0, 255); - cc->a = parse_int_range(3, 0, 255); + + if (nargs == 1) + { +int r, g, b, a; +char *str = parse_str(0); + +convert_color_code(str, , , , ); +cc->r = r; +cc->g = g; +cc->b = b; +cc->a = a; + } + else if (nargs == 4) + { +cc->r = parse_int_range(0, 0, 255); +cc->g = parse_int_range(1, 0, 255); +cc->b = parse_int_range(2, 0, 255); +cc->a = parse_int_range(3, 0, 255); + } + else + { +ERR("%s:%i. color code should be a string or a set of 4 integers.", +file_in, line - 1); +exit(-1); + } } /** @@ -2827,14 +2847,34 @@ static void st_color_class_color2(void) { Edje_Color_Class *cc; - - check_arg_count(4); + int nargs = get_arg_count(); cc = eina_list_data_get(eina_list_last(edje_file->color_classes)); - cc->r2 = parse_int_range(0, 0, 255); - cc->g2 = parse_int_range(1, 0, 255); - cc->b2 = parse_int_range(2, 0, 255); - cc->a2 = parse_int_range(3, 0, 255); + + if (nargs == 1) + { +int r, g, b, a; +char *str = parse_str(0); + +convert_color_code(str, , , , ); +cc->r2 = r; +cc->g2 = g; +cc->b2 = b; +cc->a2 = a; + } + else if (nargs == 4) + { +cc->r2 = parse_int_range(0, 0, 255); +cc->g2 = parse_int_range(1, 0, 255); +cc->b2 = parse_int_range(2, 0, 255); +cc->a2 = parse_int_range(3, 0, 255); + } + else + { +ERR("%s:%i. color code should be a string or a set of 4 integers.", +file_in, line - 1); +exit(-1); + } } /** @@ -2851,14 +2891,34 @@ static void st_color_class_color3(void) { Edje_Color_Class *cc; - - check_arg_count(4); + int nargs = get_arg_count(); cc = eina_list_data_get(eina_list_last(edje_file->color_classes)); - cc->r3 = parse_int_range(0, 0, 255); - cc->g3 = parse_int_range(1, 0, 255); - cc->b3 = parse_int_range(2, 0, 255); - cc->a3 = parse_int_range(3, 0, 255); + + if (nargs == 1) + { +int r, g, b, a; +char *str = parse_str(0); + +convert_color_code(str, , , , ); +cc->r3 = r; +cc->g3 = g; +cc->b3 = b; +cc->a3 = a; + } + else if (nargs == 4) + { +cc->r3 = parse_int_range(0, 0, 255); +cc->g3 = parse_int_range(1, 0, 255); +cc->b3 = parse_int_range(2, 0, 255); +cc->a3 = parse_int_range(3, 0, 255); + } + else + { +ERR("%s:%i. color code should be a string or a set of 4 integers.", +file_in, line - 1);
[EGIT] [website/www-content] master 02/10: Wiki page basic_concepts changed with summary [fix typo] by Jee-Yong Um
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=49d10f15bd4f1f720bb2ca521e51724d9e79c739 commit 49d10f15bd4f1f720bb2ca521e51724d9e79c739 Author: Jee-Yong Um <con...@gmail.com> Date: Wed Mar 9 01:09:47 2016 -0800 Wiki page basic_concepts changed with summary [fix typo] by Jee-Yong Um --- pages/program_guide/edje/basic_concepts.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/program_guide/edje/basic_concepts.txt b/pages/program_guide/edje/basic_concepts.txt index 4450422..c64d9e1 100644 --- a/pages/program_guide/edje/basic_concepts.txt +++ b/pages/program_guide/edje/basic_concepts.txt @@ -320,8 +320,8 @@ move. With this, the pixel addressed through ''relative: 0.75 0.75; offset: 0 This comes from a design choice in Evas and Edje which favor simplicity. In the examples shown in this guide, there are 4 pixels and therefore when the ''[0; 1)'' range is divided in 4, the result is ''[0; 0.25), [0.25; 0.50), -[0.50; 0.75), [0.75; 0.100)''. With Edje, the value used to refer to each -segment is the left bound and therefore, 0.75 refers to ''[0.75; 0.100)'', +[0.50; 0.75), [0.75; 1.00)''. With Edje, the value used to refer to each +segment is the left bound and therefore, 0.75 refers to ''[0.75; 1.00)'', i.e. the bottom-right pixel of the green rectangle and not the 3/4th one. The way to refer to the pixel right before is to set the ''rel2'' bound to --
[EGIT] [core/efl] master 04/05: edje_cc: fix inheriting script from other group
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4a63c917aa6a2da459a6a5da494227f18dfc46c7 commit 4a63c917aa6a2da459a6a5da494227f18dfc46c7 Author: Jee-Yong Um <jc9...@samsung.com> Date: Fri Mar 18 13:30:55 2016 +0900 edje_cc: fix inheriting script from other group Summary: If a group inherits from the other, group script block is copied only when there are program script blocks in parent group. This patch makes edje_cc always copies group script block, but allows to override group script block in child group. The content of reverted D3799 is included. That reveals this inconsistency. Reviewers: cedric Subscribers: Jaehyun_Cho, woohyun, jpeg Differential Revision: https://phab.enlightenment.org/D3802 --- src/bin/edje/edje_cc_handlers.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 8fb43cf..edc3542 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -163,6 +163,7 @@ static Edje_Part_Description_Common *parent_desc = NULL; static Edje_Program *current_program = NULL; static Eina_List *current_program_lookups = NULL; Eina_Bool current_group_inherit = EINA_FALSE; +Eina_Bool script_override = EINA_TRUE; static Edje_Program *sequencing = NULL; static Eina_List *sequencing_lookups = NULL; @@ -3874,8 +3875,8 @@ ob_collections_group(void) current_part = NULL; current_desc = NULL; - current_group_inherit = EINA_FALSE; + script_override = EINA_FALSE; current_de = mem_alloc(SZ(Edje_Part_Collection_Directory_Entry)); current_de->id = eina_list_count(edje_collections); @@ -4438,6 +4439,11 @@ st_collections_group_inherit(void) cd2 = eina_list_nth(codes, de->id); cd = eina_list_data_get(eina_list_last(codes)); + cd->is_lua = cd2->is_lua; + cd->shared = STRDUP(cd2->shared); + cd->original = STRDUP(cd2->original); + script_override = EINA_TRUE; + EINA_LIST_FOREACH(cd2->programs, l, cp2) { cp = mem_alloc(SZ(Code_Program)); @@ -4446,9 +4452,6 @@ st_collections_group_inherit(void) cp->l2 = cp2->l2; cp->script = STRDUP(cp2->script); cp->original = STRDUP(cp2->original); -cd->is_lua = cd2->is_lua; -cd->shared = STRDUP(cd2->shared); -cd->original = STRDUP(cd2->original); cd->programs = eina_list_append(cd->programs, cp); data_queue_copied_anonymous_lookup(pc, &(cp2->id), &(cp->id)); } @@ -4785,9 +4788,18 @@ ob_collections_group_script(void) cd->l2 = get_verbatim_line2(); if (cd->shared) { - ERR("parse error %s:%i. There is already an existing script section for the group", - file_in, line - 1); - exit(-1); + if (script_override) +{ + free(cd->shared); + free(cd->original); + script_override = EINA_FALSE; +} + else +{ + ERR("parse error %s:%i. There is already an existing script section for the group", + file_in, line - 1); + exit(-1); +} } cd->shared = s; cd->original = strdup(s); --
[EGIT] [core/efl] master 01/02: edje_cc: make script_override default value as EINA_FALSE
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=20c9d087d1d17716c120a3653e74323b6525c792 commit 20c9d087d1d17716c120a3653e74323b6525c792 Author: Jee-Yong Um <jc9...@samsung.com> Date: Fri Mar 18 11:52:52 2016 -0700 edje_cc: make script_override default value as EINA_FALSE Summary: script_override variable is initialized as EINA_FALSE when group is created, but assign EINA_TRUE can mislead some developers to think script_override default value is EINA_TRUE. Reviewers: Jaehyun_Cho Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3803 Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- src/bin/edje/edje_cc_handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index edc3542..26f53ca 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -163,7 +163,7 @@ static Edje_Part_Description_Common *parent_desc = NULL; static Edje_Program *current_program = NULL; static Eina_List *current_program_lookups = NULL; Eina_Bool current_group_inherit = EINA_FALSE; -Eina_Bool script_override = EINA_TRUE; +Eina_Bool script_override = EINA_FALSE; static Edje_Program *sequencing = NULL; static Eina_List *sequencing_lookups = NULL; --
[EGIT] [core/efl] master 02/03: edje: remove unnecessary repetition during copying code
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=37408aef95ee5794f9030ece34be9d6b097d064e commit 37408aef95ee5794f9030ece34be9d6b097d064e Author: Jee-Yong Um <jc9...@samsung.com> Date: Thu Mar 17 11:13:10 2016 -0700 edje: remove unnecessary repetition during copying code Summary: Code doesn't need to be copied every time when program is copied. Reviewers: cedric Reviewed By: cedric Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3799 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/bin/edje/edje_cc_handlers.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 8fb43cf..5c6f14d 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -4438,6 +4438,10 @@ st_collections_group_inherit(void) cd2 = eina_list_nth(codes, de->id); cd = eina_list_data_get(eina_list_last(codes)); + cd->is_lua = cd2->is_lua; + cd->shared = STRDUP(cd2->shared); + cd->original = STRDUP(cd2->original); + EINA_LIST_FOREACH(cd2->programs, l, cp2) { cp = mem_alloc(SZ(Code_Program)); @@ -4446,9 +4450,6 @@ st_collections_group_inherit(void) cp->l2 = cp2->l2; cp->script = STRDUP(cp2->script); cp->original = STRDUP(cp2->original); -cd->is_lua = cd2->is_lua; -cd->shared = STRDUP(cd2->shared); -cd->original = STRDUP(cd2->original); cd->programs = eina_list_append(cd->programs, cp); data_queue_copied_anonymous_lookup(pc, &(cp2->id), &(cp->id)); } --
[EGIT] [core/efl] master 03/08: edje_cc: fix typo in error message
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a91d5e8f7240009fc17681f6163b1214923eaafa commit a91d5e8f7240009fc17681f6163b1214923eaafa Author: Jee-Yong Um <jc9...@samsung.com> Date: Tue Mar 15 11:24:20 2016 -0700 edje_cc: fix typo in error message Summary: meaningless suffix is attached to a word in error message. Reviewers: cedric Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3794 Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- 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 a900b40..534c695 100644 --- a/src/bin/edje/edje_cc_out.c +++ b/src/bin/edje/edje_cc_out.c @@ -1357,7 +1357,7 @@ data_check_models(Eet_File *ef EINA_UNUSED, int *model_num EINA_UNUSED) } if (!file_exist) { - ERR("Unablegstsh to load model \"%s\". Check if path to file is correct (both directory and file name).", + ERR("Unable to load model \"%s\". Check if path to file is correct (both directory and file name).", model->entry); exit(-1); } --
[EGIT] [core/efl] master 05/08: edje_cc: remove unnecessary internal function
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=afb49ec0962a48f0c500891853840c4b2882292f commit afb49ec0962a48f0c500891853840c4b2882292f Author: Jee-Yong Um <jc9...@samsung.com> Date: Tue Mar 15 11:31:30 2016 -0700 edje_cc: remove unnecessary internal function Summary: This internal function was made for checking non-existence of Edje Part when handling insert_before/after attributes. However, checking is implemented in different way and this function is not used anywhere. Reviewers: cedric Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3790 Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- src/bin/edje/edje_cc_out.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c index 534c695..3a063ba 100644 --- a/src/bin/edje/edje_cc_out.c +++ b/src/bin/edje/edje_cc_out.c @@ -4123,32 +4123,6 @@ using_file(const char *filename, const char type) } } -Eina_Bool -needed_part_exists(Edje_Part_Collection *pc, const char *name) -{ - Eina_Bool found; - unsigned int i; - - found = EINA_FALSE; - - for (i = 0; i < pc->parts_count; i++) - { -if (!strcmp(pc->parts[i]->name, name)) - { - found = EINA_TRUE; - break; - } - } - - if (!found) - { -ERR("Unable to find part name \"%s\" needed in group \"%s\".", -name, pc->part); -exit(-1); - } - return found; -} - void color_tree_root_free(void) { --
[EGIT] [core/efl] master 04/08: edje: fix wrong char in error message
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4c2628b03ece105a6be77e128ef7f5c4a2344a65 commit 4c2628b03ece105a6be77e128ef7f5c4a2344a65 Author: Jee-Yong Um <con...@gmail.com> Date: Tue Mar 15 11:29:47 2016 -0700 edje: fix wrong char in error message Summary: fix wrong char in error message of _edje_real_part_image_set() Reviewers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3792 Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- src/lib/edje/edje_calc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index 2a2ada6..d8c607f 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -629,7 +629,7 @@ _edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part_Set **set } if (image_id < 0) { - ERR("¨Part \"%s\" description, " + ERR("Part \"%s\" description, " "\"%s\" %3.3f with image %i index has a missing image id in a set of %i !!!", ep->part->name, ep->param1.description->state.name, --
[EGIT] [core/efl] master 06/08: edje: remove redundant fetch code in file.set method
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bdde588b164ffbd23839a701cf789b94b05077bb commit bdde588b164ffbd23839a701cf789b94b05077bb Author: Jee-Yong Um <jc9...@samsung.com> Date: Tue Mar 15 11:39:47 2016 -0700 edje: remove redundant fetch code in file.set method Summary: Edje data structure is passed as a parameter, but in file.set method _edje_fetch() is called one more time unnecessarily. Reviewers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3788 Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- src/lib/edje/edje_smart.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index ab42445..a8ef1bc 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -338,7 +338,7 @@ _edje_object_evas_object_smart_calculate(Eo *obj EINA_UNUSED, Edje *ed) } EOLIAN static Eina_Bool -_edje_object_efl_file_file_set(Eo *obj, Edje *_pd EINA_UNUSED, const char *file, const char *group) +_edje_object_efl_file_file_set(Eo *obj, Edje *ed, const char *file, const char *group) { Eina_Bool ret; Eina_File *f = NULL; @@ -351,9 +351,6 @@ _edje_object_efl_file_file_set(Eo *obj, Edje *_pd EINA_UNUSED, const char *file, f = eina_file_open(file, EINA_FALSE); if (!f) { - Edje *ed; - - ed = _edje_fetch(obj); ed->load_error = EDJE_LOAD_ERROR_DOES_NOT_EXIST; return ret; } --
[EGIT] [core/elementary] master 01/01: colorclass: allocate memory to fit the original size of data type
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=60ca712654d58998e62d621b3a586abb151c6868 commit 60ca712654d58998e62d621b3a586abb151c6868 Author: Jee-Yong Um <jc9...@samsung.com> Date: Thu Mar 10 11:04:03 2016 -0500 colorclass: allocate memory to fit the original size of data type Summary: The size of Colorclass is 20 bytes, but that of Elm_Color_Overlay 16 bytes. Currently, there is no code to access last 4 bytes, but it can cause seg fault by another patch. Reviewers: cedric, zmike Differential Revision: https://phab.enlightenment.org/D3784 --- src/lib/elm_color_class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elm_color_class.c b/src/lib/elm_color_class.c index c2ea17c..856f590 100644 --- a/src/lib/elm_color_class.c +++ b/src/lib/elm_color_class.c @@ -212,7 +212,7 @@ _colorclass_activate(void *data, const Eo_Event *event) } else { -cc->current = malloc(sizeof(Elm_Color_Overlay)); +cc->current = calloc(1, sizeof(Colorclass)); //actually Elm_Color_Overlay memcpy(cc->current, ecc, sizeof(Elm_Color_Overlay)); cc->current->name = eina_stringshare_ref(ecc->name); } --
[EGIT] [core/elementary] master 01/01: fileselector: clarify the condition statement for checking ok button
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=1393440bda42090c9fe5b1080bb73c8e52e2be96 commit 1393440bda42090c9fe5b1080bb73c8e52e2be96 Author: Jee-Yong Um <jc9...@samsung.com> Date: Mon Mar 7 11:26:15 2016 +0100 fileselector: clarify the condition statement for checking ok button Summary: elm_fileselector_buttons_ok_cancel_set() API checks the existence of ok button before adding it. This patch makes condition statement more intuitive. Reviewers: cedric, bu5hm4n Differential Revision: https://phab.enlightenment.org/D3770 --- src/lib/elc_fileselector.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c index 5dd263c..36680ec 100644 --- a/src/lib/elc_fileselector.c +++ b/src/lib/elc_fileselector.c @@ -1712,12 +1712,10 @@ EOLIAN static void _elm_fileselector_buttons_ok_cancel_set(Eo *obj, Elm_Fileselector_Data *sd, Eina_Bool visible) { Evas_Object *bt; - Eina_Bool bt_exists = EINA_FALSE; visible = !!visible; - bt_exists = !!sd->ok_button; - if (!(visible ^ bt_exists)) return; + if (!visible == !sd->ok_button) return; if (visible) { --
[EGIT] [core/elementary] master 03/11: win: add check for focus object before adding new one
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=859f31102e9b4d776a144872a4b839cc509a9628 commit 859f31102e9b4d776a144872a4b839cc509a9628 Author: Jee-Yong Um <jc9...@samsung.com> Date: Fri Mar 4 15:37:17 2016 -0800 win: add check for focus object before adding new one Summary: Focus object is added repeatedly, when focus is enabled. This patch checks existing focus object. Test Plan: elementary_test -to focus check/uncheck "Focus Highlight Enable" with spacebar Reviewers: Jaehyun_Cho, jpeg, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3689 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elm_win.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 900a0af..70f5392 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -2713,15 +2713,18 @@ _elm_win_focus_highlight_init(Elm_Win_Data *sd) } sd->focus_highlight.prev.target = NULL; - sd->focus_highlight.fobj = edje_object_add(sd->evas); sd->focus_highlight.theme_changed = EINA_TRUE; + if (!sd->focus_highlight.fobj) + { +sd->focus_highlight.fobj = edje_object_add(sd->evas); +edje_object_signal_callback_add(sd->focus_highlight.fobj, +"elm,action,focus,hide,end", "*", +_elm_win_focus_highlight_hide, NULL); +edje_object_signal_callback_add(sd->focus_highlight.fobj, +"elm,action,focus,anim,end", "*", +_elm_win_focus_highlight_anim_end, sd->obj); + } - edje_object_signal_callback_add(sd->focus_highlight.fobj, - "elm,action,focus,hide,end", "*", - _elm_win_focus_highlight_hide, NULL); - edje_object_signal_callback_add(sd->focus_highlight.fobj, - "elm,action,focus,anim,end", "*", - _elm_win_focus_highlight_anim_end, sd->obj); _elm_win_focus_highlight_reconfigure_job_start(sd); } --
[EGIT] [core/elementary] master 03/03: elm_gen: update highlight geometry after clearing items
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=8c9acb744dea51ffe3bd38db454e7f2cef6a7c7f commit 8c9acb744dea51ffe3bd38db454e7f2cef6a7c7f Author: Jee-Yong Um <jc9...@samsung.com> Date: Fri Feb 19 15:58:30 2016 -0800 elm_gen: update highlight geometry after clearing items Summary: After genlist/genrid items are cleared, item highlight still remains in blank space. This patch fixes this by updating highlight. Test Plan: elementary_test -to fileselector enter blank directory and see highlight still remains Reviewers: jpeg, SanghyeonLee, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3683 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elm_gengrid.c | 2 ++ src/lib/elm_genlist.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index af51cb5..bf9b1f8 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -4106,6 +4106,8 @@ _internal_elm_gengrid_clear(Evas_Object *obj, eo_do(obj, elm_interface_scrollable_content_region_show(0, 0, 0, 0)); evas_event_thaw(evas_object_evas_get(obj)); evas_event_thaw_eval(evas_object_evas_get(obj)); + + _elm_widget_focus_highlight_start(obj); } static void diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index a3c419a..89130a9 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -5793,6 +5793,8 @@ _internal_elm_genlist_clear(Evas_Object *obj) evas_event_thaw(evas_object_evas_get(sd->obj)); evas_event_thaw_eval(evas_object_evas_get(sd->obj)); + + _elm_widget_focus_highlight_start(obj); } /* Return EINA_TRUE if the item is deleted in this function */ --
[EGIT] [core/elementary] master 01/01: examples: fix evas3d example's "compile with" comment correctly
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=d302685dfbeef940cb7623f0a508fc4c69e4eebb commit d302685dfbeef940cb7623f0a508fc4c69e4eebb Author: Jee-Yong Um <jc9...@samsung.com> Date: Tue Feb 23 20:49:33 2016 +0900 examples: fix evas3d example's "compile with" comment correctly Summary: In "compile with" comment, filenames are different from the actual ones. Reviewers: cedric, Oleksander, Hermet Reviewed By: Oleksander, Hermet Differential Revision: https://phab.enlightenment.org/D3722 --- src/examples/evas3d_object_on_button_example.c | 2 +- src/examples/evas3d_scene_on_button_example.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/examples/evas3d_object_on_button_example.c b/src/examples/evas3d_object_on_button_example.c index 1e4292a..97a90c3 100644 --- a/src/examples/evas3d_object_on_button_example.c +++ b/src/examples/evas3d_object_on_button_example.c @@ -3,7 +3,7 @@ * illustrates the work of callback of event from mouse. * * Compile with: - * gcc -o button_on_3d_object_example button_on_3d_object_example.c -g `pkg-config --libs --cflags evas ecore eo elementary` + * gcc -o evas3d_object_on_button_example evas3d_object_on_button_example.c -g `pkg-config --libs --cflags evas ecore eo elementary` */ diff --git a/src/examples/evas3d_scene_on_button_example.c b/src/examples/evas3d_scene_on_button_example.c index c246dff..50115c1 100644 --- a/src/examples/evas3d_scene_on_button_example.c +++ b/src/examples/evas3d_scene_on_button_example.c @@ -3,7 +3,7 @@ * illustrates the work of callback of event from mouse. * * Compile with: -* gcc -o 3d_scene_on_button_example 3d_scene_on_button example.c -g `pkg-config --libs --cflags evas ecore eo elementary` +* gcc -o evas3d_scene_on_button_example evas3d_scene_on_button_example.c -g `pkg-config --libs --cflags evas ecore eo elementary` */ #define EFL_EO_API_SUPPORT --
[EGIT] [core/elementary] master 01/01: genlist: focus out by pressing "up" key when no item is selected
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=4eca4e64c5f36933e00e87a4ae9091bda13ef7c4 commit 4eca4e64c5f36933e00e87a4ae9091bda13ef7c4 Author: Jee-Yong Um <jc9...@samsung.com> Date: Tue Feb 23 20:46:35 2016 +0900 genlist: focus out by pressing "up" key when no item is selected Summary: move focus out of genlist by pressing "up" key when no item is selected. Test Plan: elementary_test -to fileselector Reviewers: SanghyeonLee, cedric, Jaehyun_Cho, Hermet Reviewed By: Hermet Subscribers: Hermet Differential Revision: https://phab.enlightenment.org/D3721 --- src/lib/elm_genlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index bc505ed..bdcbce9 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -2919,7 +2919,7 @@ _key_action_move_dir(Evas_Object *obj, Elm_Focus_Direction dir, Eina_Bool multi) } else { - if (dir == ELM_FOCUS_UP) + if ((sd->focused_item) && (dir == ELM_FOCUS_UP)) ret = _item_single_select_up(sd); else if (dir == ELM_FOCUS_DOWN) ret = _item_single_select_down(sd); --
[EGIT] [core/elementary] master 05/06: elm_gen: highlight itself when there are no items
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=fd58b8d09ec624cca0aba7afcebf6ac92a7176de commit fd58b8d09ec624cca0aba7afcebf6ac92a7176de Author: Jee-Yong Um <jc9...@samsung.com> Date: Wed Feb 17 17:02:14 2016 -0800 elm_gen: highlight itself when there are no items Summary: When there are no items in genlist/gengrid, highlight stays at one dot of top-left corner. This patch makes genlist/gengrid itself highlighted when there are no items. Reviewers: jpeg, SanghyeonLee Differential Revision: https://phab.enlightenment.org/D3701 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elm_gengrid.c | 7 ++- src/lib/elm_genlist.c | 7 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 3d93480..af51cb5 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -5565,7 +5565,7 @@ elm_gengrid_nth_item_get(const Evas_Object *obj, unsigned int nth) } EOLIAN static void -_elm_gengrid_elm_widget_focus_highlight_geometry_get(const Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +_elm_gengrid_elm_widget_focus_highlight_geometry_get(const Eo *obj, Elm_Gengrid_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { Evas_Coord ox, oy, oh, ow, item_x = 0, item_y = 0, item_w = 0, item_h = 0; @@ -5577,6 +5577,11 @@ _elm_gengrid_elm_widget_focus_highlight_geometry_get(const Eo *obj EINA_UNUSED, evas_object_geometry_get(VIEW(focus_it), _x, _y, _w, _h); elm_widget_focus_highlight_focus_part_geometry_get(VIEW(focus_it), _x, _y, _w, _h); } + else + { +evas_object_geometry_get(obj, x, y, w, h); +return; + } *x = item_x; *y = item_y; diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index cc2fdcf..d41e61d 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -8223,7 +8223,7 @@ elm_genlist_nth_item_get(const Evas_Object *obj, unsigned int nth) } EOLIAN static void -_elm_genlist_elm_widget_focus_highlight_geometry_get(const Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +_elm_genlist_elm_widget_focus_highlight_geometry_get(const Eo *obj, Elm_Genlist_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { Evas_Coord ox, oy, oh, ow, item_x = 0, item_y = 0, item_w = 0, item_h = 0; @@ -8235,6 +8235,11 @@ _elm_genlist_elm_widget_focus_highlight_geometry_get(const Eo *obj EINA_UNUSED, evas_object_geometry_get(VIEW(focus_it), _x, _y, _w, _h); elm_widget_focus_highlight_focus_part_geometry_get(VIEW(focus_it), _x, _y, _w, _h); } + else + { +evas_object_geometry_get(obj, x, y, w, h); +return; + } *x = item_x; *y = item_y; --
[EGIT] [core/elementary] master 01/01: els_box: fix item sizing error
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=5bca505bddd7619a652985d57f25a70b7f003419 commit 5bca505bddd7619a652985d57f25a70b7f003419 Author: Jee-Yong Um <con...@gmail.com> Date: Fri Feb 12 19:50:55 2016 +0900 els_box: fix item sizing error Summary: Although items' size hint align are not set to fill, Elm.Box expands its items. This patch fixes item sizing error. Test Plan: attached sample Reviewers: cedric, jpeg, Hermet, Jaehyun, Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D3667 --- src/lib/els_box.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/els_box.c b/src/lib/els_box.c index fa1fdc9..40b0c67 100644 --- a/src/lib/els_box.c +++ b/src/lib/els_box.c @@ -14,8 +14,8 @@ _box_object_aspect_calc(int *ow, int *oh, int minw, int minh, int maxw, int maxh int ww /* "maximum" width */, int hh /* "maximum" height */, Evas_Aspect_Control aspect, double ratio) { - if (*ow < minw) *ow = minw; - if (*oh < minh) *oh = minh; + *ow = minw; + *oh = minh; switch (aspect) { --
[EGIT] [core/elementary] elementary-1.17 01/01: els_box: fix item sizing error
hermet pushed a commit to branch elementary-1.17. http://git.enlightenment.org/core/elementary.git/commit/?id=80df2f6f54a34134b8285796e21c5b8108b9e64d commit 80df2f6f54a34134b8285796e21c5b8108b9e64d Author: Jee-Yong Um <con...@gmail.com> Date: Fri Feb 12 19:50:55 2016 +0900 els_box: fix item sizing error Summary: Although items' size hint align are not set to fill, Elm.Box expands its items. This patch fixes item sizing error. Test Plan: attached sample Reviewers: cedric, jpeg, Hermet, Jaehyun, Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D3667 --- src/lib/els_box.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/els_box.c b/src/lib/els_box.c index fa1fdc9..40b0c67 100644 --- a/src/lib/els_box.c +++ b/src/lib/els_box.c @@ -14,8 +14,8 @@ _box_object_aspect_calc(int *ow, int *oh, int minw, int minh, int maxw, int maxh int ww /* "maximum" width */, int hh /* "maximum" height */, Evas_Aspect_Control aspect, double ratio) { - if (*ow < minw) *ow = minw; - if (*oh < minh) *oh = minh; + *ow = minw; + *oh = minh; switch (aspect) { --
[EGIT] [core/elementary] master 03/06: box: add support size hint padding
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=92d905ffa0e9c5b2f5b01885856349a010b49ee4 commit 92d905ffa0e9c5b2f5b01885856349a010b49ee4 Author: Jee-Yong Um <jc9...@samsung.com> Date: Fri Feb 12 20:45:20 2016 +0100 box: add support size hint padding Summary: This patch adds suppoting size hint padding for elm_box. Reviewers: raster, cedric, Hermet Subscribers: cedric, kimcinoo Differential Revision: https://phab.enlightenment.org/D3500 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/els_box.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/lib/els_box.c b/src/lib/els_box.c index 40b0c67..1499c0b 100644 --- a/src/lib/els_box.c +++ b/src/lib/els_box.c @@ -105,6 +105,7 @@ _smart_extents_non_homogeneous_calc(Evas_Object_Box_Data *priv, int w, int h, in const Eina_List *l; Evas_Object_Box_Option *opt; int mnw, mnh, mxw, mxh, cminw, cminh; + Evas_Coord pad_l, pad_r, pad_t, pad_b; Evas_Coord *rw, *rh, *rxw, *rxh, *rminw, *rminh, *rmaxw, *rmaxh; Eina_Bool max = EINA_TRUE, asp = EINA_FALSE; @@ -146,7 +147,10 @@ _smart_extents_non_homogeneous_calc(Evas_Object_Box_Data *priv, int w, int h, in else rrw = , rrh = +evas_object_size_hint_padding_get(opt->obj, _l, _r, _t, _b); evas_object_size_hint_min_get(opt->obj, , ); +mnw += pad_l + pad_r; +mnh += pad_t + pad_b; if (*rminw < *rw) *rminw = *rw; *rminh += *rh; @@ -160,6 +164,8 @@ _smart_extents_non_homogeneous_calc(Evas_Object_Box_Data *priv, int w, int h, in asp |= !!aspect; evas_object_size_hint_max_get(opt->obj, , ); +if (mxw >= 0) mxw += pad_l + pad_r; +if (mxh >= 0) mxh += pad_t + pad_b; if (*rxh < 0) { *rmaxh = -1; @@ -221,6 +227,7 @@ static void _smart_extents_calculate(Evas_Object *box, Evas_Object_Box_Data *priv, int w, int h, double expand, Eina_Bool horizontal, Eina_Bool homogeneous) { Evas_Coord minw, minh, mnw, mnh, maxw, maxh; + Evas_Coord pad_l, pad_r, pad_t, pad_b; const Eina_List *l; Evas_Object_Box_Option *opt; int c; @@ -245,7 +252,10 @@ _smart_extents_calculate(Evas_Object *box, Evas_Object_Box_Data *priv, int w, in if (ax < 0) fw = 1; if (ay < 0) fh = 1; + evas_object_size_hint_padding_get(opt->obj, _l, _r, _t, _b); evas_object_size_hint_min_get(opt->obj, , ); + mnw += pad_l + pad_r; + mnh += pad_t + pad_b; if (minh < mnh) minh = mnh; if (minw < mnw) minw = mnw; @@ -267,11 +277,13 @@ _smart_extents_calculate(Evas_Object *box, Evas_Object_Box_Data *priv, int w, in evas_object_size_hint_max_get(opt->obj, , ); if (mnh >= 0) { + if (mnh >= 0) mnh += pad_t + pad_b; if (maxh == -1) maxh = mnh; else if (maxh > mnh) maxh = mnh; } if (mnw >= 0) { + if (mnw >= 0) mnw += pad_l + pad_r; if (maxw == -1) maxw = mnw; else if (maxw > mnw) maxw = mnw; } @@ -392,6 +404,7 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal EINA_LIST_FOREACH(priv->children, l, opt) { Evas_Coord mnw, mnh, mxw, mxh; +Evas_Coord pad_l, pad_r, pad_t, pad_b; int fw, fh, xw, xh;//fillw, fillw, expandw, expandh Evas_Aspect_Control aspect = EVAS_ASPECT_CONTROL_NONE; int asx, asy; @@ -399,8 +412,13 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal obj = opt->obj; evas_object_size_hint_align_get(obj, , ); evas_object_size_hint_weight_get(obj, , ); +evas_object_size_hint_padding_get(obj, _l, _r, _t, _b); evas_object_size_hint_min_get(obj, , ); +mnw += pad_l + pad_r; +mnh += pad_t + pad_b; evas_object_size_hint_max_get(obj, , ); +if (mxw >= 0) mxw += pad_l + pad_r; +if (mxh >= 0) mxh += pad_t + pad_b; evas_object_size_hint_aspect_get(obj, , , ); if (aspect && ((asx < 1) || (asy < 1))) aspect = EVAS_ASPECT_CONTROL_NONE; @@ -438,9 +456,11 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal if (xw && aspect && (!homogeneous)) ww = ow; evas_object_move(obj, - ((!rtl) ? (xx) : (x + (w - (xx - x) - ww))) + ((!rtl) ? (xx + pad_l) : (x + (w - (xx - x) - ww) + pad_r)) + (Evas_Coord)(((double)(ww - ow)) * a
[EGIT] [core/efl] master 03/08: edje: introduce color_tree (color_class inheritance)
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=800f5d81569caab9fca824b11fb8ea2259e2ae7d commit 800f5d81569caab9fca824b11fb8ea2259e2ae7d Author: Jee-Yong Um <jc9...@samsung.com> Date: Fri Feb 5 07:55:46 2016 +0100 edje: introduce color_tree (color_class inheritance) Summary: The "color_tree" block contains a list of one or more "node" blocks. A "node" block consists of its own color class name and the list of child color classes. At runtime, parent color class will be referred instead, if child color class is set to part but its color values are not defined. Reviewers: raster, Jaehyun_Cho, jpeg, cedric Reviewed By: cedric Subscribers: cedric, kimcinoo Differential Revision: https://phab.enlightenment.org/D3606 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/bin/edje/edje_cc.h | 4 ++ src/bin/edje/edje_cc_handlers.c | 48 ++ src/bin/edje/edje_cc_out.c | 141 src/bin/edje/edje_cc_parse.c| 1 + src/lib/edje/edje_cache.c | 10 ++- src/lib/edje/edje_calc.c| 2 +- src/lib/edje/edje_data.c| 8 +++ src/lib/edje/edje_load.c| 9 +++ src/lib/edje/edje_private.h | 11 src/lib/edje/edje_util.c| 93 ++ 10 files changed, 311 insertions(+), 16 deletions(-) diff --git a/src/bin/edje/edje_cc.h b/src/bin/edje/edje_cc.h index aa49caa..84d8223 100644 --- a/src/bin/edje/edje_cc.h +++ b/src/bin/edje/edje_cc.h @@ -194,6 +194,7 @@ voiddata_queue_spectrum_slave_lookup(int *master, int *slave); voiddata_process_lookups(void); voiddata_process_scripts(void); voiddata_process_script_lookups(void); +voidprocess_color_tree(char *s, const char *file_in, int line); voidpart_description_image_cleanup(Edje_Part *ep); @@ -252,6 +253,8 @@ void edje_cc_handlers_hierarchy_free(void); void edje_cc_handlers_pop_notify(const char *token); int get_param_index(char *str); +void color_tree_root_free(void); + /* global vars */ extern Eina_List *ext_dirs; extern Eina_List *img_dirs; @@ -297,6 +300,7 @@ extern intcompress_mode; extern intthreads; extern intannotate; extern Eina_Bool current_group_inherit; +extern Eina_List *color_tree_root; extern int had_quote; diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index f5fd940..2042064 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -216,6 +216,8 @@ static void st_styles_style_name(void); static void st_styles_style_base(void); static void st_styles_style_tag(void); +static void ob_color_tree(void); + static void ob_color_class(void); static void st_color_class_name(void); static void st_color_class_color(void); @@ -1172,6 +1174,7 @@ New_Object_Handler object_handlers[] = {"data", NULL}, {"styles", NULL}, {"styles.style", ob_styles_style}, + {"color_tree", ob_color_tree}, {"color_classes", NULL}, {"color_classes.color_class", ob_color_class}, {"text_classes", NULL}, @@ -1192,6 +1195,7 @@ New_Object_Handler object_handlers[] = {"collections.fonts", NULL}, /* dup */ {"collections.styles", NULL}, /* dup */ {"collections.styles.style", ob_styles_style}, /* dup */ + {"collections.color_tree", ob_color_tree}, /* dup */ {"collections.color_classes", NULL}, /* dup */ {"collections.color_classes.color_class", ob_color_class}, /* dup */ {"collections.text_classes", NULL}, @@ -1228,6 +1232,7 @@ New_Object_Handler object_handlers[] = {"collections.group.fonts", NULL}, /* dup */ {"collections.group.styles", NULL}, /* dup */ {"collections.group.styles.style", ob_styles_style}, /* dup */ + {"collections.group.color_tree", ob_color_tree}, /* dup */ {"collections.group.color_classes", NULL}, /* dup */ {"collections.group.color_classes.color_class", ob_color_class}, /* dup */ {"collections.group.text_classes", NULL}, @@ -2644,6 +2649,49 @@ st_data_file(void) free(filename); } +/** @edcsubsection{toplevel_color_tree, + * Color Tree} */ + +/** +@page edcref +@block +color_tree +@context +color_tree { +"color_class_0" { +"color_class_3"; +"color_class_4" { +"color_class_5"; +"color_class_6"; +} +} +"color_class_1"; +
[EGIT] [core/elementary] master 03/12: hoversel: improve key_action_move to handle disabled items
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=d195270b6415c165f842f4f3debba8f0fc43525d commit d195270b6415c165f842f4f3debba8f0fc43525d Author: Jee-Yong Um <jc9...@samsung.com> Date: Fri Feb 5 07:47:31 2016 +0100 hoversel: improve key_action_move to handle disabled items Summary: Existing key_action_move logic used elm_widget_focus_cycle on hover, but only handled the first and last item to move focus circularly. So if the first or last item is disabled, focus movement is blocked. This patch makes hoversel handle focus movement by itself to handle disabled item better. Test Plan: elementary_test -to hoversel Reviewers: Hermet, cedric, Jaehyun Differential Revision: https://phab.enlightenment.org/D3640 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elc_hoversel.c | 84 ++ 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index b089f4f..370d2d3 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -848,63 +848,67 @@ item_focused_get(Elm_Hoversel_Data *sd) } static Eina_Bool +item_focused_set(Elm_Object_Item *eo_item, Eina_Bool focus) +{ + ELM_HOVERSEL_ITEM_DATA_GET(eo_item, item); + if (elm_object_disabled_get(VIEW(item))) + return EINA_FALSE; + elm_object_focus_set(VIEW(item), focus); + return EINA_TRUE; +} + +static Eina_Bool _key_action_move(Evas_Object *obj, const char *params) { + Eina_List *l; + Elm_Object_Item *focused_item, *eo_item; + Eina_Bool ret, next = EINA_FALSE; + ELM_HOVERSEL_DATA_GET(obj, sd); const char *dir = params; - Elm_Object_Item *eo_litem, *eo_fitem; - eo_litem = eina_list_last_data_get(sd->items); - eo_fitem = eina_list_data_get(sd->items); - _elm_widget_focus_auto_show(obj); - if (!strcmp(dir, "down")) + if (!strcmp(dir, "down") || !strcmp(dir, "right")) { -if ((!sd->horizontal) && -(item_focused_get(sd) == eo_litem)) +focused_item = item_focused_get(sd); +EINA_LIST_FOREACH(sd->items, l, eo_item) { -ELM_HOVERSEL_ITEM_DATA_GET(eo_fitem, fitem); -elm_object_focus_set(VIEW(fitem), EINA_TRUE); -return EINA_TRUE; + if (next) + { + ret = item_focused_set(eo_item, EINA_TRUE); + if (ret) return EINA_TRUE; + } + if (eo_item == focused_item) next = EINA_TRUE; } -elm_widget_focus_cycle(sd->hover, ELM_FOCUS_DOWN); -return EINA_TRUE; - } - else if (!strcmp(dir, "up")) - { -if ((!sd->horizontal) && -(item_focused_get(sd) == eo_fitem)) +EINA_LIST_FOREACH(sd->items, l, eo_item) { -ELM_HOVERSEL_ITEM_DATA_GET(eo_litem, litem); -elm_object_focus_set(VIEW(litem), EINA_TRUE); -return EINA_TRUE; + if (eo_item == focused_item) return EINA_FALSE; + + ret = item_focused_set(eo_item, EINA_TRUE); + if (ret) return EINA_TRUE; } -elm_widget_focus_cycle(sd->hover, ELM_FOCUS_UP); -return EINA_TRUE; +return EINA_FALSE; } - else if (!strcmp(dir, "left")) + else if (!strcmp(dir, "up") || !strcmp(dir, "left")) { -if (sd->horizontal && -(item_focused_get(sd) == eo_fitem)) +focused_item = item_focused_get(sd); +EINA_LIST_REVERSE_FOREACH(sd->items, l, eo_item) { -ELM_HOVERSEL_ITEM_DATA_GET(eo_litem, litem); -elm_object_focus_set(VIEW(litem), EINA_TRUE); -return EINA_TRUE; + if (next) + { + ret = item_focused_set(eo_item, EINA_TRUE); + if (ret) return EINA_TRUE; + } + if (eo_item == focused_item) next = EINA_TRUE; } -elm_widget_focus_cycle(sd->hover, ELM_FOCUS_LEFT); -return EINA_TRUE; - } - else if (!strcmp(dir, "right")) - { -if (sd->horizontal && -(item_focused_get(sd) == eo_litem)) +EINA_LIST_REVERSE_FOREACH(sd->items, l, eo_item) { -ELM_HOVERSEL_ITEM_DATA_GET(eo_fitem, fitem); -elm_object_focus_set(VIEW(fitem), EINA_TRUE); -return EINA_TRUE; + if (eo_item == focused_item) return EINA_FALSE; + + ret = item_focused_set(eo_item, EINA_TRUE); + if (ret) return EINA_TRUE; } -elm_widget_focus_cycle(sd->hover, ELM_FOCUS_RIGHT); -return EINA_TRUE; +return EINA_FALSE; } else return EINA_FALSE; } --
[EGIT] [core/efl] master 08/08: edje_cc: allow omitting "name" keyword in color_classes.color_class block
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f04d509feb45cda11919c903c6a45e1d3a0a5a48 commit f04d509feb45cda11919c903c6a45e1d3a0a5a48 Author: Jee-Yong Um <jc9...@samsung.com> Date: Fri Feb 5 08:30:31 2016 +0100 edje_cc: allow omitting "name" keyword in color_classes.color_class block Summary: This allows developer to omit "name" keyword in color_classes.color_class block in EDC. Reviewers: cedric, jpeg Reviewed By: jpeg Differential Revision: https://phab.enlightenment.org/D3598 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/bin/edje/edje_cc_handlers.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 09c2599..3a8bbe7 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -2738,6 +2738,25 @@ ob_color_class(void) cc->a3 = 0; } +static void +_color_class_name(char *name) +{ + Edje_Color_Class *cc, *tcc; + Eina_List *l; + + cc = eina_list_data_get(eina_list_last(edje_file->color_classes)); + cc->name = name; + EINA_LIST_FOREACH(edje_file->color_classes, l, tcc) + { +if ((cc != tcc) && (!strcmp(cc->name, tcc->name))) + { + ERR("parse error %s:%i. There is already a color class named \"%s\"", + file_in, line - 1, cc->name); + exit(-1); + } + } +} + /** @page edcref @@ -14767,6 +14786,13 @@ edje_cc_handlers_wildcard(void) stack_pop_quick(EINA_FALSE, EINA_FALSE); return EINA_TRUE; } + if (edje_file->color_classes && (!strcmp(last, "color_class"))) + { +if (!had_quote) return EINA_FALSE; +_color_class_name(token); +stack_pop_quick(EINA_FALSE, EINA_FALSE); +return EINA_TRUE; + } if (edje_file->text_classes && (!strcmp(last, "text_class"))) { if (!had_quote) return EINA_FALSE; --
[EGIT] [core/elementary] master 06/12: elm: add Elm.Layout as edje externals' contents instead of Edje.Object
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=fe4a4693bd1a15f0dca048e295fa68ca3d407175 commit fe4a4693bd1a15f0dca048e295fa68ca3d407175 Author: Jee-Yong Um <con...@gmail.com> Date: Fri Feb 5 08:13:11 2016 +0100 elm: add Elm.Layout as edje externals' contents instead of Edje.Object Summary: When edje external parts add its content, edje object is added, but it breaks elementary widget hierarchy. In Elementary, edje external can use Elm.Layout to add its content. Reviewers: cedric Reviewed By: cedric Subscribers: woohyun Differential Revision: https://phab.enlightenment.org/D3655 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/edje_externals/elm.c | 24 ++-- src/edje_externals/elm_bubble.c | 4 ++-- src/edje_externals/elm_frame.c| 4 ++-- src/edje_externals/elm_notify.c | 4 ++-- src/edje_externals/elm_panes.c| 8 src/edje_externals/elm_scroller.c | 4 ++-- src/edje_externals/private.h | 2 +- 7 files changed, 27 insertions(+), 23 deletions(-) diff --git a/src/edje_externals/elm.c b/src/edje_externals/elm.c index 9f6b872..744d289 100644 --- a/src/edje_externals/elm.c +++ b/src/edje_externals/elm.c @@ -270,8 +270,8 @@ external_common_icon_param_parse(Evas_Object **icon, Evas_Object *obj, } Evas_Object * -external_common_param_edje_object_get(Evas_Object *obj, - const Edje_External_Param *p) +external_common_param_elm_layout_get(Evas_Object *obj, + const Edje_External_Param *p) { Evas_Object *edje, *parent_widget, *ret; const char *file; @@ -283,14 +283,18 @@ external_common_param_edje_object_get(Evas_Object *obj, edje_object_file_get(edje, , NULL); parent_widget = elm_widget_parent_widget_get(obj); - if (!parent_widget) - parent_widget = edje; - - ret = edje_object_add(evas_object_evas_get(parent_widget)); - - if (edje_object_file_set(ret, file, p->s)) - return ret; - + if (parent_widget) + { +ret = elm_layout_add(parent_widget); +if (elm_layout_file_set(ret, file, p->s)) + return ret; + } + else + { +ret = edje_object_add(evas_object_evas_get(edje)); +if (edje_object_file_set(ret, file, p->s)) + return ret; + } evas_object_del(ret); return NULL; } diff --git a/src/edje_externals/elm_bubble.c b/src/edje_externals/elm_bubble.c index 5ae04bc..686dea3 100644 --- a/src/edje_externals/elm_bubble.c +++ b/src/edje_externals/elm_bubble.c @@ -62,7 +62,7 @@ external_bubble_param_set(void *data EINA_UNUSED, Evas_Object *obj, if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) { Evas_Object *content = \ -external_common_param_edje_object_get(obj, param); +external_common_param_elm_layout_get(obj, param); if ((strcmp(param->s, "")) && (!content)) return EINA_FALSE; elm_object_content_set(obj, content); return EINA_TRUE; @@ -131,7 +131,7 @@ external_bubble_params_parse(void *data EINA_UNUSED, Evas_Object *obj, if (!strcmp(param->name, "info")) mem->info = eina_stringshare_add(param->s); else if (!strcmp(param->name, "content")) - mem->content = external_common_param_edje_object_get(obj, param); + mem->content = external_common_param_elm_layout_get(obj, param); else if (!strcmp(param->name, "label")) mem->label = eina_stringshare_add(param->s); } diff --git a/src/edje_externals/elm_frame.c b/src/edje_externals/elm_frame.c index f725da6..a59bfae 100644 --- a/src/edje_externals/elm_frame.c +++ b/src/edje_externals/elm_frame.c @@ -39,7 +39,7 @@ external_frame_param_set(void *data EINA_UNUSED, Evas_Object *obj, if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) { Evas_Object *content = -external_common_param_edje_object_get(obj,param); +external_common_param_elm_layout_get(obj,param); if ((strcmp(param->s, "")) && (!content)) return EINA_FALSE; elm_object_content_set(obj, content); return EINA_TRUE; @@ -91,7 +91,7 @@ external_frame_params_parse(void *data EINA_UNUSED, Evas_Object *obj, EINA_LIST_FOREACH(params, l, param) { if (!strcmp(param->name, "content")) - mem->content = external_common_param_edje_object_get(obj, param); + mem->content = external_common_param_elm_layout_get(obj, param); else if (!strcmp(param->name, "label")) mem->label = eina_stringshare_add(param->s); } diff --
[EGIT] [core/efl] master 01/02: edje: add "keys" block to classes setter/getter
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ee31bb541edca1688e8e6f3c62a3ce648ccb7b5c commit ee31bb541edca1688e8e6f3c62a3ce648ccb7b5c Author: Jee-Yong Um <jc9...@samsung.com> Date: Wed Feb 3 15:21:14 2016 -0800 edje: add "keys" block to classes setter/getter Summary: With "keys" block, make color/text/size_class setter/getter to @property methods. Reviewers: jpeg, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3619 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/edje/edje_object.eo | 182 1 file changed, 82 insertions(+), 100 deletions(-) diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo index 30204fb..ad6c905 100644 --- a/src/lib/edje/edje_object.eo +++ b/src/lib/edje/edje_object.eo @@ -214,8 +214,18 @@ class Edje.Object (Evas.Smart_Clipped, Efl.File) This function sets the text class for the Edje.]] return: bool; [[$true, on success or $false, on error]] } - values { + get { +[[Gets font and font size from edje text class. + + This function gets the font and the font size from the object + text class. The font string will only be valid until the text + class is changed or the edje object is deleted.]] +return: bool; [[$true, on success or $false, on error]] + } + keys { text_class: const(char)*; [[The text class name]] + } + values { font: const(char)*; [[Font name]] size: Evas.Font.Size; [[Font Size]] } @@ -1822,19 +1832,6 @@ class Edje.Object (Evas.Smart_Clipped, Efl.File) @in cur: Edje.Cursor; [[The cursor to adjust.]] } } - text_class_get @const { - [[Gets font and font size from edje text class. - - This function gets the font and the font size from the object - text class. The font string will only be valid until the text - class is changed or the edje object is deleted.]] - return: bool; [[$true, on success or $false, on error]] - params { -@in text_class: const(char)*; [[The text class name]] -@out font: const(char)*; [[Font name]] -@out size: Evas.Font.Size; [[Font Size]] - } - } text_class_del { [[Delete the object text class. @@ -1850,70 +1847,58 @@ class Edje.Object (Evas.Smart_Clipped, Efl.File) @in text_class: const(char)*; [[The color class to be deleted.]] } } - color_class_set { - [[Sets the object color class. + @property color_class { + set { +[[Sets the object color class. - This function sets the color values for an object level color - class. This will cause all edje parts in the specified object that - have the specified color class to have their colors multiplied by - these values. + This function sets the color values for an object level color + class. This will cause all edje parts in the specified object that + have the specified color class to have their colors multiplied by + these values. - The first color is the object, the second is the text outline, and - the third is the text shadow. (Note that the second two only apply - to text parts). + The first color is the object, the second is the text outline, and + the third is the text shadow. (Note that the second two only apply + to text parts). - Setting color emits a signal "color_class,set" with source being - the given color. + Setting color emits a signal "color_class,set" with source being + the given color. - Note: unlike Evas, Edje colors are not pre-multiplied. That is, - half-transparent white is 255 255 255 128.]] + Note: unlike Evas, Edje colors are not pre-multiplied. That is, + half-transparent white is 255 255 255 128.]] +return: bool; + } + get { +[[Gets the object color class. - return: bool; - params { -@in color_class: const(char)*; -@in r: int; [[Object Red value]] -@in g: int; [[Object Green value]] -@in b: int; [[Object Blue value]] -@in a: int; [[Object Alpha value]] -@in r2: int; [[Outline Red value]] -@in g2: int; [[Outline Green value]] -@in b2: int; [[Outline Blue value]] -@in a2: int; [[Outline Alpha value]] -@in r3: int; [[Shadow Red va
[EGIT] [core/elementary] master 01/01: elm_hoversel: add "escape" key action to dismiss
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=ef66bd86700476ba47c91bb2affb7398f9ba7f03 commit ef66bd86700476ba47c91bb2affb7398f9ba7f03 Author: Jee-Yong Um <jc9...@samsung.com> Date: Tue Feb 2 19:57:20 2016 +0900 elm_hoversel: add "escape" key action to dismiss Summary: To allow to dismiss hoversel expansion without selecting item by key, "escape" key action is added. Test Plan: elementary_test -to hoversel Reviewers: Jaehyun_Cho, cedric, divyesh Reviewed By: divyesh Differential Revision: https://phab.enlightenment.org/D3627 --- config/default/base.src.in | 6 ++ config/mobile/base.src.in | 6 ++ config/standard/base.src.in | 6 ++ src/lib/elc_hoversel.c | 10 ++ 4 files changed, 28 insertions(+) diff --git a/config/default/base.src.in b/config/default/base.src.in index e86f7d8..6a488c4 100644 --- a/config/default/base.src.in +++ b/config/default/base.src.in @@ -430,6 +430,12 @@ group "Elm_Config" struct { value "action" string: "activate"; value "params" string: ""; } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "key" string: "Escape"; + value "action" string: "escape"; + value "params" string: ""; + } } } group "Elm_Config_Bindings_Widget" struct { diff --git a/config/mobile/base.src.in b/config/mobile/base.src.in index a588aa1..d3ec42e 100644 --- a/config/mobile/base.src.in +++ b/config/mobile/base.src.in @@ -434,6 +434,12 @@ group "Elm_Config" struct { value "action" string: "activate"; value "params" string: ""; } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "key" string: "Escape"; + value "action" string: "escape"; + value "params" string: ""; + } } } group "Elm_Config_Bindings_Widget" struct { diff --git a/config/standard/base.src.in b/config/standard/base.src.in index 0bb42ce..6e8196c 100644 --- a/config/standard/base.src.in +++ b/config/standard/base.src.in @@ -431,6 +431,12 @@ group "Elm_Config" struct { value "action" string: "activate"; value "params" string: ""; } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "key" string: "Escape"; + value "action" string: "escape"; + value "params" string: ""; + } } } group "Elm_Config_Bindings_Widget" struct { diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 2dfb587..b089f4f 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -35,10 +35,12 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = { static Eina_Bool _key_action_move(Evas_Object *obj, const char *params); static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params); +static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params); static const Elm_Action key_actions[] = { {"move", _key_action_move}, {"activate", _key_action_activate}, + {"escape", _key_action_escape}, {NULL, NULL} }; @@ -914,6 +916,13 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) return EINA_TRUE; } +static Eina_Bool +_key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED) +{ + elm_hoversel_hover_end(obj); + return EINA_TRUE; +} + EOLIAN static Eina_Bool _elm_hoversel_elm_widget_event(Eo *obj, Elm_Hoversel_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) { @@ -950,6 +959,7 @@ _elm_hoversel_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNU { "move,down", "move", "down", _key_action_move}, { "move,left", "move", "left", _key_action_move}, { "move,right", "move", "right", _key_action_move}, + { "escape", "escape", NULL, _key_action_escape}, { NULL, NULL, NULL, NULL} }; return _actions[0]; --
[EGIT] [core/elementary] master 01/01: elm_focus: fix mislocation error during continuous focus movement
jaehyun pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=9b2aa79f81b5df3859224cee671f25927b26bc4a commit 9b2aa79f81b5df3859224cee671f25927b26bc4a Author: Jee-Yong Um <jc9...@samsung.com> Date: Thu Jan 28 18:12:30 2016 +0900 elm_focus: fix mislocation error during continuous focus movement Summary: When focus is moved fast and continuously, newly created animator conflicts with the animator for previous movement, so focus bounces among locations. This patch removes previous animator and move focus to the final location before creating new animator. Test Plan: elementary_test -to focus elementary_test -to genlist Reviewers: raster, jpeg, cedric, Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D3611 --- data/themes/edc/elm/focus.edc | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/data/themes/edc/elm/focus.edc b/data/themes/edc/elm/focus.edc index f4da05f..c080505 100644 --- a/data/themes/edc/elm/focus.edc +++ b/data/themes/edc/elm/focus.edc @@ -5,6 +5,7 @@ group { name: "elm/focus_highlight/top/default"; script { public s_x, s_y, s_w, s_h; /* source */ public difx, dify, difw, difh; + public g_anim_id; public animator1(val, Float:pos) { new x, y, w, h, dx, dy, dw, dh, Float:p; @@ -18,6 +19,10 @@ group { name: "elm/focus_highlight/top/default"; dh = round(float_mul(float(get_int(difh)), p)); h = get_int(s_h) + dh; update_offset(x, y, w, h); + + if (pos >= 1.0) { +set_int(g_anim_id, 0); + } } public update_offset(x, y, w, h) { @@ -28,7 +33,14 @@ group { name: "elm/focus_highlight/top/default"; public message(Msg_Type:type, id, ...) { if ((type == MSG_INT_SET) && (id == 1)) { new x1, y1, w1, h1, x2, y2, w2, h2; +new anim_id; +anim_id = get_int(g_anim_id); +if (anim_id != 0) { + cancel_anim(anim_id); + animator1(1, 1.0); +} + x1 = getarg(2); y1 = getarg(3); w1 = getarg(4); @@ -53,7 +65,8 @@ group { name: "elm/focus_highlight/top/default"; update_offset(x1, y1, w1, h1); set_state(PART:"base", "custom", 0.0); -anim(0.2, "animator1", 1); +anim_id = anim(0.2, "animator1", 1); +set_int(g_anim_id, anim_id); } } } --
[EGIT] [core/elementary] master 01/01: elm_focus: refine focus.edc
jaehyun pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=a61b38bbfefa17a4f987ec1d23d8c0e8351eedd5 commit a61b38bbfefa17a4f987ec1d23d8c0e8351eedd5 Author: Jee-Yong Um <jc9...@samsung.com> Date: Thu Jan 28 18:57:10 2016 +0900 elm_focus: refine focus.edc Summary: remove whitespaces and add programs block Reviewers: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D3616 Conflicts: data/themes/edc/elm/focus.edc --- data/themes/edc/elm/focus.edc | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/data/themes/edc/elm/focus.edc b/data/themes/edc/elm/focus.edc index c080505..789a73a 100644 --- a/data/themes/edc/elm/focus.edc +++ b/data/themes/edc/elm/focus.edc @@ -24,12 +24,12 @@ group { name: "elm/focus_highlight/top/default"; set_int(g_anim_id, 0); } } - + public update_offset(x, y, w, h) { set_state_val(PART:"base", STATE_REL1_OFFSET, x, y); set_state_val(PART:"base", STATE_REL2_OFFSET, x + w, y + h); } - + public message(Msg_Type:type, id, ...) { if ((type == MSG_INT_SET) && (id == 1)) { new x1, y1, w1, h1, x2, y2, w2, h2; @@ -49,7 +49,7 @@ group { name: "elm/focus_highlight/top/default"; y2 = getarg(7); w2 = getarg(8); h2 = getarg(9); - + set_int(s_x, x1); set_int(s_y, y1); set_int(s_w, w1); @@ -58,7 +58,7 @@ group { name: "elm/focus_highlight/top/default"; set_int(dify, y2 - y1); set_int(difw, w2 - w1); set_int(difh, h2 - h1); - + custom_state(PART:"base", "default", 0.0); set_state_val(PART:"base", STATE_REL1, 0.0, 0.0); set_state_val(PART:"base", STATE_REL2, 0.0, 0.0); @@ -115,6 +115,8 @@ group { name: "elm/focus_highlight/top/default"; color: 255 255 255 255; } } + } + programs { program { signal: "elm,action,focus,show"; source: "elm"; action: ACTION_STOP; --
[EGIT] [core/elementary] master 01/01: remove incorrect references of insert_before/after in EDC
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=b4739f5323a973a7b752b6cd10019aeb8dd61d6e commit b4739f5323a973a7b752b6cd10019aeb8dd61d6e Author: Jee-Yong Um <jc9...@samsung.com> Date: Wed Jan 27 14:56:50 2016 +0900 remove incorrect references of insert_before/after in EDC Summary: This patch removes unavailable references to nonexistent parts from default theme. Reviewers: raster, jpeg, cedric Differential Revision: https://phab.enlightenment.org/D3609 --- data/themes/edc/elm/genlist.edc | 4 ++-- data/themes/edc/elm/menu.edc| 1 - data/themes/edc/fileman.edc | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/data/themes/edc/elm/genlist.edc b/data/themes/edc/elm/genlist.edc index f10e158..9bd63f7 100644 --- a/data/themes/edc/elm/genlist.edc +++ b/data/themes/edc/elm/genlist.edc @@ -1345,7 +1345,7 @@ group { "genlist_arrow"; inherit_only: 1; program_source: "elm"; images.image: "sym_down_dark_normal.png" COMP; parts { - image { "arrow_img_l"; insert_after: "sel_bevel"; + image { "arrow_img_l"; clip_to: "arrow_clip_l"; scale; ignore_flags: ON_HOLD; @@ -1411,7 +1411,7 @@ group { "genlist_arrow"; inherit_only: 1; program_source: "elm"; image.normal: "sym_down_dark_normal.png"; } } - rect { "arrow"; insert_before: "sel_shine"; mouse; + rect { "arrow"; mouse; desc { "default"; fixed: 1 0; min: 15 15; diff --git a/data/themes/edc/elm/menu.edc b/data/themes/edc/elm/menu.edc index d7a7161..2d6a1da 100644 --- a/data/themes/edc/elm/menu.edc +++ b/data/themes/edc/elm/menu.edc @@ -309,7 +309,6 @@ group { name: "elm/menu/item_with_submenu/default"; } parts { part { name: "arrow"; - insert_after: "item_image_disabled"; description { state: "default" 0.0; rel1.to: "arrowspace"; rel2.to: "arrowspace"; diff --git a/data/themes/edc/fileman.edc b/data/themes/edc/fileman.edc index f4b0e30..3dd3ac0 100644 --- a/data/themes/edc/fileman.edc +++ b/data/themes/edc/fileman.edc @@ -896,7 +896,6 @@ group { name: "e/fileman/desktop/icon/fixed"; } } part { name: "label_min"; type: SPACER; - insert_after: "base"; scale: 1; description { state: "default" 0.0; align: 0.5 0.0; --
[EGIT] [core/efl] master 01/01: edje_cc: remove redundant comments which makes reference seem weird
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=35e28b19582cc25be85e5f495cad1b36a5e2ee89 commit 35e28b19582cc25be85e5f495cad1b36a5e2ee89 Author: Jee-Yong Um <jc9...@samsung.com> Date: Fri Jan 22 11:03:25 2016 -0800 edje_cc: remove redundant comments which makes reference seem weird Summary: Group.Parts.Part.Description.Domain @edcsubription is in wrong place, (actually that is not necessary one.) so it makes Group.Parts.Part.Description.Text block seem weird. Reviewers: jpeg, cedric Differential Revision: https://phab.enlightenment.org/D3597 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/bin/edje/edje_cc_handlers.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 9b348f3..f5fd940 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -9532,9 +9532,6 @@ st_collections_group_parts_part_description_text_text(void) ed->text.text.str = str; } -/** @edcsubsection{collections_group_parts_description_domain, - * Group.Parts.Part.Description.Domain} */ - /** @page edcref @@ -9564,6 +9561,7 @@ st_collections_group_parts_part_description_text_domain(void) ed->text.domain = parse_str(0); } + /** @page edcref --
[EGIT] [core/elementary] master 01/01: elm_hoversel: fix calculation to make items fit to dropdown box
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=6160e8bcd6d8ad38574bbde9445c6be2cd6bb956 commit 6160e8bcd6d8ad38574bbde9445c6be2cd6bb956 Author: Jee-Yong Um <jc9...@samsung.com> Date: Wed Jan 20 21:29:12 2016 +0900 elm_hoversel: fix calculation to make items fit to dropdown box Summary: While applying scroller on hoversel, several lines for item size calculation were added, but they failed to have item get proper size. Now redundant codes are removed and some are fixed, and hoversel will be shown more well-ordered. Test Plan: elementary_test hoversel Reviewers: jpeg, raster, cedric Differential Revision: https://phab.enlightenment.org/D3589 --- data/themes/edc/elm/hover.edc | 10 +++--- src/lib/elc_hoversel.c| 45 +-- 2 files changed, 20 insertions(+), 35 deletions(-) diff --git a/data/themes/edc/elm/hover.edc b/data/themes/edc/elm/hover.edc index cce316a..74757f8 100644 --- a/data/themes/edc/elm/hover.edc +++ b/data/themes/edc/elm/hover.edc @@ -607,7 +607,9 @@ group { name: "elm/hover/base/hoversel_vertical/default"; rel1.offset: 0 -1; rel2.to: "elm.swallow.slot.middle"; rel2.relative: 1.0 0.0; -rel2.offset: -1 -1; +/* set negative offset along x axis not to make + "select_line" part exceed parent's width */ +rel2.offset: -9 -1; } description { state: "visible" 0.0; inherit: "default" 0.0; @@ -636,10 +638,12 @@ group { name: "elm/hover/base/hoversel_vertical/default"; align: 0.0 1.0; rel1.to: "elm.swallow.slot.middle"; rel1.relative: 0.0 1.0; -rel1.offset: 0 2; +rel1.offset: 0 0; rel2.to: "elm.swallow.slot.middle"; rel2.relative: 1.0 1.0; -rel2.offset: -1 2; +/* set negative offset along x axis not to make + "select_line" part exceed parent's width */ +rel2.offset: -9 2; } description { state: "visible" 0.0; inherit: "default" 0.0; diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 175e1fb..eaa760b 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -202,9 +202,13 @@ _create_scroller(Evas_Object *obj, Elm_Hoversel_Data *sd) { //table sd->tbl = elm_table_add(obj); + evas_object_size_hint_align_set(sd->tbl, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(sd->tbl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); //spacer sd->spacer = evas_object_rectangle_add(evas_object_evas_get(obj)); + evas_object_size_hint_align_set(sd->spacer, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(sd->spacer, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_color_set(sd->spacer, 0, 0, 0, 0); elm_table_pack(sd->tbl, sd->spacer, 0, 0, 1, 1); @@ -232,44 +236,17 @@ _create_scroller(Evas_Object *obj, Elm_Hoversel_Data *sd) static void _resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd) { - Evas_Object *bx = NULL; const char *max_size_str; int max_size = 0; char buf[128]; Evas_Coord box_w = -1, box_h = -1; - Evas_Coord x, y, w, h, xx, yy, ww, hh, vw = 0, vh = 0; - double align_x; - Eina_List *l; - Evas_Object *it; - Evas_Coord obj_x, obj_y, obj_w, obj_h, it_w, it_h; - - if (sd->scr) - bx = elm_object_content_get(sd->scr); - - if ((!sd->expanded) || (!bx)) return; - - edje_object_size_min_calc(elm_layout_edje_get(sd->scr), , ); - evas_object_geometry_get(obj, _x, _y, _w, _h); - - evas_object_size_hint_align_get(obj, _x, NULL); - if (!sd->horizontal && align_x == EVAS_HINT_FILL) - { -l = elm_box_children_get(bx); -EINA_LIST_FREE(l, it) - { - edje_object_size_min_calc(elm_layout_edje_get(it), _w, _h); - if ((obj_w - vw) > it_w) - evas_object_size_hint_min_set(it, (obj_w - vw), it_h); - else - evas_object_size_hint_min_set(it, it_w, it_h); - } - } + Evas_Coord x, y, w, h, xx, yy, ww, hh; + Evas_Coord obj_x, obj_y, obj_w; - elm_box_recalculate(bx); - evas_object_size_hint_min_get(bx, _w, _h); + if ((!sd->expanded) || (!sd->bx)) return; - box_w += vw; - box_h += vh; + elm_box_recalculate(sd->bx); + evas_object_size_hint_min_get(sd->bx, _w, _h); max_size_str = elm_layout_data_get(sd->hover, "max_size"); if (max_size_str) @@ -311,6 +288,8 @@ _resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd) xx += x; yy += y; + evas_object_geometry_get(obj, _x, _y, _w, NULL); + if (sd->horizontal)
[EGIT] [core/efl] master 01/02: edje_cc: fix detecting missing part for insert_before/after
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2ca99b8b68bd52ce187c2da54944144f12afb0b6 commit 2ca99b8b68bd52ce187c2da54944144f12afb0b6 Author: Jee-Yong Um <con...@gmail.com> Date: Wed Jan 20 11:42:53 2016 +0900 edje_cc: fix detecting missing part for insert_before/after Summary: Detecting missing part for insert_before/after is broken. This patch makes the feature work and clarifies error message, and removes redundant internal function. Reviewers: cedric, jpeg Subscribers: jpeg Maniphest Tasks: T2513 Differential Revision: https://phab.enlightenment.org/D3576 --- src/bin/edje/edje_cc.h | 1 - src/bin/edje/edje_cc_handlers.c | 12 ++--- src/bin/edje/edje_cc_out.c | 58 ++--- 3 files changed, 22 insertions(+), 49 deletions(-) diff --git a/src/bin/edje/edje_cc.h b/src/bin/edje/edje_cc.h index aa49caa..b4da941 100644 --- a/src/bin/edje/edje_cc.h +++ b/src/bin/edje/edje_cc.h @@ -240,7 +240,6 @@ char *mem_strdup(const char *s); #define SZ sizeof voidusing_file(const char *filename, const char type); -Eina_Bool needed_part_exists(Edje_Part_Collection *pc, const char *name); voiderror_and_abort(Eet_File *ef, const char *fmt, ...); diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 9b348f3..5e31e85 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -5982,16 +5982,12 @@ st_collections_group_parts_part_physics_body(void) static void st_collections_group_parts_part_insert_before(void) { - /* Edje_Part_Collection *pc; */ Edje_Part_Parser *epp; - char *name; check_arg_count(1); - /* pc = eina_list_data_get(eina_list_last(edje_collections)); */ - name = parse_str(0); epp = (Edje_Part_Parser *)current_part; - epp->reorder.insert_before = name; + epp->reorder.insert_before = parse_str(0); } /** @@ -6010,16 +6006,12 @@ st_collections_group_parts_part_insert_before(void) static void st_collections_group_parts_part_insert_after(void) { - /* Edje_Part_Collection *pc; */ Edje_Part_Parser *epp; - char *name; check_arg_count(1); - /* pc = eina_list_data_get(eina_list_last(edje_collections)); */ - name = parse_str(0); epp = (Edje_Part_Parser *)current_part; - epp->reorder.insert_after = name; + epp->reorder.insert_after = parse_str(0); } /** diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c index cc11fad..5023862 100644 --- a/src/bin/edje/edje_cc_out.c +++ b/src/bin/edje/edje_cc_out.c @@ -2595,7 +2595,8 @@ reorder_parts(void) { ep = (Edje_Part_Parser *)pc->parts[i]; if (ep->reorder.insert_before && ep->reorder.insert_after) - ERR("Unable to use together insert_before and insert_after in part \"%s\".", pc->parts[i]->name); + error_and_abort(NULL, "In group \"%s\": Unable to use together insert_before and insert_after in part \"%s\".", + pc->part, pc->parts[i]->name); if (ep->reorder.done) { @@ -2609,15 +2610,13 @@ reorder_parts(void) if (ep->reorder.insert_before && !strcmp(ep->reorder.insert_before, pc->parts[j]->name)) { -needed_part_exists(pc, ep->reorder.insert_before); - ep2 = (Edje_Part_Parser *)pc->parts[j]; if (ep2->reorder.after) - ERR("The part \"%s\" is ambiguous ordered part.", - pc->parts[i]->name); + error_and_abort(NULL, "In group \"%s\": The part \"%s\" is ambiguous ordered part.", + pc->part, pc->parts[i]->name); if (ep2->reorder.linked_prev) - ERR("Unable to insert two or more parts in same part \"%s\".", - pc->parts[j]->name); + error_and_abort(NULL, "In group \"%s\": Unable to insert two or more parts in same part \"%s\".", + pc->part, pc->parts[j]->name); /* Need it to be able to insert an element before the first */ if (j == 0) k = 0; else k = j - 1; @@ -2634,13 +2633,13 @@ reorder_parts(void) else if (ep->reorder.insert_after && !strcmp(ep
[EGIT] [core/efl] master 01/02: edje: convert Edje_Text_Class, Edje_Size_Class data type to public
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bafa65f9b4c1011d6c08c34207f5222e9c0d6892 commit bafa65f9b4c1011d6c08c34207f5222e9c0d6892 Author: Jee-Yong Um <jc9...@samsung.com> Date: Tue Jan 12 14:01:27 2016 -0800 edje: convert Edje_Text_Class, Edje_Size_Class data type to public Summary: APIs iterating works through active text classes and size classes were added, but Edje_Text_Class and Edje_Size_Class data type are still concealed. This patch uncovers those data types so as to allow developers to use them. Reviewers: jpeg, cedric Differential Revision: https://phab.enlightenment.org/D3557 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/edje/Edje_Common.h | 32 src/lib/edje/edje_private.h | 18 -- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h index 30594cc..06211c6 100644 --- a/src/lib/edje/Edje_Common.h +++ b/src/lib/edje/Edje_Common.h @@ -42,6 +42,38 @@ struct _Edje_Color_Class }; /** + * @typedef Edje_Text_Class + * Type for edje text class + * + * @since 1.17 + */ +typedef struct _Edje_Text_Class Edje_Text_Class; + +struct _Edje_Text_Class +{ + const char *name; + const char *font; + Evas_Font_Size size; +}; + +/** + * @typedef Edje_Size_Class + * Type for edje size class + * + * @since 1.17 + */ +typedef struct _Edje_Size_Class Edje_Size_Class; + +struct _Edje_Size_Class +{ + Eina_Stringshare *name; + Evas_Coordminw; + Evas_Coordminh; + Evas_Coordmaxw; + Evas_Coordmaxh; +}; + +/** * @defgroup Edje_Object_Communication_Interface_Signal Edje Communication Interface: Signal * * @brief Functions that deal with signals. diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index 68c3f35..29e0c4d 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -384,8 +384,6 @@ typedef struct _Edje_Calc_Params_Map Edje_Calc_Params_Map; typedef struct _Edje_Calc_Params_Physics Edje_Calc_Params_Physics; typedef struct _Edje_Pending_Program Edje_Pending_Program; typedef struct _Edje_Text_Style Edje_Text_Style; -typedef struct _Edje_Text_Class Edje_Text_Class; -typedef struct _Edje_Size_Class Edje_Size_Class; typedef struct _Edje_Var Edje_Var; typedef struct _Edje_Var_Int Edje_Var_Int; typedef struct _Edje_Var_Float Edje_Var_Float; @@ -1982,22 +1980,6 @@ struct _Edje_Text_Style } members[32]; }; -struct _Edje_Text_Class -{ - const char *name; - const char *font; - Evas_Font_Size size; -}; - -struct _Edje_Size_Class -{ - Eina_Stringshare *name; - Evas_Coordminw; - Evas_Coordminh; - Evas_Coordmaxw; - Evas_Coordmaxh; -}; - struct _Edje_Var_Int { int v; --
[EGIT] [core/efl] master 01/01: edje: add text_classes syntax to EDC
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=71f578dc0b84b92db3a7aaf381717c496727ed14 commit 71f578dc0b84b92db3a7aaf381717c496727ed14 Author: Jee-Yong Um <jc9...@samsung.com> Date: Thu Dec 24 15:55:17 2015 +0900 edje: add text_classes syntax to EDC Summary: text_class can be defined in text_classes block. T2900 @feature Reviewers: jpeg, raster Subscribers: raster, cedric, Jaehyun_Cho, CHAN, kimcinoo Differential Revision: https://phab.enlightenment.org/D3435 --- src/bin/edje/edje_cc_handlers.c | 164 ++ src/bin/edje/edje_convert.c | 1 + src/bin/edje/edje_convert.h | 1 + src/bin/edje/edje_data_convert.c | 1 + src/lib/edje/Edje_Common.h | 23 + src/lib/edje/Edje_Legacy.h | 17 src/lib/edje/edje_cache.c| 6 ++ src/lib/edje/edje_convert.c | 1 + src/lib/edje/edje_convert.h | 1 + src/lib/edje/edje_data.c | 10 ++ src/lib/edje/edje_load.c | 12 +++ src/lib/edje/edje_main.c | 8 +- src/lib/edje/edje_private.h | 5 +- src/lib/edje/edje_smart.c| 11 ++ src/lib/edje/edje_util.c | 212 +-- 15 files changed, 457 insertions(+), 16 deletions(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index c7fc246..a5178c4 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -223,6 +223,11 @@ static void st_color_class_color2(void); static void st_color_class_color3(void); static void st_color_class_desc(void); +static void ob_text_class(void); +static void st_text_class_name(void); +static void st_text_class_font(void); +static void st_text_class_size(void); + static void ob_size_class(void); static void st_size_class_name(void); static void st_size_class_min(void); @@ -550,6 +555,11 @@ static void st_collections_group_nobroadcast(void); {PREFIX"color_classes.color_class.description", st_color_class_desc}, /* dup */ \ {PREFIX"color_classes.color_class.desc", st_color_class_desc}, /* dup */ +#define TEXT_CLASS_STATEMENTS(PREFIX) \ + {PREFIX"text_classes.text_class.name", st_text_class_name}, /* dup */ \ + {PREFIX"text_classes.text_class.font", st_text_class_font}, /* dup */ \ + {PREFIX"text_classes.text_class.size", st_text_class_size}, /* dup */ + #define SIZE_CLASS_STATEMENTS(PREFIX) \ {PREFIX"size_classes.size_class.name", st_size_class_name}, /* dup */ \ {PREFIX"size_classes.size_class.min", st_size_class_min}, /* dup */ \ @@ -657,6 +667,7 @@ New_Statement_Handler statement_handlers[] = {"externals.external", st_externals_external}, IMAGE_STATEMENTS("") FONT_STYLE_CC_STATEMENTS("") + TEXT_CLASS_STATEMENTS("") SIZE_CLASS_STATEMENTS("") {"data.item", st_data_item}, {"data.file", st_data_file}, @@ -666,6 +677,7 @@ New_Statement_Handler statement_handlers[] = IMAGE_SET_STATEMENTS("collections") {"collections.font", st_fonts_font}, /* dup */ FONT_STYLE_CC_STATEMENTS("collections.") + TEXT_CLASS_STATEMENTS("collections.") SIZE_CLASS_STATEMENTS("collections.") {"collections.base_scale", st_collections_base_scale}, {"collections.translation.file.locale", st_collections_group_translation_file_locale}, @@ -710,12 +722,14 @@ New_Statement_Handler statement_handlers[] = {"collections.group.models.model", st_models_model}, {"collections.group.font", st_fonts_font}, /* dup */ FONT_STYLE_CC_STATEMENTS("collections.group.") + TEXT_CLASS_STATEMENTS("collections.group.") SIZE_CLASS_STATEMENTS("collections.group.") {"collections.group.parts.alias", st_collections_group_parts_alias }, IMAGE_SET_STATEMENTS("collections.group.parts") IMAGE_STATEMENTS("collections.group.parts.") {"collections.group.parts.font", st_fonts_font}, /* dup */ FONT_STYLE_CC_STATEMENTS("collections.group.parts.") + TEXT_CLASS_STATEMENTS("collections.group.parts.") SIZE_CLASS_STATEMENTS("collections.group.parts.") {"collections.group.parts.target_group", st_collections_group_target_group}, /* dup */ {"collections.group.parts.part.name", st_collections_group_parts_part_name}, @@ -760,6 +774,7 @@ New_Statement_Handler statement_handlers[] = IMAGE_STATEMENTS("collections.group.parts.part.") {"collections.group.parts.part.font", st_fonts_font}, /* dup */ FONT_STYLE_CC_STATEMENTS("collections.group
[EGIT] [core/efl] master 01/01: edje: add size_class test case
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=395ed14f63ac7f96847c7a950ebc3a1f3a8360c6 commit 395ed14f63ac7f96847c7a950ebc3a1f3a8360c6 Author: Jee-Yong Um <jc9...@samsung.com> Date: Wed Dec 16 14:53:59 2015 +0900 edje: add size_class test case Summary: add edje size_class APIs' test case Reviewers: jpeg Reviewed By: jpeg Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3391 --- src/Makefile_Edje.am| 8 +++-- src/tests/edje/data/test_size_class.edc | 24 ++ src/tests/edje/edje_test_edje.c | 55 + 3 files changed, 85 insertions(+), 2 deletions(-) diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am index 1e5059f..ca0eefc 100644 --- a/src/Makefile_Edje.am +++ b/src/Makefile_Edje.am @@ -255,6 +255,7 @@ tests/edje/data/test_parens.edc \ tests/edje/data/test_masking.edc \ tests/edje/data/test_filters.edc \ tests/edje/data/test_snapshot.edc \ +tests/edje/data/test_size_class.edc \ tests/edje/data/filter.lua @@ -297,6 +298,7 @@ EDJE_DATA_FILES = tests/edje/data/test_layout.edc \ tests/edje/data/test_masking.edc \ tests/edje/data/test_filters.edc \ tests/edje/data/test_snapshot.edc \ + tests/edje/data/test_size_class.edc \ tests/edje/data/filter.lua edjedatafilesdir = $(datadir)/edje/data @@ -305,14 +307,16 @@ edjedatafiles_DATA = tests/edje/data/test_layout.edj \ tests/edje/data/test_parens.edj \ tests/edje/data/test_masking.edj \ tests/edje/data/test_filters.edj \ - tests/edje/data/test_snapshot.edj + tests/edje/data/test_snapshot.edj \ + tests/edje/data/test_size_class.edj CLEANFILES += tests/edje/data/test_layout.edj \ tests/edje/data/complex_layout.edj \ tests/edje/data/test_parens.edj \ tests/edje/data/test_masking.edj \ tests/edje/data/test_filters.edj \ - tests/edje/data/test_snapshot.edj + tests/edje/data/test_snapshot.edj \ + tests/edje/data/test_size_class.edj endif diff --git a/src/tests/edje/data/test_size_class.edc b/src/tests/edje/data/test_size_class.edc new file mode 100644 index 000..1baf831 --- /dev/null +++ b/src/tests/edje/data/test_size_class.edc @@ -0,0 +1,24 @@ +collections { + group { name: "test_group"; + parts { + part { name: "background"; +type: RECT; +description { state: "default" 0.0; + color: 33 32 32 255; + rel1.relative: 0 0; + rel2.relative: 1 1; + max: 200 200; +} + } + part { name: "rect"; +type: RECT; +description { state: "default" 0.0; + rel1.relative: 0.5 0.5; + rel2.relative: 0.5 0.5; + min: 50 50; + size_class: "rect_size"; +} + } + } + } +} diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c index 631abea..536de1d 100644 --- a/src/tests/edje/edje_test_edje.c +++ b/src/tests/edje/edje_test_edje.c @@ -273,6 +273,60 @@ START_TEST(edje_test_snapshot) } END_TEST +START_TEST(edje_test_size_class) +{ + int minw, minh, minw2, minh2; + Evas *evas = EDJE_TEST_INIT_EVAS(); + Eina_List *l; + Eina_Stringshare *name; + Evas_Object *obj, *obj2; + Eina_Bool b; + + obj = edje_object_add(evas); + fail_unless(edje_object_file_set(obj, test_layout_get("test_size_class.edj"), "test_group")); + + obj2 = edje_object_add(evas); + fail_unless(edje_object_file_set(obj2, test_layout_get("test_size_class.edj"), "test_group")); + + evas_object_resize(obj, 200, 200); + evas_object_resize(obj2, 200, 200); + + /* check predefined min size of rect part by edc */ + edje_object_part_geometry_get(obj, "rect", NULL, NULL, , ); + fail_if(minw != 50 || minh != 50); + + /* check that edje_size_class_set works */ + b = edje_size_class_set("rect_size", 100, 100, -1, -1); + edje_object_part_geometry_get(obj, "rect", NULL, NULL, , ); + edje_object_part_geometry_get(obj2, "rect", NULL, NULL, , ); + fail_if(!b || minw != 100 || minh != 100 || minw2 != 100 || minh2 != 100); + + /* check that edje_size_class_get works */ + b = edje_size_class_get("rect_size", , , NULL, NULL); + fail_if(!b || minw != 100 || minh != 100); + + /* check that edje_size_class_list works */ + l = edje_size_class_list(); + EINA_LIST_FREE(l, name) + { +fail_if(strcmp(name, "rect_size")); +
[EGIT] [core/efl] master 01/01: edje: introduce size_class attribute
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3e31eda3bd80c615d44387476495c6ece4fa3756 commit 3e31eda3bd80c615d44387476495c6ece4fa3756 Author: Jee-Yong Um <con...@gmail.com> Date: Tue Dec 8 12:15:48 2015 +0900 edje: introduce size_class attribute Edje_Part can change its min or max size in code level with size_class. Differential Revision: https://phab.enlightenment.org/D3329 PS: Manual commit, arc refused to work... @feature Signed-off-by: Jean-Philippe Andre <jp.an...@samsung.com> --- src/bin/edje/edje_cc_handlers.c | 190 +++ src/bin/edje/edje_convert.c | 1 + src/bin/edje/edje_convert.h | 1 + src/bin/edje/edje_data_convert.c | 2 + src/lib/edje/Edje_Common.h | 101 src/lib/edje/Edje_Legacy.h | 15 ++ src/lib/edje/edje_cache.c| 6 + src/lib/edje/edje_calc.c | 41 +++- src/lib/edje/edje_convert.c | 1 + src/lib/edje/edje_convert.h | 1 + src/lib/edje/edje_data.c | 14 ++ src/lib/edje/edje_load.c | 30 +++ src/lib/edje/edje_main.c | 6 + src/lib/edje/edje_object.eo | 30 +++ src/lib/edje/edje_private.h | 22 ++ src/lib/edje/edje_smart.c| 10 + src/lib/edje/edje_util.c | 488 +++ 17 files changed, 949 insertions(+), 10 deletions(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 33c2205..245574e 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -221,6 +221,11 @@ static void st_color_class_color2(void); static void st_color_class_color3(void); static void st_color_class_desc(void); +static void ob_size_class(void); +static void st_size_class_name(void); +static void st_size_class_min(void); +static void st_size_class_max(void); + static void ob_filters_filter(void); static void ob_filters_filter_script(void); static void st_filters_filter_file(void); @@ -347,6 +352,7 @@ static void st_collections_group_parts_part_description_rel2_to(void); static void st_collections_group_parts_part_description_rel2_to_x(void); static void st_collections_group_parts_part_description_rel2_to_y(void); static void st_collections_group_parts_part_description_clip_to_id(void); +static void st_collections_group_parts_part_description_size_class(void); static void st_collections_group_parts_part_description_image_normal(void); static void st_collections_group_parts_part_description_image_tween(void); static void st_collections_group_parts_part_description_image_border(void); @@ -542,6 +548,11 @@ static void st_collections_group_nobroadcast(void); {PREFIX"color_classes.color_class.description", st_color_class_desc}, /* dup */ \ {PREFIX"color_classes.color_class.desc", st_color_class_desc}, /* dup */ +#define SIZE_CLASS_STATEMENTS(PREFIX) \ + {PREFIX"size_classes.size_class.name", st_size_class_name}, /* dup */ \ + {PREFIX"size_classes.size_class.min", st_size_class_min}, /* dup */ \ + {PREFIX"size_classes.size_class.max", st_size_class_max}, /* dup */ + #define PROGRAM_SEQUENCE(PREFIX, NAME, FN) \ {PREFIX".program."NAME, FN}, /* dup */ \ {PREFIX".program.sequence."NAME, FN}, /* dup */ @@ -644,6 +655,7 @@ New_Statement_Handler statement_handlers[] = {"externals.external", st_externals_external}, IMAGE_STATEMENTS("") FONT_STYLE_CC_STATEMENTS("") + SIZE_CLASS_STATEMENTS("") {"data.item", st_data_item}, {"data.file", st_data_file}, FILTERS_STATEMENTS("") @@ -652,6 +664,7 @@ New_Statement_Handler statement_handlers[] = IMAGE_SET_STATEMENTS("collections") {"collections.font", st_fonts_font}, /* dup */ FONT_STYLE_CC_STATEMENTS("collections.") + SIZE_CLASS_STATEMENTS("collections.") {"collections.base_scale", st_collections_base_scale}, {"collections.translation.file.locale", st_collections_group_translation_file_locale}, {"collections.translation.file.source", st_collections_group_translation_file_source}, @@ -695,11 +708,13 @@ New_Statement_Handler statement_handlers[] = {"collections.group.models.model", st_models_model}, {"collections.group.font", st_fonts_font}, /* dup */ FONT_STYLE_CC_STATEMENTS("collections.group.") + SIZE_CLASS_STATEMENTS("collections.group.") {"collections.group.parts.alias", st_collections_group_parts_alias }, IMAGE_SET_STATEMENTS("collections.group.parts") IMAGE_STATEMENTS("collections.group.parts.") {"collections.group.parts.font", st_fonts_font}
[EGIT] [core/efl] master 04/05: edje: add missing EAPI keyword for edje_color_class_del
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=dc918064ce83ef029ce849cf5e80a85c434ff840 commit dc918064ce83ef029ce849cf5e80a85c434ff840 Author: Jee-Yong Um <jc9...@samsung.com> Date: Wed Dec 2 14:34:12 2015 -0800 edje: add missing EAPI keyword for edje_color_class_del Reviewers: jpeg Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3398 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/edje/edje_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index aa77208..f913fb8 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -717,7 +717,7 @@ edje_color_class_get(const char *color_class, int *r, int *g, int *b, int *a, in } } -void +EAPI void edje_color_class_del(const char *color_class) { Edje_Color_Class *cc; --
[EGIT] [core/efl] master 01/01: edje: add mising closing brace and adjust indents and spacing in test edc
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=20671d84cd2ce3cf1a1fbae6ad7943cd85557960 commit 20671d84cd2ce3cf1a1fbae6ad7943cd85557960 Author: Jee-Yong Um <con...@gmail.com> Date: Tue Dec 1 14:54:15 2015 -0800 edje: add mising closing brace and adjust indents and spacing in test edc Summary: A closing brace is missing, and indent is not aligned. Reviewers: cedric Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3387 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/tests/edje/data/test_layout.edc | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tests/edje/data/test_layout.edc b/src/tests/edje/data/test_layout.edc index fe6ea01..f1309cc 100644 --- a/src/tests/edje/data/test_layout.edc +++ b/src/tests/edje/data/test_layout.edc @@ -12,13 +12,14 @@ collections { state: "default" 0.0; color: 255 255 255 255; - rel1 { - relative: 0.0 0.0; + rel1 { + relative: 0.0 0.0; } rel2 { - relative: 1.0 1.0; + relative: 1.0 1.0; } } } + } } } --
[EGIT] [core/elementary] master 04/04: theme: add DBG() message when style is set to default (fallback)
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=a21a8181c2fa4f43e17eb30178b386208eb7d9f5 commit a21a8181c2fa4f43e17eb30178b386208eb7d9f5 Author: Jee-Yong Um <jc9...@samsung.com> Date: Mon Nov 23 08:26:52 2015 +0100 theme: add DBG() message when style is set to default (fallback) Summary: When _elm_theme_set() failed to set given style, it sets style as "default". However, setting style to "default" can be unintended behavior, so developer should have the chance to get to know fallback. Reviewers: cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3352 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elm_theme.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_theme.c b/src/lib/elm_theme.c index 87048fe..4006bc6 100644 --- a/src/lib/elm_theme.c +++ b/src/lib/elm_theme.c @@ -319,7 +319,12 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *grou file = _elm_theme_group_file_find(th, buf2); if (file) { - if (edje_object_mmap_set(o, file, buf2)) return EINA_TRUE; + if (edje_object_mmap_set(o, file, buf2)) + { + DBG("could not set theme style '%s', fallback to default", + style); + return EINA_TRUE; + } else { DBG("could not set theme group '%s' from file '%s': %s", --
[EGIT] [core/efl] master 01/01: edje: revise the explanation for mask_flags attribute
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=290b92852e544cfb315d45dd69f81856765e681e commit 290b92852e544cfb315d45dd69f81856765e681e Author: Jee-Yong Um <jc9...@samsung.com> Date: Thu Nov 19 15:33:45 2015 +0900 edje: revise the explanation for mask_flags attribute Reviewers: cedric, raster Reviewed By: raster Subscribers: raster Differential Revision: https://phab.enlightenment.org/D3330 --- src/bin/edje/edje_cc_handlers.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index e986291..aba6676 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -5587,7 +5587,8 @@ st_collections_group_parts_part_norepeat(void) Specifies whether events with the given flags should be ignored, i.e., will not have the signals emitted to the parts. Multiple flags must be separated by spaces, the effect will be ignoring all events -with one of the flags specified. Possible flags: +with one of the flags specified. +Possible flags: @li NONE (default value, no event will be ignored) @li ON_HOLD @endproperty @@ -5610,9 +5611,9 @@ st_collections_group_parts_part_ignore_flags(void) @parameters [FLAG] ... @effect -Masks event flags with the given value, so event propagating from this part -will go with masked flags. Other library, like Elementary, can determine -whether it handles this event. Possible flags: +Masks event flags with the given value, so that the event can be repeated +to the lower object along with masked event flags. +Possible flags: @li NONE (default value, no event will be masked) @li ON_HOLD @endproperty --
[EGIT] [tools/enventor] master 01/01: enventor: remove --eo option from eolian_helper
jaehyun pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=9b2c0540028de7f991b134bffb1131410fba0b38 commit 9b2c0540028de7f991b134bffb1131410fba0b38 Author: Jee-Yong Um <jc9...@samsung.com> Date: Mon Nov 16 13:01:42 2015 +0900 enventor: remove --eo option from eolian_helper Summary: remove --eo option from Makefile_Eolian_Helper.am to fix build fail Reviewers: Hermet, Jaehyun_Cho Reviewed By: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D3331 --- Makefile_Eolian_Helper.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile_Eolian_Helper.am b/Makefile_Eolian_Helper.am index 168f659..377f173 100644 --- a/Makefile_Eolian_Helper.am +++ b/Makefile_Eolian_Helper.am @@ -13,10 +13,10 @@ am__v_EOL_0 = @echo " EOLIAN " $@; SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h %.eo.c: %.eo ${_EOLIAN_GEN_DEP} - $(AM_V_EOL)$(EOLIAN_GEN) --eo --legacy $(EOLIAN_FLAGS) --gc -o $@ $< + $(AM_V_EOL)$(EOLIAN_GEN) --legacy $(EOLIAN_FLAGS) --gc -o $@ $< %.eo.h: %.eo ${_EOLIAN_GEN_DEP} - $(AM_V_EOL)$(EOLIAN_GEN) --eo $(EOLIAN_FLAGS) --gh -o $@ $< + $(AM_V_EOL)$(EOLIAN_GEN) $(EOLIAN_FLAGS) --gh -o $@ $< %.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP} $(AM_V_EOL)$(EOLIAN_GEN) --legacy $(EOLIAN_FLAGS) --gh -o $@ $< --
[EGIT] [core/elementary] master 02/02: hoversel: expands scrollable hoversel as large as it can
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=7e1d1d19e9398225f1d546b20fc6d7c2998b0abc commit 7e1d1d19e9398225f1d546b20fc6d7c2998b0abc Author: Jee-Yong Um <jc9...@samsung.com> Date: Mon Oct 26 01:27:02 2015 +0100 hoversel: expands scrollable hoversel as large as it can Summary: In D2063, "max_size" data item is added to limit the number of items to show at a time when hoversel is expanded. However, it limits the number of items too few, so makes scrollable function useless. This patch removes limitation of hoversel size with pixels, but if it needs, developers can set the limitation yet. (By theme customization) Test Plan: elementary_test "hoversel" click the second hoversel Reviewers: DaveMDS, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3223 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- data/themes/edc/elm/hover.edc | 8 ++-- src/bin/test_hoversel.c | 7 +++ src/lib/elc_hoversel.c| 6 ++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/data/themes/edc/elm/hover.edc b/data/themes/edc/elm/hover.edc index afed708..7466f0d 100644 --- a/data/themes/edc/elm/hover.edc +++ b/data/themes/edc/elm/hover.edc @@ -442,7 +442,9 @@ group { name: "elm/hover/base/hoversel_vertical/default"; images.image: "button_normal.png" COMP; images.image: "vertical_separated_bar_glow.png" COMP; data.item: "dismiss" "on"; - data.item: "max_size" "60"; + // max_size limits the maximum size of expanded hoversel + // when it's scrollable. + //data.item: "max_size" "60"; parts { part { name: "elm.swallow.offset"; type: SWALLOW; description { state: "default" 0.0; @@ -666,7 +668,9 @@ group { name: "elm/hover/base/hoversel_horizontal/default"; alias: "elm/hover/base/hoversel_horizontal/entry"; images.image: "button_normal.png" COMP; data.item: "dismiss" "on"; - data.item: "max_size" "120"; + // max_size limits the maximum size of expanded hoversel + // when it's scrollable. + //data.item: "max_size" "120"; parts { part { name: "elm.swallow.offset"; type: SWALLOW; description { state: "default" 0.0; diff --git a/src/bin/test_hoversel.c b/src/bin/test_hoversel.c index 2979e02..72f7bad 100644 --- a/src/bin/test_hoversel.c +++ b/src/bin/test_hoversel.c @@ -193,6 +193,13 @@ test_hoversel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ NULL); elm_hoversel_item_add(hoversel, "Item 5 - Long Label Here", NULL, ELM_ICON_NONE, NULL, NULL); + elm_hoversel_item_add(hoversel, "Item 6", NULL, ELM_ICON_NONE, NULL, NULL); + elm_hoversel_item_add(hoversel, "Item 7", NULL, ELM_ICON_NONE, NULL, NULL); + elm_hoversel_item_add(hoversel, "Item 8", NULL, ELM_ICON_NONE, NULL, NULL); + elm_hoversel_item_add(hoversel, "Item 9", NULL, ELM_ICON_NONE, NULL, NULL); + elm_hoversel_item_add(hoversel, "Item 10", NULL, ELM_ICON_NONE, NULL, NULL); + elm_hoversel_item_add(hoversel, "Item 11", NULL, ELM_ICON_NONE, NULL, NULL); + elm_hoversel_item_add(hoversel, "Item 12", NULL, ELM_ICON_NONE, NULL, NULL); elm_box_pack_end(bx, hoversel); evas_object_show(hoversel); diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 4f827dc..a922fbe 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -254,11 +254,10 @@ _resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd) if (sd->horizontal) { -ww = MIN(box_w, max_size); +ww = (max_size > 0) ? MIN(box_w, max_size) : box_w ; hh = box_h; evas_object_size_hint_min_set(sd->spacer, ww, hh); -evas_object_size_hint_max_set(sd->spacer, max_size, -1); if (!sd->last_location) sd->last_location = elm_hover_best_content_location_get(sd->hover, ELM_HOVER_AXIS_HORIZONTAL); @@ -266,10 +265,9 @@ _resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd) else { ww = box_w; -hh = MIN(box_h, max_size); +hh = (max_size > 0) ? MIN(box_h, max_size) : box_h ; evas_object_size_hint_min_set(sd->spacer, ww, hh); -evas_object_size_hint_max_set(sd->spacer, -1, max_size); if (!sd->last_location) sd->last_location = elm_hover_best_content_location_get(sd->hover, ELM_HOVER_AXIS_VERTICAL); --
[EGIT] [core/elementary] master 04/06: elm_hoversel: remove unused internal functions
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=8e1b1043dc7b791a5e1a846a3afade2d3e070ead commit 8e1b1043dc7b791a5e1a846a3afade2d3e070ead Author: Jee-Yong Um <jc9...@samsung.com> Date: Thu Oct 8 12:10:07 2015 +0200 elm_hoversel: remove unused internal functions Summary: remove unused internal functions (that added for scrollability, but not used any more) T2765 Reviewers: Hermet, cedric Maniphest Tasks: T2765 Differential Revision: https://phab.enlightenment.org/D3132 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elc_hoversel.c | 23 --- 1 file changed, 23 deletions(-) diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index d0ffbe1..4f827dc 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -479,29 +479,6 @@ _on_parent_del(void *data, } static void -_on_table_del(void *data, - Evas *e EINA_UNUSED, - Evas_Object *obj EINA_UNUSED, - void *event_info EINA_UNUSED) -{ - ELM_HOVERSEL_DATA_GET(data, sd); - - sd->tbl = NULL; - sd->spacer = NULL; - sd->scr = NULL; - elm_layout_sizing_eval(data); -} - -static void -_size_hints_changed_cb(void *data, - Evas *e EINA_UNUSED, - Evas_Object *obj EINA_UNUSED, - void *event_info EINA_UNUSED) -{ - elm_layout_sizing_eval(data); -} - -static void _elm_hoversel_item_elm_widget_item_part_text_set(Eo *eo_it EINA_UNUSED, Elm_Hoversel_Item_Data *it, const char *part, --
[EGIT] [core/elementary] master 01/06: elm_hoversel: change Elm_Hoversel_Data member name from scroll_enabled to scrollable
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=73d4c84962fd79314c4374dddf4762af7c5df338 commit 73d4c84962fd79314c4374dddf4762af7c5df338 Author: Jee-Yong Um <jc9...@samsung.com> Date: Thu Oct 8 12:03:37 2015 +0200 elm_hoversel: change Elm_Hoversel_Data member name from scroll_enabled to scrollable Summary: elm_hoversel_scroll_enabled_set/get() API were changed to elm_hoversel_scrollable_set/get(). However, the name of member of Elm_Hovsersel_Data related to those API are not changed. It can confuse developers later, so change it same to the name defined in elm_hoversel.eo file. Reviewers: Hermet, cedric Differential Revision: https://phab.enlightenment.org/D3140 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elc_hoversel.c| 10 +- src/lib/elm_widget_hoversel.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 1969f40..d0f92cc 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -437,7 +437,7 @@ _activate(Evas_Object *obj) eo_event_callback_add(ELM_WIDGET_EVENT_UNFOCUSED, _item_unfocused_cb, item)); } - if (sd->scroll_enabled) + if (sd->scrollable) { _create_scroller(obj, sd); elm_object_content_set(sd->scr, bx); @@ -586,7 +586,7 @@ _on_move_resize(void * data, { Elm_Hoversel_Data *sd = data; - if (sd->scroll_enabled) + if (sd->scrollable) _resizing_eval(obj, sd); } @@ -970,15 +970,15 @@ _elm_hoversel_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNU } EOLIAN void -_elm_hoversel_scrollable_set(Eo *obj EINA_UNUSED, Elm_Hoversel_Data *sd, Eina_Bool scroll) +_elm_hoversel_scrollable_set(Eo *obj EINA_UNUSED, Elm_Hoversel_Data *sd, Eina_Bool scrollable) { - sd->scroll_enabled = !!scroll; + sd->scrollable = !!scrollable; } EOLIAN Eina_Bool _elm_hoversel_scrollable_get(Eo *obj EINA_UNUSED, Elm_Hoversel_Data *sd) { - return sd->scroll_enabled; + return sd->scrollable; } EOLIAN void diff --git a/src/lib/elm_widget_hoversel.h b/src/lib/elm_widget_hoversel.h index 36aa5b2..56e521b 100644 --- a/src/lib/elm_widget_hoversel.h +++ b/src/lib/elm_widget_hoversel.h @@ -41,7 +41,7 @@ struct _Elm_Hoversel_Data Eina_Bool horizontal: 1; Eina_Bool expanded : 1; - Eina_Bool scroll_enabled: 1; + Eina_Bool scrollable: 1; Eina_Bool auto_update : 1; }; --
[EGIT] [core/elementary] master 02/06: elm_hoversel: change API name (label_auto_changed -> auto_update)
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=5d0b72daef219dd21ccf0a2773b5d5a9e26d58a8 commit 5d0b72daef219dd21ccf0a2773b5d5a9e26d58a8 Author: Jee-Yong Um <jc9...@samsung.com> Date: Thu Oct 8 12:05:31 2015 +0200 elm_hoversel: change API name (label_auto_changed -> auto_update) Summary: elm_hoversel_label_auto_changed_set/get() API names are not clear. Reviewers: Hermet, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3139 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elm_hoversel.eo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_hoversel.eo b/src/lib/elm_hoversel.eo index ae67b10..5da60e8 100644 --- a/src/lib/elm_hoversel.eo +++ b/src/lib/elm_hoversel.eo @@ -58,13 +58,13 @@ class Elm.Hoversel (Elm.Button, Evas.Selectable_Interface, } } @property auto_update { - [[Change the label of hoversel to that of selected item automatically.]] + [[Update icon and text of hoversel same to those of selected item automatically.]] get{ } set{ } values { -auto_update: bool; [[$true if the label is changed automatically or $false otherwise]] +auto_update: bool; [[$true if hoversel is updated automatically or $false otherwise]] } } hover_begin { --
[EGIT] [core/efl] master 02/08: evas table: fix miscalcuation in cells with span and padding
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=49028c599a6fb2e42f8c199e08714da637e7f7fe commit 49028c599a6fb2e42f8c199e08714da637e7f7fe Author: Jee-Yong Um <jc9...@samsung.com> Date: Mon Oct 19 11:01:22 2015 -0700 evas table: fix miscalcuation in cells with span and padding Summary: In evas table that homogeneous mode is turned off, the size of items in cells, whose rowspan or colspan is larger than 1 and horizontal or vertical padding exists, are miscalculatd. T2655 @fix Test Plan: elementary_test "Table Padding" Reviewers: Hermet, cedric Subscribers: cedric, DaveMDS, Hermet Differential Revision: https://phab.enlightenment.org/D3192 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/evas/canvas/evas_object_table.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c index 5a4cfcb..0c8ea11 100644 --- a/src/lib/evas/canvas/evas_object_table.c +++ b/src/lib/evas/canvas/evas_object_table.c @@ -841,11 +841,13 @@ _evas_object_table_calculate_layout_regular(Evas_Object *o, Evas_Table_Data *pri cx = x + opt->col * (priv->pad.h); cx += _evas_object_table_sum_sizes(cols, 0, opt->col); -cw = _evas_object_table_sum_sizes(cols, opt->col, opt->end_col); +cw = (opt->colspan - 1) * priv->pad.h; +cw += _evas_object_table_sum_sizes(cols, opt->col, opt->end_col); cy = y + opt->row * (priv->pad.v); cy += _evas_object_table_sum_sizes(rows, 0, opt->row); -ch = _evas_object_table_sum_sizes(rows, opt->row, opt->end_row); +ch = (opt->rowspan - 1) * priv->pad.v; +ch += _evas_object_table_sum_sizes(rows, opt->row, opt->end_row); _evas_object_table_calculate_cell(opt, , , , ); --
[EGIT] [core/elementary] master 01/02: elm_hoversel: fix to show dismiss animation
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=6286345fe353828d344fabc08fded81dd9752f74 commit 6286345fe353828d344fabc08fded81dd9752f74 Author: Jee-Yong Um <jc9...@samsung.com> Date: Mon Oct 12 13:22:26 2015 -0700 elm_hoversel: fix to show dismiss animation Summary: In hover.edc, hoversel dismiss animations are defined, but it doesn't work at all. (Hover is removed before animation) This patch makes hoversel remove its hover after dismiss animation. @fix Test Plan: elementary_test hoversel Reviewers: Hermet, cedric Reviewed By: cedric Subscribers: woohyun Differential Revision: https://phab.enlightenment.org/D3070 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elc_hoversel.c | 73 +++--- src/lib/elm_hover.c| 7 - 2 files changed, 69 insertions(+), 11 deletions(-) diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 266dc00..2079e99 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -93,10 +93,15 @@ _elm_hoversel_elm_widget_theme_apply(Eo *obj, Elm_Hoversel_Data *sd) static Eina_Bool _on_hover_clicked(void *data EINA_UNUSED, - Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, + Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { - elm_hoversel_hover_end(data); + const char *dismissstr; + + dismissstr = edje_object_data_get(elm_layout_edje_get(obj), "dismiss"); + + if (!dismissstr || strcmp(dismissstr, "on")) + elm_hoversel_hover_end(data); // for backward compatibility return EINA_TRUE; } @@ -323,6 +328,37 @@ _resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd) } static void +_hover_end_finished(void *data, +Evas_Object *obj EINA_UNUSED, +const char *emission EINA_UNUSED, +const char *source EINA_UNUSED) +{ + Elm_Object_Item *eo_item; + Eina_List *l; + const char *dismissstr; + + ELM_HOVERSEL_DATA_GET(data, sd); + + dismissstr = edje_object_data_get(elm_layout_edje_get(sd->hover), "dismiss"); + + if (dismissstr && !strcmp(dismissstr, "on")) + { +sd->expanded = EINA_FALSE; + +EINA_LIST_FOREACH(sd->items, l, eo_item) + { + ELM_HOVERSEL_ITEM_DATA_GET(eo_item, it); + VIEW(it) = NULL; + } +ELM_SAFE_FREE(sd->hover, evas_object_del); +sd->scr = NULL; +sd->last_location = NULL; + +eo_do(obj, eo_event_callback_call(ELM_HOVERSEL_EVENT_DISMISSED, NULL)); + } +} + +static void _activate(Evas_Object *obj) { Elm_Object_Item *eo_item; @@ -355,6 +391,8 @@ _activate(Evas_Object *obj) eo_do(sd->hover, eo_event_callback_add (EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _on_hover_clicked, obj)); + elm_layout_signal_callback_add + (sd->hover, "elm,action,hide,finished", "elm", _hover_end_finished, obj); elm_hover_target_set(sd->hover, obj); /* hover's content */ @@ -695,23 +733,38 @@ _elm_hoversel_hover_begin(Eo *obj, Elm_Hoversel_Data *sd) EOLIAN static void _elm_hoversel_hover_end(Eo *obj, Elm_Hoversel_Data *sd) { + Elm_Object_Item *eo_item; Eina_List *l; + const char *dismissstr; if (!sd->hover) return; - sd->expanded = EINA_FALSE; + dismissstr = edje_object_data_get(elm_layout_edje_get(sd->hover), "dismiss"); - EINA_LIST_FOREACH(sd->items, l, eo_item) + if (dismissstr && !strcmp(dismissstr, "on")) { -ELM_HOVERSEL_ITEM_DATA_GET(eo_item, it); -VIEW(it) = NULL; +elm_hover_dismiss(sd->hover); + + + } - ELM_SAFE_FREE(sd->hover, evas_object_del); - sd->scr = NULL; - sd->last_location = NULL; + else + + { +sd->expanded = EINA_FALSE; + +EINA_LIST_FOREACH(sd->items, l, eo_item) + { + ELM_HOVERSEL_ITEM_DATA_GET(eo_item, it); + VIEW(it) = NULL; + } +ELM_SAFE_FREE(sd->hover, evas_object_del); +sd->scr = NULL; +sd->last_location = NULL; - eo_do(obj, eo_event_callback_call(ELM_HOVERSEL_EVENT_DISMISSED, NULL)); +eo_do(obj, eo_event_callback_call(ELM_HOVERSEL_EVENT_DISMISSED, NULL)); + } // for backward compatibility } EOLIAN static Eina_Bool diff --git a/src/lib/elm_hover.c b/src/lib/elm_hover.c index 7bfc6db..2ca235a 100644 --- a/src/lib/elm_hover.c +++ b/src/lib/elm_hover.c @@ -808,7 +808,12 @@ _elm_hover_best_content_location_get(const Eo *obj EINA_UNUSED, Elm_Hover_Data * EOLIAN static void _elm_hover_dismiss(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED) { - elm_layout_signal_emit(obj, "elm
[EGIT] [core/elementary] master 02/06: elm_hoversel: refine hoversel scrollability function
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=f216366148179a3c7c97c34fc815c3fc38bfbf40 commit f216366148179a3c7c97c34fc815c3fc38bfbf40 Author: Jee-Yong Um <jc9...@samsung.com> Date: Sun Oct 4 14:55:21 2015 +0200 elm_hoversel: refine hoversel scrollability function Summary: Some modifications for hoversel scrollability are applied. For example, The logic for generating scroller is changed. (newly added during activation) If hoversel's contents are larger than hover,they will be resized to fit hover. If hoversel is moved (by window rotation etc.), scroller will be resized. Reduandant code are removed from popup for scrollability. Test Plan: You can see the sample for scrollable hoversel in second one of "elementary_test hoversel". Reviewers: Hermet, SanghyeonLee, cedric Reviewed By: cedric Subscribers: godlytalias, Hermet Differential Revision: https://phab.enlightenment.org/D2926 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- data/themes/edc/elm/hover.edc | 8 +- src/bin/test_hoversel.c | 2 + src/lib/elc_hoversel.c| 271 -- 3 files changed, 191 insertions(+), 90 deletions(-) diff --git a/data/themes/edc/elm/hover.edc b/data/themes/edc/elm/hover.edc index 43fd5c5..b34d36a 100644 --- a/data/themes/edc/elm/hover.edc +++ b/data/themes/edc/elm/hover.edc @@ -676,11 +676,11 @@ group { name: "elm/hover/base/hoversel_horizontal/default"; description { state: "default" 0.0; rel1.to_x: "elm.swallow.slot.left"; rel1.to_y: "elm.swallow.slot.left"; -rel1.offset: -6 0; +rel1.offset: -10 -10; rel2.to_x: "elm.swallow.slot.middle"; rel2.to_y: "elm.swallow.slot.left"; rel2.relative: 0.0 1.0; -rel2.offset: 4 1; +rel2.offset: 4 9; image { normal: "button_normal.png"; border: 7 7 7 7; @@ -691,10 +691,10 @@ group { name: "elm/hover/base/hoversel_horizontal/default"; rel1.to_x: "elm.swallow.slot.middle"; rel1.to_y: "elm.swallow.slot.right"; rel1.relative: 1.0 0.0; -rel1.offset: -5 0; +rel1.offset: -5 -10; rel2.to_x: "elm.swallow.slot.right"; rel2.to_y: "elm.swallow.slot.right"; -rel2.offset: 5 1; +rel2.offset: 10 9; image { normal: "button_normal.png"; border: 7 7 7 7; diff --git a/src/bin/test_hoversel.c b/src/bin/test_hoversel.c index 8fd2346..87f9e55 100644 --- a/src/bin/test_hoversel.c +++ b/src/bin/test_hoversel.c @@ -190,6 +190,8 @@ test_hoversel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ NULL); elm_hoversel_item_add(hoversel, "Item 4", "close", ELM_ICON_STANDARD, NULL, NULL); + elm_hoversel_item_add(hoversel, "Item 5 - Long Label Here", NULL, ELM_ICON_NONE, NULL, + NULL); elm_box_pack_end(bx, hoversel); evas_object_show(hoversel); diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 82f5957..5f7d0a8 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -142,15 +142,168 @@ _item_unfocused_cb(void *data EINA_UNUSED, } static void +_create_scroller(Evas_Object *obj, Elm_Hoversel_Data *sd) +{ + //table + sd->tbl = elm_table_add(obj); + + //spacer + sd->spacer = evas_object_rectangle_add(evas_object_evas_get(obj)); + evas_object_color_set(sd->spacer, 0, 0, 0, 0); + elm_table_pack(sd->tbl, sd->spacer, 0, 0, 1, 1); + + //Scroller + sd->scr = elm_scroller_add(sd->tbl); + elm_object_style_set(sd->scr, "popup/no_inset_shadow"); + evas_object_size_hint_weight_set(sd->scr, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(sd->scr, EVAS_HINT_FILL, EVAS_HINT_FILL); + if (sd->horizontal) + { +elm_scroller_policy_set(sd->scr, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_OFF); +elm_scroller_content_min_limit(sd->scr, EINA_FALSE, EINA_TRUE); +elm_scroller_bounce_set(sd->scr, EINA_TRUE, EINA_FALSE); + } + else + { +elm_scroller_policy_set(sd->scr, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); +elm_scroller_content_min_limit(sd->scr, EINA_TRUE, EINA_FALSE); +elm_scroller_bounce_set(sd->scr, EINA_FALSE, EINA_TRUE); + } + elm_table_pack(sd->tbl, sd->scr, 0, 0, 1, 1); + evas_object_show(sd->scr); +} + +static void +_resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd) +
[EGIT] [core/elementary] master 03/06: elm_hoversel: add elm_hoversel_label_auto_changed_set/get() API
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=49ec1ec570561a260b94eb98c1a73a217822ba8d commit 49ec1ec570561a260b94eb98c1a73a217822ba8d Author: Jee-Yong Um <jc9...@samsung.com> Date: Sun Oct 4 15:09:22 2015 +0200 elm_hoversel: add elm_hoversel_label_auto_changed_set/get() API Summary: Hoversel can be used like dropdown or pulldown menu. In that case, changing hoversel label into selected item lable can be considered as common usage of hoversel. This API automatizes changing label. Reviewers: SanghyeonLee, Hermet, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2963 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/bin/test_hoversel.c | 1 + src/lib/elc_hoversel.c| 37 + src/lib/elm_hoversel.eo | 10 ++ src/lib/elm_widget_hoversel.h | 1 + 4 files changed, 49 insertions(+) diff --git a/src/bin/test_hoversel.c b/src/bin/test_hoversel.c index 87f9e55..e65efd9 100644 --- a/src/bin/test_hoversel.c +++ b/src/bin/test_hoversel.c @@ -182,6 +182,7 @@ test_hoversel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ hoversel = elm_hoversel_add(win); elm_hoversel_scrollable_set(hoversel, EINA_TRUE); + elm_hoversel_label_auto_changed_set(hoversel, EINA_TRUE); elm_hoversel_hover_parent_set(hoversel, win); elm_object_text_set(hoversel, "Some Icons"); elm_hoversel_item_add(hoversel, "Item 1", NULL, ELM_ICON_NONE, NULL, NULL); diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 5f7d0a8..6628bf5 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -110,8 +110,33 @@ _on_item_clicked(void *data EINA_UNUSED, Evas_Object *obj2 = WIDGET(item); Elm_Object_Item *eo_it = EO_OBJ(item); + ELM_HOVERSEL_DATA_GET(obj2, sd); + if (item->func) item->func((void *)WIDGET_ITEM_DATA_GET(eo_it), obj2, eo_it); eo_do(obj2, eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, eo_it)); + + if (sd->auto_changed) + { +Evas_Object *ic; + +ic = elm_object_part_content_unset(obj2, "icon"); +ELM_SAFE_FREE(ic, evas_object_del); + +if (item->icon_file) + { + ic = elm_icon_add(obj2); + elm_image_resizable_set(ic, EINA_FALSE, EINA_TRUE); + if (item->icon_type == ELM_ICON_FILE) + elm_image_file_set(ic, item->icon_file, item->icon_group); + else if (item->icon_type == ELM_ICON_STANDARD) + elm_icon_standard_set(ic, item->icon_file); + elm_object_part_content_set(obj2, "icon", ic); + } + +if(item->label) + elm_object_text_set(obj2, item->label); + } + elm_hoversel_hover_end(obj2); return EINA_TRUE; @@ -901,5 +926,17 @@ _elm_hoversel_scrollable_get(Eo *obj EINA_UNUSED, Elm_Hoversel_Data *sd) return sd->scroll_enabled; } +EOLIAN void +_elm_hoversel_label_auto_changed_set(Eo *obj EINA_UNUSED, Elm_Hoversel_Data *sd, Eina_Bool auto_changed) +{ + sd->auto_changed = !!auto_changed; +} + +EOLIAN Eina_Bool +_elm_hoversel_label_auto_changed_get(Eo *obj EINA_UNUSED, Elm_Hoversel_Data *sd) +{ + return sd->auto_changed; +} + #include "elm_hoversel_item.eo.c" #include "elm_hoversel.eo.c" diff --git a/src/lib/elm_hoversel.eo b/src/lib/elm_hoversel.eo index 878b454..ca24396 100644 --- a/src/lib/elm_hoversel.eo +++ b/src/lib/elm_hoversel.eo @@ -57,6 +57,16 @@ class Elm.Hoversel (Elm.Button, Evas.Selectable_Interface, scrollable: bool; [[$true if scrollable $false otherwise.]] } } + @property label_auto_changed { + [[Change the label of hoversel to that of selected item automatically.]] + get{ + } + set{ + } + values { +auto_changed: bool; [[$true if the label is changed automatically or $false otherwise]] + } + } hover_begin { [[This triggers the hoversel popup from code, the same as if the user had clicked the button.]] } diff --git a/src/lib/elm_widget_hoversel.h b/src/lib/elm_widget_hoversel.h index ff62512..2b97728 100644 --- a/src/lib/elm_widget_hoversel.h +++ b/src/lib/elm_widget_hoversel.h @@ -42,6 +42,7 @@ struct _Elm_Hoversel_Data Eina_Bool horizontal: 1; Eina_Bool expanded : 1; Eina_Bool scroll_enabled: 1; + Eina_Bool auto_changed : 1; }; typedef struct _Elm_Hoversel_Item_Data Elm_Hoversel_Item_Data; --
[EGIT] [core/elementary] master 05/06: elm_hover: delay hover dismiss while handling edje signal
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=32c89740f3fcb6f2c6b9739bea0589517a55c48a commit 32c89740f3fcb6f2c6b9739bea0589517a55c48a Author: Jee-Yong Um <jc9...@samsung.com> Date: Sun Oct 4 15:38:52 2015 +0200 elm_hover: delay hover dismiss while handling edje signal Summary: elm_hover_dismiss() doesn't hide hover directly, but sends signal only. It can be translated that "dismiss" do not hide hover only, but handles some works. (EDC program, callbacks etc.) However, "dismiss" sends signals after hide hover itself, so following edje signals are ignored. (Hover cannot be seen already!) This patch makes hover dismiss delayed while handling edje signal. @fix Test Plan: elementary_test hover2 Reviewers: Hermet, cedric Reviewed By: cedric Subscribers: woohyun Differential Revision: https://phab.enlightenment.org/D3068 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- data/themes/edc/elm/hover.edc | 25 ++ src/lib/elm_hover.c | 80 ++- 2 files changed, 88 insertions(+), 17 deletions(-) diff --git a/data/themes/edc/elm/hover.edc b/data/themes/edc/elm/hover.edc index b34d36a..afed708 100644 --- a/data/themes/edc/elm/hover.edc +++ b/data/themes/edc/elm/hover.edc @@ -1,5 +1,6 @@ /* TODO: replicate diagonal swallow slots to the other hover styles */ group { name: "elm/hover/base/default"; + data.item: "dismiss" "on"; parts { part { name: "elm.swallow.offset"; type: SWALLOW; description { state: "default" 0.0; @@ -131,10 +132,18 @@ group { name: "elm/hover/base/default"; signal: "mouse,up,*"; source: "base"; action: SIGNAL_EMIT "elm,action,dismiss" "elm"; } + program { name: "hide"; + signal: "elm,action,hide"; source: "elm"; + after: "hidefinished"; + } + program { name: "hidefinished"; + action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; + } } } group { name: "elm/hover/base/popout"; + data.item: "dismiss" "on"; images.image: "button_normal.png" COMP; parts { part { name: "elm.swallow.offset"; type: SWALLOW; @@ -362,7 +371,12 @@ group { name: "elm/hover/base/popout"; program { name: "hide"; signal: "elm,action,hide"; source: "elm"; action: STATE_SET "default" 0.0; + transition: DECELERATE 0.5; target: "base"; + after: "hidefinished"; + } + program { name: "hidefinished"; + action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; } program { name: "leftshow"; signal: "elm,action,slot,left,show"; source: "elm"; @@ -427,6 +441,7 @@ group { name: "elm/hover/base/hoversel_vertical/default"; alias: "elm/hover/base/hoversel_vertical/entry"; images.image: "button_normal.png" COMP; images.image: "vertical_separated_bar_glow.png" COMP; + data.item: "dismiss" "on"; data.item: "max_size" "60"; parts { part { name: "elm.swallow.offset"; type: SWALLOW; @@ -597,7 +612,12 @@ group { name: "elm/hover/base/hoversel_vertical/default"; program { name: "hide"; signal: "elm,action,hide"; source: "elm"; action: STATE_SET "default" 0.0; + transition: DECELERATE 0.5; target: "base"; + after: "hidefinished"; + } + program { name: "hidefinished"; + action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; } program { name: "topshow"; @@ -645,6 +665,7 @@ group { name: "elm/hover/base/hoversel_vertical/default"; group { name: "elm/hover/base/hoversel_horizontal/default"; alias: "elm/hover/base/hoversel_horizontal/entry"; images.image: "button_normal.png" COMP; + data.item: "dismiss" "on"; data.item: "max_size" "120"; parts { part { name: "elm.swallow.offset"; type: SWALLOW; @@ -774,6 +795,10 @@ group { name: "elm/hover/base/hoversel_horizontal/default"; action: STATE_SET "default" 0.0; transition: DECELERATE 0.5; target: "base"; + after: "hidefinished"; + } + program { name: "hidefinished";
[EGIT] [core/elementary] master 01/01: elm_hoversel: add support elm_object_item_part_text_set()
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=22aec5f944478e441d94816fc4088575040e9165 commit 22aec5f944478e441d94816fc4088575040e9165 Author: Jee-Yong Um <jc9...@samsung.com> Date: Wed Sep 16 10:44:45 2015 +0900 elm_hoversel: add support elm_object_item_part_text_set() Summary: There was override for elm_object_item_part_text_get() only. This patch implements elm_object_item_part_text_set(). Reviewers: Hermet, cedric Subscribers: Hermet Differential Revision: https://phab.enlightenment.org/D3054 --- src/lib/elc_hoversel.c | 13 + src/lib/elm_hoversel_item.eo | 1 + 2 files changed, 14 insertions(+) diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index b828931..82f5957 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -310,6 +310,19 @@ _size_hints_changed_cb(void *data, elm_layout_sizing_eval(data); } +static void +_elm_hoversel_item_elm_widget_item_part_text_set(Eo *eo_it EINA_UNUSED, +Elm_Hoversel_Item_Data *it, +const char *part, +const char *label) +{ + if (part && strcmp(part, "default")) return; + eina_stringshare_replace(>label, label); + + if (VIEW(it)) + elm_object_text_set(VIEW(it), label); +} + static const char * _elm_hoversel_item_elm_widget_item_part_text_get(Eo *eo_it EINA_UNUSED, Elm_Hoversel_Item_Data *it, diff --git a/src/lib/elm_hoversel_item.eo b/src/lib/elm_hoversel_item.eo index 7484150..39d0765 100644 --- a/src/lib/elm_hoversel_item.eo +++ b/src/lib/elm_hoversel_item.eo @@ -21,6 +21,7 @@ class Elm.Hoversel_Item(Elm.Widget_Item) Eo.Base.constructor; Eo.Base.destructor; Elm.Widget_Item.signal_emit; +Elm.Widget_Item.part_text.set; Elm.Widget_Item.part_text.get; Elm.Widget_Item.style.get; Elm.Widget_Item.style.set; --
[EGIT] [core/elementary] elementary-1.15 01/01: elm_hover: Set min size hint for size and offset spacer before moving or resizing hover
hermet pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=88bcf35b0340f8d623d669be42bb0abbbfa0b6dc commit 88bcf35b0340f8d623d669be42bb0abbbfa0b6dc Author: Jee-Yong Um jc9...@samsung.com Date: Fri Aug 28 15:56:34 2015 +0900 elm_hover: Set min size hint for size and offset spacer before moving or resizing hover Summary: Size or offset spacer make hover be able to move its swallows to right positions. In elm_layout_sizing_eval() for hover, moving and resizing spacers are done after moving and resizing hover. It causes in hover's move or resize callback, geometry can not be got correctly. Reviewers: SanghyeonLee, Hermet Reviewed By: Hermet Differential Revision: https://phab.enlightenment.org/D2999 --- src/lib/elm_hover.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_hover.c b/src/lib/elm_hover.c index c55905e..9306c78 100644 --- a/src/lib/elm_hover.c +++ b/src/lib/elm_hover.c @@ -327,10 +327,10 @@ _elm_hover_elm_layout_sizing_eval(Eo *obj, Elm_Hover_Data *sd) else ofs_x = x2 - x; ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); - evas_object_move(wd-resize_obj, x, y); - evas_object_resize(wd-resize_obj, w, h); evas_object_size_hint_min_set(sd-offset, ofs_x, y2 - y); evas_object_size_hint_min_set(sd-size, w2, h2); + evas_object_move(wd-resize_obj, x, y); + evas_object_resize(wd-resize_obj, w, h); } static void --
[EGIT] [core/efl] master 01/01: edje_container: fix typo in edje_container_align_set
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=36dd11e8d6fb307df5f96444e64b7cf67e425169 commit 36dd11e8d6fb307df5f96444e64b7cf67e425169 Author: Jee-Yong Um jc9...@samsung.com Date: Fri Aug 7 14:45:47 2015 +0900 edje_container: fix typo in edje_container_align_set Summary: Fix type in edje_container_align_set, it was originally named as edje_contain(t)er_align_set. Reviewers: Hermet Subscribers: cedric, Hermet Differential Revision: https://phab.enlightenment.org/D2927 --- src/lib/edje/edje_container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/edje/edje_container.c b/src/lib/edje/edje_container.c index 6bf428f..30d0df5 100644 --- a/src/lib/edje/edje_container.c +++ b/src/lib/edje/edje_container.c @@ -692,7 +692,7 @@ edje_container_max_size_get(Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh } void -edje_containter_align_set(Evas_Object *obj, double halign, double valign) +edje_container_align_set(Evas_Object *obj, double halign, double valign) { Smart_Data *sd; --
[EGIT] [core/elementary] master 10/17: elm_hoversel: add elm_hoversel_scroll_enabled_set/get() API
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=e8264becb8f6f36e3c62c5fc5e4a46bbdbb9cf1f commit e8264becb8f6f36e3c62c5fc5e4a46bbdbb9cf1f Author: Jee-Yong Um jc9...@samsung.com Date: Tue Aug 4 15:51:36 2015 +0200 elm_hoversel: add elm_hoversel_scroll_enabled_set/get() API Summary: Currently, hoversel shows all items at the same time, but to limit the size of contents and make it scrollable is neccesary to some users. elm_hoversel_scroll_enabled_set/get() API makes the contents of hoversel scrollable or not. Test Plan: The newly added scroll function is enabled for the second hoversel in hoversel sample of elementary_test. Reviewers: Hermet, raster, herdsman, cedric, tasn Subscribers: JackDanielZ, cedric, Hermet Differential Revision: https://phab.enlightenment.org/D2603 Signed-off-by: Cedric BAIL ced...@osg.samsung.com --- data/themes/edc/elm/hover.edc | 10 +-- src/bin/test_hoversel.c | 1 + src/lib/elc_hoversel.c| 146 -- src/lib/elm_hoversel.eo | 19 ++ src/lib/elm_widget_hoversel.h | 9 ++- 5 files changed, 174 insertions(+), 11 deletions(-) diff --git a/data/themes/edc/elm/hover.edc b/data/themes/edc/elm/hover.edc index 19c3bd5..43fd5c5 100644 --- a/data/themes/edc/elm/hover.edc +++ b/data/themes/edc/elm/hover.edc @@ -427,6 +427,7 @@ group { name: elm/hover/base/hoversel_vertical/default; alias: elm/hover/base/hoversel_vertical/entry; images.image: button_normal.png COMP; images.image: vertical_separated_bar_glow.png COMP; + data.item: max_size 60; parts { part { name: elm.swallow.offset; type: SWALLOW; description { state: default 0.0; @@ -644,6 +645,7 @@ group { name: elm/hover/base/hoversel_vertical/default; group { name: elm/hover/base/hoversel_horizontal/default; alias: elm/hover/base/hoversel_horizontal/entry; images.image: button_normal.png COMP; + data.item: max_size 120; parts { part { name: elm.swallow.offset; type: SWALLOW; description { state: default 0.0; @@ -673,10 +675,10 @@ group { name: elm/hover/base/hoversel_horizontal/default; part { name: button_image; mouse_events: 0; description { state: default 0.0; rel1.to_x: elm.swallow.slot.left; -rel1.to_y: elm.swallow.slot.middle; +rel1.to_y: elm.swallow.slot.left; rel1.offset: -6 0; rel2.to_x: elm.swallow.slot.middle; -rel2.to_y: elm.swallow.slot.middle; +rel2.to_y: elm.swallow.slot.left; rel2.relative: 0.0 1.0; rel2.offset: 4 1; image { @@ -687,11 +689,11 @@ group { name: elm/hover/base/hoversel_horizontal/default; } description { state: right 0.0; rel1.to_x: elm.swallow.slot.middle; -rel1.to_y: elm.swallow.slot.middle; +rel1.to_y: elm.swallow.slot.right; rel1.relative: 1.0 0.0; rel1.offset: -5 0; rel2.to_x: elm.swallow.slot.right; -rel2.to_y: elm.swallow.slot.middle; +rel2.to_y: elm.swallow.slot.right; rel2.offset: 5 1; image { normal: button_normal.png; diff --git a/src/bin/test_hoversel.c b/src/bin/test_hoversel.c index 9e35332..26977dd 100644 --- a/src/bin/test_hoversel.c +++ b/src/bin/test_hoversel.c @@ -181,6 +181,7 @@ test_hoversel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ evas_object_show(hoversel); hoversel = elm_hoversel_add(win); + elm_hoversel_scroll_enabled_set(hoversel, EINA_TRUE); elm_hoversel_hover_parent_set(hoversel, win); elm_object_text_set(hoversel, Some Icons); elm_hoversel_item_add(hoversel, Item 1, NULL, ELM_ICON_NONE, NULL, NULL); diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 9be75c2..a8bb528 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -148,6 +148,9 @@ _activate(Evas_Object *obj) Evas_Object *bt, *bx, *ic; const Eina_List *l; char buf[4096]; + const char *max_size_str; + int max_size = 0; + Evas_Coord box_w = -1, box_h = -1; ELM_HOVERSEL_DATA_GET(obj, sd); @@ -218,12 +221,48 @@ _activate(Evas_Object *obj) eo_event_callback_add(ELM_WIDGET_EVENT_UNFOCUSED, _item_unfocused_cb, item)); } - if (sd-horizontal) - elm_object_part_content_set(sd-hover, elm_hover_best_content_location_get - (sd-hover, ELM_HOVER_AXIS_HORIZONTAL), bx); + elm_box_recalculate(bx); + + if (sd-scroll_enabled) + { +max_size_str = edje_object_data_get(elm_layout_edje_get(sd-hover), max_size); +if (max_size_str) + max_size = (int)(atoi(max_size_str) + * elm_config_scale_get() * elm_object_scale_get(obj
[EGIT] [core/efl] master 03/04: edje_embryo: add methods to handle event flags.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=815ebc0b0eb513072ae35ac801304a3228f208e2 commit 815ebc0b0eb513072ae35ac801304a3228f208e2 Author: Jee-Yong Um con...@gmail.com Date: Wed Jul 29 22:29:41 2015 +0200 edje_embryo: add methods to handle event flags. Summary: Add embryo methods that change the state whether Edje_Part will handle Evas_Event or not. Reviewers: Hermet, woohyun, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2807 Signed-off-by: Cedric BAIL ced...@osg.samsung.com --- data/edje/include/edje.inc | 4 ++ src/lib/edje/edje_embryo.c | 98 + src/lib/edje/edje_private.h | 4 ++ src/lib/edje/edje_util.c| 32 +++ 4 files changed, 138 insertions(+) diff --git a/data/edje/include/edje.inc b/data/edje/include/edje.inc index 98105b6..65227aa 100644 --- a/data/edje/include/edje.inc +++ b/data/edje/include/edje.inc @@ -135,6 +135,10 @@ native set_mouse_events (part_id, ev); native get_mouse_events (part_id); native set_repeat_events(part_id, rep); native get_repeat_events(part_id); +native set_ignore_flags (part_id, flags); +native get_ignore_flags (part_id); +native set_mask_flags (part_id, flags); +native get_mask_flags (part_id); native part_swallow (part_id, GROUP:str[]); native external_param_get_int(id, param_name[]); diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c index 2b1a666..b272594 100644 --- a/src/lib/edje/edje_embryo.c +++ b/src/lib/edje/edje_embryo.c @@ -184,6 +184,10 @@ * get_mouse_events(part_id) * set_repeat_events(part_id, rep) * get_repeat_events(part_id) + * set_ignore_flags(part_id, flags) + * get_ignore_flags(part_id) + * set_mask_flags(part_id, flags) + * get_mask_flags(part_id) * set_clip(part_id, clip_part_id) * get_clip(part_id) * @@ -3552,6 +3556,96 @@ _edje_embryo_fn_get_repeat_events(Embryo_Program *ep, Embryo_Cell *params) } +/* set_ignore_flags(part_id, flags) */ +static Embryo_Cell +_edje_embryo_fn_set_ignore_flags(Embryo_Program *ep, Embryo_Cell *params) +{ + int part_id = 0; + Edje *ed; + Edje_Real_Part *rp; + + CHKPARAM(2); + + part_id = params[1]; + if (part_id 0) return 0; + + ed = embryo_program_data_get(ep); + rp = ed-table_parts[part_id % ed-table_parts_size]; + + if (rp) + _edje_part_ignore_flags_set(ed, rp, params[2]); + + return 0; +} + +/* get_ignore_flags(part_id) */ +static Embryo_Cell +_edje_embryo_fn_get_ignore_flags(Embryo_Program *ep, Embryo_Cell *params) +{ + int part_id = 0; + Edje *ed; + Edje_Real_Part *rp; + + CHKPARAM(1); + + part_id = params[1]; + if (part_id 0) return 0; + + ed = embryo_program_data_get(ep); + rp = ed-table_parts[part_id % ed-table_parts_size]; + + if (rp) + return (Embryo_Cell)_edje_var_int_get(ed, (int)_edje_part_ignore_flags_get(ed, rp)); + + return 0; + +} + +/* set_mask_flags(part_id, flags) */ +static Embryo_Cell +_edje_embryo_fn_set_mask_flags(Embryo_Program *ep, Embryo_Cell *params) +{ + int part_id = 0; + Edje *ed; + Edje_Real_Part *rp; + + CHKPARAM(2); + + part_id = params[1]; + if (part_id 0) return 0; + + ed = embryo_program_data_get(ep); + rp = ed-table_parts[part_id % ed-table_parts_size]; + + if (rp) + _edje_part_mask_flags_set(ed, rp, params[2]); + + return 0; +} + +/* get_mask_flags(part_id) */ +static Embryo_Cell +_edje_embryo_fn_get_mask_flags(Embryo_Program *ep, Embryo_Cell *params) +{ + int part_id = 0; + Edje *ed; + Edje_Real_Part *rp; + + CHKPARAM(1); + + part_id = params[1]; + if (part_id 0) return 0; + + ed = embryo_program_data_get(ep); + rp = ed-table_parts[part_id % ed-table_parts_size]; + + if (rp) + return (Embryo_Cell)_edje_var_int_get(ed, (int)_edje_part_mask_flags_get(ed, rp)); + + return 0; + +} + /* part_swallow(part_id, group_name) */ static Embryo_Cell _edje_embryo_fn_part_swallow(Embryo_Program *ep, Embryo_Cell *params) @@ -4285,6 +4379,10 @@ _edje_embryo_script_init(Edje_Part_Collection *edc) embryo_program_native_call_add(ep, get_mouse_events, _edje_embryo_fn_get_mouse_events); embryo_program_native_call_add(ep, set_repeat_events, _edje_embryo_fn_set_repeat_events); embryo_program_native_call_add(ep, get_repeat_events, _edje_embryo_fn_get_repeat_events); + embryo_program_native_call_add(ep, set_ignore_flags, _edje_embryo_fn_set_ignore_flags); + embryo_program_native_call_add(ep, get_ignore_flags, _edje_embryo_fn_get_ignore_flags); + embryo_program_native_call_add(ep, set_mask_flags, _edje_embryo_fn_set_mask_flags); + embryo_program_native_call_add(ep, get_mask_flags, _edje_embryo_fn_get_mask_flags); embryo_program_native_call_add(ep, part_swallow, _edje_embryo_fn_part_swallow); diff --git a/src/lib/edje
[EGIT] [core/elementary] master 01/10: elm_calendar: remove duplicated referece
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=a6a98574aad79fe48a96139b982a22139b76d94a commit a6a98574aad79fe48a96139b982a22139b76d94a Author: Jee-Yong Um jc9...@samsung.com Date: Tue Jul 28 20:34:22 2015 +0200 elm_calendar: remove duplicated referece Summary: elm_calendar_weekdays_names_set() API is generated by eolian, but its prototype is defined in both elm_calendar_common.h and elm_calendar.eo.legacy.h. Remove duplicated reference from elm_calendar_common.h Reviewers: Hermet Subscribers: Hermet Differential Revision: https://phab.enlightenment.org/D2866 Signed-off-by: Cedric BAIL ced...@osg.samsung.com --- src/lib/elm_calendar_common.h | 29 - 1 file changed, 29 deletions(-) diff --git a/src/lib/elm_calendar_common.h b/src/lib/elm_calendar_common.h index b36f92f..5d50f6e 100644 --- a/src/lib/elm_calendar_common.h +++ b/src/lib/elm_calendar_common.h @@ -18,35 +18,6 @@ typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark;/** Item handle for a c typedef char * (*Elm_Calendar_Format_Cb)(struct tm *stime); /** - * Set weekdays names to be displayed by the calendar. - * - * @param obj The calendar object. - * @param weekdays Array of seven strings to be used as weekday names. - * @warning It must have 7 elements, or it will access invalid memory. - * @warning The strings must be NULL terminated ('@\0'). - * - * By default, weekdays abbreviations get from system are displayed: - * E.g. for an en_US locale: Sun, Mon, Tue, Wed, Thu, Fri, Sat - * - * The first string should be related to Sunday, the second to Monday... - * - * The usage should be like this: - * @code - * const char *weekdays[] = - * { - * Sunday, Monday, Tuesday, Wednesday, - * Thursday, Friday, Saturday - * }; - * elm_calendar_weekdays_names_set(calendar, weekdays); - * @endcode - * - * @see elm_calendar_weekdays_name_get() - * - * @ref calendar_example_02 - */ -EAPI void elm_calendar_weekdays_names_set(Evas_Object *obj, const char *weekdays[]); - -/** * Delete mark from the calendar. * * @param mark The mark to be deleted. --
[EGIT] [core/efl] master 03/04: edje: add mask_flags instruction for part block
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2b29f4dfbf901d40aee552345ae5285b1c2e484c commit 2b29f4dfbf901d40aee552345ae5285b1c2e484c Author: Jee-Yong Um con...@gmail.com Date: Thu Jun 25 16:02:41 2015 +0200 edje: add mask_flags instruction for part block Summary: Elementary widgets dealing with Evas Events usually mask event_flags with EVAS_EVENT_FLAG_ON_HOLD, to show that this event is already handled. However, widget like Elm_Button, it does not handle EVAS_CALLBACK_MOUSE_DOWN directly, but it handles Edje_Signal instead, so there's no chance to mask event_flags. Developers can block event propagation by putting rectangle the very last part of EDC, but this instruction can help the case making elementary widget with only Edje_Signal handling. This is not required essentially, so please check the necessity of this function. Reviewers: Hermet, cedric Reviewed By: cedric Subscribers: cedric, Hermet Differential Revision: https://phab.enlightenment.org/D2764 Signed-off-by: Cedric BAIL ced...@osg.samsung.com --- src/bin/edje/edje_cc_handlers.c | 32 ++ src/bin/edje/edje_convert.c | 1 + src/bin/edje/edje_convert.h | 1 + src/bin/edje/edje_data_convert.c | 1 + src/lib/edje/Edje_Edit.h | 19 ++ src/lib/edje/edje_callbacks.c| 42 +++- src/lib/edje/edje_convert.c | 1 + src/lib/edje/edje_convert.h | 1 + src/lib/edje/edje_data.c | 1 + src/lib/edje/edje_edit.c | 23 ++ src/lib/edje/edje_entry.c| 5 + src/lib/edje/edje_private.h | 1 + 12 files changed, 115 insertions(+), 13 deletions(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index f6458f8..7834ffb 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -253,6 +253,7 @@ static void st_collections_group_parts_part_mouse_events(void); static void st_collections_group_parts_part_anti_alias(void); static void st_collections_group_parts_part_repeat_events(void); static void st_collections_group_parts_part_ignore_flags(void); +static void st_collections_group_parts_part_mask_flags(void); static void st_collections_group_parts_part_scale(void); static void st_collections_group_parts_part_pointer_mode(void); static void st_collections_group_parts_part_precise_is_inside(void); @@ -691,6 +692,7 @@ New_Statement_Handler statement_handlers[] = {collections.group.parts.part.anti_alias, st_collections_group_parts_part_anti_alias}, {collections.group.parts.part.repeat_events, st_collections_group_parts_part_repeat_events}, {collections.group.parts.part.ignore_flags, st_collections_group_parts_part_ignore_flags}, + {collections.group.parts.part.mask_flags, st_collections_group_parts_part_mask_flags}, {collections.group.parts.part.scale, st_collections_group_parts_part_scale}, {collections.group.parts.part.pointer_mode, st_collections_group_parts_part_pointer_mode}, {collections.group.parts.part.precise_is_inside, st_collections_group_parts_part_precise_is_inside}, @@ -983,6 +985,7 @@ New_Statement_Handler statement_handlers[] = before - insert_before after - insert_after ignore - ignore_flags + mask - mask_flags pointer - pointer_mode alt_font - use_alternate_font_metrics clip - clip_to @@ -1006,6 +1009,7 @@ New_Statement_Handler statement_handlers_short[] = {collections.group.parts.part.before, st_collections_group_parts_part_insert_before}, {collections.group.parts.part.after, st_collections_group_parts_part_insert_after}, {collections.group.parts.part.ignore, st_collections_group_parts_part_ignore_flags}, + {collections.group.parts.part.mask, st_collections_group_parts_part_mask_flags}, {collections.group.parts.part.pointer, st_collections_group_parts_part_pointer_mode}, {collections.group.parts.part.alt_font, st_collections_group_parts_part_use_alternate_font_metrics}, {collections.group.parts.part.clip, st_collections_group_parts_part_clip_to_id}, @@ -3433,6 +3437,7 @@ _part_copy(Edje_Part *ep, Edje_Part *ep2) ep-anti_alias = ep2-anti_alias; ep-repeat_events = ep2-repeat_events; ep-ignore_flags = ep2-ignore_flags; + ep-mask_flags = ep2-mask_flags; ep-scale = ep2-scale; ep-pointer_mode = ep2-pointer_mode; ep-precise_is_inside = ep2-precise_is_inside; @@ -4422,6 +4427,7 @@ st_collections_group_parts_alias(void) mouse_events: 1; repeat_events: 0; ignore_flags: NONE; +mask_flags: NONE; clip_to: anotherpart; source: groupname
[EGIT] [core/efl] master 02/04: edje: implement methods for mouse_events with edje_part for Edje Embryo script.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ef491e697e60a6e79bec27164342bfb103d2c95a commit ef491e697e60a6e79bec27164342bfb103d2c95a Author: Jee-Yong Um con...@gmail.com Date: Thu Jun 25 15:56:48 2015 +0200 edje: implement methods for mouse_events with edje_part for Edje Embryo script. Summary: In edje_embryo.c, there are the list for supported methods in script. However, methods listed from line 175 to 188 don't exist actually. This patch implements 4 methods among them. set_mouse_events(part_id, ev) get_mouse_events(part_id) set_repeat_events(part_id, rep) get_repeat_events(part_id) Reviewers: Hermet, woohyun, cedric Reviewed By: cedric Subscribers: cedric, Hermet Differential Revision: https://phab.enlightenment.org/D2766 Signed-off-by: Cedric BAIL ced...@osg.samsung.com --- data/edje/include/edje.inc | 4 ++ src/lib/edje/edje_embryo.c | 95 + src/lib/edje/edje_private.h | 5 +++ src/lib/edje/edje_util.c| 48 +++ 4 files changed, 152 insertions(+) diff --git a/data/edje/include/edje.inc b/data/edje/include/edje.inc index 5a3e9dd..98105b6 100644 --- a/data/edje/include/edje.inc +++ b/data/edje/include/edje.inc @@ -131,6 +131,10 @@ native stop_program (program_id); native stop_programs_on (part_id); native set_min_size (Float:w, Float:h); native set_max_size (Float:w, Float:h); +native set_mouse_events (part_id, ev); +native get_mouse_events (part_id); +native set_repeat_events(part_id, rep); +native get_repeat_events(part_id); native part_swallow (part_id, GROUP:str[]); native external_param_get_int(id, param_name[]); diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c index 2977a54..ddf4ebd 100644 --- a/src/lib/edje/edje_embryo.c +++ b/src/lib/edje/edje_embryo.c @@ -3462,6 +3462,96 @@ _edje_embryo_fn_get_state_val(Embryo_Program *ep, Embryo_Cell *params) return 0; } +/* set_mouse_events(part_id, ev) */ +static Embryo_Cell +_edje_embryo_fn_set_mouse_events(Embryo_Program *ep, Embryo_Cell *params) +{ + int part_id = 0; + Edje *ed; + Edje_Real_Part *rp; + + CHKPARAM(2); + + part_id = params[1]; + if (part_id 0) return 0; + + ed = embryo_program_data_get(ep); + rp = ed-table_parts[part_id % ed-table_parts_size]; + + if (rp) + _edje_part_mouse_events_set(ed, rp, params[2]); + + return 0; +} + +/* get_mouse_events(part_id) */ +static Embryo_Cell +_edje_embryo_fn_get_mouse_events(Embryo_Program *ep, Embryo_Cell *params) +{ + int part_id = 0; + Edje *ed; + Edje_Real_Part *rp; + + CHKPARAM(1); + + part_id = params[1]; + if (part_id 0) return 0; + + ed = embryo_program_data_get(ep); + rp = ed-table_parts[part_id % ed-table_parts_size]; + + if (rp) + return (Embryo_Cell)_edje_var_int_get(ed, (int)_edje_part_mouse_events_get(ed, rp)); + + return 0; + +} + +/* set_repeat_events(part_id, rep) */ +static Embryo_Cell +_edje_embryo_fn_set_repeat_events(Embryo_Program *ep, Embryo_Cell *params) +{ + int part_id = 0; + Edje *ed; + Edje_Real_Part *rp; + + CHKPARAM(2); + + part_id = params[1]; + if (part_id 0) return 0; + + ed = embryo_program_data_get(ep); + rp = ed-table_parts[part_id % ed-table_parts_size]; + + if (rp) + _edje_part_repeat_events_set(ed, rp, params[2]); + + return 0; +} + +/* get_repeat_events(part_id) */ +static Embryo_Cell +_edje_embryo_fn_get_repeat_events(Embryo_Program *ep, Embryo_Cell *params) +{ + int part_id = 0; + Edje *ed; + Edje_Real_Part *rp; + + CHKPARAM(1); + + part_id = params[1]; + if (part_id 0) return 0; + + ed = embryo_program_data_get(ep); + rp = ed-table_parts[part_id % ed-table_parts_size]; + + if (rp) + return (Embryo_Cell)_edje_var_int_get(ed, (int)_edje_part_repeat_events_get(ed, rp)); + + return 0; + +} + /* part_swallow(part_id, group_name) */ static Embryo_Cell _edje_embryo_fn_part_swallow(Embryo_Program *ep, Embryo_Cell *params) @@ -4191,6 +4281,11 @@ _edje_embryo_script_init(Edje_Part_Collection *edc) embryo_program_native_call_add(ep, get_state_val, _edje_embryo_fn_get_state_val); embryo_program_native_call_add(ep, set_state_anim, _edje_embryo_fn_set_state_anim); + embryo_program_native_call_add(ep, set_mouse_events, _edje_embryo_fn_set_mouse_events); + embryo_program_native_call_add(ep, get_mouse_events, _edje_embryo_fn_get_mouse_events); + embryo_program_native_call_add(ep, set_repeat_events, _edje_embryo_fn_set_repeat_events); + embryo_program_native_call_add(ep, get_repeat_events, _edje_embryo_fn_get_repeat_events); + embryo_program_native_call_add(ep, part_swallow, _edje_embryo_fn_part_swallow); embryo_program_native_call_add(ep, external_param_get_int, _edje_embryo_fn_external_param_get_int); diff
[EGIT] [core/elementary] elementary-1.14 01/01: elm_object_item: fix the issue that del_cb doens't get item data as its parameter
hermet pushed a commit to branch elementary-1.14. http://git.enlightenment.org/core/elementary.git/commit/?id=72c25a4cea304dd1d29794daa0f829f1c349b161 commit 72c25a4cea304dd1d29794daa0f829f1c349b161 Author: Jee-Yong Um jc9...@samsung.com Date: Mon May 18 17:09:19 2015 +0900 elm_object_item: fix the issue that del_cb doens't get item data as its parameter Summary: elm_object_item_del_cb_set() can set delete callback that is called on item deletion. Del_cb, Evas_Smart_Cb, has void pointer for item data as its first parameter. However, getting item data is broken. @fix Reviewers: Hermet Reviewed By: Hermet Subscribers: Hermet Differential Revision: https://phab.enlightenment.org/D2524 --- src/lib/elm_widget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index 4bb2a59..396b1cb 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -4218,7 +4218,7 @@ _eo_del_cb(void *data EINA_UNUSED, Eo *eo_item, const Eo_Event_Description *desc Elm_Widget_Item_Data *item = eo_data_scope_get(eo_item, ELM_WIDGET_ITEM_CLASS); ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_TRUE); if (item-del_func) - item-del_func((void *)item-data, item-widget, item-eo_obj); + item-del_func((void *) WIDGET_ITEM_DATA_GET(item-eo_obj), item-widget, item-eo_obj); return EINA_TRUE; } --
[EGIT] [core/elementary] master 01/01: elm_genlist: Emitting signal when content or text is set in genlist item
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=26277620c0a073a21d078ef2706c352242b2f89b commit 26277620c0a073a21d078ef2706c352242b2f89b Author: Jee-Yong Um jc9...@samsung.com Date: Thu May 7 16:21:57 2015 +0900 elm_genlist: Emitting signal when content or text is set in genlist item Summary: There could be a demand for providing subtle different item styles according to the existence of icon or text swallowed in genlist item. For example, if icon exists, genlist item shows icon, or show rectangle where icon should be placed. One style can have various form with this signal. Reviewers: Hermet Subscribers: Hermet Differential Revision: https://phab.enlightenment.org/D2348 --- src/lib/elm_genlist.c | 8 1 file changed, 8 insertions(+) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index f6e66e0..c41115f 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -307,6 +307,7 @@ _item_text_realize(Elm_Gen_Item *it, const Eina_List *l; const char *key; char *s; + char buf[256]; if (!it-itc-func.text_get) return; @@ -323,6 +324,9 @@ _item_text_realize(Elm_Gen_Item *it, { edje_object_part_text_escaped_set(target, key, s); free(s); + + snprintf(buf, sizeof(buf), elm,state,%s,visible, key); + edje_object_signal_emit(target, buf, elm); } else { @@ -342,6 +346,7 @@ _item_content_realize(Elm_Gen_Item *it, { Eina_Bool tmp; Evas_Object *content; + char buf[256]; if (!parts) { @@ -384,6 +389,9 @@ _item_content_realize(Elm_Gen_Item *it, elm_widget_sub_object_add(WIDGET(it), content); if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get())) elm_widget_disabled_set(content, EINA_TRUE); + + snprintf(buf, sizeof(buf), elm,state,%s,visible, key); + edje_object_signal_emit(target, buf, elm); } } } --