Commit Graph

65755 Commits

Author SHA1 Message Date
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
Marcel Hollerbach 7cc2b11f19 ecore_evas: fix fallback code
this was using a stringshare reference that was deleted. While that is
true, the stringshare reference will always be alive, because 2 people
took a reference. Anyways, this code is now searching the other way
arround, which makes the code also easier.

fixes: CID1420331

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11712
2020-04-16 14:53:33 +02: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 27f5510533 elm/hoversel: force calc on internal hover object during activate
hoversel can't accurately determine its location until the hover object
has been calculated, so this needs to always happen before the hoversel
is made visible in order to correctly position the hover

fix T8642

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11646
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 272c3d9a66 elm/hoversel: remove unnecessary internal callback deletion
this already happens automatically on every item destruction and passes
the item data through there to ensure the correct callback is removed

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11643
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz df0a201021 elm/hoversel: use a wref to accurately track internal hover object
this pointer is never unset, which can cause errors when attempting to
access it after the hoversel has been deactivated

Differential Revision: https://phab.enlightenment.org/D11642
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
Carsten Haitzler 03164bfacf efreet - disable strict as this makes things less functional... 2020-04-16 13:33:37 +01:00
Carsten Haitzler 2ebc97aa96 efreet - also look in lib in /usr/local/share/pixmaps too 2020-04-16 13:19:36 +01:00
Carsten Haitzler b376c2a902 efreet - look in /usr/local/share/pixmaps too 2020-04-16 13:04:03 +01: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
Carsten Haitzler d62d380690 toolbar - dont create icon objects then del if icon is null
if icon is null just never create an icon obj.. but if it's not null
it's intended so even if blank, don't delete it - so things line up.
2020-04-16 10:22:16 +01:00
Stefan Schmidt 189bb381d6 Revert "evas: text_cursor: check return value and print error"
This reverts commit c6df676a70.

Thsi is failing the evas testsuite. My bad in not checking this locally
before commiting.
2020-04-16 11:12:50 +02:00
Ali Alzyod 4ea455b1e5 evas_common_font: prevent leaking RGBA_Font
prevent leaking RGBA_Font in the for loop,

CID: 1382852

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11709
2020-04-16 10:38:22 +02:00
Ali Alzyod c6df676a70 evas: text_cursor: check return value and print error
Make sure we check the return of evas_textblock_cursor_geometry_bidi_get() and print an error if needed.

CID:1425191

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11707
2020-04-16 10:38:20 +02:00
Bo Anderson 51e4bcc32c ecore_cocoa: fix compile error using 10.15 SDK 2020-04-16 10:10:03 +02: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
Carsten Haitzler 6a0c8e9d26 elm menu - fix segv on deletion/shutdown where parent was not done ok
@fix
2020-04-15 13:15:21 +01:00
Stefan Schmidt cc55b7ef98 release: Update NEWS and bump version for 1.24.0-beta2 release 2020-04-15 13:50:55 +02:00
Xavi Artigas 047ee79cca doxygen docs: Fix invalid doxygen output
This particular line produces mismatched XML and HTML tags:
"force a <b>rendering update on <code>ee</b></code>"
2020-04-15 11:33:15 +02:00
Xavi Artigas cb92494f6d doxygen docs: Define a couple missing ELM_WIN types 2020-04-14 18:48:30 +02:00
Xavi Artigas e594bbc33a doxygen docs: Fix Elm_Toolbar groups 2020-04-14 18:48:30 +02:00
Xavi Artigas 0da8051ee3 doxygen docs: Fix several invalid refs in Elm 2020-04-14 18:48:30 +02:00
Xavi Artigas 34e6fb82c6 doxygen docs: Fix missing docs in Edje 2020-04-14 18:48:30 +02:00
Xavi Artigas a715631e1d doxygen docs: Fix misplaced Evas_Font group tags
Putting things in the wrong group really messes up the organization.
2020-04-14 18:48:30 +02:00
Xavi Artigas f528001f0d doxygen docs: Proper usage of @ingroup and @addtogroup
This patch brings in a lot of docs which were missing before.
Unfortunately, this brings along their warnings so this ends up adding
more warnings than it fixes. Still, a step in the right direction.

@ingroup puts the current block into the specified group, but IT DOES NOT
allow opening groups with @{.
This was used in lots of places, resulting in misplaced or ignored documentation.
@ingroup should be used only in individual docs. For groups we use @defgroup and
@addtogroup.

Also,this patch adds some small missing docs.
2020-04-14 18:48:30 +02:00
Xavi Artigas ca0bb74321 doxygen docs: Fix double group
And missing group title in one of them.
2020-04-14 18:48:30 +02:00
Marcel Hollerbach f092d3f5ab efl_ui_focus_manager: correct check
Summary:
this check was checking for focus_manager to be window_root. This is not
correct, it should check for the root element.

ref D11667
Depends on D11705

Reviewers: zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11706
2020-04-14 12:29:57 -04:00
Marcel Hollerbach bb2327017f ecore_evas_x: fix typo'ed function name
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11705
2020-04-14 11:59:44 -04:00
Marcel Hollerbach 24219081c6 elm_dnd: complete the list of text types
the text types added here were present as "TEXT" in selection manager,
so add them here again.

Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11684
2020-04-14 11:59:41 -04:00
Marcel Hollerbach 9b6909601d build: fix libraries of efreet-mime -trash
Summary:
the dependencies were simply wrong.
Depends on D11684

Reviewers: zmike, stefan_schmidt, raster

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11696
2020-04-14 11:32:45 -04:00
Marcel Hollerbach 91fe39af90 ecore_evas_x: add safety check for data in converter
Summary:
since the existance of seleciton manager, the converter callbacks from
ecore_x are expecting custom struct pointers. However, enlightenment
never updated to use the elm dnd API for client side usages. Which
results in the fact that sometimes, when a client sents Notify, and
e_dnd is active, that this converter is executed with the wrong data.

With this commit the data passed in is ensured to have the correct magic
number. The proper solution for this would either be registering the
correct converters in enlightenment, or update to elm_drag. However,
since the continues cried river over the last 5 days has raised enough
hydro power to add these changes. This leaves us with just one question:
How was it possible to generate so many messages about a problem that
can be solved in a fraction of charaters that have been written?

fixes <a-issue-that-was-never-created>
Depends on D11700

Reviewers: zmike, stefan_schmidt, raster

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11701
2020-04-14 11:29:50 -04:00
Marcel Hollerbach bcc6c27d33 ecore_evas_x: reject the promise instead of return
Summary:
this is needed in order to tell the API user that this is not going to
be completed.
Depends on D11699

Reviewers: zmike, raster, stefan_schmidt

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11700
2020-04-14 11:29:46 -04:00
Marcel Hollerbach 0a2db329c8 ecore_evas: add API for finding out if event is used
Summary:
ecore_x_dnd_send_status can be used to indicate if a item can be dropped
on a client or not. However, we should only indicate that this can be
dropped, if there is a object we signaled that a drop is in.

Long story short: there is no assertion that after indicating that
things can be dropped, that a notify for the data is sent. A drag
implementation should always listen to a mouse up event, and abort the
drag if no further operations are sent.
Depends on D11698

Reviewers: zmike, stefan_schmidt, raster

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11699
2020-04-14 11:29:43 -04:00
Marcel Hollerbach f2ed538d41 elm_dnd: support target setting on none evas_objects
Summary:
before this only worked for elm widgets. This however is the same
behaviour as in efl_ui_selection_manager.c. So this restores the
behaviour prior to selection_manager.

Depends on D11697

Reviewers: zmike, stefan_schmidt, raster

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11698
2020-04-14 11:29:39 -04:00
Marcel Hollerbach 7288e98b9e ecore_evas_x: allow parsing of links form the link list
Summary:
this is needed in order to return the data the same way the legacy impl
did. This however has the annoying sideeffect that ecore_evas_x now
depends on efreet, and we had to change the build order.
Depends on D11696

Reviewers: zmike, stefan_schmidt, raster

Reviewed By: zmike

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11697
2020-04-14 11:29:32 -04:00
Marcel Hollerbach 1fb7facaa5 elm_slider: create timer for hiding later
Summary:
_popup_show deletes the hide timer, hence we need to create the timer
later on, or this will not automatically hide the indicator.

Reviewers: stefan_schmidt, zmike, Jaehyun_Cho

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11679
2020-04-14 11:29:28 -04:00
Marcel Hollerbach 6312054181 efl_ui_focus_layer: correctly dismantle redirect chain
Summary:
when a redirect manager is unset, all focus managers in the chain upper
to the set manager must be unset. The code uses redirect manager == NULL
as an check for the manager to be active or not.

ref D11667
Depends on D11671

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11672
2020-04-14 11:29:25 -04:00
Marcel Hollerbach 2ed854bb92 efl_ui_focus_manager: do not magically set focus to new elements
Summary:
otherwise this focus manager might get activated again.

ref D11667
Depends on D11670

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11671
2020-04-14 11:29:18 -04:00
Marcel Hollerbach 6031466142 efl_ui_focus_manager: do not fallback to the same object
Summary:
when redirect gets unset, we shound search for a fallback. However, we
should never fallback to the value we have unset.

ref D11667
Depends on D11669

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11670
2020-04-14 11:29:12 -04:00
Marcel Hollerbach 728fd911ea efl_ui_focus_manager: refactor _request_subchild_except
Summary:
this is more usefull with a focusable and not a node, since the node can
be already freed in some cases.

ref D11667

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11669
2020-04-14 11:29:05 -04:00
Mike Blumenkrantz 63e5216951 efl/wl: fix namespacing conflict in rotation enum
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11667
2020-04-14 12:26:02 +02:00
Marcel Hollerbach 8cb311357c meson: do not install namespace problem legacy files
these files are not required for the unified API, but they have
namespace problems, so for now, do not install them

Differential Revision: https://phab.enlightenment.org/D11665
2020-04-14 12:25:59 +02:00
Marcel Hollerbach 80bf4ace91 efl_input_text: rename namespace
Efl.Input_Text is a namespace which should not be a interface in the
same moment. So rename this to Efl.Input_Text.Entity

ref T8648

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11664
2020-04-14 12:25:58 +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
Marcel Hollerbach 8a155aecb6 efl_text_formatter: rename from Efl.Text.Formatter to Efl.Text_Formatter
this is needed in order to not collide with the Efl.Text Interface.
Theoretically eolian should have ordered on that, however, the checks
are buggy and only work out of tree.

ref T8648

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11662
2020-04-14 12:25:54 +02:00
junsu choi a18ac99dd6 Efl.Canvas.Vg.Container: Prevent duplicate transpacency calculation.
Summary:
If Vg.Container has transparency, this is calculated by _evas_vg_render
in Efl.Canvas.Vg.Object. Therefore, there is no need to propagate
the transparency of the container to the child. _evas_vg_render pre-draws
all children and calculates transparency in batches for avoid duplicate calculation.

Test Plan: N/A

Reviewers: Hermet, kimcinoo, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11692
2020-04-14 11:38:27 +09:00