Commit Graph

31 Commits

Author SHA1 Message Date
Mike Blumenkrantz fabab68024 merge all files from efl.git/src/examples 2018-08-09 17:39:17 -04:00
Mike Blumenkrantz d9bc92888a examples 2018-08-09 16:21:58 -04:00
Cedric BAIL 73876dcbc9 Revert "efl_add_ref - fis to use efl_add properly with a parent."
This reverts commit 2fb5cc3ad09f6aaf82b5d1131ac5ed22ed848bd4.

Most of this change where wrong as they didn't affect the destruction
of the object. efl_add_ref allow for manual handling of the lifecycle
of the object and make sure it is still alive during destructor. efl_add
will not allow you to access an object after invalidate also efl.parent.get
will always return NULL once the object is invalidated.

Differential Revision: https://phab.enlightenment.org/D6062
2018-05-24 16:02:17 -07:00
Cedric BAIL 7092eb69d0 eio: update efl_io_manager_ls example. 2018-05-01 10:39:01 -07:00
Cedric BAIL 9fc9db95ed eio: fix example to use the new EINA_VALUE_ARRAY_FOREACH. 2018-05-01 10:39:01 -07:00
Carsten Haitzler 29dda8d2b5 efl_add_ref - fis to use efl_add properly with a parent.
fixes bc18b7e7ad1f8c5d587400b27fabab0865017011 and
168849e8a08966ecc284e28f64126a3a85965965
2018-03-29 13:30:55 +09:00
Cedric BAIL 2ded43d89a efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:56 -07:00
Carsten Haitzler 0197e7735b Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303bea691c6f7f9472a5dec32d9103c38d.

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

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

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

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 30b2e24c6b efl: create Efl.App class, the parent of Efl.Loop 2018-02-26 14:02:51 -05:00
Carsten Haitzler ddf7587449 efl loop - rename ecore_main_loop_get to efl_main_loop_get
ecore_main_loop_get() is really a new "eo api" but it's using our old
ecore_* namespace, so move to the new efl namespace.
2018-01-02 16:13:54 +09:00
Cedric Bail 84b82b95f1 eio: fix multiple open/close chain example. 2017-10-09 18:27:56 -07:00
Cedric Bail 0264e5cbf3 eio: update example for openning and closing file asynchronously using a chain. 2017-10-09 17:44:33 -07:00
Cedric BAIL cbbc077dae eio: migrate example to use Eina_Future. 2017-10-05 14:21:23 -07:00
Bryce Harrington 71f4be1901 examples: use printf instead of fprintf(stdout, ...)
Summary:
Applies same change as e8355c93 for evas, to the remaining examples.
This uses the shell command-line:

    src/examples/evas$ grep -sr 'fprintf(stdout' . | cut -d: -f1 \
        | uniq | xargs sed -i "s/fprintf(stdout/printf(/"

Note that use of the "fprintf(stdout" construct can generate warnings
when -Wformat-security is enabled, if the fprintf statement has no
format arguments, so in addition to the stylistic simplification this
also helps quell those spurious warnings.

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-05-08 15:14:29 -07:00
Jean-Philippe Andre 7e7ff5059e examples: Fix most trivial warnings
This fixes all warnings for "make examples" for:
 -Wunused-parameter
 -Wshadow
 -Wformat-security
 -Wenum-conversion

Some remaining warnings include:
 -Wdeprecated-delcarations
2017-04-20 17:44:57 +09:00
Jean Guyomarc'h 58cb4fb34c eio: fix printf format error 2017-03-09 23:16:16 +01:00
Cedric BAIL d959ed3686 eio: finish port to new efl_io_manager API. 2016-09-09 16:22:55 -07:00
Tom Hacohen d0bc249ead Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Tom Hacohen 25588b5ae3 Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen 8d31721145 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Stefan Schmidt d8f5fe8b9e examples: rename eio_job to efl_io_manager, finish a job half done
This rename was missing in the examples. Running make examples or even a
simple grep shows this. I expect higher b0rking skills by now. :)
2016-06-23 10:32:59 +02:00
Tom Hacohen c55d3e28ee Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Stefan Schmidt 30fade6838 examples: eio: mark unused parameter as such
Really shutting up warnings here to see what else the compiler has to say.
2016-06-06 15:43:15 +02:00
Lauro Moura 6d7b331448 eio: Adds Eo-based Eio API
The legacy Eio_File factory functions are replaced by an Eo object
called Eo_Job that return promises wrapping the async file operations.
With this commit, the legacy Eio callbacks are replaced by the following
Eo/Promises counterparts :

* Done_Cb -> Promise then success callback
* Error_Cb -> Promise then error callback
* Main_Cb -> Promise progress callback
* Filter_Cb -> Job object event (more below)

Events are used to deliver and get the filter data. To differentiate
between the named and direct versions, they come in "filter,direct" and
"filter,name" versions.

Monitors were wrapped inside a new class Eo_Sentry.

The user creates a sentry object and adds monitoring targets to it,
listening to events on it.

The sentry event info is composed of two strings. The source string
is the path being monitored, i.e. the one passed to eio_sentry_add, and
the trigger string is the path that actually triggered the event, e.g.
a new file created in a monitored directory.
2016-05-25 21:32:03 -03:00
Yomi 10caab32dd Fix grammar in error messages.
Summary:
Changes:

     src/examples/eio/eio_file_copy.c
     src/tests/eio/eio_test_file.c
     src/tests/eio/eio_test_xattr.c

Reviewers: cedric, thiepha, Hermet

Reviewed By: thiepha, Hermet

Subscribers: thiepha, cedric

Differential Revision: https://phab.enlightenment.org/D2912
2015-08-07 17:06:23 +09:00
Yomi 1e0622fe6e eio: grammar and typo fixes in docs.
Summary:
Fix a sentence.

Changes:

     src/examples/eio/eio_file_ls.c

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2894
2015-08-03 11:59:03 +02:00
Stefan Schmidt 08ebf05e67 examples: Use EINA_UNUSED in examples to silence a ton of warning
First step to get the examples compiling output in a useful state.
With all the warning noise one would never see the important messages.

If you add new code please make sure its warning free.
2014-02-28 14:37:53 +01:00
Ricardo de Almeida Gonzaga 4f3ca3efcd efl: add makefile.examples to each lib
Patch by: Ricardo de Almeida Gonzaga <ricardo@profusion.mobi>



SVN revision: 83795
2013-02-08 17:35:24 +00:00
Ricardo de Almeida Gonzaga e2dae9a49e efl: add and fix some gcc lines and fix some examples. Its not possible to build from outside the directory with eina_prefix, the build still depends on PACKAGE_DATA_DIR
Patch by: Ricardo de Almeida Gonzaga <ricardo@profusion.mobi>



SVN revision: 83794
2013-02-08 17:35:17 +00:00
Gustavo Sverzut Barbieri a7006061b2 efl/eio: use eina_file_copy()
SVN revision: 81944
2012-12-31 23:45:24 +00:00
Vincent Torri 2b6bc567db add eio example and fix ecore_fb linking
SVN revision: 80273
2012-12-05 18:10:43 +00:00