Commit Graph

168 Commits

Author SHA1 Message Date
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
Carsten Haitzler 6139c7a3c6 edje - reduce anothr 400k or so of memory usage (esp hello world)
so edje was allocating 32 pointers per collection. this is per
collection inside an edje file even if we just use one collection from
that edje file. it consumes 32 pointers. on 64bit thats 256 bytes...
just for pointers to mempools so we can "optimize" freeing and
allocation of parts. this was simply rediculous. i moved it to a
sub-struct allocated on demand (so now only for collections we
actually use) and this nuked 400k of "base memory usage youcant get
rid of).

note that our current default theme has something like 1100 or so
images, 1500 or so collections in it. as theme gorws, memory footprint
goes up if we dont allocation only on demand (when needed/used) and we
aren't careful about the size of our data structs and their content.

@optimize
2016-08-21 11:14:28 +09:00
Jee-Yong Um 4fc6d3cf90 edje: resolve user defined string with type
Summary: Resolve Edje_User_Defined string with type (normal/escaped/unescaped)

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4219
2016-08-16 16:14:21 +09:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Carsten Haitzler 1d6a58cfc9 edje - save memory on edje parts as a lot of over-allocation was done
so ... Edje_Calc_Params was huge ... like about 200 bytes. every part
in every live edje object got one of these in addtion to real part
struct info etc. ... so really every part was probably consuming
300-500 bytes or so... crazy. so i made a lot of the data now optional
so only the minimum required is allocated now which cuts down about 110
or even 120 bytes per part, depending. 100 bytes was needed for 3d
node parts even though almsot no parts are 3d node parts... the image
and text data was 30-40 bytes so we consumed 100 even if we only used
30-40... so this cuts that done and puts in polace calc param cleanup
funcs everywhere they are needed to clean up this extra allocated data.

i also reduced this even more by maping pointers to req_drag, map and
physics and clip_to fields in another extension struct cutting
down another 28/52 bytes on most parts (in  return for an added
4/8 bytes - on 32/64bit accordingly).

in elementary_test this saves about ~300kb of ram for just having the
etst run and displaying (peak memory measuremment). so massif says
10.6M -> 10.3M.

@optimize
2016-08-15 09:21:08 +09:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Carsten Haitzler e5cfb76ef1 edje object shutdown - be far more paranoid about ptrs and order
so we didnt set everything to null after being freed and object sae
freed after some data. do the data frees after objects are deleted so
callbacks cant access null data anyway. this makes this edje shutdown
far more robust and safe. massive improvement in stability i hope.
2016-08-04 18:28:49 +09:00
Carsten Haitzler c59995916e edje - fix access to freed data struct during object shutdown
this fixes T4181
2016-08-04 18:19:42 +09:00
Subhransu Mohanty d458101a41 edje: updated the start index of vector resource from 1 to 0
Reviewers: cedric, jpeg

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-08-03 17:34:57 -07:00
Carsten Haitzler 1d0b500fa8 edje - reduce memory footrpint by dlopening ephysics on demand
this saves about another 80Kb or so in dirty pages by only loading
ephysics when needed. This removed ephysics and bullet library dirty
pages from the process space. this is another patch to address T4227.

@fix
2016-08-01 19:11:39 +09:00
Subhransu Mohanty 7af272d93c edje: Fix handling of polygon and polyline node.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4203
2016-08-01 13:23:44 +09:00
Stefan Schmidt 3f4b2a2c90 edje: remove now unused variables
Commit e3ed888aa9 removed the code where these
variables have been used before.
2016-07-26 12:41:19 +02:00
Subhransu Mohanty e3ed888aa9 edje: fixed issue with applying transformation and stroke width
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4192
2016-07-26 14:33:15 +09:00