summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_smart.c
Commit message (Collapse)AuthorAgeFilesLines
* evas: prevent calling api with NULL filter imageYeongjong Lee2020-02-051-2/+2
| | | | | | | | | | This fixes a bunch of warnings like that ``` ../src/lib/eo/eo.c:644 _efl_object_call_resolve() NULL passed to function xxx(). ``` Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11283
* Efl.Canvas.Group: implement Efl.Gfx.FilterShinwoo Kim2020-01-211-0/+53
| | | | | | | | | | | | | | Summary: This patch makes Efl.Canvas.Group work for Efl.Gfx.Filter Reviewers: Hermet, jsuya, zmike Reviewed By: Hermet Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10435
* evas/smart: inhibit smart member add/del callbacks when no subscribers existMike Blumenkrantz2019-10-141-3/+39
| | | | | | | | | | | | | | | | | | | | Summary: this is triggered a ton on app startup ref T8321 Depends on D10357 Reviewers: bu5hm4n, cedric Reviewed By: bu5hm4n, cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision: https://phab.enlightenment.org/D10358
* evas/smart: print actual errors when smart api functions are called on ↵Mike Blumenkrantz2019-10-141-2/+2
| | | | | | | | | | | | | | | | | | non-smarts Summary: this is an error, and it should be printed Depends on D10355 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10356
* evas/smart: inhibit evas-internal smart callbacks when there are no subscribersMike Blumenkrantz2019-10-141-0/+60
| | | | | | | | | | | | | | | | | | | | | Summary: we know these ahead of time since they're hardcoded, so we can block their emission just like we do for eo events ref T8321 Depends on D10354 Reviewers: cedric Reviewed By: cedric Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision: https://phab.enlightenment.org/D10355
* eo: efl_object_legacy_only_event_description_get is an internal only ↵Cedric BAIL2019-03-151-0/+1
| | | | | | | | | | | | | | function, make it so. Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8361
* evas: restore legacy types which were defined to eo typesMike Blumenkrantz2019-03-081-6/+6
| | | | | Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8245
* evas: remove all legacy usage from eo filesMike Blumenkrantz2019-03-061-0/+1
| | | | | | | | | | | | this takes the current generated output from eolian for legacy code in evas and adds it to the tree, then removes legacy references from the corresponding eo files. in the case where the entire eo file was for a legacy object, that eo file has been removed from the tree ref T7724 Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Differential Revision: https://phab.enlightenment.org/D8107
* efl.canvas.object: clip -> clipper && clipees -> clipped_objectsMike Blumenkrantz2019-02-271-7/+7
| | | | | | | | | | | | | | | | | | | | | Summary: also clipees_has -> clipped_objects_count ref T7555 Depends on D8039 Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7555 Differential Revision: https://phab.enlightenment.org/D8040
* efl.canvas.group: group_member_del -> group_member_removeMike Blumenkrantz2019-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: api naming in efl uses 'del' when deleting an object and 'remove' when removing something from an object ref T7554 Depends on D8034 Reviewers: segfaultxavi, bu5hm4n Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl_api Maniphest Tasks: T7554 Differential Revision: https://phab.enlightenment.org/D8035
* efl.canvas.group: add events for member add/removeMike Blumenkrantz2019-02-271-0/+3
| | | | | | | | | | | | | | | | | | | Summary: ref T7554 Depends on D8032 Reviewers: segfaultxavi, bu5hm4n Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl_api Maniphest Tasks: T7554 Differential Revision: https://phab.enlightenment.org/D8034
* Remove individual class BETA guardsXavi Artigas2019-02-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Eolian adds a per-class BETA guard (like EFL_UI_WIN_BETA) to any method tagged as @beta. This means that any app (and the EFL code) wanting to use BETA features has to enable them class by class, which is cumbersome. This commit replaces the individual guards with the global EFL_BETA_API_SUPPORT guard, so apps only need to define one symbol to access BETA features. Any usage of the per-class guards has been removed from the EFL code and examples. When building EFL the global guard is defined by configure, so all EFL methods already have access to BETA API. Efl_Core.h and Efl_Ui.h no longer define EFL_BETA_API_SUPPORT. Apps wanting to use BETA API have to define this symbol before including any EFL header (It has been added to the examples requiring it). Test Plan: make && make check && make examples still work, but there's a lot less #defines in the code Reviewers: zmike, bu5hm4n, q66 Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T6788 Differential Revision: https://phab.enlightenment.org/D7924
* evas_object_smart: Speed up some cache invalidation callsDerek Foreman2019-02-111-8/+27
| | | | | | | | | | | | | | | | | Summary: A large number of cache invalidation calls are doing pointer indirection that is completely avoidable. Depends on D7852 Reviewers: devilhorns, cedric Reviewed By: devilhorns, cedric Subscribers: devilhorns, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7853
* evas_object_smart: Consistently use MY_CLASSDerek Foreman2019-01-311-7/+7
| | | | | | | | | | | | | | | | | Summary: While it may not be popular opinion that MY_CLASS is confusing and does more harm than good, using it sometimes and not others in the same file is pretty obviously not helpful to casual readers. Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7852
* Revert "evas: make efl_canvas_group abstract"Marcel Hollerbach2019-01-171-2/+1
| | | | | | | | | | | This reverts commit ae65c64b8d52c3b3d032eb29474b750b7e5781cb. It appears that abstract -> abstract enforcement is not needed anymore, the other patches are fine. However, this one proposes a new object which is not needed to exist. Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D7676
* evas: make efl_canvas_group abstractMarcel Hollerbach2019-01-151-1/+2
| | | | | | | | | | | the efl_canvas_group should be abstract in order to support other classes which are inheriting from it, which are abstract. This is done in order to support only abstract parents from abstract classes. ref T7240 Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D7600
* evas - remove excess data scope lookup during render when getting changedCarsten Haitzler (Rasterman)2018-10-261-4/+3
| | | | | | | | getting smart changed meant another scope data get when we already had the protected data in the caller. don't do that and just pass down. saves a lot of overhead... @optimize
* evas: remove redundant internal functions.Hermet Park2018-10-111-20/+0
| | | | | | | | | | | | | | | | | | | | Summary: Since efl object is introduced, magic check is no more used. Plus, remove redundant object functions interfaces - type_id, - visual_id, - store - unstore Reviewers: #committers, bu5hm4n Reviewed By: #committers, bu5hm4n Subscribers: bu5hm4n, raster, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7153
* evas_object_smart: fix dereference of nullShinwoo Kim2018-09-211-5/+10
| | | | | | | | | | | | | | | | Summary: The cso could b NULL so we need to check if the cso is NULL or not before dereferencing it. Reviewers: jpeg, Hermet, jypark Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7075
* evas canvas: fix overflowed function initialization.Hermet Park2018-09-041-2/+1
| | | | | | | | | | | | | | | | Summary: last function pointer indicates render_pre(), add one more element is unnecessary. Reviewers: #committers, netstar Reviewed By: #committers, netstar Subscribers: netstar, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6967
* evas: call evas_find before safety checkYeongjong Lee2018-08-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: edje_edit_object_add edje_object_add emotion_object_add evas_object_xxx_add These APIs had allowed to set parent to EFL_CANVAS_OBJECT(Evas_Object) before 8bb11a17. we should call evas_find before safety check for backward compatibility. Test Plan: win = elm_win_add(NULL, "main", ELM_WIN_BASIC); 1. `rect = evas_object_rectangle_add(evas_object_evas_get(win));` 2. `rect = evas_object_rectangle_add(win);` Check that 1. and 2. works. Reviewers: Hermet, zmike Reviewed By: Hermet Subscribers: cedric, #reviewers, CHAN, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6909
* evas: check evas class instead of using evas_findYeongjong Lee2018-08-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: A object that is not evas class shouldn't use evas_find. it may occurs segfault. ref c2e8b492b18bdecc2300ad051ba1406e40ad068f Test Plan: Evas *evas = evas_new(); evas_free(evas); evas_object_line_add(evas); Check weather there is segfault. Reviewers: Hermet, raster, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6816
* Efl.Canvas.Group: use desired functionShinwoo Kim2018-08-021-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Summary: If a smart class overrides Evas_Smart_Class.move as below, then original behavior must not be used for the smart class. Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("MyClass"); evas_object_smart_clipped_smart_set(&sc); sc.move = &myMove; But current implementation makes original behavior work. So before using the original method, this patch is checking if the original method is changed or not. Reviewers: zmike, devilhorns Reviewed By: zmike Subscribers: woohyun, jypark, cedric, raster, jpeg, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6468
* Revert "evas: fix a map rendering problem."Hermet Park2018-06-051-10/+2
| | | | | | | | This reverts commit 9fcd03952ee51d34871794cb95585f3e589a3bb9. Just noticed from ManMower, this caused a side-effect that drops enlightenment performance. I need to check it seriously then decide again how this patch to be.
* evas: make smart object deletion more robust to bad child behavior.Cedric BAIL2018-05-241-2/+11
|
* evas: move the del event to match invalidate and free event to the end of ↵Cedric Bail2018-05-241-5/+4
| | | | the destructor.
* evas: enforce legacy parent to be the canvas.Cedric Bail2018-05-241-1/+1
|
* evas: fix a map rendering problem.Hermet Park2018-05-231-2/+10
| | | | | | | | | | | When map of a smart object is turned off, redraw-updation area could be incorrect. This results in a mirror image problem. for fixing this, let smart object request update-area in render_pre() properly only in case of map changed. Thanks to akanad for reviewing together. @fix
* Efl.Gfx.Entity (from Efl.Gfx)Xavi Artigas2018-04-241-7/+7
| | | | | | Ref https://phab.enlightenment.org/T6847 Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
* eolian gen: enable constness generation on property getter implsDaniel Kolesa2018-04-171-3/+3
| | | | | | | | | | This changes a lot of things all across the EFL. Previously, methods tagged @const had both their external prototype and internal impl generated with const on object, while property getters only had const on the external API. This is now changed and it all has const everywhere. Ref T6859.
* evas: add null check logic on evas_object_smart_attachWonki Kim2018-03-061-0/+4
| | | | | | | | | | | | | | | | Summary: this commit add null check logic on evas_object_smart_attach because a segmentation fault occurs once the argument is not valid (eg. null). Test Plan: 1. invoke evas_object_smart_add(obj, NULL) 2. see the application crashes Reviewers: woohyun, cedric Differential Revision: https://phab.enlightenment.org/D5817 Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
* evas: move more canvas method implementations into evas_main.cMike Blumenkrantz2018-02-151-18/+0
|
* interface: add Efl.Gfx.Color interface for color related APIsAmitesh Singh2017-12-221-1/+1
| | | | | This would eventually turn into mixin class later after adding more color related helper functions.
* evas: Implement scale API in proper EO fashionJean-Philippe Andre2017-11-301-1/+0
| | | | | | | | | | | | | | This removes the internal function pointer for scale_update. This makes all relevant classes implement the scale API in EO. This removes the duplicate function in Efl.Canvas.Object and only uses the one from Efl.Ui.Base interface. This *seems* to be working as expected. Fingers crossed! PS: I don't like the name Efl.Ui.Base. It's an interface for a few common API's between Gfx, Canvas and UI levels... Maybe scale simply doesn't belong there.
* evas: fix typos in canvas/evas_object_textblockPawel Aksiutowicz2017-11-201-4/+4
| | | | | | | | | | Reviewers: lukasz.stanislawski, stanluk, jpeg Reviewed By: lukasz.stanislawski Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5456
* eo: Simplify debug_name_overrideJean-Philippe Andre2017-10-131-3/+2
| | | | | | | | | | | | Simply pass in the strbuf and don't expect the callee to own it. This makes things simpler and safer (it'll crash only if the callee frees said strbuf, and shouldn't leak). efl_ebug_name is new in the upcoming release, EFL 1.21. Realised this after talking with Amitesh. Thanks. See 999dbd9764426890c0e11841358f9219082b89b2 And c4769ff8989bab2b745017b843f073e5737e91e0
* efl: Use Eina.Position2D for Efl.Gfx.positionJean-Philippe Andre2017-09-181-4/+4
| | | | | Note: This is a little bit more cumbersome in some places but in most it's more convenient than (x,y).
* evas: Use Eina_Rectangle internallyJean-Philippe Andre2017-09-131-3/+3
| | | | | Instead of Evas_Coord_Rectangle which is exactly the same thing but with a different name and typedefs.
* evas: Add group_member_is to smart objectsJean-Philippe Andre2017-09-131-1/+14
| | | | | | | | | | | This is a new function that indicates whether an object is a child of a parent or not. Dead simple, as this simply compares if parent == this. Note that this check was impossible to do with the event grabber. Also, rename group_children_iterate to group_members_iterate for consistency with the other group_member functions. @feature
* emotion: Fix refcounts related to eio useJean-Philippe Andre2017-09-131-10/+19
| | | | | | | | | | | | | | | | | | | Inside emotion, if Eio is compiled, some asynchronous functions are used and a refcounted struct was used to ensure safety of the code. Unfortunately the logic didn't make much sense as emotion's private data is used. The refcount becomes useless, the lifecycle of the data being bound to the object itself. Note that an actual crash is almost impossible because: - eio is actually quite fast - evas objects are kept alive for 2 frames - eina_freeq is used to keep eo objects' data alive for some more time But this in theory fixes the events, as they were sent on the wrong object. "obj" is the image object, "smartobj" was the emotion object. This is fixed with a weak ref. I don't think it is necessary to backport this.
* evas: Fix evas gridJean-Philippe Andre2017-09-131-2/+0
| | | | It's a complete mess mixing legacy and EO in a really bad way.
* evas: Add EO API to get clipper in smart objectJean-Philippe Andre2017-09-131-0/+7
| | | | | | | | | | It's not exposing anything that wasn't already accessible before (you could just add a member and get its clip, for instance). This will be used by Edje Object. This is a minor @feature
* evas: Fix crash with smart objectsJean-Philippe Andre2017-09-131-16/+16
| | | | This is due to the previous patches.
* evas: Move all overrides to std smart objectJean-Philippe Andre2017-09-131-40/+133
| | | | | | | | | | | | | | | | | | | - color_set - visible_set - position_set - no_render_set - member_add, member_del - group_add, group_del - clip_set Notes: - Widget overrides color_set without calling super() which means that color_get() returns a different value. Also any subsequent child object add will not inherit the color. - Smart clipped objects also don't call super. This patch changes that, but only for smart clipped objects created through EO. This shouldn't have any side effect.
* evas: Remove group_add from clipped smart objectJean-Philippe Andre2017-09-131-7/+43
| | | | Moved from clipped to the general smart object class.
* evas: Remove group_del override from smart clippedJean-Philippe Andre2017-09-131-9/+35
|
* evas: Remove private data for clipped objectJean-Philippe Andre2017-09-131-4/+4
| | | | Another step towards merging both classes of smart objects.
* evas: Add internal API to make smart obj (un)clippedJean-Philippe Andre2017-09-131-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduction to the problem: - Efl.Canvas.Group has a method member_add() to add sub objects. - Efl.Canvas.Group (simple smart object) does NOT actually delete the objects on deletion. But: - Efl.Canvas.Group.Clipped is a direct subclass and WILL delete the sub objects on deletion. Semantically, all smart objects (at least in EO and Elementary) will own and delete sub objects automatically. Some exceptions are: - Edje object (smart clipped) does not delete swallowed objects. Edje object is a "clipped" smart object but it pops out all swallowed children before getting deleted. - Evas box/table/grid also pop out their children before deletion. Those classes are all legacy & internal only. - Elm.Widget will "manually" delete all its sub objects at deletion, as it inherits from Efl.Canvas.Group but basically takes full ownership of the sub objects. Note that member_add shouldn't be used on a widget, the widgets do it themselves. Also, smart clipped objects are much more convenient to use as they will handle some things for you: color, visibility, moving and ownership. So, the API member_add needs to be marked as own(). But right now Efl.Canvas.Group does not own. Thus, here's the plan: - Mark clipped objects as such with an internal API - Merge clipped smart object features directly inside the standard smart object. - Get rid of Efl.Canvas.Group.Clipped entirely and watch all hell break loose. Ref T5301
* evas: Add some EO safety to legacy EAPIJean-Philippe Andre2017-09-131-12/+13
|
* evas: More debug_name informationJean-Philippe Andre2017-08-041-1/+8
|