platform/upstream/efl.git
7 years agoevas-gl-common: Fix dereference after null check
Chris Michael [Thu, 5 Oct 2017 13:51:00 +0000 (09:51 -0400)]
evas-gl-common: Fix dereference after null check

Coverity reports that there may be a null pointer dereference here so
check that 'error' exists before trying to set it.

Fixes CID1374272

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoeolian-bin: Free previously allocated eina_strbuf
Chris Michael [Thu, 5 Oct 2017 13:46:18 +0000 (09:46 -0400)]
eolian-bin: Free previously allocated eina_strbuf

Coverity reports that the eina_strbuf 'param_call' leaks when it goes
out of scope here, so fix the leak by freeing the strbuf

Fixes CID1381502

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoevas: remove image_load from the engine.
Cedric Bail [Thu, 5 Oct 2017 04:48:26 +0000 (21:48 -0700)]
evas: remove image_load from the engine.

7 years agoevas: remove use of engine image_load from Evas.Canvas3D.Texture.
Cedric Bail [Thu, 5 Oct 2017 04:32:22 +0000 (21:32 -0700)]
evas: remove use of engine image_load from Evas.Canvas3D.Texture.

7 years agoevas: remove duplicated code and rely on Efl.File { get; set; }
Cedric Bail [Thu, 5 Oct 2017 04:01:35 +0000 (21:01 -0700)]
evas: remove duplicated code and rely on Efl.File { get; set; }

We can almost remove image_load from the engine backend after this patch.
One little bit left in Evas_3D.

7 years agoedje: remove duplicated code and rely on Efl.File { set; get; } mixin.
Cedric Bail [Thu, 5 Oct 2017 04:00:56 +0000 (21:00 -0700)]
edje: remove duplicated code and rely on Efl.File { set; get; } mixin.

7 years agoefl: make Efl.File a mixin that implement file_set for everyone.
Cedric Bail [Thu, 5 Oct 2017 03:58:06 +0000 (20:58 -0700)]
efl: make Efl.File a mixin that implement file_set for everyone.

7 years agoeina: Eina_Prefix should never contain a NULL, no code expect it.
Cedric Bail [Thu, 5 Oct 2017 03:57:08 +0000 (20:57 -0700)]
eina: Eina_Prefix should never contain a NULL, no code expect it.

7 years agoeina: allow eina_file_close(NULL) to simplify code using Eina_File.
Cedric Bail [Thu, 5 Oct 2017 03:56:15 +0000 (20:56 -0700)]
eina: allow eina_file_close(NULL) to simplify code using Eina_File.

7 years agoelementary: update code highlighting to follow eolian syntax change.
Cedric Bail [Wed, 4 Oct 2017 18:32:09 +0000 (11:32 -0700)]
elementary: update code highlighting to follow eolian syntax change.

7 years agoecore-evas-drm: Implement support for hardware output rotations
Chris Michael [Wed, 4 Oct 2017 15:41:59 +0000 (11:41 -0400)]
ecore-evas-drm: Implement support for hardware output rotations

This patch adds support for doing output rotations via hardware. This
is implemented inside the Ecore_Evas engine so that it is transparent
to the caller of ecore_evas_rotation_set.

ref T5999

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoector: minor grammar fixups
Bryce Harrington [Tue, 3 Oct 2017 18:36:41 +0000 (11:36 -0700)]
ector: minor grammar fixups

Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoedje: moved from edje_multisense.c to Ecore_Audio.h for select the type of render.
Ivan Furs [Tue, 3 Oct 2017 18:22:07 +0000 (11:22 -0700)]
edje: moved from edje_multisense.c to Ecore_Audio.h for select the type of render.

Reviewers: NikaWhite, raster, cedric, vtorri, rimmed

Reviewed By: NikaWhite, vtorri

Subscribers: artem.popov, cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoecore_audio: a minimal template for playing sound on WINDOWS is added
Ivan Furs [Tue, 3 Oct 2017 18:21:07 +0000 (11:21 -0700)]
ecore_audio: a minimal template for playing sound on WINDOWS is added

Summary:
Realization of audio data playback through WASAPI (Windows Audio Session API).(minimal)
WASAPI model:
1. Find  a playback device (in the default system)
2. Register the client on the playback device.
3. Create a playback format for audio data.
4. Initialize the client with the created format, and access mode,  ....
5. Take the object-rendering from the client for play the data stream.
6. Play data stream

ecore_audio model:
1. create a object for play the data stream(out object)
2. create a object to receive the data stream(in object)
3. register in the out-object the in-object
4. play data stream

Necessary:
Realize the ecore_audio object to play the data stream using the WASAPI model.

How implemented:
1. The object ecore_audio_out_wasapi is implemented
2. object ecore_audio_out_wasapi - the object constructor is find a playback device (in the default system)(WASAPI)
3. _ecore_audio_out_wasapi_ecore_audio_out_input_attach -  register in the out-object the in-object
   3.1 Register the client on the playback device.(WASAPI)
   3.2 Create a playback format for audio data.(WASAPI)
   3.3 Initialize the client with the created format, and access mode,  ....(WASAPI)
4. _write_cb - play data
   4.1  Take the object-rendering from the client for play the data stream.(WASAPI)
   4.2  Play data stream(WASAPI)

Reviewers: cedric, vtorri, raster, an.kroitor, NikaWhite, FurryMyad, rimmed, t.naumenko, Jaehyun, bowonryu

Reviewed By: vtorri, NikaWhite

Subscribers: artem.popov, cedric, jpeg

Tags: #windows

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoelput: Fix issue of pointer rotation not being set on startup
Chris Michael [Tue, 3 Oct 2017 17:25:03 +0000 (13:25 -0400)]
elput: Fix issue of pointer rotation not being set on startup

elput_input_pointer_rotation_set may be getting called before input
devices are actually added, so we need to be able to set pointer
rotation when a device actually gets added.

To fix this, we will store the requested input rotation value, and
apply it at the time of input device creation.

NB: The current case is that the wl_drm module will apply existing
output rotation before Input has completely initialized, thus any
calls to set the pointer rotation there will not succeed as input
devices have not been created yet.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoecore-file: do not emit events when an inotify watch is removed
Mike Blumenkrantz [Tue, 3 Oct 2017 17:33:14 +0000 (13:33 -0400)]
ecore-file: do not emit events when an inotify watch is removed

???????????????????????????????????????????????????????????????????????????????

@fix

7 years agoelementary: Mark unused function parameter as unused
Chris Michael [Mon, 2 Oct 2017 12:19:42 +0000 (08:19 -0400)]
elementary: Mark unused function parameter as unused

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoecore-con: Mark unused function paramater as unused
Chris Michael [Mon, 2 Oct 2017 12:12:06 +0000 (08:12 -0400)]
ecore-con: Mark unused function paramater as unused

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoCanvas layout: fix Efl.text (non-legacy) TEXT parts
Daniel Hirt [Mon, 2 Oct 2017 08:03:37 +0000 (11:03 +0300)]
Canvas layout: fix Efl.text (non-legacy) TEXT parts

Current implementation should also support TEXT parts (like button)
with usage of efl_text_set.

Follow-up to 0061a4bb349e6c8e122913791bf83f7f40b0cede.

7 years agoWindows: remove XP support and forbid compilation and run on this platform
Vincent Torri [Sun, 1 Oct 2017 16:07:02 +0000 (17:07 +0100)]
Windows: remove XP support and forbid compilation and run on this platform

Test Plan: run on XP

Reviewers: jpeg, cedric, ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: ajwillia.ms

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

7 years agoUi layout: handle Efl.Text legacy code better
Daniel Hirt [Sun, 1 Oct 2017 15:40:50 +0000 (18:40 +0300)]
Ui layout: handle Efl.Text legacy code better

This should cover the cases without need to duplicate a lot of code.
Follow-up to deca3c947ff1a2bed3f4baadce576105055af266.

7 years agoCanvas layout: improve legacy code paths for Efl.Text
Daniel Hirt [Sun, 1 Oct 2017 15:38:18 +0000 (18:38 +0300)]
Canvas layout: improve legacy code paths for Efl.Text

Better handling of specific cases where you want to efl_text_set on
a TEXTBLOCK part.
Follow-up to af1595fd0160f76de82cddeb2576143f65492c0b.

7 years agoelm_code_widget: set appropriate background colour.
Al Poole [Sun, 1 Oct 2017 10:10:28 +0000 (11:10 +0100)]
elm_code_widget: set appropriate background colour.

7 years agoCanvas layout: fix legacy text set
Daniel Hirt [Sun, 1 Oct 2017 08:37:42 +0000 (11:37 +0300)]
Canvas layout: fix legacy text set

Keep the legacy code path when using edje_object_part_text_set.
Fixes e's notification that got broken after
3642b3ae679e3bedba4155fb9e54b44483b3b9e1.

Also, limit new efl_text_markup set to TEXTBLOCK parts.

7 years agoeina debug - add missing unlock in erite err case
Carsten Haitzler (Rasterman) [Sun, 1 Oct 2017 07:04:35 +0000 (16:04 +0900)]
eina debug - add missing unlock in erite err case

fix CID 1381503

7 years agoefl_ui_focus_object: also implement focus.get
Marcel Hollerbach [Sat, 30 Sep 2017 17:32:31 +0000 (19:32 +0200)]
efl_ui_focus_object: also implement focus.get

7 years agoevas_focus: skip focus set if the focus state is the same
Marcel Hollerbach [Sat, 30 Sep 2017 17:29:00 +0000 (19:29 +0200)]
evas_focus: skip focus set if the focus state is the same

7 years agoecore_con: simplify Efl.Net.Server.Ssl by inheriting from Efl.Net.Server.Tcp.
Cedric BAIL [Fri, 29 Sep 2017 23:01:02 +0000 (16:01 -0700)]
ecore_con: simplify Efl.Net.Server.Ssl by inheriting from Efl.Net.Server.Tcp.

7 years agoecore_con: add an intermediate Efl.Net.Server.Ip
Cedric BAIL [Fri, 29 Sep 2017 21:12:03 +0000 (14:12 -0700)]
ecore_con: add an intermediate Efl.Net.Server.Ip

7 years agoeolian gen: simplify generate_normal_free a bit
Daniel Kolesa [Fri, 29 Sep 2017 11:00:07 +0000 (13:00 +0200)]
eolian gen: simplify generate_normal_free a bit

7 years agoefl_ui_focus_manager_calc: correctly specify owned where its needed
Marcel Hollerbach [Fri, 29 Sep 2017 09:27:18 +0000 (11:27 +0200)]
efl_ui_focus_manager_calc: correctly specify owned where its needed

7 years agoRevert "elm focus manager - dont leak child lists when updating focus order"
Marcel Hollerbach [Fri, 29 Sep 2017 09:09:33 +0000 (11:09 +0200)]
Revert "elm focus manager - dont leak child lists when updating focus order"

This reverts commit bd6dcbb044ffea543f27cc69c421317bdea4a14a.

This was not fixing the issue, just ducktaping over a bug in eolian, the
bug is now probebly fixed in eo / eolian.

7 years agoeolian: add tests for the new owning functions
Marcel Hollerbach [Fri, 22 Sep 2017 20:56:31 +0000 (22:56 +0200)]
eolian: add tests for the new owning functions

7 years agoeolian: generate free function for owned parameters
Marcel Hollerbach [Thu, 14 Sep 2017 13:12:30 +0000 (15:12 +0200)]
eolian: generate free function for owned parameters

With this commit owned parameters are freed if the object function
cannot be called, this means bla(NULL,param) will not leak anymore

7 years agoeo: introduce function definitions with fallback
Marcel Hollerbach [Thu, 14 Sep 2017 11:55:41 +0000 (13:55 +0200)]
eo: introduce function definitions with fallback

there can be cases where the call to such a function is never going to
be directed to the actual implementation. In those cases the FallackCall
will be called.

7 years agoedje entry: fill content info when text is deleted by imf event
Youngbok Shin [Fri, 29 Sep 2017 06:29:31 +0000 (15:29 +0900)]
edje entry: fill content info when text is deleted by imf event

Summary:
There was missing info when text is deleted by _edje_entry_imf_event_delete_surrounding_cb().
@fix

Test Plan: N/A

Reviewers: kimcinoo, raster, cedric, jpeg, herdsman

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

7 years agoevas font: check returned value of FcPatternGet function
Youngbok Shin [Fri, 29 Sep 2017 06:16:21 +0000 (15:16 +0900)]
evas font: check returned value of FcPatternGet function

Summary:
Evas should add font when only FcPatternGet function gives matched result.
@fix

Test Plan: N/A

Reviewers: raster, cedric, herdsman, jpeg

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

7 years agoefl ui textpath - remove more unused vars
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 05:52:04 +0000 (14:52 +0900)]
efl ui textpath - remove more unused vars

7 years agoelm test: rename test_slider_interval.c to test_ui_slider_interval.c
Amitesh Singh [Fri, 29 Sep 2017 04:35:21 +0000 (13:35 +0900)]
elm test: rename test_slider_interval.c to test_ui_slider_interval.c

7 years agoefl ui textpath - remove unused vars due to dead code removal
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 03:32:10 +0000 (12:32 +0900)]
efl ui textpath - remove unused vars due to dead code removal

fix warning

7 years agoevas cserve - fix validation of cserve mesg size field
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 03:07:48 +0000 (12:07 +0900)]
evas cserve - fix validation of cserve mesg size field

fix coverity CID 1039567

7 years agoevas cseve - check msgsize before using - coverity
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 03:03:37 +0000 (12:03 +0900)]
evas cseve - check msgsize before using - coverity

fix CID 1039568

7 years agoelm atspi - fix checking return of eldbus_message_iter_arguments_get
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:57:06 +0000 (11:57 +0900)]
elm atspi - fix checking return of eldbus_message_iter_arguments_get

fix coverity CID 1353590

7 years agoelm config - fix eina value setting to check get return
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:52:42 +0000 (11:52 +0900)]
elm config - fix eina value setting to check get return

fix CID 1357139

7 years agoevas ector gl - fix leak of image data on data put
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:47:55 +0000 (11:47 +0900)]
evas ector gl - fix leak of image data on data put

@fix

fix coverity found leak CID 1374645

7 years agoevas ector gl - make coverity happy about leaks on data put
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:45:30 +0000 (11:45 +0900)]
evas ector gl - make coverity happy about leaks on data put

fix CID 1374646

7 years agoeina debug - check write return values and complain on failure
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:39:39 +0000 (11:39 +0900)]
eina debug - check write return values and complain on failure

coverity - fix CID 1377521

7 years agoeina debug - check write return value and complain
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:31:17 +0000 (11:31 +0900)]
eina debug - check write return value and complain

makes coverity happy - CID 1377524

7 years agoefl debugd - check return of write func and report errors
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:21:37 +0000 (11:21 +0900)]
efl debugd - check return of write func and report errors

makes coverity happy and reports write errors... fix CID 1377525

7 years agoefl model - fix checking return of eina_accessor_data_get
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 02:07:12 +0000 (11:07 +0900)]
efl model - fix checking return of eina_accessor_data_get

coverity - fixes CID 1380995

7 years agoeio: do not copy memory for nothing.
Cedric Bail [Fri, 29 Sep 2017 01:22:32 +0000 (18:22 -0700)]
eio: do not copy memory for nothing.

7 years agoeio: use TIMESTAMP when meaningful.
Cedric Bail [Fri, 29 Sep 2017 01:21:18 +0000 (18:21 -0700)]
eio: use TIMESTAMP when meaningful.

7 years agoeio: migrate efl.io.manager.ls to use Eina_Future.
Cedric Bail [Fri, 29 Sep 2017 01:18:38 +0000 (18:18 -0700)]
eio: migrate efl.io.manager.ls to use Eina_Future.

7 years agoecore: allow other thread to write local data on a thread to increase utility.
Cedric Bail [Fri, 29 Sep 2017 01:17:57 +0000 (18:17 -0700)]
ecore: allow other thread to write local data on a thread to increase utility.

7 years agoelm widget - event legacy propagation - remove coverity warning
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 00:09:04 +0000 (09:09 +0900)]
elm widget - event legacy propagation - remove coverity warning

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.

7 years agoefl text markup - fix hex check to be or not and - found by coverity
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 00:03:04 +0000 (09:03 +0900)]
efl text markup - fix hex check to be or not and - found by coverity

fix CID 1381491

7 years agoefl ui focusable - remove pointless check of ptr already checked
Carsten Haitzler (Rasterman) [Fri, 29 Sep 2017 00:00:43 +0000 (09:00 +0900)]
efl ui focusable - remove pointless check of ptr already checked

coverity fix CID 1381492

7 years agoeolian: fix tests after extra checks
Daniel Kolesa [Thu, 28 Sep 2017 21:25:12 +0000 (23:25 +0200)]
eolian: fix tests after extra checks

7 years agoeolian: validate inner types of complex types
Daniel Kolesa [Thu, 28 Sep 2017 21:22:05 +0000 (23:22 +0200)]
eolian: validate inner types of complex types

This makes sure the inner types are all correctly defined and
that freefuncs are actually correctly filled.

7 years agoeolian-cxx: Add optional parameter to lambda for unnamed proxy instantiation
Felipe Magno de Almeida [Thu, 28 Sep 2017 20:48:04 +0000 (17:48 -0300)]
eolian-cxx: Add optional parameter to lambda for unnamed proxy instantiation

7 years agoci: disable examples build for osx for now
Stefan Schmidt [Thu, 28 Sep 2017 20:35:13 +0000 (22:35 +0200)]
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.

7 years agoUi layout: support markup for efl_part()
Daniel Hirt [Thu, 28 Sep 2017 07:27:32 +0000 (10:27 +0300)]
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.

7 years agoCanvas layout: support markup for efl_part
Daniel Hirt [Thu, 28 Sep 2017 06:46:42 +0000 (09:46 +0300)]
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.

7 years agoCanvas text: use EINA_UNUSED for unused variables
Daniel Hirt [Thu, 28 Sep 2017 16:29:35 +0000 (19:29 +0300)]
Canvas text: use EINA_UNUSED for unused variables

Nothing special here. No need to for the "(void) eo_obj".

7 years agoUi text: add test for Efl.Text.Markup
Daniel Hirt [Thu, 28 Sep 2017 16:26:41 +0000 (19:26 +0300)]
Ui text: add test for Efl.Text.Markup

7 years agoEfl text: add Efl.Text.Markup interface
Daniel Hirt [Mon, 25 Sep 2017 16:21:21 +0000 (19:21 +0300)]
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

7 years agoci: README: simple docs for the current CI setup
Stefan Schmidt [Thu, 28 Sep 2017 13:34:56 +0000 (15:34 +0200)]
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.

7 years agoci: initial travis CI support for Linux distros and MacOSX builds
Stefan Schmidt [Thu, 28 Sep 2017 13:26:55 +0000 (15:26 +0200)]
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

7 years agoelementary: atspi - fix dbus abort
Shinwoo Kim [Thu, 28 Sep 2017 11:08:25 +0000 (20:08 +0900)]
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

7 years agoefl: Remove @owned tag from pack/content APIs
Jean-Philippe Andre [Thu, 28 Sep 2017 08:11:15 +0000 (17:11 +0900)]
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.

7 years agotests: Use efl_unref() on duplicated event objects
Jean-Philippe Andre [Thu, 28 Sep 2017 07:50:53 +0000 (16:50 +0900)]
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.

7 years agoevas: Give a parent to duplicated event objects
Jean-Philippe Andre [Thu, 28 Sep 2017 07:45:45 +0000 (16:45 +0900)]
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 d3436af616319f1fdbbd4a0aa71a7835a14699ac
See 6bed255fc4bbe1b30c960339e8dda2fc6e7925cd
See 96d94e0076773d6b29107035dc61f5df01a3347f <-- main commit

7 years agoeo: Add API to allow deletion by unref
Jean-Philippe Andre [Thu, 28 Sep 2017 07:38:00 +0000 (16:38 +0900)]
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

7 years agoeo_debug: Allow disabling of backtraces
Jean-Philippe Andre [Thu, 28 Sep 2017 06:50:54 +0000 (15:50 +0900)]
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.

7 years agoeo: Allow efl_reuse to be called with a parent
Jean-Philippe Andre [Thu, 28 Sep 2017 06:43:28 +0000 (15:43 +0900)]
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

7 years agoecore wl2 - fix null checing of drag offer - coverity
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 06:23:05 +0000 (15:23 +0900)]
ecore wl2 - fix null checing of drag offer - coverity

fix CID 1378629

7 years agoecore evas - wayland - avoid divide by 0 if height is 0
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 04:58:08 +0000 (13:58 +0900)]
ecore evas - wayland - avoid divide by 0 if height is 0

fixes CID 1379247

7 years agoelm widget - fix possible null ptr access found by coverity
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 04:39:35 +0000 (13:39 +0900)]
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

7 years agoefl ui focus - fix coverity complaints about derfer before null check
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 03:29:46 +0000 (12:29 +0900)]
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

7 years agoefl ui win - quieten coverity complaint about dead code
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 03:17:44 +0000 (12:17 +0900)]
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

7 years agoefl ui text - remove logically dead code
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 03:08:16 +0000 (12:08 +0900)]
efl ui text - remove logically dead code

it is indeed pointless code. fix coverity CID 1380544

7 years agoedje - fix check return of _edje_fetch
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 02:30:28 +0000 (11:30 +0900)]
edje - fix check return of _edje_fetch

fixes CID 1381326

7 years agoefl ui text - fix resource leak of strbuf and pointless buffer code
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 00:16:02 +0000 (09:16 +0900)]
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

7 years agoevas font loading - fix possible divide by 0 when font size is 0
Carsten Haitzler (Rasterman) [Thu, 28 Sep 2017 00:08:44 +0000 (09:08 +0900)]
evas font loading - fix possible divide by 0 when font size is 0

fix coverity CID 1381446

7 years agoeo: Fix unnecessary ERR logs with eo_debug
Jean-Philippe Andre [Thu, 28 Sep 2017 03:25:19 +0000 (12:25 +0900)]
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

7 years agotests: Fix leak of input event & devices
Jean-Philippe Andre [Thu, 28 Sep 2017 02:57:51 +0000 (11:57 +0900)]
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.

7 years agoevas: Fix dangling references with input devices
Jean-Philippe Andre [Thu, 28 Sep 2017 02:27:56 +0000 (11:27 +0900)]
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

7 years agoeo_debug: Also print out the current backtrace
Jean-Philippe Andre [Thu, 28 Sep 2017 01:25:18 +0000 (10:25 +0900)]
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.

7 years agoeo_debug: Enable logging of all ref/unref
Jean-Philippe Andre [Wed, 27 Sep 2017 05:14:58 +0000 (14:14 +0900)]
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

7 years agoevas : Improve the performance by reusing map surface
jiin.moon [Wed, 27 Sep 2017 08:28:59 +0000 (17:28 +0900)]
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

7 years agotests: Improve test case for win/evas event refeed
Jean-Philippe Andre [Wed, 27 Sep 2017 02:46:52 +0000 (11:46 +0900)]
tests: Improve test case for win/evas event refeed

7 years agointv slider: use scope_get instead in finalize()
Amitesh Singh [Thu, 28 Sep 2017 03:19:37 +0000 (12:19 +0900)]
intv slider: use scope_get instead in finalize()

7 years agoeio: convert Efl.Io.Manager.stat() to return Eina_Future.
Cedric BAIL [Wed, 27 Sep 2017 23:32:58 +0000 (16:32 -0700)]
eio: convert Efl.Io.Manager.stat() to return Eina_Future.

7 years agoeina: add an helper to setup Eina_Value structure description.
Cedric BAIL [Wed, 27 Sep 2017 23:30:31 +0000 (16:30 -0700)]
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.

7 years agoemile: unmap the memory for image file after decode.
jiin.moon [Wed, 27 Sep 2017 18:51:44 +0000 (11:51 -0700)]
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>
7 years agoelementary: avoid segfault when getting focus due to an infinite recursion.
Cedric BAIL [Tue, 26 Sep 2017 22:21:12 +0000 (15:21 -0700)]
elementary: avoid segfault when getting focus due to an infinite recursion.

This was two line switched and setting the callbacks on the wrong object.

7 years agoecore: we can actually inherit from Efl.Object, just not in the first position.
Cedric BAIL [Tue, 26 Sep 2017 18:13:06 +0000 (11:13 -0700)]
ecore: we can actually inherit from Efl.Object, just not in the first position.

7 years agoeina: remove EFL_HAVE_WIN32_THREADS define as it is unused since winpthread is used
Vincent Torri [Sat, 23 Sep 2017 16:02:44 +0000 (18:02 +0200)]
eina: remove EFL_HAVE_WIN32_THREADS define as it is unused since winpthread is used

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoelementary: remove useless fprintf.
Cedric BAIL [Tue, 26 Sep 2017 17:09:59 +0000 (10:09 -0700)]
elementary: remove useless fprintf.

7 years agoelementary: actually implement the terminate event.
Cedric BAIL [Tue, 26 Sep 2017 17:09:37 +0000 (10:09 -0700)]
elementary: actually implement the terminate event.