Commit Graph

10033 Commits

Author SHA1 Message Date
Jean-Philippe Andre b2d92f2626 evas: Implement support for external buffers
This brings support for the eo api for external buffers (like
the old data_set / data_get). The new API now works with slices
and planes.

The internal code still relies on the old cs.data array for
YUV color conversion. This makes the code a little bit too
complex to my taste.

Tested with expedite for RGBA and YUV 422 601 planar, both
SW and GL engines (x11).
2016-09-06 16:55:00 +09:00
Jean-Philippe Andre 2f737e8f3b evas: Change internal function image_data_direct 2016-09-06 16:54:54 +09:00
Jean-Philippe Andre 69132b5c1d evas: Implement plane support for managed buffers 2016-09-06 16:54:54 +09: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
Jean-Philippe Andre 1773ba5d82 evas: Internally switch to Eina_Slice for buffers
This will be used for the gfx buffer map/unmap eo apis.
2016-09-06 16:54:53 +09:00
Jean-Philippe Andre d7b8d97fd5 evas events: Add "raw" x,y values for future extensions
For pen tablets, this exposes the values as given by the driver
(quite useless without knowledge of the device itself).

For mice, this exposes x,y as set by the display manager, without
any extra processing in terms of smoothing or prediction. IOW
this returns the same as x,y until a smoothing algorithm is
implemented (todo).
2016-09-06 16:54:53 +09:00
Hermet Park 7f22addf1c evas canvas: add missing brackets. 2016-09-06 16:52:56 +09:00
Hermet Park 51acb259a2 evas canvas: fix a wrong condition check in smart changed.
There were 2 wrong conditions.

1. visible check.
Smart changed can be skipped only if previous/current visibility are false.

2. clipper.
Actually, it needed to check previous/current clippers but previously,
it checked only previous clippers.

@fix
2016-09-06 16:45:23 +09:00
Andrii Kroitor 9a1f3891d4 ecore_con_url_curl.h: add missing include on windows
Summary: windows has its own sockets implementation

Reviewers: raster, bowonryu, vtorri, Hermet

Reviewed By: Hermet

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4279
2016-09-06 16:36:59 +09:00
Woochan Lee 81db8e9f32 elm_calendar: Add enum to mark display every day before event day.
Summary:
There was no way to add marks on every day before event day.

The user may want to add mark something on every day before today.
(passed mark or disable etc...)

Test Plan:
Run elementary_test
Calling "elm_calendar_mark_add()" with ELM_CALENDAR_REVERSE_DAILY value.

Reviewers: cedric, Hermet

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4276
2016-09-06 16:20:15 +09:00
Tom Hacohen 829f298589 Eo array callback: Fix compilation on windows.
I knew Windows doesn't allow statically initialising pointers in the
global namespace, I had no idea it also applies to functions. That's
quite annoying.

Thanks to Cedric for reporting.
2016-09-05 17:51:09 +01: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
Tom Hacohen 5eedad98fe Efl object: Fix outdated docs. 2016-09-05 16:45:37 +01:00
Tom Hacohen b9c5ef4eea Eo array callback: simplify code and fix reliance on gcc extensions.
As far as I remember, declaring structures and arrays in a cast is a GCC
extension. I'm not 100% sure I'm right, but I remember it was the case.

Regardless of whether it's an extension or not, this commit removes that
pattern and makes everything cleaner (and faster?).
2016-09-05 16:25:36 +01:00
Tom Hacohen f13bb9d9f5 Efl object: rename shadowing variable. 2016-09-05 16:22:33 +01:00
Tom Hacohen a8ccb191c6 Adjust the EFL to the Eo class_initilizer changes. 2016-09-05 16:03:17 +01:00
Tom Hacohen 4aae224ef5 Efl object: change the way we set class's functions.
This is another follow up to the investigations of T4227. As stated
there, in any PIE (a shared library is one), structures, even const ones
end up being written to because of dynamic relocation. This means that
using static const structures has actually lead to no savings, only
waste. Since we never really needed them, using them made things even
worse than just having a different API that doesn't save them.

Thus, this commit changes the way we set the functions. Instead of
passing a pre-populated struct, we now just have an initialiser function
where you set the functions. This on its own doesn't significantly reduce
the amount of dirty memory pages for a reason I have yet to uncover,
though I believe it's done as a misguided compiler optimisation.
However, this design is flexible enough so we can change to another one
that is quite ugly, but I have already tested and proven that does that.
This patch series doesn't include the better improvement (passing
        everything on the stack as va_args) because the API was too ugly
for me to bear, and I would rather first make sure there is no way to
force the compiler to do the right thing here.

Unfortunately this commit gives up on useless stricter validation.
Before this commit we would make sure that we are only overriding
functions correctly defined in our hierarchy. With this one, we don't
anymore. This is not a big problem though because this is a check that
is also enforced by Eolian. So as long as you are using Eolian, you
should be fine.

Breaks API and ABI!

@feature
2016-09-05 16:03:17 +01:00
Tom Hacohen c8c0bbcfcf Efl object: rename EFL_OBJECT_OVERRIDE_OPS_DEFINE.
It is now called EFL_OPS_DEFINE as it's used for general purpose ops
definition.
2016-09-05 16:03:16 +01:00
Gustavo Sverzut Barbieri 72bfca0df5 efl_net_server_fd: fix coverity issue.
fixes CID 1361945, minor but let's do it :-)
2016-09-05 09:36:14 -03:00
Daniel Hirt 2e53068907 Edje entry: fix selection start with shift + mouse_down
Fixes T3043.

Starting a selection should be possible with shift + mouse_down. No need to
check the "have_selection" flag.

@fix
2016-09-05 14:32:34 +03:00
Marcel Hollerbach 58dedf4674 edje: protect against no file set yet.
Summary:
There can be the case that the file of a edje is NULL. Even if this case
is a bit strange, we should not crash on it.

Sample code which produces the crash:

   Edje_Object *edje;
   int r, g, b, a;

   edje = edje_object_add(evas);

   edje_obj_color_class_get(edje, "bla",
	EDJE_COLOR_CLASS_MODE_COLOR, &r, &g, &b, &a);

So better protect against this case.

Reviewers: raster, herdsman

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4277
2016-09-04 13:46:38 +02:00
Cedric Bail 05f05dde5c eo: protect efl_isa from thread race condition. 2016-09-02 10:19:45 -07:00
Cedric BAIL 3ab60a1564 eo: store registered callbacks in an array instead of a single chained list. 2016-09-02 10:19:45 -07:00
Cedric BAIL 605fec91ee eo: improve speed of walking callback array by sorting them during creation.
This improve speed of processing events in genlist scrolling benchmark by 30%
inside the efl_object_event_callback_call code. Not a really big deal as it
goes from 0.9% to 0.6% of the total time spend. Welcome to micro optimization.
2016-09-02 10:19:45 -07: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
Gustavo Sverzut Barbieri 57e765a758 efl_net_dialer_http: use CURLOPT_NOSIGNAL.
EFL uses its own signal handlers, so we must disable CURL's usage of
those.
2016-09-02 00:08:50 -03:00
Gustavo Sverzut Barbieri 6ddd01bffb efl_net_dialer_http: fix interaction with CURL on receiving data.
When CURLOPT_WRITEFUNCTION returns less then the requested amount,
CURL will fail, not call us back with the remaining data.

Then in such cases we must pause CURL and read nothing.

When unpausing we need to kick curl with timeout action so FD handlers
will be re-arranged.

Last but not least, sync our buffer limit with CURL, otherwise it may
always fail if we're smaller than CURL.
2016-09-02 00:08:50 -03:00
Gustavo Sverzut Barbieri d12ff74f5f efl_net_dialer_http: allow delete/close from CURL callbacks.
CURL doesn't play nice if handles are deleted or modified while it's
dispatching the callbacks, then we must not touch the CURL* easy
handle in those cases, just dissociate the handle from object and
schedule a job to do the deletion later.

Also, since from CURL callbacks we do not have the reference to the
object, if they are deleted from inside the callback, users of 'pd'
will crash. Thus keep an extra reference while the object and its
private data are in use.

The curl_multi_info_read() is used to notify of errors and
end-of-stream, if we do callback directly from there, the user may
efl_del(dialer), which will result in the "pd->easy" being destroyed
with curl_easy_cleanup() then "cm" and "cm->multi" being destroyed.

Thus postpone that action and keep a list of finished objects, calling
their event handlers which can delete the object (or siblings), thus
ref before dispatching and unref afterwards, taking care to monitor
EFL_EVENT_DEL so we do not use stale objects.
2016-09-02 00:08:50 -03:00
Gustavo Sverzut Barbieri 4ee09c5bdb efl_io_copier: keep extra ref when calling back from job.
while in a job we do not have the safety of eo holding us alive and
when we call back the user, he may have deleted the object, releasing
both the object and its private data that we're using.

then keep an extra reference, call the methods and release it.
2016-09-02 00:08:49 -03:00
Michaël Bouchaud (yoz) 49ffa2c887 Elm: add missing @since into the doc about last added api to elm_progressbar. 2016-09-02 02:25:30 +02:00
Michaël Bouchaud (yoz) a9a9240421 elementary: Introduce a new edje_external param to the progressbar widget.
This widget was lacking an edje_external param to notify the widget to start or
stop pulsing from edje.

@fix Now the edje_external progressbar test works as expected.
2016-09-02 02:13:19 +02:00
Andy Williams 8f96646605 Elm: Dont insert errors by default in code
Instead insert the line if the gutter is clicked.
And provide a tooltip!
2016-09-01 23:15:34 +01:00
Andy Williams d7e261c3e6 elm: Use the background highlight colors from our website in Elm_Code 2016-09-01 23:14:11 +01:00
Andy Williams b52de36f03 Elm: Dont'd display a ghost 0 width line marker for elm_code.
Avoiding a ghost line when we have no width marker configured
2016-09-01 21:43:57 +01:00
Andy Williams f290f9ca4c Elm: Fix crashes with copy/paste of large code
Various fixes to the memory management of multiline strings
2016-09-01 21:41:57 +01:00
Jiwon Kim b52725cef5 efl_net: check definition 'SO_REUSEPORT' for port reuse flag
Summary:
The port reuse feature and 'SO_REUSEPORT' flag are not supported by a few linux
In case of linux kernel, it supported from v 3.9
  (https://kernelnewbies.org/Linux_3.9)
On the lower version of kernel, compile is failed

Reviewers: barbieri, jayji

Reviewed By: jayji

Subscribers: akanad, id213sin, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4256
2016-09-01 19:08:25 +02:00
Minkyu Kang ec8487a8a4 elm_genlist: apply the item_select_on_focus_disable feature on key_action_move
Summary:
Previously, focused item was always selected on first and last key action.
If item_select_on_focus_disable is true, item should not be selected.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>

Test Plan: elementary_test -to genlist

Reviewers: cedric, SanghyeonLee, Hermet

Reviewed By: Hermet

Subscribers: sju27, seoz, jpeg

Differential Revision: https://phab.enlightenment.org/D4272
2016-09-01 20:20:53 +09:00
Jee-Yong Um 1d281906f2 eina_matrix: add missing "*" for doxygen
Summary:
"/**" requires for doxygen, but one "*" is omitted for the reference
of eina_matrix3_multiply().

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4266
2016-09-01 20:05:23 +09:00
Carsten Haitzler 90acc0216b eo - make eoid table access threadsafe - was missing a lock around it
this now makes at least eoid deref and ojbect access safe across
threads. the downside is that oeid lookup goes from 2% to ~5% of cpu.
ugh.
2016-09-01 18:59:56 +09:00
Jean-Philippe Andre b3993b684e win: Add EO API to query state of multi touch points
This combines evas canvas functions to list and query
touch points into a single iterator:
 - evas_touch_point_list_count
 - evas_touch_point_list_nth_xy_get
 - evas_touch_point_list_nth_id_get
 - evas_touch_point_list_nth_state_get

This also fixes a number of issues related to feeding fake
input events.

Note: I wanted to add delta x,y information as well but it's
in fact not really possible outside the event callback itself,
as the previous x,y position will not be updated unless there's
an event.

@feature
2016-09-01 14:57:11 +09:00
Jean-Philippe Andre e61b7139ff win: Move pointer "xy" and "inside" to input interface
Those two properties aren't related to a "drawing" canvas
but to the current state of input.

Note: both Efl.Input.Pointer (pointer input event data) and
Efl.Input.Interface (common interface for input handling objects)
expose a pointer position API. Not sure what to do about that.
2016-09-01 11:57:43 +09: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
Jean-Philippe Andre caf237abdf evas: Fix unlikely crash with image cache
This happened to me when running elm_suite manually, during
elm_shutdown. At this point, cache shouldn't be null, but better
be safe anyway.
2016-09-01 11:57:43 +09:00
Jean-Philippe Andre ed9413c1c1 ecore_poller: Fix unlikely crash if eo data is null
This happened to me when running elm_suite manually.
2016-09-01 11:57:43 +09:00
Jee-Yong Um 9f7ce792f0 elementary: remove unused SMART_NAME strings
Summary: Smart name strings are not used any more.

Reviewers: Hermet, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4261
2016-09-01 11:33:04 +09:00
Jean Guyomarc'h 8118829225 ecore_cocoa: fix wrong key assignment 2016-08-31 21:24:49 +02:00
Daniel Hirt 2d44738fae Canvas text: fix ellipsis RTL handling
First, fixing ellipsis text positions: ellipsis items should be assigned the
text positions of the omitted text (while maintaining the formatting of the
last visual item). In the case where an entire item was rejected, it
will be assigned that item's text position. If an item was split, it will be
assigned the text position of the split portion.
The BiDi reorder code relies on properly-assigned text positions.

Second, fixing ellipsis handling: the width calc was only considering the
ellipsis item's width. However, if the ellipsis is placed as e.g. the first
visual item (such as in RTL cases), its advance value should've be considered,
instead.

Thanks Youngbok Shin for the test case and information.

@fix
2016-08-31 16:23:32 +03:00
Amitesh Singh d88f08f7e9 eina: module - Add macros for adding module informations
Summary:
These macros allow you to define module informations like
author/description/version/license

e.g.
// Use "Name <email id>" or just "Name"
EINA_MODULE_AUTHOR("Enlightenment Community");
// Mention license
EINA_MODULE_LICENSE("GPL v2");
// What your module does
EINA_MODULE_DESCRIPTION("This is what this module does");
// Module version
EINA_MODULE_VERSION("0.1");

Now eina_modinfo can show these informations to users

$ eina_modinfo module.so
 version: 0.1
 description:   Entry test
 license: GPLv2
 author:  Enlightenment Community

@feature

Reviewers: cedric, tasn, raster, jpeg

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D4257
2016-08-31 16:17:53 +05:30
Jean-Philippe Andre f88a4b8308 evas events: Fix repeated calls to mouse callbacks
After my many input events changes, a same object callback
could be called multiple times in a row because both mouse
and multi events were sent. As such, the multi event had no
direct effect (no callback called) but it reset the object's
last event type. This allowed the mouse event callbacks to be
called again.

Note that I haven't tested multi touch yet :(

Very good catch by @bu5hm4n!

Fixes T4462
Fixes T4467
2016-08-31 11:41:58 +09:00
WooHyun Jung 9452acd126 elm widget: remove meaningless brackets 2016-08-31 09:36:52 +09:00