Summary:
if we have an emoji or a cluster combining multiple Unicode inside ui textbox, we can move the cursor inside the emoji/cluster using keyboard arrows/mouse click.
so we should use cluster movement instead of character movement (same as entry).
{F3868931}
this should resolve T8666
Test Plan:
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#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)));
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_text_markup_set(efl_added, "A☪️"),
efl_pack(box, efl_added));
}
EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
_gui_setup();
}
EFL_MAIN()
Reviewers: ali.alzyod, zmike, woohyun, bu5hm4n
Reviewed By: ali.alzyod, woohyun
Subscribers: zmike, cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8666
Differential Revision: https://phab.enlightenment.org/D11745
this will prevent textnodes content with <ps> or <br> without format node
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12145
Summary: Resolve rendering e vowel (0x1031) with Myanmar(Burmese) with zero width non joiner (0x200C)
Test Plan: ninja test
Reviewers: woohyun, bowonryu
Reviewed By: bowonryu
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12102
Summary:
setting color inside the constructor call will be override in theme apply because it happen later.
txt = efl_add(EFL_UI_TEXTBOX_CLASS, win,
efl_text_color_set(efl_added, 0, 255, 0, 255));
Now we will preserve user choice, to not change it during theme apply.
Test Plan: ninja test
Reviewers: woohyun, bu5hm4n, zmike, segfaultxavi
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11942
Summary:
**key** value comes from keyboard down callbacks are common, regardless of language/layout but **keyname** is dependent on layout(in X11, in Wayland Can not be produced).
This common fix for both.
For example if keyboard layout in arabic then:
Ctrl+A will not work (in X11)
This one enhances D11606
Reviewers: woohyun, bu5hm4n, zmike
Reviewed By: woohyun
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11695
Make sure we fail the test, unless this settign succeed.
CID: 1403891
Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11968
Summary:
Through some APIs (elm_entry_editable_set, elm_entry_single_line_set, etc.)
located after edje_object_part_text_set(legacy)
If efl_ui_widget_theme_apply is called,
In edje_object_part_text_raw_generic_set, the legacy flag becomes FALSE.
And in this case, the logic works in the unintended direction
because the set_markup flag is FALSE.
Test Plan:
/*
gcc -o entry_example entry.c `pkg-config --cflags --libs elementary`
*/
#include <Elementary.h>
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("entry-example", "test");
elm_win_autodel_set(win, EINA_TRUE);
en = elm_entry_add(win);
evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_part_text_set(en, "elm.guide", "<font_size=32 color=#FFF>TEST</font_size>");
elm_entry_editable_set(en, EINA_FALSE);
evas_object_show(en);
elm_object_content_set(win, en);
evas_object_resize(win, 300, 200);
evas_object_show(win);
elm_run();
return 0;
}
ELM_MAIN()
Reviewers: woohyun, ali.alzyod
Subscribers: zmike, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11868
libraries are split into deps, external deps, and pub deps.
Evas engines are refactored to use the predefined engine deps.
this is preparation work for efl-one.
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11806
Summary:
verify that ready is called (preload done) and error is not called
ref D11758
Reviewers: Hermet, jsuya, kimcinoo
Reviewed By: Hermet
Subscribers: stefan_schmidt, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11760
some tests to explicitly verify callback and internal behavior
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11752
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
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
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
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
ensure that this doesn't break again
ref 11587
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11599
verify that there's no errors when this happens
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11704
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
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
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
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
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
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
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
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
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
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
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
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
this is valdating the previous commit.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11557
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