Commit Graph

1808 Commits

Author SHA1 Message Date
Dmitri Chudinov 3474d867aa FIX: A pointer should not be compared to zero 2022-08-01 09:37:37 -07:00
Carsten Haitzler 712c0d5b0d edje - fix warnings with string buffer lens
@fix
2022-05-18 12:48:47 +01:00
Jaehyun Cho 3756b88cde edje_calc: fix check return of _edje_fetch
Summary: checks if _edje_fetch returns null before calling _edje_recalc_do.

Reviewers: Hermet, raster, kimcinoo, jsuya

Reviewed By: jsuya

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12322
2022-02-24 17:26:36 +09:00
Carsten Haitzler d3a1b077fb edje - improve number of signlas/messages we can do per second
use a 0 timer delay not 0.001s before processing messages thus being
able to handle more especially when they self-feed a bit.

@opt
2022-02-20 11:20:43 +00:00
Carsten Haitzler b1ddbd8408 edje entry - complete key handling for cut (shft+del)
fixes T8975

@fix
2021-12-30 19:38:48 +00:00
Carsten Haitzler 0fe3c751d1 edje entry - fix past to use shft+ins for paste and no ctl
fix key handling for paste (insert key one)

@fix
2021-12-30 19:32:42 +00:00
Taehyub Kim d5c8311470 edje lua2: check string ptr before dereference
Summary: fix null pointer dereference

Reviewers: Hermet, kimcinoo, jsuya, raster

Reviewed By: kimcinoo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12309
2021-11-30 10:49:00 +09:00
Carsten Haitzler cf0df4872d edje + elm - add new explicit tracking of all cc's used in edj themes
edje_cc now lists all cc's used in an edj file. edje provides an api
to list this. elm now uses this api to expose a list of all cc's used
acorss all the theme(s) selected by the user. this will then be used
by paledit to produce a nicer gui with a list of available cc's to add
etc. and split between basic and extended.

@feat
2021-10-31 11:44:57 +00:00
Carsten Haitzler 5a12ceaa7d edje cc lookup - fix to proper path fallback - mis-lookups fixed 2021-08-16 11:48:41 +01:00
Carsten Haitzler 276513f58b edje - fix up colorclass lookups to always be recrusvie now 2021-08-09 19:04:53 +01:00
Carsten Haitzler a5c7c65658 edje - we can't rely on string ptr coming from eet file anymore... 2021-08-09 18:22:06 +01:00
Carsten Haitzler 39b48ca430 Revert "fix warnings about redefinting EWAPI etc. due to windows EAPI changes"
This reverts commit e2d6691d52.
This reverts commit c02b796fdb.
This reverts commit 6c969f6b7d.
This reverts commit 74204bccd7.
This reverts commit 1304d95717.
This reverts commit 7c85be9674.

revert the EAPI changes that break cxx bindings build. sorry :( more
fixes needed than i thought
2021-05-26 15:46:25 +01:00
Carsten Haitzler e2d6691d52 fix warnings about redefinting EWAPI etc. due to windows EAPI changes 2021-05-23 20:47:23 +01:00
Felipe Magno de Almeida 6c969f6b7d edje: Add weak symbol
Summary:
The symbols will be needed when we change how Eolian generates
import/export symbols in Eio

Reviewers: vtorri, raster

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12272
2021-05-23 20:47:23 +01:00
Carsten Haitzler 2b91c4d9b8 edje - add new color class apply func to force cc to apply now 2021-05-07 00:02:05 +01:00
Carsten Haitzler 9d457fcc3f edje - color classes totally did nothing in textblock styles
this never worked... the code just was not there to look uop color
classes in text styles and change/replace them. this fixes that. it
implements them. it implements color_class to replace color=xxx but
also supports color=cc:colorclassname (so backing_color=cc:xxx works
too to specify a colorclass for a backing color, and underline and so
on). so now it's implemented and actually works... it can be used.
this SHOULD have alwasy worked... but hey. apoparently not.

@fix
2021-04-28 13:14:34 +01:00
Carsten Haitzler 215e9ca9b3 edje - add color-class fallback for lookups in prep for proper theme cc 2021-04-27 15:25:46 +01:00
Jaehyun Cho d3d3af369b edje_entry: fix a potential error of null deref
Summary:
This is a patch to fix a potential error of null dereferencing.
This patch is based on D12087.

Reviewers: Hermet, jsuya

Reviewed By: jsuya

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12241
2021-02-04 11:00:14 +09:00
junsu choi 745012e6c2 edje_data: Add missing descriptor for image.max(min).limit
Summary:
Edje_Part_Description_Image uses EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB,
EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB is missing max.limit and min.limit descriptors.
Therefore, max:SOURCE and min:SOURCE did not work in EDC.
Adds a descriptor to it.

https://www.enlightenment.org/_legacy_embed/edcref.html#sec_toplevel_images
max [width] [height] or SOURCE
The maximum size of the state. A size of -1 means that it will be ignored in one direction.
When max is set to SOURCE, edje will enforce the part to be not more than the original image size.
The part must be an IMAGE part.

Test Plan:
{F4230539}
edje_cc test.edc && gcc -o test test.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
./test

Reviewers: Hermet, Jaehyun_Cho, cedric, raster

Reviewed By: Hermet

Subscribers: #reviewers, #committers, kimcinoo, herb

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12215
2020-12-17 12:50:48 +09:00
Woochanlee cfd17f145a edje_util: Fix memory leak
Summary:
evas_object_data_set call callc for internal node.
It's not free before call evas_object_data_del or evas_object_data_set(obj, NULL)

Reviewers: raster, cedric, Hermet

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12205
2020-12-08 12:17:57 +00:00
Carsten Haitzler 42c123d1d7 singularize srand in eina_init - only once in one place
simplify down to having a single srand() in eina_init and use urandom
if it works and is there - if not, time(NULL) will do. it's the best
we can...
2020-10-03 20:46:50 +01: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
Carsten Haitzler eab898e592 edje - fix enum cast warnings - checked values 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 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
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 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
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
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
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
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
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
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
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
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
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
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
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
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
Bowon Ryu f4cf46e9b5 edje: markup flag should be TRUE in legacy edje_object_part_text_set
Summary:
Through some APIs (elm_entry_editable_set, elm_entry_single_line_set, etc.)
located after edje_object_part_text_set(legacy)

If efl_ui_widget_theme_apply is called,
In edje_object_part_text_raw_generic_set, the legacy flag becomes FALSE.
And in this case, the logic works in the unintended direction
because the set_markup flag is FALSE.

Test Plan:
/*
gcc -o entry_example entry.c `pkg-config --cflags --libs elementary`
 */
#include <Elementary.h>

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

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("entry-example", "test");
   elm_win_autodel_set(win, EINA_TRUE);
   en = elm_entry_add(win);
   evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_object_part_text_set(en, "elm.guide", "<font_size=32 color=#FFF>TEST</font_size>");
   elm_entry_editable_set(en, EINA_FALSE);

   evas_object_show(en);

   elm_object_content_set(win, en);
   evas_object_resize(win, 300, 200);
   evas_object_show(win);

   elm_run();

   return 0;
}
ELM_MAIN()

Reviewers: woohyun, ali.alzyod

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11868
2020-06-05 14:26:22 +09:00
junsu choi 442fae5c56 Efl.Canvas.Vg.Object: Optimize Ector Surface Size
Summary:
The ector surface size was determined by the size of the vg object.
vg object is usually sized by the size of the container.
So, the ector surface is set unnecessarily large.
This patch sets the ector surface size to the path boundary.
And the path boundary refers to the stroke width and miterlimit.

Test Plan:
vector sample
{F3887634}
{F3887632}

[grey area is ector surface size]
{F3887633}

Reviewers: Hermet, kimcinoo, smohanty, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11865
2020-06-03 11:37:23 +09:00
Myoungwoon Roy, Kim 28cf881861 edje: fix memory leak in edje part recalculation.
Allocated part_array is only freed when _circular_dependency_find() is successful. It is not freed in other cases.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11886
2020-05-27 15:19:03 +02:00
Marcel Hollerbach 8e3606698e refactor build
libraries are split into deps, external deps, and pub deps.
Evas engines are refactored to use the predefined engine deps.

this is preparation work for efl-one.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11806
2020-05-27 11:06:46 +02:00
Subhransu Mohanty 11cbb5ae93 edje: fix memory leak by freeing the limits pointer.
Summary:
This limit parts are only used in naviframe edc thats why it is
only showing up in naviframe test app.

Reviewers: Jaehyun_Cho, Hermet

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11887
2020-05-27 14:55:44 +09:00
Woochanlee eb38000e3d edje_load : clean up vector resource when edje file freed.
Summary: Fix memory leak.

Reviewers: cedric, Hermet, smohanty, bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11859
2020-05-27 12:32:12 +09:00