Commit Graph

31169 Commits

Author SHA1 Message Date
junsu choi 0b5f658510 efl_gfx_path: When path end(Z,z), Current point are returned to starting point(M,m)
Summary:
When path ends with 'z' or 'Z' command, if 'm' comes as next command,
the current point is incorrectly referenced.
Since 'Z', 'z' means to close the path,
so, Save point and reuse it when 'M' or 'm' is called.

Test Plan:
[Error Case]
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
    <path d="M 52.17,20
             H 11.92
             V 43
             H 52.17
             Z
             m -1.5,21.5
             H 13.42
             v -20
             H 50.67
             Z
" fill="#a8b7c1" stroke="#F00" stroke-width="0.5" />
</svg>

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: cedric, herb, kimcinoo, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12158
2020-09-22 14:52:42 +09:00
Vincent Torri 3aeffe0bec elm_config: don't prepend /tmp/ to file name
eina_file_mkstemp() already takes care of this.

Differential Revision: https://phab.enlightenment.org/D12155
2020-09-21 11:26:23 +02:00
Stefan Schmidt ddd0736264 Revert "elm - collection view - check return and fix coverity wanring"
This reverts commit f3fdcf5692.

This commit leads to ninja test timeout. When returning result here the
future will never fire and we will keep spinning.
2020-09-21 11:09:07 +02:00
Carsten Haitzler 1638a79bd6 elm - toiolbar - use correct theme icon for more item
there is a specific thme icon for "more" items when a toolbar
compresses. it literally was not being used. it should use it.
"go-down" that it was using isn't exactly very expressive of what this
item does...

@fix
2020-09-21 09:35:06 +01:00
Carsten Haitzler 52b02055f4 ecore - efl thread - dont close invalid < 0 fd's
fix CID 1396951
2020-09-20 00:20:42 +01:00
Carsten Haitzler ca4b939364 ecore - efl exe - check returns of open and dup2 for stdin etc. fds
check returns - fix CID 1397002
2020-09-20 00:20:42 +01:00
Carsten Haitzler 568dd7e45b eina bench - have default values inside benc dtoa
addess CID 1400856
2020-09-20 00:20:42 +01:00
Carsten Haitzler 82de87dfc5 evas test - check return of ftell and malloc and handle properly
fix CID 1400871
2020-09-20 00:20:36 +01:00
Carsten Haitzler 485ecc24ed eina thread - check return of pthread_attr_init
fix CID 1401031
2020-09-19 23:37:22 +01:00
Carsten Haitzler 2bea2c7b87 emotion - check return of eet data write
fix CID 1401040
2020-09-19 23:34:39 +01:00
Carsten Haitzler ec4076b895 ethumb - fix idx range check
fix CID 1402612
2020-09-19 23:15:44 +01:00
Carsten Haitzler d64d4568bd ethumb - fix index range check
fix CID 1402628
2020-09-19 23:13:08 +01:00
Carsten Haitzler fd93bed3d1 ethumb - fix index range check
fix CID 1402631
2020-09-19 23:11:53 +01:00
Carsten Haitzler fa2f0b67b9 ethumb - check size read
fix CID 1402633
2020-09-19 23:09:05 +01:00
Carsten Haitzler 99636bdd5f ethumb - check inoput index from stdin
fix CID 1402646
2020-09-19 23:03:20 +01:00
Carsten Haitzler e243a60bb2 evas - psd loader - check read values to try make coverity happy
this is trying to fix CID 1402688, 1402687, 1402682, 1402665. not sure
it will or will not but it does dot i's and cross t's
2020-09-19 22:32:57 +01:00
Carsten Haitzler f3fdcf5692 elm - collection view - check return and fix coverity wanring
fix CID 1405808
2020-09-19 20:38:12 +01:00
Carsten Haitzler f76d925318 ecore con url - curl is actually optional and only needs to init on use
ecore_con_utl_init is kind of pointless when we can init at the first
use of a url and just have it fail. the problem is anyone initting
ecore_con's url stuff will then pull in curl at that point and not
laer "on first use" which is kind of nw how the dlopen fun was
intended, so push it off until then.
2020-09-19 18:29:55 +01:00
Vincent Torri 364323881c elm_config: remove useless init|shutdown of ecore_win32 and eocore_cocoa (done in ecore_evas module), and useless wayland variable
ecore_win32 and ecore_cocoa was init. wayland variable was also unused

Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D12149
2020-09-18 09:04:00 -04:00
nerdopolis 57354e01ec call sd_seat_can_tty to determine if ttys should be used, instead of hard-coding seat0
Summary: All TTYs are on seat0, but not all seat0s have TTYs

Reviewers: #efl, devilhorns

Reviewed By: #efl, devilhorns

Subscribers: bu5hm4n, stefan_schmidt, raster, cedric, #reviewers, #committers

Tags: #efl

Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D12143
2020-09-18 11:48:19 +02:00
Woochanlee 875f05cef5 evas_outbuf: Fix memory leak.
Summary: In certain use cases, when image data is created twice, the existing memory pointer is isolated and a memory leak occurs.

Reviewers: raster, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8813

Differential Revision: https://phab.enlightenment.org/D12148
2020-09-17 17:23:42 +09:00
Woochanlee ca2900be8a evas_main: Fix memory leak.
Summary: If the inlist has only one item when it removed. the data is not freed in descturctor.

Reviewers: Hermet, raster, vtorri

Reviewed By: Hermet

Subscribers: vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12147
2020-09-17 17:23:10 +09:00
Shinwoo Kim e5958965e8 evas vg: check object changed as well 2
Summary:
evas cannot render vg object if Efl_Canvas_Vg_Node_Data flag is not
EFL_GFX_CHANGE_FLAG_NONE and Evas_Object_Protected_Data.changed is FALSE,
when vg object marks its node as changed.

Above case could be possible if vg object render_pre is not called, and
only nd->vd->obj->changed is set to false by evas_object_change_reset.

Reviewers: Hermet, jsuya, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12142
2020-09-17 10:40:25 +09:00
Ali Alzyod 3bd066c7db evas_textblock: prevent textnodes with <ps>/<br> without format node
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
2020-09-16 14:40:55 +02:00
junsu choi 35f17a13fa vg_load_svg: Support dasharray attribute for stroke
Summary:
It supports stroke-dasharray, one of the stroke properties of svg.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray

Test Plan:
[Test SVG]
<svg viewBox="0 0 30 10" xmlns="http://www.w3.org/2000/svg">
  <!-- No dashes nor gaps -->
  <line x1="0" y1="1" x2="30" y2="1" stroke="black" />

  <!-- Dashes and gaps of the same size -->
  <line x1="0" y1="3" x2="30" y2="3" stroke="black"
          stroke-dasharray="4" />

  <!-- Dashes and gaps of different sizes -->
  <line x1="0" y1="5" x2="30" y2="5" stroke="black"
          stroke-dasharray="4 1" />

  <!-- Dashes and gaps of various sizes with an odd number of values -->
  <line x1="0" y1="7" x2="30" y2="7" stroke="black"
          stroke-dasharray="4 1 2" />

  <!-- Dashes and gaps of various sizes with an even number of values -->
  <line x1="0" y1="9" x2="30" y2="9" stroke="black"
          stroke-dasharray="4 1 2 3" />
</svg>

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: kimcinoo, herb, cedric, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12146
2020-09-15 12:11:49 +09:00
junsu choi 53e8bf9dab Efl.Canvas.Vg: When VG container has transparency, ector buffer created synchronously
Summary:
If the container has transparency, it internally alpha blends with ector buffer.
So ector buffer must be created synchronously.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: #reviewers, #committers, cedric, herb, kimcinoo

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12140
2020-09-11 17:02:24 +09:00
junsu choi 725219e319 vg_load_svg: Add Mask, ClipPath nodees as dummy.
Summary:
Mask and clippath TAG are not supported yet.
If this TAG is used, the Child TAG declared with this TAG may cause problems.
To prevent that, declare them as Unknown types until they are supported. (display=none)

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: cedric, herb, #reviewers, kimcinoo, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12139
2020-09-11 11:49:09 +09:00
junsu choi fbf8db3699 vg_load_svg: Fix missing loader.gradients update
Summary:
When both <defs> and <svg> gradients are declared,
the update of gradient declared in is omitted.
Therefore, this patch fixes any missing gradient updates.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: #reviewers, #committers, cedric, herb, kimcinoo

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12138
2020-09-11 11:48:30 +09:00
junsu choi 0e01e9778c Efl.Canvas.Vg.Object: Fix typo
Summary:
The 3th parameter of ector_buffer_pixels_get is the width.
So chnage px to pw.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: cedric, herb, #reviewers, kimcinoo, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12141
2020-09-11 11:46:59 +09:00
Myoungwoon Roy, Kim f59a166063 docs: Correct the mismatched group name in Evas.
I had found mismatched group name in Evas and fixed them.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12134
2020-09-10 09:21:31 +02:00
junsu choi d9c3b3f1b9 vg_load_svg: Supports case when only rx or ry is declared
Summary:
In relation to the declaration of rx and ry attribute of rect, the following three cases occur.
rx="10" (or ry="10"
rx="10" ry = "0" (or rx="0" ry = "10")
rx="10" ry = "10"
To cover these case, we check the rx and ry declarations.

Test Plan: N/A

Reviewers: Hermet, smohanty

Subscribers: kimcinoo, herb, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12137
2020-09-10 14:59:29 +09:00
Shinwoo Kim 7b7f69e09f evas vg: check object changed as well
Summary:
evas cannot render vg object if Efl_Canvas_Vg_Object_Data.changed is ture
and Evas_Object_Protected_Data.changed is false, when vg object marks itself
as changed.

Above case is possible depending on the draw area which is calculated by
eng_output_redraws_next_update_get. If this function returns NULL,
the vg object render function is not called, and vd->changed remains true.
Only vd->obj->changed is set to false by vas_object_change_reset.

Reviewers: Hermet, jsuya, herb, raster

Reviewed By: raster

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12136
2020-09-09 12:14:48 +01:00
Jaehyun Cho cb059ea0af elm_gesture_layer: fix crash caused by elm_gesture_layer_cb_del in cb
elm_gesture_layer_cb_del can be called in Elm_Gesture_Event_Cb cb set by
elm_gesture_layer_cb_set and cb_info of the cb is free in the cb.

This causes crash if cb_info is searched with EINA_INLIST_FOREACH.
2020-09-07 15:18:12 +09:00
Carsten Haitzler 5d058c98fd elm cnp - make matchers const and static too 2020-09-05 15:03:44 +01:00
Marcel Hollerbach f8ef50eaaa elm_cnp: adjust image type to real format
we should never say that we have image/png etc. if we do not have the
respective format. Otherwise we are just confusing the other client.

With this you can copy things from elm to thunderbird / libreoffice
writer / firefox / telegram / chromium.

Please note if you test this: Start *a new xorg session* it was
discovered that xorg clients tent to be totally confused if there was a
protocol error before, or some wrong mime type was delivered before,
thunderbird even likes to crash if this is not done.

This should at some point be extended to more image types.
2020-09-05 09:43:43 +02:00
Marcel Hollerbach 6e85742b42 ecore_evas_x: reply in *any* way with XdndStatus
otherwise Xorg stops sometimes to continue sending callbacks to us.
Which results in a broken state maschine.
2020-09-04 18:30:36 +02:00
Carsten Haitzler 8cb57ecc1b ecore x - fix typo in internal backdoor api to get vsync debug 2020-09-04 14:42:07 +01:00
Carsten Haitzler e0d21286c2 ecore drm - increase timeout for flips from 0.05 to 2.0 sec
so our timeout is far too agressive. we cant stay hung on buggy
devices/drivers though so make the timeout 2s instead of 0.05s so we
dont go retrying flips too agressively which causes stuttering

@fix
2020-09-04 13:25:52 +01:00
junsu choi 39ccd92394 vg_load_svg: Fix pointing to wrong parent
Summary:
If defs type is open empty style, it is not included in stack.
Because the current logic is weak to group tags in sibling relationships.
If defs of open-empty type is placed before the group tag,
the group tag refers to the wrong parent. This patch prevents it.

This change is the same concept as the D12127, which was reverted to 5065c9d0c2.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: cedric, herb, kimcinoo, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12129
2020-09-04 11:14:59 +09:00
Myoungwoon Roy, Kim add087837c docs: Add the missing API page name to elementary and evas
I had found missing API reference page name. There should be page name to each API defgroup

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12128
2020-09-03 11:17:53 +02:00
Carsten Haitzler 9544c87428 edje - calc - handle swallow disappearing mid-calc due to callabcks
callbacks attached to move/resize etc. can change a swallow and ..
well.. i hit a crash where it happens. so handle this case.

@fix
2020-09-03 09:42:31 +01:00
Hermet Park 5065c9d0c2 Revert "SvgLoader: Defs type nodes are not saved in loader's node list."
This reverts commit 40b6e44947.

This has some side effects, we will intrdouce it again after fix it.
2020-09-03 16:45:27 +09:00
junsu choi 40b6e44947 SvgLoader: Defs type nodes are not saved in loader's node list.
Summary:
If there is an empty (unused) <defs /> inside the svg file, this can cause problems.
<defs> node is managed separately in loader->def.
So it doesn't have to be added to loader's list.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers, kimcinoo, herb

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12127
2020-09-02 18:34:59 +09:00
Vincent Torri af8bf56c98 eina file test: check rmdir result.
Fix CID 1432267

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12125
2020-09-02 10:44:19 +02:00
Marcel Hollerbach e2a1cdfda7 build: only find env once
this was a bit messy, and we might have caused a bug on the ML with
that.
2020-09-02 09:25:51 +02:00
Marcel Hollerbach f9ade56cf8 efl_ui_focus_manager_calc: fix CID
coverity was complaining that the DIRECTION ACCESS macro might access
over a negative direction. However, complement of a 2D direction is
always a 2D direction. But coverity cannot detect that.
2020-09-01 14:12:31 +02:00
Marcel Hollerbach 9fb91f4a9f eldbus: use the const macros we have
clang warns about that, its rather harmless, but nicer.
2020-09-01 14:12:31 +02:00
Marcel Hollerbach 13a76dded0 efl: resolve warnings over misleading code
this is meant to be like this, but clang thought of an intention mistake
here that went unsighted.
2020-09-01 14:12:31 +02:00
Marcel Hollerbach 9673ed6269 benchmarks: specify this outside extern "C"
uint128 is defined as a c++ specific type.
2020-09-01 14:12:31 +02:00
Marcel Hollerbach c40c279308 eldbus_fake_server: fix string format usage
we know that there is no % etc. formatting in this string, however, we
can just use the ck abort msg macro from libcheck directly.
2020-09-01 14:12:31 +02:00
Marcel Hollerbach 0817c49e75 efl: remove unused functions
these are not used, if they are used again in the future, they can be
get back via git.
2020-09-01 14:12:31 +02:00
Marcel Hollerbach 5f73d13047 efl: remove bool and string pointer mixup 2020-09-01 14:12:31 +02:00
Woochanlee 8198345e1f edje_cc: Fix uninitialized scalar variable
Summary:
mo_path can using for fprintf in using_file function without initialize.
fix coverity.

Reviewers: Hermet, raster

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12120
2020-09-01 21:02:57 +09:00
Carsten Haitzler d5d7c55302 elm icon/thumb - fix handling of a wider range of video extns
the xetension list for video files was far too small. it menas it
missed many kinds of video files. this fixes that to have a much wider
range/list.

@fix
2020-09-01 12:26:01 +01:00
Stefan Schmidt 173b3a108e Revert "evas_textblock: rainbow flag emoji treated as two clusters(update unibreak to version 4.2)"
This reverts commit 1ab71284db.

We are in freeze.
2020-09-01 13:00:33 +02:00
Youngbok Shin 6e02557535 evas_textblock: remove style padding from native width and formatted height
Summary:
The style padding was included in native width(not in native height)
and formatted height(not in formatted width).
This is so weired. In addition, there is no enough document about
the relation between formatted size, native size and the style padding.
This issue is caused by a confusing code which is about how to handle
the style padding on item's width and height.("x_adjustment"!)

When Evas calculates "c->wmax" in line finalization stage, it explicitly subtract
style padding from line width. So, I assumed the formatted size has not to include
style padding. It is same for the native size.

The style padding will not be included in formatted size and native size by this commit.
@fix

Test Plan:
A test case is included in this commit.

Evas_Object *tb = evas_object_textblock_add(evas);

newst = evas_textblock_style_new();
evas_textblock_style_set(newst, "DEFAULT='font=Sans font_size=50 color=#000 text_class=entry'");
evas_object_textblock_style_set(tb, newst);

evas_object_textblock_text_markup_set(tb, "<style=far_soft_shadow>Test</>");
evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b);
fail_if((l != 0) || (r != 4) || (t != 0) || (b != 4));

/* Size with style padding */
evas_object_textblock_size_formatted_get(tb, &w, &h);
evas_object_textblock_size_native_get(tb, &nw, &nh);

/* It is non-sense if the following condition is true. */
fail_if((w + l + r == nw) && (h == nh + t + b));

Reviewers: raster, ali.alzyod, woohyun, bowonryu

Reviewed By: ali.alzyod

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12110
2020-09-01 19:39:13 +09:00
AbdullehGhujeh 1ab71284db evas_textblock: rainbow flag emoji treated as two clusters(update unibreak to version 4.2)
Summary:
if we have rainbow flag emoji (&#x1f3f3;&#xfe0f;&#x200d;&#x1f308;)
we can use mouse/keyboard to move cursor inside it because we break it into two clusters, we break on 1F308,

This is wrong as we should treat emoji as a single cluster (based on rules mentioned in Unicode segmentation standard “Do not break within emoji modifier sequences or emoji ZWJ sequences” (https://unicode.org/reports/tr29/#GB11 )).

this issue happens because we don’t give 1F308 its correct grapheme break property value, I think this is a bug in the unibreak library as this Unicode 1F308 should have word break class value equals to Glue_After_ZWJ (based on https://www.unicode.org/reports/tr29/tr29-31.html#Glue_After_Zwj_WB and http://unicode.org/Public/emoji/5.0/emoji-zwj-sequences.txt) which will not make it break and we will get a single cluster.

I noticed that the current unibreak lib used in EFL  seems to implement Unicode 9  (latest is Unicode 13) which uses obsolete and unused grapheme break property, such as E_Modifier & Glue_After_ZWJ, so if a new emoji introduced (rainbow flag was introduced after Unicode 9)  and based on Unicode 9 it should use property  E_Modifier or Glue_After_ZWJ we will have issue with it.

So I have updated unibreak lib using latest released version of unibreak (4.2) which implement Unicode 12.

I needed to remove **BREAK_AFTER(i)** to pass the tests in D1140 as spaces do not break on latest update (also related to T995).

{F3868712}

this should fix T8665 & T8688

Reviewers: ali.alzyod, woohyun, bowonryu, zmike, segfaultxavi, bu5hm4n

Reviewed By: ali.alzyod

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8665

Differential Revision: https://phab.enlightenment.org/D11743
2020-09-01 19:33:52 +09:00
Vincent Torri ba3b082d06 eeze_mount binary: more secure check extension ('.iso' and not 'iso')
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12123
2020-09-01 09:35:49 +02:00
Vincent Torri 2261332969 ecore_file_can_exec: fix .bat case
the test on the .bat file was too early

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/D12122
2020-09-01 09:35:46 +02:00
Vincent Torri d910fa3fa7 Evil: add gettimeofday()
Add gettimeofday implementation based on the mingw one, using a more acurate function if Windows >= 8

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/D12111
2020-08-31 14:24:08 +02:00
Vincent Torri 33304d656c Ecore: more precise implementation of ecore_time_get on Windows
Implement directly monotonic clock on Windows, to have more accurate results

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/D12112
2020-08-31 14:24:05 +02:00
Vincent Torri 45cabae42b ecore-file: fix ecore_file_can_exec() on Windows
on Windows access() has no support of X_OK (see https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/access-waccess?view=vs-2019), use SHGetFileInfo() instead

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/D12118
2020-08-31 14:08:21 +02:00
João Paulo Taylor Ienczak Zanette abc308accb eina: Replace remove with rmdir and delete tmpstr
Although the [remove manpage](https://linux.die.net/man/3/remove) states that `remove(...)` deletes
either a file or a directory, this is not true in Windows as it can be seen in
[MSDN docs for
remove](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/remove-wremove?view=vs-2019):

> **(Function description)**
>
> Delete a file.
>
> **Return Value**
>
> Each of these functions returns 0 if the file is successfully deleted.
> Otherwise, **it returns -1 and sets errno either to EACCES to indicate that the
> path** specifies a read-only file, //**specifies a directory**//, or the file
> is open, or to ENOENT to indicate that the filename or path was not found.

This implementation detail caused the Eina test to fail and not removing the
temporary directory.

This patch changes the use of `remove` to the directory-specific `rmdir`, which
is guaranteed to remove the directory. Additionally, it also deletes the
Eina_TmpStr that holds the temporary directory path.

Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12115
2020-08-31 11:16:43 +02:00
Vincent Torri 07d6a25c20 elm_theme: more secure check extension as '.edj' and not 'edj'
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12121
2020-08-31 11:16:40 +02:00
Carsten Haitzler 4098515779 evas load - dont lose skip flg update after async head skip load fix
119d9f39dd fixed async loads when head
skip was on but it broke informing the evas image object of the file
handles etc. by losing the skip head flag in the image entry. this
fixes that
2020-08-30 18:46:48 +01:00
Carsten Haitzler 119d9f39dd evas - image cache - fix loading with skip head on to load changed files
changed files were not being detected as stas was being skipped if
skip head was enabled. this means we totally didnt see changes to
files if loaded this way until caches were cycled/flushed/removed

@fix
2020-08-30 12:05:17 +01:00
Carsten Haitzler 5a125ccfa4 eina - statgen (stat generation) - fix enable api to actually enable
it wasn't being enabled thus missing an entire optimization limiting
stats to "once per frame" etc. to avoid overly syscall+io happy code
from having as much of an impact

@fix
2020-08-30 12:04:13 +01:00
Carsten Haitzler 07138e1e1d ecore exe - fig signal block to unblock again - some sys dont on exec
it seems some libc's or systes dont reset signal mask blocks on
exec(). this unblocks manuaklly jus befor eexec, moves blocking to
before fork and adds a "nuke all signal handlers" in the child process.

fixes T8797
2020-08-28 13:50:49 +01:00
Shinwoo Kim b954640db8 efl_ui_image: update orientation immediately
Summary:
It is able to get orientation information of inlined image object.
This information should be same during its life time.

The inlined image object got correct information only after size
calculation, so there is a kind of timing issue.

An example will be attached for more details.

I am not sure what the regression bug mentioned on D6855, but
this will keep compatibility of behavior.

Actually it seems that the compatibility was broken by D9686
which does not call _efl_ui_image_sizing_eval immediately.

Test Plan: {F3947703}

Reviewers: Hermet, jsuya, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12114
2020-08-28 14:54:11 +09:00
WooHyun Jung ece7010a4a elm_config: rescale is needed when font or font size is changed
Summary:
This patch fixes the issue that any application is not rescaled
when font or font size is changed by elementary_config.

Test Plan:
1. run elementary_test
2. run elementary_config
3. change the font in elementary_config
4. check the button size in elementary_test

Reviewers: id213sin, ali.alzyod, devilhorns, raster

Reviewed By: devilhorns, raster

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12117
2020-08-28 10:16:29 +09:00
Carsten Haitzler 13c125803e evas device - fix enum cast warnings - checked values 2020-08-25 13:21:25 +01:00
Carsten Haitzler 5437afea1a elm access - fix enum cast warning - checked values 2020-08-25 13:21:25 +01:00
Carsten Haitzler 3ae4f76247 edje - fix enum cast warning - checked values 2020-08-25 13:21:25 +01:00
Carsten Haitzler be71903937 elm - efl ui text - fix enum return to use right enum 2020-08-25 13:21:25 +01:00
Carsten Haitzler e8109c678d elm - main - fix enum cast warnings - checked values 2020-08-25 13:21:25 +01:00
Carsten Haitzler eab898e592 edje - fix enum cast warnings - checked values 2020-08-25 13:21:25 +01:00
Carsten Haitzler d30c1111bc evas - canvas - fix enum cast warning by removing cast 2020-08-25 13:21:25 +01:00
Carsten Haitzler e4bf0554f7 evas - image - fix enum cast warnings - checked 2020-08-25 13:21:25 +01:00
Carsten Haitzler c8f7692800 evas vg - fix warning for enum casts with explicit ones - checked 2020-08-25 13:21:25 +01:00
Carsten Haitzler c640dd7d18 elm - flip - fix enum cast warnings - cheked values match 2020-08-25 13:21:25 +01:00
Carsten Haitzler 77b3d11c8d evas - callbacks - fix casting warnings - checked flags are the same 2020-08-25 13:21:25 +01:00
Carsten Haitzler 76701f606c evas - image+proxy - fix enum cast warnings with casts - checked 2020-08-25 13:21:25 +01:00
Carsten Haitzler e0888cbbef evas - sw generic - fix enum cast warn - valid checked 2020-08-25 13:21:25 +01:00
Carsten Haitzler 1c90fd41bc evas - obj main - fix enum warnings with valid casts 2020-08-25 13:21:25 +01:00
Carsten Haitzler ad6573bbfe evas - canavs vg shape - cast enums - valid - checked - fix warnings 2020-08-25 13:21:25 +01:00
Carsten Haitzler 2b264c606a ecore evas, edje - fix use of evas seat device enum 2020-08-25 13:21:25 +01:00
Carsten Haitzler d54d4fb9c8 elm cnp/dnd - use right evas device enum for seat 2020-08-25 13:21:25 +01:00
Carsten Haitzler c565403bda elm scroller - fix mapping of block enums - was broken 2020-08-25 13:21:25 +01:00
Carsten Haitzler ea1d4ecfdb elm - focus legacy - fix enum implicit casts with explicit - valid
these casts are valid (i checked) to make them explicit and remove
warnings
2020-08-25 13:21:25 +01:00
Carsten Haitzler fbbde6e8a8 elm - efl ui widget - fix enum warnings with valid casts 2020-08-25 13:21:25 +01:00
Carsten Haitzler 70d0fcfc90 elm image - zoomable - fix enum warnings with valid casts 2020-08-25 13:21:25 +01:00
Carsten Haitzler 880973ebcf evas - sw generic - fix enum passing with casts or correct types fix wrn 2020-08-25 13:21:25 +01:00
Carsten Haitzler ed12d482d5 evas - legacy events - cast enums after checking its ok - wrn fix 2020-08-25 13:21:25 +01:00
Carsten Haitzler aac4dd3066 evas events - cast enums after checking their values match - fix wrns 2020-08-25 13:21:25 +01:00
Carsten Haitzler 13d4c546f9 ecore evas - use correct enums for legacy funcstions to remove warns 2020-08-25 13:21:25 +01:00
Carsten Haitzler f6e33361ed elm - efl ui win - fix enum handling with explicit casts where needed
warnings and cash enums to show we really do keep enums in sync
2020-08-25 13:21:25 +01:00
Carsten Haitzler aad95dd625 ecore evas - module - use correct enums 2020-08-25 13:21:25 +01:00
Carsten Haitzler 7b3096f947 evas - gl generic - use correct enums for types 2020-08-25 13:21:25 +01:00
Carsten Haitzler b3c5008284 exactness - injecotr - alloc correct buffer size
didn't account for null bytes... fix.
2020-08-25 13:21:25 +01:00
Carsten Haitzler e9adfbae00 exactness - cast enum assign - it is valid due to values. warn fix 2020-08-25 13:21:25 +01:00
Carsten Haitzler 1b12294efb tests - evas vg - use proper enuams for evas vg api - warn fix 2020-08-25 13:21:25 +01:00
Carsten Haitzler 5f709aa0d3 tests - evas vg - use evas enumas not efl ui - warn fix 2020-08-25 13:21:25 +01:00
Carsten Haitzler 603102577b tests - efl ui config - use proepr elm enums for elm apis 2020-08-25 13:21:25 +01:00
Carsten Haitzler c984939762 tests - elm spinner - use proper elm enum - warning fix 2020-08-25 13:21:25 +01:00
Carsten Haitzler 125986e27b tests - elm slider - fix possile use of uninit var warning 2020-08-25 13:21:25 +01:00
Carsten Haitzler 5da1229484 ecore con - curl - fix error map to map right enum
this would print the wrong error to eina log - this fixes this

@fix
2020-08-25 13:21:25 +01:00
Ali Alzyod 805545ab68 evas_font_query: add Use parentheses within macros
Differential Revision: https://phab.enlightenment.org/D12116
2020-08-25 12:38:56 +02:00
Carsten Haitzler 8eefc204fc eina file - fd close - handle fbsd 11 syscall abi as it broke in 12 2020-08-24 20:09:06 +01:00
Hosang Kim e2944780fa ecore_wl2_display: move wl_display_dispatch_pending before condition check.
Sometimes display ref count is not zero after wl_display_dispatch_pending.

For example, wl_data_source_listener's callback is called by wl_display_dispatch_pending.
Display ref count is not zero but display is cleaned up, it makes double free corruption.

Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D12109
2020-08-22 08:25:06 -04:00
Carsten Haitzler e6af6c7a7b eina file - fix getdents64 on older glibc's and use raw syscall 2020-08-21 12:48:32 +01:00
Carsten Haitzler 31c343b77c efl/ecore exe - more paranoia - block sig handlers between fork + exec
in theory signal handlers could kick in after fork and before exec...
so block them until we're exec'd or exited so they don't change any
program state.
2020-08-21 09:18:23 +01:00
Carsten Haitzler 49662fcb49 eina - eina_file_close_from - handle coverity theory that closes change
this won't happen as the setup should not have the # of fd's found in
2st pass and 2nd pass for a dirfd change as nothing should interfere.
comment to that effect and add a paranoid change num_closes to the
number found
2020-08-21 09:18:23 +01:00
Carsten Haitzler db8e598351 evas - fix deadlock with sw async rendering calling cbs in post flush
post flush doesnt cleanr evas->rendering until after it calls post
flush callbacks. any post flush callback that neexts so access data
and block waiting for an async render tyo be done thus blocks forever.

this adds a 0.2 sec timeout in case so we at last march on with
hiccups instead of totally stalling AND clears evas->rendering before
calling the callbacks.

@fix
2020-08-20 08:52:32 +01:00
Carsten Haitzler 4b4c208d99 ecore - don't do anything with heap between fork and exec
this avoids a possibgle deadlock if a malloc impl is holding a lock
and has not released it at the time we fork.

@fix
2020-08-20 08:52:32 +01:00
Carsten Haitzler cef058c48b ecore x - go back to vsync thread. this will be more reliable
while it requires an extra wakeup from vsync thread -> e and this adds
a bit of jitter, it's mroe reliable in the face of "missed a frame"
timings and doesnt degrade as badly.
2020-08-20 08:52:32 +01:00
Wander Lairson Costa 1ee6e020bb eina_test_lock.c: Implement clock_gettime for Windows
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D12023
2020-08-20 09:36:23 +02:00
João Paulo Taylor Ienczak Zanette bfc3e9f96e eina: Close file in unlink test
At least on Windows (didn't have the time to test on Linux yet),
running tests, even if they passed, there would be an Eina error on logs
pointing that a temporary file wasn't closed:

```
ERR:eina_file ../src/lib/eina/eina_file_common.c:1137 eina_file_shutdown() File [C:/Users/joao_/AppData/Local/Temp/aaaa_file_test_EBpVea] still open 1 times !
```

In the end, it was the `eina_file_test_unlink` that would create a temporary
file but never close it, being caught only by `eina_shutdown()`.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D12062
2020-08-20 09:36:20 +02:00
Vincent Torri 047b59d934 eet test: use eina_file_mkstemp, fix include for vc++
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/D12108
2020-08-19 15:59:55 +02:00
João Paulo Taylor Ienczak Zanette f6672c91a8 eet: Fix 'No OPENSSL_Applink' error message.
In some systems (such as Windows), OpenSSL raises an error about "No Applink"
(see ["I've compiled a program under Windows and it crashes: why?" in OpenSSL
FAQ](https://www.openssl.org/docs/faq.html#PROG3)). Including only
openssl/applink.c didn't work, so the solution was to replace `FILE*`
interfaces with OpenSSL's BIO API which also contains file operations.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12103
2020-08-19 15:59:52 +02:00
Ali Alzyod eed4068fa2 evas_textblock: myanmar script rendering with e vowel.
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
2020-08-18 19:15:12 +09:00
AbdullehGhujeh eb0f7183dd Efl Canvas Text : canvas textblock changed not fired for shadow format (style_apply)
Summary:
If shadow format changed using style_apply , the event EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED will not be fired.
also added tests for it.

Reviewers: ali.alzyod, woohyun

Reviewed By: ali.alzyod

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11078
2020-08-18 18:10:04 +09:00
Ali Alzyod 4ad272a8c3 evas_object_textblock: utf8_to_markup support all escapse chars
Summary: update evas_textblock_text_utf8_to_markup to support all escape characters

Test Plan:
```
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include<Eina.h>
#include<Efl.h>
#include <Elementary.h>

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win,*textblock;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("Main", "App");
   elm_win_autodel_set(win, EINA_TRUE);

  textblock = evas_object_textblock_add(win);
  char * aaa = evas_textblock_text_utf8_to_markup(textblock,"A<<>>\"A\'\tA");
  // aaa ==  "A&lt;&lt;&gt;&gt;&quot;A&apos;<tab/>A";
   evas_object_size_hint_weight_set(textblock,EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(textblock,EVAS_HINT_FILL,EVAS_HINT_FILL);
   evas_object_show(textblock);

   evas_object_move(textblock,0,0);
   evas_object_resize(textblock,320,480);
   evas_object_resize(win,320,480);

   evas_object_show(win);
   elm_run();

   return 0;
}
ELM_MAIN()

```

Reviewers: lauromoura, CHAN, woohyun, bu5hm4n, bowonryu, tasn, herdsman

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8843
2020-08-18 17:34:02 +09:00
Myoungwoon Roy, Kim 463291548d docs: Correct the wrong API group name in elm_win and elm_glview
I found wrong API group name in elm_win and elm_glview and fixed them.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12075
2020-08-17 10:32:27 +02:00
João Paulo Taylor Ienczak Zanette de982276b7 eina: Use INVALID_FILE_ATTRIBUTES instead of magic number
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D12106
2020-08-17 09:56:45 +02:00
Alastair Poole b4e7f6de3b ecore_x: Add mode flags new in xrandr 1.2. 2020-08-15 15:52:56 +01:00
Carsten Haitzler 672d1de730 edje - calce - really respect max image size for img sets
when you have an image set for an image it wouldnt actually respect
image max size and not select something bigger than it.. now it will

@fix
2020-08-13 17:44:37 +01:00
Hermet Park 990c46c94d evas examples: remove unecessary beta tag.
vector legacy apis have been officially released.
it doesn't need beta tag anymore.
2020-08-13 17:03:14 +09:00
Marcel Hollerbach 812e9f9f09 eo: set idx on exit to 1 not to 0
if this is set to 0 the next iteration in the upper frame event would
decrement the 0 again leading to a overflow making the iteration and
callback array overflow.

Long story short: set ifx to 1 to prevent overflow, test added.

fixes T8787

Differential Revision: https://phab.enlightenment.org/D12101
2020-08-12 11:18:10 +02:00
Carsten Haitzler a923cb0f7b ecore input - make an unsupported joystick a warn not an err... 2020-08-11 13:49:30 +01:00
Alastair Poole c26f56aef9 elm_code: Selection start (with keyboard) fix.
When starting a selection we were jumping two characters. This
change resolves that.
2020-08-10 14:15:08 +01:00
Alastair Poole 39f21df493 elm_code: Always render N new lines (buffer).
If we don't have a buffer here you CAN lose the race when scrolling.
As there is a check later in the flow, we can just use a padding
of 64 instead of checking the range. This ensures that scrolling is
smooth and content is always rendered throughout an aggressive
scroll.
2020-08-10 11:17:32 +01:00
João Paulo Taylor Ienczak Zanette 7d2f3e85ec evil: Remove OS version check
Summary:
Current version checking is done with GetVersion, which is now deprecated and issues the warning:

```
'GetVersion' is deprecated [-Wdeprecated-declarations]
```

The first approach of this commit was to replace GetVersion call with the newer (and more reliable) `IsWindowsVistaOrGreater()` from versionhelpers.h, but nowadays it makes more sense to actually not even make that check, since it is more than unlinkely to happen that someone tries to compile/run EFL in Windows XP.

Reviewers: vtorri, stefan_schmidt, raster

Reviewed By: vtorri, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12095
2020-08-07 20:08:48 +01:00
Shinwoo Kim 0e91ec6c78 ecore_wl2_subsurf: follow wayland spec for sync
Summary:
By default a sub-suface is synchronized mode.
So when a sub-surface is created, its sync value should be TRUE.

If the E works as specification, user cannot make it work as
desynchronized mode by calling subsurface.set_sync(FALSE).

[Reference]
https://github.com/wayland-project/wayland/blob/master/protocol/wayland.xml
is telling "A sub-surface is initially in the synchronized mode."

signed-off-by: Shawn Lee <shiin.lee@samsung.com>

Reviewers: Hermet, zmike, devilhorns, raster

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12098
2020-08-07 12:00:13 +09:00
Marcel Hollerbach 67cd017aac eo: evalulate special counts earlier
we have these special counts which are > 0 when there is a callback
subscribed. THey are currently evalulated in _callback_call. However,
we can also skip the entire call from inside eo_base_class as we are
having the fields there as well.

This way we are skipping the obj pointer lookup and vtable lookup.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D12079
2020-08-06 10:34:33 +02:00
Marcel Hollerbach 3d547a0b06 eo: event callback call optimization
a little overfiew to how eos event emission is working:
- In eo there are 2 types of events restart events and normal events.
  Normals are *always* emitted from callback_max to 0
  Restarts are emitted from the previous emissions current idx to 0. The
  previous emission will stop then
- To keep track of the previous event emissions for restarts there was
  an eina inlist.
- To keep track of other things in eo, there was an additional eo event
  stack frame (newly inserted events etc. etc.)

This commit now uses this event stack frame for implementing the details
about the restart events. This has the advatage that every
efl_object_data contains one byte less, and the up to date keeping of
the id's in the restart infrastructure is not needed anymore, making the
whole event emission code less instructions and faster.

How this now works:
- Every emission has a event emission frame, when the emission starts,
  the frame is added, next points to the next older event emission. In
  this event stack frame we are storing the current idx, the description
  and a few other things that are not really relevant at this point.
- when a restart event is started, this event stack is searched from the
  current frame up to the next one featuring the same event description.
  The event frame stack is then remembered, if the event emission is
  done, the current idx (normally 0 or something higher when callback
  was stopped) is then copyied back to the earlier frame.
- Based on the nature of the event frame stacks, the idx is updated
  every iteration. And for the restart events, we only need to know the
  next, which removes the need of permanently updating the idx in the
  current stack.
- The event frame stack is not allocated on the heap, hence more things
  in there does not matter at all.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D12097
2020-08-06 10:34:31 +02:00
Wonki Kim 3f4bcd02dc edje_entry: fix a potentional error of null deref
this is a patch to fix a potentional error by null dereferencing.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D12087
2020-08-06 10:34:28 +02:00
Wonki Kim e4651d8fe5 efl_canvas: fix a potentional error of null deref
this is a patch to fix a potentional error by null dereferencing.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D12093
2020-08-05 10:47:15 +02:00
Wonki Kim efdd1b166e elm_access: fix a potentional error of null deref
Summary: this is a patch to fix a potentional error by null dereferencing.

Reviewers: jsuya, kimcinoo, bu5hm4n

Reviewed By: jsuya

Subscribers: kimcinoo, bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12092
2020-08-05 17:03:02 +09:00
Wonki Kim 8265c6a98f evas/engine: fix a potentional error of null deref
Summary: this is a patch to fix a potentional error by null dereferencing.

Reviewers: jsuya, bu5hm4n, Hermet

Reviewed By: jsuya, bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12091
2020-08-05 17:02:13 +09:00
Wonki Kim 19b603166a edje: fix a potentional error of null deref
Summary: this is a patch to fix a potentional error by null dereferencing.

Reviewers: jsuya, bu5hm4n, Hermet

Reviewed By: jsuya

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12086
2020-08-05 15:18:34 +09:00
Wonki Kim 7dcd14347d edje_edit: fix a potentional error of null deref
Summary: this is a patch to fix a potentional error by null dereferencing.

Reviewers: jsuya, bu5hm4n, cedric, Hermet

Reviewed By: jsuya

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12090
2020-08-05 15:14:25 +09:00
Bowon Ryu 39e9740fca edje_edit: add null check for return of eina_hash_find
Summary: to prevent null pointer dereference

Test Plan: N/A

Reviewers: cedric, jsuya

Reviewed By: jsuya

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12094
2020-08-05 15:09:05 +09:00
Shinwoo Kim bab3f870b8 embryo_cc: ++safty code
Summary:
This patch is increasing safty code by handling following case.

sc_compile > OH!! there is uninitialized loacal variable "outfname"!! >
setopt > about > longjmp > setjmp returns 3 > goto cleanup >

then uninitialized data is read from local variable "outfname".

Reviewers: raster, Hermet, jsuya, herb

Reviewed By: jsuya

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12074
2020-08-05 14:53:35 +09:00
junsu choi 26b50c91f8 evas_filter: Add null check for instruction
Summary:
Add a null check for cases where the param passed
from the filter instruction can be a null pointer.

Test Plan: N/A

Reviewers: kimcinoo, Hermet

Subscribers: #reviewers, #committers, cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12084
2020-08-05 14:45:22 +09:00
Ali Alzyod f126c7f06c efl_ui_textbox: preserve changing user color set
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
2020-08-05 13:33:03 +09:00
Ali Alzyod ed18471ba9 evas_textblock: enhance cursor event submitting during markup_set/text_set
Summary:
Enhance text cursor events submitting:
1- Submit events only for changed cursors.
2- Reduce code complexity for cursor change.
3- Add test case for cursor event change

Reviewers: woohyun, zmike, bu5hm4n

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11775
2020-08-05 13:09:00 +09:00
Ali Alzyod 45c6212d20 elm_entry/efl.ui.textbox: use common key shortcuts
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
2020-08-05 11:32:11 +09:00
Ali Alzyod 86c274ea33 evas_textblock: enhance escape character handling
Summary:
-Lazy initialization for html escapes lists
-Lower memory consumtion for escapes lists
-Simplify code maintenance by sorting lists on runtime, new items donot need to respect sort order(run time will handle it)

Reviewers: woohyun, bowonryu, cedric, tasn

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9370
2020-08-05 11:27:04 +09:00
Ali Alzyod 5d3497e506 efl.ui.textbox: Keyboard Enter will add paragraph separator
Summary:
efl.ui.textbox: Keyboard Enter will add paragraph separator and \n

because of D9064 Textbox multiline can work with paragraph separator

Reviewers: woohyun, segfaultxavi, bu5hm4n, zmike

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11201
2020-08-05 11:22:14 +09:00
junsu choi 2d7667aa44 efl_ui_timepicker: Add null check for efl_text_get
Prevent null access of the string passed from efl_text_get.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D12085
2020-08-04 14:52:35 +02:00
Wonki Kim f953909f59 evas: fix a potentional error of null deref
this is a patch to fix a potentional error by null dereferencing.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D12089
2020-08-04 14:52:28 +02:00
Carsten Haitzler ee9836c5e7 elput - support libelogind.so.0 as well as libelogind-shared.so.0
for gentoo...
@fix
2020-08-04 09:41:39 +01:00
Jaehyun Cho cc0328d9e5 edje_embryo: fix memory leak in ALLOC_COPY_DESC
Summary:
If memory allocation fails in ALLOC_COPY_DESC, then the allocated memory
is not free.
To fix this memory leak, memory allocation of Edje_Real_Part_State is
done prior to ALLOC_COPY_DESC.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12082
2020-08-04 15:11:36 +09:00
Youngbok Shin 5af8301bad embryo: fix a integer(cell) overflow problem
Summary:
The most of functions for embryo based on cell(int) types.
addvariable(), defsymbol(), modstk() and etc.
Because of this, if embryo script has a really big(INT_MAX / 4) stack variable,
integer overflow problem has been happened.
@fix

Test Plan:
Put a script in your EDC like the following code.
Build it and try to access the variable.
Or check the writen HEX value by embryo_cc.

script {
   // It's size is 1,000,000,000.
   // Remember, INT_MAX is 2,147,483,647.
   new my_big_variable[1000000000];
   ...
}

Reviewers: cedric, woohyun, raster, eunue, SanghyeonLee

Reviewed By: eunue, SanghyeonLee

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12081
2020-08-04 14:48:02 +09:00
SangHyeon Jade Lee 279cc45132 elm : fix return of gengrid item swap anim to prevent animation memory leak.
Summary:
this is memory leak fix on gengrid item move.
when animation reached 1.0, it finish all animation and returns EINA_FALSE to delete current animation.

Test Plan: N/A

Reviewers: eagleeye

Reviewed By: eagleeye

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12083
2020-08-04 14:30:18 +09:00
Jaehyun Cho 9dde786ffe edje_embryo: fix null pointer dereference in ALLOC_COPY_DESC
To fix null pointer dereference in ALLOC_COPY_DESC, allocated variable
"new" is checked.
2020-08-03 20:32:33 +09:00
Jaehyun Cho 6f981794ad edje_embryo: fix to use parameter of macro ALLOC_COPY_DESC
The parameter "To" of macro ALLOC_COPY_DESC is not used.
To use the parameter "To", "d" is replaced to "To".
2020-08-03 19:43:02 +09:00
Jaehyun Cho 52df41b217 evas_gl_core: fix memory leak of EVGL_Resource
If eng_data is NULL and rsc is not NULL in _internal_resources_destroy,
then the allocated EVGL_Resource rsc is not free.

To resolve this memory leak, eng_data and rsc are checked separately.
2020-08-03 18:43:36 +09:00
Carsten Haitzler 87bcc82976 efl ui image - fix scal to fill - broken with non-rect src images
@fix
2020-08-02 16:26:09 +01:00
Daniel Kolesa 5ed0161564 elua: add searchpath impl for 5.1 compat 2020-07-31 19:01:59 +02:00
Daniel Kolesa 794ca20078 elua: fix elua_register with 5.1 2020-07-31 19:01:59 +02:00
Daniel Kolesa 86ee71ce4d elua: do not link to cffi, load the module instead 2020-07-31 19:01:53 +02:00
Boris Faure db14b82549 elm_config: add slider to configure tooltip_delay
reviewers_: #reviewers, raster, cedric, netstar, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D12060
2020-07-31 13:24:43 +02:00
Yeongjong Lee 42d525e15b evas_textblock: remove logically dead code
Since `c->fmt` is allocated and dereferenced in `_layoutformat_push`, if
`c->fmt` is NULL, this causes a crash before checking for NULL.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D12076
2020-07-31 10:17:47 +02:00
Marcel Hollerbach 8d034f08e8 efl_ui_focus_manager: reduce the amount of relying on events
with this commit we are not replying on event invocations anymore, but
rather on direct flag observation in the focus manager itself.

This reduces the amount of events that are emitted as a consequence to
elements beeing marked dirty segnificantly.

startup time of elementary_test goes from 0.50 to 0.46s.

Differential Revision: https://phab.enlightenment.org/D12072
2020-07-31 10:17:42 +02:00
Yeongjong Lee 4e24854f46 ecore_ipc: remove duplicated condition
The same condition is used above.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12077
2020-07-31 10:14:00 +02:00
Carsten Haitzler ebdbbb593a eina vpath - fix windows ~username handling to only error when used
we would always rrturn 0 on windows ... missing  {} in block. fix that.

@fix
2020-07-30 11:13:37 +01:00
AbdullehGhujeh ea6a6afef5 evas_textblock : return correct value for gfx_filter_get
return the same variable set with gfx_filter_set.
added test for it.

Reviewed-by: Ali Alzyod <ali198724@gmail.com>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12071
2020-07-29 09:50:59 +02:00
AbdullehGhujeh a1826580dc evas_textblock : Remove unneeded code
Duplicated code removed

Reviewed-by: Ali Alzyod <ali198724@gmail.com>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12070
2020-07-29 09:50:55 +02:00
Lucas f09080fad5 evil: Remove unnecessary delay for evil startup
Apparently there were two loops intended for an older (and dropped
off) implementation of `gettimeofday`. This patch simplifies the code removing
these loops and significantly lowering evil startup.

Without this patch `ecore-suite`, `efl-app` and `evas-suite` gets timeout in
Windows:
```
25/29 ecore-suite               TIMEOUT        30.12s
26/29 efl-app                   TIMEOUT        30.14s
...
29/29 evas-suite                TIMEOUT        60.07s
```

Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12064
2020-07-29 09:50:52 +02:00
Marcel Hollerbach a25bc7e769 tests: fix eio tests
there are tests that init & shutdown efl_object in the same test, which
is since to switch to const _CLASS_GET dangerously wrong.

I checked for more cases but only found cases where no _CLASS_GET
macros where used.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12069
2020-07-28 10:05:54 +02:00
Carsten Haitzler 6e4a3ba9f9 evas - render - dont crash is private data is null
@fix
2020-07-27 22:46:05 +01:00
Ali Alzyod 239cc32dbf evas: remove unused define
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12066
2020-07-27 16:30:02 +02:00
Ali Alzyod 7a1d6375ea elementry_test: fix allocation size
This fix Coverty Issue CID: 1430579

Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12065
2020-07-27 14:37:31 +02:00
Hermet Park fb33fcb370 canvas engine: ++safety code
added null checking, no logical changes.
2020-07-27 14:29:03 +09:00
Carsten Haitzler 29a72e9c6c efreetd - add more logging for what efreetd says to clients 2020-07-24 23:22:47 +01:00
Carsten Haitzler b01b219017 efreetd - log the cache runs and when they launch, show data, exit 2020-07-24 23:02:16 +01:00
Carsten Haitzler 52ec7be013 efreetd - dont confuse log file file handle and log math func
better not to use the same symbol...
2020-07-24 21:22:33 +01:00
Ali Alzyod 54850ccd2f evas: font glyphs texture garbage collector
Summary:
Introduce two public APIS
```
#define EVAS_FONT_DATA_CACHE_TEXTURE 0x01

/**
 * Set the limit in bytes for memory allocated by font glyphs in evas.
 * @param[in] bytes cache size in bytes, pass negative value to ignore the limit.
 * @param[in] options for caching, pass 0x1 to set the texture cache (in case of accelerated rendering).
 *
 * @since 1.24
 */
EAPI void                    evas_font_data_cache_set(signed long long int byte, int options);

/**
 * @}
 */

/**
 * Get the limit in bytes for memory allocated by font glyphs in evas.
 * @param[in] options for caching, pass 0x1 to get the texture cache (in case of accelerated rendering).
 * @return Returns font allocated memory cache limit, if value is negative this means no limit.
 * @since 1.24
 */
EAPI signed long long int    evas_font_data_cache_get(int options);
```

Test Plan:
elementary_test => Text Memory
You need a tool to observe Video memory allocation.
1- If you have detected Graphics card then use **radiontop** or  **nvidia-smi** ).
2- If you have Integrated Graphics card, then you can detect memory allocation on RAM use.

----------------------------------------------

this example allows only 50 MByte Video memory texture allocated by font glyphs
```
#include <Elementary.h>

typedef struct _APP
{
  Evas_Object *tb1;
  Evas_Object *btnLoad;
} APP;

char *text = "<align=center><color=#4DE0FFFF underline=on underline_color=#4DE0FFFF><a href='tel:1234567890'>1234567890</a></color>😀😁😂🤣😃😄😅😆😉😊😋😎😍😘😗😙😚🙂🤗🤔😐😑😶🙄😏😣😥😮🤐😯😪😫😴😌🤓😛😜😝🤤😒😓😔😕🙃🤑😲🙁😖😞😟😤😢😭😦😧😨😩😬😰😱😳😵😡😠😇🤠🤡🤥😷🤒🤕🤢🤧😈👿👹👺💀👻👽👾🤖💩😺😸😹😻😼😽🙀😿😾🙈🙉🙊👦👧👨👩👵👶👼👨‍⚕️👩‍⚕️👨‍🎓👩‍🎓👨‍🏫👩‍🏫👨‍⚖👩‍⚖👨‍🌾👩‍🌾👨‍🍳👩‍🍳👨‍🔧👩‍🔧👨‍🏭👩‍🏭👨‍💼👩‍💼👨‍🔬👩‍🔬👨‍💻👩‍💻👨‍🎤👩‍🎤👨‍🎨👩‍🎨👨‍✈️👩‍✈️👨‍🚀👩‍🚀👨‍🚒👩‍🚒👮‍♂️👮‍♀️🕵️‍♂️🕵️‍♀️💂‍♂️💂‍♀️👷‍♂️👷‍♀️👳‍♂️👳‍♀️👱‍♂️👱‍♀️🎅🤶👸🤴👰🤵🤰👲🙍‍♂️🙍‍♀️🙎‍♂️🙎‍♀️🙅‍♂️🙅‍♀️🙆‍♂️🙆‍♀️💁‍♂️💁‍♀️🙋‍♂️🙋‍♀️🙇‍♂️🙇‍♀️🤦‍♂️🤦‍♀️🤷‍♂️🤷‍♀️💆‍♂️💆‍♀️💇‍♂️💇‍♀️🚶‍♂️🚶‍♀️🏃‍♂️🏃‍♀️💃🕺👯‍♂️👯‍♀️🕴🗣👤👥👫👬👭💏💑👪👨‍👩‍👧👨‍👩‍👧‍👦👨‍👩‍👦‍👦👨‍👩‍👧‍👧👨‍👦👨‍👦‍👦👨‍👧👨‍👧‍👦👨‍👧‍👧👩‍👦👩‍👦‍👦👩‍👧👩‍👧‍👦👩‍👧‍👧💪🤳👈👉☝️👆🖕👇🤞🖖🤘👊🖐👌👍👎👊🤛🤜🤚👋👏👐🙌🙏🤝💅👂👃👣👀👁👅👄💋💘💓💔💕💖💗💙💚💛💜🖤💝💞💟💌💤💢💣💥💦💨💫💬🗨🗯💭🕳👓🕶👔👕👖👗👘👙👚👛👜👝🛍🎒👞👟👠👡👢👑👒🎩🎓📿💄💍💎🐵🐒🦍🐶🐕🐩🐺🦊🐱🐈🦁🐯🐅🐆🐴🐎🦌🦄🐮🐂🐃🐄🐷🐖🐗🐽🐏🐑🐐🐪🐫🐘🦏🐭🐁🐀🐹🐰🐇🐿🦇🐻🐨🐼🐾🦃🐔🐓🐣🐤🐥🐦🐧🕊🦅🦆🦉🐸🐊🐢🦎🐍🐲🐉🐳🐋🐬🐟🐠🐡🦈🐙🐚🦀🦐🦑🦋🐌🐛🐜🐝🐞🕷🕸🦂💐🌸💮🏵🌹🥀🌺🌻🌼🌷🌱🌲🌳🌴🌵🌾🌿🍀🍁🍂🍃🍇🍈🍉🍊🍋🍌🍍🍎🍏🍐🍑🍒🍓🍅🥝🥑🍆🥔🥕🌽🌶🥒🍄🥜🌰🍞🥐🥖🥞🧀🍖🍗🥓🍔🍟🍕🌭🌮🌯🥙🥚🍳🥘🍲🥗🍿🍱🍘🍙🍚🍛🍜🍝🍠🍢🍣🍤🍥🍡🍦🍧🍨🍩🍪🎂🍰🍫🍬🍭🍮🍯🍼🥛🍵🍶🍾🍷🍸🍹🍺🍻🥂🍽🍴🥄🔪🏺🎃🎄🎆🎇🎈🎉🎊🎋🎍🎎🎏🎐🎑🎀🎁🎗🎟🎫🎖🏆🏅🥇🥈🥉🏀🏐🏈🏉🎾🎱🎳🏏🏑🏒🏓🏸🥊🥋🥅🎯🏌️‍♂️🏌️‍♀️🎣🎽🎿🏂🏄‍♂️🏄‍♀️🏇🏊‍♂️🏊‍♀️⛹️‍♂️⛹️‍♀️🏋️‍♂️🏋️‍♀️🚴‍♂️🚴‍♀️🚵‍♂️🚵‍♀️🏎🏍🤸‍♂️🤸‍♀️🤼‍♂️🤼‍♀️🤽‍♂️🤽‍♀️🤾‍♂️🤾‍♀️🤺🤹‍♂️🤹‍♀️🎮🕹🎲♠️♥️♦️♣️🃏🀄🎴🌍🌎🌏🌐🗺🏔⛰🌋🗻🏕🏖🏜🏝🏞🏟🏛🏗🏘🏙🏚🏠🏡🏢🏣🏤🏥🏦🏨🏩🏪🏫🏬🏭🏯🏰💒🗼🗽🕌🕍🕋🌁🌃🌄🌅🌆🌇🌉♨️🌌🎠🎡🎢💈🎪🎭🖼🎨🎰🚂🚃🚄🚅🚆🚇🚈🚉🚊🚝🚞🚋🚌🚍🚎🚐🚑🚒🚓🚔🚕🚖🚗🚘🚙🚚🚛🚜🚲🛴🛵🚏🛣🛤🚨🚥🚦🚧🛑🚣‍♂️🚣‍♀️🛶🚤🛳⛴🛥🚢✈🛩🛫🛬💺🚁🚟🚠🚡🚀🛰🛎🚪🛌🛏🛋🚽🚿🛀🛁⏱⏲🕰🕛🕧🕐🕜🕑🕝🕒🕞🕓🕟🕔🕠🕕🕡🕖🕢🕗🕣🕘🕤🕙🕥🕚🕦🌑🌒🌓🌔🌕🌖🌗🌘🌙🌚🌛🌜🌡☀️🌝🌞🌟🌠☁️⛈🌤🌥🌦🌧🌨🌩🌪🌫🌬🌀🌈🌂☂️☃️🔥💧🌊🔇🔈🔉🔊📢📣📯🔔🔕🎼🎵🎶🎙🎚🎛🎤🎧📻🎷🎸🎹🎺🎻🥁📱📲☎️📞📟📠🔋🔌💻🖥🖨⌨🖱🖲💽💾💿📀🎥🎞📽🎬📺📷📸📹📼🔍🔎🔬🔭📡🕯💡🔦🏮📔📕📖📗📘📙📚📓📒📃📜📄📰🗞📑🔖🏷💰💴💵💶💷💸💳💱💲📧📨📩📤📥📦📫📪📬📭📮🗳✏✒🖋🖊🖌🖍📝💼📁📂🗂📅📆🗒🗓📇📈📉📊📋📌📍📎🖇📏📐✂️🗃🗄🗑🔒🔓🔏🔐🔑🗝🔨⛏⚒🛠🗡⚔🔫🏹🛡🔧🔩⚙🗜⚗⚖🔗💉💊🚬⚰⚱🗿🛢🔮🔮🏧🚮🚰🚹🚺🚻🚼🚾🛂🛃🛄🛅⚠️🚸🚫🚳🚭🚯🚱🚷📵🔞☢☣⬆️↗️➡️↘️⬇️↙️⬅️↖️↕️↔️↩↪⤴️⤵️🔃🔄🔙🔚🔛🔜🔝🛐⚛🕉✡☸☯️☦☮🕎🔯🔀🔁🔂▶️⏭⏯◀️🔼🔽⏸⏹⏺⏏🎦🔅🔆📶📳📴♻️📛🔰🔱☑✔✖♀️♂️〽✳✴❇⁉️🔟💯🔠🔡🔢🔣🔤🅰️🆎🅱️🆑🆒🆓️ℹ🆔Ⓜ️🆕🆖🅾️🆗🅿️🆘🆙🆚🈁🈂🈷🈶🈯🉐🈹🈚🈲🉑🈸🈴🈳㊗㊙🈺🈵▫️◻◼🔶🔷🔸🔹🔺🔻💠🔘🔲🔳🔴🔵🏁🚩🏴🏳🏳️‍🌈⚀⚁⚂⚃⚄⚅⛾♾🇦🇨🇦🇩🇦🇪🇦🇫🇦🇬🇦🇮🇦🇱🇦🇲🇦🇴🇦🇶🇦🇷🇦🇸🇦🇹🇦🇺🇦🇼🇦🇽🇦🇿🇧🇦🇧🇧🇧🇩🇧🇪🇧🇫🇧🇬🇧🇭🇧🇮🇧🇯🇧🇱🇧🇲🇧🇳🇧🇴🇧🇶🇧🇷🇧🇸🇧🇹🇧🇼🇧🇾🇧🇿🇨🇦🇨🇨🇨🇩🇨🇫🇨🇬🇨🇭🇨🇮🇨🇰🇨🇱🇨🇲🇨🇳🇨🇴🇨🇷🇨🇺🇨🇻🇨🇼🇨🇽🇨🇾🇨🇿🇩🇪🇩🇯🇩🇰🇩🇲🇩🇴🇩🇿🇪🇨🇪🇪🇪🇬🇪🇭🇪🇷🇪🇸🇪🇹🇪🇺🇫🇮🇫🇯🇫🇰🇫🇲🇫🇴🇫🇷🇬🇦🇬🇧🇬🇩🇬🇪🇬🇫🇬🇬🇬🇭🇬🇮🇬🇱🇬🇲🇬🇳🇬🇵🇬🇶🇬🇷🇬🇸🇬🇹🇬🇺🇬🇼🇬🇾🇭🇰🇭🇲🇭🇳🇭🇷🇭🇹🇭🇺🇮🇨🇮🇩🇮🇪🇮🇱🇮🇲🇮🇳🇮🇴🇮🇶🇮🇷🇮🇸🇮🇹🇯🇪🇯🇲🇯🇴🇯🇵🇰🇪🇰🇬🇰🇭🇰🇮🇰🇲🇰🇳🇰🇵🇰🇷🇰🇼🇰🇾🇰🇿🇱🇦🇱🇧🇱🇨🇱🇮🇱🇰🇱🇷🇱🇸🇱🇹🇱🇺🇱🇻🇱🇾🇲🇦🇲🇨🇲🇩🇲🇪🇲🇬🇲🇭🇲🇰🇲🇱🇲🇲🇲🇳🇲🇴🇲🇵🇲🇶🇲🇷🇲🇸🇲🇹🇲🇺🇲🇻🇲🇼🇲🇽🇲🇾🇲🇿🇳🇦🇳🇨🇳🇪🇳🇫🇳🇬🇳🇮🇳🇱🇳🇴🇳🇵🇳🇷🇳🇺🇳🇿🇴🇲🇵🇦🇵🇪🇵🇫🇵🇬🇵🇭🇵🇰🇵🇱🇵🇲🇵🇳🇵🇷🇵🇸🇵🇹🇵🇼🇵🇾🇶🇦🇷🇪🇷🇴🇷🇸🇷🇺🇷🇼🇸🇦🇸🇧🇸🇨🇸🇩🇸🇪🇸🇬🇸🇭🇸🇮🇸🇰🇸🇱🇸🇲🇸🇳🇸🇴🇸🇷🇸🇸🇸🇹🇸🇻🇸🇽🇸🇾🇸🇿🇹🇦🇹🇨🇹🇩🇹🇫🇹🇬🇹🇭🇹🇯🇹🇰🇹🇱🇹🇲🇹🇳🇹🇴🇹🇷🇹🇹🇹🇻🇹🇼🇹🇿🇺🇦🇺🇬🇺🇳🇺🇸🇺🇾🇺🇿🇻🇦🇻🇨🇻🇪🇻🇬🇻🇮🇻🇳🇻🇺🇼🇫🇼🇸🇽🇰🇾🇪🇾🇹🇿🇦🇿🇲🇿🇼8<br/><br/><br/><br/>Sent from my Samsung Galaxy smartphone.</align>";
int font_size = 200;

int counter = 0;
void _button_clicked(void *data, Evas_Object *obj, void *event_info)
{
   APP *app = data;

  font_size -= 5;
  Evas_Textblock_Style *style = evas_textblock_style_new();
  char buffer[100] = {0};
  sprintf(buffer, "DEFAULT='font=NotoColorEmoji font_size=%i color=red ellipsis=-1.0 wrap=mixed'", font_size);
  evas_textblock_style_set(style, buffer);
  evas_object_textblock_style_set(app->tb1, style);
  evas_textblock_style_free(style);
  style = NULL;
}

EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
  APP *app = calloc(1, sizeof(APP));
  Evas_Object *win, *scroller1, *scroller2, *box;

  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);
  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);
  scroller1 = elm_scroller_add(win);
  evas_object_size_hint_weight_set(scroller1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
  evas_object_size_hint_align_set(scroller1, EVAS_HINT_FILL, EVAS_HINT_FILL);

  evas_font_data_cache_set(50 * 1024* 1024, EVAS_FONT_DATA_CACHE_TEXTURE );

  app->tb1 = evas_object_textblock_add(win);
  Evas_Textblock_Style *style = evas_textblock_style_new();
  char buffer[100] = {0};
  sprintf(buffer, "DEFAULT='font=NotoColorEmoji font_size=%i color=red ellipsis=-1.0 wrap=mixed'", font_size);
  evas_textblock_style_set(style, buffer);
  evas_object_textblock_style_set(app->tb1, style);
  evas_textblock_style_free(style);
  style = NULL;

  evas_font_cache_set(evas_object_evas_get(app->tb1), 0);

  int w,h;
  evas_object_textblock_text_markup_set(app->tb1, "");
  evas_object_size_hint_min_set(app->tb1, 400, 400);
  elm_object_content_set(scroller1, app->tb1);
  elm_box_pack_end(box, scroller1);
  elm_object_content_set(win, box);

  app->btnLoad = elm_button_add(win);
  elm_object_text_set(app->btnLoad, "Scale Font");
  evas_object_smart_callback_add(app->btnLoad, "clicked", _button_clicked, app);
  evas_object_show(app->btnLoad);
  evas_object_move(app->btnLoad, 0, 20);
  evas_object_resize(app->btnLoad, 150, 20);

  evas_object_textblock_text_markup_set(app->tb1, text);
  evas_object_textblock_size_formatted_get(app->tb1, &w, &h);
  evas_object_size_hint_min_set(app->tb1, 400, w/400 + h + 150);

  evas_object_resize(win, 400, 400);
  evas_object_show(box);
  evas_object_show(scroller1);
  evas_object_show(scroller2);
  evas_object_show(win);
  elm_run();

  return 0;
}
ELM_MAIN()

```

Reviewers: raster, woohyun, zmike, cedric, bu5hm4n, Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8737

Differential Revision: https://phab.enlightenment.org/D11943
2020-07-24 10:36:27 +01:00
Bowon Ryu 59b9bbc496 edje_textblock: remove duplicated textblock style properties
Summary:
When there is "font" and "font_size" in  textblock style (already defined),
If "font" and "font_size" are set using edje_text_class_set(),
then "font" and "font_size" are defined duplicated in texblock style through eina_strbuf_append.

Duplicate properties use memory unnecessarily,
and also it is possible to cause confusion at debbuging.

This patch replaces duplicate properties "font", "font_size" using eina_strbuf_replace.

Test Plan:
* textblock style in edc
"font=Sans font_size=20 wrap=mixed text_class=TEXT_CLASS";

* edje_text_class_set in c
edje_text_class_set("TEXT_CLASS", "font=DejavuSans", 40);

* textblock style at runtime (BEFORE)
DEFAULT='font=Sans font_size=20 wrap=mixed font_size=40.0 font=DejavuSans'

* textblock style at runtime (AFTER)
DEFAULT='font=DejavuSans font_size=40 wrap=mixed'

Reviewers: subodh6129, woohyun, ali.alzyod

Reviewed By: ali.alzyod

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11962
2020-07-22 19:16:32 +09:00
Carsten Haitzler 534457c51d elm - genlist/grid - call realized/unrealized item func cb after eo cb 2020-07-21 08:56:16 +01:00
Carsten Haitzler b158abfabb elm - genlist+gird - use item specific realize/unrealize not eo callback
this saves a lot of cpu overhead to specialize this with func ptrs in
the widget item struct instead of everyone listening on the parent
gengrid/genlist widget and eo having to walk lots of callbacks and
call them all...

major optimization

@opt
2020-07-20 22:24:31 +01:00
Carsten Haitzler 2a2da5254c win - x io errors really just have to exit, so call the iorr cb + exit
from xlib man page:

The XSetIOErrorHandler sets the fatal I/O error  handler. Xlib  calls
the  program's  supplied error handler if any sort of system call error
occurs (for example, the connection to the server was lost). This  is
assumed  to be a fatal condition, and the called routine should not re‐
turn.  If the I/O error handler does return, the client process exits.

@fix
2020-07-20 14:33:52 +01:00
Marcel Hollerbach a931e41823 efl: make all _class_get() functions const
please note, not the return type, but the function.
When appending __attribute__((const)) to a function, the compiler is
told that its enough to call this function once in a function.

This is quite often happening when we are efl_data_scope_get and
efl_super in a function that is different from a implemented function.

The compiler now starts to remove the calls that aggressivly that we
need to ensure that these calls are not removed, which means, the static
function calls, and the eo init are now checking the return value of
these functions, to ensure that they are called.

Please note that you now have to be carefull when your app calls
eo_shutdown, if it does so, you *must* call it at the end of a function,
or never call class_get after that anymore.

Overall this improves elm test runs 0.1s which is fair i guess, the main
thing that is faster is textrendering, where is also the point where
this is the most beneficial.

Please note, this replaces 42 occurences of double _class_get() ... THAT
is a sign!

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Differential Revision: https://phab.enlightenment.org/D12057
2020-07-20 11:27:53 +02:00
Vincent Torri a9710f54c1 Eina log: flush stderr on mintty-based terminals
Summary: on those terminal, stderr is never flushed, so errors messages are not displayed when, for example, the app crashes

Test Plan:
test program :

```#include <Eina.h>

#define ERR(...)  EINA_LOG_DOM_ERR(log_dom, __VA_ARGS__)

int main()
{
  int log_dom = -1;

  eina_init();

  log_dom = eina_log_domain_register("eet", EINA_COLOR_CYAN);
  if (log_dom < 0)
    {
      printf("error register\n");
      return 0;
    }

  ERR("an error.");

  while (1)
    {
    }

  return 0;
}
```

without the patch, nothing is displayed, even after a Ctrl-C to finish the program

with the patch, the error message is displayed

Reviewers: raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12058
2020-07-19 18:27:49 +01:00
Carsten Haitzler d6f210b3a0 Revert "edje: Avoid string duplication when possible."
This reverts commit 8941514b46.

found that this breaks e's systray icon layout... :(
2020-07-17 10:45:30 +01:00
Taehyub Kim 903e2832ba efl_ui_image: remove the unnecessary code in efl_file_unload
Summary:
we don't need the image preload api call in efl_file_unload,
this make the unexpected SIG_LOAD_ERROR emit, when elm_image_memfile_set() is called.

@fix

Reviewers: Hermet, jsuya, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12056
2020-07-17 10:08:43 +09:00
Carsten Haitzler 9a2776811d edje example - dont leak text 2020-07-16 21:00:36 +01:00
Woochanlee 8941514b46 edje: Avoid string duplication when possible.
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.

Test Plan:
edje-suite (34/37 edje-suite                              OK       0.67 s)
elementary-test
app launching on enlightenment

Reviewers: raster, smohanty, Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12055
2020-07-16 11:37:10 +01:00
Ali Alzyod 8504f213d6 edje_cc : resolve build warning
Reviewers: raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12054
2020-07-16 10:01:26 +01:00
Stefan Schmidt 4935085fd8 elm: tests: fix typo in test name
Found while working on exactness scenarios. Better get this fixed here
before we use it in tools like exactness and make it harder to change.
2020-07-16 10:59:22 +02:00
Vincent Torri fd24e89144 Evas: add avif evas loader and saver
Summary:
Add AV1 image file loader and saver to Evas

The loader can be tested with this code :

```
#include <stdlib.h>
#include <stdio.h>

#include <Eina.h>
#include <Ecore.h>
#include <Evas.h>
#include <Ecore_Evas.h>

static int i = 0;

static unsigned char _timer(void *data)
{
  Evas_Object *o = (Evas_Object *)data;

  if (i < evas_object_image_animated_frame_count_get(o))
    {
      evas_object_image_animated_frame_set(o, i);
      i++;
      return ECORE_CALLBACK_RENEW;
    }

  return ECORE_CALLBACK_DONE;
}

static void _quit(Ecore_Evas *ee)
{
  ecore_main_loop_quit();
  (void)ee;
}

int main(int argc, char *argv[])
{
  Ecore_Evas *ee;
  Evas *evas;
  Evas_Object *o;
  int w,h;
  Evas_Load_Error err;

  if (argc < 2)
    {
      printf("usage : %s file\n", argv[0]);
      return 1;
    }

  ecore_evas_init();

  ee = ecore_evas_new(NULL, 0, 0, 1, 1, NULL);
  if (!ee)
    {
      printf("no ee\n");
      return 0;
    }

  evas = ecore_evas_get(ee);
  ecore_evas_title_set(ee, "avif test");
  ecore_evas_callback_delete_request_set(ee, _quit);

  o = evas_object_image_add(evas);
  evas_object_image_file_set(o, argv[1], NULL);
  err = evas_object_image_load_error_get(o);
  if (err != EVAS_LOAD_ERROR_NONE)
    {
      fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
              argv[1], evas_load_error_str(err));
      return 1;
    }

  evas_object_image_size_get(o, &w, &h);
  evas_object_image_fill_set(o, 0, 0, w, h);
  evas_object_move(o, 0, 0);
  evas_object_resize(o, w, h);
      evas_object_show(o);

  printf("animated : %s\n", evas_object_image_animated_get(o) ? "yes" : "no");
  fflush(stdout);

  if (evas_object_image_animated_get(o))
    {
      Ecore_Timer *timer;
      printf("frame count : %d\n", evas_object_image_animated_frame_count_get(o));
      printf("duration    : %f\n", evas_object_image_animated_frame_duration_get(o,1,0));
      printf("loop count  : %d\n", evas_object_image_animated_loop_count_get(o));
      fflush(stdout);

      timer = ecore_timer_add(evas_object_image_animated_frame_duration_get(o,1,0), _timer, o);
    }

  ecore_evas_resize(ee, w,  h);
  ecore_evas_show(ee);

  ecore_main_loop_begin();

  ecore_evas_shutdown();

  return 0;
}
```

non animated files : https://github.com/AOMediaCodec/libavif/tree/master/tests/data/originals
animated files : https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Netflix/avifs

to test the saver :

```
#include <stdlib.h>
#include <stdio.h>
#include <math.h>

#include <Eina.h>
#include <Ecore.h>
#include <Evas.h>
#include <Ecore_Evas.h>

void _quit(Ecore_Evas *ee)
{
  ecore_main_loop_quit();
  (void)ee;
}

static Evas_Object *
display_data(int w, int h, const char *title, unsigned int *data)
{
  Ecore_Evas *ee;
  Evas *evas;
  Evas_Object *o;
  unsigned int *d;

  ee = ecore_evas_new(NULL, 0, 0, w, h, NULL);
  if (!ee)
    return NULL;

  evas = ecore_evas_get(ee);
  ecore_evas_title_set(ee, title);
  ecore_evas_callback_delete_request_set(ee, _quit);

  o = evas_object_image_add(evas);
  evas_object_image_fill_set(o, 0, 0, w, h);
  evas_object_image_size_set(o, w, h);

  d = evas_object_image_data_get(o, 1);
  for (int i = 0; i < w*h; i++)
    d[i] = data[i];
  evas_object_image_data_set(o, d);
  evas_object_image_data_update_add(o, 0, 0, w, h);
  evas_object_move(o, 0, 0);
  evas_object_resize(o, w, h);
  evas_object_show(o);

  ecore_evas_show(ee);

  return o;
}

static unsigned int *
display_file(const char *title, const char *filename, int *w, int *h)
{
  Ecore_Evas *ee;
  Evas *evas;
  Evas_Object *o;
  Evas_Load_Error err;
  unsigned int *data;

  ee = ecore_evas_new(NULL, 0, 0, 1, 1, NULL);
  if (!ee)
    return NULL;

  evas = ecore_evas_get(ee);
  ecore_evas_title_set(ee, title);
  ecore_evas_callback_delete_request_set(ee, _quit);

  o = evas_object_image_add(evas);
  evas_object_image_file_set(o, filename, NULL);
  err = evas_object_image_load_error_get(o);
  if (err != EVAS_LOAD_ERROR_NONE)
    {
      fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
              filename, evas_load_error_str(err));
      fflush(stderr);
      return NULL;
    }

  evas_object_image_size_get(o, w, h);
  evas_object_image_fill_set(o, 0, 0, *w, *h);
  evas_object_image_size_set(o, *w, *h);
  evas_object_move(o, 0, 0);
  evas_object_resize(o, *w, *h);
  evas_object_show(o);

  ecore_evas_resize(ee, *w, *h);
  ecore_evas_show(ee);

  data = evas_object_image_data_get(o, 1);

  return data;
}

double psnr(int w, int h, unsigned int *data_orig, unsigned int *data)
{
  unsigned char *iter_orig;
  unsigned char *iter;
  double psnr;

  psnr = 0.0;
  iter_orig = (unsigned char *)data_orig;
  iter = (unsigned char *)data;
  for (int i = 0; i < 4 * w * h; i++, iter_orig++, iter++)
    psnr += (*iter_orig - *iter) * (*iter_orig - *iter);
  psnr /= 4 * w * h;
  psnr = 10 * log10(255.0 * 255.0 / psnr);
  return psnr;
}

void compare(int quality, int w, int h, unsigned int *data_orig)
{
  char title[1024];
  char filename[1024];
  unsigned char *data;
  unsigned int *data_jpeg;
  unsigned int *data_avif;
  unsigned char *iter_orig;
  unsigned char *iter_jpeg;
  unsigned char *iter_avif;
  double psnr_jpeg;
  double psnr_avif;
  Eina_File *f_jpeg;
  Eina_File *f_avif;
  size_t size_jpeg;
  size_t size_avif;

  /* jpeg */

  snprintf(title, sizeof(title), "jpeg test quality %d", quality);
  snprintf(filename, sizeof(filename), "test_%d.jpg", quality);
  data_jpeg = display_file(title, filename, &w, &h);
  if (!data_jpeg)
    return;

  f_jpeg = eina_file_open(filename, EINA_FALSE);
  size_jpeg = eina_file_size_get(f_jpeg);
  eina_file_close(f_jpeg);
  fprintf(stderr, "size : %u\n", (unsigned int)size_jpeg);
  fflush(stderr);

  /* avif */

  snprintf(title, sizeof(title), "avif test quality %d", quality);
  snprintf(filename, sizeof(filename), "test_%d.avif", quality);
  data_avif = display_file(title, filename, &w, &h);
  if (!data_avif)
    return;

  f_avif = eina_file_open(filename, EINA_FALSE);
  size_avif = eina_file_size_get(f_avif);
  eina_file_close(f_avif);
  fprintf(stderr, "size : %u\n", (unsigned int)size_avif);
  fflush(stderr);

  psnr_jpeg = psnr(w, h, data_orig, data_jpeg);
  fprintf(stderr, "psnr jpeg : %f\n", psnr_jpeg);
  fflush(stderr);

  snprintf(title, sizeof(title), "jpeg vs orig (psnr: %.2f, size: %u b)", psnr_jpeg, (unsigned int)size_jpeg);
  iter_orig = (unsigned char *)data_orig;
  iter_jpeg = (unsigned char *)data_jpeg;
  data = malloc(4*w*h);
  for (int i = 0; i < 4*w*h; i++, iter_orig++, iter_jpeg++)
    data[i] = abs(*iter_jpeg - *iter_orig);
  display_data(w, h, title, (unsigned int *)data);

  psnr_avif = psnr(w, h, data_orig, data_avif);
  fprintf(stderr, "psnr avif : %f\n", psnr_avif);
  fflush(stderr);

  snprintf(title, sizeof(title), "avif vs orig (psnr: %.2f, size: %u b)", psnr_avif, (unsigned int)size_avif);
  iter_orig = (unsigned char *)data_orig;
  iter_avif = (unsigned char *)data_avif;
  data = malloc(4*w*h);
  for (int i = 0; i < 4*w*h; i++, iter_orig++, iter_avif++)
    data[i] = abs(*iter_avif - *iter_orig);
  display_data(w, h, title, (unsigned int *)data);
}

int main()
{
  Ecore_Evas *ee;
  Evas *evas;
  Evas_Object *o;
  Evas_Load_Error err;
  unsigned int *data;
  int w,h;

  ecore_evas_init();

  ee = ecore_evas_new(NULL, 0, 0, 1, 1, NULL);
  if (!ee)
    return 1;

  evas = ecore_evas_get(ee);
  ecore_evas_title_set(ee, "original");
  ecore_evas_callback_delete_request_set(ee, _quit);

  o = evas_object_image_add(evas);
  evas_object_image_file_set(o, "x1d-II-sample-02.fff", NULL);
  err = evas_object_image_load_error_get(o);
  if (err != EVAS_LOAD_ERROR_NONE)
    {
      fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
              "x1d-II-sample-02.fff", evas_load_error_str(err));
      fflush(stderr);
      return 1;
    }

  evas_object_image_size_get(o, &w, &h);
  evas_object_image_fill_set(o, 0, 0, w, h);
  evas_object_image_size_set(o, w, h);
  evas_object_move(o, 0, 0);
  evas_object_resize(o, w, h);
  evas_object_show(o);

  data = evas_object_image_data_get(o, 1);

  ecore_evas_resize(ee, w, h);
  ecore_evas_show(ee);

  /* evas_object_image_save(o, "test_100.jpg", NULL, "quality=100"); */

  evas_object_image_save(o, "test_90.jpg", NULL, "quality=90");
  /* evas_object_image_save(o, "test_70.jpg", NULL, "quality=70"); */
  /* evas_object_image_save(o, "test_50.jpg", NULL, "quality=50"); */

  /* evas_object_image_save(o, "test_100.avif", NULL, "quality=100"); */

  evas_object_image_save(o, "test_90.avif", NULL, "quality=90");
  /* evas_object_image_save(o, "test_70.avif", NULL, "quality=70"); */
  /* evas_object_image_save(o, "test_50.avif", NULL, "quality=50"); */

  compare(90, w, h, data);

  ecore_main_loop_begin();

  ecore_evas_shutdown();

  return 0;
}
```

the raw file canbe found here : https://www.hasselblad.com/learn/sample-images/

Test Plan: test executable with avif files found in libavif project

Reviewers: raster, q66

Reviewed By: q66

Subscribers: q66, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12051
2020-07-15 18:51:27 +01:00
Carsten Haitzler a8538bacce edje - fix edje_cc mis-re-iding images in image sets
wanr of unused images so it's properly fixed too... always warn to
stdout so devs know to cleanup their theme. by not removing image sets
this fixes the mis-id'ing too.

@fix
2020-07-15 12:22:22 +01:00
Alastair Poole f0aede6052 elm_code: cursor visbility fix.
If the widget is scrollable on the x axis, the cursor was being
displayed in some rare cases when scrolling and the code widget
did not cover the whole window region. e.g. a filepanel to the
left of the widget could potentially have the cursor erroneously
shown. This fixes as per the y axis hide.

@fix
2020-07-14 12:16:30 +01:00
Alastair Poole 9f7fde560a elm_code: on newline ensure line number visible.
@fix T2798
2020-07-14 11:12:29 +01:00
Carsten Haitzler f620e0edd1 Revert "Evas: add avif evas loader"
This reverts commit dd23a6c84a.

i didn't mean to push this yet...
2020-07-14 10:55:44 +01:00
Myoungwoon Roy, Kim f04a818054 docs: Correct the wrong API group name and typo in Evas, Eet, Eina, Eio and Elementary
Summary: I found wrong API reference group name in mapbuf, Evas, Eet, Eina, Eio and fixed them.

Test Plan: API reference documentation modification only

Reviewers: segfaultxavi, stefan_schmidt

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12052
2020-07-14 10:09:22 +01:00
Vincent Torri dd23a6c84a Evas: add avif evas loader
Summary: Add AV1 image file loader to Evas

Test Plan: test executable with avif files found in libavif project

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12051
2020-07-14 10:09:22 +01:00
Alastair Poole 6cc6aacbac tests: remove popup test.
This was put here due to a miscommunication. It was for resolving
an issue with one of our applications. It wasn't meant to be in
this part of testing anyway. Remove as the popup in the application
itself was broken.
2020-07-13 13:21:35 +01:00
Myoungwoon Roy, Kim cf884dccda docs: Correct the wrong API group name in Elementary and Change an invalid URL in Evas
Summary:
I had found broken URL address for SGI free software license B v2.0 and changed valid URL address
In addition, I found wrong group name in glview, grid, index, label, list, map, mapbuf, naviframe, notify, panel, photocam, plug, popup, radio, scroller, spinner, table, win, atspi, frame, access, textpath, elm_object, color_class and fixed them.

Test Plan: API reference documentation modification only

Reviewers: segfaultxavi, stefan_schmidt, raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12049
2020-07-09 10:24:09 +01:00
Carsten Haitzler cd27255cb0 Revert "edje: Avoid string duplication when possible."
This reverts commit 704d58d658.

gee. it looked innocent enough... it broke tests and everything in e
2020-07-07 12:43:39 +01:00
Woochanlee 704d58d658 edje: Avoid string duplication when possible.
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
2020-07-07 11:24:59 +01:00
Stefan Schmidt cac95313c7 benchmark: eina: remove outdated ecore_hash
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
2020-07-06 17:14:36 +02:00
Ali Alzyod 972cd7f62b evas_text: lazy loading color glyph images in RAM
Summary:
Lazy loading for glyph images into RAM, instead of caching at layout level we will cache only when rendering.

This may affect speed a bit since color glyphs will be loaded twice before caching (with FT_Load_Glyph)

Try to run test application, and hit `scale font`

** RAM consumption (Accelerated Rendering) **

| Before | After |
|-------:|-------|
|  111.9 | 21.8  |
|  204.8 | 24.4  |
|  298.0 | 26.3  |
|  391.5 | 28.4  |
|  484.8 | 29.9  |
|  578.1 | 31.4  |
|  671.4 | 32.5  |

** RAM consumption (SW Rendering) **

| Before | After |
|-------:|-------|
|  104   | 14.6  |
|  197   | 17    |
|  290   | 19.1  |
|  384   | 21.2  |
|  477   | 22.8  |
|  571   | 24.3  |
|  664   | 25.6  |

Test Plan:
```
#include <Elementary.h>

typedef struct _APP
{
  Evas_Object *tb1;
  Evas_Object *btnLoad;
} APP;

char *text = "<align=center><color=#4DE0FFFF underline=on underline_color=#4DE0FFFF><a href='tel:1234567890'>1234567890</a></color>😀😁😂🤣😃😄😅😆😉😊😋😎😍😘😗😙😚🙂🤗🤔😐😑😶🙄😏😣😥😮🤐😯😪😫😴😌🤓😛😜😝🤤😒😓😔😕🙃🤑😲🙁😖😞😟😤😢😭😦😧😨😩😬😰😱😳😵😡😠😇🤠🤡🤥😷🤒🤕🤢🤧😈👿👹👺💀👻👽👾🤖💩😺😸😹😻😼😽🙀😿😾🙈🙉🙊👦👧👨👩👵👶👼👨‍⚕️👩‍⚕️👨‍🎓👩‍🎓👨‍🏫👩‍🏫👨‍⚖👩‍⚖👨‍🌾👩‍🌾👨‍🍳👩‍🍳👨‍🔧👩‍🔧👨‍🏭👩‍🏭👨‍💼👩‍💼👨‍🔬👩‍🔬👨‍💻👩‍💻👨‍🎤👩‍🎤👨‍🎨👩‍🎨👨‍✈️👩‍✈️👨‍🚀👩‍🚀👨‍🚒👩‍🚒👮‍♂️👮‍♀️🕵️‍♂️🕵️‍♀️💂‍♂️💂‍♀️👷‍♂️👷‍♀️👳‍♂️👳‍♀️👱‍♂️👱‍♀️🎅🤶👸🤴👰🤵🤰👲🙍‍♂️🙍‍♀️🙎‍♂️🙎‍♀️🙅‍♂️🙅‍♀️🙆‍♂️🙆‍♀️💁‍♂️💁‍♀️🙋‍♂️🙋‍♀️🙇‍♂️🙇‍♀️🤦‍♂️🤦‍♀️🤷‍♂️🤷‍♀️💆‍♂️💆‍♀️💇‍♂️💇‍♀️🚶‍♂️🚶‍♀️🏃‍♂️🏃‍♀️💃🕺👯‍♂️👯‍♀️🕴🗣👤👥👫👬👭💏💑👪👨‍👩‍👧👨‍👩‍👧‍👦👨‍👩‍👦‍👦👨‍👩‍👧‍👧👨‍👦👨‍👦‍👦👨‍👧👨‍👧‍👦👨‍👧‍👧👩‍👦👩‍👦‍👦👩‍👧👩‍👧‍👦👩‍👧‍👧💪🤳👈👉☝️👆🖕👇🤞🖖🤘👊🖐👌👍👎👊🤛🤜🤚👋👏👐🙌🙏🤝💅👂👃👣👀👁👅👄💋💘💓💔💕💖💗💙💚💛💜🖤💝💞💟💌💤💢💣💥💦💨💫💬🗨🗯💭🕳👓🕶👔👕👖👗👘👙👚👛👜👝🛍🎒👞👟👠👡👢👑👒🎩🎓📿💄💍💎🐵🐒🦍🐶🐕🐩🐺🦊🐱🐈🦁🐯🐅🐆🐴🐎🦌🦄🐮🐂🐃🐄🐷🐖🐗🐽🐏🐑🐐🐪🐫🐘🦏🐭🐁🐀🐹🐰🐇🐿🦇🐻🐨🐼🐾🦃🐔🐓🐣🐤🐥🐦🐧🕊🦅🦆🦉🐸🐊🐢🦎🐍🐲🐉🐳🐋🐬🐟🐠🐡🦈🐙🐚🦀🦐🦑🦋🐌🐛🐜🐝🐞🕷🕸🦂💐🌸💮🏵🌹🥀🌺🌻🌼🌷🌱🌲🌳🌴🌵🌾🌿🍀🍁🍂🍃🍇🍈🍉🍊🍋🍌🍍🍎🍏🍐🍑🍒🍓🍅🥝🥑🍆🥔🥕🌽🌶🥒🍄🥜🌰🍞🥐🥖🥞🧀🍖🍗🥓🍔🍟🍕🌭🌮🌯🥙🥚🍳🥘🍲🥗🍿🍱🍘🍙🍚🍛🍜🍝🍠🍢🍣🍤🍥🍡🍦🍧🍨🍩🍪🎂🍰🍫🍬🍭🍮🍯🍼🥛🍵🍶🍾🍷🍸🍹🍺🍻🥂🍽🍴🥄🔪🏺🎃🎄🎆🎇🎈🎉🎊🎋🎍🎎🎏🎐🎑🎀🎁🎗🎟🎫🎖🏆🏅🥇🥈🥉🏀🏐🏈🏉🎾🎱🎳🏏🏑🏒🏓🏸🥊🥋🥅🎯🏌️‍♂️🏌️‍♀️🎣🎽🎿🏂🏄‍♂️🏄‍♀️🏇🏊‍♂️🏊‍♀️⛹️‍♂️⛹️‍♀️🏋️‍♂️🏋️‍♀️🚴‍♂️🚴‍♀️🚵‍♂️🚵‍♀️🏎🏍🤸‍♂️🤸‍♀️🤼‍♂️🤼‍♀️🤽‍♂️🤽‍♀️🤾‍♂️🤾‍♀️🤺🤹‍♂️🤹‍♀️🎮🕹🎲♠️♥️♦️♣️🃏🀄🎴🌍🌎🌏🌐🗺🏔⛰🌋🗻🏕🏖🏜🏝🏞🏟🏛🏗🏘🏙🏚🏠🏡🏢🏣🏤🏥🏦🏨🏩🏪🏫🏬🏭🏯🏰💒🗼🗽🕌🕍🕋🌁🌃🌄🌅🌆🌇🌉♨️🌌🎠🎡🎢💈🎪🎭🖼🎨🎰🚂🚃🚄🚅🚆🚇🚈🚉🚊🚝🚞🚋🚌🚍🚎🚐🚑🚒🚓🚔🚕🚖🚗🚘🚙🚚🚛🚜🚲🛴🛵🚏🛣🛤🚨🚥🚦🚧🛑🚣‍♂️🚣‍♀️🛶🚤🛳⛴🛥🚢✈🛩🛫🛬💺🚁🚟🚠🚡🚀🛰🛎🚪🛌🛏🛋🚽🚿🛀🛁⏱⏲🕰🕛🕧🕐🕜🕑🕝🕒🕞🕓🕟🕔🕠🕕🕡🕖🕢🕗🕣🕘🕤🕙🕥🕚🕦🌑🌒🌓🌔🌕🌖🌗🌘🌙🌚🌛🌜🌡☀️🌝🌞🌟🌠☁️⛈🌤🌥🌦🌧🌨🌩🌪🌫🌬🌀🌈🌂☂️☃️🔥💧🌊🔇🔈🔉🔊📢📣📯🔔🔕🎼🎵🎶🎙🎚🎛🎤🎧📻🎷🎸🎹🎺🎻🥁📱📲☎️📞📟📠🔋🔌💻🖥🖨⌨🖱🖲💽💾💿📀🎥🎞📽🎬📺📷📸📹📼🔍🔎🔬🔭📡🕯💡🔦🏮📔📕📖📗📘📙📚📓📒📃📜📄📰🗞📑🔖🏷💰💴💵💶💷💸💳💱💲📧📨📩📤📥📦📫📪📬📭📮🗳✏✒🖋🖊🖌🖍📝💼📁📂🗂📅📆🗒🗓📇📈📉📊📋📌📍📎🖇📏📐✂️🗃🗄🗑🔒🔓🔏🔐🔑🗝🔨⛏⚒🛠🗡⚔🔫🏹🛡🔧🔩⚙🗜⚗⚖🔗💉💊🚬⚰⚱🗿🛢🔮🔮🏧🚮🚰🚹🚺🚻🚼🚾🛂🛃🛄🛅⚠️🚸🚫🚳🚭🚯🚱🚷📵🔞☢☣⬆️↗️➡️↘️⬇️↙️⬅️↖️↕️↔️↩↪⤴️⤵️🔃🔄🔙🔚🔛🔜🔝🛐⚛🕉✡☸☯️☦☮🕎🔯🔀🔁🔂▶️⏭⏯◀️🔼🔽⏸⏹⏺⏏🎦🔅🔆📶📳📴♻️📛🔰🔱☑✔✖♀️♂️〽✳✴❇⁉️🔟💯🔠🔡🔢🔣🔤🅰️🆎🅱️🆑🆒🆓️ℹ🆔Ⓜ️🆕🆖🅾️🆗🅿️🆘🆙🆚🈁🈂🈷🈶🈯🉐🈹🈚🈲🉑🈸🈴🈳㊗㊙🈺🈵▫️◻◼🔶🔷🔸🔹🔺🔻💠🔘🔲🔳🔴🔵🏁🚩🏴🏳🏳️‍🌈⚀⚁⚂⚃⚄⚅⛾♾🇦🇨🇦🇩🇦🇪🇦🇫🇦🇬🇦🇮🇦🇱🇦🇲🇦🇴🇦🇶🇦🇷🇦🇸🇦🇹🇦🇺🇦🇼🇦🇽🇦🇿🇧🇦🇧🇧🇧🇩🇧🇪🇧🇫🇧🇬🇧🇭🇧🇮🇧🇯🇧🇱🇧🇲🇧🇳🇧🇴🇧🇶🇧🇷🇧🇸🇧🇹🇧🇼🇧🇾🇧🇿🇨🇦🇨🇨🇨🇩🇨🇫🇨🇬🇨🇭🇨🇮🇨🇰🇨🇱🇨🇲🇨🇳🇨🇴🇨🇷🇨🇺🇨🇻🇨🇼🇨🇽🇨🇾🇨🇿🇩🇪🇩🇯🇩🇰🇩🇲🇩🇴🇩🇿🇪🇨🇪🇪🇪🇬🇪🇭🇪🇷🇪🇸🇪🇹🇪🇺🇫🇮🇫🇯🇫🇰🇫🇲🇫🇴🇫🇷🇬🇦🇬🇧🇬🇩🇬🇪🇬🇫🇬🇬🇬🇭🇬🇮🇬🇱🇬🇲🇬🇳🇬🇵🇬🇶🇬🇷🇬🇸🇬🇹🇬🇺🇬🇼🇬🇾🇭🇰🇭🇲🇭🇳🇭🇷🇭🇹🇭🇺🇮🇨🇮🇩🇮🇪🇮🇱🇮🇲🇮🇳🇮🇴🇮🇶🇮🇷🇮🇸🇮🇹🇯🇪🇯🇲🇯🇴🇯🇵🇰🇪🇰🇬🇰🇭🇰🇮🇰🇲🇰🇳🇰🇵🇰🇷🇰🇼🇰🇾🇰🇿🇱🇦🇱🇧🇱🇨🇱🇮🇱🇰🇱🇷🇱🇸🇱🇹🇱🇺🇱🇻🇱🇾🇲🇦🇲🇨🇲🇩🇲🇪🇲🇬🇲🇭🇲🇰🇲🇱🇲🇲🇲🇳🇲🇴🇲🇵🇲🇶🇲🇷🇲🇸🇲🇹🇲🇺🇲🇻🇲🇼🇲🇽🇲🇾🇲🇿🇳🇦🇳🇨🇳🇪🇳🇫🇳🇬🇳🇮🇳🇱🇳🇴🇳🇵🇳🇷🇳🇺🇳🇿🇴🇲🇵🇦🇵🇪🇵🇫🇵🇬🇵🇭🇵🇰🇵🇱🇵🇲🇵🇳🇵🇷🇵🇸🇵🇹🇵🇼🇵🇾🇶🇦🇷🇪🇷🇴🇷🇸🇷🇺🇷🇼🇸🇦🇸🇧🇸🇨🇸🇩🇸🇪🇸🇬🇸🇭🇸🇮🇸🇰🇸🇱🇸🇲🇸🇳🇸🇴🇸🇷🇸🇸🇸🇹🇸🇻🇸🇽🇸🇾🇸🇿🇹🇦🇹🇨🇹🇩🇹🇫🇹🇬🇹🇭🇹🇯🇹🇰🇹🇱🇹🇲🇹🇳🇹🇴🇹🇷🇹🇹🇹🇻🇹🇼🇹🇿🇺🇦🇺🇬🇺🇳🇺🇸🇺🇾🇺🇿🇻🇦🇻🇨🇻🇪🇻🇬🇻🇮🇻🇳🇻🇺🇼🇫🇼🇸🇽🇰🇾🇪🇾🇹🇿🇦🇿🇲🇿🇼8<br/><br/><br/><br/>Sent from my Samsung Galaxy smartphone.</align>";
int font_size = 50;

int counter = 0;
void _button_clicked(void *data, Evas_Object *obj, void *event_info)
{
   APP *app = data;

  font_size += 10;
  Evas_Textblock_Style *style = evas_textblock_style_new();
  char buffer[100] = {0};
  sprintf(buffer, "DEFAULT='font=NotoColorEmoji font_size=%i color=red ellipsis=-1.0 wrap=mixed'", font_size);
  evas_textblock_style_set(style, buffer);
  evas_object_textblock_style_set(app->tb1, style);
  evas_textblock_style_free(style);
  style = NULL;
}

EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
  APP *app = calloc(1, sizeof(APP));
  Evas_Object *win, *scroller1, *scroller2, *box;

  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);
  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);
  scroller1 = elm_scroller_add(win);
  evas_object_size_hint_weight_set(scroller1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
  evas_object_size_hint_align_set(scroller1, EVAS_HINT_FILL, EVAS_HINT_FILL);

  app->tb1 = evas_object_textblock_add(win);
  Evas_Textblock_Style *style = evas_textblock_style_new();
  char buffer[100] = {0};
  sprintf(buffer, "DEFAULT='font=NotoColorEmoji font_size=%i color=red ellipsis=-1.0 wrap=mixed'", font_size);
  evas_textblock_style_set(style, buffer);
  evas_object_textblock_style_set(app->tb1, style);
  evas_textblock_style_free(style);
  style = NULL;

  evas_font_cache_set(evas_object_evas_get(app->tb1), 0);

  int w,h;
  evas_object_textblock_text_markup_set(app->tb1, "");
  evas_object_size_hint_min_set(app->tb1, 400, 400);
  elm_object_content_set(scroller1, app->tb1);
  elm_box_pack_end(box, scroller1);
  elm_object_content_set(win, box);

  app->btnLoad = elm_button_add(win);
  elm_object_text_set(app->btnLoad, "Scale Font");
  evas_object_smart_callback_add(app->btnLoad, "clicked", _button_clicked, app);
  evas_object_show(app->btnLoad);
  evas_object_move(app->btnLoad, 0, 20);
  evas_object_resize(app->btnLoad, 150, 20);

  evas_object_textblock_text_markup_set(app->tb1, text);
  evas_object_textblock_size_formatted_get(app->tb1, &w, &h);
  evas_object_size_hint_min_set(app->tb1, 400, w/400 + h + 150);

  evas_object_resize(win, 400, 400);
  evas_object_show(box);
  evas_object_show(scroller1);
  evas_object_show(scroller2);
  evas_object_show(win);
  elm_run();

  return 0;
}
ELM_MAIN()

```

Reviewers: raster, woohyun, bowonryu, bu5hm4n, zmike, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8727

Differential Revision: https://phab.enlightenment.org/D11861
2020-07-06 12:43:40 +01:00
Myoungwoon Roy, Kim e561bb6980 docs: Correct the wrong group name in Edje and Elementary
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
2020-07-06 10:52:56 +02:00
Wander Lairson Costa e797634755 windows: Fix path for file sanitization
```
> 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
2020-07-06 10:52:54 +02:00
Elyes HAOUAS 2c8baa76f1 Fix typos - (Part #3)
Fix some typos

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12017
2020-07-06 10:52:51 +02:00
Elyes HAOUAS 9170072d47 Fix typos - (Part #2)
Fix some typos

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12016
2020-07-06 10:52:49 +02:00
Wander Lairson Costa b767e28625 Protect EINA_(UN)LIKELY with parenthesis around the expr
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
2020-07-03 18:17:29 +02:00
Marcel Hollerbach d55b7939d6 evas_common_privat: improve tiler merge flag
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
2020-07-01 10:13:08 +02:00
Jaehyun Cho 1e06c01f82 elc_naviframe: fix to show pushed item if top item is deleted
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.
2020-07-01 16:19:16 +09:00
Christopher Michael 682e9a6b55 ecore-evas-wayland: Fix minor typo in error message 2020-06-29 09:01:54 -04:00
SangHyeon Jade Lee 2ead5df728 elementary : fix key unselect unhighlighting issue
Summary:
  in multiselect mode,
  selected item is not unhighlighted by key unselect.

Test Plan: tested in elementary_test gengrid

Reviewers: eagleeye

Reviewed By: eagleeye

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12035
2020-06-29 16:38:44 +09:00
Carsten Haitzler 9932ceeec3 ecore evas wl - cnp - dont segv is data is null
this is probably wrong but crashing is not nice... bettr to NOP than
crash right now.
2020-06-28 22:52:17 +01:00
Lucas Cavalcante de Sousa a733f9c233 Native Windows: Eina: Resolve bad comparison while using windows strerror_s
`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
2020-06-26 17:17:13 +02:00
Vincent Torri cdaac43d3a Windows: fix eina_file_map_new()
the offset passed to MapViewOfFile() must be a multiple of the granularity.

https://docs.microsoft.com/en-us/windows/win32/memory/creating-a-view-within-a-file is taken as basis for this patch

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Wander Lairson Costa <wander.lairson@gmail.com>
Differential Revision: https://phab.enlightenment.org/D12031
2020-06-26 15:40:57 +02:00
Wander Lairson Costa 0e61c08c2b Fix eina file thread test on Windows
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
2020-06-26 15:37:44 +02:00
Subhransu Mohanty 6ab86d5052 gengrid: Fix memory leak
Reviewers: SanghyeonLee

Reviewed By: SanghyeonLee

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11930
2020-06-25 17:02:49 +09:00
Myoungwoon Roy, Kim 1b1f59a0fc docs: Fix typo in elm_config API reference
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
2020-06-25 09:14:45 +02:00
Marcel Hollerbach 2dcb18acac eina_array: micro optimize eina_array_push
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
2020-06-25 09:03:09 +02:00
Elyes HAOUAS dc4fd17a9c Fix typos - (Part #5)
Fix some typos

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12019
2020-06-25 09:03:07 +02:00
Elyes HAOUAS 3e7f317313 Fix typos
Fix some typos

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12015
2020-06-25 09:03:05 +02:00
junsu choi fd4f4c4364 Revert "Efl.Gfx.Path: Change draw of a rounded rect from arc to quadratic"
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
2020-06-25 13:13:31 +09:00
Joao Antonio Cardoso 3cf052af33 efl_check.h: Replace stack allocated array by heap allocated
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
2020-06-23 17:21:22 +02:00
Carsten Haitzler 7308011cff ecore-x vysnc - env var - fix typo 2020-06-23 14:01:11 +01:00
Carsten Haitzler 3c307c4b25 ecore wl - make comment note about allocating buffers 2020-06-23 14:01:10 +01:00
Wander Lairson Costa be5b6b2476 eina_test_file.c: Do not test errno if the function doesn't fail
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
2020-06-23 14:03:28 +02:00
Elyes HAOUAS e137478dc5 Get rid of trailing whitespaces (14 / 14)
Remove  trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12006
2020-06-23 10:31:48 +02:00
Elyes HAOUAS 47b71d898e Get rid of trailing whitespaces (13 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12012
2020-06-23 10:31:36 +02:00
Elyes HAOUAS c7da405ae7 Get rid of trailing whitespaces (12 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12011
2020-06-23 10:31:22 +02:00
Elyes HAOUAS 727167ced6 Get rid of trailing whitespaces (11 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12010
2020-06-23 10:31:05 +02:00
Elyes HAOUAS 17151e2eb8 Get rid of trailing whitespaces (10 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12009
2020-06-23 10:30:36 +02:00
Elyes HAOUAS 1f61788c86 Get rid of trailing whitespaces (9 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12008
2020-06-23 10:30:26 +02:00
Elyes HAOUAS 032894a489 Get rid of trailing whitespaces (8 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12007
2020-06-23 10:30:16 +02:00
Elyes HAOUAS 1a9b5fcf70 Get rid of trailing whitespaces (7 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12005
2020-06-23 10:30:05 +02:00
Elyes HAOUAS 0a0bba64c7 Get rid of trailing whitespaces (6 / 14)
Remove whitespaces
Differential Revision: https://phab.enlightenment.org/D12004
2020-06-23 10:29:37 +02:00
Elyes HAOUAS 1d91d61514 Get rid of trailing whitespaces (5 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12003
2020-06-23 10:29:25 +02:00
Elyes HAOUAS 1fd0435f21 Get rid of trailing whitespaces (4 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12002
2020-06-23 10:29:14 +02:00
Elyes HAOUAS c2be0d0dba Get rid of trailing whitespaces (3 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12001
2020-06-23 10:28:13 +02:00
Elyes HAOUAS 108ee1d485 Get rid of trailing whitespaces (2 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12000
2020-06-23 10:27:35 +02:00
Elyes HAOUAS 09a7dadbac Get rid of trailing whitespace (1 / 14)
Remove trailing whitespace
Differential Revision: https://phab.enlightenment.org/D11999
2020-06-23 10:25:57 +02:00
junsu choi 4f15bde706 Efl.Gfx.Path: Change draw of a rounded rect from arc to quadratic
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
2020-06-23 13:46:43 +09:00
Ali Alzyod c501d09c3a eina_strbuf: introduce change last occurrence function
Reviewers: cedric, woohyun, bowonryu

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8757

Differential Revision: https://phab.enlightenment.org/D11990
2020-06-22 17:31:54 +09:00
Ali Alzyod fd24fb568e elementary_test: remove leaked style
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
2020-06-22 17:27:42 +09:00
Ali Alzyod 8f3be603c2 eina_strbuf: if readonly strbuf is malloc, then it will stop being readonly
Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8757

Differential Revision: https://phab.enlightenment.org/D11992
2020-06-22 17:16:34 +09:00
Ali Alzyod 1a2811bae4 eina_strbuf_manage_new: update documentation
Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8757

Differential Revision: https://phab.enlightenment.org/D11991
2020-06-22 17:16:02 +09:00
AbdullehGhujeh c43630c22a evas textblock : update font source when it set using font_source_set
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
2020-06-22 17:02:05 +09:00
Ali Alzyod 1bbd03b768 eina_strbuf: resolve segfault when replace used with read_only buffer
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
2020-06-22 16:54:51 +09:00
AbdullehGhujeh e3e3d0cfe4 Textblock : Fix cursor cluster movement when emoji at the line start
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, "&#x262a;&#xfe0f;");

     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
2020-06-22 16:31:54 +09:00
Boris Faure abc146f37f eina_unicode: have explicit type conversions
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
2020-06-20 11:37:56 +01:00