Commit Graph

2731 Commits

Author SHA1 Message Date
Carsten Haitzler e57084d5c5 evas event handling4- fix more corner cases where bounding is bad
so smart object bounding box wasnt updated properly in several other
cases. fix those other cases too by dirtying bounding box region.

this continues on from:

f6b3c31561
25d77bc1d2
9f0fd66ab8

this fixes T4017

@fix
2016-07-08 10:17:56 +09:00
Carsten Haitzler f6b3c31561 evas event handling3 - fix yet more corner cases for clipped objects
this is a continuation fix from
25d77bc1d2 and
9f0fd66ab8

this fixes yet more corner cases after the above 2 fixes. our clip
cache tracking code seems to be broken somewhere and not updating - at
least when events are processed so i did ti the slightly slower way
and recursed through clippers to figure it out in this path. it all
works now it seems but it's got a small speed hit. better be right
than a little faster.

@fix
2016-07-07 14:12:22 +09:00
Cedric BAIL 005375176d evas: fix initialisation and shutdown of eet and eina by mesh loader and saver. 2016-07-06 13:26:15 -07:00
Jean-Philippe Andre edccf44150 efl: Rename "pointer" device class to "wand"
Because I like magic. And to avoid confusion with mouse pointer.
Suggested by @zmike in D3858 (Ecore_Device).
2016-07-06 11:27:06 +09:00
Carsten Haitzler 25d77bc1d2 evas event handling2 - fix incorrect object reporting
this fixes a new bug brought up by
9f0fd66ab8 which fixes event reporting
etc. etc. .. this fixes T4017

@fix
2016-07-05 22:40:51 +09:00
Jean-Philippe Andre 5bd437fe27 evas: Fix crash (?) in evas events
Reported by Shuhrat Dehkanov on the ML.
See f0fd66ab818d212fa88faef316ac17625f1a2f5.

Note: I didn't have a crash myself.
2016-07-05 19:53:13 +09:00
Jean-Philippe Andre aaec7d940f efl: Remove del_intercept before calling eo_del
In class destructor. Still not sure if we should do this
or just set the pointer to NULL.

Ping @TAsn
2016-07-05 19:43:06 +09:00
Carsten Haitzler 9f0fd66ab8 evas event handling - fix incorrect object reporting
this fixes event reporting for mouse in/out/move/down/up due to evas
just totally getting tese objects wrong.

this fixes T3718

@fix
2016-07-05 15:42:52 +09:00
Carsten Haitzler 9527240d74 efl - fix lots of little init/shutdown pairs that are wrong
i've fixed almost all the eina init/shutdown pairs to do the right
thing now... except one (ecore_shutdown) with comment inline where
eo_shutdown is not called. if this is called we are in crash land.
this needs further inspection.
2016-07-04 21:30:34 +09:00
DaeKwang Ryu 8b5d5a5a8d EvasGL: Add support for Evas GL 3.1
Summary:
2 wrapper functions are added.
(glFramebufferParameteri, glGetFramebufferParameteriv)

update gl2ext.h(generated 20160209) in evas_gl.h

Test Plan: OpenGL ES Conformance Test

Reviewers: jpeg

Subscribers: spacegrapher, wonsik, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3782
2016-07-04 20:47:57 +09:00
Jean-Philippe Andre 07ea964e9f evas: Fix rare issue with recursive proxy src invisible
Scenario:
  smart {
    text
    proxy -> text, src_invisible
  }
  proxy -> smart

What we should see:
  smart {
    (blank)
    proxy -> text
  }
  proxy -> {
    (blank)
    proxy -> text
  }

What we saw:
  smart {
    (blank)
    proxy -> text
  }
  proxy -> {
    text
    proxy -> text
  }

Solution:
Check in evas render, when we're inside a proxy render, and the
proxy src_invisible flag is on (evas_object_source_visible_set(0),
that we're rendering the object itself to its proxy surface. If not,
it means we're rendering another proxy surface, ie. a parent smart
object's proxy surface.

Still loving evas render.

Fixes T4006.

@fix
2016-07-04 16:09:39 +09:00
Daniel Juyung Seo bc7f223754 evas/textblock: Mark unused variable. 2016-07-04 07:31:15 +09:00
Daniel Hirt fed2b75780 Canvas text: simplify efl_text_get 2016-07-03 17:10:57 +00:00
Daniel Hirt 2be6c6b817 Canvas text: fix leak in annotation_insert 2016-07-03 17:10:56 +00:00
Daniel Hirt f7509bbb52 Canvas text: fix leak in efl_text_set 2016-07-03 17:10:56 +00:00
Daniel Hirt 06fd1566ea Canvas text cursor: fix bug after code port
Fixes T4005.
Also, unified repeated code and added a test for multiple cursors.
2016-07-03 14:39:45 +00:00
Carsten Haitzler 5fa3815e01 evas update buf - dont ref and unref outbug as an evas image - it's not
we need calls to ref/unref them from engines, but atm it's ok because
they dont get deleted until the flush is done and not used after that...

@fix
2016-07-03 15:45:46 +09:00
Jean-Philippe Andre d04ff8d69b evas object: Move display_mode to Efl.Gfx.Size.Hint 2016-06-30 14:34:59 +09:00
Jean-Philippe Andre 136a6b4464 evas: Add & fix legacy APIs for text filters
Those are marked as EINA_DEPRECATED since they are for legacy only,
and EDC is the preferred method.
Note: these are new in EFL 1.18.

I would rather have not added them as legacy APIs. This patch is
here to align to Tizen which added them by mistake. Also, remove
the "name" argument from filter_program_set as it's not required,
and also not there in Tizen's code base.

Sorry for the mess.
2016-06-29 11:02:41 +09:00
Jean-Philippe Andre b13ae2fb82 evas: Implement evas map support in eo as a mixin
It relies a bit on evas legacy APIs and will only work on
evas objects (Efl.Canvas.Object) for now.

The main difference with Evas_Map is that there is no
separate map object, as the functions apply directly to
any canvas object.

For convenience, most functions will automatically populate
the map if there was no previous map info. While this may
be convenient, the object's size changes still need to
be tracked to update the map info.
2016-06-29 09:57:58 +09:00
Jean-Philippe Andre a49bddd124 evas: Move evas_map APIs from common to legacy header
+ define Evas_Map struct in Evas_Legacy.h (not eo)

Otherwise, just a simple cut & paste
2016-06-29 09:12:26 +09:00
Jean-Philippe Andre 6b8228ffbd evas: Move map to a separate mixin
Evas map is not translated to proper eo apis yet.
Efl.Canvas.Map will be a mixin implementing the evas map
API in a bindable API.
2016-06-29 09:12:26 +09:00
Jean-Philippe Andre 2078b74e28 evas: Use proper type for stringshares 2016-06-28 19:21:46 +09:00
Jean-Philippe Andre d4b9328dcd evas: Fix double stringshare_del
A stringshare for font "style" was not properly duplicated,
resulting in lots of invalid stringshare pointers.

Ping @id213sin (commit 2ce33e73a7).
2016-06-28 19:21:46 +09:00
Youngbok Shin 2ce33e73a7 evas: add pattern "style" when evas query fonts via fontconfig
Summary:
Some fonts can have weird style and weight value.
If a font has a style name as "medium" and a weight value as "semi-bold",
Evas can't load the font using "font=Somefont:style=Medium".
It only can be load with "font=Somefont:style=SemiBold" or
"font=Somefont:weight=SemiBold".
On the other hand, it could be loaded when I tested the following commands.
fc-match -s ":family=Somefont:style=Medium" or
fc-match -s ":family=Somefont:weight=SemiBold"

Evas also should load font based on font's style name.
@fix

Test Plan: N/A

Reviewers: tasn, herdsman, cedric, woohyun, raster

Reviewed By: raster

Subscribers: Blackmole, z-wony, jpeg

Differential Revision: https://phab.enlightenment.org/D4108
2016-06-28 13:32:49 +09:00
Daniel Hirt 2b3bba1f7e Canvas text: fix format annotations deletion 2016-06-27 15:18:08 +00:00
Jean-Philippe Andre d3d655bedf evas: Fix bad clipping with proxy
evas-images2 example was broken due to excessive clipping.
This is one more issue with the cached clip geometry.

By default proxy_src_clip is true. The doc (that I wrote)
mentions that it means both objects (image proxy & source)
share the same clipper. So, this does not mean that the proxy
is clipped to the geometry of the source (this can be useful
in some cases, when replacing an object with a proxy to apply
some kind of effect on it... but this could be rare).

Thanks Amitesh for the report.

@fix
2016-06-27 21:04:49 +09:00
Jean-Philippe Andre 9f5d279722 Evas events: Implement support for hold event 2016-06-27 16:38:46 +09:00
Jean-Philippe Andre b48726989d evas object: Hide "del" event
In EO world, we should stick to EO_EVENT_DEL.
2016-06-27 14:08:55 +09:00
Marcel Hollerbach aadea46b35 evas: do not unref if there is no clipper
check if there is a clipper set before accessing it. This fixes crashes
of the drm engine.
2016-06-24 14:44:50 +02:00
Hermet Park 56074fd579 evas canvas: fix a proxy+map rendering issue.
This fix is wrt the non-updation of the proxy object.
If a source of a proxy object has mapped objects among its children,
Rendering frame won't be correct while they were keeping changing.

The reason is, evas_object_smart_changed_get() couldn't figure those changes
out correctly because of cached-clip visibility.

Cached-clip of smart member can't be used for map surface updation,
because cached-clip includes the visiblity status out of the smart object.

So, loose the criteria to make it rendering smart members in map.
2016-06-24 18:51:38 +09:00
Subhransu Mohanty 6e6c85293e evas vg: don't apply transformation to the origin point
Summary: Which will apply translate property twice once to shape and once to origin.

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4086
2016-06-24 15:15:43 +09:00
Hermet Park 05d81d3c63 evas/canvas: rewrite a previous patch, ed444b698b
Reviwed further, I found out the origin shouldn't be accumulated with
previous clippers origin. I forgot this function is recursive
function.
2016-06-24 11:33:04 +09:00
Subhransu Mohanty e73533ebbc canvas/vg: fix the reference issue in evas_vg objects.
Reviewers: jpeg, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-23 10:15:44 -07:00
Oleksandr Shcherbina 71c1481e57 evas: avoid calculation bounding for camera and light objects
Summary:
Including camera and light to calculation aabb can lead to confusing in detemination
bounding of the whole scene (root node).
@fix

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-23 10:05:09 -07:00
Hermet Park ed444b698b evas canvas: fix broken proxy clipping.
Origin of clipper's clipper won't be transformed to derivative space.
So it needs to transform the coordinate additionally.
2016-06-24 00:48:34 +09:00
Hermet Park 48a64d827f evas canvas: code refactoring.
Compare integers clearly.
2016-06-24 00:27:45 +09:00
Tom Hacohen 56562b1643 Canvas text: Add missing cursor changed callbacks.
In some cases we were changing the cursors but not emitting callbacks.
This should fix that.
2016-06-22 14:03:06 +01:00
Tom Hacohen 3dc4490a99 Canvas text: Don't call callbacks while cursors are in inconsistent states.
The issue is that in some cases we were calling user code (callbacks)
when some of the nodes were referencing already deleted text nodes. This
caused invalid memory access. This commit delays the callback calling
until after all of the cursors got into a consistent legal state.
2016-06-22 14:03:06 +01:00
Jean-Philippe Andre f067bc6f71 evas: Fix crash in Efl.Ui.Box
This goes back to a stupid comment I made in 93fad2a19f2507a:
  No idea why evas_box was overwriting smart_data.get
  (esp. since it was returning a private struct).
Well, it turns out the struct is NOT private and the smart
data pointer can be used by any user of evas box (including
Efl.Ui.Box).

Fixes T3926
2016-06-22 10:53:37 +09:00
Daniel Hirt dbbb4bf8ad Canvas text: revert new behavior on text append
This was discussed and still wasn't decided whether this is required to be
supported internally.
The reason for this revert is that the behavior still needs tweaking to work
just right along with the legacy behavior.
2016-06-21 10:40:48 +00:00
Daniel Hirt 2651ab54a3 Canvas text cursor: fix text insertion
The cursor update hasn't considered when the pararaph is broken. The reason the
code path is different from legacy is because that it was originally intended to
support append and prepend operations in the new API. Since we don't anymore
(only supporting append operations in the new cursor with 'text_insert'), we can
simplify the insertion implementation and fix this.
2016-06-21 10:34:19 +00:00
Daniel Hirt e920b47d2b Canvas text cursor: remove redefinition, already in legacy. 2016-06-21 10:34:19 +00:00
Jean-Philippe Andre e445e1bb08 evas: Fix redefinition of Efl_Canvas_Object type 2016-06-21 16:28:41 +09:00
Jean-Philippe Andre 269fc4f7a6 evas: Remove common interface and use provider_find
Evas.Common_Interface not only had a bad name, it also
wasn't in line with how we can get a loop object, for
instance.

Use eo_provider_find in each implementing class.
2016-06-21 16:13:04 +09: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
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Jean-Philippe Andre 0ffa16d9cf evas: Fix usage of fill_set
efl.gfx.fill will reset the filled flag, so the internal function
needs to be called instead of the gfx api.

This test error was added in a very recent commit: ccaf12e1b6.
2016-06-20 15:48:46 +09:00
Jean-Philippe Andre ccaf12e1b6 evas: Use efl_gfx APIs where appropriate
This is a better fix than the previous patch, as it keeps
the legacy API check. The point of that check is: if the object
has been created with legacy API (evas_object_image_[filled_]add,
then legacy APIs are allowed, otherwise they are disallowed. This
means only EO APIs should be used on an eo_add() image object.
2016-06-20 14:11:32 +09:00
Jean-Philippe Andre 17a51cffd3 evas: Fix type checking for legacy APIs
This should fix canvas 3d examples (that were calling fill_set
and evas would reject with "object is not an image").
2016-06-20 14:04:09 +09:00
Marcel Hollerbach b69071d3ce evas: fix double define
/usr/local-efl/include/evas-1/Evas_Legacy.h:3762:30: warning: redefinition of typedef 'Evas_Load_Error'
      is a C11 feature [-Wtypedef-redefinition]
typedef Efl_Image_Load_Error Evas_Load_Error;
                             ^
/usr/local-efl/include/evas-1/Evas_Loader.h:126:30: note: previous definition is here
typedef Efl_Image_Load_Error Evas_Load_Error;
                             ^

thank you jpeg :P
2016-06-19 11:32:05 +02:00
Jean-Philippe Andre 52f9220b3f Evas: Rename smart object into Efl.Canvas.Group 2016-06-17 19:32:43 +09:00
Jean-Philippe Andre 4653cc44dd Evas: Cleanup evas smart clipped class
This is legacy stuff. I wish we could hide it from our inheritance
entirely. Instead, just make it abstract, remove all functions from
eo (doable here) and rename with the keyword "internal" in the new
ugly java style name.
2016-06-17 19:32:43 +09:00
Jean-Philippe Andre 9c156c0be7 Evas: Remove a useless magic check 2016-06-17 19:25:48 +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 2a0bb33f1d Evas: Move smart_members_get to legacy
Going forward, we prefer to return iterators rather than
lists.
2016-06-17 19:25:47 +09:00
Jean-Philippe Andre 3d1e474fc6 Evas: Move smart data to legacy 2016-06-17 19:25:47 +09:00
Jean-Philippe Andre 9a052a740d Evas: Move smart_callbacks_descriptions to legacy 2016-06-17 19:25:47 +09:00
Jean-Philippe Andre b88ca02fe9 Evas: Move smart_get to legacy and smart_attach to internals
smart_get and attach referred to an opaque struct, from EO
point of view.

Also, attach was an EO-only function, used nowhere besides
evas object smart itself, and evas grid (which is not EO
public API).
2016-06-17 19:25:47 +09:00
Tom Hacohen 132e89bb46 Canvas text: Fix idiotic memory leak.
Thanks to vtorri for reporting.
2016-06-17 09:02:43 +01:00
Jean-Philippe Andre a50a0f5d76 Evas: Move Object_Pointer_Mode to Efl.Event 2016-06-17 11:37:39 +09:00
Jean-Philippe Andre f2fafb8044 Evas: Move BiDi type to Efl.Text
This renames it to Efl.Text.Bidirectional_Type.
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre fc6ba5561e Evas: Move Evas.Load_Error to legacy, use Efl.Image.Load.Error
This also disables the unused interface "load_state".
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre e77c056c5f Evas: Remove Evas.Render_Op and switch to Efl.Gfx
Note: Only two modes are supported (blend and copy).
The Efl.Gfx and Evas enums were different. All other values
were not supported. For legacy compatibility (since GL engine
actually implements some kind of support for all operations),
render_op_set() should still work fine, even though it's not
recommended, and won't work anymore with EO API.
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre dc3c6703f3 Evas: Move Evas_Native_Surface to legacy 2016-06-17 11:37:39 +09:00
Jean-Philippe Andre bb7edc2ed4 Evas: Fix clipees_get and return an iterator
The legacy function was broken: it was returning the
private data.
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre 5177725ed8 Evas: Mark legacy_ctor as constructor and beta
This is a futile attempt at hiding an internal function.
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre 1535135580 Evas: Move smart_move_children_relative to evas smart
This is temporary...
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre 84a91ec6d4 Evas: Move smart_type_check[_ptr] to legacy 2016-06-17 11:37:39 +09:00
Jean-Philippe Andre 5974ff0175 Evas: Move smart_clipped_clipper to its class
It was in Evas.Object, probably to make it work without any ERR
message on invalid objects. Not worth it right now...
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre 93fad2a19f Evas: Nove smart data get to smart class
It didn't make sense where it was.
No idea why evas_box was overwriting smart_data.get
(esp. since it was returning a private struct).
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre e2eebc1221 Evas: Rename object focus to key_focus
The evas focus concept is valid and applies only to the
keyboard inputs.
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre ab4e15e9c3 Evas: Move object static_clip to legacy
This is a horrible API used for internal optimizations. Which
may or may not be partly broken anyway.

We can do better, in the future. Let's not expose this kind
of API.
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre cc427152bd Evas: Move object name to legacy
All EO objects have a name now. No need for evas object
names anymore.

Also move name_child_find.
2016-06-17 11:37:39 +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
Daniel Hirt ed512ea49e Canvas Text: continue porting api and fixup bugs
Also: This merges style user and normal style into a list with precedence. This
allows for more flexibility while keeping the API clean.

@feature
2016-06-16 19:15:20 +01:00
Tom Hacohen c297ff4115 Canvas text cursor: introduce this new object
The text cursor is now an eo object. Consult the efl_canvas_text_cursor.eo file
for the API.

@feature
2016-06-16 19:15:20 +01:00
Daniel Hirt 3a6c648d28 Canvas text: introduce new text object
The implementation depends on creating different code paths from the now-legacy
behavior of text appending.

The annotation system introduced in this commit replaces the current way of
applying formats on text.
Up until now it has been quite a hassle for the user to control the formats, as
it required keeping track of the format positions with an opener and closer
formats almost every time (with the exception of own-closing formats).

The combination of Efl.Text API along with the Efl.Canvas.Text annotation API
essentially replaces the capabilities of the old format.

There is additional annotation API to allow more control, so be sure to check
the documentation/.eo files and the wiki page of Efl.Canvas.Text.

The style API now accepts actual strings of format style. There is not longer
need to instantiate as style with style_new() followed later by style_free().

@feature
2016-06-16 19:15:20 +01:00
Jean-Philippe Andre da1e53820b Evas: Fix usage of callback arrays
This should fix compilation of EFL for Windows (at least
this is one more step...)

- evas box
- evas table
2016-06-16 13:10:34 +09:00
Jean-Philippe Andre 74e1c9bb75 Evas: Stop using Evas.Image in public inheritance
So, it seems my previous commit 79abba52c5 was a job
half done, as I forgot to remove Evas.Image from the inheritance
tree of all new evas image classes.
2016-06-16 13:10:34 +09:00
Jean-Philippe Andre d97c07d675 Efl: Move Efl.Canvas to efl/interfaces
Not sure this is a good name for this interface, but it
definitely doesn't belong inside lib/evas/

Thanks Jiyoun for the question / report :)
2016-06-16 10:57:56 +09:00
Cedric Bail 0861a8a27d evas: do not use static array with pointer to other variable.
Aka fix Windows build. This is exactly the same trick as for events array.
2016-06-15 11:41:09 -07:00
Daniel Kolesa a7c6086c42 eolian: enable inheritance checks and fix EFL to build with them
Somehow, there was code in the tree that apparently isn't tested at all, even
once - if it was, the eo.c logic that performs inheritance checks would be
triggered. I don't know how this could have happened (actually I do, it's
Cedric's fault and he should be publicly shamed for it) but these checks
make sure this will never happen again. But since the code itself appears
to be untested, I don't know if there isn't any other brokenness in it.
But that's beyond the scope of this change, so for now, let's make sure
all our inheritance is at least formally correct.

Also, enable eo_interface.eo generated code in Eo itself so that Eo.Interface
can be used when inheriting.

@fix
2016-06-15 16:37:15 +01:00
Stefan Schmidt ddbf379359 evas: move canvas3d and vg parts into beta API and keep the rest under EO API
Vanvas3d and VG are still conisereed beta. For the rest we are going to sort
this out over the next days/weeks. Either EO API flag removed or put under BETA.
2016-06-14 16:27:10 +02:00
Vincent Torri 2e052d5694 Evas: Support of fnmatch flag FNM_IGNORECASE
Some systems (solaris in that case) define FNM_IGNORECASE instead of FNM_CASEFOLD. Add this case in evas_path.c
2016-06-14 19:05:04 +09:00
Jean-Philippe Andre 8a0e74afa8 evas: Move canvas events to a common interface
This merges window and evas events into a single name.
Some events are marked as @beta as they shouldn't really be
part of our EO API.
2016-06-14 16:27:42 +09:00
Jean-Philippe Andre 254f5ef772 evas object: Move some events to efl_gfx and efl_image
This affects basic evas object events such as:
- show, hide, resize, move,
- changed size hints,
- restack,
- image preloaded, resize, unloaded

Also, switched names to shorter "present form" like "preload"
instead of "preloaded".
2016-06-14 16:27:42 +09:00
Jean-Philippe Andre ff0124bdae evas object: Mark event free as @beta
Use EO_EVENT_DEL instead.
2016-06-14 16:27:42 +09:00
Jean-Philippe Andre 64896646ce evas object: Mark legacy input events as @beta
This effectively marks them as unstable API. They should not
be used, and still only exist because of the current code
infrastructure.
2016-06-14 16:27:42 +09:00
Jean-Philippe Andre 70a358357a widget: Switch to pointer & key events
Unfortunately, since all widgets rely on the legacy evas
event structs, I had to add a translation mechanism.
2016-06-14 16:27:42 +09:00
Ji-Youn Park a75fb5763a evas_canvas: move evas_output_XXX API from eo to legach.
evas canvas will be removed from eo.
evas_output_XXX APIs are usually used by widget or e17.
I decided not open these kind of APIs to eo.
app can use the size of elm win instead of evas output apis.
2016-06-13 18:53:06 +08:30
Jean-Philippe Andre e165854a78 Evas: Rename Zoomable_Interface to Efl.Ui.Zoomable 2016-06-10 18:06:15 +09:00
Jean-Philippe Andre b2355d7da3 Evas: Rename Selectable_Interface to Efl.Ui.Selectable 2016-06-10 18:06:15 +09:00
Jean-Philippe Andre 31c4fd1f7c Evas: Rename Scrollable_Interface to Efl.Ui.Scrollable 2016-06-10 18:06:15 +09:00
Jean-Philippe Andre d67171940f Evas: Rename Draggable_Interface to Efl.Ui.Draggable 2016-06-10 18:06:10 +09:00
Jean-Philippe Andre e691de04be Evas: Rename Clickable_Interface to Efl.Ui.Clickable
Event prefix is efl_ui:
 EFL_UI_EVENT_CLICKED
 EFL_UI_EVENT_CLICKED_DOUBLE
 ...

The event prefix could be reduced to efl but I personally
prefer with UI.
2016-06-10 17:33:53 +09:00
Jean-Philippe Andre 36cec53890 Evas: Fix previous commit
Thanks @ami
2016-06-10 17:22:43 +09:00
Jean-Philippe Andre 1dbff7d2b8 Evas: Remove Evas.Signal_Interface
It was basically empty.
2016-06-10 17:08:05 +09:00
Jean-Philippe Andre 3df8e89e9a Evas: Rename Evas.Filter to Efl.Canvas.Filter.Internal
Trying to hide the name Evas from the public EO API...
2016-06-10 16:01:42 +09:00
Jean-Philippe Andre 9fdf584d1a Efl: Rename event flags to processed and scrolling
From on_hold and on_scroll
2016-06-10 13:21:21 +09:00
Jean-Philippe Andre 79abba52c5 Evas: Rename Evas.Image into Efl.Canvas.Image.Internal
Make it abstract.
And add Evas.Image as a legacy-only class.
2016-06-10 13:21:20 +09:00
Jean-Philippe Andre 37625fca91 Evas/Edje/Elm: Use combined_min instead of min everywhere
This allows apps to set the objects min size with hint_min,
while letting the rest of EFL define the minimum size with
rstricted_min.

I don't like the property names much...
2016-06-09 16:37:49 +09:00
Jean-Philippe Andre 44f445fe76 Efl: Introduce app-side min size hint
Now called "hint_min", not sure if it's the proper name for it.
At first I wanted to reuse the request size hint instead of
adding a new hint, but doing that would break Terminology
or any app that already used size_hint_request.

One problem with hint_request is that the legacy function
already exists but its support is practically not implemented.

@feature
2016-06-09 16:36:04 +09:00
Jean-Philippe Andre e36a300d36 Efl: Add geometry property (combines position and size)
It's a helper function that can also in the future be
used to implement atomic move+resize operations.
2016-06-09 16:17:43 +09:00
Jean-Philippe Andre f773206769 Efl: rename size hint content_min to restricted_min
Still not sure about which keyword is the best to use here,
but anyway, it's a protected function so users should realize
it's probably not what they want.
2016-06-09 16:13:39 +09:00
Jean-Philippe Andre b40b4042f0 Efl: Introduce combine_min size hint
It combines the content min size and the requested min size
by taking the MAX value. This will help support request size
without major code changes.
2016-06-09 14:20:53 +09:00
Jean-Philippe Andre 5542d6dc48 Efl: Add hint_ prefix to all size hints
This covers:
- base
- step
- aspect

The prefix hint_ is useful for bindings, and does not change
the generated C API.
2016-06-08 17:20:44 +09:00
Jean-Philippe Andre 7872690e73 Efl: Move evas size hints to Efl.Gfx.Size.Hint
This includes:
- align
- min (now content_min)
- request
- max
- padding (now margin)
- weight

This does NOT include:
- display mode (compress, expand... a hint used by naviframe only).
2016-06-08 17:10:07 +09:00
Jean-Philippe Andre 7d5811a99a Evas: Move aspect ratio to Efl.Gfx.Size.Hint
Problem:
- edje aspect ratio is defined by 1 enum and 2 double (min, max)
- window aspect ratio is defined by only 1 double
- evas object aspect ratio is defined by 1 enum and 2 ints (w, h)

Which one is the best interface? Are min/max a better option?

Also, not sure how to call the enum...
2016-06-08 15:14:11 +09:00
Jean-Philippe Andre e3160da0f7 Evas: EO-ify Evas_Event_Render_Post
As Efl.Gfx.Event.Render_Post.
To be implemented by Efl.Ui.Window
2016-06-08 13:59:08 +09:00
Jean-Philippe Andre 05732c7472 Evas: Fix propagation of key events
UP/DOWN arrows were having effects on both focus and entry cursor
moves. This was due to an invalid propagation of the changes to
event_flags (on_hold).

Fixes T3845
2016-06-07 21:48:48 +09:00
Jean-Philippe Andre 2e8cfed031 Evas: Fix compilation for Windows
Fixes T3783
2016-06-07 13:45:41 +09:00
Benjamin Jacobs 32fd16dfc0 evas: button_mask as unsigned, UB fixes.
Summary:
* pointer.button is DATA32 which is unsigned, so this changes the
  definition of pointer_button_down_mask accordingly.

* Avoids UB in mask generation:
lib/evas/canvas/evas_events.c:1348:37: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-06 16:34:05 -07:00
Oleksandr Shcherbina 7e0601c980 evas: Get pixels from rendered 3D scene
Summary:
Implemented interface Efl.Gfx.Buffer functions bufer_map/unmap for Efl.Canvas3D.Scene.
Added function e3d_drawable_texture_rendered_pixels_get to module evas_gl_3d
to getting pixels from FBO. Added wrappers for functions
e3d_drawable_texture_rendered_pixels_get and e3d_drawable_texture_id_get
to have possibility call it through engine functions.

Reviewers: cedric, Hermet, raster, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3978
2016-06-03 14:22:33 +03:00
Jean Guyomarc'h 5b0ddfec38 evas: fix huge memory leak for non-async rendering
So... I had issues with evas-fb engine which was massively leaking,
one image per frame.
After investigating a bit with @cedric on IRC, the reference count
of the cache entries was always 2 before the engine dropped.
So, for each frame with an animation, we could never drop a cache
entry, leading to a trumendous amount of memory leaking.

Now for non-async rendering, we copy the behaviour of
evas_render_pipe_wakeup() which is called in async-mode,
and actually drops a reference in the cache entry.

Fixes T3763
2016-06-03 12:17:12 +02:00
Jean-Philippe Andre b147911bad elm_win: Forward events between window and evas
This does:
1. Forward keyboard events from evas to win
2. Allow feeding external input events

Input events can be faked by apps by simply forging
eo objects of the proper type (key or pointer evt) and
calling eo_event_callback_call().

Such events will be forwarded to the internal Evas, and
some bool flags prevent infinite refeeding loops.

efl_event_dup() returns fake events for this to work.

@feature
2016-06-03 15:29:17 +09:00
Daniel Kolesa b1946ca5d6 eolian: utilize the new void_ptr builtin across eo files
This lets me narrow down the remaining cases of pointers across the EFL.
The void pointers will later need to be reevaluated on per-case basis and
replaced appropriately where possible/feasible.
2016-06-02 13:00:26 +01:00
Jean-Philippe Andre 915e09aed3 Evas: Rename Evas.Rectangle as Efl.Canvas.Rectangle 2016-06-02 18:57:30 +09:00
Jean-Philippe Andre 0505a729e2 Evas: Simplify eo event mechanism
So, I was stupid. I was relying on legacy callbacks to
trigger eo events, which means that only when a legacy
callback was registered would my new eo events be triggered.

Instead, I can pass the eo event desc & info whenever
calling evas_object_event_callback_call().
2016-06-02 14:19:18 +09:00
Jean-Philippe Andre 350b465d22 Evas: Send Efl_Event_Key data to evas objects 2016-06-02 13:31:40 +09:00
Jean-Philippe Andre 95628c1efa Evas: Add storage class for Key events
This is for key up/down events' info.
2016-06-02 13:31:40 +09:00
Tom Hacohen aa6b53a2ae Switch to eo_del() where it should be a del and not an unref
This code was written when eo_del() was removed and eo_unref() was the
recommended practice. Since we added eo_del() back we now need to adjust
this new code accordingly.
2016-06-01 19:27:40 +01:00
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
JEONGHYUN YUN 26b2e73d56 evas : evas_object_key_grab exclusive option logic is changed.
Summary:
 - added is_active property in Evas_Key_Grab.
 - Evas key down and key up events transferred to active grabs only.
 - If evas grabs has a exclusive grab, other grabs will be deactivated.
 - If a exclusive grab is ungrabbed, remained grabs will be activated.

Reviewers: jypark

Reviewed By: jypark

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3996
2016-06-01 17:14:13 +08:30
Oleksandr Shcherbina b43a7f5187 evas: fix recalculation coordinates for pick object from scene in Evas.Canvas3d
Summary:
We did the same for evas_canvas3d_scene_pick(see c850cc0d80),
but forget for evas_canvas3d_scene_exist.

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-05-31 14:59:26 -07:00
Oleksandr Shcherbina c6ce60c44e evas: avoid useless manipulation during pick object from scene in Evas.Canvas3d
Summary:
It is logically break cycle in case object is found. In case need pick all objects
that lay in screen ray, we should use evas_canvas3d_scene_pick_member_list_get
function.

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-05-31 14:59:26 -07:00
Daniel Kolesa 6fc482aa9b eolian: utilize the new builtin string type across eo files 2016-05-31 16:05:43 +01:00
Jean-Philippe Andre b0a32b0bd0 Efl: Rename Efl.Pointer.Event into Efl.Event.Pointer
Also renames two types: Efl.Pointer.Flags and Efl.Event.Flags
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 9b4a6ba639 Evas events: Fix a crash
There was an invalid reference used because we changed
legacy event type without resetting eo event info.
Scenario: scroll + click
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 632ef37226 Evas events: Propagate event flags between eo and legacy
If on_hold or on_scroll is set in an eo callback, the subsequent
calls to the legacy callbacks will also have this flag set.
Inversely the legacy callbacks should affect all subsequent eo
callbacks.

Note: those are just indicative flags.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 6832959318 Evas events: Add helper functions to read event info
This adds simple helpers for double/triple click
and on_hold/on_scroll flags.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 4381d3a824 Evas events: Store position as double only
This splits pixel and subpixel precision by using
different methods rather than two different storage values.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 02716d03c8 Efl event: Remove useless method declaration 2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 0a27c78a33 Evas events: Split pointer events
This is going back to the same idea as legacy. We will have
events such as:
- move
- down
- up
- in
- out
- wheel
- cancel ("new" - very rare)

Now the question is whether/how we should divide "multi" events
which start from the 2nd finger from standard mouse events. The first
multitouch finger should by default look like a mouse event.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 1950fb6fde Elm win: Forward pointer events from evas to window
This will allow applications to listen to those events
on the whole window. Necessary since they won't have access
to Evas with EO APIs.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre c68f71239c Evas events: Add EO APIs for lock & modifiers
This moves Efl.Pointer.Event back to Evas. Originally I wanted
to share this class with Ecore but eventually I didn't need to
do so, since only ecore_evas (which depends on evas) really needs
access to these.

The internal data struct is not moved out of efl (yet?)
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 2ca159dc58 Evas events: Replace calls to event feed with internal func 2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 4c7272720b Evas events: Pass Efl_Pointer_Event for proxy source events 2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 7658ed7ae3 Evas events: Forward more pointer events
This continues the work started in the previous commit:
forward full event info (Efl_Pointer_Event) from evas to
the upper layers.

This also includes more support for IN and OUT.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 37d894abb1 evas: send eo pointer events on mouse move
This is still VERY experimental and not fully done yet.
All other pointer events need to be sent as well.

The legacy event system is used as a transportation mechanism,
as it is too hard to change the logic. This only adds an extra
eo event in case of move. Obviously for performance we might
want to listen to callback_add,del but that's an optimization
for later.

The whole point of sending those pointer events is to carry more
information than can be sent over legacy evas events, and unify
the events in a common format.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 1c739cada9 evas_events: Propagate more eo pointer events
This covers mouse in,out,cancel. Axis (joystick) is still
todo.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre ef843e8801 efl: Simplify pointer event names + add missing
No more difference between touch & mouse.
Add axis, cancel, in and out.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre f119327495 evas: Move event feed and input to legacy 2016-05-31 19:03:04 +09:00
Jean-Philippe Andre d764d8710a ecore_evas: Feed evas events with eo (down, up) 2016-05-31 19:03:04 +09:00
Jean-Philippe Andre ea8c6e5632 Evas: Extend pointer events and add legacy conversion routines
To be honest, this commit is a bit of a mess since it's a
rebased version of some temporary work patches.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre c06cdadca2 Evas: Fix compilation warnings (enum implicit cast)
Moving enums to Efl renames them but keeps the value the same.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre fb35171186 Evas.Canvas: Move some event_feed to legacy
Paving the way to Efl.Pointer.Event...
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre ce5688a388 Evas: EO-ify Evas_Device and partly move to Efl
So, this is not a very clean solution, but this mostly
makes Evas_Device an Eo object of class Efl.Input.Device.
Since evas_device relies on some Evas knowledge (evas
callbacks, canvas private data), it can't be fully moved
to lib/efl/.

Making the input device an interface rather than a class
was also not a great solution, as the goal is to share
the data structure around EFL internals (Ecore and Evas).
2016-05-31 19:03:04 +09:00
Jean Guyomarc'h 5bfaef58f1 evas: fix warning: redefinition of types
Fixes warnings raised by cland such as:
warning: redefinition of typedef 'Efl_VG' is a C11 feature
[-Wtypedef-redefinition]
2016-05-28 22:17:22 +02:00
Carsten Haitzler ecc556c715 evas - use actual smart bounding box not obj geometry for render incl
render inclusion has bene used smart geom not bounding box from actual
objects for inclusion in rendering. use the bounding box to be correct.

@fix
2016-05-25 11:45:16 +09:00
Daniel Kolesa e984e5a11a eolian: remove pointers from complex and class types
Complex types (i.e. list, array, hash, accessor etc.) now do not require
pointers with them anymore (the pointer is implied) and the same goes for
class handles. Eolian now explicitly disallows creating pointers to these
as well. This is the first part of the work to remove pointers from Eolian
completely, with the goal of simplifying the DSL (higher level) and therefore
making it easier for bindings (as well as easier API usage).

@feature
2016-05-23 15:58:33 +01:00
Chris Michael 843ad74adc evas-vg: Don't fetch parent if we are not going to use it
Essentially, this removes a compiler warning wrt 'parent' being set
but not used.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-19 08:43:32 -04:00
Subhransu Mohanty 655ed09ab4 evas: propagate the change to child when object is a vector graphic container
Summary: let me know whats your thought

Reviewers: Hermet, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-05-19 02:23:56 -07:00
Subhransu Mohanty a3cdafe9a2 evas: changed the interpolate() implementaion
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-05-19 02:23:56 -07:00
Subhransu Mohanty 74cee52900 evas: fix the ref issue of newly created object in shape_dup() function
Summary:
There are couple of issue.

    By adding the gradient to both parent container as well as to the shape. when we dupe the container it copies twice.
    Usually we create one gradient and set it to multiple shape , in that case when we call dupe() function it is going to make a separate copy for each of the shape.

The patch fixes 1st issue. for 2nd one we need to maybe change the way we implemented dupe function

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-05-19 02:23:56 -07:00
Jean Guyomarc'h 147ef32b2b efl: fix misleading indentation
GCC's -Wmisleading-indentation is complaining...
It is a warning flag introduced in GCC 6.x, and
is enabled by -Wall.
2016-05-18 21:57:02 +02:00
Derek Foreman 72b1997f06 evas: Add wayland dmabuf native surface type
Add the structures required for supporting dmabuf native surfaces
2016-05-18 11:52:24 -05:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Cedric Bail 45bc4f30eb efl: change name of animator,tick event in C. 2016-05-18 02:20:13 -07:00
Carsten Haitzler 43661180f7 efl - key/data/value/obj attach to eo objects - make these properties
the key data now is a property so they come out in bindings really
nicely like:

  obj.key_data["blah"] = x;

  x = obj.key_data["blah"];

etc.
2016-05-18 02:02:45 +09:00
Daniel Kolesa 7782c0bcb9 eolian: add event_prefix and have classes follow that or eo_prefix by default
Previously events used to use class name as a prefix and ignored eo_prefix
when specified. This is no longer the case. Events follow eo_prefix by default
now. In order to get around this for classes where this is undesirable, a new
field event_prefix was added which takes priority over eo_prefix. If neither
is specified, class name is used like previously.

@feature
2016-05-17 17:50:43 +01:00
Tom Hacohen 546ff7bbba Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00
Carsten Haitzler 50d5f50589 evas - fix warning comparing agianst wrong enum
fixed enum compare due to efl intefaces changes.
2016-05-15 23:59:14 +09:00
Carsten Haitzler 25c42176e6 evas - make func indenting more redable with overflow lines aligned 2016-05-15 23:59:14 +09:00
Tom Hacohen 6bdf4af016 Add legacy_prefix now that the default has changed to null. 2016-05-12 17:27:35 +01:00
Tom Hacohen 96c4c88070 Efl: Remove "legacy_prefix: null;" as it's now the default. 2016-05-12 17:27:35 +01:00
Daniel Kolesa 7e94eb22b4 eolian: mark pure virtual funcs outside of implements
This is a better syntax and should've been like this in the first place.
2016-05-12 16:15:24 +01:00
Tom Hacohen 587560f82c Efl canvas surface: Fix namespacing to use . and not _. 2016-05-12 12:23:27 +01:00
Tom Hacohen b7cf001c31 Evas image orient: Fix namespacing to use . and not _. 2016-05-12 12:20:34 +01:00
Tom Hacohen 1e61025c17 Evas smart cb: Fix namespacing to use . and not _. 2016-05-12 12:20:34 +01:00
Tom Hacohen 6668d77b09 Efl text properties: Fix namespacing to use . and not _. 2016-05-12 11:35:52 +01:00
Tom Hacohen 5defd35cef Efl image: Fix namespacing to use . and not _. 2016-05-12 11:35:21 +01:00
Tom Hacohen 278b16b058 Evas smart: Fix namespacing to use . and not _. 2016-05-12 11:33:59 +01:00
Tom Hacohen 0253d91ade Evas object smart: Fix namespace to use . and not _. 2016-05-12 11:12:15 +01:00
Tom Hacohen fdf23b2dac Efl vg/ector: Fix namespacing to use . and not _. 2016-05-11 13:21:29 +01:00
Tom Hacohen d64f2fdd43 Efl vg: Remove the no longer needed .Base hack. 2016-05-11 13:13:27 +01:00
Tom Hacohen 28a2d34ae2 Ector generic: Remove .Generic and .Base (hack no longer needed). 2016-05-11 12:57:55 +01:00
Tom Hacohen b0cd0a3b4b Efl gfx gradient: Remove the no longer needed .Base hack. 2016-05-10 16:30:18 +01:00
Tom Hacohen 0ca59b0402 Efl gfx: Remove the no longer needed .Base hack. 2016-05-10 12:25:44 +01:00
Cedric BAIL 0c4880e99d efl: everyone should now rely on Eina MIN/MAX redefinition. 2016-05-09 16:58:53 -07:00
Jean-Philippe Andre 290b3d8926 Evas: Remove invalid code
Since Efl.Canvas.Image and Efl.Canvas.Scene3d inherit from
Evas.Image, the two CHECK(isa) can not be reached, and also the
cast from eo_data_scope_get() would be invalid (it should return
NULL as those classes have no private data).

Also, I believe the CHECK() for texture3d can not be reached
either since texture3d objects are not evas objects.

Ping @zmike
2016-05-09 11:46:11 +09:00
Cedric BAIL ddf92ba61b evas: let's reuse what we know when possible to avoid more useless eo_data_scope_get. 2016-05-06 17:01:10 -07:00
Cedric BAIL 4bf54d993f evas: cache result of eo_data_scope_get that are heavily used.
This alone save a good 3% time to our first frame being displayed.
2016-05-06 16:47:07 -07:00
Mike Blumenkrantz 0231800b60 evas: add internal functions for unsetting+regenerating image data
in the event that the global gl context changes, all engine image data
must be destroyed and then re-created in order to continue rendering
successfully
2016-05-05 10:49:31 -04:00
Mike Blumenkrantz 6f4f0100d2 evas: add a few null checks for e->engine.data.output
this can be null if engine info has not yet been set or if engine info
has been unset, leading to engine crashes. instead of adding null checks in
every engine, better to add the checks to the originating functions

someone with time to kill should go through all the EAPI functions and
add more checks
2016-05-05 10:49:30 -04:00
Mike Blumenkrantz fd1c06153b evas: move Evas_VG_Data struct to separate header 2016-05-05 10:49:30 -04:00
Mike Blumenkrantz 18bb75d0f9 evas: move Efl_Canvas_Polygon_Data struct to separate header 2016-05-05 10:49:30 -04:00
Marcel Hollerbach e58e5eda08 efl: remove eina_promise typedef
fixes the following warnings:
  /usr/local/include/efl-1/Efl_Model_Common.h:14:30: warning: redefinition of typedef 'Eina_Promise' is a
        C11 feature [-Wtypedef-redefinition]
  typedef struct _Eina_Promise Eina_Promise;
                               ^
  /usr/local/include/eina-1/eina/eina_promise.h:10:30: note: previous definition is here
  typedef struct _Eina_Promise Eina_Promise;

To remove the typedef i had to cleanup the includes of header in
evas_canvas3d_eet.c.
2016-05-01 17:01:22 +02:00
Mike Blumenkrantz 76002e6c84 evas: perform hide on objects during del only during destruction
this matches pre-eo behavior and prevents hide-on-delete from altering
delete mechanics

ref df2b31b63e
2016-04-26 16:20:10 -04:00
Stefan Schmidt 9c3d34ca4d docs: evas: description for various surface classes
Describing surfaces classes for Wayland, TBM and X11.
2016-04-26 14:01:16 +02:00
Stefan Schmidt b1a9629723 docs: evas: description for polygon class 2016-04-26 14:01:16 +02:00
Jean-Philippe Andre 97422856ce Edje: Replace edje part_table with a fake eo proxy
This is similar to the previous patch for Box,
but for Table.

Those new EO API as well as the legacy ones still need to
be tested (no test case in make check...)

@feature
2016-04-26 11:36:23 +09:00
Jean-Philippe Andre e2176ed6a3 Edje: Replace edje_box_part with a fake eo proxy
This is basically an implementation of eo_part() but only
for Edje Box APIs. Legacy API is implemented on top of the
EO API.
2016-04-26 11:36:23 +09:00
Carsten Haitzler df2b31b63e evas - legacy evas_object_del - always hide obj regardless of refs
if an object iot reffed or not hide on del. it should have been this
way before eo. eoifications i think messed a few things up.

this does bring up an issue... in eo we have no way to explicitly do
stuff on eo_del regardless of references at the time. this needs to be
solved.

@fix
2016-04-23 23:07:48 +09:00
Carsten Haitzler 5e09d1307b eo base - remove the duplicated key dels and just do eo_key_del() now
this rationalizes all the duplicated key dels (key_data, key_obj and
key_value).
2016-04-21 18:02:31 +09:00
Subhransu Mohanty 648422c60b efl: add new efl_gfx_shape_append_arc() api.
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-04-18 15:32:39 -07:00
Tom Hacohen 878a3d952c Evas object: rename smart_parent to render_parent and mark as protected. 2016-04-18 10:10:23 +01:00
Oleksandr Shcherbina 172cfa0f04 evas.canvas3d: Change shade_mode to shader_mode
Summary:
enum Evas.Canvas3D.Shade_Mode are using for choose relevant shader source code.
So renaming have a sence.
Rename evas_canvas3d_shade_mode_set/get property to evas_canvas3d_shader_mode_set/get
Rename internal fields and functions

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3882
2016-04-14 20:28:20 +09:00
Tom Hacohen f14305024e Eo event: rename Eo_Event->event_info to Eo_Event->info.
The previous naming was redundant and too long.
2016-04-12 15:23:55 +01:00
Carsten Haitzler af4c3c0fe1 evas gl - fix leak with font glyph textures
some font glyphs are still allocated after tyhe last gl window is
freed which means we can't make current anymore to free textures after
that. this fixes that by flushing gl texture info from the font cache
when the last gl windows are gone.

@fix
2016-04-12 12:47:30 +09:00
Oleksandr Shcherbina 1f66a9e731 evas.canvas3d: Add FXAA post processing render.
Summary:
Add post processing render function as rendering full screen quard after
rendering to texture.
Add possibility use size of current frame in shader.
Add FXAA shader source files

Reviewers: raster, cedric, Hermet

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3847
2016-04-12 00:50:46 +09:00
Tom Hacohen 8203c79678 Evas langauge: Prevent potential buffer overflow and clean code.
We were copying a user defined string into a fixed size buffer
without doing any boundary checks. This commit fixes that.
Also cleaned up similar code that was using hardcoded numbers.

@fix.
2016-04-08 11:34:53 +01:00
Youngbok Shin f4f9753c20 Evas: Add API to reinit the language and use it in elementary.
Summary:
evas_common_language_from_locale_* functions kept static pointers
inside of its functions. Once these function was called, it was never reset.
It made big problems for harfbuzz and hyphenation. Also, Elementary
provides elm_language_set() API. Then we need to support it fully.
@fix

Test Plan: Test case for hyphenation is included in Evas test suite.

Reviewers: raster, tasn, herdsman, woohyun, z-wony, Blackmole, minudf

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3864
2016-04-08 11:24:32 +01:00
Jean-Philippe Andre f253f9a7bc Evas 3d: Fix compilation for Windows
near and far are #defined in windows.h. Old legacy stuff.
To be sure the code compiles, rename the variables.

Fixes T3423
2016-04-08 11:13:06 +09:00
Jean-Philippe Andre d1709a2b57 Efl: Rename flip and orient enums
Efl.Flip is now the enum, the interface is Flipable.
We could even use names like Efl.IFlip a la Java.

eo_prefix is used to have pretty names in C. legacy: null
is removed from the enums. orient_x0 is removed and only
defined in C with #define
2016-04-07 17:32:40 +09:00
Yeshwanth Reddivari 98edbd23a4 Interface: Flip and orientation interface
Summary:
Added flip and orientation interface and used them in evas_image.
Removed efl_image_orientation_set API and used efl_orientation_set and efl_flip_set API.
In implementation part, converted enums back and forth in order to keep current implementation as it is.

Test Plan: src/examples/evas/evas-images5.c

Reviewers: singh.amitesh, raster, tasn, herdsman, woohyun, cedric, felipealmeida, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3844
2016-04-06 10:46:39 +09:00
Jean-Philippe Andre df03631ef6 Evas smart: Mark all smart clippers as no_render
This allows doing ugly things such as setting a clipper/mask
on any smart object, without having to worry about seeing a
white rectangle cover the whole screen.

While the above scenario is not a great idea (bypass elementary in
its handling of the clipper), having a big white rect covering the
entire UI seems even worse.

I wonder if elm objects shouldn't simply allow user clippers, and
somehow manage them along with the smart object internal clipper.
2016-04-05 18:20:36 +09:00
Carsten Haitzler 776f4cb112 evas: image obj - use vath to find images (sync not async) 2016-04-05 16:22:59 +09:00
Carsten Haitzler b132ce65ec evas - fix leak because cutouts_fre .. doesnt free - it just resets to 0
this works with 7166e6b859 and fixes a
leak added because ... free does not free!
evas_common_draw_context_cutouts_real_free(0 now actually frees the
rects, but evas_common_draw_context_cutouts_free() before did not.

@fix (follow on from 7166e6b859)
2016-04-01 17:54:37 +09:00
Minkyoung Kim f10672dd74 evas : remove native.func.data variable and data argument of native calblacks.
Summary:
Evas Image should be independent of render engine.
So remove native.func.data member of RGBA_Image, Evas_GL_Image struct.
And remove data argument,too.

Test Plan: Local test, Tizen3.0 mobile, Desktop englitenment

Reviewers: jpeg, spacegrapher, wonsik

Subscribers: cedric, dkdk

Differential Revision: https://phab.enlightenment.org/D3850
2016-04-01 12:09:06 +09:00
Carsten Haitzler 7166e6b859 evas sw render: fix previous thread fix to be portable
this fixes the fix 4d6a8a7fce to be
portable to platfomrs that do not support __thread - seemingly openbsd
does not (argh!) and maybe others. so on these platforms then they
dont get the optimization of keeping a cutout rect pool to avoid
re-allocation.

this also every 4096 draws "resets" the cutout cache so it doesnt
expand and stay expanded forever.

@fix
2016-04-01 11:29:50 +09:00
Carsten Haitzler 4dee873ab6 evas render: fix updates sometimes are list of rects sometimes updates
ssometimes the evas render updates are a list of Render_Updates
structs ... sometimes Eina_Rectangles. this is horrible and i think a
bug turns up (but its not reproducable on linux - just bsd) with an
invalid free ... likely because we free() a ptr from the mem pool
eina_rectangle gets rects from. thats most likely the cause of
https://phab.enlightenment.org/T3226 - but as i can't know for sure,
this is a guess, but readiong the code i see posible vectors of
problemss here ... maybe.

so this redoes the update rects to ALWAYS be Render_Updates struct
and appropriately returns correct structures etc. etc. in api which
demand a list of Eina_Rectangles there.

pending testing on foreign sysstems to confirm this by @netstar

@fix
2016-04-01 08:57:09 +09:00
Mike Blumenkrantz 46d214293e textblock: support escaped &apos; tag
while not in the official html4 spec, this was supported by all browsers
except IE during the html4 era and is now included in html5.

@fix
2016-03-29 15:40:12 -04:00
Jean-Philippe Andre 5917b49f59 Evas: Another fix for no-render
Despite the previous patches, no-render objects could be
partially visible. Eg a fileselector marked as no-render
would have its file list visible. All other children were not
shown.

I think this is not the last fix for this feature, but
eventually source_visible will have to die internally
and be replaced by no-render.

Thanks @yakov-g for the report.
2016-03-29 19:01:17 +09:00
Jean-Philippe Andre c41bae817c Evas.Image: Add NULL check before calling engine function 2016-03-29 15:19:54 +09:00
Jean-Philippe Andre a5b89d8ab3 Evas.Image: Remove pixels_dirty and pixels_callback
Those APIs belong to legacy, not Eo. Also, the image object
shouldn't be used directly for GL rendering, instead the GLview
widget should be used.
2016-03-29 14:54:03 +09:00
Jean-Philippe Andre 8407971a1a Evas: Disable events on no-render objects
Source events still work for proxies (if the flag is set).
2016-03-29 10:43:00 +09:00
Jean-Philippe Andre 8fb8e6d257 Evas render: Fix no-render with smart objects
Setting the no-render flag on an elm widget had no effect,
as it was not properly propagated to its children. This should
fix that, but I'm not a fan of the solution.

Fixes T3371
2016-03-29 10:43:00 +09:00
Jean-Philippe Andre cb93c26db7 Evas proxy: Implement buffer map/unmap 2016-03-28 16:40:02 +09:00
Jean-Philippe Andre 22353e31e1 Efl.Canvas.Image: Remove object data for maps
The engine is responsible for the complete tracking of
maps.

Also, make buffer_unmap return bool.
2016-03-28 16:40:02 +09:00
Jean-Philippe Andre 488854af2b Efl.Gfx.Buffer: Switch to void* data and signed ints
1. unsigned char* as a return type was not even compatible
   with the default colorspace (ARGB: 32 bits).

2. Change all unsigned to int for... uh... simplicity
   unsigned is more correct than int for things like width,
   size or stride, but in fact having both ints (x,y) and unsigned
   ints makes the code more complex.
   This is a matter of personal taste.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre d5b0b1e683 Evas: Add SW engine map/unmap functions
Also, fix some of the code using them.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 39a970835b Evas: Remove unimplemented border_set/get (engine internal) 2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 28a03d6e19 Evas: Remove unimplemented image comment (internal)
This is a minor cleanup of RGBA_Image.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 8b9f525c01 Evas.Image: Add ERR in long-deprecated functions
- evas_object_image_data_convert()
- evas_object_image_pixels_import()
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 326ff9ae82 Efl.Canvas.Image: Implement support for map/unmap
Now the real hard work is to actually implement support inside
the engines: SW and GL generic.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 91e0bdb1e7 Evas: Simplify direct access to image data
This should avoid issues with image_data_get from the engines,
when we really just want to fetch the original data pointer.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 08c1160888 Efl.Canvas.Image: Implement raw data_set/copy/get
No more refcount. This is only to initialize the data from
an external buffer. data_get will only work if data_set was
used (not even copy_set).
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre f78cbac9e6 Evas.Image: Remove buffer_set/get
This will be properly implemented by the subclasses. In particular,
map/unmap will be used where it makes sense, and data_get/set will
be limited to Efl.Canvas.Image and Surface.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre d4e713a18c Evas.Image: Move stride.get away from Evas.Image
stride does not apply to all image objects, eg. proxies or 3d scenes.
it will be implemented by the classes that support stride and pixel
data access
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 0d41ad0c83 Emile: Move colorspaces to Efl.Gfx
A small hack to the toolchain allows us to generate enums with eolian
for use by Eet and Emile (internal or otherwise non-eo libraries).

Thanks to how BUILT_SOURCES works, the eo.h files required by Emile
will be generated before they are used.

This adds a partial dependency on eo for eet and emile:
 - package dependency
 - include dependency

There is no library link dependency.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 83b8b8c958 Evas.Image: Move data_set/get to legacy file
Those functions will be replaced by map/unmap
2016-03-28 15:53:15 +09:00
Carsten Haitzler 4d6a8a7fce evas sw render: cutout rects may be used in multiple threads
several draw funcs keep a static Cutout_Rect *rects = NULL; variable
to cache cutout rects to avoid re-allocating them a lot etc. this is
fast and handy but we may use these from multiple threads. thats bad
.... mmmkay. so this fixes it the dirty way - makes them thread local.
:)

this fixes T3348 - the crash mentioned by @zmike

@fix
2016-03-26 10:52:14 +09:00
Jiwon Kim c23283944b Evas textblock: fix null-derefernce in _style_match_tag()
Summary:
add null check in _style_match_tag()
if evas_object_textblock_text_markup_set() is called with markup text before setting style,
segmentation fault is occurred in _style_match_tag()
@fix

Test Plan:
Insert this situation to test suite
 -> test id : evas_textblock_simple

Test for without this patch:
 1. apply patch just "src/tests/evas/evas_test_textblock.c" partially.
 2. $make check

Test for with this patch:
 1. apply this patch completely (2 files)
 2. $make check

Reviewers: id213sin, herdsman

Subscribers: Blackmole, cedric, jpeg

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D3818
2016-03-24 10:17:57 +02:00
Boris Faure 65892e2d8a evas_object_textgrid: try bolditalic if original is book 2016-03-23 15:32:50 +01:00
Boris Faure bdec343985 evas_object_textgrid: also try bold font when original is of weight Book
and add debug
2016-03-23 15:28:13 +01:00
Daniel Hirt 4013dccda6 Evas font: fix width calc in last_up_to_pos
Width calculations should consider the x_bear. This has been leading to
inconsistent results between wrapping calculation during layout and the
final formatted size.

Also, we should stop our walk only when exceeding 'x', so changed "<="
to "<".

@fix
2016-03-23 15:31:20 +02:00
Jean-Philippe Andre b82382e958 evas: NEON scaling up fixed
Summary:
Previous implementation loaded data from memory first and then checked the borders.
Here I check the borders first as it is for C implementation.
This prevents read of non-accessible memory.

Reviewers: cedric, jypark, Hermet, jiin.moon, jpeg

Reviewed By: jpeg

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D3809
2016-03-22 13:49:05 +09:00
Cedric BAIL fd80e26f06 evas: make no longer supported object, legacy only.
So I forgot to clean my hard drive from previously generated files,
and obviously everything still worked. This lead to having to roll back
evas_smart_clipped.eo as a public eo object until we merge elementary.

Still I would like someone to take a look at elm_pan.eo and figure out
how to not rely on smart clipped there.
2016-03-21 16:31:26 -07:00
Ji-Youn Park 7ebeec3dec Evas.Draggable_Interface: add drag_target property
object can set this property true if object can be target of dragging content.
2016-03-19 09:44:51 +08:30
Cedric Bail 11887c62a2 evas: include Eet.h as we do export a function using Eet_Data_Descriptor.
This was spotted by Nicolas Aguirre while building on Yocto which has
more agressive build option and warning.
2016-03-18 10:23:38 -07:00
Jean-Philippe Andre b8f682b842 Efl.Gfx.Fill: Rename filled to fill_auto
fill_filled is a strange name for the property.
fill_auto seems to make more sense. If you disagree, scream at
me or revert this commit.
2016-03-18 13:28:45 +09:00
Jean-Philippe Andre 9d4ca6f352 Evas.Image: (eo) fill_set now unsets the filled flag
There's no point in calling fill_set AND fillet_set(false).
If a users wants to specify the fill, that should be enough
to switch to non-filled mode.

Maybe the "filled" mode should even be called auto or something?
2016-03-18 13:28:45 +09:00
Cedric BAIL 5f908de18d evas: fix access to possibility undefined function. 2016-03-17 16:12:51 -07:00
Jean-Philippe Andre 0ac87d6a91 Efl.Canvas.Image: Add forgotten files!
Oh...
2016-03-17 14:14:06 +09:00
Jean-Philippe Andre ca65f66fc0 Efl.Canvas.Surface: Fix linking of inexisting functions
The EO files specified some functions that were not implemented.
Somehow this links fine with recent GCC but older versions have
trouble.
2016-03-17 14:02:26 +09:00
Jean-Philippe Andre 8c398c365c Evas.Image: Simplify inheritance tree of image classes
This is a bit artificial, as all image objects are still based on
the Evas.Image main class. The inheritance tree alone does not
give much information on what features are supported by which
class (eg. only Efl.Canvas.Image supports the file interface for
file_set).
2016-03-17 13:10:35 +09:00
Jean-Philippe Andre 8367f497b8 Evas.Image: Create Efl.Canvas.Image for file & data images
This replaces standard Evas_Object_Image when it is used "normally",
ie. it's an image from a file or from a pixel buffer. All other APIs
(proxy, snapshot, 3d, gl, ...) are disabled on this object.

Also, reduce number of failing calls when the object is not a legacy
object, but a legacy function is called. This is because a lot of
image APIs are called internally using the legacy APIs, often in
order to reset the state of the image object (eg. set file to NULL,
etc...)
2016-03-17 13:10:35 +09:00
Jean-Philippe Andre edafd4ec34 Evas: Improve EVAS_OBJECT_LEGACY_API a bit more
This now calls EINA_SAFETY_ERROR which makes it easy to then
break inside _eina_legacy_error.
2016-03-17 13:10:35 +09:00
Jean-Philippe Andre 6ac68c9252 Evas.Image: Move all legacy EAPI out of evas_object_image.c
Some of these functions are still be in use by the new EO objects,
like data_set/get/copy_set.
2016-03-17 13:10:35 +09:00