Commit Graph

2731 Commits

Author SHA1 Message Date
Jean-Philippe Andre 8cb3b79a82 evas: Optimize out a function call if not required
Same as the previous patch in elm_widget: don't call
flags_set() if the flags have not changed.
2016-08-10 15:26:05 +09:00
Jean-Philippe Andre 5130ce98db evas: Fix evas_objects_at_xy_get() for smart objects
Due to the way the clip geometry calculation changed
(see 25d77bc1d2) to be
based on the bounding box rather than the raw geometry
of smart objects, the internal function
evas_object_is_in_output_rect() now returns true if the
rectangle intersects with that bounding box, even if
it's outside the raw geometry.

This breaks the drop area in E's pager, as it relies on
evas_objects_at_xy_get() to find which objects are at
this point. What I saw on my desktop was that only the
lower 10 or 20 pixels were droppable in the pager,
as maximized windows would have shadows covering the
upper 20 pixels or so.

Arguably objects_at_xy_get could also return all objects
at (x,y) including smart objects that extend beyong their
geometry. This can be added as a flag in the EO API, but
not in the legacy API.
2016-08-10 13:58:30 +09:00
Carsten Haitzler 606e865823 evas smart obj delete on shutdown - fix weird child with null parent
while removing children from a parent smart object, the destruction of
the smart obj encountered childrne with NULL parents. they were in the
child list but had no parent. This was totally odd and unexpected,
thus caused an infinite loop trying to dlete a child that won't be
removed from the list because parent is NULL thus it cna't find the
parent list to remove it from. This works around that and then
complains with an error. The workaround also seems to have encountered
what might be a compiler bug so I prepended to the layer object list
rather than appended. this at leats stops the hang.

@fix
2016-08-10 00:33:56 +09:00
Jean-Philippe Andre d6817f4d6e evas filters: Fix minor issue with print
If the call to tostring() fails, replace the string by (invalid)
rather than ignore the error.

Fixes CID 1308612
2016-08-09 11:43:52 +09:00
Daniel Hirt be461b8f1b Canvas.text: fix segfault with ellipsis cases
The specific handling for (0.0 <= ellip < 1) doesn't support multi-line cases.
One of the main reasons is that we haven't had the chance to define the wanted
behavior for multi-line.
This is a temporary hack to fix a segfault. The behavior is still undefined,
though.

Fixes T3885.
2016-08-08 15:18:30 +03:00
Daniel Hirt 24ccd475b8 Evas font: fix size query again
Some wrong variables were used in the rewrite at
8c6effae8e, basically reverting the original fix.
2016-08-07 11:26:53 +03:00
Stefan Schmidt bb984760cd evas: add missing since tag for new evas_object_type_get() API 2016-08-05 23:14:56 +02:00
Jean-Philippe Andre 917f34587b evas: Make safety check more lenient
This is to avoid ERR messages such as "object is not an image!"
that can happen when a legacy image function is called on an
eo image (proxy, 3d, ...) object.

Note: This does not fix any known issue, but it's probably a safer
solution.
2016-08-05 11:01:55 +09:00
Jean-Philippe Andre 28c917836c efl: Cleanup some code (return values)
This removes some useless code in various places, where the
switch from eo_do() to standard function call was not properly
refactored.

This changes:

type ret = 0;
ret = my_eo_function();
return ret;

To:

return my_eo_function();
2016-08-05 10:32:30 +09:00
Jean-Philippe Andre 26ee77ff67 evas image: Lower ERR message to WRN and fix it
In elm_image, efl_file_get() was called on a legacy Evas Image
object, which generated an ERR message. This was way too much
noise for something that actually works.

It's best not to call efl_file_get/set API on a legacy
object, but it can be convenient for smooth code transitions
from legacy to pure eo.

Also, add safety to those APIs.

Test case: elm_test genlist dnd, start dragging anything.
2016-08-05 10:32:30 +09:00
Jean-Philippe Andre 12fbaacc97 evas: Mark image fill_spread as deprecated
It was never implemented.
2016-08-05 10:32:30 +09:00
Jean-Philippe Andre 4d67ee2478 evas: Add safety checks to evas image legacy APIs
This checks for NULL and ensures the type is evas image.
2016-08-05 10:32:30 +09:00
Tom Hacohen bf772125e8 Eo: Move Eo back into beta.
Eo should now be considered beta again. This commit puts it back in beta
and makes it necessary to define EFL_BETA_API_SUPPORT before including
Eo.h.
2016-08-02 16:34:35 +01:00
Daniel Hirt 0d9ddc4514 Canvas text: fix range geometry calculation for RTL
Fixes T3627.

@fix
2016-07-31 10:33:30 +03:00
Carsten Haitzler 742fbc5717 evas canvas destruction - detect zombie objs and hack at them with axes
ok. so here's the issue at least now. we have eo objects in the canvas
and they have a refcount of 2 user_refcount is 0. the calls stack does
NOT show we are calling callbacks at that time on these objects. they
are not in the backtrace (the canvas is, the objects themselves are
not).

SOMETHING is keeping 2 eo "internal" refs on these objects and i have
no idea what/how/who. it's a royal pain in the butt to find out as the
only way is lots and lots of logging and you get drowned in the
logging...

so what I have now done is a super ugly workaround that detects these
zombie objects that refuse to die and just FORCES them to die when the
evas canvas frees and clears out layers.
ac10a00acc doesn't really cause the
issue, it just brings it out in the open for all to see far more
easily. but something is deeply wrong SOMEWHERE with SOME objects and
our refcounts.

this fixes T4187
2016-07-29 00:02:03 +09:00
Jean-Philippe Andre b2b980a737 evas: Fix inefficient updates with no_render
is_visible returns 0 if no_render is true, so should
was_visible as well. Yeah, there will be problems if
no_render changes on the fly. Don't do that.

Fixes T4193
2016-07-26 10:25:14 +09:00
Stefan Schmidt d922a556b4 evas: filters: add return value in all cases
Function with non-void return value so we need to add a return in all cases.
Thanks to gcc for complaining here.
2016-07-25 18:00:42 +02:00
Carsten Haitzler 10f7641dda evas cache2 - fix coverity CID 1357754
@fix
2016-07-24 18:44:15 +09:00
Carsten Haitzler 1c6bb48c11 evas image updates - optimize by over-rendering less with hidden content
so if an img obj had some update regions and was opaque, it didnt del
an update region first before adding the updates, thus possibly
letting update regions pass through the opaque image area

@fix
2016-07-24 18:44:15 +09:00
Chris Michael 3bc6e30d63 evas: Fix missing breaks in switch
Coverity reports that we are missing breaks in the switch blocks here,
so add missing breaks.

Fixes Coverity CID1347413 and CID1347414

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-21 12:25:02 -04:00
Carsten Haitzler 0e5d9980b2 evas image updates - reduce overhead with bordered images not scaled
this fixes over-rendering (where we render the whole image) if it has
a border set. do proper region updates if the image has a border but
is not scaled and the fill is at 0 0 and sams size as the object etc.
etc. so this is simple and doable.

this fixes T4123
2016-07-20 13:13:41 +09:00
Carsten Haitzler ba5e3ec2fb evas objkect image - make opaque rect getting code more readable
this just makes it more obvious where its handling the opaque middle
fill case.  see T4123 - i was just reding the code and this seemingly
does the right thing.
2016-07-20 11:34:01 +09:00
Jean-Philippe Andre 2c7f9481ed textblock: Prevent crash in evas_object_textblock_cursor_new(NULL)
This happened in expedite
2016-07-19 18:32:32 +09:00
Jean-Philippe Andre d5166657e2 efl: Add support for efl_event_flags() to hold events
This fixes the following ERR message:
ERR<30400>:eo /home/jpeg/e/core/efl/src/lib/eo/eo.c:462 _eo_call_resolve()
 in ../src/lib/evas/canvas/efl_event_input.eo.c:3: func 'efl_event_flags_get'
 (1483) could not be resolved for class 'Efl_Event_Hold'.

This is an EO-API only fix.
2016-07-19 16:12:05 +09:00
Jean-Philippe Andre 0e6b6c4828 efl: Hold event (EO API) should implement instance_get
This fixes the following ERR:

ERR<23969>:eo /home/jpeg/e/core/efl/src/lib/eo/eo.c:462
  _eo_call_resolve() in ../src/lib/efl/interfaces/efl_event.eo.c:5:
  func 'efl_event_instance_get' (1479) could not be resolved for class 'Efl_Event_Hold'.
2016-07-19 16:12:05 +09:00
Carsten Haitzler ac10a00acc evas - on shutdown avoid potential invalid memory access
i don't know for sure if this fixes T4103 but in theory i think it
might given a reading of the backtrace and a guess at what might
happen, so try this fix. it doesn't hurt and can only help.

@fix
2016-07-19 15:43:22 +09:00
Jean-Philippe Andre 38a32e98fb evas: Avoid proxy subrender if size is 0
See also D4159. This is an alternative to the proposed patch.

Fixes T3949 (I hope!)
2016-07-19 14:43:33 +09:00
Jean-Philippe Andre f18747e6dd Evas GL: Use [u]int64_t directly in all APIs
This removes the need for khronos_[u]int64_t as well as the special
typdef EvasGL[u]int64.

Hopefully this should work on all platforms (note: [u]int64_t is
used in Eina APIs, so it is already required for EFL apps).

Fixes T3200
2016-07-18 15:09:19 +09:00
Jean-Philippe Andre 5faf536f51 evas: Also fix was_opaque for rect & image
I believe the function is not used, so it doesn't really
matter.
2016-07-18 13:54:27 +09:00
Jean-Philippe Andre e1ff000704 evas: Some more opacity check fixes
This should fix T3309

Snapshot objects are image objects, so the function is_opaque
exists. No need to bypass it. Also, alpha rectangles are not
opaque. Assume that anything with a filter is not opaque.

All of this fixes T3309 but the main point was on snapshot
objects (probably because the only point of a snapshot is
to apply a filter on it).
2016-07-18 13:38:05 +09:00
Jean-Philippe Andre 9248d3a5ac evas: Fix cutout regions with transparent images
This should fix rendering issues with E theme and
transparent borders.

Fixes T3309
2016-07-18 11:57:38 +09:00
Tom Hacohen 8c6effae8e Evas font: Fix width query for OpenType fonts. (rewrite)
This is essentially a cleaner redo of ef817f15f0.
Logic should be exactly the same as there, the different is that this
one shares the code between OT and non OT.

Please refer to that commit for more information.
2016-07-14 17:32:01 +01:00
Tom Hacohen 281043e357 Revert "Evas font: fix width query for OT"
This was not done correctly. This split the code, which is essentially
the same for both OT and non OT. It's the same logic with some minor
additions for OT, so most of the code should be together.

This reverts commit ef817f15f0.
2016-07-14 17:24:38 +01:00
Daniel Hirt ef817f15f0 Evas font: fix width query for OT
Fixes T4068.
Simply querying the last glyph to determine the width of the glyph sequence
won't always work, as OT can have negative offsets (adjusts the placement of a
specific glyph better).

The solution is to calculate the "max width" of some sequence that will
guarantee us proper width results. The worst solution would be to iterate on all
the glyphs and sum up the max width. This is a bit impractical. Instead, we will
inspect just the "cluster" of the last glyph, if one exists.

This should have no performance impact on trivial cases, and very little impact
on the others.

@fix
2016-07-14 12:22:44 +00:00
Carsten Haitzler b1f2c335e6 evas headers - remove duplicate declarations of the same function
this should fix T3027
2016-07-14 13:32:13 +09:00
Daniel Hirt f9deaa9be9 Canvas text: add "changed" event
We need to keep track on changes of content.
2016-07-12 11:01:45 +00:00
Daniel Hirt 0c38846e33 Canvas text: fix annotation set
The cursor position was not set correctly to the respective fnode, causing
annotation to not be applied correctly with text that has more than one
paragraph.
2016-07-12 11:01:45 +00:00
Daniel Hirt 7ff05af885 Ui text: don't null-check for free() 2016-07-12 11:01:45 +00:00
Daniel Hirt 0c23985626 Canvas text: fix corner case in range geometry calc
The trivial case of [pos,pos] (i.e. range of length 0) didn't work if there is a
format item in 'pos'.
The condition was fixed to not include such items. The reason it was not
apparent for text items is that these have further handling in the rest of the
code and would've been disposed of.

@fix
2016-07-11 16:39:51 +00:00
Carsten Haitzler 52f752f73d evas render2 region - handle if src region is empty correctly on add
fix coverity CID 1313542
2016-07-11 22:16:06 +09:00
Carsten Haitzler 485074df3a evas engine cache - drop useless iff that assert already checked
CID 1267465 pointed this out - assert(eim) already checked this so no
need to do it again - looks confusing
2016-07-11 22:09:12 +09:00
Carsten Haitzler 2b413d3f87 evas cache - avoid possible deref of null pointer
this fixes CID 1267472
2016-07-11 22:06:16 +09:00
Carsten Haitzler 98a02fc17c evas scale cache - address possible coverity deadlock
this should fix CID 1106338  where we don't lock and unlock caches in
the same order.
2016-07-11 21:45:39 +09:00
Carsten Haitzler aa11fef218 evas object freeing - fix missing null check for layer
fix CID 1039409
2016-07-11 21:14:51 +09:00
Youngbok Shin 64e0dc341d Evas textblock: Apply scale factor to <linesize>, <linegap> formats
Summary:
Font size is scaled according to scale factor.
The linesize, linegap formats also have to be scaled properly.
@fix

Test Plan:
Test cases are included.
Run "make check"

Reviewers: woohyun, Jieun, tasn, herdsman

Reviewed By: tasn

Subscribers: raster, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3688
2016-07-11 17:57:40 +09:00
Minwoo, Lee d22850848d Evas Text: Fix width of BiDi text
Summary:
BiDi text is truncated because the way we find the last visual item in text object is wrong.
This patch is similar with _line_native_last_visual_get function in textblock.

Reviewers: cedric, tasn, herdsman

Subscribers: id213sin, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3947
2016-07-11 16:26:19 +09:00
Carsten Haitzler 3990032330 evas textblock - fix deref before null check shown by coverity
fixes CID 1356927
2016-07-09 12:07:10 +09:00
Carsten Haitzler 46b97aba78 evas module load - make coverity happy but not a bug
silence CID 1357364
2016-07-08 18:59:21 +09:00
Jean-Philippe Andre 86dc7e0c87 evas: Fix warning about unused function
I kept it here for the record. It was useful, could be useful
again.
2016-07-08 12:27:29 +09:00
Carsten Haitzler 1e4b63e885 evas regions in render2 - work around coverity complaints
CID 1352392 is a false positive as the ptr is not dereferenced, but
not making coverity confused it good.
2016-07-08 12:05:08 +09:00
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