Commit Graph

55557 Commits

Author SHA1 Message Date
Daniel Kolesa 7c7e5ec423 eolian: validate inner types of complex types
This makes sure the inner types are all correctly defined and
that freefuncs are actually correctly filled.
2017-09-28 23:22:05 +02:00
Felipe Magno de Almeida 96d3af10bf eolian-cxx: Add optional parameter to lambda for unnamed proxy instantiation 2017-09-28 17:50:14 -03:00
Stefan Schmidt a2ea2cf188 ci: disable examples build for osx for now
On the 10.12 build we regularly run into the maximum time limit for a
osx build job (45min?). Lets focus on the normal build for now.
2017-09-28 22:37:15 +02:00
Daniel Hirt deca3c947f Ui layout: support markup for efl_part()
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.
2017-09-28 19:32:02 +03:00
Daniel Hirt 3642b3ae67 Canvas layout: support markup for efl_part
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.
2017-09-28 19:32:02 +03:00
Daniel Hirt e34efbed96 Canvas text: use EINA_UNUSED for unused variables
Nothing special here. No need to for the "(void) eo_obj".
2017-09-28 19:32:02 +03:00
Daniel Hirt 7915cc3e1d Ui text: add test for Efl.Text.Markup 2017-09-28 19:32:02 +03:00
Daniel Hirt 69d0646b33 Efl text: add Efl.Text.Markup interface
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
2017-09-28 19:32:02 +03:00
Stefan Schmidt bc8b2857c1 ci: README: simple docs for the current CI setup
Describe what we currently do in terms of building on Travis and how
developer can do a local test with the docker build.
2017-09-28 15:37:51 +02:00
Stefan Schmidt 30c085ca0e ci: initial travis CI support for Linux distros and MacOSX builds
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
2017-09-28 15:26:55 +02:00
Shinwoo Kim 6f06979cdc elementary: atspi - fix dbus abort
This patch set fix following abort occured on dbus side.

(gdb) bt
0   __GI_raise (sig=sig@entry=6)
1   __GI_abort ()
2   _dbus_abort ()
3   _dbus_warn_check_failed
4   dbus_message_iter_append_basic
5   append_basic
6   eldbus_message_iter_basic_append
7   _bridge_signal_send
8   _text_text_removed_send
9   _bridge_accessible_event_dispatch
10  _elm_interface_atspi_accessible_event_emit
11  elm_interface_atspi_accessible_event_emit
12  _entry_changed_user_signal_cb

(gdb) f 12
(gdb) p *$1
$2 = {change = {insert = {content = 0x0, pos = 0, plain_length = 1},
                del = {content = 0x0, start = 0, end = 1}},
      insert = 0 '\000', merge = 0 '\000'}

The following patch set would fix the root cause of this problem.
https://phab.enlightenment.org/D5240
2017-09-28 20:29:33 +09:00
Jean-Philippe Andre 76ab8e3f54 efl: Remove @owned tag from pack/content APIs
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.
2017-09-28 17:29:03 +09:00
Jean-Philippe Andre ce84604068 tests: Use efl_unref() on duplicated event objects
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.
2017-09-28 16:50:53 +09:00
Jean-Philippe Andre f7a7a29cc0 evas: Give a parent to duplicated event objects
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
2017-09-28 16:45:45 +09:00
Jean-Philippe Andre d3436af616 eo: Add API to allow deletion by unref
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
2017-09-28 16:42:04 +09:00
Jean-Philippe Andre 662a172139 eo_debug: Allow disabling of backtraces
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.
2017-09-28 16:15:07 +09:00
Jean-Philippe Andre 008ec97d84 eo: Allow efl_reuse to be called with a parent
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
2017-09-28 16:10:53 +09:00
Carsten Haitzler 9ee741cf7f ecore wl2 - fix null checing of drag offer - coverity
fix CID 1378629
2017-09-28 15:28:00 +09:00
Carsten Haitzler 92e8935fa6 ecore evas - wayland - avoid divide by 0 if height is 0
fixes CID 1379247
2017-09-28 15:28:00 +09:00
Carsten Haitzler dea4e5aa46 elm widget - fix possible null ptr access found by coverity
_propagate_event_legacy checked event_flags ptr for null then just
derefs it anyway... so check everywhere. fixes CID 1379920
2017-09-28 15:28:00 +09:00
Carsten Haitzler 1dcac1853d efl ui focus - fix coverity complaints about derfer before null check
indeed there was a child cnull check after dereferencing the child...
so check completely. fix CID 1379925
2017-09-28 15:28:00 +09:00
Carsten Haitzler 49df80aa6f efl ui win - quieten coverity complaint about dead code
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
2017-09-28 15:28:00 +09:00
Carsten Haitzler 35b65e0643 efl ui text - remove logically dead code
it is indeed pointless code. fix coverity CID 1380544
2017-09-28 15:28:00 +09:00
Carsten Haitzler 22466b991c edje - fix check return of _edje_fetch
fixes CID 1381326
2017-09-28 15:28:00 +09:00
Carsten Haitzler bee7bf5767 efl ui text - fix resource leak of strbuf and pointless buffer code
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
2017-09-28 15:28:00 +09:00
Carsten Haitzler e095562ea1 evas font loading - fix possible divide by 0 when font size is 0
fix coverity CID 1381446
2017-09-28 15:28:00 +09:00
Jean-Philippe Andre 902938f626 eo: Fix unnecessary ERR logs with eo_debug
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
2017-09-28 12:30:36 +09:00
Jean-Philippe Andre 6bed255fc4 tests: Fix leak of input event & devices
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.
2017-09-28 12:30:36 +09:00
Jean-Philippe Andre 96d94e0076 evas: Fix dangling references with input devices
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
2017-09-28 12:30:36 +09:00
Jean-Philippe Andre 3dc140abfb eo_debug: Also print out the current backtrace
We can't use EINA_LOG_BACKTRACE=1 for that as eo_lifecycle itself prints
out ERR messages for its backtrace dump.
2017-09-28 12:30:36 +09:00
Jean-Philippe Andre 213821240b eo_debug: Enable logging of all ref/unref
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
2017-09-28 12:30:36 +09:00
jiin.moon 98147ce097 evas : Improve the performance by reusing map surface
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
2017-09-28 12:30:36 +09:00
Jean-Philippe Andre fcdb37dd3e tests: Improve test case for win/evas event refeed 2017-09-28 12:30:36 +09:00
Amitesh Singh 8ab7042149 intv slider: use scope_get instead in finalize() 2017-09-28 12:19:49 +09:00
Cedric BAIL 245ea06a65 eio: convert Efl.Io.Manager.stat() to return Eina_Future. 2017-09-27 16:32:58 -07:00
Cedric BAIL 3a3ae49afd eina: add an helper to setup Eina_Value structure description.
This is particularly useful on system like Windows who doesn't allow
setting pointer at compile time in static const structure.
2017-09-27 16:30:31 -07:00
jiin.moon d23aca3c8e emile: unmap the memory for image file after decode.
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>
2017-09-27 11:51:50 -07:00
Cedric BAIL 1ac4a03d4f elementary: avoid segfault when getting focus due to an infinite recursion.
This was two line switched and setting the callbacks on the wrong object.
2017-09-26 15:21:12 -07:00
Cedric BAIL 37d6bc03fd ecore: we can actually inherit from Efl.Object, just not in the first position. 2017-09-26 11:13:06 -07:00
Vincent Torri 9b416d2360 eina: remove EFL_HAVE_WIN32_THREADS define as it is unused since winpthread is used
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-09-26 10:17:04 -07:00
Cedric BAIL 448244360f elementary: remove useless fprintf. 2017-09-26 10:15:07 -07:00
Cedric BAIL 0b37853f14 elementary: actually implement the terminate event. 2017-09-26 10:15:07 -07:00
Cedric BAIL 5c14be4ecf ecore: we need a different event for tracking the lifecycle of the main loop.
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.
2017-09-26 10:15:07 -07:00
Cedric BAIL 8e5a79f957 elementary: don't crash if API is called after shutdown. 2017-09-26 10:15:07 -07:00
Cedric BAIL 0b8e3e6fcf elementary: restore input propagation and destroy array properly. 2017-09-26 10:15:07 -07:00
Derek Foreman 0ad6c47ec2 efl_wl: Stop queuing buffer release events
This was an optimization that caused more pain than benefit in the
long term.  Weston no longer does it, so we're just following suit.
2017-09-26 11:39:19 -05:00
Jean-Philippe Andre a742edb486 examples: Fix C++ bg example
This is not nice yet... part API needs to be improved in C++.
2017-09-26 22:00:02 +09:00
Jean-Philippe Andre 7cc23b1754 elm: win part EO files are public 2017-09-26 22:00:02 +09:00
Jean-Philippe Andre 15f0614e6f elm: Fix make distcheck
See ebff5e8639
2017-09-26 22:00:02 +09:00
Youngbok Shin 42ac2136b0 evas textblock: use main font's ascent/descent as minimum value
Summary:
The patch will adjust ascent/descent with considering main font's ascent/descent
as minimum value. Actually, this patch re-apply D5217 with resolving linegap issue
on the _layout_format_ascent_descent_adjust() function.
@fix

Test Plan: Put a text which will load smaller font. And put a text which will load primary font.

Reviewers: raster, cedric, herdsman, jpeg

Differential Revision: https://phab.enlightenment.org/D5227
2017-09-26 14:33:11 +03:00