Commit Graph

773 Commits

Author SHA1 Message Date
Andrii Kroitor 0d2d0f67e8 examples: fix ecore_exe_child example to work properly on Windows
Summary: ecore_main_fd_handler_add is not working on Windows

Reviewers: vtorri, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4470
2017-06-15 12:18:42 +09:00
Jean-Philippe Andre 34063c362c evas: Rename device Class to Type, remove Sub_Class
1. The word "class" is a pain point with many languages where
   it's a keyword. Type is a little better. Also, the property
   was already named "device_type" and not "device_class".

2. Remove Efl.Input.Device.Sub_Class
   It's not used inside EFL upstream codebase, and unlikely to
   be used anywhere else (even in Tizen).

Hopefully no one used the Efl_ enum types. So far only the Evas_
types should be in used.

Ref T5540
2017-06-12 15:21:55 +09:00
Jean-Philippe Andre 165f8ac32e evas: Remove device "parent", "name" and "description" properties
Those are now merged with Efl.Object parent, name and comment.
The reasoning is that only seats can be parent devices; And name
and description are not only name clashes but also not extremely
useful anyway.

Tested with VNC.

Fixes T5540
2017-06-12 15:17:50 +09:00
Bryce Harrington aa9f161802 examples: Flesh out the evas-buffer-simple example
Summary:
This serves as an early example for new Evas programmers to introduce
the buffer engine as well as very basic canvas usage, so we're going
into a lot more detail for both of those than we'll do in subsequent
examples.

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4950
2017-06-09 12:09:54 +09:00
Bryce Harrington 8110e09a8b evas/examples: add intro for evas-event-filter.c example
Reviewers: cedric

Reviewed By: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:57 -07:00
Bryce Harrington 223b3f6437 evas/examples: fix minor typo 'whe'
Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:57 -07:00
Bryce Harrington 669170b8d0 examples/evas: add tutorial commentary for evas-init-shutdown
Summary:
This is the most basic of the Evas examples and serves as the starting
point for new Evas users.  Since this targets neophytes, we can afford
to be much more detailed in commentary.

Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:57 -07:00
Bryce Harrington 60e02d4d4f examples/evas: add a README
Summary:
Categorize the examples by topic, and identify certain examples as
introductory; these can be commented more verbosely than the other
examples.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:56 -07:00
Al Poole 285f10407f examples: fix efl_net_control_example.c on BSD.
Reviewers: cedric, stefan_schmidt

Subscribers: stefan_schmidt, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:04:43 -07:00
Stefan Schmidt e55719cef1 examples: edje: make sure we use the edje_object_language_set legacy API
The EO based edje_obj_language_set API is now longer available since a
rework of this API. Also make sure a used parameter is not marked as
unused.
2017-06-02 09:21:49 +02:00
Jean-Philippe Andre ebf459fa2a examples: Test API efl_input_device_children_iterate
While the API seems to work fine, I am not 100% sure the device
names are properly assigned.

Run ecore_evas_cursor_example or ecore_evas_vnc_example and
then connect to the VNC server locally or remotely.
2017-05-24 16:06:18 +09:00
Amitesh Singh 7e7719a346 rename elm_button to Efl.Ui.Button
ref T5323

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-05-22 17:28:47 +09:00
Jean-Philippe Andre 77c20000d8 c++: Fix examples as Win.Standard was removed 2017-05-17 15:43:58 +09:00
Stefan Schmidt 425a0b2e39 examples: evas: fix else block by adding needed parenthesis
This was broken since over a year. Happened during the automatic eo4
migration in f21ade6123b9053fca8d1632644c48525a99d6e0.

Thanks goes to the gcc warning misleading-indentation:

evas-3d-shadows.c:163:4: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
    else
    ^~~~
evas-3d-shadows.c:165:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
      evas_canvas3d_node_look_at_set(scene->mediator, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 3.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 5.0, 0.0);
2017-05-16 21:58:35 +02:00
Bryce Harrington 770a31371a examples/evas: Fix weird use of word synchrony in comment
Summary: 'keep in sync' is more familiar programmer jargon.

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4876
2017-05-12 14:42:29 +09:00
Jean-Philippe Andre ad3a612250 evas map: Rename raw_coord to coord_absolute
This is more in line with the other "absolute" APIs.
2017-05-12 12:02:24 +09:00
Jean-Philippe Andre 0e9201f523 evas map: Introduce new API for maps (Efl.Gfx.Map)
This implements an entirely new API model for Evas Map by relying
on high-level transformations on the object rather than an external
Evas_Map structure that needs to be constantly updated manually.

The implementation relies on Evas_Map.

To rotate an object all you need to do now is
  efl_gfx_map_rotate(obj, 45.0, NULL, 0.5, 0.5);

Or with a C++ syntax:
  obj.rotate(45.0, NULL, 0.5, 0.5);

Or even simply (with default arguments):
  obj.rotate(45.0);

The map transformation functions are:
 - rotate
 - rotate_3d
 - rotate_quat
 - zoom
 - translate (new!)
 - perspective_3d
 - lightning_3d

@feature
2017-05-11 17:54:00 +09:00
Jean-Philippe Andre 1529016f9c evas examples: Fix invalid assumption about proxy
In the map examples, the map image UV size was based on the image
source geometry, rather than the image geometry itself.

In the example, this affects how the glass is mirrored. Before this
patch, the reflection is a single line stretched. EFL 1.18 and 1.19
seem to have the same issue, while 1.17 simply fails to show any
reflection. 1.16 fails miserably and the entire window is black.

If the original code was correct, then I believe that map and/or
proxy rendering have been modified in a way that affects the meaning
of those image UV parameters. But this seems like the regression (if
it is one) is in fact quite old.

@fix
2017-05-11 17:53:51 +09:00
Bryce Harrington fbd7313f67 examples/evas: Improve linespacing consistency
Summary:
Also fixes a handful of obvious indentation irregularities,
including some reformatting of some printf() multi-line indents that
commit a71b770b did not properly adjust.

No functional code changes.

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4864
2017-05-10 11:03:38 +02:00
Bryce Harrington e253649f1c examples/evas: streamline the intro description statement for examples
Summary:
For people browing through the examples, having the opening statement be
concise and consistent will help them more quickly find what they're
looking for.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Test Plan:
Some of the examples had identical opening statements (e.g. the image
object examples).  I've tried to give each a unique description defining
what they are demonstrating, but you may want to doublecheck I got these
correct.  Of particular note, to me evas-images5.c looks like just a
fixup to evas-images4.c, so I'm not sure what makes these two distinct.

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-05-08 15:26:07 -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
Bryce Harrington 5f4ea5ddce examples/evas: Fix missing space before -lm in compilation directions
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4835
2017-05-03 12:03:40 +02:00
Bryce Harrington 24498073b7 examples/evas: fix spelling
Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-04-25 16:28:44 -07:00
Jeeyong Um f8760a6813 edje_cc: introduce "Anchors" - easy way to set parts relationship
Test Plan: compile src/examples/edc-anchors.c and run

Reviewers: zmike, raster, cedric, jpeg

Reviewed By: raster, jpeg

Subscribers: raster, barbieri, zmike, SanghyeonLee, taxi2se, Jaehyun_Cho

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-04-25 16:25:15 -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
Bryce Harrington b847d3124b examples/evas: Use printf instead of fprintf(stdout, ...)
Summary:
Applies the correction purely mechanically using the following shell
command-line:

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

This fixes a few warnings about lack of a format string:

    warning: format not a string literal and no format arguments [-Wformat-security]
        fprintf(stdout, commands);

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4691
2017-04-20 17:31:58 +09:00
Cedric BAIL c4dae329e8 ecore: use new API eina_file_close_on_exec in example too. 2017-04-18 16:57:36 -07:00
Shinwoo Kim 0b833586d6 ecore_input: add API to get name of joystick.
Summary:
The Ecore_Event_Joystick would be not enough information on user side.
Because the button index such as ECORE_EVENT_JOYSTICK_BUTTON_SELECT/START/META,
etc could be mapped to different button for different named joystick.

Test Plan: Using example

Reviewers: raster, cedric, jpeg

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D4669
2017-04-13 14:53:48 +09:00
Cedric BAIL 74dce2ca6c ecore_evas: fix use of new VNC API in example. 2017-04-12 15:13:19 -07:00
Gustavo Sverzut Barbieri 5136fa380f implement efl_net_{socket,dialer,server}_windows
This is the local socket for windows, analogous to AF_UNIX.

`Efl_Net_Socket_Windows` is the base class doing `ReadFile()` and
`WriteFile()` using overlapped I/O, as well as the close procedure
(`FlushFileBuffers()`, `DisconnectNamedPipe()` and
`CloseHandle()`). These are done on top of an existing HANDLE that is
set by `Efl_Net_Dialer_Windows` (from `CreateFile()`) or
`Efl_Net_Server_Windows` (from `CreateNamedPipe()`).

The overlapped I/O will return immediately, either with operation
completed or `ERROR_IO_PENDING`, which means the kernel will execute
that asynchronously and will later `SetEvent(overlapped.hEvent)` which
is an event we wait on our main loop. That `overlapped` handle must
exist during the call lifetime, thus cannot be bound to `pd`, as we
may call `CancelIo()` but there is no guarantee the memory won't be
touched, in that case we keep the overlapped around, but without an
associated object.

Windows provides no notification "can read without blocking" or
non-blocking calls that returns partial data. The way to go is to use
these overlapped I/O, with an initial `ReadFile()` to an internal
buffer, once that operation finishes, we callback the user to says
there is something to read (`efl_io_reader_can_read_set()`) and wait
until `efl_io_reader_read()` is called to consume the available data,
then `ReadFile()` is called again to read more data to the same
internal buffer.

Likewise, there is no "can write without blocking" or non-blocking
calls that sends only partial data. The way to go is to get user bytes
in `efl_io_writer_write()` and copy them in an internal buffer, then
call `WriteFile()` on that and inform the user nothing else can be
written until that operation completes
(`efl_io_writer_can_write_set()`).

This is cumbersome since we say we "sent" stuff when we actually
didn't, it's still in our internal buffer (`pd->send.bytes`), but
nonetheless the kernel and the other peer may be adding even more
buffers, in this case we need to do a best effort to get it
delivery. A particular case is troublesome: `write() -> close()`, this
may result in `WriteFile()` pending, in this case we wait using
`GetOverlappedResult()`, *this is nasty and may block*, but it's the
only way I see to cope with such common use case.

Other operations, like ongoing `ReadFile()` or `ConnectNamedPipe()`
will be canceled using `CancelIo()`.

Q: Why no I/O Completion Port (IOCP) was used? Why no
   CreateThreadpoolIo()? These perform much better!

A: These will call back from secondary threads, but in EFL we must
   report back to the user in order to process incoming data or get
   more data to send. That is, we serialize everything to the main
   thread, making it impossible to use the benefits of IOCP and
   similar such as CreateThreadpoolIo(). Since we'd need to wakeup the
   main thread anyways, using `OVERLAPPED.hEvent` with
   `ecore_main_win32_handler_add()` does the job as we expect.

Thanks to Vincent Torri (vtorri) for his help getting this code done
with an example on how to do the NamedPipe handling on Windows.
2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri 62e2e21b26 ecore_con_*_example: compile on win32.
- win32 doesn't provide getline().
 - _write() exists, use _write_() instead
2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri c7d8151463 ecore_ipc_client_example: win32 doesn't provide getline(). 2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri 874c1062b0 efl_net_dialer_unix_example: read in loop while "can_read".
While in UNIX we use 'select()/poll()' to query for read fds and this
will eventually callback with "can_read" event, use the loop to match
other implementations where can_read keeps true if not all data was
read.
2017-03-29 12:44:19 -03:00
Carsten Haitzler 9fb1d8418b fix ecore con client exmaple to match cmdline help output for options 2017-03-29 16:49:03 +09:00
Carsten Haitzler 2be8857184 fix ecore con server exmaple to match cmdline help output for options 2017-03-29 16:28:21 +09:00
Jean Guyomarc'h 6349db601b eldbus: don't abs() an unsigned value
clang complained about abs() being used on an unsigned integer.
Calling abs() is actually unnecessary.
2017-03-09 23:16:16 +01:00
Jean Guyomarc'h 58cb4fb34c eio: fix printf format error 2017-03-09 23:16:16 +01:00
Lauro Moura a9823de428 js: Update examples, including window api changes.
Window now inherits from Container instead of Pack.

Also removed some deprecated stuff.
2017-02-22 18:56:30 -03:00
Bryce Harrington a3c79cea43 examples: Use printf instead of fprintf(stdout, ...)
Summary:
Also fix warning about lack of a format string:

    warning: format not a string literal and no format arguments [-Wformat-security]
         fprintf(stdout, commands);

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4673
2017-02-21 10:46:28 +09:00
Shinwoo Kim 3a35dab1ca ecore_input: add API to set/get deadzone of joystick event for an axis.
Summary:
The axis type joystick event could occur without user's control if joystick is too sensitive.
The deadzone prevents this unnecessary event. The default value is 200.
The event value for an axis is a signed integer between -32767 and +32767.

Test Plan: Using example

Reviewers: raster, cedric, jpeg

Reviewed By: jpeg

Subscribers: stefan_schmidt

Differential Revision: https://phab.enlightenment.org/D4654
2017-02-15 13:03:02 +09:00
Larry Jr 376c865ad7 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
Jerome Pinot b199ca0453 edje_example: fix compile instruction 2017-02-05 21:56:18 +09:00
Bruno Dilly 56e71a0b38 edje: change seat signals
Use seat names as prefix, not as suffix, following
a top-down approach and avoiding issues
with applications that may be receiving
doubled signals (legacy + suffixed).

So instead of "mouse,in,seat1" signal will be
"seat,seat1,mouse,in".
2017-02-01 17:19:32 -02:00
Felipe Magno de Almeida 75eeed28e8 cxx: Modify how to generate C++ headers and allow cyclic dependencies
Allow cyclic dependencies in generated C++ headers by changing order
of includes and creating forward declarations.
2017-01-18 22:47:04 -02:00
Cedric BAIL 5017edad17 ecore_con: use the right type for prototype. 2017-01-06 15:58:46 -08:00
Cedric BAIL 11699a0894 cxx: fix example with recent change. 2017-01-06 15:58:46 -08:00
Bruno Dilly f6e91c3e30 examples/edje: add seat filtering example
4 widgets:
 * seat1 only
 * seat2 only
 * seat1 + seat2
 * any seat
2016-12-21 23:03:33 -02:00
Guilherme Iscaro 421ac7a949 Ecore Evas: Add a new cursor example.
This example sets the cursor image of each available mouse and
report its position every one second.
2016-12-20 18:34:39 -02:00
Gustavo Sverzut Barbieri d66def5bff efl_io_buffer: adopt read-only and read-write buffers.
todo--, allow buffer backing store to be provided by Eina_Slice
(rdonly) or Eina_Rw_Slice (rdwr).
2016-12-19 16:50:58 -02:00
Gustavo Sverzut Barbieri 1d86cbfab4 more eo simplified to use Eina_Slice instead of pointer to.
Working directly with Eina_Slice is easier than a pointer to it,
requires no validation of the pointers and is cheap since it's just
putting together size_t + void*.

However we can't hint the user of 'const(Eina.Slice)' properties as
Eolian is incorrectly generating getters as:

   const Eina_Slice class_property_get(...)

which is makes compilers complain about ignored qualifiers:

   ../src/lib/ecore/efl_io_copier.eo.h:329:7: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]

Leave some TODO so @q66 can fix those.
2016-12-19 15:30:56 -02:00
Gustavo Sverzut Barbieri 8c2013d090 Efl.Io.{Queue,Buffer,Buffered_Stream}: slice_get is now a property.
Previously we couldn't return a slice, instead required the user to
pass a slice and we'd fill it since Eolian couldn't generate fallbacks
for structures.

Since @q66 fixed eolian, we can now return the structure itself as
initially wanted, ditching some TODO from the code.
2016-12-19 15:30:56 -02:00
Bruno Dilly 6979be8215 edje/examples: add example of use_custom_seat_names flag
Since seat names defined on evas will depend on evas backends,
maybe udev rules, etc, we aren't able to demonstrate it
without manually setting another name for such seats
with efl_input_devices_name_set(). Otherwise
we wouldn't have guarantees it would match
names on EDC.
2016-12-19 14:58:35 -02:00
Bruno Dilly d11a8d3682 edje/examples: add example for focus actions
Just a regular (non multiseat) focus example for
actions FOCUS_SET and FOCUS_OBJECT
2016-12-19 14:58:35 -02:00
Bruno Dilly 1a60462fad examples/edje: add dynamic seats example
It's an example of how themes can be implemented even if the number
of seats using the UI is unknown, and how it can be done
using scripts or C code.
2016-12-19 14:58:35 -02:00
Bruno Dilly 1c5ef34f5e edje: support action seats on edje_edit 2016-12-19 14:58:35 -02:00
Bruno Dilly 138dcdeb6f edje: accept optional seat parameter on FOCUS_OBJECT
If not provided, FOCUS_OBJECT action will keep acting
over default seat.

Also include a usage on edje-multiseat test
(actually no example was exercising this action).
2016-12-19 14:58:35 -02:00
Bruno Dilly 9e6d5cf4fa examples/edje: add multiseat example 2016-12-19 14:58:35 -02:00
Guilherme Iscaro 8e5c3cf839 Evas: Add event filter example.
This example exercises the new seat event filter API.
2016-12-12 14:59:22 -02:00
Gustavo Sverzut Barbieri f5d08a4f8f efl_net: add Efl.Net.Ip_Address
This is a string parser, serializer and asynchronous resolver.

It's purpose is to convert to and from the strings we use in our
dialers and servers, such as "127.0.0.1:1234" or "[::1]:1234",
properties allow to check the family, port, address bytes (slice) and
even get a struct sockaddr pointer to use with bind()/connect() in
outside code.

It will also offer some utilities present in netinet/in.h in an easy
to use way, after all IN6_IS_ADDR_LOOPBACK() works one way, while
there is no IN_LOOPBACK and comparing with INADDR_LOOPBACK will lead
to errors since it's in network order.

Last but not least, it will do asynchronous resolve of host and port
names using an internal thread and getaddrinfo(). The results are
delivered using a Future with an array of objects.
2016-12-12 02:30:33 -02:00
Gustavo Sverzut Barbieri 128fe49e8e yoda-style inactivity timeout.
s/inactivity_timeout/timeout_inactivity/g so it matches the EFL names
with scope first, like timeout_connect, etc.
2016-12-12 02:30:33 -02:00
Gustavo Sverzut Barbieri 815d40c4bc efl_net: spell check s/revogation/revocation/g
Sorry, in pt_BR it's revoGar... so I did misspell :-)
2016-12-12 02:30:33 -02:00
Gustavo Sverzut Barbieri e8d70e91d9 ecore_con_server_example: add --socket-activated 2016-12-10 08:44:06 -02:00
Gustavo Sverzut Barbieri 4894549670 ecore_con_server_example: add tcp+ssl, upgrades a live client.
add a new -t/--type=tcp+ssl, there you can send "Upgrade: SSL\n" to
request the server to start the handshake.

This can be paired with the ecore_con_client_example, there you can
type:

   Upgrade: SSL\n
   STARTTLS\n

The second is a dialer local command to upgrade it to SSL, matching
what the server expects.
2016-12-10 08:44:06 -02:00
Gustavo Sverzut Barbieri e2d8c0bf28 ecore_con_client_example: allow tcp->ssl upgrades.
The example now offers --type=tcp+ssl, in this case it won't send a
"hello!" message to avoid messing with the handshake. Once the client
(dialer) receives the user command STARTTLS
(--starttls-local-command), then it will upgrade the connection.

Usually in real life you need to send some command to server, such as
upgrade, STARTTLS and then upgrade... unless you connect to a SSL-only
server (ie: ecore_con_server_example --type=ssl).
2016-12-10 08:44:06 -02:00
Gustavo Sverzut Barbieri 0ec3aa034e ecore_con_server_example: show client errors. 2016-12-08 16:00:01 -02:00
Gustavo Sverzut Barbieri c5f1b3f476 ecore_con_client_example: allow no-ssl verify and print errors.
allow to not verify server certificate or hostname, so we can test
with local, self-signed certificates.

Also print errors, so we can say that the server handshake failed.
2016-12-08 16:00:01 -02:00
Gustavo Sverzut Barbieri 36273ec57f ecore_con_server_example: allow more features and protocols to be used.
Instead of a single SSL connection, allow for local, tcp and udp,
optional flush and delete-after-write (--single-message) and echo
mode.

Very similar to ecore_ipc_server_example.c
2016-12-08 11:40:45 -02:00
Gustavo Sverzut Barbieri 2f0b1d7955 ecore_con_client_example: allow more features and protocols to be used.
Instead of a single SSL connection, allow for local, tcp and udp,
optional flush and delete-after-write (--single-message).

Very similar to ecore_ipc_client_example.c
2016-12-08 11:40:45 -02:00
Bruno Dilly ff8fb25f32 examples/evas: use new API for key modifiers per seat 2016-12-06 17:09:03 -02:00
Bruno Dilly 207e2fdb42 evas: add example for multiseat events
Also useful to make some tests / debugging.
2016-11-30 16:49:25 -02:00
Gustavo Sverzut Barbieri c13af29797 ecore_con_url_headers_example: allow POST data. 2016-11-29 16:03:13 -02:00
Vitalii Vorobiov 78137cc16a example: update edje-edit-part-box to use not deprecated functions
since box/table item API is deprecated and replaced with new API, it is important
to use them in example as well

Fixes T4931
2016-11-28 17:00:24 +02:00
Felipe Magno de Almeida 600b5e6edd elementary-cxx: Fix filemvc wrong usage of Efl_Future 2016-11-28 12:32:18 -02:00
Gustavo Sverzut Barbieri ac385e4998 efl_net_{socket,dialer,server}_simple: easy to use, buffered network sockets.
The low level I/O primitives are powerful but adds some complexity to
use, for bi-directional streaming communication one ends creating two
Efl.Io.Queue and two Efl.Io.Copier to pipe data to socket when it can
operate.

Then encapsulate the socket using the new Efl.Io.Buffered_Stream, this
will allow the socket, be a dialer or a server client, to be operated
as a single handle that internally carries about the buffering for
you.

As one can see in the examples, compared to their "manual"
alternatives they are very easy to use, ressembling
Ecore_Con_Server/Ecore_Con_Client, but also offers line-based
delimiters and the possibility to let the socket to handle queueing
for you in case you received partial messages (just do not
read/clear/discard the received data).
2016-11-25 17:27:32 -02:00
Gustavo Sverzut Barbieri c9e4ad0a44 efl_io_buffered_stream: wraps an I/O object and make it easy to use.
Since all other efl.io objects are low-level, the recommended approach
is to use an efl.io.copier. However when dealing with in-memory,
bi-directional comms like talking to a socket, we always end with 2
queues, 2 copiers and the annoying setup that is being replicated in
ecore_ipc, efl_debug and so on.

This class is the base to make it simpler. Other classes such as
Efl.Net.Socket.Simple, Efl.Net.Dialer.Simple and Efl.Net.Server.Simple
will use it to provide simpler code to users.

I guess we can call EFL+EO Java now?
2016-11-25 17:27:32 -02:00
Gustavo Sverzut Barbieri 16ad93554a ecore_ipc_server_example: test "write & del" using -m/--single-message
An use case is to send some message and delete the handle, all data
should be sent to client.
2016-11-23 12:57:10 -02:00
Gustavo Sverzut Barbieri 48694ac1cd ecore_ipc_client_example: test "write & del" using -m/--single-message
An use case is to send some message and delete the handle, all data
should be sent to server.
2016-11-23 12:57:10 -02:00
Gustavo Sverzut Barbieri 6aef6645e1 ecore_ipc_server_example: delete clients when they disconnect.
if a client disconnect we must delete them explicitly.
2016-11-22 21:58:14 -02:00
Gustavo Sverzut Barbieri 79edf18a9f ecore_ipc_client_example: better lifecycle management.
If the server is gone, immediately delete it, this exercises deleting
the server from inside its event.

Then, if the server was already deleted, do not do it again.

Also remove the shadow variable, keep only the global scope.
2016-11-22 21:56:41 -02:00
Gustavo Sverzut Barbieri 079e173291 add ecore_ipc_{client,server}_example.
Ecore_Ipc lacked examples so we can explore its API (and check if it
work :-P)
2016-11-22 19:50:11 -02:00
Cedric Bail 87fe6ed0b5 elementary_cxx: fix examples to use the new API. 2016-11-21 16:03:27 -08:00
Gustavo Sverzut Barbieri 696e59caec ecore_file_download_example: allow cancel.
If we ^C to cancel the main loop, then abort the download, this allows
using one more API in the example and provides more correct code.
2016-11-21 19:47:35 -02:00
Gustavo Sverzut Barbieri 8e14389e0b ecore_file_download_example: check the correct file size.
when downloading DST_MIME, check its size, not DST's.
2016-11-21 19:47:35 -02:00
Gustavo Sverzut Barbieri 42337f7f5b ecore_file_download_example: also unlink DST_MIME.
ecore_file_download() will refuse to download if file already exists,
then we must unlink DST_MIME as done with DST before we try to
download, otherwise it won't work on the second time.
2016-11-21 19:47:35 -02:00
Bruno Dilly 3a095c830a efl: add getter for input device's seat
Since this code will be required in many use cases
of the multiseat feature, including examples.

Reviewers: iscaro, barbieri, cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4385
2016-11-09 11:02:38 -02:00
Gustavo Sverzut Barbieri 0e0cac8577 efl_net_session and efl_net_control for ConnMan
These are objects to allow control of networking devices
(efl_net_control) as well as an application to request for
connectivity (efl_net_session).

They are loosely based on ConnMan.org, which we already use in
Enlightenment Window Manager via DBus access with Eldbus. However they
do not map 1:1 as the goal was to expose a viable subset of controls
but in a simple and general way, thus nome strings were converted to
enums, some arrays of strings were converted to bitwise flags, some
names were made more general, such as "service" was turned into
"access point" so it doesn't generate confusion with other "network
services" (ie: http server), or "favorite" that was renamed to
"remembered". Some behavior are slightly different (yet able to be
implemented on top), such as "Service.MoveBefore" and "MoveAfter" were
converted to a numeric "priority", calculated from service's list
index, changing the priority will reoder the list and thus generate
the MoveBefore and MoveAfter DBus commands.

ConnMan was chosen not only because we already use it, but because its
DBus API is sane and simple, with the server doing almost all that we
need. This is visible in the efl_net_session, which is completely done
in the server and do not require any extra work on our side -- aside
from talking DBus and converting to Eo, which is a major work :-D

   NOTE: ConnMan doesn't use FreeDesktop.Org DBus interfaces such as
         Properties and ObjectManager, thus we cannot use
         eldbus_model_object.

There are two examples added:

 - efl_net_session_example: monitors the connection available for an
   application and try to connect. You need a connman compiled with
   session_policy_local and a configuration file explained in
   https://github.com/aldebaran/connman/blob/master/doc/session-policy-format.txt
   to get a connection if nothing is connected. Otherwise it will just
   monitor the connectivity state.

 - efl_net_control_example: monitors, plays the agent and configure
   the network details. It can enable/disable technologies, connect to
   access points (services) and configure them. It's quite extensive
   as allows testing all of ConnMan's DBus API except P2P (Peers).
2016-11-08 22:40:34 -02:00
Guilherme Iscaro f1b1d1354a Ecore Evas VNC: add client disconnected callback.
Summary:
Ecore Evas VNC: Properly unregister the region push hook callback.

This callback must be unregistered when the VNC server is deleted.

Reviewers: bdilly, barbieri, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-07 14:44:40 -08:00
Cedric BAIL 413e6f592b elementary: update example to use Efl_Future. 2016-11-07 11:10:49 -08:00
Guilherme Iscaro df889fec9e VNC Example: Add support to Ecore_Evas FB engine. 2016-11-04 18:29:42 -02:00
Bruno Dilly 843579e166 examples/edje: add example of entry - editable text
Not trivial to be done imo, so it deserves an example.
2016-11-04 18:01:57 -02:00
Bruno Dilly ea8ecbd04e examples/edje: Fix build instructions and titles
Fix a few c&p errors
2016-11-04 18:01:57 -02:00
Gustavo Sverzut Barbieri 2485941816 examples/eldbus/dbusmodel.c improve situation, far from correct.
it was using old API, updated, but still doesn't work as expected,
lots of warnings from children being left alive, all proxies are
reporting no properties...

when model dies, all children proxies should die as well, otherwise we
get on console:

```
CRI:eldbus lib/eldbus/eldbus_core.c:215 eldbus_shutdown() Alive TYPE_SYSTEM connection
ERR:eldbus lib/eldbus/eldbus_core.c:175 print_live_connection() conn=0x8219230 alive object=0x8276d50 net.connman of bus=net.connman
...
```

Also, all proxies are reporting no properties "(no properties yet)",
likely they are missing to fetch such... even if "--wait" to let it
run, no asynchronous properties are delivered, at least not triggering
EFL_MODEL_EVENT_PROPERTIES_CHANGED.
2016-11-04 13:19:57 -02:00
Bruno Dilly d0aa248cd3 examples/edje: cosmetic fixes in a couple examples
Fix usage messages, remove unused defines
2016-11-03 18:47:32 -02:00
Gustavo Sverzut Barbieri c5eeb87b50 efl_net_server support systemd socket activation.
It includes extensive verifications to avoid mistakes and usage of
incorrect sockets.
2016-11-01 16:37:04 -02:00
Bruno Dilly 3d1b7cad6b examples/ecore: add example / test for wayland multiseat 2016-11-01 16:06:19 -02:00
Gustavo Sverzut Barbieri 418637624d efl_net_server_example: oops, do not assume all servers are Efl.Net.Server.Fd
SSL server is not an Fd, it contains one internally, but that's
hidden. So call proper methods.
2016-11-01 10:46:38 -02:00
Gustavo Sverzut Barbieri 1ee201e078 efl_net_{server,dialer}_ssl: TCP + SSL easy to use.
in the previous commit we're manually upgrading an existing TCP socket
to SSL. It is desired since some protocols need to negotiate, like
STARTTLS and the likes

Now we offer 2 classes that does autostart SSL once the socket is
ready.
2016-11-01 01:31:56 -02:00
Gustavo Sverzut Barbieri 973f2c29b5 efl_net_socket_ssl: initial SSL wrapper.
This is the first step towards SSL connections on top of sockets, with
an example on how to upgrade a dialer and a server client using TCP.
2016-10-31 19:39:33 -02:00
Gustavo Sverzut Barbieri 9daddebf09 efl_io_copier_example: add AF_UNIX support. 2016-10-26 19:16:29 -02:00
Gustavo Sverzut Barbieri fc2b980421 addded efl_net_{socket,dialer,server}_unix
This introduces AF_UNIX server and dialer, these are not available on
Windows as in that platform we'll create a custom class for native
'local' communication.

In the future we can add a wrapper class Efl.Net.Local that will use
the class for each platform, but won't expose its details.

For instance, if we ever expose 'credentials' (which I didn't because
they are not portable), then it doesn't make sense to try to match
that on Windows. The 'Efl.Net.Local' would just stick to the basics:
Reader, Writer and Closer APIs.
2016-10-26 19:01:03 -02:00
Gustavo Sverzut Barbieri 8e47bb8e0e efl_io_copier_example: allow udp as input/source.
now that we have a 'bind', let's use the given address as bind and
dial to `0.0.0.0` or `::`. This allows the dialer to receive data at
the given address and make the example useful.
2016-10-26 12:46:09 -02:00
Gustavo Sverzut Barbieri 54de9e211f efl_net_dialer_udp_example: add missing print of groups. 2016-10-26 12:24:48 -02:00
Lauro Moura 2bd1553c8e efl_js: Update JS examples
Changing imports, functions, etc.

Also export "cast" function for all eolian_js generated classes.
2016-10-25 12:23:34 -02:00
Gustavo Sverzut Barbieri d4c6db251a efl_net_*_udp: make UDP usable, including multicast.
This was a huge work, but now UDP is usable as seen in the examples.

Instead of relying on 'connect()', just do 'sendto()' and 'recvfrom()'
as they are universal. Multicast address can only be connected in
IPv4, IPv6 wasn't working and I'm not sure the IPv4 is portable to
other platforms.

Dialer will auto-join multicast groups is the dialed address is
one. Multicast properties such as time to live (hops) and loopback can
be configured. When joining multicast groups, the local
address/interface can be configured by 'IP@IFACE' format, with
'@IFACE' being optional.

Dialers will now auto-bind, so it can receive data as dialers are
expected to be bi-directional. One can manually specify the binding
address if there is such need.

Since datagrams must be read in their full size, otherwise the
remaining bits are dropped, expose next_datagram_size_query() in both
Efl.Net.Socket.Udp and Efl.Net.Server.Udp.Client.

To finalize UDP for real we need to introduce an 'Efl_Net_Ip_Address'
structure to serve as both IPv4 and IPv6 and expose 'sendto()' and
'recvfrom()'. These will come later as this commit is already too big.
2016-10-25 10:11:48 -02:00
Gustavo Sverzut Barbieri b71a7a6a58 efl_* examples: improve usability of boolean options.
Instead of using 'bool', which requires a parameter to be useful, make
them toggle of the default value.

Adapt names to make more sense in that context.
2016-10-22 11:55:45 -02:00
Gustavo Sverzut Barbieri 38502d2df4 efl_net_*_udp: expose SO_DONTROUTE.
It's common to have protocols that are restricted to local network
only, thus allow exposing SO_DONTROUTE to avoid mistakes.
2016-10-22 11:46:19 -02:00
Gustavo Sverzut Barbieri c7fc1dce01 efl_io_copier: add inactivity_timeout.
This is handful to error the copier with ETIMEDOUT if there are no
reads or writes in the given amount of time.

Since copiers are usable to download data or handle network clients,
it's easy to set a timeout and disconnect, let's say UDP clients that
are gone.
2016-10-22 10:52:22 -02:00
Gustavo Sverzut Barbieri 787c745520 efl_net_server_udp: initial UDP server.
This is the initial UDP server that works similarly to the TCP one,
however under the hood it's widely different since the socket is
reused for all "clients", thus needs a new Efl.Net.Server.Udp.Client
(Efl.Net.Socket) as Efl.Net.Socket.Udp exposes the fd and options such
as 'cork', which would interfere in other clients.

The main socket will read the packets and find an existing client to
feed it. If no client exists, then it will create one if not overr
limit. Since there is no kernel-queuing as done by listen()/accept(),
the 'no reject' case will just accept the client anyway.

Next commits will improve UDP server handling with some advanced
features:

 - join multicast groups
 - bind to a specific interface (SO_BINDTODEVICE)
 - block packets going out of local network (SO_DONTROUTE)
 - specify priorities (SO_PRIORITY)
2016-10-21 13:33:27 -02:00
Gustavo Sverzut Barbieri dd1c574b86 efl_net_dialer_udp_example: be more 'correct' using events to read/write.
instead of blindly reading and writing, which can lead to hangs due no
server, let's use can_read and can_write to do the operations, this
won't let us believe we can read when we can't.

it's also the recommended approach, so let's show that in the examples
so users don't copy&paste incorrect stuff :-)
2016-10-21 13:33:27 -02:00
Gustavo Sverzut Barbieri 696392f5c6 efl_net_server_example: improve error messages (show text). 2016-10-21 00:16:37 -02:00
Gustavo Sverzut Barbieri 134f01671a efl_net_server_tcp: allow IPv4 over IPv6 sockets.
Sometimes we want to handle both IPv4 and IPv6 in the same socket,
instead of spawning 2 servers, one for each protocol. That is achieved
by means of disabling IPV6_V6ONLY socket option, present in most
recent platforms.
2016-10-20 18:49:41 -02:00
Gustavo Sverzut Barbieri b36e2c65f6 efl_net_dialer_udp: "connect" to an UDP server to send and receive data.
Like existing ecore_con code, this does not use SOCKSv5 UDP
proxy. It's kinda cumbersome to add since requires a keep alive TCP
connection to the server, a second UDP channel and framing around the
original UDP frame.

Added UDP_CORK (if present) to match TCP_UDP present in TCP sockets,
this allows one to execute multiple write() calls that will result in
a single datagram, generated when CORK becomes FALSE again.

The efl_io_copier_example.c now accepts this as output. There is no
input UDP as there is no way to notify the server of a connection
(since such thing doesn't exit), usually servers react after a
datagram is received, replying to the source.
2016-10-18 19:04:00 -02:00
Stefan Schmidt 1900d09300 examples: eolian_cxx: adapt code generation to changed eolian_gen commandline
The commandline options have changed for eolian_gen to generate the code. Adapt
the makefile helpers to fix the build break in examples
2016-10-14 12:38:46 +02:00
Jean-Philippe Andre 2767152140 evas: Move clip_unset to legacy, remove group_clip
Similarly to group_color_set, group_clip_[un]set should not
exist and should be a result of efl_super and inheritance.

This patch also removes clip_unset from the EO API and keeps
only clip_set(NULL). The reason is that it will avoid bad overrides
of clip_unset() vs. clip_unset(NULL). This also simplifies the code
a bit. Ideally we should be able to reintroduce clip_unset in EO
if we can have a "@final" tag (like java's final keyword), to
prevent overrides.
2016-10-12 11:25:56 +09:00
Guilherme Iscaro f8c98fe158 Eet example: Add the correct variable in the hash. 2016-10-10 14:20:48 -03:00
Subhransu Mohanty 9fc443aafe evas/vg: renamed the legacy vg shape apis
Reviewers: Hermet, cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4284
2016-10-05 11:07:12 +09:00
Bruno Dilly 3f730b47f9 examples/ecore: add example suffix to ecore_evas_vnc
Make its name similar to all the other example
files on this folder.
2016-09-28 14:42:58 -03:00
Stefan Schmidt 1bbd108ccb examples: emotion: fix event naming after convert to EFL Canvas Object
In commit 7b90e1147442d6a8023422400bffd77e2815fe0b the event names changed
but examples have not been updated.
2016-09-22 11:43:34 +02:00
Hermet Park ed0c9fd123 edje example: fix broken batman svg resource.
correct missing '/' at the end of svg tag.
2016-09-19 23:40:14 +09:00
Gustavo Sverzut Barbieri 388ec0fb62 efl_io and efl_net examples: fix O_CLOEXEC on windows.
use the efl_io_closer_close_on_exec_set() to use a simple boolean
instead of a flag that may be undefined on some platforms, such as
windows.
2016-09-16 07:42:24 -03:00
Gustavo Sverzut Barbieri 349b106125 efl_io_closer: add close_on_exec and close_on_destructor properties.
the purpose of these properties are to make it more uniform the
handling of these auto-close behavior.
2016-09-12 13:18:28 -03:00
Cedric BAIL d959ed3686 eio: finish port to new efl_io_manager API. 2016-09-09 16:22:55 -07:00
Cedric BAIL 13b5e221ce ecore: shutup unused arguments warning. 2016-09-09 16:22:55 -07:00
Jean-Philippe Andre 6aa5609208 evas: Switch EO APIs to Eina_Slice for gfx buffers (map)
This adds a plane and eina slice argument to the map/unmap
functions, instead of void_ptr + length.
2016-09-06 16:54:53 +09:00
Tom Hacohen b00564d698 Rename efl_self to efl_added
It has been discussed on the ML (thread: "[RFC] rename efl_self") and
IRC, and has been decided we should rename it to this in order to avoid
confusion with the already established meaning of self which is very
similar to what we were using it for, but didn't have complete overlap.

Kudos to Marcel Hollerbach for initiating the discussion and
fighting for it until he convinced a significant mass. :)

This commit breaks API, and depending on compiler potentially ABI.

@feature
2016-09-05 16:59:56 +01:00
Gustavo Sverzut Barbieri 394b9411ce efl_net_dialer_websocket: EFL now does WebSocket!
The Efl.Net.Dialer.Websocket is just like other Efl.Net.Dialers: you
can dial, you can close, monitor connected/address resolved and so
on. And you can use WebSocket primitives and events such as
text_send(), binary_send(), ping() and close_request() (since
WebSockets use a close process where you should state a close
reason). See efl_net_dialer_websocket_example.c

Even if WebSocket is a message-based protocol (like "packets" from
UDP), you can use efl_net_dialer_websocket_streaming_mode_set() to
tell it to handle text or binary messages as a stream. Then all the
Efl.Io.Reader and Efl.Io.Writer APIs work as expected, see
efl_io_copier_example.c updates.
2016-09-02 00:08:50 -03:00
Jean-Philippe Andre e6f6b94ccc evas events: Fix axis input values
This adds support for distance, pressure, tilt and twist.
Not entirely sure if normalized & raw (x,y) should be exposed
in the eo interface. Also not sure what to do with tilt_x/y
(as used by libinput) or touch/tool width "major/minor" vs.
radius x/y.

Add debug logs in the example, including the distance.
I can't test most of these values due to a lack of compatible
hardware, but the most basic features seem to work :)
2016-09-01 11:57:43 +09: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
Jean-Philippe Andre 2fc0d8ef41 evas3d examples: Add EFL_EO_API_SUPPORT where needed
I might have broken this in a previous commit in evas headers,
but the thing is that beta does not imply eo api, so both are
still required.
2016-08-26 11:44:11 +09:00
Gustavo Sverzut Barbieri cfe460c69a efl_io_queue_example: use eina_slice_endswith().
make the code more readable and clear. Also document when the line may
miss a trailing line delimiter in the slice.
2016-08-23 21:30:18 -03:00
Gustavo Sverzut Barbieri 8c23ab0685 efl_io_queue: basic class to interact with Efl.Io interfaces.
The use of low-level interfaces such as Efl.Io.Reader and
Efl.Io.Writer are not that user-friendly as they can handle partial
data.

Classes such as Efl.Io.Copier makes them easy to use, but they need a
reader (source) or writer (destination) and in our examples we used
fixed buffers or some existing streams (stdin/stdout/stderr,
networking...).

However, if interactively we need to produce some data to be sent,
such as implementing some networking protocols, we'd have to write our
own Efl.Io.Reader and Efl.Io.Writer classes to handle the buffering.

Not anymore! With Efl.Io.Queue you can write stuff to it and it will
buffer to memory. Once stuff is read, it will automatically remove
those bytes from buffer.
2016-08-23 20:17:13 -03:00
Gustavo Sverzut Barbieri 06983d8673 efl_io_copier_example: set loop as parent for Efl.Net.Dialer.Tcp
although it was working, the correct way is to set a loop provider as
Efl.Net.Dialer.Tcp object.
2016-08-23 20:17:13 -03:00
Gustavo Sverzut Barbieri c4d09a7a34 examples: add efl_io_copier_simple_example.c
a simpler example to be listed in wiki.
2016-08-23 12:05:37 -03:00
Gustavo Sverzut Barbieri fdad382158 fixup: http 2016-08-22 19:24:13 -03:00
Gustavo Sverzut Barbieri f33bab2648 fixup: http 2016-08-22 18:51:38 -03:00
Gustavo Sverzut Barbieri fe07b8cdab WIP: efl.net: Introduce Efl.Net.Dialer.Http
This class implements the Efl.Net.Dialer interface using libcurl to
perform HTTP requests. That means it's an Efl.Net.Dialer,
Efl.Net.Socket, Efl.Io.Reader, Efl.Io.Writer and Efl.Io.Closer, thus
being usable with Efl.Io.Copier as demonstrated in the
efl_io_copier_example.c
2016-08-22 18:25:15 -03:00
Gustavo Sverzut Barbieri b0b6757bc5 efl.net: socket, server and dialer for TCP.
Efl.Net.Server defines how to accept new connections, doing the
bind(), listen() and accept() for protocols such as TCP.

Efl.Net.Dialer defines to to reach a server.

Both are based on Efl.Net.Socket as communication interface that is
based on Efl.Io.Reader, Efl.Io.Writer and Efl.Io.Closer, thus being
usable with code such as Efl.Io.Copier.

The Server will emit an event "client,add" with the established
Socket, which is a child and can be closed by both the server or the
user.

The Dialer extends the Socket and allows for creating one given an
address, that will be resolved and connected.

TCP is the initial implementation so we an validate the
interfaces. UDP, Unix-Local and SSL will come later as derivate
classes.

The examples are documented and should cover the basic principles:

 - efl_io_copier_example can accept "tcp://IP:PORT" and will work as a
   "netcat", can send data from socket, file or stdin to a socket,
   file, stdout or stderr.

 - efl_net_server_example listens for connections and can either reply
   "Hello World!" and take some data or work as an echo-server,
   looping back all received data to the user.

More complex interactions that require a "chat" between client and
server will be covered with new classes later, such as a queue that
empties itself once data is read.
2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri d0f0bd20a0 efl.io: introduce basic interfaces and classes.
These interfaces allows generic operations on objects that can store
or provide data, such as a file or a buffer.

With well defined interfaces and events we can create code such as
Efl.Io.Copier, that will link a source with a destination and
progressively copy data as they appear.
2016-08-22 18:25:14 -03:00
Lauro Moura 4d2bcc8304 eolian_cxx: Fix behavior with explicit void return
Only perform the single value/return type substitution on properties if the
void return type is implicit (i.e. NULL return from function_return_type_get),
following the eolian-C implementation as we use the generated headers.

Also update example after Eo-Efl changes.
2016-08-17 20:54:27 -03: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
Jean-Philippe Andre 7b00751c16 examples: Fix button theme
A program was not handling the various states properly.
2016-08-08 20:41:51 +09:00
Jean-Philippe Andre da21656ee2 examples: Fix path to edj theme files (theme examples)
A bit complex but should work in most cases (installed & not)
2016-08-08 18:15:53 +09:00
jinwoo.shin 2af4b3ffca Fix memory leak issue on genlist_example_02
Summary: The realized items list should be freed by either eina_list_free() or EINA_LIST_FREE when it is no longer needed

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: minkyu

Differential Revision: https://phab.enlightenment.org/D4193
2016-07-29 11:08:09 +09:00
Subhransu Mohanty 4f4def2776 example/edje: updated vg example with interpolation usecase
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4191
2016-07-26 14:19:59 +09:00
Subhransu Mohanty 5d0de920de example/evas: update evas vg example.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4189
2016-07-26 14:19:59 +09:00
Jean-Philippe Andre cd960b436a evas: Add a textblock to the image proxy example
This is to show that proxies can proxy more than just other
images, and also this was done to test D4159 (alternatively
changed into the previous commit).
2016-07-19 14:43:45 +09:00
Stefan Schmidt 80f1366ebe examples: edje: remove executable bit from svg files
These are plain data files, no need for an executable bit here.
2016-07-07 14:22:54 +02:00
Subhransu Mohanty dce2f75dd8 svg/example: updated svg example with gradient svg files
Reviewers: cedric, Hermet, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4139
2016-07-07 11:52:37 +09:00
Jean-Philippe Andre fe898ab879 evas: Add 2 EO examples for maps
Those are copy & paste & eo-ified versions of the legacy
samples. I did not touch the other legacy APIs, only maps.
2016-06-29 10:38:31 +09:00
Hermet Park 3c24d6709f edje/example: add a missing closing bracket in svg. 2016-06-25 12:37:59 +09:00
Subhransu Mohanty 3fe9e370a7 svg/example: upload the correct svg file
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4088
2016-06-24 15:16:03 +09:00
Stefan Schmidt 08e5923015 examples: emotion: make sure all callbacks are actually setup
In commit 3340745c65ef8b8361dc6eff5e746f7ce1104378 the callback array got
removed letting all callback functions around as unused. Somehow the setup
of all these callbacks have gone missing over various refactors.
2016-06-23 14:07:29 +02:00
Subhransu Mohanty 38e61dfe2c svg/example: fixed typo in svg file name
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4076
2016-06-23 17:44:37 +09:00
Stefan Schmidt eceaf0d484 examples: elementary: remove unused variable
If we are not using something we should not keep it in the code base.
Git history has it all.
2016-06-23 10:34:27 +02: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
Oleksandr Shcherbina 4a4562c344 examples: evas3d: fix out of range array
Missing parenthesis have been leading to an out of bound access here.

Summary: @fix

Reviewers: stefan_schmidt

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4069
2016-06-21 17:43:34 +02:00
Stefan Schmidt 1361ad413a examples: evas: put define into config_h guards to avoid redefinition
evas-images5.c:19:0: warning: "EFL_BETA_API_SUPPORT" redefined
 #define EFL_BETA_API_SUPPORT
 ^
 In file included from evas-images5.c:14:0:
 ../../../config.h:360:0: note: this is the location of the previous definition
  #define EFL_BETA_API_SUPPORT 1

We should only define it when we are not using config.h
2016-06-21 17:07:13 +02:00
Stefan Schmidt 8c6216d7d9 examples: evas3d: uniform use of config.h include or manual defines
My recent removal of the EFL_EO_API_SUPPORT define brought some trouble to the
evas 3d examples. The problem was that there was no uniform usage of including
config.h and thus it worked fine in some constellations abut not in others. This
patch should fix the known problems and brings back EFL_EO_API_SUPPORT until we
are removing it from the whole code base.
2016-06-21 17:07:13 +02:00
Stefan Schmidt dcb514f639 examples: edje: rename new svg test file to its correct name
The code does reference a bojo.svg file so does the build system. Rename
bozo.svg to its correct name.
2016-06-21 10:58:54 +02:00
Subhransu Mohanty 0d4216d4de edje/example: Added example for testing vector part with svg images.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4062
2016-06-21 14:42:28 +09:00
Jean-Philippe Andre 3e3b78ce99 evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Jean-Philippe Andre 983e2547e0 examples: Fix misuse of evas image api on canvas 3d
image_size_set is for legacy images
2016-06-21 10:17:02 +09: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 6d2b1fd79b examples: eldbus and elementary: fix build after efl model changes
In commit 8e4f383d61188020d5ceeee691fd7df761f10202 the function signature
changed but examples have not been build and fixed.
2016-06-17 12:35:06 +02:00
Jean-Philippe Andre 4d813f6dbf examples: Fix compilation (use legacy func)
name has been removed (it's part of EO).
2016-06-17 19:32:44 +09:00
Jean-Philippe Andre 855a001aa5 Evas: Rename object focus to key_focus
The evas focus concept is valid and applies only to the
keyboard inputs.
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre 807e41e92f Evas: Mark type as legacy and protected
Only set() is allowed for EO, and it's a constructor,
protected function. Unfortunately, this means a lot
of #define EVAS_OBJECT_PROTECTED
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre 52f5e0607b examples: Use EO_CALLBACKS_ARRAY_DEFINE in all examples
Again, for Windows.
2016-06-16 13:10:35 +09:00
Luciana Magno de Almeida cd360835ea elementary-cxx: Fix compilation of some C++ examples 2016-06-15 15:50:04 -03:00
Stefan Schmidt 194965ba6a examples: evas-3d: these three examples still need EFL_EO_API_SUPPORT as well
EFL_CANVAS_RECTANGLE_CLASS is needed here which is still covered by the EO_API
define.
2016-06-15 11:29:28 +02:00
Stefan Schmidt 1c919e93a5 examples: remove now longer needed EFL_EO_API_SUPPORT define in canvas3d and vg
These examples already had the BETA flag defined so we just need to remove the
EO_API one.
2016-06-14 16:39:03 +02:00
Shinwoo Kim 6978d707d6 Ecore_Input: define data type for joysticks
Summary: This adds support for joysticks for ecore_input

Reviewers: cedric, devilhorns, Sergeant_Whitespace, raster, thiepha, zmike, jpeg

Reviewed By: thiepha, zmike, jpeg

Subscribers: thiepha, stefan_schmidt, zmike, singh.amitesh, Sergeant_Whitespace, jgerecke, cedric, seoz

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D1538
2016-06-13 20:33:29 +09:00
Jean-Philippe Andre 1fa1f82f73 Evas: Rename Evas.Image into Efl.Canvas.Image.Internal
Make it abstract.
And add Evas.Image as a legacy-only class.
2016-06-10 13:21:20 +09:00
Jean-Philippe Andre 2dce6080c3 Evas/Edje/Elm: Use combined_min instead of min everywhere
This allows apps to set the objects min size with hint_min,
while letting the rest of EFL define the minimum size with
rstricted_min.

I don't like the property names much...
2016-06-09 16:37:49 +09: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
Felipe Magno de Almeida e3081e2e50 eolian-cxx: Rewrite to accomodate new features of the C++ binding 2016-06-06 02:54:36 -03:00
Larry Jr 51f1fb705a eio: Add mime_type property in Eio_Model 2016-06-05 22:08:06 -03:00
Felipe Magno de Almeida ef9436d86e eina: Remove Eina_Promise* parameter to callbacks to promises in examples 2016-06-03 20:03:13 -03:00
Felipe Magno de Almeida 26186410a3 eina: Fix examples using new Eina_Promise semantics 2016-06-03 17:22:18 -03:00
Jaehwan Kim 1afb0c8050 examples: elementary: fix the wrong spell in comment. 2016-06-03 10:34:25 +09:00
Jean-Philippe Andre 1c067e4430 Evas: Rename Evas.Rectangle as Efl.Canvas.Rectangle 2016-06-02 18:57:30 +09:00
Tom Hacohen 250be1e27a Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba788ec834c5608361c0834853f2d5d7.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
Subhransu Mohanty 712af11641 evas: updated evas_vg_sample with the appen_arc() api as well as _shape_dup() api test.
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-05-31 14:59:26 -07: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
Stefan Schmidt 126d2b6e99 examples: emotion: adapt to name change from obj to object
In commit 75a53ece1007d927b8f0b6c5d3f269726afb9108 obj was changed to object.
As one can claerly see though make examples have not been run to verify this
change. Catch up in examples with this rename.
2016-05-19 09:19:06 +02:00
Felipe Magno de Almeida acbc6dd529 js fixes 2016-05-18 17:52:47 +02:00
Cedric Bail 6fc198c95a eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Stefan Schmidt d6222ea369 examples: elementary: remove unused variable 2016-05-18 12:31:52 +02:00
Stefan Schmidt 9235c4cb1a examples: evas: remove unused variable
pi is never used here. Actually for such cases we should use M_PI anyway.
2016-05-18 12:29:06 +02:00
Tom Hacohen 1aee2b602a Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00
Stefan Schmidt 83e336e0f4 examples: eolian_cxx: fix some problems after changing the colourable namespace
Fix commit 3e8db298f70932ce7b2f5296d44b262a615ea87c the namepsace changed but
only a few files have  been fixed for this. Many files did still not compile
with make examples. I fixed some more but stopped at the cxx files with the hope
that the original author would actually do this.
2016-05-10 11:10:24 +02:00
Stefan Schmidt ef4a4bc0f6 examples: evas-3d: fix executable name for evas 3d fog example
This list contains the executable names and not the source file names.
2016-05-10 10:00:42 +02:00
Cedric BAIL 6d84d5f97f efl: everyone should now rely on Eina MIN/MAX redefinition. 2016-05-09 16:58:53 -07:00
Felipe Magno de Almeida 47afc12f78 eolian-cxx: Disable example and fix new naming standard
Fixed naming standard in some tests and disabled the callback test
while Ecore Eo API is still rapidly changing
2016-05-08 12:19:48 -03:00
Felipe Magno de Almeida 19bbc79829 evas: Disabled C++ example while Eo API is still rapidly changing 2016-05-08 12:02:39 -03:00
Larry Jr b37ad2b589 Efl, Eio, Eldbus, Elementary: new model API use eina_promise
Efl - efl_model_base changed to use eina_promise
Eio - eio_model use efl_model_base with promise
Eldbus - elddbus models use promise now
Elementary - elm_view_list and elm_view_form use new models with promise

updated all related examples and tests
2016-04-29 13:21:24 -03:00
Oleksandr Shcherbina 4b8bfe543e evas: update evas-3d-shadow example
Summary: Add possibility turn on/off rendering scene with/without post processing

Reviewers: cedric, raster, Hermet

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-15 11:20:14 -07:00
Oleksandr Shcherbina efe419f31c evas.canvas3d: Change shade_mode to shader_mode
Summary:
enum Evas.Canvas3D.Shade_Mode are using for choose relevant shader source code.
So renaming have a sence.
Rename evas_canvas3d_shade_mode_set/get property to evas_canvas3d_shader_mode_set/get
Rename internal fields and functions

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3882
2016-04-14 20:28:20 +09:00
Amitesh Singh 9686393885 example: eina log - set eina log levels in examples 2016-04-13 15:29:29 +05:30
Tom Hacohen 8a66cff035 Eo event: rename Eo_Event->event_info to Eo_Event->info.
The previous naming was redundant and too long.
2016-04-12 15:23:55 +01:00
Cedric BAIL c3758534e6 elementary: restore examples build. 2016-04-08 16:01:07 -07:00
Yeshwanth Reddivari eaa5e65d48 Interface: Flip and orientation interface
Summary:
Added flip and orientation interface and used them in evas_image.
Removed efl_image_orientation_set API and used efl_orientation_set and efl_flip_set API.
In implementation part, converted enums back and forth in order to keep current implementation as it is.

Test Plan: src/examples/evas/evas-images5.c

Reviewers: singh.amitesh, raster, tasn, herdsman, woohyun, cedric, felipealmeida, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3844
2016-04-06 10:46:39 +09:00
Daniel Zaoui 97806b0a3f Examples: remind Tom to compile before pushing
He will spank me for the commit message!!!
2016-03-29 09:49:52 +03:00
Jean-Philippe Andre 0a2d68c288 examples: Fix evas_canvas3d_proxy (temporary solution)
It was broken after all the changes in Evas.Image.
Since buffer map/unmap is not fully completed (GL support is
still to do), I added a quick #ifdef to switch between EO and
Legacy APIs.

Thanks @jackdanielz for the report.
2016-03-29 15:19:55 +09:00
Tom Hacohen 00e0cee670 Merge Elementary into the EFL
Some things may still be broken, but Cedric will progressively fix
things as they pop. Default configuration works as expected.
2016-03-24 18:50:47 +00:00
Cedric BAIL 83ad67f514 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00
Stefan Schmidt 319ab3be61 examples: mark unused argument to avoid warning 2016-03-23 15:34:54 +01:00
Oleksandr Shcherbina f802f50a95 evas.canvas3d: fix wrong output in evas-3d-pick example
Summary:
Since that
https://git.enlightenment.org/core/efl.git/commit/?id=c850cc0d80b754be851576083eba27a72b58b9f2
we don't use scene object for recalculation pick coordinates.
@fix

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-03-18 11:55:07 -07:00
Jean-Philippe Andre c109f6d22e Efl.Gfx.Fill: Rename filled to fill_auto
fill_filled is a strange name for the property.
fill_auto seems to make more sense. If you disagree, scream at
me or revert this commit.
2016-03-18 13:28:45 +09:00
Oleksandr Shcherbina ce17f39669 evas.canvas3d: example using static LOD
Summary:
Example using static LOD in evas.canvas3d
It should be applied after D3731

Reviewers: Hermet, raster, cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-17 11:53:26 -07:00
Jean-Philippe Andre cd10b5093f Evas.Image: Create Efl.Canvas.Image for file & data images
This replaces standard Evas_Object_Image when it is used "normally",
ie. it's an image from a file or from a pixel buffer. All other APIs
(proxy, snapshot, 3d, gl, ...) are disabled on this object.

Also, reduce number of failing calls when the object is not a legacy
object, but a legacy function is called. This is because a lot of
image APIs are called internally using the legacy APIs, often in
order to reset the state of the image object (eg. set file to NULL,
etc...)
2016-03-17 13:10:35 +09:00
Tom Hacohen 6b4d54df87 Change the EFL according to the renaming of the eo_add() current object. 2016-03-15 15:25:54 +00:00
Jean-Philippe Andre 29b645ea26 Examples: Update evas object eo example 2016-03-15 11:11:59 +09:00
Jean-Philippe Andre c01a10c331 Evas: Move 3d to Efl.Canvas.Scene3d
This still seems a bit redondant with the underlying
Evas.Canvas3d.Scene class.
2016-03-15 11:11:59 +09:00
Tom Hacohen fdb1a24ea0 Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757b6332306264d7f126b15ba7bfd37d4.
2016-03-11 12:29:03 +00:00
Tom Hacohen d83c540ada Revert "Examples: Update according to recent eo_add changes."
This reverts commit 6594ba0b6df9ba72f031a00d0e8ba3b23cf2c0b2.
2016-03-11 12:29:03 +00:00
Tom Hacohen daa9ef817c Revert "Fix examples according to the recent eo event changes."
This reverts commit d2fba6c5959f82f35984167131d3b67207780f48.
2016-03-11 12:29:03 +00:00
Tom Hacohen 148e6d13e8 Fix examples according to the recent eo event changes. 2016-03-09 17:16:19 +00:00
Tom Hacohen fb11959f82 Examples: Update according to recent eo_add changes. 2016-03-09 17:02:45 +00:00
Tom Hacohen 6a210da20c Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Stefan Schmidt 0dcde7d3ea evas-3d examples: remove unused variables 2016-03-08 11:06:29 +01:00
Vitor Sousa f93800fa31 eolian-cxx: Fix Eolian C++ constructing methods with new eo_add
Also fix Eolian C++ examples using the new "eo_super".
2016-03-03 16:05:40 -03:00
Tom Hacohen bf73a1b51f Fix migration script mistakes and compilation warnings.
Mostly unused vars following the removal of eo_do_ret().
However, there are some cases where the migration script got some things
wrong, and I had to manually fix them.
2016-03-03 09:58:08 +00:00
Tom Hacohen 9cdd16035a Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Tom Hacohen 4350f85b02 Manually semi-migrate files in preparation for the script
The migration scripts breaks with some weird cases, here I manually
migrated some parts, and just removed the eo_do from others without
actually migrating (so I could deal with that later).
2016-03-03 09:56:20 +00:00
Tom Hacohen b2b3667513 Eo callbacks: Migrate all of the EFL to the new event cb signatures. 2016-02-29 11:33:27 +00:00
Jean-Philippe Andre d3acbe4f19 Evas 3d example: Print message for usage 2016-01-14 12:18:53 +09:00
perepelits.m ad374bd738 Evas: fix example for convex hull
Summary: Made new models with no normal component to print
сorrect print message for testing not only by visual result.

Reviewers: cedric, raster, Hermet

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D3562
2016-01-14 12:08:33 +09:00
Srivardhan Hebbar ed1954e6bb emile: Added example program for base64 encoding and decoding.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3554
2016-01-14 11:28:40 +09:00
Oleksandr Shcherbina 8795600c71 evas: fix resource file for billboard in evas-3d-shadow example
Summary: Due to evas.canvas3d shader flips resource image.

Reviewers: cedric, Hermet

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-12 14:05:34 -08:00
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
perepelits.m 9e117866b8 evas: fix ply example after adding of new savers and loaders.
Summary:
Before adding of new saver and loader for ply format we had a chance to set EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR
for every mesh, now we save only existing atributes and there are a lot of meshes we have to set EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR.

[FIX]

Reviewers: cedric, raster, Hermet

Subscribers: jpeg, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 12:31:23 -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
Shinwoo Kim bea1243e98 edje example: change wrong comment, and remove warning message by adding ellipsis
Summary: Enhance edje color class example

Test Plan: build using the comment message

Reviewers: raster, cedric, jpeg

Reviewed By: jpeg

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D3508
2015-12-31 12:37:49 +09:00
Jean-Philippe Andre aac53d3782 Evas examples: Fix examples data dir for out-of-tree builds
This is a quick fix to make out-of-tree builds of the examples
work fine. Don't pass "." as teh resource dir root, instead
pass the path to the source files' folder.
2015-12-18 16:48:34 +09:00
perepelits.m 13f9d38f13 Evas 3d: Add example for convex hull
Summary: This example is a testing example for comparison convex
hulls built by our algorithm and in Blender.

Reviewers: raster, Hermet, cedric, jpeg, perepelits.m

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D3336
2015-12-18 16:48:15 +09:00
Jean-Philippe Andre 3abf0425de Examples: Remove strange characters at beginning of file 2015-12-15 15:05:06 +09:00
Vincent Torri 64371bd42f Examples, Evas: remove MAX_PATH, which is already defined on Windows, and not used in this example
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3442
2015-12-15 15:05:06 +09:00
Vincent Torri 81244e1785 Example, Ecore: fix compilation on Windows
Summary:
The socket API is different on Windows and on Linux.

This is the perfect example where we need to abstract the socket API in Eina :
1) to avoid all these includes specific to sockets
2) to avoid on Windows undefined behavior : close(socket); is undefined behavior if socket is indeed a socket

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D3441
2015-12-15 15:05:06 +09:00
Vincent Torri bc8ebb31c0 Examples Evas: 'far' and 'near' are Windows keywords, so rename them to far_ and near_
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3440
2015-12-15 15:05:06 +09:00
Larry 6c05bea472 eldbus: add eldbus.model examples
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-10 12:02:30 -08: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
Vincent Torri d032abcdd4 efl: add binary mode to open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:06:04 +01:00
Subhransu Mohanty cd31e7e9bd efl: change efl_gfx_shape_cubic_to() api signature to follow other API (cairo and freetype).
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-30 15:59:49 -08:00
Stefan Schmidt f5f5b56404 examples ecore_buffer: correct argument order for calloc()
calloc() expects count first and the actual size to allocate as second
argument. Say Thank You to smatch for finding this issues for us.
2015-11-30 16:31:58 +01:00
JinsolPark 92f8f75830 eolian: fix eo makefile example of --eo option.
Summary: eolian: fix eo makefile example of --eo option.

Reviewers: cedric, q66

Reviewed By: q66

Subscribers: jpeg, q66

Differential Revision: https://phab.enlightenment.org/D3389
2015-11-30 10:37:10 +00:00
Daniel Hirt f81fc8b263 Edje: Add example for hyphenation style
A small example how hyphenation is set as a style in TEXTBLOCK parts.
2015-11-24 14:31:29 +02:00