summaryrefslogtreecommitdiff
path: root/src/lib/evas (follow)
AgeCommit message (Collapse)Author
2021-02-06Added the heif loaderthierry1970
Summary: that supports images : *.heif, *hiec and *.avif I have disabled *.avif images, there is already a loader. Reviewers: stefan_schmidt, raster Subscribers: raster, vtorri, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12135
2021-02-01Efl.Canvas.Vg.Object: Skip render, if size of the drawing area is 0JunsuChoi
Summary: If the size of the boundary of path is 0, there is no area to draw. Therefore, it is the same as hide(). If there is no area to draw, there is no need to create a buffer or perform rendering. Test Plan: N/A Reviewers: Hermet, kimcinoo Reviewed By: Hermet Subscribers: devilhorns, cedric, #reviewers, #committers, herb Tags: #efl Differential Revision: https://phab.enlightenment.org/D12235
2021-01-29evas_textblock: allow default font size to be set without fontnameali-alzyod
Reviewers: woohyun, bowonryu, id213sin Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12211
2021-01-11evas - missing EVAS_API - add.Carsten Haitzler (Rasterman)
2020-12-18evas - avif - fix for 0.8.2 libavif that broke apiCarsten Haitzler (Rasterman)
also require 0.8.2 ... as well - no point trying to support older versions forever and this is still experimental. fixes T8844 @fix
2020-12-17Evas, Eolian: install missing *_api.h filesVincent Torri
Summary: previous patches forgot to install *_api.h Reviewers: raster, felipealmeida, lucas, jptiz Reviewed By: lucas, jptiz Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12216
2020-12-15evas: Rename EAPI macro to EVAS_API in Evas libraryFelipe Magno de Almeida
Summary: Patch from a series of patches to rename EAPI symbols to specific library DSOs. = The Rationale = This patch is from a series of patches to rename EAPI symbols to specific library DSOs. EAPI was designed to be able to pass `__attribute__ ((visibility ("default")))` for symbols with GCC, which would mean that even if -fvisibility=hidden was used when compiling the library, the needed symbols would get exported. MSVC __almost__ works like GCC (or mingw) in which you can declare everything as export and it will just work (slower, but it will work). But there's a caveat: global variables will not work the same way for MSVC, but works for mingw and GCC. For global variables (as opposed to functions), MSVC requires correct DSO visibility for MSVC: instead of declaring a symbol as export for everything, you need to declare it as import when importing from another DSO and export when defining it locally. With current EAPI definitions, we get the following example working in mingw and MSVC (observe it doesn't define any global variables as exported symbols). Example 1: dll1: ``` EAPI void foo(void); EAPI void bar() { foo(); } ``` dll2: ``` EAPI void foo() { printf ("foo\n"); } ``` This works fine with API defined as __declspec(dllexport) in both cases and for gcc defining as `__atttribute__((visibility("default")))`. However, the following: Example 2: dll1: ``` EAPI extern int foo; EAPI void foobar(void); EAPI void bar() { foo = 5; foobar(); } ``` dll2: ``` EAPI int foo = 0; EAPI void foobar() { printf ("foo %d\n", foo); } ``` This will work on mingw but will not work for MSVC. And that's why LIBAPI is the only solution that works for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Reviewers: vtorri, woohyun, jptiz, lucas Reviewed By: vtorri, lucas Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15evas: Prevent null pointer accessJunsuChoi
Summary: add null check Test Plan: N/A Reviewers: Hermet, cedric, kimcinoo, raster Reviewed By: raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12213
2020-11-25eina: Rename EAPI macro to EINA_API in Eina libraryFelipe Magno de Almeida
Summary: Patch from a series of patches to rename EAPI symbols to specific library DSOs. EAPI was designed to be able to pass `__attribute__ ((visibility ("default")))` for symbols with GCC, which would mean that even if -fvisibility=hidden was used when compiling the library, the needed symbols would get exported. MSVC __almost__ works like GCC (or mingw) in which you can declare everything as export and it will just work (slower, but it will work). But there's a caveat: global variables will not work the same way for MSVC, but works for mingw and GCC. For global variables (as opposed to functions), MSVC requires correct DSO visibility for MSVC: instead of declaring a symbol as export for everything, you need to declare it as import when importing from another DSO and export when defining it locally. With current EAPI definitions, we get the following example working in mingw and MSVC (observe it doesn't define any global variables as exported symbols). Example 1: dll1: ``` EAPI void foo(void); EAPI void bar() { foo(); } ``` dll2: ``` EAPI void foo() { printf ("foo\n"); } ``` This works fine with API defined as __declspec(dllexport) in both cases and for gcc defining as `__atttribute__((visibility("default")))` However, the following: Example 2: dll1: ``` EAPI extern int foo; EAPI void foobar(void); EAPI void bar() { foo = 5; foobar(); } ``` dll2: ``` EAPI int foo = 0; EAPI void foobar() { printf ("foo %d\n", foo); } ``` This will work on mingw but will not work for MSVC. And that's why EAPI is the only solution that worked for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com> Reviewers: jptiz, lucas, woohyun, vtorri, raster Reviewed By: jptiz, lucas, vtorri Subscribers: ProhtMeyhet, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12188
2020-11-19evas_textblock: reduce content fit calculationsali-alzyod
Reviewers: woohyun, id213sin Reviewed By: woohyun, id213sin Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12187
2020-11-10evas - object - grabs - dont delete NULL event grabsCarsten Haitzler (Rasterman)
segv while shutting down and removing grabs - obj->events was null... dont follow that poointer while deleting grabs. @fix
2020-10-28evas/textblock: apply style paddings in fit calculationYoungbok Shin
Summary: The style paddings should be calculated for fitting text into the given object's size. Test Plan: 1. Put shadow effect in your style string. "... style=shadow,far_bottom shadow_color=#000 ..." 2. Apply fit option( and ellipsis to see how it goes wrong without this patch.) 3. See results. Reviewers: woohyun, ali.alzyod Reviewed By: woohyun, ali.alzyod Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12183
2020-10-08Revert "Revert "evas_textblock: rainbow flag emoji treated as two ↵WooHyun Jung
clusters(update unibreak to version 4.2)"" This reverts commit 173b3a108e1b2093ac37650619a61568aaed4e04. This was reverted because of freezing codes for release. Now, release work was over. So, I think it's ok to restore this.
2020-09-28evas: sw font draw - protect against null pointer accessYoungbok Shin
The image data of dst could be null in a rare case. @fix Reviewed-by: Christopher Michael <devilhorns@comcast.net> Differential Revision: https://phab.enlightenment.org/D12163
2020-09-24evas vg: check vg changedShinwoo Kim
Summary: It is not able to render even though vg object has a chance to render, because evas_object_smart_changed_get checks only Evas_Object_Protected_Data, when Efl_Canvas_Vg_Object_Data.changed is TRUE. Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12152
2020-09-17evas_main: Fix memory leak.Woochanlee
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-17evas vg: check object changed as well 2Shinwoo Kim
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-16evas_textblock: prevent textnodes with <ps>/<br> without format nodeAli Alzyod
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-11Efl.Canvas.Vg: When VG container has transparency, ector buffer created ↵JunsuChoi
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-11Efl.Canvas.Vg.Object: Fix typoJunsuChoi
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-10docs: Correct the mismatched group name in Evas.Myoungwoon Roy, Kim
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-09evas vg: check object changed as wellShinwoo Kim
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-03docs: Add the missing API page name to elementary and evasMyoungwoon Roy, Kim
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-01efl: resolve warnings over misleading codeMarcel Hollerbach
this is meant to be like this, but clang thought of an intention mistake here that went unsighted.
2020-09-01efl: remove unused functionsMarcel Hollerbach
these are not used, if they are used again in the future, they can be get back via git.
2020-09-01Revert "evas_textblock: rainbow flag emoji treated as two clusters(update ↵Stefan Schmidt
unibreak to version 4.2)" This reverts commit 1ab71284db89dcc37da12dd56796e892bc50ae0a. We are in freeze.
2020-09-01evas_textblock: remove style padding from native width and formatted heightYoungbok Shin
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-01evas_textblock: rainbow flag emoji treated as two clusters(update unibreak ↵AbdullehGhujeh
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-08-30evas load - dont lose skip flg update after async head skip load fixCarsten Haitzler (Rasterman)
119d9f39dd9ba67068a6abb77990ea859d4266f6 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-30evas - image cache - fix loading with skip head on to load changed filesCarsten Haitzler (Rasterman)
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-25evas device - fix enum cast warnings - checked valuesCarsten Haitzler (Rasterman)
2020-08-25evas - canvas - fix enum cast warning by removing castCarsten Haitzler (Rasterman)
2020-08-25evas - image - fix enum cast warnings - checkedCarsten Haitzler (Rasterman)
2020-08-25evas vg - fix warning for enum casts with explicit ones - checkedCarsten Haitzler (Rasterman)
2020-08-25evas - callbacks - fix casting warnings - checked flags are the sameCarsten Haitzler (Rasterman)
2020-08-25evas - image+proxy - fix enum cast warnings with casts - checkedCarsten Haitzler (Rasterman)
2020-08-25evas - obj main - fix enum warnings with valid castsCarsten Haitzler (Rasterman)
2020-08-25evas - canavs vg shape - cast enums - valid - checked - fix warningsCarsten Haitzler (Rasterman)
2020-08-25evas - legacy events - cast enums after checking its ok - wrn fixCarsten Haitzler (Rasterman)
2020-08-25evas events - cast enums after checking their values match - fix wrnsCarsten Haitzler (Rasterman)
2020-08-25evas_font_query: add Use parentheses within macrosAli Alzyod
Differential Revision: https://phab.enlightenment.org/D12116
2020-08-20evas - fix deadlock with sw async rendering calling cbs in post flushCarsten Haitzler (Rasterman)
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-18evas_textblock: myanmar script rendering with e vowel.Ali Alzyod
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-18Efl Canvas Text : canvas textblock changed not fired for shadow format ↵AbdullehGhujeh
(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-18evas_object_textblock: utf8_to_markup support all escapse charsAli Alzyod
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-05evas_filter: Add null check for instructionJunsuChoi
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-05evas_textblock: enhance cursor event submitting during markup_set/text_setAli Alzyod
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-05evas_textblock: enhance escape character handlingAli Alzyod
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-04evas: fix a potentional error of null derefWonki Kim
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-07-31evas_textblock: remove logically dead codeYeongjong Lee
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