something is happening during shutdown, when a fileselector was created
before. This is ending up in a strcmp to a NULL ptr, which crashes, with
the now, we ensure that we are not crashing anymore, when that is
happning.
TO solve this properly we should really fix the cause of a invalid model
beeing returned, however, i do not feel compftable doing that so short
before a release.
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11762
when setting the relation from two widgets a<->b a is used as well as b.
This now correctly sets these flags.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11730
Each child_map_across_mark() takes 0.026ms with eina_hash
we can reduce the performing time by replacing the hash to array to 0.0041ms in a device.
Before Average: 0.026ms
Mostly it takes 23 times in the scrolling. thus it takes 3%(0.48ms) in one frame rendering (16ms)
After Average: 0.0041ms
Mostly it takes 23 times in the scrolling. thus it takes 0.6%(0.096ms) in one frame rendering (16ms)
result: map calc 5x faster than original (0.384ms improved)
Thanks Subhransu for report this.
@optimization
this makes no sense
../src/lib/elementary/elm_cnp.c:54:15: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
54 | static inline const Elm_Sel_Format
Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11759
"Evas_Group" does not exist, and "Evas" is a top-level group without content
(only subgroups). So I guess all these methods belong to the "Evas_Canvas" group.
This brings even more docs into existence, fixing multiple missing references.
All widgets copy&pasted the same description, including an invalid reference
to "Layout", which should be "Elm_Layout".
SOME of them had been fixed over the years but this commit fixes all of them.
This significantly reduces the number of Doxygen warnings and adds meaningful
links to the docs.
Docs did not match the intended enum value due to incorrect usage of the
doxygen tags.
Also, Evas_Render_Op was the only member of the top-level Evas group, so
I moved it inside one subgroup, where methods using it reside.
Summary:
In D11392, fixed to call file_unload when doing memfile_set.
Therefore, "load,error" callback was called while unloading object
that was not loaded when first load with memfile_set.
So fix it to avoid unnecessary unloading.
Test Plan:
{F3871804}
cp ./test_imge.c ./efl/
cd efl
gcc -o test_image test_image.c -g `pkg-config --cflags --libs elementary`
./test_image
Loading image...
Async file load failed.
Image is ready to show.
Reviewers: Hermet, kimcinoo, herb
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers, zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11758
we were losing cached chaders and overwriting the cache all the time
when apps finished compiling new shaders and at other points... when
they should have already had a populated shader cache that was all
fine and happy. this fixes that so once the cache is fully populated
it wont write anymore and it wont lose existing shaders in the cache
@fix
If the given events list is NULL the data pointer would be as well. Make
sure we check for NULL here before accessing.
CID: 1419843
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11754
Instead of doing our own parsing here we should use ecore_file_dir_get()
which uses dirname() already to solve this.
CID: 1422196
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11727
These to code lines should be in one block and not one exectued without
the if.
CID: 1422198
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11726
it may report an exe is installed if it happens to be in cwd but cwd
isnt in path. the "full/relative" path handling case mishandled this.
fixes T8678
@fix
This enables a user to build EFL with wayland support enabled
on FreeBSD. It is NOT functioning, but everything starts at
some point.
This requires also linking against -lepoll-shim.
Meson arguments:
-Deeze=false -Dv4l2=false -Dfb=false -Ddrm=false -Dwl=true \
-Dsystemd=false
@fix T8659
this is sadly needed due to the fact that we have a .eo defnition in the
.eot file which contains the flags keyword.
Differential Revision: https://phab.enlightenment.org/D11739
there is no reason to have them in the .eot files. They are also not
namespaced in the way we want to have types.
Differential Revision: https://phab.enlightenment.org/D11738
there is not yet a CID for this, but we should probebly not do that.
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11731
this is a obscure check, if this was ever reached, then it would simply
crash, because one pointer will be NULL, but strcmp will be called on
it.
CID 1419854
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11722
In an error case the fd could be negative here and we should check
before feeding it into fdopen(). This is the same patch we used in
recorder.c
CID: 1422194
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11728
In an error case the fd could be negative here and we should check
before feeding it into fdopen().
CID: 1422197
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11725
We never checked how many bytes had been written. Check on return and
propagate error upwards to caller.
CID: 1419856
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11724
We no longer support the old .rec format and we can always expect the
file to be exu. Coverity found this block to be always true so the else
part could not be reached.
CID: 1421996
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11723
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.
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, "☪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
Summary:
This update make the textgrid same as evas_text and evas_textblock to use current picked font for text_props instead of script_font
This patch will fix terminology emoji rendering when used applying D11302.
Reviewers: raster, woohyun
Reviewed By: woohyun
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11729
we build these arrays to hold tjhings to clean up when done ... but if
one frame happens ot have a lot - the allocation stays huge as we only
clean not flush, so flush to keep memory down.
@optimize
checkinf for it beeing NULL means that we would have to equip every
usage of unit1 with a check, but that is useless.
CID 1419859
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11721
ii might be NULL so we should ensure it is not NULL to call item_select
CID 1419865
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11720
these if clause where a bit bottom up, and the xor operation here seemed
totally wrong, with this code we are simply displaying both entiteis of
the two structs when they are there. *or* we are replacing it with the
fallback.
CID1419875
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11719
If there is a string larger than the size of entry
and when the entry is auto scrolling, cursor is not visible.
Using _edje_entry_cursor_geometry_get guarantees the minimum size of the cursor,
and guarantee the size from edje. (min_restricted_calc)
Reviewed-by: Ali Alzyod <ali198724@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11649
ensure that this doesn't break again
ref 11587
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11599
```
#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
We get fonts_dir from a getenv() without and length check. Make sure
that we stay in the given buffer size when stitching the file path
together.
CID: 1422195
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11718
This has been around for prg handling before we switched to preload. No
need for it anymore. Found when looking for a Coverity issue, which also
got fixed now by luck. :-)
CID: 1421994
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11713
Summary:
Now there are no need for special care for variation sequence text run break.
General method will care about all types of characters\
this is also related to D11096
Reviewers: woohyun, bowonryu
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11602
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, "☪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
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
verify that there's no errors when this happens
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11704
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
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
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
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
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
prevent leaking RGBA_Font in the for loop,
CID: 1382852
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11709
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
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.