Commit Graph

342 Commits

Author SHA1 Message Date
Vincent Torri d135957ffa Use __func__ C99 identifier instead of __FUNCTION__ compiler extension
Summary: see http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdf section 6.4.2.2 page 52

Test Plan: compilation

Reviewers: raster, devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11785
2020-05-07 09:27:07 -04:00
Hermet Park 476e2b0521 canvas 3d: remove all canvas3d features across efl.
Reviewers: jsuya, kimcinoo, bu5hm4n, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11552
2020-03-25 19:14:02 +09:00
Hermet Park 98f2c3d5ee evas object: + null check for safety 2020-02-10 21:23:20 +09:00
Mike Blumenkrantz 501063eb5c evas/object: remove weird gesture manager method
these two objects have zero relation, and I don't know why this ever
existed

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11243
2020-02-05 10:11:02 +01:00
Marcel Hollerbach 9d428c610d evas: protect against leaking callbacks
Summary:
when someone accidently does not clean up all his animation callbacks,
we might end up with a lot of errors on console, as we keep delivering
tick events to a dead object.

Reviewers: zmike, cedric, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10998
2020-01-02 09:35:31 -05:00
Cedric BAIL 330b72bc6a evas: do not call Eina_Cow GC during invalidate it is pointless.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10818
2019-12-11 10:36:17 +01:00
Cedric Bail a9227fd530 evas: move watching over destruction of device to custom logic due to high use.
Summary:
This specific EFL_EVENT_DEL handler was registered thousand of time alone on
an Evas device. Potential solution are to improve handling of this kind of large
scale callback logic or just not take that path. I find it easier to have a custom
code in this case to handle the destruction of Evas device and avoid this
thousand of callback.

Depends on D10492

Reviewers: zmike, raster, bu5hm4n, Hermet

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10493
2019-10-31 13:29:56 -04:00
Mike Blumenkrantz f4019d3303 eina: add comparison macros for Eina_Size2D and Eina_Position2D
Summary:
I'm tired of typing all this out. it's exhausting.

also add a couple usages internally to verify that this works as expected

@feature

Reviewers: cedric, bu5hm4n, devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, bu5hm4n, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10557
2019-10-29 14:52:58 -04:00
Mike Blumenkrantz 6443120eb3 evas/object; fix null deref
Summary:
_efl_canvas_object_clipper_prev_reset() derefs obj->cur

CID 1396985
Depends on D10211

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10212
2019-09-26 18:00:05 -04:00
Mike Blumenkrantz 89bee7a11a efl/player: merge start+stop methods into 'playing' property
this has some overlap with the existing 'play' property which will
soon be renamed. the intent here is that there is a property for
controlling the 'playing' state and then another property for managing
'pausing' the play state

ref T7877

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10113
2019-09-24 15:23:13 -07:00
Marcel Hollerbach 6028952894 evas_callbacks: make the callback protection a little bit safer
the problem here is that we might subscribe to an event before
evas_object_callbacks_init has happened. This sounds like something
which might not happen. However, with the interfaces project this
definitly will start to happen because someone will some day overwrite
the evas object and do something before the constructor, which will not
raise a error or something but will simply just not work.

With this commit we are not listening to the event callbacks via event
emission but rather via inheritance. With this there is no "earlier than
we listend" point, and the issue in the task is solved by itself.

fix T8202

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9841
2019-09-11 10:37:21 +02:00
Mike Blumenkrantz 28a13e5114 evas/object: remove errors when user min/max size hints conflict
this scenario means, more or less, that the user just wants the widget
to be as close to the max size hint as possible. widgets should (and do)
handle this properly

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9682
2019-08-21 12:53:07 -07:00
Mike Blumenkrantz e1fda2cbdb efl/hints: add restricted and combined max size hints
these function the same as the min size hint versions and enable
distinction between internally-set max size hints and user-set max size
hints

@feature

ref T8122

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9553
2019-08-14 12:08:13 -07:00
Mike Blumenkrantz c375bbcfa7 efl/hint: add doc note about max size hint
ref T8122

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9551
2019-08-14 12:08:09 -07:00
Mike Blumenkrantz 0f58547085 evas: add 'has_fixed_size' property for canvas objects
this provides a hint for rendering that the object is not going to resize
for as long as the flag is set and  allows for some optimizations to
be made during rendering based on this knowledge

@feature

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8887
2019-08-08 18:32:23 -07:00
Christopher Michael 8c5d5ada65 evas_inline: Clean up evas_object_is_on_plane function
Summary:
This file is full of functions called as:
foo(eo_obj, obj);

Most of them can be reduced to foo(obj); and internally get the eo_obj
with obj->object

This would make it impossible to screw up calling them passing an
unrelated pair, and make calling code a little more readable.

ref T7230

Depends on D9049

Reviewers: raster, cedric, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7230

Differential Revision: https://phab.enlightenment.org/D9050
2019-05-29 15:37:36 -04:00
Woochanlee 54175998d5 Gesture Manager: Add gestures and fix gesture managing, recognizer logic.
Summary:
https://phab.enlightenment.org/T7544

Provides a way for a user to get a gesture manager, recognizer instance.

Supports different recognizer properties for each target(Eo).

Gesture, Touch Class Life-cycle re-implementation. for supporting multiple touches.

Add below gestures.
efl_canvas_gesture_tap
efl_canvas_gesture_double_tap
efl_canvas_gesture_triple_tap
efl_canvas_gesture_long_tap
efl_canvas_gesture_momentum
efl_canvas_gesture_zoom
efl_canvas_gesture_flick

Test Plan:
Simple test -> test_gesture_framework.c
More test cases will upload.

Reviewers: woohyun, smohanty, segfaultxavi, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: Jaehyun_Cho, segfaultxavi, cedric

Tags: #efl, #do_not_merge

Differential Revision: https://phab.enlightenment.org/D7579
2019-05-14 16:37:20 +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
Mike Blumenkrantz 91b84fa2a8 evas: restore legacy types which were defined to eo types
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8245
2019-03-08 12:06:24 -08:00
Mike Blumenkrantz 5bfe2e89d2 evas: remove all legacy usage from eo files
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
2019-03-06 19:05:48 +01:00
Mike Blumenkrantz a5e183ad5d efl.canvas.object: clip -> clipper && clipees -> clipped_objects
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
2019-02-27 13:17:37 -05:00
Marcel Hollerbach a25444f0d5 efl_canvas_object: make is_frame_object internal
it was decided that this property should be internal. So now it is
internal.

ref T7555

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8010
2019-02-25 10:37:42 +01:00
Marcel Hollerbach 422ee8d323 efl_canvas_object: get rid of event_animation set/get
the API is a little bit problematic. The API takes events as an
parameter. However, only the hide and show events can be used, because
move for example is not intercepted, which leads to a situation that you
cannot attach a translation animation to the event. Further more,
handling the animations directory instead of pipeing them through events
seems to be a little bit easier as the case study of the previous events
have shown. Further more, we should never ever overwrite the
callback_call function of a eo base object, those methods are an
incredible hotpath, by the time we would have 1-2 animations on a
object, the event submission would be significetly slowned down.

ref T7555

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8009
2019-02-25 10:37:40 +01:00
Mike Blumenkrantz f886941b11 api: efl.gfx.size_hints -> efl.gfx.hints
Summary:
these hints are not strictly size-related, so renaming them is more consistent
with their actual function

ref T7563

Depends on D7968

Reviewers: segfaultxavi, cedric, bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7563

Differential Revision: https://phab.enlightenment.org/D7977
2019-02-21 18:43:12 +01:00
Hermet Park 3967e1f354 evas main: check for OOM when calloc(). 2019-02-21 10:36:48 +09:00
Xavi Artigas 6b7346b7b2 Remove individual class BETA guards
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
2019-02-13 18:09:17 +01:00
Yeongjong Lee 78ae9c0ae0 gfx: Add size hint fill (EO)
Summary:
If widget use both hint_align(HINT_FILL) and hint_max together, there is no way
to set to hint_align. See, elementary_test -to 'efl.ui.box' -
"Button with a quite long text." button. you can control button position
using "Box align" slider, but this is not proper implementation. When there are
two widget which have hint_align(HINT_FILL) and hint_max, those positions are
determined by box_align rather than hint_align. it means widget align cannot be
set individually.
To solve this problem, this patch add hint_fill property. in order to avoid
conflict with legacy API named evas_object_size_hint_fill_set(), it only works
for EO widgets(made by efl_add).
Also, EFL_GFX_SIZE_HINT_FILL is removed.

@feature

Test Plan:
elementary_test -to 'efl.ui.box'
elementary_test -to 'efl.ui.table'

Reviewers: jpeg, Hermet, Jaehyun_Cho, raster, barbieri

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T3912

Differential Revision: https://phab.enlightenment.org/D7409
2019-01-16 16:47:51 +09:00
Derek Foreman 21726e05fc evas_render: Ensure proper rendering when objects are on planes
If only objects on planes change, we don't see any damage for the main
buffer, so a page flip never occurs and the plane doesn't update.  For
now forcing a tiny damage area is the easy way to work around this.

Also force a pixels get callback for enlightenment's surface frame
callback tracking.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7196
2018-12-14 09:52:09 -06:00
Hermet Park c9d20d488b Revert "evas map: calc map geometry when it is out of screen"
This reverts commit 8a7817cdd9.

Sorry, I didn't intend this patch...
2018-11-27 11:24:10 +09:00
Shinwoo Kim 8a7817cdd9 evas map: calc map geometry when it is out of screen
Summary:
The map geometry(cur.map->normal_geometry) is calculated only if
evas_render_updates_internal_loop calls evas_render_mapped as below.

evas_render_mapped
   -> evas_object_map_update
   -> evas_object_map_update
   -> _evas_map_calc_map_geometry

If the mapped object is not on screen, then evas_render_updates_internal_loop
does not call evas_render_mapped, because the mapped object is not active.

The mapped object is not active(i.e. is_active is  0) always because cache.clip
data including visilbe and geometry is not updated after the object goes out
of screen.

Usually the unmapped object updates its cache.clip data with updated geometry
even though it is out of screen as below.

_efl_canvas_object_efl_gfx_entity_position_set
   -> evas_object_recalc_clippees
   -> evas_object_clip_recalc
   -> evas_object_clip_recalc_do

So the mapped object geometry(cur.map->normal_geometry) should be updated in
evas_object_clip_recalc_do if it is out of screen.

Test Plan:
Sample code

{F3455674}

{F3455673}

{F3455672}

{F3455671}

Reviewers: Hermet, jypark

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7344
2018-11-27 11:21:52 +09:00
Hermet Park 74a695ecf1 evas map: remove unnecessary count comparison.
Our map points is fixed to 4. And no plans to support other cases yet.
2018-10-26 20:33:44 +09:00
Hosang Kim 46cca0febf evas: fix backward compatibility issue.
Summary:
Sometimes mouse_grabbed flag can not be zero.
Before version of EFL, object has just one mouse_grabbed flag.
But now we have a new feature, so object has list of pointer devices
and each pointer device has mouse_grabbed flag.

We need to check all of pointer devices mouse_grabbed flag.
And if all of mouse_grabbed flag are zero, dispatch move event.

Test Plan:
{F3384050}
gcc -o button_example_01 button_example_01.c `pkg-config --cflags --libs elementary`

Reviewers: iscaro, zmike, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7216
2018-10-26 20:28:03 +09:00
Mike Blumenkrantz 46941804a0 Revert "evas: handle event COW modification when COW is already active"
Summary:
This reverts commit cd6b890c73.

this resolves complaints from a safety check in the debug profile,
but it seems more likely that the safety check is bogus and should be
removed rather than making this code more complex

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6283
2018-06-15 11:22:38 -04:00
Mike Blumenkrantz cd6b890c73 evas: handle event COW modification when COW is already active
Summary:
enabling write on a COW which is already writing is a user error,
which can occur during object invalidate due to reuse of a helper function.
by adding an extra param containing the COW data, this scenario can be avoided

fix T7005

Reviewers: bu5hm4n, segfaultxavi, devilhorns

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7005

Differential Revision: https://phab.enlightenment.org/D6273
2018-06-13 11:33:21 -04:00
Hermet Park 72ce12e550 Revert "evas canvas: remove unused goto tag."
This reverts commit b2f85bb9ed.

this is a subsquent patch for the previous revert:
77684dc53a

ps. JackDaniel saved efl world from a guy who broke the system and ran away...
2018-06-05 21:38:01 +09:00
Hermet Park 77684dc53a Revert "evas: fix a map rendering problem."
This reverts commit 9fcd03952e.

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.
2018-06-05 21:01:15 +09:00
Hermet Park b2f85bb9ed evas canvas: remove unused goto tag. 2018-05-30 13:41:41 +09:00
Marcel Hollerbach 70ab165a6d evas_focus: adjust to recent EFL_EVENT_DEL changes
Summary:
when focus events have been emitted the smart parent was persistent, now
its not anymore, lets restore this behaviour

Depends on D6227

Reviewers: cedric, zmike, stefan_schmidt

Subscribers: #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6228
2018-05-29 12:24:53 -04:00
Cedric Bail 7e4b66a58d evas: multiple call to evas_object_del are allowed even after the first one succeeded. 2018-05-24 16:02:20 -07:00
Cedric BAIL 75bb7c049f evas: do not crash if constructor fail and invalidate is run on a partial object. 2018-05-24 16:02:20 -07:00
Cedric BAIL 15995ff0eb evas: make evas_object_free work in case of lost reference to Eo object.
This is clearly a workaround to a bad situation, but there is no case
that I can find that solely lead to object being NULL nor is there any
code that should do that, but still it does in some case...
2018-05-24 16:02:20 -07:00
Cedric BAIL 062471b5ee evas: handle Evas_Object constructor failure case better. 2018-05-24 16:02:20 -07:00
Cedric Bail 429084e2fb evas: do not override lifecycle by overriding efl_parent_set. 2018-05-24 16:02:20 -07:00
Cedric Bail 4479d035be evas: reindent code properly. 2018-05-24 16:02:19 -07:00
Cedric Bail 5c9815676b evas: move the del event to match invalidate and free event to the end of the destructor. 2018-05-24 16:02:19 -07:00
Cedric Bail 741f3e39ed evas: preserve evas_object_del logic to not really destroy an object until it is fully unref first. 2018-05-24 16:02:19 -07:00
Cedric Bail b482107a19 evas: add a way to figure out the evas class that should be the real parent for all legacy object. 2018-05-24 16:02:19 -07:00
Cedric BAIL 30d02a7410 evas: try to protect old legacy lifecycle without overloading Efl.Del. 2018-05-24 16:02:19 -07:00
Hermet Park 9fcd03952e evas: fix a map rendering problem.
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
2018-05-23 22:58:57 +09:00
Jaehyun Cho e9b61a8969 efl_canvas_object: Change name of animation event info
Change name of animation event info to synchronize with other event
info names.

Change data name in animation event info to synchronize with data type
name, Efl.Event.Description.
2018-05-01 00:13:56 +09:00