Commit Graph

66 Commits

Author SHA1 Message Date
Ross Vandegrift 71e5c74eb6 efl: drop deprecated Encoding key from desktop files
Summary:
The Encoding key is no longer required, all desktop files are assumed to
be UTF-8 encoded.  See details at:
https://standards.freedesktop.org/desktop-entry-spec/1.1/apc.html

Fix various typos and misspellings

lintian, Debian's package checker, uses strings to check for common typos
in compiled binaries.  This change fixes the ones it identified in 1.20.6.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-12-13 10:27:48 -08:00
Jean-Philippe Andre a3250f975a efl: Use Eina.Size2D for image load size 2017-09-19 10:51:48 +09:00
Jean-Philippe Andre 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Jean-Philippe Andre 8fb194d969 efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most
it's more convenient than (x,y).
2017-09-18 13:22:54 +09:00
Jean-Philippe Andre a73e4c7c80 emotion: Make it a clipped smart object
This reduces code.
And probably adds new bugs.
2017-09-13 09:57:05 +09:00
Jean-Philippe Andre d971ca2fb8 emotion: Fix refcounts related to eio use
Inside emotion, if Eio is compiled, some asynchronous functions are used
and a refcounted struct was used to ensure safety of the code.
Unfortunately the logic didn't make much sense as emotion's private data
is used. The refcount becomes useless, the lifecycle of the data being
bound to the object itself.

Note that an actual crash is almost impossible because:
 - eio is actually quite fast
 - evas objects are kept alive for 2 frames
 - eina_freeq is used to keep eo objects' data alive for some more time

But this in theory fixes the events, as they were sent on the wrong
object. "obj" is the image object, "smartobj" was the emotion object.
This is fixed with a weak ref.

I don't think it is necessary to backport this.
2017-09-13 09:57:05 +09:00
Jean-Philippe Andre 7ef714924a evas: Fix crash with smart objects
This is due to the previous patches.
2017-09-13 09:57:05 +09:00
Jean-Philippe Andre f5a56789e0 evas: Add internal API to make smart obj (un)clipped
Introduction to the problem:
 - Efl.Canvas.Group has a method member_add() to add sub objects.
 - Efl.Canvas.Group (simple smart object) does NOT actually delete the
   objects on deletion. But:
 - Efl.Canvas.Group.Clipped is a direct subclass and WILL delete the sub
   objects on deletion.

Semantically, all smart objects (at least in EO and Elementary) will own
and delete sub objects automatically. Some exceptions are:
 - Edje object (smart clipped) does not delete swallowed objects.
   Edje object is a "clipped" smart object but it pops out all swallowed
   children before getting deleted.
 - Evas box/table/grid also pop out their children before deletion.
   Those classes are all legacy & internal only.
 - Elm.Widget will "manually" delete all its sub objects at deletion, as
   it inherits from Efl.Canvas.Group but basically takes full ownership
   of the sub objects. Note that member_add shouldn't be used on a
   widget, the widgets do it themselves.

Also, smart clipped objects are much more convenient to use as they will
handle some things for you: color, visibility, moving and ownership.

So, the API member_add needs to be marked as own(). But right now
Efl.Canvas.Group does not own. Thus, here's the plan:
 - Mark clipped objects as such with an internal API
 - Merge clipped smart object features directly inside the standard
   smart object.
 - Get rid of Efl.Canvas.Group.Clipped entirely and watch all hell break
   loose.

Ref T5301
2017-09-13 09:57:05 +09:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +09:00
Jean-Philippe Andre 55b529cebc evas/elm: Make group_add/group_del internal functions
This hides those two legacy functions from the EO API.
2017-05-19 14:07:00 +09:00
Jean-Philippe Andre 4310e641cd evas: Make Efl.Canvas.Object.type internal 2017-05-19 14:07:00 +09:00
Derek Foreman fddbf75fc9 Fix sed error that changed "video" to "videfl"
commit c662934be8 seems to have accidentally
renamed a few instances of _video_ to _videfl_, this hopefully changes
them all back.
2017-04-17 17:06:28 -05:00
Jean-Philippe Andre d689afccae group: Track calls to group_del
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
2017-02-15 20:11:22 +09:00
Carsten Haitzler 76244d89a7 vpath file - add a keey property to know if obj should be kept around
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.
2017-02-13 16:51:49 +09:00
Al Poole 1f9e915b5a emotion: add support for obtaining embedded artwork from media files with gstreamer1 backend.
Reviewers: raster, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-01-12 14:37:19 -08:00
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08:00
Chris Michael 2faf3df444 emotion: remove float comparison warnings
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 11:13:40 -05:00
Jean-Philippe Andre f909a6d6ea evas: Fix masks of masks and clippers of clippers in general
The root cause was simple: smart object clipped was not
calling efl_super() on clip_set.

Fixes T4813 (and probably a whole lot of other bugs)
2016-11-09 10:52:03 +09:00
Carsten Haitzler 534c3c91b7 emotion - add vpath support for file_set on emotion objects
this completes my todo list for vpath path support at least for now
(evas images, edje objects and emotion objects). now vpath's work for
these too.
2016-10-25 18:34:25 +09:00
Davide Andreoli b8ae4947b6 Emotion: prefer ratio to calculate sizes
Instead of calculate the ratio from the sizes, calc the width from the ratio,
as ratio seems always accurate.
Fallback to the old code if ratio not available (tbh I never see this case)

@Fix EMOTION_ASPECT_KEEP_BOTH with some rare strams, mostly DVD and online stuff
2016-10-16 08:19:30 +02:00
Jean-Philippe Andre 9bf0df8f32 evas: Mark group_add/del as internal
Lacking a proper internal tag, I'm using both protected (it is
in fact a protected access function) and beta (to mark as unstable,
not real API).

New smart objects based on EO only should rely on constructor,
finalize and destructor exclusively. In theory, this should be fine.

Unfortunately it may be impossible to inherit from the Efl.Ui.Win
class as it uses a really bad hack and calls super.constructor
inside the finalize method.
2016-10-12 11:47:50 +09:00
Jean-Philippe Andre 8a9f0bd603 evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
 - intercept
 - smart resize (do stuff), super, super, super
 - evas object resize

The new code is more like:
 - intercept
 - super, super, super, evas object resize
 - do stuff

But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 11b7cf6b72 evas/elm: Remove function group_move
This is an override of efl_gfx_position_set.
As for the other patches, I hope I didn't break anything.

A problem likely to happen is that the super call was inserted
too early or too late in the call flow. For instance:

  _myclass_position_set(obj, x, y) {
    position_set(super(obj), x, y);
    position_get(obj, &prevx, &prevy);
    do_something_with_delta_xy();
  }

The above code flow is obvisouly wrong, but may have crept in this
patch (such a bug sneaked in inside smart object, breaking
everything at first).
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 97c9fa64a4 evas/elm: Remove group_show and group_hide
These should be just overrides of Efl.Gfx.visible.set. Many
widgets were handling smart show() and hide() manually, which
means this patch is quite large.

Hopefully this doesn't break anything, obviously. But here are
some widgets known to be problematic, as the old code flow was
really strange (sometimes not calling the efl_super function):
 - window
 - notify
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 62abe2cbff evas: Move clip_unset to legacy, remove group_clip
Similarly to group_color_set, group_clip_[un]set should not
exist and should be a result of efl_super and inheritance.

This patch also removes clip_unset from the EO API and keeps
only clip_set(NULL). The reason is that it will avoid bad overrides
of clip_unset() vs. clip_unset(NULL). This also simplifies the code
a bit. Ideally we should be able to reintroduce clip_unset in EO
if we can have a "@final" tag (like java's final keyword), to
prevent overrides.
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 52969ccd9b evas: Remove method group_color_set
Widgets should simply override efl_gfx_color_set and call
super all the way up to evas object.

Legacy compatibility with call interceptors and early call
abortion (eg. delete_me or obj->layer == NULL) are implemented
with an internal call. See the previous commit introducing the
API.
2016-10-12 11:25:55 +09:00
Daniel Zaoui ae739184e1 Emotion: modify the playback finish behavior as before
The callbacks are never invoked due to sd->play equal to 0. The
function _emotion_decode_stop is called before and resets this field.

Before the change to Efl.Canvas.Video, sd->play was not checked.
2016-09-25 13:11:32 +03:00
Yeshwanth Reddivari 7b90e11474 emotion: convert Emotion_Object into Efl.Canvas.Video
Reviewers: singh.amitesh, raster, jpeg, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-09-21 11:04:34 -07:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03: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
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Jean-Philippe Andre 52f9220b3f Evas: Rename smart object into Efl.Canvas.Group 2016-06-17 19:32:43 +09:00
Jean-Philippe Andre 42b63f5507 Evas: Add smart_ prefix to all smart functions (eo)
This is a first step at separating legacy smart
object features away from standard efl interfaces.
2016-06-17 19:25:48 +09:00
Jean-Philippe Andre d4b96d33d6 Evas: Mark type as legacy and protected
Only set() is allowed for EO, and it's a constructor,
protected function. Unfortunately, this means a lot
of #define EVAS_OBJECT_PROTECTED
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre b458341a13 Efl.Gfx.Buffer: Add interface skeletton 2016-03-15 11:11:59 +09:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen 23a6b12183 Fix migration script mistakes and compilation warnings.
Mostly unused vars following the removal of eo_do_ret().
However, there are some cases where the migration script got some things
wrong, and I had to manually fix them.
2016-03-03 09:58:08 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Jean-Philippe Andre 22324f21b3 EFL: Mark EOLIAN functions as static when possible
This affects mostly evas filters.
2016-01-13 15:34:20 +09:00
Felipe Magno de Almeida a3db1dddd3 efl-js: JavaScript Eolian binding
To configure efl sources with bindings to use in nodejs add ––with-js=nodejs in configure flags to generate node files

$ configure --with-js=nodejs

and compile normally with:

$ make
$ make install

To use, you have to require efl:

efl = require('efl')

The bindings is divided in two parts: generated and manually
written. The generation uses the Eolian library for parsing Eo files
and generate C++ code that is compiled against V8 interpreter library
to create a efl.node file that can be required in a node.js instance.

@feature
2015-12-23 23:59:40 -02:00
Avi Levin f9c116a487 emotion: porting evas smart callbacks to eo 2015-06-07 11:00:52 +03:00
Tom Hacohen 6efbfe227a Eo: Add a return value to eo_constructor().
From now on, constructors should return a value, usually the object
being worked on, or NULL (if the constructor failed). This can also
be used for implementing singletons, by just always returning the same
object from the constructor.

This is one of the final steps towards stabilizing Eo.

@feature
2015-05-20 13:03:24 +01:00
Tom Hacohen acd4ace06c Emotion: Migrate some more of emotion to Eo/efl.player. 2015-05-06 18:22:22 +01:00
Tom Hacohen 648ad2591c Fix code to conform to recent Eo changes. 2015-02-23 17:16:02 +00:00
Carsten Haitzler 50b4f61bae emotion - limit pos set seecks to 0.0 at minumum point 2014-10-06 09:13:14 +09:00
Tom Hacohen a7560dbc61 Eo: Change eo_add/del/unref behaviour.
Before this change eo_add() used to create an object with 1 ref, and if
the object had a parent, a second ref.
Now, eo_add() always returns an object with 1 ref, and eo_add_ref()
    preserves the old behaviour (for bindings).

eo_unref now un-parents if refcount is 0, and eo_del() is an alias for
eo_unref (will change to be a way to ensure an object is dead and goes
        to zombie-land even if still refed).
2014-09-25 17:38:45 +01:00
Carsten Haitzler b7afdc80ec emotion - fix calling pos update cb for gst1 module in frame new
@fix
2014-09-01 12:45:41 +09:00
Carsten Haitzler ca5e0c6a9d emotion - fix engine string leak
fixes CID 1232727
2014-08-27 17:08:16 +09:00