Commit Graph

306 Commits

Author SHA1 Message Date
Jean-Philippe Andre 81eb7a3f0b 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
Bryce Harrington 77e19c7194 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 bcf3ce8428 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
Cedric BAIL 91e87c5f05 ecore: use new API eina_file_close_on_exec in example too. 2017-04-18 16:57:36 -07:00
Shinwoo Kim 4f6873905b 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 bb83ff9094 ecore_evas: fix use of new VNC API in example. 2017-04-12 15:13:19 -07:00
Gustavo Sverzut Barbieri fa0e2865a1 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 17444557de 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 8f6e3265b6 ecore_ipc_client_example: win32 doesn't provide getline(). 2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri bfe2988f4d 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 eac53691f9 fix ecore con client exmaple to match cmdline help output for options 2017-03-29 16:49:03 +09:00
Carsten Haitzler feeff68401 fix ecore con server exmaple to match cmdline help output for options 2017-03-29 16:28:21 +09:00
Shinwoo Kim 32fbf64d28 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
Cedric BAIL 78bd2ea6f5 ecore_con: use the right type for prototype. 2017-01-06 15:58:46 -08:00
Guilherme Iscaro 87e458838d 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 c2aedc117a 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 dd5cdda64b 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 25a9e1d886 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
Gustavo Sverzut Barbieri 633ec445b8 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 21759f713a 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 e9a72ea8f4 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 72ad2c5eb7 ecore_con_server_example: add --socket-activated 2016-12-10 08:44:06 -02:00
Gustavo Sverzut Barbieri 2fab8462ce 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 f4f782eb20 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 7d1c7cff21 ecore_con_server_example: show client errors. 2016-12-08 16:00:01 -02:00
Gustavo Sverzut Barbieri a5dd6aa113 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 2d2dc4de4b 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 b38681f725 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
Gustavo Sverzut Barbieri d07e0c3072 examples/ecore: build ecore_con_url_ftp_example 2016-11-29 16:03:13 -02:00
Gustavo Sverzut Barbieri a4931f4fb0 ecore_con_url_headers_example: allow POST data. 2016-11-29 16:03:13 -02:00
Gustavo Sverzut Barbieri 167ff29ea0 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 46341b329d 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 3bc7c502db 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 f7f6847b5a 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 7b2faeadb1 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 b52a0151b7 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 06263c9eb3 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
Gustavo Sverzut Barbieri 2e3aa2cf6c 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 0c8c7ffacf 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 cc703b619d 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 ed48b8d93e 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 98fe627ca4 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 8687a23820 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
Guilherme Iscaro fc2a3052b4 VNC Example: Add support to Ecore_Evas FB engine. 2016-11-04 18:29:42 -02:00
Gustavo Sverzut Barbieri c2630c829f 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 3bc2793588 examples/ecore: add example / test for wayland multiseat 2016-11-01 16:06:19 -02:00
Gustavo Sverzut Barbieri 15a0ca0fb9 examples/ecore: command to generate OpenSSL PEM files.
it's cumbersome to remember these commands and without them it's hard
to test the SSL server examples, so add a make rule for that.
2016-11-01 11:52:21 -02:00
Gustavo Sverzut Barbieri 83457a52e2 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 a5ebf67a83 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 f4198f022a 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
Stefan Schmidt c3d1cb9116 examples: ecore: add ecore_evas_vnc example binary to .gitignore 2016-10-27 18:22:42 +02:00
Gustavo Sverzut Barbieri 84ec16cfa8 efl_io_copier_example: add AF_UNIX support. 2016-10-26 19:16:29 -02:00
Gustavo Sverzut Barbieri 651ff13616 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 06608f632e 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 6e6d43878b efl_net_dialer_udp_example: add missing print of groups. 2016-10-26 12:24:48 -02:00
Gustavo Sverzut Barbieri cd53f9bad2 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 285f5c09e7 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 26866ca2a8 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 5e54c3aa57 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 7493368e54 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 3cb15c17e0 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 6345a6e5f4 efl_net_server_example: improve error messages (show text). 2016-10-21 00:16:37 -02:00
Gustavo Sverzut Barbieri c873703c41 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 278866da2c 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
Bruno Dilly 8cb4a943ba 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
Bruno Dilly e2afcc0ab4 examples/ecore: fix vnc example build
Fix missing dependency.

Get rid of the following error:

/usr/bin/ld: ecore_evas_vnc.o: undefined reference
  to symbol 'ECORE_EVENT_MOUSE_BUTTON_UP'
src/lib/ecore_input/.libs/libecore_input.so.1: error adding symbols:
  DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:2306: recipe for target 'ecore_evas_vnc' failed
2016-09-28 14:42:58 -03:00
Guilherme Iscaro 03824e520e Examples: Add an Ecore Evas VNC example.
This commit adds an Ecore_Evas examples that can be used to test
the VNC multi-seat support.
2016-09-26 22:06:59 -03:00
Gustavo Sverzut Barbieri baa06ebf15 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 ea7bc821d5 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 085adca305 ecore: shutup unused arguments warning. 2016-09-09 16:22:55 -07:00
Tom Hacohen 9c779dca90 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 e12afd772c 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
Tom Hacohen d5e321466e 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
Gustavo Sverzut Barbieri 27d428a6e1 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 86e87b2fd9 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 a1526169e7 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 db46d4c1a3 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 24cb017626 fixup: http 2016-08-22 19:24:13 -03:00
Gustavo Sverzut Barbieri 5c778e2b15 fixup: http 2016-08-22 18:51:38 -03:00
Gustavo Sverzut Barbieri b791c79ca0 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 e7df1a7483 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 5d4688679e 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
Tom Hacohen e65aae994e 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 c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Tom Hacohen 6202cc7485 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
Shinwoo Kim f70be6eb28 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
Stefan Schmidt 2471d962ed examples: ecore: do not try to install files which are not available
The ecore_audio examples have been disabled and now do not compile right now.
But as they are disabled they never land in the tarball and thus we error out
with files not aviavle for install. Found by the OpenSUSE build service. Thanks
Simotek for reporting.

[ 2172s] /home/abuild/rpmbuild/BUILD/efl-1.17.99.47400/install-sh: ecore_audio_custom.c does not
exist.
2016-06-07 14:20:17 +02:00
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

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
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Stefan Schmidt d1a2f1c724 examples: ecore: add all needed files to SOURCES to make sure they are distributed
This worked in-tree but never landed in a distribution tarball and thus the
examples build form such a tarball would fail.
2016-05-18 12:17:16 +02:00
Tom Hacohen 546ff7bbba 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
Jean-Philippe Andre 6826ce1c6f Examples: Fix compilation (disable CXX examples!)
Warning: This disables CXX examples because they use
now-internal APIs that have no EO API binding.
Those examples should be updated to use Efl.Ui widgets... once
we have them.
2016-04-21 17:16:53 +09:00
Cedric BAIL fb759c7b90 examples: add DESTDIR support for install. 2016-04-14 17:00:08 -07:00
Tom Hacohen 8706d03b43 Change the EFL according to the renaming of the eo_add() current object. 2016-03-15 15:25:54 +00:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen f21ade6123 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 e71e6561ee Eo callbacks: Migrate all of the EFL to the new event cb signatures. 2016-02-29 11:33:27 +00:00
Vincent Torri 8f4834e12c 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 0497b9685c 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
Stefan Schmidt 384261978c 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
Srivardhan Hebbar 38bc948eff ecore_con: updating example with ecore_con_url_status_code_get function.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:21:02 -08:00
Srivardhan Hebbar 54b47a78eb ecore_con: preventing possible NULL pointer dereference.
Summary:
Checking if client is NULL before freeing is not of much use. If it is NULL, it would have crashed before when it was dereferenced in printf. So checking NULL before dereferencing.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-09 10:00:32 +02:00
Srivardhan Hebbar fc454e4670 ecore_example: fix file name in the example's comment.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, stefan_schmidt

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-23 12:43:23 -07:00
Srivardhan Hebbar c79d822f53 ecore_con: preventing possible NULL pointer dereference.
Summary:
Checking if client is NULL before freeing is not of much use. If it is NULL, it would have crashed before when it was dereferenced in printf. So checking NULL before dereferencing.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-23 12:42:22 -07:00
David Walter Seikel 14b2ba7bed ecore - let the ecore_con_eet_*.c examples build.
When using the --enable-always-build-examples configure option, these two
examples need to be linked to eet.

@fix
2015-09-11 14:19:36 +10:00
Srivardhan Hebbar 342db1ee38 ecore_example: Fixing NULL deference.
Summary:
pd was dereferenced and then checked for NULL. If it was NULL, the program would crash much before. So fixed that.

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

Reviewers: cedric, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3031
2015-09-07 13:30:48 +02:00
Srivardhan Hebbar e08a7d7c9d ecore_example: Fixing memory leak.
Summary:
Fixed a memory leak in this example.

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

Reviewers: cedric, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3010
2015-09-07 11:36:18 +02:00
Srivardhan Hebbar f69f34c538 ecore_example: Fixing NULL dereference.
Summary:
cd was dereferenced and then was checked for NULL. If cd is NULL, it would crash before itself. So checking for NULL before dereferencing cd.

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

Reviewers: cedric, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3009
2015-09-07 11:13:48 +02:00
Srivardhan Hebbar 240a275be0 ecore_example: Cleanup of ecore_compose_get_example.c
Summary:
Relating to D3010. This patch is code cleanup. Have done dos2unix. After this will update D3010 bug.

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

Reviewers: cedric, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3025
2015-09-07 11:00:20 +02:00
Jihoon Kim ac2b12b3d0 ecore_imf_example: remove unnecessary code to set client window 2015-08-20 16:11:24 +09:00
Stefan Schmidt 4666d805f7 examples/ecore_con: Mark some unused parameters as such 2015-07-23 17:18:04 +02:00
Jihoon Kim a3d68321b8 example: check NULL value in ecore imf example 2015-07-14 16:15:35 +09:00
Stefan Schmidt 1e2fd2be07 examples: Fix build after ecore_buffer commit.
Since 8b62177561 make examples fails to build
as the examples have been included without checking if ecore_buffer is
actually enabled to build.

make[2]: *** No rule to make target '../../../src/lib/ecore_buffer/libecore_buffer.la', needed by 'ecore_buffer_example'.  Stop.

I'm running make examples during the nightlies now in the hope to catch those.
2015-06-24 13:46:43 +02:00
Seunghun Lee 8b62177561 ecore-buffer: Add ecore_buffer library to EFL.
Summary:
Ecore_Buffer is abstraction of graphic buffer.
it supports backend of shm, x11_dri2 and x11_dri3 for now,
and this library also provides method to share buffers between processes.
Ecore_Buffer_Provider and Ecore_Buffer_Consumer is for this, sharing buffer.
provider draws something in to Ecore_Buffer, and consumer receives and displays it.
the binary, bq_mgr is a connection maker for buffer provider and consumer.
it can be included Enlightenment as a deamon later.

@feature

Test Plan:
1. Configure with --enable-ecore-buffer and --enable-always-build-examples to build examples.
2. Run bq_mgr, it connects consumer and provider.
3. Run ecore_buffer_provider_example and ecore_buffer_consumer_example

Reviewers: lsj119, gwanglim, cedric, zmike, jpeg, raster, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2197
2015-06-22 10:31:42 -04:00
Tom Hacohen 52d998f475 Eo base: Remove the free_func parameter from key_data_set.
This was not really useful and against the Eolian guidelines.
While I promised I won't break things until the 27th, I was ill
(still am), so I'm giving myself a 1 day pass. :P
2015-05-28 17:47:59 +01:00
Shinwoo Kim f372eb4b92 [ecore_evas_extn] add function to block mouse event.
Summary: add ecore_evas_extn_socket_events_block_set/get

Test Plan: add mouse event callback, and check whether it could get event or not

Reviewers: raster, woohyun, jaehwan, Sergeant_Whitespace

Reviewed By: Sergeant_Whitespace

Subscribers: Sergeant_Whitespace, seoz, cedric

Differential Revision: https://phab.enlightenment.org/D2268
2015-05-15 16:46:22 +09:00
Felipe Magno de Almeida 7a9bf994de Fix ecore_con_eet_client_example example compilation error
Added eet to include flags for Makefile.am for ecore examples
2015-04-23 22:20:16 -03:00
Cedric BAIL e866b42de5 ecore: build newly added Ecore_Con examples. 2015-04-22 15:10:20 +02:00
Srivardhan Hebbar 9919a428c6 ecore_con: example program for ecore_con_eet.
Summary:

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

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-22 15:10:20 +02:00
Srivardhan Hebbar d560fe99a1 ecore_con: fix ecore_con_lookup_example to actually exit when done.
Summary:
Without ecore_main_loop_quit the example won't end. So added that and as ecore_init is done in ecore_con_init removed that.

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

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-22 15:10:19 +02:00
Srivardhan Hebbar cf27288b50 ecore_con: add example for ftp upload.
Summary:
Added example for ftp upload. In the .gitignore only 2 files added which were missing. The differences it is showing is cos of reordering. I did ls and redirected the file to gitignore. So the files got reordered.

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

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-25 19:40:41 +01:00
Cedric BAIL 0914115586 emile: build examples after adding emile. 2015-03-17 09:58:19 +01:00
Avi Levin 92901e0939 examples: fix bad unref's in ecore and evas.
Summary:
recived Error that object already deleted in the following files:
In evas-object-manipulation-eo.c: d.clipper and d.bg where created with
eo_add ( 1 ref ) but where unrefd twice: once explicity and once when
d.ee were deleted.
In ecore_indler_example: ctxt->idler were again explicity unrefd and
again unrefd by ecore_shutdown.
@fix

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-06 20:19:22 +01:00
Stefan Schmidt c5879dab4d build: Unify use of $(MKDIR_P) for creating a dir within the build system
While we used different variation of mkdir -p all over we also had spots
where we did not use the option. This is one step in trying to make our
build system ready for parallel install. Using something like -j 10 even
for the install should help to speed up our jenkins jobs as well as distcheck.
2015-02-25 16:43:35 +01:00
Srivardhan Hebbar 59de60e60c ecore_con: remove code in examples that triggered warnings.
Summary:
When the examples were compiled they used to through the below warning
$ gcc -o ecore_con_client_simple_example ecore_con_client_simple_example.c `pkg-config --libs --cflags ecore ecore-con eina`
ecore_con_client_simple_example.c:11:0: warning: "EINA_UNUSED" redefined
 # define EINA_UNUSED
 ^
In file included from /usr/include/eina-1/Eina.h:215:0,
                 from /usr/include/ecore-1/Ecore.h:304,
                 from ecore_con_client_simple_example.c:5:
/usr/include/eina-1/eina/eina_types.h:112:0: note: this is the location of the previous definition
 #  define EINA_UNUSED __attribute__ ((__unused__))
 ^
So removed these defines as they are no longer required now.

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-03 14:30:27 +01:00
Tom Hacohen 6846978ebd Eo: Get rid of eo_add_custom.
We decided to deprecate this one in favour of setting thing in the
construction between the constructor and the finalizer.
2014-09-25 10:30:56 +01:00
Jihoon Kim 346c5ed484 Add example code of ecore_imf_context_bidi_direction_set in ecore_imf_example 2014-09-23 10:20:49 +09:00
WooHyun Jung 1f8353d8de examples: Change EINA_TRUE/FALSE to ECORE_CALLBACK_RENEW/CANCEL 2014-09-18 13:30:07 +09:00
Stefan Schmidt 82b2ed7a40 examples: Add latest example binaries to .gitignore
These are build and should be ignored by git.
2014-09-02 17:11:38 +02:00
Wonguk Jeong 171d9bc135 ecore: fix example build fail (ecore_compose_get_example) 2014-07-29 02:11:17 +02:00
Savio Sena 7e1f131286 examples: Removed compilation warnings. 2014-07-18 18:55:56 -03:00
Savio Sena 073b666022 autotools: Fixed 'make examples' and 'make examples-install'
It was broken in set-ups with ($(builddir) != $(srcdir)) && ($(builddir) !=
$(srcdir)/build)
2014-07-02 20:01:09 -03:00
Tom Hacohen 7ef3b0530d Ecore examples: Add ecore_compose_get() example.
Example created by Vincent Torri.
2014-06-30 17:42:58 +01:00
Vyacheslav Reutskiy 69552fc392 Ecore_Evas: add new API for unset the cursor from Ecore_Evas.
Summary:
Add ecore_evas_cursor_unset function.
Use the new function in the ecore_evas_object_example.

@feature

Test Plan: ecore_evas_object_example

Reviewers: raster, cedric, seoz, Hermet

CC: cedric

Differential Revision: https://phab.enlightenment.org/D812
2014-06-10 17:32:11 +09:00
Savio Sena 72ee78b929 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
WooHyun Jung e4f5c1d3f8 ecore/example: Modify the explanation of ecore evas extn plug example. 2014-05-09 13:34:38 +09:00
ChunEon Park 6904354fed ecore/example: --warning.
use scanf() return value for removing compiling warning.
2014-04-29 14:04:10 +09:00
Daniel Zaoui 03b99d58b2 Eo2: Fix other forgotten ret. 2014-04-11 05:02:54 +03:00
Tom Hacohen 374af9b9ca Eo: eo_base's data_*->key_data_*. 2014-04-10 04:20:21 +01:00
Stefan Schmidt 4e2e2ea01e 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
Daniel Juyung Seo 01a5585482 ecore_evas_object_example: Added cursor unset example. 2014-02-24 16:01:37 +09:00
Guillaume Friloux 4ec00f8edc Fix ecore_con example file to call shutdown functions.
Found by Chris Michael.
2014-01-15 20:42:50 +01:00
Vincent Torri 2ed4a0510a 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 c3d5ff9252 examples: fix pointer <-> int conversion (windows 64 bits) in ecore and evas examples.
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:36:39 +09:00
Vincent Torri c34578b5d1 example: fix uninitialized variable in ecore.
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:35:59 +09:00
Vincent Torri 6871f93e2f examples: remove unused param warnings
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:35:32 +09:00
Vincent Torri 15ca789692 ecore: use WIN32 API to port readdir_r in ecore thread example
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:35:18 +09:00
Vincent Torri a3f8ec0e0c autotools: really don't build Unix specific example on Windows
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:34:56 +09:00
Cedric BAIL 3ceaaa0c79 ecore: don't build Unix specific example on Windows. 2014-01-09 10:17:14 +09:00