Summary:
Most use case the part name dosen't contain the recursive name
so we don't have to go through expensive eina_string_split operation.
Reviewers: smohanty, cedric, Hermet, raster
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12045
Ecore_hash is an ancestor of eina_hash and not used anywhere anymore.
We simply forgot to remove it from our benchmark utility.
Together with ecore_hash we are removing ecore_strings, which uses it,
and the corresponding benchmark files.
Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D12042
I had found wrong group name in edje and box, ctxpopup, entry, gengrid, genlist, gesture and fixed them.
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12036
```
> c:\
> cd /windows
```
Are valid paths. Paths starting with '\' or '/' should be considered
absolute paths.
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12022
Without it an expression like !EINA_LIKELY(a && b) expands
!a && b
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D12041
when this is a int and you assign 0, the whole "0" for the entire int is
moved. When this is a bit flag like this, it is a simple | operation,
which makes the whole thing somehow faster.
Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11998
Summary:
This is a 8 commit patch, but only for a while - after agreeing with
each of the changes, it shall be squashed into a single commit.
I want to make further changes on meson.build (maybe I can end up simplifying
the build system, or just let things more organized in the end) and thought
that starting with a cleanup would be a good first step.
The changes are:
1. build: set arguments scope to project instead of globally
If we set arguments globally, it may conflict with other builds - specially
considering [meson's subprojects
feature](https://mesonbuild.com/Subprojects.html). Setting to project
arguments ensures we are only considering EFL and not leaking unwanted flags.
2. build: Fix spacing and indent
Mostly because it is not well standardized during the file - sometimes
there's spaces between tokens, sometimes there is not, etc. The same applies
to indent.
3. build: move test environment closer to test commands
Just as a matter of organization. If we're doing things for tests that don't
impact other stuff, then leave it when tests are handled.
4. build: Remove unnecessary parenthesis and == true comparisons
Less noisy redundancy: `true` is already true, and `false` is already false,
no need to re-check. Besides, reading `if sys_windows` and `if sys_windows
== true` shouldn't have different effects, as the first you can read as "if
the system is windows". It gets better when you have `not` instead of `==
false`, so for an example you could read `if not sys_windows` as "if it is
not a windows system" more naturally.
5. build: Switch pc_files to dict
Just thought it could stay a little better (since it works as a dict),
specially in the `foreach` right after.
6. **[removed to a future patch]** build: Use meson's warning_level instead of hardcoded -Wall
This way we ensure this is compiler-independant (and use the correct feature
for that, since meson even warns when configuring the build dir).
7. build: Use language args from add_project_arguments properly instead of a loop
The `language:` kwarg from `add_{project,global}_arguments` receives a list
of languages, so no need for that loop.
8. **[removed to a future patch]** build: Use '/' instead of join_paths
As it [is recommended by meson since
v0.49](https://mesonbuild.com/Release-notes-for-0-49-0.html#joining-paths-with-)
(and stays clearer IMO, specially since that's how some languages are
adopting path separation, e.g. C++'s filesystem stdlib).
Reviewers: bu5hm4n
Subscribers: vtorri, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11994
If top item is deleted in "transition,finished" smart callback by user
before _on_item_push_finished is not finished, then pushed item is
hidden in _on_item_push_finished and no item is visible.
To resolve the above issue, _on_item_push_finished does not hide
pushed item if pushed item becomes top item.
`strerror_s` is the windows alternative of `strerror_r` used by EFL.
`strerror_s` never return the error code with the message as
`strerror_r` does, because of that, while comparing the first 14
characters of `Unknown error ` to the message from unknown code 4096
(`Unknown error`) they were accusing being different - in UNIX this
works because the message returned is `Unknown error 4096`.
This error was noticeable at `eina_error_test_failures` test case.
This Diff adds the error code to the message in case of an `Unknown
error`, making the windows implementation compliant with UNIX.
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: Wander Lairson Costa <wander.lairson@gmail.com>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12033
On windows, we try to open the "cmd.exe" file, but without the full path
the test fails unless it runs from the system directory.
We now use the full path to test the eina_file_open function.
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D12021
I had found a typo in elm_config_scroll_animation_disabled_set() and fixed it
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12029
This commit does two things:
- Tell the compiler that it is unlikely that we need to grow, and that
it is unlikely that data is NULL. Sometimes the if check for data
would get dropped out by the compiler when it can be ensured that it is
!= NULL. However, if we for example efl_add something and eina_push
the result, the condition would not be removed, as there is no assertion
efl_add would be != NULL.
- Do not hide the array assignment in a branch, but make it the default
branch, this way instruction cache caches the correct instruction, as
branch prediction will now hopefully, due to the hinting, take the
correct branch.
While benchmarking this here (simply in elementary_perf), this reduced
pipeline faults in eina_array_push quite a bit. (Btw. it is hard to track
*which* exact calls to eina_array_push do cause that, as mostly this API
gets inlined, so it was easier optimizing that, instead of the method
arround)
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11997
Summary:
This reverts commit 4f15bde706.
It is the correct way to draw with arc_to.
And breaking compatibility for current_get.
Test Plan: N/A
Reviewers: Hermet, kimcinoo, herb
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12030
clang-cl doesn't support the syntax of dynamic stack allocated arrays.
ref: windows-native-port
Co-authored-by: Lucas <Coquinho@users.noreply.github.com>
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11970
errno only holds a valid value if the function returns an error.
ref: windows-native-port
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11971
Summary:
The rounded rect is a very slightly different shape compared
to chrome's svg output. To solve this, modify to use a quadratic bezier
instead of arc when drawing a round.
Test Plan:
{F3904500}
(Drawing rect with arc or quadratic)
Compare Image
{F3904501}
{F3904502}
Reviewers: Hermet, kimcinoo, herb
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12020
Summary: remove created style after being set in textblock
Reviewers: woohyun, smohanty
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8742
Differential Revision: https://phab.enlightenment.org/D11944
Summary:
when we set font source, for example with efl_text_font_source_set, the font source will not be updated in the textblock.
this is have same results that has been done in D9548
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 Eo *
_create_label(Eo *win, Eo *bx)
{
Eo *en;
en = efl_add(EFL_UI_TEXTBOX_CLASS, win);
printf("Added Efl.Ui.Text object\n");
efl_text_interactive_editable_set(en, EINA_FALSE);
efl_pack(bx, en);
return en;
}
static void
_gui_setup()
{
char buf[512], f_buf[512];
Eo *win, *bx;
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);
bx = 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)));
snprintf(buf, sizeof(buf), "./TestFontSource.eet");
Eo *en = _create_label(win, bx);
efl_text_set(en, "Hello, This Text Use The Font : Does_Not_Exists_Font_1 : Source + Font Name");
efl_text_font_source_set(en, buf);
efl_text_font_family_set(en, "Does_Not_Exists_Font_1");
efl_text_font_size_set(en, 35);
en = _create_label(win, bx);
efl_text_set(en, "Hello, This Text Use The Font : Does_Not_Exists_Font_1 : Font Name");
efl_text_font_family_set(en, "Does_Not_Exists_Font_1");
efl_text_font_size_set(en, 35);
en = _create_label(win, bx);
efl_text_set(en, "Hello, This Text Use The Font : Does_Not_Exists_Font_2 : Source + Font Name");
efl_text_font_source_set(en, buf);
efl_text_font_family_set(en, "Does_Not_Exists_Font_2");
efl_text_font_size_set(en, 35);
en = _create_label(win, bx);
efl_text_set(en, "Hello, This Text Use The Font : Does_Not_Exists_Font_2 : Font Name");
efl_text_font_family_set(en, "Does_Not_Exists_Font_2");
efl_text_font_size_set(en, 35);
}
EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
_gui_setup();
}
EFL_MAIN()
Reviewers: ali.alzyod, woohyun, bowonryu, cedric
Reviewed By: ali.alzyod
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11757
Summary: when eina_strbuf_replace is used by read_only buffer, this will cause segfault (access invalid memory)
Reviewers: cedric
Reviewed By: cedric
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8757
Differential Revision: https://phab.enlightenment.org/D11989
Summary:
if we have emoji only or emoji at line start we can move cursor using mouse click to be inside the emoji.
{F3868502}
this should fix T8664
Test Plan:
#include <Elementary.h>
EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
Evas_Object *win;
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
win = elm_win_util_standard_add("emoji-test", "emoji-test");
elm_win_autodel_set(win, EINA_TRUE);
/* and now just resize the window to a size you want. normally widgets
* will determine the initial size though */
evas_object_resize(win, 320, 320);
Evas_Object *box;
box = elm_box_add(win);
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_win_resize_object_add(win, box);
Evas_Object *entry;
entry = elm_entry_add(box);
elm_entry_entry_set(entry, "☪️");
evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(box, entry);
evas_object_show(entry);
evas_object_show(box);
/* and show the window */
evas_object_show(win);
elm_run(); /* and run the program now, starting to handle all
* events, etc. */
/* exit code */
return 0;
}
ELM_MAIN()
Reviewers: ali.alzyod, woohyun, bowonryu, zmike, bu5hm4n
Reviewed By: ali.alzyod
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8664
Differential Revision: https://phab.enlightenment.org/D11732
Summary:
Found by running terminology's tests with UBSAN:
include/eina-1/eina/eina_inline_unicode.x:
runtime error: implicit conversion from type 'char' of value
-62 (8-bit, signed) to type 'unsigned char' changed the value to 194
(8-bit, unsigned)
Reviewers: #reviewers, vtorri
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11972