Commit Graph

4793 Commits

Author SHA1 Message Date
Stefan Schmidt 87c8e2718c efl_ui_selection_manager: free allocated memory after local use
This temporary allocation is only used in this block and goes out of
scope when leaving. Make sure we free the resource before this happens.

Coverity ID: 1402653

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10045
2019-09-23 11:16:36 +02:00
Stefan Schmidt c02dcf6966 efl_ui_textpath: make sure variables are not uses uninitialized
First and last could have been uninitialized for their first use in some
cases. Make sure we set the x y coordinates to 0 to begin with.

Coverity IDs: 1401458, 1404747

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10044
2019-09-23 11:16:35 +02:00
WooHyun Jung f7e183b851 efl_ui_scrollable: remove ui_scrollable_interactive and move all into ui_scrollable
Summary:
Based on the discussion T7883, there is no reason to keep those
interfaces separately. So, now, efl_ui_scrollable will support
the events and methods together.

@ref T7883

Reviewers: eagleeye, bu5hm4n, zmike, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7883

Differential Revision: https://phab.enlightenment.org/D10072
2019-09-23 11:02:15 +02:00
Mike Blumenkrantz 654e783d28 elm/layout: remove check for finalize in efl_canvas_group_change impl
this used to be a thing in order to prevent widgets from spamming themselves
with recalcs during construction, but since that's no longer possible we
can remove this and also resolve an issue where legacy widgets failed
to correctly calculate their min size if no text was set

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10043
2019-09-23 10:44:32 +02:00
SangHyeon Jade Lee 3d539c1131 efl_ui : fix possible memory leak on model compressing
Summary: fix memory leak of model compressing on binbuf and allocated data.

Reviewers: cedric, bu5hm4n, zmike

Reviewed By: cedric, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10037
2019-09-23 16:27:07 +09:00
Marcel Hollerbach 18e9a224be efl_ui_collection: protect against invalid access
i am not sure why this should ever happen. However, a error here is
better than a access out of the bounds of the array.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10066
2019-09-21 20:43:56 +02:00
Marcel Hollerbach 64be497e42 efl_ui_bg: implement load_controller and efl.gfx.image via composition
With this commit the API of load controller and efl.gfx.image is
implemented via composition, which makes eolians API checker happy

ref T7880

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10064
2019-09-21 18:22:47 +02:00
Marcel Hollerbach b051cb52fa efl_ui_image: implement Efl.Gfx.Image and Efl.Gfx.Image_Load_Controller
at first i tried to implement that with composition, however, this does
not work, caused by the fact that the edje_object does not implement
efl.gfx.image nor load controller. which would mean i would have to
differentiate based on the type what kind of composition i would attach,
additionally, i would have to write an additional object which would
implement the correct behaviour.

To shortcut this overdone approach, this commit simply implements the
APIs in the image object.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10068
2019-09-21 18:22:45 +02:00
Marcel Hollerbach 0d7535071c elementary: make our tests work again
7321911468 moved the constructor to to
top, which leads to the fact that a few widgets cannot fetch the shared
data of the window. Which made the test suite fail.

With this commit we are just moving the sub_object_add after the
constructor, which fixes the flip crash.
This fixes the test suite
2019-09-21 15:04:42 +02:00
Carsten Haitzler 7321911468 efl ui widget - call parent constructor before doing more init
the object is not properly set up yet for child classes -0 parent like
the main evas object or smart obj havent been constructed yet so call
this really early, not in the middle of construction of an efl ui
widget...

this fixes a segv in elementary_test -to filp where it segv's on
object construction where evas object ->cur/prev are NULL (not set up
yet).
2019-09-21 10:26:46 +01:00
Daniel Kolesa 53a3326ddc eolian: rename any_value_ptr -> any_value_ref for consistency 2019-09-20 18:03:39 +02:00
Xavi Artigas 61ce4c79fd Use proper Eolian syntax for default values instead of docs
Summary:
Eolian supports reporting the defaults for parameters and return values, but in some
places we have been writing this information in the documentation instead.
This patch moves it to its proper place, where documentation generators can pick it up
and render it in a consistent manner.

Ref T8171

Reviewers: zmike, bu5hm4n, lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8171

Differential Revision: https://phab.enlightenment.org/D10051
2019-09-20 11:55:55 -03:00
Hosang Kim 47ab7e1b83 efl.ui.scrollbar: fix event name for scrollbar
Summary: Event name is applied in the past tense.

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10040
2019-09-20 12:51:48 +02:00
WooHyun Jung bc162b1253 efl_ui_scroll_util: add null check after calloc 2019-09-20 11:09:02 +09:00
Cedric BAIL 3e9f619b1d elementary: Efl.Ui.Widget_Factory bind widget property before finalizing the widget.
In the same vain as previous patch this will initialize more of the widget during its
creation and reduce unecessary recalc.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9949
2019-09-19 14:37:56 -07:00
Cedric BAIL cc49c8ac64 elementary: leverage sizing information from model if available to avoid unecessary calc.
With the new Efl unified infrastructure, we do delay a lot of the computation to finalize,
by filling the object information before finalize we reduce unecessary computation.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9948
2019-09-19 14:37:54 -07:00
Marcel Hollerbach fc935e99d9 efl_ui_position_manager: a way to announce new entities
there are situations where the entity is not ready yet when the initial
placing does happen. With this API you can tell the position manager
that the placing of the items can be reapplied at the entities are
availble now.

Differential Revision: https://phab.enlightenment.org/D9947
2019-09-19 14:37:52 -07:00
Marcel Hollerbach bf12fe241e efl_ui_layout_part_table: implement missing API
setting of these properties does not work, as they are not available in
legacy, but edje is still creating legacy objects.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10007
2019-09-19 14:37:39 -07:00
Marcel Hollerbach 2f48607e7c efl_ui_layout_part_*: declare stable
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9995
2019-09-19 14:37:37 -07:00
Marcel Hollerbach fc22a94d26 efl_ui_widget_*: declare parts stable
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9994
2019-09-19 14:37:35 -07:00
Marcel Hollerbach d8053bac96 efl_ui_layout_part_box/table: remove real_part_set
real part set was used to set the real part on the part, so the obj
pointer of Layout_Part_Data points to the correct evas object. With this
commit, this API is removed from the public .eo files, and is refactored
into the same API which is private.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9993
2019-09-19 14:37:33 -07:00
Marcel Hollerbach aecb3a4bb2 efl_ui_layout_part_table: implement Efl.Pack.pack API
this api was missing, the pack method here is behaving in the same
manner as Efl.Ui.Table.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9992
2019-09-19 14:37:31 -07:00
Marcel Hollerbach ccdec4ba68 efl_ui_widget_part: implement all the missing API
Efl.Color and Efl.File cannot be done due to composition. Efl.Gfx.Image
can, so we can solve this via composition, this also resolves all the
other cases for Efl.Gfx.Image.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9991
2019-09-19 14:37:29 -07:00
Yeongjong Lee e06e03f220 efl_ui_collection: fix null pointer dereferences
This will fix Coverity issue.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9986
2019-09-19 14:37:23 -07:00
Mike Blumenkrantz 393530b770 efl_ui: further unbreak headers
move more header includes around to fix building with Efl_Ui.h

ref T8228

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10022
2019-09-19 14:37:18 -07:00
Daniel Kolesa b74f98e8b7 efl: replace composite with composites and dedup implements
Since using 'composites' now automatically implements what has not
been implemented yet, remove the unnecessary duplicates.
2019-09-19 18:20:56 +02:00
Mike Blumenkrantz 7767ce884a elm/check: fix emission of legacy "changed" callback
legacy "check" and "toggle" widgets operate differently:
* check emits only the "toggle" event
* toggle emits "toggle", "on", "off"

legacy also must not emit events when the widget's state is changed
programmatically

to handle this effectively, check whether the event has been emitted for
each state when the signal is emitted from the theme, and track this
for subsequent uses to ensure that exactly one event is triggered
when it should be

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9831
2019-09-18 18:18:55 +02:00
Mike Blumenkrantz 011022ae1b efl/radio/box: handle non-radio-objects
this improves the usefulness of radio box by presenting it as a box widget
which has the additional feature of being able to manage radio widgets

also fix all the image cases in elm_test which relied on there being only
a single box in the window

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9998
2019-09-18 18:04:59 +02:00
Mike Blumenkrantz 3139371932 build: firmly split legacy and unified API into Efl_Ui.h and Elementary.h
these headers should be usable independently without having one secretly
pull in the other

fix T7667

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9981
2019-09-18 18:04:58 +02:00
Mike Blumenkrantz 9f301b1c9e build: remove efl_ui_calendar.h
this was somehow actually a legacy header which duplicated elm_calendar.h
...sort of

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9980
2019-09-18 18:04:57 +02:00
Mike Blumenkrantz 67b7cac72d build: use correct animation_view headers in Efl_Ui.h and Elementary.h
efl_ui_animation_view.h is the legacy header (but why?)
efl_ui_animation_view.eo.h is the unified header

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9979
2019-09-18 18:04:56 +02:00
Mike Blumenkrantz ca86b98e40 build: fix elm header usage
.c files in src/lib/elementary should only include elm_priv.h to ensure
that all the include ordering is correct and that all necessary headers
are pulled in

.c files outside of src/lib/elementary should include either/both
Efl_Ui.h, Elementary.h as needed

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9978
2019-09-18 18:04:55 +02:00
Mike Blumenkrantz 038b546414 elm/priv: fix this header
this should include emotion, since that component is used internally,
and it should not explicitly include api headers which should be in
public headers

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9977
2019-09-18 18:04:53 +02:00
Mike Blumenkrantz 2251865a30 elm/widget: make this header usable without elm_priv.h again
supposedly this header should be usable if someone wants to create an
elm widget, so ensure that it can be included without issues

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9976
2019-09-18 18:04:52 +02:00
Mike Blumenkrantz 43af39ac69 efl_ui/image_zoomable: include header for internal pan
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9975
2019-09-18 18:04:50 +02:00
Mike Blumenkrantz 304dac6570 elm/scrollable: unbreak this header
this is a legacy header, it can't include any unified api types

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9974
2019-09-18 18:04:49 +02:00
Mike Blumenkrantz 9ec38bff90 build: add include guards for a couple elm headers
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9973
2019-09-18 18:04:47 +02:00
Mike Blumenkrantz ffac7f076f efl_ui/win: fix prototype decls for eo api versions of autodel
this is still pretty broken, but at least the headers aren't

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9972
2019-09-18 18:04:46 +02:00
Mike Blumenkrantz b9b925fba5 build: use legacy api in places where legacy should be used
these seem to randomly have been changed when they shouldn't have

also install elm_clock_eo.h since this is required but we didn't install it

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9971
2019-09-18 18:04:45 +02:00
Wonki Kim 726b0ee920 elm_config: fix to check if eet_open fails
Summary: this patch adds a guard block in case of failure of eet_open().

Reviewers: bu5hm4n, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9987
2019-09-18 08:21:02 -04:00
Cedric Bail e448110439 elementary: properly shutdown and cleanup Efl.Ui.Position_Manager.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9946
2019-09-17 10:24:14 -07:00
Cedric Bail 3656996df4 elementary: fix double eina_value_free in Efl.Ui.Homogeneous_Model.property.set
Model do not own the Eina_Value when it is set on them. They can make a copy of it,
but shouldn't free it.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9945
2019-09-17 10:24:12 -07:00
Marcel Hollerbach cce67afc38 efl_ui_widget_part_bg: improve docs
Reviewers: segfaultxavi, zmike

Reviewed By: segfaultxavi

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9990
2019-09-17 16:04:04 +02:00
Marcel Hollerbach 8a029d5c04 efl_ui_image: implement missing API
the API calls have not been implemented, this revision implements these
APIs as redirects to the image if those are a edje object.

Normally this should be a calling the legacy edje API. However, this is
here really hard as imitating the correct callback behaviour is hard.
And the correct behaviour with the eina value type is also just leading
to copying the implementation from edje. So in order to keep the amount
of code low here, this just uses the efl-api to redirect the requests.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9989
2019-09-17 15:45:26 +02:00
Chris Michael 21c7f95d08 efl_ui_caching_factory: Fix resource leaks
Small patch to fix resource leaks pointed out by Coverity

Fixes Coverity CID1404762
2019-09-17 09:23:46 -04:00
Chris Michael bb7353b450 efl_ui_widget_factory: Fix resource leaks
Small patch to fix resource leaks pointed out by Coverity

Fixes Coverity CID1404766
2019-09-17 09:21:15 -04:00
Marcel Hollerbach ff0aabd345 efl_ui_multi_selectable: remove SINGLE_ALWAYS
this should get a better solution later on. There is also no real usage
for that.

ref T7922

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9985
2019-09-17 13:46:05 +02:00
Xavi Artigas 22b329d2f4 efl_ui_format: fix some more harmless Coverity warnings
1403023 Unchecked return value
1403024 Unchecked return value
1403026 Unchecked return value

If the eina value conversion fails the default value (0) will be used, which is already a good default.
ERRs have been added so the developer has a hint of what is happening.
2019-09-16 18:10:09 +02:00
Marcel Hollerbach 57c7e59850 efl_ui_focus_manager_calc: fix resource leaks
this fixes CIDs 1396965 & 1396984
2019-09-16 17:57:20 +02:00
Xavi Artigas 416b01ee74 docs: Update Efl.Ui.Box_Stack docs 2019-09-16 17:45:04 +02:00