Commit Graph

50022 Commits

Author SHA1 Message Date
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
Carsten Haitzler 3000038051 efl po's - update 2016-08-29 14:56:58 +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