Commit Graph

678 Commits

Author SHA1 Message Date
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
Stefan Schmidt 21f182567a examples: elementary: fix build for cxx examples needing ecore_cxx includes
The elementary cxx examples now need Ecore_Manual.hh from the cxx bindings.
Make sure we setup the include paths accordingly.
2016-09-12 10:21:47 +02:00
Cedric BAIL fca20d5579 eio: finish port to new efl_io_manager API. 2016-09-09 16:22:55 -07:00
Cedric BAIL 085adca305 ecore: shutup unused arguments warning. 2016-09-09 16:22:55 -07:00
Stefan Schmidt 6023143b78 examples: elementary: ignore generated codegen example files 2016-09-08 22:51:03 +02:00
Jean-Philippe Andre 8ee431572d 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 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
Jean-Philippe Andre b675571bd8 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 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
Jean-Philippe Andre 5fc5cff03e 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 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
Carsten Haitzler 561f8eaa8f efreet - save about 240-300k or so of memory used by efreet mime
so efreet mime was loading a bunch of mime type info files, parsing
them on startup and allocating memory to store all this mime info -
globs, mimetype strings and more. all a big waste of memory as its
allocated on the heap per process where its the SAME data files loaded
every time.

so make an efreet mime cache file and a tool to create it from mime
files. mmap this file with all the hashes/strings in it so all that
data is mmaped once in memory and shared between all processes and it
is only paged in on demand - as actually read/needed so if your
process doesnt need to know about mime stuff.. it wont touch it anyway.

this saves about 240-300k or so of memory in my tests. this has not
covered the mime MAGIC files which still consume memory and are on the
heap. this is more complex so it will take more time to come up with a
nice file format for the data that is nicely mmaped etc.

@optimize
2016-08-23 12:04:06 +09: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
Lauro Moura 16986ffc7a 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
Stefan Schmidt 53b6ac1d3a examples: evas: ensure filter example lua files land in tarball
These are needed for a make doc run and have been missing the tarball before.

@fix
2016-08-17 16:43:32 +02: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
Stefan Schmidt 4e08a2e834 examples: elm: enable +evas3d_scene_on_button_example again
This was disabled at some point but works fien in my testing so enable it
again. If we no longer want it we should remove it completely.
2016-08-08 17:46:46 +02:00
Stefan Schmidt 4d8fd20902 build: examples: make sure we build all examples in list
At some point we lost the \ after track_example_01 and in combination with the
commented out line right afterwards we lost all examples coming after this line.

This just surfaced with JPs latest commit when I did a distcheck build but was
there for a longer time. We now make sure all disabled examples are moved out of
the multi-line list.
2016-08-08 17:20:50 +02:00
Jean-Philippe Andre 39166d3fbb examples: Fix button theme
A program was not handling the various states properly.
2016-08-08 20:41:51 +09:00
Jean-Philippe Andre 5c88499105 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
Jean-Philippe Andre fa779f81a4 examples: Compile edj files in elementary examples 2016-08-08 17:49:42 +09:00
jinwoo.shin c7c387b33a 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
Stefan Schmidt 8a933c28d5 examples: edje: make sure we handle the various corner cases for the po files
Delete the earlier copied files only. Handles out of tree and in tree builds.
2016-07-26 12:40:55 +02:00
Carsten Haitzler 3a77d5bc20 edje examples - when you cp also just assume success if same file
fix makefiles for examples.... more

@fix
2016-07-26 14:22:43 +09:00
Subhransu Mohanty 56398a2035 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 f38dbd39f5 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
Carsten Haitzler 6b68dd5712 edje examples - stop deleting the po files from the src tree!
whatever someones was trying to do.. they just endewd up deleting po
files in the src tree every time you clean! argh! fix!
2016-07-26 14:04:59 +09:00
Shinwoo Kim e2093f7886 Revert "access: add an example of elm_object_part_access_object_get"
This reverts commit f8aa67cd18.
2016-07-26 11:03:32 +09:00
Shinwoo Kim f8aa67cd18 access: add an example of elm_object_part_access_object_get 2016-07-26 10:40:57 +09:00
Stefan Schmidt 51f7a7c520 examples: elementary: make sure the prefs_example* files get into dist
These files have been missing from dist and thus some example builds failed.
We also need to clean them up afterwards now.
2016-07-25 18:00:42 +02:00
Stefan Schmidt 8ac236cff4 examples: edje: fix build of edje files with translation within distcheck
The edje text example covers the translation functionality which need the mo
and po files during edje_cc compilation. Further more the folder need to be
writable to create the new mo/po files.

We need to ensure that this is the case during a distcheck which is read only
on the source tree.
2016-07-25 18:00:42 +02:00
Jean-Philippe Andre 4923ae81c0 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 c7d8548863 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
Stefan Schmidt 7fd55fd6f3 examples: edje: make sure new svg files are packaged
In commit 0fc151cddc these new svg files have
been added but forgotten to be made part of DATA_FILES.
2016-07-07 14:22:54 +02:00
Subhransu Mohanty 0fc151cddc 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 ad3b460e6a examples: Fix typo in filename 2016-07-04 13:45:48 +09:00
Stefan Schmidt 61afb3360e examples: update various gitignore files for new example binaries
These have been forgotten to be added recently.
2016-06-30 18:15:44 +02:00
Jean-Philippe Andre 0706ae31b1 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 49dd03dbd4 edje/example: add a missing closing bracket in svg. 2016-06-25 12:37:59 +09:00
Subhransu Mohanty 3ce7aee940 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 9d4e46c0a7 examples: emotion: make sure all callbacks are actually setup
In commit 3340745c65 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