Commit Graph

180 Commits

Author SHA1 Message Date
Mike Blumenkrantz aa921c553b edje: change 'user_defined' member of Edje struct to be a hash
Summary:
this is where all user-added data (e.g., swallowed objects, table/box packs,
text strings) are stored. with this patch, it is now a hash by part name,
storing a list of user-defined data for that part

this simplifies a bit of code by deconstructing some list walks, and
should end up being slightly faster for large edje objects with lots of
user-defined data

ideally no functional changes

Depends on D9206

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9208
2019-07-10 14:40:42 -04:00
Mike Blumenkrantz a8fda441be edje/load: (more) correctly handle part updates after changing edje group
Summary:
if a part changes its type, verify that the new type is compatible AND
exists before attempting to re-set the previous state, otherwise take
action and print warning

@fix
Depends on D8947

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8948
2019-05-29 12:29:03 -04:00
Mike Blumenkrantz 6b046ec845 efl.gfx: remove Efl.Gfx.Image_Load_Error
Summary:
this is now implemented through Eina.Error

ref T7718

Depends on D8066

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7718

Differential Revision: https://phab.enlightenment.org/D8067
2019-03-04 13:36:57 -05: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
Mike Blumenkrantz af7d1ef7ed interfaces: move animator,tick to efl.canvas.object and remove efl.animator
Summary:
this interface only contains a single event which is implemented only by the
canvas object

ref T7561

Reviewers: cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7561

Differential Revision: https://phab.enlightenment.org/D7905
2019-02-21 22:04:30 +01:00
Derek Foreman 1933580efb edje: Remove _edje_animators list
I guess this used to do something...

Now it's a list that we never add anything to but frequently try to remove
things from.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7621
2019-01-15 13:47:20 -06:00
Carsten Haitzler afb779bda5 edje - stop trying to access ready deleted exrt/group swallow objects
_edje_real_part_swallow_clear() would try and manipulate already
deleted group/external objects (not manually swallowed ones) thus
causing safety noise.

@fix.
2019-01-09 18:57:22 +00:00
Carsten Haitzler 8fc3942713 edje load - warn - fix buffer trucn warning 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 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
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 65ee277a66 Efl.Canvas.Scene (from Efl.Canvas)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:23 -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
Cedric BAIL 21f96c2a71 edje: remove device callbacks on canvas del
avoid some race conditions when devices change during destructor

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:57 -07:00
Cedric BAIL 6b2923c8de edje: avoid triggering errors when deleting edje file if canvas is deleted
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:57 -07:00
Mike Blumenkrantz 3d9dcbd478 edje: add ability to reference images from other edje files
this uses the just-added "id" property to allow referencing images
by name from that theme. example:

=FILE1=
id: "myfile";
images.image: "someimage.png" COMP;

=FILE2=
requires: "myfile";
images.image: "someimage.png" EXTERNAL "myfile";

FILE2 will now load someimage.png from FILE1 at runtime if FILE1 is
currently opened in edje, and FILE1 will be kept open until FILE2 is
closed

@feature
2018-02-28 16:02:38 -05:00
Mike Blumenkrantz 3a86768f3b edje_cc: add "id" toplevel property
this can be used by edje files to identify themselves
2018-02-28 16:02:37 -05:00
Cedric Bail 288284585b edje: silence warning due to vpath change. 2018-02-22 14:55:55 -08:00
Marcel Hollerbach c4f33c67a8 move from efl.vpath to eina_vpath
The usages from efl.vpath are moved to to eina_vpath
2018-02-22 09:26:55 +01:00
Mike Blumenkrantz 27ae060633 evas3d: use a type setter function with finalize instead of a custom constructor
resolves a conflict with the 'constructor' method name
2018-02-12 16:47:41 -05:00
Andy Williams 9a4eedb078 Remove all ocurrences of SPANK from our user facing errors.
This has been bugging me for some time but now we are triggering new errors internally
this is appearing to end users for problems they did not cause.

Additionally I was able to improve a couple of the errors by copying the
explanation from code comments into the error message.

Shorter error logs now too :)
2017-12-22 11:18:46 +00:00
Amitesh Singh 54ae9cc18b edje: rename Edje.Object to Efl.Canvas.Layout 2017-12-06 13:12:29 +09:00
Jean-Philippe Andre 6c53992668 edje: Implement Efl.File.load_error
Don't create a new function with the same name, it's absurd.
2017-11-29 15:36:44 +09:00
Carsten Haitzler 75daddc839 Revert "Edje: use textblock by default"
This reverts commit ef3d2120bf.

This breaks E. pager ono my right screen looks like:

http://devs.enlightenment.org/~raster/shot-2017-11-11_12-13-14.png

on my left screen shellf keeps swapping between 2 dizes wobbling back
and forth every frame eating cpu and making it "blurry"...

note - theme is the flat one in devs/raster/theme/flat2 branch. so
this change certainly breaks something...
2017-11-11 12:10:32 +09:00
Daniel Hirt ef3d2120bf Edje: use textblock by default
As most of you know, TEXT part was, up to this point, an Evas.Text
object.

This patch merges TEXT and TEXTBLOCK both to use Efl.Canvas.Text.
Code is added to emulate what TEXT did that TEXTBLOCK did not.

I believe we can move forward with TEXT, and deperacate TEXTBLOCK from
the EDC. You can also set markup to TEXT parts.

Exactness seems to show some differences, but further examination shows
that it's due to difference in how width is calculated in
Efl.Canvas.Text. The results seem correct.

Be sure to report of any breakage via Phabricator or contact me
directly.
I am running E with this and did not stumble upon any crashes or visual
bugs.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-11-10 10:30:09 -08:00
subhransu mohanty 4c47200c49 edje: cleanup old implementation of handling svg file. 2017-10-27 14:58:38 +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
Daniel Hirt 61db4947f4 Edje load: reset seats counter on file_del
The seats list got emptied, but the counter progression was kept,
causing needless different seat names for the same device across
different edje objects.
2017-09-18 19:47:52 +03: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 e8f9f109a6 evas: Rename device Class to Type, remove Sub_Class
1. The word "class" is a pain point with many languages where
   it's a keyword. Type is a little better. Also, the property
   was already named "device_type" and not "device_class".

2. Remove Efl.Input.Device.Sub_Class
   It's not used inside EFL upstream codebase, and unlikely to
   be used anywhere else (even in Tizen).

Hopefully no one used the Efl_ enum types. So far only the Evas_
types should be in used.

Ref T5540
2017-06-12 15:21:55 +09:00
Jean-Philippe Andre 83d18617b4 evas: Remove device "parent", "name" and "description" properties
Those are now merged with Efl.Object parent, name and comment.
The reasoning is that only seats can be parent devices; And name
and description are not only name clashes but also not extremely
useful anyway.

Tested with VNC.

Fixes T5540
2017-06-12 15:17:50 +09:00
Carsten Haitzler c09f4180a1 edje - fix signal propagate crash
fixes segv when using boxes/tables and sub groups with signal
propagation working in _cb_signal_repeat() when name is NULL (not
found/there)

@fix
2017-06-08 18:45:15 +09:00
Cedric BAIL 31a1850265 edje: clear up left over warning on fallthrough switch case statement. 2017-06-05 13:41:01 -07:00
Cedric BAIL 7caa81ed9d edje: object have small difference and we use switch case fallthrough to reuse code. 2017-06-05 12:07:57 -07:00
Jean-Philippe Andre 76ef772d0a edje: Unify load error types for image and edje (EO)
Most of the values were the same, with edje having just a couple
more error codes.

Not entirely sure the prefix Efl.Image is correct for this type.
Maybe just Efl.Load.Error?
2017-05-29 10:49:17 +09:00
Jean-Philippe Andre c0db1f4225 edje: Add workaround for misuses of clip_set
An unfortunately very common misuse of clip is as follows:

- Layout A is created (edje object / elm_layout)
- Object B is swallowed inside A
- Clipper C is set to clip B

This is a invalid usage, as layout A takes control over the clip
property of B (just like it does for geometry, visibility, color...).

Since 75ec3a7338 edje_recalc resets the clip at every calc
loop, as it can change between states.

In the past, edje_recalc did not reset the clip so anyone could
(wrongly) swallow an object and then change its clip from C to modify
its color, mask it, blend it, etc... Even though this was not proper
use of the API, this is not very clearly documented, and since it
worked, it has been (ab)used a lot already.

The result now is that a clipper set from C will become visible
as an opaque white rectangle covering the entire UI. Booh.

This patch is a workaround that should have no impact on well
written applications. As a bonus this avoids an extra call to
clip_set() from edje.

@fix
2017-04-10 16:14:45 +09:00
Godly T.Alias 48627996d7 efl: fix memory leak in edje and evas.
Summary:
Signed-off-by: Godly T.Alias <godlytalias@yahoo.co.in>
Signed-off-by: Ayush Srivastava <ayush.sriv@samsung.com>

Test Plan: EFL apps

Reviewers: cedric, raster

Subscribers: rajeshps, ayush.sriv, jpeg, prince.dubey

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-15 16:29:07 -08:00
Jee-Yong Um 57c14f1c55 edje: fix cached edje modification issue
Summary:
_edje_part_***_set/get (for mouse_events, repeat_events, ignore_flags, mask_flags)
overwrite cached edje value. These behaviors affect all edje object added after
these changes, and result in not intended.

@fix

Reviewers: jpeg, cedric

Subscribers: akanad, woohyun

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 15:14:54 -08:00
Hosang Kim 15d46a419f edje_load: fix mirroring bug with GROUP, BOX, or TABLE part
Summary:
Mirrored stated should be applied to new edje_object
which is created for GROUP, BOX, or TABLE part.

@fix

Reviewers: woohyun, raster, cedric, jpeg, singh.amitesh

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 14:17:47 -08:00
Amitesh Singh 1a798c37dc edje: unset timer pointer after delete.
Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-02-04 13:30:49 +05:30
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08:00
Bruno Dilly 9308410479 edje: support filtering allowed seats per part
collections.group.parts.part.allowed_seats keeps a list
of seat names to be used for events filter.

So when evas devices of seat type are added, filters
may be applied for each part.

If no seat is listed, every seat may interact with such
part.
2016-12-21 23:03:33 -02:00
Cedric BAIL a5804c970d edje: fix float comparison warning in vector loading logic.
Hum, there is no use of our fixed point infrastructure for vector.
2016-12-20 16:39:30 -08:00
Bruno Dilly 287486e920 edje: add flag to choose between evas or edje seat naming
collections.group.use_custom_seat_names should be set to '1'
to use seat names on signals as provided by Evas.

By default just follow Edje naming approach
("seat1", "seat2", ...)
2016-12-19 14:58:35 -02:00
Bruno Dilly bb3fd015de edje: add names for seats following an incremental pattern
This way it'll be possible to write EDC with seat names that
will work no matter how seats are named by each ecore_evas
backend or users.
2016-12-19 14:58:35 -02:00
Bruno Dilly 5cfdf3ec3a edje: support seat on focus action and signals
Seat goes as an optional parameter for FOCUS_SET (if not
provided, act over default seat), and emit signals
with seat suffix:
 * focus,in,$SEAT
 * focus,out,$SEAT
 * focus,part,in,$SEAT
 * focus,part,out,$SEAT
2016-12-19 14:58:35 -02:00
Jee-Yong Um 0fd1445508 edje.object: implement Efl.Observer interface
Summary:
To remove duplicated lines to handle edje class (color, text, size),
observer interface is implemented to Edje.Object.

Reviewers: jpeg, cedric

Reviewed By: cedric

Subscribers: bu5hm4n, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-01 11:48:44 -07:00
Subhransu Mohanty cf779b44e0 evas/vg: renamed the legacy vg shape apis
Reviewers: Hermet, cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4284
2016-10-05 11:07:12 +09:00
Tom Hacohen 9c779dca90 Rename efl_self to efl_added
It has been discussed on the ML (thread: "[RFC] rename efl_self") and
IRC, and has been decided we should rename it to this in order to avoid
confusion with the already established meaning of self which is very
similar to what we were using it for, but didn't have complete overlap.

Kudos to Marcel Hollerbach for initiating the discussion and
fighting for it until he convinced a significant mass. :)

This commit breaks API, and depending on compiler potentially ABI.

@feature
2016-09-05 16:59:56 +01:00