Commit Graph

15559 Commits

Author SHA1 Message Date
Derek Foreman 79409757c6 ee_drm: Improve next buffer selection algorithm
When triple buffering it's possible that we'll only need two buffers at
a time for long durations.  When we finally call upon a third buffer it
hasn't been used recently enough to do a partial redraw.

By picking the oldest available buffer when multiple buffers are free we
can increase the likelihood of doing partial redraws.
2016-09-08 13:55:24 -05:00
Derek Foreman 5eec34812e evas_engines: Add a redraws_clear callback
This gives us a callback from the main thread after outbuf_flush occurs -
this is useful to get timing right on the drm and wayland engines.
2016-09-08 13:55:24 -05:00
Derek Foreman ce7991b993 ecore_drm2: Implicitly set buffer busy status when flipping
This simplifies other code that shouldn't need to deal with this.
2016-09-08 13:55:23 -05:00
Derek Foreman 794798f559 ee_drm: Move all ticking into ecore_evas_drm and use new tick system
Combines all the gl_drm and drm ticking code into one set in
ecore_evas_drm and uses the new evas tick register/unregister callbacks
to set it up.
2016-09-08 13:55:23 -05:00
Derek Foreman 3d39c1e9b8 ecore_drm2: Add a function to set the pageflip callback data once
Instead of passing the user data for the page flip callback every time,
set it just once.

This will make it easier to push tick logic into ecore_evas_drm, as there
will be a transitional period where page flips are driven in two places
that don't have access to the same pointers.
2016-09-08 13:55:23 -05:00
Derek Foreman cfd172c64b ee_drm: use the ecore_drm2_fb busy bit
Use the new busy getter/setter on the fb instead of keeping state in the
outbuf
2016-09-08 13:55:23 -05:00
Derek Foreman d8c9f8ef17 ecore_drm2: Add busy status to ecore_drm2_fb
We've been tracking this in the outbuf code, but that logic is going to
be moved into ecore_evas_drm to use the new ticking paradigm.
2016-09-08 13:55:23 -05:00
Derek Foreman 316ca09b0d ecore_evas_drm: Refactor common code
ecore_evas_gl_drm_new_internal and ecore_Evas_drm_new_internal are huge
functions differing in very few lines.  Combined them.
2016-09-08 13:55:23 -05:00
Derek Foreman 31de16d408 ecore_evas_drm: check for libglapi presence first
Minor refactor
2016-09-08 13:55:23 -05:00
Derek Foreman 398771bf8a evas_engines: Add fn_evas_changed callback
To allow using the pageflip completion event to drive timing in the DRM
engine we need to know as soon as possible that a render has been after
a render has been considered if it will cause a page flip or not.

The fn_evas_changed callback sends this information.
2016-09-08 13:55:23 -05:00
Derek Foreman 1591e095d5 ee_drm: Fix max buffer age
The highest possible buffer age should actually be 4, not the number of
available buffers.
2016-09-08 13:55:23 -05:00
Tom Hacohen bd3801247e Eo: Make function overrides implicit.
Before this commit, function overrides were explicit. That is, you'd
have to explicitly state you were overriding a function instead of
creating a new one. This made the code a tad more complex, and was also
a bit more annoying to use. This commit removes this extra piece of
information.

This means we now store much less information per function, that will
let us further optimise out structures in the future.
2016-09-08 13:59:04 +01:00
Chris Michael 0f8fb7ef88 evas: Fix jpeg snafu and properly send hold events to children
Commit 405680e836 changed how hold
events were being sent. Previous code was sending the hold events to
child objects, however after mentioned commit, they were being sent to
main objects. This patch fixes that.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-08 08:40:16 -04:00
Daniel Kolesa 1041edc6dc docs: actually close all ref files properly in order to not exceed maximum 2016-09-08 13:34:19 +02:00
Tom Hacohen 6b60560773 Eo class creation: Simplify code using recursive locks.
Now that we have recursive locks, the class creation code can be much simpler.
All the code there was essentially our own implementation of recursive locks,
or rather a special case of those.

This is no longer needed.
2016-09-08 11:14:32 +01:00
Carsten Haitzler 150cc62a0d eo domain tests - make a start on them with some basic ones
this adds tests for some of the basic domain tests. doing the
inter-thread ones is going to be much more.... fun.
2016-09-08 18:39:38 +09:00
Carsten Haitzler be29f3f4ec efl ui image - fix janky blocking async image preload thread handling
fix the elm image threaded image preload to be far simpler and
actually threadsafe without blocking the mainloop at all even on
object deletion. this also ensures ar least the first 512M of any
async precached file are loaded in so the preload doesnt stall on
headers that are outside maybe the first 4k of the file. i saw this
happening all over the place in the test i created.

@optimize
2016-09-08 17:30:59 +09:00
Carsten Haitzler f37a0398c3 epp - document that fallthrough is intended 2016-09-08 17:30:59 +09:00
Jean Guyomarc'h c8d82dfc61 ecore_cocoa: fix build warning 2016-09-08 07:51:30 +02:00
Jee-Yong Um 293e251f55 edje_cc: remove after programs lookup when removing program
Summary:
When removing program, program lookups for its after programs
should be removed.

@fix

Reviewers: cedric, jpeg, Hermet

Reviewed By: Hermet

Subscribers: taxi2se

Differential Revision: https://phab.enlightenment.org/D4286
2016-09-08 11:00:40 +09:00
Ji-Youn Park 7ce79be1a1 evas_render: fix clipping the whole area in each rendering.
evas_render should not be going and doing evas_object_clip_set () at all.
The framespace clip should be enforced at RENDER time.
2016-09-08 09:56:30 +08:30
Al Poole a19f730137 eio: fix kevent monitor to not SIGBUS. 2016-09-07 16:41:59 -07:00
Cedric BAIL e6a810efa7 elementary: fix call to efl_data_scope_get from another thread.
This should fix the breakage on elm_suite.
2016-09-07 11:42:29 -07:00
Carsten Haitzler 3ce5d1ebc7 eo_compatible - improve usability of err/warnings by duplication impl 2016-09-08 00:09:32 +09:00
Carsten Haitzler fc6759ef4d eodomain related docs - update as per some of gustavo's comments 2016-09-08 00:09:32 +09:00
Carsten Haitzler 9d2786896b eo - fix indenting in a file that was nuts and non-standard 2016-09-08 00:09:31 +09:00
Carsten Haitzler f695762d06 eo - add single global mutex for all shared eo objects to they are th-safe
this adds a signle mutex (recursive) mutex for all eo objects that is
auto-called by _efl_object_call_resolve() and _efl_object_call_end()
that wrap all eo method calls and since its recursive it can be
blindly called for sub-calls. this will lock all shared objects during
any call to any shared object so only the thread calling now has
access until it releases. not fine-grained but good enough and the
best we can do "simplistically".
2016-09-08 00:09:31 +09:00
Carsten Haitzler 1d26e61478 eina - add recursive mutex lock - apparently these are portable
new feature - recursive lock. same as normal lock just with recursive
attr set

@feature
2016-09-08 00:09:31 +09:00
Chris Michael c3d5ccf0f9 Revert "evas: Remove set but not used variable"
This reverts commit 24c5df29b3.

This should not have been pushed. Removed the variable from the wrong
spot :(
2016-09-07 08:35:30 -04:00
Chris Michael 24c5df29b3 evas: Remove set but not used variable
Gcc warns eo_child is set but not used here, so remove it.

NB: This should have been removed in previous evas_events commit. Oopise

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-07 08:31:39 -04:00
Chris Michael 578099f915 evas: Remove set but unused variables
Gcc reports that these variables are set but not used, so remove them

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-07 08:28:08 -04:00
Chris Michael 6b63d9d6ec evas: Remove set but unused variables
Gcc warns that these variables are 'set but not used'. After reading
the surrounding code, it turns out they are not actually used, so
remove them.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-07 08:22:11 -04:00
Andrii Kroitor 16a3509906 edje_cc: fix group inherit
Summary: item spread property was not copied.

Reviewers: NikaWhite, Hermet, raster, cedric

Subscribers: jpeg, reutskiy.v.v

Differential Revision: https://phab.enlightenment.org/D4285
2016-09-07 15:16:47 +03:00
Carsten Haitzler 4478654be1 eo resolv call cache - make TLS with __thread, linker+compiler do it
this will now fix the call cache to be a tls data member and thus
threadsafe. this is the sanest way.
2016-09-07 20:58:39 +09:00
Carsten Haitzler 09f19c3c73 eo - make eo id table TLS private data for thread safety and speed
This moved all the eoid tables, eoid lookup caches, generation count
information ad eo_isa cache into a TLS segment of memory that is
thread private. There is also a shared domain for EO objects that all
threads can access, but it has an added cost of a lock. This means
objects accessed outside the thread they were created in cannot be
accessed by another thread unless they are adopted in temporarily, or
create4d with the shared domain active at the time of creation. child
objects will use their parent object domain if created with a parent
object passed in. If you were accessing EO (EFL) objects across threads
before then this will actually now cause your code to fail as it was
invalid before to do this as no actual objects were threadsafe in EFL,
so this will force things to "fail early".
ecore_thread_main_loop_begin() and end() still work as this uses the
eo domain adoption features to temporarily adopt a domain during this
section and then return it when done.

This returns speed back to eo brining the overhead in my tests of
lookup for the elm genlist autobounce test in elementary from about
5-7% down to 2.5-2.6%. A steep drop.

This does not mean everything is perfect. Still to do are:

1. Tests in the test suite
2. Some API's to help for sending objects from thread to thread
3. Make the eo call cache TLS data to make it also safe
4. Look at other locks in eo and probably move them to TLS data
5. Make eo resolve and call wrappers that call the real method func do
   recursive mutex wrapping of the given object IF it is a shared object
   to provide threadsafety transparently for shared objects (but adding
   some overhead as a result)
6. Test test est, and that is why this commit is going in now for wider
   testing
7. Decide how to make this work with sending IPC (between threads)
8. Deciding what makes an object sendable (a sendable property in base?)
9. Deciding what makes an object shareable (a sharable property in base?)
2016-09-07 18:17:10 +09:00
Jaehwan Kim 59bdf3461c edje: add missed break in the switch construction. 2016-09-07 14:01:51 +09:00
Amitesh Singh a17909b007 eeze: remove trailing whitespaces 2016-09-07 09:48:39 +05:30
Youngbok Shin f50674db58 elementary label: use text width when label calculates duration for slide
Summary:
When developers customize theme for making different type of sliding label,
it would be better to send a duration based on whole text.
[The whole text width - label object's w] is only useful for short, bounce
type sliding.

Test Plan: N/A

Reviewers: raster, tasn, herdsman, cedric

Reviewed By: cedric

Subscribers: minkyu, akanad, z-wony, Blackmole, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-09-06 15:00:55 -07:00
Andrii Kroitor 605694ed2a eina: fix error reporting in cond_timedwait
Summary: EINA_FALSE was set into wrong variable.

Reviewers: jpeg, raster, Hermet, cedric

Reviewed By: cedric

Subscribers: NikaWhite

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-09-06 14:59:47 -07:00
Amitesh Singh a2e3b8ad13 eeze: add support of GPIO sysfs detection and watch.
This adds support for detection and watch of GPIO pins in /sys/class/gpio/*
This detects both gpiochip<N> & gpio<N>.

@feature
2016-09-06 20:42:26 +05:30
Carsten Haitzler e14a11d9fa eo base - fix free of all callbacks to set callbacks to NULL
we set count to 0 but not ptr to NULL. this we must do after free so
when other destructors run dont go relying on this ptr to be valid!
2016-09-06 22:12:23 +09:00
Tom Hacohen 75c981a9d9 Eo benchmarks: Fix according to recent Eo changes.
Thanks to Stefan for the report.
2016-09-06 13:58:13 +01:00
Stefan Schmidt 689ba2ff6d eo: update documentation after EFL_CLASS_DESCRIPTION_OPS removal
Remove the references to this removed macro.
2016-09-06 14:54:42 +02:00
Jean-Philippe Andre 183ba660d6 Efl.File: Remove method eject
Unused anywhere.
2016-09-06 17:48:13 +09:00
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
Tom Hacohen 48f7eb02a8 Eolian: Fix tests according to recent generator changes. 2016-09-05 16:03:16 +01:00
Daniel Kolesa f92a67e191 eolian: update generation of op funcs 2016-09-05 16:03:16 +01:00
Tom Hacohen e0a95a96c9 Efl object: Simplify test that was unneededly prone to breaking 2016-09-05 16:00:07 +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
Stefan Schmidt f52ffec5dd tests: ecore: add some debug for ecore timer test case
This tests fails on Jenkins from time to time. The timeout is to big. Adding
some debug here top see how far we are off when this happens.
2016-09-05 11:21:54 +02:00
Stefan Schmidt 6bc1dc6d83 cxx: follow EINA_ERROR_OUT_OF_MEMORY deprecation
Follow the rest of efl and use ENOMEM from now on. This avoids ugly deprecation
warnings.
2016-09-05 10:39:24 +02:00
Jean Guyomarc'h 4d7aade978 ecore_audio: fix distribution of eolian files
When a 'make dist' is executed on a repository that does not have
CoreAudio support, eolian files required for CoreAudio compilation will
not be distributed, making the source distribution incompatible where
CoreAudio is required.
There is the same potential issue for pulseaudio, but as it is a basic
requirement, it is likely to always have been distributed because the
distribution was always created from a base which enabled pulseaudio.

This allows to produce on Linux a sources tarball usable on Mac OS X.

@fix
2016-09-04 17:00:44 +02: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
Felipe Magno de Almeida 428cf0cbad elementary-cxx: Speed C++ compilation test
Remove unnecessary linking libraries from test so
linking becomes fast
2016-09-03 19:55:19 -03: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 1d2be3fc4c edje_cc: add lookup for inherited after program
Summary:
"after" program inherited from inherit_only group does not have original
program lookup, but _edje_program_copy() doesn't consider this case.
When it fails to copy program lookup, new program lookup should be appeded.

@fix

Test Plan: make attached program and run

Reviewers: cedric, jpeg, Hermet

Reviewed By: Hermet

Subscribers: taxi2se

Differential Revision: https://phab.enlightenment.org/D4253
2016-09-01 20:08:56 +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
Jean-Philippe Andre b4e20fd632 js: Switch to Efl_Event
I haven't tested the compilation... but I guess this can't hurt.
2016-09-01 11:57:43 +09:00
Jean-Philippe Andre ff0952abda cxx: Fix compilation (Efl_Event) 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 Kolesa 1bdc5a008b docs: add editable section writing to writer 2016-08-31 16:17:25 +01:00
Daniel Kolesa 8e5d46f690 docs: hide date/user/link in included editable sections 2016-08-31 16:10:04 +01:00
Daniel Kolesa 036a1df57f docs: initial test for user editable sections 2016-08-31 16:01:53 +01:00
Daniel Kolesa 9ecae0ed28 docs: allow false root in namespace tables 2016-08-31 15:53:39 +01:00
Daniel Kolesa 800dbda6a6 docs: separate auto/user from root namespace 2016-08-31 15:50:31 +01:00
Daniel Kolesa b193a9f840 docs: generate within the docs:efl:auto namespace (for future editable blocks) 2016-08-31 15:18:10 +01: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
Andy Williams 9e54ae9373 elm: Try to use the code highlight color from out website in Elm_Code 2016-08-30 23:22:41 +01:00
Vitor Sousa f02ff462e7 efl callbacks: update some events calls to no longer trigger legacy callbacks 2016-08-30 13:59:59 -03:00
Mykyta Biliavskyi b6e2b8601d Edje edit: allocate memory for mempools.
Just added allocations that missed in "edje - reduce another 400k or so
of memory usage (esp hello world)" commit.
2016-08-30 16:57:53 +03:00
Tom Hacohen 45707a7bb6 Evas engine drm: Fix style (and thus compilation warning).
Double parenthesis in ifs, such as "if ((x = 5))" should only be used
iff using assignment inside of conditions (like the example above). This
explicitly conveys the intention to both the compiler and other
programmers and essentially eliminates the class of bugs that result
from accidental assignment when a comparison was intended and vise-versa
in conditions.
2016-08-30 13:39:39 +01:00
Tom Hacohen 1198dd4efb Edje cc: Rename and move around shadowing variable. 2016-08-30 13:36:41 +01: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 ba80f7e5b0 ecore_con: Add missing socket.h
Reported and patched by @netstar

Fixes T4461
2016-08-30 20:52:02 +09:00
Jean-Philippe Andre 062145b605 win: Fix ERR message with object,focus,in
enventor exhibits this issue, where the focus target is
NULL in some cases. The ERR message was harmless, but it's
good to avoid it and be explicit that the object should be
non NULL when adding event callbacks.
2016-08-30 15:13:40 +09:00
Jean-Philippe Andre 2edf50cb10 evas events: Properly signal to clients which values are set
Since pointer events are all the same thing, users may not know
what values are valid for what kind of event. Eventually we
want to expose more information, but we also need a way to inform
the caller about the validity of the values we get.
2016-08-30 15:13:40 +09:00
Jean-Philippe Andre 68be4f49ed evas events: Fix mistake in multi_move
I guess (can't test) that multi touch was broken, as the
position of the event was set to the position of the pointer
on the canvas. Which means all fingers would be in the same
spot, no matter what the real input. Copy & paste error.
2016-08-30 15:13:40 +09:00
Gustavo Sverzut Barbieri b004b8a4f9 efl_net_dialer_http: keep fd directly.
provide curl with CURLOPT_OPENSOCKETFUNCTION and keep the fd in our
private data.

This is required because on _efl_net_dialer_http_efl_io_writer_write()
we may have no fdhandler.

It happened to me while implementing the WebSocket that uses a
bi-directional communication on top of HTTP and the server sent the
whole message, CURL reads:

   recvfrom(7, "...", 16384, 0, NULL, NULL) = 86
   recvfrom(7, "", 16384, 0, NULL, NULL) = 0

After the empty (second) recvfrom(), CURL will remove the fdhandler:

    DBG:ecore_con lib/ecore_con/efl_net_dialer_http.c:482 _efl_net_dialer_http_curlm_socket_manage() dialer=0x4000000040000005 fdhandler=(nil), fd=7, curl_easy=0x5561846ca8d0, flags=0x4

However I should be able to write to this socket, in my case I need to
reply to a PING request with a PONG.
2016-08-30 00:36:00 -03:00
Gustavo Sverzut Barbieri f1c691d0f5 efl_net_dialer_http: allow incompatible configurations such as GET + upload.
CURL is smart and when you ask for CURLOPT_HTTPGET, it will
automatically configure UPLOAD=false. Likewise, if you ask for
UPLOAD=1 it will configure CURLOPT_PUT...

However, to do things like WebSocket we need to do a GET request where
we need to send data, then UPLOAD=true must be used.

Then use both information in order to setup the request method and
upload, using CURLOPT_CUSTOMREQUEST to force a given HTTP method.
2016-08-30 00:35:45 -03:00
Gustavo Sverzut Barbieri fba2743361 efl_net_dialer_http: cancel curl multi timer when it's gone.
If we delete the curl multi handle, then we should stop any timer that
was scheduled, otherwise it will use a dead or null pointer.

also add some debug to help track down when the multi handle is
deleted.
2016-08-30 00:35:35 -03:00
Gustavo Sverzut Barbieri 68ea5bd025 efl_net_dialer_http: dispatch headers even if no data.
in some cases we get headers but no data to receive or send, then we
must still say headers were done and we're connected.
2016-08-30 00:35:27 -03:00
Gustavo Sverzut Barbieri d8caade348 emile: API break, rename sha1 to hmac_sha1, introduce real sha1.
emile_binbuf_sha1() was actually doing HMAC version using the given
key. This doesn't work when all you need is just the SHA1 of the input
data.

Then rename emile_binbuf_sha1() to emile_binbuf_hmac_sha1() and
introduce a new version without key/keylen.

This API was marked as BETA and no real users in the codebase, then it
shouldn't cause us problems.
2016-08-30 00:35:17 -03:00
Jean Guyomarc'h 5b8315aeff ecore-tests: make sure we always get a canonical path
There may be extraneous slashes that are contained in the returned
generated directories (because they were put there in environment
variables). Since we test with string comparison, some tests would fail
due to different environment setups.
2016-08-29 20:03:52 +02:00
Jean Guyomarc'h 3f79cf8748 eina: fix behaviour break of eina_error_msg_get()
eina_error_msg_get() must return NULL if an incorrect error is provided.
The XSI strerror_r() returns EINVAL when an invalid error is passed to
it, so we can end the function here. If we kept on, we would have tested
against the 'unknown_prefix' ("Unknown error ") which is implementation
defined, and registered a new error when the invalid error message
didn't match the 'unknown_prefix'. This new error message would have
been returned, which is not what we expected.

This case arised on Mac OS X where the 'unkwown prefix' is
"Unknown error: " instead of "Unknown error ".

It fixes eina test suite on Mac OS X.
2016-08-29 20:03:52 +02:00
Jean Guyomarc'h 3791ed5fe0 elm-tests: don't include Ecore_X.h when not available
This fixes a build issue on Mac OS X.
2016-08-29 20:03:52 +02:00
Jean Guyomarc'h 9a82b17eff evas: don't redefine PAGE_SIZE if already defined
On OSX, we include mach.h (via the inlined locks API), which
already defines PAGE_SIZE.
2016-08-29 20:03:52 +02:00
Jean Guyomarc'h 82808e2080 elementary: update tooltip documentation 2016-08-29 20:02:51 +02:00
Vitor Sousa 3f5149a675 elm fileselector: fix events that must be using Efl.Model objects
Use the new behavior of Efl.Object.event_callback_call to correctly
update events to pass Efl.Model objects while still suppling path
strings for legacy smart callbacks.

Override Elm.Fileselector.event_callback_legacy_call in order to separate
the types of any incoming event call that uses Efl.Model.
2016-08-29 12:22:22 -03:00
Subodh Kumar 0f4cdf7a48 Edje entry: Pass correct cursor position and text to imf in case of selection
Summary:
When selection is there we are passing the whole text and position to imf
which sees that next character like matras (eg .Hindi) should be inserted
(if pressed) and when matra comes the selected text is gone and only matra
remains in the entry.

eg:  we have text in hindi like मानक, select all and hit matra in keyboard
selected text is gone, only matra is there.

@fix

Test Plan: Tested in Tizen device

Reviewers: jihoon, tasn, herdsman, thiepha

Subscribers: Hermet, shilpasingh, raster, subodh, jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D2951
2016-08-29 17:26:40 +09:00
Carsten Haitzler a9fbe6cb8f eo callbacks - move to mempools for callback data for more speed
also help reduce fragmentation. also remove callbacks immediately if
callbacks are not being walked at the time (as opposed to just marking
them to need deletion then call a clean that if not being walked will
walk all cb's when we already know what to remove).

@optimize
2016-08-29 16:48:08 +09:00
WooHyun Jung d553a5a836 elm focus: focus_auto_hide should be done with mouse_down
Focus highlight can be on the air, when focused object in scroller is
moved by mouse down and move.
So, mouse up is not proper for executing focus_auto_hide.

@fix
2016-08-27 13:48:35 +09:00
Carsten Haitzler 6256978b61 fix filselector legacy cb call order and entry set - fix file,chosen
The visible bug for this issue is that the Elm External Video example
is broken:

elementary_test -to "ExtVideo"
The root cause is that the "file,choose" event of the
FileselectorEntry is (wrongly) not listed by the function:
evas_object_smart_callbacks_descriptions_get()
This evas functions is used in elm_external to forward all the widget
events to edje, but it cannot forward the "file,chosen" event because
it's not listed.
Thus the video test is not working for the lacks of that event.

I think the fix should be somewhere in elc_fileselector_entry.c, there
are some hacks there for the incriminated signal, but I don't know how
to properly fix.

as pointed out by dave:

DaveMDS added a comment.Fri, Aug 26, 5:19 PM
I think the problem is in this function: (elc_fileselector_entry.c)

...

this fixes T4337
2016-08-27 09:08:05 +09:00
Vitor Sousa 5d2948b016 elm fileselector: fix possible premature deletion of Listing_Request struct
In a case where eina_promise_then is executed immediately (like with some
quick and light Efl.Model), the Listing_Request struct will be prematurely
freed in the first iteration of the child processing loop, because the
item_total counter had not accumulated the right number of items yet.

With this commit, we traverse the children accessor first, so we can know
the number of items.

Also, no longer use the Listing_Request pointer after the loop, once it
may have been deallocate already.
And put a note about this too.
2016-08-26 19:45:26 -03:00
Jean Guyomarc'h 1ab1e3697d efreet: mime types database can be empty
When the mime types database is empty, the file will
be exactly 28 bytes.

Fixes T4426
2016-08-26 21:16:39 +02:00
Jean Guyomarc'h 92d3fc8f4f elementary: better error handling of fileselector 2016-08-26 21:16:39 +02:00
Jean Guyomarc'h 0874c4da38 elementary: prevent double free
This one is a bit tricky... When we create the aggregated
promise, if one of the properties of the model returns an
error, the eina_promise_then() will immediately call the
error callback. In this happened for the first item, the
total items in the listing request would be 1.

Before this commit, we tested for incremented the processed
counter and compared it to this total count. If it was
greater or equal, we would free the common listing request.
But in the case of successive failures, we would set the
total counter to 1, then the processed counter to 1 and
therefore free. Then increment the total counter to 2, then
then processed counter to 2, and free again... which would
cause an abort() from the libc or something else nasty.

Now we just decrease the total count of items. We avoid
the cases and double frees, without leaking.
2016-08-26 21:16:39 +02:00
Jean Guyomarc'h 322adb2e03 elementary: make sure we don't iterate out of bounds
The carray iterator will end iterating only when it finds a NULL
object. We must make sure the last element of the array is NULL
to avoid out of bounds access.
2016-08-26 21:16:39 +02:00
Jean Guyomarc'h 5db3357f40 eina: overhaul Mac OS X semaphores
Mac OS X does not support POSIX unnamed semaphores, only named
semaphores, which are persistant IPC: when the program exits,
and if semaphores where not released, they stay forever...

All EFL programs were "leaking" a semaphore, due to how
eina_log_monitor manages its resources. Therefore, after building
EFL a lot (which run eolian_gen, eolian_cxx, elua, edje_cc, ...)
we were not able to create any semaphore...

Now, we get rid of these semaphores and use Mac OS X's own
semaphores. Code is less cumbersome, and we don't have any
disavantage of the named semaphores.

Fixes T4423

@fix
2016-08-26 21:16:39 +02:00
Cedric BAIL aaa0e962b7 eo: speedup efl_isa by 50%.
Most of our use case of efl_isa is related to legacy Evas_Object_Image API,
that check the isa of the same object again and again. Caching help.
2016-08-26 12:14:14 -07:00
Cedric BAIL 93a706a947 eo: general speedup of all Eo related operation.
This change rely on the fact that we do fetch the same
object id over and over again. _efl_object_call_resolve got
15% faster, efl_data_scope_get 20%.
2016-08-26 12:14:14 -07:00
Cedric BAIL 5e67a80753 eo: remove useless duplicated check. 2016-08-26 12:14:14 -07:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Jean Guyomarc'h 6b3ca899e8 ecore_cocoa: fix fullscreen for older osx versions
Tested on 10.11 and 10.9.

Fixes T4395
2016-08-26 19:38:57 +02:00
Jean Guyomarc'h 7397b9fbe9 ecore_cocoa: refactor resizing request 2016-08-26 19:05:48 +02:00
Jean Guyomarc'h 8d41099f9e ecore_cocoa: fix memory leak 2016-08-26 19:05:48 +02:00
Stephen okra Houston 1e458450cd Elementary: Genlist Tree Test - Add an item with the indent style to match tree style. 2016-08-26 10:37:26 -05:00
Mike Blumenkrantz 8c3efbd174 efreet: add doc note about stringshare reliability for efreet_mime_type_get() 2016-08-26 10:20:45 -04:00