Commit Graph

1502 Commits

Author SHA1 Message Date
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
Cedric BAIL ccb5642eb9 Revert "efl_add_ref - fis to use efl_add properly with a parent."
This reverts commit 2fb5cc3ad0.

Most of this change where wrong as they didn't affect the destruction
of the object. efl_add_ref allow for manual handling of the lifecycle
of the object and make sure it is still alive during destructor. efl_add
will not allow you to access an object after invalidate also efl.parent.get
will always return NULL once the object is invalidated.

Differential Revision: https://phab.enlightenment.org/D6062
2018-05-24 16:02:17 -07:00
Jihoon Kim 379ee0d0db elm_entry: add elm_entry_prediction_hint_hash_set/del API
elm_entry_prediction_hint_hash_set API sets the prediction hint data at the specified key, and
elm_entry_prediction_hint_hash_del API is for deleting the prediction hint data identified by a key.

@feature

Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
2018-05-23 11:27:34 +09:00
Xavi Artigas 35bbedc96f efl: Add missing event types
Summary:
All events must have a type now, otherwise bindings don't know how to handle
the event_info field.
Most of the missing event types were actually "void" (no event_info present).
Some struct definitions had to be moved to eo instead of h files, so they
are available to bindings. Some have not, and are marked with FIXME.
Some namespaces have been fixed (like Efl_Event_Cb -> Efl.Event_Cb).

In general, there are hundreds of changed files, but mostly to add a type which
was not present before, so there's no harm done.
Also, A lot of FIXMEs have been added which should be, like, fixed.
For example, some events can send different types of event_info, which is
very inconvenient (and error prone).

Test Plan: make with c# bindings works, make check and make examples work too.

Reviewers: cedric, q66, lauromoura

Subscribers: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6169
2018-05-19 01:42:26 +02:00
SubodhKumar b8c691ebd2 edje: Fix to support translation for textblock part
Summary:
Text translation in edc for textblock is missing.
Added to support it.

@fix

Reviewers: cedric, zmike

Reviewed By: cedric, zmike

Subscribers: shilpasingh, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6164
2018-05-15 12:44:29 -04:00
SubhransuSekhar Mohanty bdca8f0c71 edje: return proper value from the function.
@fix
2018-05-14 13:26:54 +09:00
Daniel Kolesa 577c00789a eolian: second batch of unused import removals
This fixes all remaining occurences introduced by false negatives
in 6bcd70f01d. The rest was already
fixed in 6be3809c04.
2018-05-13 18:13:12 +02:00
Daniel Kolesa 6be3809c04 eolian: first batch of unused import removals
Initial results of our static analysis showed a bunch of unused
imports or imports used only for documentation references. In the
first case, remove entirely, in the second case, change to 'parse'
in order to keep references working.

The static analysis is not perfect and yields false negatives for
certain cases, so there will be a second batch later.
2018-05-13 17:28:47 +02:00
Derek Foreman cad847cf13 edje: Send seat name to all seat emitted events
Summary:
We now send the name of the seat (if available) to legacy and seat events
so the callbacks can query them via the new seat data api.

This isn't quite what I wanted, but it's enough to fix the ecore_wl2
input problems for now.  When multi-seat is a usable thing we can rework
these bits.
Depends on D6117

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6118
2018-05-08 13:25:46 -05:00
Derek Foreman ad5db090ab edje: Add beta api for seat_data_get
Summary:
Currently this is only to help wayland CSD function correctly, so the
opaque pointer is very poorly defined.
Depends on D6116

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6117
2018-05-08 12:26:36 -05:00
Derek Foreman be7f692ea5 edje: Emit extra/seat data from programmed signal emits
Summary:
Now if we generate an event in response to an event with seat data we
automatically carry the seat data with the emitted event.

This allows something like elm,action,move,start to have seat data
attached.

NB: Since extra and seat data share the same structs, extra data such as
the data from edje_entry is similarly propagated as a side effect.
Depends on D6115

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6116
2018-05-08 12:26:20 -05:00
Derek Foreman 1982046315 edje: Pass extra signal data to program_run
Summary: Depends on D6114

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6115
2018-05-08 12:26:13 -05:00
Derek Foreman 6d4f78d676 edje: Add edje_emit_full_data
Summary:
This is an even fuller emit_full, that takes a pre-made signal data
struct.  The original edje_emit_full is now implemented as a call to it.
Depends on D6113

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6114
2018-05-08 12:26:08 -05:00
Derek Foreman e12498f4d4 edje: Add seat data to extra data struct
Summary:
Since the extra data struct is already nicely refcounted, it's easy to
add the seat data to it instead of making a new struct with almost
identical code.
Depends on D6112

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6113
2018-05-08 12:26:02 -05:00
Derek Foreman da8127e1f8 edje: Create signal extra data before calling _edje_emit_send
Summary:
Steps towards recursively sending these.
Depends on D6111

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6112
2018-05-08 12:25:56 -05:00
Derek Foreman d21ff733df edje: Factor out signal extra data setup code
Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6111
2018-05-08 12:25:51 -05:00
Youngbok Shin cd0bd865eb edje: fix backward compatibility issue caused by legacy cursor funcs
Summary:
edje_object_part_text_cursor_prev/next/up/down has return value.
It has to return EINA_TRUE when only it successed.
But, when these funcs moved to legacy, it changed to return EINA_TRUE
whenever it fails or success. It must return EINA_FALSE when it fails.
@fix

Test Plan:
- Run test suite
  make check

Reviewers: herdsman, raster, cedric, woohyun

Subscribers: zmike

Differential Revision: https://phab.enlightenment.org/D5972
2018-05-02 19:48:46 +03:00
Mike Blumenkrantz 668d68cdf4 edje: remove recalc from content_get and text_get
neither of these functions should force a recalc under any circumstance
as they are simply returning pointers

@fix

Differential Revision: https://phab.enlightenment.org/D5947
2018-04-25 12:00:11 -04:00
Mike Blumenkrantz e1036aff40 edje: make most edje_util.c functions obey freeze
a number of these functions have implicit recalcs, which is bad because
it's a pretty significant perf bottleneck, but it can't be improved
without breaking existing behavior expectations so this is probably the
best that can be done

ref T6884

Differential Revision: https://phab.enlightenment.org/D5946
2018-04-25 12:00:11 -04:00
Xavi Artigas 6b5ac687c1 Efl.Text_* (from Efl.Text.*)
Including:
Efl.Text.Cursor_* (from Efl.Text.Cursor.Cursor_*)
Efl.Text.Font_* (from Efl.Text.Font.*)
Efl.Text.Format_* (from Efl.Text.Format.*)
Efl.Text.Style_* (from Efl.Text.Style.*)
Efl.Ui.Text_* (from Efl.Ui.Text.*)

Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:49 -07:00
Xavi Artigas 42ed558fd5 Efl.Pack_* (from Efl.Pack.*)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:48 -07:00
Xavi Artigas 5697f6e94b Efl.Gfx.Image* (From Efl.Image*)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:40 -07:00
Xavi Artigas e477532dd4 Efl.Canvas.Layout_Part* (from Efl.Canvas.Layout.Part*)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:37 -07:00
Xavi Artigas 55bd097a3d Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:32 -07:00
Xavi Artigas a217d4b455 Efl.Canvas.Vg.Object (from Efl.Canvas.Vg)
Also, Efl.Canvas.Vg.* (from Efl.Canvas.VG.*)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:30 -07:00