Commit Graph

62181 Commits

Author SHA1 Message Date
Marcel Hollerbach c95662cbab meson: lets add cxx examples
Summary:
it appears they have not been part of this before. Now they are, and two
broken examples are fixed.

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8735
2019-04-26 16:38:37 +02:00
Xavi Artigas fb82b51d6a docs: Reword Efl.Container and family
Summary:
Avoid using "Item" since this is used by Grid and List items, or "Child" since
this is what Efl.Object uses.
Also clarify what each container does.

Test Plan: Only changes in docs. Everything still builds and passes tests.

Reviewers: bu5hm4n, cedric, zmike

Reviewed By: bu5hm4n

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8720
2019-04-26 14:24:00 +02:00
Marcel Hollerbach a6346c8eed autotools: fix build
Summary:
i forgot this before. efl_gfx_arrangement.eo needs to be in the list of
files here.

Reviewers: segfaultxavi, cedric, zmike

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8721
2019-04-26 14:14:15 +02:00
Marcel Hollerbach 4eb8b45494 efl_ui_spec: lets add a README
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8713
2019-04-26 12:09:34 +02:00
Marcel Hollerbach 03e1e849b1 efl_ui_suite_spec: add efl_ui_grid to test suite
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8707
2019-04-26 12:06:09 +02:00
Marcel Hollerbach 874e07550d efl_ui_grid: do not delete a item that is not part of this container
otherwise we start to delete callbacks etc. on a widget that we do not
have.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8706
2019-04-26 12:06:08 +02:00
Marcel Hollerbach 080342d82e efl_ui_grid: reparent deleted children
if a child is removed from grid, the parent should not be grid anymore.
Additionally, group members should also be removed, or random deletions
of widgets could happen.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8705
2019-04-26 12:06:07 +02:00
Marcel Hollerbach 91cacb5357 efl_ui_grid: add an error to grid
grid only accepts grid items, not general widgets. If a wrong type is
passed in, a error should be printed.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8704
2019-04-26 12:06:06 +02:00
Marcel Hollerbach df089ac5ff efl_ui_grid: implement index behaviour of efl_pack
efl_pack defines behaviour for indexes greater and smaller than 0 and
the actaul size of items. With this commit the defined lange -count <->
count -1 now works as expected.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8703
2019-04-26 12:06:05 +02:00
Marcel Hollerbach 404dcc290b efl_ui_grid: fixup pack APIs
the APIs in pack should only allow a single registeration of a item.
And when this item is registered, the parent should be set accordingly.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8702
2019-04-26 12:06:04 +02:00
Marcel Hollerbach d4a5f1525e efl_ui_spec_suite: support custom widgets
sooo, this test suite is testing interfaces. And when a content needs to
be passed into the API, a lightweight version of a widget will be passed
in. But sometimes implementations *do* requires special classes, they
can now be specified with a custom-mapping in json.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8701
2019-04-26 12:06:03 +02:00
Marcel Hollerbach 7aa9ea071a efl_pack: split algin and padding property
the pack interface is a general interface for how we pack things into a
container. the align and padding property has less to nothing to do with
this. Hence this commit splits the two properties into theire own
interface.

fix T7825

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8699
2019-04-26 12:06:02 +02:00
Jaehyun Cho f3b9f7f0d8 efl_ui: fix not to call _on_child_del() after container is deleted
If efl_ref() is called to child, then child may not be deleted when
container is deleted.
This causes _on_child_del() is called after container is deleted and it
causes crash if container data is accessed in _on_child_del().

To resolve the above issue, all callbacks of child are deleted not to
call _on_child_del() after container is deleted.
2019-04-26 18:25:50 +09:00
Hermet Park 25aec3ba7b evas waylang_egl: flag on msaa to optimize map drawing.
This msaa flag could help map drawing by avoiding unnecessary framebuffer mapping.
2019-04-26 17:00:46 +09:00
Yeongjong Lee 0921e4770e edje_calc: replace eina_stringshare_ref with eina_stringshare_add
Summary:
When there is circular dependency in edc, a bunch of CRI log is printed.
This patch fixes it.
```
ERR<10159>:edje lib/edje/edje_calc.c:3919 _edje_part_recalc() Circular dependency in the group 'test' : longpartname -> longpartname -> longpartname2
ERR<10159>:edje lib/edje/edje_calc.c:3896 _edje_part_recalc() Circular dependency when calculating part "longpartname". Already calculating XY [03] axes. Need to calculate Y [02] axes
CRI<10159>: lib/eina/eina_share_common.c:559 _eina_share_common_node_from_str() *** Eina Magic Check Failed at 0x7fb7c93ebf60 !!!
    Input handle is wrong type.
    Expected: 98761254 - Eina Stringshare Node
    Supplied: 2f736e6f - (unknown)

CRI<10159>: lib/eina/eina_share_common.c:559 _eina_share_common_node_from_str() *** Eina Magic Check Failed at 0x7fb7c93ec5d1 !!!
    Input handle is wrong type.
    Expected: 98761254 - Eina Stringshare Node
    Supplied: 5f747261 - (unknown)
```
If string is already stored, `eina_stringshare_add` increase its reference count.

Test Plan:
test.c
```
//edje_cc test.edc && gcc -o test test.c `pkg-config --libs --cflags elementary`
#include <Elementary.h>

int main(int argc, char **argv)
{
   elm_init(argc, argv);

   Evas_Object *win = elm_win_util_standard_add("test", "test");

   Evas_Object *layout = elm_layout_add(win);
   elm_layout_file_set(layout, "./test.edj", "test");
   elm_win_resize_object_add(win, layout);
   evas_object_show(layout);
   evas_object_resize(win, 200, 200);
   evas_object_show(win);

   elm_run();

   elm_shutdown();

   return 0;
}
```

test.edc
```
collections {
   group { name: "test";
      parts {
         rect { name: "longpartname";
            desc { "default";
                rel1.to: "longpartname2";
            }
         }
         rect { name: "longpartname2";
            type: RECT;
            desc { "default";
                rel2.to: "longpartname";
            }
         }
      }
   }
}
```

Reviewers: SanghyeonLee, zmike

Reviewed By: SanghyeonLee

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8717
2019-04-26 15:33:33 +09:00
Hosang Kim c006589607 evas_events: fix grab count does not become 0 with proxy object.
Summary:
1. src_event_in should not be initialized when grabbed object exists.

2. when object of pointer grab is deleted and if object has proxy,
   proxy object of pointer grab should be deleted together.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8698
2019-04-26 13:24:01 +09:00
Woochanlee 3cc9fc481c elm_theme: Check the ref count to delete or unref.
Summary:
In case of the ref count bigger than 1.
That means the eo_theme ref count is 2.

In that case we need to call efl_unref when theme freed.
other case we can delete eo_theme.

@fix

Reviewers: Jaehyun_Cho, woohyun, Hermet

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8714
2019-04-25 21:24:42 +09:00
Ali Alzyod 555ac0a452 evas: change way of searching for Escape strings/values in textblock
Instead of using old way for linear search for Escape Strings or Escape values, we will sort these values and string in compile time then binary search them.

In simple words:
Instead of having one array with pair of {escapeChar,escapeValue} and linear search it.
We will have two arrays with pair of {escapeChar,escapeValue}, one with escapeChar Sorted, and one with escapeValue sorted.
and we will use one of the array to binary search escape chars, and use the other to binary search escape values,

1- This will increase the speed for the search a lot for both Escape characters and Escape values.
2- Make code more easy to understand and trace
3- This will also fix bug for

```
int value;
const char * value = evas_textblock_string_escape_get("",&value)
//because of some unhanded case in previous code, this will return "&qout;" , which is first element in predefined escape character array
```

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8610
2019-04-25 14:04:05 +02:00
Hermet Park 1c974289e4 ecore_evas wayland: fix a build break.
Summary: missed changing here.

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8712
2019-04-25 18:56:39 +09:00
Hermet Park 7324164a63 evas wayland_egl: set up config depth/stencil/msaa properly. 2019-04-25 18:42:31 +09:00
junsu choi f89fe318a7 README, doc : Fix typo
Reviewers: Hermet, kimcinoo, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8710
2019-04-25 11:02:49 +02:00
Hermet Park b37e6a4df6 elementry win: support msaa, stencil and depth bits for wayland. 2019-04-25 17:25:52 +09:00
Hermet Park 815535eebe ecore_evas: generalize option defines.
There some engine option defines could be generalized from the window system
since those options could be used through wayland, x11 both, and probably so on.
2019-04-25 17:08:37 +09:00
Hermet Park 53599a8d39 ecore wayland: expand internal interface to pass engine option list.
This is a prepartion patch to support msaa in wayland.
ui window needs to deliver engine options (stencil, depth, msaa bits)
to evas engine side, ecore_evas_wayland_egl should have the argument to pass.
2019-04-25 16:56:40 +09:00
Marcel Hollerbach 2e85c6ba34 efl_ui_spec_suite: move the information about tests to the test files
for now the widgets which are tested are encoded in the test files where
the tests are implemented. This is for now done in a simple json format,
just for the sake of simplicity.

ref T7815

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8685
2019-04-24 15:52:48 +02:00
Marcel Hollerbach e9c49d0f70 meson: do not use the variable name env in mono
env is used for the program env, and should not be used in any other
form here.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8690
2019-04-24 15:52:47 +02:00
Christopher Michael af4c6df7bb Revert "static_libs/vg_common: Fix resource leak"
Revert this as it causes edje_cc to segfault.

This reverts commit 2a4c87bb11.
2019-04-24 09:35:58 -04:00
Lauro Moura 132c00a4cb meson: Fix evas engine install directory.
Evas module loading code assumes engines are installed in
evas/modules/engines.

As part of the fixes building evas with meson, the engines are under a
subproject named evas/engines, causing the modules to be installed in
libdir/evas/engines/modules by default.

This commit adds a override of the directory the engine modules are
installed to use the correct location.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8693
2019-04-24 15:11:17 +02:00
Christopher Michael 1799f79c54 static_libs/vg_common: Remove extra blank lines
NB: No functional changes
2019-04-24 08:58:57 -04:00
Christopher Michael 2a4c87bb11 static_libs/vg_common: Fix resource leak
Coverity reports a resource leak here. The function _create_node
returns allocated storage which should be freed when we are finished
with it.

Fixes CID1382215

@fix
2019-04-24 08:56:00 -04:00
Christopher Michael b36833f49b ecore-evas-x: Fix double free
Coverity reports, and reading the code confirms, that the variable
'out' has already been freed (or is NULL) when reaching this line of
execution.

Fixes CID1382851

@fix
2019-04-24 08:52:02 -04:00
Yeongjong Lee 5b2b75a7f2 ui.relative_layout: fix incorrect type casting
Summary: `temph` can be double type.

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8695
2019-04-24 21:09:54 +09:00
Yeongjong Lee 8c0ab0db42 ui.relative_layout: enhance relation_xxx_set,get apis
Summary:
I forgot `efl_pack_layout_request` after relation_xxx is changed.
Unnecessary register function in `relation_xxx_get` will return unexpected result.
if a object is not child of relative_layout, `relation_xxx_get` should return
`target = NULL` and `relative = 0.0` with error message.

Test Plan: make check

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8627
2019-04-24 20:33:21 +09:00
Yeongjong Lee 9b87eaee08 ui.relative_layout: add callbacks to update layout
Summary:
If the size or hints of a child changes, relative_layout need to update layout.
And, if a child is deleted, it should be unregisterd from relative_layout.

Depends on D8625

Test Plan: elementary_test -to 'efl.ui.relative_layout'

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8626
2019-04-24 20:32:45 +09:00
Yeongjong Lee 336500469a ui.relative_layout: add internal clipper
Summary: If there is no clipper of container, color_set and clipper_set api won't work.

Test Plan:
1. elementary_test -to 'efl.ui.relative_layout'
2. Click button1
3. check that buttons color are changed.

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8625
2019-04-24 20:23:52 +09:00
Taehyub Kim b57fd8eb47 eo_parser: fix unreachable code
Summary: fix unreachable code for kw_enum case in parse_unit function

Reviewers: q66, Jaehyun_Cho, woohyun

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8696
2019-04-24 11:56:32 +02:00
Xavi Artigas 47f9af1282 docs: Fix genlist widget preview generation
Summary:
This was making "ninja doc" segfault for me.
If these function tables are not initialized they contain garbage, which leads
to the worst kind of undefined behavior.

Test Plan: Apply D8561 and try `ninja doc`. It was dumping core for me, and it does not do it anymore after this patch.

Reviewers: bu5hm4n, zmike, cedric

Reviewed By: bu5hm4n

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8697
2019-04-24 11:12:23 +02:00
Hermet Park 3bd57c2c66 evas x: code refactoring.
keep simple code as possible.
2019-04-24 16:45:05 +09:00
Marcel Hollerbach 87d430df46 meson: ensure that buffer header is installed correctly
the directory it was installed to was <prefix>/include/evas/engine-1/
instead of <prefix>/include/evas-1/ which is wrong. This fixes
enlightenment building.

Reviewed-by: Lauro Neto <lauromauro_>
Differential Revision: https://phab.enlightenment.org/D8692
2019-04-24 08:52:43 +02:00
Jaehyun Cho 1bdb278f5c efl_canvas_animation_player: fix to apply animation when player starts
Previously, animation was not applied immediately when player starts
animation because elapsed time is 0.
This caused flickering object if animation begins with alpha 0 because
the alpha 0 animation is not applied immediately.

Now, animation is applied immediately when player start animation.
2019-04-24 14:44:50 +09:00
Jaehyun Cho cf4854effb efl_ui_stack: handle memory allocation fail
check if memory allocation succeeds and handle memory allocation fail.
2019-04-24 14:44:19 +09:00
Hermet Park 808df5ecc2 evas wbmp: fix wrong calc order.
Double check patch again, since my wrong logical thinking,
Every width must be considered to rounding up fiting 8 bits.
this new compuation must be correct.
2019-04-24 14:03:37 +09:00
Hermet Park 79183150c7 eolian: remove unreachable code. 2019-04-24 13:21:05 +09:00
Hermet Park bffce65f9c evas wbmp loader: coming previous patch with fixing wrong calc.
Those bits must be rounded if they are not fit to 8 bits.

see: 68fe9ec6bf
2019-04-24 10:18:57 +09:00
Hermet Park 54754ab878 Revert "evas-wbmp: revert previous two patches"
This reverts commit 0ebf41c003.
2019-04-24 10:10:36 +09:00
SangHyeon Jade Lee caa1542610 examples : update list_view examples to use item_class_set not layout_theme_config.
widget_factory support item_class_set for factory created child.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8684
2019-04-23 12:40:57 -07:00
Cedric BAIL 1ec4ad1556 ecore: rely on event instead of creating one Eo object per future that need resolving.
This was a terrible oversight, but the point of having a small native type for future was
for making them efficient. Still we were using one Eo object for dispatching per future
to dispatch new value. I could have gathered all the dispatch with just one object, but
at the end we do have one object that notify us of the loop iteration... the loop object!
And we have event on that object that we can rely to trigger the dispatching of future
without requiring any additional object. So let's do that instead.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8567
2019-04-23 12:40:55 -07:00
Marcel Hollerbach afd4e6bd5b efl_ui_scroller: fix Efl.Content implementation
this commit ensures the following:
- Delete content when new content is set
- Content set input validation
- Correct parent setting

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8682
2019-04-23 12:40:53 -07:00
Marcel Hollerbach 7ee0a3e055 efl_ui_tab_page: implement content_set / unset correctly
This patchset ensures that the following features are supported:
- content-widget deletion on set content
- content-widget validation on set calls
- invalid cases return false
- event emission

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8681
2019-04-23 12:40:51 -07:00
Marcel Hollerbach f9143ec634 efl_ui_popup: fix widget_parent inheritance
when you inherit from widget_parent, you MUST call the super function.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8680
2019-04-23 12:40:49 -07:00