strstr behaviour is undefined when passing null to it, we will check if null is passed, then skip.
elm_entry had issue, where crash happened when click on link for example.
elementry_test -> entry -> click on link (crash will happened)
T8535
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10877
There is no way to know about text changes in edc.
This signal will help developer to know about text changes
and do some operation based on that.
@feature
Co-authored-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10780
Summary:
When converting plain_text to '*' in retrieve_surrounding_cb,
always convert it to '*' in 1 byte unit.
For example,
2 byte character is converted to "* *"
and 3 byte character is converted to "* * *"
However, this does not match the number of '*' printed in the entry.
Because, '*' in the entry is printed according to number of unicode characters.
This patch converts plain_text into unicode units
when converting plain_text to '*'
Test Plan: N/A
Reviewers: woohyun
Reviewed By: woohyun
Subscribers: cedric, #reviewers, jihoon, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10792
again 37b55172b0 broke min size calc.
this time it was for mouse cursors. the entry cursor was 0 sized after
commit 37b55172b0. this disables the
"don't cacle if its 0 sized) which isnt a valid thing to skip - you
caqn min size calc a 0x0 edje ... and it should then return a valid
min size given that design/layout.
37b55172b0 breaks min size calc. elm
toolbar was being squashed. e toolbars also were becoming 0 sized.
Just because a swallow does not have content does not mean it does not
affect the minimum size. there still could be a min size set on it
anyway etc. ...
Summary: edje_recalc_do() needs to be executed regardless of the size of edje in order to deliver edje properties for the API that the user calls.
Reviewers: cedric, Hermet, Jaehyun_Cho, smohanty
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10724
Summary:
Implementation of new cursor text object.
This Patch Contains :
1- Remove Efl.Text.Cursor & Efl.Text_Markup_Interactive interfaces and replace them with one Class Efl.Text.Cursor
=> there are some modifications on cursor methods
2- Update all related classes to use Efl.Text.Cursor object instead of the old interfaces
3- If class uses Efl.Text_Cursor_Cursor (handle), mainly annotation it will stay as it is until we update other annotations into attribute_factory
4- Add main cursor property into efl.text.interactive
5- Add cursor_new method in efl.ui.text (I think we may move it into efl.text.interactive interface)
There still some parts that need discussion: especially cursor movement functionality, I prefer to move function with Enum, instead of special function for each movement.
```
enum @beta Efl.Text.Cursor_Move_Type
{
[[Text cursor movement types]]
char_next, [[Advances to the next character]]
char_prev, [[Advances to the previous character]]
cluster_next, [[Advances to the next grapheme cluster]]
cluster_prev, [[Advances to the previous grapheme cluster]]
paragraph_start, [[Advances to the first character in this paragraph]]
paragraph_end, [[Advances to the last character in this paragraph]]
word_start, [[Advance to current word start]]
word_end, [[Advance to current word end]]
line_start, [[Advance to current line first character]]
line_end, [[Advance to current line last character]]
paragraph_first, [[Advance to current paragraph first character]]
paragraph_last, [[Advance to current paragraph last character]]
paragraph_next, [[Advances to the start of the next text node]]
paragraph_prev [[Advances to the end of the previous text node]]
}
move {
[[Move the cursor]]
params {
@in type: Efl.Text.Cursor_Move_Type; [[The type of movement]]
}
return: bool; [[True if actually moved]]
}
```
or old way:
```
char_next {
[[Advances to the next character]]
// FIXME: Make the number of characters we moved by? Useful for all the other functions
return: bool; [[True if actually moved]]
}
char_prev {
[[Advances to the previous character]]
return: bool; [[True if actually moved]]
}
char_delete {
[[Deletes a single character from position pointed by given cursor.]]
}
cluster_next {
[[Advances to the next grapheme cluster]]
return: bool; [[True if actually moved]]
}
cluster_prev {
[[Advances to the previous grapheme cluster]]
return: bool; [[True if actually moved]]
}
// FIXME: paragraph_end is inconsistent with word_end. The one goes to the last character and the other after the last character.
paragraph_start {
[[Advances to the first character in this paragraph]]
return: bool; [[True if actually moved]]
}
paragraph_end {
[[Advances to the last character in this paragraph]]
return: bool; [[True if actually moved]]
}
word_start {
[[Advance to current word start]]
return: bool; [[True if actually moved]]
}
word_end {
[[Advance to current word end]]
return: bool; [[True if actually moved]]
}
line_start {
[[Advance to current line first character]]
return: bool; [[True if actually moved]]
}
line_end {
[[Advance to current line last character]]
return: bool; [[True if actually moved]]
}
paragraph_first {
[[Advance to current paragraph first character]]
return: bool; [[True if actually moved]]
}
paragraph_last {
[[Advance to current paragraph last character]]
return: bool; [[True if actually moved]]
}
paragraph_next {
[[Advances to the start of the next text node]]
return: bool; [[True if actually moved]]
}
paragraph_prev {
[[Advances to the end of the previous text node]]
return: bool; [[True if actually moved]]
}
```
Reviewers: woohyun, tasn, segfaultxavi
Reviewed By: woohyun
Subscribers: a.srour, bu5hm4n, segfaultxavi, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10542
There exist several flags to indicate whether an object should be animated, with inconsistent names:
Efl.Canvas.Layout.animation: bool indicating if Edje animations should be played
Efl.Ui.Spotlight_Manager.animation_enabled: bool indicating if page transitions should be animated
Efl.Canvas.Animation_Player.animation: Efl.Canvas.Animation object
This commit unifies all of them: "animated" is now a flag, and "animation" is an object.
Note: Animation_Player is in the process of being replaced by an "animation" property in the
Efl.Canvas.Object, hence the need for non-clashing animation flags.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10645
this fixes a logic hole where no chosen desc has been applied yet to a
box and thus it has no start layout thus no way to calc a min size.
this breaks min size calcs you do when setting up and object. this
fixes that by forcing the chosen desk on a min size calc so there is
one.
@fix
Missing declaration from another file and removing unused variable.
After D10605
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10674
If there is no object swllowed, do not run part_calc on it.
This swallow will be calculated if there is an associated part, otherwise it will not need to be calculated.
When the app is launched, a lot of edje calculation logic is executed.
Most of the edje size is missing, so the calculation result is meaningless.
Added code to prevent this.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10605
This reverts commit 2f676a6591.
This causes segv's in edje_cc - i suspect the eet changes (or in combo
to how they are used in edje):
AddressSanitizer:DEADLYSIGNAL
=================================================================
==8991==ERROR: AddressSanitizer: SEGV on unknown address 0x000001010000 (pc 0xffff9f002604 bp 0xfffffa747700 sp 0xfffffa747700 T0)
==8991==The signal is caused by a READ memory access.
#0 0xffff9f002600 in _eet_hash_gen ../src/lib/eet/eet_utils.c:25
#1 0xffff9efdd024 in eet_dictionary_string_add ../src/lib/eet/eet_dictionary.c:103
#2 0xffff9efbe324 in eet_data_put_string ../src/lib/eet/eet_data.c:849
#3 0xffff9efc1c4c in eet_data_put_type ../src/lib/eet/eet_data.c:1427
#4 0xffff9efd9128 in eet_data_put_unknown ../src/lib/eet/eet_data.c:4730
#5 0xffff9efdb320 in _eet_data_descriptor_encode ../src/lib/eet/eet_data.c:5108
#6 0xffff9efd5958 in eet_data_put_variant ../src/lib/eet/eet_data.c:4309
#7 0xffff9efdb320 in _eet_data_descriptor_encode ../src/lib/eet/eet_data.c:5108
#8 0xffff9efd9270 in eet_data_put_unknown ../src/lib/eet/eet_data.c:4739
#9 0xffff9efdb320 in _eet_data_descriptor_encode ../src/lib/eet/eet_data.c:5108
#10 0xffff9efd8ca0 in eet_data_put_array ../src/lib/eet/eet_data.c:4692
#11 0xffff9efdb320 in _eet_data_descriptor_encode ../src/lib/eet/eet_data.c:5108
#12 0xffff9efc7768 in eet_data_write_cipher ../src/lib/eet/eet_data.c:2403
#13 0xffff9efc78a4 in eet_data_write ../src/lib/eet/eet_data.c:2420
#14 0xaaaabb151dcc in data_thread_group ../src/bin/edje/edje_cc_out.c:2045
#15 0xaaaabb152130 in data_write_groups ../src/bin/edje/edje_cc_out.c:2086
#16 0xaaaabb157734 in data_write ../src/bin/edje/edje_cc_out.c:2866
#17 0xaaaabb14122c in main ../src/bin/edje/edje_cc.c:456
#18 0xffff9dbd92a0 in __libc_start_main (/usr/lib/aarch64-linux-gnu/libc.so.6+0x242a0)
#19 0xaaaabb13ea00 (/home/raster/C/git/efl/build/src/bin/edje/edje_cc+0x38a00)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../src/lib/eet/eet_utils.c:25 in _eet_hash_gen
==8991==ABORTING
Aborted (core dumped)
When compiling breaks... it's certainly time to revert ASAP :(
It should takes true almost all times when it checks.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10606
Summary:
The internal and the API we would like is mostly a canvas API. A lot of the code
in evas is working around the fact that efl_input_device is not defined inside Evas.
This patch is the first step to try to clean this up.
Depends on D10487
Reviewers: zmike, raster, bu5hm4n, Hermet
Reviewed By: zmike
Subscribers: #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8321
Differential Revision: https://phab.enlightenment.org/D10488
Summary:
This reduce in elementary_test the number of callback registered on the
canvas from hundreds to around 10.
Depends on D10486
Reviewers: zmike, raster, bu5hm4n, Hermet
Reviewed By: zmike
Subscribers: #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8321
Differential Revision: https://phab.enlightenment.org/D10487
Summary:
This reduce by 3 the amount of callback registered on the canvas. Another
potential improvement would be to only register those callback if someone
is listening for a 'seat,*' event or if the edje file define seat filters.
Depends on D10484
Reviewers: zmike, raster, bu5hm4n, Hermet
Reviewed By: zmike
Subscribers: #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8321
Differential Revision: https://phab.enlightenment.org/D10486
Summary: this is identical to the conditional above and can be merged
to improve code clarity
Reviewers: raster, Hermet, zmike
Reviewed By: zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10549
Lots of EO files had the same information at the property and set/get level.
Removed the redundant bits, and moved to the property level the common ones.
Set and Get documentation should be used only to clarify setter-only or
getter-only behavior.
this includes all related headers
ref T8274
Additional Authors: Lauro Moura <lauromoura@expertisesolutions.com.br>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10228
this has no relation to legacy and should not be included in legacy headers
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10227
this is a bit of an overhaul wherein the existing 'play' mechanics are
all inverted. 'pause' is a state which stops playback but does not affect
the playback_position property.
this patch also includes implementations of Efl.Player::playing for
a couple classes which (now) only implement pause, as this is a requirement
for the objects to actually activate their animations
test cases:
* unit tests
* all elm_test animation cases
* elm_test video
* rage
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10114
efl.playable implements a number of properties which are also present
in efl.player. playable was intended to be separate, so enforce this
split in all classes which use player
ref T7877
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10109
Eolian @properties should be documented at the property level, and
documentation at the setter or getter level should be left to setter-
or getter-specific comments. There is usually no need at all to have
setter- or getter- specific comments.
Also, a property is not a method so descriptions should match that.
This patch removes lots of duplicated text, and will allow enabling
by default the eolian check that ensures that properties have proper
property-level docs.
No functional changes.
Summary:
historically, if the mtime of an edj file changes after being loaded,
the edje file should be reloaded. this needs to occur in a single call
with the previous user definitions intact, so verify that the mtime is
the same in efl.file::file_set when using the same file name
@fix
Reviewers: cedric
Reviewed By: cedric
Subscribers: #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9877
We can't blindly unload here - this loses swallowed content (in swallows,
boxes, tables etc.) ... this here along with an actual implementation of file
unload broke the pager in E for starters as shading then unshading (double
click titlebar) a window would lose the mini preview image obj swallowed in.
also fullscreening would do it. this also broke gadget bar, the xkb gadget in
it too and more... so this is a particularly bad thing break.
@fix
Summary:
Cluster consist of one glyph, expected to be removed on backspace or delete key.
Cluster consist of multible glyph, expectd to remove part of on backspace or delete key.
This is behaviour founded in Android. (our current way of handling similar to Qt)
**New Behaviour**
{F3750386}
**Old Behaviour**
{F3750387}
Test Plan:
Auto Testing is challenging because there are no easy way to emulate keyboard down on elm_entry
```
#include <Elementary.h>
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *win,*box,*entry;
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);
box = elm_box_add(win);
entry = elm_entry_add(box);
evas_object_size_hint_weight_set(box,EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(box,EVAS_HINT_FILL,EVAS_HINT_FILL);
elm_entry_entry_set(entry,"<font=NotoColorEmoji wrap=mixed >🇧🇬อั🇧🇬อั😀😀😀😀😀อั</font>");
evas_object_size_hint_weight_set(entry,EVAS_HINT_EXPAND,0.9);
evas_object_size_hint_align_set(entry,EVAS_HINT_FILL,EVAS_HINT_FILL);
evas_object_show(entry);
evas_object_show(box);
elm_box_pack_end(box,entry);
elm_win_resize_object_add(win,box);
evas_object_resize(win,320,480);
evas_object_size_hint_weight_set(entry,EVAS_HINT_EXPAND,0.1);
evas_object_size_hint_align_set(entry,EVAS_HINT_FILL,EVAS_HINT_FILL);
evas_object_show(win);
elm_run();
return 0;
}
ELM_MAIN()
```
Reviewers: tasn, woohyun, bowonryu
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9628
Summary:
During _elm_config_color_overlay_apply() application can call this api
100's of time depending on how many overlay it wants add . As each color_class
set triggers the global color class apply chain 3 times (for color , outline and shadow)
just club them once and emit single color_class,set event.
Reviewers: Hermet, ali.alzyod, zmike
Reviewed By: zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9784
Summary:
All those api's are working on the Edje_file level so by appending the file prefix
and changing the argument to Edje_File leads to easy maintainability.
Depends on D9776
Reviewers: Hermet, ali.alzyod, zmike
Reviewed By: zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9777
unload is a crucial method for classes that implement load, as this is
the method which is called during e.g., efl_file_simple_load() when
a new file is specified in order to destroy the previous object data
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9786