Commit Graph

51 Commits

Author SHA1 Message Date
Xavi Artigas d74a4df994 csharp examples: Adapt to new classes syntax
Summary: Mainly use PascalCase Namespaces and Classes and proper event names.

Test Plan: Check all examples still build.

Reviewers: lauromoura, vitor.sousa, felipealmeida, bu5hm4n

Reviewed By: bu5hm4n

Differential Revision: https://phab.enlightenment.org/D7479
2018-12-19 16:51:15 +01:00
Mike Blumenkrantz fdcd2d337b sync eina examples build with current efl tree build 2018-08-21 15:52:01 -04:00
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
Xavi Artigas 3631f36cb0 efl: fix some warnings in examples
Summary:
- Check return vaule of fread()
- Uninitialized var (seriously!)
- Weird struct assignment

Still one warning remains, pending evaluation of T7166.

Fixes T6718

Test Plan:
Those 3 warnings have disappeared and the related example still works
as expected.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6718

Differential Revision: https://phab.enlightenment.org/D6631
2018-07-20 10:36:38 -04:00
Lauro Moura 06b582e6e8 efl_mono: Add examples code.
Buildsystem support will be enabled in a future commit
2017-12-04 15:47:51 -03:00
Amitesh Singh a106fc6161 eina example: fix eina_value examples 2017-10-30 16:17:16 +09:00
Amitesh Singh 5ac948caba eina: eina_value - Add "struct tm" support
Ref T6204

@feature
2017-10-30 16:04:53 +09:00
Amitesh Singh b232994075 examples: eina strbuf - fix the example 2017-10-24 22:48:01 +09:00
Prince Kumar Dubey 77ceead6e1 efl: unsigned int/long never be less than zero. Fixed.
Reviewers: raster, cedric

Subscribers: rajeshps, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:07:28 -07:00
Prince Kumar Dubey 99951747be eina: uninitialization of array leads to unwanted outcome of "eina_strlcat"
Reviewers: raster, cedric, rajeshps

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:03:55 -07:00
Amitesh Singh c60c732e34 eina: strbuf - Add strftime related functions
eina_strbuf_append_strftime()
eina_strbuf_insert_strftime()
eina_strbuf_prepend_strftime() - macro

We need these functions for implementing generic format function
interface especially for calander.

Ref T6204
2017-10-13 16:04:24 +09:00
Subodh Kumar c321def5fc eina: same expression on both statement.
Summary:
Comparing with same expression is avoided.
@fix

Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-09 16:36:57 -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
Amitesh Singh 9686393885 example: eina log - set eina log levels in examples 2016-04-13 15:29:29 +05:30
Srivardhan Hebbar 99601567bc eina: removing base64 from eina example.
Summary:
As base64 API's are no longer part of eina, removing them. Will add
separate file for emile examples.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3552
2016-01-09 00:33:44 +01:00
Srivardhan Hebbar 9d94188a23 eina: update example for with eina_base64url_decode function.
Summary:
Depends on D3521

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:42:59 -08:00
Srivardhan Hebbar 7078fcb835 eina: update example with eina_strbuf_manage_read_only_new_length function.
Summary:
The example is to demonstrate the use of
eina_strbuf_manage_read_only_new_length API.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: jpeg, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 12:32:18 -08:00
Srivardhan Hebbar f4a4fed258 eina: Updated example program to demonstrate base64url encode.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, jpeg

Reviewed By: jpeg

Differential Revision: https://phab.enlightenment.org/D3483
2015-12-31 13:34:19 +09:00
Srivardhan Hebbar e1442b98fd eina: Adding example for base64 decode function.
Summary:
Depends on D3381

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

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

PS: arc patch failed so manually applying this patch
2015-12-07 19:29:36 +09:00
Srivardhan Hebbar 3b5da62920 eina: example for base64 encoding.
Summary:
Depends on D3228

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-22 23:28:09 +01:00
Srivardhan Hebbar 752be6184d eina: updated example to include eina_strbuf_substr_get.
Summary:
Depends on D3224

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 15:04:24 -08:00
Shilpa Singh bae1e11bb8 eina: add API eina_strftime
Summary:
Add new API eina_strftime API in eina_str

@feature

Test Plan: test case and example also updated

Reviewers: tasn, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 12:42:50 -08:00
Shilpa Singh 50140c4a0c eina: add eina_tmpstr_manage_new, eina_tmpstr_manage_new_length APIs
Summary:
Add eina_tmpstr_manage_new, eina_tmpstr_manage_new_length APIs, these APIs create new tmpstr but reuse the input string memory.

@feature

Test Plan: Test case and example updated

Reviewers: tasn, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 10:42:35 -08:00
Srivardhan Hebbar df41dad6ea eina: updated example to add eina_strbuf_tolower.
Summary:
Depends on D3200
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 10:42:35 -08:00
Stefan Schmidt 8da0b707d1 examples: fix eina_tmpstr example after revert of strftime
Was left broken after the eina_tmpstr_strftime revert.
2015-10-04 09:19:53 +02:00
Shilpa Singh 06e4ef25ab eina: add example for eina_tmpstr.
Summary:
Example for eina_tmpstr added.

Example tests for eina_tmpstr_add_length, eina_tmpstr_len, eina_tmpstr_del and eina_tmpstr_strftime APIs

Signed-Off By: Shilpa Singh <shilpa.singh@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-23 14:27:56 -07:00
ChunEon Park acf868771c eina: add eina_simple_xml example.
This example just prints tag and it's attributes in xml file.
But this example intended for the scenario,
if the attributes have the "<" or" >" characters inside of the string.
2015-06-18 19:50:00 +09:00
Stefan Schmidt d17b6df10d examples/eina_inarray: Remove unused variables. 2015-01-16 10:39:24 +01:00
Srivardhan Hebbar 919a16d880 eina: add an example to demonstrate different eina insert and sort functions.
Summary:
While going through eina for understanding, wrote  a program to understand
he differences between different eina inarray functions. Thought, this might
be useful for others too, so adding the same.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-22 15:09:59 +01:00
Daniel Juyung Seo dec43c21af list example: revert unwanted local change push. 2014-08-18 03:18:07 +09:00
Daniel Juyung Seo c348d59e1e doc: fixed typo. 2014-08-18 01:10:39 +09:00
Savio Sena 159eaea005 examples: Removed compilation warnings. 2014-07-18 18:55:56 -03:00
MinJeong Kim 936242a4f2 eina-tiler:add union, subtract, intersection, equal apis for tilers
Summary:
Support union, subtract, intersection, equal(comparison) between tilers.
@feature

Test Plan: Test with added test case(src/tests/eina/eina_test_tiler.c) and the example(src/examples/eina/eina_tiler_02.c)

Reviewers: gwanglim, devilhorns, raster, zmike, cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D880
2014-05-28 16:51:30 +09:00
Savio Sena 5e471fd9e4 efl: remove some warnings.
Summary:
Mainly from the examples but also from libunibreak and tests/eet.

I'm not sure if it's really worth to remove warnings from the examples
-- because it adds pedantic-ness to something supposed to be didatic,
but I leave for you guys to judge.

Reviewers: tasn, cedric

CC: felipealmeida, raster, smohanty, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-24 02:27:15 +02:00
Stefan Schmidt 6cd9fdb400 examples/eina: Check return value of eina_iterator_next
If we define an API with warn_unused_result we should actually
check the result in our examples.
2014-02-28 14:37:53 +01: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
Vincent Torri fe0ef92a9e examples: fix various warnings in ecore and eina examples.
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:37:45 +09:00
Vincent Torri 70bb750171 examples: remove unused param warnings
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:35:32 +09:00
Carsten Haitzler e56a483b5a eina - and e3fl in general - stop using eina_error_get/set - useless really 2013-10-11 16:50:40 +09:00
Igor Murzov e29dec1793 Fix incorrect printf format usage 2013-04-16 12:07:36 +04:00
Stefan Schmidt 3daf67a4ba eina/examples: Return in a non-void function.
Reported by Simotek. Thanks!
2013-03-28 10:56:05 +00:00
Tom Hacohen 52dd8953ea Eina examples: Fixed eina magic example.
Return a value in the "new" function...
2013-03-26 11:24:17 +00: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
Tom Hacohen 23cf059b23 Eina examples: Fixed unused parameter warnings.
SVN revision: 82829
2013-01-15 17:18:40 +00:00
Gustavo Sverzut Barbieri a06b26817c efl: add eina_file_copy()
it's useful to copy file from one place to another and this will be
used in eio' s implementation.

NOTE: did not use mmap here as mmap faults may be cumbersome to handle
(Eina_File itself does that, but in a nasty way) and the
implementation would be severely different as there is no Eina_File
from FD, and there is no way to inject custom memory/fd into the
Eina_File's fault handling. The performance would not be that
different anyways and the splice() is already in there for systems
with good performance (read: Linux).



SVN revision: 81942
2012-12-31 23:17:18 +00:00
Gustavo Sverzut Barbieri 65012fa66d efl: missing api for xattr.
SVN revision: 81941
2012-12-31 21:05:58 +00:00
Cedric BAIL 3ddf7ef3e7 efl: backport Igor's eina patch.
SVN revision: 77415
2012-10-04 09:31:46 +00:00