Commit Graph

63617 Commits

Author SHA1 Message Date
Xavi Artigas ce2fcda1e2 Efl.Gfx.Image docs: whitespace and wording. 2019-08-26 17:25:10 +02:00
Carsten Haitzler bbb2dc6fad thread example - add exit with parent flags 2019-08-26 14:28:44 +01:00
Carsten Haitzler d4c123d360 efl loops/threads - by defaylt tasks (exe and threads) exit with parent
this also defers parent exit until all children exit and will wait
around looping until those children do report back with exited status
etc. - this meay mean some hangs for badly written/blocking apps that
have efl thrrads that refuse to exit. a slight policy change also
means that by default thread objects also get auto-deleted whent hey
report back exit codes etc. which leads to less code if you don't care
about this.
2019-08-26 14:19:30 +01:00
Marcel Hollerbach 634ebfeaf1 efl_ui_collection: honor desktop vs. touch setting of elm config
with this commit we do desktop-like selection on desktop systems:
- Multiselect with CTRL pressed
- Normal single selection if no CTRL is pressed
on touch devices this is simple on/off selection:
- click to add it to multiselect
- click to remote it from mutliselect

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9664
2019-08-26 14:42:54 +02:00
Marcel Hollerbach fea6dc6a55 efl_input_clickable: add a flag for showing user interaction
this flag can be used to indicate that a user activly interacted with
this widget.

ref T7893

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9663
2019-08-26 14:42:52 +02:00
Marcel Hollerbach 43edd17f41 efl_ui_single_selectable: add properties and events
this commit adds 2 new features, a new event and a new property

The fallback property is usefull if you want to have a selection that always falls back
to some preconfigured things.
As a usecase, think about a list of languges where you can select the
languages you want to have. When everything is deselected, the list will
simply fallback to the preconfigured element (for example the language
configured before)

The event is annoncing that there was a change to the selection. The
event is allowed to be defered, it will be emitted once for a range of
selection elements that happened during one loop iteration. This is
usefull if you are interested in a general selection where you want to
know that we changed from a specific set of selected element to another
set of elements, without monitoring every selectable in the widget.

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9662
2019-08-26 14:42:50 +02:00
Marcel Hollerbach 1c1c3685fe suite_helpers: punsh some sanity into function names
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9661
2019-08-26 14:42:49 +02:00
Marcel Hollerbach 35f9fc26e3 efl_ui_multi_selectable: add APIs for selecting
this can be used to select / unselect a range or all selectables in a
container. The range selectable APIs do not have a strong ordering on a
and b, b does not have to come after a.

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9660
2019-08-26 14:42:48 +02:00
Marcel Hollerbach c467dc6e81 efl_ui_item: add keybindings for selecting changes
This started as a small commit, when pressing enter -> set the item as
selected.
However, it was a bit more complex, it seems that there was never config
update code to copy bindings into the user profile. Which lead to the
fact that you are missing a lot of keyboard related features if you
havnt wiped your config in the last 1-2 years. For me keybindings for
Efl.Ui.Scroller Tab_Bar Image_Zoomable (Item) have been missing and were
never inserted. WHich is a problem for a user just constantly updating.

For now i created a function that copies over the bindings from the
system config, and they are merged into the user config. Intentional
leaving our of keybinding structs for a user-config will result in them
beeing merged again on the next config update. If you want to get rid of
key bindings as a user you can just keep the empty struct, which is the
signal for "i know what i am doing, i do not want to have them". The
problem that the system config is partly invalidated (due to moving the
key bindings struct to the user config), is fixed due to the fact that
the config is reloaded after that.

This function should be called everytime someone updates the config in
regards of the keybindings.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9723
2019-08-26 14:42:47 +02:00
Marcel Hollerbach c947485bd0 efl_ui_item: only fetch multiselection state if this is relevant
there are cases where the container does only implement single
selection, when then just asume implicitly single mode here.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9722
2019-08-26 14:42:46 +02:00
subhransu mohanty 02b63b8260 edje/cache: Refactor _edje_cache_file_coll_open()
Summary:
This function does lot of things
- can be called only to load the file (by passing coll as null)
- can be called to load both file and open the collection from the file.
- handles the file_cache logic
- handles fixing the collection after reading from file.

this patch is targeting to split the responsibility to
smaller function for easy maintenance and code readability.

future patch to follow for splitting the file opening and collection
opening to two different function.

Reviewers: Hermet, raster, cedric, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9715
2019-08-26 08:31:08 -04:00
sub.mohanty@samsung.com 5bd95c9850 eina/array: added eina_array_find() api to eina_array.
Summary: updated test suite for testing the api.

Reviewers: zmike, Hermet, cedric, segfaultxavi

Reviewed By: zmike, segfaultxavi

Subscribers: segfaultxavi, ProhtMeyhet, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9734
2019-08-26 08:31:08 -04:00
Hermet Park c6b52d4f09 canvas map: remove logically dead code.
the value was overflow, reduce its size.
2019-08-26 19:30:06 +09:00
Hermet Park 42a7aae58c canvas map: code refactoring.
remove dead code that unreachable looping.
2019-08-26 19:23:43 +09:00
junsu choi 03e12fe148 spinner_cxx_example: Fix use wrong api
Summary:
de18371 changes cause build errors. (D9707)
this is a patch to fix it.

Test Plan: N/A

Reviewers: woohyun, bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9738
2019-08-26 16:26:08 +09:00
Taehyub Kim d53e46d76f efl_ui_format: add null checking codes for eina_strftime in _do_format_string function
Summary: efl_ui_format: add null checking codes for eina_strftime in _do_format_string function

Reviewers: kimcinoo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9735
2019-08-26 14:52:28 +09:00
subhransu mohanty e742bf67e4 edje/style: optimize style_update function.
Summary:
If the style is readonly then we know for sure it dosen't have any text_class/color_class.
If a style has text_class tag then call update only once not for each text_class tag it has.

Reviewers: ali.alzyod, Hermet, cedric, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9641
2019-08-26 14:22:43 +09:00
Marcel Hollerbach de183719b3 efl_ui_spin_button: rename editable to direct_text_input
Summary: as suggested in T8097.

Reviewers: cedric, zmike, woohyun

Reviewed By: woohyun

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9707
2019-08-26 14:21:10 +09:00
Carsten Haitzler 2f534b0256 efreet - make efreet launch timeout configurable by env var
also report as an ERR explicitly if its a timeout.
2019-08-25 11:24:54 +01:00
Carsten Haitzler 9f9cfe65a6 evas - scalecache - be a bit paranoid about images being set to null
this may address a bug, but i'm not sure as i can't reproduce it.
suffice to say it smells like a possible leak.
2019-08-25 10:28:08 +01:00
Carsten Haitzler 443677c7f9 scalecache - handle possible use after free with sci still in list
the sci may still be in the list then we free it because sci->im is
NULL .. it may always have been null. this should guard against that
and fix it.

@fix
2019-08-24 15:21:42 +01:00
Lauro Moura e7510f6770 elm: Fix Scrollable_Content namespace
Summary:
Efl.Ui.Widget is already a class.

Required by the C# bindings.

Reviewers: cedric, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9733
2019-08-23 15:03:31 -04:00
Yeongjong Lee 471032d69d efl_canvas_text: remove unused Text_Style eo struct
Summary: `Efl.Canvas.Text_Style` is not used in eo world.

Reviewers: zmike, tasn

Reviewed By: tasn

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9565
2019-08-23 15:03:31 -04:00
Carsten Haitzler 8145d90ce7 edje signal matches - try number 3 to try plug all the holes
i found some more cases where the hash may change, so del and add from
the hash when this happens...

and... i found a nasty. _edje_signal_match_key_cmp compared pointers
like:

int return = ptr_a - ptr_b;

what happens if .... ptr_a and ptr_b are more than 2^31 (2gb) apart?
overflow (or underflow) and we return the wrong thing. i suspect this
is part of the problem and why my has remove/adds have not been
working because ... i suspect that maybe the hash dels have not been
finding things. i can't be sure right now, but it is an obvious
problem that i fixed by just doing if's and returning -1 or 1. also i
found a double-add or overwrite int he hash - when we shuffled with
_edje_signal_callback_move_last the matches CAN match exactly
something already in the hash thus adding it in will conflict with
what is already there as keys match. handle this cvase now and i have
seen segv's go away for now.

@fix
2019-08-23 19:36:42 +01:00
Carsten Haitzler a7273fc864 edje signal - let's not crash if something odd happens
better we dont just crash but err log it which can be set to abort
anyway.

@fix
2019-08-23 19:36:42 +01:00
Mike Blumenkrantz 42d10b84be elm/config: always use default profile with EFL_RUN_IN_TREE
Summary:
if this env var is set, we're probably running unit tests or something
and we should ignore ELM_PROFILE

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9701
2019-08-23 13:38:33 -04:00
Mike Blumenkrantz 2cd4d67109 tests/edje: disable efreetd and ecore system modules in unit tests
Summary: these cause tests to take up to 100x longer

Reviewers: bu5hm4n, cedric

Reviewed By: bu5hm4n, cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_tests

Differential Revision: https://phab.enlightenment.org/D9702
2019-08-23 13:38:33 -04:00
Yeongjong Lee b60e949fb6 efl_ui_table: remove inlist items in EINA_INLIST_FREE macro
Summary:
Check the EINA_INLIST_FREE document
```
in eina_inlist.h

NOTE: it is the duty of the body loop to properly remove the item from the
inlist and free it. This function will turn into a infinite loop if you
don't remove all items from the list.
```

This will avoid infinite loop when Efl.Ui.Table is invalidated.

ref T8145

Test Plan: See the test file in T8145

Reviewers: brunobelo, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8145

Differential Revision: https://phab.enlightenment.org/D9699
2019-08-23 13:38:33 -04:00
Mike Blumenkrantz e2b6e18577 efl_ui/scroll_util: block scroll calc tsunamis caused by repeat signal emits
Summary:
the 'efl,action,scroll' signal should only occur (at most) one time during
each signal process loop, so restrict it for this case

furthermore, the bar pos_changed and size_changed callbacks are always
triggered sequentially, so there's no need to emit the signal in both
callbacks

this fixes infinite edje embryo errors and massively improves scroll perf

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D9681
2019-08-23 13:38:33 -04:00
Mike Blumenkrantz 235e2dbed0 theme/scroller: don't "check" bar positions randomly in other programs
Summary:
this should be correctly triggered from the widget in order to avoid
recursive program/calc loops

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D9680
2019-08-23 13:38:33 -04:00
Mike Blumenkrantz 81962dfa1b tests/eio: unlink tmpfiles after tests
Summary:
my tmpdir is full of thousands of these things
Depends on D9710

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9711
2019-08-23 13:38:33 -04:00
Mike Blumenkrantz f9bd541e37 tests/eio: verify that the model monitor test's file is successfully created
Summary:
if this fails then the test will hang until timeout, so catch it earlier
Depends on D9709

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9710
2019-08-23 13:38:33 -04:00
Mike Blumenkrantz 42704eccc7 eio/poll: avoid ever dereferencing the backend's parent in a thread
Summary:
when a monitor is destroyed, it unconditionally and immediately deletes
the monitor struct. this means that as soon as the monitor is dead, the
backend must never access the parent pointer again if its lifetime exceeds
the lifetime of the monitor (such as in threads)

the only member of the monitor data used by the fallback monitor is the
monitor path, so we can just copy it to the fallback data to avoid ever
needing to dereference this pointer

fixes reliability issues with efl sentry unit tests

@fix

Depends on D9708

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9709
2019-08-23 13:38:33 -04:00
Mike Blumenkrantz 0b8605c35d efl/io: fix race condition with child model deletion
Summary:
if an event is emitted for a child that is added to the model during a
call to _efl_io_model_children_list(), it's possible that this child
will never be detected by the model's monitor/sentry if it is deleted
before the monitor can detect it, which means there will never be a
corresponding eio event emitted

in this case, ensure that we manually remove this child from the model
since we know we've just deleted it

this fixes reliability issues with efl io model monitor unit test

@fix

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9708
2019-08-23 13:38:32 -04:00
Yeongjong Lee 6b3d430f12 efl_ui_scrollbar_direction: replace with efl_ui_layout_orientation
Summary: ref T7924, T7884

Reviewers: segfaultxavi, bu5hm4n

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7924, T7884

Differential Revision: https://phab.enlightenment.org/D9612
2019-08-23 13:38:32 -04:00
Yeongjong Lee 17b0a2634c csharp: add legacy eo in mono blacklist
Summary: It is unnecessary to generate cs file of legacy class.

Test Plan: meson setup -Dbindings=mono,cxx

Reviewers: felipealmeida, lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9638
2019-08-23 14:33:20 -03:00
Felipe Magno de Almeida 2f0a20b688 eolian-mono: Add support for partial classes
Summary:
Add the -p command to eolian to create a class as a partial
class. Create a list in meson build of Eolian files that should be
built with partial classes.

This allows creating more specific method overloads for C#, manually,
by generating the class as partial and adding in manual binding the
partial class with the new methods and properties.

T8034

Reviewers: segfaultxavi, lauromoura, woohyun, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9690
2019-08-23 14:28:00 -03:00
Lauro Moura b4a6444473 csharp: Only build extension methods for beta
Reviewers: felipealmeida, SanghyeonLee

Reviewed By: SanghyeonLee

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9714
2019-08-23 14:26:24 -03:00
Lauro Moura f3d9238e15 csharp: Add bindable factory parts support
Summary:
This commit makes parts that implement `Efl.IContent` use BindFactory
instead of property binding.

```
var factory = new Efl.Ui.ItemFactory<Efl.Ui.ListDefaultItem>();
var iconFactory = new Efl.Ui.ImageFactory(null);
iconFactory.PropertyBind("filename", "modelProperty");
factory.IconPart().BindFactory(iconFactory);
```

Fixes T7628

Reviewers: cedric, felipealmeida, SanghyeonLee

Reviewed By: felipealmeida

Tags: #efl

Maniphest Tasks: T7628

Differential Revision: https://phab.enlightenment.org/D9653
2019-08-23 14:17:44 -03:00
Felipe Magno de Almeida 1aa05ab41b eolian-mono: Add support for multi-value properties with tuples
Summary: T8133

Reviewers: woohyun, segfaultxavi, felipealmeida

Reviewed By: felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9577
2019-08-23 14:07:09 -03:00
junsu choi 8aae656b80 slider_cxx_example: Fix use wrong api
Summary:
   d50fdc0, e84ecd95 changes cause build errors.
   this is a patch to fix it.

Test Plan: N/A

Reviewers: zmike, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9721
2019-08-23 18:08:39 +09:00
Mike Blumenkrantz 4acb83c8d9 efl_ui/image: explicitly mark 'drop' event @beta
this should probably be removed altogether but until dnd exists ensure
that this doesn't accidentally get released

ref T7873

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9705
2019-08-23 07:33:59 +02:00
Mike Blumenkrantz e84ecd9552 efl_ui/image: scalable -> efl.gfx.image::can_up/downscale
this removes the property from the image class to use the properties
from the interface

ref T7873

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9704
2019-08-23 07:33:58 +02:00
Mike Blumenkrantz d50fdce4d3 efl/gfx.image: add can_upscale and can_downscale properties
these are more granular properties which allow blocking of image
upscaling and/or downscaling regardless of scale hint

ref T7875

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9703
2019-08-23 07:33:57 +02:00
Mike Blumenkrantz ad0c805545 efl/gfx: redo image scale_type enum
this is ideally a bit more clear and flexible than the previous enum names

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9691
2019-08-23 07:33:56 +02:00
Mike Blumenkrantz 81183e0423 efl_ui/image: implement efl.gfx.arrangement content_align to replace align prop
this is effectively the same thing. no uses of this functionality exist anywhere

ref T7873

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9688
2019-08-23 07:33:55 +02:00
Mike Blumenkrantz 7442ae7092 efl_ui/image: remove geometry from internal struct, clean up geometry methods
these methods exist only to trigger efl_canvas_group_change on geometry
change and apply image sizing policies, there's no need to duplicate existing
functionality as well

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9687
2019-08-23 07:33:54 +02:00
Mike Blumenkrantz 28fff16739 efl_ui/image: add group_calc implementation, use deferred calc for sizing
this changes image internals to use the more standardized group_calc method
of sizing and causes all previous operations on the image which would have
resulted in an immediate recalc to instead defer the calc until the
group_calc function is called

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9686
2019-08-23 07:33:53 +02:00
Mike Blumenkrantz 01fc7eae35 elm: fix macro for group_calc function naming
this should be efl_canvas_group_group_calculate to match eolian function
naming

no functional changes

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9685
2019-08-23 07:33:52 +02:00
Mike Blumenkrantz f64a0966dc efl_ui/popup: remove text_alert class
this can now be done by simply calling
efl_ui_widget_scrollable_content_scrollable_text_set on an alert popup

tests have been adjusted for this

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9677
2019-08-23 07:33:51 +02:00