This implements edje_object_part_external_object_get() using
efl_content_get() on the part object. Note that there are now
two ways to call APIs on the external part:
- direct call to the efl_part() as if it was the object itself
(implemented by composition),
- get a handle with efl_content_get(efl_part()) and manipulate
it directly (it is the real object).
Do we need this? Do we need the composition trick? Should we have
only one of those solutions implemented?
This effectively replaces edje_object_part_external_object_get
and allows all function calls except those from Efl.Object.
Is this good enough? Or do we need access to the real object?
This adds a new class: Efl.Canvas.Layout.External.
I hate this long name...
This class represents an external part, and for now only
supports param_set/get as well as param_type_get. For now
param_type_get() still returns an Edje_External_Param_Type and
not another more generic type.
TODO: enumerate choices, return object, return content
Original patch by Jinwoo Shin:
If edje has multiple levels of child group,
edje_object_message_signal_process cannot process message on
child group. To cover that, it needs to add new API which
traverses its hierarchy and process messages.
@feature
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
Differential Revision: https://phab.enlightenment.org/D4914
This refactors even more the edje part eo internals. But now
common part APIs can easily be implemented in edje_part.c
The API now looks like:
efl_gfx_geometry_get(efl_part(edje, "part"), &x, &y, &w, &h)
1. Make internal part "real_part_set" an internal function (EO)
2. Use a common class rather than an interface:
- Cost: 1 extra call to efl_data_scope_get() as we don't have
the data inside the EO function call implementation.
- Gain: Ability to implement common code, such as part_geometry_get
Ooooh. This one might be controversial, as some apps definitely
use the function. But it is so easily abused. For our EO API
we are trying to not expose any internal object, as this prevents
us from making changes to the internal behaviour and structure.
All the features that this API provided should be limited to
read-only access to the internal object. In order to replace
this, we will have to return an Efl.Part object that implements
all those APIs: geometry_get, visibility_get, etc...
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?
Since this uses generic_value (aka Eina_Value), there is an
implicit type detection and conversion. I did not attempt to
cover all types (namely string+int and string+float and even
less sets of those) as I believe they aren't really used. Or
they most likely could be replaced by multiple messages rather
than a single message.
Note: should we pass ptr(generic_value) instead of generic_value?
The API looks a little odd in C when passing by value.
@feature
It is used to receive messages with a payload from embryo to C.
This API has a function pointer, which means it would have to be
manually bound, or transformed (eg. eo event).
Also, prepare the change for message_send to use Eina_Value and
no explicit type.
This feature seems rarely used.
But note that handler_set is in fact used in terminology, rage and
luncher. So, if the need arises, it will have to be transformed in
a proper EO way.
This may be a bit more controversial...
But Evas_Coord really is just an int and all the internals
of EFL assume that the base coordinate type is a 32-bit int.
So this type is a bit redondant and can't easily be changed
to, say, a float or int64.
Ref T5312
Summary:
The return value of the function eina_mempool_malloc was dereferenced without checking. I added the checking code similar to the other codes.
@fix
Reviewers: raster, cedric, jpeg, herdsman, woohyun, stefan_schmidt
Subscribers: stefan_schmidt
Differential Revision: https://phab.enlightenment.org/D4855
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
Summary:
By 403b0ecfa6 the coreaudio
support was dropped.
So 'HAVE_COREAUDIO' define is invalid.
Reviewers: jpeg
Subscribers: cedric, woohyun
Differential Revision: https://phab.enlightenment.org/D4732
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: Pointer ed->callbacks may have NULL value in callback add functions.
This reduce the chance of continue to kind of work for longer in case of memory
constrain. Maybe using Eina macro would be better.
Reviewers: jpeg, jypark
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4761
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: Pointer eina_mempool_malloc return value may have NULL value when
module aren't properly installed. This reduce the chance of a crash and increase
the likelyness of properly handling the failure.
Reviewers: jpeg, jypark
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4763
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
prev_description was used when HAVE_EPHYSICS is set, which is the
default, but I also added a use in 7072fbc2bf where the map
was not properly reset.
This removes an ugly #ifdef and opens the door to other fixes
similar to that map one.
In the following sequence, the swallowed object map property is
never reset as it should have been:
- swallow object
- start program, change state to have a map
- do something
- start program, change state to have no map
but before render, unswallow the object
At this point, the object will never be un-mapped. This is weird.
Somehow edje_calc avoids calling evas_object_map_[enable_]_set
excessively, but I believe the issue is that the object does not
need recalc. Its container needed recalc, not the child (which is
mapped). I'm not 100% sure.
Test case:
elementary_test -to "Genlist Decorate Item Mode"
Click on rotate, select a few items, scroll up and down. Enjoy.
Ref T1551
@fix
Summary: This new kind of APIs should be EO only.
Reviewers: jpeg, cedric, barbieri, bdilly, stefan_schmidt
Reviewed By: cedric, barbieri
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4696
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: I had fixed some typos and wrong expressions, euch as capital letters, singular Etc. in Ecore and Edje API reference doxygen.
Test Plan: Doxygen Revision
Reviewers: stefan, cedric, raster, Jaehyun_Cho, jpeg
Subscribers: conr2d
Differential Revision: https://phab.enlightenment.org/D4677
With the new Efl.Ui.Clock widget, which implements Datetime,
most parts are relative to each other, and trigger a near-inifinite
recalc of all the parts. Indeed edje was recalculating a part even
if it had already calculated it (flag is set).
This seemingly simple patch fixes Datetime and probably a lot
of other edje widgets.
Fixes T4909
@fix
Summary: I had fixed some typos and some wrong expressions, such as capital letters, singular, and orders of groups in Edje and Eet API reference doxygen.
Test Plan: Doxygen Revision
Reviewers: stefan, cedric, raster, Jaehyun_Cho, jpeg
Subscribers: conr2d
Differential Revision: https://phab.enlightenment.org/D4666
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
After a long search I found that fileselector was not calling
super.group_del on deletion, leading to the use of dangling pointers.
So let's verify that group_del is properly called.
See T4598
Summary:
In singleline textblock, using "text.min: 1 0" and min, max width,
Edje allows to use expandable text with ellipsis. It shows ellipsis
when only text's width reach the max width.
But, Edje couldn't support same feature on multiline textblock.
Edje dose not use max height or text.max properly if ellipsis is enabled.
This feature is very useful to make a layout with dynamically aligned text.
@fix
Reviewers: cedric, tasn, woohyun, raster, herdsman
Subscribers: z-wony, eagleeye, jpeg
Differential Revision: https://phab.enlightenment.org/D3595
if its a file downloading (to a tmp location) or a zip/tar/whatever
file being extracted also to a tmp location and that tmp file needs to
be removed after ...you need to keep the obj around to know when to
delete the file. this makes the keeping optional and you query if the
vpath obj is meant to be kept or not. if it's not it's safe to del
immediately.
this cuts down 1 obj per image obj/edje obj when generally unused.
save some mem.
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>
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>
ancient edje files dont put hash strings in the file dictionary but
instead inline and thus the strings cannot be direct added... silly
ancient files.
this is a horrible ugly workaround this but there isn't really
anything better than trying to detect such files (which dont seem to
have an older version in them i can find?) so detect by pointer
address and mapping the file.
this fixes T5138
@fix
Use seat names as prefix, not as suffix, following
a top-down approach and avoiding issues
with applications that may be receiving
doubled signals (legacy + suffixed).
So instead of "mouse,in,seat1" signal will be
"seat,seat1,mouse,in".
This patch need to revert because it just a temporary solution for load
'inherit_only' groups. Problem with these groups is solved in patch
c3733a213b
This reverts commit 88f5ac22c1.
This patch is avoid extra 'change' signals from edje_entry to
elm_entry.
Basically the entry fields does not react to keys pressed with
modificator 'Ctrl'. I was test on Windows 7, MacOS 10.12 and Unity
(GTK+) and they all have similar behavior - keys with 'Ctrl' are
ignored. So this patch make expected beharior for elm_entry
(edje_entry).
several theme elements uses transitioning border scale by for
animation and this has been broken for quite some time now. the theme
sall looked wrong for ages. i just never junted down exactly why, but
i know... i wrote the themes that made use of scale by animation
interpolating from like 0.1 to 1 and so on to make for example a
shadow go from sharp to blurry... the theme hasnt changed. edje did.
it broke.
this fixes it back to where it was. interpolation now works. i left a
comment so no one tries to "fix it".
@fix
Added ability to set the images set by name into image
part image.normal attribute.
Add search the images set id for case when the image id doesn't find in
image entries list.
@fix
eet_read_direct function doesn't works with ciphered data, but it is
possible that edje file was ciphered. In this case data, that returned
by eet_read_direct always will be NULL.
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.
The getter of part_external_type should return this enum value
on error. Thanks Artem Popov for original fix, which however
involved using an integer value directly instead of the less
error-prone enum (see D4502).
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", ...)
If not provided, FOCUS_OBJECT action will keep acting
over default seat.
Also include a usage on edje-multiseat test
(actually no example was exercising this action).
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
Summary:
If "text" is NULL, it is set as empty string in the above code.
So, the removed line is unreachable.
Test Plan: N/A
Reviewers: raster, cedric, herdsman, woohyun, jpeg, Hermet
Reviewed By: Hermet
Differential Revision: https://phab.enlightenment.org/D4462
Summary:
If there were multiple elm_entry objects and some of them were deleted,
the callback function would cause crash problem.
The callback function only for specific data should be deleted when
a entry object is deleted.
@fix
Test Plan: N/A
Reviewers: raster, cedric, herdsman, woohyun, subodh6129
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D4435
Because '\' is dir path for linux, but '/' is dir path for Window,
so better use specific function for getting file's name depending on specific
system
This splits the current Efl.Part implementation for the edje container
objects. These are now split to a edje_part.c, edje_part_helper.h and
separate sources for swallow, box and table.
It's going to make things a bit easier for porting the rest of the
logic.