platform/upstream/efl.git
6 years agoevas cseve - check msgsize before using - coverity
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 03:03:37 +0000 (12:03 +0900)]
evas cseve - check msgsize before using - coverity

fix CID 1039568

6 years agoelm atspi - fix checking return of eldbus_message_iter_arguments_get
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:57:06 +0000 (11:57 +0900)]
elm atspi - fix checking return of eldbus_message_iter_arguments_get

fix coverity CID 1353590

6 years agoelm config - fix eina value setting to check get return
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:52:42 +0000 (11:52 +0900)]
elm config - fix eina value setting to check get return

fix CID 1357139

6 years agoevas ector gl - fix leak of image data on data put
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:47:55 +0000 (11:47 +0900)]
evas ector gl - fix leak of image data on data put

@fix

fix coverity found leak CID 1374645

6 years agoevas ector gl - make coverity happy about leaks on data put
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:45:30 +0000 (11:45 +0900)]
evas ector gl - make coverity happy about leaks on data put

fix CID 1374646

6 years agoeina debug - check write return values and complain on failure
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:39:39 +0000 (11:39 +0900)]
eina debug - check write return values and complain on failure

coverity - fix CID 1377521

6 years agoeina debug - check write return value and complain
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:31:17 +0000 (11:31 +0900)]
eina debug - check write return value and complain

makes coverity happy - CID 1377524

6 years agoefl debugd - check return of write func and report errors
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:21:37 +0000 (11:21 +0900)]
efl debugd - check return of write func and report errors

makes coverity happy and reports write errors... fix CID 1377525

6 years agoefl model - fix checking return of eina_accessor_data_get
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:07:12 +0000 (11:07 +0900)]
efl model - fix checking return of eina_accessor_data_get

coverity - fixes CID 1380995

6 years agoeio: do not copy memory for nothing.
Cedric Bail [Fri, 29 Sep 2017 01:22:32 +0000 (18:22 -0700)]
eio: do not copy memory for nothing.

6 years agoeio: use TIMESTAMP when meaningful.
Cedric Bail [Fri, 29 Sep 2017 01:21:18 +0000 (18:21 -0700)]
eio: use TIMESTAMP when meaningful.

6 years agoeio: migrate efl.io.manager.ls to use Eina_Future.
Cedric Bail [Fri, 29 Sep 2017 01:18:38 +0000 (18:18 -0700)]
eio: migrate efl.io.manager.ls to use Eina_Future.

6 years agoecore: allow other thread to write local data on a thread to increase utility.
Cedric Bail [Fri, 29 Sep 2017 01:17:57 +0000 (18:17 -0700)]
ecore: allow other thread to write local data on a thread to increase utility.

6 years agoelm widget - event legacy propagation - remove coverity warning
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 00:09:04 +0000 (09:09 +0900)]
elm widget - event legacy propagation - remove coverity warning

fix CID 1379920 - event_flags is actually never NULL or undefined in
the function logic. it's always set to point to the specific event
flags field depending on struct type or the function will return
before using the pointer.

6 years agoefl text markup - fix hex check to be or not and - found by coverity
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 00:03:04 +0000 (09:03 +0900)]
efl text markup - fix hex check to be or not and - found by coverity

fix CID 1381491

6 years agoefl ui focusable - remove pointless check of ptr already checked
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 00:00:43 +0000 (09:00 +0900)]
efl ui focusable - remove pointless check of ptr already checked

coverity fix CID 1381492

6 years agoeolian: fix tests after extra checks
Daniel Kolesa [Thu, 28 Sep 2017 21:25:12 +0000 (23:25 +0200)]
eolian: fix tests after extra checks

6 years agoeolian: validate inner types of complex types
Daniel Kolesa [Thu, 28 Sep 2017 21:22:05 +0000 (23:22 +0200)]
eolian: validate inner types of complex types

This makes sure the inner types are all correctly defined and
that freefuncs are actually correctly filled.

6 years agoeolian-cxx: Add optional parameter to lambda for unnamed proxy instantiation
Felipe Magno de Almeida [Thu, 28 Sep 2017 20:48:04 +0000 (17:48 -0300)]
eolian-cxx: Add optional parameter to lambda for unnamed proxy instantiation

6 years agoci: disable examples build for osx for now
Stefan Schmidt [Thu, 28 Sep 2017 20:35:13 +0000 (22:35 +0200)]
ci: disable examples build for osx for now

On the 10.12 build we regularly run into the maximum time limit for a
osx build job (45min?). Lets focus on the normal build for now.

6 years agoUi layout: support markup for efl_part()
Daniel Hirt [Thu, 28 Sep 2017 07:27:32 +0000 (10:27 +0300)]
Ui layout: support markup for efl_part()

Also implement markup_set/get for:
  - Efl.Ui.Frame
  - Efl.Ui.Slider

Users may choose between text_set/get and markup_set/get, depending on
whether they want to escape their text or not.

6 years agoCanvas layout: support markup for efl_part
Daniel Hirt [Thu, 28 Sep 2017 06:46:42 +0000 (09:46 +0300)]
Canvas layout: support markup for efl_part

Users can now do either:
   efl_text_set(efl_part(obj, "part"), "text");
   efl_text_markup_set(efl_part(obj, "part"), "text");

Also have efl_text_get/markup_get.

Using markup_set will allow to choose whether to set a markup or a text
to the text part.

6 years agoCanvas text: use EINA_UNUSED for unused variables
Daniel Hirt [Thu, 28 Sep 2017 16:29:35 +0000 (19:29 +0300)]
Canvas text: use EINA_UNUSED for unused variables

Nothing special here. No need to for the "(void) eo_obj".

6 years agoUi text: add test for Efl.Text.Markup
Daniel Hirt [Thu, 28 Sep 2017 16:26:41 +0000 (19:26 +0300)]
Ui text: add test for Efl.Text.Markup

6 years agoEfl text: add Efl.Text.Markup interface
Daniel Hirt [Mon, 25 Sep 2017 16:21:21 +0000 (19:21 +0300)]
Efl text: add Efl.Text.Markup interface

Adds basic markup operations for text objects, and implements it in
Efl.Canvas.Text.

Also, this adds the Efl.Text.Markup_Util class.
This utility class allows basic text-markup conversions.

@feature

6 years agoci: README: simple docs for the current CI setup
Stefan Schmidt [Thu, 28 Sep 2017 13:34:56 +0000 (15:34 +0200)]
ci: README: simple docs for the current CI setup

Describe what we currently do in terms of building on Travis and how
developer can do a local test with the docker build.

6 years agoci: initial travis CI support for Linux distros and MacOSX builds
Stefan Schmidt [Thu, 28 Sep 2017 13:26:55 +0000 (15:26 +0200)]
ci: initial travis CI support for Linux distros and MacOSX builds

This has been used by myself in a branch for a while now and it is time
to bring it into master as a base for all future CI related work.
I plan to use the same scripts and other bits for Jenkins as well as
other CI systems later on.

What we currently cover with this setup are linux builds for three
different distros and MacOSX builds for two different versions.

Travis will only be called when new commits get mirrored onto our GitHub
mirror (which only happens once an hour). Expect delays on these builds.

https://travis-ci.org/Enlightenment/efl

6 years agoelementary: atspi - fix dbus abort
Shinwoo Kim [Thu, 28 Sep 2017 11:08:25 +0000 (20:08 +0900)]
elementary: atspi - fix dbus abort

This patch set fix following abort occured on dbus side.

(gdb) bt
0   __GI_raise (sig=sig@entry=6)
1   __GI_abort ()
2   _dbus_abort ()
3   _dbus_warn_check_failed
4   dbus_message_iter_append_basic
5   append_basic
6   eldbus_message_iter_basic_append
7   _bridge_signal_send
8   _text_text_removed_send
9   _bridge_accessible_event_dispatch
10  _elm_interface_atspi_accessible_event_emit
11  elm_interface_atspi_accessible_event_emit
12  _entry_changed_user_signal_cb

(gdb) f 12
(gdb) p *$1
$2 = {change = {insert = {content = 0x0, pos = 0, plain_length = 1},
                del = {content = 0x0, start = 0, end = 1}},
      insert = 0 '\000', merge = 0 '\000'}

The following patch set would fix the root cause of this problem.
https://phab.enlightenment.org/D5240

6 years agoefl: Remove @owned tag from pack/content APIs
Jean-Philippe Andre [Thu, 28 Sep 2017 08:11:15 +0000 (17:11 +0900)]
efl: Remove @owned tag from pack/content APIs

Refer to the previous commits for more context.

When an evas object is given to a container, be it with a variant of
efl_pack() or efl_content_set(), its "ownership" is given to the new
parent container. But ownership here means that the new container may
delete the child when it sees fit (i.e. when the container itself dies,
for instance). This does not mean that a reference was passed from the
calling context to the container. The actual EO owner of the child is
always the canvas or another canvas object, even if it the object is
unpacked.

Note: This means that invalid calls to efl_pack or efl_content_set will
not automatically delete the child object. This is the same as legacy,
and results in floating objects. Just check the return value! :)

Hopefully this is correct for bindings.

6 years agotests: Use efl_unref() on duplicated event objects
Jean-Philippe Andre [Thu, 28 Sep 2017 07:50:53 +0000 (16:50 +0900)]
tests: Use efl_unref() on duplicated event objects

efl_del() is valid but bindings such as C++ should be using efl_unref()
and not efl_del() in this situation: a reference was given, so it should
be released.

6 years agoevas: Give a parent to duplicated event objects
Jean-Philippe Andre [Thu, 28 Sep 2017 07:45:45 +0000 (16:45 +0900)]
evas: Give a parent to duplicated event objects

This comes back to an earlier situation where the fake event objects
created by efl_input_dup() had a parent (it should be the evas or maybe
the window). But that led to issues as efl_unref() would print error
messages. Using efl_allow_parent_unref_set() we hide the error message,
because in this situation we want the caller to use efl_unref() and not
efl_del() (eg. think of bindings...).

See d3436af616319f1fdbbd4a0aa71a7835a14699ac
See 6bed255fc4bbe1b30c960339e8dda2fc6e7925cd
See 96d94e0076773d6b29107035dc61f5df01a3347f <-- main commit

6 years agoeo: Add API to allow deletion by unref
Jean-Philippe Andre [Thu, 28 Sep 2017 07:38:00 +0000 (16:38 +0900)]
eo: Add API to allow deletion by unref

This allows deleting an object by simply calling efl_unref() on it, even
if there is a parent. Normally the parent is in charge, and you can
request deletion by calling efl_del() or efl_parent_set(NULL).

But in some rare cases, you want to give ownership of an object (@owned)
and still give a parent to that object. efl_unref() should be used (and
would be used by bindings when going out of scope or on garbage
collection), which would then print an error message. This API allows
the specific behaviour.

@feature

6 years agoeo_debug: Allow disabling of backtraces
Jean-Philippe Andre [Thu, 28 Sep 2017 06:50:54 +0000 (15:50 +0900)]
eo_debug: Allow disabling of backtraces

export EO_LIFECYCLE_BACKTRACE=0

This means that the lifecycle can be tracked but we don't care about the
backtraces. Related to some recent eo_debug patches.

6 years agoeo: Allow efl_reuse to be called with a parent
Jean-Philippe Andre [Thu, 28 Sep 2017 06:43:28 +0000 (15:43 +0900)]
eo: Allow efl_reuse to be called with a parent

If an object still has a parent inside the del intercept, we shouldn't
reset the "parent_sunk" flag. This would indeed break logic as
parent_sunk == false implies that a parent was never set, which means
the parent must be null. Right now this case isn't used but it can be
imagined with caches of evas objects (they should remain parented to
their evas).

@fix

6 years agoecore wl2 - fix null checing of drag offer - coverity
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 06:23:05 +0000 (15:23 +0900)]
ecore wl2 - fix null checing of drag offer - coverity

fix CID 1378629

6 years agoecore evas - wayland - avoid divide by 0 if height is 0
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 04:58:08 +0000 (13:58 +0900)]
ecore evas - wayland - avoid divide by 0 if height is 0

fixes CID 1379247

6 years agoelm widget - fix possible null ptr access found by coverity
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 04:39:35 +0000 (13:39 +0900)]
elm widget - fix possible null ptr access found by coverity

_propagate_event_legacy checked event_flags ptr for null then just
derefs it anyway... so check everywhere. fixes CID 1379920

6 years agoefl ui focus - fix coverity complaints about derfer before null check
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 03:29:46 +0000 (12:29 +0900)]
efl ui focus - fix coverity complaints about derfer before null check

indeed there was a child cnull check after dereferencing the child...
so check completely. fix CID 1379925

6 years agoefl ui win - quieten coverity complaint about dead code
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 03:17:44 +0000 (12:17 +0900)]
efl ui win - quieten coverity complaint about dead code

the count ?: 1 check is pointless as count is already checked above.
make it clearer that it's > 0 and remove the ? check. silence for
coverity CID 1380542

6 years agoefl ui text - remove logically dead code
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 03:08:16 +0000 (12:08 +0900)]
efl ui text - remove logically dead code

it is indeed pointless code. fix coverity CID 1380544

6 years agoedje - fix check return of _edje_fetch
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 02:30:28 +0000 (11:30 +0900)]
edje - fix check return of _edje_fetch

fixes CID 1381326

6 years agoefl ui text - fix resource leak of strbuf and pointless buffer code
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 00:16:02 +0000 (09:16 +0900)]
efl ui text - fix resource leak of strbuf and pointless buffer code

edje_object_part_text_style_user_push() doesnt need you to
stringshare_add a string... some other code did it because it "gets"
the string from an obj that might free/delete the string on push etc.
or before so it keeps a copy but then it stringshare_del's it
anyway... the _textpath_ellipsis_set() code creates a trsbuf that
wasn't freed if enabled was false and it never stringshare_del'd the
string is stringshare_added... all of this was pointless code anyway.
you could just pass the constant string directly.

fixes CID 1380543

6 years agoevas font loading - fix possible divide by 0 when font size is 0
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 00:08:44 +0000 (09:08 +0900)]
evas font loading - fix possible divide by 0 when font size is 0

fix coverity CID 1381446

6 years agoeo: Fix unnecessary ERR logs with eo_debug
Jean-Philippe Andre [Thu, 28 Sep 2017 03:25:19 +0000 (12:25 +0900)]
eo: Fix unnecessary ERR logs with eo_debug

efl_data_scope_safe_get() is often used to assert that an object is of a
certain type, but assuming it may be NULL or not of the required type.
This means that encountering an invalid type is an error handled by the
caller (we return NULL), and shouldn't print out extra ERR() logs.

This fixes issues with E run under eo_debug. E's code was safe as it's
using evas_object_smart_data_get() and verifies whether the returned
value is NULL (which is expected for a rectangle, for instance).

@fix

6 years agotests: Fix leak of input event & devices
Jean-Philippe Andre [Thu, 28 Sep 2017 02:57:51 +0000 (11:57 +0900)]
tests: Fix leak of input event & devices

After the previous patch, the caller of efl_input_dup() clearly owns the
reference on the returned object, which means she must absolutely delete
or unref if manually.

Note that the previous patch changed the bug from use of invalid eo
pointer to leaking of objects. But the only way to support bindings with
something like dup() is to ensure we give a ref to the caller, and thus
the parent should be null.

Note: eo_debug was used extensively to reach this point.

6 years agoevas: Fix dangling references with input devices
Jean-Philippe Andre [Thu, 28 Sep 2017 02:27:56 +0000 (11:27 +0900)]
evas: Fix dangling references with input devices

This solves issues with efl_input_dup() which didn't properly give a
reference to the caller, resulting in dangling eo ids.

Note: This may trigger leaks (instead of invalid refs), but this now
actually reflects the meaning of @owned. This should work with bindings
and C API users should know to call efl_unref().

This patch is the reason for the previous improvements on eo_debug.

@fix

6 years agoeo_debug: Also print out the current backtrace
Jean-Philippe Andre [Thu, 28 Sep 2017 01:25:18 +0000 (10:25 +0900)]
eo_debug: Also print out the current backtrace

We can't use EINA_LOG_BACKTRACE=1 for that as eo_lifecycle itself prints
out ERR messages for its backtrace dump.

6 years agoeo_debug: Enable logging of all ref/unref
Jean-Philippe Andre [Wed, 27 Sep 2017 05:14:58 +0000 (14:14 +0900)]
eo_debug: Enable logging of all ref/unref

This is done via the syntax (not documented yet):

  EO_LIFECYCLE_DEBUG=N:<class names>

Where N is:
 1. new/free
 2. new/free/ref/unref
 3. new/free/ref/unref/reuse

@feature

6 years agoevas : Improve the performance by reusing map surface
jiin.moon [Wed, 27 Sep 2017 08:28:59 +0000 (17:28 +0900)]
evas : Improve the performance by reusing map surface

Summary:
If object just has update of map point without other changes included child,
the map surface can be reused.

Reviewers: jpeg, cedric

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

6 years agotests: Improve test case for win/evas event refeed
Jean-Philippe Andre [Wed, 27 Sep 2017 02:46:52 +0000 (11:46 +0900)]
tests: Improve test case for win/evas event refeed

6 years agointv slider: use scope_get instead in finalize()
Amitesh Singh [Thu, 28 Sep 2017 03:19:37 +0000 (12:19 +0900)]
intv slider: use scope_get instead in finalize()

6 years agoeio: convert Efl.Io.Manager.stat() to return Eina_Future.
Cedric BAIL [Wed, 27 Sep 2017 23:32:58 +0000 (16:32 -0700)]
eio: convert Efl.Io.Manager.stat() to return Eina_Future.

6 years agoeina: add an helper to setup Eina_Value structure description.
Cedric BAIL [Wed, 27 Sep 2017 23:30:31 +0000 (16:30 -0700)]
eina: add an helper to setup Eina_Value structure description.

This is particularly useful on system like Windows who doesn't allow
setting pointer at compile time in static const structure.

6 years agoemile: unmap the memory for image file after decode.
jiin.moon [Wed, 27 Sep 2017 18:51:44 +0000 (11:51 -0700)]
emile: unmap the memory for image file after decode.

Summary:
In case of emile, unmap the memory of the image file when the image file is closing.
But closing of image file happen when the image is flushed from the cache, so the
mapped memory of image file remain for long period of time with no benefit (If it is
in cache, it won't get decoded again). So I think we don't need to keep the mapped
memory of image file.

Test Plan: self

Reviewers: cedric, jpeg, jypark

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
6 years agoelementary: avoid segfault when getting focus due to an infinite recursion.
Cedric BAIL [Tue, 26 Sep 2017 22:21:12 +0000 (15:21 -0700)]
elementary: avoid segfault when getting focus due to an infinite recursion.

This was two line switched and setting the callbacks on the wrong object.

6 years agoecore: we can actually inherit from Efl.Object, just not in the first position.
Cedric BAIL [Tue, 26 Sep 2017 18:13:06 +0000 (11:13 -0700)]
ecore: we can actually inherit from Efl.Object, just not in the first position.

6 years agoeina: remove EFL_HAVE_WIN32_THREADS define as it is unused since winpthread is used
Vincent Torri [Sat, 23 Sep 2017 16:02:44 +0000 (18:02 +0200)]
eina: remove EFL_HAVE_WIN32_THREADS define as it is unused since winpthread is used

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
6 years agoelementary: remove useless fprintf.
Cedric BAIL [Tue, 26 Sep 2017 17:09:59 +0000 (10:09 -0700)]
elementary: remove useless fprintf.

6 years agoelementary: actually implement the terminate event.
Cedric BAIL [Tue, 26 Sep 2017 17:09:37 +0000 (10:09 -0700)]
elementary: actually implement the terminate event.

6 years agoecore: we need a different event for tracking the lifecycle of the main loop.
Cedric BAIL [Tue, 26 Sep 2017 17:08:01 +0000 (10:08 -0700)]
ecore: we need a different event for tracking the lifecycle of the main loop.

If the main loop is destroyed a lot of companion information might already
have been so relying on EFL_EVENT_DEL might be way to late in the shutdown
process. terminate will be triggered as soon as the process of shutting down
is started, so all the data are still valid and have not been destroyed yet.

6 years agoelementary: don't crash if API is called after shutdown.
Cedric BAIL [Tue, 26 Sep 2017 17:07:29 +0000 (10:07 -0700)]
elementary: don't crash if API is called after shutdown.

6 years agoelementary: restore input propagation and destroy array properly.
Cedric BAIL [Tue, 26 Sep 2017 16:56:06 +0000 (09:56 -0700)]
elementary: restore input propagation and destroy array properly.

6 years agoefl_wl: Stop queuing buffer release events
Derek Foreman [Tue, 26 Sep 2017 16:39:19 +0000 (11:39 -0500)]
efl_wl: Stop queuing buffer release events

This was an optimization that caused more pain than benefit in the
long term.  Weston no longer does it, so we're just following suit.

6 years agoexamples: Fix C++ bg example
Jean-Philippe Andre [Tue, 26 Sep 2017 10:44:36 +0000 (19:44 +0900)]
examples: Fix C++ bg example

This is not nice yet... part API needs to be improved in C++.

6 years agoelm: win part EO files are public
Jean-Philippe Andre [Tue, 26 Sep 2017 10:33:56 +0000 (19:33 +0900)]
elm: win part EO files are public

6 years agoelm: Fix make distcheck
Jean-Philippe Andre [Tue, 26 Sep 2017 09:54:43 +0000 (18:54 +0900)]
elm: Fix make distcheck

See ebff5e8639851ab9d80fa6ff36f20f08952c015e

6 years agoevas textblock: use main font's ascent/descent as minimum value
Youngbok Shin [Tue, 26 Sep 2017 11:33:10 +0000 (14:33 +0300)]
evas textblock: use main font's ascent/descent as minimum value

Summary:
The patch will adjust ascent/descent with considering main font's ascent/descent
as minimum value. Actually, this patch re-apply D5217 with resolving linegap issue
on the _layout_format_ascent_descent_adjust() function.
@fix

Test Plan: Put a text which will load smaller font. And put a text which will load primary font.

Reviewers: raster, cedric, herdsman, jpeg

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

6 years agowin: Remove invalid callbacks
Jean-Philippe Andre [Tue, 26 Sep 2017 09:12:42 +0000 (18:12 +0900)]
win: Remove invalid callbacks

Faulty commit (guess who?):
  596dba5fe5fa8b4101f50bbed66c29c791a2572f

See also d567faa7787afb3d478f1c857cb28ab4fa0e5fc3

Finally make check works again. That was... a painful lot of patches to
fix.

6 years agoRevert "Fix infinite recursion for legacy + efl ui win events"
Jean-Philippe Andre [Tue, 26 Sep 2017 09:11:38 +0000 (18:11 +0900)]
Revert "Fix infinite recursion for legacy + efl ui win events"

This reverts commit d567faa7787afb3d478f1c857cb28ab4fa0e5fc3.

This is not trying to fix the root cause for the infinite loop.

6 years agoelm: Fix shutdown of atspi (unregister handlers)
Jean-Philippe Andre [Tue, 26 Sep 2017 08:56:56 +0000 (17:56 +0900)]
elm: Fix shutdown of atspi (unregister handlers)

@fix

6 years agoecore: Reset do_quit when ecore shuts down
Jean-Philippe Andre [Tue, 26 Sep 2017 08:18:02 +0000 (17:18 +0900)]
ecore: Reset do_quit when ecore shuts down

After ecore_shutdown the main loop is dead, so the flag do_quit can be
safely reset to 0. This will fix issues with cycles of
elm_init/shutdown. This fixes:
  CK_FORK=no tests/elementary/elm_suite elm_win

This patch relies on a few of the previous patches which ensure that
ecore is well shut down.

@fix

6 years agoelm: Delete atspi root object on shutdown
Jean-Philippe Andre [Tue, 26 Sep 2017 08:14:19 +0000 (17:14 +0900)]
elm: Delete atspi root object on shutdown

Ugly implementation but this will do.

@fix

6 years agoeo: Fix crashes with call cache after init cycle
Jean-Philippe Andre [Tue, 26 Sep 2017 08:00:27 +0000 (17:00 +0900)]
eo: Fix crashes with call cache after init cycle

It's not enough to check the init generation count, if the cache data is
not reset properly.

This patch adds safety in two ways:
 1. Actually reset the op call cache when we detect a new generation
 2. Verify that we don't return NULL function pointer

The 1st point is absolutely necessary, 2nd is optional (extra cost of
one if()).

@fix

6 years agoecore_ipc: Unregister log domain on shutdown
Jean-Philippe Andre [Tue, 26 Sep 2017 07:32:29 +0000 (16:32 +0900)]
ecore_ipc: Unregister log domain on shutdown

An old comment mentioned that this was explicitely not unregistered, but
I believe the comment isn't valid since ecore_event_type_flush() was
introduced.

6 years agoelm: Fix elm_shutdown
Jean-Philippe Andre [Tue, 26 Sep 2017 07:21:27 +0000 (16:21 +0900)]
elm: Fix elm_shutdown

ecore could not shut down properly in an elm_init()/elm_shutdown()
cycle, with 7 remaining references, all because of a typo.

This should help @cedric as well

6 years agowin: Avoid calling same function twice on shutdown
Jean-Philippe Andre [Tue, 26 Sep 2017 06:00:53 +0000 (15:00 +0900)]
win: Avoid calling same function twice on shutdown

This avoids calling:
  ecore_evas_callback_delete_request_set
  ecore_evas_callback_resize_set
twice when deleting a window. Also adds safety over sd->ee.

6 years agoevas: Fix shutdown of async cmd cache
Jean-Philippe Andre [Tue, 26 Sep 2017 05:26:56 +0000 (14:26 +0900)]
evas: Fix shutdown of async cmd cache

The incomplete reset (array to NULL but max not reset) triggers errors
in evas_thread_queue_append() where eina_inarray_grow() returns NULL.

This shows up in:
   CK_FORK=no elm_suite

@fix

6 years agoelm: Properly unregister providers on shutdown
Jean-Philippe Andre [Tue, 26 Sep 2017 05:09:14 +0000 (14:09 +0900)]
elm: Properly unregister providers on shutdown

This should fix some errors in make check with CK_FORK=no

Test:
  <efl/build>/src$ CK_FORK=no ./tests/elementary/elm_suite elm_config

@fix

6 years agowin: Avoid safety ERR in efreet
Jean-Philippe Andre [Tue, 26 Sep 2017 03:20:43 +0000 (12:20 +0900)]
win: Avoid safety ERR in efreet

This is an error happening in make check. Annoying but mostly harmless.

6 years agoelm: Fix module load with ELM_RUN_IN_TREE
Jean-Philippe Andre [Tue, 26 Sep 2017 03:13:24 +0000 (12:13 +0900)]
elm: Fix module load with ELM_RUN_IN_TREE

Somehow I was seeing a ton of errors with "prefs_iface" not found in
make check. This code could not have worked since the merge of
elementary in EFL tree...

@fix

6 years agoelm_bg: rename elm_bg to Efl.Ui.Bg
Sungtaek Hong [Tue, 26 Sep 2017 02:46:11 +0000 (11:46 +0900)]
elm_bg: rename elm_bg to Efl.Ui.Bg

Summary:
elm_bg was supposed to be used only in legacy,
but since we need a common object to be used as a background of widgets,
it is now renamed as efl_ui_bg and supports EO APIs.

Reviewers: cedric, jpeg, woohyun

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

6 years agoinput: Move pointer props to Canvas
Jean-Philippe Andre [Mon, 25 Sep 2017 09:47:49 +0000 (18:47 +0900)]
input: Move pointer props to Canvas

efl_input_pointer_position is defined by two classes... bad!

Fixes T6066

6 years agoelm: rename Elm.Interface.Atspi.Text => Efl.Access.Text
Lukasz Stanislawski [Mon, 25 Sep 2017 08:15:44 +0000 (17:15 +0900)]
elm: rename Elm.Interface.Atspi.Text => Efl.Access.Text

Reviewers: cedric, jpeg

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

6 years agowidget: Fix translation of default text parts
Jean-Philippe Andre [Mon, 25 Sep 2017 07:12:28 +0000 (16:12 +0900)]
widget: Fix translation of default text parts

Note: fileselector uses this translation API

Ref T5363

6 years agowidget: Remove domain_part_text_translatable from EO
Jean-Philippe Andre [Mon, 25 Sep 2017 06:47:03 +0000 (15:47 +0900)]
widget: Remove domain_part_text_translatable from EO

This removes the last remaining legacy-style part API from Widget.
I think this is redundant with the property "translatable_text"
introduced in Efl.Ui.Translatable.

Ref T5363

6 years agowidget: Implement translation API in layout
Jean-Philippe Andre [Mon, 25 Sep 2017 06:33:31 +0000 (15:33 +0900)]
widget: Implement translation API in layout

This moves the API entry points from Widget to Layout parts. I don't
think the other widgets support translation, but that is easy to fix.
The actual code implementation remains in elm_widget.c.

Legacy-only widgets are covered by Part_Legacy, while all EO widgets
that have text inherit from Layout (except Win but I don't think the
window title was translatable in legacy).

This removes 2/3 remaining part APIs from Widget.

Ref T5363

6 years agoelm: Introduce interface Efl.Ui.Translatable
Jean-Philippe Andre [Fri, 22 Sep 2017 06:13:16 +0000 (15:13 +0900)]
elm: Introduce interface Efl.Ui.Translatable

This will be used to replace the part translation API in Elm.Widget. It
should work for both parts and non-parts (ie. the main text of a button,
for instance).

For now I'm taking the following approach:
 - All efl_text_set/get strings are untranslatable, i.e. get() returns
   the visible string, set replaces and can not be translated.
 - translatable_text_set/get needs to be used to enable automatic
   translation, which in turns calls efl_text_set to modify the visible
   string. Thus, translatable applications will have to use
   efl_ui_translatable_text_set a lot more than efl_text_set, unless
   they translate strings application-side.

Note that some other frameworks take a simpler approach equivalent to
calling efl_text_set() with an already translated text. This prevents
runtime language changes of the application, unless the application
handles them specifically.

6 years agowidget: Add tiny doc for Efl.Ui.Widget.Part
Jean-Philippe Andre [Fri, 22 Sep 2017 04:38:59 +0000 (13:38 +0900)]
widget: Add tiny doc for Efl.Ui.Widget.Part

6 years agoEvas textblock: fix ascent/descent calc
Daniel Hirt [Tue, 26 Sep 2017 07:38:46 +0000 (10:38 +0300)]
Evas textblock: fix ascent/descent calc

This is a follow-up to 4d4401f3a60024a0762393c3984065b73927eb86.
The format line adjustment (e.g. linegap) should calculate the current
item's ascent/descent, and then update c->ascent/c->descent.
Otherwise we accumulate calculations like linegap values

ref D5217

6 years agoFix infinite recursion for legacy + efl ui win events
Carsten Haitzler (Rasterman) [Tue, 26 Sep 2017 07:15:07 +0000 (16:15 +0900)]
Fix infinite recursion for legacy + efl ui win events

6 years agoFix crash when an application wants to get the popup item class
Daniel Zaoui [Tue, 26 Sep 2017 06:49:58 +0000 (09:49 +0300)]
Fix crash when an application wants to get the popup item class

Since elm_popup_item.eo.h is only included in elc_popup.h, the EAPI is
not well defined, resulting in a crash when, in a simple C file, the
item class is tried to be accessed.
By including the H file in elc_popup_eo.h, we make it public (as the
other item classes) and solve the EAPI issue.

Thanks @jpeg for helping me to solve this issue.

6 years agoevas textblock: use primary font's size as minimum size of a line
Youngbok Shin [Mon, 25 Sep 2017 09:35:23 +0000 (18:35 +0900)]
evas textblock: use primary font's size as minimum size of a line

Summary:
Textblock uses ascent, descent from primary font when there is no text.
If a text is set which need other font, Textblock uses ascent, descent from
actually loaded font. If loaded font has smaller size, text cursor and text
looks jerky in elm_entry. At least, primary font's size should be respected
as minimum size of a line for avoiding this issue.
In addition, the patch will allow negative line gap values.
@fix

Test Plan:
Put your hamburger(🍔) in Ecrire. And put an english character.
(Put a text which will load smaller font. And put a text which will load primary font.)

Reviewers: raster, cedric, herdsman, jpeg, woohyun

Reviewed By: raster

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

6 years agoevas: Add scale feature for embedded bitmap fonts.
Youngbok Shin [Mon, 25 Sep 2017 09:34:22 +0000 (18:34 +0900)]
evas: Add scale feature for embedded bitmap fonts.

Summary:
When evas selects a strike of embedded bitmap font,
calculate ratio and use it for scaling embedded bitmap.
@feature

Reviewers: jpeg, tasn, woohyun, raster, herdsman

Reviewed By: raster

Subscribers: charlesmilette, Francesco149, cedric

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

6 years agoeolian-cxx: Fix compilation errors with new any_value_ptr and mstring types
Felipe Magno de Almeida [Tue, 26 Sep 2017 00:57:25 +0000 (21:57 -0300)]
eolian-cxx: Fix compilation errors with new any_value_ptr and mstring types

6 years agoelementary: migrate elementary_config to use the new macro with lifecycle support.
Cedric BAIL [Mon, 25 Sep 2017 22:52:36 +0000 (15:52 -0700)]
elementary: migrate elementary_config to use the new macro with lifecycle support.

6 years agoelementary: provide a new initialization macro that support lifecycle.
Cedric BAIL [Mon, 25 Sep 2017 22:51:19 +0000 (15:51 -0700)]
elementary: provide a new initialization macro that support lifecycle.

EFL_MAIN_EX require efl_main, efl_resume, efl_pause and efl_terminate
to be working. Quicklaunch support added too.

6 years agoelementary: provide and implement lifecycle event on the window.
Cedric BAIL [Mon, 25 Sep 2017 22:48:53 +0000 (15:48 -0700)]
elementary: provide and implement lifecycle event on the window.

pause event means that the window is not visible anymore to any user.
resume is triggered when the window became visible again or just
became visible again.

6 years agoecore: start adding life cycle support to Efl.Loop.
Cedric BAIL [Mon, 25 Sep 2017 22:47:00 +0000 (15:47 -0700)]
ecore: start adding life cycle support to Efl.Loop.

pause event is triggered when no more windows are visible to any user.
resume event is triggered when a window make the application visible
for the first time to the user after a pause or when starting the application.

6 years agoUi text: use proper Efl.Text API to set text
Daniel Hirt [Mon, 25 Sep 2017 09:49:11 +0000 (12:49 +0300)]
Ui text: use proper Efl.Text API to set text

Fixes error message during initialization.

6 years agoCanvas text: don't generate legacy for new api
Daniel Hirt [Mon, 25 Sep 2017 09:45:12 +0000 (12:45 +0300)]
Canvas text: don't generate legacy for new api

This is part of the new Canvas.Text.