platform/upstream/efl.git
6 years agoefl: use efl_add_ref to create objects which have no parent
Cedric BAIL [Thu, 15 Mar 2018 16:50:20 +0000 (12:50 -0400)]
efl: use efl_add_ref to create objects which have no parent

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoeo: start reporting abuse of efl_del
Cedric Bail [Mon, 19 Mar 2018 23:08:10 +0000 (16:08 -0700)]
eo: start reporting abuse of efl_del

6 years agocsharp: Add support for efl parts as Properties
Lauro Moura [Mon, 19 Mar 2018 23:35:36 +0000 (20:35 -0300)]
csharp: Add support for efl parts as Properties

Instead of
   var bg = efl.ui.Background.static_cast(myobj.Part("background"));

Now do
   var bg = myobj.Background;

Also a couple helper functions were added.

6 years agoeolian_cxx: Fill documentation of part_def.
Lauro Moura [Tue, 20 Mar 2018 00:37:04 +0000 (21:37 -0300)]
eolian_cxx: Fill documentation of part_def.

6 years agoeolian-cxx: Add helper method to get all parts
Lauro Moura [Mon, 19 Mar 2018 23:33:43 +0000 (20:33 -0300)]
eolian-cxx: Add helper method to get all parts

Line get_all_methods, gets everything from the inherits too.

6 years agocsharp: Use the library mapping on linux too.
Lauro Moura [Mon, 19 Mar 2018 22:47:58 +0000 (19:47 -0300)]
csharp: Use the library mapping on linux too.

Now the generated DllImport call will have the actual library name
instead of placeholders on Linux. Before we relied on dlsym being able
to search for the symbols on all loaded so's while Windows needed you to
specify the correct library to call GetProcAddress.

This fixes the case when someone call an function from an efl interface
defined in efl.so (e.g. efl_part) and the library is not loaded yet.

6 years agoecore_wl2: Send a mouse-up event on reentry after client initiated resize
Derek Foreman [Tue, 20 Mar 2018 19:18:48 +0000 (14:18 -0500)]
ecore_wl2: Send a mouse-up event on reentry after client initiated resize

Apparently when we initiate a client side move in ecore_wl2 we flag that
and send a mouse-up immediately on the next pointer enter.

Do the same for resize.

At some point this might need to be revisited, we should probably be
sending a "cancel" at the start of client initiated move/resize instead
of an up at the end?

Fix T6422

6 years agoeolian: make use of panics for certain alloc errors
Daniel Kolesa [Tue, 20 Mar 2018 16:34:38 +0000 (17:34 +0100)]
eolian: make use of panics for certain alloc errors

6 years agoeolian: no need for printf-style for internal log funcs
Daniel Kolesa [Tue, 20 Mar 2018 16:06:50 +0000 (17:06 +0100)]
eolian: no need for printf-style for internal log funcs

6 years agoeolian: use new error logging for all recoverable errors
Daniel Kolesa [Tue, 20 Mar 2018 16:05:22 +0000 (17:05 +0100)]
eolian: use new error logging for all recoverable errors

6 years agoefl.task - move to returning future insead of bool + exit event
Carsten Haitzler (Rasterman) [Tue, 20 Mar 2018 11:43:47 +0000 (20:43 +0900)]
efl.task - move to returning future insead of bool + exit event

title says it all...

6 years agoeo: slight improvement of invalidate code as parent_set(NULL) will be valid on an...
Cedric Bail [Mon, 19 Mar 2018 23:47:28 +0000 (16:47 -0700)]
eo: slight improvement of invalidate code as parent_set(NULL) will be valid on an invalidated object.

6 years agoeo: automatically cancel a future that is attached to an invalidated object.
Cedric Bail [Mon, 19 Mar 2018 23:38:07 +0000 (16:38 -0700)]
eo: automatically cancel a future that is attached to an invalidated object.

6 years agoelementary: make sure windows are not born orfan and properly have at least a main...
Cedric Bail [Mon, 19 Mar 2018 22:39:14 +0000 (15:39 -0700)]
elementary: make sure windows are not born orfan and properly have at least a main loop as parent.

6 years agoelementary: make global object lifecycle depends on the main loop.
Cedric Bail [Mon, 19 Mar 2018 22:38:26 +0000 (15:38 -0700)]
elementary: make global object lifecycle depends on the main loop.

6 years agoevas: use efl_add_ref for the container, might consider using a parent later on.
Cedric Bail [Mon, 19 Mar 2018 22:36:58 +0000 (15:36 -0700)]
evas: use efl_add_ref for the container, might consider using a parent later on.

6 years agoevas: technically the evas canvas is using the main loop, so let's make canvas depend...
Cedric Bail [Mon, 19 Mar 2018 22:36:18 +0000 (15:36 -0700)]
evas: technically the evas canvas is using the main loop, so let's make canvas depend on it for their lifecycle.

6 years agoedje: global class should actually be bound to the main loop.
Cedric Bail [Mon, 19 Mar 2018 22:33:44 +0000 (15:33 -0700)]
edje: global class should actually be bound to the main loop.

6 years agoecore: the main loop has no parent and only one ref, let's properly create it.
Cedric Bail [Mon, 19 Mar 2018 22:33:11 +0000 (15:33 -0700)]
ecore: the main loop has no parent and only one ref, let's properly create it.

6 years agoeo: update tests to also use efl_add_ref correctly.
Cedric Bail [Mon, 19 Mar 2018 21:27:01 +0000 (14:27 -0700)]
eo: update tests to also use efl_add_ref correctly.

6 years agoeo: check return in efl_add before performing more operations
Cedric BAIL [Thu, 15 Mar 2018 16:48:52 +0000 (12:48 -0400)]
eo: check return in efl_add before performing more operations

this fixes a crash on objects which fail to be created using efl_add_ref

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoeo: start printing warning when instanciating object with efl_add and no parent.
Cedric BAIL [Wed, 14 Mar 2018 19:41:22 +0000 (12:41 -0700)]
eo: start printing warning when instanciating object with efl_add and no parent.

6 years agoeldbus: ensure the lifetime of the eldbus object path is monitored for proxies
Cedric BAIL [Wed, 14 Mar 2018 19:17:59 +0000 (15:17 -0400)]
eldbus: ensure the lifetime of the eldbus object path is monitored for proxies

the object is instantly destroyed when connection is lost

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoeldbus: use efl_del when clearing the model connection child list
Cedric BAIL [Wed, 14 Mar 2018 19:17:07 +0000 (15:17 -0400)]
eldbus: use efl_del when clearing the model connection child list

it is an error to delete an object with an existing parent

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agotests: do not call unref on eldbus message objects after sending them
Cedric BAIL [Wed, 14 Mar 2018 17:48:44 +0000 (13:48 -0400)]
tests: do not call unref on eldbus message objects after sending them

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoPyolian: fix __repr__ for Documentation
Dave Andreoli [Sat, 17 Mar 2018 11:06:34 +0000 (12:06 +0100)]
Pyolian: fix __repr__ for Documentation

6 years agoPyolian doc generator: update wrt name API changes
Dave Andreoli [Sat, 17 Mar 2018 10:37:13 +0000 (11:37 +0100)]
Pyolian doc generator: update wrt name API changes

Argh, this has been difficult... hopefully I have done
this right

6 years agoPyolian: let ctypes automatically convert types
Dave Andreoli [Sat, 17 Mar 2018 09:49:42 +0000 (10:49 +0100)]
Pyolian: let ctypes automatically convert types

Not a big improvement and not so much automatically...
but for sure a bit less to type :)

6 years agoPyolian: use tuple instead of list in declarations
Dave Andreoli [Sat, 17 Mar 2018 09:31:33 +0000 (10:31 +0100)]
Pyolian: use tuple instead of list in declarations

This is a bit more correct and (maybe) a bit more faster

6 years agoPyolian: new API eolian_unit_state_get
Dave Andreoli [Sat, 17 Mar 2018 09:19:28 +0000 (10:19 +0100)]
Pyolian: new API eolian_unit_state_get

6 years agoPyolian: new API eolian_object_unit_get
Dave Andreoli [Sat, 17 Mar 2018 09:01:24 +0000 (10:01 +0100)]
Pyolian: new API eolian_object_unit_get

Also implemented __repr__ for Unit and State

6 years agoPyolian: fix tests wrt name/short_name/full_name API changes
Dave Andreoli [Sat, 17 Mar 2018 08:46:17 +0000 (09:46 +0100)]
Pyolian: fix tests wrt name/short_name/full_name API changes

6 years agoPyolian: add support EOLIAN_SO_DIR env var
Dave Andreoli [Fri, 16 Mar 2018 19:00:49 +0000 (20:00 +0100)]
Pyolian: add support EOLIAN_SO_DIR env var

Thanks goes to @lauromoura for proposing this in D5840

6 years agoecore_wl2: Silence a commit ERR on window hide
Derek Foreman [Fri, 16 Mar 2018 17:47:05 +0000 (12:47 -0500)]
ecore_wl2: Silence a commit ERR on window hide

Cosmetic fix, should be functionally identical.  Hide can be called
asynchronously, so it's ok, and the ERR can be silenced.

6 years agoeolian: add APIs to get unit from object and state from unit
Daniel Kolesa [Fri, 16 Mar 2018 15:16:16 +0000 (16:16 +0100)]
eolian: add APIs to get unit from object and state from unit

6 years agoeolian: intial API for a new error mechanism
Daniel Kolesa [Fri, 16 Mar 2018 15:07:12 +0000 (16:07 +0100)]
eolian: intial API for a new error mechanism

Unlike panic, this will be used to handle regular errors
such as parse errors. There will be no jumps and you
will be able to pass in a pointer to get the error
data into some local memory. That way you will be
able to override printing error messages.

6 years agoeolian: initial API for a new panic mechanism
Daniel Kolesa [Fri, 16 Mar 2018 14:41:24 +0000 (15:41 +0100)]
eolian: initial API for a new panic mechanism

This will be used to handle unrecoverable errors.
For robustness, you will be able to set a custom
panic callback, jump and try to recover manually.

6 years agocsharp: Fix support for ptr(structs)
Lauro Moura [Thu, 15 Mar 2018 23:32:39 +0000 (20:32 -0300)]
csharp: Fix support for ptr(structs)

In general, ptr(struct) parameters behavior depends whether the
parameter has the @owned modifier or not.

If there is no @owned parameter (meaning no transfer of ownership
happens) and it is a "complex" struct, with reference type fields
(like strings), the struct is converted to the respective
<Struct>Internal struct and passed with "ref" to the DllImport'd
function. For @in parameters, after the function it returns, this
intermediate struct is converted to the public struct type and
assigned to the original parameter, updating it to the external
world.

When we have ownership transfers, the structure is copied to unmanaged
memory and given to the callee. We can't send managed memory directly as
the callee may try to free it. On the managed side, the original struct
is left to be garbage collected normally.

6 years agocsharp: Change policy on ptr(struct) owned calls
Lauro Moura [Thu, 15 Mar 2018 23:35:17 +0000 (20:35 -0300)]
csharp: Change policy on ptr(struct) owned calls

When transferring the ownership of a ptr(struct) from Unamanaged to
managed, we should marshal the reference-typed fields or they can point
to Managed memory that would make no sense to access from C (for
example, strings would return garbage).

The downside is that it can cause potential leaks if the receiver of the
memory do not free it. In the current state of the EFL api this can
happen in two places:

- Efl.Ui.List.SegArray::remove
return -> ptr(Efl.Ui.List.LayoutItem) @owned
- Efl.Ui.Focus.Manager::fetch
return -> ptr(Efl.Ui.Focus.Relations) @owned

The resources copied by both structs may leak when those functions are
overriden in C# and the values returned to the C code.

Also hide some internal stuff instead of exporting it and generate
implicit conversion operators for struct external/internal.

6 years agoeolian_cxx: Add 'unknown' to parameter direction
Lauro Moura [Sat, 10 Mar 2018 01:31:44 +0000 (22:31 -0300)]
eolian_cxx: Add 'unknown' to parameter direction

It'll be used in eolian_mono as the 'direction' of return types in some
helper functions.

6 years agoefl-cxx: Fix installation of efl_part_impl header
Lauro Moura [Tue, 13 Mar 2018 23:42:05 +0000 (20:42 -0300)]
efl-cxx: Fix installation of efl_part_impl header

It was being installed directly into efl-cxx instead of efl-cxx/cxx.

Change-Id: I769c1b526ae2da465a1f4108117b2c18e30db01b

6 years agoeolian: simplify lexer init
Daniel Kolesa [Fri, 16 Mar 2018 13:49:35 +0000 (14:49 +0100)]
eolian: simplify lexer init

6 years agoeolian: event/function_get_by_name -> by_name_get
Daniel Kolesa [Fri, 16 Mar 2018 13:25:44 +0000 (14:25 +0100)]
eolian: event/function_get_by_name -> by_name_get

6 years agoeo: Orphan an object that is being invalidated.
Lauro Moura [Fri, 16 Mar 2018 05:07:18 +0000 (22:07 -0700)]
eo: Orphan an object that is being invalidated.

Summary:
This will avoid infinite loops and errors when the parent tries
to orphan an invalidated child.

Fixes T6780

Test Plan: Run `make check`

Reviewers: cedric

Maniphest Tasks: T6780

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

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
6 years agoeolian: more stringent and fine-grained validation
Daniel Kolesa [Thu, 15 Mar 2018 23:14:13 +0000 (00:14 +0100)]
eolian: more stringent and fine-grained validation

6 years agoeolian: fix unit child management
Daniel Kolesa [Thu, 15 Mar 2018 23:09:43 +0000 (00:09 +0100)]
eolian: fix unit child management

Also pass correct unit to validation for performance.

6 years agoeolian: merge objects in units
Daniel Kolesa [Thu, 15 Mar 2018 22:32:20 +0000 (23:32 +0100)]
eolian: merge objects in units

6 years agoeolian: reduce the number of database traversals during validation
Daniel Kolesa [Thu, 15 Mar 2018 22:24:38 +0000 (23:24 +0100)]
eolian: reduce the number of database traversals during validation

This significantly improves performance by not iterating certain
paths multiple times.

6 years agoee_drm: prevent extra flips
Derek Foreman [Thu, 15 Mar 2018 19:49:56 +0000 (14:49 -0500)]
ee_drm: prevent extra flips

Similarly to commit 8b962d24acf192bd6c22de779c57eac73dd2f4db prevent
extra flips in the drm engine.

These are potentially more harmful to DRM as they can cause frame
drops and missed render opportunities.

6 years agoee_wayland: Prevent extra commits
Derek Foreman [Thu, 15 Mar 2018 19:36:27 +0000 (14:36 -0500)]
ee_wayland: Prevent extra commits

It's possible that we unregister then reregister an animator so quickly
that the ecore_evas idle enter/exiters haven't had a chance to run yet.
In this case a render will come shortly anyway and we shouldn't use a
'false' commit to kick off a frame callback.

Silences an ERR and unmeasurably improves protocol utilization.

6 years agoeolian: fix minor memory leaks
Daniel Kolesa [Thu, 15 Mar 2018 15:45:23 +0000 (16:45 +0100)]
eolian: fix minor memory leaks

6 years agoeolian: make sure dtors are always run correctly
Daniel Kolesa [Thu, 15 Mar 2018 15:34:08 +0000 (16:34 +0100)]
eolian: make sure dtors are always run correctly

6 years agoeolian: remove the temps system
Daniel Kolesa [Thu, 15 Mar 2018 15:14:02 +0000 (16:14 +0100)]
eolian: remove the temps system

6 years agoeolian: manage exprs through node system
Daniel Kolesa [Thu, 15 Mar 2018 15:08:59 +0000 (16:08 +0100)]
eolian: manage exprs through node system

6 years agoeolian: manage typedecls through node system
Daniel Kolesa [Thu, 15 Mar 2018 14:50:53 +0000 (15:50 +0100)]
eolian: manage typedecls through node system

6 years agoeolian: manage class/vars through new node system
Daniel Kolesa [Thu, 15 Mar 2018 14:42:40 +0000 (15:42 +0100)]
eolian: manage class/vars through new node system

6 years agoeolian: store types in node hash
Daniel Kolesa [Thu, 15 Mar 2018 14:31:08 +0000 (15:31 +0100)]
eolian: store types in node hash

6 years agoeolian: generic dtor management for lexer
Daniel Kolesa [Thu, 15 Mar 2018 13:12:18 +0000 (14:12 +0100)]
eolian: generic dtor management for lexer

6 years agoeolian: unified node allocation api
Daniel Kolesa [Thu, 15 Mar 2018 12:53:50 +0000 (13:53 +0100)]
eolian: unified node allocation api

6 years agoeolian: in-lexer-state current class storage
Daniel Kolesa [Thu, 15 Mar 2018 11:30:06 +0000 (12:30 +0100)]
eolian: in-lexer-state current class storage

6 years agoefl_ui_focus_manager_root_focus: switch to focus adapter
Marcel Hollerbach [Thu, 15 Mar 2018 14:11:46 +0000 (15:11 +0100)]
efl_ui_focus_manager_root_focus: switch to focus adapter

6 years agoefl_ui_focus_manager_calc: set redirect before setting focus
Marcel Hollerbach [Thu, 15 Mar 2018 14:02:57 +0000 (15:02 +0100)]
efl_ui_focus_manager_calc: set redirect before setting focus

settings the redirect might result in unfocus calls, that might unset
evas_object_focus on a object that might be registered in two managers
due to border linking. This fixes mysterical disapearing focus.

6 years agoefl_ui_focus_manager_calc: do not set focus on a deletion manager
Marcel Hollerbach [Thu, 15 Mar 2018 14:01:10 +0000 (15:01 +0100)]
efl_ui_focus_manager_calc: do not set focus on a deletion manager

otherwise objects might already be on the way out, without a elementary
parent.

6 years agoelm_interface_scrollable: make sure to have the content always focusable
Marcel Hollerbach [Thu, 15 Mar 2018 11:46:47 +0000 (12:46 +0100)]
elm_interface_scrollable: make sure to have the content always focusable

6 years agoelm_widget_item_static_focus: move canvas_object_set to later
Marcel Hollerbach [Mon, 12 Mar 2018 10:12:19 +0000 (11:12 +0100)]
elm_widget_item_static_focus: move canvas_object_set to later

We dont delete the adapeter when we are still focused, to set anyway the
correct view to it, we need to set the view to the adapeter as often as
possible

6 years agoelm_genlist: support immidiate focus once the item is realized
Marcel Hollerbach [Sun, 11 Mar 2018 20:08:42 +0000 (21:08 +0100)]
elm_genlist: support immidiate focus once the item is realized

this supports the case of item.focus = true before the item is realized.

6 years agoelm_genlist: move focus recovering to first_touch instead of
Marcel Hollerbach [Sun, 11 Mar 2018 16:56:07 +0000 (17:56 +0100)]
elm_genlist: move focus recovering to first_touch instead of
focus_update

this means that the function is called more reliable, and not only based
on focus state, but also based on the redirect situation.

Change-Id: Ic23534aa8d6022f2c2b7341f61c98b28a1b7de0c

6 years agoefl_ui_focus_manager_calc: add onedirection to dirty
Marcel Hollerbach [Fri, 9 Mar 2018 18:58:36 +0000 (19:58 +0100)]
efl_ui_focus_manager_calc: add onedirection to dirty

6 years agoelm_genlist: performe elm_item_focus_set
Marcel Hollerbach [Fri, 9 Mar 2018 17:52:42 +0000 (18:52 +0100)]
elm_genlist: performe elm_item_focus_set

this means all neccessary fields with last focus and current focused
item are updated correctly

6 years agoefl_ui_focus_composition: redirect canvas move events to the adapter
Marcel Hollerbach [Fri, 9 Mar 2018 17:52:02 +0000 (18:52 +0100)]
efl_ui_focus_composition: redirect canvas move events to the adapter

otherwise a moving canvas object will not be recalculated, as the
manager does not know about the new focus geometry

6 years agoelm_widget_item_static_focus: fix fetching of the item
Marcel Hollerbach [Sun, 4 Mar 2018 09:59:09 +0000 (10:59 +0100)]
elm_widget_item_static_focus: fix fetching of the item

6 years agoelm_widget_item_static_focus: delete adapter when deleted or unrealized
Marcel Hollerbach [Thu, 1 Mar 2018 07:37:06 +0000 (08:37 +0100)]
elm_widget_item_static_focus: delete adapter when deleted or unrealized

somehow genlist leaks the view sometimes, thus the adapter is not
deleted when the item is deleted. This resulted in strange ghost focus
objects in the window.

6 years agoelm_genlist: set focus to the item when a user calls the function
Marcel Hollerbach [Wed, 28 Feb 2018 18:42:32 +0000 (19:42 +0100)]
elm_genlist: set focus to the item when a user calls the function

6 years agoelm_genlist: set focus to the item when a user calls the function
Marcel Hollerbach [Wed, 28 Feb 2018 18:42:32 +0000 (19:42 +0100)]
elm_genlist: set focus to the item when a user calls the function

6 years agoefl_ui_focus_manager_sub: flush the border if we cannot find a candidate
Marcel Hollerbach [Wed, 28 Feb 2018 17:42:24 +0000 (18:42 +0100)]
efl_ui_focus_manager_sub: flush the border if we cannot find a candidate

after that someone probebly wants to check where the last focus was on,
if the set of boder elements has changed since the last border flush, then the
element might not be registered in the parent manager

6 years agoecore_wl2_window: Silence some spurious warnings
Derek Foreman [Wed, 14 Mar 2018 17:08:52 +0000 (12:08 -0500)]
ecore_wl2_window: Silence some spurious warnings

ecore_wl2_window_commit() must be called during window size negotiation,
but this currently trips a warning when no frame callback has been
received for the first commit.  We can't even have frame callbacks at
that point because no buffer is attached.

Don't set up the commit_pending logic until after we have a buffer.

6 years agoee_wayland: Set window visible before trying to render it
Derek Foreman [Wed, 14 Mar 2018 21:03:36 +0000 (16:03 -0500)]
ee_wayland: Set window visible before trying to render it

if we try to render before setting ee->visible the results aren't
likely to be... visible.

6 years agoeolian: turn some state APIs into inlines over unit APIs
Daniel Kolesa [Wed, 14 Mar 2018 16:20:49 +0000 (17:20 +0100)]
eolian: turn some state APIs into inlines over unit APIs

6 years agopyolian: remove unneeded bindings in eolian_state
Daniel Kolesa [Wed, 14 Mar 2018 16:08:36 +0000 (17:08 +0100)]
pyolian: remove unneeded bindings in eolian_state

6 years agoelua: inherit state from unit in eolian bindings
Daniel Kolesa [Wed, 14 Mar 2018 16:03:33 +0000 (17:03 +0100)]
elua: inherit state from unit in eolian bindings

6 years agoeolian: refactor doc ref resolution API
Daniel Kolesa [Wed, 14 Mar 2018 15:51:11 +0000 (16:51 +0100)]
eolian: refactor doc ref resolution API

6 years agoeo: fix invalidate to always happen.
Cedric BAIL [Tue, 13 Mar 2018 22:29:21 +0000 (15:29 -0700)]
eo: fix invalidate to always happen.

6 years agogenlist: fix "insane" order [BUG COMPATIBILITY]
Jean-Philippe Andre [Tue, 24 Oct 2017 09:09:50 +0000 (18:09 +0900)]
genlist: fix "insane" order [BUG COMPATIBILITY]

This patch implements bug compatibility.

genlist internally uses both a tree structure with Eina_List and a flat
Eina_Inlist to track its items. ALL of the items are in the inlist while
subitems appear in their parent's list. As a consequence both lists must
be kept in sync pretty tightly. Obviously this is not done at all and
has led to countless bugs, as soon as tree or groups are used:
 - Invalid order of items (visually)
 - Invalid order of items with sorted_insert
 - Glitches in the matrix
 - Crashes with sorted_insert
 - Odd/even styles not properly set
 - Promote/demote functions broken by design
 - Developers send to psychiatric hospitals
 - Etc...

Legacy genlist (1.19 and before) used an inlist order that basically
didn't make sense, as it didn't follow the logical order of elements (as
they appear visually). Unfortunately this has "worked" (really, that's a
huge stretch to use this word here) for a long time this way. As a
consequence, some applications (*cough* empc *cough*) have relied on
this order to implement "next album" or "previous album" where the
album title is a group node.

By changing the order of items in the inlist, this has broken the
assumptions made above, and ends up in cases that return NULL, leading
to SEGV. Sure, the app should have checked NULL, but that's not really
the point here. The behavior has been changed.

This patch implements "fixes" for the following functions:
 - elm_genlist_first_item_get(): Don't return a parent
 - elm_genlist_last_item_get(): Return a parent
 - elm_genlist_item_next_get(): return a parent upon reaching the last child
 - elm_genlist_item_prev_get(): return a child when a parent is passed

Important notes:
 - This does not cover 100% behavior compatibility here. The only way to
   have it would be to simply revert the entire genlist code to its
   original version and never touch it again, ever.
 - An explicit API is required for an application to specify which API
   level it targets, so that we can cherry-pick which bug compatibility
   features we want to enable. We are already doing this for EDC,
   unfortunately.

@fix

fix T5938

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
6 years agotests: add genlist test to verify group item api behaviour
Cedric BAIL [Tue, 13 Mar 2018 19:11:50 +0000 (15:11 -0400)]
tests: add genlist test to verify group item api behaviour

ref T5938

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoefl_ui_clock: do not locally store clock module api
Cedric BAIL [Tue, 13 Mar 2018 16:40:02 +0000 (12:40 -0400)]
efl_ui_clock: do not locally store clock module api

there is no corresponding code to unset this global pointer when the module
is unloaded, so this will crash if elm_shutdown is ever called

Change-Id: Id296a265f899394d74812f8d79c14778127a5638
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoelm_gengrid: do not zero item cache if object is not finalized
Cedric BAIL [Tue, 13 Mar 2018 16:38:10 +0000 (12:38 -0400)]
elm_gengrid: do not zero item cache if object is not finalized

this is a no-op case which causes unnecessary errors

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoefl_promise: avoid invalid calls when unsetting parent
Cedric BAIL [Tue, 13 Mar 2018 16:08:25 +0000 (12:08 -0400)]
efl_promise: avoid invalid calls when unsetting parent

if promise has no parent then the promise's loop is null

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agotests: remove invalid api usage from elm layout test
Cedric BAIL [Tue, 13 Mar 2018 16:03:13 +0000 (12:03 -0400)]
tests: remove invalid api usage from elm layout test

the comment here indicates that the author knew it was an invalid api use
so it should not have been here in the first place

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agotests: disable elm glview tests when running in buffer engine
Cedric BAIL [Tue, 13 Mar 2018 15:57:49 +0000 (11:57 -0400)]
tests: disable elm glview tests when running in buffer engine

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoelm_map: remove unnecessary error message in destructor
Cedric BAIL [Tue, 13 Mar 2018 15:39:16 +0000 (11:39 -0400)]
elm_map: remove unnecessary error message in destructor

there is no check for the existence of this file so this will error most times
from it not existing

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoelm: call ecore_event_shutdown during elm_shutdown
Cedric BAIL [Tue, 13 Mar 2018 15:35:18 +0000 (11:35 -0400)]
elm: call ecore_event_shutdown during elm_shutdown

ref 4e14ba3f4874b03185d5216829ecc1876d11c48e

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agotests: check whether ecore is properly shut down after elm_shutdown
Cedric BAIL [Tue, 13 Mar 2018 15:29:55 +0000 (11:29 -0400)]
tests: check whether ecore is properly shut down after elm_shutdown

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoefl_ui_win: do not trigger elm quit policy twice for same win
Cedric BAIL [Tue, 13 Mar 2018 15:03:31 +0000 (11:03 -0400)]
efl_ui_win: do not trigger elm quit policy twice for same win

only check each policy for the case which should trigger it to avoid borking
main loop

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agotests: avoid test failures for elm_win when not running in X
Cedric BAIL [Tue, 13 Mar 2018 14:40:23 +0000 (10:40 -0400)]
tests: avoid test failures for elm_win when not running in X

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agotests: use buffer engine for elm_suite if engine is not specified
Cedric BAIL [Tue, 13 Mar 2018 14:37:55 +0000 (10:37 -0400)]
tests: use buffer engine for elm_suite if engine is not specified

this should add some consistency to tests

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agotests: properly destroy elm_win timers to prevent crashes
Cedric BAIL [Mon, 12 Mar 2018 19:24:01 +0000 (15:24 -0400)]
tests: properly destroy elm_win timers to prevent crashes

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoefl_ui_win: track the finalize future for del to avoid crash
Cedric BAIL [Mon, 12 Mar 2018 19:21:15 +0000 (15:21 -0400)]
efl_ui_win: track the finalize future for del to avoid crash

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoecore_evas: implement the move method for basic buffer canvas
Cedric BAIL [Mon, 12 Mar 2018 19:19:38 +0000 (15:19 -0400)]
ecore_evas: implement the move method for basic buffer canvas

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
6 years agoefl_threadio: always return a value to silence warning
Jean Guyomarc'h [Tue, 13 Mar 2018 17:38:46 +0000 (18:38 +0100)]
efl_threadio: always return a value to silence warning

6 years agoefl_loop: fix exit code of the loop
Jean Guyomarc'h [Sun, 11 Mar 2018 08:41:30 +0000 (09:41 +0100)]
efl_loop: fix exit code of the loop

For numeric types, eina_value_set() accepts values instead of references
on the value to be set. Hence, we were affecting as the exit code of the
loop a garbage value, yielding to invalid results.