Commit Graph

323 Commits

Author SHA1 Message Date
Elyes HAOUAS dc4fd17a9c Fix typos - (Part #5)
Fix some typos

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12019
2020-06-25 09:03:07 +02:00
Elyes HAOUAS 1f61788c86 Get rid of trailing whitespaces (9 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12008
2020-06-23 10:30:26 +02:00
Marcel Hollerbach dade4fc2f7 eo-files: convert all Eina.Strbuf & Eina.Binbuf
these structs should not be used, but rather the builtin types that
exist for it.

Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11742
2020-06-09 10:29:29 +02:00
Marcel Hollerbach 8e3606698e refactor build
libraries are split into deps, external deps, and pub deps.
Evas engines are refactored to use the predefined engine deps.

this is preparation work for efl-one.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11806
2020-05-27 11:06:46 +02:00
Marcel Hollerbach 3ec1101652 Merge efreet_mime efreet_trash into efreet
efreet_mime and efreet_trash are now included in libefreet.so. There are
compatible libs for libefreet_mime.so libefreet_trash.so, which simple
drag in libefreet.so. .pc files also are in place for compatibility.

efreet_init & shutdown now initializes and shutdowns trash and mime.
The old init functions now simply call efreet_init, efreet_init will
then init the trash or mime libs.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11807
2020-05-26 10:15:30 +02:00
Carsten Haitzler 63b5d81983 Revert "Fix EAPI definition by defining EFL_BUILD for each built DLL"
This reverts commit 3ade45cbc8.
2020-05-18 11:13:59 +01:00
Vincent Torri 3ade45cbc8 Fix EAPI definition by defining EFL_BUILD for each built DLL
Summary: EAPI must be defined to dllexport when building DLL, and to dllimport when using these DLL. To achieve this, define EFL_BUILD for each library and module, and set DLL_EXPORT unconditionally. Static library are and will be not supported

Test Plan: compilation

Reviewers: zmike, raster, jptiz

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11834
2020-05-18 09:51:48 +01:00
Xavi Artigas 5b2d2a85b2 doxygen docs: Fix tons of invalid Doxygen commands
Mostly typos
2020-03-10 21:36:34 +01:00
Xavi Artigas 9f4b5458ea doxygen: fix duplicated toc sections 2020-02-28 11:44:19 +01:00
Xavi Artigas 3e88b3b9f9 Tabs: remove them
They have been known to crash some old compilers and have
severe performance penalties on non-power-of-two architectures
like the Chitauri 13-bit processors.

Tabs also cause eye strain, vomits, brain tumors and bad breath.
2020-02-12 10:44:06 +01:00
Lauro Moura f203c164d8 eo files: Avoid container<ptr(value_type)> usage.
Summary:
Value types are already assumed to be stored by pointer (e.g.
`int val = *(node->data);`)

This commit just changes the current usage of the `ptr` modifier in the
ptr, not affecting the parser.

Reviewers: q66, segfaultxavi, bu5hm4n, felipealmeida

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers, brunobelo

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10769
2019-11-29 17:22:07 -03:00
Carsten Haitzler 3d5e735704 eio - fbsd - make fd for monitored file close on exec
this fixes T7486
2019-10-12 13:02:31 +01:00
Mike Blumenkrantz 64799b32a1 eio/dir: fix null deref
Summary:
above cases may fail, causing target to be null

CID 1399103
Depends on D10210

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10211
2019-09-26 17:59:59 -04:00
Marcel Hollerbach 1eb24301fd efl_io_model: next try to fix this race condition
what is happening is that a file gets announced through eio_model
listing code, at this point of time, the monitor does not yet know about
the file. If the file now gets deleted between the annoncing and the
learning of the file from the monitor, then the file got an ADD event,
but no DEL event. Which is a bug.

With this commit there is a new API which asks the monitor if the file
already has the knowledge about the files existance, or not. A few
monitors like win32 inotify or cocoa do not have context about the file
directly, if the OS is now having the same bug, then we are again in
trouble, however, we canot do anything about that. In the case of kevent
or poll, this asks the context of the monitor if the file is already
there.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10006
2019-09-19 14:50:42 -07:00
Marcel Hollerbach 5a7102a589 Revert "efl_io_model: remove custom counting logic"
Summary:
This reverts commit d794a0d3d9.

This breaks Efl_Io_Model.

Reviewers: cedric, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10003
2019-09-18 08:21:00 -04:00
Vincent Torri 1f24762fc4 eio: fix warning
Test Plan: compillation

Reviewers: raster, cedric, zmike

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9925
2019-09-12 14:45:58 -04:00
Daniel Kolesa 4f4b58bf4c efl: change all occurences of @owned to @move 2019-09-06 17:01:05 +02:00
Xavi Artigas 88948eeab4 docs: minor tweaks to efl_io_model
This file's docs are far from complete but this idea had to be
written down before it was forgotten.
Also, TABS.
2019-09-05 17:01:02 +02:00
Marcel Hollerbach d794a0d3d9 efl_io_model: remove custom counting logic
Summary:
this logic brings a few problems:

- When files are annonced here, without the monitor having the context
of the files, immidiat actions like deletion of the file are resulting
in no deletion event. Which is definitly a bug, so we need to wait here
for the monitor.

- When a new count is annonced before the files are there from the
monitor, we are heading towards the same issue - additionally, we might
already have files available, due to the custom counting that are not
annoncned through the monitor, which means, at a later pointer we are
annoncing a new file which is already available via the API.

Right now i do not see a way to continue with this code, it caused major
issues with our CI and the POLL backend, for now things do work again.
Depends on D9624

Reviewers: zmike, stefan_schmidt, cedric, felipealmeida

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9625
2019-09-04 13:39:43 -04:00
Carsten Haitzler d6156d23d8 eio - don't call cb's after a cancel
i saw a segv in e/efm .. an eio call was called after it had been
canceled. this should never happen. ever. so ensure it does not once
an eio file has been canceled.

@fix
2019-08-30 12:43:24 +01:00
Mike Blumenkrantz 42704eccc7 eio/poll: avoid ever dereferencing the backend's parent in a thread
Summary:
when a monitor is destroyed, it unconditionally and immediately deletes
the monitor struct. this means that as soon as the monitor is dead, the
backend must never access the parent pointer again if its lifetime exceeds
the lifetime of the monitor (such as in threads)

the only member of the monitor data used by the fallback monitor is the
monitor path, so we can just copy it to the fallback data to avoid ever
needing to dereference this pointer

fixes reliability issues with efl sentry unit tests

@fix

Depends on D9708

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9709
2019-08-23 13:38:33 -04:00
Mike Blumenkrantz 0b8605c35d efl/io: fix race condition with child model deletion
Summary:
if an event is emitted for a child that is added to the model during a
call to _efl_io_model_children_list(), it's possible that this child
will never be detected by the model's monitor/sentry if it is deleted
before the monitor can detect it, which means there will never be a
corresponding eio event emitted

in this case, ensure that we manually remove this child from the model
since we know we've just deleted it

this fixes reliability issues with efl io model monitor unit test

@fix

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9708
2019-08-23 13:38:32 -04:00
Vincent Torri 01b987df59 make mman.h private
Summary:
integrate mman.h to make Evil private to the EFL, as mman.h does not exist on Windows. After a discussion with raster, i include sys/mman.h only on non Windows platform.

One issue, though, is that src/modules/emotion/generic/Emotion_Generic_Plugin.h has inlined functions using mmap()

Test Plan: compilation on Windows

Reviewers: cedric, raster, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9542
2019-08-19 09:55:13 -04:00
Carsten Haitzler 9149767184 getenv - reduce continually calling getenv for the same vars do once
do it once and remember the result from the first one. drops overhead
for sure by a chunk i actually could see in perf reports like about 1-2%
of cpu...
2019-08-08 23:57:02 +01:00
Vincent Torri 5b51a6bb20 Eio: enable eio_file_chown if chown is available on the platform
Test Plan: compilation on Windows

Reviewers: zmike, raster, cedric

Reviewed By: raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9393
2019-07-28 09:38:26 +01:00
Cedric BAIL e0ee318fe1 eo: use efl_provider_{un,}register infrastructure instead of Efl_Loop one.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9296
2019-07-17 21:57:57 +02:00
Cedric BAIL fce5645d80 efl: use eina_streq for all property operation in model to avoid crash on NULL property name.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9266
2019-07-10 21:10:23 +02:00
Cedric BAIL 1f8d367138 eio: fix Efl.Io.Model properties iterator.
It kind of worked by luck for 6 months, but really shouldn't. This
is now a custom iterator that will walk the string part of the properties
only. It could become a generic iterator if necessary one day, but
for now, it is fine just here.

T7771

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9075
2019-06-05 13:40:26 -07:00
Mike Blumenkrantz ca4b517414 efl/io_model: check for parent object existence before removing wref
Summary:
if the wref automatically removes this pointer then there's no need to
remove the wref on the pointer

@fix
Depends on D8973

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8974
2019-05-29 12:29:04 -04:00
Vincent Torri 8db978aa4c include evil_private.h in last files, and disable symbolic links on Windows in a couple of files
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8933
2019-05-22 07:59:05 -04:00
Vincent Torri 03fffc3bdc Eio: avoid symbolic link on Windows
Summary: On Windows, symbolic links do not exist

Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8931
2019-05-21 13:35:01 -04:00
Vincent Torri a5267d3d9c remove Evil.h when not necessary, include evil_private.h when necessary
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8925
2019-05-20 09:10:00 -04:00
Cedric BAIL c559bdf809 eio: correctly set reference count of cached child object.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8793
2019-05-09 09:33:25 -07:00
Cedric BAIL 3b0261d552 eio: rely on inheritance and reflection for Efl.IoModel path property.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8653
2019-04-21 11:36:46 +02:00
Marcel Hollerbach 43a522b876 eio: ensure that the monitor starts when it is called to
Summary:
we need to to this here, otherwise we effectfily start the monitor
later, which means, we can miss a change in the filesystem. However,
this makes things a lot slower.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8526
2019-04-02 08:50:48 -04:00
Marcel Hollerbach c29dae34a0 efl_io_model: start early on monitoring
Summary:
Little introduction into what eio did before this commit:
Efl.Io.Model creation:
  - direct ls of a directory in a thread (A)
  - take all the contents of a directory and feed it slowly back into
the mainloop
  - when all events have been feeded back to the mainloop and have been
processed: start monitoring (B)

However, any file created between (A) and (B) will not be in the model,
since not the listing nor the monitoring did caputure it. Hence we need
to start monitoring before we actaully start listing. In the callbacks
we then check if we already published something.

ref T7311

Reviewers: zmike, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7311

Differential Revision: https://phab.enlightenment.org/D8525
2019-04-02 08:50:34 -04:00
Xavi Artigas 57da0bee3d docs: Fix common misspellings in EO files
Fixed all appearances of words from this list in EO files:
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02 11:32:05 +02:00
Cedric BAIL 150bc0fa14 eio: work around the lack of integration between Ecore_Thread and Eina_Future.
Ecore_Thread excpect resolution of the error and done case to be instantaneous,
while Eina_Future default scheduler linked with Ecore main loop is build around
asynchronous answer. This create a lot of potential. A better patch would be
to provide an Ecore_Thread helper that does the integration properly. Sadly
we are in release now, so this is basically what an helper would do, but
contained inside Efl_Io_Manager.

This also solve the same problem as D7970 and D8053, but it should avoid its
side effect.

Reviewed-by: YeongJong Lee <yj34.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8371
2019-03-27 15:03:33 -07:00
Cedric BAIL ed3165f928 eio: Efl.Io.Model should not make request when the object is invalidating itself.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8373
2019-03-27 15:03:29 -07:00
Cedric BAIL 4d1620f3f0 eio: remove unecessary use of weak reference.
There is no point in keeping a pointer to the main loop now that we
are using efl_future_then. This resolve potential bug with leftover
dangling weak reference as efl_future_then do require a free case
otherwise.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8374
2019-03-27 15:03:26 -07:00
Cedric BAIL f4426d2960 eio: guarantee that we will at least process one request per loop iteration for very slow system.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8447
2019-03-27 15:03:22 -07:00
Cedric BAIL 6b6faef3a3 eio: rely on efl_future_then to properly protect Eo object during the lifecycle of the future callback.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8334
2019-03-27 15:03:06 -07:00
Cedric BAIL a947d8e5b1 eio: path and filename property should always remind accessible even in case of error.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8335
2019-03-27 15:03:04 -07:00
Xavi Artigas bbd4b6e514 docs: Remove obsolete @since tags from EO files
Summary:
All legacy @since tags have already moved to the *.legacy.h files.
EO files are now devoid of @since tags (except some eldbus still
needed for legacy).
Upcoming patches will add @since 1.22 to those APIs which come out
of beta in this release.
APIs marked @beta do not need @since tags.

Test Plan: Everything builds, EO docs (like DocFX) have no Since tags.

Reviewers: zmike, bu5hm4n, lauromoura, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8430
2019-03-20 20:16:05 +01:00
Daniel Kolesa 58b8a3d163 efl: remove EFL_EO_API_SUPPORT macro
Summary:
Since we're now going to be shipping some eo classes as stable,
there is no point in keeping the eo api behind a macro, and it
should be enabled by default. Another case is beta classes, but
those are behind the EFL_BETA_API_SUPPORT guard.

This also changes includes around the place where things are
clearly broken (such as an included header needing something
from another header but that other header being guarded, notably
efl_ui_widget.h needing focus manager but focus manager being
behind beta in Elementary.h)

Reviewers: zmike, cedric, bu5hm4n, stefan_schmidt, segfaultxavi

Reviewed By: cedric, segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8322
2019-03-18 12:13:59 +01:00
Marcel Hollerbach 30bb8395c3 build: add a option to disable eo file installation
Summary:
this is done because .eo files are not stable, and in order to stop
people depending on it, its better for now to disable the installation
of them for now.

ref T7676

Reviewers: stefan_schmidt, cedric, zmike, devilhorns

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7676

Differential Revision: https://phab.enlightenment.org/D7897
2019-03-14 12:44:00 -04:00
Daniel Kolesa d3c5384cd0 eolian: enable checking of beta/stable contexts in all classes
Summary:
This enables all the checks unconditionally, without ignoring
classes that don't have an Efl namespace. This required a lot
of beta marking to make it build. It most likely doesn't
mark types correctly, as that is not fully enabled yet.

Reviewers: zmike, cedric, segfaultxavi, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8266
2019-03-11 13:42:29 +01:00
Mike Blumenkrantz a4ad866bc1 eo files: mark a bunch of types with @beta
Summary:
these are all types that we do not currently want to release

Depends on D8102

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8241
2019-03-08 16:40:40 +01:00
Cedric BAIL 86e2b208c7 eio: Efl.Io.Model doesn't have a parent class that actually provide any property.
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D8088
2019-03-01 17:10:38 -08:00
Hermet Park 25470a56d3 eio: fix not to overflow data by performing arithmetic. 2019-02-27 19:20:29 +09:00