Commit Graph

66317 Commits

Author SHA1 Message Date
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
Marcel Hollerbach f9653f015b ci: do not build tests on ci
we need to do the same on any platform that upgrades check from 0.15.0 to
0.15.1. For now this is only with macos

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12068
2020-07-27 14:24:54 +02:00
Marcel Hollerbach b7a61632d0 build: warn of faulty check version
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12067
2020-07-27 14:24:51 +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
Stefan Schmidt bd3f0b6ac6 ci: travis: force meson version 0.54.3 as install for codecov
The newest meson 0.55 release is broken for a coverage build. (Version
0.55.1 should get the needed fix from this pull rewuest: https://github.com/mesonbuild/meson/pull/7411)

For now we force 0.54.3 as known working version.
2020-07-16 10:04:49 +02:00