Commit Graph

1526 Commits

Author SHA1 Message Date
Carsten Haitzler 5641910ed2 edje entry - be clearer and more efficient on string appending
using strncpy with strlen of the string you append is pointless.
again... strcpy will do - but use memcpy to be exact and pre-compute
sizing etc. only once. fixes warnings.
2018-11-09 12:18:59 +00:00
Carsten Haitzler 7847af7f57 edje calc - wanr - move fallthrough tag to just before next case
fixes warning for it not being there... no bug here though
2018-11-09 11:44:00 +00:00
Carsten Haitzler 921d3b4979 edje calc - warn - fix warn about initting all fields of calc params 2018-11-09 11:44:00 +00:00
Carsten Haitzler 8fc3942713 edje load - warn - fix buffer trucn warning 2018-11-09 11:44:00 +00:00
Carsten Haitzler 71ee265130 edje edit - warn - use bigger buffer to avoid buf trunc warnings 2018-11-09 11:44:00 +00:00
Carsten Haitzler 003323f244 edje modules - warn - use proper hash free func prototype 2018-11-09 11:44:00 +00:00
Carsten Haitzler 0bf371856c edje program - warn - handle theoretical null seat string 2018-11-09 11:44:00 +00:00
Daniel Hirt face90632e Canvas layout: support more Efl.Text.* with efl_part
This adds many Efl.Text.* that are useful for manipulating the
underlying TEXTBLOCK object's propeties using efl_part.

This has been implemented as part of the "user-defined" properties of
the layout part, so that the changes on the part persist across load of
different groups.

Note that text styles have precedence over the TEXTBLOCK (Canvas.Text)
object's properties. if an edc provides a style, the properties it
manipulates as part of the "base:" string would not be affected by this
API.

In general, this helps reducing the amount of styles for objects (or
modes of the same objects) that share the same setup, but are different
in some properties (e.g.  ellipsis, wrap etc).

@feature

Canvas layout: add text part "expand" property

This adds "expansion modes", which are essentially the same as min/max
hints in the edje part's 'description.text' fields.

The user can then customize his widget to different modes without being
forced to create a new edje group in the theme.

Note that there is an added check in case one of the min/max text flags
are provided from the theme. In such case, all flags from this new API
will be ignored.
This fortifies misuse where the flags are set both in theme and the API.

@feature
2018-11-06 18:33:56 +02:00
Daniel Kolesa 5a3d79d383 meson: add eolian custom dependencies support
This uses the meson/ninja depfile functionality + eolian to make
sure proper dependencies between generated files and .eo files
are managed, to ensure consistent re-generation of all generated
files that are affected upon .eo file modification.

For custom rules with multiple outputs, Ninja currently does not
support depfiles. Therefore, split those into two custom rules
so that the depfiles functionality can be enabled. While this
is ugly and slows down the process a little by having to invoke
Eolian twice instead of once, it has to be done and it's still
better than what we had in Autotools anyway.

Differential revision: D7187

Fixes T6700.
2018-10-24 12:02:55 +02:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Yeongjong Lee 9fc687a8c3 edje: call recalc in part_text_get if there is no available text data
Summary:
If edje_text_get is called before any edje_text_set function call, it return
null, because rp->typedata.text->text is only set by edje_text_set function.
If there is no available text data, find it from rp(edc).

ref 7bbf18a950

Test Plan: make check

Reviewers: zmike, id213sin, herdsman

Reviewed By: id213sin

Subscribers: Hermet, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6961
2018-09-28 16:14:00 +09:00
Hermet Park 331bd33036 edje: add missing eina_deprecated to apis.
Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7090
2018-09-21 19:33:10 +09:00
Hermet Park 9c0f6a4bb7 Edje: update doc.
Summary: fix and add missing doxygen conent.

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7088
2018-09-21 19:33:10 +09:00
SubodhKumar f107ea2432 edje: Remove hack code
Summary:
special calculation for textblock is for fit calculation.
This is obvious from code that fit is being calculated
before text is actually been set to textblock.
I am not sure whether this is intentional or mistake
but it make sense to calculate fit after text is being
set so that formatted and native calculation can be proper.

@fix

Test Plan: NA

Reviewers: cedric, zmike, herdsman, devilhorns

Subscribers: stefan_schmidt, #reviewers, #committers, shilpasingh

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6045
2018-09-17 17:38:24 +03:00
Jaehyun Cho 14f1866f25 efl: Remove unnecessary abstract/class inheritance
Summary:
Remove unnecessary abstract and class inheritance from eo file because
those abstracts and classes are duplicate.
e.g. if class B (class A) in B.eo file, then class C (class A, class B) in C.eo file.

Reviewers: woohyun, felipealmeida, Hermet, bu5hm4n

Reviewed By: Hermet, bu5hm4n

Subscribers: bu5hm4n, cedric, segfaultxavi, q66, #reviewers, lauromoura, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6982
2018-09-10 20:29:24 +09:00
Hermet Park 2614179af8 Revert "evas vg: changed "vg object" to "vg""
This reverts commit ec69abed9d.

Ooops, I didn't intended this patch.  @#!@#!@#!@#
2018-09-10 17:27:42 +09:00
Hermet Park ec69abed9d evas vg: changed "vg object" to "vg"
Summary:
Following our naming rule, rename to like other primitives.

i.e. efl_canvas_rect, efl_canvas_image, efl_canvas_vg ...

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7013
2018-09-10 14:06:58 +09:00
Jaehyun Cho 0dabbfe177 Revert "efl: Remove unnecessary abstract/class inheritance"
This reverts commit 4067fafe07.

As commented on D6982, the original patch changes the widget's behavior.
e.g. Efl.Ui.Win cannot be called with Efl.Config_Gloabal APIs.
     Elm.Combobox cannot provide events of Button and Hover.

Until the above changes are resolved, the original patch is reverted.
2018-09-05 17:14:22 +09:00
Jaehyun Cho 4067fafe07 efl: Remove unnecessary abstract/class inheritance
Summary:
Remove unnecessary abstract and class inheritance from eo file because
those abstracts and classes are duplicate.
e.g. if class B (class A) in B.eo file, then class C (class A, class B) in C.eo file.

Reviewers: woohyun, felipealmeida, Hermet

Reviewed By: Hermet

Subscribers: cedric, segfaultxavi, q66, #reviewers, lauromoura, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6982
2018-09-05 15:05:23 +09:00
Yeongjong Lee fd87dbce38 edje_calc: remove unused variable
Summary: those variables should be removed at 05e3e450e5

Reviewers: eagleeye

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6968
2018-09-04 17:40:06 +09:00
Yeongjong Lee 02d83ebcd4 docs: Fix typos in API reference doc and comments.
Reviewers: Hermet, segfaultxavi

Reviewed By: Hermet, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6948
2018-08-31 17:45:31 +09:00
Hermet Park 5f0002ce69 efl: vector is no more beta version. 2018-08-31 12:16:24 +09:00
Myoungwoon Roy, Kim e06a9b6acf docs: Fix typos and some wrong expressions in API reference doc.
Summary: I had fixed some typos and some wrong expressions in API reference doc

Test Plan: N/A

Reviewers: raster, zmike, Hermet, segfaultxavi

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6943
2018-08-30 14:01:21 +09:00
Yeongjong Lee e19292aa2b evas: call evas_find before safety check
Summary:
edje_edit_object_add
edje_object_add
emotion_object_add
evas_object_xxx_add

These APIs had allowed to set parent to EFL_CANVAS_OBJECT(Evas_Object) before
8bb11a17. we should call evas_find before safety check for backward compatibility.

Test Plan:
  win = elm_win_add(NULL, "main", ELM_WIN_BASIC);

 1.  `rect = evas_object_rectangle_add(evas_object_evas_get(win));`

 2.  `rect = evas_object_rectangle_add(win);`

Check that 1. and 2. works.

Reviewers: Hermet, zmike

Reviewed By: Hermet

Subscribers: cedric, #reviewers, CHAN, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6909
2018-08-29 21:11:00 +09:00
Youngbok Shin 517018e008 evas textblock: add/apply cursor cluster APIs based on grapheme cluster
Summary:
Add a feature for moving cursor over a grapheme cluster.
It is applied to edje_entry.c and elm_entry.c for improving
cursor handling just like other modern text editors. ex) gedit
The patch on Evas needs to update libunibreak library.
So, the patch will update libunibreak, too.
@feature

Test Plan:
1. Put "ഹലോ" in your entry.
2. Your cursor can reach at the end of text from the beginning
   only in 2 right key event with this feature.

Reviewers: raster, cedric, jpeg, herdsman, zmike, devilhorns

Reviewed By: herdsman, zmike

Subscribers: #reviewers, #committers, zmike, bowonryu, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D5490
2018-08-20 10:29:32 -04:00
Yeongjong Lee 8bb11a172b evas: check evas class instead of using evas_find
Summary:
A object that is not evas class shouldn't use evas_find. it may occurs segfault.

ref c2e8b492b1

Test Plan:
Evas *evas = evas_new();
evas_free(evas);
evas_object_line_add(evas);

Check weather there is segfault.

Reviewers: Hermet, raster, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6816
2018-08-16 13:01:39 -04:00
Mike Blumenkrantz 3c15bf1663 edje/multisense: always return muted=true if multisense is disabled
Summary:
there is no sound when multisense is disabled, so this is functionally
equivalent to the audio being muted

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl_layout_engine

Differential Revision: https://phab.enlightenment.org/D6837
2018-08-16 10:16:34 -04:00
Mike Blumenkrantz 59b8a63d65 edje: unset internal _need_imf flag on shutdown
Summary:
failing to unset this causes the ecore_imf flag to go negative if edje
is ever completely shut down twice

@fix

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: ManMower, #reviewers, cedric, #committers

Tags: #efl_layout_engine, #easy

Differential Revision: https://phab.enlightenment.org/D6763
2018-08-14 10:45:13 -04:00
Mike Blumenkrantz dbc2c880a8 edje: add back function prototype for edje_object_color_class_description_get
this was removed in D4403

Differential Revision: https://phab.enlightenment.org/D6694
2018-08-02 10:17:26 +02:00
Mike Blumenkrantz 67f50eb5d6 edje: handle all failure cases with error messages in init
Summary:
fix T7025
Depends on D6677

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7025

Differential Revision: https://phab.enlightenment.org/D6678
2018-07-26 21:30:03 +09:00
Mike Blumenkrantz b27ecc58dd Revert "edje: clean up internal objects during invalidate"
This reverts commit 78cd610341.

this patch needed a bit more review+testing; it fixes some issues but
creates others

Differential Revision: https://phab.enlightenment.org/D6551
2018-07-10 13:41:04 +02:00
Mike Blumenkrantz 78cd610341 edje: clean up internal objects during invalidate
Summary:
these objects are destroyed when invalidate is called as a result of the
evas smart object class destroying the smart object at this time

ref D6222

Reviewers: bu5hm4n, devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6540
2018-07-10 11:07:53 +09:00
Mike Blumenkrantz 7bbf18a950 edje: return available text data in part_text_get without recalc when possible
Summary:
based on the codepaths taken when setting text to a part, a recalc should
only be necessary when returning markup from a textblock, and this is only
the case because the function returns a non-allocated string

in the case where the object is textblock and (legacy || not fetching markup),
the current text is guaranteed to be set on this pointer. the reason a
recalc is necessary for the markup case is because edje TEXTBLOCK parts only
set text to the internal textblock during a recalc, meaning that attempting
to fetch text on a just-set part will fail; this does not mean that the internal
textblock object doesn't exist, only that the text has not yet been set to it
Depends on D6422

Reviewers: herdsman, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6423
2018-06-25 15:19:33 -04:00
Mike Blumenkrantz 6839003510 edje: remove recalc during part_recursive_get
Summary:
this adds perf overhead in order to work around a bug in text_get

all part objects are instantiated during edje_object_file_set, and forcing
a recalc here does nothing more than perform unnecessary operations

ref 8f95b17f39
ref D6365

Reviewers: herdsman, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6422
2018-06-25 15:18:56 -04:00
Chris Michael 392668bdfb edje_lua: Wrap calls to edje_object_part_object_get with freeze/thaw
Summary:
@ref T6884

Depends on D6419

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6420
2018-06-25 11:36:52 -04:00
Daniel Hirt 8f95b17f39 Edje: recalc edje before fetching the real part
Summary:
There are many calls to `_edje_real_part_recursive_get`. Though, it is
not guaranteed that the Edje object had instantiated all of the real
parts.

This change makes edje to always recalc before retrieving the real part.

The D6364 patch raised a good point, but presented a local fix, where
it seems that a global fix such as this is needed, instead.

The local fix is removed in favor of this. Test suite still passes.

ref T7057

@fix

Test Plan: See T7057

Reviewers: devilhorns

Subscribers: cedric, zmike, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6365
2018-06-22 17:12:28 +03:00
Youngbok Shin 69b5d67367 edje: fix text set/get issue without edje calculation
Summary:
Some changes broke really basical function behavior of text.
I couldn't get text from an edje object which I just set to the given edje object.
In the past code, edje called recalc function before trying to get text.
So, this patch bring that code to fix this issue.
@fix

Test Plan: Included. Run "make check"

Reviewers: herdsman, raster, cedric, woohyun, devilhorns

Subscribers: #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6364
2018-06-22 12:30:59 +03:00
Hermet Park 2663dceaf1 Revert "edje: code refactoring for readibility."
This reverts commit 7fb47fc064.

subsequential revert for previous one.

90a89d1ab2b5d23b29ad0f2680b77b5ba7f56b42.
2018-06-21 19:33:41 +09:00
Daniel Hirt ff8c383649 Edje load: add safecheck for TEXTBLOCK-specific code path
There is a specific TEXTBLOCK part code path that shouldn't be taken
for other parts.

@fixes T6279
2018-06-20 19:34:00 +03:00
Youngbok Shin a99f337413 edje: fix an issue "description.text.text" is not shown
Summary:
"description.text.text" is not shown after applying a patch for
supporting text translation of Textblock part.
@fix T6997

Test Plan:
- Try to show a TEXTBLOCK part which has built-in text.
ex)
  textblock {
     scale;
     desc { "default";
        text {
           style: "my_style";
           text: "You can't see this text without this patch";
        }
     }
  }

Reviewers: Hermet, subodh6129, herdsman

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T6997

Differential Revision: https://phab.enlightenment.org/D6257
2018-06-11 16:19:38 +03:00
Marcel Hollerbach d1e1adf0bc edje: fix edje_part_helpers refcounting
Summary:
the reference from efl_reuse was forgotten & the parent relation was not
correctlty setted, which led to the fact that NOREF was never emitted.
This caused that thte object never really was destructed probebly, and
thus the del_interceptor_cb was not executed, and the object simply
leaked.

The test checks that those properties are correctly set, additionally a
error is printed in the efl code when a part has not the expected
reference properties. This also enforces errors when users are doing
wrong things with objects returned by efl_part.

Reviewers: ManMower, zmike

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6254
2018-06-10 17:01:33 +02:00
Hermet Park 7fb47fc064 edje: code refactoring for readibility.
collection.part is too ambigious, since group has parts as well.
Normally we regard it as "name" (of group) instead of part.
2018-06-07 17:53:12 +09:00
Marcel Hollerbach 665e88f8b4 edje: fix lifecycle of swallowed children
Summary:
a swallowed child is per doc not deleted when the edje is deleted.
After the call to invalidate is finished all children will loose theire
parents and also be invalidated. However, in the efl_invalidate call,
the event EVAS_CALLBACK_DEL is issued, so this is the right spot. As in
legacy the swallows are in place when the EVAS_CALLBACK_DEL event is
issued.

Reviewers: cedric, raster, JackDanielZ, zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6222

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
2018-05-28 21:50:12 -07:00
Youngbok Shin cae57ff51b edje: don't give a wrong Edje data when an Edje object has group parts
Summary:
_edje_part_fetch() function gets an Edje which has the requested Edje_Real_Part.
Basically, it gets main Edje of the given object.
But, if a requested part is in a GROUP part, it gets the Edje of GROUP part.
It shouldn't be passed to _edje_efl_text_text_get() function directly.
@fix

Test Plan: N/A

Reviewers: herdsman, raster, cedric, woohyun

Reviewed By: cedric

Subscribers: #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6149

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-25 10:09:15 -07:00
Cedric BAIL 94a9a733a5 edje: simplify part handling as we are now guaranteed that a part as no parent when reaching the del intercept. 2018-05-24 16:02:20 -07:00
Cedric Bail 3347db4bea edje: do not reparent when the object is dead already. 2018-05-24 16:02:19 -07:00
Cedric Bail f49ccff71d edje: forgot to propagate invalidate upward. 2018-05-24 16:02:19 -07:00
Cedric Bail c2e8b492b1 evas: enforce legacy parent to be the canvas. 2018-05-24 16:02:19 -07:00
Cedric BAIL 8a513a522e efl: major rewrite of efl_part.
The interface efl_part_get should not be directly called from C, but the efl_part
wrapper should. It rely on efl_noref to properly destroy the object. Binding can
control the lifecycle of the reference the way they want by either calling the
wrapper or efl_part_get directly. It also means that the ugly ___efl_auto_unref_set
doesn't need to be exposed outside of EFL anymore.

Differential Revision: https://phab.enlightenment.org/D6098
2018-05-24 16:02:18 -07:00
Cedric BAIL ae5d0005d3 edje: properly handle lifecycle of edje global object.x
Differential Revision: https://phab.enlightenment.org/D6087
2018-05-24 16:02:18 -07:00