Commit Graph

3230 Commits

Author SHA1 Message Date
Cedric BAIL c7508d3d52 eina: add test for eina_future_all_iterator.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11181
2020-01-31 10:11:32 -08:00
Tom Callaway c245b576aa Fix build with gcc 10 (which has -fno-common enabled by default).
EFL failed to build from source in Fedora Rawhide as a result of the update to GCC 10. GCC 10 enables -fno-common by default, and this found three issues in EFL:

  # The eina benchmark code defined int key_size in a header that was included in multiple places.
  # The elementary test code defines the "dt1", "dt2", "dt3" vars in two code files which are compiled together (but these variables do not appear to be used globally)
  # The eio test code defines the "ee" var in two code files which are compiled together (but this variable does not appear to be used globally)

I've fixed these issues and confirmed locally that the code builds again in Fedora.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11259
2020-01-31 14:31:57 +01:00
Mike Blumenkrantz 9809cec221 tests/gesture: add longpress tests
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11084
2020-01-30 17:06:51 +01:00
Mike Blumenkrantz 635d998f67 tests/elm: add util functions for pressing mouse button without releasing
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11083
2020-01-30 17:06:48 +01:00
Mike Blumenkrantz c05d8cfe75 tests/elm: add util function to automatically delay loop by given time
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11082
2020-01-30 17:06:45 +01:00
Mike Blumenkrantz 60b34bc61c tests/gesture: beef up gesture flick/momentum tests significantly
this adds test cases for flicks in different directions, flicks which
leave the canvas, and gestures which are momentums but not flicks

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11055
2020-01-30 17:06:39 +01:00
Mike Blumenkrantz 6e685e61c7 tests/elm: add util function for dragging the pointer in an arc
useful for throwing in non-linear drags

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D11054
2020-01-30 17:06:35 +01:00
Mike Blumenkrantz 18e9bc9a9f tests/efl_ui: begin some gesture unit tests
adds basic testing for taps and flick

Differential Revision: https://phab.enlightenment.org/D11029
2020-01-30 17:06:30 +01:00
Mike Blumenkrantz 8cde7424c2 tests/elm: add basic timestamping for event helpers
this enables various internal components which use timestamps to have timestamps
that can be used

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11028
2020-01-30 17:06:28 +01:00
Cedric BAIL fa0fb44d09 elementary: make focus manager update_children and update_order an internal function to not expose list<>.
Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11045
2020-01-30 17:06:21 +01:00
Felipe Magno de Almeida fdcc0053c6 C#: Fix using beta for lists and hashes in tests
Reviewers: segfaultxavi, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11235
2020-01-29 16:27:16 +01:00
Christopher Michael ba3fbb5667 tests/ecore_wl2: Fix check for Enlightenment compositor
ref T8016
2020-01-29 09:01:06 -05:00
Woochanlee 0bf3fd3866 tests/ecore_wl2: Add dummy tests for ecore_wl2_* functions.
Summary:
Add dummy tests for below functions.

Updates will be... when there is a better verification method.

ref T8016

Reviewers: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8016

Differential Revision: https://phab.enlightenment.org/D11214
2020-01-29 09:00:08 -05:00
Marcel Hollerbach 8f7b965f91 Revert "mono-test: Fix build break"
This reverts commit 594f00c815.

This breaks tests
2020-01-29 10:45:06 +01:00
Xavi Artigas 594f00c815 mono-test: Fix build break
Recent 6b110e578d forbids list<> in
stable contexts.
2020-01-29 10:23:08 +01:00
Cedric BAIL ae8b912328 elementary: do not use list<> in Efl.Ui.Focus_Manager.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11051
2020-01-29 09:51:40 +01:00
junsu choi d1660bdfe5 eina_matrix: Add eina_matrix4 operator(translate, rotate, scale)
Summary:
Add an operator related to the 3D transform in eina_matrix.

enum eina_matrix_axis
  EINA_MATRIX_AXIS_X
  EINA_MATRIX_AXIS_Y
  EINA_MATRIX_AXIS_Z
eina_matrix4_translate
eina_matrix4_scale
eina_matrix4_rotate
eina_matrix4_transpose

Test Plan: src/tests/eina/eina_test_matrix.c

Reviewers: Hermet, bu5hm4n, kimcinoo, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11159
2020-01-29 15:31:07 +09:00
Yeongjong Lee 5ddd384aee eolian_mono: change property name from args to Args
Summary: PascalCasing is always used for property names.

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

Reviewers: woohyun, felipealmeida, segfaultxavi

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11149
2020-01-29 13:45:56 +09:00
junsu choi 7e7496f25a Efl.Player: Move autoplay/playback_loop from Efl.Ui.Vg_Animation
Summary:
Move autoplay and playback_loop method from Efl.Ui.Vg_Animation/
and The playback_loop changed from looping
because it conflict with the efl_ui_scrollable's symbol.
Efl.Ui.Image and Efl.Ui.Image_Zoomable is needed implements about this method.
So it temporarily set the @empty marker.

ref T8476

Test Plan:
elementary_test -to "Vector Graphics Animation"
check to 'loop'

Reviewers: Hermet, bu5hm4n, zmike, Jaehyun_Cho, jsuya

Reviewed By: zmike

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

Tags: #efl

Maniphest Tasks: T8476

Differential Revision: https://phab.enlightenment.org/D11212
2020-01-28 16:56:04 +01:00
Yeongjong Lee 581bec9598 eolian_mono: make struct immutable
Summary:
Immutable value type is recommeneded for struct type in cs world.
`DO NOT define mutable value types.`
(see, https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/struct)

Also, this patch include refactoring of generated struct types.
1. Change field type to property type that have only getter. it will fix CA1051(ref T8397).
2. Remove internal NativeStruct. there is private field for marshalling struct instead.
3. Fix some test cases that change value inside struct. because struct is immutable.

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

Reviewers: woohyun, felipealmeida, Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8397

Differential Revision: https://phab.enlightenment.org/D11146
2020-01-28 14:46:10 +09:00
Cedric BAIL 1d28ff6a76 eolian: move list<> tests to be @beta and preserve enough meaningful that are not @beta.
Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11046
2020-01-24 21:47:08 -03:00
Cedric BAIL 0f49f5e472 eolian_cxx: move tests of list<> to be protected by @beta.
Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11047
2020-01-24 21:45:51 -03:00
Marcel Hollerbach a8e45ab62f ecore_wl2: fix compilation 2020-01-23 11:16:31 +01:00
Ali Alzyod 4cdd5505e9 efl_text_interactive: selection enhancment
1- Implement setting selection range programmatically by modifying selection cursors from **efl_text_interactive_selection_cursors_get**
2- Add setter with **efl_text_interactive_selection_cursors_set** to set the range at once (modify start and end)

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: WooHyun Jung <wh0705.jung@samsung.com>
Differential Revision: https://phab.enlightenment.org/D10968
2020-01-23 09:05:12 +01:00
Jaehyun Cho 09e3972d14 efl_ui_spotlight: rename Stack_Manager to Fade_Manager
Summary:
Since Stack_Manager displays fade in/out transition effects, the class
name is renamed from Stack_Manager to Fade_Manager.

Depends on D11142

Reviewers: segfaultxavi, bu5hm4n, zmike

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11143
2020-01-23 12:55:16 +09:00
Jaehyun Cho 3e21d34349 efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon

However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator

However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".

Reviewers: segfaultxavi, bu5hm4n, zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11142
2020-01-23 12:55:12 +09:00
Yeongjong Lee 97098dcc50 csharp: cleanup concrete class
Summary:
Concrete class is only used to call static member of NativeMethod. they don't
need any inheritance and implementation of c functions.

Depends on D9893

Test Plan: ninja test

Reviewers: lauromoura, felipealmeida

Subscribers: Jaehyun_Cho, woohyun, segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9894
2020-01-23 07:30:14 +09:00
Ali Alzyod 5137f6d143 eina: add new range Data type
Summary:
Introduce new data type (Eina.Range)  which represent range (part of series)

**eina_range_max_get**
**eina_range_intersect**
**eina_range_union**
**eina_range_contains**
**eina_range_equal**

Reviewers: cedric, woohyun, bu5hm4n, segfaultxavi, zmike

Reviewed By: woohyun

Subscribers: vtorri, cedric, #committers, #reviewers

Tags: #efl

Maniphest Tasks: T8570

Differential Revision: https://phab.enlightenment.org/D11133
2020-01-23 06:54:44 +09:00
Christopher Michael 55118cac11 tests/ecore_wl2: Add test for ecore_wl2_input_keyboard_repeat functions
ref T8016
2020-01-22 08:37:33 -05:00
Woochanlee 0bf03036b7 tests/ecore_wl2: Add tests for move, resize, resizing_get functions.
Summary:
Add

ecore_wl2_window_move
ecore_wl2_window_resize
ecore_wl2_window_resizing_get

ref T8016

Reviewers: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8016

Differential Revision: https://phab.enlightenment.org/D11150
2020-01-22 07:43:49 -05:00
Yeongjong Lee cade1b3c3c eolian_mono: avoid generating set-only property
Summary:
According to Property Design Guidelines of MS, set-only properties are not recommeneded.
(see more, https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/property)

Furthermore, there is stylecop warnings(CA1044)

ref T8396

List of removed set-only properies.
```
Efl.Access.Editable.IText.TextContent { set; }
Efl.App.CommandArray { set; }
Efl.App.CommandString { set; }
Efl.Canvas.Filter.IInternal.FilterChanged { set; }
Efl.Canvas.Filter.IInternal.FilterInvalid { set; }
Efl.Canvas.ImageInternal.FilterChanged { set; }
Efl.Canvas.ImageInternal.FilterInvalid { set; }
Efl.Canvas.Textblock.FilterChanged { set; }
Efl.Canvas.Textblock.FilterInvalid { set; }
Efl.Canvas.Vg.Image.Data { set; }
Efl.Canvas.Vg.Node.CompMethod { set; }
Efl.Core.ICommandLine.CommandArray { set; }
Efl.Core.ICommandLine.CommandString { set; }
Efl.Exe.CommandArray { set; }
Efl.Exe.CommandString { set; }
Efl.Ui.AlertPopup.Button { set; }
Efl.Ui.Collection.MatchContent { set; }
Efl.Ui.CollectionView.MatchContent { set; }
Efl.Ui.IScrollable.MatchContent { set; }
Efl.Ui.ImageZoomable.MatchContent { set; }
Efl.Ui.Panel.MatchContent { set; }
Efl.Ui.PositionManager.Grid.DataAccess { set; }
Efl.Ui.PositionManager.Grid.ScrollPosition { set; }
Efl.Ui.PositionManager.Grid.Viewport { set; }
Efl.Ui.PositionManager.IDataAccessV1.DataAccess { set; }
Efl.Ui.PositionManager.IEntity.ScrollPosition { set; }
Efl.Ui.PositionManager.IEntity.Viewport { set; }
Efl.Ui.PositionManager.List.DataAccess { set; }
Efl.Ui.PositionManager.List.ScrollPosition { set; }
Efl.Ui.PositionManager.List.Viewport { set; }
Efl.Ui.Scroll.Manager.MatchContent { set; }
Efl.Ui.Scroll.Manager.Pan { set; }
Efl.Ui.Scroller.MatchContent { set; }
Efl.Ui.Spotlight.Manager.Size { set; }
Efl.Ui.Textbox.TextContent { set; }
Efl.Ui.Widget.ResizeObject { set; }
Efl.Ui.Win.PropFocusSkip { set; }
```

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

Reviewers: woohyun, felipealmeida, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8396

Differential Revision: https://phab.enlightenment.org/D11138
2020-01-22 09:43:13 +09:00
Chris Michael aeb2b506fd tests/ecore_wl2: Fix issue of tests running without a Wayland display
This fixes an issue with CI where these tests would try to run without
a Wayland compositor. This was missed during review, Thanks Marcel for
pointing this out.

ref T8016
2020-01-21 13:05:10 -05:00
Marcel Hollerbach 0049155c1a Revert "efl_text_interactive: selection enhancment"
This reverts commit 09f0d66d90.

This breaks CI, and tests do not pass anymore, hence no other revision
can be verified.

The revision is reopened. lets take a second look at this.
2020-01-21 17:15:11 +01:00
Woochanlee 87be474bb5 tests/ecore_wl2: Code clean up and Add, Modify TCs.
Summary:
Code clean up.
Add flush, sync_is_done APIs.
Modify input_find.

ref T8016

Reviewers: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8016

Differential Revision: https://phab.enlightenment.org/D11111
2020-01-21 08:13:52 -05:00
Ali Alzyod 09f0d66d90 efl_text_interactive: selection enhancment
Summary:
1- Implement setting selection range programmatically by modifying selection cursors from **efl_text_interactive_selection_cursors_get**
2- Add setter with **efl_text_interactive_selection_cursors_set** to set the range at once (modify start and end)

Reviewers: woohyun, segfaultxavi, zmike, bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8521, T8522

Differential Revision: https://phab.enlightenment.org/D10968
2020-01-21 07:39:15 +09:00
Yeongjong Lee 292f4bc0da Revert "csharp: Property Indexer implementation"
Summary:
This reverts commit 0954e501fd.

According to Framework Design Guidelines of MS, most of indexed properties are
not recommended in EFL#.
(see, https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/property)

It is better to leave properties which have a key as methods.

Reviewers: woohyun, felipealmeida

Reviewed By: woohyun

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11114
2020-01-21 07:00:44 +09:00
Ali Alzyod ad63375199 efl.text.cursor: movement types rename
Summary: replace prev with previous, replace char with character

Reviewers: woohyun, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8567

Differential Revision: https://phab.enlightenment.org/D11095
2020-01-20 10:07:40 +09:00
Hosang Kim fbb77e7d1c efl_ui_scrollbar: change scrollbar state when theme is reloaded.
Scrollbar visible state is not synchronized when theme is reloaded.

Differential Revision: https://phab.enlightenment.org/D10649
2020-01-17 17:21:09 +01:00
Marcel Hollerbach bac185e8f3 Introduce Separator
Summary:
this is just like elm_separator, just written for unified widgets.
This inherits from item, which has the advantage that this separator can
also be added into item container.

Reviewers: zmike, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11125
2020-01-17 16:10:40 +01:00
Marcel Hollerbach 4250494f11 efl_ui_suite: fix test code of grid
Summary:
this test code seemed buggy, we used the iterator *after* the content
was changed. Additionally, we freed the iterator with free instead of
eina_iterator_free.

This fixes test test suite.
Depends on D11123

Reviewers: raster, zmike, cedric, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11124
2020-01-17 09:49:13 -05:00
Ali Alzyod cf45cbf6dd efl: correct class description name of simple class
Name of Efl_Class_Description should be eo-style class name.

related to D11115

Reviewed-by: YeongJong Lee <cleanlyj@naver.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11117
2020-01-17 14:03:25 +01:00
junsu choi 2f4ca46544 Efl.Ui.Vg_Animation: Change property name autorepeat to looping
Summary:
autoplay and autorepeat look similar and can be confusing.
so change autorepeat to looping.

ref T8476
Depends on D11022

Test Plan: N/A

Reviewers: Hermet, bu5hm4n, kimcinoo, segfaultxavi, zmike

Reviewed By: Hermet, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8476

Differential Revision: https://phab.enlightenment.org/D11061
2020-01-16 20:11:49 +09:00
a.srour 05bb02cbb0 Efl.Ui.Textbox: Fix Ctrl+Backspace & Ctrl+Delete keys
Summary:
This should fix the behaviour of Ctrl+Backspace & Ctrl+Delete key down on `Efl.Ui.Textbox`.
Also added two tests for it.

Reviewers: woohyun, ali.alzyod, cedric, bu5hm4n

Reviewed By: woohyun

Subscribers: ProhtMeyhet, stefan_schmidt, segfaultxavi, bu5hm4n, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11040
2020-01-16 17:53:36 +09:00
junsu choi 3a4c5cf6a5 tests: Add test cases for Efl.Ui.Vg_Animation
Add test cases for Efl.Ui.Vg_Animation APIs
 - vg_anim_playing_control
 - vg_anim_frame_control

ref T8476

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11022
2020-01-16 09:50:24 +01:00
Christopher Michael e2ba332866 tests/ecore_wl2: Add test for ecore_wl2_input_pointer_xy_get function
ref T8016
2020-01-15 11:05:22 -05:00
Christopher Michael 4c232f12d7 tests/ecore_wl2: Remove test of ecore_wl2_window_hint_aux functions
These functions are now internal to EFL and do not require tests.

ref T8016
2020-01-15 10:20:54 -05:00
Christopher Michael db25045ffb tests/ecore_wl2: Minor formatting fix 2020-01-15 10:20:54 -05:00
Woochanlee 2010c2ce13 tests/ecore_wl2: Add test for ecore_wl2_window_xxx functions
Summary:
Add below APIs.
ecore_wl2_window_commit
ecore_wl2_window_frame_callback_add, del
ecore_wl2_window_free
ecore_wl2_window_hide
ecore_wl2_window_shell_surface_exists
ecore_wl2_window_show
ecore_wl2_window_update_begin

+ Fix ecore_wl2_activated_get()

ref T8016

Reviewers: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8016

Differential Revision: https://phab.enlightenment.org/D11007
2020-01-14 08:33:03 -05:00
Yeongjong Lee ae30d3c57b eina_mono: replace eina_list and eina_array with IList
Summary:
Eina.List<T> => System.Collections.Generic.IList<T>
Eina.Array<T> => System.Collections.Generic.IList<T>

ref T8486

Depends On D10785

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

Reviewers: felipealmeida, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8486, T8488

Differential Revision: https://phab.enlightenment.org/D10902
2020-01-14 17:17:05 +09:00
Marcel Hollerbach f5fd009992 Revert "efl_ui_spin_button: add tests for direct input feature"
This reverts commit f62cee28cb.

This seems to cause trouble on the CI - lets recheck that.
2020-01-13 18:59:35 +01:00
Marcel Hollerbach 6a9a390d13 efl_ui_spin_button: test that max can be reached by clicking inc
this is esp. testing if this is possible with step not beeing a multiple
of max.

Differential Revision: https://phab.enlightenment.org/D11011
2020-01-13 15:57:25 +01:00
Marcel Hollerbach f62cee28cb efl_ui_spin_button: add tests for direct input feature
this simply passes in some key sequences and checks if the validation is
working. Additionally the output value is checked.

Differential Revision: https://phab.enlightenment.org/D11010
2020-01-13 15:57:23 +01:00
Marcel Hollerbach d48941c783 efl_ui_spin_button: add test for sequential inc
before there was a bug with this, as there was a int cast in the
internal dataflow. This ensures that this is working.

Differential Revision: https://phab.enlightenment.org/D11009
2020-01-13 15:57:22 +01:00
Marcel Hollerbach e942d0e80b efl_ui_spin_button: test wraparround
this tests the wraparround feature.

Differential Revision: https://phab.enlightenment.org/D11008
2020-01-13 15:57:21 +01:00
Marcel Hollerbach bbdab35a7a efl_ui_timepicker: make 24h mode work
this is something which was never ever working before. However, while
fixing the 24h mode, it also appeared that the theming was applied in
the wrong spot, which resulted in signals beeing called on a not yet
themed object, so the theming was also fixed. (Which is the theme_apply
change).

To sum up:
 - The theme is now applied by efl_ui_layout_base
 - the range is now correct for 24h mode
 - There is a quite major problem with the theme, see T8546
 - As a quick fix, am / pm button can be disabled.

ref T8546

Differential Revision: https://phab.enlightenment.org/D11004
2020-01-13 15:57:17 +01:00
Ali Alzyod d6649ad80a evas_textblock: emit change event on markup_set
Markup_set will emit change events, if user set empty string.
This Change is related to D10985, where markup_prepend will not emit events if empty string was added

Reviewed-by: Al Poole <netstar@gmail.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11020
2020-01-13 11:33:14 +01:00
Marcel Hollerbach 5296c1dd1a efl_ui_collection_view: fix test
count_realize / unrealize are stacked, we should not leak a callback
that has a stack var as user_data.
2020-01-10 14:50:55 +01:00
Cedric BAIL 33c3cb3667 elementary: enable collection view test to wait for "child.selected" event.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11015
2020-01-09 10:27:46 -08:00
Mike Blumenkrantz 91ed9b59d9 elementary: start some collectionview tests
* basic test checking realize/unrealize signals
* selection model test

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D11012
2020-01-09 10:27:45 -08:00
Cedric BAIL 52d0452f0d elementary: add proper test for "child.selected" propagation.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11014
2020-01-09 10:27:44 -08:00
Christopher Michael 83a2916043 tests/ecore_wl2: Remove test the ecore_wl2_window_output_find
This function is internal to EFL so does not need a test case

ref T8016
2020-01-09 10:54:58 -05:00
Christopher Michael d0845de6b3 tests/ecore_wl2: Simplify test infrastructure
This commit adds the _display_connect function to the tests_helpers
file so that we do not have to duplicate the function across files.

ref T8016
2020-01-09 10:46:54 -05:00
Christopher Michael e5c64b13c1 tests/ecore_wl2: Fix ecore_wl2_display_input_find test
So apparently Enlightenment uses 'seat0' for input name and Weston
uses 'default'. Test for E_START env var and adjust function call so
that the test does not fail in either case.
2020-01-09 10:08:26 -05:00
Ali Alzyod 1a02745a88 efl.text.cursor: change to abstract class
Summary:
1- Change cursor to abstract class
2- Remove copy method from cursor
3- remove cursor_Add method from efl.canvas.textblock and efl.ui.textbox

Reviewers: woohyun, segfaultxavi, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: lauromoura, YOhoho, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8299, T8454

Differential Revision: https://phab.enlightenment.org/D11034
2020-01-09 22:33:07 +09:00
Ali Alzyod 7b0a44dd33 efl.canvas.textblock: rename style strings to have underscore between words
Summary:
rename following styling strings:
tabstops -> tab_stops
linesize -> line_size
linerelsize -> line_rel_size
linegap -> line_gap
linerelgap -> line_rel_gap
linefill -> line_fill

This will affect Style_Apply, all_style_get,  and any method expect styling string

Reviewers: segfaultxavi, woohyun

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8523

Differential Revision: https://phab.enlightenment.org/D11043
2020-01-09 12:16:55 +01:00
Christopher Michael d8c0080dba tests/ecore_wl2: Add test for ecore_wl2_input_seat_capabilities_get
ref T8016
2020-01-08 11:06:15 -05:00
Christopher Michael 60672bdc5a tests/ecore_wl2: Add test for ecore_wl2_display_input_find_by_name
ref T8016
2020-01-08 11:02:11 -05:00
Christopher Michael 9df48a5a3c tests/ecore_wl2: Add test for ecore_wl2_window_popup_input functions
ref T8016
2020-01-08 10:58:29 -05:00
Christopher Michael a9ded0ab5c tests/ecore_wl2: Fix input_keymap test
The test for ecore_wl2_input_keymap_get was causing failues in the
suite because we need to verify that the input device is a keyboard
before we can check for a keymap.

ref T8016
2020-01-08 10:42:11 -05:00
Christopher Michael 0bb0d862ce tests/ecore_wl2: Add test for ecore_wl2_window_opaque_region functions
ref T8016
2020-01-08 10:36:16 -05:00
Christopher Michael 59ec4ea1b3 tests/ecore_wl2: Add test for ecore_wl2_window_input_region functions
ref T8016
2020-01-08 10:33:53 -05:00
Christopher Michael 594ed747a7 Revert "tests/ecore_wl2: Add test for ecore_wl2_window_xxx functions"
This commit reverts some additional tests which were added. The reason
for the revert is that these tests can occasionally cause the
ecore_wl2 test suite to timeout/stall.

This reverts commit 4ea865623d.
2020-01-08 10:23:30 -05:00
Christopher Michael 5140c43960 tests/ecore_wl2: Fix formatting
NB: No functional changes
2020-01-08 09:21:43 -05:00
Woochanlee 4ea865623d tests/ecore_wl2: Add test for ecore_wl2_window_xxx functions
Summary:
Add below APIs.
ecore_wl2_window_commit
ecore_wl2_window_frame_callback_add, del
ecore_wl2_window_free
ecore_wl2_window_hide
ecore_wl2_window_shell_surface_exists
ecore_wl2_window_show
ecore_wl2_window_update_begin

+ Fix ecore_wl2_activated_get()

ref T8016

Reviewers: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8016

Differential Revision: https://phab.enlightenment.org/D11007
2020-01-08 07:59:11 -05:00
a.srour d3dc7dc86e Fix worning and tests for edje text_class
Summary: This should fix the wornings and tests logic from previouse commit, diff D10692

Reviewers: ali.alzyod, segfaultxavi, woohyun

Reviewed By: segfaultxavi

Subscribers: cedric, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11017
2020-01-07 14:28:46 +01:00
Ali Alzyod 36a50f4d82 efl.text_style: remame underline2 and glow2
Summary: rename underline2 into secondary_underline and glow2 into secondary_glow

Reviewers: woohyun, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7857

Differential Revision: https://phab.enlightenment.org/D11024
2020-01-07 09:32:03 +01:00
Yeongjong Lee 278376df90 csharp: rename ExtensionMethods
Summary:
This patch will rename `ExtensionMethods` to `Extensions` that is commonly used
in csharp project.

Depends on D10972

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

Reviewers: lauromoura, Jaehyun_Cho, felipealmeida

Reviewed By: Jaehyun_Cho, felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10913
2020-01-06 19:08:44 +09:00
Jaehyun Cho 1507ade787 eolian_mono: add namespace to extension methods of ItemFactory
Summary:
Like other classes and methods, the classes and methods for extension
methods of ItemFactory are moved inside the namespace.
Consequently, the namespace in the class name for extension methods is
removed to avoid duplicate namespace name.

Reviewers: lauromoura, felipealmeida, YOhoho, woohyun

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10972
2020-01-06 19:07:28 +09:00
Bruno da Silva Belo 5c99f08511 c#: Checking null for parameters generated code.
Checking null for generated code
ref T8399

Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D10970
2020-01-02 22:06:24 -03:00
a.srour 0aaad623a0 edje: implement text_class override at object level
implement text_class override at object level, where you can change the text_class for single textblock object instead of override all objects that share same text class.
This imported from TIZEN

Note:
This also fix edje_textblock font/font_size parsing by adding condition

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10598
2020-01-02 11:00:04 -08:00
Marcel Hollerbach 1656573b87 efl_spec_suite: remove callbacks at the end of a test
Summary:
we might access changed, which is stacked. This fixes a potential crash.
Depends on D11001

Reviewers: cedric, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11002
2020-01-02 09:49:50 -05:00
Ali Alzyod 41c7e1c908 efl.text.cursor: emit events CANVAS_TEXTBLOCK_CHANGED when insert text using efl_text_cursor_markup_insert
efl.text.cursor: emit events CANVAS_TEXTBLOCK_CHANGED when insert text using efl_text_cursor_markup_insert

Differential Revision: https://phab.enlightenment.org/D10985
2020-01-02 12:16:11 +01:00
Ali Alzyod a95a509cfd efl.text.interactive: remove event freeze when keyboard button is pressed
this event freeze will prevent submission of EFL_UI_TEXTBOX_EVENT_CHANGED on efl.ui.textbox object, when inserting text using the keyboard.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10979
2020-01-02 12:03:08 +01:00
junsu choi 43288c7ace Efl.Ui.Animation_View : Change class name to Efl.Ui.Vg_Animation
Summary:
Since "View" is a reserved word for MVVM, change the class name appropriately.
Efl.Ui.Animation_View => Efl.Ui.Vg_Animation

ref T8476
Depends on D10931

Test Plan: elementary_test -> "Vector Graphcis Animation"

Reviewers: Hermet, bu5hm4n, kimcinoo, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8476

Differential Revision: https://phab.enlightenment.org/D10939
2019-12-31 09:53:16 -05:00
Lauro Moura e632c1334a csharp: Add StyleCop support to dotnet build
This patch adds support to run the StyleCop rules. To enable, -Ddotnet=true
is needed, You can pass -Ddotnet-stylecop=CAXXXX,CAXXYY where X and Y are digits for CAs
or SAs. You can also ask that the CAs and SAs cause errors instead of warnings.

Differential Revision: https://phab.enlightenment.org/D10969
2019-12-30 22:17:32 -03:00
a.srour 0164162a48 Edje: edc text_class applied without font or font_size in style
Summary:
The issue with `text_class` in Edc styles has to be within a string containing `font` & `font_size` properties to effect style, if font or font_size not presented in the same string text_class will be ignored.

So in the following Edc example, `text_class` will be ignored:
```
collections {
   text_classes {
      text_class {
         name: "tc1";
         font: "Sans";
         size: 20;
      }
   }
   styles {
      style {
         name: "style1";
         base: "color=#00FF00 text_class=tc1";
         tag: "br" "\n";
      }
   }
}
```

To apply text_class `tc1`, font and font_size has to be added to `styles.style.base` value, to be as follows:
```
...
base: "font=Serif font_size=15 color=#00FF00 text_class=tc1";
...
```

NOTE: The produced font will be `Sans` and font_size equal to `20`

Test Plan:
`layout.edc`
```
// compile: edje_cc layout.edc
// play: edje_player layout.edj
collections {
    text_classes {
       text_class {
          name: "tc1";
          font: "Sans";
          size: 20;
       }
    }
    styles {
        style {
            name: "style1";
            base: "color=#FFFFFF text_class=tc1";
        }
    }
    group {
        name : "group1";
        parts {
           part {
              name : "tb1";
              type: TEXTBLOCK;
              scale: 1;
              entry_mode: NONE;
              description {
                  state: "default" 0.0;
                  rel1.relative: 0.0 0.0;
                  rel2.relative: 0.5 0.5;
                  text {
                     style: "style1";
                     align: 0.0 0.0;
                     text: "Hello EFL";
                  }
              }
           }
        }
    }
}

Reviewers: segfaultxavi, smohanty, ali.alzyod, cedric, zmike

Reviewed By: zmike

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

Tags: #efl

Maniphest Tasks: T8477, T8478

Differential Revision: https://phab.enlightenment.org/D10692
2019-12-30 11:12:37 -05:00
Ali Alzyod 64d160da0a efl.text.style: underline enum rename + underline method fix
Summary: underline methods was not working + fix enums names

Reviewers: woohyun, segfaultxavi, bu5hm4n, zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7945

Differential Revision: https://phab.enlightenment.org/D10975
2019-12-30 13:27:13 +09:00
Ali Alzyod e583b9159e efl_style: rename enums (background,strikthrough) from enabled to solid_color
Reviewers: woohyun, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7942

Differential Revision: https://phab.enlightenment.org/D10967
2019-12-27 16:10:24 +09:00
Ali Alzyod 7c71dc4e2d efl.ui.textbox: fix crash when toggle scroll mode
Reviewers: eagleeye, bu5hm4n, cedric, woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10924
2019-12-27 10:17:17 +09:00
Ali Alzyod 3bd4f04ec7 efl_text_format: rename tabstops,lingap,linerelgap
Summary: rename tabstops,lingap,linerelgap to have underscore between words

Reviewers: segfaultxavi, woohyun

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7856

Differential Revision: https://phab.enlightenment.org/D10963
2019-12-26 18:01:32 +09:00
a.srour 43bd6ab7ea Efl.Text.Cursor: Add tests for evas_suite
Summary: This patch add tests for almost all `Efl.Text.Cursor` exposed methods.

Test Plan: Using `ninja test`

Reviewers: ali.alzyod, segfaultxavi, woohyun

Subscribers: #committers, cedric, #reviewers

Tags: #efl

Maniphest Tasks: T8454

Differential Revision: https://phab.enlightenment.org/D10950
2019-12-26 17:45:30 +09:00
Ali Alzyod a239fc4a1a efl_text_cursor: movement word start/end
Summary:
This patch will make **efl_text_cursor_move** method, when it is working with **WORD_START** or **WORD_END** If no actual movement happened then return false, and do not fire CHANGE event

for example if cursor at word start, and we call efl_text_cursor_move(cursor, word_start);
1- this call should return false because no actual movement happened. If no actual movement happened then return false
2- this call should not fire CHANGE event for cursor.and do not fire CHANGE event

Reviewers: woohyun, segfaultxavi, cedric, zmike

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8454

Differential Revision: https://phab.enlightenment.org/D10949
2019-12-26 16:05:37 +09:00
Ali Alzyod 84685df233 efl_text_cursor: line jump by fix movement
Summary:
When the cursor is at line beginning of line, and user click "Up" then "Down" on keyboard cursor will position at second character.
If text is:  **occaecat \n mollit**

Reviewers: woohyun, zmike, cedric, segfaultxavi

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8454

Differential Revision: https://phab.enlightenment.org/D10947
2019-12-26 09:55:28 +09:00
Ali Alzyod 79d95a289a efl_text_cursor: assign source textobject to destination on cursor_copy
Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8454

Differential Revision: https://phab.enlightenment.org/D10951
2019-12-24 17:17:31 +09:00
a.srour ce28963654 Efl.Text.Cursor: Fix line_jump_by return logic
Summary:
From documentation `line_jump_by` should return `EINA_TRUE` if cursor moved, and `EINA_FALSE` if not moved.
But the current behaviour is reversed, so this should fix it.

Reviewers: ali.alzyod, segfaultxavi, woohyun

Subscribers: AbdullehGhujeh, #committers, cedric, #reviewers

Tags: #efl

Maniphest Tasks: T8454

Differential Revision: https://phab.enlightenment.org/D10946
2019-12-24 16:34:14 +09:00
Felipe Magno de Almeida b3cc7d403b eolian: inherit since information from struct and enum to field
Summary:
If a struct or enum field doesn't explicitly sets since information, then since
is inherited from struct documentation if it is available.

Reviewers: jptiz, Jaehyun_Cho, woohyun, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8359

Differential Revision: https://phab.enlightenment.org/D10948
2019-12-24 07:26:33 +09:00
Lauro Moura 0954e501fd csharp: Property Indexer implementation
Use Indexers to use brackets, eg [i], syntax.

Keys now can be used as following:

var someVal = obj.SomeProperty[key];
obj.SomeProperty[key] = someNewVal;

And for multiple keys:

var someVal = obj.SomeProperty[(key1, key2)];
obj.SomeProperty[(key1, key2)] = someNewVal;

T8384

Reviewed-by: WooHyun Jung <wh0705.jung@samsung.com>
Differential Revision: https://phab.enlightenment.org/D10791
2019-12-23 13:50:12 -03:00
Bruno da Silva Belo 47407478e8 c#: Implement IList to Eina.Array.
ref T8488

Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D10785
2019-12-22 11:31:35 -03:00
Marcel Hollerbach c49880076c efl_ui_item: use signals from the theme and not object
the problem here is that when we are using the signals from the object,
then the edje object itself will receive press/unpress events before
any content that is swallowed into the edje object.

This means, that no clickable content, added to a item could be clicked
without selecting / unselecting the item. Which was a problem.

With this commit the theme is sending signals which are then passed to
the efl.input.clickable mixin, this way, the part is stacked below the
added content, which means, clickable content will not select / unselect
the item anymore.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10892
2019-12-20 10:33:38 -08:00
Marcel Hollerbach 193ae1c14c efl_ui_layout: add API to check out the theme_version
this new API returns the theme version specified in the loaded theme.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10944
2019-12-20 10:33:37 -08:00
Ali Alzyod 8dbc75fdce efl_text_attribute_factory: rename to efl_text_formatter
Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8455

Differential Revision: https://phab.enlightenment.org/D10925
2019-12-20 12:43:00 +01:00
Ali Alzyod 5cf7fa7670 efl.text.style: rename methods/properties and add text_ prefix
Summary:
efl.text.style: rename methods and properties

this change will avoid conflict in the future with other interfaces or class methods.

```
      Efl.Text_Style.text_color { set; get; }
      Efl.Text_Style.text_backing_type { set; get; }
      Efl.Text_Style.text_background_color { set; get;}  //this was backing_color
      Efl.Text_Style.text_underline_type { set; }
      Efl.Text_Style.text_underline_color { set; get; }
      Efl.Text_Style.text_underline2_color { set; get; }
      Efl.Text_Style.text_underline_dashed_color { set; get; }
      Efl.Text_Style.text_underline_height { set; }
      Efl.Text_Style.text_underline_dashed_width { set; }
      Efl.Text_Style.text_underline_dashed_gap { set; }
      Efl.Text_Style.text_strikethrough_type { set; }
      Efl.Text_Style.text_strikethrough_color { set; get; }
      Efl.Text_Style.text_effect_type { set; }
      Efl.Text_Style.text_shadow_direction { set; }
      Efl.Text_Style.text_outline_color { set; get; }
      Efl.Text_Style.text_shadow_color { set; get; }
      Efl.Text_Style.text_glow_color { set; get; }
      Efl.Text_Style.text_glow2_color { set; get; }
```

T8533

Reviewers: woohyun, segfaultxavi, bu5hm4n, zmike, cedric

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10897
2019-12-20 09:58:27 +01:00
Marcel Hollerbach c514d3363e efl_content: equip the tests with more lifetime checks
this can be used to detect more lifetime issues, which catched errors in
efl.ui.panel and efl.ui.scroller.

ref T8536

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10921
2019-12-19 11:46:26 -08:00
Marcel Hollerbach 837528201f efl_ui_format: make this usable with the standard behaviour of accessors
a accessor is never delivering a value, only the pointer to a value.
This makes format working with accessors for list array carray.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10909
2019-12-18 21:45:45 +01:00
Marcel Hollerbach 9ccc66b900 eina_accessor: make carray accessor work properly
a accessor is not really helpfull if it operates like the carray
accessor before this commit. What it was doing is to fill the content of
the "current line" into the data pointer. In a carray the
"current line" is the content of its carray-member.

However, accessors like for inarray array list or inlist do work
completly differently. They are returning the pointer to the "current
line" not the value of the current line.

The only case where this worked is efl_ui_format.c which was only tested
with this accessor, and this accessor also only worked with this
accessor.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10908
2019-12-18 21:45:42 +01:00
Cedric BAIL 52aa2f629f efl: make sure all index for Efl_Model are unsigned int.
T8469

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D10869
2019-12-18 10:33:09 -08:00
Chris Michael def04c933c tests/ecore_wl2: Fix memory leak
Coverity reports that we leak 'ret_rots' here because
ecore_wl2_window_available_rotations_get allocates space for the
return, so we should free this here.

Fixes CID1408025
2019-12-18 10:28:06 -05:00
Lauro Moura 81b94b3e35 csharp: Fix passing acessor with ownership
Summary:
When passing an owned acessor from a converted collection we need a way
to unpin the passed data when the accessor is freed.

This commits adds a thin wrapper around the CArray accessor that unpins
the data when freed.

Depends on D10900

Reviewers: YOhoho, felipealmeida

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers, jptiz, brunobelo

Tags: #efl

Maniphest Tasks: T8486

Differential Revision: https://phab.enlightenment.org/D10901
2019-12-18 10:40:53 -03:00
Lauro Moura 5befca9a10 csharp: Fix accessor IEnumerable implementation.
Summary:
Fixed after `data_get` marshalling changed (correctly) the data
parameter to `out IntPtr` instead of manually marshalling the double
pointer.

The existing test (`basic_accessor_list`) passed due to the empty
enumerable behavior, which made the `foreach` running no iterations.

Reviewers: brunobelo, jptiz, felipealmeida, YOhoho

Reviewed By: jptiz, YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10900
2019-12-18 10:40:53 -03:00
Yeongjong Lee 8e951504f5 csharp : add move tag info to EinaAccessor, EinaIterator converter
Summary:
Included commits in devs/lauromoura/remove_eina_mono-rebased
```
commit ed6679db19
Author: Lauro Moura <lauromoura@expertisesolutions.com.br>
Date:   Mon Dec 2 13:58:04 2019 -0300

    csharp: add move information to EnumerableToAccessor

    Still need to fix the converted accessor ownership, maybe by creating a
    custom accessor class that released the pinned memory when is freed.
```

ref T8486

Depends On D10878

Co-authored-by: Lauro Moura <lauromoura@expertisesolutions.com.br>

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

Reviewers: YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8486

Differential Revision: https://phab.enlightenment.org/D10879
2019-12-17 11:34:42 -03:00
Yeongjong Lee f90a97470d eina_mono: replace EinaAccessor and EinaIerator with IEnumerable
Summary:
Eina.Accessor<T> => System.Collections.IEnumerable<T>
Eina.Iterator<T> => System.Collections.IEnumerable<T>

Unit test will work with D10879.

ref T8486

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

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8486

Differential Revision: https://phab.enlightenment.org/D10878
2019-12-17 11:34:30 -03:00
Ali Alzyod 68e9bf9c14 efl_canvas_textblock: allow style_apply with wrap=none
Summary:
1- passing style_apply("wrap=none") had no effect previously, and now disable wraping
2- style_all_get() by default return "wrap=word", but now return  "wrap=none"

refer to T8523

Reviewers: segfaultxavi, woohyun, cedric

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10888
2019-12-16 19:11:33 +01:00
Marcel Hollerbach 431800a529 efl_datetime_manager: how did that ever work?
seriously, it sometimes might be worth at least *reading* what code
does, this was initializating a private data struct on one single global
boolean flag. How was that ever intended to work ? How could that ever
slip through review ?

This is not the only madness in these widget arround time and date, you
cannot even select hours in 24h mode, you also cannot cannot select the
0 hour, which is kind of normal for the one or another region? the
datetimemanager (which is IMO a complete misconcept) is full of FIXMEs
and API calls that are defined and never called at all. Again what is
this ? And how did that ever get into the codebase ?!

With this commit the widget *finally* can be created more than once
without exploding and erroring one.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10843
2019-12-13 09:33:01 -08:00
Marcel Hollerbach e0ab85cff9 efl_ui_spec_test: make this test work
I do not know what i was thinking when i initially wrote that test.
It never worked, the test created a widget captured all elements, deleted
the widget, then checked if there are elements left that are not knon on
the canvas yet.
Not the test first captures all elements, then creates the widget, then
deletes the widget, and checks if there are more elements than expected.
This found all the fix leaks prior to this leak.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10842
2019-12-13 09:32:59 -08:00
Ali Alzyod 3372a701d3 efl_canvas_text: event emitting
Summary:
1- Emitting changed event when adding text using cursors.
2- remove attribute,changed event since it is not used now
3- Emitting layout,finished event when finish layouting

Reviewers: woohyun, cedric, bu5hm4n

Reviewed By: cedric

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10834
2019-12-13 15:10:32 +09:00
Lauro Moura deb4cc8965 csharp: This test requires Beta stuff 2019-12-12 19:38:42 -03:00
João Paulo Taylor Ienczak Zanette ca3a913375 csharp: Implement Deconstruct for structs.
Summary:
Usage example:

```
var (x, y) = somePos2D;
```

Not available on Mono environment due to [`mcs` not implementing
it](a3de0304a1/mcs/mcs/tuples.cs (L590)).
To keep tests from breaking because of it, a `MONO` preprocessor variable is
defined and checked during test compilation.

Ref T8489.

Reviewers: brunobelo, lauromoura, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8489

Differential Revision: https://phab.enlightenment.org/D10809
2019-12-12 18:45:20 -03:00
João Paulo Taylor Ienczak Zanette e617ff441a csharp: Add implicit conversion from tuples to structs.
Summary:
Also generates implicit conversion for 1-field structs.
Usage examples:

```
// With tuples
Point2D p = (1, 2);
obj.SetPoint((1, 2));

// With 1-field structs
StringWrapper sw = "Must be handled by wrapper.";
```

Due to limitations of MSC compiler, implicit conversions are generated
only if struct has 4 fields or less.

Ref T8489.

Reviewers: brunobelo, cedric, lauromoura, segfaultxavi

Reviewed By: lauromoura

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8489

Differential Revision: https://phab.enlightenment.org/D10801
2019-12-12 13:16:22 -03:00
Ali Alzyod 2d76224918 evas_object_textblock: add support for variation sequences
Summary: update font processing to handle variation sequences unicodes to select proper glypg in respect to variation seqences

Test Plan:
```
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Efl.h>
#include <Elementary.h>

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *textblock;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("Main", "");
   elm_win_autodel_set(win, EINA_TRUE);
   textblock = evas_object_textblock_add(win);
   efl_canvas_text_style_set(textblock,NULL,"DEFAULT='font=DejaVuSans font_fallbacks=SamsungColorEmoji color=#000 font_size=20'");
   evas_object_textblock_text_markup_set(textblock, "8&#xfe0f;&#x20E3;&#x262a;&#xfe0f;AAA&#x262a;&#xfe0E;1234567&#xfe0f;&#x20E3;");

   evas_object_size_hint_weight_set(textblock, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(textblock, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(textblock);
   evas_object_move(textblock, 0, 0);
   evas_object_resize(textblock, 320, 320);
   evas_object_resize(win, 320, 320);
   evas_object_show(win);
   elm_run();
   return 0;

}

ELM_MAIN()

```

Reviewers: woohyun, bowonryu, segfaultxavi, cedric, bu5hm4n

Reviewed By: woohyun, cedric

Subscribers: raster, bu5hm4n, subodh6129, herdsman, segfaultxavi, zmike, cedric, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9053
2019-12-12 16:22:12 +09:00
Ali Alzyod 8f87a2411a evas_textblock: content fit feature
Summary:
**Content Fit Feature for Evas_Object_Textblock**

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

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

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

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

These are two examples, One using Evas other uses Edje

**Evas**

```
#include <Elementary.h>

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

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

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

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

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

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

char * get_fit_status(Eo * textblock);

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

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

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

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

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

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

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

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

   return status;
}

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

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ELM_MAIN()
```

**Edje**

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

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

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

Found Task T5724 relative to this Feature

Reviewers: woohyun, bowonryu, cedric, raster

Reviewed By: woohyun

Subscribers: a.srour, #committers, #reviewers, cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9280
2019-12-12 14:22:46 +09:00
Bruno da Silva Belo 8fabc422b6 c#: Implement IList<T> to Eina.List.
Summary:
Container can have three configuration over `Own` and `OwnContent`:
`Own = true` and `OwnContent = true`;
`Own = true` and `OwnContent = false`;
`Own = false`and `OwnContent = false;
If someone try to instanciate the container with `Own = false` and `OwnContent = true`, a exception raises.

There is two Ownerships' behaviours in c#, where `IsReadOnly` is responsible and `IsReadOnly = !OwnContent`:
Full Ownership: User can use modify/Add/Remove operations over the container, this is implemented with `OwnContent = true`.
No Ownership: User **cannot** use modify/Add/Remove operations, this is implemented with `OwnContent = false`.

For the memory, `Own` frees the node, while `OwnContent` frees the data portion.
ref T8487

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi, jptiz

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8487

Differential Revision: https://phab.enlightenment.org/D10742
2019-12-11 18:58:20 -03:00
Ali Alzyod 29438a5454 efl_ui_text: unit test
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10776
2019-12-11 11:45:52 +01:00
Cedric BAIL 2b324779c9 elementary: reduce events triggered by Efl.Ui.PositionManager.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10687
2019-12-11 11:12:01 +01:00
Marcel Hollerbach 5cb8e4a3e7 eo: add a tcase for testing forwarders
this just adds the newly introduced semantics from cedric.
2019-12-11 10:36:17 +01:00
Ali Alzyod 621d2cdecf Efl.Canvas.Text rename into Efl.Canvas.Textblock
Summary:
Efl.Canvas.Text                renamed into **Efl.Canvas.Textblock**
Efl.Canvas.Text_Factory  renamed into **Efl.Canvas.Textblock_Factory**

Reviewers: woohyun, segfaultxavi, zmike, bu5hm4n, YOhoho

Reviewed By: segfaultxavi

Subscribers: cedric, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10808
2019-12-10 17:39:59 +09:00
Stefan Schmidt 4ff8fb140c elocation: remove beta library
This has never been fully finished or really used. The GeoClue project
dbus API moved on to a newer version as well. We still have it marked as
beta so we should take the chance and get rid of it to cleanup our tree
a little bit.

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10788
2019-12-09 15:31:00 +01:00
Woochanlee 431f3b1fce tests/ecore_wl2: Add test for ecore_wl2_window_role functions
Summary:
tests/ecore_wl2: Add test for ecore_wl2_window_class functions

ref T8016

Reviewers: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8016

Differential Revision: https://phab.enlightenment.org/D10829
2019-12-09 07:57:31 -05:00
Lauro Moura ed43683955 csharp: Marking property with static.
Summary: ref T8420

Reviewers: lauromoura, felipealmeida, YOhoho, jptiz

Reviewed By: jptiz

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8420

Differential Revision: https://phab.enlightenment.org/D10657
2019-12-09 08:24:00 -03:00
Jaehyun Cho cb817caa80 efl_canvas_object_animation: support duration 0
The duration of animation means how long the animation is executed.
Therefore, if duration is 0, then the final state of animation should be
applied to the target object immediately.

In this case, if final_state_keep is true, then the final state of
animation is preserved. Otherwise, the final state of animation is not
preserved.

ref T8436, T8513

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10812
2019-12-06 18:04:07 +01:00
junsu choi a8417668bc tests/layout: add unit test for legacy layout theme,changed signal
split from D10744

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10751
2019-12-04 16:48:05 +01:00
Mike Blumenkrantz d434bee31b tests/layout: add explicit test for implicit theme,changed emission
this must be emitted automatically during finalize if theme_set is
not directly called during construction

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10741
2019-12-04 16:47:55 +01:00
Mike Blumenkrantz d54ba94214 tests/layout: validate EFL_UI_LAYOUT_EVENT_THEME_CHANGED emission in theme test
ensure that this callback is emitted exactly one time if the theme is
set during construction

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10740
2019-12-04 16:47:48 +01:00
Mike Blumenkrantz 8729c4b0b5 tests/layout: fix theme apply test for layout object
the group previously used (efl/win/background) no longer exists, and
this test never verified that the theme_set call succeeded so this has
been failing silently for a long time

now we check and verify that the call succeeds in addition to using a
valid group

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10739
2019-12-04 16:47:43 +01:00
Marcel Hollerbach a29be18b5f efl_canvas_animation: add a standard value for duration of animations
before this commit the standard time was 0, which results in no
animation played at all. Now its 0.2 and a app that does not like it can
adjust it.

ref T8436

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D10796
2019-12-04 16:30:40 +01:00
Woochanlee 7d40e03ca7 tests/ecore_wl2: Add test for ecore_wl2_window_title functions
Summary:
tests/ecore_wl2: Add test for ecore_wl2_window_title functions

ref T8016
ref D10743

Reviewers: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8016

Differential Revision: https://phab.enlightenment.org/D10761
2019-12-03 11:01:22 -05:00
Woochanlee 0bfdc94df8 tests/ecore_wl2: Add test for ecore_wl2_window_class functions
Summary:
tests/ecore_wl2: Add test for ecore_wl2_window_class functions

ref T8016
ref D10743

Reviewers: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8016

Differential Revision: https://phab.enlightenment.org/D10759
2019-12-03 10:54:10 -05:00
Marcel Hollerbach d973bcc087 efl_ui_spotlight_container: reverse push and pop semantics
before this commit, push would add before the current element, pop would
return to the next higher element.
after this commit, push would add after the current element, pop would
return to the previous element.

ref T7991

Differential Revision: https://phab.enlightenment.org/D10781
2019-12-03 14:38:28 +01:00
Chris Michael 00aaf99765 tests/ecore_wl2: Fix bad window test
Small patch to fix issue where merge of patch did not go so well, and
thus caused Coverity to report an issue where window was not being
initialized.

ref T8016

fixes CID1408311
2019-12-02 12:39:55 -05:00
Marcel Hollerbach 6d2a9ae1f8 introduce efl_ui_{pager/scroller}
They are just helpers, so a user does not need to handcreate spotlight
managers. This also leaves us the possibility of letting
spotlight_managers beeing @beta.

ref T7991

Differential Revision: https://phab.enlightenment.org/D10773
2019-12-02 18:30:26 +01:00
Marcel Hollerbach 509b1c8f6d efl_ui_test_spotlight: check correct transitions without animation
this introduces the test requested in D10701. And checks that all
signals are correctly delivered even if animations are frozen

Differential Revision: https://phab.enlightenment.org/D10767
2019-12-02 18:30:24 +01:00
Marcel Hollerbach 842e6e9c67 efl_ui_spotlight_container: bring in min / max handling
the spotlight now is setting the overall correct min and max size on
itself. Additionally, the page size is now clamped to the size of the
container.

Correct min size of the container is defined to the MAX min size of all
the content.
The correct max size of the container is defined to the MIN max size of
all the content.

ref T7991

Differential Revision: https://phab.enlightenment.org/D10766
2019-12-02 18:30:23 +01:00
Woochanlee 12cb64cfad tests/ecore_wl2: Add test for ecore_wl2_window_aspect functions
Summary:
tests/ecore_wl2: Add test for ecore_wl2_window_aspect functions

ref T8016
ref D10743

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8016

Differential Revision: https://phab.enlightenment.org/D10747
2019-12-02 08:53:47 -05:00
Ali Alzyod 0806b03346 efl_canvas_text: correct password behaviour with efl_text_password_get/set
Summary:
In simple words:

when we create efl_canvas_text object,   efl_text_password_get will return TRUE.
which is wrong,
efl_text_password_get should  return FALSE, unless user change the password using   efl_text_password_set

Reviewers: woohyun, zmike, segfaultxavi, tasn

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10735
2019-12-02 10:56:13 +09:00
Lauro Moura f203c164d8 eo files: Avoid container<ptr(value_type)> usage.
Summary:
Value types are already assumed to be stored by pointer (e.g.
`int val = *(node->data);`)

This commit just changes the current usage of the `ptr` modifier in the
ptr, not affecting the parser.

Reviewers: q66, segfaultxavi, bu5hm4n, felipealmeida

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers, brunobelo

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10769
2019-11-29 17:22:07 -03:00
Woochanlee 167cb43a96 tests/ecore_wl2: Add test for ecore_wl2_window_available_rotations functions
Summary:
tests/ecore_wl2: Add test for ecore_wl2_window_available_rotations functions

ref T8016

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8016

Differential Revision: https://phab.enlightenment.org/D10755
2019-11-29 08:55:19 -05:00
Ali Alzyod 7bdb63d045 Polish text interface methods
Summary:
This patch is set to rename some properties of `Efl.Text_Font` & `Efl.Text_Format` interfaces.

1- efl_text_font_set/get become (efl_text_font_family_set/get, efl_text_font_size_set/get)

2- efl_text_valign/halign   become efl_text_vertical/horizontal_align

3- efl_text_halign_auto_type  become  efl_text_horizontal_align_auto_type

Reviewers: ali.alzyod, woohyun, segfaultxavi, bu5hm4n, zmike, cedric

Reviewed By: woohyun

Subscribers: zmike, #committers, #reviewers, cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10716
2019-11-28 16:55:27 +09:00
abdulleh Ghujeh fa1aa10d79 Efl Canvas Text : Update style parsing code
Summary:
Based on comments in D10607

Update code responsible for parsing "style=" :

-Update string parsing code
-Make the old and new code more readable
-Add tests

Reviewers: segfaultxavi, bu5hm4n, woohyun, ali.alzyod

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10715
2019-11-28 16:46:30 +09:00
abdulleh Ghujeh f6caca1d70 Efl Canvas Text : Modify Style Property
Summary:
This patch defines the way style property will work at canvas_text object

1- Changing canvas_text style property using Font/Format/Style interfaces or with efl_canvas_text style property are the same.
     Example:

```
efl_text_font_set(tb, "Arial", 30);
//is same as
efl_canvas_text_style_set(tb, "font=Arial font_size=30");

//which means calling
char * font;
int size;
int font_size;
efl_text_font_get(tb, &font, &size);
// calling this after any of the top two functions will return same result
```

2- style_get_property
     Will return string that contains full details about all the current applied style at canvas_text  level.

3- style_set_property
     Will only override passed styles and leave everything else as it is

```
efl_canvas_text_style_set(tb, "font=Arial");  // overrider font name to Arial and leave everthing else
efl_canvas_text_style_set(tb, "font_size=30");  // overrider font size to 30 and leave everthing else (font name will stay arial)
```

Reviewers: ali.alzyod, woohyun, tasn, segfaultxavi, bu5hm4n, zmike

Reviewed By: woohyun

Subscribers: zmike, bu5hm4n, segfaultxavi, a.srour, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10607
2019-11-28 13:14:15 +09:00
Marcel Hollerbach 5932520f03 efl_ui_spotligt: make it possible to freeze animations
this new API makes it possible to stop animations beeing executed in the
spotlight manager. (The logic in the spotlight managers itself are
already implemented).
The animation will also be frozen during construction time of the
spotlight.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10701
2019-11-27 15:55:00 +01:00
Woochanlee ffc3c4a7e7 tests/ecore_wl2: Add test for ecore_wl2_window_activated_get function
Summary:
tests/ecore_wl2: Add test for ecore_wl2_window_activated_get function

ref T8016

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8016

Differential Revision: https://phab.enlightenment.org/D10746
2019-11-27 09:15:49 -05:00
Ali Alzyod c7f37fe618 Efl.Text.Attribute_Factory
Summary:
Implementation of new Efl.Text.Attribute_Factory class which replace the annotation interface.

Currently, we have two public methods:

```
void efl_text_attribute_factory_attribute_insert(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end, const char *format)
unsigned int efl_text_attribute_factory_attribute_clear(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end);
```

Other methods will be internal methods, for the time being, we will redesign internal methods

Reviewers: woohyun, tasn, segfaultxavi, bu5hm4n, zmike

Subscribers: zmike, q66, cedric, segfaultxavi, bu5hm4n, a.srour, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10646
2019-11-27 13:04:32 +09:00
Lauro Moura aacd2fa82d csharp: Iterate more in GC-dependent test
Summary:
The inheritance test depends on the objects being actively destroyed.
Currently this happens in a two step process, where first the C#
object is collected from the GC. As this happens in a separate thread,
we schedule a callback to run in the main loop to actually unref the
EO object.

This commit adds more iterations to make sure the EO of the parent is
unref'd and releases the child.

This should be the last C#-related CI test failure

Ref T8313

Reviewers: stefan_schmidt, brunobelo, felipealmeida

Reviewed By: felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8313

Differential Revision: https://phab.enlightenment.org/D10612
2019-11-26 12:40:32 -03:00
Marcel Hollerbach f7868fd28c efl_ui_multi_selectable: clean this up
this commit merges common functions from efl_ui_multi_selectable and
efl_ui_multi_selectable_async. Additionally, the two different aspects
of accessing the elements in a multi_selectable widget (numerical or
object based) are now abstracted into interfaces called range_numeric and
range_object. numeric APIs are also prefixed with id's, so its possible
for one widget to implement both (if there will ever be the demand to do
that in future).

The main reason for this split is:
- there is no good common path between mvvm based multi_selectable and
object based multi_Selectable, so there is no way that both sides would
benefit, without the other one suffering.
- If we find later on the demand to implement both on one widget, we now
can fully do that
- Common API is available for both types, so its less API and less
confusion for the API user.

ref T7871
ref T8265

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10675
2019-11-25 13:31:24 +01:00
Lauro Moura 642b243df9 csharp: Fix helper function
Summary: Was failing if the suffix were equal to the source string

Reviewers: felipealmeida, segfaultxavi, YOhoho, brunobelo

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10708
2019-11-22 12:01:59 -03:00
Ali Alzyod d7352f4db4 Efl.Text.Cursor
Summary:
Implementation of new cursor text object.

This Patch Contains :
1- Remove Efl.Text.Cursor & Efl.Text_Markup_Interactive interfaces and replace them with one Class Efl.Text.Cursor
   => there are some modifications on cursor methods

2- Update all related classes to use Efl.Text.Cursor object instead of the old interfaces

3- If class uses Efl.Text_Cursor_Cursor (handle), mainly annotation it will stay as it is until we update other annotations into attribute_factory

4- Add main cursor property into efl.text.interactive

5- Add cursor_new method in efl.ui.text  (I think we may move it into efl.text.interactive interface)

There still some parts that need discussion: especially cursor movement functionality, I prefer to move function with Enum, instead of special function for each movement.

```
enum @beta Efl.Text.Cursor_Move_Type
{
   [[Text cursor movement types]]
   char_next,       [[Advances to the next character]]
   char_prev,       [[Advances to the previous character]]
   cluster_next,    [[Advances to the next grapheme cluster]]
   cluster_prev,    [[Advances to the previous grapheme cluster]]
   paragraph_start, [[Advances to the first character in this paragraph]]
   paragraph_end,   [[Advances to the last character in this paragraph]]
   word_start,      [[Advance to current word start]]
   word_end,        [[Advance to current word end]]
   line_start,      [[Advance to current line first character]]
   line_end,        [[Advance to current line last character]]
   paragraph_first, [[Advance to current paragraph first character]]
   paragraph_last,  [[Advance to current paragraph last character]]
   paragraph_next,  [[Advances to the start of the next text node]]
   paragraph_prev   [[Advances to the end of the previous text node]]
}
move {
         [[Move the cursor]]
         params {
            @in type: Efl.Text.Cursor_Move_Type; [[The type of movement]]
         }
         return: bool; [[True if actually moved]]
      }
```

or old way:
```
char_next {
         [[Advances to the next character]]
         // FIXME: Make the number of characters we moved by? Useful for all the other functions
         return: bool; [[True if actually moved]]
      }
      char_prev {
         [[Advances to the previous character]]
         return: bool; [[True if actually moved]]
      }

      char_delete {
         [[Deletes a single character from position pointed by given cursor.]]
      }

      cluster_next {
         [[Advances to the next grapheme cluster]]
         return: bool; [[True if actually moved]]
      }
      cluster_prev {
         [[Advances to the previous grapheme cluster]]
         return: bool; [[True if actually moved]]
      }

      // FIXME: paragraph_end is inconsistent with word_end. The one goes to the last character and the other after the last character.
      paragraph_start {
         [[Advances to the first character in this paragraph]]
         return: bool; [[True if actually moved]]
      }
      paragraph_end {
         [[Advances to the last character in this paragraph]]
         return: bool; [[True if actually moved]]
      }
      word_start {
         [[Advance to current word start]]
         return: bool; [[True if actually moved]]
      }
      word_end {
         [[Advance to current word end]]
         return: bool; [[True if actually moved]]
      }
      line_start {
         [[Advance to current line first character]]
         return: bool; [[True if actually moved]]
      }
      line_end {
          [[Advance to current line last character]]
         return: bool; [[True if actually moved]]
      }
      paragraph_first {
         [[Advance to current paragraph first character]]
         return: bool; [[True if actually moved]]
      }
      paragraph_last {
         [[Advance to current paragraph last character]]
         return: bool; [[True if actually moved]]
      }
      paragraph_next {
         [[Advances to the start of the next text node]]
         return: bool; [[True if actually moved]]
      }
      paragraph_prev {
         [[Advances to the end of the previous text node]]
         return: bool; [[True if actually moved]]
      }
```

Reviewers: woohyun, tasn, segfaultxavi

Reviewed By: woohyun

Subscribers: a.srour, bu5hm4n, segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10542
2019-11-22 17:35:54 +09:00
Wonki Kim 4a4525cb4b eina_matrix: replace cosf by cos to gain more accuracy
Summary:
cos function is much much more accurate than cosf.
this patch replaces cosf by cos to gain more accuracy.

Reviewers: cedric, jsuya, vtorri

Subscribers: vtorri, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10695
2019-11-21 17:50:33 +09:00
Bruno da Silva Belo 6772a78d02 csharp: Specifying StringComparison.
Summary: ref T8405

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8405

Differential Revision: https://phab.enlightenment.org/D10650
2019-11-20 17:47:44 -03:00
Marcel Hollerbach fa93893548 introduce efl_canvas_object_animation
this brings the animation to the canvas object. All the controls of the
animation now do now require a player object anymore, you can just use
the API that is directly on the Efl.Canvas.Object object.

wip animation player replacement

Differential Revision: https://phab.enlightenment.org/D10615
2019-11-20 09:58:24 +01:00
Xavi Artigas 9bb2df9966 Unify "animated" flags
There exist several flags to indicate whether an object should be animated, with inconsistent names:
Efl.Canvas.Layout.animation: bool indicating if Edje animations should be played
Efl.Ui.Spotlight_Manager.animation_enabled: bool indicating if page transitions should be animated
Efl.Canvas.Animation_Player.animation: Efl.Canvas.Animation object

This commit unifies all of them: "animated" is now a flag, and "animation" is an object.

Note: Animation_Player is in the process of being replaced by an "animation" property in the
Efl.Canvas.Object, hence the need for non-clashing animation flags.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10645
2019-11-20 09:58:23 +01:00
Lauro Moura b1eb794a91 csharp: Fix CA1815 for generated structs and aliases
Summary: Adds IEquatable<T> and friends.

Reviewers: felipealmeida, YOhoho, brunobelo

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, segfaultxavi, #committers

Tags: #efl

Maniphest Tasks: T8418

Differential Revision: https://phab.enlightenment.org/D10694
2019-11-19 21:49:35 -03:00
Christopher Michael 8195368929 tests/ecore_wl2: Add test for ecore_wl2_window_type functions
ref T8016
2019-11-19 09:44:45 -05:00
Christopher Michael dd74c6ed35 tests/ecore_wl2: Add test for ecore_wl2_window_geometry functions
ref T8016
2019-11-19 08:37:29 -05:00
junsu choi 3493a37db8 Eina_Matrix : Use math header for cosf and sinf of rotate function.
The local cos and sin functions differ from
the math header cos and sin functions by result values
The 4th decimal place is different.
Computing large numbers can cause errors.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10467
2019-11-15 11:52:01 -08:00
Lauro Moura 2272e21b3c csharp: Silence CA2000 in tests
Summary:
These objects are expected to leave scope while alive.

Ref T8423

Depends on D10671

Reviewers: brunobelo, felipealmeida, YOhoho

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8423

Differential Revision: https://phab.enlightenment.org/D10672
2019-11-15 00:08:38 -03:00
Bruno da Silva Belo cd113d7aae csharp: Disposing IDisposable objects.
Summary: ref T8423

Reviewers: lauromoura, felipealmeida, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8423

Differential Revision: https://phab.enlightenment.org/D10644
2019-11-14 15:32:42 -03:00
Cedric BAIL 6befb6e17b efl: improve Efl.BooleanModel test by checking the child del case.
This has detected the bug that previous commit fix.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10634
2019-11-13 21:16:22 +01:00
Cedric BAIL 06873a6fdb efl: remove useless printf from Efl Container Model tests.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10633
2019-11-13 21:16:20 +01:00
Christopher Michael 5b588c3c39 tests/ecore_wl2: Add test for ecore_wl2_window_wm_rotation_supported
functions

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

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

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

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

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

ref T8380

Depends On D10639

Test Plan: ninja test

Reviewers: woohyun, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8380

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

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

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

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

Reviewers: lauromoura, felipealmeida, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8404

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

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

Test Plan: Run without DISPLAY set and with dotnet.

Reviewers: felipealmeida, brunobelo, segfaultxavi, YOhoho

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10619
2019-11-07 22:46:15 -03:00
Lauro Moura cb60b595d3 csharp: Make GetPart public.
Summary:
`efl_part_get` is protected in C due to the presence of `efl_part`,
which does automatic refcount management in single method calls.

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

Fixes T8462

Reviewers: brunobelo, segfaultxavi, SanghyeonLee

Reviewed By: SanghyeonLee

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8462

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

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8417

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

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

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

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

When compiling breaks... it's certainly time to revert ASAP :(
2019-11-07 10:23:58 +00:00
Lauro Moura 03d9fa97cc csharp: Fix test build dependency
Summary: Make dotnet target also depend on the manual test files.

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

Reviewers: bu5hm4n, segfaultxavi, brunobelo, felipealmeida

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

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

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

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

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

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

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

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

Fixes T8168

Reviewers: bu5hm4n, woohyun, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, brunobelo, felipealmeida, segfaultxavi

Tags: #efl, #do_not_merge

Maniphest Tasks: T8168

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

this patch resets the flags to make it work properly.

Reviewers: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

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

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

Reviewers: q66

Reviewed By: q66

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

Tags: #efl

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

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

ref T8016
2019-11-05 09:44:53 -05:00
Ali Alzyod 2f676a6591 evas_textblock: content fit feature
Summary:
**Content Fit Feature for Evas_Object_Textblock**

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

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

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

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

These are two examples, One using Evas other uses Edje

**Evas**

```
#include <Elementary.h>

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

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

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

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

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

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

char * get_fit_status(Eo * textblock);

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

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

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

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

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

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

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

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

   return status;
}

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

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ELM_MAIN()
```

**Edje**

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

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

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

Found Task T5724 relative to this Feature

Reviewers: woohyun, bowonryu, cedric, raster

Subscribers: #committers, #reviewers, cedric

Tags: #efl

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

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8393

Differential Revision: https://phab.enlightenment.org/D10588
2019-11-04 14:53:54 -03:00
Mike Blumenkrantz 72be0842ab tests/eina: use #ifdef guard for block which can only occur inside ifdef
this value is set in the corresponding #ifdef block above, so use the same
guard here to make code more readable

CID 1400948

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10321
2019-10-31 03:19:19 -07:00
Cedric Bail db93501e66 eo: reduce memory use to track event registration and callback call.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10482
2019-10-31 14:52:52 +01:00
Cedric Bail 7f53d91583 eo: prevent unecessary callback call walk.
This patch introduce a small hash (64 or 32bits) that cache all existing
Efl_Event_Description callback handler registered on an object. It slightly
reduce the time needed to do an unecessary call and cost just a few bytes
per object.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10475
2019-10-31 14:52:31 +01:00
Mike Blumenkrantz 5d69afdc09 tests/spec: pre-create a ton of widgets during test init
Summary:
similar to existing mechanics for elm/efl_ui tests, this pre-creates
all the widgets used as test contents for all the test cases so they
can be forked and reused without needing to spend time in every single
test creating the same test contents
Depends on D10573

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

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

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

....

Revert "evas_object_textblock: add support for variation sequences"

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

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

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

ref T6857

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

no functional changes

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

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

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

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10539
2019-10-30 08:49:02 -07:00
Mike Blumenkrantz 9878a0cad4 tests/genlist: add behavior testing for nearly all genlist events
this simulates a number of user interactions to ensure that various
functionalities of genlist actually work, including but not limited to:
* selection
* highlighting
* item focus
* scrolling
* filtering
* dragging
* item reordering

ref T8433

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

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

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

ref T8434

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

ref T8434

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

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

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

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

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10509
2019-10-29 16:08:39 +01:00
Lauro Moura 135c69b23c eolian_cxx: Add key/value to function_def
Summary:
This commit adds explicit eolian key/value/return info to function_def. The
original parameter/return types are kept for compatibility.

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

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

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

Fixes T8431

Test Plan: extra tests in the diff

Reviewers: felipealmeida, brunobelo, segfaultxavi, YOhoho

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers, woohyun

Tags: #efl

Maniphest Tasks: T8431

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

Reviewers: lauromoura, felipealmeida, segfaultxavi, YOhoho, bu5hm4n

Reviewed By: YOhoho

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8394

Differential Revision: https://phab.enlightenment.org/D10458
2019-10-28 20:34:25 -03:00
Marcel Hollerbach df653267b3 spec-suite: verify correct widget-hiding behaviour.
Summary:
These checks are ensuring that when we are hiding a widget, that
everything inside these widgets are also hidden correctly. Due to
clipper or due to visibility flag.

Depends on D10468

Reviewers: zmike

Reviewed By: zmike

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10474
2019-10-28 12:40:27 -04:00
Bruno da Silva Belo 547f8767a9 csharp: Add missing exception ctor from Errors.cs.
Summary: ref T8392

Reviewers: lauromoura, felipealmeida, segfaultxavi, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8392

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

This was driving me nuts... Am I the only one seeing these things?
2019-10-28 15:12:35 +01:00
Bruno da Silva Belo 31be3b6a5d csharp:Changing ex access modifier from Errors.cs.
Summary: ref T8401

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8401

Differential Revision: https://phab.enlightenment.org/D10502
2019-10-25 17:40:40 -03:00
Bruno da Silva Belo fee91831cb csharp: Using Array.Empty Eina.
Summary: ref T8421

Reviewers: lauromoura, felipealmeida, segfaultxavi, YOhoho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8421

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

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8424

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

Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8424

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

ref 95b5731461

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10453
2019-10-25 09:54:19 -04:00
Mike Blumenkrantz 59ad959e85 tests/ecore: ensure that we attempt to re-set PATH in ecore-file tests
Summary:
if this test failed before for any reason, PATH would be permanently changed
for the current shell and process, which is obviously not what we want
Depends on D10414

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10415
2019-10-24 18:23:14 +02:00
Mike Blumenkrantz 30f6c12cbf tests/ecore: replace all bespoke strcats with snprintf
Summary:
CID 1400812
Depends on D10413

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10414
2019-10-24 18:23:11 +02:00
Mike Blumenkrantz e05311a99a tests/ecore: unset app args after app args unit test to prevent invalid reads
Summary:
various internal components in efl access the app args and read them which
will result in invalid memory access since these are stack-allocated strings
Depends on D10412

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10413
2019-10-24 18:23:03 +02:00
Mike Blumenkrantz fdb931fb6e tests/eina: use slstr_steal function in slstr_steal test
Summary: CID 1401043

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10404
2019-10-24 17:55:17 +02:00
Mike Blumenkrantz 896f234b25 tests/spec: free array in multi selectable tests
Summary: CIDs 1405810, 1405807, 1405806, 1405805, 1405803, 1405801, 1403902

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10403
2019-10-24 17:46:52 +02:00
Felipe Magno de Almeida a3ade15d5a cxx: Add license to CXX bindings.
Summary:
Like C#, it will also be Apache 2.0

Depends on D9414

Reviewers: vitor.sousa, woohyun, jpeg, lauromoura

Reviewed By: lauromoura

Subscribers: jpeg, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9418
2019-10-24 10:40:16 -03:00
Lauro Moura 40a980174b csharp: Add licensing information.
Summary:
C# bindings will be lincensed under Apache Sofware License 2.0.

This commit adds the license text to the licenses folder and a copyright
notice to the binding files.

Fixes T8039

Reviewers: woohyun, felipealmeida, vitor.sousa

Reviewed By: felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8039

Differential Revision: https://phab.enlightenment.org/D9414
2019-10-24 10:10:56 -03:00
Ali Alzyod 46f2d8acdc evas_object_textblock: add support for variation sequences
Summary: update font processing to handle variation sequences unicodes to select proper glypg in respect to variation seqences

Test Plan:
```
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Efl.h>
#include <Elementary.h>

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *textblock;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("Main", "");
   elm_win_autodel_set(win, EINA_TRUE);
   textblock = evas_object_textblock_add(win);
   efl_canvas_text_style_set(textblock,NULL,"DEFAULT='font=DejaVuSans font_fallbacks=SamsungColorEmoji color=#000 font_size=20'");
   evas_object_textblock_text_markup_set(textblock, "8&#xfe0f;&#x20E3;&#x262a;&#xfe0f;AAA&#x262a;&#xfe0E;1234567&#xfe0f;&#x20E3;");

   evas_object_size_hint_weight_set(textblock, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(textblock, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(textblock);
   evas_object_move(textblock, 0, 0);
   evas_object_resize(textblock, 320, 320);
   evas_object_resize(win, 320, 320);
   evas_object_show(win);
   elm_run();
   return 0;

}

ELM_MAIN()

```

Reviewers: woohyun, bowonryu, segfaultxavi, cedric, bu5hm4n

Reviewed By: woohyun, cedric

Subscribers: bu5hm4n, subodh6129, herdsman, segfaultxavi, zmike, cedric, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9053
2019-10-19 14:01:36 +09:00
Mike Blumenkrantz 20b592cef7 fix various trivial null derefs
Summary:
CIDs 1401081, 1401044, 1400983, 1400960, 1400927, 1400799, 1396946, 1396944,
     1383851, 1383847, 1382211, 1379921, 1379921

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10452
2019-10-18 13:30:10 -04:00
Mike Blumenkrantz ccf0106448 tests/ecore_con: clarify pointer usage in ecore_con_url tests
Summary:
this was pretty bizarre

CID 1401029

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10450
2019-10-18 13:29:57 -04:00
Mike Blumenkrantz 8cef6a9724 tests: fix minor string leaks
Summary: CIDs 1404754, 1401022, 1400965

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10405
2019-10-18 13:29:13 -04:00
Mike Blumenkrantz 511ee4e6f4 tests/eldbus: add va_end for va_args usage in message test
Summary: CIDs 1400977, 1400974

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10390
2019-10-18 13:28:48 -04:00
Bruno da Silva Belo 4e2b9e2089 csharp: Setting ELM_ENGINE if it is none.
Reviewers: lauromoura, felipealmeida

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8322

Differential Revision: https://phab.enlightenment.org/D10442
2019-10-18 12:14:13 -03:00
Mike Blumenkrantz 7e7465379f tests/eina: fix assign when compare was intended
Summary: CID 1400858

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10396
2019-10-15 11:21:42 -03:00
Lauro Moura 87e5fc4c6a csharp: Remove test dependency on internal funcs
Summary: This will help cleaninup the EFL# API.

Test Plan: run test suite

Reviewers: YOhoho, felipealmeida, segfaultxavi, woohyun, brunobelo

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10365
2019-10-14 17:19:12 -03:00
Mike Blumenkrantz e96d18b046 evas/callbacks: emit hardcoded legacy smart callbacks always
Summary:
these are not strictly related to the event callback types and should not
have their emission tied to the corresponding event

also add unit test to verify all of these

@fix

Reviewers: cedric

Reviewed By: cedric

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10353
2019-10-14 09:29:23 -04:00
Lauro Moura 3358d9d475 csharp: Add since info to members related to events.
Like OnFooEvent, FooEvents, etc.

ref T8359

Differential Revision: https://phab.enlightenment.org/D10382
2019-10-12 19:20:58 -03:00
Lauro Moura 5516b06af5 eolian-cxx: Make events inherit beta info from klass.
To mimic function behavior

Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D10381
2019-10-12 19:18:13 -03:00
Cedric BAIL e5c1eb5747 ecore_con: do not crash in test if nothing is returned by Ecore_Con_Url.
Summary: Depends on D10362

Reviewers: zmike, bu5hm4n, segfaultxavi, stefan_schmidt

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10363
2019-10-11 09:25:04 -04:00