Commit Graph

622 Commits

Author SHA1 Message Date
Mike Blumenkrantz bcdd87ce35 ecore: resolve compiler warning
/home/jpeg/e/core/efl/src/lib/ecore/ecore_main.c:1381: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare]

THANKS @JPEG FOR REPORTING
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 34999448c2 ecore: allow creation of fd handlers with no flags
it's possible to set flags to 0 with another function, so allowing
creation with 0 makes the api more consistent without breaking the
documented behavior
2017-05-12 12:08:25 -04:00
Stefan Schmidt f406bae8b7 ecore: efl_promise: remove superfluous NULL check
f is already checked against NULL in the eina array macro. No need to check
again.

CID: 1362730
2017-04-26 15:12:53 +02:00
Carsten Haitzler 29feb60d50 ecore - fix epoll ifdefs and case handling 2017-04-22 12:22:17 +09:00
Carsten Haitzler c6eacd6f27 efl_io_closer - fix warning about error print
lazy removal of fcntl without fixing up error print... fixed.
2017-04-21 16:23:16 +09:00
Carsten Haitzler 7282716820 ecore_pipe - fix warning of sign vs unsigned comparison 2017-04-21 16:19:43 +09:00
Ivan Furs c9469e0b01 ecore_pipe: Fixed dead lock with epoll
See a76ebea2d8 and the following
commits on this file.

The following test scenario let to easily reproducible
application hangs:

  elementary_test -to "Icon Desktops"
  # then scroll vigorously with the mouse wheel up/down

This patch was applied as a new revision on the below diff:

Differential Revision: https://phab.enlightenment.org/D4754
2017-04-19 10:33:03 +09:00
Cedric BAIL 712f7e878b ecore: use new API eina_file_close_on_exec. 2017-04-18 16:55:31 -07:00
Carsten Haitzler 3e494a0a21 ecore pipe - fix checking return of read for pipes in new code 2017-04-18 14:30:22 +09:00
Carsten Haitzler 352174784e ecore pipe - fix new coverity complaint about using closed socket
this should fix CID 1374297
2017-04-18 14:25:56 +09:00
Carsten Haitzler 1eb36e6f84 ecore pipe - fix potential use of freed pipe data
new thanks to new patches so not an existing bug in the last release
2017-04-18 14:25:56 +09:00
Carsten Haitzler 0911370790 ecore pipe - clean up formatting a bit 2017-04-18 14:25:56 +09:00
Carsten Haitzler 2055a876c4 ecore pipe - fix cast warning by casting (validly) 2017-04-17 17:08:33 +09:00
Jean Guyomarc'h 8f0402e2fb ecore: fix build on macOS
Epoll/timerfd is not available on "everything but Windows".
This fixes a76ebea2d8.
2017-04-17 09:57:53 +02:00
Carsten Haitzler 2ea4872869 ecore_pipe - fix recent patch to close on exec the epoll fd 2017-04-17 14:23:33 +09:00
Ivan Furs a76ebea2d8 ecore_pipe: added epoll
Summary: integration epoll in ecore_pipe

Reviewers: cedric, NikaWhite, rimmed, an.kroitor, vtorri, raster

Reviewed By: raster

Subscribers: artem.popov, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4754
2017-04-17 12:28:42 +09:00
Mike Blumenkrantz d956f34021 doc: add explicit note for timeline animator about first frame position 2017-03-31 14:57:25 -04:00
Carsten Haitzler 479fd24650 ecore timeline animators - actually state the starting time
the starting time has always been "now" like in timers (loop time). it
would appear some people don't know this.
2017-03-28 11:44:22 +09:00
Carsten Haitzler 1fa1b46ebf ecore pub headers - use __sun not __sun__ for ifdef for solaris 2017-03-27 19:09:25 +09:00
Vincent Torri ac47c93330 Ecore: siginfo_t type is defined in sys/siginfo.h on Solaris 2017-03-27 08:22:06 +09:00
Umesh Tanwar b313b30cf7 ecore: proper macro usage for double comparision. Summary: The comparisions are done between doubles. EINA_FLT_EQ -> EINA_DBL_EQ
Summary: Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>

Reviewers: singh.amitesh, cedric

Subscribers: jpeg, atulfokk

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-03-21 11:11:23 -07:00
Jean-Philippe Andre d14b6e3f84 ecore: Fix memory leak and logic
@cedric... how could this even happen??
2017-03-14 22:38:43 +09:00
Umesh Tanwar b938e2b5d8 ecore_animator: improve comparision check for stopping animator.
Summary:
Time cmparision does not ensure the corrctness of posotion.
It is beacuse of double number calculation. Double number calculation
are not convertable.for example:
   1/39 = 0.02564102564;
   but 0.02564102564 * 39 = 0.99999999996 != 1;

The addition check for pos ensure the pos to be reached at its correct
position.

@fix

Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>

Reviewers: cedric, singh.amitesh, jpeg, raster

Reviewed By: raster

Subscribers: atulfokk, cedric, jpeg

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

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-03-14 14:38:44 +05:30
Umesh Tanwar 3b4cbc56bb ecore_animator: use EINA_DBL_EQ for comparing double values
Summary:
EINA_FLT_EQ was used to compare double values. replace it with EINA_DBL_EQ

@fix
Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>

Reviewers: raster, cedric, singh.amitesh

Reviewed By: singh.amitesh

Subscribers: atulfokk

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

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-03-10 11:57:08 +05:30
Cedric BAIL b80cfb38a1 ecore: avoid potential crash on shutdown in Ecore_Exe 2017-03-09 16:17:58 -08:00
Cedric BAIL 614c255f3b ecore: add ecore_event_type_flush.
During shutdown it is possible that some event are still in ecore events
queue and get processed after the shutdown of the module that did emit them.
This would lead to crash in some case. The answer to this problem is to
normally manually track all ecore event in the queue and destroy them
before shutdown... Of course that make the API difficult to use and
basically nobody got it right.

This new API do actually as it says remove all the ecore event of a
certain type from ecore events queue. It is to be called on shutdown.

@fix
2017-03-09 16:17:58 -08:00
Chris Michael ad1e5ead40 ecore-anim: Remove unused variable
Gcc reports 'i' as unused here and checking the code confirms that, so
remove unused variable.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-03-09 08:51:18 -05:00
Ivan Furs c1a2c89ac8 win32: removed duplicate winsock2.h and added WIN32_LEAN_AND_MEAN in Ecore.h
Summary: winsock2.h is dublicate in src/lib/ecore/ecore_main.c

Reviewers: NikaWhite, an.kroitor, cedric, raster, rimmed, vtorri

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4688
2017-03-09 17:39:39 +09:00
Cedric BAIL 4e1567b41e ecore: switch back to use ecore_thread_wait.
We need to make sure that we wait properly on the animator thread
otherwise we end up with the animator finish callback being called
later on during the shutdown process which means trouble.
2017-03-07 11:08:52 -08:00
Jean Guyomarc'h ccbab08a4b ecore: fix build when debugging threads 2017-03-07 00:52:28 +01:00
Mike Blumenkrantz e263cbf9d0 Revert "ecore: forcefully flush pending event when ecore_shutdown is called."
This reverts commit 2c6808e4ee.

this breaks a number of expectations and guarantees in efl:

* causes unexpected event iteration during app startup before main loop begins
  - leads to event loss
* causes unexpected event iteration during app shutdown after main loop quits
  - leads to invalid memory access
* causes recursive event iteration during event handler callbacks
  - leads to ?????????????????????????????????????????????????????????????????

all of these can be easily seen by running enlightenment, and all of these cause
unexpected behaviors in enlightenment including, but not limited to, a lot of crashes

fix T5232
2017-03-03 11:56:04 -05:00
Marcel Hollerbach 097f9cfe5f ecore_thread: do not override the data field of a thread
otherwise a currently executed ecore_thread is going to pass a complete
wrong data to its callbacks.

fix T5175
fix T5173
2017-03-02 20:13:58 +01:00
Bryce Harrington ad109b0bc4 ecore: Fix typo in error message
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D4689
2017-03-02 11:52:22 +09:00
Chris Michael b09dcc1e0e ecore: Don't use logging domains with spaces
Small patch to change the name of the ecore_animator logging domain.
Names with spaces in them make it impossible to export
EINA_LOG_LEVELS_GLOB inside a bashrc

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-03-01 10:50:52 -05:00
Cedric BAIL d8edf70c32 ecore: improve debugging of animator. 2017-02-28 11:04:34 -08:00
Cedric BAIL 2c6808e4ee ecore: forcefully flush pending event when ecore_shutdown is called.
If a component emit Ecore_Event and they aren't processed before the
call it call ecore_shutdown, there is no way to prevent this event
from being triggered after the component at shutdown itself. Which
may well lead to a use after free case. As we don't know which event
are pending and we also are not shuting down ecore completely as they
are still other component using it, we can only flush all pending event
right away.
2017-02-27 15:05:35 -08:00
Mike Blumenkrantz 83f38d2b2c ecore: do not access 'timer_thread' global from animator thread
@fix
2017-02-24 14:13:11 -05:00
Myoungwoon Roy, Kim e4b37d7cb4 doxygen: Fix typos & invalid statements in Ecore_Getopt and Ecore_Legacy
Summary: There are some typos and calogique statements in doxygen
of Ecore_Getopt and Ecore_Legacy so I had fixed typos and cacologique statements.

Test Plan: Doxygen revision

Reviewers: stefan, cedric, raster, Jaehyun_Cho

Subscribers: jpeg, conr2d

Differential Revision: https://phab.enlightenment.org/D4651
2017-02-13 19:54:29 +09:00
Carsten Haitzler b3f0db816a efl io - fix using wrong type for return values pointed to
this potentially could be a bug on 32bit systems. this fixes that and
addresses the warning that pointed it out
2017-02-11 23:13:00 +09:00
Carsten Haitzler a7d7af0d21 ecore pipe - fix warning of comparing integers of differing sizes 2017-02-11 23:13:00 +09:00
Derek Foreman 44804a9579 ecore: Don't call _ecore_fd_valid() in release builds
Not sure _ecore_fd_valid() is all that useful anymore, as the
commit that introduced it said it would be removed "before release"
a long time ago - it's a debug assist that probably doesn't need
to be in release builds.

(I'm counting syscalls on rpi3 - still, calling this an optimization
seems like a bit of a stretch.)
2017-02-10 12:13:06 -06:00
Stefan Schmidt 174f86b2e8 docs: ecore: document newly added efl model composite classes 2017-02-09 14:47:21 +01:00
Myoungwoon Roy, Kim 0f446c10be doxygen: fix typos, cacologique statements in API reference doxygen of Ecore_Common
Summary: There are some typos and calogique statements in doxygen of Ecore_Common so I had fixed typos, cacologique statements.

Test Plan: doxygen revision

Reviewers: stefan, cedric, raster, Jaehyun_Cho

Subscribers: conr2d, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-08 11:09:18 -08:00
Cedric BAIL 4f2af24755 ecore: reset during timer callback execution doesn't make sense.
@fix
T3222
2017-02-07 16:39:02 -08:00
Carsten Haitzler 51c7c9bc99 ecore thread - up default 3 of thread workers to 4x cpu cures
this ups it from number of cpu cores to 4 times that (so if threads to
blocking i/o the spare cycles can be used up).
2017-02-08 08:48:35 +09:00
Myoungwoon Roy, Kim 1f1d52503e doxygen: fix typo, cacologique expressions in API reference doxygen.
Summary: Fix typos, cacologique expressions in Ecore API reference doxygen.

Test Plan: doxygen

Reviewers: stefan, cedric, raster, Jaehyun_Cho

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 13:28:50 -08:00
Cedric BAIL a8eeca3c2f ecore: make sure we always manipulate a valid timer. 2017-02-06 15:35:48 -08:00
Felipe Magno de Almeida 8054037992 efl: add composite model for boolean properties
Add Efl.Model.Composite.Boolean, a model for wrapping another Efl.Model and
adding boolean properties to its children.
Children of the given composite model will have the boolean properties
specified in Efl.Model.Composite.Boolean with the specified default value.
A call to Efl.Model.Property_set can change the property value for a child.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-06 15:26:27 -08:00
Larry Jr 093c592188 efl: add efl_model and efl_ui_view classes
Efl.Model.Container and Efl.Model.Item to efl/interfaces are used
to create Efl.Model objects with predefined property values.
This is useful to any situation where we want an Efl.Model with
explicit defined property values.

Efl.Ui.View and Efl.Ui.Factory are used to connect Efl.Models with
Widgets, Elm.Layout and Efl.Ui.Image has changed to use news interfaces

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-06 15:26:21 -08:00
Cedric BAIL de83cc77d3 ecore: handle initialization of timer correctly. 2017-02-06 14:29:56 -08:00