Commit Graph

144 Commits

Author SHA1 Message Date
a.srour 0aaad623a0 edje: implement text_class override at object level
implement text_class override at object level, where you can change the text_class for single textblock object instead of override all objects that share same text class.
This imported from TIZEN

Note:
This also fix edje_textblock font/font_size parsing by adding condition

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10598
2020-01-02 11:00:04 -08:00
Mike Blumenkrantz 2477dfaf59 edje: selectively inhibit content,changed events when changing swallowed parts
ref T8321

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10508
2019-10-29 16:17:48 +01:00
Mike Blumenkrantz b1a2d82417 edje: block "recalc" event emission if it isn't being subscribed to
Summary:
this gets called a ton

ref T8321
Depends on D10356

Reviewers: bu5hm4n, cedric

Reviewed By: bu5hm4n, cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10357
2019-10-14 09:29:50 -04:00
Mike Blumenkrantz b730443e2d efl/player: play_speed -> playback_speed
no functional changes

ref T7877

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10115
2019-09-24 15:23:16 -07:00
Mike Blumenkrantz 3d3cdc5955 efl/player: rename 'play' property to 'pause'
this is a bit of an overhaul wherein the existing 'play' mechanics are
all inverted. 'pause' is a state which stops playback but does not affect
the playback_position property.

this patch also includes implementations of Efl.Player::playing for
a couple classes which (now) only implement pause, as this is a requirement
for the objects to actually activate their animations

test cases:
* unit tests
* all elm_test animation cases
* elm_test video
* rage

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10114
2019-09-24 15:23:15 -07:00
Mike Blumenkrantz 5c2ea620a1 efl/player: prune properties duplicated in efl.playable
efl.playable implements a number of properties which are also present
in efl.player. playable was intended to be separate, so enforce this
split in all classes which use player

ref T7877

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10109
2019-09-24 15:23:09 -07:00
Mike Blumenkrantz 5489482484 efl: check file's mtime in efl.file::file_set to determine if file is the same
Summary:
historically, if the mtime of an edj file changes after being loaded,
the edje file should be reloaded. this needs to occur in a single call
with the previous user definitions intact, so verify that the mtime is
the same in efl.file::file_set when using the same file name

@fix

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9877
2019-09-11 13:38:21 -04:00
Carsten Haitzler e6d9ea7539 fix more edje file set breaks
if group does change unloaidng first is bad because of the same
reasons - losing swallowed etc. content. so disable entirely.
2019-09-05 14:33:00 +01:00
Carsten Haitzler a70808fb96 fix a bunch of breaks that having a blind file unload has brought
We can't blindly unload here - this loses swallowed content (in swallows,
boxes, tables etc.) ... this here along with an actual implementation of file
unload broke the pager in E for starters as shading then unshading (double
click titlebar) a window would lose the mini preview image obj swallowed in.
also fullscreening would do it. this also broke gadget bar, the xkb gadget in
it too and more... so this is a particularly bad thing break.

@fix
2019-09-05 14:24:21 +01:00
subhransu mohanty 35e385a1ec edje/style: append file prefix to textblock_style api that affects on file level
Summary:
All those api's are working on the Edje_file level so by appending the file prefix
and changing the argument to Edje_File leads to easy maintainability.

Depends on D9776

Reviewers: Hermet, ali.alzyod, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9777
2019-08-29 13:21:11 -04:00
Mike Blumenkrantz 9e0a285eea efl: implement efl.file::unload for classes that implement load
unload is a crucial method for classes that implement load, as this is
the method which is called during e.g., efl_file_simple_load() when
a new file is specified in order to destroy the previous object data

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9786
2019-08-29 17:17:08 +02:00
subhransu mohanty 676835458f edje/style: optimize updation of styles for a given text_style
Currently we do 2 pass updation. first we scan through all the styles
and check if they have text_style which matches the test_style we need to update
then we mark them dirty. then we call style_all_update() to go through the list
again and update those styles.
By combining them both in a single function we avoid scanning through the whole
list again.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9639
2019-08-20 10:40:19 -07:00
Hermet Park f10a3c9ee3 edje: fix compatibility issue.
Obviously previous edje object file set would try reload file
even though the file is already loaded.

This brings different result if the file data has been modified or changed.
2019-08-19 18:07:04 +09:00
Mike Blumenkrantz 91b84fa2a8 evas: restore legacy types which were defined to eo types
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8245
2019-03-08 12:06:24 -08:00
Mike Blumenkrantz 1b8487bc99 efl_canvas_layout: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8129
2019-03-06 13:02:58 -08:00
Mike Blumenkrantz dd0890a0d7 efl_layout_group: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8128
2019-03-06 13:02:56 -08:00
Mike Blumenkrantz 5bfe2e89d2 evas: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D8107
2019-03-06 19:05:48 +01:00
Mike Blumenkrantz 6326e18b3f efl.file: improve api a bit
Summary:
the previous implementation/api had a number of issues:
* "file" property contained both "file" and "key" values
  - also performed file loading operation
* "load_error" property which was specific to image objects
* no methods for controlling file loading/unloading

this patch attempts the following changes:
* split "file" property into "file" and "key" properties
  - also remove "key" from existing "mmap" property
* remove "load_error"
* directly return error codes from operations
* add "load" and "unload" methods for directly controlling load state
* add implicit file loading if file/mmap is set during construction
* rewrite all efl.file implementations to move file loading into load() method
* rewrite all usage of efl.file api based on these changes
* add C extension functions to mimic previous behavior

ref T7577

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: vitor.sousa, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7577

Differential Revision: https://phab.enlightenment.org/D8018
2019-02-27 13:17:10 -05:00
Xavi Artigas 6b7346b7b2 Remove individual class BETA guards
Summary:
Eolian adds a per-class BETA guard (like EFL_UI_WIN_BETA) to any method tagged
as @beta. This means that any app (and the EFL code) wanting to use BETA features
has to enable them class by class, which is cumbersome.
This commit replaces the individual guards with the global EFL_BETA_API_SUPPORT
guard, so apps only need to define one symbol to access BETA features.

Any usage of the per-class guards has been removed from the EFL code and examples.
When building EFL the global guard is defined by configure, so all EFL methods
already have access to BETA API.
Efl_Core.h and Efl_Ui.h no longer define EFL_BETA_API_SUPPORT. Apps wanting to
use BETA API have to define this symbol before including any EFL header
(It has been added to the examples requiring it).

Test Plan:
make && make check && make examples still work, but there's a lot less #defines
in the code

Reviewers: zmike, bu5hm4n, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T6788

Differential Revision: https://phab.enlightenment.org/D7924
2019-02-13 18:09:17 +01: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
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 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
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
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
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
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Cedric BAIL db92072338 edje: implement invalidate method and unset device callbacks here
prevent crashing in dangling callbacks

ref d26124a6d818f62d892e178d92098f5159a8c9e0

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:57 -07:00
Jean-Philippe Andre a92186be6a ecore/edje/elm: Fix a few WRN from calls to NULL
This fixes some of the warnings generated by calling functions on NULL
objects. One of the main remaining points is to avoid unwanted warnings
on non-existing parts.

Ref T6326
2018-01-16 18:37:05 +09:00
Amitesh Singh 54ae9cc18b edje: rename Edje.Object to Efl.Canvas.Layout 2017-12-06 13:12:29 +09:00
Amitesh Singh bdc3969452 edje: rename intf Efl.Canvas.Layout_Group to Efl.Layout.Group 2017-12-05 16:18:32 +09:00
Amitesh Singh c7aa3b2f83 edje: rename intf Efl.Canvas.Layout_Calc to Efl.Layout.Calc 2017-12-05 16:18:32 +09:00
Amitesh Singh 7b3fde4d4b edje: rename intf Efl.Canvas.Layout.Signal to Efl.Layout.Signal 2017-12-05 16:18:32 +09:00
Jean-Philippe Andre cc1ed7183c edje: Hide edje_global from the rest of the world
Call provider_find on the loop (or basically any object) with the
color/text/size class interface instead, to find it. The main loop is
the main holder of those objects.

Note: This makes use of provider_find instead of direct access to the
variable, in order to self-test the code. In theory release builds will
not do this and user directly the variable.
2017-11-08 20:02:31 +09:00
Jee-Yong Um 2f838acd4e Efl: add class interfaces (color/text/size)
Summary: implement Efl.Gfx.Class interface

Reviewers: jpeg, cedric

Subscribers: taxi2se, herdsman

Differential Revision: https://phab.enlightenment.org/D4403
2017-11-08 19:17:59 +09:00
Jean-Philippe Andre 9cec14918c evas: Move evas_canvas.eo to legacy-only
This isn't meant to be installed. The canvas API in EO is based around
the interfaces Efl.Canvas and the widget Efl.Ui.Win. Anything else is
not EO (eg: ecore_evas, evas, ...)

Note: evas_canvas3d is the last remaining thing that is installed along
EO files, but those are all beta APIs.
2017-11-01 11:22:33 +09:00
Jean-Philippe Andre ccee1c0944 eo: Simplify debug_name_override
Simply pass in the strbuf and don't expect the callee to own it. This
makes things simpler and safer (it'll crash only if the callee frees
said strbuf, and shouldn't leak). efl_ebug_name is new in the upcoming
release, EFL 1.21.

Realised this after talking with Amitesh. Thanks.

See 999dbd9764
And c4769ff898
2017-10-13 10:57:00 +09:00
Cedric Bail ea4d27f1b2 edje: remove duplicated code and rely on Efl.File { set; get; } mixin. 2017-10-04 21:00:56 -07:00
Jean-Philippe Andre 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Jean-Philippe Andre 8fb194d969 efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most
it's more convenient than (x,y).
2017-09-18 13:22:54 +09:00
Jean-Philippe Andre 46001cde38 edje: Remove use of smart clipped data
This removes dependency on a legacy structure.
Edje object does not change the smart data, unlike evas box and grid.
2017-09-13 09:57:05 +09:00
Jean-Philippe Andre 7ef714924a evas: Fix crash with smart objects
This is due to the previous patches.
2017-09-13 09:57:05 +09:00
Jean-Philippe Andre 8572cd5def evas/edje/elm: Remove all uses of clipped groups
This removes the uses of the *EO* class, obviously not the use of the
clipped smart objects.
2017-09-13 09:57:05 +09:00
Jean-Philippe Andre e380dae4bc evas: Remove group_del override from smart clipped 2017-09-13 09:57:05 +09:00
Jean-Philippe Andre 230b234891 evas: Remove private data for clipped object
Another step towards merging both classes of smart objects.
2017-09-13 09:57:05 +09:00
Amitesh Singh 0e7a316a7a edje: implement edje.player interface functions
fixes T5560
2017-08-04 16:22:59 +09:00
Jean-Philippe Andre 240cc9e501 edje: Move size_min/max and data to an interface
The new interface is:
  Efl.Canvas.Layout_Group

I'm not fan of the name.

Ref T5315
2017-08-04 11:52:17 +09:00
Jean-Philippe Andre efac7d523a edje: Move signal APIs to an interface
This interface will be used by elm_layout as well.

Ref T5315
2017-08-04 11:52:16 +09:00