Commit Graph

2793 Commits

Author SHA1 Message Date
Christopher Michael 723412404f tests/ecore_wl2: Add test cases for wl2 client-side functions
This patch separates the ecore_wl2 tests to support both server-side
and client-side functionality. In order to test client-side functions,
these tests MUST be run under an existing Wayland Compositor
(Enlightenment, Weston, etc).

ref T8016
2019-07-15 11:01:20 -04:00
Christopher Michael b9f89fabb6 tests: Add tests for ecore_wl2_display_get and
ecore_wl2_display_name_get

ref T8016
2019-07-15 10:08:32 -04:00
Christopher Michael 73acf72cc4 tests: Add file for Ecore_Wl2 display tests
Add file which can be used to add tests for ecore_wl2 display functions

ref T8016
2019-07-15 09:54:18 -04:00
Christopher Michael e33609937e tests: Add start of Ecore_Wl2 test suite
Small patch set to add the start of a Ecore_Wl2 test suite

ref T8016
2019-07-15 09:53:59 -04:00
Vitor Sousa c3c81263fd csharp: fix some unit tests that rely on garbage collection
Summary:
Fix unit tests `TestEoInherit.inherited_collected` and
`TestFunctionPointers.set_callback_inherited_called_from_c`.

Iterate through garbage collection and EFL main loop more times to ensure that
allocated objects are really collected.

Also expand the test utility method `CollectAndIterate` to receive the number of
times to call the whole cleaning iteration process (not only the garbage
collection).

Test Plan: `meson test`

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9271
2019-07-12 17:15:37 -03:00
Cedric BAIL b799ba1a10 evas: add a test for loading Android 9patch file.
Example data come from https://github.com/vindolin/ninepatch/tree/master/ninepatch/data
under MIT license.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9105
2019-07-12 09:54:24 -07:00
Cedric BAIL 2020f971a4 evas: improve test to evaluate stretch region effect on content region.
Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9098
2019-07-12 09:54:08 -07:00
Cedric BAIL d3efb9c769 evas: add test for the new efl_gfx_image_content_region_get API.
Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9095
2019-07-12 09:54:01 -07:00
Marcel Hollerbach 913af2f0d1 efl_ui_spec_suite: this is not python2
i don't know why it was added like this.
2019-07-12 15:10:37 +02:00
Vitor Sousa b1e44484a5 cxx: remove compilation warnings in C++ code, from both gcc and clang
Summary:
Remove almost all the compilation warnings from C++ code. Only explicit
warnings using the `#warning` preprocessor directive remain.

Some warnings had to be suppressed with `#pragma` directives because the
behavior they were warning about is intended in some specific places.
Code comments were added in such situations.

Added a generator that creates `#pragma` directives in order to suppress
warnings in all generated C++ headers.
Currently `-Wignored-qualifiers` is the only warning category being suppressed.
The innocuous const qualifiers that it points are inoffensive and have
no effect in compilation at all.
They are also hard to track in generation since they can emerge from different
types in many places.

To ease the generation of the warning suppressors an utility constructor was
added to `efl::eolian::grammar::attributes::unused_type`.

Add constructors to `eolian_mono::class_context` to default initialize its
internal string and avoid field initialization warnings.

Test Plan: `meson test`

Reviewers: lauromoura, felipealmeida, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl_language_bindings

Differential Revision: https://phab.enlightenment.org/D9275
2019-07-12 09:07:27 -04:00
Lauro Moura 3b5d050353 csharp: Enable conversion of container Eina.Values
Summary:
When creating a new Value with any IEnumerable of a supported type, the IEnumerable
will be copied into an Eina.Value of type EINA_VALUE_ARRAY_TYPE.

Similarly, `Unwrap()` on a Eina.Value container will create a new
System.Collections.List<T> and return it.

Depends on D9272

Reviewers: felipealmeida, vitor.sousa, segfaultxavi

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl, #expertise_solutions

Differential Revision: https://phab.enlightenment.org/D9273
2019-07-11 15:57:32 -03:00
Lauro Moura 6be38caeae csharp: Add helpers to get/set Values from Objects
Summary:
The user can construct an `Eina.Value` from a plain C# `object`, using
reflection to get the correct type of object and construct the correct
underlying C value.

Also added the `Unwrap()` method to return a C# object representing the
wrapped value.

Both operations are useful when using `Eina.Value` to
Get/Set values from `PropertyInfo` targets as in

```
var v = new Eina.Value(propInfo.GetValue(sourceObj));
...
propInfo.SetValue(targetObj, v.Unwrap());
```

Currently, containers are not supported. It will be added in a following
commit.

Depends on D9270

Reviewers: felipealmeida, vitor.sousa, segfaultxavi

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9272
2019-07-11 15:55:04 -03:00
Shinwoo Kim 89399672b7 test: add Efl.Ui.Format related test
This patch is including negative test as well.
See https://phab.enlightenment.org/D9276. This could make @bu5hm4n very happy.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9281
2019-07-11 17:40:47 +02:00
Mike Blumenkrantz 162c0e2ba5 tests/elm: create abstract function for clicking swallowed part objects
this handles all the part object getting and signal processing and geometry
calculating so you can get to clickin those parts faster

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9269
2019-07-11 17:40:46 +02:00
Mike Blumenkrantz 4a1c13f491 tests/elm: break out click helper function for reuse
also fixes lifetime issue with spin parts

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9268
2019-07-11 17:40:45 +02:00
Cedric BAIL 4e4210b0f3 ecore: improve usability of Efl.Select_Model to provide helpers in manipulating selection information.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8570
2019-07-10 20:55:02 +02:00
Mike Blumenkrantz f5d3f575c6 edje: improve user-defined data caching to handle data before file is set
Summary:
this adds explicit handling for things like:

efl_add(SOMECLASS, parent,
  efl_text_set(efl_added, "my text")
);

on edje-inheriting objects.

note that it's still impossible to do something like
efl_add(SOMECLASS, parent,
  efl_text_set(efl_part(efl_added, "somepart"), "my text")
);

also add a unit test to verify common behaviors

@feature

Depends on D9209

Reviewers: cedric

Reviewed By: cedric

Subscribers: bu5hm4n, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9210
2019-07-10 14:40:42 -04:00
Mike Blumenkrantz f5c03fe194 tests/elm: fail tests if unexpected warnings or errors occur
Summary:
warnings and errors should never occur in unit tests unless they are
intentionally triggered. this will help catch regressions
Depends on D9256

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9257
2019-07-10 13:57:40 -04:00
Mike Blumenkrantz 51cf9842ec tests/elm: use helper functions for managing naviframe unit test abort-on-error
Summary: also bump up to abort on warnings

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9251
2019-07-10 13:57:28 -04:00
Mike Blumenkrantz 244b1446fc tests/efl_ui: add event test for slider
this verifies event emission for slider like in legacy tests

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9246
2019-07-09 16:01:05 +02:00
Mike Blumenkrantz 0fe216420c tests/evas: add file for evas event unit tests, add frozen mouse-up test
this adds an explicit test verifying that if an object is frozen before
a mouse-up event is passed through it, the callback for mouse-up will
not be called for that object

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9239
2019-07-09 16:01:04 +02:00
Vitor Sousa 288f645e3c csharp: update and disable tests that use deprecated eolian type notations
Summary:
Avoid the usage of deprecated Eolian type notations like `ptr()` in C# unit
tests.

In places where an alternative type could be used, tests were changed to use
a valid type, e.g. containers that stored `ptr(int)` were changed to store
`string`.

Tests for types that require a pointer notation were commented out and
disabled. They can be re-enabled when a new notation to the type is defined.

Depends on D9238

Test Plan: `meson test`

Reviewers: lauromoura, felipealmeida, q66, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, bu5hm4n, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9247
2019-07-09 10:05:23 +02:00
Vitor Sousa 7769779a4d eolian_mono: fix non-beta build and support for slice/rw_slice keywords
Summary:
Add support for `slice` and `rw_slice` keywords in eolian_mono.
Now it generates the proper manual binding type for these native types.
Make unit tests use these keywords instead of native names.

Remove some unnecessary `@beta` tags from eolian types in unit tests so now
tests correctly compile without the `mono-beta` compilation flag.

Also make tests that use `Eina.Binbuf` "beta only".
In a future update, the external type `Eina.Binbuf` will be marked as beta, so
we shield the binding in anticipation.

Test Plan: `meson -Dbindings=mono -Dmono-beta=true` and `meson -Dbindings=mono -Dmono-beta=false`

Reviewers: lauromoura, felipealmeida, q66, segfaultxavi, bu5hm4n

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9238
2019-07-09 10:00:06 +02:00
Vitor Sousa 1193e1a757 csharp: fix build warning related with an unused field in an unit test
Test Plan: `meson test`

Reviewers: lauromoura, felipealmeida, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9240
2019-07-09 09:59:24 +02:00
Marcel Hollerbach 52adb65aea efl_ui_spin_button: add test suite
this adds a testsuite to emulate and check the usage of buttons in the
spin button widget. This also verifies that the correct events are
emitted. (For now, the testcases from spin are also copied over, since
they inherit from each other)

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9232
2019-07-08 19:56:42 +02:00
Marcel Hollerbach e922a23ddf efl_ui_spec_suite: introduce two new test suites
this checks that the expected errors are in place, and the state does
not get changed when there is an errornous call.

ref T7895
ref T7894
2019-07-08 19:56:33 +02:00
Marcel Hollerbach 1e73201169 efl_ui_spin: add tests for basic spin features
this tests for the correct event emission. And checks the wheel
interaction.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9221
2019-07-08 19:56:32 +02:00
Vitor Sousa 2775534fda eolian_cxx: update tests to no longer use forbidden eolian notations
Summary:
Update eolian_cxx tests in order to remove forbidden eolian notations.

For tests with containers that support non-pointer types,
change `ptr(int)` to `int`.
For tests with containers that only support pointer types,
change `ptr(int)` to `string`.

Remove tests for features that are no longer meaningful with eolian new
restrictions.

Add a FIXME note to eina::range_array when used with eina::string_view.

Reviewers: lauromoura, felipealmeida, q66

Reviewed By: q66

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9236
2019-07-08 16:15:41 +02:00
Cedric BAIL 47c5736ef9 elementary: rename Activew_View to Spotlight.
View is something that is expected in the context of MVVM, so using it somewhere else is
going to lead to some confusion. Spotlight does descrive the objective of all of this
widget in actually a more explicit way as they all give the spotlight to one sub widget
at a time.

I have also renamed the View_Manager to be just Manager as the View there wasn't useful.
2019-07-05 19:18:22 +02:00
Vitor Sousa 73df0d47ff csharp: encapsulate some internal code of EoWrapper
Summary:
Encapsulate some parts of EoWrapper making them less accessible to lib users.
This can avoid unnecessary and risky usage of code that is only intended for
internal usage.

`inherited` field was made private and renamed to `generated`. Now its value
can only be obtained through the `IsGeneratedBindingClass` property.

`handle` field was made private.

`eventLock` was renamed to `eflBindingEventLock`

`ConstructingHandle` property set was made private.

Constructors that are used to create new EFL# managed objects by wrapping a
preexisting eo handle now receive a specific struct wrapping the handle pointer.
This can avoid faulty interactions with the Reflection engine used only for
generated classes that implement this constructor.

Test Plan: meson test

Reviewers: lauromoura, felipealmeida, YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9212
2019-07-05 09:57:23 +09:00
Xavi Artigas e776f5f0d7 Efl.Ui.Format revamp
This class helps widgets which contain a numerical value and must display it,
like Progressbar (units label), Spin, Spin_Button, Slider (both units and popup
labels, in legacy), Tags (when in shrunk mode) or Calendar (year_month label).

Previously this was a mix of interface and mixin: widgets had to support setting a
formatting func, and the mixin offered support for formatting strings, by setting
an internal formatting func. On top of that, the spinner widget supported "special
values", a list of values that should be shown as certain strings instead.

This has now been simplified and unified:
Widgets including this mixin can use the formatted_value_get() method which accepts
an Eina_Value and returns a string. Thats's it.
The mixin adds three properties to the widget (format_values, format_func and
format_string) which users can use to tailor formatting. The widget does not need
to know which method has been used, it just retrieves the resulting string.
This removes a lot of duplicated widget code, and adds functionality which was
missing before. For example, all widgets support passing a list of values now.

Widgets must implement the apply_formatted_value() method so they are notified
of changes in the format and they can redraw anything they need.

Tests have been added to the Elementary Spec suite for all cases.

Legacy widgets behavior has not been modified, although a few needed some code
changes.
2019-07-04 19:38:20 +02:00
Mike Blumenkrantz b5e65ed993 tests/radio: add explicit test for verifying legacy radio callback triggering
the 'changed' callback should never be triggered when programmatically
changing a radio's state

ref T8042
2019-07-03 12:22:17 -04:00
Mike Blumenkrantz f619ad88a4 tests: add functional unit tests for radio widgets
this adds some basic testing to verify that callbacks occur and values
are set as expected

Differential Revision: https://phab.enlightenment.org/D9091
2019-07-03 12:22:17 -04:00
Xavi Artigas 8a0cad6435 Efl.Ui.Progressbar: Add explicit display control of progress label
Summary:
Add a property (show_progress_label) to allow controlling whether the progress
label displaying the exact progress is shown or not.
This was possible in Legacy but the functionality was lost in Unified.

Updated elementary_test to showcase this property, and also the other label
formatting options, which where not tested anywhere.

Added a simple progressbar unit test. It only checks that retrieved value is the
same as the set value, so it is more of a placeholder for future tests.

**This is needed by a future patch which will introduce more formatting options that clash with the current implementation.**
The presence of a formatting function was used to decide if the progress label was shown or not. This explicit property simplifies things.

Test Plan:
Everything builds and passes tests.
`elementary_test -to Efl.Ui.Progressbar` should show a few more bars with different formatting labels, and a checkbox to toggle rendering of one of them.

Reviewers: bu5hm4n, zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9202
2019-07-03 08:34:03 +02:00
Marcel Hollerbach 223a433be8 eina: add accessors for c arrays
This adds a new API which can be used to get access to a carray via the eina_accessor API.
2019-07-03 07:41:05 +02:00
Vitor Sousa 229b363f01 csharp: fix some compilation warnings
Fix unused variable warnings in eina_mono and unit test files.
2019-06-28 10:58:24 -03:00
Vitor Sousa 4496022a3c csharp: fix Eina_Stringshare support in containers for manual and generated API
Summary:
Both C strings and eina stringshares are bound as regular strings in EFL#, as
working directly with these types would demand unnecessary hassle from the user
viewpoint.
But for eina containers this distinction is important, and since C# generics
do not provide a convenient way of dealing with the same type requiring a
different management based on some other condition (at least not without
compromising the usability for other types), we added a simple `System.String`
wrapper named `Eina.Stringshare` that works as a placeholder for signaling
this distinction.

Working with this class should be transparent in most use cases because it
converts to and from `System.String` implicitly.
It also implements equality/inequality methods for easier comparison with
strings and other stringshare objects.

Add new methods and a new container element trait for dealing specifically
with `Eina_Stringshare` elements.

Adapt eolian_mono to identify and generate the proper placeholder in methods
that require stringshare containers.

Remove some direct uses of DllImport-ed functions in favor of more flexible
manual binding methods.

Move `Eina.Stringshare` DllImport directives to a static class named
`NativeMethods`, in accordance with the code design warning CA1060.
Also add a TODO comment to move all other DllImport directives to this class.

Change parameter of the method `Efl.Csharp.Application.OnInitialize` from
`Eina.Array<System.String>` to `string[]`.
This will make this API more similar with the default C# way of receiving
command line arguments.

Add tests for containers storing stringshare elements.

Reviewers: felipealmeida, lauromoura, segfaultxavi, bu5hm4n

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9178
2019-06-28 10:44:52 -03:00
Vitor Sousa b7fa7d48ac csharp: make inherited C# classes constructible from native C
Summary:
With this commit it is now possible for a class that inherits from a C# binding
class to be instantiated from native C code. It only has to provide a
constructor that receives an `Efl.Eo.EoWrapper.ConstructingHandle` struct,
and which calls the base binding constructor passing it.
For example:

`private Type(ConstructingHandle ch) : base(ch) {}`.

Add some test files to validate the proper behavior of this feature.

Add some small fixes in generation contexts in order to properly
generate base constructors.

Depends on D9070

Test Plan: `meson test` and `make check`

Reviewers: lauromoura, felipealmeida, segfaultxavi, woohyun, YOhoho

Reviewed By: YOhoho

Subscribers: YOhoho, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9071
2019-06-28 10:38:57 -03:00
Marcel Hollerbach d3dbd5a5cd evas_events: fix wrong event listening
EFL_EVENT_FOCUS_IN is wrong here, EFL_EVENT_FOCUS_IN is called on object
that received object focus. Not canvas focus, however, the code in the
callback there seems to be mainly for canvas focus handling.

Additionally, in evas_events, the event handler that was listening for
the canvas focus in / out events expected a event type, which is also
not correct, because the canvas focus in / out does not have one. In
order to catch such errors later more easily, there is now a safety
check, so we really fetched the correct seat.

Reviewed-by: YeongJong Lee <yj34.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9191
2019-06-28 09:03:14 +02:00
Lauro Moura ef185e5e28 efl-mono: Fix value forwarding in promises/async
Summary:
Values returned from C# Then callbacks must release ownership of the
underlying native value, so Eina code can clean it up nicely and avoid
the Wrapper flushing it early.

The same issue applied to the Async wrappers. In this case the value
passed as the Task parameter could be released by an `using` block
awaiting the value.

Also Future creation was then-ing the wrong handle.

Also add better exception messages.

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9197
2019-06-27 19:31:55 -03:00
Lauro Moura 0f514b484b csharp: Rename test util parameters
Summary:
Instead of 'expected' and 'actual', use 'lhs' and 'rhs', as it allows
the actually expected value to be in any position.

Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl, #expertise_solutions

Differential Revision: https://phab.enlightenment.org/D9196
2019-06-27 19:28:53 -03:00
Lauro Moura 967e32d27a csharp: Update after iterator changes
Summary:
Iterator and Accessors are views only, not owning the data they point
to.

Also updated the tests by handling some test data that were leaking.

Fixes T8036

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

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

Tags: #efl

Maniphest Tasks: T8036

Differential Revision: https://phab.enlightenment.org/D9189
2019-06-27 14:07:33 -03:00
Marcel Hollerbach 5e54ad67ec efl_input_interface: verify check cancel event
this verifies that EFL_EVENT_POINTER_CANCEL is emitted correctly.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9171
2019-06-27 16:51:20 +02:00
Mike Blumenkrantz 4c15ef65dd tests/elm: replace bespoke win/loop fast-forwarding with helper function
now we can consistently do event emissions inline in tests using much
simpler code

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9188
2019-06-27 09:45:12 +02:00
Mike Blumenkrantz 39833fe168 tests/efl_ui: add suite_helpers.h to efl_ui_suite.h
no need to manually include this for every file

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9187
2019-06-27 09:45:11 +02:00
Mike Blumenkrantz 14ac6a9e9e tests/elm: add helper function for simplifying getting to event triggering
the usual method is calc -> post render -> job to ensure everything is
set up. this simplifies getting to that job.

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9186
2019-06-27 09:45:10 +02:00
Mike Blumenkrantz 25c86c88be tests: remove correct callback in slider event test
typo

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9185
2019-06-27 09:45:09 +02:00
Jaehyun Cho 2506b9e661 dummy_test_object: remove @owned on iterator
@owned on iterator (view-only container) is removed based on
5b00dc344f
2019-06-27 10:39:44 +09:00
Marcel Hollerbach 03077e238e efl_ui_suite: remove duplicated code
Summary:
there is a helper for this function, lets use it.
Depends on D9181

Reviewers: stefan_schmidt, segfaultxavi, zmike, Jaehyun_Cho

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9182
2019-06-26 09:54:55 -04:00
Marcel Hollerbach 4fe13887ca efl_input_interface: add tests for mouse wheel emitting
Summary:
this tests if z and direction is correctly emitted
Depends on D9169

Reviewers: zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9170
2019-06-26 09:54:55 -04:00
Marcel Hollerbach 132d3dfb92 efl_input_interface: test pointer in and out events on a object
Summary:
this verifies that EFL_EVENT_POINTER_IN EFL_EVENT_POINTER_OUT are
emitted correctly with the correct event content.
Depends on D9168

Reviewers: zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9169
2019-06-26 09:54:55 -04:00
Marcel Hollerbach b0455490e7 efl_input_interface: test pointer move down up
Summary:
this verifies that EFL_EVENT_POINTER_MOVE / EFL_EVENT_POINTER_DOWN /
EFL_EVENT_POINTER_UP are emitted and passed with the correct event types,
and fields on the event object.
Depends on D9167

Reviewers: zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9168
2019-06-26 09:54:55 -04:00
Marcel Hollerbach ea0784d318 evas_events: fix setting of 'pressed' member in Efl_Input_Key_Data
Summary:
this also adds tests verifying that EFL_EVENT_KEY_DOWN / EFL_EVENT_KEY_UP are emitted
and passed with the correct event types, and fields on the event object.

Depends on D9166

Reviewers: zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9167
2019-06-26 09:54:55 -04:00
Marcel Hollerbach f085bd8ae7 efl_input_interface: add test to verify focus in/out
Summary:
this verifies that EFL_EVENT_FOCUS_IN / EFL_EVENT_FOCUS_OUT are emitted
and passed with the correct event types, and fields on the event object.

Reviewers: zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9166
2019-06-26 09:54:55 -04:00
Daniel Kolesa 5b00dc344f eolian: allow value types in view containers (iterators etc.)
This restricts disallowing value types to containers that can own
them.

It also disallows usage of @owned on those view-only containers,
as that makes no sense.
2019-06-26 14:05:46 +02:00
Mike Blumenkrantz 2730f1e569 tests: fix unforked efl_ui_radio_group completion
Summary: change fixture to zero all global variables and reset state

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9177
2019-06-25 13:00:53 -04:00
Felipe Magno de Almeida 907bdad065 efl-mono: Add object type support for Eina.Value
Summary:
C# `Eina.Value` now has builtin support for `EINA_VALUE_TYPE_OBJECT`.

To avoid ambiguity with the `Set` method overloads, explicit casting
operators were used for wrapping/unwrapping `Efl.Object` instead of
implicit ones like for other value types.

Thus, to initialize an `Eina.Value` from an object, you can use the
following:

`var v = (Eina.Value)myObj;`

Reviewers: felipealmeida, vitor.sousa, segfaultxavi, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9164
2019-06-25 19:11:23 +09:00
Mike Blumenkrantz 0a0f3d5bfe tests/slider: verify emission of changed and delay,changed events
this simulates clicking and dragging a slider to avoid regressions with
these events

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9152
2019-06-24 18:31:50 +02:00
Daniel Kolesa 1bbf4380ab eolian: add library support for declaring and using errors
You can now declare errors like this:

error Foo = "message"; [[documentation]]

Then you can use them as types like this:

foo {
    return: error(Error1, Error2, ...);
}

They have a separate type category and storage. They are checked
for redefinitions the same as anything else though. This does
not add any generator support nor it adds any advanced checking.

Ref T6890
2019-06-24 15:15:30 +02:00
Vincent Torri 3ddbda1266 remove last bits of Evil.h in tests and use evil_private.h instead
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9154
2019-06-24 09:01:25 -04:00
Marcel Hollerbach 0c4c74b5f7 efl_ui_win: fix emitting of object focus events
Summary: the event type was wrong. This is now fixed and works correctly.

Reviewers: stefan_schmidt, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9144
2019-06-21 09:40:23 -04:00
Marcel Hollerbach 1e86c2bf93 efl_ui_win: repair scene event emission
It appears that EVAS_CALLBACK_FOCUS_IN / OUT is wrong here, as this is
for when a object gets focus but not the scene.

However, the inital event emission still does not work correctly, this
needs some further investigation.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9138
2019-06-20 17:14:57 +02:00
Marcel Hollerbach f77bc6957c efl_input_pointer: rename tool to touch_id
tool was not very helpfull, and additionally, the docuemtnation of it
was completly wrong. After searching through the code where tool was
actaully set (efl_ui_win.c) it turned out that it is actaully the "id"
of the pointer when there are multiple touch events.

ref T7963

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9135
2019-06-20 17:14:54 +02:00
Marcel Hollerbach c9177a9f8d Introduce Efl.Ui.Radio_Group & Efl.Ui.Radio_Box
Radio_Group is a interface that manages that radio groups can be grouped inside a
external object, the current API of radio was considered confusing in
that regard. It is implemented in the Radio_Group_Internal class which
is private to EFL, a instance of it can be found with get due to the
class function in efl_ui_radio.eo. This architecture was taken like
this, in order to have implementation and interface seperated. With
those two seperated we can inherit from regular widgets, implement the
interface, and composite attach the internal object to the regular
widget. This makes a lot of things easier.

Radio_Box is a class which is extending Efl.Ui.Box, which has an
internal Radio_Group. This is extremly usefull for cases where you just
want to have a list of radio buttons in your UI. The radio group is also
exposed using composition to the internal object. Simular things can be
done for the table.

For now i did not add API to find the group of a radio button. However,
this can be quickly added if requested.

ref T7867

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9058
2019-06-20 16:02:00 +02:00
Cedric BAIL 42b293ae1f ecore: do not rely on implicit rules for memory lifecycle during test.
Summary:
alloca force the memory to be accessible for the entire duration of the
scope of the function it is called from. This will garantee that the
memory pointer are not recycled under our feet before we check them.

T8020

Reviewers: zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8020

Differential Revision: https://phab.enlightenment.org/D9127
2019-06-20 09:40:34 -04:00
Marcel Hollerbach d46d1ed018 fix build. 2019-06-20 14:20:34 +02:00
Vincent Torri ba22016c4c tests: fix warnings and undef ref on Windows (using meson :-) )
Summary: we need to include evil_private.h so that some symbols are declared

Test Plan: compilation

Reviewers: raster, zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9129
2019-06-20 12:50:35 +01:00
Mike Blumenkrantz c27c469204 Revert "efl_ui_suite_spec: add a hack to have running tests again"
This reverts commit 2ef8894fcd.

this is no longer needed

Differential Revision: https://phab.enlightenment.org/D9126
2019-06-20 08:10:47 +02:00
Marcel Hollerbach 2ef8894fcd efl_ui_suite_spec: add a hack to have running tests again
Summary:
it seems something is leading to weird stack behavior with gcc when we
do not delete the widget here. Later deletion in _elm_win_shutdown leads
to a crash like:

 #0  0x00007f7b30dd5bd7 in _elm_win_shutdown () at ../src/lib/elementary/efl_ui_win.c:3805
 #1  0x01007f7b30cdf3a2 in ?? ()
 #2  0x00007fffa4e60570 in ?? ()
 #3  0x0000000000407b14 in _elm_suite_shutdown () at ../src/tests/elementary/suite_helpers.c:52

which is kind of weird. After a day of debugging i did not get any
further, so maybe it is better to do add a hack, so we are having at
least a running CI again

Reviewers: stefan_schmidt, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9112
2019-06-19 09:37:19 -04:00
Xavi Artigas 2b7d26790a Fix miscellaneous build warnings
Nothing serious, but they were driving me mad.
2019-06-19 10:19:49 +02:00
Marcel Hollerbach 0a4beb291d efl_ui_stack: remove!
this can now be done with active_view. This is done in order to reduce
the LOC in elementary that basically do the same.

Differential Revision: https://phab.enlightenment.org/D8920
2019-06-19 07:38:08 +02:00
Marcel Hollerbach f8a1fa470c efl_ui_spec: Support running with CK_FORK=no
Summary: this was simply not tested before. But works now.

Reviewers: zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9109
2019-06-18 12:22:54 -04:00
Marcel Hollerbach 639869703f autotools: REMOVAL!
Get your seatbelt fastend! It is happening! AUTOTOOLS IS GONE NOW!
All praise to meson!

This time the final version, ci has been adjusted, and now does not try
anymore to build a removed buildsystem. However, the scripts in there
need cleaning up.

Differential Revision: https://phab.enlightenment.org/D9027
2019-06-18 08:56:34 +02:00
Marcel Hollerbach 4f8e15c16c Revert "autotools: REMOVAL!"
This reverts commit e8c69667b0.

git push on a wrong branch, sorry. This will land today, but not now.
2019-06-18 08:12:53 +02:00
Marcel Hollerbach e8c69667b0 autotools: REMOVAL!
Get your seatbelt fastend! It is happening! AUTOTOOLS IS GONE NOW!
All praise to meson!

Differential Revision: https://phab.enlightenment.org/D9027
2019-06-18 08:11:55 +02:00
Marcel Hollerbach 3a5f506b0e efl_ui_check: make it undependend of nstate
Summary:
check can only display 2 states, and is only designed to do so.
Additionally, nstate inherits from button, which
brings in autorepeat, which is hileriously broken on check and cannot
really work.

Right now there is not even support in the theme for clickable. So its a
good idea to get rid of this for now IMO.

ref T7865

Reviewers: stefan_schmidt, zmike, segfaultxavi, akanad, YOhoho

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7865, T7867

Differential Revision: https://phab.enlightenment.org/D9018
2019-06-13 09:21:38 -04:00
Mike Blumenkrantz ab7c48de75 tests/efl_ui: remove unnecessary shutdown fixture code
Summary: this is automatically handled by elm_shutdown at the end of every test

Reviewers: YOhoho

Reviewed By: YOhoho

Subscribers: YOhoho, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9087
2019-06-12 08:54:20 -04:00
Mike Blumenkrantz 6e048a4069 tests/efl_ui: reset active view counter structs between tests
Summary: this fixes running the tests with CK_FORK=no

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9080
2019-06-10 09:54:22 -04:00
Carsten Haitzler 768bb43ed3 elm - tests - generator - be python2 explicit so we build on freebsd
no python bonary there (no symplink) but need to be explicit about
python2 or 3 - so do so and we now build on freebsd...
2019-06-04 02:23:52 +02:00
Vitor Sousa fcf5f1d2e2 csharp: Refactor wrapper lifetime.
Summary:
This commit makes use of the `ownership,shared` and `ownership,unique`
events from Efl.Object in order to avoid the C# wrapper from being
collected while C code holds a reference to the object.

For example, creating a list of items in a for loop and attaching events to
them would fails without this commit, as the C# GC may collect the wrapper.

The basic idea is that we use a `WrapperSupervisor`, which is stored in
the Eo data storage, with a GCHandle allocated for the lifetime of the
underlying Eo object. This supervisor takes care of holding either a
weak C# reference (when in unique mode, allowing the wrapper to be GC'd)
or a hard C# reference (when in shared mode, making the wrapper
non-collectable while the Eo has extra references).

One limitation is that object graphs can leak if a shared object in the
graph - an Eo child for example - stores a hard reference to another
object in the graph as a C# field. In this example, this causes the
parent to always have a hard C# reference (from the child) as the child
is non-collectable due to the parent holding an Eo reference to it.

Depends on D8678

Test Plan: `ninja test` and `make test`

Reviewers: lauromoura, felipealmeida, woohyun, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9014
2019-05-31 17:44:12 -03:00
Lauro Moura 937da0b12c csharp: Add some tests
Summary:
- Wrappers losing C# ref while alive in Eo
- Inherited instances being collected

Also cleanup GC and loop queue before each test

Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9063
2019-05-31 17:41:14 -03:00
Lauro Moura 37941b757d csharp: Fix testing under dotnet
Summary: Fix LD_LIBRARY_PATH so it can still find the custom exports lib

Reviewers: bu5hm4n, vitor.sousa, segfaultxavi, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9020
2019-05-31 17:28:00 -03:00
Mike Blumenkrantz d3ef3d6af1 tests/elm: explicitly denote some error/warning messages in unit tests
Summary:
these blocks intentionally trigger warnings/errors, so use test macros
to indicate this

Depends on D8969

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8970
2019-05-30 13:09:19 -04:00
Marcel Hollerbach 37266b93a5 efl.ui.pager: remove!
This can be done with Efl.Ui.Active_View

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8907
2019-05-30 11:48:18 +02:00
Marcel Hollerbach 79fe0121ee efl_ui_active_view: introduce a experimental new widget
this widget tries to replace efl.ui.stack efl.ui.flip & efl.ui.pager
In general those widgets do the same thing, they get content. And
display them with some sort of animations. The new idea here is, that
the basic widget active_view only handles the ownership etc. of the
content that gets added to this. Then there is a view_manager object. The
view_manager object gets notified over the new contents, and requests for
displaying particular contents. The transition then handles those
things.

The version here is feature complete with Efl.Ui.Stack and Efl.Ui.Pager.
Additional features can be implemented in the corresponsing transition
classes. Examples and tests will follow

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8784
2019-05-30 11:48:16 +02:00
SangHyeon Jade Lee 57233f552c efl_ui: rename list empty item to list placeholder item.
Summary:
legacy full style item is introduced Efl.Ui.ListEmptyItem Class in new Efl Interface,
but using "Empty" name is too ambiguous to present style usage.
Thanks to @cedric and @segfaultxavi,
I found better name for this class, Efl.Ui.ListPlaceHolderItem,
as item hold the place which need to be replaced and relayouted by user generated content.

Depends on D8582

Reviewers: cedric, segfaultxavi, eagleeye

Reviewed By: eagleeye

Subscribers: cedric, #reviewers, segfaultxavi, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9034
2019-05-30 15:40:31 +09:00
Cedric BAIL 0e73a88133 ecore: add simple test for property_string_add.
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>>
Differential Revision: https://phab.enlightenment.org/D8756
2019-05-29 15:53:26 -07:00
Vitor Sousa a86a0931f1 eo: add events to track the ownership status of an Eo object
Some user code may want to track an object ownership in regard to whether it is
kept by just one owner or shared between many owners.

This is specially true for code provided by bindings to other programming
languages, where different kinds of resource management may take place.

The event `ownership,unique` is triggered whenever the object refcount goes
from two to one, as a signal that it has just one owner from now on.

The event `ownership,shared` is triggered whenever the object refcount goes
from one to two, as a signal that it has multiple owners from now on.
It will not trigger when further increasing the refcount to any value beyond
two.

We also add benchmarks for sharing (i.e. increasing the refcount) and them
unsharing objects, in order to evaluate the performance impact of this patch.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8678
2019-05-29 15:53:23 -07:00
Cedric BAIL 075d655a19 eina: add test for eina_slstr_copy_new_length.
Summary: Depends on D8800

Reviewers: zmike

Reviewed By: zmike

Subscribers: zmike, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7832

Differential Revision: https://phab.enlightenment.org/D9016
2019-05-29 13:49:36 -04:00
Mike Blumenkrantz 772f48bdac tests/elm_focus: explicitly set widgets to expand+fill in test
Summary:
some widgets do not create a minimum size for themselves, resulting in
a 0x0 layout which can affect tests that rely on object visibility to
succeed without errors
Depends on D9007

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9008
2019-05-29 12:29:04 -04:00
Mike Blumenkrantz 3cafd53212 tests/genlist: fix some shadowed variable warnings
Summary: Depends on D9006

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9007
2019-05-29 12:29:04 -04:00
Mike Blumenkrantz 68e299c17e tests/elm: explicitly denote cases where error messages are intentional
Summary:
we want to make it clear in our tests where it is intended that warnings
and errors may occur
Depends on D9005

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9006
2019-05-29 12:29:04 -04:00
Marcel Hollerbach 8721caf787 efl_ui: add a helper for not tollerating errors in a testsuite
Summary:
We now also fail in the focus tests

Depends on D9021

Reviewers: zmike, cedric, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9022
2019-05-28 12:01:57 -04:00
Marcel Hollerbach 52b2701bc3 efl_ui_suite: fix errors in focus tests
Summary:
there have been a few cases where things were just wrong. Like missing
regular nodes in a focus manager that received focus, and stuff like
this. This now fixes all those cases.

Reviewers: zmike, cedric, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9021
2019-05-28 12:01:50 -04:00
Alastair Poole 7024b19ab1 build: Fix on OpenBSD.
This adds support for OpenBSD with meson build
system. Also use better paths. This resolves
further issues when building EFL.`

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9028
2019-05-28 12:02:48 +02:00
Daniel Kolesa b4dd54617f eolian: add test for file versioning 2019-05-26 18:26:49 +02:00
Daniel Kolesa 13ddc5dbc1 eolian: rename @warn_unused and its associated API
@warn_unused in syntax is now called @no_unused - this is because
"warning about unused" is a C thing (or rather, an extension to C)
and various languages might want to use stricter behavior for this.

Its associated API does the reverse now - it lets you query whether
being unused is allowed at all. This is to match future behavior
of Eolian (once it supports versioning) that will likely reverse it.

@feature
2019-05-26 17:41:22 +02:00
Daniel Kolesa d0fed247bb eolian: remove param @nonull
This has been deprecated for a while and is not strictly necessary
- as a part of an effort to stabilize Eolian, remove this. Eolian
will eventually gain support for versioning and use a reversed
behavior (i.e. no NULL by default), but the API it wlll use for
that will be very different. Features can always be added, it's
much harder to drop them.

@feature
2019-05-26 17:25:15 +02:00
Xavi Artigas 38d7d33354 Rename Efl.Ui.Direction -> Efl.Ui.Layout_Orientation
Summary:
This clarifies a bit the whole Orientation vs. Direction confusion, at the
expense of longer names (Image_Orientation vs. Layout_Orientation).
Also, the interfaces are now adjectives (Orientable) and the enums have long
names (*_Orientation).

Pretty big patch, but no functional changes.

Relates to T7863

Test Plan:
Everything builds and passes tests.
Elementary_tests show same behavior, including the "inverted" widgets, which
are the only parts which received a bit of code changes.
Proof:
https://travis-ci.org/Enlightenment/efl/builds/536277282

Reviewers: zmike, bu5hm4n, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8946
2019-05-24 12:30:32 -04:00
Lauro Moura 708f67c488 csharp: Split test files
Summary: Make it easier to add new tests

Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8937
2019-05-22 17:32:46 -03:00
Daniel Kolesa 5ea0195661 eolian: remove @nullable keyword
This was an experiment that never properly took off and was never
used by any generator. Its use was highly variable, so it could
not be relied upon. We will still want to reverse the current
behavior eventually (no null by default), but that will be
done with eo file versioning in the future.

@feature
2019-05-21 16:04:35 +02:00
Xavi Artigas 41866a8855 Efl.Pack_Table: remove table_direction
Summary:
The only implementation of this interface, `Efl.Ui.Table`, only supports two fill
directions (horizontal or vertical), therefore the table_direction property which
supports primary and secondary directions is unnecessarily complicated. Remove it
and use only `Efl.Ui.Direction.direction` to select the fill direction.
Also, expanded the documentation.

Fixes T7962

Test Plan:
Everything builds and tests pass. Efl.Ui.Table elementary_test still work.
Examples need to be adjusted to stop using table_direction.

Reviewers: zmike, YOhoho, bu5hm4n, SanghyeonLee, Jaehyun_Cho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7962

Differential Revision: https://phab.enlightenment.org/D8902
2019-05-20 13:24:16 +02:00
Daniel Kolesa 5922bb268f eolian tests: rename owning.eo.c to clear confusion 2019-05-17 16:08:23 +02:00
Daniel Kolesa b3a870c7bb eolian: rename eolian_typedecl_enum_field_c_name_get
This is to allow for better object oriented APIs, as the `c_name`
field would be inherited from Object. This also makes it more
clear in C.
2019-05-16 15:52:46 +02:00
Daniel Kolesa 4ab1f2388e eolian: add API to retrieve the C name of an object
This is to prepare for type/class renaming support. This adds
the necessary API to retrieve C-specific names. Other refactoring
is necessary elsewhere for now.

This also renames the old API eolian_class_c_name_get to
eolian_class_c_macro_get to avoid conflict as well as clarify
the intention.
2019-05-16 15:43:52 +02:00
Mike Blumenkrantz 7c7998b3dc meson: enforce 61s timeout for tests, remove explicit timeouts from build files
unit tests automatically abort with info after 60s, and tests should be run with
an appropriate timeout to avoid conflict with the test runner's default 30s timeout

set explicit timeout in eio test for now because there's still frequent bugs here

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8894
2019-05-15 18:49:51 +02:00
Marcel Hollerbach f417fb26e8 Revert "remove vpath test for user dir the test was broken and fixing is insane"
Summary:
This reverts commit 954a534bc0.

It appears that the concerns from this commit are invalid. The case of
~asdf/ does not have any fallback case, if there is no getpwent on this
system, then there will be simply an error, same for the case of a
missing user. In such a case nothing will be written in the buffer /
returned by eina_vpath. The windows build problem can be
fixed by a simple #ifdef'ing the test code.

Reviewers: raster, zmike, cedric, vtorri

Reviewed By: vtorri

Subscribers: vtorri, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8671
2019-05-15 09:49:48 -04:00
Marcel Hollerbach 81d8d8ee55 efl_ui_frame: migrate to efl.ui.clickable
Summary:
frame now uses efl.ui.clickable, which ensures correct click emittion.
The click event is not needed in the event anymore. However, now
efl,action,press / efl,action,unpress is needed.

Depends on D8825

Reviewers: zmike, segfaultxavi, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8826
2019-05-15 09:09:04 -04:00
Marcel Hollerbach 282b76e2bd efl_ui_panes: migrate to efl_ui_clickable
Summary:
the implementation of efl_ui_clickable is now used to tricker the
events. efl,action,click and efl,action,click,double is not needed
anymore from the theme.

Depends on D8824

Reviewers: zmike, segfaultxavi, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8825
2019-05-14 15:50:53 -04:00
Marcel Hollerbach 8429ffba9c efl_ui_image: migrate to efl.ui.clickable
Summary:
the mixin is now used to emit the events of the mixins. This is verified
by the testsuite. The testsuite needs a special treatment for the
object, because a missing image-file of the object would result in a 0x0
image size.

Depends on D8822

Reviewers: zmike, segfaultxavi, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8823
2019-05-14 15:50:39 -04:00
Marcel Hollerbach 5ca38bfc34 efl_test_clickable: introduce new tests
Summary:
the new test checks if the events are correctly emitted

Depends on D8821

Reviewers: zmike, segfaultxavi, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8822
2019-05-14 15:50:32 -04:00
Lauro Moura f93eb3fc04 csharp: Fix event marshalling for value types
Summary:
It was wrongly assuming value types were passed by value.

As stated in the documentation, all arguments are passed with a single
level of indirection.

Fixes T7957

Reviewers: woohyun, felipealmeida, vitor.sousa, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7957

Differential Revision: https://phab.enlightenment.org/D8889
2019-05-14 08:49:17 +02:00
Carsten Haitzler 346e5d1324 edje src - mark with efl version so we don't get warnings 2019-05-13 14:40:08 +01:00
Carsten Haitzler a8d1c7d8ad eina - value - test - cats warnings on 32bit to get some silence
longs will be truncated on 32bit in these tests so be explicit to not
have warinings.

note - eina value tests are broken on 32bit anyway already - the
conversions to/from long types are broken and fail. this doesn't fix
that.
2019-05-13 14:27:00 +01:00
Cedric BAIL c75415ae36 eina: add tests for the new Vpath syntax.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8884
2019-05-11 08:52:09 -07:00
Cedric BAIL c1204d88f6 ecore: add a test for the new Efl.FilterModel.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8798
2019-05-10 11:00:33 -07:00
Cedric BAIL 524139a16f ecore: make sure that ecore stay initialized during the full test.
efl_app_test_promise.c is slightly special and corrective action have to be
taken to make sure that ecore_init return the right value when the no fork
mode of libcheck is used.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8566
2019-05-09 10:15:49 -07:00
Daniel Kolesa 6312cafe20 eolian: move from eo_prefix to c_prefix 2019-05-09 16:17:44 +02:00
Marcel Hollerbach f9c83166be meson: lets execute eldbus test suite
Summary:
this was simply forgotten.
Depends on D8861

Reviewers: segfaultxavi, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8862
2019-05-08 12:27:41 -04:00
Marcel Hollerbach f69ae90d30 Revert "eldbus_test_eldbus_message: Fix resource leak"
Summary:
This reverts commit 24c07f03d1.

This appears to be wrong "eldbus_message_iter_del" does free the message
itself. So this causes a double free and a failing test suite.

Reviewers: segfaultxavi, zmike

Reviewed By: zmike

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8861
2019-05-08 12:27:35 -04:00
Vincent Torri b141c42e3f Evil: remove wrapper around getcwd()
Summary: getcwd() is declared in direct.h

Test Plan: compilation

Reviewers: raster, cedric, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8858
2019-05-08 08:39:36 -04:00
Lauro Moura 3a570c38c9 csharp: Add Part suffix for the part wrappers
Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8835
2019-05-07 13:53:39 +02:00
Daniel Kolesa 159e955168 eolian: fix conflicts between eo file names in tests
Fixes T7911.
2019-05-06 17:05:22 +02:00
Mike Blumenkrantz eeddb16b76 meson: add intl to efreet all binary deps
this must be explicitly added for windows builds

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8725
2019-05-06 17:00:48 +02:00
Daniel Kolesa 653fddfc1e eolian: add support for marking and checking parts as beta
Fixes T7837.
2019-05-05 17:07:26 +02:00
Daniel Kolesa abedd9cc09 eolian tests: use parse instead of path_parse 2019-05-03 17:08:34 +02:00
Daniel Kolesa db57523e78 eolian: refactor parsing API and path handling
This splits the eolian_file_parse API into two, one for parsing
files already present in the database (always by filename) and
one for parsing paths.

It fixes several bugs/leaks on the way (incorrect use of
stringshare etc.) as well as adds checking for whether there
are no conflicting filenames at scan time, for free. That means
it is now no longer possible to scan two paths which have an eo
or eot file of the same name in them.

It should also be faster now.

It also fixes T7820.

@fix
2019-05-03 17:06:49 +02:00
Yeongjong Lee 2426656fd6 ui.relative_layout: implement Efl.Pack
Now, efl_content_iterate, efl_content_count, efl_pack, efl_pack_unpack,
efl_pack_unpack_all and efl_pack_clear are available for relative_layout.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8631
2019-05-03 11:53:54 +02:00
Lauro Moura c06486ca49 cxx: Fix missing bits from header rename
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8811
2019-05-03 08:47:14 +02:00
Lauro Moura e38fc2264c cxx: Rename Elementary.hh into Efl_Ui.hh
Also include Efl_Ui.h alongside Elementary.h (the latter is still needed
by some widgets).
2019-05-02 21:00:57 +02:00
Woochanlee fdfb781e22 evas_object_textblock: Fix binary search fail.
D8610 Makes API Testcase fault.

"&lt" is never searching.

@fix

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8803
2019-05-02 18:14:43 +02:00
Christopher Michael 2336decbe0 eina_test_strbuf: Fix resource leak
Summary:
Coverity reports that we leak storage that 'buf' points to because we
are reassigning the variable, so lets free the previous strbuf so we
don't leak.

Fixes CID1400952

@fix

Depends on D8769

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8770
2019-05-02 14:11:27 +02:00
Christopher Michael 1e0a206f6e eo_test_manager_xattr: Fix resource leak
Summary:
Coverity reports that we leak the eina_binbuf returned from
eina_value_to_binbuf function, so add a call to eina_binbuf_free.

Fixes CID1400953

@fix

Depends on D8762

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8769
2019-05-02 14:11:20 +02:00
Christopher Michael ea56b2aa33 eina_test_tiler: Fix resource leak
Summary:
Coverity reports that reassigning 't' here leaks the storage that t
points to, so free the previous eina_tiler before reassigning the
variable.

Fixes CID1401068

@fix

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8762
2019-05-02 14:11:12 +02:00
Christopher Michael c380c496dc eina_test_ustr: Fix resource leak
Summary:
Coverity reports that we leak 'buf' here so add a call to free

Fixes CID1400784

@fix
Depends on D8781

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8782
2019-05-02 13:48:27 +02:00
Christopher Michael ab2746571c emile_test_base64: Fix memory leak
Summary:
Coverity reports that we leak 'str' here, so change the call from
eina_strbuf_reset to eina_strbuf_free

Fixes CID1400815

@fix
Depends on D8780

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8781
2019-05-02 13:48:22 +02:00
Christopher Michael 524d4bf65c emile_test_base64: Fix resource leak
Summary:
Coverity reports that we leak 'buffer' here so add a call to
eina_binbuf_free

Fixes CID1400820

@fix
Depends on D8779

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8780
2019-05-02 13:48:18 +02:00
Christopher Michael 25505c1431 efl_ui_test_widget: Fix resource leak
Summary:
Coverity reports that we leak the variable 'a' here so lets add a call
to eina_array_free

Fixes CID1400824

@fix
Depends on D8778

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8779
2019-05-02 13:48:11 +02:00
Christopher Michael 9ea2e60b29 ecore_test_ecore_file: Fix resource leak
Summary:
Coverity reports that we leak the store returned from
ecore_file_realpath so add a call to free the returned storage when we
are done with it

Fixes CID1400825

@fix
Depends on D8777

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8778
2019-05-02 13:48:00 +02:00
Christopher Michael 403f681d4f emile_test_base64: Fix resource leak
Summary:
Coverity reports that we leak the storage returned from
eina_binbuf_new here, so lets add a call to eina_binbuf_free before we
exit

Fixes CID1400852

@fix
Depends on D8776

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8777
2019-05-02 13:47:55 +02:00
Christopher Michael 8eae5d3215 efl_ui_test_widget: Fix resource leak
Summary:
Coverity reports that we leak the storage returned from eina_array_new
here, so lets add a call to eina_array_free

Fixes CID1400857

@fix
Depends on D8775

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8776
2019-05-02 13:47:50 +02:00
Christopher Michael aef0da9dd2 emile_test_base64: Fix resource leak
Summary:
Coverity reports that we leak the storage of variable 'decoded' here,
so lets add a call to eina_binbuf_free

Fixes CID1400868

@fix
Depends on D8774

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8775
2019-05-02 13:47:45 +02:00
Christopher Michael 06263f319f efl_ui_test_widget: Fix memory leak
Summary:
Coverity reports that we leak the memory from eina_array_new so lets
add a call to eina_array_free

Fixes CID1400889

@fix
Depends on D8773

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8774
2019-05-02 13:47:39 +02:00
Christopher Michael 24c07f03d1 eldbus_test_eldbus_message: Fix resource leak
Summary:
Coverity reports that we leak the variable 'msg' going out of scope
here, so lets add a call to unref the returned eldbus_message so it
gets freed

Fixes CID1400921

@fix
Depends on D8772

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8773
2019-05-02 13:47:33 +02:00
Christopher Michael f537164024 eina_test_file: Fix resource leak
Summary:
Coverity reports that we leak 'path' here, so free the returned string

Fixes CID1400926

@fix
Depends on D8771

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8772
2019-05-02 13:47:28 +02:00
Christopher Michael b563fed2e4 evas_test_image: Fix resource leak
Summary:
Coverity reports that we leak variable 'f' going out of scope here, so
if we are going to exit the test, lets close the file before we do

Fixes CID1400945

@fix
Depends on D8770

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8771
2019-05-02 13:47:22 +02:00
Christopher Michael e96d296659 efl_ui_test_widget: Fix memory leak
Summary:
Coverity reports that we leak the eina_array 'a' here, so add a call
to eina_array_free

Fixes CID1400844

@fix
Depends on D8766

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8767
2019-05-02 13:45:59 +02:00
Christopher Michael 5434b4fcf0 efl_ui_test_widget: Fix memory leak
Summary:
Coverity reports that we leak the eina_array 'a' here, so add a call
to eina_array_free before we exit

Fixes CID1401003

@fix
Depends on D8765

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8766
2019-05-02 13:45:38 +02:00
Christopher Michael ae61295e9a eina_test_binbuf: Fix memory leak
Summary:
Coverity reports that we leak 'test_buf' here so add eina_binbuf_free
to plug the leak

Fixes CID1401004

@fix
Depends on D8764

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8765
2019-05-02 13:44:22 +02:00
Christopher Michael cf2071744c evas_test_mesh: Fix memory leak
Summary:
Coverity reports that we leak file_mask variable here (storage
returned from strdup), so lets free the variable before we exit the test

Fixes CID1401009

@fix

Depends on D8763

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8764
2019-05-02 13:43:57 +02:00
Christopher Michael f4db22139f emile_test_base64: Fix resource leak
Summary:
Coverity reports that we leak storage of variable 'str' here, so call
eina_strbuf_free

Fixes CID1401062

@fix

Depends on D8762

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8763
2019-05-02 13:43:32 +02:00
Christopher Michael 9bf322a30b elm_test_widget_focus: Fix memory leak
Summary:
Coverity reports that we leak the 'map' hash here, so lets add a call
to free the hash

Fixes CID1401069

@fix

Depends on D8760

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8761
2019-05-02 13:43:04 +02:00
Christopher Michael 2d94748133 efl_check: Fix memory leak
Summary:
Coverity reports that we leak variable 'n' here (memory returned from
strdup) so let's free it

Fixes CID1401070

@fix

Depends on D8759

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8760
2019-05-02 13:42:08 +02:00
Christopher Michael a2e8747ec8 eina_test_file: Fix memory leak
Summary:
Coverity reports that we leak big_buffer here, so lets free it.

Fixes CID1401072

@fix

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8759
2019-05-02 13:40:43 +02:00
Marcel Hollerbach 58f5529f70 efl_ui_spec: we can add efl_ui_pager now
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8752
2019-04-30 20:45:54 +02:00
Marcel Hollerbach 4f0ce2c58c efl_ui: add a internal flag to mark widgets internal
when a widget is marked internal, widgets can use that to behave in
certain ways. Box for example uses this to not alter the widget_parent
property anymore. Which is usefull for when boxes are used internally.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8736
2019-04-30 20:45:40 +02:00
Cedric BAIL 5d512229cb eio: do not fail when the future has been cancelled properly.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8691
2019-04-27 19:56:32 +02:00
Marcel Hollerbach 4eb8b45494 efl_ui_spec: lets add a README
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8713
2019-04-26 12:09:34 +02:00
Marcel Hollerbach 03e1e849b1 efl_ui_suite_spec: add efl_ui_grid to test suite
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8707
2019-04-26 12:06:09 +02:00
Marcel Hollerbach d4a5f1525e efl_ui_spec_suite: support custom widgets
sooo, this test suite is testing interfaces. And when a content needs to
be passed into the API, a lightweight version of a widget will be passed
in. But sometimes implementations *do* requires special classes, they
can now be specified with a custom-mapping in json.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8701
2019-04-26 12:06:03 +02:00
Marcel Hollerbach 7aa9ea071a efl_pack: split algin and padding property
the pack interface is a general interface for how we pack things into a
container. the align and padding property has less to nothing to do with
this. Hence this commit splits the two properties into theire own
interface.

fix T7825

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8699
2019-04-26 12:06:02 +02:00
Marcel Hollerbach 2e85c6ba34 efl_ui_spec_suite: move the information about tests to the test files
for now the widgets which are tested are encoded in the test files where
the tests are implemented. This is for now done in a simple json format,
just for the sake of simplicity.

ref T7815

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8685
2019-04-24 15:52:48 +02:00
Marcel Hollerbach e9c49d0f70 meson: do not use the variable name env in mono
env is used for the program env, and should not be used in any other
form here.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8690
2019-04-24 15:52:47 +02:00
Yeongjong Lee 8c0ab0db42 ui.relative_layout: enhance relation_xxx_set,get apis
Summary:
I forgot `efl_pack_layout_request` after relation_xxx is changed.
Unnecessary register function in `relation_xxx_get` will return unexpected result.
if a object is not child of relative_layout, `relation_xxx_get` should return
`target = NULL` and `relative = 0.0` with error message.

Test Plan: make check

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8627
2019-04-24 20:33:21 +09:00
Marcel Hollerbach afd4e6bd5b efl_ui_scroller: fix Efl.Content implementation
this commit ensures the following:
- Delete content when new content is set
- Content set input validation
- Correct parent setting

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8682
2019-04-23 12:40:53 -07:00
Marcel Hollerbach 7ee0a3e055 efl_ui_tab_page: implement content_set / unset correctly
This patchset ensures that the following features are supported:
- content-widget deletion on set content
- content-widget validation on set calls
- invalid cases return false
- event emission

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8681
2019-04-23 12:40:51 -07:00
Marcel Hollerbach f9143ec634 efl_ui_popup: fix widget_parent inheritance
when you inherit from widget_parent, you MUST call the super function.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8680
2019-04-23 12:40:49 -07:00
Lauro Moura e23914fce7 csharp: Fix test code memory handling
Summary:
It was causing the test to crash when running in debug build.

Also some minor fixes cleaning up stuff when exiting.

Fixes T7792.

Reviewers: segfaultxavi, vitor.sousa

Reviewed By: segfaultxavi, vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7792

Differential Revision: https://phab.enlightenment.org/D8679
2019-04-23 13:02:29 -03:00
Yeongjong Lee 3e49501043 ui.table: remove leagcy evas_table from Efl.Ui.Table
Remove evas_table.
This expect to improve performance by removing internal function call related
evas_table.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8615
2019-04-21 12:13:13 +02:00
Marcel Hollerbach 0bd3ab8252 efl_ui_spec: add tests for efl.content
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8640
2019-04-21 10:51:46 +02:00
Vincent Torri a3f4f61599 Evil tests: remove tests of functions provided by mingw-w64
Summary: mingw-w64 developpers already tests basename and dirname

Test Plan: compilation

Reviewers: zmike, raster

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8649
2019-04-18 14:48:17 -04:00
Daniel Kolesa 6ee2df55aa eolian: remove legacy generation from tests 2019-04-18 19:35:53 +02:00
Vincent Torri ecce595b24 Windows: remove fnmatch and regex in Evil and use the ones in regex DLL installed by ewpi
Test Plan: compilation with autotools and meson (at least as far as it can go)

Reviewers: zmike, raster

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8646
2019-04-18 12:30:22 -04:00
Mike Blumenkrantz f381bf8f01 tests: add api coverage for evas image
verify that legacy apis function as expected when using legacy api to
load and unload images

Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8619
2019-04-18 16:04:17 +02:00
Marcel Hollerbach 11442eca6f Revert "tests: add api coverage for evas image"
This reverts commit cf70826b33.

This test cannot work right now because the fix has not landed.
2019-04-18 11:01:21 +02:00
Mike Blumenkrantz cf70826b33 tests: add api coverage for evas image
Summary:
verify that legacy apis function as expected when using legacy api to
load and unload images
Depends on D8618

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8619
2019-04-18 09:59:58 +09:00
Mike Blumenkrantz 59526ba58d build: use only BUILD_ECORE_IMF_XIM as a define
Summary:
meson and autotools were a bit out of sync with this, resulting in
unexpected behavior

Reviewers: billiob

Reviewed By: billiob

Subscribers: billiob, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8641
2019-04-17 15:45:35 -04:00
Cedric BAIL f75675cb62 eio: remove unecessary printf from tests.
Summary: Depends on D8539

Reviewers: zmike, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8542
2019-04-17 12:35:06 -04:00
Marcel Hollerbach 6a00de11f7 behavior-tests: add Efl.Ui.Table
there are no tests for Efl.Pack_Table for now, so here comes unification
for Efl.Pack tests.

Differential Revision: https://phab.enlightenment.org/D8557
2019-04-17 15:21:14 +02:00
Marcel Hollerbach 48778f3cfb efl_ui_table: hardening of pack_at function
_pack_at is used to add new subobjects to the table. When a object is
already part of this table, then we should not add it again. Additional,
when there is already a gi structure, but the parent is something else,
then we should NOT just reuse this struct, otherwise we might use a
struct reference that we do not own. The struct could be owned by
another table widget.

The test must be adjusted, before we did not error on adding a widget
twice. Now we do (just like in box). Hence we should not do that in
test.

Reviewed-by: YeongJong Lee <yj34.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8554
2019-04-17 15:21:12 +02:00
Marcel Hollerbach 6440e509a0 elm: here comes a new testsuite
We have two elementary test suite, what is more obvious than just adding
a third one! This testsuite aims for establishing a standard behaviour
for the interfaces we have added in efl now. This first part here brings
a few testcases for Efl.Pack which are currently only passing for
Efl.Ui.Box. More widgets will be added afterwards.

The testcases themself are not defined after what worked or did not
work, but rather what made sence (in my opinion ^_^).

ref T7767

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8518
2019-04-17 15:21:11 +02:00
Yeongjong Lee d5445918ec ui.box: remove leagcy evas_box from Efl.Ui.Box
Remove legacy stuff from Efl.Ui.Box.
This expect to improve performance by removing internal function call related
evas_box.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8417
2019-04-17 15:21:07 +02:00
Vincent Torri cbea302b8f unit tests: fix warnings when fork() is not available, fix evil's unit tests compilation
Summary:
* some variables were defined, only when fork() was available
* since Eina.h is included unconditionally, add Eina path in Makefile_Evil.am

Test Plan: compilation

Reviewers: zmike, cedric, raster, devilhorns

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl_build

Differential Revision: https://phab.enlightenment.org/D8586
2019-04-09 10:05:18 -04:00
Vincent Torri 246ab7b254 eldbus unit test: fix warnings
Summary: include libgen.h so that basename() is declared

Test Plan: compilation

Reviewers: cedric, raster, zmike, devilhorns

Subscribers: #reviewers, #committers

Tags: #efl_build

Differential Revision: https://phab.enlightenment.org/D8583
2019-04-09 12:34:19 +01:00
Mike Blumenkrantz 15c3843b55 tests: add evas render test for callbacks
Summary:
verify that all callbacks can be incrementally added and triggered during a
sync render (which is the rendering used in unit testing)

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl_tests

Differential Revision: https://phab.enlightenment.org/D8505
2019-04-08 13:19:56 +09:00
Carsten Haitzler 2178258105 tests - remove one of the eina strtod tests as libc is failing
see the comments above the test explaining why it's removed (libc
fails, not eina and having our tests fail because eina is a bit more
robust than libc is not a sane thing to have). but here is the comment
for git history spelunking:

this test isn't viable because libc actually fails the conversion (testing
glibc 2.28 on arch linux). either libc doesn't like the space at the start
thus doesn't skip it but assumes END of numbver string thus not converting
and returning NULL, or it doesn't like InFiNiTyfoo in some way, but either
way this test shows eina to be more robust and do some kind of conversion
and libc to fail and return NULL from strtod into the string pointer. it
also doesnt return an infinite fp thus hitting the default: case and thus
failing etc. ... so all in all remove the test as all it does it cause
failures and if anything shows libc to be failing more than eina.

@fix
2019-04-07 14:47:35 +01:00
Carsten Haitzler 1f402946a2 tests - fix check header to always include eina due to windows
windows means HAVE_FORK is false... thus missing eina.h and now we
have macros that use eina calls always... so this fixes nbuild of
tests on windows

@fix
2019-04-07 14:16:55 +01:00
Carsten Haitzler 954a534bc0 remove vpath test for user dir the test was broken and fixing is insane
so this test fails on windows as getuid isn't there... so this fixes
the windows bild: fix T7728 ... but it also would have failed if $HOME
didn't match what was in the passwd file, and other fallback cases if
they were triggered.

but ... to make this test stay it would have to also change the logic
- check $HOME env first, then pwent entry, if that fails /tmp/UID and
if that fails use /tmp ... the test would effectively be a copy &
paste of the vpath code at which point this is really pointless where
testing is copying the exact (or almost exat) same code into the test.
this is ignoring the #ifdef fun of martching ifdefs that vary on
windows.

the problem is this kind of api is defined very much by the system it
runs on and the environment and situation, so the test has to be as
complex. realistically, instead of copying & pasting the code across
and now having 2 bits of code to possibly mantain (change the lib src
then the test needs changes too as it's a copy & paste), it's just
saner not to have a test for this kind of siutation and accept the
reality of the situation.

@fix
2019-04-07 13:18:25 +01:00
Cedric BAIL 40867cd0b8 eio: do not fail in case of early ECANCEL.
Actually with directory that contain a lot of file and the right order for them,
you would end up getting what you are looking for before you have triggered all
the future callback. In that case, all the future callback are cancelled and
we will get that notification. The test is not failing in this case as we already
got what we wanted.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8541
2019-04-06 13:13:41 -07:00
Cedric BAIL 589fca7540 elementary: it seems I forgot to initialize some meaningful boolean.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8501
2019-04-06 13:13:36 -07:00
Vitor Sousa 7c28762f15 efl-csharp: fix crash when events trigger after C# object `Dispose`
Summary:
Rework general event handling to check individually each event call, if the
object is not alive then the event will not be propagated.
WeakReferences (and lambdas capturing those WeakRefs) are used to ensure this.

Dispose methods in object now take care of checking if efl libraries are still
initialized and thread-safely unregister each event before performing an
efl_unref on the Eo object.

Event handling in C# is now centered around a single dictionary inside the
object: `EoEvents`.

C# event triggers now properly trigger events on C too.

Standardize C# event-triggering methods names (remove underscores).

Some diminished use of static memory due events no longer requiring static key
objects to be registered/unregistered.

Some fixing of white space generation for generated events.

Depends on D8431

Reviewers: lauromoura, felipealmeida, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8564
2019-04-05 19:59:47 -03:00
Vitor Sousa 1c22a3d819 efl-csharp: fix resource deallocation causing errors everywhere
Summary:
This commit mainly fixes errors caused by deallocating resources in the garbage
collector thread. Using `ecore_main_loop_thread_safe_call_async` to queue
resource deallocation in the main thread seems to solve it.

Also, some `efl_ref` calls are added in places they were missing, mainly
objects that unref in the destructor thus taking ownership if efl_ref is not
called.

Also fix improper resource deallocation in tests that were causing it to crash,
enabling it to call Efl.All.Shutdown again. This allocation and the deallocation
process was moved from the Eo class constructor to static class methods that are
called in the test 'set up' and 'tear down' methods.

Queuing resource deallocation in the main thread make it mandatory that tests
call `Efl.App.AppMain.Iterate()` if they want to check proper resource
deallocation (like TestFunctionPointers.set_callback_inherited_called_from_c).

Extras:
Remove duplicated declaration of 'eflcustomexportsmono' in meson in order to fix
some linking problems.

Remove some unused code around deallocation functions that had to be reworked.

Object allocation is now supplied with the call site information it expects
(file name and line for _efl_add_start).

Depends on D8550

Test Plan: meson test

Reviewers: felipealmeida, lauromoura, cedric, segfaultxavi

Reviewed By: lauromoura

Subscribers: segfaultxavi

Tags: #efl_language_bindings, #do_not_merge

Differential Revision: https://phab.enlightenment.org/D8431
2019-04-05 19:58:19 -03:00
Lauro Moura 1e22db1150 csharp: Make classes abstract and rework casting
Summary:
Abstract Eo classes are now proper C# abstract classes.

As a side effect, returning Eo instances from native code was reworked
to return instances of their actual Eo classes instead of previous
behavior of returning a generic Efl.Object and using static_cast.

Instead of `var window = Efl.Ui.Win.static_cast(widget.GetParent());`
Use `var window = widget.GetParent() as Efl.Ui.Win;`

Another side effect was that `efl_constructor` was removed from the list
of supported `Efl.Object` overrides. It is invoked inside
`efl_add_internal_start`, before the bindings makes the association of
the newly created EoId with the C# instance that created it, making the
managed delegate meaningless. C# users then can use regular C#
constructors to initialize fields.

Also changed to set the private data of C#-inherited classes before the
call to constructing methods (aka constructor parameters) so C# classes
can override them correctly.

Fixes T7778
Fixes T7757

Reviewers: vitor.sousa, felipealmeida, segfaultxavi

Reviewed By: vitor.sousa, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7778, T7757, T7702

Differential Revision: https://phab.enlightenment.org/D8550
2019-04-05 19:56:42 -03:00
Marcel Hollerbach 4edf8036e0 meson: correctly use the correct dependency
Summary:
edje_cc calls epp, so we should not only add edje_cc to the depends on
target, but rather also ensure that epp is availble. Additionally, this
removes unneccessary depends on declarations when we do cross compile.
Depends on D8561

Reviewers: zmike, segfaultxavi, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8562
2019-04-05 08:15:39 -04:00
Christopher Michael 8affdd5dac efl_ui_test_callback: Removed defined but unused function 2019-04-03 13:08:59 -04:00
Hosang Kim 55751f1204 evas_callbacks: fix emission of EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED
Summary:
When I add "efl_event_callback_add(btn, EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED, _cb, NULL)",
_cb is not called. Because of callback_mask is not set correctly.

Test Plan: unit test

Reviewers: zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8528
2019-04-03 09:32:21 -04:00
Marcel Hollerbach 272f32ee9f elm_fileselector: disable this test for now
Summary:
this test fails on travis, for the sake of the release we continue
without this tests, after the release we can enable this again with or
without failing tests.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8538
2019-04-02 14:50:43 -04:00
Lauro Moura 731db8b644 csharp: Raise exception when Array is null.
Reviewers: felipealmeida, vitor.sousa, segfaultxavi

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8499
2019-04-02 16:48:39 +02:00
Marcel Hollerbach de8993575c efl_check: add API to expect a error
Summary:
sometimes it is not enough to just disable aborting on critical error
messages. Sometimes it is better to explicitly expect an error, and fail
the testcase if there is no error.

This is used in later commits here.

Depends on D8417

Reviewers: YOhoho, segfaultxavi, zmike, woohyun, Jaehyun_Cho

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8519
2019-04-02 08:56:28 -04:00
Mike Blumenkrantz f5d3030d7b tests: unset eina log callback at end of each efl_app promise test
Summary: ensure that this doesn't trigger cascading errors

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8514
2019-04-02 08:34:18 -04:00
Lauro Moura 683958ee68 eo: Correctly name Realized classes.
The previous preprocessor rule was generating strings like
"\"Efl.App\"_Realized.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8527
2019-04-02 11:02:27 +02:00
Mike Blumenkrantz 0ecb3ccde5 tests: abort on errors during genlist expand test, not warnings
Summary:
log level=2 is the warning level, which is not super useful since
there's currently billions of eo warnings occuring in every function
call

Reviewers: cedric, segfaultxavi

Reviewed By: cedric, segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8515
2019-03-29 19:00:17 +01:00
Marcel Hollerbach fce4d95596 efl_ui_widget: add implementation for finding the window
the problem with the previous implementation (just redirect the calls to
the widget_parent then to the efl_parent is that after invalidate its
impossible to find the window where the widget is in. However, there are
cases where we want to have access to the window of the widget, for
example, to invalidate focus highlight etc..
The window of a widget is always constant, and cannot be changed (as the
evas object cannot hop accross different evas)

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8475
2019-03-29 14:02:31 +01:00
Marcel Hollerbach b54035213f efl_ui_widget: reintroduce legacy behaviour
before the refactoring of the disabled property, there was no way to
enable a widget which has a disabled tree. This here however enables
this to work again like this. The user will be told with an error
message. The integraty of the property is maintained accross reparents.

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8459
2019-03-29 08:26:06 +01:00
Marcel Hollerbach f66b3edc4d efl_ui_widget: add tests for parent and disalbed property
this just adds more coverage over the behaviour of efl_ui_widget
properties.

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8458
2019-03-29 08:26:05 +01:00
Marcel Hollerbach 02c2918fe6 efl_ui_test_widget: ensures tests do not error
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8457
2019-03-29 08:26:04 +01:00
Marcel Hollerbach 62b3759db5 efl_ui_slider: block scrolling when on slider
when a mouse cursor is over a slider, the mouse wheel should be used to
affect the state of the slider, not also the one of the slider.

ref T2529

Reviewed-by: Bowon Ryu <bowon.ryu@samsung.com>
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8455
2019-03-28 09:39:39 +01:00
Cedric BAIL 07e017c510 elementary: restore quick exit from wait loop in fileselector test.
The test was not expecting both callback to be set when the wait loop
was started. By moving them around, it fixes the test case to only have
one relevant callback set at a time.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8490
2019-03-28 09:30:00 +01:00
Marcel Hollerbach 197210cde2 elc_filselector: solve the mysterium of sometimes failing tests
so after a phone call, two days of debugging, tears, crying etc. etc. we
finally came to a point of enlightenment! *Someone* (bu5hm4n) moved
gengrid and genlist events from eo back to smart events, so we can work
arround legacy borks and event-name collisions, at this point he did not
knew that some widgets (fileselector) already relied on those *lovely*
events. Hence this broke theoretically the testsuite, however, the
fileselector testsuite is ultimatily buggy, and the wait function does
not return false when it timeouts, (i don't know why not). So this break
was never discovered.

Additionally there is a second issue. it appears, that when we
immidiatly quit the mainloop after we have got the selected callback,
that then genlist decides to forget about the sd->selected pointer, and
NULLs that one out. Which then results in the fact that
elm_fileselector_selected_get ends up returning invalid paths.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8488
2019-03-27 15:03:41 -07:00
Yeongjong Lee e162ba9696 eio: add test to ensure proper lifecycle of Efl_Io object and futures.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8372
2019-03-27 15:03:31 -07:00
Wonki Kim 0f29560aa2 test: add a test case for elm_entry
Summary:
behaviors of elm_entry has been changed
so that this patch provides usages to keep as a test case.

Reviewers: zmike, Hermet, YOhoho

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8483
2019-03-27 10:58:35 -04:00
Yeongjong Lee 2e545ee34e elm_win: fix correct return value on elm_win_rotation_get
Summary:
Before b3327c761e, -1 was returned on`elm_win_rotation_get`, if `obj` is NULL.
This fixes backward compatibility.

Test Plan: make check

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8474
2019-03-26 19:48:30 +09:00
Yeongjong Lee 43b199aca3 elm_photocam: fix file_get,set operations
Summary: This patch fixes bug that elm_photocam_file_get always return NULL.

Test Plan: make check

Reviewers: Hermet, zmike, bu5hm4n

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8472
2019-03-26 13:16:32 +09:00
Mike Blumenkrantz 18349ac73f tests: add (failing) test for elm_entry magnifier
this crashes immediately and showcases the current infinite recursion issue
in elm_entry which is triggered by clicking any entry for $longpress_timeout

ref T7202

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8440
2019-03-25 15:26:51 +01:00
Mike Blumenkrantz c249cb3c8b tests: add function to do "real" timers
in very specific cases it's necessary to match the exact timing of
internal functionality, so add a function to provide that capability

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8439
2019-03-25 15:26:50 +01:00
Mike Blumenkrantz 1e54bb7d9e tests: make elm_win visible during tests
elm_win has some internal locking to avoid doing sizing and visibility
changes until pre-render to save some calculations. this makes triggering
ui events on objects impossible, as they will not be visible.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8438
2019-03-25 15:26:47 +01:00
Yeongjong Lee 476010b018 elm_win: fix correct rot variable in elm_win_rotation_get
Remove duplicated rotation variable

Also, it fixes wrong layout class comparing.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8464
2019-03-25 11:36:14 +01:00
Shilpa Singh 834219013d efl_access: add test cases for reading_info_type_set/get API
Add test cases for efl_access_object_reading_info_type_set and efl_access_object_reading_info_type_get
APIs

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8427
2019-03-25 10:41:35 +01:00
Lauro Moura 0881d1524b efl-csharp: Add back I prefix for interfaces.
Summary:
Conforming to C# coding conventions.

For properties, now we only generate a wrapper if its name does not
clash with the name of the class that would be implementing it.

Fixes T7751

Reviewers: vitor.sousa, felipealmeida, segfaultxavi

Reviewed By: vitor.sousa, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7751

Differential Revision: https://phab.enlightenment.org/D8397
2019-03-21 14:48:33 -03:00
Xavi Artigas cbbc5e5eb6 mono-tests: Fix after latest changes to eolian
Summary: Event payload checking is more strict now.

Test Plan: Check that master can be built

Reviewers: lauromoura, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8437
2019-03-21 17:20:13 +01:00
Daniel Kolesa 3f083b3ccb eolian: add event type call convention checks for non-beta classes 2019-03-21 16:00:18 +01:00
Lauro Moura 43a1d79ba8 csharp: Remove test about conflicting events.
Conflictings events won't be allowed anymore on eolian-based classes.

For manually subclassed C# classes that eventually have conflicts, this
should be dealt with in T7744.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8426
2019-03-20 18:44:02 +01:00
Yeongjong Lee 77f2782d29 ui.box_stack: refactor layout_update
Summary:
This patch remove evas_box function from Efl.Ui.Box_Stack and add unit test.

Depends on D8214

Test Plan:
1. make check
2. elementary_test -to 'efl.ui.box_stack'

Reviewers: zmike, Jaehyun_Cho, cedric

Reviewed By: zmike, Jaehyun_Cho, cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8094
2019-03-20 10:37:42 -04:00
Shilpa Singh e80169a844 efl_access: Add attribute_del API, Add test cases for all access_object_attribute* APIs
Add attribute_del API, currently there is no provision to delete a particular attribute(key-value pair)
from the attribute list of a widget.
Add test cases for efl_access_attribute_append, efl_access_attributes_get, efl_access_attribute_del and efl_access_attributes_clear API

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: Shinwoo Kim <cinoo.kim@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8386
2019-03-20 15:29:04 +01:00
Marcel Hollerbach 60384a4d40 evas: apply new event calling convention
Summary:
ref T7758

Depends on D8407

Reviewers: cedric, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7758

Differential Revision: https://phab.enlightenment.org/D8408
2019-03-19 16:31:50 -04:00
Daniel Kolesa 58b8a3d163 efl: remove EFL_EO_API_SUPPORT macro
Summary:
Since we're now going to be shipping some eo classes as stable,
there is no point in keeping the eo api behind a macro, and it
should be enabled by default. Another case is beta classes, but
those are behind the EFL_BETA_API_SUPPORT guard.

This also changes includes around the place where things are
clearly broken (such as an included header needing something
from another header but that other header being guarded, notably
efl_ui_widget.h needing focus manager but focus manager being
behind beta in Elementary.h)

Reviewers: zmike, cedric, bu5hm4n, stefan_schmidt, segfaultxavi

Reviewed By: cedric, segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8322
2019-03-18 12:13:59 +01:00
Yeongjong Lee 721f1776db evas_events: prevent double event_freeze in evas_object_freeze_events_set
Summary:
This patch prevent that event_freeze_count is greater than 1 in
`evas_object_freeze_events_set`

Test Plan: make check

Reviewers: bu5hm4n, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8325
2019-03-15 11:23:09 -04:00
Lauro Moura 4acc7e0667 csharp: Support Efl.Class for interfaces
Summary:
The `GetEflClassStatic` method for interface is in their Concrete
sidekick.

Previously, passing a valid Eo interface as a type caused the binding to
complain that `Type is not an Efl.Object`.

Test Plan: run test case

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8360
2019-03-15 11:38:08 -03:00
Marcel Hollerbach cdd134a3a0 elementary: add compile checks for the efl_ui.h header
Summary:
we should check if the header actaully compiles without the beta
defines.

Depends on D8342

Reviewers: zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8343
2019-03-14 14:26:34 -04:00
Yeongjong Lee ba1c94d051 efl_ui_layout: fix elm_layout_text_set behavior
Summary:
Since commit 649433560b, elm_layout_text_set didn't work on some widgets.
This patch fixes invisible text issues.

Test Plan:
1. make check
2. elementary_test -to 'popup'

Reviewers: zmike, segfaultxavi, bu5hm4n

Reviewed By: zmike

Subscribers: cedric, #reviewers, herb, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8326
2019-03-14 11:11:32 -04:00
Yeongjong Lee c3f823418d ui.widget: fix theme_apply working in sub_object_add
It seems that theme_apply in sub_object_add haven't worked since commit
f6fa1ef612.

scale, theme property will be set properly when the parent is changed.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8283
2019-03-13 17:02:30 +01:00
Jaehyun Cho 6bf7f19d60 Revert "tests: add test for elm_layout_text_set"
This reverts commit 0e027980f6.

Since D7888 breaks the backward compatibility, D7888 is going to be
reverted. This patch is based on D7888 so this patch is also required to
be reverted for now.
After a proper patch is applied instead of D7888, then this patch can be
submitted again.
2019-03-13 19:25:36 +09:00
Lauro Moura 305749f049 csharp: Fix event names with underscore.
Summary:
names like `focus_geometry,changed` shoud be converted to
FocusGeometryChanged instead of Focus_geometryChanged.

Fixes T7735

Test Plan: run tests

Reviewers: vitor.sousa, felipealmeida, segfaultxavi

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7735

Differential Revision: https://phab.enlightenment.org/D8301
2019-03-11 19:28:02 -03:00
Marcel Hollerbach aabe29abc1 Revert "ui.widget: fix theme_apply working in sub_object_add"
This only works with a new libcheck, but not with a old one, revisiting
it.

This reverts commit da0ff53471.
2019-03-11 21:57:45 +01:00
Yeongjong Lee da0ff53471 ui.widget: fix theme_apply working in sub_object_add
It seems that theme_apply in sub_object_add haven't worked since commit
f6fa1ef612.

scale, theme property will be set properly when the parent is changed.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8283
2019-03-11 21:34:57 +01:00
Yeongjong Lee 0838c1af63 ui.widget: add exception handling code and unit test of sub_object_add/del function
Add missing exception check code with unit test.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8282
2019-03-11 21:23:51 +01:00
Lauro Moura f29ceef500 efl-csharp: Respect beta for classes and other stuff.
Summary:
In order to work around an issue with Efl.App, which is stable but
inherits from Efl.Core.Command_Line, @beta interfaces/mixins in the
inheritance chain are simply skipped.

Also changed the class used int test for inheritance from C#

Efl.Loop is stable but internally it uses a @beta class as argument to
its Register() method in the constructor. When instantiating a
user-defined C# subclass, the binding calls the C# override in the
NativeInherit class and the marshalling fails as no code is generated
for the beta class.

Also moved Efl.Part test to a beta class. Efl.Part is still beta.

Regarding parts, they are skipped if its class is @beta too.

Also rejected all elm_* files in elm public eo files. They should get
back in as they are converted to Efl.Ui.* api. An exception is
elm_interface_scrollable.eo, as efl_ui_panel depends on it.

Fixes T7730

Test Plan: Run tests

Reviewers: vitor.sousa, segfaultxavi, felipealmeida, cedric, bu5hm4n, zmike

Reviewed By: vitor.sousa

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7730

Differential Revision: https://phab.enlightenment.org/D8268
2019-03-11 16:08:04 -03:00
Lauro Moura 2a003420f8 eolian-cxx: Add beta information to *_def
Summary: Fixes T7732

Reviewers: cedric, felipealmeida, vitor.sousa, bu5hm4n

Reviewed By: vitor.sousa

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7732

Differential Revision: https://phab.enlightenment.org/D8267
2019-03-11 14:41:01 -03:00
Daniel Kolesa d3c5384cd0 eolian: enable checking of beta/stable contexts in all classes
Summary:
This enables all the checks unconditionally, without ignoring
classes that don't have an Efl namespace. This required a lot
of beta marking to make it build. It most likely doesn't
mark types correctly, as that is not fully enabled yet.

Reviewers: zmike, cedric, segfaultxavi, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8266
2019-03-11 13:42:29 +01:00
Marcel Hollerbach 2f85e78998 efl_ui_types: rename move_prolicy field
Summary:
in was not very descriptiv, move_in was concluded to be more descriptive

ref T7726

Reviewers: segfaultxavi, cedric, zmike

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7726

Differential Revision: https://phab.enlightenment.org/D8270
2019-03-09 13:34:48 +01:00
Cedric BAIL bc12d9feb5 eo: make reflection getter const function.
Getter are usually not modifying there object. This is going to put a strong
limit on what a getter property for MVVM is, as it will prevent any side
effect on getting a property from a View.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7969
2019-03-08 14:31:08 -08:00
Mike Blumenkrantz 91b84fa2a8 evas: restore legacy types which were defined to eo types
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8245
2019-03-08 12:06:24 -08:00
Mike Blumenkrantz 632bd45825 efl.loop_timer: rename all methods/properties/events
Summary:
avoid potential future conflict by not using conflict-able names

ref T7731

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7731

Differential Revision: https://phab.enlightenment.org/D8256
2019-03-08 16:38:46 +01:00
Daniel Kolesa cf200a7d28 eolian: remove legacy handling API and most of generation
Summary:
This removes all Eolian API that deals with handling of legacy
code. It also removes the code using it in the generator as well
as bindings, but for now keeps generation of .eo.legacy.h types,
as there are still instances in our codebase where things are
otherwise broken. We can remove the rest once that is resolved.

Reviewers: zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8255
2019-03-08 10:12:09 -05:00
Mike Blumenkrantz 1e750ddfde tests: add test for legacy-only build in elm_suite
Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl_tests

Differential Revision: https://phab.enlightenment.org/D8254
2019-03-08 09:02:00 -05:00
Mike Blumenkrantz 7edd248491 tests: add build test for EFL_NOLEGACY_API_SUPPORT in efl_ui_suite
Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl_tests

Differential Revision: https://phab.enlightenment.org/D8252
2019-03-08 09:01:56 -05:00
Mike Blumenkrantz 60063359fc tests: use Efl_Ui.h for efl_ui test
Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8253
2019-03-08 08:53:18 -05:00
Yeongjong Lee fbc7c31b33 ui.box_flow: refactor layout_update
Summary:
This patch remove evas_box function from Efl.Ui.Box_Flow and add unit test.
Depends on D8214

Test Plan:
1. make check
2. `elementary_test -to 'efl.ui.box'` with 'flow' checkbox.

Reviewers: zmike, Jaehyun_Cho

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8219
2019-03-08 08:22:08 -05:00
Marcel Hollerbach 8118330d2a eo: fix reflection
Summary:
the DFS tree walk was accidently stopped by a too early return
statement. We should only return if we found a reflection entry, if not,
then we should continue our search

Depends on D7996

Reviewers: cedric, zmike, q66, segfaultxavi

Reviewed By: cedric, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7997
2019-03-08 08:19:23 -05:00
Yeongjong Lee 97416e9996 elm_gengrid: fix correct parent-child relation of item content
Summary:
see 1b2401849a that said
`evas_object_smart_member_del` doesn't make sense here.
I guess `_sub_object_del` should have been used when item_all_contents_unset is
implemented.

Item content should have widget(gengrid) as the parent. but that relationship
is removed by c075b7caaa.
See also, `_item_content_realize` of genlist.

Test Plan: make check

Reviewers: Hermet, SanghyeonLee, bu5hm4n

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8238
2019-03-08 13:18:05 +09:00
Mike Blumenkrantz 14df465ce3 elm: explicitly include Efl_Ui.h in binaries
it looks like people have been relying on Elementary.h to include
eo apis even though this obviously makes no sense

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8223
2019-03-07 14:16:57 -08:00
Mike Blumenkrantz ca9daf94c6 elm_code_widget: make this efl_ui namespaced
this currently has no counterpart in interface widgets but would be
useful there. removing the use of an elm_scroller type makes it independent
of legacy widgets, and it's still a beta api so at least future development
can be resumed at some point without much issue

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8158
2019-03-07 14:14:55 -08:00
Yeongjong Lee 0b7cd8d88e ui.box, ui.table: respect user min
Use restricted_min_set instead of min_set in layout_update.
min_set is set by public API(user side). if it is changed by internal function,
user will get unexpected value later. please check added test case.

Note that this reverts commit e013480e7a. instead,
this patch provides better solution of the issue refered in e013480e7.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8214
2019-03-07 09:59:05 -08:00
Yeongjong Lee f1d5b8a40c test/elm_box: clean up elm_box_disabled_test
1. remove unrelated test.
2. fix indentation
3. use proper parameters of `elm_win_resize_object_add`

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8218
2019-03-07 09:58:56 -08:00
Lauro Moura c67f199b2f efl-csharp: Respect beta in constructor parameters.
Summary:
Fixes compilation after Efl.Ui.Win parameter changes.

Also removed an unused var and now we pass the beta option to the eolian
mono invocation for the tests.

Fixes T7723

Reviewers: segfaultxavi, felipealmeida, vitor.sousa

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7723

Differential Revision: https://phab.enlightenment.org/D8150
2019-03-07 13:03:33 +01:00
Mike Blumenkrantz 9a361ac917 efl_access_object: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8131
2019-03-06 13:03:02 -08:00
Lauro Moura 595c863fed efl_csharp: Use cs_args instead of runtime_Assemblies
This will erase the need of the `runtime_assemblies` kw_arg, allowing ot
use a single invocation without warnings about unsupported parameters.

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D8092
2019-03-06 19:05:50 +01:00
Yeongjong Lee e013480e7a ui.box, ui.table: respect parent hint size min
Summary:
This patch fixes issue that parent hint size min is ignored when it is greater
than children hint size min sum.

Thanks to segfaultxavi for reporting this.

Test Plan:
1. make check
2. 'hello-gui' or 'texteditor' example in examples.git

Reviewers: segfaultxavi, zmike

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8098
2019-03-05 09:31:19 +01:00
Mike Blumenkrantz e3fa213d10 efl.ui.win: remove all legacy types and functions from eo file
Summary:
most of the eo methods here will be marked beta, preventing them from
generating legacy code

ref T7511
Depends on D8082

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7511

Differential Revision: https://phab.enlightenment.org/D8083
2019-03-04 13:37:24 -05:00
Mike Blumenkrantz da16711974 efl.ui.layout: fix theme.get implementation (+unit test)
Summary: ref T7512

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7512

Differential Revision: https://phab.enlightenment.org/D8059
2019-03-04 13:36:25 -05:00
Felipe Magno de Almeida f392c5a436 efl-mono: Add support for dotnet core
Summary:
This commits adds dotnet as a supported C# platform for EFL# bindings.

Due to differences between Mono and Dotnet regarding DllImport, the
bindings now are using an imperative approach to load the function
pointers through the NativeModule and FunctionWrapper classes. These
classes handle the dlopen/LoadLibrary and dlsym/GetProcAddress calls.

Also, the previous caching of non-owned strings returned to native code
was removed until further memory checks.

We also had to create workaround for bool and chars in Structs for C#
marshaling. Going through System.Byte instead and Marshaling manually
to their respective types.

In order to actually build efl_mono.dll with dotnet right now,
issue #4782 from Meson should be fixed to make it properly detect and
used the Dotnet compiler. Also use "-Ddotnet=true" when running meson.

Fixes T7394

Reviewers: felipealmeida, vitor.sousa, bu5hm4n

Reviewed By: vitor.sousa

Subscribers: cedric

Tags: #efl

Maniphest Tasks: T7394

Differential Revision: https://phab.enlightenment.org/D8069
2019-03-01 23:58:56 -03:00
Lauro Moura dd89eb2fd1 efl-mono: Add support for Efl.Class
Efl.Class (in practice, the return from the *_class_get() functions) can
be used as argument to functions, like in Efl.Object.provider_find and
Efl.Ui.Widget_Factory.item_class(get/set).

This commits adds support by representing Efl.Class instances
as System.Type in the C# API, allowing someone to do things like:

`factory.ItemClass == typeof(MyFramework.MyButton)`

It also supports user-defined classes that inherit from efl classes.
2019-03-01 23:04:08 -03:00
Lauro Moura 850b7309b0 efl-csharp: Fix Eina.Value containing arrays and lists
Summary:
It was marshalling erroneously data into and out of arrays and lists.

Instead of passing data by value (or by address of correct size), it was
stuffing data into IntPtr and trying to parse out afterwards.

This commit changes the binding to use the same approach of plain
Get/Set, with proper overloads.

Reviewers: vitor.sousa, segfaultxavi, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8057
2019-03-01 19:24:12 -03:00
Lauro Moura c3ed0791a6 efl-csharp: Fix variable generation for Roslyn
Summary:
Mono's old compiler (mcs) accepts LL as suffix for longs while Roslyn
(csc) is strict, allowing only a single L.

Test Plan: Run tests

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8061
2019-02-28 17:20:53 -03:00
Lauro Moura bf4280e915 efl-csharp: Remove generated inlist/inarray support
Summary: To be added again in a later release after rework in Eolian

Reviewers: q66, vitor.sousa, felipealmeida

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8056
2019-02-28 12:21:56 -03:00
Vitor Sousa f78be36dfe efl_csharp: add constant variable generation to C# binding (constants)
Reviewers: lauromoura, q66, bu5hm4n, zmike, cedric, felipealmeida, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_language_bindings

Differential Revision: https://phab.enlightenment.org/D8048
2019-02-28 12:05:36 -03:00
Vincent Torri 8a7cb97e02 Eina: implement strtod in C locale and remove linkl against msvcr100.
Summary:
This fixes compilation on Windows

More precisely edje_cc could not compile emotion edc files, so it was a runtime problem
because of msvcr100 link.

Add more tests than before

Test Plan: compilation

Reviewers: raster

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7926
2019-02-28 14:36:42 +01:00
Lauro Moura 73cbc48669 eolian: Fix struct database registration.
Summary:
It was mistankely swapping regular and inlist structs when registering
after parsing, causing functions like eolian_state_structs_by_file_get
to return wrong data, breaking C# bindings.

Also added a simple test.

Reviewers: q66, bu5hm4n, zmike, cedric, felipealmeida, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8047
2019-02-28 12:01:31 +01:00
Mike Blumenkrantz 0e027980f6 tests: add test for elm_layout_text_set
Summary: ref T6931

Reviewers: stefan_schmidt, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T6931

Differential Revision: https://phab.enlightenment.org/D7603
2019-02-27 16:04:07 -05:00
Yeongjong Lee 4628021fe5 efl_container: remove content_remove
Most of classes implements Efl.Container.content_remove are just calling "unpack"
except of "Efl.Canvas.Layout" and "Efl.Ui.Layout".
This patch remove the asymmetrical API and add content_remove API of
"Efl.Canvas.Layout" and "Efl.Ui.Layout" that child can be remove without efl_part
APIs.

ref T7576

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7913
2019-02-27 21:20:33 +01:00
Yeongjong Lee e4e5b5a349 test/ui_table: add unittest for Efl.Ui.Table
Summary:
{F3627728}
{F3627729}
ref T5487

Depends on D7892

Test Plan: make check

Reviewers: jpeg, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T5487

Differential Revision: https://phab.enlightenment.org/D7840
2019-02-27 14:45:34 -05:00
Mike Blumenkrantz 0b152734ba efl_ui_widget: redo disable handling
before the disable property was a bit weird. Setting something to
disabled=true will disable all children of the widget that is changed.
However, only the update function of the children will get the false flag,
not the flag itself. Which means, to query the real disabled state, we
need to walk up the parent relations.

With this patch, every change to disabled will go through the disabled
property, which mean, a implementor can just overwrite the disabled
property, and adjust its internal state there. Just be carefull, a set
to disabled=true still might result in disabled=false. This makes the
function on_disable_update unneccesary. Which also cleans up the
Efl.Ui.Widget class.

ref T7553

Depends on D8016

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8017
2019-02-27 20:19:23 +01:00
Marcel Hollerbach aef19e9017 efl_ui_widget: introduce a new API
Summary:
this new API can be used to get a easy to use iterator, to iterate
through all the children of a specific widget.

ref T7553

Reviewers: stefan_schmidt, zmike, cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: woohyun, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7553

Differential Revision: https://phab.enlightenment.org/D8014
2019-02-27 13:29:08 -05:00
Mike Blumenkrantz a5e183ad5d efl.canvas.object: clip -> clipper && clipees -> clipped_objects
Summary:
also clipees_has -> clipped_objects_count

ref T7555

Depends on D8039

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7555

Differential Revision: https://phab.enlightenment.org/D8040
2019-02-27 13:17:37 -05:00
Mike Blumenkrantz 6326e18b3f efl.file: improve api a bit
Summary:
the previous implementation/api had a number of issues:
* "file" property contained both "file" and "key" values
  - also performed file loading operation
* "load_error" property which was specific to image objects
* no methods for controlling file loading/unloading

this patch attempts the following changes:
* split "file" property into "file" and "key" properties
  - also remove "key" from existing "mmap" property
* remove "load_error"
* directly return error codes from operations
* add "load" and "unload" methods for directly controlling load state
* add implicit file loading if file/mmap is set during construction
* rewrite all efl.file implementations to move file loading into load() method
* rewrite all usage of efl.file api based on these changes
* add C extension functions to mimic previous behavior

ref T7577

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: vitor.sousa, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7577

Differential Revision: https://phab.enlightenment.org/D8018
2019-02-27 13:17:10 -05:00
Daniel Kolesa 7924660d54 elua tests: fix distcheck
The elua tests need to create a temporary file, so chdir'ing
first will not work, as the tests source dir is immutable during
distcheck. Therefore, only chdir once absolutely necessary, and
before that make sure that all file accesses are to temporary
ones.
2019-02-27 18:40:10 +01:00
Lauro Moura 401f695644 efl-csharp: Remove legacy Evas bindings.
Summary: Pave the way to correct beta classes handling.

Reviewers: vitor.sousa, segfaultxavi, bu5hm4n

Reviewed By: vitor.sousa, bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8004
2019-02-25 19:21:04 -03:00
Mike Blumenkrantz 5da43b2aa7 efl.gfx.entity: combine show/hide events into visibility,changed
Summary:
this requires some internal hackery to preserve legacy compatibility
and correctly translate the single new event into two legacy events

ref T7558

Depends on D8018

Reviewers: segfaultxavi, bu5hm4n

Reviewed By: segfaultxavi

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

Tags: #efl_api

Maniphest Tasks: T7558

Differential Revision: https://phab.enlightenment.org/D8019
2019-02-25 14:00:14 -05:00
Marcel Hollerbach d0709d6110 eolian: validate betaness
Summary:
if there is a none beta class, then this class should not depend on beta
classes in parameters / event types / return types, parent inherits.
This adds this validation, so we can start to slowly to unbeta more and
more classes.

Reviewers: q66, zmike, cedric, segfaultxavi

Reviewed By: q66

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7999
2019-02-25 14:00:28 +01:00
Marcel Hollerbach 8d2d5ae3b8 build: test eo fallback add
Summary:
this enables tests with the fallback implementation of EO.
Depends on D7924

Reviewers: stefan_schmidt, cedric, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7931
2019-02-25 07:59:13 -05:00
Cedric BAIL 12778084d7 efl: improve Efl.Container_Model test to have proper lifecycle.
Summary: Depends on D7865

Reviewers: felipealmeida, segfaultxavi, SanghyeonLee, zmike, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7528

Differential Revision: https://phab.enlightenment.org/D7866
2019-02-23 08:58:07 -05:00
Cedric BAIL 301b05502c eio: enforce proper lifecycle for all Efl.Io_Model and fix discovered lifecycle bugs.
Summary:
This make sure that the object returned by children_slice_get are properly
destroyed when the refcount drop to only the parent holding a reference on
it. This make it clear that the user of the api can rely on efl_ref/efl_unref
to actually manage its use of the returned object.

Additionnaly we are cleaning up the created object that we are using to build our own
request inside the Efl.Io.Model and avoid internal leak.

Depends on D7864

Reviewers: felipealmeida, segfaultxavi, SanghyeonLee, zmike, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7528

Differential Revision: https://phab.enlightenment.org/D7865
2019-02-23 08:57:48 -05:00
Lauro Moura 7943a69b0d efl-csharp: Add support for containers in events.
Summary: Using a simple wrapper as event parameters are not ownable.

Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7981
2019-02-22 14:07:24 -03:00
Daniel Kolesa dc492b1586 eolian: introduce typed slice types
Summary:
This adds two new complex types, slice<T> and rw_slice<T>. This
is necessary to make the type useful to bindings, as Eina_Slice
on its own says nothing about what it's carrying and that prevents
useful code from being generated outside of C.

@feature

Reviewers: bu5hm4n, segfaultxavi, lauromoura, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7980
2019-02-22 16:18:49 +01:00
Marcel Hollerbach 229dc576e6 efl_ui_focus_object: rename events
the event now math the pattern of <property-name>,changed.

ref T7571

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7989
2019-02-22 14:00:32 +01:00
Marcel Hollerbach 93903a7ba3 efl_ui_focus_manager: rename focus,changed
focus,changed is already used in efl_ui_focus_object, which makes sense
there. However, here we listen for the property focus_manager, thus its
renamed to focus_manager,changed.

ref T7571

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7990
2019-02-22 14:00:28 +01:00
Yeongjong Lee 3118bfc34b efl_ui_relative_layout: introduce new relative container
Summary:
Efl.Ui.Relative_Layout is a container which allows you to position and size with
relation to each other.
it is possible to position and size using relation like edje even though
you don't know a edc script.
Position and size can be changed dynamically using widget APIs.

@feature

ref T5487

Test Plan:
make check
examples
elementary_test -to 'efl.ui.relative_layout'

Reviewers: cedric, Hermet, Jaehyun_Cho, zmike, bu5hm4n, jpeg, segfaultxavi

Reviewed By: Jaehyun_Cho, segfaultxavi

Subscribers: segfaultxavi, kimcinoo

Tags: #efl

Maniphest Tasks: T5487

Differential Revision: https://phab.enlightenment.org/D7524
2019-02-22 19:47:47 +09:00
Cedric BAIL 2b2bf31264 eo: add tests for efl_property_reflection_exist.
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7938
2019-02-21 11:54:16 -08:00
Cedric BAIL 770750486c eo: return an Eina_Value error when a get for a property is not implemented.
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7936
2019-02-21 11:54:12 -08:00
Cedric BAIL b23f65291f eo: make reflection setter able to return an error code in case of failure.
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7935
2019-02-21 11:54:09 -08:00
Mike Blumenkrantz 99c3d42efd efl.canvas.scene: clean up pointer_position property
this needed to take a seat param (to handle multiseat) and also have a
bool return to indicate whether a pointer device exists for the specified
seat

ref T7584

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7957
2019-02-21 20:24:34 +01:00
Mike Blumenkrantz e166486107 interfaces: move pointer_iterate method efl.canvas.scene -> efl.ui.win
this method should probably be merged into a gesture class somewhere,
but it's @beta anyway so shuffling it around to reduce spaghettification
of code is fine for now

ref T7584

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7955
2019-02-21 20:24:30 +01:00
Marcel Hollerbach 078ccd1ca9 efl_loop / efl_app: make efl_app / efl_loop abstract
this is done inorder to ensure that noone ever thinks of creating theire
own app/loop object.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7982
2019-02-21 19:13:39 +01:00
Mike Blumenkrantz f886941b11 api: efl.gfx.size_hints -> efl.gfx.hints
Summary:
these hints are not strictly size-related, so renaming them is more consistent
with their actual function

ref T7563

Depends on D7968

Reviewers: segfaultxavi, cedric, bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7563

Differential Revision: https://phab.enlightenment.org/D7977
2019-02-21 18:43:12 +01:00
Daniel Kolesa b6b7317f4e eolian gen: generate a separate file with legacy implementations
If legacy implementations are generated, eolian_gen now creates
a separate file for them and includes it. The file name convention
for that is <.c file name without ext>.legacy.<.c file name ext>
or <.c file name>.legacy.c if it has no ext, so for example
foo.eo.c becomes foo.eo.legacy.c and foo becomes foo.legacy.c.

The file is generated assuming there are any legacy APIs contained
inside the .eo file.
2019-02-21 16:52:40 +01:00
Daniel Kolesa 95d414549b tests: add chdir in elua to prevent incorrect file accesses
Elua is testing API that tries to read files by path, prevent
unintentional reads from current working directory by changing
that directory.
2019-02-21 15:05:22 +01:00
Marcel Hollerbach 5284ac36ca eo: add API for querying the class type
a class can be a interface mixin abstract or regular.
This adds a API for getting this information
2019-02-21 08:56:13 +01:00
Daniel Kolesa 9674dadbda eolian: restrict usage of ptr() to directly used types
That means, it can only now be used on parameters and struct
fields, never aliased within typedefs. This simplifies the
logic so that we don't have ptr metadata buried several layers
deep.
2019-02-17 02:26:22 +01:00
Daniel Kolesa 8952c05ddd eolian gen: initial support for reflection api
This adds support for generating reflection functions for
properties. This support is basic for now, supporting only
primitive types and string(shares), it will be expanded later
as required.

@feature
2019-02-15 17:17:15 +01:00
Carsten Haitzler 8e98c7eef9 cmdline iface - fix to consume input array AND strings totally
strings often enough are generated e.g. via "%s/%s" or "%i" or similar
etc. ... i have poitned to examples, so move to make all strings
consistently stringshared, fix a bug added to the efl thread code
where it accessed and freed array even tho array was consumed (but not
strings) in the set, and the code used free to consume not
stringshare_del. fix other code and tests to match

EXCTLY the kind of bugs and mistakes with this kind of design that i
said would happen more often just happened...
2019-02-15 10:21:04 +00:00