Commit Graph

201 Commits

Author SHA1 Message Date
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
Marcel Hollerbach 3b2a5a429b efl_input: remove the API of efl_input_instance_get
there is basically no reason for this API. You can only use the API when
you know the class, when you know the class you can also just know the
function to call to get this API.
The reason this API needs to go is that we don't want to use
polymorphism on class-functions.

ref T7675

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7900
2019-02-13 16:59:57 +01:00
Carsten Haitzler ca26f83ec9 evas - warn - use correct free func prototype 2018-11-09 11:44:00 +00:00
Hermet Park 2614179af8 Revert "evas vg: changed "vg object" to "vg""
This reverts commit ec69abed9d.

Ooops, I didn't intended this patch.  @#!@#!@#!@#
2018-09-10 17:27:42 +09:00
Hermet Park ec69abed9d evas vg: changed "vg object" to "vg"
Summary:
Following our naming rule, rename to like other primitives.

i.e. efl_canvas_rect, efl_canvas_image, efl_canvas_vg ...

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7013
2018-09-10 14:06:58 +09:00
Chris Michael 5b36506a68 evas-canvas: Remove cserve2 support
Summary:
ref T7226

Depends on D6933

Reviewers: raster, cedric, zmike, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7226

Differential Revision: https://phab.enlightenment.org/D6934
2018-08-30 13:48:38 +09:00
Hosang Kim 586f8ae957 efl_input: fix problem that ref count does not become 0.
1.fix reusing instance logic.
2.remove efl_ref() when default devices are created.
Differential Revision: https://phab.enlightenment.org/D6882
2018-08-27 09:43:50 +02:00
Yeongjong Lee 206d40e331 evas: add safety check code to avoid crash
Test Plan: evas_smart_objects_calculate(NULL);

Reviewers: zmike, Hermet, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6805
2018-08-09 11:19:46 -04:00
Mike Blumenkrantz be33c835ac evas: handle all failure cases with error messages in evas_init
Summary: fix T7026

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7026

Differential Revision: https://phab.enlightenment.org/D6677
2018-07-26 21:43:50 +09:00
Mike Blumenkrantz 259ba514ef evas/main: call correct destroy function in evas_free
Summary:
an evas may or may not have a parent; this is legacy api and it's all
confusing

Reviewers: bu5hm4n, devilhorns

Reviewed By: bu5hm4n

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6486
2018-07-05 15:12:58 -04:00
Mike Blumenkrantz 5a4fe07415 evas/main: move common shutdown to after ecore shutdown
Summary:
ecore_shutdown will trigger object deletions which require common
components to still be active in order to avoid crashes

ref 3433be343779424c5e030ace30e211298cd060f8
ref T7052

Reviewers: ManMower, devilhorns

Reviewed By: ManMower, devilhorns

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7052

Differential Revision: https://phab.enlightenment.org/D6475
2018-06-28 14:53:11 -05:00
Mike Blumenkrantz c43850eed4 evas/main: shuffle shutdown order of filters and modules
Summary:
these both deallocate resources which can be needed during ecore_shutdown

ref df652673fe
fix T7052

Reviewers: ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7052

Differential Revision: https://phab.enlightenment.org/D6474
2018-06-28 12:41:13 -04:00
Hosang Kim df652673fe evas: move clearing cows to right place.
Summary:
Evas is child of main loop now, so evas is deleted when main loop is quitted.
In case of not calling evas_free() explicitly by app side, a crash occurs.
So move clearing cows to below ecore_shutdown().

Test Plan:
//Compile with:
//gcc evas_test.c -o evas_test `pkg-config --cflags --libs ecore evas`

#include <Evas.h>
#include <Ecore.h>

Eina_Bool
_timer_cb (void *data)
{
    ecore_main_loop_quit();
    return 0;
}
int
main(int argc, char *argv[])
{

   evas_init();
   Evas *evas = evas_new();
   Evas_Object *obj = evas_object_box_add(evas);
   Evas_Object *rect = evas_object_rectangle_add(evas);
   evas_object_color_set(rect, 255, 255, 255, 255);
   evas_object_resize(rect, 300, 400);
   evas_object_show(rect);

   evas_object_box_append(obj, rect);

   evas_object_show(obj);
   ecore_timer_add(2.0, _timer_cb, NULL);
   ecore_main_loop_begin();

   evas_shutdown();
   return 0;
}

Reviewers: devilhorns, cedric, jpeg, id213sin, woohyun, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6346
2018-06-27 07:50:31 -04:00
Marcel Hollerbach 23aab73c2f evas: be less error prone
Summary:
Dont spin infinitly when the refcount accidently is already < 0.

Depends on D6225

Reviewers: zmike, cedric, stefan_schmidt, #committers

Reviewed By: zmike, #committers

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6226
2018-05-29 12:24:36 -04:00
Cedric Bail a8b70953e4 evas: improve evas child destruction order.
Technically I do not thing it is a correct behavior to force destroy
reference that evas do not hold, but evas_object are deaply tied to
the canvas they are build on and even after invalidate it is hard
to not have function call that would lead to crash. Making the pointer
incorrect thanks to eo indirection seems safer here.
2018-05-24 16:02:20 -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 ddccd9e306 evas: destructor can not be called recursively, we should rely on Eo refcount. 2018-05-24 16:02:19 -07:00
Cedric Bail 91cd4f7c0c evas: actually we do not even need to NULL it, if we wref it. 2018-05-24 16:02:19 -07:00
Cedric BAIL fe14abd929 evas: refactor efl_input_event and remove some of the lifecycle hack.
Differential Revision: https://phab.enlightenment.org/D6101
2018-05-24 16:02:18 -07:00
Cedric BAIL 4c9a33a388 eo: move EFL internal function ___efl_ref2 also to eo_internal.h
Differential Revision: https://phab.enlightenment.org/D6099
2018-05-24 16:02:18 -07:00
Derek Foreman 83e1a456a4 evas_main: Fix deleting pointer data
Summary:
This appears to be called from a delete callback that takes place well
after the eo parent relationship is deleted, however
efl_input_device_get_seat() finds the seat by finding the parent.  That
will always be NULL during this callback, so we'll leak the data.

Instead, search all seats for the pointer.
Depends on D6181

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6182
2018-05-18 13:46:36 -04:00
Marcel Hollerbach dda350e3b4 evas: introduce a log domain to monitor which object gets focus 2018-05-10 13:34:32 +02:00
Myoungwoon Roy, Kim 2733277b2a evas_main: fix structually dead code
Summary: Fix structually dead code in evas_main owing to wrong #ifdef EVAS_CSERVE2 definition

Test Plan: Execute test suite

Reviewers: raster, Hermet, cedric, jpeg, stefan_schmidt, Jaehyun_Cho

Reviewed By: raster

Subscribers: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6053
2018-05-05 12:02:34 +09:00
Cedric Bail 135a39dd14 evas: keep the devices around until full destruction of the canvas. 2018-05-01 10:39:01 -07:00
Myoungwoon Roy, Kim e62b97814d evas_main: Add null exception handling
Summary: Need to check whether Evas_Public_Data is null or not before dereferencing it.

Test Plan: Execute test suite

Reviewers: raster, Hermet, cedric, jpeg, stefan_schmidt, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5987

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 17:41:47 -07:00
Xavi Artigas 55bd097a3d Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:32 -07:00
Xavi Artigas a217d4b455 Efl.Canvas.Vg.Object (from Efl.Canvas.Vg)
Also, Efl.Canvas.Vg.* (from Efl.Canvas.VG.*)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:30 -07:00
Xavi Artigas 65ee277a66 Efl.Canvas.Scene (from Efl.Canvas)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:23 -07:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
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.
2018-04-17 20:31:55 +02:00
Wonki Kim 34216aa9eb Fix a shutdown logic to be reachable in some case
Summary:
move evas_async_events_shutdown: to out of EVAS_CSERVE2 ifdef block
to make it reachable.

Reviewers: cedric, woohyun

Differential Revision: https://phab.enlightenment.org/D5926

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-04-16 11:18:29 -07:00
Cedric Bail 5ebe5bb62c evas: by moving lifecycle management to be handle by the death of the parent, there should be no call to efl_del. 2018-04-05 11:52:47 -07:00
Cedric BAIL 0578079927 evas: we should always sync the canvas before destroying the object. 2018-04-05 11:50:52 -07:00
Cedric Bail 90bae9b271 evas: technically the evas canvas is using the main loop, so let's make canvas depend on it for their lifecycle. 2018-03-19 15:36:18 -07:00
Carsten Haitzler 1c74aaa7e9 Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303b.

Revert "efl: move signal events from efl.loop to efl.app"
This reverts commit 3dbca39f98.

Revert "efl: add test suite for efl_app"
This reverts commit 3e94be5d73.

Revert "efl: create Efl.App class, the parent of Efl.Loop"
This reverts commit 28fe00b94e.

Go back to before efl.app because I think this should be done with
superclassing here not a parent object. reasons?

1. multiple loops per single thread make no sense. so if multilpe loop
objects they wont be contained in a single app object and then deleted
like this.
2. the app object is not really sharable in this design so it cant be
accessed from other threads
3. it makes it harder to get the main loop or app object (well 2 func
calls one calling the other and more typing. it is longer to type and
more work where it is not necessary, and again it can't work from
other threads unless we go duplicating efl.app per thread and then
what is the point of splittyign out the signal events from efl.loop
then?)

etc.
2018-03-03 13:40:33 +09:00
Mike Blumenkrantz 28fe00b94e efl: create Efl.App class, the parent of Efl.Loop 2018-02-26 14:02:51 -05:00
Mike Blumenkrantz bbbdfbecc4 Efl.Gesture: rename to Efl.Canvas.Gesture
most C api remains unchanged

ref T6714
ref T6716
2018-02-21 14:43:37 -05:00
Mike Blumenkrantz f903665957 evas: move smart_objects_calculating to Efl_Canvas 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz ee689bb000 evas: remove Evas_Canvas.smart_objects_calculate
also implement Efl_Canvas method
2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 1813c2084c evas: move more canvas method implementations into evas_main.c 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 099f9ba8a9 evas: remove Evas_Canvas.object_top_in_rectangle_get
also implement Efl_Canvas method
2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 17687f4066 evas: remove Evas_Canvas.objects_in_rectangle_get
also implement Efl_Canvas method
2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 7bfaf6b63d evas: remove Evas_Canvas.object_top_at_xy_get
also implement Efl_Canvas method
2018-02-15 13:10:59 -05:00
Mike Blumenkrantz 420ba4691d evas: remove Evas_Canvas.objects_at_xy_get
also implement Efl_Canvas.objects_at_xy_get

note that any function which returns an iterator cannot be @const since
it's necessary to wref the object to ensure the iterator's lifetime
2018-02-15 13:10:59 -05:00
Mike Blumenkrantz 3789e3e1dc efl: merge list->iterator creation function into evas_main.c and reuse
this deduplicates a large amount of code
2018-02-15 13:10:59 -05:00
Mike Blumenkrantz 0a9bb2543f evas: move more canvas functions into evas_main.c
typechecking is an important part of compilation
2018-02-15 13:10:59 -05:00
Mike Blumenkrantz 4b91654e5f evas: move evas_stack.c -> evas_stack.x
this file contains canvas methods which should be subject to compiler
type checking, requiring that they be included in the file which contains
the eolian generated code
2018-02-15 13:10:59 -05:00
Mike Blumenkrantz 59583a6f89 evas: properly implement evas_image_max_size_get() as a wrapper
ref 457dc16cffdd5f9c6ce42e72beddad06fa36f0c0
2018-02-15 13:10:59 -05:00
Mike Blumenkrantz 29f035cef8 evas: move canvas eolian functions from image.c -> main.c
this reveals existing breakage which went unnoticed due to the compiler
being unable to do type checks since the generated eolian code was not included
2018-02-15 13:10:59 -05:00
Hosang Kim 24b0ae0df5 ecore/evas: add NULL checks to handle argument is NULL.
Summary:
ecore_pipe_read_fd/ecore_pipe_write_fd
evas_engine_info_set/get

Reviewers: woohyun, Jaehyun, Jaehyun_Cho, jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5790
2018-02-06 17:58:44 +09:00
WooHyun Jung 1accec4ce1 evas: add null checks to handle when e->engine.func is not set yet 2018-02-05 22:19:44 +09:00