Commit Graph

3230 Commits

Author SHA1 Message Date
Mike Blumenkrantz 03d56674c3 tests/elm: add util callback for capturing event_info in smart callbacks
useful when we want to verify that e.g., a certain object item is passed

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11751
2020-04-28 13:48:33 +02:00
Mike Blumenkrantz faed679d53 tests/elm: add some more specific convenience macros for size checks
sometimes a test might only want to verify the width or height of an object

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11750
2020-04-28 13:48:31 +02:00
Mike Blumenkrantz c6a9574f10 tests/elm: check all objects for signal interface before calling signal funcs
just being extra paranoid here since there's some classes which implement
some layout/content interfaces without implementing signals

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11749
2020-04-28 13:48:29 +02:00
Mike Blumenkrantz c622bd2e23 tests/elm: add a list sizing test
basic test to ensure that list sizing is homogeneous and works as it
"should", even though list sizing internals are a black hole of lost time
and dreams

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11748
2020-04-28 13:29:34 +02:00
Daniel Kolesa bbc006a3e7 eolian: fix C type serialization of error() 2020-04-20 14:36:14 +02:00
Daniel Kolesa 1afb264288 eolian: globally enable eolian_state_check, except for beta classes
Beta classes won't have their namespaces validated at this point.
It is possible to set EOLIAN_CHECK_NAMESPACES_BETA=1 to enable
checking those as well, if you want to fix them all.
2020-04-19 01:53:50 +02:00
Carsten Haitzler 3283a11a88 evas_textblock/evas_text/evas_textgrid: pick textrun fonts
Summary:
Picking font on textrun, will now give priority into font picked by the user, regardless of script type.
picking font due script can cause many inconvenient results

Example of wrong results:  (User font is **NotoColorEmoji**)
{F3847118} -> add 'a' at the end (notice how text render is wrong) {F3847119} -> add tab before 'a' (text rendering now is right) {F3847120}

After Change results: (User font is **NotoColorEmoji**)
{F3847118}  -> add 'a' at the end -> {F3847122}-> add tab before 'a' -> {F3847123}

Also now the following lines will be shown exactly the same, regardless of characters order
```
"가123A321"
"A321가123"
"123가A321"
"A가123321"
```

Test Plan:
```
#include <Elementary.h>
/*
gcc -o example test.c `pkg-config --cflags --libs elementary`
*/

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

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("", "");
   elm_win_autodel_set(win, EINA_TRUE);

   en = elm_entry_add(win);
   elm_entry_scrollable_set(en, EINA_TRUE);
   evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);

   elm_entry_text_style_user_push(en,"DEFAULT='font=NotoColorEmoji font_size=30 color=red'");
   elm_object_text_set(en, "&#x262a;123456a");

   evas_object_show(en);

   elm_object_content_set(win, en);
   evas_object_resize(win, 400, 200);
   evas_object_show(win);

   elm_run();

   return 0;
}
ELM_MAIN()
```

Reviewers: woohyun, bowonryu, tasn, raster, cedric

Reviewed By: tasn

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8556

Differential Revision: https://phab.enlightenment.org/D11302
2020-04-18 17:36:25 +01:00
Carsten Haitzler d9b9647a15 Revert "evas_textblock: pick textrun fonts"
This reverts commit 9b987c67e1.

this breaks color emoji in terminology (evas textgrid).
2020-04-17 19:20:26 +01:00
Mike Blumenkrantz e2365a0ed3 tests/elm: add image tests to verify internal object size is clamped to object size
ensure that this doesn't break again

ref 11587

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11599
2020-04-17 11:53:47 +02:00
Ali Alzyod 7ac765c71b evas_textblock: prevent segfault if there are no style
```
#include <Elementary.h>

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

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("", "");
   elm_win_autodel_set(win, EINA_TRUE);

   textblock = evas_object_textblock_add(win);
   evas_object_resize(textblock, 360, 360);
   evas_object_show(textblock);
   evas_object_textblock_text_markup_set(textblock, "<b>b</b>");
   evas_object_resize(win, 360, 360);
   evas_object_show(win);
   elm_run();

   return 0;
}
ELM_MAIN()
```

this application will crash.

Any font format specified in text, if there are now style will cause the crash.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11686
2020-04-17 11:14:57 +02:00
Marcel Hollerbach b746e82b07 eina_content: free eina content in the test:
Fix the unbelievable High prioritized CID 1420314
2020-04-17 10:53:15 +02:00
Ali Alzyod 9b987c67e1 evas_textblock: pick textrun fonts
Summary:
Picking font on textrun, will now give priority into font picked by the user, regardless of script type.
picking font due script can cause many inconvenient results

Example of wrong results:  (User font is **NotoColorEmoji**)
{F3847118} -> add 'a' at the end (notice how text render is wrong) {F3847119} -> add tab before 'a' (text rendering now is right) {F3847120}

After Change results: (User font is **NotoColorEmoji**)
{F3847118}  -> add 'a' at the end -> {F3847122}-> add tab before 'a' -> {F3847123}

Also now the following lines will be shown exactly the same, regardless of characters order
```
"가123A321"
"A321가123"
"123가A321"
"A가123321"
```

Test Plan:
```
#include <Elementary.h>
/*
gcc -o example test.c `pkg-config --cflags --libs elementary`
*/

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

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("", "");
   elm_win_autodel_set(win, EINA_TRUE);

   en = elm_entry_add(win);
   elm_entry_scrollable_set(en, EINA_TRUE);
   evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);

   elm_entry_text_style_user_push(en,"DEFAULT='font=NotoColorEmoji font_size=30 color=red'");
   elm_object_text_set(en, "&#x262a;123456a");

   evas_object_show(en);

   elm_object_content_set(win, en);
   evas_object_resize(win, 400, 200);
   evas_object_show(win);

   elm_run();

   return 0;
}
ELM_MAIN()
```

Reviewers: woohyun, bowonryu, tasn, raster, cedric

Reviewed By: tasn

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8556

Differential Revision: https://phab.enlightenment.org/D11302
2020-04-17 12:28:42 +09:00
Ali Alzyod 208c1938bc evas_test: change START_TEST to EFL_START_TEST
Summary: evas_test: change START_TEST to EFL_START_TEST

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11716
2020-04-16 12:03:23 -04:00
Mike Blumenkrantz 8e1e1e5cf8 tests/elm: explicitly destroy hoversel while active
verify that there's no errors when this happens

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11704
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz 2797827e6b tests/elm: add hoversel test to verify edge of canvas positioning
ensure that T8642 doesn't reoccur

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11647
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz 034d42855b tests/elm: add hoversel behavior tests
this verifies all smart callbacks for a hoversel to ensure they're triggered
as expected

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11644
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz 276c9ed26d tests/elm: add callback tests for elm_list
basic tests to verify behavior for triggering callbacks when selecting items

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11703
2020-04-16 14:34:07 +02:00
Ali Alzyod da36015148 evas_textblock : fix text insertion & selection with ps in single line
Summary:
when we have text that contains <ps> (example "p1<ps>p2") in a single line mode
and the cursor position is after the ps tag
then we try to insert any character using the keyboard it will show segmentation fault.
also with the same text if we try to select the text we will notice that it is corrupted.

this should resolve https://phab.enlightenment.org/T8594

Test Plan:
  #define EFL_EO_API_SUPPORT 1
  #define EFL_BETA_API_SUPPORT 1

  #include <Eina.h>
  #include <Elementary.h>
  #include <Efl_Ui.h>

  static void
  _gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
  {
     efl_exit(0);
  }

  static void
  _gui_setup()
  {
     Eo *win, *box;

     win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
                   efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
                   efl_text_set(efl_added, "Hello World"),
                   efl_ui_win_autodel_set(efl_added, EINA_TRUE));

     // when the user clicks "close" on a window there is a request to delete
     efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);

     box = efl_add(EFL_UI_BOX_CLASS, win,
                  efl_content_set(win, efl_added),
                  efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));

     Eo *text = efl_add(EFL_UI_TEXTBOX_CLASS, box,
             efl_gfx_hint_weight_set(efl_added, 1.0, 1.0),
             efl_gfx_hint_align_set(efl_added, 1.0, 1.0),
             efl_pack(box, efl_added));

             efl_text_interactive_selection_allowed_set(text, EINA_TRUE);
             efl_text_multiline_set(text,EINA_FALSE);

             efl_text_markup_set(text, "p1<ps>p2");
  }

  EAPI_MAIN void
  efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
  {
     _gui_setup();
  }
  EFL_MAIN()

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

Reviewed By: ali.alzyod, woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11621
2020-04-16 20:03:31 +09:00
Mike Blumenkrantz e88311ae95 tests/efl: use alloca for composite model test future to avoid leak
CID 1407236

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11711
2020-04-15 19:26:39 +02:00
Xavi Artigas f526ad8c26 Fix namespace clashes for Efl.Text.Cursor
Three renames are applied here:
Efl.Text.Cursor -> Efl.Text_Cursor.Object (class)
Efl.Text.Cursor_Type -> Efl.Text_Cursor.Type (enum)
Efl.Text.Cursor_Move_Type -> Efl.Text_Cursor.Move_Type (enum)

Nothing changes for the enums on the C side. For the class... Well,
the method names are a bit more verbose now.

These renames are required to avoid clashing with the Efl.Text interface.
This did not cause trouble to C# because interfaces are prefixed with "I",
but it did cause trouble to Eolian when the EO files were installed and
somebody tried to use them.
Ref T8648

Differential Revision: https://phab.enlightenment.org/D11663
2020-04-14 12:25:55 +02:00
Ali Alzyod 5245bc03be efl.ui.textbox: add test case for copy/paste results
since paste is now  working when called from user source code, this test case can be added

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11625
2020-04-06 11:05:27 +02:00
Mike Blumenkrantz 5565e90479 tests/hover: add behavior tests for elm_hover
verify geometry and smart callback triggering

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11632
2020-04-03 17:13:52 +02:00
Mike Blumenkrantz 6f933e01c7 tests/layout: add explicit test for freeze and thaw no-op correctness
this shouldn't trigger any canvas changes since nothing is happening
during the freeze

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11631
2020-04-03 17:13:50 +02:00
Mike Blumenkrantz 426967c778 tests/elm: add wrapper for forcing manual render in tests
this can be useful when a test needs to immediately verify whether a render
is occurring

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11630
2020-04-03 17:13:47 +02:00
Mike Blumenkrantz 8aaff3ba07 tests/elm: add helper macros for asserting size and position of objects
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11629
2020-04-03 17:13:44 +02:00
Marcel Hollerbach 11da918983 Replace strncmp code
the structure "!strcmp(X, "foo", strlen("foo"))" is equal to
"eina_has_prefix(X, "foo")", and the later is nicer to read, hence this
replaces it.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11620
2020-04-03 14:51:11 +02:00
Ali Alzyod d7d948c23d elm_entry: using keycode for main keyboard shortcuts
Previously we use key strings to detect keyboard shortcuts (for example copy/paste/select_all, .. etc)
Now we will use key code alongside with these key strings (I do not remove the key string, because I am afraid something depends on them because some methods do not send keycode with keys)

This issue can be easily detected when the keyboard layout is not a Latin language, for example Hitting "C" will produce key string depends on related language not letter C, but Keycodes remain the same regardless of keyboard layout.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11606
2020-04-03 14:39:54 +02:00
Ali Alzyod 43ac889bc1 evas_textblock: prevent updating cursor unless they are ready during markup_set
Summary:
During Markup_set at text block level, we will not update the cursors, unless their status is updated and ready.

This can cause serious issues, especially if a cursor also depends on another cursor for some calculations, (like the segfault happening in TextBox T8637)

Reviewers: woohyun, bu5hm4n, zmike

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8637

Differential Revision: https://phab.enlightenment.org/D11598
2020-03-26 14:49:02 +09:00
Marcel Hollerbach f6cb234070 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.
Depends on D11009

Differential Revision: https://phab.enlightenment.org/D11010
2020-03-25 22:13:29 +01:00
Marcel Hollerbach 43f95ec6b3 suite_helpers: add helper for key down events
usefull for emulating key events.
2020-03-25 22:13:28 +01:00
Marcel Hollerbach 91b3476d51 suite_helper: do not use stacked values here
this is ending up beeing garbage pointers when not properly overwritten.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11597
2020-03-25 22:13:28 +01:00
Marcel Hollerbach a4d7698492 evas_textblock_tests: do not free a text cursor here
the cur_obj would have been always dead at this point, as the textblock
was freed. This now moved the textcursor object to a previous point.
However, we could also remove the explicit cursor deletion...

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11596
2020-03-25 22:13:25 +01:00
Marcel Hollerbach 3bfb31c6fe efl_check: unset the callback here
this is needed in order to not accidently overwrite stack values.
This never showed up while running the test suite, as erroring would
have aborted anyways. However, when we are running with CK_FORK=no, this
may leak into another test.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11595
2020-03-25 22:13:22 +01:00
Hermet Park 476e2b0521 canvas 3d: remove all canvas3d features across efl.
Reviewers: jsuya, kimcinoo, bu5hm4n, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11552
2020-03-25 19:14:02 +09:00
Mike Blumenkrantz f4a877d17d tests/elm: add strict test to verify elm image gif support
Summary: Depends on D11583

Reviewers: kimcinoo, Hermet, raster, cedric, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11484
2020-03-24 13:22:19 -04:00
Mike Blumenkrantz 6268bb36ea tests/elm: use norender_with_updates
Summary: Depends on D11582

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11583
2020-03-24 13:22:16 -04:00
Marcel Hollerbach 61fe913995 efl_ui_test_widget: add test for subtree disabling / tree unfocusabling
this is valdating the previous commit.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11557
2020-03-23 20:02:53 +01:00
Marcel Hollerbach 151862f50c efl_ui_widget: fix disabled set behaviour
Summary:
this fixes disabled set behaviour. This ensures that when setting
disabled twice, that unsetting it once does not break the overall state.

This never appeared in any real life example, because
elm_object_disabled_set is already checking for equalness. However, this
is not wanted here, because the simple setter can also be used to sync
the state with the parent, which appears to be helpfull.

Depends on D11550

Reviewers: zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11551
2020-03-23 12:12:12 -04:00
Marcel Hollerbach 8e0a7cedc1 efl_ui_widget: fix tree_unfocusable setting
Summary:
when setting twice the same value, unsetting the same value would not
restore the same state in the tree again. With this commit, we ensure
this is working correctly.

Reviewers: zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11550
2020-03-23 12:12:06 -04:00
Marcel Hollerbach 9f5ab4dea9 Revert "Revert eo vtale rework..."
This reverts commit efb15f510c.

The error that was causing this was in ector, and is fixed with the
previous commit.
2020-03-23 11:35:06 +01:00
Carsten Haitzler efb15f510c Revert eo vtale rework...
Revert "eo: redo vtable mro creation"
This reverts commit b05110609b.
Revert "eo: add a generic memory allocation tracking method"
This reverts commit 44071e3102.
Revert "eo: rework vtable allocation scheme"
This reverts commit 3bd16a46f1.
Revert "eo: do not allocate extension if deleting"
This reverts commit 64f7edc7fc.

This seems to breal vector rendering in lottie:

From: Hermet Park <hermetpark@gmail.com>
To: Enlightenment developer list <enlightenment-devel@lists.sourceforge.net>
Subject: Re: [E-devel] [EGIT] [core/efl] master 02/05: eo: rework
vtable allocation scheme

This patch occurs memory corruption, vector crashes :(
Here is a sample if you'd like to see it.
https://phab.enlightenment.org/F3858944
2020-03-23 09:07:08 +00:00
Marcel Hollerbach 3bd16a46f1 eo: rework vtable allocation scheme
Summary:
with this commit a new way of allocating vtables arrived.
The old mechnism was to allocate a table big enough to carry *all*
functions at once, in order to not allocate that much memory for
functions that are not implemented on a specific klass, dichchains have
been used, which can be seens as a 2D matrix, where columns are only
allocated if min 1 entry needs to be written, this may have been a good
way to allocate back in the day when all this with eo started, however,
it showed to not pay off.

With this new way, we allocate a array of arrays. the first lvl array is
carrying enough slots, that *all* up to the time defined
interfaces/classes/abstracts/mixins can be implemented. The second lvl
array then has exactly the size of the defined APIs. The second lvl
array is obviously only allocated if needed.

When comparing the two methods, i messured two things, the usage based
on memory allocation for vtable-way-1 and vtable-way-2. Additionally, i
checked the overall memory usage of elementary_test using pmap. The
first messurement is a little bit more exact. The second messurement is
more biased, but captures the whole picture.

Memory allocation tracking:
   vtable-way-1 - vtable-way-2 = 74680 Byte

Pmap memory tracking:
   vtable-way1 - vtable-way-2 = 217088 Byte

The second messurement shows a bigger impact, likely because this is
also showing off all the sideeffects that we are taking place due to
fewer allocations.

Depends on D11524

Reviewers: zmike, tasn, stefan_schmidt, woohyun, cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11535
2020-03-21 00:01:29 +00:00
Ali Alzyod 8e7a01b16f efl.ui.textbox: load default font properties once
As described in task T8617
when toggle editable mode for textbox, we will reserve user changes (instead of reload them again).

this issue is affected by D9502, I do not fully understand why do we need it, so I leave color loading as it is.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11404
2020-03-20 15:58:06 +01:00
Marcel Hollerbach 36de6746ad eina_content: fix use after free in test code 2020-03-09 13:13:00 +01:00
Xavi Artigas 8b25bc41b3 mono-tests: Fix build after DnD changes
The test struct used to check mono bindings struct pack/unpack
is no longer available. Used a different one, and checked the same things.

Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11219
2020-03-08 11:01:21 +01:00
Marcel Hollerbach 165f6f0ae2 rewrite efl cnp and dnd handling
the previous commits introduced a abstraction for drag in drop which can
be now used for this here. With this commit all the direct protocol
handling in efl.ui is removed, and only the ecore evas API is used.

Additionally, this lead to a giant refactor of how APIs do work. All
Efl.Ui. interfaces have been removed except Efl.Ui.Selection and
Efl.Ui.Dnd, these two have been restructored.
A small list of what is new:
- In general no function pointers are used anymore. They feel very
  uncompftable in bindings and in C. For us its a lot easier to just
listen to a event when a drop enters or leaves, there is no need to
register custom functions for that.
- Asynchronous data transphere is handled via futures, which proved to
  be more error safe.
- Formats and actions are handled as mime types / strings.
- 0 is the default seat if you do not know what else to take.
- Content is in general passes as a content container from eina, this
  also allows applications to pass custom types

The legacy dnd and cnp API is implemented based on that.
All cnp related things are in elm_cnp.c the dnd parts are in elm_dnd.c

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11190
2020-03-08 10:59:40 +01:00
Marcel Hollerbach 39f3ce42dc ecore_evas: Introduce cnp / dnd API for ecore evas
The idea of copy and paste here is:
- The user specifies the content he wants to have in the selection
  buffer with a Eina_Content, these content pointer ownerships are
  passed to the called. Internally ecore_evas code will memorieze the
  pointer, and pass on function callbacks to the modules, which then do
  not have to deal with the ownership.

- In case the module does not specify these APIs, the callback
  implementation will be called, which only works for cnp *not* dnd.

- Action and mime types are handled as strings, which allows way better
  custom organisations.

(The docs needs improvement)

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11192
2020-03-08 10:59:25 +01:00
Marcel Hollerbach 40a62ddf94 eina: introduce Eina_Abstract_Content
A little abstraction to have abstract data content bound to a type.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11018
2020-03-08 10:59:22 +01:00
Marcel Hollerbach f7e0a55d52 eo: print debug information when a call cannot be resolved
that is usefull esp. on parts.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11462
2020-03-06 15:11:20 +01:00
Mike Blumenkrantz 565fa76a11 tests/evas: verify loading and mmap values for efl.file are correct with skip_head
ensure that these functions are still usable with async load

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11424
2020-03-06 13:30:52 +01:00
Stefan Schmidt 120c0e4032 tests_: elementary: remove not used allocation in collection view test
Allocated but never used (and never freed). Seems like a copy and paste
bug to me.

CID: 1412363

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11442
2020-03-03 10:55:44 +01:00
Stefan Schmidt 57adf37303 tests_: elementary: free memory in error path
Make sure we free the iterator here as well.

CID: 1409658

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11441
2020-03-03 10:55:40 +01:00
Mike Blumenkrantz 677b507281 tests/gesture: add test for gesture sequence
ensure that tap continues working after complex gestures

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11440
2020-03-03 10:54:42 +01:00
Mike Blumenkrantz 6d9f8416e7 tests/gesture: add a couple rotate gesture tests
these end up triggering a lot of corner cases in other recognizers too,
but the tests themselves are fairly minimal

Differential Revision: https://phab.enlightenment.org/D11391
2020-03-03 10:54:38 +01:00
Mike Blumenkrantz 6aa9299cc9 tests/gesture: verify rotate gesture event counting in existing tests
these magically pass already

Differential Revision: https://phab.enlightenment.org/D11390
2020-03-03 10:54:37 +01:00
Mike Blumenkrantz db5fcd13db tests/elm: add util function for doing a multi-press drag around
same as existing function, but takes a finger id

Differential Revision: https://phab.enlightenment.org/D11389
2020-03-03 10:54:36 +01:00
Mike Blumenkrantz 7f6dfbac80 tests/elm: fix drag_around helper to handle negative angles
oops

Differential Revision: https://phab.enlightenment.org/D11388
2020-03-03 10:54:34 +01:00
Mike Blumenkrantz 322fdba5f0 efl/gesture: fix momentum gesture recognizer to properly continue its gestures
it's not enough to just check the value for this in the recognizer; we need to
always modify the recognizer property here to correctly manage object lifetimes
and generate the correct events (e.g., not emitting momentum gestures while
multiple fingers are moving simultaneously)

also update a couple existing unit test checks which were wrong

Differential Revision: https://phab.enlightenment.org/D11386
2020-03-03 10:54:32 +01:00
Mike Blumenkrantz 641c9427ef efl/gesture: rename long_tap -> long_press
this is consistent with the rest of efl naming

ref T8503

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11376
2020-03-03 10:54:26 +01:00
Mike Blumenkrantz d481cbe83c tests/gesture: add custom gesture to custom recognizer test
this adds a simple custom gesture implementation with basic motion
accumulator properties to verify (and give an example of) the custom
gesture capability that can be used by apps alongside custom recognizers

Differential Revision: https://phab.enlightenment.org/D11352
2020-03-03 10:54:17 +01:00
junsu choi 062bded1a7 test/suite_helpers : Fix warnings about use to uninitialized value.
Summary:
remove warnings.
../src/tests/elementary/suite_helpers.c:779:86: warning: ?idy2? may be used uninitialized in this function [-Wmaybe-uninitialized].
...

Test Plan: N/A

Reviewers: YOhoho, Hermet, Jaehyun_Cho

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11417
2020-02-26 16:34:44 +09:00
Mike Blumenkrantz 526b1e2c72 tests/elm: verify image file_set -> memfile_set -> file_set
Summary:
ref D11392
Depends on D11397

Reviewers: kimcinoo, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11398
2020-02-25 09:23:46 -05:00
Mike Blumenkrantz 1b5ad4740e tests/elm: fix elm_icon test
Summary:
* this was left as a duplicated efl_ui_image test
* elm_image doesn't have a legacy api for setting icons
* elm_icon doesn't actually have any tests for icon loading
Depends on D11396

Reviewers: kimcinoo, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11397
2020-02-25 09:23:44 -05:00
Marcel Hollerbach 74491e8781 eina: introduce eina_iterator_process
this brings a functional-map function to the iterator implementations.
https://en.wikipedia.org/wiki/Map_(higher-order_function)

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D11062
2020-02-19 16:34:05 +01:00
Marcel Hollerbach 090c351d38 elementary: use array instead of list for subchildren
this safes in the runtime of elm_test round about 9kb (*).
Additionally, using a array here is jumping way fewer times arround in
memory, as we do not need to jump from node to node in a list.

Additionally, this commit replaces a few abort disabler macros with a
error checking macro. (which cleans the log).

*: explanation: we have round about 600 widgets in elm_test, every
widget is normally refered once, every list node has 4 pointer, makes
round about 9600 bytes or rougly 9 KB. So the messured savings are more
or less explaining the reality.

Reviewed-by: Carsten Haitzler (Rasterman) <rasterman.com>
Differential Revision: https://phab.enlightenment.org/D11374
2020-02-19 16:28:11 +01:00
Felipe Magno de Almeida df0715a9aa C#: Add error checking for Eina.Success_Flag return type
When a get and/or set from property is defined to return, explicitly,
a Eina.Success_Flag, the mono generator will check the return value
and generate an exception if the call fails.
Resolves T8383.

Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11281
2020-02-18 17:53:19 -03:00
João Paulo Taylor Ienczak Zanette eba07471a0 csharp: Add IntPtr to/from IEnumerable conversion for "accessor" types
Adds a special case for "accessor" complex types in `implicit operator` for
structs and `IntPtr`s, in which an IEnumerator must be converted to/from an
IntPtr.

Reviewed-by: YeongJong Lee <cleanlyj@naver.com>
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11210
2020-02-18 16:52:59 -03:00
Felipe Magno de Almeida 595cb754b3 eolian-mono: Make Get/Set internal for generated properties
Make Get and Set methods internal for properties that get the
property syntax generated.

Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11252
2020-02-18 16:47:38 -03:00
Mike Blumenkrantz 7768b54043 tests/evas: add simple test for skip_head property
Summary:
when using this property, there should be no mmap loaded after a call
to evas_object_image_file_set, and we want to make sure the image is
eventually loaded

ref T8378

Depends on D11340

Reviewers: raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8378

Differential Revision: https://phab.enlightenment.org/D11341
2020-02-14 08:33:49 -05:00
Mike Blumenkrantz f145b53892 efl/gesture: api renames for Efl.Canvas.Gesture_Touch
ref T8554

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11300
2020-02-14 09:21:03 +01:00
Mike Blumenkrantz c0453132df tests/gesture: add another tap test to check finger size works
add some move events in to shake up the recognizers and check whether
taps are still working

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11292
2020-02-14 09:20:56 +01:00
Mike Blumenkrantz 28b7ea6f0c efl/gesture: rework gesture_recognizer::add to be a 'type' property
this simplifies (and optimizes) a bunch of code by letting gesture recognizers
return directly the type of gesture they recognize for use internally

ref T8503

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11267
2020-02-14 09:20:42 +01:00
Mike Blumenkrantz 151ec0748a efl/config: merge all gesture manager config code into efl.config
this is all just duplicated code, so we can deduplicate it with minimal
effort to clean up the api

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11251
2020-02-14 09:20:30 +01:00
Marcel Hollerbach f57b24b86b efl-check: do not print expected errors
that is just a waste of log space.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11297
2020-02-14 09:01:10 +01:00
Marcel Hollerbach e84c1b6bf8 eina-suite: do not print that many errors
we should expect errors in these conditions, this also safes a lot of
space in logs.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11296
2020-02-14 09:01:06 +01:00
João Paulo Taylor Ienczak Zanette 651517808c csharp: Generating documentation for tuple-value properties.
Adds documentation for tuple-value properties (properties with
multiple values), so the following Eo:

```
@property multi_valued_prop {
   [[ A multi valued property. ]]
   get {}
   set {}
   values {
     prop1: int; [[ Dummy property's first element. ]]
     prop2: int; [[ Dummy property's second element. ]]
   }
}
```

Generates the following documentation:

```
/// <summary>A multi valued property.<br/>
/// Since EFL *current version*.</summary>
/// <value>A tuple containing the following information:
/// <list type="bullet">
/// <item><description><c>prop1</c> (<c>Item0</c>): Dummy property&apos;s first element.</description></item>
/// <item><description><c>prop2</c> (<c>Item1</c>): Dummy property&apos;s second element.</description></item>
/// </list></value>
```

Note: This commit also adds a default separator between tag name and
parameters in `generate_opening_tag`.

Ref T8468.

Differential Revision: https://phab.enlightenment.org/D10889
2020-02-13 15:38:42 -03:00
Lucas Cavalcante de Sousa 4f3b3a33f5 efl_mono: Create insert list/array c# wrapper for eina_value.
Implements Insert() method to eina.Value containers (array/list). The
Insert() (src/bindings/mono/eina_mono/eina_value.cs) method wraps native functions implemented with c
(src/lib/eina/eina_inline_value.x).
Resolves T7402

Differential Revision: https://phab.enlightenment.org/D11298
2020-02-13 15:26:50 -03:00
Mike Blumenkrantz cc777c05f8 tests/layout: modify api ordering test to verify theme signal emission
ensure that signals queued during construction are always emitted

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11162
2020-02-12 16:04:48 +01:00
Ali Alzyod 4f99a37aee efl.canvas.textblock: allow all white spaces in style string not just space
Summary:
style string can contain any kind of white spaces and it will be fine

For example
```
"font=sans font_size=30 color=red "
```
Is the same as
```
"font=sans\tfont_size=30\n  color=red "
```

Reviewers: woohyun, segfaultxavi, tasn, zmike

Reviewed By: segfaultxavi

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8532

Differential Revision: https://phab.enlightenment.org/D11303
2020-02-11 12:10:00 +01:00
Lucas Cavalcante de Sousa fdbc2a5b32 efl: `eina_value_list_vinsert` assumes that the position is always valid
Summary:
The eina_value_list_vinsert at src/lib/eina_inline_value.x was not checking if the desired position was valid:
When inserting in an empty list in any out of bounds position it actually createded a list with the head being the desired value.
When inserting in a non-empty list in an out of bounds position caused a c error.
Now both cases return EINA_FALSE

Ref T8611

Test Plan:
Meson configured with -Dbindings=mono,cxx -Dmono-beta=true, and tests runned
with ninja test all.

Reviewers: felipealmeida, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8611

Differential Revision: https://phab.enlightenment.org/D11301
2020-02-07 13:52:15 -05:00
abdulleh Ghujeh f5e13284d7 Evas Textblock: update obstacle test
Summary:
Update the test to check that the first character is rendered after the obstacle.
To ensure that the obstacle feature keeps working correctly.

Reviewers: ali.alzyod, woohyun

Reviewed By: ali.alzyod

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11033
2020-02-06 15:36:30 +09:00
Marcel Hollerbach e710d42fc0 eolian_cxx: fix a last few since errors
sinace has to be > 1.22 and the tests need to reflect that.
2020-02-05 19:42:44 +01:00
Xavi Artigas debc17e4b4 docs: Remove incorrect doc tag
This was breaking build with cxx bindings enabled.
2020-02-05 18:53:43 +01:00
Ali Alzyod 3560b0f62f evas_object_textbox: deal with <br> <tab> without closing '/'
This causes many issues because textbox functions deals with <br> <tab> differently depending that user write them with or without '/' at the end (for example <br> vs <br/>)
while most functionaliity are the same (like viewing <br> and <br/> are the same).
cursor dealing with these tags can be differently.
now we will assume <br> <tab> are already have there own closing tag, even if it is missing

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11293
2020-02-05 17:41:24 +01:00
Lucas Cavalcante de Sousa 269ed1ca34 bindings-cxx: fix missing @since tags at stable c#/cpp tests
Story:
This revision got landed twice, I do not know what happend, but when i
wanted to land that initially with git phab, something reseted the state
of this revision to the initial version, and also changed the
authorship. This time, this commit contains all changes, and the correct
authorship, sorry for the noise.

Summary:
Add @since tags at stable (not tagged with @beta) `.eo` c#/c++ tests. Doing so,
eolian_enforce_since shouldn't accuse at stable tests.
Depends on D11264
Resolves T8600

Reviewers: zmike, segfaultxavi, woohyun, bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8600

Differential Revision: https://phab.enlightenment.org/D11265
2020-02-05 17:15:33 +01:00
Marcel Hollerbach 33681f8087 eolian: fix all remaining since errors
eolian checked for since tags that are invalid by its own rules. This is
now fixed.
2020-02-05 16:30:57 +01:00
Marcel Hollerbach e52d871859 bindings: fix missing @since tags & docs
summary_: Depends on D11264

Reviewers: zmike, segfaultxavi, woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11265
2020-02-05 16:30:56 +01:00
Mike Blumenkrantz d8ed195916 tests/gesture: add second custom recognizer test
ensure that this functionality works

Differential Revision: https://phab.enlightenment.org/D11239
2020-02-05 10:10:53 +01:00
Mike Blumenkrantz cd5a15bf5c tests/elm: add explicit printf for event cb assert failure
efl explodes when this assert fails and presents bizarre errors which
obscure the actual test failure, so add a more explicit message as a
reminder to check this instead of trying to dive into insanity

Differential Revision: https://phab.enlightenment.org/D11238
2020-02-05 10:10:51 +01:00
Mike Blumenkrantz 6cc4fee1a4 tests/gesture: add custom recognizer test
adds a very small implementation of a custom recognizer, registers it,
verifies events are processing as they should, then removes it

Differential Revision: https://phab.enlightenment.org/D11224
2020-02-05 10:10:50 +01:00
Mike Blumenkrantz cd9b56b714 tests/gesture: change random momentum cb to be useful momentum cb
verify that we get 1 event here and also that callback removal works

Differential Revision: https://phab.enlightenment.org/D11220
2020-02-05 10:10:40 +01:00
Mike Blumenkrantz 3011e5ed11 tests/gesture: add a 10-touch tap test
this tests the robustness of existing gesture recognizers

Differential Revision: https://phab.enlightenment.org/D11209
2020-02-05 10:10:38 +01:00
Mike Blumenkrantz f2347354f3 tests/gesture: add zoom and pinch tests
basic tests verifying completion of the gestures

Differential Revision: https://phab.enlightenment.org/D11170
2020-02-05 10:10:02 +01:00
Mike Blumenkrantz f5e7625af8 tests/elm: add util function for doing pinch motions
simple function which takes start points and vectors for 2 touches

Differential Revision: https://phab.enlightenment.org/D11166
2020-02-05 10:09:52 +01:00
Mike Blumenkrantz 0694a54dbd tests/gesture: add extra event callback to verify event multiplication is fixed
Differential Revision: https://phab.enlightenment.org/D11145
2020-02-05 10:09:06 +01:00
Mike Blumenkrantz aaaae57bf4 tests/gesture: add gesture tests for basic multi-touch tap events
Differential Revision: https://phab.enlightenment.org/D11090
2020-02-05 10:09:00 +01:00
Mike Blumenkrantz ec4ff09d97 tests/elm: add util functions for doing multi-touch events
Differential Revision: https://phab.enlightenment.org/D11089
2020-02-05 10:08:58 +01:00
Ali Alzyod ba99891710 efl.canvas.textblock: update style strings
Summary:
Update

backing -> background_type
backing_color -> background_color
underline_dash_color -> underline_dashed_color
underline - > underline_type
strikethrough - > strikethrough_type
style -> (effect_type + shadow_direction)
underline_dash_width -> underline_dashed_width
underline_dashed_gap -> underline_dashed_gap

**+prevent unified APIs from supporting legacy style tags, and prevent legacy APIs from the ability to use new unified tags**

Reviewers: zmike, woohyun, segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi, bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8523

Differential Revision: https://phab.enlightenment.org/D11188
2020-02-04 17:54:34 +01:00
Shinwoo Kim 50f3648391 evas proxy: make it work for File_Save.save
Summary:
File_Save.save does not work for proxy object from following commit.

   c53f152 evas: Make save() work on snapshots

Test Plan:
1. Add an image object and set source object.
evas_object_image_source_set(obj, source);

2. Save the object as a file when you need.
evas_object_image_save(obj, "./file_name.png", NULL, NULL);

Reviewers: cedric, Hermet, jsuya

Reviewed By: Hermet

Subscribers: zmike, subodh6129, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10629
2020-02-04 12:06:38 +09:00
Cedric BAIL 70849969b8 efl: add test for efl_model_children_index_get.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11186
2020-01-31 10:11:40 -08:00
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