fix CID 1379920 - event_flags is actually never NULL or undefined in
the function logic. it's always set to point to the specific event
flags field depending on struct type or the function will return
before using the pointer.
Also implement markup_set/get for:
- Efl.Ui.Frame
- Efl.Ui.Slider
Users may choose between text_set/get and markup_set/get, depending on
whether they want to escape their text or not.
Users can now do either:
efl_text_set(efl_part(obj, "part"), "text");
efl_text_markup_set(efl_part(obj, "part"), "text");
Also have efl_text_get/markup_get.
Using markup_set will allow to choose whether to set a markup or a text
to the text part.
Adds basic markup operations for text objects, and implements it in
Efl.Canvas.Text.
Also, this adds the Efl.Text.Markup_Util class.
This utility class allows basic text-markup conversions.
@feature
This has been used by myself in a branch for a while now and it is time
to bring it into master as a base for all future CI related work.
I plan to use the same scripts and other bits for Jenkins as well as
other CI systems later on.
What we currently cover with this setup are linux builds for three
different distros and MacOSX builds for two different versions.
Travis will only be called when new commits get mirrored onto our GitHub
mirror (which only happens once an hour). Expect delays on these builds.
https://travis-ci.org/Enlightenment/efl
Refer to the previous commits for more context.
When an evas object is given to a container, be it with a variant of
efl_pack() or efl_content_set(), its "ownership" is given to the new
parent container. But ownership here means that the new container may
delete the child when it sees fit (i.e. when the container itself dies,
for instance). This does not mean that a reference was passed from the
calling context to the container. The actual EO owner of the child is
always the canvas or another canvas object, even if it the object is
unpacked.
Note: This means that invalid calls to efl_pack or efl_content_set will
not automatically delete the child object. This is the same as legacy,
and results in floating objects. Just check the return value! :)
Hopefully this is correct for bindings.
efl_del() is valid but bindings such as C++ should be using efl_unref()
and not efl_del() in this situation: a reference was given, so it should
be released.
This comes back to an earlier situation where the fake event objects
created by efl_input_dup() had a parent (it should be the evas or maybe
the window). But that led to issues as efl_unref() would print error
messages. Using efl_allow_parent_unref_set() we hide the error message,
because in this situation we want the caller to use efl_unref() and not
efl_del() (eg. think of bindings...).
See d3436af616
See 6bed255fc4
See 96d94e0076 <-- main commit
This allows deleting an object by simply calling efl_unref() on it, even
if there is a parent. Normally the parent is in charge, and you can
request deletion by calling efl_del() or efl_parent_set(NULL).
But in some rare cases, you want to give ownership of an object (@owned)
and still give a parent to that object. efl_unref() should be used (and
would be used by bindings when going out of scope or on garbage
collection), which would then print an error message. This API allows
the specific behaviour.
@feature
export EO_LIFECYCLE_BACKTRACE=0
This means that the lifecycle can be tracked but we don't care about the
backtraces. Related to some recent eo_debug patches.
If an object still has a parent inside the del intercept, we shouldn't
reset the "parent_sunk" flag. This would indeed break logic as
parent_sunk == false implies that a parent was never set, which means
the parent must be null. Right now this case isn't used but it can be
imagined with caches of evas objects (they should remain parented to
their evas).
@fix
the count ?: 1 check is pointless as count is already checked above.
make it clearer that it's > 0 and remove the ? check. silence for
coverity CID 1380542
edje_object_part_text_style_user_push() doesnt need you to
stringshare_add a string... some other code did it because it "gets"
the string from an obj that might free/delete the string on push etc.
or before so it keeps a copy but then it stringshare_del's it
anyway... the _textpath_ellipsis_set() code creates a trsbuf that
wasn't freed if enabled was false and it never stringshare_del'd the
string is stringshare_added... all of this was pointless code anyway.
you could just pass the constant string directly.
fixes CID 1380543
efl_data_scope_safe_get() is often used to assert that an object is of a
certain type, but assuming it may be NULL or not of the required type.
This means that encountering an invalid type is an error handled by the
caller (we return NULL), and shouldn't print out extra ERR() logs.
This fixes issues with E run under eo_debug. E's code was safe as it's
using evas_object_smart_data_get() and verifies whether the returned
value is NULL (which is expected for a rectangle, for instance).
@fix
After the previous patch, the caller of efl_input_dup() clearly owns the
reference on the returned object, which means she must absolutely delete
or unref if manually.
Note that the previous patch changed the bug from use of invalid eo
pointer to leaking of objects. But the only way to support bindings with
something like dup() is to ensure we give a ref to the caller, and thus
the parent should be null.
Note: eo_debug was used extensively to reach this point.
This solves issues with efl_input_dup() which didn't properly give a
reference to the caller, resulting in dangling eo ids.
Note: This may trigger leaks (instead of invalid refs), but this now
actually reflects the meaning of @owned. This should work with bindings
and C API users should know to call efl_unref().
This patch is the reason for the previous improvements on eo_debug.
@fix
This is done via the syntax (not documented yet):
EO_LIFECYCLE_DEBUG=N:<class names>
Where N is:
1. new/free
2. new/free/ref/unref
3. new/free/ref/unref/reuse
@feature
Summary:
If object just has update of map point without other changes included child,
the map surface can be reused.
Reviewers: jpeg, cedric
Differential Revision: https://phab.enlightenment.org/D5181
Summary:
In case of emile, unmap the memory of the image file when the image file is closing.
But closing of image file happen when the image is flushed from the cache, so the
mapped memory of image file remain for long period of time with no benefit (If it is
in cache, it won't get decoded again). So I think we don't need to keep the mapped
memory of image file.
Test Plan: self
Reviewers: cedric, jpeg, jypark
Reviewed By: cedric
Differential Revision: https://phab.enlightenment.org/D5210
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
If the main loop is destroyed a lot of companion information might already
have been so relying on EFL_EVENT_DEL might be way to late in the shutdown
process. terminate will be triggered as soon as the process of shutting down
is started, so all the data are still valid and have not been destroyed yet.