Commit Graph

2793 Commits

Author SHA1 Message Date
Mike Blumenkrantz 0c72d430c3 efl_ui/popup: remove popup_size property
this was more or less just a wrapper around efl_gfx_entity_size_set
and resulted in unpredictable behavior depending on when it was called

instead, simply set the min size hint on the popup object

ref T7902

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9549
2019-08-14 12:08:04 -07:00
Mike Blumenkrantz 0ca5cd82a9 efl: mark a couple internal eo files as @beta
Summary: these are not distributed apis so they should always remain beta

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9559
2019-08-14 19:24:19 +02:00
Christopher Michael e533bef2bf tests/ecore_wl2: Add start of ecore_wl2_surface tests
ref T8016
2019-08-14 11:03:04 -04:00
Cedric BAIL 742b7afb40 elementary: add tests for the efl_part support of efl_ui_property_bind.
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9529
2019-08-12 10:13:38 -07:00
Carsten Haitzler c4354dd38e evas test - use correct type for ptr type tracking called
callback setup uses int but thecallback uses intptr_t ... which is...
wrong.
2019-08-11 17:09:32 +01:00
Carsten Haitzler 0a06c7b568 efl check - use global not stack local buffer for srunner_set_xml
asan is most unhappy about using a priori stack frame's data for
this.. it seems check uses the char * buf directly as-is without
duplicating it... so we can't sensibvly use local stack data. that is
what asan is saying... and this makes our tests not work under asan to
begin with... nto to mention other possible issues i have yet to see
as i got to this one first.
2019-08-11 16:35:03 +01:00
Mike Blumenkrantz 189ddd9c81 tests/popup: add (extremely) comprehensive test for anchor popups
this verifies all align settings, different anchor points, changing anchors
and aligns on-the-fly, unsetting anchors, and changing popup sizes

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9526
2019-08-09 10:25:35 -07:00
Mike Blumenkrantz 2c33744a8a tests/popup: add test units for all the text_alert popups in elm_test
this is mostly to verify that the internal label is sizing as expected

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9523
2019-08-09 10:25:33 -07:00
Mike Blumenkrantz 0a3dfe8b5c tests/popup: add unit tests for scroll_alert expandable sizing
these correspond to the cases in elm_test

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9522
2019-08-09 10:25:30 -07:00
Marcel Hollerbach 090588f58b efl_ui_selectable: add spec test suite for this
Summary:
this brings a spec test suite for Efl.Ui.Selectable

Depends on D9517

Reviewers: zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9518
2019-08-08 09:12:46 -04:00
Marcel Hollerbach 54c524f7f6 introduce efl_ui_multi_selectable and efl_ui_single_selectable
right now they are just thin wrappers from what have been in
efl_ui_collection. This is just a first effort, the interfaces have to
be equipped with more and better API, more events, and tests.

ref T8057

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9515
2019-08-07 14:48:41 +02:00
Mike Blumenkrantz c5030346d4 tests/popup: add sizing test for scroll_alert popup
Differential Revision: https://phab.enlightenment.org/D9516
2019-08-07 14:48:38 +02:00
Mike Blumenkrantz 4410f8b080 tests/popup: add unit tests for alert_popup
this covers all cases from the elm_test example

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9512
2019-08-06 17:18:37 +02:00
Marcel Hollerbach 9baa96c352 efl_ui_check: migrate from own property to Efl.Ui.Selectable
this is the basic work for getting radio group as a single_selection
interface, which can be a part of mutli_selection. Which will come both
later on.

ref T8057

Differential Revision: https://phab.enlightenment.org/D9504
2019-08-06 17:09:42 +02:00
Mike Blumenkrantz 660d993752 tests/efl_ui_popup: add tests for this widget
these tests cover all the cases in the elm_test efl.ui.popup example

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9509
2019-08-06 09:26:41 +02:00
Mike Blumenkrantz e9e8078cec tests/elm: add helper callback for automatically quitting main loop when triggered
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9506
2019-08-06 09:26:38 +02:00
Mike Blumenkrantz f8dcb7dc2b tests/elm: add helper function for clicking at specified coords
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9505
2019-08-06 09:26:37 +02:00
Vitor Sousa c1b76d3008 csharp: fix ownership of value types in arrays and lists
Summary:
`eolian_mono` now considers the implicit ownership of value types in arrays and
lists when generating ownership flags.

Also, update manual bindings for arrays and lists to no longer free elements
in the `Dispose` method when the container has ownership of the elements
but C# itself does not have ownership of the container; the elements will be
freed by whoever owns the container.
Modifying and removing elements will still free them though.

Re-enabled unit tests that required ownership of value type elements.

Reviewers: felipealmeida, q66, vitor.sousa

Reviewed By: felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9457
2019-08-05 19:15:35 -03:00
Vitor Sousa e6a52ef371 csharp: re-enable binbuf tests with -Dmono-beta=false
Summary:
Since the introduction of the `binbuf` keyword in eolian, `Eina_Binbuf` is no
longer a beta only type.
Hence, we enable EFL# binbuf unit tests in non-beta compilation too.

Reviewers: lauromoura, felipealmeida

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9467
2019-08-05 18:55:20 -03:00
Marcel Hollerbach 1bd9a8f232 introduce a new interface efl_ui_selectable
this is meant to be implemented by entities that *can* be selectabled
(not to be confused with containers that can have selected contents)!

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9503
2019-08-05 19:49:13 +02:00
Lauro Moura 40def3eac9 efl-mono: Add Model manual implementation to C# and MVVM factories
Summary: Depends on D9273, D9270

Test Plan: Run added testcases.

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

Reviewed By: cedric

Subscribers: cedric

Tags: #expertise_solutions, #efl_language_bindings

Differential Revision: https://phab.enlightenment.org/D8080
2019-08-05 10:18:18 -04:00
Yeongjong Lee f2b1f312a9 efl_input_key: replace key property name with key_sym
Summary:
Sorry to touch stable eo classes. there is name conflict issue between class and
property when binding language is generated from eo. for example in C#, compiler
error occurs.

```
src/bindings/mono/efl_input_key.eo.cs(272,26): error CS0542:
`Efl.Input.Key.Key': member names cannot be the same as their enclosing type
```

This patch changes Efl.Input.Key.GetKey/SetKey method to
Efl.Input.Key.GetKeySym/SetKeySym and generates Efl.Input.Key.KeySym
property.

Note that CAPI is not changed.

ref T8093

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

Reviewers: lauromoura, woohyun, zmike, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8093

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

zmike note: this class was not released at the point of this patch, the class
was only recently marked as stable
2019-08-05 08:51:22 -04:00
Marcel Hollerbach 7869778d02 efl_ui_spin: move the step implementation to spin_button
having efl_ui_spin implementing efl.ui.range_interactive does not make
sense. Efl.Ui.Spin is a not interactive widget, so it should not
implement that interface.

ref T7897

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9475
2019-08-03 20:40:11 +02:00
Marcel Hollerbach bd8fcab8b2 efl_ui_spec: add a test suite for the steady event
this checks that the steady event is correctly emitted after some time.
Right now this test does notthing for EFL_UI_SPIN_CLASS. Reason for this
is that Spin is not interactive, even if it implements the interface for
it. Maybe something we should resolve in future.

ref T7894

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9460
2019-08-01 14:36:50 -07:00
Marcel Hollerbach 45b763a2dc efl_ui_spin_button: use the newly emitted event from range_interactive
this event is not also in range_interactive, so better use this.

ref T8097

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9459
2019-08-01 14:36:48 -07:00
Marcel Hollerbach 010f813572 efl_ui_range_interactive: add a new event
the steady event from slider now moved here. A spec test suite and the
corresponding implementations will follow.

ref T7894

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9458
2019-08-01 14:36:45 -07:00
Daniel Kolesa 1c5fa59ee8 eolian: remove __builtin_free_cb
This has long been unused. If we need to replace this eventually,
it should be done correctly.
2019-08-01 16:55:31 +02:00
Daniel Kolesa 1bcca58d82 eolian: disallow ptr() in containers in stable API 2019-08-01 16:55:31 +02:00
Christopher Michael adaea4170a tests/ecore_wl2: Add test for ecore_wl2_input_name_get
ref T8016
2019-08-01 09:04:09 -04:00
Christopher Michael 2c4b26ef4e tests/ecore_wl2: Add test for ecore_wl2_input_keymap_get
ref T8016
2019-08-01 08:59:26 -04:00
Christopher Michael f15ca5e227 tests/ecore_wl2: Add test for ecore_wl2_input_display_get function
ref T8016
2019-08-01 08:56:42 -04:00
Christopher Michael f166cf3741 tests/ecore_wl2: Add test for ecore_wl2_input_seat_id_get function
ref T8016
2019-08-01 08:53:45 -04:00
Christopher Michael f481b6acf1 tests/ecore_wl2: Fix assert tests for some window functions
ref T8016
2019-08-01 08:53:21 -04:00
Christopher Michael 34514ccf58 tests/ecore_wl2: Add start of Ecore_Wl2_Input API tests
ref T8016
2019-08-01 08:41:07 -04:00
Marcel Hollerbach d671c7e42b fix warning 2019-08-01 11:41:30 +02:00
WooHyun Jung d02a3ecb66 efl_input_clickable: add longpress_abort
Now, a specific class which uses efl_input_clickable_util is able
to cancel ongoing longpress event by calling longpress_abort.

This commit shows how efl_ui_text uses longpress_abort to satisfy
its own longpress use case

ref T7847

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9455
2019-08-01 11:33:03 +02:00
Marcel Hollerbach d98d434e56 efl_ui_position_manager: move from accessor to function callback
this commit enables access to the item structure of the collection via a
function callback. The function callback now enables batching for items,
which does not pay off right now. However, a few more optimizations can
be done in order to get the whole payoff.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9445
2019-07-31 15:51:48 -07:00
Ali Alzyod 32cffb4494 evas_textblock: change font-size/font-family only using EFL.Text.Font Interface
Currently:
User cannot change font size only, he needs to set both font and font size with (**efl_text_font_font_set**)
To change size only, you need to make two calls, one to get font (**efl_text_font_font_get**) , then pass it again with new size to (**efl_text_font_font_set**).

New Behaviour:
If user want to change size only, then he passes NULL as font argument to keep same font.
If user want to change font only, then he passes 0 as font-size argument, to keep same font-size.

Notes:
This is not best solution, but it better than current behaviour.
I think best solution to have separate function to set font size, but It might break current api or duplicate functions.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9158
2019-07-31 10:54:55 -07:00
Marcel Hollerbach 6d0f514126 efl_ui_check/radio: use clickable
Summary:
with this commit the state of the check / radio buttons are changes when
the Widget is clicked. The Widget is now using clickable and emits all
the events.

ref T7865

Reviewers: segfaultxavi, zmike, Jaehyun_Cho, woohyun

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7865

Differential Revision: https://phab.enlightenment.org/D9456
2019-07-31 09:12:07 -04:00
Xavi Artigas 359a118cda Efl.Ui.Spin: Remove mouse wheel interaction
This widget is now meant as a base class for other widgets, with very limited
user interaction. Efl.Ui.Spin_Button already takes care of mouse wheel events.

Ref T7897

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9453
2019-07-31 12:44:31 +02:00
Marcel Hollerbach 14ff010601 efl_ui_spec: add test suite for range_display events
Summary:
this test case ensures the correct emittation of the newly added events.

ref T7895
Depends on D9372

Reviewers: segfaultxavi, zmike, woohyun, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7895

Differential Revision: https://phab.enlightenment.org/D9373
2019-07-31 10:18:20 +02:00
Marcel Hollerbach c0082b1c71 efl_ui_range_display: move events from spin
we concluded min,reached and max,reached should be on every widget that
implements range_display. This here is the start of that work, the
events are moved, next commit fixes all widgets, the last commits
enables tests in the spec unit test.

ref T7897
ref T7895

Differential Revision: https://phab.enlightenment.org/D9371
2019-07-31 10:18:20 +02:00
Lauro Moura 119d26f43f csharp: Add EFL_BETA guards around new test
Summary:
The test method is not generated when beta is disabled as
`Eina.Value_Type` is marked @beta and eolian complains if we try to use
it.

Other `Eina.Value` methods work despite `Eina.Value` also being beta due
to its usage as stable through the keyword `any_value[_ptr]`.

Reviewers: vitor.sousa, bu5hm4n, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9449
2019-07-30 17:57:24 -03:00
Lauro Moura d0e10dd273 ecore: Fix download test.
Summary:
After ecore_main_loop_quit() changes, calling it from outside the main
loop does not make the next iteration of the main loop quit, causing the
original version of the test to deadlock.

Also update the function documentation about it.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, felipealmeida, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9448
2019-07-30 15:22:03 -04:00
Marcel Hollerbach 6883087ac7 Revert "evas_object_textblock: add support for variation sequences"
This reverts commit f7ce771e32.
2019-07-30 19:09:12 +02:00
Lauro Moura 29d24aa409 csharp: Add marshal support for Eina.ValueType
Summary:
It uses a custom marshaler and a helper boxing class to convert between
the managed enum values and the native Eina_Value_Type pointers.

To be used by future MVVM machinery.

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9443
2019-07-30 11:47:07 -03:00
Ali Alzyod f7ce771e32 evas_object_textblock: add support for variation sequences
update font processing to handle variation sequences unicodes to select proper glypg in respect to variation seqences

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9053
2019-07-29 11:17:35 -07:00
Marcel Hollerbach 44a45e3aca efl_ui_item: migrate to Efl.Ui.Clickable
this adds the mixin to the item. With this commit every class inheriting
from Efl.Ui.Item will automatically emit all the clickable events.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8830
2019-07-29 16:32:05 +02:00
Mike Blumenkrantz b1986363db tests/elm: move efl_config tests to efl_ui_suite
these invoke non-legacy codepaths which should never be triggered during
legacy unit tests

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9403
2019-07-29 16:06:18 +02:00
Mike Blumenkrantz b9648605e8 tests/elm: add test for ctxpopup sizing
verify that size hints of content are being respected

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9404
2019-07-29 16:06:17 +02:00
WooHyun Jung 77e268e6ab efl_input_clickable: rename efl_ui_clickable to efl_input_clickable
Summary:
Renamed all efl_ui_clickable_XXX to efl_input_clickable_XXX based on
the discussion in T7847

ref T7847 T7976

Reviewers: zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7976, T7847

Differential Revision: https://phab.enlightenment.org/D9427
2019-07-29 11:43:01 +02:00
Vincent Torri a6ade14c5e Evil: remove pwd code in Evil and fix compilation failures after the removal
Summary: remove pwd code in Evil

Test Plan: compilation

Reviewers: zmike, cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9420
2019-07-28 09:27:27 +01:00
Vitor Sousa 8d1bd770df csharp: fix EFL# by updating it to reflect the newest changes in Eolian
Summary:
`Efl.Event` became a builtin type that is no longer declared in `efl_object.eo`,
and therefore it is no longer automatically generated in EFL#.
Given that, we define a struct manually to reflect the memory layout of the
native struct.

Containers of value types are now allowed in eolian, so tests that were disabled
because of the restriction on `ptr` were re-enabled using the plain type.

But since these containers have just arrived, handling of ownership for value
types is currently undefined in bindings.
Hence, tests that used `ptr(int) @owned` as elements were left disable.
This will be solved in a future patch.

`void_pr` is now deprecated, so we remove it from tests also.

Reviewers: q66, segfaultxavi, lauromoura, felipealmeida

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9417
2019-07-26 15:47:33 -03:00
Daniel Kolesa 1a95e87f58 eolian: fix tests after latest restrictions 2019-07-26 14:39:38 +02:00
Daniel Kolesa 635a2df7e7 eolian: ban void_ptr in stable APIs
This required some refactoring in eldbus and tests but otherwise
seems good to go.
2019-07-26 13:35:27 +02:00
Felipe Magno de Almeida f230dc9dbc eolian-cxx: Add binbuf and event keywords handling
n

Summary:
Add support in Eolian-Cxx for binbuf and event keywords and tests. It
will generate the C type while the manual binding in C++ for the types
do not exist.

Reviewers: q66, lauromoura

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9412
2019-07-26 13:02:28 +02:00
Marcel Hollerbach 2a970046bc efl_ui_spotlight_container: mirror the behavior of view_manager
setting the parent here is usefull, as we can forgot about this object
then, and do not have to free the object by hand.

Differential Revision: https://phab.enlightenment.org/D9305
2019-07-25 20:42:39 +02:00
Marcel Hollerbach 6d0b0baf9b efl_ui_spotlight_container: fix ownership behavior of view_manager
view_manager is a property that takes ownership of the view_manager
object. We are setting the parent in the setter which means, we should
actaully have one ref to the parent, and one from the caller, so we need
to unref one.

Differential Revision: https://phab.enlightenment.org/D9304
2019-07-25 20:42:38 +02:00
Marcel Hollerbach 18c7a90f7a rename Item_Container -> Collection
this is the last bit of renaming

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9410
2019-07-25 20:27:41 +02:00
Marcel Hollerbach 257b30f9de efl_ui_spec_suite: simplify this
when i initially added item_container to the spec test suite, there was
no plan to make Efl.Ui.List / Efl.Ui.Grid like it is now. However, now
we can simply use Efl.Ui.List and Grid instead of this helper class.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9409
2019-07-25 20:27:40 +02:00
Marcel Hollerbach a4f7baa911 rename efl_ui_item_container -> efl_ui_collection
this is the first rename of the main widget, the renames of the test
suites will follow

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9408
2019-07-25 20:27:39 +02:00
Marcel Hollerbach 167d2475e8 efl_ui_grid_item: remove this
this is not needed anymore, the grid items can also just inherit
directly from the items.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9395
2019-07-25 20:27:38 +02:00
Mike Blumenkrantz a5420ac8f3 tests/ecore: verify that quit() -> begin() does not pre-cancel main loop
Summary: ref 17f433c57b

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9375
2019-07-25 13:35:41 -04:00
Cedric BAIL 9419be9baf elementary: make Efl.Ui.Position_Manager a namespace.
This does the following rename as per T8058:
Efl.Ui.Item_Position_Manager -> Efl.Ui.Position_Manager.Entity
Efl.Ui.Grid_Position_Manager -> Efl.Ui.Position_Manager.Grid
Efl.Ui.List_Position_Manager -> Efl.Ui.Position_Manager.List

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9388
2019-07-24 21:26:43 +02:00
Marcel Hollerbach a6543fb68f efl_ui_grid: make it work with item_container
this also reformats the example, removes
comments that are misleading, removes UI elements that have no purpose.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9384
2019-07-24 12:05:06 -07:00
Marcel Hollerbach 577b82dad6 Introduce Efl.Ui.Item_Container
this is a new widget which aims to replace Efl.Ui.Grid / Efl.Ui.List.
The widget is split up in a widget and a interface for item placement.

Efl_Ui_Item_Position_Manager: The interface contains API which is used
by the Item_Container to place the items, there is also a set of common
tests which tests for the casual tripping wires, and ensures that the
events are emitted in the correct moments (the later part still can be
improved)

Efl_Ui_Item_Container: The widget itself, it contains the API for the
enduser to add Items to the widget, it handles the different modes for
selection type and emits the events for selection changes. The pack API
is conform with the spec unit test. An additional set of tests is
defined which should be able to be run on every widget with a specific
position_manager beeing set.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9285
2019-07-24 10:38:22 -07:00
Marcel Hollerbach 3eb7b3793b eolian: start to express ownership transfere
before @owned was not even expressed in the api definitions of the
generated APIs, this adds support for it.

@owned is now expressed with EFL_TRANSFER_OWNERSHIP in a arguments. And
that preprocessor directive is documented.

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Differential Revision: https://phab.enlightenment.org/D9369
2019-07-23 18:09:36 +02:00
Vitor Sousa 253e18159b eolian_mono: parse `binbuf` and `event` keywords, also re-enable binbuf tests
Summary:
Parse `binbuf` and `event` type names and generate the proper binding type.

In 288f645e3c tests for `Eina.Binbuf` were disabled in order to avoid the
usage of deprecated notations in eolian.

Since the new `binbuf` keyword works as a substitute for the old notation
`ptr(Eina.Binbuf)`, tests were updated and re-enabled using the new notation.

Test Plan: `meson test`

Reviewers: felipealmeida, lauromoura, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9349
2019-07-23 14:09:24 +02:00
Christopher Michael 1b20f789dc Revert "tests/ecore_wl2: Reduce calls to ecore_wl2_display_connect"
Reverting this as it causes tests to stall (essentially 'meson test
ecore_wl2-suite' just hangs) when run inside a compositor.

This reverts commit a526285db4.
2019-07-22 10:05:27 -04:00
Christopher Michael a526285db4 tests/ecore_wl2: Reduce calls to ecore_wl2_display_connect
In order to reduce display setup time during test execution, we can
just connect once and run all the window tests after that.

ref T8016
2019-07-22 09:48:19 -04:00
Christopher Michael 725cce8cb4 tests/ecore_wl2: Combine tests of ecore_wl2_window_surface functions
ref T8016
2019-07-22 09:36:59 -04:00
Christopher Michael c1c4072b07 tests/ecore_wl2: Add wayland protocol as a dep for ecore_wl2 tests
ref T8016
2019-07-22 09:36:59 -04:00
Christopher Michael 28c232d770 tests/ecore_wl2: Add test for ecore_wl2_window_display_get
ref T8016
2019-07-22 09:02:10 -04:00
Christopher Michael a7cc7730af tests/ecore_wl2: Add test for ecore_wl2_window_aux_hints_supported_get
ref T8016
2019-07-22 09:00:17 -04:00
Christopher Michael 5cf095dd3d tests/ecore_wl2: Add test for ecore_wl2_window_output_find
ref T8016
2019-07-22 08:57:33 -04:00
Christopher Michael afe8414925 tests/ecore_wl2: Add test for ecore_wl2_window_rotation_get
ref T8016
2019-07-22 08:55:04 -04:00
Christopher Michael 8510de33c3 tests/ecore_wl2: Add test case for ecore_wl2_window_surface_id_get
ref T8016
2019-07-22 08:40:34 -04:00
Christopher Michael 11de06e5b8 tests/ecore_wl2: Add test for ecore_wl2_window_surface_get function
ref T8016
2019-07-22 08:37:39 -04:00
Christopher Michael ccfd74f17a tests/ecore_wl2: Remove use of macros for display setup & connect
ref T8016
2019-07-22 08:37:27 -04:00
Mike Blumenkrantz 033b438891 tests/elm: fix event starter helper function to handle elm_win objects
this class implements EFL_CANVAS_SCENE_INTERFACE but is not an Evas,
so the evas must still be fetched

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9366
2019-07-19 15:05:02 -07:00
Mike Blumenkrantz d35b06497a tests/eldbus: fix broken unit test
this callback isn't called during the main loop, so attempting to
quit the loop has no effect and the test deadlocks

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9367
2019-07-19 15:04:54 -07:00
Mike Blumenkrantz 0084d8d736 tests/elm: fix a couple unit tests to use event starter helper function
these tests seem to have relied upon a callback being triggered which
would call ecore_main_loop_quit() prior to ecore_main_loop_begin() starting
the main loop

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9365
2019-07-19 15:04:50 -07:00
Cedric BAIL d902989b74 elementary: add a test for Efl.Ui.View interface.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9308
2019-07-17 21:58:01 +02:00
Cedric BAIL e0ee318fe1 eo: use efl_provider_{un,}register infrastructure instead of Efl_Loop one.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9296
2019-07-17 21:57:57 +02:00
Cedric BAIL 16b662d5d1 elementary: add a test for Efl.Model_provider.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9295
2019-07-17 21:57:56 +02:00
Mike Blumenkrantz b25c9f6137 tests/elm: add test for elm_bubble "clicked" smart callback
Summary:
also verify general layout loading

Depends on D9330

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9331
2019-07-16 13:38:33 -04:00
Mike Blumenkrantz ab0c71803b tests/elm: break out event callback function
Summary:
now we have a function we can reuse which verifies that it is called exactly
one time

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9330
2019-07-16 13:38:28 -04:00
Marcel Hollerbach 1bae8ec521 efl_ui_slider: change the semantical meaning of step property
Summary:
before the step property was used as a relative value. The value that
was added in the end was (max-min)*step. Which is quite confusing given
the fact that the other APIs in in efl_ui_range_display are also taking
values absolut. Other implementations also do so.

fix T4834

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T4834

Differential Revision: https://phab.enlightenment.org/D9327
2019-07-16 16:37:29 +02:00
Mike Blumenkrantz 1d90b113e0 tests/actionslider: add more actionslider unit tests
verify actionslider callbacks and various basic functionalities

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9322
2019-07-16 14:48:50 +02:00
Mike Blumenkrantz 62059763c6 tests/elm: improve click_part() further to guess part locations
non-swallow parts exist "somewhere" on a given layout, and it may be
the case that they are not actually positioned and just take up the whole
layout space.

for these parts, if they have a direction in their name, we can try to vaguely
guess where the part might be in order to (ideally) click it

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9321
2019-07-16 14:48:49 +02:00
Mike Blumenkrantz 564ba9b96c tests/elm: improve click_part() to handle non-swallow parts
swallow parts have content, other parts do not

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9320
2019-07-16 14:48:48 +02:00
Christopher Michael af0a37da03 tests/ecore_wl2: Check for valid xdg_runtime_dir
Seems these tests need XDG_RUNTIME_DIR to be set, and it does not get
set in Travis builds, so add a small check here so that Travis builds
don't fail ... thanks Marcel ;)

ref T8016
2019-07-15 14:21:36 -04:00
Christopher Michael f30ef634ad tests/ecore_wl2: Add start of Ecore_Wl2 Window tests
ref T8016
2019-07-15 12:56:30 -04:00
Christopher Michael 3be7c844fd tests/ecore_wl2: Add test for ecore_wl2_display_inputs_get
ref T8016
2019-07-15 12:32:50 -04:00
Christopher Michael 7a85ad660b tests/ecore_wl2: Add test for ecore_wl2_display_registry_get function
ref T8016
2019-07-15 11:01:49 -04:00
Christopher Michael a081920c7d tests/ecore_wl2: Add test for ecore_wl2_display_screen_size_get function
ref T8016
2019-07-15 11:01:43 -04:00
Christopher Michael 539775b1cd tests/ecore_wl2: Add test for ecore_wl2_display_globals_get function
ref T8016
2019-07-15 11:01:39 -04:00
Christopher Michael 9ef1ab7876 tests/ecore_wl2: Add printf for compositor detection
ref T8016
2019-07-15 11:01:34 -04:00
Christopher Michael 7618a6caf0 tests/ecore_wl2: Add ecore_wl2_display_dmabuf_get test
ref T8016
2019-07-15 11:01:30 -04:00
Christopher Michael 3a3a2f667a tests/ecore_wl2: Add ecore_wl2_display_shm_get test
ref T8016
2019-07-15 11:01:25 -04:00
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