Commit Graph

15559 Commits

Author SHA1 Message Date
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
Andy Williams 6fce2fb80b elm: Show code widget width marker after the column
Provide a clearer indication of what width is available
2016-08-26 15:17:37 +01:00
Daniel Kolesa 17d79745a3 docs: add an option to disable title plugin usage 2016-08-26 14:45:45 +01:00
Daniel Kolesa d69d54ff17 docs: let the writer handle title headings 2016-08-26 14:42:19 +01:00
Daniel Kolesa cdaa4ab68c docs: generate proper title for all pages 2016-08-26 14:31:33 +01:00
Daniel Kolesa b04c0cf241 docs: add writer support for pagetitle plugin 2016-08-26 14:28:11 +01:00
Jean-Philippe Andre 3b175fd7e9 elm: Fix some ERR messages following previous patch
This simply avoids calling functions on NULL objects, since
the previous patch would ERR out rather than silently ignore
the problem.

I just add explicit NULL checks before calling the functions,
so it's clear the object could be NULL (in the widget).
2016-08-26 17:15:05 +09: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
Jean-Philippe Andre 9123e5add2 evas events: Add efl_isa safety checks in legacy EAPI
This removes useless magic checks (only check whether the
arg is not null) that were not even present in every function.
The cost should be similar or lower than an eo function call.
2016-08-26 11:28:34 +09:00
Jean-Philippe Andre d504284dd2 efl: Rename Efl.Event.XX to Efl.Input.XX
This removes:
 Efl.Event interface

And renames:
 Efl.Event.Input -> Efl.Input.Event
 Efl.Event -> Efl.Input.Event (merged)
 Efl.Event.Pointer -> Efl.Input.Pointer
 Efl.Event.Key -> Efl.Input.Key
 Efl.Event.Hold -> Efl.Input.Hold

This also moves some interfaces from efl/ to evas/ where they
belong better.

This allows renaming Eo_Event to Efl_Event.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 60526528a6 evas: Add normalized and window coordinates to axis events
This is for Wacom graphics tablets (with a pen).

The raw data sent by ecore to evas (and then to apps) is pretty
useless as it's not normalized, and apps have no way of knowing the
dimensions of the tablet, without themselves opening the device
(we don't know nor expose the path to the device).

This is for Xi2 only for now, as Wayland support hasn't been done
yet.

The intent is to deprecate LABEL_X and LABEL_Y. I'm not sure yet
if the normalized value is useful or not (it would seem we may not
be able to provide this info in Wayland).

The new WINDOW_X, WINDOW_Y labels will be used in the new event
type (Efl.Event.Pointer). Normalized values are not exposed yet,
let's decide if we want them or not first (based on what can be
done in Wayland space).

@feature
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 443aa91d53 evas: Simplify internal evas_object_event_callback_call
This removes the distinction between legacy and new eo style
event info, since all those types have now been ported to eo.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 7b25619213 ecore xi2: Discard "axis" inputs from standard mice
Mice in X with xi2 send Axis events which are badly defined,
and carry basically useless information, as we also receive
proper mouse events. Notably, all mice input events are
"Rel something" but in fact they are absolute values (even
the wheel information is a counter increasing every time you
scroll).

This should not break any application as such axis events
carried only values with label ECORE_AXIS_LABEL_UNKNOWN.
This also fixes a leak when n == 0 (no "valuator" found
in the list, this used to be unlikely, now happens at every
mouse event).
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 925878e931 evas events: Switch axis events to the new eo type
This converts Evas_Axis or Ecore_Axis info arrays into basic
pointer data. Also marks those fields as set. All events need
to properly implement the value_has property (mark all bits
whenever a value is known).
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 8938d8d557 evas events: Rename properties and introduce generic value
This paves the way to a merge of pointer and axis events into
the class Efl.Event.Pointer.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre ef4859d5bd evas: Optimize out most callback call events
This sets a bit whenever a callback listener is added.
I couldn't get any profiling data easily (too small for
valgrind).

Note: This removes the proper refcounting on the "move"
event listeners. I believe this is not a problem as most times
the move_ref goes to 0, it is because the object is deleted.
Worst case, we just trigger a callback_call with no listeners.

This adds 32 bits to each evas object private data.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 57f0c850ec evas: Move event catcher to evas_callbacks.c
No functional change.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 4746627fcf evas: Remove deprecated events from public EO class
del and free eo events don't need to be exposed, even as beta
API. They are still required for legacy callbacks.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre b325097e71 elm,evas: Remove use of EFL_CANVAS_OBJECT_EVENT_DEL
This event should not be exposed at all, it's not necessary
anymore, EFL_EVENT_DEL already exists and should be good enough.

This does move the callback call a little bit ealier in the del
process, but at first glance, this shouldn't have any impact.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 834794ed84 evas events: Add new "finger,move/down/up" events for multi touch
This moves MULTI events to those new finger event types,
and also sends a finger event for finger 0 (aka the pointer).

NOTE: This may require a separation between a mouse input and
      an actual finger touch. To be defined, ie: do we let the app
      check the input device info to decide whether the event is
      actually the first finger of a multi touch device, or do
      we want to send only actual finger events from multi touch
      devices only?

@feature
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 608da26634 evas events: Simplify event counter
Simplify code:
 _evas_object_event_new()
 event_id = _evas_event_counter

Into:
  event_id = _evas_object_event_new()
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 049a5ddb44 evas events: Remove now unused code 2016-08-26 10:18:01 +09:00
Jean-Philippe Andre ab7f281c34 evas events: Fix crash when translating legacy events
An obvious crash happened when reusing a legacy struct
from another type.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre ac26c7d4f3 evas events: Switch mouse move events to the new type
This is the last commit for this crazy input transformation
series. The following commits will be cleaning up now
unused code, and fixing bugs.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 46c85b87fd evas events: Switch multi move to new event type
Now only the single move remains. Almost done!
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 2857d7c2cf evas events: Switch multi up/down to the new event type 2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 328151f999 evas events: Switch mouse in/out events to the new event type 2016-08-26 10:18:01 +09:00
Jean-Philippe Andre edd88292a4 evas events: Switch mouse move event to the new event type (1)
This only modifies the proxy source handling code.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 56c682452c evas events: Switch mouse up/down to the new event type
This is getting trickier, as those events have a lot more
side effects and complexity than a simple wheel event...

Some code has been added that should be fixed in the following
commits.
2016-08-26 10:18:00 +09:00
Jean-Philippe Andre c1e7589c14 evas events: Switch key up/down event to new eo type 2016-08-26 10:18:00 +09:00
Jean-Philippe Andre 405680e836 evas events: Switch hold event to new eo type
Evas_Event_Hold is now barely used anywhere.
This also adds support for event_flags to this type.
2016-08-26 10:18:00 +09:00
Jean-Philippe Andre 290413543d evas events: Switch wheel event to the new type
For now this covers only the wheel event.

Note: This patch also modifies evas map to use double in an
internal function, rather than ints.
2016-08-26 10:18:00 +09:00
Cedric BAIL 0ef07d6095 eina: readdir_r has been deprecated.
So glibc has decided that readdir_r is hard to use safely and deprecated it
this summer. They recommand to use readdir, which was in the past unsafe to
use in a multi thread scenario, but is now on most system (and all system
we care, including our own implementation in evil). It is basically safe
as long the same DIRP is not accessed from another thread. This is true in
our code base, so we are fine to go with this.

For further reading: https://lwn.net/Articles/696474/
2016-08-25 15:23:14 -07:00
Jean Guyomarc'h 60215a5c53 evas-gl_cocoa: migrate to gl_generic infrastructure
It has been a long journey, but here we are at last...
The infamous gl_cocoa engine has been migrated to the
gl_generic infrastructure. This should provide great
improvements and hopefully reduce side-channels b0rkage.

Fonts seems better, scrolling is smoother, expedite
does not segfault anymore... I haven't found a
regression with elementary_test, elementary_config,
terminology, expedite.
2016-08-25 23:29:27 +02:00
Jean Guyomarc'h d8e488b1c8 evas-gl_cocoa: start refactoring for gl_generic 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h c2856b040a evas-gl_cocoa: remove unused code 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h 54b417fa30 evas-gl_cocoa: cleanup eng_setup 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h f4f94a9f79 evas-gl_cocoa: cleanup eng_info 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h 62c342c4e3 evas-gl_cocoa: init/shutdown cleanup 2016-08-25 21:41:17 +02:00
Derek Foreman e0c1f4a2a7 evas: Try harder to create the render thread
It's entirely possible that a system doesn't have a cpu 0, so
when we try to pin all our render threads onto processor 0 we
may fail.

This results in some very connfusing build breakage when
edje_cc hangs up because its render thread didn't start.

So, if starting the thread with affinity fails, let's try without
affinity.

(This is trivial to reproduce - just use sysfs to turn off cpu0
after boot.)

@fix
2016-08-24 14:34:36 -05:00
Gustavo Sverzut Barbieri f125942231 efl_net_dialer_http: use the proper error code
CURLcode is for curl_easy, while CURLMcode is for curl_multi.

Thanks to clang that spotted it.
2016-08-24 14:33:33 -03:00
Gustavo Sverzut Barbieri e3ee477140 efl_net: better handling for SOCK_CLOEXEC.
On systems where SOCK_CLOEXEC is supported, give it to socket() and if
accept4() is supported, then use it as well.

Otherwise revert to fcntl().
2016-08-24 12:34:59 -03:00
Gustavo Sverzut Barbieri 164d9ddfde Revert "ecore_con: use F_CLOEXEC instead of SOCK_CLOEXEC"
This reverts commit 99d37838f3.

will be fixed in a better way with the following commit.
2016-08-24 12:02:17 -03:00
Tom Hacohen a016ab751c Static deps unibreak: Update to latest git version.
This version reduces the number of dirty pages used by libunibreak.
Reference git hash: ad5a524b0128eec644a8cae52fb75ed1f597c0ee

@feature
2016-08-24 11:15:59 +01:00
Jean-Philippe Andre 44cff879a1 evas: Fix includes when enabling BETA but not EO API
This fixes the build for older versions of E.
2016-08-24 14:42:19 +09:00
Jean-Philippe Andre c507f56110 ecore_x: Early check image bpp based on depth
This fixes argb windows transparency in E software compositor.

My current problem is that I have no idea what changed, why this
is needed now, and how things could actually work before.

Fixes T4389

@fix
2016-08-24 14:42:16 +09:00
Carsten Haitzler 510c093602 efreet - convert crash into NULL mimes when no mime db found
so ok - efreet crashed letting you know you have a missing mimedb...
return NULL instead fixes T4425 :) - rememebr to kill your efreetd's
to get a new mimedb - log out and in will do that.
2016-08-24 10:00:50 +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 45c0002929 eina_slice: startswith and endswith.
these helpers around memcmp() make the code more readable.
2016-08-23 21:25:02 -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 220ef2eb21 efl_io_buffer: do not refer to sub-classes in its docs.
depending on the order of generation eolian was triggering some
errors. So stop refering to subclasses here.
2016-08-23 20:17:13 -03:00
Gustavo Sverzut Barbieri ba63432fdf efl.io.buffer: minor bugfix.
if no limit was set, do not resize buffer to 0.
2016-08-23 20:17:13 -03:00
Gustavo Sverzut Barbieri 9944c164bd eina_slice: fix multi-byte find function, add tests. 2016-08-23 20:17:13 -03:00
Derek Foreman ae83b96030 wayland_egl: Destroy gl context if engine info updated with NULL wl_surface
We set the wayland surface to NULL in engine info, then destroy the wayland
surface later.  The GL stack tries to render to the destroyed surface and
dies.

If we destroy the GL surface when we set the engine info (before we destroy
the wayland surface)it stops the GL stack from doing bad wayland calls.

This fixes a crash on exit, or when any window closes when using mali GL
drivers.  Surprisingly, Mesa was tolerant of this.
2016-08-23 15:27:06 -05:00
Jean Guyomarc'h 5d527fffc8 eina: remove references to win32 and winCE in threads 2016-08-23 21:15:25 +02:00
Jean Guyomarc'h 180b24f2a0 eina: fixtures on OSX semaphores
So actually there is quite a big issue with semaphores
on OSX. We use (named) POSIX semaphores, but this was
a (my) mistake... I'll fix it later...
The real issue is that named semaphore are persistants:
when the program dies, it stays alive. This is pretty
bad with eina_debug_monitor because we create a semaphore
we never release, due to a wild thread...

This leak of semaphores went unnoticed before commit
4a40ff95de because the
name of the semaphore was unique per process, and
overriden when another process was launched. This
was very bad, but saved us from overflowing the
semaphore pool. It is now overflowed pretty fast when
building a lot EFL, because of Eolian that runs A LOT!

So that's one problem that still needs to be fixed,
by using OSX' own semaphores (see T4423).
Another big issue, which is now fixed is that the
buffer in which we generated the semaphore ID was
too small, and therefore we were reduced to one shared
semaphore for a whole process... This buffer has been
now set to 31 characters, which seems to be the maximum
length of a semaphore ID.

So now things are better, but still with a deadly issue.
2016-08-23 21:15:25 +02:00
Jean Guyomarc'h 469cf26873 evas: handle thread queue creation failure
eina_thread_queue_create() might fail.
Actually it does fail on Mac OS X under
some circumstances.
2016-08-23 21:15:24 +02:00
Jean Guyomarc'h b3c8470024 eina: fix eina_btlog for older osx versions
Older Mac OS X deprecated the default atos.
This patch adds support for Mavericks (and
maybe Yosemite as well).
2016-08-23 21:15:24 +02:00
Jean Guyomarc'h 99d37838f3 ecore_con: use F_CLOEXEC instead of SOCK_CLOEXEC
Mac OS X does not provide SOCK_CLOEXEC. Instead, we can use
fcntl() with F_CLOEXEC.
Fixes Mac OS X build.
2016-08-23 21:15:16 +02:00
Jean Guyomarc'h 0ced470e39 ecore_con: fix compiling on OSX and BSD
TCP_CORK is Linux only. TCP_NOPUSH is supposed to
do the same thing than TCP_CORK, but on BSD (including
Mac OS X).

We now check for the existance of TCP_CORK or TCP_NOPUSH,
and use the right option. If none exist, cork_{set,get}
will just fail.
2016-08-23 20:28:44 +02: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
Tom Hacohen 199737add5 Eolian: Fix tests according to recent eolian changes. 2016-08-23 14:47:28 +01:00
Daniel Kolesa b24342e783 eolian gen: don't generate events in eo.c 2016-08-23 14:47:28 +01:00
Tom Hacohen a6f126af12 Efl object: Don't pass events to eo class creation.
This was never used and there is no plan to ever use it. I'm going to
soon add a different mechanism with which it will be possible to provide
them again to Eo if ever needed without breaking ABI. Though it's
unlikely it will ever be.
2016-08-23 14:47:28 +01:00
Gustavo Sverzut Barbieri 12850d4e25 remove EINA_ERROR_TIMEOUT
As pointed out in the mailing list, it was introduced in this release,
so it's better to remove the symbol instead of deprecating it.

People should use ETIMEDOUT directly.
2016-08-23 10:14:17 -03:00
Daniel Kolesa 1c78d2196b eolian: enforce no get/set as method/property name rule
Fixes T3849.
2016-08-23 13:44:18 +01:00
Daniel Kolesa df74455ec9 eolian gen: include return type in event docs
Fixes T4393.
2016-08-23 12:06:28 +01:00
Jihoon Kim c37da6dd42 elm_entry: Add more description about key event in return_key_type_set
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
2016-08-23 17:11:01 +09:00
Jihoon Kim 9dee7cf359 ecore_imf: Add more description about key event in return_key_type_set
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
2016-08-23 17:09:41 +09:00
Jihoon Kim 4675edfcf9 elput: Fix typo in doxygen
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
2016-08-23 14:55:50 +09: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
Carsten Haitzler 56c52311e5 efreet - fix efreet_*_dir_get() to support the xdg env vars
these api's didnt respect the env vars xdg dictates should override
the xdg dirs for that process. this fixes this and uses them if set

@fix
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 535f111bfa fixup: efl-net 2016-08-22 18:51:19 -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
Gustavo Sverzut Barbieri 0d96ba9734 binbuf, strbuf and ustrbuf: add slice_get() and rw_slice_get(). 2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri 77faebde67 eina_stringshare: add slice_get() 2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri 9062bbd8e0 eina: introduce Eina_Slice and Eina_Rw_Slice.
A plain simple pointer + length describing a linear memory region.
2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri 8906461b48 eina_types.eot: expose Eina.Binbuf 2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri 76149efc8b eina_types.eot: expose Eina.Error 2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri 602a98c8b9 eina_error: provide a fallback when strerror_r() is not available. 2016-08-22 18:25:14 -03:00
Prateek Thakur 9348a84aa0 ecore_con: add '\0' termination to path.
Summary:
Copying from string 'buf' of length 4095 to '&socket_unix.sun_path[0]'
may form a non-terminated C string of size 108. So added null termination.

Signed-off-by: Prateek Thakur <prateek.th@samsung.com>

Reviewers: cedric, thiepha

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-08-22 11:04:13 -07:00
Artem Popov d8cab9347a ecore_evas_ews: add proper clean up when quit the func
@fix

Summary: add proper clean up when quit the func (as per Raster comment)

Reviewers: cedric, raster, jpeg, barbieri

Reviewed By: barbieri

Subscribers: raster, NikaWhite, myoungwoon, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-08-22 11:04:13 -07:00
Jean Guyomarc'h 26a26f2304 eina: fix use of strerror_r()
So, first, the wrong strerror_r() was detected on
Mac OS X. Instead of using a complex set of macros
to try to detect which strerror_r() to use, when
it is defined, let the autotools handle that clerverness
for us.
2016-08-22 20:02:02 +02:00
Jean Guyomarc'h 4285fc1dda edje: fix warning raised by clang
Clang was not happy with the initialization of
the structure.
2016-08-22 19:57:06 +02:00
Jean Guyomarc'h 84679d3173 evas-gl_cocoa: fix crashes at engine startup
Recently, the gl_cocoa engine started to crash at
startup. glGetIntegerv() in gl_common was called
without any gl context, and therefore segfaulted.

We now make sure it is called after a gl context
has been created and used.

Thanks jpeg for troubleshooting.

Fixes T4402
2016-08-22 19:56:08 +02:00
Derek Foreman a71b688b10 evas_engines: Update remaining enges for damage_region_set callback
I missed several engines when I changed this.

Make sure they all build.
2016-08-22 08:39:44 -05:00
Marcel Hollerbach ce89c06cb0 edje_cc: add snapshot to the lazedc symbols
there where comments and documentation about it, but no code.

This is some kind on follow up on a7fd98f8f6.

@fix
2016-08-22 09:24:18 +02:00
Carsten Haitzler 39e3a06fd5 edje - cut another 120k or so off memory usage by using direct hash add
so every collection we add to the eina has of collections... we just
did eina_hash_add - this isn't quite good. because we use eina_file
and mmap the edje file. we COULd use the strings straigh fromt he edje
filer dictionary and not actually allocate private heap memory - thus
sharing all those strings. this was silly, and this saves about
another 120k of memory with the default theme as it has about 1500 or
so collections in it... and these strings add up fast.

@optimize
2016-08-21 11:37:22 +09:00
Carsten Haitzler 419f84907b edje - fix missing vector field frees, copies, handling etc.
it seems vector type parts were not handled all that well. we had at
least one mem leak with the vector mempool never being freed... so i
filled in various missing points where vector parts were not being
handled right.

@fix
2016-08-21 11:30:45 +09:00
Carsten Haitzler 6139c7a3c6 edje - reduce anothr 400k or so of memory usage (esp hello world)
so edje was allocating 32 pointers per collection. this is per
collection inside an edje file even if we just use one collection from
that edje file. it consumes 32 pointers. on 64bit thats 256 bytes...
just for pointers to mempools so we can "optimize" freeing and
allocation of parts. this was simply rediculous. i moved it to a
sub-struct allocated on demand (so now only for collections we
actually use) and this nuked 400k of "base memory usage youcant get
rid of).

note that our current default theme has something like 1100 or so
images, 1500 or so collections in it. as theme gorws, memory footprint
goes up if we dont allocation only on demand (when needed/used) and we
aren't careful about the size of our data structs and their content.

@optimize
2016-08-21 11:14:28 +09:00
Jean Guyomarc'h 52295607e5 evas-engines: fix compiling of the fb engine
Build was broken after commit 0c21a926a3
which changed an internal API.
2016-08-20 14:06:27 +02:00
Derek Foreman 0774088c90 wayland_egl: Fix EGL_KHR_Partial_Update usage
Use the new damage region set callback to do partial updates that actually
work.  Fixes gl rendering on mali.

@fix
2016-08-19 16:26:32 -05:00
Derek Foreman 0c21a926a3 engines: Add a damage_region_set callback
To properly implement EGL_KHR_partial_update we need to know the buffer
damage before any drawing operations take place.  Add a new callback to
software_generic that takes place after combining of surface damage and
swap mode when we actually have this available.

Note: This means the three copy pasta implementations of
EGL_KHR_partial_update scattered around the tree are all wrong.  bummer.
2016-08-19 16:26:20 -05:00
Derek Foreman 20f9acdf19 wayland_shm: Fix dmabuf orientation
So apparently when dmabuf support went into weston it went in with a
Y axis inversion that has since been corrected.

This updates our code to match.
2016-08-19 14:51:55 -05:00
Cedric BAIL 552db73ac4 eina_cxx: change strings to match new returned system string. 2016-08-19 10:17:15 -07:00
Daniel Kolesa 4d701bca2e docs: generate reference pages for codelink 2016-08-19 14:39:37 +01:00
Daniel Kolesa feafdb85a4 docs: generate keyword-link.txt for codelink 2016-08-19 14:19:09 +01:00
Daniel Kolesa 1e42cae8a2 docs: fix invalid links in class reference table 2016-08-19 13:59:55 +01:00
jiin.moon c54bd44790 emile: fix jpeg loader broken with orientation
Summary:
After applying a patch regarding region, side-effect detected.

Fixes T4390

Test Plan: make check

Reviewers: jpeg, cedric, jypark

Maniphest Tasks: T4390

Differential Revision: https://phab.enlightenment.org/D4245
2016-08-19 15:19:08 +09:00
Carsten Haitzler 4a2f14638f efreetd - only open log file is env var is set to do so
set EFREETD_LOG to something to get efreetd to log. otherwise efretd
log files can end up rather larth and since they go in xdg_runtimedir
- thats mostly a ramdisk... they eat actual ram. so save a lot of
memory and only log if asked to.

@fix
2016-08-19 11:48:29 +09:00
Carsten Haitzler a739d4d7da evas software downscaler - get about 1.8x to 3x speedups for cases
this speeds up downscaling of images by somewhere between 1.8 to 3x
dpeending on case and cpu etc. - this is ONLY for downscaling of an
image buffer betweeb 50% width and/or height up to 100% of width and
height. it's a special case optimization that cuts down the complexity
of the full super sampling filter to just do a bilinear interpolation
which is actually strictly correct for this size range and shouldn't
drop quality. it uses fixed point (16.16) to do the sup pixel sampling.

no mmx/asse or neon, but we could actually easily use it as we do use
mmx/ee and neon in the bilinear upscaler to do interpolation so this
would work here too. it just requires time and effort to make yet 2x
more special cases and use the ASM to do the hard slog here.

@optimize
2016-08-19 11:08:55 +09:00
Gustavo Sverzut Barbieri e56811ed4d eina_error: allow errno.h codes.
we have some duplication of errors between Eina_Error and errno.h,
however we should use Eina_Error to extend the traditional errno.h
system.

then change eina_error_msg_register() and
eina_error_msg_static_register() to return a magic bit to state the
number was registered, and on other functions test this bit in order
to operate on registered values, otherwise fallback to errno.h, such
as strerror().

It also deprecates 2 clear duplicated errors:

- EINA_ERROR_OUT_OF_MEMORY -> ENOMEM

- EINA_ERROR_TIMEOUT -> ETIMEDOUT

There are two details when using strerror():

 - old behavior did not return strings for non-error, such as
   "Success" or "Unknown error ${N}"

 - thread-safety issues: since we must be thread safe, then use
   strerror_r() and eina_stringshare_add() that value, keeping a hash
   of cached values
2016-08-18 13:36:05 -03:00
Daniel Kolesa 8a74f38071 docs: add include flag verification 2016-08-18 15:12:24 +01:00
Daniel Kolesa 8ff134472e docs: add writer support for include plugin 2016-08-18 14:50:24 +01:00
Youngbok Shin 36d086ec42 Evas text: fix RTL text ellipsis issues
Summary:
Visual position of ellipsis item should be set according to
its bidi direction. But, by setting visual position in same way
as logical position, the end ellipsis could be put opposite side.
Also, start ellipsis must placed on left side of RTL text.
@fix T3187

Test Plan: Test an sample on T3187

Reviewers: tasn, woohyun, herdsman

Subscribers: raster, Blackmole, z-wony, cedric, jpeg, minudf

Maniphest Tasks: T3187

Differential Revision: https://phab.enlightenment.org/D3769
2016-08-18 14:39:41 +03:00
Youngbok Shin b915d29cd1 Elementary: Load image for image item with proper orientation
Summary:
Image files can have orientation information. Elm Entry have to
call evas_object_image_load_orientation_set() for showing image
with proper orientation.

Test Plan: N/A

Reviewers: herdsman, raster, jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4244
2016-08-18 14:09:16 +03:00
Youngbok Shin 167d41e7b2 Evas Text: parse font string everytime for updating lang properly
Summary:
We can't assume the given font is same with current fdesc by comparing string.
Since Evas starts to supporting "auto" for language,
the given font string should be parsed once before comparing it.
@fix

Test Plan: N/A

Reviewers: tasn, raster, cedric, herdsman

Subscribers: jpeg, minudf, z-wony, Blackmole, woohyun

Differential Revision: https://phab.enlightenment.org/D4227
2016-08-18 13:33:08 +03:00
Carsten Haitzler 4be972c41c ejde - fix recalc single min n edje for h eval
this fixes a seemingly small typo that would only turn up with fixed
point, but not floats as we have by default whwere we had
  x = 999;
instead of
  x = FROM_INT(999);

shouldn't be visibule unless you disable float support and use fixed
point in edje.
2016-08-18 14:21:08 +09:00
Carsten Haitzler 6f9f361f3e edje - solve crash issues brought on by optimization of edje mem usage
this solves a crash brought on by 1d6a58cfc9
that optimized mem usage but seems to have created issues in empc.

fixes T4382
2016-08-18 14:21:08 +09:00
Gustavo Sverzut Barbieri c88b027dc1 efl_loop_user: error if parent is not a loop provider.
it was silently ignoring the parent, which led me to hours trying to
investigate why my code wasn't working just to realize my parent
wasn't being assigned and refcounts were screwed.
2016-08-18 02:13:32 -03:00
Gustavo Sverzut Barbieri e3e0a6bd65 eolian: gracefully handle incorrect case of inherit.
If you use "EFl" instead of "Efl", it will find the proper file, but
won't find the type... crashing.

Handle that case and hint the user about it.
2016-08-18 02:13:19 -03:00
Jihoon Kim 0e35f8454e edje_entry: Make a result of retrieve_surrounding_cb secure
Summary:
Regardless of the password mode of Entry,
_edje_entry_imf_retrieve_surrounding_cb alwalys passes plain_text
to any callers who register that callback.

This commit replace plain text with '*'
because current behavior could be a security hole in some case.

Reviewers: woohyun, id213sin, jihoon

Reviewed By: jihoon

Subscribers: cedric, jsuya, z-wony, jpeg

Differential Revision: https://phab.enlightenment.org/D4238
2016-08-18 10:40:24 +09: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
Derek Foreman 7828d0e072 wayland_egl: Fix rendering on systems without buffer age
If buffer age isn't present we really want to return MODE_FULL, but we were
previously returning MODE_AUTO.

On recent mali drivers this resulted in accidental partial updates leading
to incorrect rendering.
2016-08-17 16:24:05 -05:00
Derek Foreman 6ce113791e wayland_egl: Remove swap_mode from engine info
This was never set anywhere and always defaulted to 0, or AUTO
2016-08-17 16:21:29 -05: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
Daniel Kolesa 2bee9169d9 docs: move all of serializers to doctree 2016-08-17 13:50:01 +01:00
Daniel Kolesa d11cc5ddb5 docs: move type serializer into doctree 2016-08-17 13:42:29 +01:00
Daniel Kolesa 066a2f9fd7 docs: move type cstr retrieval to doctree 2016-08-17 13:34:20 +01:00
Tom Hacohen b623d89b01 Efl Object: Make event description arrays const.
This was an oversight. They should have been const arrays, and not just arrays
of pointers to const items.
2016-08-17 12:03:49 +01:00
Minkyoung Kim 042e94f10d evas/gl_x11 : Add multiple_buffer member in native surface x11 type union.
Summary:
If native surface is multiple buffer pixmap such as named pixmap, Evas should recreate eglImage everyframe.
Because DDK get the buffer ID once at eglImageCreate time.
So if internal buffer ID is changed, should recreate eglImage.

Test Plan: Wearable Tizen.

Reviewers: wonsik, raster, cedric, jpeg

Reviewed By: jpeg

Subscribers: spacegrapher, dkdk, cedric

Differential Revision: https://phab.enlightenment.org/D4211
2016-08-17 17:56:17 +09:00
Jean-Philippe Andre be5381960b evas: Fix BMP load with region set and scale down
This fixes usage of photocam on large BMP images.
Follows previous commits by @jiin.moon.
2016-08-17 17:28:53 +09:00
Jean-Philippe Andre 0193e40d8c evas: Fix region test in jpeg load with region + zoom
The previous commit exposed an issue with the region test
does not take into account the scale down factor.

Not a @fix in itself, as it depends on the previous patch.
2016-08-17 17:28:53 +09:00
jiin.moon fecbcf8a90 emile: region_set does not working in jpeg loader if scale_down has set
Summary:
If both region and scale_down has set, ERR would be returned by loader of jpeg.

@fix

Test Plan: sample code

Reviewers: raster, jypark, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4200
2016-08-17 17:28:53 +09:00
Jean-Philippe Andre 3bdefaf31f photocam: Fix region load + scale down options
I have no idea how photocam even worked before. @jiin.moon
exposed a major issue in photocam by fixing how the jpg loader
scale down + region load combination works.

@fix
2016-08-17 17:28:53 +09:00
jiin.moon 922a1bcd9e evas: Add support for region load with PNG files
Summary:
PNG loader support  region_set when decoding
@feature

Reviewers: cedric, jpeg, jypark, raster

Subscribers: raster

Differential Revision: https://phab.enlightenment.org/D4165
2016-08-17 17:28:53 +09:00
jiin.moon a76fd7b37e evas: Support region_set for BMP image
Summary:
1) BMP loader support region decoding.
     @feature

2) Fix an issue what BMP loader can't decode an 16bit image with bit field
    @fix

Test Plan: attached sample codes

Reviewers: cedric, jpeg, jypark

Differential Revision: https://phab.enlightenment.org/D4228
2016-08-17 17:28:53 +09:00
Stefan Schmidt dc0416fade evas: mark unused function parameter as such 2016-08-17 09:57:08 +02:00
Jean-Philippe Andre 49037bc7e9 evas: Fix hold events
This fixes a crash with thumbscroll.

Fixes https://phab.enlightenment.org/T4378
2016-08-17 14:37:50 +09:00
Jean-Philippe Andre 6d6e41c5c9 evas: Fix mouse inputs when also listening to multi
Since the new event type is the same for multi and single
touch (finger id is the only difference), multi touch listeners
would get triggered even for single mouse events.

Fixes https://phab.enlightenment.org/T4345
Fixes https://phab.enlightenment.org/T4378

This raises a question though: How do we want to differentiate
between single & multi touch events in the eo interfaces?
2016-08-17 13:13:23 +09:00
Tom Hacohen b3dd735be7 Efl Object: Change and rename the type we use for function pointers.
Rename the type to something more sensible and change it to remove the
last remanent of Eo1. This fixes a fixme that has been there for a
while.

The type doesn't really matter, it just looks nicer with the va_list.
2016-08-16 16:29:21 +01:00
Tom Hacohen 28c80f9122 Efl object: implement CoW for the function vtables
This commit implements a sort of CoW for the vtables. The vtables are
usually just linked to and refcounted. When we need to change them we
allocate new ones and copy them over so we can write to them.

I wrote some code to measure the effectiveness of this change. When
running elementary_test (and immediately exiting) I saw that out of the
total number of vtable chains (561) that were needed by the classes in
the EFL, 79 (14.08%) were reused. Considering that I had to add
refcounting (unsigned short, but let's consider it's the size of a word
because of alignment), I would calculate the saving as such (in bytes):

Number of items in a chain (refcounted block): 32

32 bit:
sizeof(chain_node) = 8
Mem wasted on refcounting: 561 * 4 = 2244
Mem saved because of sharing: 79 * (32 * 8) = 20224
Total save: 17980 bytes

64 bit:
sizeof(chain_node) = 16
Mem wasted on refcounting: 561 * 8 = 4488
Mem saved because of sharing: 79 * (32 * 16) = 40448
Total save: 35960 bytes

Wow, we use a lot of memory in Eo classes, I'm sure we can
save even more if we put our hearts into it (change the shareable units
        to be smaller to increase the chance of sharing).
This is internal and doesn't affect API/ABI so we can change this even
further with time.

This also improves efl_object_override(). This should now be quite
memory efficient (don't abuse, but it's not a big hogg as it was), so
feel free to abuse that one and rely on it in API.

@feature
2016-08-16 16:29:21 +01:00
Stefan Schmidt 31f289ff4c evas: engine: remove set but unused variable 2016-08-16 16:22:06 +02:00
Daniel Kolesa e1a4274e97 docs: add Type to doctree and remove direct eolian api usages 2016-08-16 14:53:04 +01:00
Daniel Kolesa e592f774ca docs: reduce the Expression API to just what's necessary 2016-08-16 14:39:04 +01:00
Daniel Kolesa 206d323281 docs: add Expression node type 2016-08-16 14:37:45 +01:00
Jean-Philippe Andre 6d52d1db2b evas: Fix ordering of input event
The previous patch 1185c40e50 shows how having
two event types for the same thing (key or mouse input events)
was a bad idea. The only guaranteed order of callbacks is the
priority but even that was not enforced (since legacy or eo
style event had to come first).

Fixes T4310
2016-08-16 20:22:57 +09:00
Jean-Philippe Andre ae3ac0cd25 edje: Allow no_render in description
Previously, it was limited to the part block. It was a mistake
and should have been put in the description instead, as this
allows it to change during state transition (like visible, or
proxy_src_visible).

@feature
2016-08-16 20:08:32 +09:00
Jean-Philippe Andre 114c22f409 elm: Remove _EFL_APP_VERSION_SET from ELM_MAIN
This macro is behind a BETA ifdef. Shouldn't be used here,
unless we want to remove the beta flag and stabilize
efl_build_version_set() now.

Thanks Stefan for the report.

@fix
2016-08-16 18:26:36 +09:00
Jean-Philippe Andre 3aa7674666 win: Mark two properties as eo-only
Why aren't those functions implemented yet?

@fix
2016-08-16 18:01:39 +09:00
Jean-Philippe Andre 87d1b3f7c4 elm: Hide new init APIs behind BETA tag
This places the following behind beta:
- efl_quicklaunch_fallback
- efl_build_version_set

I don't think EFL_MAIN would have worked without BETA API support,
so no need to expose those for now.

@fix
2016-08-16 17:33:05 +09:00
Jean-Philippe Andre c916e518d9 glview: Mark draw_request as eo-only
This is a rename of changed_set, not a new function.

@fix
2016-08-16 17:06:48 +09:00
Jee-Yong Um 30ec592638 elementary: remove redundant parts_text_fix from Elm.Layout
Summary:
When a theme is loaded, Elm.Layout updates strings with new theme.
This adjustment will be performed by Edje. (See D4219)

Reviewers: cedric, jpeg

Subscribers: taxi2se

Differential Revision: https://phab.enlightenment.org/D4220
2016-08-16 16:14:21 +09:00
Jee-Yong Um 4fc6d3cf90 edje: resolve user defined string with type
Summary: Resolve Edje_User_Defined string with type (normal/escaped/unescaped)

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4219
2016-08-16 16:14:21 +09:00
Jean-Philippe Andre d5da8d31ce gl: Fix usage of GLX/EGL/GL extensions
This is reverts:
e4c641ed1e
  build fix
19eb7b727fbf35620a13fb65b50d3056a484360e:
  glx: Fix black windows in E on nvidia

For all extension functions, we need to match with the extension itself
since GetProcAddress() can return a non-NULL value even when the function
does not exist. Drivers can do a runtime mapping depending on the
context. So, we only trust the return value of GetProcAddress() when
we know for sure that the extension exists.

Thus, if a symbol exists we will always prefer it rather than relying
on GetProcAddress().

Also, glGetString(GL_EXTENSIONS) is now deprecated so we're lucky
it still works most of the time. glGetStringi() should be used
instead. This patch changes some of the use cases, but not all.

Fixes T3030 (again)
Fixes T4288

@fix
2016-08-16 16:14:21 +09:00
Jean-Philippe Andre cb24d5f489 eina: Set EINA_ERROR_TIMEOUT to cond_timedwait
This adds a new error code.

I'm using a weak symbol (were supported, ie GCC on linux) for
some kind of forward compatibility.

Fixes T1780

@feature
2016-08-16 16:14:21 +09:00
Jean-Philippe Andre 67ab4e3b4d eina: Move EWAPI and EAPI_WEAK to Eina.h from Eo.h
So it may be used outside EO (eina error is what I have in mind).
I believe it doesn't need to be redefined in all EFL libs, especially
since it's not used on Windows yet.
2016-08-16 16:14:21 +09:00
JEONGHYUN YUN f00c078b9b elm_panel : add a toggled event triggered when panel toggled in any way.
Summary:
There are 2 ways to toogle the panel, by using elm_panel_toggle API and by interaction such as flick or click on panel.
This toggled event can help us to know the time when the panel toggled by all case.

Reviewers: woohyun, kimcinoo, Hermet, jypark

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4180
2016-08-16 16:14:21 +09:00
Jean-Philippe Andre 8fb2dca520 evas: Implement GL map/unmap for the simple case
Most of the code relies on the software generic engine
implementation, using inheritance between engines.

This fixes expedite image map RGBA test.
2016-08-16 16:14:21 +09:00
Jinyong Park 471a328ea0 edje_embryo: add function to know swallow has object
Summary:
Using edc script, there is no way to know evas object is set on swallow part or not.
So, to know that, some elm widget send signal and save some information to edc variables when object is set on swallow part.
I think it is helpful to make better edc script.

@feature

Reviewers: herb, cedric, raster, id213sin, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4176
2016-08-16 16:14:21 +09:00
Jee-Yong Um 14ff664b76 edje: clean up APIs
- convert methods to property setter/getter
- remove "values" block when getter returns read_only value
- fit the type of params of eo funcs to those of legacy APIs
2016-08-16 15:38:42 +09:00
Jee-Yong Um 1df890d51a edje: clean up part text item APIs 2016-08-16 15:38:42 +09:00
Jee-Yong Um afc04302ed edje: clean up part text anchor APIs 2016-08-16 15:38:42 +09:00
Jee-Yong Um 69ffbbb3eb edje: clean up part text input panel APIs 2016-08-16 15:38:42 +09:00
Jee-Yong Um 5c989481b7 edje: clean up part text imf context APIs 2016-08-16 15:38:42 +09:00
Jee-Yong Um fcc7bbcf97 edje: clean up part text select APIs 2016-08-16 15:38:42 +09:00
Jee-Yong Um 90b20e4da1 edje: clean up part text cursor APIs 2016-08-16 15:38:42 +09:00
Jee-Yong Um 7621e28ca4 edje: clean up part text APIs 2016-08-16 15:38:42 +09:00
Jee-Yong Um 42750beba4 edje: clean up part external APIs 2016-08-16 15:38:42 +09:00
Jee-Yong Um 7299933359 edje: fix reference error of part drag APIs 2016-08-16 15:38:42 +09:00
Jee-Yong Um 504f43698e edje: clean up part drag APIs 2016-08-16 15:38:42 +09:00
Jee-Yong Um 080d5cef11 edje: clean up part basic APIs 2016-08-16 15:38:42 +09:00
Jee-Yong Um c772bb0390 edje: group methods in edje_object.eo 2016-08-16 15:38:42 +09:00
Jean-Philippe Andre 9fbb5e0e5d evas: Fix potential memleak in event info objects
The new event info being an eo object, it needs to be properly
cleaned. I believe this memleak would not show up much in massif
or other checking tools, as it's a stringshare leak. Also, most
of those event objects will in fact be reused and never deleted.

@fix (backported as c58e293d34)
2016-08-16 15:34:33 +09:00
Carsten Haitzler 40250fda22 evas gl x11 engine - fix buffer age symbol find and use
it serems some changes broke our buffer age querying - we were using
the wrong symbol... the EXT or ARGB onenot the core one which does
work. use that first. then we get buffer age.

@fix
2016-08-16 15:19:21 +09:00
Thiep Ha fb15910640 elm video: correct api
The elm_videfl_add should be elm_video_add.
It was changed by commit e65aae994e.
This commit brings it back.
2016-08-16 12:36:26 +09:00
Sungmin Kwak bf2755efef ecore_imf: fix typo
Change-Id: I2660fa96a0525fcdf9e83e9eb33f449c282f6581
2016-08-16 08:26:23 +09:00
Felipe Magno de Almeida f8a6568d5c eolian-cxx: Fix compilation break with Eo rename to EFL 2016-08-15 15:14:53 -03:00
Daniel Kolesa ef8a66a41d docs: correctly wrap struct/enum fields in doctree 2016-08-15 15:12:34 +01: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
Daniel Kolesa 35abb3c34d docs: add Typedecl to doctree 2016-08-15 15:04:04 +01:00
Daniel Kolesa 570437c64e docs: use the variable getters in all places 2016-08-15 14:45:36 +01:00
Daniel Kolesa c98df1c586 docs: add static getters for wrapped variables 2016-08-15 14:41:59 +01:00
Daniel Kolesa f43b8e24cc docs: initial Variable in doctree 2016-08-15 14:36:24 +01:00
Daniel Kolesa 5a00524a8b docs: no need to include eolian in stats 2016-08-15 14:26:19 +01:00
Daniel Kolesa c122992884 docs: remove the mappings module 2016-08-15 14:25:04 +01:00
Daniel Kolesa c910db509a docs: add method to get parameter's direction name 2016-08-15 14:18:36 +01:00
Vyacheslav Reutskiy 5135867218 elm_genlist: unhighlight item if it not selected
Summary:
Main trouble in handle click and double click event.
If user hold Esc and do double click on genlist item,
it still highlighted but not selected, because between
click and double click genlist process a key down event.
This patch add check the item state on mouse up, check
a item state - if item highlighted but not selected,
unhighlight it.

@fix
Fixes T3986

Test Plan:
1. run elementary_test Genlist
2. hold ESC
3. double-click on few genlist items

Reviewers: raster, cedric, NikaWhite

Subscribers: seoz, jpeg

Maniphest Tasks: T3986

Differential Revision: https://phab.enlightenment.org/D4222
2016-08-15 16:16:52 +03:00
Daniel Kolesa 3e92d64808 docs: generic namespace generator in Node 2016-08-15 14:14:33 +01:00
Daniel Kolesa bd944a377b docs: remove some direct eolian api usages 2016-08-15 14:06:20 +01:00
Daniel Kolesa 6f10cb94cd docs: wrap func params in doctree 2016-08-15 14:03:53 +01:00
Daniel Kolesa b6d869c3f3 docs: move all eolian init logic into doctree 2016-08-15 13:53:01 +01:00
Daniel Kolesa e9ddce647c docs: abstract away directory scan 2016-08-15 13:50:32 +01:00
Daniel Kolesa c17ee4027a docs: abstract away object scope enum 2016-08-15 13:48:13 +01:00
Daniel Kolesa 4761f31687 docs: remove some unused funcs in docgen 2016-08-15 13:43:25 +01:00
Daniel Kolesa c32a8ff125 docs: integrate fallback func doc into Function 2016-08-15 13:38:53 +01:00
Daniel Kolesa aa5068d1e2 eolian tests: fix reference file after beta in legacy change 2016-08-15 12:50:52 +01:00
Carsten Haitzler 6728822e91 evas smart obj - handle invalid object id's when scop data get is NULL
handle smart member add if the object is invalid withotu crashing.
also don't abort and crash with other invalid states like of smart
object or child is to be deleted, has no layer etc. - continue on
safely without a crash.

@fix
2016-08-15 11:40:31 +09:00
Carsten Haitzler e7d56e9ece evas table - handle recursive access to cols/rows where child frees
thsi fixes invalid memory access to already freed memory in a parent
call where a child freed it by reference counting the struct to
ensuire it stays alive in the parent func using it.

@fix
2016-08-15 11:30:23 +09:00
Carsten Haitzler 1d6a58cfc9 edje - save memory on edje parts as a lot of over-allocation was done
so ... Edje_Calc_Params was huge ... like about 200 bytes. every part
in every live edje object got one of these in addtion to real part
struct info etc. ... so really every part was probably consuming
300-500 bytes or so... crazy. so i made a lot of the data now optional
so only the minimum required is allocated now which cuts down about 110
or even 120 bytes per part, depending. 100 bytes was needed for 3d
node parts even though almsot no parts are 3d node parts... the image
and text data was 30-40 bytes so we consumed 100 even if we only used
30-40... so this cuts that done and puts in polace calc param cleanup
funcs everywhere they are needed to clean up this extra allocated data.

i also reduced this even more by maping pointers to req_drag, map and
physics and clip_to fields in another extension struct cutting
down another 28/52 bytes on most parts (in  return for an added
4/8 bytes - on 32/64bit accordingly).

in elementary_test this saves about ~300kb of ram for just having the
etst run and displaying (peak memory measuremment). so massif says
10.6M -> 10.3M.

@optimize
2016-08-15 09:21:08 +09:00
Jean Guyomarc'h a5232bb283 elementary: fix documentation for elm_prefs
Update API references and code example.
2016-08-14 18:57:12 +02:00
Carsten Haitzler 0779adcf0b edje - remove unused fields from part desc and calc params
fill spread and angle have never been used - resevred intitially for
gradient objects, but never put into use, so remove to get rid of
junk/memory footprint etc.

@optimize
2016-08-14 13:51:52 +09:00
Carsten Haitzler 749bc23231 edje - replace eina list with eina inlist to save mem and performance
edje was keeping every edje object created in an eina list so it could
access them later. not really great when every list node contains at
least 4 pointers (data, next, prev and accounting, possibly magic
too). also ever time an edje object is deleted it has to remove from
this list which means... walking the list to where the obj is... not
great. replace with an inlist which is just 3 ptrs, no extra pressure
on list pool and removal os O(1) too.

@optimize
2016-08-14 12:25:59 +09:00
Carsten Haitzler d86f73f9e6 elm win - fix elm win center to actually center again
@fix
2016-08-13 23:08:01 +09:00
Carsten Haitzler fd228ae6c5 efl api release - fix elm win accel preference set in legacy api
this shouldnt exist in legacy api as its not settable after creation.
it's useful only for eo constructors before finalize
2016-08-13 22:51:38 +09:00
Carsten Haitzler 2358417277 efl api release - fix @since for evas test filter program/source set api 2016-08-13 12:15:19 +09:00