Commit Graph

29321 Commits

Author SHA1 Message Date
Carsten Haitzler f8cf378868 strings - be cleaere we are initialising buffers not appending
also should silence possible code checkers.
2019-11-16 13:02:10 +00:00
junsu choi 3493a37db8 Eina_Matrix : Use math header for cosf and sinf of rotate function.
The local cos and sin functions differ from
the math header cos and sin functions by result values
The 4th decimal place is different.
Computing large numbers can cause errors.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10467
2019-11-15 11:52:01 -08:00
Stefan Schmidt f6b066df2a gl_drm: remove dead return statement
Summary:
This return can never be reached in this function.

CID: 1402607
Depends on D10682

Reviewers: raster, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10683
2019-11-15 11:56:56 -05:00
Stefan Schmidt 8780f311ea examples: efl_exe: fix out of bounds write
Summary:
Buf is 4096 in size and rw_slice.len also evaluates to 4096. Write at
the last byte and not over bound instead.

CID: 1403895

Reviewers: raster, bu5hm4n, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10682
2019-11-15 11:55:47 -05:00
Daniel Kolesa a1cb493d4f eolian: fix memory leak when using error objects 2019-11-15 13:36:57 +01:00
Boris Faure b26085819e efreet: fix typo
Summary: efreet: fix typo

Test Plan: None

Reviewers: cedric, raster, lauromoura, devilhorns, marcelhollerbach, segfaultxavi, zmike, vtorri

Reviewed By: segfaultxavi, vtorri

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10676
2019-11-15 12:57:08 +01:00
Lauro Moura e130d808cd csharp: FunctionPtr wrappers are not IDisposable
Summary:
They don't actually store unmanaged memory and we already rely on the GC
to free them (not calling Dispose() directly through the managedCb
closure, so we don't need IDisposable.

Just making sure we release the Function Pointer data in the main loop
as the GC runs in a different thread.

Ref T8423

Depends on D10672

Reviewers: brunobelo, felipealmeida, YOhoho

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8423

Differential Revision: https://phab.enlightenment.org/D10673
2019-11-15 00:09:29 -03:00
Lauro Moura 2272e21b3c csharp: Silence CA2000 in tests
Summary:
These objects are expected to leave scope while alive.

Ref T8423

Depends on D10671

Reviewers: brunobelo, felipealmeida, YOhoho

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8423

Differential Revision: https://phab.enlightenment.org/D10672
2019-11-15 00:08:38 -03:00
Lauro Moura a0dd0b616a csharp: Suppress CA2000 in native wrappers.
Summary:
These methods may instantiate `IDisposable` classes like `Array`,
`Iterator` to pass to user-overriden C# methods. As we can't
guarantee the user stored the object or not, we can't call Dispose
directly on them.

Ref T8423

Depends on D10670

Reviewers: brunobelo, felipealmeida, YOhoho

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8423

Differential Revision: https://phab.enlightenment.org/D10671
2019-11-15 00:07:11 -03:00
Lauro Moura fe8496cb6e csharp: More CA2000 fixes
Summary:
For eldbus.Proxy.Send, as the native function takes ownership of the
message, we Ref it so it can still be used afterwards.

Ref T8423

Reviewers: brunobelo, felipealmeida, YOhoho

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8423

Differential Revision: https://phab.enlightenment.org/D10670
2019-11-15 00:06:29 -03:00
abdulleh Ghujeh 2b71b63022 Edje : textblock_styles strncmp improvement
Summary: Improve string comparison

Reviewers: cedric, ali.alzyod, woohyun, bu5hm4n

Reviewed By: woohyun

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10635
2019-11-15 10:14:03 +09:00
Lauro Moura 4832d9bfb8 edje: Remove warnings
Missing declaration from another file and removing unused variable.

After D10605

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10674
2019-11-14 10:52:04 -08:00
Bruno da Silva Belo cd113d7aae csharp: Disposing IDisposable objects.
Summary: ref T8423

Reviewers: lauromoura, felipealmeida, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8423

Differential Revision: https://phab.enlightenment.org/D10644
2019-11-14 15:32:42 -03:00
Woochanlee 37b55172b0 edje_calc: Exception handling if no calculation is required.
If there is no object swllowed, do not run part_calc on it.
This swallow will be calculated if there is an associated part, otherwise it will not need to be calculated.

When the app is launched, a lot of edje calculation logic is executed.
Most of the edje size is missing, so the calculation result is meaningless.
Added code to prevent this.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10605
2019-11-14 10:08:56 -08:00
Chris Michael 2288c92bc5 ecore-drm2: Fix issue of shifting 1 by more than 32bits
Based on 9ca573f40f, this patch fixes
potential undefined behaviour on 64 bit systems.

@fix
2019-11-14 12:21:40 -05:00
Daniel Kolesa 9ca573f40f eo: fix UB in the eo event code (edje_cc hangs etc.)
Today I started experiencing mysterious hanging of edje_cc
during build. "The French are at it again" I thought, and
after spending a while bisecting, I found the culprit.
It's 7f53d91583.

So, what is happening in here?

The idea here was fundamentally sound; compute a special
hash value for event descriptors, taking range between 0
and 63 (on 64-bit systems) and 0 and 31 (on 32-bit systems),
then use a mask sized 32-bit or 64-bit (depending on your
system) and check early if to bail out from callback_call,
saving some resources. So far so good.

The problem is in the way the mask is handled. We're applying
the hash as the shift value like, `x |= (1 << hash)`. On 32-bit
systems this is okay, but on 64-bit systems, C's dumb silent
coercion rules kick in, since the left side of the expression
is 1, a literal with type signed int; that means our shifting
range is limited to 31 and what we get is... undefined behavior.

This is obviously not what we want, so take a 1ULL value as a
base. The previous thing seemingly worked on x86_64 (nobody
reported any issues) and interestingly it worked for me too
for a while (on ppc64le), but undefined behavior can be
unpredictable, so...

This shouldn't need a commit message as long as this, but I'm
making it proportional to the amount of time I wasted on this.
2019-11-14 04:18:46 +01:00
junsu choi 288218527d efl_canvas_vg_node: Prevent access to NULL object for remove warning
Summary:
For remove this warning
WRN<3378>:eo ../src/lib/eo/eo.c:644 _efl_object_call_resolve() NULL passed to function efl_invalidated_get().

Test Plan: elementary_test -> animation_view

Reviewers: Hermet, kimcinoo, smohanty

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10627
2019-11-14 11:25:53 +09:00
Cedric BAIL 6befb6e17b efl: improve Efl.BooleanModel test by checking the child del case.
This has detected the bug that previous commit fix.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10634
2019-11-13 21:16:22 +01:00
Cedric BAIL 06873a6fdb efl: remove useless printf from Efl Container Model tests.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10633
2019-11-13 21:16:20 +01:00
Cedric BAIL d505167d68 ecore: correctly apply the offset on the upper part of the boolean mask for Efl.BooleanModel.
The upper mask is the one that should actually move as the gap is between the lower and
the upper mask when removing an element from the array.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10632
2019-11-13 21:16:16 +01:00
Cedric BAIL 652533e27d ecore: remove the composited children from the source of an Efl.CompositeModel.
The composite model was erroneously giving the reference to a children composited model
instead of the origianl children which made it impossible for the composited model
to delete the right child.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10631
2019-11-13 21:16:14 +01:00
Cedric BAIL 6cec0df499 elementary: fix initialization order and memory leak when setting model on Efl.Ui.CollectionView.
This patch use volatile model to make sure that a model is properly cleaned once it is not
used anymore.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10625
2019-11-13 21:16:11 +01:00
Cedric BAIL f71a109e70 elementary: fix recursive case during model fetch in Efl.Ui.CollectionView.
Figuring out why model fetch was sometime not working recursively allow to
reduce the amount of request that need to be made. In this case, notifying
the position manager or lack of notification was triggering a case where the
item would not show up (Joice of nested asynchronous behavior).

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10624
2019-11-13 21:16:07 +01:00
Cedric BAIL 560db39577 ecore: properly handle children destruction in Efl.BooleanModel.
The children removal event is happening on the parent model, so access
values directly.

T8358

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10623
2019-11-13 21:16:04 +01:00
Lauro Moura 600163320b csharp: Some missing conversions
Summary:
Ref T8430

Depends on D10616

Reviewers: brunobelo, segfaultxavi, felipealmeida, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8430

Differential Revision: https://phab.enlightenment.org/D10652
2019-11-13 10:05:27 -03:00
Lauro Moura bdf4396dfe csharp: Add conversion methods for generated types
Summary:
This also adds a helper method to convert from a value type name to the
reference type name. (e.g. int to Int32).

Ref T8430

Reviewers: felipealmeida, brunobelo, YOhoho

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8430

Differential Revision: https://phab.enlightenment.org/D10653
2019-11-13 10:05:19 -03:00
Yeongjong Lee 790fa0e04b eolian_mono: change OnXXXEvent access modifier from public to protected virtual
Summary:
OnXXXEvent is event invocation wrapper method to allow derived classes to
override the event invocation behavior.

Test Plan: meson with `-Dbindings=mono,cxx`

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10655
2019-11-13 04:10:37 -03:00
junsu choi f4fa719eae wl_egl : Prevent access to NULL pointer
Summary: The pointer s can be null.

Test Plan: N/A

Reviewers: Jaehyun_Cho, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10654
2019-11-13 13:42:16 +09:00
Bruno da Silva Belo fee55857e4 csharp: Add To and From methods for implicit conversion.
Summary: ref T8430

Reviewers: lauromoura, felipealmeida, segfaultxavi, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8430

Differential Revision: https://phab.enlightenment.org/D10616
2019-11-12 18:59:02 -03:00
Christopher Michael 5b588c3c39 tests/ecore_wl2: Add test for ecore_wl2_window_wm_rotation_supported
functions

ref T8016
2019-11-12 10:09:54 -05:00
Christopher Michael 96e148b231 tests/ecore_wl2: Modify ecore_wl2_window_rotation test
Small patch to modify ecore_wl2_window_rotation test to support
ecore_wl2_window_rotation_set function

ref T8016
2019-11-12 09:55:41 -05:00
Christopher Michael 8213524583 tests/ecore_wl2: Add test for ecore_wl2_window_rotation_app functions
ref T8016
2019-11-12 09:53:09 -05:00
Christopher Michael eb7816c727 tests/ecore_wl2: Add test for ecore_wl2_window_preferred_rotation
functions

ref T8016
2019-11-12 09:50:12 -05:00
Christopher Michael 67995823fd tests/ecore_wl2: Add test for ecore_wl2_window_maximized functions
ref T8016
2019-11-12 09:47:36 -05:00
Christopher Michael 239549deec tests/ecore_wl2: Add test for ecore_wl2_window_fullscreen functions
ref T8016
2019-11-12 09:44:39 -05:00
Christopher Michael 52299bffa0 tests/ecore_wl2: Add test for ecore_wl2_window_focus_skip_get/set
functions

ref T8016
2019-11-12 09:41:29 -05:00
Christopher Michael 17919040b6 tests/ecore_wl2: Add test for ecore_wl2_window_floating_mode_get/set
functions

ref T8016
2019-11-12 09:39:15 -05:00
Christopher Michael 1357171d56 tests/ecore_wl2: Add test for ecore_wl2_window_alpha_get/set functions
ref T8016
2019-11-12 09:35:50 -05:00
Christopher Michael fb71805925 tests/ecore_wl2: Add test for ecore_wl2_display_compositor_version_get
ref T8016
2019-11-12 09:22:09 -05:00
Yeongjong Lee 246485ca92 efl_ui_relative_container: rename relative_layout
Summary:
Also,
Rename parameter name `target` to `base`.
Rename parameter name `relative` to `relative_position`.

ref T8380

Depends On D10639

Test Plan: ninja test

Reviewers: woohyun, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8380

Differential Revision: https://phab.enlightenment.org/D10640
2019-11-12 14:33:13 +01:00
Yeongjong Lee a5daa2b72f eolian_mono: avoid keyword as a variable name
Summary:
```
        private static void relation_left_get(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity child, out Efl.Gfx.IEntity kw_base, out Efl.Gfx.Align relative_position)
        {
            Eina.Log.Debug("function efl_ui_relative_container_relation_left_get was called");
            var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
            if (ws != null)
            {
                base = default(Efl.Gfx.IEntity);relative_position = default(Efl.Gfx.Align);
```
Parameter name is replaced with `kw_base` but `base` is not changed in assignment expression (`base = default(Efl.Gfx.IEntity...`).
This patch will fix following compiler error.
```
src/bindings/mono/efl_ui_relative_container.eo.cs(544,21): error CS1525: Unexpected symbol `=', expecting `.' or `['
```

Test Plan: ninja with D10640

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10639
2019-11-12 10:17:25 -03:00
Yeongjong Lee 77c1777ca2 mono: reduce duplicated event code
Summary: Introduction GetInternalEventCallback function to reduce duplicated event code.

Test Plan: ninja test

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10638
2019-11-12 10:17:25 -03:00
Lauro Moura 73494aa71c dotnet: Generate doc and check for warnings
Reviewers: segfaultxavi, brunobelo, felipealmeida

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10630
2019-11-12 10:17:25 -03:00
Xavi Artigas 3fc7102561 Efl.Ui.Scroll_Manager: Fix indentation 2019-11-12 13:00:23 +01:00
junsu choi 04e3d8cc3d evas_device: Fix typo in evas_device_pop
Summary: Fix wrong null check

Test Plan: N/A

Reviewers: cedric, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10648
2019-11-12 16:23:33 +09:00
junsu choi 7d97abc05b Efl.Ui.Animation_View: Implement sector playing feature
Summary:
play_sector method is API for playing section.
If the animation object has section information, user can play the section.
Get the start and end section name and get the frame of each section.
And set and play the min and max frames of the current animation object.

Depends on D10506

Test Plan:
For example. Animation objects have "first","second" and "third" sectors.
And sector "second" has duration information.

User can use it like this:
efl_ui_animation_view_play_sector(anim_view, "first", "second");
efl_ui_animation_view_play_sector(anim_view, "second", NULL);
efl_ui_animation_view_play_sector(anim_view, "first", NULL); // first sector ~ end frame of animation object.
efl_ui_animation_view_play_sector(anim_view, "second", "third");
efl_ui_animation_view_play_sector(anim_view, "second", "wrong name");

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10507
2019-11-12 14:30:25 +09:00
junsu choi bcfffc07cf Efl.Gfx.Frame_Controller: Add sector property
Summary:
These APIs to get and set frames for a specific section for playing section.

Depends on D10505

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10506
2019-11-12 14:30:10 +09:00
junsu choi 93551ca58e evas_cache_vg : Implements sector_get/set internal APIs
Summary:
These APIs to get and set frames for a specific section in vg animation.
get API looks for a sector by name in the markerlist of VG_File_Data.
Then return start and end frames.

Depends on D10504

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10505
2019-11-12 14:29:50 +09:00
junsu choi ddaa5d1e6e vg_loader: Get markers information form json data.
Summary: If json data has marker information, it is stored in vg file data.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10504
2019-11-12 14:28:44 +09:00
Shinwoo Kim 97f5894972 evas_filter: remove shader compile error
Summary:
When grayscale fillter works there is a compile error:
implicit cast from "float" to "vec3"

Test Plan:
1. Create filter_example with following .
efl_gfx_filter_program_set(image, "grayscale ()", "grayscale");

2. Run.
ELM_ACCEL=gl ./filter_example

Reviewers: Hermet, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10595
2019-11-12 10:08:39 +09:00
Marcel Hollerbach 4c8a764b49 elm: apply the same fix we needed in entry to other scrollable widgets
this here is the same effect as in my previous commit:
When re retheme a object, we need to reset the signals, otherwise there
would be wrongly displayed scrollbars.

This fixes wrong scrollbars in enlightenment.

Differential Revision: https://phab.enlightenment.org/D10628
2019-11-11 13:44:57 +01:00
Marcel Hollerbach 6b1de6a4ac efl_canvas_animation: correctly handle double signness
Summary:
start_delay and duration both have to be > 0.0 otherwise there should be
an error. This also adds the neccessary checks, to ensure that.

For now this is only added to the normal evas test suite, maybe we eed
to refactor these efl_* API tests into theire own test suite. However,
not for now.

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10617
2019-11-11 10:20:48 +01:00
Bruno da Silva Belo 0a2c9f57ef csharp: Localization strings with CultureInfo.
Summary: ref T8404

Reviewers: lauromoura, felipealmeida, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8404

Differential Revision: https://phab.enlightenment.org/D10608
2019-11-07 23:33:33 -03:00
Lauro Moura 77207f9b58 csharp: Fix running headless tests in dotnet
Summary:
CoreCLR, the runtime of dotnet, has some issues regarding storing
environment variables (see dotnet/coreclr issue #15812), keeping them in
a local cache instead of flushing to the native `setenv`.

This commit replaces the usage of
`System.Environment.SetEnvironmentVariable` with a `setenv` wrapper.

Test Plan: Run without DISPLAY set and with dotnet.

Reviewers: felipealmeida, brunobelo, segfaultxavi, YOhoho

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10619
2019-11-07 22:46:15 -03:00
Marcel Hollerbach 01bf9a34d6 elm_entry: fix wrong displayed scrollbars
the scrolbars have been displayed wrongly before. Reason for this is
that the theme displays the bars per default, the code however works
with hidden by default. This was worked arround before with the fact
that we are explicitly hiding the vbar/hbar before.
The reason this previous code was not working proberly is that entry
decided to retheme a object that was already set to the interface
scrollable object. Which means, it was not detected by the code. With
the newly introduced reset function you can tell the interface, that you
have changed the group, signals will be emitted accordingly.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10622
2019-11-07 22:24:11 +01:00
Cedric BAIL 1f66d9ed9b elementary: watch event on the model Efl.Ui.CollectionView use directly.
Efl.Model can be nested and Efl.Ui.CollectionView use this ability. Listening
on the nested model instead of the nester model can lead to event being triggered
that shouldn't. Better listen on the top model.

Differential Revision: https://phab.enlightenment.org/D10621
2019-11-07 22:24:08 +01:00
Cedric BAIL 620dd43db2 eo: make sure to return the right value for efl_event_callback_call.
EINA_FALSE is to be returned only if one of the callback did call
efl_event_callback_stop not if their was no callback called.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10620
2019-11-07 22:24:07 +01:00
Cedric BAIL 65955b7a9f elementary: properly handle in flight request in Efl.Ui.CollectionView.
This fix adding item not always showing up in the CollectionView right away.
The main issue comes down to the fact we can not chain a new request when one
is already resolved partially. The code now make sure to properly do this.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10614
2019-11-07 22:24:03 +01:00
Cedric BAIL b77482e7d6 elementary: cleanup Eina_Future properly by relying on efl_future_then proper lifecycle.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10613
2019-11-07 22:24:00 +01:00
Lauro Moura cb60b595d3 csharp: Make GetPart public.
Summary:
`efl_part_get` is protected in C due to the presence of `efl_part`,
which does automatic refcount management in single method calls.

The C# binding has no limitation on this as it already handles the
lifetime for all objects.

Fixes T8462

Reviewers: brunobelo, segfaultxavi, SanghyeonLee

Reviewed By: SanghyeonLee

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8462

Differential Revision: https://phab.enlightenment.org/D10594
2019-11-07 17:59:40 -03:00
Bruno da Silva Belo d907aa5285 csharp: Removing a never used class.
Summary: ref T8417

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8417

Differential Revision: https://phab.enlightenment.org/D10611
2019-11-07 20:00:22 +01:00
Carsten Haitzler 39240fa3e7 Revert "evas_textblock: content fit feature"
This reverts commit 2f676a6591.

This causes segv's in edje_cc - i suspect the eet changes (or in combo
to how they are used in edje):

AddressSanitizer:DEADLYSIGNAL
=================================================================
==8991==ERROR: AddressSanitizer: SEGV on unknown address 0x000001010000 (pc 0xffff9f002604 bp 0xfffffa747700 sp 0xfffffa747700 T0)
==8991==The signal is caused by a READ memory access.
    #0 0xffff9f002600 in _eet_hash_gen ../src/lib/eet/eet_utils.c:25
    #1 0xffff9efdd024 in eet_dictionary_string_add ../src/lib/eet/eet_dictionary.c:103
    #2 0xffff9efbe324 in eet_data_put_string ../src/lib/eet/eet_data.c:849
    #3 0xffff9efc1c4c in eet_data_put_type ../src/lib/eet/eet_data.c:1427
    #4 0xffff9efd9128 in eet_data_put_unknown ../src/lib/eet/eet_data.c:4730
    #5 0xffff9efdb320 in _eet_data_descriptor_encode ../src/lib/eet/eet_data.c:5108
    #6 0xffff9efd5958 in eet_data_put_variant ../src/lib/eet/eet_data.c:4309
    #7 0xffff9efdb320 in _eet_data_descriptor_encode ../src/lib/eet/eet_data.c:5108
    #8 0xffff9efd9270 in eet_data_put_unknown ../src/lib/eet/eet_data.c:4739
    #9 0xffff9efdb320 in _eet_data_descriptor_encode ../src/lib/eet/eet_data.c:5108
    #10 0xffff9efd8ca0 in eet_data_put_array ../src/lib/eet/eet_data.c:4692
    #11 0xffff9efdb320 in _eet_data_descriptor_encode ../src/lib/eet/eet_data.c:5108
    #12 0xffff9efc7768 in eet_data_write_cipher ../src/lib/eet/eet_data.c:2403
    #13 0xffff9efc78a4 in eet_data_write ../src/lib/eet/eet_data.c:2420
    #14 0xaaaabb151dcc in data_thread_group ../src/bin/edje/edje_cc_out.c:2045
    #15 0xaaaabb152130 in data_write_groups ../src/bin/edje/edje_cc_out.c:2086
    #16 0xaaaabb157734 in data_write ../src/bin/edje/edje_cc_out.c:2866
    #17 0xaaaabb14122c in main ../src/bin/edje/edje_cc.c:456
    #18 0xffff9dbd92a0 in __libc_start_main (/usr/lib/aarch64-linux-gnu/libc.so.6+0x242a0)
    #19 0xaaaabb13ea00  (/home/raster/C/git/efl/build/src/bin/edje/edje_cc+0x38a00)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../src/lib/eet/eet_utils.c:25 in _eet_hash_gen
==8991==ABORTING
Aborted (core dumped)

When compiling breaks... it's certainly time to revert ASAP :(
2019-11-07 10:23:58 +00:00
Taehyub Kim e4e7ff3905 efl_ui_alert_popup: add title part in parts block
Summary: add title part in parts block

Reviewers: Jaehyun_Cho, woohyun, zmike, segfaultxavi

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10596
2019-11-07 13:38:47 +09:00
Lauro Moura 03d9fa97cc csharp: Fix test build dependency
Summary: Make dotnet target also depend on the manual test files.

Test Plan: Modify one of the manual files and run the tests again. The test target should be rebuilt.

Reviewers: bu5hm4n, segfaultxavi, brunobelo, felipealmeida

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10609
2019-11-06 23:47:50 -03:00
Lauro Moura cd467051af efl: Make stable single-valued getters consistent.
Summary:
Instead of a getter with an explicit return type, change it to be a
single-valued property.

The eolian C generator takes care of making this single value the actual
return value of the C function.

This also makes these properties able to be reflected on.

The stack properties returns just a pointer and not a new ref, so no
@move needed.

Beta properties will be handled in a future commit.

Depends on D10601

Reviewers: segfaultxavi, bu5hm4n, q66, cedric

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers, brunobelo, felipealmeida

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10602
2019-11-06 23:47:39 -03:00
Bruno da Silva Belo bd446fdcf9 csharp:comma have whitespace after and none before
Reviewers: felipealmeida, lauromoura, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10575
2019-11-06 23:46:18 -03:00
Wonki Kim da5c0c63f2 elm_config: replace ecore_file_cp with ecore_file_mv
ecore_file_cp can cause config data(eet file) invalid,
once multiple processes are trying to call elm_config_save.

this patch replaces it with ecore_file_mv to prevent the problem.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10578
2019-11-06 03:01:57 -08:00
Woochanlee 249ffd6a50 edje_calc: UNLIKELY changed to LIKELY.
It should takes true almost all times when it checks.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10606
2019-11-06 03:01:56 -08:00
Cedric BAIL f7c6bec38f elementary: fix end of fast scroll not showing up during Efl.Ui.CollectionView scroll.
efl_ui_position_manager_entity_entities_ready is expecting the end offset and not the
length of how many items have been updated. Sending the correct number fixes the problem.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D10590
2019-11-06 02:14:55 -08:00
Xavi Artigas 9ca84821fc Efl.Interpolator*: More sensible API names and docs
Summary:
OK, so, ALL interpolator parameters were called "factor" and the docs
literally said "First factor, Second factor, ..."
After diving into the actual implementation, proper names (and types) for the
parameters were found and proper docs written.

I am afraid I could not make any sense of the Divisor interpolator code. Those
docs still need writing.

Test Plan: Everything still builds and passes tests. No functional changes.

Reviewers: zmike, cedric, bu5hm4n, Jaehyun_Cho

Reviewed By: bu5hm4n

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10603
2019-11-06 15:50:11 +01:00
Lauro Moura 17a81bee4a csharp: Revamp dotnet support
Summary:
Instead of building with a patched meson version, make use of custom
targets and generated csproj files so we can used upstream meson
normally.

This avoids digging into "non official" dotnet stuff like calling
the CSC.dll directly that the patched meson tried to do.

To enable, run meson with `-Ddotnet=true`.

Regarding source file dependencies, Meson has a limitation[1]
about generated artifacts being placed in subdirectories.

In order to correctly track these generated artifacts for dotnet, we
generated them in the same folder as the csproj file through
`dotnet build -o`.

Instead of installing the dll like we do for mono, a nupkg is generated
and installed in the same folder as the dll would be
(<prefix>/lib/x86_64-linux-gnu/efl-mono-1)

To avoid messing around with Nupkg caches, we reference the source
project for the library directly instead of the nupkg when building the
test suite.

[1] https://github.com/mesonbuild/meson/issues/2320

Fixes T8168

Reviewers: bu5hm4n, woohyun, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, brunobelo, felipealmeida, segfaultxavi

Tags: #efl, #do_not_merge

Maniphest Tasks: T8168

Differential Revision: https://phab.enlightenment.org/D9717
2019-11-06 11:20:19 -03:00
Xavi Artigas 8a5976666b docs: Add caveat details to Efl.Canvas.Animation
Summary:
Regarding object properties not matching actual rendered values when animations
are running.

Depends on D10560

Reviewers: bu5hm4n, cedric, zmike, Jaehyun_Cho

Reviewed By: bu5hm4n

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10566
2019-11-06 15:16:43 +01:00
Wonki Kim dc52516397 check: reset flags that used for legacy 'changed' cb
Summary:
in case of setting a state of check by calling a API,
the flags that used for changed cb aren't changed.
which causes that the callback not invoked when it should be.

this patch resets the flags to make it work properly.

Reviewers: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10591
2019-11-06 14:03:29 +01:00
Lauro Moura d4d9ecc92f eolian: Imply @no_unused if @move in return.
Summary:
This makes sure the user is warned if it ignores a return value that
could potentially be a memory leak.

This also makes possible to use `value {}` blocks with `@move` instead
of value-less properties with `@no_unused`.

Also removed the `@move` from canvas_text_async_layout as it is ignored
in the only place it is used.

Reviewers: q66

Reviewed By: q66

Subscribers: #reviewers, #committers, bu5hm4n, felipealmeida, cedric, segfaultxavi

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10601
2019-11-05 16:54:17 -03:00
Xavi Artigas 714478cbf3 docs: Efl.Gfx.View 2019-11-05 17:31:13 +01:00
Stefan Schmidt 6108ea0978 tests/spec: allow for a longer timeout of the spec suite for dist build
During our ninja dist builds on the CI we run into timeouts for the spec
test suite taking longer than the default 30s. We can't pass any
multiplier into the ninja dist command as we are doing on the other unit
test runs.
Allow th default value for this suite to also cover the CI case. It does
no harm on sutuations where it finishes faster.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10593
2019-11-05 16:49:26 +01:00
Christopher Michael 4068d1c5be tests/ecore-wl2: Remove surface test
This test is not necessary anymore as the ecore_wl2_surface function
it was testing is now an internal function

ref T8016
2019-11-05 09:44:53 -05:00
Christopher Michael 2fe6d59321 evas-wayland-common: Move boolean fields to bottom of structure 2019-11-05 09:36:20 -05:00
Christopher Michael 9eb745a3c1 evas-wayland-common: Fix variable type
The 'resizing' variable here does not need to be an 'int' as it's
either true or false, so change to be Eina_Bool.
2019-11-05 09:36:20 -05:00
Christopher Michael ec1ce2b15d evas-wayland-common: Add include for ecore_wl2 internal functions 2019-11-05 09:36:20 -05:00
Christopher Michael 316136d032 ecore-wl2: Remove dead comment
Now that the (mostly unused) functions have been moved to be internal,
we don't need a comment in here about documenting them
2019-11-05 09:36:20 -05:00
Christopher Michael 40f10e204a ecore-wl2: Move ecore_wl2_surface_alpha_get function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:36:16 -05:00
Christopher Michael ca3d6f0e7f ecore-wl2: Move ecore_wl2_surface_window_get function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:36:13 -05:00
Christopher Michael 2069181bae ecore-wl2: Move ecore_wl2_surface_manager_del function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:36:09 -05:00
Christopher Michael 8d6b409699 ecore-wl2: Move ecore_wl2_surface_manager_add function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:36:05 -05:00
Christopher Michael 132851bc4e ecore-wl2: Move ecore_wl2_surface_buffer_create function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:36:02 -05:00
Christopher Michael 307837d199 ecore-wl2: Move ecore_wl2_window_surface_flush function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:58 -05:00
Christopher Michael 58e06a4740 ecore-wl2: Move ecore_wl2_surface_flush function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:55 -05:00
Christopher Michael c333022f0b ecore-wl2: Move ecore_wl2_surface_post function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:51 -05:00
Christopher Michael 49498f798b ecore-wl2: Move ecore_wl2_surface_assign function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:48 -05:00
Christopher Michael e451a91270 ecore-wl2: Move ecore_wl2_surface_data_get function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:44 -05:00
Christopher Michael 25691ce647 ecore-wl2: Move ecore_wl2_surface_reconfigure function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:40 -05:00
Christopher Michael 752b541e6c ecore-wl2: Move ecore_wl2_surface_destroy function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:37 -05:00
Christopher Michael 262598773a ecore-wl2: Move ecore_wl2_surface_create function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:33 -05:00
Christopher Michael a40dabd9e0 ecore-wl2: Move ecore_wl2_buffer_age_inc function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:29 -05:00
Christopher Michael 97dca40f6a ecore-wl2: Move ecore_wl2_buffer_age_set function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:26 -05:00
Christopher Michael 2dc751eb09 ecore-wl2: Move ecore_wl2_buffer_age_get function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:22 -05:00
Christopher Michael ecd7a2c3c6 ecore-wl2: Move ecore_wl2_buffer_busy_get function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:19 -05:00
Christopher Michael 431a5578da ecore-wl2: Move ecore_wl2_buffer_busy_get function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:15 -05:00
Christopher Michael e1208ca31f ecore-wl2: Move ecore_wl2_buffer_destroy function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:11 -05:00
Christopher Michael f22e8b4270 ecore-wl2: Move ecore_wl2_buffer_unlock function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:07 -05:00
Christopher Michael 400ed3f3c4 ecore-wl2: Move ecore_wl2_buffer_lock function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:35:03 -05:00
Christopher Michael ad692d2cbd ecore-wl2: Move ecore_wl2_buffer_discard function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:34:59 -05:00
Christopher Michael 694df8f823 ecore-wl2: Move ecore_wl2_buffer_unmap function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:34:52 -05:00
Christopher Michael 480390d862 ecore-wl2: Move ecore_wl2_buffer_map function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:34:48 -05:00
Christopher Michael 5f3a67945e ecore-wl2: Move ecore_wl2_buffer_wl_buffer_get function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:34:44 -05:00
Christopher Michael df15c774b8 ecore-wl2: Move ecore_wl2_buffer_destroy function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:34:36 -05:00
Christopher Michael ffab0f77a4 ecore-wl2: Move ecore_wl2_buffer_create function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:34:31 -05:00
Christopher Michael 848743f70d ecore-wl2: Move ecore_wl2_buffer_init function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:34:27 -05:00
Christopher Michael 8ffd0b7661 ecore-wl2: Move ecore_wl2_window_damage function to be internal
As this function is only used in 1 place and will likely never be used
outside of the modular dmabuf engine, we can move it to be internal
only.

ref T8013
2019-11-05 09:34:12 -05:00
Christopher Michael b6b7d2d61f ecore-wl2-dmabuf: Add include for internal functions 2019-11-05 09:08:23 -05:00
Christopher Michael bb85c55c50 ecore-wl2: Move variables to be above functions
NB: No functional changes
2019-11-05 08:53:29 -05:00
Ali Alzyod 2f676a6591 evas_textblock: content fit feature
Summary:
**Content Fit Feature for Evas_Object_Textblock**

This Feature is available at **Evas **object level.  And **Edje **level (where it is internally use evas functionality)
This feature will allow text block to fit its content font size to proper size to fit its area.

**Main Properties:**
Fit Modes        :   None=Default, Width, Height, All [Width+Height]
Fit Size Range :   Contains maximum and minimum font size to be used (and in between).
Fit Step Size    :   Step(Jump) value when trying fonts sizes between Size_Range max and min.
Fit Size Array   :   Other way to resize font, where you explicitly select font sizes to be uses    (for example [20, 50, 100] it will try 3 sizes only)

Text Fit feature was available in Edje but:
1- It doesn't effected by ellipsis or warping in font style (or do not handle the in right way)
2- Accuracy is not good (specially if you have fix pixel size elements (spaces,tabs,items))
3- No (Step size, Size Array) available.

Test Plan:
To check the Feature
> elementary_test
> fit
> textbock fit
You can modify all the modes and properties

These are two examples, One using Evas other uses Edje

**Evas**

```
#include <Elementary.h>

enum BUTTON{
   BUTTON_MODE             = 0,
   BUTTON_MAX              = 1,
   BUTTON_MIN              = 2,
   BUTTON_STEP             = 3,
   BUTTON_ARRAY            = 4,
   BUTTON_CONTENT          = 5,
   BUTTON_STYLE            = 6,
   BUTTON_ALL              = BUTTON_STYLE+1,
};

char* BUTTON_STR[BUTTON_ALL] ={
   "MODE",
   "MAX",
   "MIN",
   "STEP",
   "ARRAY",
   "CONTENT",
   "STYLE",
};

char *contents[] = {
   "Hello World",
   "This is Line<br>THis is other Line",
   "This text contains <font_size=20 color=#F00>SPECIFIC SIZE</font_size> that does not effected by fit mode"
   };

char *styles[] = {
   "DEFAULT='font=sans font_size=30 color=#000 wrap=mixed ellipsis=1.0'",
   "DEFAULT='font=sans font_size=30 color=#000 wrap=mixed'",
   "DEFAULT='font=sans font_size=30 color=#000 ellipsis=1.0'",
   "DEFAULT='font=sans font_size=30 color=#000'",
   };

char *styles_names[] = {
   "wrap=<color=#F00>mixed</color> ellipsis=<color=#F00>1.0</color>",
   "wrap=<color=#F00>mixed</color> ellipsis=<color=#F00>NONE</color>",
   "wrap=<color=#F00>NONE</color> ellipsis=<color=#F00>1.0</color>",
   "wrap=<color=#F00>NONE</color> ellipsis=<color=#F00>NONE</color>",
   };

typedef struct _APP
{
   Evas_Object *win, *box, *txtblock,*bg, *boxHor, *boxHor2;
   Eo *btn[BUTTON_ALL];
   Eo *lbl_status;
   char * str;
   unsigned int i_contnet, i_style;
} APP;
APP *app;

char * get_fit_status(Eo * textblock);

static void _btn_clicked(void *data EINA_UNUSED, Eo *obj, void *eventInfo EINA_UNUSED){
   if (obj == app->btn[BUTTON_MODE])
     {
        unsigned int options;
        evas_textblock_fit_options_get(app->txtblock, &options);
        if (options == TEXTBLOCK_FIT_MODE_NONE)
           evas_textblock_fit_options_set(app->txtblock, TEXTBLOCK_FIT_MODE_HEIGHT);
        else if (options == TEXTBLOCK_FIT_MODE_HEIGHT)
           evas_textblock_fit_options_set(app->txtblock, TEXTBLOCK_FIT_MODE_WIDTH);
        else if (options == TEXTBLOCK_FIT_MODE_WIDTH)
           evas_textblock_fit_options_set(app->txtblock, TEXTBLOCK_FIT_MODE_ALL);
        else if (options == TEXTBLOCK_FIT_MODE_ALL)
           evas_textblock_fit_options_set(app->txtblock, TEXTBLOCK_FIT_MODE_NONE);
     }
   else if (obj == app->btn[BUTTON_MAX])
     {
        unsigned int min, max;
        evas_textblock_fit_size_range_get(app->txtblock, &min, &max);
        max -= 5;
        evas_textblock_fit_size_range_set(app->txtblock, min, max);
     }
   else if (obj == app->btn[BUTTON_MIN])
     {
        unsigned int min, max;
        evas_textblock_fit_size_range_get(app->txtblock, &min, &max);
        min += 5;
        evas_textblock_fit_size_range_set(app->txtblock, min, max);
     }
   else if (obj == app->btn[BUTTON_STEP])
     {
        unsigned int step;
        evas_textblock_fit_step_size_get(app->txtblock, &step);
        step++;
        evas_textblock_fit_step_size_set(app->txtblock, step);
     }
   else if (obj == app->btn[BUTTON_ARRAY])
     {
        unsigned int font_size[] = {10, 50, 100 ,150};
        evas_textblock_fit_size_array_set(app->txtblock,font_size,4);
     }
   else if (obj == app->btn[BUTTON_CONTENT])
     {
        app->i_contnet++;
        if(app->i_contnet>=sizeof(contents)/sizeof(char*))
           app->i_contnet=0;
        evas_object_textblock_text_markup_set(app->txtblock,contents[app->i_contnet]);
     }
   else if (obj == app->btn[BUTTON_STYLE])
     {
        app->i_style++;
        if(app->i_style>=sizeof(styles)/sizeof(char*))
           app->i_style=0;

        Evas_Textblock_Style *style = evas_object_textblock_style_get(app->txtblock);
        evas_textblock_style_set(style,styles[app->i_style]);
     }

   elm_object_text_set(app->lbl_status, get_fit_status(app->txtblock));
}

char * get_fit_status(Eo * textblock)
{
   static char status[0xFFF];
   unsigned int options,min,max,step,size_array[256];
   size_t size_array_len;
   evas_textblock_fit_options_get(textblock,&options);
   evas_textblock_fit_size_range_get(textblock,&min,&max);
   evas_textblock_fit_step_size_get(textblock,&step);
   evas_textblock_fit_size_array_get(textblock,NULL,&size_array_len,0);
   if (size_array_len>255)
      size_array_len = 255;
   evas_textblock_fit_size_array_get(textblock,size_array,NULL,size_array_len);

   strcpy(status,"Mode : ");
   if (options == TEXTBLOCK_FIT_MODE_NONE)
      strcat(status,"MODE_NONE");
   else if (options == TEXTBLOCK_FIT_MODE_HEIGHT)
      strcat(status,"MODE_HEIGHT");
   else if (options == TEXTBLOCK_FIT_MODE_WIDTH)
      strcat(status,"MODE_WIDTH");
   else if (options == TEXTBLOCK_FIT_MODE_ALL)
      strcat(status,"MODE_ALL");

   strcat(status,"<br>");
   sprintf(status + strlen(status),"Max   : %d<br>",max);
   sprintf(status + strlen(status),"Min   : %d<br>",min);
   sprintf(status + strlen(status),"Step  : %d<br>",step);
   sprintf(status + strlen(status),"Array  : [ ");
   for (size_t i = 0 ; i < 10 ; i++)
     {
        if(i<size_array_len)
           sprintf(status + strlen(status)," %d,",size_array[i]);
     }

   if(10<size_array_len)
      sprintf(status + strlen(status)," ... ");
   sprintf(status + strlen(status)," ]");

   sprintf(status + strlen(status),"<br>");
   sprintf(status + strlen(status),"%s",styles_names[app->i_style]);

   return status;
}

int elm_main(int argc, char **argv)
{
  app = calloc(sizeof(APP), 1);

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   app->win = elm_win_util_standard_add("Main", "App");
   elm_win_autodel_set(app->win, EINA_TRUE);

   app->box = elm_box_add(app->win);
   app->boxHor = elm_box_add(app->box);
   app->boxHor2 = elm_box_add(app->box);
   app->txtblock = evas_object_textblock_add(app->box);
   app->bg = elm_bg_add(app->box);
   elm_bg_color_set(app->bg,255,255,255);

   Evas_Textblock_Style *style = evas_textblock_style_new();
   evas_textblock_style_set(style,styles[0]);
   evas_object_textblock_style_set(app->txtblock,style);
   evas_object_textblock_text_markup_set(app->txtblock,contents[0]);

   elm_box_horizontal_set(app->boxHor, EINA_TRUE);
   elm_box_horizontal_set(app->boxHor2, EINA_TRUE);

   evas_object_size_hint_weight_set(app->box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(app->box, EVAS_HINT_FILL, EVAS_HINT_FILL);

   evas_object_size_hint_weight_set(app->box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(app->box, EVAS_HINT_FILL, EVAS_HINT_FILL);

   evas_object_show(app->txtblock);
   evas_object_show(app->bg);
   evas_object_show(app->box);
   evas_object_show(app->boxHor);
   evas_object_show(app->boxHor2);

   elm_box_pack_end(app->box, app->bg);
   elm_box_pack_end(app->box, app->boxHor);
   elm_box_pack_end(app->box, app->boxHor2);

   elm_object_content_set(app->bg,app->txtblock);

   elm_win_resize_object_add(app->win, app->box);
   evas_object_resize(app->win, 320, 480);

   for(int i = 0 ; i < BUTTON_ALL ; i++)
     {
        app->btn[i] = elm_button_add(app->boxHor);
        evas_object_smart_callback_add(app->btn[i], "clicked", _btn_clicked, NULL);
        elm_object_text_set(app->btn[i], BUTTON_STR[i]);
        elm_box_pack_end(app->boxHor, app->btn[i]);
        evas_object_show(app->btn[i]);
     }

   app->lbl_status = elm_label_add(app->boxHor2);
   elm_object_text_set(app->lbl_status, get_fit_status(app->txtblock));
   elm_box_pack_end(app->boxHor2, app->lbl_status);
   evas_object_show(app->lbl_status);

   evas_object_size_hint_weight_set(app->txtblock, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(app->txtblock, EVAS_HINT_FILL, EVAS_HINT_FILL);

   evas_object_size_hint_weight_set(app->bg, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(app->bg, EVAS_HINT_FILL, EVAS_HINT_FILL);

   evas_object_show(app->win);
   elm_run();
   return 0;
}

ELM_MAIN()
```

**Edje**

```
// compile: edje_cc source.edc
// run: edje_player source.edje
collections {
   styles
   {
      style
      {
         name: "text_style";
         base: "font=sans font_size=30 color=#FFF wrap=mixed ellipsis=1.0";
         tag: "br" "\n";
         tag: "ps" "ps";
         tag: "tab" "\t";
         tag: "b" "+ font_weight=Bold";
      }
   }
   group {
      name: "my_group"; // must be the same as in source.c
      parts {

         part
         {
            name: "background";
            type: RECT;
            scale: 1;
            description
            {
               color: 0 0 0 0;
               rel1.relative: 0.0 0.0;
               rel2.relative: 1.0 1.0;
            }
         }

         part
         {
            name: "text";
            type: TEXTBLOCK;
            scale: 1;
            entry_mode: NONE;
            effect: OUTLINE_SHADOW;
            description
            {
               state: "default" 0.0;
               rel1.to : "background";
               rel1.relative: 0.0 0.0;
               rel2.to : "background";
               rel2.relative: 1.0 1.0;
               text
               {
                  style: "text_style";
                  align: 0.0 0.0;
                  text: "Hello World This is Me";
                  fit: 1 1;
                  fit_step: 1;
                  size_range: 30 200;
                  //fit_size_array: 20 40 60 80 100 200;
               }
            }
         }
      }
   }
}
```

Found Task T5724 relative to this Feature

Reviewers: woohyun, bowonryu, cedric, raster

Subscribers: #committers, #reviewers, cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9280
2019-11-05 20:40:59 +09:00
Xavi Artigas 6a647880c6 docs: Efl.Ui.Table_Static
The need for this class is still being discussed in
https://phab.enlightenment.org/T8206
but at least it is a bit more clear what its purpose is.
2019-11-05 11:31:29 +01:00
Shinwoo Kim 51169ac325 evas filter: Implement inverse color filter
Summary: This is the first version of inverse color filter both GL and SW.

Test Plan:
1. Create filter_example with following .
efl_gfx_filter_program_set(image, "inverse_color ()", "inverse color");

2. Run.
./filter_example (Use ELM_ACCEL=gl for GL engine)

Reviewers: Hermet, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10335
2019-11-05 10:45:14 +09:00
Bruno da Silva Belo 0e6e983808 csharp: Changing visibility of nested class/struct
Reviewers: felipealmeida, lauromoura, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8393

Differential Revision: https://phab.enlightenment.org/D10588
2019-11-04 14:53:54 -03:00
Xavi Artigas 0e71e0e286 docs: Polish Efl.Canvas.Animation_Group and sons
Summary: These docs were almost empty.

Reviewers: bu5hm4n, zmike, cedric, Jaehyun_Cho

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10564
2019-11-04 13:51:21 +01:00
Marcel Hollerbach 56d541fbdb efl_canvas_animation: improve generally
Summary:
to be taken over by doccop
Depends on D10559

Reviewers: Jaehyun_Cho, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10560
2019-11-04 13:46:49 +01:00
Xavi Artigas dc5ffbb866 docs: Polish Efl.Canvas.Animation_*
Summary:
These docs were lacking a lot of detail.

Depends on D10562

Reviewers: bu5hm4n, cedric, zmike, Jaehyun_Cho

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10565
2019-11-04 13:06:53 +01:00
Marcel Hollerbach a1a77f5590 efl_canvas_animation_translate: move from x&y to container types
Summary:
this now uses Eina.Position2D so its easier to pass arround other
positions.

ref T8288
Depends on D10559

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8288

Differential Revision: https://phab.enlightenment.org/D10562
2019-11-04 13:06:53 +01:00
Marcel Hollerbach e2a011f56b efl_canvas_animation_scale: move from 2 doubles to vectors
Summary:
with this the passing of positions is getting more easy. Additionally,
Reading the API call gets easier, as parameters are semantically
grouped.
Depends on D10558

Reviewers: segfaultxavi, Jaehyun_Cho

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8288

Differential Revision: https://phab.enlightenment.org/D10559
2019-11-04 13:06:53 +01:00
Marcel Hollerbach 92a4fab5d7 efl_canvas_animation: be more explicit with errors
Summary:
with this commit invalid values are not accepted silently anymore. But
rather a error will be raised.
Depends on D10350

Reviewers: segfaultxavi, Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8288

Differential Revision: https://phab.enlightenment.org/D10558
2019-11-04 13:06:53 +01:00
Marcel Hollerbach f47b927745 efl_canvas_animation_rotate: adjust API
Summary:
in task T8288 we concluded that a few APIs need to be adjusted in order
to stabelize animation classes at some point. This also adds a new macro
to eina in order to create EINA_VECTOR2 values more easily.

ref T8288

Reviewers: Jaehyun_Cho, segfaultxavi, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8288

Differential Revision: https://phab.enlightenment.org/D10350
2019-11-04 13:06:53 +01:00
Yeongjong Lee eb371c992d eo_mono: make Efl.EventDescription, Efl.Event, Efl.EventCb internal
Summary:
Hide struct and delegate related to `IntPtr`.

Depends on D10585
Depends on D10586

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10587
2019-11-01 17:21:30 -03:00
Yeongjong Lee fa3358acce mono: blacklist efl_thread
Summary:
C# developers are already familar with C# Thread`System.Threading.Thread`, We
don't need to provide Wrapped `Efl.Thread` class.
Also, we can't ensure compatibility between C# Thread and EFL Thread.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10586
2019-11-01 17:06:59 -03:00
Yeongjong Lee be4f8b253b mono: blacklist functions related to native event
Summary:
`efl_event_callback_forwarder_priority_del`
=> It can be replaced with `obj.XXXEvent -= callback;`.
Furthermore, `efl_event_callback_forwarder_priority_add` is already in blacklist.

`efl_ui_widget_input_event_handler`
=> It can be replaced with `obj.DownEvent`, `obj.UpEvent` and `obj.PointerWhellEvent`.

`efl_access_object_event_handler_add`
`efl_access_object_event_handler_del`
`efl_access_object_event_emit`
=> They are functions to handle global event related to access(E.g. `elm_atspi_bridge`).
It should be generated to `static event` in C#.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10585
2019-11-01 16:46:07 -03:00
Lauro Moura bd6876c97e csharp: Refactor MarshalOwn
Summary:
Instead of using the empty interface as tag, split MarshalOwn into two
marshalers that can be used directly.

Fixes T8395 (CA1040)

Test Plan: no new functionality. Use existing tests

Reviewers: felipealmeida, brunobelo, segfaultxavi, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8395

Differential Revision: https://phab.enlightenment.org/D10457
2019-11-01 10:04:04 -03:00
Carsten Haitzler b80b9213ad Revert "elm/genlist: don't process entire item queue on each item add"
First - the big problem. This breaks enlightenment's bluez5 popup. it
does a sortyed inert using the item data and the item data for one of
the itmes to compare in _cb_insert_cmp() in e_mod_popup.c when it
calls elm_object_item_data_get(0 returns a junk ptr for the item data
after this patch. i haven't managed to figure out exactly why in my
last 30 mins of looking.

But a closer look... this disables immediate processing of:

1. the first block of items (32items) which was intended so for
short/small lists you have some content by the time you go to the
first frame, and at least the first block of itso you seem to have
visual contnt and not a blank list until idlers can process further
content. so the patch being reverted would have gotten rid of this
logic that gets you content as opposed to blank:

  while ((sd->queue) && ((!sd->blocks) || (!sd->blocks->next)))

2. if it's a homogenous list, all items have the same size so we do
have to realize the first item of each class type but ONLY that one.
further items should not need realizing as we can ASSUME the height to
be the same as the first item... that's the point of homogenous +
compress lists - all items of the same class have the same height and
width thus shortcutting further need to calculate nd realize. if we
are reizing everything in a homogenous list then the issue lies with
something going wrong with this above logic. we shokuld be able to
handle such lists super fastif this logic was working.
that's the 2nd while:

   while ((sd->queue) && (sd->blocks) &&
             (sd->homogeneous) && (sd->mode == ELM_LIST_COMPRESS))

so overall, this should not have been realizing every item. either
just the first block of 32, OR just the first item of any class and
thus assume all further items are the same size without realizing
being needed. if these broke then the solution is not commenting this
out but finding out why this logic is breaking :)

and not to mention... this commenting out also caused segfaults in
existing applications which are doing the right thing. perhaps the
sorting logic also needed updating as well if this above is commented out...
but i didn't have time to chase it more than this.

---

This reverts commit 0777b74f07.
2019-11-01 10:23:40 +00:00
junsu choi 39bde2cedf ecore_event: Remove unused goto define
Summary:
   For remove -Wunused-label warning

Test Plan: N/A

Reviewers: Hermet, kimcinoo, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10584
2019-11-01 12:46:24 +09:00
Yeongjong Lee 166b3e66e3 mono: blacklist elm_general.eot
Summary:
Prevent generating legacy eot.cs
Depends on D10580

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10581
2019-10-31 19:07:09 -03:00
Yeongjong Lee 5c1f3975bb mono: blacklist efl_ui_text_context_menu_item_add
Summary: Blacklist a method which has `IntPtr` parameters.

Reviewers: woohyun, segfaultxavi, YOhoho, felipealmeida

Reviewed By: felipealmeida

Subscribers: segfaultxavi, zmike, q66, bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10579
2019-10-31 19:07:05 -03:00
Yeongjong Lee 11fb54e4bc mono: remove duplicated EinaFreeCb delegate
Summary: Use Eina.Claabacks.EinaFreeCb instead.

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10577
2019-10-31 18:39:54 -03:00
Cedric BAIL 81165d743f efl: fix include due to stale files.
Reviewers: zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10583
2019-10-31 15:43:21 -04:00
Yeongjong Lee e2980cd981 efl_ui_text: remove elm_general.eot
Summary: remove legacy dependency in eo file.

Test Plan: ninja

Reviewers: woohyun, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10580
2019-10-31 13:38:08 -04:00
Cedric Bail a9227fd530 evas: move watching over destruction of device to custom logic due to high use.
Summary:
This specific EFL_EVENT_DEL handler was registered thousand of time alone on
an Evas device. Potential solution are to improve handling of this kind of large
scale callback logic or just not take that path. I find it easier to have a custom
code in this case to handle the destruction of Evas device and avoid this
thousand of callback.

Depends on D10492

Reviewers: zmike, raster, bu5hm4n, Hermet

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10493
2019-10-31 13:29:56 -04:00
Cedric Bail 21f07b9fa9 evas: deprecate evas_device_parent_set.
Summary:
It is unlikely that the code was working before and it was a bad idea
anyway. There is no user of this API in EFL.

Depends on D10490

Reviewers: zmike, raster, bu5hm4n, Hermet

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10491
2019-10-31 13:29:56 -04:00
Cedric Bail 3fd6693764 evas: move exposed internal structure of Efl_Input_Device to be private.
Summary: Depends on D10489

Reviewers: zmike, raster, bu5hm4n, Hermet

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10490
2019-10-31 13:29:56 -04:00
Cedric Bail 7dc98ab3d0 evas: move efl_input_device into evas/Efl_Canvas.h
Summary:
The internal and the API we would like is mostly a canvas API. A lot of the code
in evas is working around the fact that efl_input_device is not defined inside Evas.
This patch is the first step to try to clean this up.

Depends on D10487

Reviewers: zmike, raster, bu5hm4n, Hermet

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10488
2019-10-31 13:29:56 -04:00
Mike Blumenkrantz 72be0842ab tests/eina: use #ifdef guard for block which can only occur inside ifdef
this value is set in the corresponding #ifdef block above, so use the same
guard here to make code more readable

CID 1400948

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10321
2019-10-31 03:19:19 -07:00
Marcel Hollerbach 1a621c9109 eo_base_class: move shift init to the first call
Summary:
this cannot be evalulated in compile time, so this must be evalulated in
runtime, at the first call.

This should fix OSX build.

Co-authored-by: Cedric Bail <cedric.bail@free.fr>

Reviewers: zmike, cedric, raster

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10582
2019-10-31 12:48:27 -04:00
Cedric Bail ff14c84fcb eo: add debug ability to detect long chain of event handler.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10484
2019-10-31 14:52:56 +01:00
Cedric Bail db93501e66 eo: reduce memory use to track event registration and callback call.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10482
2019-10-31 14:52:52 +01:00
Cedric Bail aacb6bc0c8 ecore: remove custom code for generating Eina_Future_Schedule attached on Efl.Loop.
This leverage the new infrastructure from Eo that provide a scheduler for any event
attached to any object.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10481
2019-10-31 14:52:49 +01:00
Cedric Bail 474b1b2c2d eo: add infrastructure to attach an Eina_Future_Scheduler to any source of event.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10480
2019-10-31 14:52:46 +01:00
Cedric Bail 2f1894d054 eina: only the type need to be NULL to assume EINA_VALUE_EMPTY.
This avoid comparison with potentially uninitialized byte.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10479
2019-10-31 14:52:41 +01:00
Cedric Bail 514a96f4d6 ecore: remove unecessary code for Eina_Future scheduler.
As we do not rely on legacy Ecore Event directly anymore, we do not
need to mind the shutting down of EFL.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10477
2019-10-31 14:52:38 +01:00
Cedric Bail 2401dae848 ecore: remove unecessary field in data structure.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10476
2019-10-31 14:52:35 +01:00
Cedric Bail 7f53d91583 eo: prevent unecessary callback call walk.
This patch introduce a small hash (64 or 32bits) that cache all existing
Efl_Event_Description callback handler registered on an object. It slightly
reduce the time needed to do an unecessary call and cost just a few bytes
per object.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10475
2019-10-31 14:52:31 +01:00
Cedric Bail 9852e6cabc elementary: handle case when XFIXES is not available.
Summary:
ECORE_X_EVENT_FIXES_SELECTION_NOTIFY is only initialized when XFIXES
is available. If ecore_event_handler_add is called with type == 0, it
will trigger an abort and elementary would not initialize properly.

Depends on D10491

Reviewers: zmike, raster, bu5hm4n, Hermet

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10492
2019-10-31 09:17:53 -04:00
Cedric Bail e502da8345 edje: load edje seat callback only when necessary.
Summary:
This reduce in elementary_test the number of callback registered on the
canvas from hundreds to around 10.

Depends on D10486

Reviewers: zmike, raster, bu5hm4n, Hermet

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10487
2019-10-31 09:17:46 -04:00
Cedric Bail 27e1bf2fe3 edje: improve callback count on Evas canvas.
Summary:
This reduce by 3 the amount of callback registered on the canvas. Another
potential improvement would be to only register those callback if someone
is listening for a 'seat,*' event or if the edje file define seat filters.

Depends on D10484

Reviewers: zmike, raster, bu5hm4n, Hermet

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10486
2019-10-31 09:17:40 -04:00
Mike Blumenkrantz 5d69afdc09 tests/spec: pre-create a ton of widgets during test init
Summary:
similar to existing mechanics for elm/efl_ui tests, this pre-creates
all the widgets used as test contents for all the test cases so they
can be forked and reused without needing to spend time in every single
test creating the same test contents
Depends on D10573

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10574
2019-10-31 09:02:56 -04:00
Mike Blumenkrantz 7cd9113f1f tests/elm: add utils for detecting buffer engine and setting fork init cb
Summary:
this allows use of the global win object prior to actually being inside a
test for the purpose of doing additional setup
Depends on D10572

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10573
2019-10-31 09:02:54 -04:00
Mike Blumenkrantz ec7562fddf tests/spec: use wrefs to automatically unset global pointers
Summary:
these may end up being reused in the future, so unset them only on
object destruction
Depends on D10571

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10572
2019-10-31 09:02:52 -04:00
Mike Blumenkrantz c722b18d2a tests/spec: assert success of content_set during setup
Summary: Depends on D10570

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10571
2019-10-31 09:02:51 -04:00
Mike Blumenkrantz 2021c756ef tests/spec: store test class and reuse globally to avoid needing efl_isa
Summary: Depends on D10569

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10570
2019-10-31 09:02:49 -04:00
Mike Blumenkrantz 9c71ce2c00 tests/elm: add util function for detecting whether current test is forked
Summary:
this is useful for determining whether we can use extra hacks because nobody's
supervising our pointer (ab)use
Depends on D10568

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10569
2019-10-31 09:02:47 -04:00
Mike Blumenkrantz e9e0f79956 tests/spec: reduce looping of pack content tests
Summary:
this was hugely over-testing before; simply verifying one item outside
the limit is sufficient here
Depends on D10567

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10568
2019-10-31 09:02:45 -04:00
Mike Blumenkrantz 2ceea3e44b tests/spec: merge some loops in linear pack tests
Summary:
these are small loops, but iterating small loops hundreds of times leads to
big slowdowns

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10567
2019-10-31 09:02:44 -04:00
Carsten Haitzler 80d317f20e evas - revert evas variation sequence support - out of bound accesses
This code is filled with out of bounds accesses now after the reverted
patch. All those base_char+1, itr+1 etc. in
evas_common_font_query_run_font_end_get() are accessing BEYOND
the end of the run. textgrid shows this instantly to fall over as it
uses single unicode codepoint chars with no nul terminator. As this
api takes an explicit run_len we should never access beyond the end of
the run_len.

Please revisit this code and keep in mind proper memory/bounds
accessing. If there was ano run_len and it assumed strings were
regular strings that had to be nul terminated... then it might be ok,
but not here.

of course if i put in guards for these +1's then it ends up in
infintie loops, so enough debugging and send it back for a rethink. :)

....

Revert "evas_object_textblock: add support for variation sequences"

This reverts commit 46f2d8acdc.
2019-10-31 12:31:52 +00:00
Bruno da Silva Belo 72a5367f8d csharp: space after keywords.
Reviewers: felipealmeida, lauromoura, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10576
2019-10-31 07:53:00 -03:00
Mike Blumenkrantz 78bc0b77b7 tests/efl_app: add port of intensive timer recursion
this is roughly the same as the similarly-named ecore_timer unit test

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10556
2019-10-30 08:49:12 -07:00
Mike Blumenkrantz a6c92e2fc0 tests/evas: prune directory scan in mesh loader/saver test
this test should use a hardcoded list of files, but until it does we
can at least attempt to reduce failure rates which may occur from random
garbage in the tree

ref T6857

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10552
2019-10-30 08:49:11 -07:00
Mike Blumenkrantz 82e19f075e tests/evas: replace macro with function in mesh loader/saver test
this was totally impossible to debug

no functional changes

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10551
2019-10-30 08:49:10 -07:00
Mike Blumenkrantz 7a2fa2c614 tests/ecore: add intensive test for recursive timer usage
this recurses the mainloop to a depth of 8, continually creating and
triggering timers as it progresses and tracking the states to ensure that
everything is working as expected regardless of depth

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10547
2019-10-30 08:49:09 -07:00
Mike Blumenkrantz 7b374754cb tests/ecore: do not create global test timeout timer if running unforked
this is a pita for debugging

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10546
2019-10-30 08:49:08 -07:00
Mike Blumenkrantz 9e313f18ac ecore/timer: correctly handle recursive deletion of legacy timers
if a legacy timer callback returns false, the timer is deleted. in the
case where the legacy timer is deleted inside the callback while the same
timer is ticking recursively, however, the deletion must be deferred until
the outer-most frame of the timer's callstack has returned from the callback
in order to avoid improperly handling the timer

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10545
2019-10-30 08:49:06 -07:00
Mike Blumenkrantz 1d62c95a2a evas/font: simplify handling strings when constructing font names
no need to strcpy here when we can just pass the length to stringshare directly

CID 1382854

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10441
2019-10-30 08:49:05 -07:00
Mike Blumenkrantz 1e3a3c3357 efl_ui: mark Efl.Ui.Focus.Autoscroll_Mode beta
this cannot currently be used for anything and was not explicitly stabilized

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10540
2019-10-30 08:49:04 -07:00
Mike Blumenkrantz e416b44ed7 efl_ui: remove Efl.Ui.Slider_Indicator_Visible_Mode
this cannot be used for anything and serves no purpose

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10539
2019-10-30 08:49:02 -07:00
Cedric BAIL 313796a4f6 eina: introduce a simple malloc near implementation for Chained Mempool.
This actually seems to significantly and reliably improve speed result with
expedite in a higher way than I expected (~10%) which is neat, I guess.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10537
2019-10-30 08:14:29 -07:00
Cedric BAIL efbc90ff87 eina: make use of the new near allocation policy for Eina_List.
The idea is to improve memory locality and hopefully get better cache hit
in general.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10536
2019-10-30 08:14:28 -07:00
Cedric BAIL fb5cf01977 eina: introduce an API for requesting memory near already allocated memory from an Eina_Mempool.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10535
2019-10-30 08:14:27 -07:00
Cedric BAIL 1f445dd12d eina: change default policy of Chained Mempool to recycle memory right away.
Until now, Chained Mempool would first empty its pool and the started to
recycle memory. Now it does always try to recycle first. This should limit
memory fragmentation to some extend.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10534
2019-10-30 08:14:26 -07:00
Mike Blumenkrantz 37e258904d elm/widget: error on null params for tree_unfocusable functions
Summary: these should error so the user can detect that they screwed up

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10563
2019-10-30 09:29:56 -04:00
Woochanlee d5bd2ed2d0 edje_calc: Remove unused flag.
Summary: This has marked remove me.

Reviewers: raster, Hermet, zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10561
2019-10-30 08:10:09 -04:00
Lauro Moura 99067bb7eb csharp: FunctionWrapper doc fixes
Reviewers: felipealmeida, brunobelo, segfaultxavi, woohyun

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10430
2019-10-30 12:43:17 +01:00
Mike Blumenkrantz f4019d3303 eina: add comparison macros for Eina_Size2D and Eina_Position2D
Summary:
I'm tired of typing all this out. it's exhausting.

also add a couple usages internally to verify that this works as expected

@feature

Reviewers: cedric, bu5hm4n, devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, bu5hm4n, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10557
2019-10-29 14:52:58 -04:00
Mike Blumenkrantz 400e139efa interfaces: replace doubles with Efl.Gfx.Align where appropriate
Summary:
this makes the types more explicit
Depends on D10554

Reviewers: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10555
2019-10-29 18:57:40 +01:00
Mike Blumenkrantz d8ea2eb2cd efl/gfx: add Efl.Gfx.Align type
Summary:
this can be used to more explicitly specify that a double is intended to
be a value of 0.0 to 1.0 for the purpose of aligning objects. it also avoids
the need to copy and paste the same docs around everywhere

Reviewers: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10554
2019-10-29 18:57:40 +01:00
Marcel Hollerbach 7b59fec40e meson: add embryo as a dep of edje
if you want to build a edje theme without building all of efl, you can
do that now. Before embryo was missing and no scripts could be compiled.
Now this is possible and works.
2019-10-29 18:00:46 +01:00
Marcel Hollerbach 28f630ba41 meson: redo evas building
Summary:
before recent times we had to support static and shared building based
on the options of the user, which forced us to complicate our build with
the evas_goal hack. the evas_goal hack more or less was the idea of
"faking" the evas build in the evas directory, finish all the .eo
generation there, then build the modules and make all the static files
ready. Then build everything in evas_goal.

Now, that we just build everything the same always, we can simply build
it in the evas way (removing the evas_goal hack FINALLY), as the same modules
are build statically and shared.
This also gives us the possibility to build the shared image loaders
*again* the the modules directory, which unbreaks peoples build scripts
who packaged loader files seperatly.

Reviewers: zmike, raster, cedric, stefan_schmidt

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10548
2019-10-29 12:54:56 -04:00
Lauro Moura 03f873faf2 mono: encapsulate internal workaround members
Summary: Depends on D10345

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: segfaultxavi, Jaehyun_Cho, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, woohyun, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10346
2019-10-29 12:23:13 -03:00
Lauro Moura 26161e9fbe mono: encapsulate internal iwrapper members
Summary: Depends on D10339

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: segfaultxavi, Jaehyun_Cho, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10345
2019-10-29 12:23:13 -03:00
Lauro Moura 46ebd2033b mono: encapsulate internal delegates
Summary: Depends on D10337

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: segfaultxavi, Jaehyun_Cho, YOhoho, brunobelo

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10339
2019-10-29 12:23:13 -03:00
Mike Blumenkrantz 2477dfaf59 edje: selectively inhibit content,changed events when changing swallowed parts
ref T8321

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10508
2019-10-29 16:17:48 +01:00
Mike Blumenkrantz 9878a0cad4 tests/genlist: add behavior testing for nearly all genlist events
this simulates a number of user interactions to ensure that various
functionalities of genlist actually work, including but not limited to:
* selection
* highlighting
* item focus
* scrolling
* filtering
* dragging
* item reordering

ref T8433

Differential Revision: https://phab.enlightenment.org/D10528
2019-10-29 16:09:50 +01:00
Mike Blumenkrantz 9870b7992d tests/loop_timer: add port of ecore_timer behavior tests for loop_timer
ensure that the behavior here is also working exactly as expected

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10531
2019-10-29 16:09:49 +01:00
Mike Blumenkrantz cb23d14d11 tests/ecore: make timer behavior test even more strict
we need to also verify that timers will process out of order solely based
on their timestamps and ignoring whether they are "recently-added"

additionally verify the behavior of timer interval changing and re-instantiating

ref T8434

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10530
2019-10-29 16:09:45 +01:00
Mike Blumenkrantz 1800f060c8 elm/genlist: fix item focus unregister on item move
if the block is realized, its items have been registered into the focus
manager and must be unregistered to avoid double-registering

@fix

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10544
2019-10-29 16:09:41 +01:00
Mike Blumenkrantz 0d845057cc elm/genlist: hide cached item contents and mark content unfocusable during calc
cached item contents should already be hidden by the edje clipper, so this simply
changes their visible state to break them out of the focus calcs

contents must also be explicitly marked as unfocusable during calc-only realize
operations in order to avoid triggering a full focus recalc which will error due
to missing focus adapter in the item block

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10543
2019-10-29 16:09:37 +01:00
Mike Blumenkrantz 50848a4302 elm/genlist: set pan need recalc during item move on item position change
item move operations require pan recalc in order to process the item block
positioning updates

@fix

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10533
2019-10-29 16:09:34 +01:00
Mike Blumenkrantz d9132697b3 elm/genlist: fix "drag" smart callback
this is only a smart callback and not an eo callback

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10527
2019-10-29 16:09:31 +01:00
Mike Blumenkrantz 7f69997fd0 elm/genlist: trigger filter,done callback immediately if no filter queue exists
the documentation says this should trigger when filtering is done, and if
no filtering is pending then it is done

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10526
2019-10-29 16:09:28 +01:00
Mike Blumenkrantz 846563f13c elm/genlist: slightly simplify use of _item_filtered_get()
passing the smart data here (which we always have) makes the function
a little clearer to read. similarly, we can check whether the filter_data
pointer is set inside the function to avoid having to check it everywhere else

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10525
2019-10-29 16:09:25 +01:00
Mike Blumenkrantz 23851808bb elm/genlist: defer recalc when applying a name filter
this may be called successively during the same mainloop iteration,
so it's important to defer this as much as possible

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10524
2019-10-29 16:09:22 +01:00
Mike Blumenkrantz 712266fb9a elm/genlist: remove calc jobs
now that we have a sane and consistent sizing calc mechanism, we no longer
need to be randomly creating jobs to do additional side calcs in addition
to our other multiple bespoke calculation methods

instead, we can now call the calc function directly during the group calc
to perform all the calcs at once and avoid the overhead of constantly triggering
calc jobs

a possible future improvement here could be to remove the _calc_job() call in
the internal pan object's group_calculate, as this is likely a duplicated op
but it will require additional testing to verify

unit test performance (e.g., tree) increases roughly 50-80% after this patch

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10523
2019-10-29 16:09:18 +01:00
Mike Blumenkrantz 0777b74f07 elm/genlist: don't process entire item queue on each item add
this is a colossal waste of time. it ends up realizing every single item
immediately even if it won't be visible, which defeats the purpose of all
the batching and viewport calculations that genlist explicitly does to
avoid exactly this type of behavior

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10522
2019-10-29 16:09:15 +01:00
Mike Blumenkrantz 006b680fbe elm/genlist: freeze/thaw canvas when processing item queue
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10521
2019-10-29 16:09:12 +01:00
Mike Blumenkrantz df79f01b2a elm/genlist: only add calc job on theme apply if already finalized
not a required operation otherwise

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10519
2019-10-29 16:09:09 +01:00
Mike Blumenkrantz 27ff978ca9 elm/genlist: remove misleading "changed" signal
this was never implemented or documented anywhere and serves only to be
misleading for anyone reading the code

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10518
2019-10-29 16:09:06 +01:00
Mike Blumenkrantz 7a6d5dd9f3 elm/genlist: fix item highlight/unhighlight eventing on clicks
* highlight should only be triggered on mouse down, as that is the point of
  interaction with an item which indicates it is "in use"; a mouse-up event
  cannot occur on an item which has not previously received a mouse-down event,
  so toggling this on mouse-up will be wrong/duplicated 100% of the time
* unhighlight should only be triggered during mouse-up events if the list is
  in no-select mode, as it will otherwise be implicitly during selection if
  necessary

this should ensure that these events are emitted exactly one time and correctly
for each click event

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10517
2019-10-29 16:09:03 +01:00
Mike Blumenkrantz 0da0b8ea55 tests/ecore: add more grueling timer throughput test
this verifies that:
* newly-created timers are not triggered in the next loop iteration
* newly-created timers can be triggered the second loop after created
* multiple timers can be triggered in a single loop iteration
* timers are effectively added to the pending timer list

ref T8434

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10516
2019-10-29 16:09:00 +01:00
Mike Blumenkrantz dcc7467c00 efl/timer: correctly handle recursion for timer processing
if the currently-processed timer is recursively deleted (efl_del) while
it is inside the timer tick event callback, we must correctly handle this
case:

* in the place where a timer's inlist is de-linked, we must check to see
  if the timer is the current timer and then update that pointer with the next
  timer in the list
* in the post-tick part of timer processing, we must NOT update the current timer
  pointer if we detect that it has been updated recursively

this fixes processing of timers in the mainloop to trigger more than one legacy timer
per mainloop iteration and likely has some (positive) impact on mainloop throughput

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10515
2019-10-29 16:08:57 +01:00
Mike Blumenkrantz 4f90594ecb efl/timer: don't attempt instantiating timers until they're finalized
this will fail anyway so don't bother

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10514
2019-10-29 16:08:54 +01:00
Mike Blumenkrantz 1faf6ef2b7 tests/genlist: fix tree test sizing
for some reason I used 10px as the base height of a genlist item when clearly
they are more like 30px

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10513
2019-10-29 16:08:51 +01:00
Mike Blumenkrantz eb12c77a7a tests/elm: add utility function to trigger a mouse drag
a drag may require a lot of internal calculating to successfully trigger
the intended test behavior, so this has a flag which allows it to perform
loop iterations and canvas calcs in order to be more universal, along with
a global #define for determining exactly how many mouse moves were triggered

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10512
2019-10-29 16:08:48 +01:00
Mike Blumenkrantz fea9fbec98 tests/elm: make argv a static char so it never goes out of scope and crashes
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10511
2019-10-29 16:08:45 +01:00
Mike Blumenkrantz 3ad0cf6c46 tests/elm: add util functions for clicking objects/parts with event flags
this is useful for synthesizing e.g., double click events

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10510
2019-10-29 16:08:41 +01:00
Mike Blumenkrantz 5ab30b1e01 tests/elm: add util callback for incrementing an int data
this is a common functionality

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10509
2019-10-29 16:08:39 +01:00
Woochanlee 555f456b39 efl_ui_win: Delete useless geometry set for legacy.edje
Summary:
It will be resized on window_resize_job. when the window got specific size.
I don't think this is needed here. It cause doing a calc in vain.

Test Plan: Launching Test applications.

Reviewers: raster, Hermet, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10550
2019-10-29 10:19:43 -04:00
Woochanlee 8536c066eb edje_calc: Delete duplicated conditional statement.
Summary: this is identical to the conditional above and can be merged
to improve code clarity

Reviewers: raster, Hermet, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10549
2019-10-29 10:19:43 -04:00
Xavi Artigas c462140884 Replace tabs with spaces
As our coding conventions mandate.
2019-10-29 14:56:01 +01:00
junsu choi cf61adaff1 vg_common_svg: Free node tree for memory leak after eet write.
Summary:
The node tree created from vg_common_svg_create_svg_node is not used after eet_data_write().
Therefore, to prevent memory leaks, free the node tree.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10443
2019-10-29 13:17:06 +09:00
Lauro Moura 135c69b23c eolian_cxx: Add key/value to function_def
Summary:
This commit adds explicit eolian key/value/return info to function_def. The
original parameter/return types are kept for compatibility.

parameter/return -> Mimics the behavior of the generated C API (i.e.
single-valued getters have their lone value translated to be their
return type)

explicit_return -> The actual return value for that block in the EO
file.
keys/values -> The values for respectively key and values blocks.

This should help working with properties in the generators instead of
fumbling with paremeter/return directly

Fixes T8431

Test Plan: extra tests in the diff

Reviewers: felipealmeida, brunobelo, segfaultxavi, YOhoho

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers, woohyun

Tags: #efl

Maniphest Tasks: T8431

Differential Revision: https://phab.enlightenment.org/D10494
2019-10-28 20:35:39 -03:00
Bruno da Silva Belo ba34325f43 csharp: Add comparables operator to eina_error.
Summary: ref T8394

Reviewers: lauromoura, felipealmeida, segfaultxavi, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8394

Differential Revision: https://phab.enlightenment.org/D10456
2019-10-28 20:34:55 -03:00
Bruno da Silva Belo 19588be0b9 csharp: Add comparables operators to eina_value.
Summary: ref T8394

Reviewers: lauromoura, felipealmeida, segfaultxavi, YOhoho, bu5hm4n

Reviewed By: YOhoho

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8394

Differential Revision: https://phab.enlightenment.org/D10458
2019-10-28 20:34:25 -03:00
Yeongjong Lee 91ae0ea12f eina_mono: remove exceptions in unexpected locations
Summary:
Unexpected locations are listed in
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1065

fix CA1065
ref T8402

Test Plan:
meson setup -Dbindings=mono,cxx -Dmono-beta=true
ninja test

Reviewers: lauromoura, felipealmeida, brunobelo

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8402

Differential Revision: https://phab.enlightenment.org/D10461
2019-10-28 20:33:47 -03:00
Lauro Moura d59197d2ee mono: encapsulate internal NativeModule
Summary:
Depends on D10342
Depends on D10338

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10343
2019-10-28 19:08:48 -03:00
Lauro Moura 1db12b5fb4 mono: encapsulate internal FunctionWrapper
Summary: Depends on D10340

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, woohyun, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10342
2019-10-28 19:04:59 -03:00
Lauro Moura 72da16f679 mono: encapsulate internal nativemethods
Summary: Depends on D10337

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, woohyun, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10340
2019-10-28 18:53:39 -03:00
Yeongjong Lee 7f2458b20d mono: encapsulate internal Add/RemoveNativeEventHandler
Summary: Depends on D10337

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, woohyun, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10341
2019-10-28 18:37:57 -03:00
Yeongjong Lee 90280ffed6 mono: encapsulate internal CustomMarshaler
Summary: Depends on D10337

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10344
2019-10-28 18:22:38 -03:00
Yeongjong Lee e6fafe4e61 mono: introduce friend assembly
Summary:
Friend assemblies can access efl_mono assembly's internal types and members.
If `build-tests` option is true, `efl-mono-suite.exe` and `efl_mono_test.dll`
will become friend assemblies.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: felipealmeida, cedric, #reviewers, woohyun, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10337
2019-10-28 17:46:15 -03:00
Xavi Artigas e25ed4f353 docs: Polished docs for Efl.Ui.Scrollable 2019-10-28 19:32:23 +01:00
Xavi Artigas cb396554c6 docs: Formatting and polishing Efl.Ui.Factory docs 2019-10-28 18:47:23 +01:00
Marcel Hollerbach df653267b3 spec-suite: verify correct widget-hiding behaviour.
Summary:
These checks are ensuring that when we are hiding a widget, that
everything inside these widgets are also hidden correctly. Due to
clipper or due to visibility flag.

Depends on D10468

Reviewers: zmike

Reviewed By: zmike

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10474
2019-10-28 12:40:27 -04:00
Marcel Hollerbach ea07d5f7da efl_ui_spotlight_manager: apply vis changes to subobj
Summary:
when the sportlight is hidden, the state should be applied to the
backclip and foreclip, in order to hide the subobjects correctly.

This fixes dangling showing widgets.

Reviewers: Jaehyun_Cho, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10468
2019-10-28 12:40:17 -04:00
Xavi Artigas 368db272fd docs: Improve documentation on cache-related classes
Also, code comments and typos.
2019-10-28 16:51:59 +01:00
Bruno da Silva Belo 547f8767a9 csharp: Add missing exception ctor from Errors.cs.
Summary: ref T8392

Reviewers: lauromoura, felipealmeida, segfaultxavi, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8392

Differential Revision: https://phab.enlightenment.org/D10455
2019-10-28 12:23:34 -03:00
Bruno da Silva Belo 898ced96f6 csharp: Add missing exception ctr from iwrapper.
Summary: ref T8392

Reviewers: felipealmeida, lauromoura, segfaultxavi, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8392

Differential Revision: https://phab.enlightenment.org/D10454
2019-10-28 12:21:01 -03:00
Xavi Artigas 5299a65d45 Silence mono warning in tests
../src/tests/efl_mono/Model.cs(35,13): warning CS0219: The variable `veggies' is assigned but its value is never used

This was driving me nuts... Am I the only one seeing these things?
2019-10-28 15:12:35 +01:00
thierry1970 2f5e2de8c4 efreet : Check that the file has a protocol in efreet_desktop_command_file_process()
if a path has a '/' character in it before the ':' character then it
should be treated as a local file which contains a ':' character in
its name

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10409
2019-10-28 09:07:13 -04:00
Xavi Artigas 07bca58d6d Typo in comment 2019-10-28 09:40:33 +01:00
Yeongjong Lee eb676e47af eina_array: add paramName argument of ArgumentNullException
Summary:
ArgumentNullException constructor included `message` is
`public ArgumentNullException (string paramName, string message);`

Fix CA2208
ref T8428

Test Plan:
meson setup -Dbindings=mono,cxx -Dmono-beta=true
ninja test

Reviewers: lauromoura, felipealmeida, brunobelo

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8428

Differential Revision: https://phab.enlightenment.org/D10464
2019-10-25 19:21:30 -03:00
Xavi Artigas 08d7d2b064 Efl.Ui.Text: Fix Text Cursor composition
Summary:
This is a temporary fix while Text is being revamped.
Efl.Ui.Text internally composites Efl.Text_Cursor (through some other interfaces)
but this was not being advertised in the EO file.
This caused no trouble to C but was preventing C# from using the Cursors API
(because C# relies on the EO composites section).

On top of this, the cursor_new() method has been removed, since it was redundant.

Test Plan:
Builds and passes tests, and C# is able to do things like:
```
Efl.TextCursorCursor cursor = screen.GetTextCursor(Efl.TextCursorGetType.Main);
screen.InsertCursorText(cursor, str);
```

Reviewers: lauromoura, cedric, tasn

Reviewed By: lauromoura

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10465
2019-10-25 18:07:55 -03:00
Bruno da Silva Belo 31be3b6a5d csharp:Changing ex access modifier from Errors.cs.
Summary: ref T8401

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8401

Differential Revision: https://phab.enlightenment.org/D10502
2019-10-25 17:40:40 -03:00
Cedric BAIL 4329b88df4 evas: disable Eina Cow Garbage Collection on dynamic content.
Summary:
Dynamic content are likely to trigger an image state change at pretty
much every frame. This lead to unecessary attempt by Eina_Cow to
deduplicate/cleanup data that are changing all the time. This reduce
memory consumption in Expedite tests that in some small amount. The
gain get bigger the more animation you get on screen. There might be
other potential gain for heavy animated case.

Reviewers: zmike, Hermet, bu5hm4n, smohanty

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8302

Differential Revision: https://phab.enlightenment.org/D10532
2019-10-25 15:45:14 -04:00
Marcel Hollerbach a380a4275a elm_interface_scrollable: correctly honor looping over
Summary:
when looping is enabled, we need to ensure that the correct arrows are
enabled.

ref D9906

Depends on D9908

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9917
2019-10-25 14:07:26 -04:00
Marcel Hollerbach ace64dafea elm_interface_scrollable: correctly emit the signals always
Summary:
our default theme defaults to show everything, the code here assumes
that everything is hidden by default, this fixes all this.

fix T4918

Depends on D9907

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T4918

Differential Revision: https://phab.enlightenment.org/D9908
2019-10-25 14:07:21 -04:00
Marcel Hollerbach 72525c77da elm_interface_scrollable: correctly handle bouncing
Summary:
if bounding is enabled, those values can get smaller and bigger than the
max value.

ref T4918

Depends on D9906

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T4918

Differential Revision: https://phab.enlightenment.org/D9907
2019-10-25 14:04:46 -04:00
Bruno da Silva Belo fee91831cb csharp: Using Array.Empty Eina.
Summary: ref T8421

Reviewers: lauromoura, felipealmeida, segfaultxavi, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8421

Differential Revision: https://phab.enlightenment.org/D10500
2019-10-25 14:23:14 -03:00
Bruno da Silva Belo 5844ab4320 csharp:Using Array.Empty genericmodel.
Summary: ref T8421

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8421

Differential Revision: https://phab.enlightenment.org/D10501
2019-10-25 14:23:12 -03:00
Bruno da Silva Belo e17213a09b csharp: Changing Count() to Length on eina_value.
Summary: ref T8422

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8422

Differential Revision: https://phab.enlightenment.org/D10499
2019-10-25 13:17:05 -03:00
Bruno da Silva Belo 68eefe1872 csharp: Using Count eina_promises.
Summary: ref T8422

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8422

Differential Revision: https://phab.enlightenment.org/D10498
2019-10-25 13:16:57 -03:00
Bruno da Silva Belo 827a301131 csharp: Calling ConfigureAwait on tasks GM.
Summary: ref T8424

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8424

Differential Revision: https://phab.enlightenment.org/D10497
2019-10-25 11:28:55 -03:00
Bruno da Silva Belo c0f3febccf csharp: Calling ConfigureAwait on tasks Model.
Summary: ref T8424

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8424

Differential Revision: https://phab.enlightenment.org/D10496
2019-10-25 11:28:45 -03:00
Bruno da Silva Belo 882a2d4ec4 csharp: Calling ConfigureAwait on task eopromises.
Summary: ref T8424

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8424

Differential Revision: https://phab.enlightenment.org/D10495
2019-10-25 11:28:39 -03:00
Yeongjong Lee 69261251a7 mono: implement dispose method based on dispose pattern
Summary:
Fix CA1063, CA1816
ref T8400, T8419

Test Plan:
meson setup -Dbindings=mono,cxx -Dmono-beta=true
ninja test

Reviewers: felipealmeida, brunobelo, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8419, T8400

Differential Revision: https://phab.enlightenment.org/D10460
2019-10-25 11:02:50 -03:00
Mike Blumenkrantz bcf27e35a2 tests/layout: add legacy layout test to verify behavior with legacy size hints
Summary:
this verifies that user-set legacy size hints will be applied accurately during
calc, and that the size of a layout can accurately decrease when its contents min
sizes decrease

ref 95b5731461

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10453
2019-10-25 09:54:19 -04:00