[EGIT] [core/efl] master 01/01: elm_win: move elm_win_screen_size/position get api to legacy

2016-05-31 Thread Ji-Youn Park
jypark pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3519d8ac3134c12b6c38c6d8d89b4cc4b5bfd547

commit 3519d8ac3134c12b6c38c6d8d89b4cc4b5bfd547
Author: Ji-Youn Park 
Date:   Wed Jun 1 12:58:01 2016 +0830

elm_win: move elm_win_screen_size/position get api to legacy

these kind of api are not supported in wayland.
---
 src/lib/elementary/elm_win.c| 32 +++-
 src/lib/elementary/elm_win.eo   | 20 
 src/lib/elementary/elm_win_legacy.h | 22 ++
 3 files changed, 41 insertions(+), 33 deletions(-)

diff --git a/src/lib/elementary/elm_win.c b/src/lib/elementary/elm_win.c
index cf229bb..195db54 100644
--- a/src/lib/elementary/elm_win.c
+++ b/src/lib/elementary/elm_win.c
@@ -5057,13 +5057,6 @@ _elm_win_indicator_type_get(Eo *obj EINA_UNUSED, 
Elm_Win_Data *sd EINA_UNUSED)
return ELM_WIN_INDICATOR_TYPE_UNKNOWN;
 }
 
-EOLIAN static void
-_elm_win_screen_position_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *x, 
int *y)
-{
-   if (x) *x = sd->screen.x;
-   if (y) *y = sd->screen.y;
-}
-
 EOLIAN static Eina_Bool
 _elm_win_focus_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
 {
@@ -5083,12 +5076,6 @@ _elm_win_screen_constrain_get(Eo *obj EINA_UNUSED, 
Elm_Win_Data *sd)
 }
 
 EOLIAN static void
-_elm_win_screen_size_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *x, int 
*y, int *w, int *h)
-{
-   ecore_evas_screen_geometry_get(sd->ee, x, y, w, h);
-}
-
-EOLIAN static void
 _elm_win_screen_dpi_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *xdpi, int 
*ydpi)
 {
ecore_evas_screen_dpi_get(sd->ee, xdpi, ydpi);
@@ -6215,4 +6202,23 @@ elm_win_wm_rotation_preferred_rotation_set(Evas_Object 
*obj, int rotation)
elm_win_wm_preferred_rotation_set(obj, rotation);
 }
 
+EAPI void
+elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int *w, int *h)
+{
+   ELM_WIN_CHECK(obj);
+   ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
+
+   ecore_evas_screen_geometry_get(sd->ee, x, y, w, h);
+}
+
+EAPI void
+elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y)
+{
+   ELM_WIN_CHECK(obj);
+   ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
+
+   if (x) *x = sd->screen.x;
+   if (y) *y = sd->screen.y;
+}
+
 #include "elm_win.eo.c"
diff --git a/src/lib/elementary/elm_win.eo b/src/lib/elementary/elm_win.eo
index 7a8f1eb..30ec08d 100644
--- a/src/lib/elementary/elm_win.eo
+++ b/src/lib/elementary/elm_win.eo
@@ -737,32 +737,12 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
 skip: bool; [[The skip flag state ($true if it is to be skipped).]]
  }
   }
-  @property screen_position {
- get {
-[[Get the screen position of a window.]]
- }
- values {
-x: int; [[The int to store the x coordinate to.]]
-y: int; [[The int to store the y coordinate to.]]
- }
-  }
   @property focus {
  get {
 [[Get whether a window has focus.]]
 return: bool;
  }
   }
-  @property screen_size {
- get {
-[[Get screen geometry details for the screen that a window is on.]]
- }
- values {
-x: int; [[Where to return the horizontal offset value. May be 
$null.]]
-y: int; [[Where to return the vertical offset value. May be 
$null.]]
-w: int; [[Where to return the width value. May be $null.]]
-h: int; [[Where to return the height value. May be $null.]]
- }
-  }
   @property main_menu {
  get {
 [[Get the Main Menu of a window.]]
diff --git a/src/lib/elementary/elm_win_legacy.h 
b/src/lib/elementary/elm_win_legacy.h
index b7f3fc2..ac336a1 100644
--- a/src/lib/elementary/elm_win_legacy.h
+++ b/src/lib/elementary/elm_win_legacy.h
@@ -675,3 +675,25 @@ EAPI Eina_Bool elm_win_wm_rotation_supported_get(const 
Evas_Object *obj);
  */
 EAPI int elm_win_wm_rotation_preferred_rotation_get(const Evas_Object *obj);
 
+
+/**
+ * @brief Get the screen position of a window.
+ *
+ * @param[out] x The int to store the x coordinate to.
+ * @param[out] y The int to store the y coordinate to.
+ *
+ * @ingroup Elm_Win
+ */
+EAPI void elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y);
+
+/**
+ * @brief Get screen geometry details for the screen that a window is on.
+ *
+ * @param[out] x Where to return the horizontal offset value. May be @c null.
+ * @param[out] y Where to return the vertical offset value. May be @c null.
+ * @param[out] w Where to return the width value. May be @c null.
+ * @param[out] h Where to return the height value. May be @c null.
+ *
+ * @ingroup Elm_Win
+ */
+EAPI void elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int 
*w, int *h);

-- 




[E-devel] EFL 1.7.2 Release

2016-05-31 Thread Simon Lees
Hi All,

Sorry I was busy last week and didn't pay enough attention to the 1.17.1
release, as it turns out 1.17.1 missed 5 fixes that I had manually
patched for openSUSE (Including 1 CVE) and since the release there has
been the two pointer comparison fixes from raster these fixes seem more
major then any of the fixes in the 1.17.1 release so it might be time to
spin 1.17.2,

evas - gif loader - handle missing colormap -
db4ff548d356243638f5fa0898b2ee4ff1be55f5
evas: gif loader - fix out of bounds access on cmap of invalid pixels
(CVE-2014-9762 [was for imlib2])
dd90b6afadf706aafec9e53a6b1efa8f899ab277
evas - gif loader - be a little more optimal in pixel lookups on decode
(Not sure if that fixes anything)
f56e33f429cfc165a5a7e7c75c5b2271ba8b58d8
evas sw render: cutout rects may be used in multiple threads
4d6a8a7fce51b5654404226668a27d52d1e30eb3

New fixes:
eina hash - fix stringshare key comparison function (T3638)
636c8b48c7da345eeb58b0eb0f436e0386e46e6f
efl - fix many bounds over/underflow where we use int for ptr cmp
41842ca9f92095ae08ae54d99e9dcfeadef401df

I guess since all the fixes are rasters, he's just forgotten to backport
them.

Cheers
Simon

-- 

Simon Lees (Simotek)http://simotek.net

Emergency Update Team   keybase.io/simotek
SUSE LinuxAdeliade Australia, UTC+9:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B




signature.asc
Description: OpenPGP digital signature
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Elm is broken and can't revert due to Efl.part

2016-05-31 Thread David Seikel
On Wed, 1 Jun 2016 11:14:03 +0900 Jean-Philippe André
 wrote:

> Hi,
> 
> On 1 June 2016 at 01:58, Stephen Houston 
> wrote:
> 
> > It is still broken, and it is a lot more than just "hover".
> >
> > http://pastebin.ca/3614443
> >
> > http://pastebin.ca/3614491
> >
> > http://pastebin.ca/3614493
> >
> > And this is just what I've found so far.  It really feels like these
> > changes were not tested before they were committed, and they are big
> > changes, so that is a shame.  They are very easily reproduced, and
> > would have been seen easily by testing.  If there weren't already
> > so many changes on top of the efl part commit that prevent
> > reverting, I would recommend a revert.  It is has messed up quite a
> > lot.
> >
> 
> Yeah,  but after a quick look at the backtraces, I believe those are
> in fact not related to efl_part, but rather to eo_del removal.
> Something like this happens: an object gets too many unrefs (up until
> 0 ref) while walking its callbacks list, and that ends up crashing
> because we're still reading the cb list. (I'm not 100% sure)
> 
> One problem with massive changes spanning over  lot of EFL / Elm is
> that it's practically impossible to test everything. I've used
> expedite (partly broken atm), exactness and just run E, terminology
> that also help with testing.
> 
> 
> Not harping on you too bad jpeg.  I know you are working hard and
> stuff
> > happens.  Hopefully you can get to this pretty soon.
> >
> 
> Thanks for the kind words :)
> 
> More stuff might break until we start freezing the API (first alpha
> tarball). Then we'll be busy fixing things as we discover them. :)
> But quick reports are always welcome! This is helpful.

One problem is the big number of changes, and people like me, that are
developing large EFL based projects, have a hard time keeping up enough
to do much testing.

It's particularly hard to pick a good time to update GIT.  Most
recently, after seeing jenkins failing a lot, the window of opportunity
between all the jenkins tests being "back to normal" and failing all
over the place again was very short, I missed it.  Getting to a point
where both EFL and Enlightenment in GIT are stable enough to test can
be hard to.  Particularly important for those of us actually using
Enlightenment.  I don't want my Enlightenment broken, ever, coz then I
have to use another WM, ew.

Yes I could go to a lot of trouble to track which particular commit was
the "fixed everything up" before the very next commit three seconds
later fails it all again.  Or buying another computer to do testing
on.  Testing on a VM wont help much, they don't work so well for 3D
stuff.  It all just becomes too much work.

I'd suggest really long freezes this time around between alpha, beta,
and final releases.

Right now I'm waiting for the first freeze before I update again, I
think that's due soon?  I did at least run those EO conversion scripts,
got it to compile, reversed the white space changes the scripts did,
and most of it runs again.  Still a few things broken.  I'll begin
investigating them soon.

Mind you, it would be useful if the bug I reported long ago, about Elm
and Evas_3D losing textures after a couple of minutes, or any hiding of
the window, was actually responded to.  Currently that combination is
entirely useless at the moment for anything.  I do note that all the Elm
+ Evas_3D examples and tests manage to avoid that particular bug, by
either not using textures, or only using one.  When adding more
textures to any of those, the bug shows.

Quick reports might be welcome, but actual responses to them is also a
good idea.

Actually, if I recall, I lodged three Evas_3D bugs at the time.  The
only one that got a response was the last one, that complained that
phab had no way of tagging Evas_3D bugs.  That was quickly responded to
and fixed, but by a phab person, not Evas_3D people.

> > On Sun, May 29, 2016 at 9:18 PM Jean-Philippe André
> >  wrote:
> >
> > > "Broke elm" --> "broke elm_hover", please.
> > >
> > > This should be fixed now, but I admit there's something fishy
> > > about the efl_part object inheritance.
> > > See c59d222f6da28442bc9213bd6ec42590494e67de.
> > >
> > > On 28 May 2016 at 04:26, Davide Andreoli 
> > > wrote:
> > >
> > > > I can confirm this daily breakage, easy to reproduce on each
> > > > elm_test
> > > that
> > > > use hover
> > > >
> > > > 2016-05-27 19:44 GMT+02:00 Stephen Houston
> > > > :
> > > >
> > > > > https://phab.enlightenment.org/T3704
> > > > >
> > > > > On Fri, May 27, 2016 at 12:06 PM, Mike Blumenkrantz <
> > > > > michael.blumenkra...@gmail.com> wrote:
> > > > >
> > > > > > It would probably be helpful if you could provide more info
> > > > > > about
> > > this
> > > > as
> > > > > > well as creating a tracking ticket.
> > > > > >
> > > > > > On Fri, May 27, 2016 at 1:01 PM Stephen Houston <
> > > 

Re: [E-devel] Elm is broken and can't revert due to Efl.part

2016-05-31 Thread Jean-Philippe André
Hi,

On 1 June 2016 at 01:58, Stephen Houston  wrote:

> It is still broken, and it is a lot more than just "hover".
>
> http://pastebin.ca/3614443
>
> http://pastebin.ca/3614491
>
> http://pastebin.ca/3614493
>
> And this is just what I've found so far.  It really feels like these
> changes were not tested before they were committed, and they are big
> changes, so that is a shame.  They are very easily reproduced, and would
> have been seen easily by testing.  If there weren't already so many changes
> on top of the efl part commit that prevent reverting, I would recommend a
> revert.  It is has messed up quite a lot.
>

Yeah,  but after a quick look at the backtraces, I believe those are in
fact not related to efl_part, but rather to eo_del removal. Something like
this happens: an object gets too many unrefs (up until 0 ref) while walking
its callbacks list, and that ends up crashing because we're still reading
the cb list. (I'm not 100% sure)

One problem with massive changes spanning over  lot of EFL / Elm is that
it's practically impossible to test everything. I've used expedite (partly
broken atm), exactness and just run E, terminology that also help with
testing.


Not harping on you too bad jpeg.  I know you are working hard and stuff
> happens.  Hopefully you can get to this pretty soon.
>

Thanks for the kind words :)

More stuff might break until we start freezing the API (first alpha
tarball). Then we'll be busy fixing things as we discover them. :)
But quick reports are always welcome! This is helpful.


> On Sun, May 29, 2016 at 9:18 PM Jean-Philippe André 
> wrote:
>
> > "Broke elm" --> "broke elm_hover", please.
> >
> > This should be fixed now, but I admit there's something fishy about the
> > efl_part object inheritance.
> > See c59d222f6da28442bc9213bd6ec42590494e67de.
> >
> > On 28 May 2016 at 04:26, Davide Andreoli  wrote:
> >
> > > I can confirm this daily breakage, easy to reproduce on each elm_test
> > that
> > > use hover
> > >
> > > 2016-05-27 19:44 GMT+02:00 Stephen Houston :
> > >
> > > > https://phab.enlightenment.org/T3704
> > > >
> > > > On Fri, May 27, 2016 at 12:06 PM, Mike Blumenkrantz <
> > > > michael.blumenkra...@gmail.com> wrote:
> > > >
> > > > > It would probably be helpful if you could provide more info about
> > this
> > > as
> > > > > well as creating a tracking ticket.
> > > > >
> > > > > On Fri, May 27, 2016 at 1:01 PM Stephen Houston <
> > smhousto...@gmail.com
> > > >
> > > > > wrote:
> > > > >
> > > > > > FYI Efl.Part broke elm and it can't be reverted.
> > > > > >
> > > > > >
>

Best regards,

-- 
Jean-Philippe André
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread Felipe Magno de Almeida
On Tue, May 31, 2016 at 8:51 PM, Carsten Haitzler  wrote:
> On Tue, 31 May 2016 21:52:31 +0900 Conrad Um  said:
>
>> At first, I also considered making color as Eo class, but isn't it too
>> expensive? so as the next best, suggested using data structure and inline
>> functions. (I don't know how inline functions can be provided  in bindings)
>
> what about bindings? inline funcs can't/don't work there. that's the problem 
> if
> you use/rely on inline funcs or macros. what about c++? js? lua? ... ? the 
> only
> thing that works are class functions (they end up in bindings) but they will
> look horrid for this kind of usage. :(

I think color is an important concept that we can manually implement it
in bindings. And performance will be important in bindings as well, though
still slower than in C or C++ (though maybe luajit could get pretty close).

[snip]

Regards,
-- 
Felipe Magno de Almeida

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] eina promise.... confusing

2016-05-31 Thread Felipe Magno de Almeida
On Tue, May 31, 2016 at 10:41 PM, Carsten Haitzler  wrote:
>

[snip]

> i just say - remove the void * for the job. same for timeout too - it's not
> portable and the documentation is confusing as it claims to be data where it's
> actually value... and value actually is a pointer TO the pointer you provide.

That is going to change in promises in the next few days before
the freeze period. Right now the void* value pointer is a pointer
to whatever the promise is, if it is a void*, then value is void**.
Which is awfully confusing. That was meant to allow value types
and not restrict to only pointers, however it is going to change
one way or another, i.e., or by removing the possibility of non-pointers
or by assuming pointer-types are to be used as, well, pointers.

>> --
>> Cedric BAIL

Regards,
-- 
Felipe Magno de Almeida

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] eina promise.... confusing

2016-05-31 Thread The Rasterman
On Tue, 31 May 2016 17:01:40 -0700 Cedric BAIL  said:

> On Tue, May 31, 2016 at 4:45 PM, Carsten Haitzler 
> wrote:
> > On Tue, 31 May 2016 06:15:29 -0700 Cedric BAIL  said:
> >
> >> On May 30, 2016 22:51, "Carsten Haitzler"  wrote:
> >> >
> >> > the api for promises seems pretty confusing. just look at this:
> >> >
> >> >   job = efl_loop_job(obj, args);
> >> >eina_promise_then(job, _efl_loop_args_job_cb, NULL, args);
> >> >
> >> > why do i need to pass in args... TWICE? well ok - this specific way of
> >> using
> >> > promises for jobs... both promises in efl_loop.eo do this, and it's
> >> confusing.
> >> > the void *data when creating the job (first args) is not used at all. the
> >> data
> >> > for the promise is passed as data to the promise callback.
> >> >
> >> > why do this? value isn't used here in the promise -actually it's the
> >> promise
> >> > ptr itself for whatever reason.
> >>
> >> They are both different. A promise deliver a value at some point in the
> >> future to multiple callback couple. The data you give when creating the
> >> promise is the one delivered in the future. The one you pass with your
> >> couple of callbacks is obviously tied to that couple of callback. They are
> >> clearly 2 different things. Obviously you don't need to pass any data at
> >> all in both case.
> >
> > ummm the void *data when creating the job never is passed as anything to
> > promise callbacks. why have it at all? it's misleading. it's useless. i sat
> > down and had to figure out what is and isn't passed because it was entirely
> > unclear what was passed or not. value is the promise. i've printfed it's
> > values trying to figure out what gets passed where. bizarre that it is but
> > whatever. but data from the job is unused. data from the eina_promise_then
> > is used and passed as data to the cb's
> 
> It is passed as the value void * pointer. The second parameter of the
> function being called by the then case. You did set it to EINA_UNUSED
> in your case.

it isn't passed to value. i printf'd value as %p, not the data * in the job.
that's my point. it's all confusing. rename it to void *value then to at least
make that obvious. make sure the docs say that. they do not. they say it's
passed as data ptr.

here is the output of this code:

static void
_efl_loop_args_job_cb(void *data, void *value,
  Eina_Promise *promise EINA_UNUSED)
{
   Efl_Loop_Args *args = data;
   Eo *obj = eo_parent_get(args);

   printf("promise cb: data = %p, value = %p, promise = %p\n", data, value,
promise); eo_event_callback_call(obj, EFL_LOOP_EVENT_ARGS, args);
   eo_unref(args); // FIXME: probably eo_del()
}

EOLIAN static void
_efl_loop_args_add(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED, int argc, const char
**argv) {
   Eina_Promise *job;
   Efl_Loop_Args *args = eo_add(EFL_LOOP_ARGS_CLASS, obj);

   if (!args) return;
   efl_loop_args_set(args, argc, argv);
   job = efl_loop_job(obj, (void *)0x1);
   printf("efl_loop_job() return = %p\n", job);
   printf("data ptr for promise = %p\n", args);
   eina_promise_then(job, _efl_loop_args_job_cb, NULL, args);
}

output:

efl_loop_job() return = 0x11efcc8
data ptr for promise = 0x40020021
promise cb: data = 0x40020021, value = 0x11efd70, promise = 0x11efcc8

value is NOT the data passed into job. not at all. i passed in 0x1. the
documentation says:

@in data: const(void)* @optional; [[The data to be given when the
promise is done.]]

? the data to be given to promise. there is only one data parameter - the
first. the docs SAY it's given to the promise. that's not the case. it's not
given to value OR to data. if you mean that value POINTS to a void * containing
the value of data above.. then say that. :) but this is totally not portable.

i just say - remove the void * for the job. same for timeout too - it's not
portable and the documentation is confusing as it claims to be data where it's
actually value... and value actually is a pointer TO the pointer you provide.

> -- 
> Cedric BAIL
> 


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] eina promise.... confusing

2016-05-31 Thread Cedric BAIL
On Tue, May 31, 2016 at 4:45 PM, Carsten Haitzler 
wrote:
> On Tue, 31 May 2016 06:15:29 -0700 Cedric BAIL  said:
>
>> On May 30, 2016 22:51, "Carsten Haitzler"  wrote:
>> >
>> > the api for promises seems pretty confusing. just look at this:
>> >
>> > job = efl_loop_job(obj, args);
>> > eina_promise_then(job, _efl_loop_args_job_cb, NULL, args);
>> >
>> > why do i need to pass in args... TWICE? well ok - this specific way of
>> using
>> > promises for jobs... both promises in efl_loop.eo do this, and it's
>> confusing.
>> > the void *data when creating the job (first args) is not used at all.
the
>> data
>> > for the promise is passed as data to the promise callback.
>> >
>> > why do this? value isn't used here in the promise -actually it's the
>> promise
>> > ptr itself for whatever reason.
>>
>> They are both different. A promise deliver a value at some point in the
>> future to multiple callback couple. The data you give when creating the
>> promise is the one delivered in the future. The one you pass with your
>> couple of callbacks is obviously tied to that couple of callback. They
are
>> clearly 2 different things. Obviously you don't need to pass any data at
>> all in both case.
>
> ummm the void *data when creating the job never is passed as anything to
> promise callbacks. why have it at all? it's misleading. it's useless. i
sat
> down and had to figure out what is and isn't passed because it was
entirely
> unclear what was passed or not. value is the promise. i've printfed it's
values
> trying to figure out what gets passed where. bizarre that it is but
whatever.
> but data from the job is unused. data from the eina_promise_then is used
and
> passed as data to the cb's

It is passed as the value. The second parameter of the function being
called in the then case. You did set it to EINA_UNUSED in your case. I can
call it value in the .eo if that help.
-- 
Cedric BAIL
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] eina promise.... confusing

2016-05-31 Thread Cedric BAIL
On Tue, May 31, 2016 at 4:45 PM, Carsten Haitzler  wrote:
> On Tue, 31 May 2016 06:15:29 -0700 Cedric BAIL  said:
>
>> On May 30, 2016 22:51, "Carsten Haitzler"  wrote:
>> >
>> > the api for promises seems pretty confusing. just look at this:
>> >
>> >   job = efl_loop_job(obj, args);
>> >eina_promise_then(job, _efl_loop_args_job_cb, NULL, args);
>> >
>> > why do i need to pass in args... TWICE? well ok - this specific way of
>> using
>> > promises for jobs... both promises in efl_loop.eo do this, and it's
>> confusing.
>> > the void *data when creating the job (first args) is not used at all. the
>> data
>> > for the promise is passed as data to the promise callback.
>> >
>> > why do this? value isn't used here in the promise -actually it's the
>> promise
>> > ptr itself for whatever reason.
>>
>> They are both different. A promise deliver a value at some point in the
>> future to multiple callback couple. The data you give when creating the
>> promise is the one delivered in the future. The one you pass with your
>> couple of callbacks is obviously tied to that couple of callback. They are
>> clearly 2 different things. Obviously you don't need to pass any data at
>> all in both case.
>
> ummm the void *data when creating the job never is passed as anything to
> promise callbacks. why have it at all? it's misleading. it's useless. i sat
> down and had to figure out what is and isn't passed because it was entirely
> unclear what was passed or not. value is the promise. i've printfed it's 
> values
> trying to figure out what gets passed where. bizarre that it is but whatever.
> but data from the job is unused. data from the eina_promise_then is used and
> passed as data to the cb's

It is passed as the value void * pointer. The second parameter of the
function being called by the then case. You did set it to EINA_UNUSED
in your case.
-- 
Cedric BAIL

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread The Rasterman
On Tue, 31 May 2016 21:52:31 +0900 Conrad Um  said:

> At first, I also considered making color as Eo class, but isn't it too
> expensive? so as the next best, suggested using data structure and inline
> functions. (I don't know how inline functions can be provided  in bindings)

what about bindings? inline funcs can't/don't work there. that's the problem if
you use/rely on inline funcs or macros. what about c++? js? lua? ... ? the only
thing that works are class functions (they end up in bindings) but they will
look horrid for this kind of usage. :(

> If there is a rule that which color (premul or non-premul) Efl.Gfx.Color
> will use, we can provide setters and getters with various type of color.
> 
> For example, we can make setters passing premul rgba, non-premul rgba, hsv
> colors (they will be converted to predetermined color type), and any APIs
> passing Efl.Gfx.Color can convert it into what they need.
> (evas_object_color_set() will convert color to premul,
> edje_object_color_class_set() will convert color to non-premul etc.)
> 
> Or, making color as Eo class seems good to me if there isn't noticeable
> performance degradation. As JP mentioned, color class can provide string
> lookup (like "red", "silver") or HTML notation. ("#FF")

color as a whole object/class will be really nasty. an argba color is basically
4 bytes. the smallest eo object last i counted was like 72 bytes plus data
payload. you have to create it, set it, delete it. in c the api will become
horrid. like:

  col = eo_add(EFL_COLOR_CLASS, efl_color_rgba_set(255, 128, 0, 255));
  efl_gfx_color_set(obj, col);
  eo_unref(col);

as opposed to:

  efl_gfx_color_set(obj, 255, 128, 0, 255);

:(

> BTW, you might not know this, because I didn't update the doc. EDC syntax
> allows HTML notation.
> rect { "red_rect"
>desc { "default"
>   color: "#FF";
>}
> }
> 
> conr2d (Jee-Yong Um)
> On May 31, 2016 7:05 PM, "Jean-Philippe André"  wrote:
> 
> On 31 May 2016 at 17:34, Carsten Haitzler  wrote:
> 
> > On Tue, 31 May 2016 16:49:38 +0930 Simon Lees  said:
> >
> > >
> > >
> > > On 05/31/2016 04:32 PM, Carsten Haitzler (The Rasterman) wrote:
> > > > On Tue, 31 May 2016 06:38:52 + Andrew Williams <
> > a...@andywilliams.me>
> > > > said:
> > > >
> > > >> Not to be picky but Java is not rgba by default - it prefers Color
> > too,
> > > >> some r g b a helper methods exist. It additionally provides many
> > standard
> > > >> Color definitions for "system" colours... (As well as convenience
> > such as
> > > >> Color.BLACK)
> > > >
> > > > as i said, it's an object (well a color class you create color
> > objects). :)
> > > >
> > > > public class Color
> > > > extends Object
> > > >
> > > > :) there are different constructors that use polymorphism:
> > > >
> > > > Color(float r, float g, float b)
> > > > Color(float r, float g, float b, float a)
> > > > Color(int rgb)
> > > > Color(int rgba, boolean hasalpha)
> > > > Color(int r, int g, int b)
> > > > Color(int r, int g, int b, int a)
> > > >
> > > > the separate r, g, b, a is pretty common in api's. that's what i was
> > saying.
> > > >
> > >
> > > For what its worth Qt passes a color "class" generally but normally
> > > you'd write either setColor(255,0,0,255); or setColor("#FF00"); and
> > > let the language magic automatically turn that into a class, but
> > > whenever specifying in html notation rather then rgba, its always done
> > > as a string, I don't recall seeing a api anywhere that stores rgba in
> > > one int.
> >
> > that's actually the
> >   Color(int rgba, boolean hasalpha)
> > and
> >   Color(int rgb)
> >
> > that passes color as an int around. all pixels in an image are "unsigned
> > ints"
> > with color in them.
> > 
> >
> 
> Efl.Gfx.Color is already defined since 1.17 as a struct, containing R, G,
> B, A as shorts, not chars. That was done in order to allow for 16-bit
> precision per channel, in the future. But note that Efl.Gfx.Color is still
> behind the BETA #ifdef
> 
> A short lived eo object could actually make sense, like efl_part. If
> color_set() owns the Color object then it can just read its value and unref
> it.
> Then we could do just like Qt and provide lots of color "conversion"
> functions (hex, html name, rgba 32 bit...)
> 
> But even if we provide this as an API we will need an easy way in C to set
> a color from R,G,B,A (4 ints). Be it a macro or another method.
> 
> --
> Jean-Philippe André
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. 

Re: [E-devel] eina promise.... confusing

2016-05-31 Thread The Rasterman
On Tue, 31 May 2016 11:48:32 -0300 Felipe Magno de Almeida
 said:

> On Tue, May 31, 2016 at 10:15 AM, Cedric BAIL  wrote:
> > On May 30, 2016 22:51, "Carsten Haitzler"  wrote:
> >>
> >> the api for promises seems pretty confusing. just look at this:
> >>
> >>   job = efl_loop_job(obj, args);
> >>eina_promise_then(job, _efl_loop_args_job_cb, NULL, args);
> >>
> >> why do i need to pass in args... TWICE? well ok - this specific way of
> > using
> >> promises for jobs... both promises in efl_loop.eo do this, and it's
> > confusing.
> >> the void *data when creating the job (first args) is not used at all. the
> > data
> >> for the promise is passed as data to the promise callback.
> >>
> >> why do this? value isn't used here in the promise -actually it's the
> > promise
> >> ptr itself for whatever reason.
> >
> > They are both different. A promise deliver a value at some point in the
> > future to multiple callback couple. The data you give when creating the
> > promise is the one delivered in the future. The one you pass with your
> > couple of callbacks is obviously tied to that couple of callback. They are
> > clearly 2 different things. Obviously you don't need to pass any data at
> > all in both case.
> 
> Though I think cedric's idea is a good one, because it reuses the
> eina promise value for something that could be useful, I think the
> use of void* in the eolian API is not good. I don't know how to
> resolve this conflict except by removing the void* and have
> the promise be of type promise without any value.

the void * isn't even passed along from the eo api./ i sat down trying to
figure it out because it was basically impossible to know what was used where
from the docs.

> If there were "template" methods in Eolian this would be completely
> clean, but unfortunately we don't.
> 
> > Cedric
> >
> >> why?
> 
> Regards,
> -- 
> Felipe Magno de Almeida
> 
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are 
> consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
> J-Flow, sFlow and other flows. Make informed decisions using capacity 
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] eina promise.... confusing

2016-05-31 Thread The Rasterman
On Tue, 31 May 2016 06:15:29 -0700 Cedric BAIL  said:

> On May 30, 2016 22:51, "Carsten Haitzler"  wrote:
> >
> > the api for promises seems pretty confusing. just look at this:
> >
> >   job = efl_loop_job(obj, args);
> >eina_promise_then(job, _efl_loop_args_job_cb, NULL, args);
> >
> > why do i need to pass in args... TWICE? well ok - this specific way of
> using
> > promises for jobs... both promises in efl_loop.eo do this, and it's
> confusing.
> > the void *data when creating the job (first args) is not used at all. the
> data
> > for the promise is passed as data to the promise callback.
> >
> > why do this? value isn't used here in the promise -actually it's the
> promise
> > ptr itself for whatever reason.
> 
> They are both different. A promise deliver a value at some point in the
> future to multiple callback couple. The data you give when creating the
> promise is the one delivered in the future. The one you pass with your
> couple of callbacks is obviously tied to that couple of callback. They are
> clearly 2 different things. Obviously you don't need to pass any data at
> all in both case.

ummm the void *data when creating the job never is passed as anything to
promise callbacks. why have it at all? it's misleading. it's useless. i sat
down and had to figure out what is and isn't passed because it was entirely
unclear what was passed or not. value is the promise. i've printfed it's values
trying to figure out what gets passed where. bizarre that it is but whatever.
but data from the job is unused. data from the eina_promise_then is used and
passed as data to the cb's

> Cedric
> 
> > why?
> >
> > --
> > - Codito, ergo sum - "I code, therefore I am" --
> > The Rasterman (Carsten Haitzler)ras...@rasterman.com
> >
> >
> >
> --
> > What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> > patterns at an interface-level. Reveals which users, apps, and protocols
> are
> > consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> > J-Flow, sFlow and other flows. Make informed decisions using capacity
> > planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are 
> consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
> J-Flow, sFlow and other flows. Make informed decisions using capacity 
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 05/07: evas: avoid useless manipulation during pick object from scene in Evas.Canvas3d

2016-05-31 Thread Oleksandr Shcherbina
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c6ce60c44efbff98b396847472588930d25c066b

commit c6ce60c44efbff98b396847472588930d25c066b
Author: Oleksandr Shcherbina 
Date:   Tue May 31 14:40:04 2016 -0700

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 
---
 src/lib/evas/canvas/evas_canvas3d_scene.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.c 
b/src/lib/evas/canvas/evas_canvas3d_scene.c
index 5800bce..97c67a3 100644
--- a/src/lib/evas/canvas/evas_canvas3d_scene.c
+++ b/src/lib/evas/canvas/evas_canvas3d_scene.c
@@ -282,7 +282,7 @@ _pick_data_texcoord_update(Evas_Canvas3D_Pick_Data *data,
 }
 
 
-static inline void
+static inline Eina_Bool
 _pick_data_mesh_add(Evas_Canvas3D_Pick_Data *data, const Evas_Ray3 *ray,
 Evas_Canvas3D_Mesh *mesh, int frame, Evas_Canvas3D_Node 
*node)
 {
@@ -333,6 +333,7 @@ _pick_data_mesh_add(Evas_Canvas3D_Pick_Data *data, const 
Evas_Ray3 *ray,
  _pick_data_texcoord_update(data, , , 
tex_weight, i0, i1, i2);
data->mesh = mesh;
data->node = node;
+   return EINA_TRUE;
 }
}
   }
@@ -381,6 +382,7 @@ _pick_data_mesh_add(Evas_Canvas3D_Pick_Data *data, const 
Evas_Ray3 *ray,
  _pick_data_texcoord_update(data, , , 
tex_weight, i0, i1, i2);
data->mesh = mesh;
data->node = node;
+   return EINA_TRUE;
 }
}
   }
@@ -524,6 +526,7 @@ _pick_data_mesh_add(Evas_Canvas3D_Pick_Data *data, const 
Evas_Ray3 *ray,
 _pick_data_texcoord_update(data, , , 
tex_weight, i, i + 1, i + 2);
data->mesh = mesh;
data->node = node;
+   return EINA_TRUE;
 }
}
   }
@@ -544,10 +547,12 @@ _pick_data_mesh_add(Evas_Canvas3D_Pick_Data *data, const 
Evas_Ray3 *ray,
  _pick_data_texcoord_update(data, , , 
tex_weight, 0, i, i + 1);
data->mesh = mesh;
data->node = node;
+   return EINA_TRUE;
 }
}
   }
  }
+   return EINA_FALSE;
 }
 
 Eina_Bool
@@ -581,7 +586,8 @@ _node_pick(Evas_Canvas3D_Node *node, void *data)
 while (eina_iterator_next(itr, ))
   {
  Evas_Canvas3D_Node_Mesh *nm = (Evas_Canvas3D_Node_Mesh *)ptr;
- _pick_data_mesh_add(pick, , nm->mesh, nm->frame, node);
+ if(_pick_data_mesh_add(pick, , nm->mesh, nm->frame, node))
+   break;
   }
  }
 

-- 




[EGIT] [core/efl] master 07/07: evas: updated evas_vg_sample with the appen_arc() api as well as _shape_dup() api test.

2016-05-31 Thread Subhransu Mohanty
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fbde2778af469c43311a8fb343f52cd2e1488ce4

commit fbde2778af469c43311a8fb343f52cd2e1488ce4
Author: Subhransu Mohanty 
Date:   Tue May 31 14:42:37 2016 -0700

evas: updated evas_vg_sample with the appen_arc() api as well as 
_shape_dup() api test.

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL 
---
 src/examples/evas/evas-vg-simple.c | 365 ++---
 1 file changed, 16 insertions(+), 349 deletions(-)

diff --git a/src/examples/evas/evas-vg-simple.c 
b/src/examples/evas/evas-vg-simple.c
index 329e7a7..305df03 100644
--- a/src/examples/evas/evas-vg-simple.c
+++ b/src/examples/evas/evas-vg-simple.c
@@ -39,16 +39,6 @@
 #define PATH_KAPPA 0.5522847498
 #define PI 3.1415926535
 
-typedef struct _Bezier
-{
-float x1, y1, x2, y2, x3, y3, x4, y4;
-}Bezier;
-
-typedef struct _Point
-{
-int x;
-int y;
-}Point;
 
 static Efl_VG *beginning = NULL;
 static Efl_VG *end = NULL;
@@ -56,337 +46,6 @@ static Efl_VG *root = NULL;
 static double start_time = 0;
 static Ecore_Animator *anim = NULL;
 
-static
-Bezier bezierFromPoints(Point p1, Point p2,
-Point p3, Point p4)
-{
-Bezier b;
-b.x1 = p1.x;
-b.y1 = p1.y;
-b.x2 = p2.x;
-b.y2 = p2.y;
-b.x3 = p3.x;
-b.y3 = p3.y;
-b.x4 = p4.x;
-b.y4 = p4.y;
-return b;
-}
-
-static inline void
-parameterSplitLeft(Bezier *b, float t, Bezier *left)
-{
-left->x1 = b->x1;
-left->y1 = b->y1;
-
-left->x2 = b->x1 + t * ( b->x2 - b->x1 );
-left->y2 = b->y1 + t * ( b->y2 - b->y1 );
-
-left->x3 = b->x2 + t * ( b->x3 - b->x2 ); // temporary holding spot
-left->y3 = b->y2 + t * ( b->y3 - b->y2 ); // temporary holding spot
-
-b->x3 = b->x3 + t * ( b->x4 - b->x3 );
-b->y3 = b->y3 + t * ( b->y4 - b->y3 );
-
-b->x2 = left->x3 + t * ( b->x3 - left->x3);
-b->y2 = left->y3 + t * ( b->y3 - left->y3);
-
-left->x3 = left->x2 + t * ( left->x3 - left->x2 );
-left->y3 = left->y2 + t * ( left->y3 - left->y2 );
-
-left->x4 = b->x1 = left->x3 + t * (b->x2 - left->x3);
-left->y4 = b->y1 = left->y3 + t * (b->y2 - left->y3);
-}
-static
-Bezier bezierOnInterval(Bezier *b, float t0, float t1)
-{
-if (t0 == 0 && t1 == 1)
-return *b;
-
-Bezier result;
-parameterSplitLeft(b, t0, );
-float trueT = (t1-t0)/(1-t0);
-parameterSplitLeft(b, trueT, );
-
-return result;
-}
-
-static inline void
-_bezier_coefficients(float t, float *ap, float *bp, float *cp, float *dp)
-{
-float a,b,c,d;
-float m_t = 1. - t;
-b = m_t * m_t;
-c = t * t;
-d = c * t;
-a = b * m_t;
-b *= 3. * t;
-c *= 3. * m_t;
-*ap = a;
-*bp = b;
-*cp = c;
-*dp = d;
-}
-
-static
-float _t_for_arc_angle(float angle)
-{
-if (angle < 0.1)
-return 0;
-
-if (angle == 90.0)
-return 1;
-
-float radians = PI * angle / 180;
-float cosAngle = cos(radians);
-float sinAngle = sin(radians);
-
-// initial guess
-float tc = angle / 90;
-// do some iterations of newton's method to approximate cosAngle
-// finds the zero of the function b.pointAt(tc).x() - cosAngle
-tc -= 2-3*PATH_KAPPA) * tc + 3*(PATH_KAPPA-1)) * tc) * tc + 1 - 
cosAngle) // value
- / (((6-9*PATH_KAPPA) * tc + 6*(PATH_KAPPA-1)) * tc); // derivative
-tc -= 2-3*PATH_KAPPA) * tc + 3*(PATH_KAPPA-1)) * tc) * tc + 1 - 
cosAngle) // value
- / (((6-9*PATH_KAPPA) * tc + 6*(PATH_KAPPA-1)) * tc); // derivative
-
-// initial guess
-float ts = tc;
-// do some iterations of newton's method to approximate sinAngle
-// finds the zero of the function b.pointAt(tc).y() - sinAngle
-ts -= 3*PATH_KAPPA-2) * ts -  6*PATH_KAPPA + 3) * ts + 3*PATH_KAPPA) * 
ts - sinAngle)
- / (((9*PATH_KAPPA-6) * ts + 12*PATH_KAPPA - 6) * ts + 3*PATH_KAPPA);
-ts -= 3*PATH_KAPPA-2) * ts -  6*PATH_KAPPA + 3) * ts + 3*PATH_KAPPA) * 
ts - sinAngle)
- / (((9*PATH_KAPPA-6) * ts + 12*PATH_KAPPA - 6) * ts + 3*PATH_KAPPA);
-
-// use the average of the t that best approximates cosAngle
-// and the t that best approximates sinAngle
-float t = 0.5 * (tc + ts);
-return t;
-}
-
-static void
-_find_ellipse_coords(int x, int y, int w, int h, float angle, float length,
-Point* startPoint, Point *endPoint)
-{
-if (!w || !h ) {
-if (startPoint)
-startPoint->x = 0 , startPoint->y = 0;
-if (endPoint)
-endPoint->x = 0 , endPoint->y = 0;
-return;
-}
-
-int w2 = w / 2;
-int h2 = h / 2;
-
-float angles[2] = { angle, angle + length };
-Point *points[2] = { startPoint, endPoint };
-int i =0;
-  

[EGIT] [core/efl] master 03/07: emile: fix build warning of Emile_Image.

2016-05-31 Thread JunsuChoi
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=260377a376bf19935c6cd92df548650600d67b8e

commit 260377a376bf19935c6cd92df548650600d67b8e
Author: JunsuChoi 
Date:   Tue May 31 14:37:53 2016 -0700

emile: fix build warning of Emile_Image.

Summary: initialized structure 'opts_region' for uninitialized build warning

Test Plan: N/A

Reviewers: raster, woohyun, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL 
---
 src/lib/emile/emile_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/emile/emile_image.c b/src/lib/emile/emile_image.c
index c7d12b8..5bad68c 100644
--- a/src/lib/emile/emile_image.c
+++ b/src/lib/emile/emile_image.c
@@ -1614,7 +1614,7 @@ _emile_jpeg_data(Emile_Image *image,
struct
{
   unsigned int x, y, w, h;
-   } opts_region;
+   } opts_region = {0, 0, 0, 0};
volatile int degree = 0;
volatile Eina_Bool change_wh = EINA_FALSE;
Eina_Bool line_done = EINA_FALSE;

-- 




[EGIT] [core/efl] master 01/07: eina: don't access dead promise.

2016-05-31 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9bcad265a72c29506644b9740efa0bdd1dc453a2

commit 9bcad265a72c29506644b9740efa0bdd1dc453a2
Author: Cedric BAIL 
Date:   Tue May 31 14:18:48 2016 -0700

eina: don't access dead promise.

We do properly unref promise while calling all the then callback. There
is no need to check it a second time (which actually lead to a 100%
bad access).

T3759
---
 src/lib/eina/eina_promise.c | 18 +++---
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c
index 2b3f154..a39e52e 100644
--- a/src/lib/eina/eina_promise.c
+++ b/src/lib/eina/eina_promise.c
@@ -167,14 +167,14 @@ _eina_promise_then_calls(_Eina_Promise_Default_Owner* 
promise)
  {
promise->promise.then_callbacks = 
eina_inlist_remove(promise->promise.then_callbacks, EINA_INLIST_GET(callback));
if (error)
-{
-  if (callback->error_cb)
-(*callback->error_cb)(callback->data, promise->promise.error, 
>promise.vtable);
-}
+ {
+if (callback->error_cb)
+  (*callback->error_cb)(callback->data, promise->promise.error, 
>promise.vtable);
+ }
else if (callback->callback)
-{
-  (*callback->callback)(callback->data, >value[0], 
>promise.vtable);
-}
+ {
+(*callback->callback)(callback->data, >value[0], 
>promise.vtable);
+ }
free(callback);
_eina_promise_unref(>promise);
  }
@@ -327,10 +327,6 @@ _eina_promise_finish(_Eina_Promise_Default_Owner* promise)
  {
 _eina_promise_then_calls(promise);
  }
-   if(promise->promise.ref == 0)
- {
-_eina_promise_del(promise);
- }
 }
 
 static Eina_Error

-- 




[EGIT] [core/efl] master 06/07: evas: fix recalculation coordinates for pick object from scene in Evas.Canvas3d

2016-05-31 Thread Oleksandr Shcherbina
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b43a7f51879ec86d959784e898857b95c8c24ce3

commit b43a7f51879ec86d959784e898857b95c8c24ce3
Author: Oleksandr Shcherbina 
Date:   Tue May 31 14:42:11 2016 -0700

evas: fix recalculation coordinates for pick object from scene in 
Evas.Canvas3d

Summary:
We did the same for evas_canvas3d_scene_pick(see 
c850cc0d80b754be851576083eba27a72b58b9f2),
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 
---
 src/lib/evas/canvas/evas_canvas3d_scene.c | 36 ---
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.c 
b/src/lib/evas/canvas/evas_canvas3d_scene.c
index 97c67a3..8d980f3 100644
--- a/src/lib/evas/canvas/evas_canvas3d_scene.c
+++ b/src/lib/evas/canvas/evas_canvas3d_scene.c
@@ -599,6 +599,19 @@ static void _node_mesh_colors_free_cb(void *data)
if (data) free(data);
 }
 
+static inline void
+_pick_data_init(Evas_Canvas3D_Pick_Data *data, Evas_Public_Data *e, Evas_Real 
x, Evas_Real y)
+{
+   data->x  = ((x * 2.0) / ((Evas_Real)e->viewport.w)) - 1.0;
+   data->y  = Evas_Real)e->viewport.h - y - 1) * 2.0) / 
((Evas_Real)e->viewport.h)) - 1.0;
+   data->picked = EINA_FALSE;
+   data->z  = 1.0;
+   data->node   = NULL;
+   data->mesh   = NULL;
+   data->s  = 0.0;
+   data->t  = 0.0;
+}
+
 EOLIAN static Eina_Bool
 _evas_canvas3d_scene_pick(const Eo *obj, Evas_Canvas3D_Scene_Data *pd, 
Evas_Real x, Evas_Real y,
 Evas_Canvas3D_Node **node, Evas_Canvas3D_Mesh **mesh,
@@ -620,15 +633,7 @@ _evas_canvas3d_scene_pick(const Eo *obj, 
Evas_Canvas3D_Scene_Data *pd, Evas_Real
pd_parent = eo_data_scope_get(obj, EVAS_CANVAS3D_OBJECT_CLASS);
e = eo_data_scope_get(pd_parent->evas, EVAS_CANVAS_CLASS);
 
-   data.x  = ((x * 2.0) / ((Evas_Real)e->viewport.w)) - 1.0;
-   data.y  = Evas_Real)e->viewport.h - y - 1) * 2.0) / 
((Evas_Real)e->viewport.h)) - 1.0;
-   data.picked = EINA_FALSE;
-   data.z  = 1.0;
-   data.node   = NULL;
-   data.mesh   = NULL;
-   data.s  = 0.0;
-   data.t  = 0.0;
-
+   _pick_data_init(, e, x, y);
px = round(x * pd->w / e->viewport.w);
py = round((pd->h - (y * pd->h / e->viewport.h) - 1));
 
@@ -732,16 +737,13 @@ _evas_canvas3d_scene_exist(const Eo *obj, 
Evas_Canvas3D_Scene_Data *pd, Evas_Rea
Evas_Canvas3D_Pick_Data data;
Evas_Canvas3D_Node_Data *pd_camera_node;
Evas_Canvas3D_Camera_Data *pd_camera;
+   Evas_Canvas3D_Object_Data *pd_parent;
+   Evas_Public_Data *e;
 
-   data.x  = ((x * 2.0) / (Evas_Real)pd->w) - 1.0;
-   data.y  = Evas_Real)pd->h - y - 1.0) * 2.0) / ((Evas_Real)pd->h)) - 
1.0;
+   pd_parent = eo_data_scope_get(obj, EVAS_CANVAS3D_OBJECT_CLASS);
+   e = eo_data_scope_get(pd_parent->evas, EVAS_CANVAS_CLASS);
 
-   data.picked = EINA_FALSE;
-   data.z  = 1.0;
-   data.node   = NULL;
-   data.mesh   = NULL;
-   data.s  = 0.0;
-   data.t  = 0.0;
+   _pick_data_init(, e, x, y);
 
/* Update the scene graph. */
evas_canvas3d_object_update((Eo *) obj);

-- 




[EGIT] [core/efl] master 04/07: elementary: initialize single_direction as none for elm_map.

2016-05-31 Thread Sungtaek Hong
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4a6111920683281e8a8703c87a745037561a9828

commit 4a6111920683281e8a8703c87a745037561a9828
Author: Sungtaek Hong 
Date:   Tue May 31 14:38:45 2016 -0700

elementary: initialize single_direction as none for elm_map.

Summary:
 - elm_map has a scrollbale interface and it is set
   as ELM_SCROLLER_SINGLE_DIRECTION_SOFT by default.
 - elm_map can be rotated by gesture or by an API
   elm_map_rotate_set, so this single direction
   makes scroll unnatural.

Reviewers: Hermet, cedric

Subscribers: conr2d, jpeg

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

Signed-off-by: Cedric BAIL 
---
 src/lib/elementary/elm_map.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c
index 8146ad0..708154e 100644
--- a/src/lib/elementary/elm_map.c
+++ b/src/lib/elementary/elm_map.c
@@ -4069,6 +4069,7 @@ _elm_map_evas_object_smart_add(Eo *obj, Elm_Map_Data 
*priv)
elm_interface_scrollable_objects_set(obj, edje, priv->hit_rect);
elm_interface_scrollable_wheel_disabled_set(obj, EINA_TRUE);
elm_interface_scrollable_bounce_allow_set(obj, 
_elm_config->thumbscroll_bounce_enable, _elm_config->thumbscroll_bounce_enable);
+   elm_interface_scrollable_single_direction_set(obj, 
ELM_SCROLLER_SINGLE_DIRECTION_NONE);
 
evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
   _changed_size_hints_cb, obj);

-- 




[EGIT] [core/efl] master 02/07: ecore: if you don't use the value, then don't set it.

2016-05-31 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6bf9cd6ecc66a103fa90b07ae9cbe0050cdad8f0

commit 6bf9cd6ecc66a103fa90b07ae9cbe0050cdad8f0
Author: Cedric BAIL 
Date:   Tue May 31 14:19:58 2016 -0700

ecore: if you don't use the value, then don't set it.
---
 src/lib/ecore/ecore_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 0f07e1e..71d44b9 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -2857,7 +2857,7 @@ _efl_loop_args_add(Eo *obj, Efl_Loop_Data *pd 
EINA_UNUSED, int argc, const char
 
if (!args) return;
efl_loop_args_set(args, argc, argv);
-   job = efl_loop_job(obj, args);
+   job = efl_loop_job(obj, NULL);
eina_promise_then(job, _efl_loop_args_job_cb, NULL, args);
 }
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Fix config dialog image.

2016-05-31 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=a55e0d2097c3614b121bd0b85ff0fc88a6ba7e84

commit a55e0d2097c3614b121bd0b85ff0fc88a6ba7e84
Author: Stephen okra Houston 
Date:   Tue May 31 16:04:41 2016 -0500

Ephoto: Fix config dialog image.
---
 src/bin/ephoto_config.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index 98a5606..a5bda59 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -385,11 +385,11 @@ _config_about(Evas_Object *parent)
evas_object_show(box);
 
img = elm_image_add(box);
-   evas_object_size_hint_min_set(img, 75, 75);
-   elm_image_preload_disabled_set(img, EINA_TRUE);
+   evas_object_image_size_set(elm_image_object_get(img), 200, 100);
+   evas_object_size_hint_min_set(img, 200, 100);
+   evas_object_size_hint_max_set(img, 200, 100);
+   elm_image_preload_disabled_set(img, EINA_FALSE);
elm_image_file_set(img, PACKAGE_DATA_DIR "/images/ephoto.png", NULL);
-   evas_object_size_hint_weight_set(img, 0.0, 0.0);
-   evas_object_size_hint_align_set(img, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(box, img);
evas_object_show(img);
 

-- 




[EGIT] [apps/terminology] master 01/01: skip 0-width spaces. Closes T3734

2016-05-31 Thread Boris Faure
billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=7d09373c5652abeb23b3a468d4218f11c8a789b2

commit 7d09373c5652abeb23b3a468d4218f11c8a789b2
Author: Boris Faure 
Date:   Tue May 31 22:03:58 2016 +0200

skip 0-width spaces. Closes T3734
---
 src/bin/termptyops.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c
index d553ebd..252e271 100644
--- a/src/bin/termptyops.c
+++ b/src/bin/termptyops.c
@@ -171,6 +171,11 @@ termpty_text_append(Termpty *ty, const Eina_Unicode 
*codepoints, int len)
   }
 
 g = _termpty_charset_trans(codepoints[i], ty);
+/* Skip 0-width space */
+if (EINA_UNLIKELY(g == 0x200b))
+  {
+ continue;
+  }
 
 termpty_cell_codepoint_att_fill(ty, g, ty->termstate.att,
 &(cells[ty->cursor_state.cx]), 1);

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Make Ephoto's thumbnailer build on Windows.

2016-05-31 Thread Vincent Torri
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=48e39bc41b110dbcc88f0f84b180317f59a9cd6b

commit 48e39bc41b110dbcc88f0f84b180317f59a9cd6b
Author: Vincent Torri 
Date:   Tue May 31 14:55:38 2016 -0500

Ephoto: Make Ephoto's thumbnailer build on Windows.
---
 configure.ac | 15 +++
 src/bin/Makefile.am  |  8 
 src/bin/ephoto_slideshow.c   |  2 +-
 src/bin/ephoto_thumbnailer.c |  6 ++
 4 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 866b6e1..04a4e8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,17 @@ AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS(src/bin/config.h)
 
+AC_CANONICAL_HOST
+
+have_win32="no"
+case "$host_os" in
+   mingw*)
+  have_win32="yes"
+   ;;
+esac
+
+AM_CONDITIONAL([HAVE_WIN32], [test "x${have_win32}" = "xyes"])
+
 AM_INIT_AUTOMAKE(1.6 dist-xz)
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
@@ -55,6 +66,8 @@ PKG_CHECK_MODULES([EFL], [
  efreet-mime >= 1.7.0
 ])
 
+AC_CHECK_FUNCS([nice])
+
 AC_ARG_WITH([tests],
[AC_HELP_STRING([--with-tests=none|regular|coverage],
[choose testing method: regular, coverage, or none.
@@ -91,6 +104,8 @@ echo
 echo ""
 echo "$PACKAGE_NAME $PACKAGE_VERSION"
 echo ""
+echo
+echo "Host.: ${host_os}"
 echo 
 echo "Compilation..: make (or gmake)"
 echo "  CPPFLAGS...: $CPPFLAGS"
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 14fe19b..e500760 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -51,6 +51,14 @@ ephoto_thumbnail_CPPFLAGS = \
 
 ephoto_thumbnail_LDADD = @EFL_LIBS@
 
+if HAVE_WIN32
+ephoto_thumbnail_LDADD += -lws2_32
+endif
+
+if HAVE_PO
+ephoto_thumbnail_LDADD += @LTLIBINTL@
+endif
+
 ephoto_thumbnail_SOURCES = \
ephoto_thumbnailer.c \
 ephoto_ipc.c \
diff --git a/src/bin/ephoto_slideshow.c b/src/bin/ephoto_slideshow.c
index 460ec0b..24bf870 100644
--- a/src/bin/ephoto_slideshow.c
+++ b/src/bin/ephoto_slideshow.c
@@ -306,7 +306,7 @@ ephoto_slideshow_show_controls(Ephoto *ephoto)
_add_icon(ss->notify, "view-fullscreen", _("Fullscreen"), NULL);
evas_object_smart_callback_add(ss->fullscreen, "clicked", _fullscreen, ss);
ss->fullscreen_after =
-   _add_icon(ss->notify, "preferences-system", _("Settings"), NULL);
+   _add_icon(ss->notify, "preferences-other", _("Settings"), NULL);
evas_object_smart_callback_add(ss->fullscreen_after, "clicked", _settings, 
ss);
 
elm_layout_content_set(ephoto->layout, "ephoto.swallow.controls", 
ss->notify);
diff --git a/src/bin/ephoto_thumbnailer.c b/src/bin/ephoto_thumbnailer.c
index 417c332..0fe190e 100644
--- a/src/bin/ephoto_thumbnailer.c
+++ b/src/bin/ephoto_thumbnailer.c
@@ -7,6 +7,10 @@
 # include 
 #endif
 
+#ifdef _WIN32
+# include 
+#endif
+
 #define SHSH(n, v) v) << (n)) & 0x) | ((v) >> (32 - (n
 
 typedef struct _E_Thumb E_Thumb;
@@ -62,6 +66,7 @@ main(int argc,
   }
 else if (!strncmp(argv[i], "--nice=", 7))
   {
+#ifdef HAVE_NICE
  const char *val;
 
  val = argv[i] + 7;
@@ -69,6 +74,7 @@ main(int argc,
{
   if (nice(atoi(val)) < 0) perror("nice");
}
+#endif
   }
  }
 

-- 




[EGIT] [core/efl] master 01/01: ecore: remove unwanted debug messages

2016-05-31 Thread Jean Guyomarc'h
jayji pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bc0547a7056b60971fe875816c15068ed69d18a6

commit bc0547a7056b60971fe875816c15068ed69d18a6
Author: Jean Guyomarc'h 
Date:   Tue May 31 21:47:48 2016 +0200

ecore: remove unwanted debug messages

Da is making my console output ugly.
---
 src/lib/ecore/ecore_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 1a94ecd..0f07e1e 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -2902,11 +2902,9 @@ _efl_loop_job(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd 
EINA_UNUSED, const void *da
Eina_Promise_Owner *promise;
 
promise = eina_promise_default_add(sizeof (void*));
-   fprintf(stderr, "da promise: %p\n", promise);
if (!promise) return NULL;
 
j = _efl_internal_promise_new(promise, data);
-   fprintf(stderr, "da internal job: %p\n", j);
if (!j) goto on_error;
 
j->job_is = EINA_TRUE;

-- 




[EGIT] [apps/terminology] master 01/01: keys: add Shift+Home to get to the top of the backlog. Closes T3582

2016-05-31 Thread Boris Faure
billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=b7817a88b371dc1efee08a09e4276e67fdfb8713

commit b7817a88b371dc1efee08a09e4276e67fdfb8713
Author: Boris Faure 
Date:   Tue May 31 21:33:00 2016 +0200

keys: add Shift+Home to get to the top of the backlog. Closes T3582
---
 README|  1 +
 man/terminology.1 |  4 
 src/bin/config.c  |  8 ++--
 src/bin/keyin.c   | 13 +
 src/bin/termio.c  | 10 ++
 src/bin/termio.h  |  1 +
 6 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/README b/README
index f4fc574..5bdac3b 100644
--- a/README
+++ b/README
@@ -40,6 +40,7 @@ Shift+PgUp = Scroll 1 page up
 Shift+PgDn = Scroll 1 page down
 Shift+Up = Scroll 1 line up
 Shift+Down = Scroll 1 line down
+Shift+Home = Scroll to the top of the backlog
 Shift+Left = switch focus to previous terminal inside a window
 Shift+Right = switch focus to next terminal inside a window
 Shift+Insert = Paste Clipboard (ctrl+v/c) selection
diff --git a/man/terminology.1 b/man/terminology.1
index 374926b..8923075 100644
--- a/man/terminology.1
+++ b/man/terminology.1
@@ -196,6 +196,10 @@ Scroll terminology one line up
 Scroll terminology one line down
 .
 .TP
+.B Shift+Home
+Scroll terminology to the top of the backlog
+.
+.TP
 .B Shift+Left
 Switch focus to previous terminal inside a window when using splits, or the
 previous tab.
diff --git a/src/bin/config.c b/src/bin/config.c
index d2c3894..fabfbe4 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -7,7 +7,7 @@
 #include "col.h"
 #include "utils.h"
 
-#define CONF_VER 12
+#define CONF_VER 13
 
 #define LIM(v, min, max) {if (v >= max) v = max; else if (v <= min) v = min;}
 
@@ -364,6 +364,7 @@ _add_default_keys(Config *config)
ADD_KB("KP_Divide", 0, 0, 1, 0, "copy_clipboard");
ADD_KB("Left", 0, 0, 1, 0, "term_prev");
ADD_KB("Right", 0, 0, 1, 0, "term_next");
+   ADD_KB("Home", 0, 0, 1, 0, "top_backlog");
 }
 
 void
@@ -603,7 +604,10 @@ config_load(const char *key)
   _add_key(config, "Left", 0, 0, 1, 0, "term_prev");
   _add_key(config, "Right", 0, 0, 1, 0, "term_next");
   /*pass through*/
-case CONF_VER: /* 12 */
+case 12:
+  _add_key(config, "Home", 0, 0, 1, 0, "top_backlog");
+  /*pass through*/
+case CONF_VER: /* 13 */
   config->version = CONF_VER;
   break;
 default:
diff --git a/src/bin/keyin.c b/src/bin/keyin.c
index d2b62fc..e50be51 100644
--- a/src/bin/keyin.c
+++ b/src/bin/keyin.c
@@ -603,6 +603,18 @@ cb_scroll_down_line(Evas_Object *termio_obj)
return EINA_TRUE;
 }
 
+static Eina_Bool
+cb_scroll_top_backlog(Evas_Object *termio_obj)
+{
+   Termpty *ty = termio_pty_get(termio_obj);
+
+   if (!ty || ty->altbuf)
+ return EINA_FALSE;
+
+   termio_scroll_top_backlog(termio_obj);
+   return EINA_TRUE;
+}
+
 
 static Shortcut_Action _actions[] =
 {
@@ -611,6 +623,7 @@ static Shortcut_Action _actions[] =
  {"one_page_down", gettext_noop("Scroll one page down"), 
cb_scroll_down_page},
  {"one_line_up", gettext_noop("Scroll one line up"), cb_scroll_up_line},
  {"one_line_down", gettext_noop("Scroll one line down"), 
cb_scroll_down_line},
+ {"top_backlog", gettext_noop("Go to the top of the backlog"), 
cb_scroll_top_backlog},
 
  {"group", gettext_noop("Copy/Paste"), NULL},
  {"copy_primary", gettext_noop("Copy selection to Primary buffer"), 
cb_copy_primary},
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 77100bc..9ec1444 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -342,6 +342,16 @@ termio_scroll_set(Evas_Object *obj, int scroll)
_smart_apply(obj);
 }
 
+void
+termio_scroll_top_backlog(Evas_Object *obj)
+{
+   Termio *sd = evas_object_smart_data_get(obj);
+   EINA_SAFETY_ON_NULL_RETURN(sd);
+   sd->scroll = INT32_MAX;
+   _remove_links(sd, obj);
+   _smart_apply(obj);
+}
+
 const char *
 termio_title_get(Evas_Object *obj)
 {
diff --git a/src/bin/termio.h b/src/bin/termio.h
index 3b660e9..0567de6 100644
--- a/src/bin/termio.h
+++ b/src/bin/termio.h
@@ -14,6 +14,7 @@ char*termio_selection_get(Evas_Object *obj,
   int c1x, int c1y, int c2x, int c2y,
   size_t *len, Eina_Bool right_trim);
 Eina_Booltermio_selection_exists(const Evas_Object *obj);
+void termio_scroll_top_backlog(Evas_Object *obj);
 void termio_scroll_delta(Evas_Object *obj, int delta, int by_page);
 void termio_scroll_set(Evas_Object *obj, int scroll);
 void termio_scroll(Evas_Object *obj, int direction, int start_y, int end_y);

-- 




Re: [E-devel] What is still pending for 1.18 before the freeze starts

2016-05-31 Thread Cedric BAIL
Hello,

Just back from hollidays and playing catch up !

On Fri, May 27, 2016 at 6:01 AM, Stefan Schmidt  wrote:
> What do you have in your local queue for 1.18?

A lot !

> The freeze starts in 10 days and I would like to get an overview on what
> is still to expect.
>
> o The merge of evas generic loaders and emotion generic players is
> pending build system integration and merging as far as I can see

Yep, on it starting today (along with also elm code as a beta widget).

> o On the interface side I lost track. What is still missing here?
> Cedric, JP, etc can you update?

I am working on merging the URI manager this week and later the
asynchronous file opening interface. Next on my personnal todo is to
finish the new EFL_MAIN interface.

I have not catched up on everything yet, but from what I have seen so far :
  - genlist replacement design is mostly settled down, but no code in yet.
  - their are some text interface showing up in phab, but not sure it is enough.
  - cleanup of the focus api

This are mandatory for the release. I will likely help Marcel on the
focus side as I think we may be able to land the right interface in
time thanks to his help.

There is also plenty of review to be done. Not sure when to tackle
those as they may result in large code change if they aren't correct.

> o Any more EO changes coming or is it all done now? Tom?
> o Are there more Wayland changes to expect before 1.18 closes? Chris,
> Mike Derek?
> o Anything else?

There is also the need to cleanup eo annotation. Hopefully Daniel,
q66, will go at it. This is the last mandatory bit to make a C++
official release.
-- 
Cedric BAIL

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: ecore-con: print win32 svr->path on pipe creation failure

2016-05-31 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b7dc576ec846120ace00bc1e89907072d3e38063

commit b7dc576ec846120ace00bc1e89907072d3e38063
Author: Mike Blumenkrantz 
Date:   Tue May 31 14:03:48 2016 -0400

ecore-con: print win32 svr->path on pipe creation failure

ref T3758
---
 src/lib/ecore_con/ecore_con_local_win32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_con/ecore_con_local_win32.c 
b/src/lib/ecore_con/ecore_con_local_win32.c
index 1c70a41..8814a86 100644
--- a/src/lib/ecore_con/ecore_con_local_win32.c
+++ b/src/lib/ecore_con/ecore_con_local_win32.c
@@ -432,7 +432,7 @@ ecore_con_local_listen(Ecore_Con_Server *obj)
NULL);
if (svr->pipe == INVALID_HANDLE_VALUE)
  {
-ERR("Creation of the named pipe failed");
+ERR("Creation of the named pipe '%s' failed", svr->path);
 goto free_path;
  }
 

-- 




Re: [E-devel] Elm is broken and can't revert due to Efl.part

2016-05-31 Thread Stephen Houston
It is still broken, and it is a lot more than just "hover".

http://pastebin.ca/3614443

http://pastebin.ca/3614491

http://pastebin.ca/3614493

And this is just what I've found so far.  It really feels like these
changes were not tested before they were committed, and they are big
changes, so that is a shame.  They are very easily reproduced, and would
have been seen easily by testing.  If there weren't already so many changes
on top of the efl part commit that prevent reverting, I would recommend a
revert.  It is has messed up quite a lot.

Not harping on you too bad jpeg.  I know you are working hard and stuff
happens.  Hopefully you can get to this pretty soon.

On Sun, May 29, 2016 at 9:18 PM Jean-Philippe André 
wrote:

> "Broke elm" --> "broke elm_hover", please.
>
> This should be fixed now, but I admit there's something fishy about the
> efl_part object inheritance.
> See c59d222f6da28442bc9213bd6ec42590494e67de.
>
> On 28 May 2016 at 04:26, Davide Andreoli  wrote:
>
> > I can confirm this daily breakage, easy to reproduce on each elm_test
> that
> > use hover
> >
> > 2016-05-27 19:44 GMT+02:00 Stephen Houston :
> >
> > > https://phab.enlightenment.org/T3704
> > >
> > > On Fri, May 27, 2016 at 12:06 PM, Mike Blumenkrantz <
> > > michael.blumenkra...@gmail.com> wrote:
> > >
> > > > It would probably be helpful if you could provide more info about
> this
> > as
> > > > well as creating a tracking ticket.
> > > >
> > > > On Fri, May 27, 2016 at 1:01 PM Stephen Houston <
> smhousto...@gmail.com
> > >
> > > > wrote:
> > > >
> > > > > FYI Efl.Part broke elm and it can't be reverted.
> > > > >
> > > > >
> > > >
> > >
> >
> --
> > > > > What NetFlow Analyzer can do for you? Monitors network bandwidth
> and
> > > > > traffic
> > > > > patterns at an interface-level. Reveals which users, apps, and
> > > protocols
> > > > > are
> > > > > consuming the most bandwidth. Provides multi-vendor support for
> > > NetFlow,
> > > > > J-Flow, sFlow and other flows. Make informed decisions using
> capacity
> > > > > planning reports.
> > > > https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> > > > > ___
> > > > > enlightenment-devel mailing list
> > > > > enlightenment-devel@lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > > >
> > > >
> > > >
> > >
> >
> --
> > > > What NetFlow Analyzer can do for you? Monitors network bandwidth and
> > > > traffic
> > > > patterns at an interface-level. Reveals which users, apps, and
> > protocols
> > > > are
> > > > consuming the most bandwidth. Provides multi-vendor support for
> > NetFlow,
> > > > J-Flow, sFlow and other flows. Make informed decisions using capacity
> > > > planning reports.
> > > https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> > > > ___
> > > > enlightenment-devel mailing list
> > > > enlightenment-devel@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > >
> > >
> > >
> >
> --
> > > What NetFlow Analyzer can do for you? Monitors network bandwidth and
> > > traffic
> > > patterns at an interface-level. Reveals which users, apps, and
> protocols
> > > are
> > > consuming the most bandwidth. Provides multi-vendor support for
> NetFlow,
> > > J-Flow, sFlow and other flows. Make informed decisions using capacity
> > > planning reports.
> > https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> > > ___
> > > enlightenment-devel mailing list
> > > enlightenment-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > >
> >
> >
> --
> > What NetFlow Analyzer can do for you? Monitors network bandwidth and
> > traffic
> > patterns at an interface-level. Reveals which users, apps, and protocols
> > are
> > consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> > J-Flow, sFlow and other flows. Make informed decisions using capacity
> > planning reports.
> https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> >
>
>
> --
> Jean-Philippe André
>
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> 

[EGIT] [apps/ephoto] master 01/01: Ephoto: If Ephoto is opened with a directory that does not contain images, show the directory overlay.

2016-05-31 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=737fb734a2d0567e41a8953c3718b34f40fd1230

commit 737fb734a2d0567e41a8953c3718b34f40fd1230
Author: Stephen okra Houston 
Date:   Tue May 31 11:48:40 2016 -0500

Ephoto: If Ephoto is opened with a directory that does not contain images, 
show the directory overlay.
---
 src/bin/ephoto_main.c  |  3 +++
 src/bin/ephoto_thumb_browser.c | 12 ++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 8121d6d..51fd8d9 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -223,6 +223,9 @@ _mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
Evas_Object *but = evas_object_data_get(ephoto->layout, "folder_button");
Evas_Coord x, y, w, h, bx, by, bw, bh, cx, cy;
 
+   if (eina_list_count(ephoto->entries) < 1)
+ return;
+
evas_pointer_canvas_xy_get(evas_object_evas_get(ephoto->dir_browser), , 
);
evas_object_geometry_get(ephoto->dir_browser, , , , );
evas_object_geometry_get(but, , , , );
diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 630a4b3..5a381a5 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -914,8 +914,12 @@ ephoto_thumb_browser_update_info_label(Ephoto *ephoto)
 
if (!tb->totimages)
  {
-elm_object_text_set(tb->nolabel,
-_("No images matched your search"));
+if (tb->searching)
+  elm_object_text_set(tb->nolabel,
+  _("No images matched your search"));
+else
+  elm_object_text_set(tb->nolabel,
+  _("There are no images in this directory"));
 snprintf(buf, PATH_MAX, "%s: 0 %s%s: 0%s",
 _("Total"), ngettext("image", "images", 0), _("Size"),
 ngettext("B", "B", 0));
@@ -1384,6 +1388,10 @@ _ephoto_thumb_populate_end(void *data, int type 
EINA_UNUSED,
   }
  }
tb->entries = tb->ephoto->entries;
+   if (eina_list_count(tb->entries) < 1)
+ {
+ephoto_show_folders(tb->ephoto, EINA_FALSE);
+ }
tb->dirs_only = 0;
tb->thumbs_only = 0;
 

-- 




[EGIT] [core/enlightenment] master 01/01: handle shaded state when receiving x11 configure requests

2016-05-31 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=859b1b989f40a90698d9818bbedfb2bfda731a65

commit 859b1b989f40a90698d9818bbedfb2bfda731a65
Author: Mike Blumenkrantz 
Date:   Tue May 31 12:31:50 2016 -0400

handle shaded state when receiving x11 configure requests

previously this would resize the window without unshading it, leading to
a confusing state for the window and the user
---
 src/bin/e_comp_x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 7ad33ad..288d885 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -1749,7 +1749,7 @@ _e_comp_x_configure_request(void *data  EINA_UNUSED, int 
type EINA_UNUSED, Ecore
 
if (resize && (!ec->lock_client_size) && (move || ((!ec->maximized) && 
(!ec->fullscreen
  {
-if ((ec->maximized & E_MAXIMIZE_TYPE) != E_MAXIMIZE_NONE)
+if (ec->shaded || ((ec->maximized & E_MAXIMIZE_TYPE) != 
E_MAXIMIZE_NONE))
   e_comp_object_frame_wh_unadjust(ec->frame, w, h, >saved.w, 
>saved.h);
 else if (!ec->maximize_override)
   {

-- 




[EGIT] [core/enlightenment] master 01/02: delete x11 mouse-in job when hiding the job's client

2016-05-31 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=1fef7d04dc42b8bf9672bd6bad617d95a5eb

commit 1fef7d04dc42b8bf9672bd6bad617d95a5eb
Author: Mike Blumenkrantz 
Date:   Tue May 31 12:21:09 2016 -0400

delete x11 mouse-in job when hiding the job's client

spurious x11 mouse events will be received when activating a mouse binding 
which
flips the active desk

fix T3716
---
 src/bin/e_comp_x.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 24e305b..7ad33ad 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -1083,6 +1083,12 @@ _e_comp_x_evas_hide_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UN
E_Client *ec = data, *tmp;
Eina_List *l;
 
+   if (ec == mouse_client)
+ {
+mouse_client = NULL;
+E_FREE_FUNC(mouse_in_job, ecore_job_del);
+ }
+
if (!_e_comp_x_client_data_get(ec)) return; // already deleted, happens 
with internal wins
_e_comp_x_client_hide(ec);
 

-- 




[EGIT] [core/enlightenment] master 02/02: use current zone when activating a client's menu with the mouse

2016-05-31 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=68c93a1adfb296687513d3258abc9e6caf8500e8

commit 68c93a1adfb296687513d3258abc9e6caf8500e8
Author: Mike Blumenkrantz 
Date:   Tue May 31 12:23:50 2016 -0400

use current zone when activating a client's menu with the mouse

the mouse defines position of a mouse-activated menu

fix T3701
---
 src/bin/e_int_client_menu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/e_int_client_menu.c b/src/bin/e_int_client_menu.c
index 637bd7b..e8625ca 100644
--- a/src/bin/e_int_client_menu.c
+++ b/src/bin/e_int_client_menu.c
@@ -259,7 +259,7 @@ e_int_client_menu_show(E_Client *ec, Evas_Coord x, 
Evas_Coord y, int key, unsign
  e_menu_activate_key(ec->border_menu, ec->zone, x, y, 1, 1,
  E_MENU_POP_DIRECTION_DOWN);
else
- e_menu_activate_mouse(ec->border_menu, ec->zone, x, y, 1, 1,
+ e_menu_activate_mouse(ec->border_menu, e_zone_current_get(), x, y, 1, 1,
E_MENU_POP_DIRECTION_DOWN, timestamp);
 }
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Fix direcotry initialization hierarchy.

2016-05-31 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=d885da2419d775a05379d28ab933adf28f8755a0

commit d885da2419d775a05379d28ab933adf28f8755a0
Author: Stephen okra Houston 
Date:   Tue May 31 10:44:00 2016 -0500

Ephoto: Fix direcotry initialization hierarchy.
---
 src/bin/ephoto_directory_browser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/ephoto_directory_browser.c 
b/src/bin/ephoto_directory_browser.c
index 4f5cedb..0552a40 100644
--- a/src/bin/ephoto_directory_browser.c
+++ b/src/bin/ephoto_directory_browser.c
@@ -1087,9 +1087,9 @@ ephoto_directory_browser_initialize_structure(Ephoto 
*ephoto)
 const char *n = eina_list_data_get(eina_list_next(l));
 
 it = eina_file_direct_ls(dir);
- EINA_ITERATOR_FOREACH(it, finfo)
+cur = next; 
+EINA_ITERATOR_FOREACH(it, finfo)
   {
- cur = next;
  if (finfo->type == EINA_FILE_DIR && 
  strncmp(finfo->path + finfo->name_start, ".", 1))
{

-- 




[EGIT] [core/enlightenment] master 01/01: just a small patch to make sure evry_hide does not get called synchronously from an Evry_Action

2016-05-31 Thread Hannes Janetzek
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=b3561d764123bd842e55c7c362b7c82c84bb5139

commit b3561d764123bd842e55c7c362b7c82c84bb5139
Author: Hannes Janetzek 
Date:   Tue May 31 11:41:33 2016 -0400

just a small patch to make sure evry_hide does not get called synchronously 
from an Evry_Action
---
 src/modules/everything/evry.c | 22 +++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/modules/everything/evry.c b/src/modules/everything/evry.c
index ff7b000..9dab641 100644
--- a/src/modules/everything/evry.c
+++ b/src/modules/everything/evry.c
@@ -71,6 +71,7 @@ static Eina_Bool  _evry_cb_selection_notify(void *data, 
int type, void *even
 static Eina_Bool  _evry_cb_mouse(void *data, int type, void *event);
 
 static Eina_Bool  _evry_delay_hide_timer(void *data);
+static Eina_Bool  _evry_focus_out_timer(void *data);
 
 static Eina_List *windows = NULL;
 
@@ -151,17 +152,32 @@ _evry_cb_item_changed(EINA_UNUSED void *data, EINA_UNUSED 
int type, void *event)
return ECORE_CALLBACK_PASS_ON;
 }
 
-static void
-_evry_focus_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA_UNUSED)
+static Eina_Bool
+_evry_focus_out_timer(void *data)
 {
Evry_Window *win = data;
E_Client *ec;
 
-   if (!win->grab) return;
+   win->delay_hide_action = NULL;
 
ec = e_win_client_get(win->ewin);
if (ec && (!e_object_is_del(E_OBJECT(ec
  evry_hide(win, 0);
+
+   return ECORE_CALLBACK_CANCEL;
+}
+
+static void
+_evry_focus_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA_UNUSED)
+{
+   Evry_Window *win = data;
+
+   if (!win->grab) return;
+
+   if (win->delay_hide_action)
+ ecore_timer_del(win->delay_hide_action);
+
+   win->delay_hide_action = ecore_timer_add(0.0, _evry_focus_out_timer, win);
 }
 
 Evry_Window *

-- 




Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread Cedric BAIL
On May 31, 2016 5:52 AM, "Conrad Um"  wrote:
>
> At first, I also considered making color as Eo class, but isn't it too
> expensive? so as the next best, suggested using data structure and inline
> functions. (I don't know how inline functions can be provided  in
bindings)

Completely agree on this. Color is on the hot path, we can't use any object
there. The next best thing being a structure. Potentially, we can have a
color interface that provide helper to convert color and pass it
automatically to color premul set. The only issue with that is that we
can't support additional color without using efl_part (this could impact
text, but we have no API for it yet, so don't know). It is also going to
impact vector graphics because of stroke, but maybe in that case we could
have always two object and the performance problem shouldn't be an issue
anymore.

> If there is a rule that which color (premul or non-premul) Efl.Gfx.Color
> will use, we can provide setters and getters with various type of color.

It can only be premul.

Cedric

> For example, we can make setters passing premul rgba, non-premul rgba, hsv
> colors (they will be converted to predetermined color type), and any APIs
> passing Efl.Gfx.Color can convert it into what they need.
> (evas_object_color_set() will convert color to premul,
> edje_object_color_class_set() will convert color to non-premul etc.)
>
> Or, making color as Eo class seems good to me if there isn't noticeable
> performance degradation. As JP mentioned, color class can provide string
> lookup (like "red", "silver") or HTML notation. ("#FF")
>
> BTW, you might not know this, because I didn't update the doc. EDC syntax
> allows HTML notation.
> rect { "red_rect"
>desc { "default"
>   color: "#FF";
>}
> }
>
> conr2d (Jee-Yong Um)
> On May 31, 2016 7:05 PM, "Jean-Philippe André"  wrote:
>
> On 31 May 2016 at 17:34, Carsten Haitzler  wrote:
>
> > On Tue, 31 May 2016 16:49:38 +0930 Simon Lees  said:
> >
> > >
> > >
> > > On 05/31/2016 04:32 PM, Carsten Haitzler (The Rasterman) wrote:
> > > > On Tue, 31 May 2016 06:38:52 + Andrew Williams <
> > a...@andywilliams.me>
> > > > said:
> > > >
> > > >> Not to be picky but Java is not rgba by default - it prefers Color
> > too,
> > > >> some r g b a helper methods exist. It additionally provides many
> > standard
> > > >> Color definitions for "system" colours... (As well as convenience
> > such as
> > > >> Color.BLACK)
> > > >
> > > > as i said, it's an object (well a color class you create color
> > objects). :)
> > > >
> > > > public class Color
> > > > extends Object
> > > >
> > > > :) there are different constructors that use polymorphism:
> > > >
> > > > Color(float r, float g, float b)
> > > > Color(float r, float g, float b, float a)
> > > > Color(int rgb)
> > > > Color(int rgba, boolean hasalpha)
> > > > Color(int r, int g, int b)
> > > > Color(int r, int g, int b, int a)
> > > >
> > > > the separate r, g, b, a is pretty common in api's. that's what i was
> > saying.
> > > >
> > >
> > > For what its worth Qt passes a color "class" generally but normally
> > > you'd write either setColor(255,0,0,255); or setColor("#FF00");
and
> > > let the language magic automatically turn that into a class, but
> > > whenever specifying in html notation rather then rgba, its always done
> > > as a string, I don't recall seeing a api anywhere that stores rgba in
> > > one int.
> >
> > that's actually the
> >   Color(int rgba, boolean hasalpha)
> > and
> >   Color(int rgb)
> >
> > that passes color as an int around. all pixels in an image are "unsigned
> > ints"
> > with color in them.
> > 
> >
>
> Efl.Gfx.Color is already defined since 1.17 as a struct, containing R, G,
> B, A as shorts, not chars. That was done in order to allow for 16-bit
> precision per channel, in the future. But note that Efl.Gfx.Color is still
> behind the BETA #ifdef
>
> A short lived eo object could actually make sense, like efl_part. If
> color_set() owns the Color object then it can just read its value and
unref
> it.
> Then we could do just like Qt and provide lots of color "conversion"
> functions (hex, html name, rgba 32 bit...)
>
> But even if we provide this as an API we will need an easy way in C to set
> a color from R,G,B,A (4 ints). Be it a macro or another method.
>
> --
> Jean-Philippe André
>
--
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> ___

[EGIT] [apps/ephoto] master 01/01: Ephoto: Don't dismiss menus as that causes a crash. Make Ephoto's thumbnailer portable to Windows.

2016-05-31 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=fae7a5e26cf44b7cd44135ec2f4ef1019e2e25ee

commit fae7a5e26cf44b7cd44135ec2f4ef1019e2e25ee
Author: Stephen okra Houston 
Date:   Tue May 31 10:11:05 2016 -0500

Ephoto: Don't dismiss menus as that causes a crash.  Make Ephoto's 
thumbnailer portable to Windows.
---
 src/bin/ephoto_directory_browser.c | 13 +
 src/bin/ephoto_ipc.c   | 31 +++
 src/bin/ephoto_single_browser.c|  8 
 src/bin/ephoto_thumb_browser.c | 10 +-
 4 files changed, 21 insertions(+), 41 deletions(-)

diff --git a/src/bin/ephoto_directory_browser.c 
b/src/bin/ephoto_directory_browser.c
index 20fca24..4f5cedb 100644
--- a/src/bin/ephoto_directory_browser.c
+++ b/src/bin/ephoto_directory_browser.c
@@ -47,7 +47,7 @@ static void _fsel_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
 Evas_Object *obj EINA_UNUSED, void *event_info);
 
 /*File Pane Callbacks*/
-static void
+/*static void
 _menu_dismissed_cb(void *data, Evas_Object *obj,
 void *event_info EINA_UNUSED)
 {
@@ -56,7 +56,7 @@ _menu_dismissed_cb(void *data, Evas_Object *obj,
db->ephoto->menu_blocking = EINA_FALSE;
evas_object_del(obj);
elm_object_focus_set(db->main, EINA_TRUE);
-}
+}*/
 
 static void
 _menu_empty_cb(void *data, Evas_Object *obj EINA_UNUSED,
@@ -446,7 +446,6 @@ _dir_go_trash(void *data, Evas_Object *obj EINA_UNUSED,
evas_object_show(but);
 
db->fsel = elm_genlist_add(db->leftbox);
-   elm_genlist_homogeneous_set(db->fsel, EINA_FALSE);
elm_genlist_select_mode_set(db->fsel, ELM_OBJECT_SELECT_MODE_ALWAYS);
evas_object_size_hint_weight_set(db->fsel, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
@@ -649,8 +648,8 @@ _fsel_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
 menu_it = elm_menu_item_add(menu, NULL, "user-trash", _("Trash"),
 _dir_go_trash, db);
  }
-   evas_object_smart_callback_add(menu, "dismissed", _menu_dismissed_cb,
-db);
+   /*evas_object_smart_callback_add(menu, "dismissed", _menu_dismissed_cb,
+db);*/
evas_object_show(menu);
 }
 
@@ -676,9 +675,7 @@ _ephoto_directory_view_add(Ephoto_Directory_Browser *db)
evas_object_show(db->leftbox);
 
db->fsel = elm_genlist_add(db->leftbox);
-   elm_genlist_homogeneous_set(db->fsel, EINA_FALSE);
-   elm_genlist_select_mode_set(db->fsel, ELM_OBJECT_SELECT_MODE_ALWAYS);
-   evas_object_size_hint_weight_set(db->fsel, EVAS_HINT_EXPAND,
+   elm_genlist_select_mode_set(db->fsel, ELM_OBJECT_SELECT_MODE_ALWAYS); 
evas_object_size_hint_weight_set(db->fsel, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(db->fsel, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_smart_callback_add(db->fsel, "expand,request",
diff --git a/src/bin/ephoto_ipc.c b/src/bin/ephoto_ipc.c
index df243ca..361ff29 100644
--- a/src/bin/ephoto_ipc.c
+++ b/src/bin/ephoto_ipc.c
@@ -17,23 +17,20 @@ static Ecore_Ipc_Server *_e_ipc_server = NULL;
 int
 e_ipc_init(void)
 {
-   char buf[4096], buf2[128], buf3[4096];
-   char *tmp, *user, *base;
+   char buf[4096], buf3[4096];
+   const char *tmp, *user, *base;
int pid, trynum = 0, id1 = 0;
-   struct stat st;
 
-   tmp = getenv("TMPDIR");
+   tmp = eina_environment_tmp_get();
if (!tmp) tmp = "/tmp";
base = tmp;
 
tmp = getenv("XDG_RUNTIME_DIR");
if (tmp)
  {
-if (stat(tmp, ) == 0)
+if (ecore_file_exists(tmp))
   {
- if ((st.st_uid == getuid()) &&
- ((st.st_mode & (S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)) ==
-  (S_IRWXU | S_IFDIR)))
+ if (ecore_file_is_dir(tmp) && ecore_file_can_write(tmp))
base = tmp;
  else
ERR("XDG_RUNTIME_DIR of '%s' failed permissions check", tmp);
@@ -45,11 +42,9 @@ e_ipc_init(void)
tmp = getenv("SD_USER_SOCKETS_DIR");
if (tmp)
  {
-if (stat(tmp, ) == 0)
+if (ecore_file_exists(tmp))
   {
- if ((st.st_uid == getuid()) &&
- ((st.st_mode & (S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)) ==
-  (S_IRWXU | S_IFDIR)))
+ if (ecore_file_is_dir(tmp) && ecore_file_can_write(tmp))
base = tmp;
  else
ERR("SD_USER_SOCKETS_DIR of '%s' failed permissions check", 
tmp);
@@ -59,18 +54,6 @@ e_ipc_init(void)
  }
 
user = getenv("USER");
-   if (!user)
- {
-int uidint;
-
-user = "__unknown__";
-uidint = getuid();
-if (uidint >= 0)
-  {
- snprintf(buf2, sizeof(buf2), "%i", uidint);
- user = buf2;
-  }
- }
 
setenv("EPHOTO_IPC_SOCKET", "", 1);
 
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 1af2842..66f66af 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -150,7 

Re: [E-devel] eina promise.... confusing

2016-05-31 Thread Felipe Magno de Almeida
On Tue, May 31, 2016 at 10:15 AM, Cedric BAIL  wrote:
> On May 30, 2016 22:51, "Carsten Haitzler"  wrote:
>>
>> the api for promises seems pretty confusing. just look at this:
>>
>>   job = efl_loop_job(obj, args);
>>eina_promise_then(job, _efl_loop_args_job_cb, NULL, args);
>>
>> why do i need to pass in args... TWICE? well ok - this specific way of
> using
>> promises for jobs... both promises in efl_loop.eo do this, and it's
> confusing.
>> the void *data when creating the job (first args) is not used at all. the
> data
>> for the promise is passed as data to the promise callback.
>>
>> why do this? value isn't used here in the promise -actually it's the
> promise
>> ptr itself for whatever reason.
>
> They are both different. A promise deliver a value at some point in the
> future to multiple callback couple. The data you give when creating the
> promise is the one delivered in the future. The one you pass with your
> couple of callbacks is obviously tied to that couple of callback. They are
> clearly 2 different things. Obviously you don't need to pass any data at
> all in both case.

Though I think cedric's idea is a good one, because it reuses the
eina promise value for something that could be useful, I think the
use of void* in the eolian API is not good. I don't know how to
resolve this conflict except by removing the void* and have
the promise be of type promise without any value.

If there were "template" methods in Eolian this would be completely
clean, but unfortunately we don't.

> Cedric
>
>> why?

Regards,
-- 
Felipe Magno de Almeida

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/02: ecore-evas-drm: Disable direct input callback

2016-05-31 Thread Chris Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e01ac62e5f36614e3a5195105f28bf5d9b05be08

commit e01ac62e5f36614e3a5195105f28bf5d9b05be08
Author: Chris Michael 
Date:   Tue May 31 09:49:43 2016 -0400

ecore-evas-drm: Disable direct input callback

For ecore_evas drm engine(s), disable setting of
ecore_event_window_direct_callback as this Completely Breaks all input
when running Enlightenment Wayland.

NB: This can likely be re-enabled at some point, when the jpeg
breakage is over ;)

@fix

Signed-off-by: Chris Michael 
---
 src/modules/ecore_evas/engines/drm/ecore_evas_drm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c 
b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index 68ebc5a..e396423 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -770,7 +770,7 @@ ecore_evas_drm_new_internal(const char *device, unsigned 
int parent EINA_UNUSED,

(Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,

(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,

(Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
-   _ecore_event_window_direct_cb_set(ee->prop.window, 
_ecore_evas_input_direct_cb);
+   /* _ecore_event_window_direct_cb_set(ee->prop.window, 
_ecore_evas_input_direct_cb); */
 
ecore_drm2_output_crtc_size_get(edata->output, , );
 
@@ -906,7 +906,7 @@ ecore_evas_gl_drm_new_internal(const char *device, unsigned 
int parent EINA_UNUS

(Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,

(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,

(Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
-   _ecore_event_window_direct_cb_set(ee->prop.window, 
_ecore_evas_input_direct_cb);
+   /* _ecore_event_window_direct_cb_set(ee->prop.window, 
_ecore_evas_input_direct_cb); */
 
ecore_drm2_output_crtc_size_get(edata->output, , );
 

-- 




[EGIT] [core/efl] master 02/02: ecore-drm: Deprecate Ecore_Drm library

2016-05-31 Thread Chris Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=af22796356a62b56dca47712e29dd88d87bd722c

commit af22796356a62b56dca47712e29dd88d87bd722c
Author: Chris Michael 
Date:   Tue May 31 10:04:17 2016 -0400

ecore-drm: Deprecate Ecore_Drm library

Small patch to deprecate Ecore_Drm. This patch also adds a configure
option to enable ecore_drm for older code. This option is disabled by
default, so must be explicitly specified during build.

Signed-off-by: Chris Michael 
---
 configure.ac  | 17 +++--
 src/lib/ecore_drm/Ecore_Drm.h |  2 ++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 07e7ec4..3eef79c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1651,6 +1651,17 @@ AC_ARG_ENABLE([ecore_wayland],
],
[want_ecore_wayland="no"])
 
+AC_ARG_ENABLE([ecore_drm],
+   [AS_HELP_STRING([--enable-ecore-drm],[enable legacy Ecore_Drm support. 
@<:@default=disabled@:>@])],
+   [
+if test "x${enableval}" = "xyes" ; then
+   want_ecore_drm="yes"
+else
+   want_ecore_drm="no"
+fi
+   ],
+   [want_ecore_drm="no"])
+
 ### Default values
 
 if test "${have_windows}" = "yes"; then
@@ -2098,7 +2109,7 @@ AC_ARG_ENABLE([drm],
   fi
   want_drm="yes"
 else
-   want_drm="no"
+  want_drm="no"
 fi
],
[want_drm="no"])
@@ -3511,7 +3522,7 @@ AM_CONDITIONAL([HAVE_EEZE_TIZEN], [test "x${want_tizen}" 
= "xyes"])
 
  Ecore_Drm
 have_libinput_new="no"
-EFL_LIB_START_OPTIONAL([Ecore_Drm], [test "${want_drm}" = "yes"])
+EFL_LIB_START_OPTIONAL([Ecore_Drm], [test "${want_ecore_drm}" = "yes"])
 
 ### Additional options to configure
 SUID_CFLAGS=-fPIE
@@ -5796,6 +5807,8 @@ echo "Ecore_File..: yes"
 echo "Ecore_IMF...: yes (${features_ecore_imf})"
 echo "Ecore_X.: ${with_x11} (${features_ecore_x})"
 echo "Ecore_SDL...: $want_sdl"
+echo "Ecore_Drm...: $want_ecore_drm"
+echo "Ecore_Drm2..: $want_drm"
 echo "Ecore_Wayland...: $want_ecore_wayland"
 echo "Ecore_Wl2...: $want_wayland"
 echo "IVI-Shell...: $want_wayland_ivi_shell"
diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h
index a1a1317..62717e5 100644
--- a/src/lib/ecore_drm/Ecore_Drm.h
+++ b/src/lib/ecore_drm/Ecore_Drm.h
@@ -30,6 +30,8 @@
 #  endif // ifdef __GNUC__
 # endif // ifdef _MSC_VER
 
+# warning The Ecore_Drm library has been deprecated. Please use the Ecore_Drm2 
library
+
 # ifdef __cplusplus
 extern "C" {
 # endif

-- 




[EGIT] [core/efl] master 01/01: ecore-evas-drm: Register direct input callback for gl_drm also

2016-05-31 Thread Chris Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1ca1f8b06def49fed9a513fae24162ed2d715d82

commit 1ca1f8b06def49fed9a513fae24162ed2d715d82
Author: Chris Michael 
Date:   Tue May 31 09:23:20 2016 -0400

ecore-evas-drm: Register direct input callback for gl_drm also

@fix

Signed-off-by: Chris Michael 
---
 src/modules/ecore_evas/engines/drm/ecore_evas_drm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c 
b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index 6c60cd7..68ebc5a 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -906,6 +906,7 @@ ecore_evas_gl_drm_new_internal(const char *device, unsigned 
int parent EINA_UNUS

(Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,

(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,

(Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
+   _ecore_event_window_direct_cb_set(ee->prop.window, 
_ecore_evas_input_direct_cb);
 
ecore_drm2_output_crtc_size_get(edata->output, , );
 

-- 




Re: [E-devel] eina promise.... confusing

2016-05-31 Thread Cedric BAIL
On May 30, 2016 22:51, "Carsten Haitzler"  wrote:
>
> the api for promises seems pretty confusing. just look at this:
>
>   job = efl_loop_job(obj, args);
>eina_promise_then(job, _efl_loop_args_job_cb, NULL, args);
>
> why do i need to pass in args... TWICE? well ok - this specific way of
using
> promises for jobs... both promises in efl_loop.eo do this, and it's
confusing.
> the void *data when creating the job (first args) is not used at all. the
data
> for the promise is passed as data to the promise callback.
>
> why do this? value isn't used here in the promise -actually it's the
promise
> ptr itself for whatever reason.

They are both different. A promise deliver a value at some point in the
future to multiple callback couple. The data you give when creating the
promise is the one delivered in the future. The one you pass with your
couple of callbacks is obviously tied to that couple of callback. They are
clearly 2 different things. Obviously you don't need to pass any data at
all in both case.

Cedric

> why?
>
> --
> - Codito, ergo sum - "I code, therefore I am" --
> The Rasterman (Carsten Haitzler)ras...@rasterman.com
>
>
>
--
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread Conrad Um
At first, I also considered making color as Eo class, but isn't it too
expensive? so as the next best, suggested using data structure and inline
functions. (I don't know how inline functions can be provided  in bindings)

If there is a rule that which color (premul or non-premul) Efl.Gfx.Color
will use, we can provide setters and getters with various type of color.

For example, we can make setters passing premul rgba, non-premul rgba, hsv
colors (they will be converted to predetermined color type), and any APIs
passing Efl.Gfx.Color can convert it into what they need.
(evas_object_color_set() will convert color to premul,
edje_object_color_class_set() will convert color to non-premul etc.)

Or, making color as Eo class seems good to me if there isn't noticeable
performance degradation. As JP mentioned, color class can provide string
lookup (like "red", "silver") or HTML notation. ("#FF")

BTW, you might not know this, because I didn't update the doc. EDC syntax
allows HTML notation.
rect { "red_rect"
   desc { "default"
  color: "#FF";
   }
}

conr2d (Jee-Yong Um)
On May 31, 2016 7:05 PM, "Jean-Philippe André"  wrote:

On 31 May 2016 at 17:34, Carsten Haitzler  wrote:

> On Tue, 31 May 2016 16:49:38 +0930 Simon Lees  said:
>
> >
> >
> > On 05/31/2016 04:32 PM, Carsten Haitzler (The Rasterman) wrote:
> > > On Tue, 31 May 2016 06:38:52 + Andrew Williams <
> a...@andywilliams.me>
> > > said:
> > >
> > >> Not to be picky but Java is not rgba by default - it prefers Color
> too,
> > >> some r g b a helper methods exist. It additionally provides many
> standard
> > >> Color definitions for "system" colours... (As well as convenience
> such as
> > >> Color.BLACK)
> > >
> > > as i said, it's an object (well a color class you create color
> objects). :)
> > >
> > > public class Color
> > > extends Object
> > >
> > > :) there are different constructors that use polymorphism:
> > >
> > > Color(float r, float g, float b)
> > > Color(float r, float g, float b, float a)
> > > Color(int rgb)
> > > Color(int rgba, boolean hasalpha)
> > > Color(int r, int g, int b)
> > > Color(int r, int g, int b, int a)
> > >
> > > the separate r, g, b, a is pretty common in api's. that's what i was
> saying.
> > >
> >
> > For what its worth Qt passes a color "class" generally but normally
> > you'd write either setColor(255,0,0,255); or setColor("#FF00"); and
> > let the language magic automatically turn that into a class, but
> > whenever specifying in html notation rather then rgba, its always done
> > as a string, I don't recall seeing a api anywhere that stores rgba in
> > one int.
>
> that's actually the
>   Color(int rgba, boolean hasalpha)
> and
>   Color(int rgb)
>
> that passes color as an int around. all pixels in an image are "unsigned
> ints"
> with color in them.
> 
>

Efl.Gfx.Color is already defined since 1.17 as a struct, containing R, G,
B, A as shorts, not chars. That was done in order to allow for 16-bit
precision per channel, in the future. But note that Efl.Gfx.Color is still
behind the BETA #ifdef

A short lived eo object could actually make sense, like efl_part. If
color_set() owns the Color object then it can just read its value and unref
it.
Then we could do just like Qt and provide lots of color "conversion"
functions (hex, html name, rgba 32 bit...)

But even if we provide this as an API we will need an easy way in C to set
a color from R,G,B,A (4 ints). Be it a macro or another method.

--
Jean-Philippe André
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: po: update POTFILE.in after file rename of elm_image.c

2016-05-31 Thread Stefan Schmidt
stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c00d6cae25765a35e6c18e1537dfa91e652394e2

commit c00d6cae25765a35e6c18e1537dfa91e652394e2
Author: Stefan Schmidt 
Date:   Tue May 31 14:11:27 2016 +0200

po: update POTFILE.in after file rename of elm_image.c

Follwoing a0ec05cd8f9307d0a28f6902680f579b96812f71 we also rename the file
here to fix the po file generation.
---
 po/POTFILES.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 66f2366..bbe9960 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -130,7 +130,7 @@ src/lib/elementary/elm_glview.c
 src/lib/elementary/elm_grid.c
 src/lib/elementary/elm_hover.c
 src/lib/elementary/elm_icon.c
-src/lib/elementary/elm_image.c
+src/lib/elementary/efl_ui_image.c
 src/lib/elementary/elm_index.c
 src/lib/elementary/elm_interface_scrollable.c
 src/lib/elementary/elm_inwin.c

-- 




[EGIT] [core/efl] master 01/01: elm: Fix build (use efl_ui_image.eo)

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b1e361e8de1f39c2d84e901bef189ebf4cfed66a

commit b1e361e8de1f39c2d84e901bef189ebf4cfed66a
Author: Jean-Philippe Andre 
Date:   Tue May 31 20:44:41 2016 +0900

elm: Fix build (use efl_ui_image.eo)
---
 src/lib/elementary/efl_ui_image.c | 6 +++---
 src/lib/elementary/elm_image_eo.h | 2 +-
 src/lib/elementary/elm_image_legacy.h | 4 +++-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/lib/elementary/efl_ui_image.c 
b/src/lib/elementary/efl_ui_image.c
index a2f43aa..3db96c9 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -972,7 +972,7 @@ _efl_ui_image_smart_download_done(void *data, Elm_Url *url, 
Eina_Binbuf *downloa
sd->remote = NULL;
if (!ret)
  {
-Elm_Image_Error err = { 0, EINA_TRUE };
+Efl_Ui_Image_Error err = { 0, EINA_TRUE };
 
 free(sd->remote_data);
 sd->remote_data = NULL;
@@ -997,7 +997,7 @@ _efl_ui_image_smart_download_cancel(void *data, Elm_Url 
*url EINA_UNUSED, int er
 {
Eo *obj = data;
Efl_Ui_Image_Data *sd = eo_data_scope_get(obj, MY_CLASS);
-   Elm_Image_Error err = { error, EINA_FALSE };
+   Efl_Ui_Image_Error err = { error, EINA_FALSE };
 
eo_event_callback_call(obj, EFL_UI_IMAGE_EVENT_DOWNLOAD_ERROR, );
 
@@ -1009,7 +1009,7 @@ static void
 _efl_ui_image_smart_download_progress(void *data, Elm_Url *url EINA_UNUSED, 
double now, double total)
 {
Eo *obj = data;
-   Elm_Image_Progress progress;
+   Efl_Ui_Image_Progress progress;
 
progress.now = now;
progress.total = total;
diff --git a/src/lib/elementary/elm_image_eo.h 
b/src/lib/elementary/elm_image_eo.h
index 22896e7..2c7feb8 100644
--- a/src/lib/elementary/elm_image_eo.h
+++ b/src/lib/elementary/elm_image_eo.h
@@ -4,7 +4,7 @@
  * @{
  */
 
-#include "elm_image.eo.h"
+#include "efl_ui_image.eo.h"
 
 /**
  * @}
diff --git a/src/lib/elementary/elm_image_legacy.h 
b/src/lib/elementary/elm_image_legacy.h
index 8bed5ca..ed9f6f2 100644
--- a/src/lib/elementary/elm_image_legacy.h
+++ b/src/lib/elementary/elm_image_legacy.h
@@ -10,6 +10,8 @@
  */
 EAPI Evas_Object *elm_image_add(Evas_Object *parent);
 
+typedef Evas_Object Elm_Image;
+
 /**
  * Set the file that will be used as the image's source.
  *
@@ -629,4 +631,4 @@ EAPI void elm_image_aspect_fixed_set(Evas_Object *obj, 
Eina_Bool fixed);
  */
 EAPI Eina_Bool elm_image_aspect_fixed_get(const Evas_Object *obj);
 
-#include "elm_image.eo.legacy.h"
+#include "efl_ui_image.eo.legacy.h"

-- 




[EGIT] [tools/enventor] master 01/01: tools: free used eina_list.

2016-05-31 Thread Hermet Park
hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=69c85269ce8848a9b31bc72983ff99ab9fe134f0

commit 69c85269ce8848a9b31bc72983ff99ab9fe134f0
Author: Hermet Park 
Date:   Tue May 31 20:12:26 2016 +0900

tools: free used eina_list.
---
 src/bin/tools.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/tools.c b/src/bin/tools.c
index ef185bb..c237fb9 100644
--- a/src/bin/tools.c
+++ b/src/bin/tools.c
@@ -236,6 +236,7 @@ tools_init(Evas_Object *parent)
 elm_object_part_content_set(live_view_ly, swallow_part, btn);
 i++;
  }
+   eina_list_free(btn_list);
 
td->live_view_ly = live_view_ly;
 

-- 




[EGIT] [core/efl] master 01/01: elm_image: rename the elm_image into efl_ui_image.

2016-05-31 Thread Ji-Youn Park
jypark pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a0ec05cd8f9307d0a28f6902680f579b96812f71

commit a0ec05cd8f9307d0a28f6902680f579b96812f71
Author: Ji-Youn Park 
Date:   Tue May 31 19:08:21 2016 +0830

elm_image: rename the elm_image into efl_ui_image.
---
 src/Makefile_Elementary.am |   6 +-
 src/lib/elementary/Elementary.h.in |   1 +
 src/lib/elementary/Makefile.am |   6 +-
 src/lib/elementary/{elm_image.c => efl_ui_image.c} | 474 ++---
 .../elementary/{elm_image.eo => efl_ui_image.eo}   |  14 +-
 .../{elm_widget_image.h => efl_ui_widget_image.h}  |  34 +-
 src/lib/elementary/elm_icon.c  |  12 +-
 src/lib/elementary/elm_icon.eo |   2 +-
 8 files changed, 274 insertions(+), 275 deletions(-)

diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 550a54a..eee1138 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -39,7 +39,7 @@ elm_public_eolian_files = \
lib/elementary/elm_hover.eo \
lib/elementary/elm_hoversel.eo \
lib/elementary/elm_icon.eo \
-   lib/elementary/elm_image.eo \
+   lib/elementary/efl_ui_image.eo \
lib/elementary/elm_index.eo \
lib/elementary/elm_interface_atspi_accessible.eo \
lib/elementary/elm_interface_atspi_action.eo \
@@ -219,7 +219,7 @@ includesunstable_HEADERS = \
lib/elementary/elm_widget_hover.h \
lib/elementary/elm_widget_hoversel.h \
lib/elementary/elm_widget_icon.h \
-   lib/elementary/elm_widget_image.h \
+   lib/elementary/efl_ui_widget_image.h \
lib/elementary/elm_widget_index.h \
lib/elementary/elm_widget_inwin.h \
lib/elementary/elm_widget_label.h \
@@ -584,7 +584,7 @@ lib_elementary_libelementary_la_SOURCES = \
lib/elementary/elm_grid.c \
lib/elementary/elm_hover.c \
lib/elementary/elm_icon.c \
-   lib/elementary/elm_image.c \
+   lib/elementary/efl_ui_image.c \
lib/elementary/elm_index.c \
lib/elementary/elm_interface_atspi_accessible.c \
lib/elementary/elm_interface_atspi_action.c \
diff --git a/src/lib/elementary/Elementary.h.in 
b/src/lib/elementary/Elementary.h.in
index b85eaff..1afc39d 100644
--- a/src/lib/elementary/Elementary.h.in
+++ b/src/lib/elementary/Elementary.h.in
@@ -271,6 +271,7 @@ EAPI extern Elm_Version *elm_version;
 # include 
 # include 
 # include 
+# include 
 #endif
 
 /* include deprecated calls last of all */
diff --git a/src/lib/elementary/Makefile.am b/src/lib/elementary/Makefile.am
index 976897b..51ccc88 100644
--- a/src/lib/elementary/Makefile.am
+++ b/src/lib/elementary/Makefile.am
@@ -44,7 +44,7 @@ elm_eolian_files = \
elm_hover.eo \
elm_hoversel.eo \
elm_icon.eo \
-   elm_image.eo \
+   efl_ui_image.eo \
elm_index.eo \
elm_interface_atspi_accessible.eo \
elm_interface_atspi_action.eo \
@@ -191,7 +191,7 @@ includesunstable_HEADERS = \
elm_widget_hover.h \
elm_widget_hoversel.h \
elm_widget_icon.h \
-   elm_widget_image.h \
+   efl_ui_widget_image.h \
elm_widget_index.h \
elm_widget_inwin.h \
elm_widget_label.h \
@@ -553,7 +553,7 @@ libelementary_la_SOURCES = \
elm_grid.c \
elm_hover.c \
elm_icon.c \
-   elm_image.c \
+   efl_ui_image.c \
elm_index.c \
elm_interface_atspi_accessible.c \
elm_interface_atspi_action.c \
diff --git a/src/lib/elementary/elm_image.c b/src/lib/elementary/efl_ui_image.c
similarity index 73%
rename from src/lib/elementary/elm_image.c
rename to src/lib/elementary/efl_ui_image.c
index 2da4ff1..a2f43aa 100644
--- a/src/lib/elementary/elm_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -9,12 +9,12 @@
 #include 
 
 #include "elm_priv.h"
-#include "elm_widget_image.h"
+#include "efl_ui_widget_image.h"
 
 #define FMT_SIZE_T "%zu"
 
-#define MY_CLASS ELM_IMAGE_CLASS
-#define MY_CLASS_NAME "Elm_Image"
+#define MY_CLASS EFL_UI_IMAGE_CLASS
+#define MY_CLASS_NAME "Efl.Ui.Image"
 #define MY_CLASS_NAME_LEGACY "elm_image"
 
 #define NON_EXISTING (void *)-1
@@ -37,8 +37,8 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
 };
 
 static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params);
-static Eina_Bool _elm_image_smart_internal_file_set(Eo *obj, Elm_Image_Data 
*sd, const char *file, const Eina_File *f, const char *key);
-static void _elm_image_sizing_eval(Eo *obj);
+static Eina_Bool _efl_ui_image_smart_internal_file_set(Eo *obj, 
Efl_Ui_Image_Data *sd, const char *file, const Eina_File *f, const char *key);
+static void _efl_ui_image_sizing_eval(Eo *obj);
 
 static const Elm_Action key_actions[] = {
{"activate", _key_action_activate},
@@ -59,8 +59,8 @@ _on_image_preloaded(void *data,
 Evas_Object *obj,
   

[EGIT] [core/efl] master 10/29: evas: Move event feed and input to legacy

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f11932749549a30e605eb3c13599fd35a7f0efa4

commit f11932749549a30e605eb3c13599fd35a7f0efa4
Author: Jean-Philippe Andre 
Date:   Wed May 11 16:21:49 2016 +0900

evas: Move event feed and input to legacy
---
 src/lib/ecore_evas/ecore_evas.c|   2 +-
 src/lib/evas/Evas_Legacy.h | 140 +
 src/lib/evas/canvas/evas_canvas.eo | 252 +
 src/lib/evas/canvas/evas_events.c  |  90 ++---
 4 files changed, 192 insertions(+), 292 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 499add6..4fc6130 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4353,7 +4353,7 @@ _direct_mouse_updown(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Button *info, Efl_P
 
eo_event_callback_call(e, EVAS_CANVAS_EVENT_POINTER, evt);
processed = ev->evas_done;
-   eo_del(evt);
+   eo_unref(evt);
 
return processed;
 }
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index c1354e5..9932774 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -408,6 +408,146 @@ EAPI void evas_event_feed_mouse_down(Evas 
*obj, int b, Evas_Button_F
 EAPI void evas_event_feed_mouse_wheel(Evas *obj, int direction, 
int z, unsigned int timestamp, const void *data);
 
 /**
+ * @brief Mouse in event feed.
+ *
+ * This function will set some evas properties that is necessary when the mouse
+ * in event happens. It prepares information to be treated by the callback
+ * function.
+ *
+ * @param[in] data The data for canvas.
+ */
+EAPI void evas_event_feed_mouse_in(Evas *obj, unsigned int 
timestamp, const void *data);
+
+/**
+ * @brief Mouse out event feed.
+ *
+ * This function will set some evas properties that is necessar when the mouse
+ * out event happens. It prepares information to be treated by the callback
+ * function.
+ *
+ * @param[in] data The data for canvas.
+ */
+EAPI void evas_event_feed_mouse_out(Evas *obj, unsigned int 
timestamp, const void *data);
+
+/**
+ * @brief Mouse cancel event feed.
+ *
+ * This function will call generate a mouse up event.
+ *
+ * @param[in] data The data for canvas.
+ */
+EAPI void evas_event_feed_mouse_cancel(Evas *obj, unsigned int 
timestamp, const void *data);
+
+/* multi touch events - no doc */
+EAPI void evas_event_input_multi_down(Evas *obj, int d, int x, int 
y, double rad, double radx, double rady, double pres, double ang, double fx, 
double fy, Efl_Pointer_Button_Flags flags, unsigned int timestamp, const void 
*data);
+EAPI void evas_event_input_multi_move(Evas *obj, int d, int x, int 
y, double rad, double radx, double rady, double pres, double ang, double fx, 
double fy, unsigned int timestamp, const void *data);
+EAPI void evas_event_input_multi_up(Evas *obj, int d, int x, int 
y, double rad, double radx, double rady, double pres, double ang, double fx, 
double fy, Efl_Pointer_Button_Flags flags, unsigned int timestamp, const void 
*data);
+EAPI void evas_event_feed_multi_down(Evas *obj, int d, int x, int 
y, double rad, double radx, double rady, double pres, double ang, double fx, 
double fy, Efl_Pointer_Button_Flags flags, unsigned int timestamp, const void 
*data);
+EAPI void evas_event_feed_multi_move(Evas *obj, int d, int x, int 
y, double rad, double radx, double rady, double pres, double ang, double fx, 
double fy, unsigned int timestamp, const void *data);
+EAPI void evas_event_feed_multi_up(Evas *obj, int d, int x, int y, 
double rad, double radx, double rady, double pres, double ang, double fx, 
double fy, Efl_Pointer_Button_Flags flags, unsigned int timestamp, const void 
*data);
+
+/**
+ * @brief Key down event feed.
+ *
+ * This function will set some evas properties that is necessary when a key is
+ * pressed. It prepares information to be treated by the callback function.
+ *
+ * @param[in] key The key pressed.
+ * @param[in] string A string.
+ * @param[in] compose The compose string.
+ * @param[in] timestamp Timestamp of the mouse up event.
+ * @param[in] data Data for canvas.
+ */
+EAPI void evas_event_feed_key_down(Evas *obj, const char *keyname, 
const char *key, const char *string, const char *compose, unsigned int 
timestamp, const void *data);
+
+/**
+ * @brief Key up event feed.
+ *
+ * This function will set some evas properties that is necessary when a key is
+ * released. It prepares information to be treated by the callback function.
+ *
+ * @param[in] key The key released.
+ * @param[in] string A string.
+ * @param[in] compose Compose.
+ * @param[in] timestamp Timestamp of the mouse up event.
+ * @param[in] data Data for canvas.
+ */
+EAPI void evas_event_feed_key_up(Evas *obj, const char *keyname, 
const char 

[EGIT] [core/efl] master 11/29: ecore_evas: Pass mouse down, up, move with eo

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c1be667a6ccd8177976960c7e311ff2d419e806e

commit c1be667a6ccd8177976960c7e311ff2d419e806e
Author: Jean-Philippe Andre 
Date:   Wed May 11 17:28:26 2016 +0900

ecore_evas: Pass mouse down,up,move with eo

This way, ecore sends eo events to evas, which can then
be listened to by other clients (FIXME: the events will
need to be propagated from evas to the elm window).

Current support:
- mouse/multi down
- mouse/multi up
- mouse/multi move
- mouse wheel
---
 src/lib/ecore_evas/ecore_evas.c | 121 +++-
 1 file changed, 96 insertions(+), 25 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 4fc6130..a2ede77 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4308,6 +4308,24 @@ _direct_key_up_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Key *info EINA_U
EV->cur.y = (Y) - (FY); EV->cur.ysub = (MY) - (FY); \
} while (0)
 
+static inline void
+_pointer_position_set(Efl_Pointer_Event_Data *ev, Ecore_Evas *ee, int x, int 
y, double mx, double my)
+{
+   int fx, fy, fw, fh;
+
+   evas_output_framespace_get(ee->evas, , , , );
+   if (ee->rotation == 0)
+ EVENT_XY_SET(ev, x, y, mx, my, fx, fy);
+   else if (ee->rotation == 90)
+ EVENT_XY_SET(ev, ee->h + fw - y - 1, x, ee->h + fw - my - 1, mx, fx, fy);
+   else if (ee->rotation == 180)
+ EVENT_XY_SET(ev, ee->w + fw - x - 1, ee->h + fh - y - 1,
+  ee->w + fw - mx - 1, ee->h + fh - my - 1,
+  fx, fy);
+   else if (ee->rotation == 270)
+ EVENT_XY_SET(ev, y, ee->w + fh - x - 1, y, ee->w + fh - mx - 1, fx, fy);
+}
+
 static Eina_Bool
 _direct_mouse_updown(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info, 
Efl_Pointer_Action action)
 {
@@ -4315,8 +4333,15 @@ _direct_mouse_updown(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Button *info, Efl_P
Efl_Pointer_Event *evt;
Evas *e = ee->evas;
Eina_Bool processed;
-   int fx, fy, fw, fh, x, y;
-   double mx, my;
+
+   /* Unused information:
+* same_screen
+* root.{x,y}
+* root_window
+* event_window
+* modifiers
+* same_screen
+*/
 
evt = efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, e, (void **) 
);
if (!evt) return EINA_FALSE;
@@ -4327,24 +4352,7 @@ _direct_mouse_updown(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Button *info, Efl_P
if (info->triple_click) ev->button_flags |= 
EFL_POINTER_BUTTON_FLAGS_TRIPLE_CLICK;
ev->timestamp = info->timestamp;
ev->finger = info->multi.device;
-
-   evas_output_framespace_get(ee->evas, , , , );
-   x = info->x;
-   y = info->y;
-   mx = info->multi.x;
-   my = info->multi.y;
-
-   if (ee->rotation == 0)
- EVENT_XY_SET(ev, x, y, mx, my, fx, fy);
-   else if (ee->rotation == 90)
- EVENT_XY_SET(ev, ee->h + fw - y - 1, x, ee->h + fw - my - 1, mx, fx, fy);
-   else if (ee->rotation == 180)
- EVENT_XY_SET(ev, ee->w + fw - x - 1, ee->h + fh - y - 1,
-  ee->w + fw - mx - 1, ee->h + fh - my - 1,
-  fx, fy);
-   else if (ee->rotation == 270)
- EVENT_XY_SET(ev, y, ee->w + fh - x - 1, y, ee->w + fh - mx - 1, fx, fy);
-
+   _pointer_position_set(ev, ee, info->x, info->y, info->multi.x, 
info->multi.y);
ev->radius = info->multi.radius;
ev->radius_x = info->multi.radius_x;
ev->radius_y = info->multi.radius_y;
@@ -4365,7 +4373,7 @@ _direct_mouse_down_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Button *info)
 }
 
 static Eina_Bool
-_direct_mouse_up_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_Button 
*info EINA_UNUSED)
+_direct_mouse_up_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info)
 {
return _direct_mouse_updown(ee, info, EFL_POINTER_ACTION_MOUSE_UP);
 }
@@ -4373,36 +4381,99 @@ _direct_mouse_up_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Button *
 static Eina_Bool
 _direct_mouse_cancel_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Button *info EINA_UNUSED)
 {
+   /* TODO: Add cancel event type. */
return EINA_FALSE;
 }
 
 static Eina_Bool
-_direct_mouse_move_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_Move 
*info EINA_UNUSED)
+_direct_mouse_move_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Move *info)
 {
-   return EINA_FALSE;
+   Efl_Pointer_Event_Data *ev;
+   Efl_Pointer_Event *evt;
+   Evas *e = ee->evas;
+   Eina_Bool processed;
+
+   /* Unused information:
+* same_screen
+* root.{x,y}
+* root_window
+* event_window
+* modifiers
+* same_screen
+*/
+
+   evt = efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, e, (void **) 
);
+   if (!evt) return EINA_FALSE;
+
+   ev->action = EFL_POINTER_ACTION_MOUSE_MOVE;
+   ev->timestamp = info->timestamp;
+   ev->finger = info->multi.device;
+   _pointer_position_set(ev, ee, info->x, info->y, info->multi.x, 

[EGIT] [core/efl] master 26/29: Evas events: Propagate event flags between eo and legacy

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=632ef372262c717b78778c8274f1f3fea917ed3e

commit 632ef372262c717b78778c8274f1f3fea917ed3e
Author: Jean-Philippe Andre 
Date:   Tue May 31 14:39:10 2016 +0900

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.
---
 src/lib/evas/canvas/efl_pointer_event.c |  4 +-
 src/lib/evas/canvas/evas_callbacks.c| 66 +++--
 src/lib/evas/canvas/evas_events.c   | 27 ++
 3 files changed, 84 insertions(+), 13 deletions(-)

diff --git a/src/lib/evas/canvas/efl_pointer_event.c 
b/src/lib/evas/canvas/efl_pointer_event.c
index 456ab6b..1d51501 100644
--- a/src/lib/evas/canvas/efl_pointer_event.c
+++ b/src/lib/evas/canvas/efl_pointer_event.c
@@ -338,7 +338,7 @@ _efl_pointer_event_efl_input_state_lock_enabled_get(Eo *obj 
EINA_UNUSED, Efl_Poi
return evas_key_lock_is_set(pd->locks, name);
 }
 
-EOLIAN static Eina_Bool
+EOLIAN static void
 _efl_pointer_event_double_click_set(Eo *obj EINA_UNUSED, 
Efl_Pointer_Event_Data *pd, Eina_Bool val)
 {
if (val)
@@ -353,7 +353,7 @@ _efl_pointer_event_double_click_get(Eo *obj EINA_UNUSED, 
Efl_Pointer_Event_Data
return !!(pd->button_flags & EFL_POINTER_BUTTON_FLAGS_DOUBLE_CLICK);
 }
 
-EOLIAN static Eina_Bool
+EOLIAN static void
 _efl_pointer_event_triple_click_set(Eo *obj EINA_UNUSED, 
Efl_Pointer_Event_Data *pd, Eina_Bool val)
 {
if (val)
diff --git a/src/lib/evas/canvas/evas_callbacks.c 
b/src/lib/evas/canvas/evas_callbacks.c
index 6b164de..c07d70e 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -1,6 +1,9 @@
 #include "evas_common_private.h"
 #include "evas_private.h"
 
+#define EFL_INTERNAL_UNSTABLE
+#include "interfaces/efl_common_internal.h"
+
 int _evas_event_counter = 0;
 
 EVAS_MEMPOOL(_mp_pc);
@@ -58,6 +61,15 @@ typedef struct
Evas_Callback_Type type;
 } _eo_evas_object_cb_info;
 
+typedef struct
+{
+   EINA_INLIST;
+   Evas_Event_Cb func;
+   void *data;
+   Evas_Callback_Type type;
+} _eo_evas_cb_info;
+
+
 static inline void *
 _pointer_event_get(const _eo_evas_object_cb_info *info, const Eo_Event *event,
const Eo_Event_Description **pdesc)
@@ -87,25 +99,57 @@ _pointer_event_get(const _eo_evas_object_cb_info *info, 
const Eo_Event *event,
 
 }
 
+static void
+_event_flags_adjust(void *ev, const Efl_Pointer_Event_Data *pedata)
+{
+#define EV_CASE(NEWTYPE, Type) \
+   case EFL_POINTER_ACTION_ ## NEWTYPE: \
+ ((Evas_Event_ ## Type *) ev)->event_flags = pedata->event_flags; \
+ break;
+
+   switch (pedata->action)
+ {
+  EV_CASE(MOVE, Mouse_Move);
+  EV_CASE(OUT, Mouse_Out);
+  EV_CASE(IN, Mouse_In);
+  EV_CASE(DOWN, Mouse_Down);
+  EV_CASE(UP, Mouse_Up);
+  EV_CASE(WHEEL, Mouse_Wheel);
+  default: break;
+ }
+
+#undef EV_CASE
+}
+
 static Eina_Bool
 _eo_evas_object_cb(void *data, const Eo_Event *event)
 {
_eo_evas_object_cb_info *info = data;
const Eo_Event_Description *desc;
-   void *pe = _pointer_event_get(info, event, );
-   if (pe) eo_event_callback_call(event->object, desc, pe);
-   if (info->func) info->func(info->data, evas_object_evas_get(event->object), 
event->object, event->info);
+   Evas *evas = evas_object_evas_get(event->object);
+   void *pe;
+
+   pe = _pointer_event_get(info, event, );
+   if (pe)
+ {
+Efl_Pointer_Event_Data *pedata;
+Efl_Pointer_Event_Flags flags;
+
+pedata = eo_data_scope_get(pe, EFL_POINTER_EVENT_CLASS);
+flags = pedata->event_flags;
+eo_event_callback_call(event->object, desc, pe);
+if (flags != pedata->event_flags)
+  _event_flags_adjust(event->info, pedata);
+ }
+   if (info->func)
+ {
+info->func(info->data, evas, event->object, event->info);
+// if event_flags changed, pe will be fixed in evas_events.c
+ }
+
return EINA_TRUE;
 }
 
-typedef struct
-{
-   EINA_INLIST;
-   Evas_Event_Cb func;
-   void *data;
-   Evas_Callback_Type type;
-} _eo_evas_cb_info;
-
 static Eina_Bool
 _eo_evas_cb(void *data, const Eo_Event *event)
 {
diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index 2c336e9..821b0e7 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -94,10 +94,37 @@ _pointer_event_create(Evas_Callback_Type type, void *ev,
return evt;
 }
 
+static inline void
+_pointer_event_flags_adjust(Efl_Pointer_Event_Data *pedata,
+Evas_Callback_Type type, const void *ev)
+{
+#define EV_CASE(TYPE, Type) \
+   case EVAS_CALLBACK_ ## TYPE: \
+ pedata->event_flags = ((Evas_Event_ ## Type *) 

[EGIT] [core/efl] master 28/29: Efl: Rename Efl.Pointer.Event into Efl.Event.Pointer

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b0a32b0bd0acc987965e6bb68721e0c459ec0217

commit b0a32b0bd0acc987965e6bb68721e0c459ec0217
Author: Jean-Philippe Andre 
Date:   Tue May 31 16:44:26 2016 +0900

Efl: Rename Efl.Pointer.Event into Efl.Event.Pointer

Also renames two types: Efl.Pointer.Flags and Efl.Event.Flags
---
 src/Makefile_Evas.am   |   4 +-
 src/lib/ecore_evas/ecore_evas.c|  30 +-
 src/lib/efl/interfaces/efl_common_internal.h   |   8 +-
 src/lib/efl/interfaces/efl_event_types.eot |   4 +-
 src/lib/efl/interfaces/efl_input_interface.eo  |  14 +-
 src/lib/elementary/elm_widget.eo   |   2 +-
 src/lib/evas/Evas_Common.h |  16 +-
 src/lib/evas/Evas_Eo.h |   2 +-
 src/lib/evas/Evas_Legacy.h |   8 +-
 src/lib/evas/canvas/efl_event_pointer.c| 401 +
 .../{efl_pointer_event.eo => efl_event_pointer.eo} |   8 +-
 src/lib/evas/canvas/efl_pointer_event.c| 401 -
 src/lib/evas/canvas/evas_callbacks.c   |   8 +-
 src/lib/evas/canvas/evas_canvas.eo |   2 +-
 src/lib/evas/canvas/evas_events.c  | 138 +++
 src/lib/evas/canvas/evas_events_legacy.c   |   8 +-
 src/lib/evas/include/evas_private.h|   4 +-
 17 files changed, 529 insertions(+), 529 deletions(-)

diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index ce2607b..a408b49 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -43,7 +43,7 @@ evas_eolian_pub_files = \
lib/evas/canvas/efl_canvas_surface_wayland.eo \
lib/evas/canvas/evas_filter.eo \
lib/evas/canvas/evas_smart_clipped.eo \
-   lib/evas/canvas/efl_pointer_event.eo \
+   lib/evas/canvas/efl_event_pointer.eo \
$(NULL)
 
 evas_eolian_legacy_files = \
@@ -198,7 +198,7 @@ lib/evas/canvas/efl_canvas_surface.c \
 lib/evas/canvas/efl_canvas_surface_tbm.c \
 lib/evas/canvas/efl_canvas_surface_x11.c \
 lib/evas/canvas/efl_canvas_surface_wayland.c \
-lib/evas/canvas/efl_pointer_event.c \
+lib/evas/canvas/efl_event_pointer.c \
 $(NULL)
 
 EXTRA_DIST += \
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 3e772dc..db13c1e 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4296,7 +4296,7 @@ ecore_evas_psl1ght_new(const char* name, int w, int h)
} while (0)
 
 static inline void
-_pointer_position_set(Efl_Pointer_Event_Data *ev, Ecore_Evas *ee, double mx, 
double my)
+_pointer_position_set(Efl_Event_Pointer_Data *ev, Ecore_Evas *ee, double mx, 
double my)
 {
int fx, fy, fw, fh;
 
@@ -4337,8 +4337,8 @@ _event_description_get(Efl_Pointer_Action action)
 static Eina_Bool
 _direct_mouse_updown(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info, 
Efl_Pointer_Action action)
 {
-   Efl_Pointer_Event_Data *ev;
-   Efl_Pointer_Event *evt;
+   Efl_Event_Pointer_Data *ev;
+   Efl_Event_Pointer *evt;
Evas *e = ee->evas;
Eina_Bool processed;
 
@@ -4351,13 +4351,13 @@ _direct_mouse_updown(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Button *info, Efl_P
 * modifiers (already passed to evas, no need to do anything)
 */
 
-   evt = efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, e, (void **) 
);
+   evt = efl_event_pointer_instance_get(EFL_EVENT_POINTER_CLASS, e, (void **) 
);
if (!evt) return EINA_FALSE;
 
ev->action = action;
ev->button = info->buttons;
-   if (info->double_click) ev->button_flags |= 
EFL_POINTER_BUTTON_FLAGS_DOUBLE_CLICK;
-   if (info->triple_click) ev->button_flags |= 
EFL_POINTER_BUTTON_FLAGS_TRIPLE_CLICK;
+   if (info->double_click) ev->button_flags |= EFL_POINTER_FLAGS_DOUBLE_CLICK;
+   if (info->triple_click) ev->button_flags |= EFL_POINTER_FLAGS_TRIPLE_CLICK;
ev->timestamp = info->timestamp;
ev->finger = info->multi.device;
_pointer_position_set(ev, ee, info->multi.x, info->multi.y);
@@ -4395,8 +4395,8 @@ _direct_mouse_cancel_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Button *info)
 static Eina_Bool
 _direct_mouse_move_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Move *info)
 {
-   Efl_Pointer_Event_Data *ev;
-   Efl_Pointer_Event *evt;
+   Efl_Event_Pointer_Data *ev;
+   Efl_Event_Pointer *evt;
Evas *e = ee->evas;
Eina_Bool processed;
 
@@ -4409,7 +4409,7 @@ _direct_mouse_move_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Move *info)
 * modifiers (already passed to evas, no need to do anything)
 */
 
-   evt = efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, e, (void **) 
);
+   evt = efl_event_pointer_instance_get(EFL_EVENT_POINTER_CLASS, e, (void **) 
);
if (!evt) return EINA_FALSE;
 
ev->action = EFL_POINTER_ACTION_MOVE;
@@ -4433,8 +4433,8 @@ _direct_mouse_move_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Move *info)
 static 

[EGIT] [core/efl] master 15/29: Efl.Pointer.Event: Add dup() method to copy an event

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8e31929aab1d7c299ff9954d1617ab3887ef807c

commit 8e31929aab1d7c299ff9954d1617ab3887ef807c
Author: Jean-Philippe Andre 
Date:   Thu May 12 15:07:49 2016 +0900

Efl.Pointer.Event: Add dup() method to copy an event
---
 src/lib/ecore_evas/ecore_evas.c |  2 +-
 src/lib/efl/interfaces/efl_event.eo |  4 
 src/lib/efl/interfaces/efl_pointer_event.c  | 15 +++
 src/lib/efl/interfaces/efl_pointer_event.eo |  1 +
 src/modules/ecore_evas/engines/x/ecore_evas_x.c | 14 +++---
 5 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 7f25117..36ec77e 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4465,7 +4465,7 @@ _direct_mouse_inout(Ecore_Evas *ee, const 
Ecore_Event_Mouse_IO *info, Efl_Pointe
 
eo_event_callback_call(e, EVAS_CANVAS_EVENT_POINTER, evt);
processed = ev->evas_done;
-   eo_del(evt);
+   eo_unref(evt);
 
return processed;
 }
diff --git a/src/lib/efl/interfaces/efl_event.eo 
b/src/lib/efl/interfaces/efl_event.eo
index f00a047..9cc2bcb 100644
--- a/src/lib/efl/interfaces/efl_event.eo
+++ b/src/lib/efl/interfaces/efl_event.eo
@@ -37,5 +37,9 @@ interface Efl.Event
   reset {
  [[Resets the internal data to 0 or default values.]]
   }
+  dup {
+ [[Creates a copy of this event.]]
+ return: own(Efl.Event);
+  }
}
 }
diff --git a/src/lib/efl/interfaces/efl_pointer_event.c 
b/src/lib/efl/interfaces/efl_pointer_event.c
index b55da3f..536249e 100644
--- a/src/lib/efl/interfaces/efl_pointer_event.c
+++ b/src/lib/efl/interfaces/efl_pointer_event.c
@@ -91,6 +91,21 @@ _efl_pointer_event_efl_event_reset(Eo *obj, 
Efl_Pointer_Event_Data *pd)
pd->wheel.dir = EFL_ORIENT_VERTICAL;
 }
 
+EOLIAN static Efl_Event *
+_efl_pointer_event_efl_event_dup(Eo *obj, Efl_Pointer_Event_Data *pd)
+{
+   Efl_Pointer_Event_Data *ev;
+   Efl_Pointer_Event *evt;
+
+   evt = _efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, NULL, obj, 
);
+   if (!evt) return NULL;
+
+   memcpy(ev, pd, sizeof(*ev));
+   ev->eo = evt;
+
+   return evt;
+}
+
 EOLIAN static void
 _efl_pointer_event_action_set(Eo *obj EINA_UNUSED, Efl_Pointer_Event_Data *pd, 
Efl_Pointer_Action act)
 {
diff --git a/src/lib/efl/interfaces/efl_pointer_event.eo 
b/src/lib/efl/interfaces/efl_pointer_event.eo
index 05268c8..1fa303b 100644
--- a/src/lib/efl/interfaces/efl_pointer_event.eo
+++ b/src/lib/efl/interfaces/efl_pointer_event.eo
@@ -126,6 +126,7 @@ class Efl.Pointer.Event (Eo.Base, Efl.Event)
   Eo.Base.constructor;
   class.destructor;
   Efl.Event.reset;
+  Efl.Event.dup;
   Efl.Event.timestamp.set;
   Efl.Event.timestamp.get;
   Efl.Event.event_type.set;
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c 
b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index 1f56aaa..9d11705 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -1271,7 +1271,7 @@ _feed_cancel_out(const Ecore_X_Event_Mouse_Out *e, 
Eina_Bool cancel)
 */
if (cancel)
  {
-Ecore_Event_Mouse_Button cancel = {
+Ecore_Event_Mouse_Button ev = {
.event_window = (Ecore_Window) e->event_win,
.modifiers = e->modifiers,
.timestamp = e->time,
@@ -1279,7 +1279,7 @@ _feed_cancel_out(const Ecore_X_Event_Mouse_Out *e, 
Eina_Bool cancel)
.x = e->x,
.y = e->y,
 };
-ecore_event_evas_mouse_button_cancel(NULL, 
ECORE_EVENT_MOUSE_BUTTON_CANCEL, );
+ecore_event_evas_mouse_button_cancel(NULL, 
ECORE_EVENT_MOUSE_BUTTON_CANCEL, );
  }
 
Ecore_Event_Mouse_IO io = {
@@ -1768,7 +1768,15 @@ _ecore_evas_x_event_window_hide(void *data EINA_UNUSED, 
int type EINA_UNUSED, vo
if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if (ee->in)
  {
-_feed_cancel_out(e, EINA_TRUE);
+Ecore_X_Event_Mouse_Out out = {
+   .event_win = e->event_win,
+   .modifiers = 0,
+   .time = e->time,
+   .win = e->win,
+   .x = 0,
+   .y = 0,
+};
+_feed_cancel_out(, EINA_TRUE);
 if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee);
 if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object);
 ee->in = EINA_FALSE;

-- 




[EGIT] [core/efl] master 18/29: Evas events: Pass Efl_Pointer_Event for proxy source events

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4c7272720b4b1686d319d2a1b29478271776389d

commit 4c7272720b4b1686d319d2a1b29478271776389d
Author: Jean-Philippe Andre 
Date:   Fri May 27 20:06:06 2016 +0900

Evas events: Pass Efl_Pointer_Event for proxy source events
---
 src/lib/evas/canvas/evas_events.c | 210 --
 1 file changed, 113 insertions(+), 97 deletions(-)

diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index 1e92358..fffa082 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -96,7 +96,8 @@ _pointer_event_create(Evas_Callback_Type type, void *ev,
else efl_pointer_event_legacy_info_set(_pe, _ev, _typ); \
evas_object_event_callback_call(_eo_obj, _obj, _typ, _ev, _id); \
} while (0)
-#define EV_DEL(a) do { eo_unref(a); a = NULL; } while (0)
+#define EV_RESET(a) do { if (a) efl_event_reset(a); } while (0)
+#define EV_DEL(a) do { if (a) { eo_unref(a); } a = NULL; } while (0)
 
 static Eina_List *
 _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in,
@@ -253,7 +254,9 @@ _transform_to_src_space(Evas_Object_Protected_Data *obj, 
Evas_Object_Protected_D
 }
 
 static void
-_evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e, 
Evas_Event_Mouse_Down *ev, int event_id)
+_evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e,
+ Evas_Event_Mouse_Down *ev, int event_id,
+ Efl_Pointer_Event_Data *parent_pe)
 {
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
@@ -261,6 +264,8 @@ _evas_event_source_mouse_down_events(Evas_Object *eo_obj, 
Evas *eo_e, Evas_Event
Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
Evas_Coord_Point canvas = ev->canvas;
Evas_Object_Protected_Data *child;
+   Efl_Pointer_Event_Data *pedata = NULL;
+   Efl_Pointer_Event *pe = NULL;
Evas_Object *eo_child;
Eina_List *l;
int no_rep = 0;
@@ -319,24 +324,28 @@ _evas_event_source_mouse_down_events(Evas_Object *eo_obj, 
Evas *eo_e, Evas_Event
 _evas_event_havemap_adjust(eo_child, child, >canvas.x,
>canvas.y,
child->mouse_grabbed);
-evas_object_event_callback_call(eo_child, child,
-EVAS_CALLBACK_MOUSE_DOWN, ev, 
event_id);
+EV_CALL(eo_child, child, EVAS_CALLBACK_MOUSE_DOWN, ev, event_id, pe);
 if (e->delete_me) break;
 if (obj->pointer_mode == 
EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
   break;
  }
eina_list_free(copy);
ev->canvas = canvas;
+   EV_DEL(pe);
 }
 
 static void
-_evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e, 
Evas_Event_Mouse_Move *ev, int event_id)
+_evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e,
+ Evas_Event_Mouse_Move *ev, int event_id,
+ Efl_Pointer_Event_Data *parent_pe)
 {
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, 
EVAS_OBJECT_CLASS);
Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
Evas_Coord_Point canvas = ev->cur.canvas;
+   Efl_Pointer_Event_Data *pedata = NULL;
+   Efl_Pointer_Event *pe = NULL;
 
if (obj->delete_me || src->delete_me || e->is_frozen) return;
 
@@ -368,9 +377,7 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, 
Evas *eo_e, Evas_Event
   _evas_event_havemap_adjust(eo_child, child, 
>cur.canvas.x,
  >cur.canvas.y,
  child->mouse_grabbed);
-  evas_object_event_callback_call(eo_child, child,
-  EVAS_CALLBACK_MOUSE_MOVE,
-  ev, event_id);
+  EV_CALL(eo_child, child, EVAS_CALLBACK_MOUSE_MOVE, ev, 
event_id, pe);
}
  else
outs = eina_list_append(outs, eo_child);
@@ -378,6 +385,7 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, 
Evas *eo_e, Evas_Event
  //FIXME: take care nograb object 
   }
 eina_list_free(copy);
+EV_RESET(pe);
 
 while (outs)
   {
@@ -398,9 +406,7 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, 
Evas *eo_e, Evas_Event
 proxy_write->src_event_in = 
eina_list_remove(proxy_write->src_event_in, eo_child);
   EINA_COW_WRITE_END(evas_object_proxy_cow, src->proxy, 
proxy_write);
 
- 

[EGIT] [core/efl] master 25/29: Evas events: Add helper functions to read event info

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=68329593182257d2ba0523ae8b486314b0209771

commit 68329593182257d2ba0523ae8b486314b0209771
Author: Jean-Philippe Andre 
Date:   Tue May 31 13:40:14 2016 +0900

Evas events: Add helper functions to read event info

This adds simple helpers for double/triple click
and on_hold/on_scroll flags.
---
 src/lib/evas/canvas/efl_pointer_event.c  | 60 
 src/lib/evas/canvas/efl_pointer_event.eo | 31 -
 2 files changed, 90 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/efl_pointer_event.c 
b/src/lib/evas/canvas/efl_pointer_event.c
index 5b11ce6..456ab6b 100644
--- a/src/lib/evas/canvas/efl_pointer_event.c
+++ b/src/lib/evas/canvas/efl_pointer_event.c
@@ -338,4 +338,64 @@ _efl_pointer_event_efl_input_state_lock_enabled_get(Eo 
*obj EINA_UNUSED, Efl_Poi
return evas_key_lock_is_set(pd->locks, name);
 }
 
+EOLIAN static Eina_Bool
+_efl_pointer_event_double_click_set(Eo *obj EINA_UNUSED, 
Efl_Pointer_Event_Data *pd, Eina_Bool val)
+{
+   if (val)
+ pd->button_flags |= EFL_POINTER_BUTTON_FLAGS_DOUBLE_CLICK;
+   else
+ pd->button_flags &= ~EFL_POINTER_BUTTON_FLAGS_DOUBLE_CLICK;
+}
+
+EOLIAN static Eina_Bool
+_efl_pointer_event_double_click_get(Eo *obj EINA_UNUSED, 
Efl_Pointer_Event_Data *pd)
+{
+   return !!(pd->button_flags & EFL_POINTER_BUTTON_FLAGS_DOUBLE_CLICK);
+}
+
+EOLIAN static Eina_Bool
+_efl_pointer_event_triple_click_set(Eo *obj EINA_UNUSED, 
Efl_Pointer_Event_Data *pd, Eina_Bool val)
+{
+   if (val)
+ pd->button_flags |= EFL_POINTER_BUTTON_FLAGS_TRIPLE_CLICK;
+   else
+ pd->button_flags &= ~EFL_POINTER_BUTTON_FLAGS_TRIPLE_CLICK;
+}
+
+EOLIAN static Eina_Bool
+_efl_pointer_event_triple_click_get(Eo *obj EINA_UNUSED, 
Efl_Pointer_Event_Data *pd)
+{
+   return !!(pd->button_flags & EFL_POINTER_BUTTON_FLAGS_TRIPLE_CLICK);
+}
+
+EOLIAN static void
+_efl_pointer_event_on_hold_set(Eo *obj EINA_UNUSED, Efl_Pointer_Event_Data 
*pd, Eina_Bool val)
+{
+   if (val)
+ pd->event_flags |= EFL_POINTER_EVENT_FLAGS_ON_HOLD;
+   else
+ pd->event_flags &= ~EFL_POINTER_EVENT_FLAGS_ON_HOLD;
+}
+
+EOLIAN static Eina_Bool
+_efl_pointer_event_on_hold_get(Eo *obj EINA_UNUSED, Efl_Pointer_Event_Data *pd)
+{
+   return !!(pd->event_flags & EFL_POINTER_EVENT_FLAGS_ON_HOLD);
+}
+
+EOLIAN static void
+_efl_pointer_event_on_scroll_set(Eo *obj EINA_UNUSED, Efl_Pointer_Event_Data 
*pd, Eina_Bool val)
+{
+   if (val)
+ pd->event_flags |= EFL_POINTER_EVENT_FLAGS_ON_SCROLL;
+   else
+ pd->event_flags &= ~EFL_POINTER_EVENT_FLAGS_ON_SCROLL;
+}
+
+EOLIAN static Eina_Bool
+_efl_pointer_event_on_scroll_get(Eo *obj EINA_UNUSED, Efl_Pointer_Event_Data 
*pd)
+{
+   return !!(pd->event_flags & EFL_POINTER_EVENT_FLAGS_ON_SCROLL);
+}
+
 #include "efl_pointer_event.eo.c"
diff --git a/src/lib/evas/canvas/efl_pointer_event.eo 
b/src/lib/evas/canvas/efl_pointer_event.eo
index 04531db..c7291a7 100644
--- a/src/lib/evas/canvas/efl_pointer_event.eo
+++ b/src/lib/evas/canvas/efl_pointer_event.eo
@@ -97,19 +97,48 @@ class Efl.Pointer.Event (Eo.Base, Efl.Event, 
Efl.Input.State)
 src: Eo.Base; [[Source object: $Efl.Gfx]]
  }
   }
-  /* FIXME: why not double_click() and triple_click() */
   @property button_flags {
  [[Double or triple click information.]]
  values {
 flags: Efl.Pointer.Button_Flags;
  }
   }
+  @property double_click {
+ [[$true if @.button_flags indicates a double click (2nd press).
+
+   This is just a helper function around @.button_flags.
+ ]]
+ values {
+val: bool;
+ }
+  }
+  @property triple_click {
+ [[$true if @.button_flags indicates a triple click (3rd press).
+
+   This is just a helper function around @.button_flags.
+ ]]
+ values {
+val: bool;
+ }
+  }
   @property event_flags {
  [[Extra flags for this event, may be changed by the user.]]
  values {
 flags: Efl.Pointer.Event_Flags;
  }
   }
+  @property on_hold {
+ [[$true if @.event_flags indicates the event is on hold.]]
+ values {
+val: bool;
+ }
+  }
+  @property on_scroll {
+ [[$true if @.event_flags indicates the event happened while 
scrolling.]]
+ values {
+val: bool;
+ }
+  }
   @property wheel_direction {
  values {
 dir: Efl.Orient; [[Horizontal or Vertical only.]]

-- 




[EGIT] [core/efl] master 17/29: Evas events: Forward more pointer events

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7658ed7ae3f9e7be28b01bb2fd9832bb1e1f7b2d

commit 7658ed7ae3f9e7be28b01bb2fd9832bb1e1f7b2d
Author: Jean-Philippe Andre 
Date:   Fri May 27 16:21:13 2016 +0900

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.
---
 src/lib/evas/Evas_Common.h   |  10 +-
 src/lib/evas/canvas/evas_callbacks.c |  21 ++-
 src/lib/evas/canvas/evas_events.c| 260 ++-
 src/lib/evas/canvas/evas_events_legacy.c | 114 +-
 4 files changed, 288 insertions(+), 117 deletions(-)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 4d45d56..7186ace 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -375,6 +375,7 @@ struct _Evas_Event_Mouse_Down /** Mouse button press event 
*/
Evas_Event_Flags  event_flags;
Evas_Device  *dev;
Evas_Object  *event_src; /**< The Evas Object which actually triggered 
the event, used in cases of proxy event propagation */
+   void*reserved; /**< Reserved field for internal use only. 
@since 1.18 */
 };
 
 struct _Evas_Event_Mouse_Up /** Mouse button release event */
@@ -393,6 +394,7 @@ struct _Evas_Event_Mouse_Up /** Mouse button release event 
*/
Evas_Event_Flags  event_flags;
Evas_Device  *dev;
Evas_Object *event_src; /**< The Evas Object which actually triggered 
the event, used in cases of proxy event propagation */
+   void*reserved; /**< Reserved field for internal use only. 
@since 1.18 */
 };
 
 struct _Evas_Event_Mouse_In /** Mouse enter event */
@@ -409,6 +411,7 @@ struct _Evas_Event_Mouse_In /** Mouse enter event */
Evas_Event_Flags event_flags;
Evas_Device *dev;
Evas_Object *event_src; /**< The Evas Object which actually triggered 
the event, used in cases of proxy event propagation */
+   void*reserved; /**< Reserved field for internal use only. 
@since 1.18 */
 };
 
 struct _Evas_Event_Mouse_Out /** Mouse leave event */
@@ -425,6 +428,7 @@ struct _Evas_Event_Mouse_Out /** Mouse leave event */
Evas_Event_Flags event_flags;
Evas_Device *dev;
Evas_Object *event_src; /**< The Evas Object which actually triggered 
the event, used in cases of proxy event propagation */
+   void*reserved; /**< Reserved field for internal use only. 
@since 1.18 */
 };
 
 struct _Evas_Event_Mouse_Move /** Mouse move event */
@@ -441,7 +445,7 @@ struct _Evas_Event_Mouse_Move /** Mouse move event */
Evas_Event_Flags event_flags;
Evas_Device *dev;
Evas_Object *event_src; /**< The Evas Object which actually triggered 
the event, used in cases of proxy event propagation */
-   void*reserved; /* internal use only */
+   void*reserved; /**< Reserved field for internal use only. 
@since 1.18 */
 };
 
 struct _Evas_Event_Mouse_Wheel /** Wheel event */
@@ -458,6 +462,7 @@ struct _Evas_Event_Mouse_Wheel /** Wheel event */
unsigned int timestamp;
Evas_Event_Flags event_flags;
Evas_Device *dev;
+   void*reserved; /**< Reserved field for internal use only. 
@since 1.18 */
 };
 
 struct _Evas_Event_Multi_Down /** Multi button press event */
@@ -477,6 +482,7 @@ struct _Evas_Event_Multi_Down /** Multi button press event 
*/
unsigned int   timestamp;
Evas_Event_Flags   event_flags;
Evas_Device   *dev;
+   void  *reserved; /**< Reserved field for internal use 
only. @since 1.18 */
 };
 
 struct _Evas_Event_Multi_Up /** Multi button release event */
@@ -496,6 +502,7 @@ struct _Evas_Event_Multi_Up /** Multi button release event 
*/
unsigned int   timestamp;
Evas_Event_Flags   event_flags;
Evas_Device   *dev;
+   void  *reserved; /**< Reserved field for internal use 
only. @since 1.18 */
 };
 
 struct _Evas_Event_Multi_Move /** Multi button down event */
@@ -512,6 +519,7 @@ struct _Evas_Event_Multi_Move /** Multi button down event */
unsigned inttimestamp;
Evas_Event_Flagsevent_flags;
Evas_Device*dev;
+   void   *reserved; /**< Reserved field for internal use 
only. @since 1.18 */
 };
 
 struct _Evas_Event_Key_Down /** Key press event */
diff --git a/src/lib/evas/canvas/evas_callbacks.c 
b/src/lib/evas/canvas/evas_callbacks.c
index a922bf0..83771b1 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -62,13 +62,26 @@ static inline void *
 _pointer_event_get(const _eo_evas_object_cb_info *info, const Eo_Event *event)
 {
if (!info->data) return NULL;
+
+   /* See also evas_events.c: 

[EGIT] [core/efl] master 06/29: ecore_evas: Add private direct callback for ecore

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bd70604ee83904fde17c6ac26cae67bc4e4bd6ac

commit bd70604ee83904fde17c6ac26cae67bc4e4bd6ac
Author: Jean-Philippe Andre 
Date:   Wed May 11 13:01:54 2016 +0900

ecore_evas: Add private direct callback for ecore

All ecore_input_evas events should be passed through ecore_evas
in order to avoid any information loss between ecore and evas.

This is a private API.
---
 src/lib/ecore_evas/ecore_evas.c | 103 
 src/lib/ecore_evas/ecore_evas_private.h |   1 +
 src/lib/ecore_input_evas/Ecore_Input_Evas.h |   5 ++
 src/lib/ecore_input_evas/ecore_input_evas.c |  13 
 4 files changed, 122 insertions(+)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index dffb915..dc7d1d4 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2,6 +2,8 @@
 # include 
 #endif
 
+#define ECORE_EVAS_INTERNAL
+
 #include 
 #include 
 #include 
@@ -3598,6 +3600,7 @@ ecore_evas_input_event_register(Ecore_Evas *ee)

(Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,

(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,

(Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
+   _ecore_event_window_direct_cb_set((Ecore_Window)ee, 
_ecore_evas_input_direct_cb);
 }
 
 EAPI void
@@ -4276,3 +4279,103 @@ ecore_evas_psl1ght_new(const char* name, int w, int h)
 
return new(name, w, h);
 }
+
+
+/* new input model with eo:
+ *  1. pass all events from ecore_input_evas through
+ * ecore_evas and send eo events from here
+ *  2. those eo events can then be translated to legacy by evas
+ *  3. let evas send legacy & eo events to the objects
+ */
+
+static Eina_Bool
+_direct_key_down_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Key *ev 
EINA_UNUSED)
+{
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_direct_key_up_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Key *ev 
EINA_UNUSED)
+{
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_direct_mouse_down_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Button *ev EINA_UNUSED)
+{
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_direct_mouse_up_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_Button 
*ev EINA_UNUSED)
+{
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_direct_mouse_cancel_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Button *ev EINA_UNUSED)
+{
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_direct_mouse_move_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_Move 
*ev EINA_UNUSED)
+{
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_direct_mouse_wheel_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Wheel *ev EINA_UNUSED)
+{
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_direct_mouse_in_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_IO *ev 
EINA_UNUSED)
+{
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_direct_mouse_out_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_IO 
*ev EINA_UNUSED)
+{
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_direct_axis_update_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Axis_Update *ev EINA_UNUSED)
+{
+   return EINA_FALSE;
+}
+
+EAPI Eina_Bool
+_ecore_evas_input_direct_cb(void *window, int type, const void *info)
+{
+   Ecore_Evas *ee = window;
+
+   if (type == ECORE_EVENT_KEY_DOWN)
+ return _direct_key_down_cb(ee, (const Ecore_Event_Key *) info);
+   else if (type == ECORE_EVENT_KEY_UP)
+ return _direct_key_up_cb(ee, (const Ecore_Event_Key *) info);
+   else if (type == ECORE_EVENT_MOUSE_BUTTON_DOWN)
+ return _direct_mouse_down_cb(ee, (const Ecore_Event_Mouse_Button *) info);
+   else if (type == ECORE_EVENT_MOUSE_BUTTON_UP)
+ return _direct_mouse_up_cb(ee, (const Ecore_Event_Mouse_Button *) info);
+   else if (type == ECORE_EVENT_MOUSE_BUTTON_CANCEL)
+ return _direct_mouse_cancel_cb(ee, (const Ecore_Event_Mouse_Button *) 
info);
+   else if (type == ECORE_EVENT_MOUSE_MOVE)
+ return _direct_mouse_move_cb(ee, (const Ecore_Event_Mouse_Move *) info);
+   else if (type == ECORE_EVENT_MOUSE_WHEEL)
+ return _direct_mouse_wheel_cb(ee, (const Ecore_Event_Mouse_Wheel *) info);
+   else if (type == ECORE_EVENT_MOUSE_IN)
+ return _direct_mouse_in_cb(ee, (const Ecore_Event_Mouse_IO *) info);
+   else if (type == ECORE_EVENT_MOUSE_OUT)
+ return _direct_mouse_out_cb(ee, (const Ecore_Event_Mouse_IO *) info);
+   else if (type == ECORE_EVENT_AXIS_UPDATE)
+ return _direct_axis_update_cb(ee, (const Ecore_Event_Axis_Update *) info);
+   else
+ {
+ERR("unhandled input event type %d", type);
+return EINA_FALSE;
+ }
+}
diff --git a/src/lib/ecore_evas/ecore_evas_private.h 
b/src/lib/ecore_evas/ecore_evas_private.h
index a179733..fea4792 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h

[EGIT] [core/efl] master 02/29: Efl: Add storage class Efl.Pointer.Event

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=645a7b7d6cdaac532d8a1f7bef327fb7dde4bd69

commit 645a7b7d6cdaac532d8a1f7bef327fb7dde4bd69
Author: Jean-Philippe Andre 
Date:   Thu Apr 28 17:31:46 2016 +0900

Efl: Add storage class Efl.Pointer.Event

This object is the data carried over in an event data pointer.

The private data should be accessible by Ecore and Evas, but
not externally. This means we should be able to easily extend
the feature set, adding more and more information, without
breaking API / ABI.

Also, this should allow applications to create fake input
events easily without exposing our internal structures, or
functions with more and more parameters (such as feed multi).

This is only a storage class, shouldn't contain any logic.
In the future, some logic may be added for gestures support
for instance, or input smoothing / resampling (eg. if input
frequency is 90Hz and screen refresh rate is 60Hz).

The aim is to replace:
- Evas_Event_Mouse_Xxx
- Evas_Event_Multi_Xxx
- Ecore_Event_Mouse_Xxx

We might want to also support Axis, Gestures, etc... with the
same model or even same storage class.
---
 src/Makefile_Efl.am  |   4 +
 src/lib/efl/Efl.h|   4 +-
 src/lib/efl/interfaces/efl_common_internal.h |  35 +++--
 src/lib/efl/interfaces/efl_event.c   |  10 ++
 src/lib/efl/interfaces/efl_event.eo  |  38 +
 src/lib/efl/interfaces/efl_pointer_event.c   | 222 +++
 src/lib/efl/interfaces/efl_pointer_event.eo  | 138 +
 7 files changed, 436 insertions(+), 15 deletions(-)

diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index 4388ef2..a770039 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -39,6 +39,8 @@ efl_eolian_files = \
   lib/efl/interfaces/efl_vpath_file_core.eo \
   lib/efl/interfaces/efl_ui_spin.eo \
   lib/efl/interfaces/efl_ui_progress.eo \
+  lib/efl/interfaces/efl_event.eo \
+  lib/efl/interfaces/efl_pointer_event.eo \
   $(efl_eolian_legacy_files) \
   $(NULL)
 
@@ -81,6 +83,8 @@ lib/efl/interfaces/efl_vpath_manager.c \
 lib/efl/interfaces/efl_vpath_core.c \
 lib/efl/interfaces/efl_vpath_file_core.c \
 lib/efl/interfaces/efl_input_device.c \
+lib/efl/interfaces/efl_event.c \
+lib/efl/interfaces/efl_pointer_event.c \
 $(NULL)
 
 lib_efl_libefl_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl 
-I$(top_srcdir)/src/lib/efl @EFL_CFLAGS@ -DEFL_GFX_FILTER_BETA
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index c834412..a71d17b 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -128,8 +128,8 @@ static inline void efl_gfx_color16_type_set(Efl_Gfx_Color 
*color,
 /* Input events */
 #include "interfaces/efl_input_device.eo.h"
 //#include "interfaces/efl_input_state.eo.h"
-//#include "interfaces/efl_event.eo.h"
-//#include "interfaces/efl_pointer_event.eo.h"
+#include "interfaces/efl_event.eo.h"
+#include "interfaces/efl_pointer_event.eo.h"
 
 #else
 
diff --git a/src/lib/efl/interfaces/efl_common_internal.h 
b/src/lib/efl/interfaces/efl_common_internal.h
index eb46814..aa95689 100644
--- a/src/lib/efl/interfaces/efl_common_internal.h
+++ b/src/lib/efl/interfaces/efl_common_internal.h
@@ -23,34 +23,43 @@ typedef struct _Evas_Modifier Evas_Modifier;
 typedef struct _Evas_Lock Evas_Lock;
 #endif
 
-#if 0
 struct _Efl_Pointer_Event_Data
 {
Eo *eo;
-   const Eo_Event_Description *event;
-   unsigned inttimestamp;
+   unsigned inttimestamp; /* FIXME: store as double? */
int button;
unsigned intpressed_buttons;
struct {
-  int  x, y;
-   } output;
+  struct {
+ int   x, y;
+  } output;
+  struct {
+ int   x, y;
+  } canvas;
+   } cur, prev;
struct {
-  int  x, y;
-   } canvas;
-   Eo *source; /* may be ecore or evas or evas object (?) */
-   Efl_Pointer_Action   action;
-   Efl_Pointer_Button_Flags button_flags;
-   Efl_Pointer_Event_Flags  event_flags;
-   void   *data;   /* evas data - whatever that is */
+  Efl_Orient   dir;
+  int  z;
+   } wheel;
+   Efl_Gfx*source; /* could it be ecore? */
+   Efl_Input_Device   *device;
+   Efl_Pointer_Action  action;
+   Efl_Pointer_Button_Flagsbutton_flags;
+   Efl_Pointer_Event_Flags event_flags;
+   void   *data; /* evas data - whatever that is */
+   const Eo_Event_Description *event_desc;
+   //Efl_Input_Statestate;
 };
 
 struct _Efl_Input_State_Data
 {
Eo *eo;
+   /* FIXME / TODO  */
+#if 0
Evas_Modifier  *modifiers;
Evas_Lock  *locks;
-};
 #endif
+};
 
 struct _Efl_Input_Device_Data
 {
diff --git a/src/lib/efl/interfaces/efl_event.c 
b/src/lib/efl/interfaces/efl_event.c

[EGIT] [core/efl] master 07/29: ecore_evas: Register direct input cb from modules

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5aa4a5f8e54fbf8637bf62338ed005a4239a

commit 5aa4a5f8e54fbf8637bf62338ed005a4239a
Author: Jean-Philippe Andre 
Date:   Wed May 11 13:29:23 2016 +0900

ecore_evas: Register direct input cb from modules

If the ecore_evas modules were using
ecore_event_window_register() then they can also redirect
everything though the direct callback instead.
---
 src/lib/ecore/ecore_private.h | 3 +++
 src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c   | 1 +
 src/modules/ecore_evas/engines/drm/ecore_evas_drm.c   | 1 +
 src/modules/ecore_evas/engines/fb/ecore_evas_fb.c | 1 +
 src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c   | 1 +
 src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c   | 1 +
 src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c   | 1 +
 .../ecore_evas/engines/wayland/ecore_evas_wayland_private.h   | 2 ++
 src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c   | 1 +
 src/modules/ecore_evas/engines/win32/ecore_evas_win32.c   | 1 +
 src/modules/ecore_evas/engines/x/ecore_evas_x.c   | 8 
 11 files changed, 21 insertions(+)

diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h
index 062c8a2..d1572f0 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -366,6 +366,9 @@ extern Eo *_ecore_parent;
 #define ECORE_PARENT_CLASS ecore_parent_class_get()
 EAPI const Eo_Class *ecore_parent_class_get(void) EINA_CONST;
 
+// access to direct input cb
+#define ECORE_EVAS_INTERNAL
+
 #undef EAPI
 #define EAPI
 
diff --git a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c 
b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
index 7c70599..2e8e709 100644
--- a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
+++ b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
@@ -762,6 +762,7 @@ ecore_evas_cocoa_new_internal(Ecore_Cocoa_Window *parent 
EINA_UNUSED, int x, int

(Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,

(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,

(Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
+   _ecore_event_window_direct_cb_set(ee->prop.window, 
_ecore_evas_input_direct_cb);
 
evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long 
long)(ecore_time_get() * 1000.0) & 0x), NULL);
ecore_evases = eina_list_append(ecore_evases, ee);
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c 
b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index e14254b..6c60cd7 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -770,6 +770,7 @@ ecore_evas_drm_new_internal(const char *device, unsigned 
int parent EINA_UNUSED,

(Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,

(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,

(Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
+   _ecore_event_window_direct_cb_set(ee->prop.window, 
_ecore_evas_input_direct_cb);
 
ecore_drm2_output_crtc_size_get(edata->output, , );
 
diff --git a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c 
b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
index bd34e3c..3ab06bb 100644
--- a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
+++ b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
@@ -744,6 +744,7 @@ ecore_evas_fb_new_internal(const char *disp_name, int 
rotation, int w, int h)
   
(Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
   
(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
   
(Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);  
+   _ecore_event_window_direct_cb_set(1, _ecore_evas_input_direct_cb);
evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long 
long)(ecore_time_get() * 1000.0) & 0x), NULL);
return ee;
 }
diff --git a/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c 
b/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
index 6235068..bd34e19 100644
--- a/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
+++ b/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
@@ -544,6 +544,7 @@ ecore_evas_psl1ght_new_internal(const char *name, int w, 
int h)

(Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,

(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
   

[EGIT] [core/efl] master 22/29: Evas events: Split pointer events

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0a27c78a33473c656cf8a9c8b98c83d2fb56b55f

commit 0a27c78a33473c656cf8a9c8b98c83d2fb56b55f
Author: Jean-Philippe Andre 
Date:   Mon May 30 20:53:07 2016 +0900

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.
---
 src/Makefile_Efl.am   |  1 +
 src/lib/ecore_evas/ecore_evas.c   | 31 ---
 src/lib/efl/Efl.h |  1 +
 src/lib/efl/interfaces/efl_gfx.eo |  4 ---
 src/lib/efl/interfaces/efl_input_interface.eo | 17 +
 src/lib/efl/interfaces/efl_interfaces_main.c  |  1 +
 src/lib/elementary/elm_win.c  | 10 ++--
 src/lib/elementary/elm_win.eo |  2 +-
 src/lib/evas/canvas/evas_callbacks.c  | 36 +--
 src/lib/evas/canvas/evas_canvas.eo|  4 +--
 src/lib/evas/canvas/evas_events.c | 17 -
 src/lib/evas/canvas/evas_events_legacy.c  |  9 ---
 src/lib/evas/canvas/evas_object.eo|  4 ++-
 13 files changed, 90 insertions(+), 47 deletions(-)

diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index 506b683..09efe76 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -40,6 +40,7 @@ efl_eolian_files = \
   lib/efl/interfaces/efl_ui_spin.eo \
   lib/efl/interfaces/efl_ui_progress.eo \
   lib/efl/interfaces/efl_event.eo \
+  lib/efl/interfaces/efl_input_interface.eo \
   lib/efl/interfaces/efl_input_state.eo \
   $(efl_eolian_legacy_files) \
   $(NULL)
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index ba954d4..67640fc 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4314,6 +4314,29 @@ _pointer_position_set(Efl_Pointer_Event_Data *ev, 
Ecore_Evas *ee, int x, int y,
  EVENT_XY_SET(ev, y, ee->w + fh - x - 1, y, ee->w + fh - mx - 1, fx, fy);
 }
 
+static const Eo_Event_Description *
+_event_description_get(Efl_Pointer_Action action)
+{
+   switch (action)
+ {
+  case EFL_POINTER_ACTION_MOVE:
+return EFL_EVENT_POINTER_MOVE;
+  case EFL_POINTER_ACTION_DOWN:
+return EFL_EVENT_POINTER_DOWN;
+  case EFL_POINTER_ACTION_UP:
+return EFL_EVENT_POINTER_UP;
+  case EFL_POINTER_ACTION_CANCEL:
+return EFL_EVENT_POINTER_CANCEL;
+  case EFL_POINTER_ACTION_IN:
+return EFL_EVENT_POINTER_IN;
+  case EFL_POINTER_ACTION_OUT:
+return EFL_EVENT_POINTER_OUT;
+  case EFL_POINTER_ACTION_WHEEL:
+return EFL_EVENT_POINTER_WHEEL;
+  default: return NULL;
+ }
+}
+
 static Eina_Bool
 _direct_mouse_updown(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info, 
Efl_Pointer_Action action)
 {
@@ -4347,7 +4370,7 @@ _direct_mouse_updown(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Button *info, Efl_P
ev->pressure = info->multi.pressure;
ev->angle = info->multi.angle - ee->rotation;
 
-   eo_event_callback_call(e, EVAS_CANVAS_EVENT_POINTER, evt);
+   eo_event_callback_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
eo_unref(evt);
 
@@ -4403,7 +4426,7 @@ _direct_mouse_move_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Move *info)
ev->pressure = info->multi.pressure;
ev->angle = info->multi.angle - ee->rotation;
 
-   eo_event_callback_call(e, EVAS_CANVAS_EVENT_POINTER, evt);
+   eo_event_callback_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
eo_unref(evt);
 
@@ -4435,7 +4458,7 @@ _direct_mouse_wheel_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Wheel *info)
ev->wheel.z = info->z;
ev->wheel.dir = info->direction ? EFL_ORIENT_HORIZONTAL : 
EFL_ORIENT_VERTICAL;
 
-   eo_event_callback_call(e, EVAS_CANVAS_EVENT_POINTER, evt);
+   eo_event_callback_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
eo_unref(evt);
 
@@ -4462,7 +4485,7 @@ _direct_mouse_inout(Ecore_Evas *ee, const 
Ecore_Event_Mouse_IO *info, Efl_Pointe
ev->timestamp = info->timestamp;
_pointer_position_set(ev, ee, info->x, info->y, info->x, info->y);
 
-   eo_event_callback_call(e, EVAS_CANVAS_EVENT_POINTER, evt);
+   eo_event_callback_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
eo_unref(evt);
 
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index dda8293..7d8d55b 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -129,6 +129,7 @@ static inline void efl_gfx_color16_type_set(Efl_Gfx_Color 
*color,
 #include 

[EGIT] [core/efl] master 29/29: Evas: Add proper EO events with info for mouse inputs

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b8d1db365b86c8c0a7d98fa021e377419e563b60

commit b8d1db365b86c8c0a7d98fa021e377419e563b60
Merge: 5e90b86 b0a32b0
Author: Jean-Philippe Andre 
Date:   Tue May 31 19:08:37 2016 +0900

Evas: Add proper EO events with info for mouse inputs

This adds a few classes, in particular Efl.Event and Efl.Event.Point
which are used as the event info for all pointer (mouse, multi) call

Using an eo object as event info will allow for future extensions
really easily. We don't need to expose any of the internals, also
a single type can be used for all pointer events.

Still TODO:
 - Keyboard events (urgent)
 - Axis / Joystick events (needs porting from Tizen)
 - Gestures support (probably later)
 - Event feeding from app side (manual feed)

Not going to be ported to EO:
 - Hold API and hold event. Seems barely used.

The new APIs are not very much tested at this point, and rely on the
old legacy event system. The most important thing right now is to
ensure that nothing was broken so far. Unfortunately I can only do
this much testing myself...

Merge branch 'devs/jpeg/work'

 src/Makefile_Efl.am|  10 +-
 src/Makefile_Evas.am   |   3 +
 src/lib/ecore/ecore_private.h  |   3 +
 src/lib/ecore_evas/ecore_evas.c| 275 +++
 src/lib/ecore_evas/ecore_evas_private.h|   1 +
 src/lib/ecore_input_evas/Ecore_Input_Evas.h|   5 +
 src/lib/ecore_input_evas/ecore_input_evas.c| 181 +++--
 src/lib/efl/Efl.h  |   9 +
 src/lib/efl/interfaces/efl_common_internal.h   |  70 ++
 src/lib/efl/interfaces/efl_event.eo|  37 +
 src/lib/efl/interfaces/efl_event_types.eot |  35 +
 src/lib/efl/interfaces/efl_input_device.c  | 106 +++
 src/lib/efl/interfaces/efl_input_device.eo |  90 +++
 src/lib/efl/interfaces/efl_input_interface.eo  |  17 +
 src/lib/efl/interfaces/efl_input_state.eo  |  27 +
 src/lib/efl/interfaces/efl_interfaces_main.c   |   5 +
 src/lib/elementary/elm_widget.eo   |   3 +-
 src/lib/elementary/elm_win.c   |  37 +
 src/lib/elementary/elm_win.eo  |   7 +-
 src/lib/evas/Evas_Common.h |  75 +-
 src/lib/evas/Evas_Eo.h |   2 +
 src/lib/evas/Evas_Legacy.h | 211 ++
 src/lib/evas/canvas/efl_event_pointer.c| 401 +++
 src/lib/evas/canvas/efl_event_pointer.eo   | 173 +
 src/lib/evas/canvas/evas_callbacks.c   |  92 ++-
 src/lib/evas/canvas/evas_canvas.eo | 336 +
 src/lib/evas/canvas/evas_device.c  | 259 ---
 src/lib/evas/canvas/evas_events.c  | 789 ++---
 src/lib/evas/canvas/evas_events_legacy.c   | 448 
 src/lib/evas/canvas/evas_main.c|   3 +
 src/lib/evas/canvas/evas_object.eo |   4 +-
 src/lib/evas/canvas/evas_types.eot |  18 -
 src/lib/evas/include/evas_private.h|  23 +-
 .../ecore_evas/engines/cocoa/ecore_evas_cocoa.c|   1 +
 .../ecore_evas/engines/drm/ecore_evas_drm.c|   1 +
 src/modules/ecore_evas/engines/fb/ecore_evas_fb.c  |   1 +
 .../engines/psl1ght/ecore_evas_psl1ght.c   |   1 +
 .../ecore_evas/engines/sdl/ecore_evas_sdl.c|   1 +
 .../engines/wayland/ecore_evas_wayland_egl.c   |   1 +
 .../engines/wayland/ecore_evas_wayland_private.h   |   2 +
 .../engines/wayland/ecore_evas_wayland_shm.c   |   1 +
 .../ecore_evas/engines/win32/ecore_evas_win32.c|   1 +
 src/modules/ecore_evas/engines/x/ecore_evas_x.c|  73 +-
 43 files changed, 2981 insertions(+), 857 deletions(-)

-- 




[EGIT] [core/efl] master 05/29: Evas: Extend pointer events and add legacy conversion routines

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ea8c6e5632beb4c5cf1e445473ca85b0135a4aa9

commit ea8c6e5632beb4c5cf1e445473ca85b0135a4aa9
Author: Jean-Philippe Andre 
Date:   Tue May 10 21:26:07 2016 +0900

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.
---
 src/Makefile_Evas.am |   1 +
 src/lib/efl/interfaces/efl_common_internal.h |  36 +--
 src/lib/efl/interfaces/efl_event.eo  |   3 +
 src/lib/efl/interfaces/efl_pointer_event.c   | 130 --
 src/lib/efl/interfaces/efl_pointer_event.eo  |  31 ++-
 src/lib/elementary/elm_win.eo|   2 +-
 src/lib/evas/canvas/evas_canvas.eo   |  14 +-
 src/lib/evas/canvas/evas_events.c|  69 +-
 src/lib/evas/canvas/evas_events_legacy.c | 349 +++
 src/lib/evas/canvas/evas_main.c  |   3 +
 src/lib/evas/include/evas_private.h  |   7 +
 11 files changed, 592 insertions(+), 53 deletions(-)

diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 19fea04..e9ee137 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -152,6 +152,7 @@ lib/evas/canvas/evas_common_interface.c \
 lib/evas/canvas/evas_data.c \
 lib/evas/canvas/evas_device.c \
 lib/evas/canvas/evas_events.c \
+lib/evas/canvas/evas_events_legacy.c \
 lib/evas/canvas/evas_focus.c \
 lib/evas/canvas/evas_key.c \
 lib/evas/canvas/evas_key_grab.c \
diff --git a/src/lib/efl/interfaces/efl_common_internal.h 
b/src/lib/efl/interfaces/efl_common_internal.h
index 32d5471..d2467d2 100644
--- a/src/lib/efl/interfaces/efl_common_internal.h
+++ b/src/lib/efl/interfaces/efl_common_internal.h
@@ -23,19 +23,27 @@ typedef struct _Efl_Input_State_Data
Efl_Input_State_Data;
 //typedef struct _Evas_Lock Evas_Lock;
 #endif
 
+struct _Efl_Input_State_Data
+{
+   Eo *eo;
+   /* FIXME / TODO  */
+//   Evas_Modifier  *modifiers;
+//   Evas_Lock  *locks;
+};
+
 struct _Efl_Pointer_Event_Data
 {
Eo *eo;
unsigned inttimestamp; /* FIXME: store as double? */
int button;
unsigned intpressed_buttons;
+   int finger;
+   double  radius, radius_x, radius_y;
+   double  pressure;
+   double  angle;
struct {
-  struct {
- int   x, y;
-  } output;
-  struct {
- int   x, y;
-  } canvas;
+  int  x, y;
+  double   xsub, ysub; // couldn't we just cast from double to int?
} cur, prev;
struct {
   Efl_Orient   dir;
@@ -48,17 +56,11 @@ struct _Efl_Pointer_Event_Data
Efl_Pointer_Event_Flags event_flags;
void   *data; /* evas data - whatever that is */
const Eo_Event_Description *event_desc;
-   //Efl_Input_Statestate;
-};
-
-struct _Efl_Input_State_Data
-{
-   Eo *eo;
-   /* FIXME / TODO  */
-#if 0
-   Evas_Modifier  *modifiers;
-   Evas_Lock  *locks;
-#endif
+   Eina_Bool   window_pos; /* true if positions are 
window-relative
+  (see input vs. feed: this is 
"input") */
+   //Efl_Input_State*state;
+   void   *legacy; /* DO NOT TOUCH */
+   Eina_Bool   evas_done; /* set by evas */
 };
 
 struct _Efl_Input_Device_Data
diff --git a/src/lib/efl/interfaces/efl_event.eo 
b/src/lib/efl/interfaces/efl_event.eo
index 076bc15..f00a047 100644
--- a/src/lib/efl/interfaces/efl_event.eo
+++ b/src/lib/efl/interfaces/efl_event.eo
@@ -34,5 +34,8 @@ interface Efl.Event
 type: const(Eo_Event_Description)*;
  }
   }
+  reset {
+ [[Resets the internal data to 0 or default values.]]
+  }
}
 }
diff --git a/src/lib/efl/interfaces/efl_pointer_event.c 
b/src/lib/efl/interfaces/efl_pointer_event.c
index 7e47902..b55da3f 100644
--- a/src/lib/efl/interfaces/efl_pointer_event.c
+++ b/src/lib/efl/interfaces/efl_pointer_event.c
@@ -20,15 +20,78 @@
  * Do not add any logic here.
  */
 
+static Efl_Pointer_Event *s_cached_event = NULL;
+
+static void
+_del_hook(Eo *evt)
+{
+   if (!s_cached_event)
+ {
+if (eo_parent_get(evt))
+  {
+ eo_ref(evt);
+ eo_parent_set(evt, NULL);
+  }
+s_cached_event = evt;
+ }
+   else
+ {
+eo_del_intercept_set(evt, NULL);
+eo_unref(evt);
+ }
+}
+
+EOLIAN static Efl_Pointer_Event *
+_efl_pointer_event_instance_get(Eo_Class *klass EINA_UNUSED, void *pd 
EINA_UNUSED,
+Eo *owner, void **priv)
+{
+   Efl_Pointer_Event *evt;
+
+   if (s_cached_event)
+ {
+evt = s_cached_event;
+s_cached_event = NULL;
+efl_event_reset(evt);
+eo_parent_set(evt, owner);
+ }
+   else
+ {
+evt = 

[EGIT] [core/efl] master 24/29: Evas events: Store position as double only

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4381d3a8242f5e36597cdc127d6afbe427f9e011

commit 4381d3a8242f5e36597cdc127d6afbe427f9e011
Author: Jean-Philippe Andre 
Date:   Tue May 31 12:15:25 2016 +0900

Evas events: Store position as double only

This splits pixel and subpixel precision by using
different methods rather than two different storage values.
---
 src/lib/ecore_evas/ecore_evas.c  | 25 +++-
 src/lib/efl/interfaces/efl_common_internal.h |  3 +-
 src/lib/evas/canvas/efl_pointer_event.c  | 38 +++-
 src/lib/evas/canvas/efl_pointer_event.eo | 24 +--
 src/lib/evas/canvas/evas_events.c|  6 ++--
 src/lib/evas/canvas/evas_events_legacy.c | 44 
 6 files changed, 79 insertions(+), 61 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 67640fc..3e772dc 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4291,27 +4291,24 @@ ecore_evas_psl1ght_new(const char* name, int w, int h)
  *  3. let evas send legacy & eo events to the objects
  */
 
-#define EVENT_XY_SET(EV, X, Y, MX, MY, FX, FY) do { \
-   EV->cur.x = (X) - (FX); EV->cur.xsub = (MX) - (FX); \
-   EV->cur.y = (Y) - (FY); EV->cur.ysub = (MY) - (FY); \
+#define EVENT_XY_SET(EV, MX, MY, FX, FY) do { \
+   EV->cur.x = (MX) - (FX); EV->cur.y = (MY) - (FY); \
} while (0)
 
 static inline void
-_pointer_position_set(Efl_Pointer_Event_Data *ev, Ecore_Evas *ee, int x, int 
y, double mx, double my)
+_pointer_position_set(Efl_Pointer_Event_Data *ev, Ecore_Evas *ee, double mx, 
double my)
 {
int fx, fy, fw, fh;
 
evas_output_framespace_get(ee->evas, , , , );
if (ee->rotation == 0)
- EVENT_XY_SET(ev, x, y, mx, my, fx, fy);
+ EVENT_XY_SET(ev, mx, my, fx, fy);
else if (ee->rotation == 90)
- EVENT_XY_SET(ev, ee->h + fw - y - 1, x, ee->h + fw - my - 1, mx, fx, fy);
+ EVENT_XY_SET(ev, ee->h + fw - my - 1, mx, fx, fy);
else if (ee->rotation == 180)
- EVENT_XY_SET(ev, ee->w + fw - x - 1, ee->h + fh - y - 1,
-  ee->w + fw - mx - 1, ee->h + fh - my - 1,
-  fx, fy);
+ EVENT_XY_SET(ev, ee->w + fw - mx - 1, ee->h + fh - my - 1, fx, fy);
else if (ee->rotation == 270)
- EVENT_XY_SET(ev, y, ee->w + fh - x - 1, y, ee->w + fh - mx - 1, fx, fy);
+ EVENT_XY_SET(ev, my, ee->w + fh - mx - 1, fx, fy);
 }
 
 static const Eo_Event_Description *
@@ -4363,7 +4360,7 @@ _direct_mouse_updown(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Button *info, Efl_P
if (info->triple_click) ev->button_flags |= 
EFL_POINTER_BUTTON_FLAGS_TRIPLE_CLICK;
ev->timestamp = info->timestamp;
ev->finger = info->multi.device;
-   _pointer_position_set(ev, ee, info->x, info->y, info->multi.x, 
info->multi.y);
+   _pointer_position_set(ev, ee, info->multi.x, info->multi.y);
ev->radius = info->multi.radius;
ev->radius_x = info->multi.radius_x;
ev->radius_y = info->multi.radius_y;
@@ -4418,7 +4415,7 @@ _direct_mouse_move_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Move *info)
ev->action = EFL_POINTER_ACTION_MOVE;
ev->timestamp = info->timestamp;
ev->finger = info->multi.device;
-   _pointer_position_set(ev, ee, info->x, info->y, info->multi.x, 
info->multi.y);
+   _pointer_position_set(ev, ee, info->multi.x, info->multi.y);
 
ev->radius = info->multi.radius;
ev->radius_x = info->multi.radius_x;
@@ -4454,7 +4451,7 @@ _direct_mouse_wheel_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Wheel *info)
 
ev->action = EFL_POINTER_ACTION_WHEEL;
ev->timestamp = info->timestamp;
-   _pointer_position_set(ev, ee, info->x, info->y, info->x, info->y);
+   _pointer_position_set(ev, ee, info->x, info->y);
ev->wheel.z = info->z;
ev->wheel.dir = info->direction ? EFL_ORIENT_HORIZONTAL : 
EFL_ORIENT_VERTICAL;
 
@@ -4483,7 +4480,7 @@ _direct_mouse_inout(Ecore_Evas *ee, const 
Ecore_Event_Mouse_IO *info, Efl_Pointe
 
ev->action = action;
ev->timestamp = info->timestamp;
-   _pointer_position_set(ev, ee, info->x, info->y, info->x, info->y);
+   _pointer_position_set(ev, ee, info->x, info->y);
 
eo_event_callback_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
diff --git a/src/lib/efl/interfaces/efl_common_internal.h 
b/src/lib/efl/interfaces/efl_common_internal.h
index 32ddb12..4e02451 100644
--- a/src/lib/efl/interfaces/efl_common_internal.h
+++ b/src/lib/efl/interfaces/efl_common_internal.h
@@ -33,8 +33,7 @@ struct _Efl_Pointer_Event_Data
double  pressure;
double  angle;
struct {
-  int  x, y;
-  double   xsub, ysub; // couldn't we just cast from double to int?
+  double   x, y;
} cur, prev;
struct {
   Efl_Orient   dir;
diff --git a/src/lib/evas/canvas/efl_pointer_event.c 
b/src/lib/evas/canvas/efl_pointer_event.c

[EGIT] [core/efl] master 13/29: evas_events: Propagate more eo pointer events

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1c739cada9a82d9cc4cdb67a38114f8e1cb8591e

commit 1c739cada9a82d9cc4cdb67a38114f8e1cb8591e
Author: Jean-Philippe Andre 
Date:   Wed May 11 20:26:07 2016 +0900

evas_events: Propagate more eo pointer events

This covers mouse in,out,cancel. Axis (joystick) is still
todo.
---
 src/lib/ecore_evas/ecore_evas.c   | 78 +--
 src/lib/evas/canvas/evas_events.c | 20 +++---
 2 files changed, 66 insertions(+), 32 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index ce17903..7f25117 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4291,18 +4291,6 @@ ecore_evas_psl1ght_new(const char* name, int w, int h)
  *  3. let evas send legacy & eo events to the objects
  */
 
-static Eina_Bool
-_direct_key_down_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Key *info 
EINA_UNUSED)
-{
-   return EINA_FALSE;
-}
-
-static Eina_Bool
-_direct_key_up_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Key *info 
EINA_UNUSED)
-{
-   return EINA_FALSE;
-}
-
 #define EVENT_XY_SET(EV, X, Y, MX, MY, FX, FY) do { \
EV->cur.x = (X) - (FX); EV->cur.xsub = (MX) - (FX); \
EV->cur.y = (Y) - (FY); EV->cur.ysub = (MY) - (FY); \
@@ -4379,10 +4367,9 @@ _direct_mouse_up_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Button *info)
 }
 
 static Eina_Bool
-_direct_mouse_cancel_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Button *info EINA_UNUSED)
+_direct_mouse_cancel_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info)
 {
-   /* TODO: Add cancel event type. */
-   return EINA_FALSE;
+   return _direct_mouse_updown(ee, info, EFL_POINTER_ACTION_CANCEL);
 }
 
 static Eina_Bool
@@ -4457,16 +,53 @@ _direct_mouse_wheel_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Wheel *info)
 }
 
 static Eina_Bool
-_direct_mouse_in_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_IO 
*info EINA_UNUSED)
+_direct_mouse_inout(Ecore_Evas *ee, const Ecore_Event_Mouse_IO *info, 
Efl_Pointer_Action action)
+{
+   Efl_Pointer_Event_Data *ev;
+   Efl_Pointer_Event *evt;
+   Evas *e = ee->evas;
+   Eina_Bool processed;
+
+   /* Unused information:
+* event_window
+* modifiers
+*/
+
+   evt = efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, e, (void **) 
);
+   if (!evt) return EINA_FALSE;
+
+   ev->action = action;
+   ev->timestamp = info->timestamp;
+   _pointer_position_set(ev, ee, info->x, info->y, info->x, info->y);
+
+   eo_event_callback_call(e, EVAS_CANVAS_EVENT_POINTER, evt);
+   processed = ev->evas_done;
+   eo_del(evt);
+
+   return processed;
+}
+
+static Eina_Bool
+_direct_mouse_in_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_IO *info)
+{
+   return _direct_mouse_inout(ee, info, EFL_POINTER_ACTION_IN);
+}
+
+static Eina_Bool
+_direct_mouse_out_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_IO *info)
+{
+   return _direct_mouse_inout(ee, info, EFL_POINTER_ACTION_OUT);
+}
+
+static Eina_Bool
+_direct_key_down_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Key *info 
EINA_UNUSED)
 {
-   /* TODO: Add mouse in event type. */
return EINA_FALSE;
 }
 
 static Eina_Bool
-_direct_mouse_out_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_IO 
*info EINA_UNUSED)
+_direct_key_up_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Key *info 
EINA_UNUSED)
 {
-   /* TODO: Add mouse out event type. */
return EINA_FALSE;
 }
 
@@ -4482,24 +4506,24 @@ _ecore_evas_input_direct_cb(void *window, int type, 
const void *info)
 {
Ecore_Evas *ee = window;
 
-   if (type == ECORE_EVENT_KEY_DOWN)
- return _direct_key_down_cb(ee, (const Ecore_Event_Key *) info);
-   else if (type == ECORE_EVENT_KEY_UP)
- return _direct_key_up_cb(ee, (const Ecore_Event_Key *) info);
+   if (type == ECORE_EVENT_MOUSE_MOVE)
+ return _direct_mouse_move_cb(ee, (const Ecore_Event_Mouse_Move *) info);
else if (type == ECORE_EVENT_MOUSE_BUTTON_DOWN)
  return _direct_mouse_down_cb(ee, (const Ecore_Event_Mouse_Button *) info);
else if (type == ECORE_EVENT_MOUSE_BUTTON_UP)
  return _direct_mouse_up_cb(ee, (const Ecore_Event_Mouse_Button *) info);
-   else if (type == ECORE_EVENT_MOUSE_BUTTON_CANCEL)
- return _direct_mouse_cancel_cb(ee, (const Ecore_Event_Mouse_Button *) 
info);
-   else if (type == ECORE_EVENT_MOUSE_MOVE)
- return _direct_mouse_move_cb(ee, (const Ecore_Event_Mouse_Move *) info);
else if (type == ECORE_EVENT_MOUSE_WHEEL)
  return _direct_mouse_wheel_cb(ee, (const Ecore_Event_Mouse_Wheel *) info);
else if (type == ECORE_EVENT_MOUSE_IN)
  return _direct_mouse_in_cb(ee, (const Ecore_Event_Mouse_IO *) info);
else if (type == ECORE_EVENT_MOUSE_OUT)
  return _direct_mouse_out_cb(ee, (const Ecore_Event_Mouse_IO *) info);
+   else if (type == ECORE_EVENT_KEY_DOWN)
+ return _direct_key_down_cb(ee, (const Ecore_Event_Key *) info);
+   else if (type == 

[EGIT] [core/efl] master 03/29: Evas.Canvas: Move some event_feed to legacy

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fb35171186a54489e68db926f96cc8ad440f9eb0

commit fb35171186a54489e68db926f96cc8ad440f9eb0
Author: Jean-Philippe Andre 
Date:   Thu Apr 28 18:43:18 2016 +0900

Evas.Canvas: Move some event_feed to legacy

Paving the way to Efl.Pointer.Event...
---
 src/lib/efl/interfaces/efl_pointer_event.eo |  4 +-
 src/lib/evas/Evas_Legacy.h  | 71 +++
 src/lib/evas/canvas/evas_canvas.eo  | 89 +++--
 src/lib/evas/canvas/evas_events.c   | 36 
 4 files changed, 107 insertions(+), 93 deletions(-)

diff --git a/src/lib/efl/interfaces/efl_pointer_event.eo 
b/src/lib/efl/interfaces/efl_pointer_event.eo
index c845065..ecc955f 100644
--- a/src/lib/efl/interfaces/efl_pointer_event.eo
+++ b/src/lib/efl/interfaces/efl_pointer_event.eo
@@ -93,7 +93,7 @@ class Efl.Pointer.Event (Eo.Base, Efl.Event)
   @property device {
  [[Pointing device that originated this event.]]
  values {
-dev: Efl.Input.Device*;
+dev: Efl.Input.Device;
  }
   }
   @property source {
@@ -101,7 +101,7 @@ class Efl.Pointer.Event (Eo.Base, Efl.Event)
propagation or repetition of the event.
  ]]
  values {
-src: Efl.Gfx*;
+src: Efl.Gfx;
  }
   }
   /* FIXME: why not double_click() and triple_click() */
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index d5f9388..c1354e5 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -336,6 +336,77 @@ EAPI int  evas_event_freeze_get(const Evas *e) 
EINA_WARN_UNUSED_RESU
  * out on new objects if the state change demands it.
  */
 EAPI void evas_event_thaw_eval(Evas *e) EINA_ARG_NONNULL(1);
+
+/**
+ * @brief Mouse move event feed.
+ *
+ * This function will set some evas properties that is necessary when the mouse
+ * is moved from its last position. It prepares information to be treated by
+ * the callback function.
+ *
+ * @param[in] y The vertical position of the mouse pointer.
+ * @param[in] timestamp The timestamp of the mouse up event.
+ * @param[in] data The data for canvas.
+ */
+EAPI void evas_event_feed_mouse_move(Evas *obj, int x, int y, 
unsigned int timestamp, const void *data);
+
+/**
+ * @brief Mouse move event feed from input.
+ *
+ * Similar to the @ref evas_event_feed_mouse_move, this function will inform
+ * Evas about mouse move events which were received by the input system,
+ * relative to the 0,0 of the window, not to the canvas 0,0. It will take care
+ * of doing any special transformation like adding the framespace offset to the
+ * mouse event.
+ *
+ * @param[in] y The vertical position of the mouse pointer relative to the 0,0
+ * of the window/surface.
+ * @param[in] timestamp The timestamp of the mouse move event.
+ * @param[in] data The data for canvas.
+ *
+ * @since 1.8
+ */
+EAPI void evas_event_input_mouse_move(Evas *obj, int x, int y, 
unsigned int timestamp, const void *data);
+
+/**
+ * @brief Mouse up event feed.
+ *
+ * This function will set some evas properties that is necessary when the mouse
+ * button is released. It prepares information to be treated by the callback
+ * function.
+ *
+ * @param[in] flags Evas button flags.
+ * @param[in] timestamp The timestamp of the mouse up event.
+ * @param[in] data The data for canvas.
+ */
+EAPI void evas_event_feed_mouse_up(Evas *obj, int b, 
Evas_Button_Flags flags, unsigned int timestamp, const void *data);
+
+/**
+ * @brief Mouse down event feed.
+ *
+ * This function will set some evas properties that is necessary when the mouse
+ * button is pressed. It prepares information to be treated by the callback
+ * function.
+ *
+ * @param[in] flags Evas button flags.
+ * @param[in] timestamp The timestamp of the mouse up event.
+ * @param[in] data The data for canvas.
+ */
+EAPI void evas_event_feed_mouse_down(Evas *obj, int b, 
Evas_Button_Flags flags, unsigned int timestamp, const void *data);
+
+/**
+ * @brief Mouse wheel event feed.
+ *
+ * This function will set some evas properties that is necessary when the mouse
+ * wheel is scrolled up or down. It prepares information to  be treated by the
+ * callback function.
+ *
+ * @param[in] z How much mouse wheel was scrolled up or down.
+ * @param[in] timestamp The timestamp of the mouse up event.
+ * @param[in] data The data for canvas.
+ */
+EAPI void evas_event_feed_mouse_wheel(Evas *obj, int direction, 
int z, unsigned int timestamp, const void *data);
+
 /**
  * @}
  */
diff --git a/src/lib/evas/canvas/evas_canvas.eo 
b/src/lib/evas/canvas/evas_canvas.eo
index 9bcfe40..dca90e3 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -503,8 +503,7 @@ class Evas.Canvas (Eo.Base, 

[EGIT] [core/efl] master 27/29: Evas events: Fix a crash

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9b4a6ba6390a212523701f91f10b110ca8a812ff

commit 9b4a6ba6390a212523701f91f10b110ca8a812ff
Author: Jean-Philippe Andre 
Date:   Tue May 31 14:58:23 2016 +0900

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
---
 src/lib/evas/canvas/evas_events.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index 821b0e7..ffb58e3 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -1295,6 +1295,7 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const 
void *data,
   }
  }
_evas_post_event_callback_call(eo_e, e);
+   EV_DEL(pe);
 
eina_list_free(copy);
 

-- 




[EGIT] [core/efl] master 04/29: Evas: Fix compilation warnings (enum implicit cast)

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c06cdadca28db6c4547562b2f577a2c21452d24e

commit c06cdadca28db6c4547562b2f577a2c21452d24e
Author: Jean-Philippe Andre 
Date:   Fri Apr 29 14:24:14 2016 +0900

Evas: Fix compilation warnings (enum implicit cast)

Moving enums to Efl renames them but keeps the value the same.
---
 src/Makefile_Efl.am  |  1 +
 src/lib/efl/Efl.h|  2 ++
 src/lib/efl/interfaces/efl_common_internal.h |  4 ++--
 src/lib/efl/interfaces/efl_event_types.eot   | 33 ++
 src/lib/efl/interfaces/efl_pointer_event.eo  | 35 +---
 src/lib/elementary/elm_widget.eo |  3 ++-
 src/lib/evas/Evas_Common.h   | 12 ++
 src/lib/evas/canvas/evas_canvas.eo   | 11 +
 src/lib/evas/canvas/evas_types.eot   | 18 --
 9 files changed, 59 insertions(+), 60 deletions(-)

diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index a770039..b8c2834 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -46,6 +46,7 @@ efl_eolian_files = \
 
 efl_eolian_type_files = \
lib/efl/interfaces/efl_gfx_types.eot \
+   lib/efl/interfaces/efl_event_types.eot \
lib/efl/interfaces/efl_types.eot \
$(NULL)
 
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index a71d17b..2d25714 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -126,6 +126,7 @@ static inline void efl_gfx_color16_type_set(Efl_Gfx_Color 
*color,
 #include "interfaces/efl_pack_grid.eo.h"
 
 /* Input events */
+#include "interfaces/efl_event_types.eot.h"
 #include "interfaces/efl_input_device.eo.h"
 //#include "interfaces/efl_input_state.eo.h"
 #include "interfaces/efl_event.eo.h"
@@ -135,6 +136,7 @@ static inline void efl_gfx_color16_type_set(Efl_Gfx_Color 
*color,
 
 #ifndef EFL_NOLEGACY_API_SUPPORT
 #include "interfaces/efl_gfx_types.eot.h"
+#include "interfaces/efl_event_types.eot.h"
 #include "interfaces/efl_gfx_fill.eo.legacy.h"
 #include "interfaces/efl_gfx.eo.legacy.h"
 #include "interfaces/efl_image.eo.legacy.h"
diff --git a/src/lib/efl/interfaces/efl_common_internal.h 
b/src/lib/efl/interfaces/efl_common_internal.h
index aa95689..32d5471 100644
--- a/src/lib/efl/interfaces/efl_common_internal.h
+++ b/src/lib/efl/interfaces/efl_common_internal.h
@@ -19,8 +19,8 @@ typedef struct _Efl_Input_State_DataEfl_Input_State_Data;
 
 #ifndef _EVAS_TYPES_EOT_H_
 /* FIXME */
-typedef struct _Evas_Modifier Evas_Modifier;
-typedef struct _Evas_Lock Evas_Lock;
+//typedef struct _Evas_Modifier Evas_Modifier;
+//typedef struct _Evas_Lock Evas_Lock;
 #endif
 
 struct _Efl_Pointer_Event_Data
diff --git a/src/lib/efl/interfaces/efl_event_types.eot 
b/src/lib/efl/interfaces/efl_event_types.eot
new file mode 100644
index 000..9152a0d
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_event_types.eot
@@ -0,0 +1,33 @@
+/* FIXME: Do we need this? Or just use the Eo Event Description as a type? */
+enum Efl.Pointer.Action
+{
+   [[Pointer event type.
+
+ @since 1.18
+   ]]
+   none,[[Not a valid event.]]
+   mouse_move,  [[Mouse or equivalent pointer moved.]]
+   mouse_down,  [[Mouse button pressed down.]]
+   mouse_up,[[Mouse button released.]]
+   mouse_wheel, [[Mouse wheel scroll, horizontally or vertically.]]
+   touch_move,  [[Finger moved while touching surface.]]
+   touch_down,  [[Finger touch made contact.]]
+   touch_up,[[Finger touch released.]]
+   hover,   [[A hovering movement over a distance-sensitive touch screen.]]
+}
+
+enum Efl.Pointer.Button_Flags
+{
+   /* Evas.Button_Flags */
+   none = 0,[[No extra mouse button data]]
+   double_click = (1 << 0), [[This mouse button press was the 2nd press of a 
double click]]
+   triple_click = (1 << 1), [[This mouse button press was the 3rd press of a 
triple click]]
+}
+
+enum Efl.Pointer.Event_Flags
+{
+   /* Evas.Event_Flags */
+   none = 0, [[No fancy flags set]]
+   on_hold = (1 << 0),   [[This event is being delivered but should be put "on 
hold" until the on hold flag is unset. The event should be used for 
informational purposes and maybe some indications visually, but not actually 
perform anything]]
+   on_scroll = (1 << 1), [[This event flag indicates the event occurs while 
scrolling; for example, DOWN event occurs during scrolling; the event should be 
used for informational purposes and maybe some indications visually, but not 
actually perform anything]]
+}
diff --git a/src/lib/efl/interfaces/efl_pointer_event.eo 
b/src/lib/efl/interfaces/efl_pointer_event.eo
index ecc955f..2ee4625 100644
--- a/src/lib/efl/interfaces/efl_pointer_event.eo
+++ b/src/lib/efl/interfaces/efl_pointer_event.eo
@@ -1,38 +1,5 @@
 import efl_orientation;
-
-/* FIXME: Do we need this? Or just use the Eo Event Description as a type? */
-enum Efl.Pointer.Action
-{
-   [[Pointer event type.
-
- 

[EGIT] [core/efl] master 23/29: Efl event: Remove useless method declaration

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=02716d03c88e48fed609a39cc11e2024d3f033af

commit 02716d03c88e48fed609a39cc11e2024d3f033af
Author: Jean-Philippe Andre 
Date:   Tue May 31 11:17:08 2016 +0900

Efl event: Remove useless method declaration
---
 src/lib/efl/interfaces/efl_event.eo  |  8 
 src/lib/evas/canvas/efl_pointer_event.c  | 12 
 src/lib/evas/canvas/efl_pointer_event.eo |  2 --
 3 files changed, 22 deletions(-)

diff --git a/src/lib/efl/interfaces/efl_event.eo 
b/src/lib/efl/interfaces/efl_event.eo
index d61491f..1e50274 100644
--- a/src/lib/efl/interfaces/efl_event.eo
+++ b/src/lib/efl/interfaces/efl_event.eo
@@ -26,14 +26,6 @@ interface Efl.Event
 ms: double; [[Time in milliseconds when the event happened.]]
  }
   }
-  @property event_type {
- [[The type of this event, as an Eo Event type.]]
- set {}
- get {}
- values {
-type: const(Eo.Event.Description)*;
- }
-  }
   reset {
  [[Resets the internal data to 0 or default values.]]
   }
diff --git a/src/lib/evas/canvas/efl_pointer_event.c 
b/src/lib/evas/canvas/efl_pointer_event.c
index 9791617..66a5e68 100644
--- a/src/lib/evas/canvas/efl_pointer_event.c
+++ b/src/lib/evas/canvas/efl_pointer_event.c
@@ -245,18 +245,6 @@ _efl_pointer_event_efl_event_timestamp_get(Eo *obj 
EINA_UNUSED, Efl_Pointer_Even
 }
 
 EOLIAN static void
-_efl_pointer_event_efl_event_event_type_set(Eo *obj EINA_UNUSED, 
Efl_Pointer_Event_Data *pd, const Eo_Event_Description *type)
-{
-   pd->event_desc = type;
-}
-
-EOLIAN static const Eo_Event_Description *
-_efl_pointer_event_efl_event_event_type_get(Eo *obj EINA_UNUSED, 
Efl_Pointer_Event_Data *pd)
-{
-   return pd->event_desc;
-}
-
-EOLIAN static void
 _efl_pointer_event_wheel_direction_set(Eo *obj EINA_UNUSED, 
Efl_Pointer_Event_Data *pd, Efl_Orient dir)
 {
pd->wheel.dir = dir;
diff --git a/src/lib/evas/canvas/efl_pointer_event.eo 
b/src/lib/evas/canvas/efl_pointer_event.eo
index 8e614d9..48d522a 100644
--- a/src/lib/evas/canvas/efl_pointer_event.eo
+++ b/src/lib/evas/canvas/efl_pointer_event.eo
@@ -120,8 +120,6 @@ class Efl.Pointer.Event (Eo.Base, Efl.Event, 
Efl.Input.State)
   Efl.Event.dup;
   Efl.Event.timestamp.set;
   Efl.Event.timestamp.get;
-  Efl.Event.event_type.set;
-  Efl.Event.event_type.get;
   Efl.Input.State.modifier_enabled.get;
   Efl.Input.State.lock_enabled.get;
}

-- 




[EGIT] [core/efl] master 19/29: Evas events: Replace calls to event feed with internal func

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2ca159dc58994400aec9ad8f7ded7329527c6d9f

commit 2ca159dc58994400aec9ad8f7ded7329527c6d9f
Author: Jean-Philippe Andre 
Date:   Mon May 30 14:26:48 2016 +0900

Evas events: Replace calls to event feed with internal func
---
 src/lib/evas/canvas/evas_events.c | 24 ++--
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index fffa082..25750fe 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -12,7 +12,10 @@ _evas_event_object_list_in_get(Evas *eo_e, Eina_List *in,
 static Eina_List *
 evas_event_list_copy(Eina_List *list);
 
-
+static void
+_canvas_event_feed_mouse_move_internal(Eo *eo_e, Evas_Public_Data *e, int x, 
int y,
+   unsigned int timestamp, const void 
*data,
+   Efl_Pointer_Event_Data *parent_pe);
 
 static void
 _canvas_event_feed_multi_up_internal(Evas *eo_e, void *_pd, int d, int x, int 
y,
@@ -1027,8 +1030,8 @@ _evas_canvas_event_default_flags_get(Eo *eo_e 
EINA_UNUSED, Evas_Public_Data *e)
 static inline void
 _canvas_event_thaw_eval_internal(Eo *eo_e, Evas_Public_Data *e)
 {
-   evas_event_feed_mouse_move(eo_e, e->pointer.x, e->pointer.y,
- e->last_timestamp, NULL);
+   _canvas_event_feed_mouse_move_internal(eo_e, e, e->pointer.x, e->pointer.y,
+  e->last_timestamp, NULL, NULL);
 }
 
 EAPI void
@@ -1328,7 +1331,7 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const 
void *data,
 eina_list_free(ins);
  }
if (e->pointer.inside)
-  evas_event_feed_mouse_move(eo_e, e->pointer.x, e->pointer.y, timestamp, 
data);
+ _canvas_event_feed_mouse_move_internal(eo_e, e, e->pointer.x, 
e->pointer.y, timestamp, data, pedata);
if (ev.dev) eo_unref(ev.dev);
EV_DEL(pe);
 
@@ -2101,7 +2104,7 @@ _canvas_event_feed_mouse_in_internal(Eo *eo_e, unsigned 
int timestamp, const voi
/* and set up the new one */
e->pointer.object.in = ins;
_evas_post_event_callback_call(eo_e, e);
-   evas_event_feed_mouse_move(eo_e, e->pointer.x, e->pointer.y, timestamp, 
data);
+   _canvas_event_feed_mouse_move_internal(eo_e, e, e->pointer.x, e->pointer.y, 
timestamp, data, pedata);
if (ev.dev) eo_unref(ev.dev);
_evas_unwalk(e);
EV_DEL(pe);
@@ -2943,11 +2946,12 @@ _feed_mouse_move_eval_internal(Eo *eo_obj, 
Evas_Object_Protected_Data *obj)
((!obj->precise_is_inside) || (evas_object_is_inside(eo_obj, obj,
 evas->pointer.x,
 evas->pointer.y
- evas_event_feed_mouse_move(evas->evas,
-evas->pointer.x,
-evas->pointer.y,
-evas->last_timestamp,
-NULL);
+ {
+_canvas_event_feed_mouse_move_internal(evas->evas, evas,
+   evas->pointer.x, 
evas->pointer.y,
+   evas->last_timestamp,
+   NULL, NULL);
+ }
 }
 
 EOLIAN void

-- 




[EGIT] [core/efl] master 09/29: ecore_evas: Feed evas events with eo (down, up)

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d764d8710ad2eb6dda01cf89bcf7b2d020ec2208

commit d764d8710ad2eb6dda01cf89bcf7b2d020ec2208
Author: Jean-Philippe Andre 
Date:   Wed May 11 14:54:11 2016 +0900

ecore_evas: Feed evas events with eo (down, up)
---
 src/lib/ecore_evas/ecore_evas.c   | 64 +--
 src/lib/evas/canvas/evas_events.c | 43 +-
 2 files changed, 96 insertions(+), 11 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 4b11bfd..499add6 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -36,6 +36,9 @@
 #include "ecore_evas_extn.h"
 #include "ecore_evas_win32.h"
 
+#define EFL_INTERNAL_UNSTABLE
+#include "interfaces/efl_common_internal.h"
+
 #ifndef O_BINARY
 # define O_BINARY 0
 #endif
@@ -4300,16 +4303,71 @@ _direct_key_up_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Key *info EINA_U
return EINA_FALSE;
 }
 
+#define EVENT_XY_SET(EV, X, Y, MX, MY, FX, FY) do { \
+   EV->cur.x = (X) - (FX); EV->cur.xsub = (MX) - (FX); \
+   EV->cur.y = (Y) - (FY); EV->cur.ysub = (MY) - (FY); \
+   } while (0)
+
 static Eina_Bool
-_direct_mouse_down_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Button *info EINA_UNUSED)
+_direct_mouse_updown(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info, 
Efl_Pointer_Action action)
 {
-   return EINA_FALSE;
+   Efl_Pointer_Event_Data *ev;
+   Efl_Pointer_Event *evt;
+   Evas *e = ee->evas;
+   Eina_Bool processed;
+   int fx, fy, fw, fh, x, y;
+   double mx, my;
+
+   evt = efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, e, (void **) 
);
+   if (!evt) return EINA_FALSE;
+
+   ev->action = action;
+   ev->button = info->buttons;
+   if (info->double_click) ev->button_flags |= 
EFL_POINTER_BUTTON_FLAGS_DOUBLE_CLICK;
+   if (info->triple_click) ev->button_flags |= 
EFL_POINTER_BUTTON_FLAGS_TRIPLE_CLICK;
+   ev->timestamp = info->timestamp;
+   ev->finger = info->multi.device;
+
+   evas_output_framespace_get(ee->evas, , , , );
+   x = info->x;
+   y = info->y;
+   mx = info->multi.x;
+   my = info->multi.y;
+
+   if (ee->rotation == 0)
+ EVENT_XY_SET(ev, x, y, mx, my, fx, fy);
+   else if (ee->rotation == 90)
+ EVENT_XY_SET(ev, ee->h + fw - y - 1, x, ee->h + fw - my - 1, mx, fx, fy);
+   else if (ee->rotation == 180)
+ EVENT_XY_SET(ev, ee->w + fw - x - 1, ee->h + fh - y - 1,
+  ee->w + fw - mx - 1, ee->h + fh - my - 1,
+  fx, fy);
+   else if (ee->rotation == 270)
+ EVENT_XY_SET(ev, y, ee->w + fh - x - 1, y, ee->w + fh - mx - 1, fx, fy);
+
+   ev->radius = info->multi.radius;
+   ev->radius_x = info->multi.radius_x;
+   ev->radius_y = info->multi.radius_y;
+   ev->pressure = info->multi.pressure;
+   ev->angle = info->multi.angle - ee->rotation;
+
+   eo_event_callback_call(e, EVAS_CANVAS_EVENT_POINTER, evt);
+   processed = ev->evas_done;
+   eo_del(evt);
+
+   return processed;
+}
+
+static Eina_Bool
+_direct_mouse_down_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info)
+{
+   return _direct_mouse_updown(ee, info, EFL_POINTER_ACTION_MOUSE_DOWN);
 }
 
 static Eina_Bool
 _direct_mouse_up_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_Button 
*info EINA_UNUSED)
 {
-   return EINA_FALSE;
+   return _direct_mouse_updown(ee, info, EFL_POINTER_ACTION_MOUSE_UP);
 }
 
 static Eina_Bool
diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index 9379b4b..6fd112c 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -3043,38 +3043,65 @@ _evas_canvas_event_pointer_cb(void *data, const 
Eo_Event *event)
 
/* TODO:
 * - pass event to the internal functions
-* - implement legacy over oo instead of this
+* - implement legacy over eo instead of this
 */
 
switch (ev->action)
  {
   case EFL_POINTER_ACTION_MOUSE_MOVE:
-if (ev->window_pos)
+if (ev->finger == 0)
   {
- _canvas_event_feed_mouse_move_internal(eo_e, e,
-ev->cur.x - 
e->framespace.x,
-ev->cur.y - 
e->framespace.y,
+ _canvas_event_feed_mouse_move_internal(eo_e, e, ev->cur.x, 
ev->cur.y,
 ev->timestamp, ev->data);
   }
 else
   {
- _canvas_event_feed_mouse_move_internal(eo_e, e, ev->cur.x, 
ev->cur.y,
+ _canvas_event_feed_multi_move_internal(eo_e, e, ev->finger, 
ev->cur.x, ev->cur.y,
+ev->radius, ev->radius_x, 
ev->radius_y,
+ev->pressure, ev->angle,
+ev->cur.xsub, ev->cur.ysub,
 

[EGIT] [core/efl] master 08/29: ecore_input: Pass all events through direct cb first

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=21bc2f89f5e932405a63a65f332a0f6d9319c0c3

commit 21bc2f89f5e932405a63a65f332a0f6d9319c0c3
Author: Jean-Philippe Andre 
Date:   Wed May 11 13:55:54 2016 +0900

ecore_input: Pass all events through direct cb first

Since the direct input event callback returns true if the
event has been processed, we can easily support legacy and
progressively implement full support for eo input events.
---
 src/lib/ecore_evas/ecore_evas.c |  20 ++--
 src/lib/ecore_input_evas/ecore_input_evas.c | 165 ++--
 2 files changed, 120 insertions(+), 65 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index dc7d1d4..4b11bfd 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4289,61 +4289,61 @@ ecore_evas_psl1ght_new(const char* name, int w, int h)
  */
 
 static Eina_Bool
-_direct_key_down_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Key *ev 
EINA_UNUSED)
+_direct_key_down_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Key *info 
EINA_UNUSED)
 {
return EINA_FALSE;
 }
 
 static Eina_Bool
-_direct_key_up_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Key *ev 
EINA_UNUSED)
+_direct_key_up_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Key *info 
EINA_UNUSED)
 {
return EINA_FALSE;
 }
 
 static Eina_Bool
-_direct_mouse_down_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Button *ev EINA_UNUSED)
+_direct_mouse_down_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Button *info EINA_UNUSED)
 {
return EINA_FALSE;
 }
 
 static Eina_Bool
-_direct_mouse_up_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_Button 
*ev EINA_UNUSED)
+_direct_mouse_up_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_Button 
*info EINA_UNUSED)
 {
return EINA_FALSE;
 }
 
 static Eina_Bool
-_direct_mouse_cancel_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Button *ev EINA_UNUSED)
+_direct_mouse_cancel_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Button *info EINA_UNUSED)
 {
return EINA_FALSE;
 }
 
 static Eina_Bool
-_direct_mouse_move_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_Move 
*ev EINA_UNUSED)
+_direct_mouse_move_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_Move 
*info EINA_UNUSED)
 {
return EINA_FALSE;
 }
 
 static Eina_Bool
-_direct_mouse_wheel_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Wheel *ev EINA_UNUSED)
+_direct_mouse_wheel_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Mouse_Wheel *info EINA_UNUSED)
 {
return EINA_FALSE;
 }
 
 static Eina_Bool
-_direct_mouse_in_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_IO *ev 
EINA_UNUSED)
+_direct_mouse_in_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_IO 
*info EINA_UNUSED)
 {
return EINA_FALSE;
 }
 
 static Eina_Bool
-_direct_mouse_out_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_IO 
*ev EINA_UNUSED)
+_direct_mouse_out_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Mouse_IO 
*info EINA_UNUSED)
 {
return EINA_FALSE;
 }
 
 static Eina_Bool
-_direct_axis_update_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Axis_Update *ev EINA_UNUSED)
+_direct_axis_update_cb(Ecore_Evas *ee EINA_UNUSED, const 
Ecore_Event_Axis_Update *info EINA_UNUSED)
 {
return EINA_FALSE;
 }
diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c 
b/src/lib/ecore_input_evas/ecore_input_evas.c
index daed66a..df7a851 100644
--- a/src/lib/ecore_input_evas/ecore_input_evas.c
+++ b/src/lib/ecore_input_evas/ecore_input_evas.c
@@ -412,23 +412,36 @@ _ecore_event_evas_key(Ecore_Event_Key *e, 
Ecore_Event_Press press)
if (!lookup) return ECORE_CALLBACK_PASS_ON;
ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers);
if (press == ECORE_DOWN)
- evas_event_feed_key_down_with_keycode(lookup->evas,
-   e->keyname,
-   e->key,
-   e->string,
-   e->compose,
-   e->timestamp,
-   e->data,
-   e->keycode);
+ {
+if (!lookup->direct ||
+!lookup->direct(lookup->window, ECORE_EVENT_KEY_DOWN, e))
+  {
+ evas_event_feed_key_down_with_keycode(lookup->evas,
+   e->keyname,
+   e->key,
+   e->string,
+   e->compose,
+   e->timestamp,
+   e->data,
+   e->keycode);
+  }
+ }

[EGIT] [core/efl] master 21/29: Elm win: Forward pointer events from evas to window

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1950fb6fde791edfa9396b97cc6a637e015c1363

commit 1950fb6fde791edfa9396b97cc6a637e015c1363
Author: Jean-Philippe Andre 
Date:   Mon May 30 19:51:31 2016 +0900

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.
---
 src/lib/elementary/elm_win.c | 17 +
 src/lib/evas/canvas/efl_pointer_event.eo |  9 -
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/src/lib/elementary/elm_win.c b/src/lib/elementary/elm_win.c
index fc7e6bc..622edc9 100644
--- a/src/lib/elementary/elm_win.c
+++ b/src/lib/elementary/elm_win.c
@@ -1625,6 +1625,19 @@ _elm_win_elm_widget_event(Eo *obj, Elm_Win_Data *_pd 
EINA_UNUSED, Evas_Object *s
return EINA_TRUE;
 }
 
+static Eina_Bool
+_evas_event_pointer_cb(void *data, const Eo_Event *ev)
+{
+   Eo *win = data;
+   Eo *evt = ev->info;
+
+   eo_event_callback_call(win, EFL_GFX_EVENT_POINTER, evt);
+   return EO_CALLBACK_CONTINUE;
+}
+
+EO_CALLBACKS_ARRAY_DEFINE(_elm_win_evas_forward_callbacks,
+  { EVAS_CANVAS_EVENT_POINTER, _evas_event_pointer_cb 
})
+
 static void
 _deferred_ecore_evas_free(void *data)
 {
@@ -1972,6 +1985,8 @@ _elm_win_evas_object_smart_del(Eo *obj, Elm_Win_Data *sd)
EVAS_CALLBACK_CHANGED_SIZE_HINTS,

_elm_win_on_resize_obj_changed_size_hints,
obj);
+   eo_event_callback_array_del(sd->evas, _elm_win_evas_forward_callbacks(), 
obj);
+
evas_object_del(sd->box);
evas_object_del(sd->edje);
 
@@ -4028,6 +4043,8 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, 
const char *name, Elm_Win_
if (_elm_config->atspi_mode)
  elm_interface_atspi_window_created_signal_emit(obj);
 
+   eo_event_callback_array_add(sd->evas, _elm_win_evas_forward_callbacks(), 
obj);
+
evas_object_show(sd->edje);
 
if (type == ELM_WIN_FAKE)
diff --git a/src/lib/evas/canvas/efl_pointer_event.eo 
b/src/lib/evas/canvas/efl_pointer_event.eo
index 96e923e..8e614d9 100644
--- a/src/lib/evas/canvas/efl_pointer_event.eo
+++ b/src/lib/evas/canvas/efl_pointer_event.eo
@@ -49,15 +49,6 @@ class Efl.Pointer.Event (Eo.Base, Efl.Event, Efl.Input.State)
 y: int;
  }
   }
-  /*
-  @property input_state {
- [[Carries information about keyboard modifiers and locks
-   at the moment of this event (eg. Ctrl, Alt or Caps Lock, Num 
Lock).]]
- values {
-modifiers: Efl.Input.State*; [[Can be $null (no info about 
state).]]
- }
-  }
-  */
   @property device {
  [[Pointing device that originated this event.]]
  values {

-- 




[EGIT] [core/efl] master 12/29: efl: Simplify pointer event names + add missing

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ef843e8801ee680740022fa71f4d0b75aeaa2036

commit ef843e8801ee680740022fa71f4d0b75aeaa2036
Author: Jean-Philippe Andre 
Date:   Wed May 11 20:13:19 2016 +0900

efl: Simplify pointer event names + add missing

No more difference between touch & mouse.
Add axis, cancel, in and out.
---
 src/lib/ecore_evas/ecore_evas.c|  8 
 src/lib/efl/interfaces/efl_event_types.eot | 20 +++-
 src/lib/evas/canvas/evas_events.c  |  8 
 src/lib/evas/canvas/evas_events_legacy.c   | 22 +++---
 4 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index a2ede77..ce17903 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4369,13 +4369,13 @@ _direct_mouse_updown(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Button *info, Efl_P
 static Eina_Bool
 _direct_mouse_down_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info)
 {
-   return _direct_mouse_updown(ee, info, EFL_POINTER_ACTION_MOUSE_DOWN);
+   return _direct_mouse_updown(ee, info, EFL_POINTER_ACTION_DOWN);
 }
 
 static Eina_Bool
 _direct_mouse_up_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info)
 {
-   return _direct_mouse_updown(ee, info, EFL_POINTER_ACTION_MOUSE_UP);
+   return _direct_mouse_updown(ee, info, EFL_POINTER_ACTION_UP);
 }
 
 static Eina_Bool
@@ -4405,7 +4405,7 @@ _direct_mouse_move_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Move *info)
evt = efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, e, (void **) 
);
if (!evt) return EINA_FALSE;
 
-   ev->action = EFL_POINTER_ACTION_MOUSE_MOVE;
+   ev->action = EFL_POINTER_ACTION_MOVE;
ev->timestamp = info->timestamp;
ev->finger = info->multi.device;
_pointer_position_set(ev, ee, info->x, info->y, info->multi.x, 
info->multi.y);
@@ -4443,7 +4443,7 @@ _direct_mouse_wheel_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Wheel *info)
evt = efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, e, (void **) 
);
if (!evt) return EINA_FALSE;
 
-   ev->action = EFL_POINTER_ACTION_MOUSE_WHEEL;
+   ev->action = EFL_POINTER_ACTION_WHEEL;
ev->timestamp = info->timestamp;
_pointer_position_set(ev, ee, info->x, info->y, info->x, info->y);
ev->wheel.z = info->z;
diff --git a/src/lib/efl/interfaces/efl_event_types.eot 
b/src/lib/efl/interfaces/efl_event_types.eot
index 9152a0d..4068618 100644
--- a/src/lib/efl/interfaces/efl_event_types.eot
+++ b/src/lib/efl/interfaces/efl_event_types.eot
@@ -5,15 +5,17 @@ enum Efl.Pointer.Action
 
  @since 1.18
]]
-   none,[[Not a valid event.]]
-   mouse_move,  [[Mouse or equivalent pointer moved.]]
-   mouse_down,  [[Mouse button pressed down.]]
-   mouse_up,[[Mouse button released.]]
-   mouse_wheel, [[Mouse wheel scroll, horizontally or vertically.]]
-   touch_move,  [[Finger moved while touching surface.]]
-   touch_down,  [[Finger touch made contact.]]
-   touch_up,[[Finger touch released.]]
-   hover,   [[A hovering movement over a distance-sensitive touch screen.]]
+   none,   [[Not a valid event.]]
+   move,   [[Mouse or equivalent pointer moved.]]
+   down,   [[Mouse button or equivalent pointer pressed down.
+ Always followed by up or cancel.]]
+   up, [[Mouse button or equivalent pointer released. See also cancel.]]
+   cancel, [[Special event happening after a down if the up counterpart
+ can not happen (eg. another window forcibly stole the focus).]]
+   in, [[Mouse or pointer entered the object.]]
+   out,[[Mouse or pointer exited the object.]]
+   wheel,  [[Mouse wheel scroll, horizontally or vertically.]]
+   axis,   [[Joystick event.]]
 }
 
 enum Efl.Pointer.Button_Flags
diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index c4eb793..7095836 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -3054,7 +3054,7 @@ _evas_canvas_event_pointer_cb(void *data, const Eo_Event 
*event)
 
switch (ev->action)
  {
-  case EFL_POINTER_ACTION_MOUSE_MOVE:
+  case EFL_POINTER_ACTION_MOVE:
 if (ev->finger == 0)
   {
  _canvas_event_feed_mouse_move_internal(eo_e, e, ev->cur.x, 
ev->cur.y,
@@ -3071,7 +3071,7 @@ _evas_canvas_event_pointer_cb(void *data, const Eo_Event 
*event)
 ev->evas_done = EINA_TRUE;
 break;
 
-  case EFL_POINTER_ACTION_MOUSE_DOWN:
+  case EFL_POINTER_ACTION_DOWN:
 if (ev->finger == 0)
   {
  evas_event_feed_mouse_down(eo_e, ev->button, ev->button_flags, 
ev->timestamp, ev->data);
@@ -3087,7 +3087,7 @@ _evas_canvas_event_pointer_cb(void *data, const Eo_Event 
*event)
 ev->evas_done = EINA_TRUE;
 break;
 
-  case EFL_POINTER_ACTION_MOUSE_UP:
+  case EFL_POINTER_ACTION_UP:
 

[EGIT] [core/efl] master 16/29: evas: send eo pointer events on mouse move

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=37d894abb191cfaff3f7b702792e79a617b755a1

commit 37d894abb191cfaff3f7b702792e79a617b755a1
Author: Jean-Philippe Andre 
Date:   Thu May 12 16:48:54 2016 +0900

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.
---
 src/lib/ecore_input_evas/ecore_input_evas.c |   3 +
 src/lib/efl/interfaces/efl_event.eo |   4 +-
 src/lib/efl/interfaces/efl_gfx.eo   |   4 +
 src/lib/efl/interfaces/efl_pointer_event.c  |   3 +-
 src/lib/efl/interfaces/efl_pointer_event.eo |   2 +-
 src/lib/evas/Evas_Common.h  |   1 +
 src/lib/evas/canvas/evas_callbacks.c|  19 +
 src/lib/evas/canvas/evas_canvas.eo  |   2 +-
 src/lib/evas/canvas/evas_events.c   | 128 +++-
 9 files changed, 138 insertions(+), 28 deletions(-)

diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c 
b/src/lib/ecore_input_evas/ecore_input_evas.c
index df7a851..b0d86b6 100644
--- a/src/lib/ecore_input_evas/ecore_input_evas.c
+++ b/src/lib/ecore_input_evas/ecore_input_evas.c
@@ -599,6 +599,9 @@ ecore_event_evas_mouse_move(void *data EINA_UNUSED, int 
type EINA_UNUSED, void *
e = event;
lookup = _ecore_event_window_match(e->event_window);
if (!lookup) return ECORE_CALLBACK_PASS_ON;
+   if (lookup->direct &&
+   lookup->direct(lookup->window, ECORE_EVENT_MOUSE_MOVE, e))
+ return ECORE_CALLBACK_PASS_ON;
if (e->multi.device == 0)
  {
 _ecore_event_evas_push_mouse_move(e);
diff --git a/src/lib/efl/interfaces/efl_event.eo 
b/src/lib/efl/interfaces/efl_event.eo
index 9cc2bcb..d61491f 100644
--- a/src/lib/efl/interfaces/efl_event.eo
+++ b/src/lib/efl/interfaces/efl_event.eo
@@ -1,4 +1,4 @@
-type @extern Eo_Event_Description: __undefined_type;
+import eo_base;
 
 interface Efl.Event
 {
@@ -31,7 +31,7 @@ interface Efl.Event
  set {}
  get {}
  values {
-type: const(Eo_Event_Description)*;
+type: const(Eo.Event.Description)*;
  }
   }
   reset {
diff --git a/src/lib/efl/interfaces/efl_gfx.eo 
b/src/lib/efl/interfaces/efl_gfx.eo
index bfa1491..eb422f1 100644
--- a/src/lib/efl/interfaces/efl_gfx.eo
+++ b/src/lib/efl/interfaces/efl_gfx.eo
@@ -123,4 +123,8 @@ interface Efl.Gfx {
  }
   }
}
+   events {
+  /* FIXME: eolian thinks there's a cyclic dependency here. wtf */
+  pointer /*: Efl.Pointer.Event*/; [[New generic pointer (mouse, finger, 
pen...) event.]]
+   }
 }
diff --git a/src/lib/efl/interfaces/efl_pointer_event.c 
b/src/lib/efl/interfaces/efl_pointer_event.c
index 536249e..dbd96ea 100644
--- a/src/lib/efl/interfaces/efl_pointer_event.c
+++ b/src/lib/efl/interfaces/efl_pointer_event.c
@@ -97,7 +97,8 @@ _efl_pointer_event_efl_event_dup(Eo *obj, 
Efl_Pointer_Event_Data *pd)
Efl_Pointer_Event_Data *ev;
Efl_Pointer_Event *evt;
 
-   evt = _efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, NULL, obj, 
);
+   evt = _efl_pointer_event_instance_get((Eo_Class *) EFL_POINTER_EVENT_CLASS,
+ NULL, obj, (void **) );
if (!evt) return NULL;
 
memcpy(ev, pd, sizeof(*ev));
diff --git a/src/lib/efl/interfaces/efl_pointer_event.eo 
b/src/lib/efl/interfaces/efl_pointer_event.eo
index 1fa303b..6e8251e 100644
--- a/src/lib/efl/interfaces/efl_pointer_event.eo
+++ b/src/lib/efl/interfaces/efl_pointer_event.eo
@@ -85,7 +85,7 @@ class Efl.Pointer.Event (Eo.Base, Efl.Event)
propagation or repetition of the event.
  ]]
  values {
-src: Efl.Gfx;
+src: Eo.Base; [[Source object: $Efl.Gfx]]
  }
   }
   /* FIXME: why not double_click() and triple_click() */
diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 496dad7..4d45d56 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -441,6 +441,7 @@ struct _Evas_Event_Mouse_Move /** Mouse move event */
Evas_Event_Flags event_flags;
Evas_Device *dev;
Evas_Object *event_src; /**< The Evas Object which actually triggered 
the event, used in cases of proxy event propagation */
+   void*reserved; /* internal use only */
 };
 
 struct _Evas_Event_Mouse_Wheel /** Wheel event */
diff --git a/src/lib/evas/canvas/evas_callbacks.c 
b/src/lib/evas/canvas/evas_callbacks.c
index 

[EGIT] [core/efl] master 01/29: Evas: EO-ify Evas_Device and partly move to Efl

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ce5688a38812a30b343e7c58991da1112c503aa5

commit ce5688a38812a30b343e7c58991da1112c503aa5
Author: Jean-Philippe Andre 
Date:   Thu Apr 28 17:08:14 2016 +0900

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).
---
 src/Makefile_Efl.am  |   6 +-
 src/lib/efl/Efl.h|   7 +
 src/lib/efl/interfaces/efl_common_internal.h |  68 +++
 src/lib/efl/interfaces/efl_input_device.c| 106 +++
 src/lib/efl/interfaces/efl_input_device.eo   |  90 ++
 src/lib/efl/interfaces/efl_interfaces_main.c |   1 +
 src/lib/evas/Evas_Common.h   |  54 +++---
 src/lib/evas/canvas/evas_device.c| 259 +--
 src/lib/evas/canvas/evas_events.c|  70 
 src/lib/evas/include/evas_private.h  |  16 --
 10 files changed, 459 insertions(+), 218 deletions(-)

diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index cddd82a..4388ef2 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -4,6 +4,7 @@ efl_eolian_legacy_files = \
lib/efl/interfaces/efl_gfx.eo \
lib/efl/interfaces/efl_image.eo \
lib/efl/interfaces/efl_image_animated.eo \
+   lib/efl/interfaces/efl_input_device.eo \
$(NULL)
 
 efl_eolian_files = \
@@ -62,6 +63,7 @@ EXTRA_DIST += \
   lib/efl/Efl.h \
   lib/efl/Makefile.am \
   lib/efl/Makefile.in \
+  lib/efl/interfaces/efl_common_internal.h \
   $(efl_eolian_files) \
   $(efl_eolian_type_files)
 
@@ -77,7 +79,9 @@ lib/efl/interfaces/efl_gfx_shape.c \
 lib/efl/interfaces/efl_vpath_file.c \
 lib/efl/interfaces/efl_vpath_manager.c \
 lib/efl/interfaces/efl_vpath_core.c \
-lib/efl/interfaces/efl_vpath_file_core.c
+lib/efl/interfaces/efl_vpath_file_core.c \
+lib/efl/interfaces/efl_input_device.c \
+$(NULL)
 
 lib_efl_libefl_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl 
-I$(top_srcdir)/src/lib/efl @EFL_CFLAGS@ -DEFL_GFX_FILTER_BETA
 lib_efl_libefl_la_LIBADD = @EFL_LIBS@
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 6962c8f..c834412 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -125,6 +125,12 @@ static inline void efl_gfx_color16_type_set(Efl_Gfx_Color 
*color,
 #include "interfaces/efl_pack_linear.eo.h"
 #include "interfaces/efl_pack_grid.eo.h"
 
+/* Input events */
+#include "interfaces/efl_input_device.eo.h"
+//#include "interfaces/efl_input_state.eo.h"
+//#include "interfaces/efl_event.eo.h"
+//#include "interfaces/efl_pointer_event.eo.h"
+
 #else
 
 #ifndef EFL_NOLEGACY_API_SUPPORT
@@ -133,6 +139,7 @@ static inline void efl_gfx_color16_type_set(Efl_Gfx_Color 
*color,
 #include "interfaces/efl_gfx.eo.legacy.h"
 #include "interfaces/efl_image.eo.legacy.h"
 #include "interfaces/efl_image_animated.eo.legacy.h"
+#include "interfaces/efl_input_device.eo.legacy.h"
 #endif
 
 typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
diff --git a/src/lib/efl/interfaces/efl_common_internal.h 
b/src/lib/efl/interfaces/efl_common_internal.h
new file mode 100644
index 000..eb46814
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_common_internal.h
@@ -0,0 +1,68 @@
+/* This header file is intended for EFL internal use, and is not part of
+ * EFL stable API.
+ * Place here structs and enums that need to be shared between core EFL
+ * components, such as Ecore, Evas, etc...
+ */
+
+#ifndef EFL_COMMON_INTERNAL_H
+#define EFL_COMMON_INTERNAL_H
+
+#ifndef EFL_INTERNAL_UNSTABLE
+# error This file can not be included outside EFL
+#endif
+
+#include 
+
+typedef struct _Efl_Pointer_Event_Data  Efl_Pointer_Event_Data;
+typedef struct _Efl_Input_Device_Data   Efl_Input_Device_Data;
+typedef struct _Efl_Input_State_DataEfl_Input_State_Data;
+
+#ifndef _EVAS_TYPES_EOT_H_
+/* FIXME */
+typedef struct _Evas_Modifier Evas_Modifier;
+typedef struct _Evas_Lock Evas_Lock;
+#endif
+
+#if 0
+struct _Efl_Pointer_Event_Data
+{
+   Eo *eo;
+   const Eo_Event_Description *event;
+   unsigned inttimestamp;
+   int button;
+   unsigned intpressed_buttons;
+   struct {
+  int  x, y;
+   } output;
+   struct {
+  int  x, y;
+   } canvas;
+   Eo *source; /* may be ecore or evas or evas object (?) */
+   Efl_Pointer_Action   action;
+   Efl_Pointer_Button_Flags button_flags;
+   Efl_Pointer_Event_Flags  event_flags;
+   void   *data;   /* evas data - whatever that is */
+};
+
+struct _Efl_Input_State_Data
+{
+ 

[EGIT] [core/efl] master 14/29: ecore_x: Pass in/out through ecore_input_evas

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=05dfab84429979f8ae69d4fea8524ead39c40722

commit 05dfab84429979f8ae69d4fea8524ead39c40722
Author: Jean-Philippe Andre 
Date:   Wed May 11 21:43:57 2016 +0900

ecore_x: Pass in/out through ecore_input_evas

This whole input system is a massive mess. It looks like spaghetti.
Long live the giant flying monster.

This commit changes how some events are propagated in X.

Before:
 ecore_x -> evas_event -> evas

After:
 ecore_x -> ecore_input_evas -> ecore_evas -> evas_event -> evas

There are still inconsistencies between events and between X and WL,
but ecore_evas should be used for all events since it rotates the
inputs.
---
 src/modules/ecore_evas/engines/x/ecore_evas_x.c | 57 -
 1 file changed, 46 insertions(+), 11 deletions(-)

diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c 
b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index 1a54827..1f56aaa 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -1261,6 +1261,38 @@ _ecore_evas_x_event_client_message(void *data 
EINA_UNUSED, int type EINA_UNUSED,
return ECORE_CALLBACK_PASS_ON;
 }
 
+static inline void
+_feed_cancel_out(const Ecore_X_Event_Mouse_Out *e, Eina_Bool cancel)
+{
+   /* equivalent to:
+*  if (cancel) evas_event_feed_mouse_cancel(ee->evas, e->time, NULL);
+*  evas_event_feed_mouse_out(ee->evas, e->time, NULL);
+* but this goes through ecore_event_evas and direct eo event callback
+*/
+   if (cancel)
+ {
+Ecore_Event_Mouse_Button cancel = {
+   .event_window = (Ecore_Window) e->event_win,
+   .modifiers = e->modifiers,
+   .timestamp = e->time,
+   .window = (Ecore_Window) e->win,
+   .x = e->x,
+   .y = e->y,
+};
+ecore_event_evas_mouse_button_cancel(NULL, 
ECORE_EVENT_MOUSE_BUTTON_CANCEL, );
+ }
+
+   Ecore_Event_Mouse_IO io = {
+  .event_window = (Ecore_Window) e->event_win,
+  .modifiers = e->modifiers,
+  .timestamp = e->time,
+  .window = (Ecore_Window) e->win,
+  .x = e->x,
+  .y = e->y
+   };
+   ecore_event_evas_mouse_out(NULL, ECORE_EVENT_MOUSE_OUT, );
+}
+
 static Eina_Bool
 _fake_out(void *data)
 {
@@ -1272,9 +1304,8 @@ _fake_out(void *data)
 
ecore_event_evas_modifier_lock_update(ee->evas, e->modifiers);
_ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
-   if (e->mode == ECORE_X_EVENT_MODE_GRAB)
- evas_event_feed_mouse_cancel(ee->evas, e->time, NULL);
-   evas_event_feed_mouse_out(ee->evas, e->time, NULL);
+   _feed_cancel_out(e, (e->mode == ECORE_X_EVENT_MODE_GRAB));
+
if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee);
if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object);
ee->in = EINA_FALSE;
@@ -1348,10 +1379,17 @@ _ecore_evas_x_event_mouse_in(void *data EINA_UNUSED, 
int type EINA_UNUSED, void
/* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */
if (!ee->in)
  {
+Ecore_Event_Mouse_IO io = {
+   .event_window = (Ecore_Window) e->event_win,
+   .modifiers = e->modifiers,
+   .timestamp = e->time,
+   .window = (Ecore_Window) e->win,
+   .x = e->x,
+   .y = e->y
+};
+
 if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee);
-ecore_event_evas_modifier_lock_update(ee->evas, e->modifiers);
-evas_event_feed_mouse_in(ee->evas, e->time, NULL);
-_ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
+ecore_event_evas_mouse_in(NULL, ECORE_EVENT_MOUSE_IN, );
 ee->in = EINA_TRUE;
  }
return ECORE_CALLBACK_PASS_ON;
@@ -1434,9 +1472,7 @@ _ecore_evas_x_event_mouse_out(void *data EINA_UNUSED, int 
type EINA_UNUSED, void
   return ECORE_CALLBACK_PASS_ON;
 ecore_event_evas_modifier_lock_update(ee->evas, e->modifiers);
 _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
-if (e->mode == ECORE_X_EVENT_MODE_GRAB)
-  evas_event_feed_mouse_cancel(ee->evas, e->time, NULL);
-evas_event_feed_mouse_out(ee->evas, e->time, NULL);
+_feed_cancel_out(e, (e->mode == ECORE_X_EVENT_MODE_GRAB));
 if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee);
 if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object);
 ee->in = EINA_FALSE;
@@ -1732,8 +1768,7 @@ _ecore_evas_x_event_window_hide(void *data EINA_UNUSED, 
int type EINA_UNUSED, vo
if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if (ee->in)
  {
-evas_event_feed_mouse_cancel(ee->evas, e->time, NULL);
-evas_event_feed_mouse_out(ee->evas, e->time, NULL);
+_feed_cancel_out(e, EINA_TRUE);
 if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee);
 if (ee->prop.cursor.object) 

[EGIT] [core/efl] master 20/29: Evas events: Add EO APIs for lock & modifiers

2016-05-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c68f71239c0595708c4d9145bf52b75e27321104

commit c68f71239c0595708c4d9145bf52b75e27321104
Author: Jean-Philippe Andre 
Date:   Mon May 30 15:34:31 2016 +0900

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?)
---
 src/Makefile_Efl.am|  4 +-
 src/Makefile_Evas.am   |  2 +
 src/lib/ecore_evas/ecore_evas.c|  9 ++--
 src/lib/efl/Efl.h  |  3 +-
 src/lib/efl/interfaces/efl_common_internal.h   | 18 ++--
 src/lib/efl/interfaces/efl_event.c | 10 
 src/lib/efl/interfaces/efl_input_state.eo  | 27 +++
 src/lib/efl/interfaces/efl_interfaces_main.c   |  3 ++
 src/lib/elementary/elm_win.c   | 14 ++
 src/lib/elementary/elm_win.eo  |  5 +-
 src/lib/evas/Evas_Eo.h |  2 +
 .../interfaces => evas/canvas}/efl_pointer_event.c | 37 +++
 .../canvas}/efl_pointer_event.eo   |  4 +-
 src/lib/evas/canvas/evas_events.c  |  6 ++-
 src/lib/evas/canvas/evas_events_legacy.c   | 54 ++
 15 files changed, 123 insertions(+), 75 deletions(-)

diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index b8c2834..506b683 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -40,7 +40,7 @@ efl_eolian_files = \
   lib/efl/interfaces/efl_ui_spin.eo \
   lib/efl/interfaces/efl_ui_progress.eo \
   lib/efl/interfaces/efl_event.eo \
-  lib/efl/interfaces/efl_pointer_event.eo \
+  lib/efl/interfaces/efl_input_state.eo \
   $(efl_eolian_legacy_files) \
   $(NULL)
 
@@ -84,8 +84,6 @@ lib/efl/interfaces/efl_vpath_manager.c \
 lib/efl/interfaces/efl_vpath_core.c \
 lib/efl/interfaces/efl_vpath_file_core.c \
 lib/efl/interfaces/efl_input_device.c \
-lib/efl/interfaces/efl_event.c \
-lib/efl/interfaces/efl_pointer_event.c \
 $(NULL)
 
 lib_efl_libefl_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl 
-I$(top_srcdir)/src/lib/efl @EFL_CFLAGS@ -DEFL_GFX_FILTER_BETA
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index e9ee137..ce2607b 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -43,6 +43,7 @@ evas_eolian_pub_files = \
lib/evas/canvas/efl_canvas_surface_wayland.eo \
lib/evas/canvas/evas_filter.eo \
lib/evas/canvas/evas_smart_clipped.eo \
+   lib/evas/canvas/efl_pointer_event.eo \
$(NULL)
 
 evas_eolian_legacy_files = \
@@ -197,6 +198,7 @@ lib/evas/canvas/efl_canvas_surface.c \
 lib/evas/canvas/efl_canvas_surface_tbm.c \
 lib/evas/canvas/efl_canvas_surface_x11.c \
 lib/evas/canvas/efl_canvas_surface_wayland.c \
+lib/evas/canvas/efl_pointer_event.c \
 $(NULL)
 
 EXTRA_DIST += \
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 36ec77e..ba954d4 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4327,8 +4327,8 @@ _direct_mouse_updown(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Button *info, Efl_P
 * root.{x,y}
 * root_window
 * event_window
-* modifiers
 * same_screen
+* modifiers (already passed to evas, no need to do anything)
 */
 
evt = efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, e, (void **) 
);
@@ -4385,8 +4385,8 @@ _direct_mouse_move_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Move *info)
 * root.{x,y}
 * root_window
 * event_window
-* modifiers
 * same_screen
+* modifiers (already passed to evas, no need to do anything)
 */
 
evt = efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, e, (void **) 
);
@@ -4423,8 +4423,7 @@ _direct_mouse_wheel_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Wheel *info)
 * root.{x,y}
 * root_window
 * event_window
-* modifiers
-* same_screen
+* modifiers (already passed to evas, no need to do anything)
 */
 
evt = efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, e, (void **) 
);
@@ -4453,7 +4452,7 @@ _direct_mouse_inout(Ecore_Evas *ee, const 
Ecore_Event_Mouse_IO *info, Efl_Pointe
 
/* Unused information:
 * event_window
-* modifiers
+* modifiers (already passed to evas, no need to do anything)
 */
 
evt = efl_pointer_event_instance_get(EFL_POINTER_EVENT_CLASS, e, (void **) 
);
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 2d25714..dda8293 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -128,9 +128,8 @@ static inline void efl_gfx_color16_type_set(Efl_Gfx_Color 
*color,
 /* Input events */
 #include 

Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread Jean-Philippe André
On 31 May 2016 at 17:34, Carsten Haitzler  wrote:

> On Tue, 31 May 2016 16:49:38 +0930 Simon Lees  said:
>
> >
> >
> > On 05/31/2016 04:32 PM, Carsten Haitzler (The Rasterman) wrote:
> > > On Tue, 31 May 2016 06:38:52 + Andrew Williams <
> a...@andywilliams.me>
> > > said:
> > >
> > >> Not to be picky but Java is not rgba by default - it prefers Color
> too,
> > >> some r g b a helper methods exist. It additionally provides many
> standard
> > >> Color definitions for "system" colours... (As well as convenience
> such as
> > >> Color.BLACK)
> > >
> > > as i said, it's an object (well a color class you create color
> objects). :)
> > >
> > > public class Color
> > > extends Object
> > >
> > > :) there are different constructors that use polymorphism:
> > >
> > > Color(float r, float g, float b)
> > > Color(float r, float g, float b, float a)
> > > Color(int rgb)
> > > Color(int rgba, boolean hasalpha)
> > > Color(int r, int g, int b)
> > > Color(int r, int g, int b, int a)
> > >
> > > the separate r, g, b, a is pretty common in api's. that's what i was
> saying.
> > >
> >
> > For what its worth Qt passes a color "class" generally but normally
> > you'd write either setColor(255,0,0,255); or setColor("#FF00"); and
> > let the language magic automatically turn that into a class, but
> > whenever specifying in html notation rather then rgba, its always done
> > as a string, I don't recall seeing a api anywhere that stores rgba in
> > one int.
>
> that's actually the
>   Color(int rgba, boolean hasalpha)
> and
>   Color(int rgb)
>
> that passes color as an int around. all pixels in an image are "unsigned
> ints"
> with color in them.
> 
>

Efl.Gfx.Color is already defined since 1.17 as a struct, containing R, G,
B, A as shorts, not chars. That was done in order to allow for 16-bit
precision per channel, in the future. But note that Efl.Gfx.Color is still
behind the BETA #ifdef

A short lived eo object could actually make sense, like efl_part. If
color_set() owns the Color object then it can just read its value and unref
it.
Then we could do just like Qt and provide lots of color "conversion"
functions (hex, html name, rgba 32 bit...)

But even if we provide this as an API we will need an easy way in C to set
a color from R,G,B,A (4 ints). Be it a macro or another method.

-- 
Jean-Philippe André
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: ethumb - don't complain to stderr about things that are handled by api

2016-05-31 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5e90b860636d9ca353e00ff34630117559b7f748

commit 5e90b860636d9ca353e00ff34630117559b7f748
Author: Carsten Haitzler (Rasterman) 
Date:   Tue May 31 19:01:50 2016 +0900

ethumb - don't complain to stderr about things that are handled by api

things like load failures are up to api to deal with, not logs.
---
 src/lib/ethumb/ethumb.c | 32 +++-
 1 file changed, 7 insertions(+), 25 deletions(-)

diff --git a/src/lib/ethumb/ethumb.c b/src/lib/ethumb/ethumb.c
index 4e2c5a7..ab7eda6 100644
--- a/src/lib/ethumb/ethumb.c
+++ b/src/lib/ethumb/ethumb.c
@@ -900,11 +900,7 @@ ethumb_file_set(Ethumb *e, const char *path, const char 
*key)
eina_stringshare_replace(>thumb_key, NULL);
 
DBG("ethumb=%p, path=%s, key=%s", e, path ? path : "", key ? key : "");
-   if (path && access(path, R_OK))
- {
-ERR("couldn't access file \"%s\"", path);
-return EINA_FALSE;
- }
+   if (path && access(path, R_OK)) return EINA_FALSE;
 
path = _ethumb_build_absolute_path(path, buf);
eina_stringshare_replace(>src_hash, NULL);
@@ -1295,11 +1291,7 @@ _ethumb_plugin_generate(Ethumb *e)
int i;
 
extp = strrchr(e->src_path, '.');
-   if (!extp)
- {
-ERR("could not get extension for file \"%s\"", e->src_path);
-return EINA_FALSE;
- }
+   if (!extp) return EINA_FALSE;
 
for (i = 0; extp[i] != '\0'; i++)
  ext[i] = tolower(extp[i + 1]);
@@ -1558,11 +1550,7 @@ _ethumb_image_load(Ethumb *e)
  evas_object_show(img);
 
error = evas_object_image_load_error_get(img);
-   if (error != EVAS_LOAD_ERROR_NONE)
- {
-ERR("could not load image '%s': %d", e->src_path, error);
-return 0;
- }
+   if (error != EVAS_LOAD_ERROR_NONE) return 0;
 
if (e->orientation != ETHUMB_THUMB_ORIENT_NONE &&
e->orientation != ETHUMB_THUMB_ORIENT_ORIGINAL)
@@ -1638,11 +1626,8 @@ ethumb_generate(Ethumb *e, Ethumb_Generate_Cb 
finished_cb, const void *data, Ein
e, finished_cb, data, free_data,
e->src_path ? e->src_path : "", e->src_key ? e->src_key : "");
 
-   if (e->finished_idler)
- {
-ERR("thumbnail generation already in progress.");
-return EINA_FALSE;
- }
+   if (e->finished_idler) return EINA_FALSE;
+
if (e->pdata)
  {
 e->plugin->thumb_cancel(e, e->pdata);
@@ -1670,8 +1655,6 @@ ethumb_generate(Ethumb *e, Ethumb_Generate_Cb 
finished_cb, const void *data, Ein
 
if (!_ethumb_image_load(e))
  {
-ERR("could not load input image: file=%s, key=%s",
-e->src_path, e->src_key);
 ethumb_finished_callback_call(e, 0);
 return EINA_FALSE;
  }
@@ -1704,9 +1687,8 @@ ethumb_exists(Ethumb *e)
 
EINA_SAFETY_ON_TRUE_RETURN_VAL(r_src, 0);
 
-   if (r_thumb && errno != ENOENT)
- ERR("could not access file \"%s\": %s", e->thumb_path, strerror(errno));
-   else if (!r_thumb && thumb.st_mtime > src.st_mtime)
+   if ((!(r_thumb && errno != ENOENT)) &&
+   (!r_thumb && thumb.st_mtime > src.st_mtime))
  r = EINA_TRUE;
 
return r;

-- 




Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread David Seikel
On Tue, 31 May 2016 15:34:05 +0900 Carsten Haitzler (The Rasterman)
 wrote:

> oh yeah. there is a good reason to stick to 4 ints. javascript and
> lua. an unsigned int here would have to become a "number" in js and
> lua. numbers are doubles. while a double can express precision for
> whole values up to (and beyond) 32bits (unsigned) so it wouldn't be a
> problem, these languages are going to be far more painful to work in
> in dividing up r, g, b and a when you have a combined number and then
> combining them again.
> 
> in languages with integer types that are at least 32bit this is
> generally not a problem as they give you bit operators like and/or
> and bitshift, this is less nice in languages like lua that don't do
> this. well not out of the box.
> 
> http://www.lua.org/manual/5.2/manual.html#6.7
> 
> much less nice than just having 4 value params. so things begin to
> look quite ugly here. :(
> 
> so i think this is one of those times where people need to provide
> their input, but a single "unsigned int" for a color seems less nice
> for languages like lua, but it's nicer for returning a color value.

Lua's idea of a "number" changes depending on how the thing was
compiled.  LuaJIT, which we are moving towards using, has slightly
different ideas as well, and includes the bit operations built in,
"out of the box".

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.


signature.asc
Description: PGP signature
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread The Rasterman
On Tue, 31 May 2016 16:49:38 +0930 Simon Lees  said:

> 
> 
> On 05/31/2016 04:32 PM, Carsten Haitzler (The Rasterman) wrote:
> > On Tue, 31 May 2016 06:38:52 + Andrew Williams 
> > said:
> > 
> >> Not to be picky but Java is not rgba by default - it prefers Color too,
> >> some r g b a helper methods exist. It additionally provides many standard
> >> Color definitions for "system" colours... (As well as convenience such as
> >> Color.BLACK)
> > 
> > as i said, it's an object (well a color class you create color objects). :)
> > 
> > public class Color
> > extends Object
> > 
> > :) there are different constructors that use polymorphism:
> > 
> > Color(float r, float g, float b)
> > Color(float r, float g, float b, float a)
> > Color(int rgb)
> > Color(int rgba, boolean hasalpha)
> > Color(int r, int g, int b)
> > Color(int r, int g, int b, int a)
> > 
> > the separate r, g, b, a is pretty common in api's. that's what i was saying.
> > 
> 
> For what its worth Qt passes a color "class" generally but normally
> you'd write either setColor(255,0,0,255); or setColor("#FF00"); and
> let the language magic automatically turn that into a class, but
> whenever specifying in html notation rather then rgba, its always done
> as a string, I don't recall seeing a api anywhere that stores rgba in
> one int.

that's actually the 
  Color(int rgba, boolean hasalpha)
and
  Color(int rgb)

that passes color as an int around. all pixels in an image are "unsigned ints"
with color in them.
-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread The Rasterman
On Tue, 31 May 2016 07:17:12 + Andrew Williams  said:

> Apologies, I thought Conrad was suggesting using a data structure in the
> object manner to provide reuse and a shorter API in some scenarios, which
> seems to be Java's approach too. Either way, not too fussed - many other
> more verbose APIs in elm could be tackled to provide bigger impact ;)

he was talking of a struct. i was talking of using also just an "uint" which is
32bits which passes around simply. i was talking about why we send the 4 ints
as 4 vars because it's common in api's that create/set colors (color objects).
using a full eo object for a color would be silly. the number seems bad. so
either 4 ints ... or the struct, but how do we have nice bindings for accessing
the struct? do you expect people to fill it by hand? that would be a bit sucky
in c. i have to now always do

  Efl_Color col = {255, 0, 0, 255 }; // red
  efl_gfx_color_set(obj, col);

as opposed to

  efl_gfx_color_set(obj, 255, 0, 0, 255);

if we used an "int" we could do:

  efl_gfx_color_set(obj, 0x);

that was what i was getting at with the "int". you CAN do this in lua and js
too:

  obj.color_set(0x);

(in both), but it sucks for decomposing

efl is already getting worse in c.

  Eina_Promise *job = efl_loop_job(obj, args);
  eina_promise_then(job, _job_cb, NULL, args);

vs

  ecore_job_add(_job_cb, args);

it's become far more verbose/wordy. :( should we do this for colors too now?



> Andrew
> On Tue, 31 May 2016 at 08:02, Carsten Haitzler  wrote:
> 
> > On Tue, 31 May 2016 06:38:52 + Andrew Williams 
> > said:
> >
> > > Not to be picky but Java is not rgba by default - it prefers Color too,
> > > some r g b a helper methods exist. It additionally provides many standard
> > > Color definitions for "system" colours... (As well as convenience such as
> > > Color.BLACK)
> >
> > as i said, it's an object (well a color class you create color objects). :)
> >
> > public class Color
> > extends Object
> >
> > :) there are different constructors that use polymorphism:
> >
> > Color(float r, float g, float b)
> > Color(float r, float g, float b, float a)
> > Color(int rgb)
> > Color(int rgba, boolean hasalpha)
> > Color(int r, int g, int b)
> > Color(int r, int g, int b, int a)
> >
> > the separate r, g, b, a is pretty common in api's. that's what i was
> > saying.
> >
> > > On Tue, 31 May 2016 at 07:34, Carsten Haitzler 
> > wrote:
> > >
> > > > On Mon, 30 May 2016 14:03:43 +0900 Conrad Um  said:
> > > >
> > > > > In Efl layer, there is a data type named as Efl.Gfx.Color which
> > contains
> > > > > four members (r, g, b, a) & its type (8bits or 16bits). Then why
> > aren't
> > > > we
> > > > > using Efl.Gfx.Color instead of 4 integers.
> > > > >
> > > > >efl_gfx_color_set(obj, color); // color is Efl.Gfx.Color data
> > > > structure
> > > > >
> > > > > Moreover, inline methods (helper) can be added which passes 4
> > integers
> > > > and
> > > > > returns Efl.Gfx.Color. These helper functions can provide conversion
> > > > > between premultiplied and straight color.
> > > > >
> > > > > evas_object_color_set() uses premultiplied color, but
> > > > > edje_object_color_set() uses straight one. They are not inconsistent.
> > > > Even
> > > > > though EDC uses straight (because it can be used by designer), but
> > using
> > > > > premultiplied in API level seems more consistent.
> > > > > I'm making APIs to change the color of Elemenatry widget by using
> > > > > edje_object_color_class_set() internally, but their name like
> > > > > evas_object_color_set(). (eg: elm_object_color_set())
> > > > > The problem which type of color will be used still exists here.
> > > > >
> > > > > Only my concern is that manual conversion between premultiplied and
> > > > > straight is annoying. This work can be done by helper functions
> > mentioned
> > > > > above.
> > > > > Please give your ideas about this. Thank you.
> > > >
> > > > well we've used 4 int's because... well.. that's how it's always been.
> > :)
> > > > doing
> > > > higher resolution colors doesn't need much special (eg 16bit per rgb)
> > other
> > > > than a "high dynamic range" api that takes values from 0 to 65535
> > instead
> > > > of 0
> > > > to 255.
> > > >
> > > > so that''s why. now using a single 32bit int for a color instead of r,
> > g,
> > > > b, a
> > > > separate values...  that's a matter for style.
> > > >
> > > > i agree that the api should be premul here. the api reflected what was
> > in
> > > > the
> > > > edc side instead of what is considered normal at the api level (for
> > edje
> > > > colorclasses etc.).
> > > >
> > > > the common case in api's is to see r, g, b, a as 4 integers. android,
> > > > eclipse,
> > > > java, and others.
> > > >
> > > > html popularized a hex version like #ff8800 ... tho really in rgba
> > space
> > > > that
> > > > is 0x8800 (a is 

[EGIT] [core/efl] master 01/01: efl test suite - test args event and args values

2016-05-31 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=47e3b171a3902f9dd5b81af093989d8e1c425235

commit 47e3b171a3902f9dd5b81af093989d8e1c425235
Author: Carsten Haitzler (Rasterman) 
Date:   Tue May 31 17:16:14 2016 +0900

efl test suite - test args event and args values
---
 src/Makefile_Ecore.am |   1 +
 src/tests/ecore/ecore_suite.c |   1 +
 src/tests/ecore/ecore_suite.h |   1 +
 src/tests/ecore/ecore_test_args.c | 135 ++
 4 files changed, 138 insertions(+)

diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index dd8f67a..b027694 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -201,6 +201,7 @@ tests/ecore/ecore_test_ecore_input.c \
 tests/ecore/ecore_test_ecore_file.c \
 tests/ecore/ecore_test_promise.c \
 tests/ecore/ecore_test_job.c \
+tests/ecore/ecore_test_args.c \
 tests/ecore/ecore_suite.h
 
 tests_ecore_ecore_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
diff --git a/src/tests/ecore/ecore_suite.c b/src/tests/ecore/ecore_suite.c
index b45ab02..0ade3c4 100644
--- a/src/tests/ecore/ecore_suite.c
+++ b/src/tests/ecore/ecore_suite.c
@@ -28,6 +28,7 @@ static const Efl_Test_Case etc[] = {
   { "Ecore_File", ecore_test_ecore_file },
   { "Ecore_Promise", ecore_test_ecore_promise },
   { "Ecore_Job", ecore_test_ecore_job },
+  { "Ecore_Args", ecore_test_ecore_args },
   { NULL, NULL }
 };
 
diff --git a/src/tests/ecore/ecore_suite.h b/src/tests/ecore/ecore_suite.h
index ed7a3ac..31ca43d 100644
--- a/src/tests/ecore/ecore_suite.h
+++ b/src/tests/ecore/ecore_suite.h
@@ -17,5 +17,6 @@ void ecore_test_ecore_input(TCase *tc);
 void ecore_test_ecore_file(TCase *tc);
 void ecore_test_ecore_promise(TCase *tc);
 void ecore_test_ecore_job(TCase *tc);
+void ecore_test_ecore_args(TCase *tc);
 
 #endif /* _ECORE_SUITE_H */
diff --git a/src/tests/ecore/ecore_test_args.c 
b/src/tests/ecore/ecore_test_args.c
new file mode 100644
index 000..84ff61a
--- /dev/null
+++ b/src/tests/ecore/ecore_test_args.c
@@ -0,0 +1,135 @@
+#ifdef HAVE_CONFIG_H
+# include 
+#endif
+
+#include 
+#include "ecore_suite.h"
+
+static Eina_Bool
+_cb_args1(void *data EINA_UNUSED, const Eo_Event *event)
+{
+   Efl_Loop_Args *args = event->info;
+   int n;
+
+   n = efl_loop_args_arg_num_get(args);
+   fail_if(n != 8);
+   fail_if(!!strcmp(efl_loop_args_arg_get(args, 0), "a"));
+   fail_if(!!strcmp(efl_loop_args_arg_get(args, 1), "b"));
+   fail_if(!!strcmp(efl_loop_args_arg_get(args, 2), "c"));
+   fail_if(!!strcmp(efl_loop_args_arg_get(args, 3), "d"));
+   fail_if(!!strcmp(efl_loop_args_arg_get(args, 4), "e"));
+   fail_if(!!strcmp(efl_loop_args_arg_get(args, 5), "f"));
+   fail_if(!!strcmp(efl_loop_args_arg_get(args, 6), "g"));
+   fail_if(!!strcmp(efl_loop_args_arg_get(args, 7), "h"));
+   ecore_main_loop_quit();
+   return EO_CALLBACK_CONTINUE;
+}
+
+START_TEST(ecore_test_args1)
+{
+   const char *args[] =
+ {
+"a", "b", "c", "d", "e", "f", "g", "h"
+ };
+
+   ecore_init();
+   eo_event_callback_add(ecore_main_loop_get(), EFL_LOOP_EVENT_ARGS,
+_cb_args1, NULL);
+   efl_loop_args_add(ecore_main_loop_get(), 8, args);
+   ecore_main_loop_begin();
+   ecore_shutdown();
+}
+END_TEST
+
+static Eina_Bool
+_cb_args2(void *data EINA_UNUSED, const Eo_Event *event)
+{
+   Efl_Loop_Args *args = event->info;
+   int n;
+
+   n = efl_loop_args_arg_num_get(args);
+   fail_if(n != 1);
+   fail_if(!!strcmp(efl_loop_args_arg_get(args, 0), "hello world"));
+   ecore_main_loop_quit();
+   return EO_CALLBACK_CONTINUE;
+}
+
+START_TEST(ecore_test_args2)
+{
+   const char *args[] =
+ {
+"hello world"
+ };
+
+   ecore_init();
+   eo_event_callback_add(ecore_main_loop_get(), EFL_LOOP_EVENT_ARGS,
+_cb_args2, NULL);
+   efl_loop_args_add(ecore_main_loop_get(), 1, args);
+   ecore_main_loop_begin();
+   ecore_shutdown();
+}
+END_TEST
+
+static Eina_Bool
+_cb_args3(void *data EINA_UNUSED, const Eo_Event *event)
+{
+   Efl_Loop_Args *args = event->info;
+   int n;
+
+   n = efl_loop_args_arg_num_get(args);
+   fail_if(n != 0);
+   ecore_main_loop_quit();
+   return EO_CALLBACK_CONTINUE;
+}
+
+START_TEST(ecore_test_args3)
+{
+   ecore_init();
+   eo_event_callback_add(ecore_main_loop_get(), EFL_LOOP_EVENT_ARGS,
+_cb_args3, NULL);
+   efl_loop_args_add(ecore_main_loop_get(), 0, NULL);
+   ecore_main_loop_begin();
+   ecore_shutdown();
+}
+END_TEST
+
+static Eina_Bool
+_cb_args4(void *data EINA_UNUSED, const Eo_Event *event)
+{
+   Efl_Loop_Args *args = event->info;
+   int n;
+
+   n = efl_loop_args_arg_num_get(args);
+   fail_if(n != 3);
+   fail_if(!!strcmp(efl_loop_args_arg_get(args, 0), "some really long string 
with lots more to it than is needed for an argument blah"));
+   fail_if(!!strcmp(efl_loop_args_arg_get(args, 1), "x"));
+   fail_if(!!strcmp(efl_loop_args_arg_get(args, 2), "y"));
+   

Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread Simon Lees


On 05/31/2016 04:32 PM, Carsten Haitzler (The Rasterman) wrote:
> On Tue, 31 May 2016 06:38:52 + Andrew Williams  
> said:
> 
>> Not to be picky but Java is not rgba by default - it prefers Color too,
>> some r g b a helper methods exist. It additionally provides many standard
>> Color definitions for "system" colours... (As well as convenience such as
>> Color.BLACK)
> 
> as i said, it's an object (well a color class you create color objects). :)
> 
> public class Color
> extends Object
> 
> :) there are different constructors that use polymorphism:
> 
> Color(float r, float g, float b)
> Color(float r, float g, float b, float a)
> Color(int rgb)
> Color(int rgba, boolean hasalpha)
> Color(int r, int g, int b)
> Color(int r, int g, int b, int a)
> 
> the separate r, g, b, a is pretty common in api's. that's what i was saying.
> 

For what its worth Qt passes a color "class" generally but normally
you'd write either setColor(255,0,0,255); or setColor("#FF00"); and
let the language magic automatically turn that into a class, but
whenever specifying in html notation rather then rgba, its always done
as a string, I don't recall seeing a api anywhere that stores rgba in
one int.


-- 

Simon Lees (Simotek)http://simotek.net

Emergency Update Team   keybase.io/simotek
SUSE LinuxAdeliade Australia, UTC+9:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B



signature.asc
Description: OpenPGP digital signature
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread Andrew Williams
Apologies, I thought Conrad was suggesting using a data structure in the
object manner to provide reuse and a shorter API in some scenarios, which
seems to be Java's approach too. Either way, not too fussed - many other
more verbose APIs in elm could be tackled to provide bigger impact ;)

Andrew
On Tue, 31 May 2016 at 08:02, Carsten Haitzler  wrote:

> On Tue, 31 May 2016 06:38:52 + Andrew Williams 
> said:
>
> > Not to be picky but Java is not rgba by default - it prefers Color too,
> > some r g b a helper methods exist. It additionally provides many standard
> > Color definitions for "system" colours... (As well as convenience such as
> > Color.BLACK)
>
> as i said, it's an object (well a color class you create color objects). :)
>
> public class Color
> extends Object
>
> :) there are different constructors that use polymorphism:
>
> Color(float r, float g, float b)
> Color(float r, float g, float b, float a)
> Color(int rgb)
> Color(int rgba, boolean hasalpha)
> Color(int r, int g, int b)
> Color(int r, int g, int b, int a)
>
> the separate r, g, b, a is pretty common in api's. that's what i was
> saying.
>
> > On Tue, 31 May 2016 at 07:34, Carsten Haitzler 
> wrote:
> >
> > > On Mon, 30 May 2016 14:03:43 +0900 Conrad Um  said:
> > >
> > > > In Efl layer, there is a data type named as Efl.Gfx.Color which
> contains
> > > > four members (r, g, b, a) & its type (8bits or 16bits). Then why
> aren't
> > > we
> > > > using Efl.Gfx.Color instead of 4 integers.
> > > >
> > > >efl_gfx_color_set(obj, color); // color is Efl.Gfx.Color data
> > > structure
> > > >
> > > > Moreover, inline methods (helper) can be added which passes 4
> integers
> > > and
> > > > returns Efl.Gfx.Color. These helper functions can provide conversion
> > > > between premultiplied and straight color.
> > > >
> > > > evas_object_color_set() uses premultiplied color, but
> > > > edje_object_color_set() uses straight one. They are not inconsistent.
> > > Even
> > > > though EDC uses straight (because it can be used by designer), but
> using
> > > > premultiplied in API level seems more consistent.
> > > > I'm making APIs to change the color of Elemenatry widget by using
> > > > edje_object_color_class_set() internally, but their name like
> > > > evas_object_color_set(). (eg: elm_object_color_set())
> > > > The problem which type of color will be used still exists here.
> > > >
> > > > Only my concern is that manual conversion between premultiplied and
> > > > straight is annoying. This work can be done by helper functions
> mentioned
> > > > above.
> > > > Please give your ideas about this. Thank you.
> > >
> > > well we've used 4 int's because... well.. that's how it's always been.
> :)
> > > doing
> > > higher resolution colors doesn't need much special (eg 16bit per rgb)
> other
> > > than a "high dynamic range" api that takes values from 0 to 65535
> instead
> > > of 0
> > > to 255.
> > >
> > > so that''s why. now using a single 32bit int for a color instead of r,
> g,
> > > b, a
> > > separate values...  that's a matter for style.
> > >
> > > i agree that the api should be premul here. the api reflected what was
> in
> > > the
> > > edc side instead of what is considered normal at the api level (for
> edje
> > > colorclasses etc.).
> > >
> > > the common case in api's is to see r, g, b, a as 4 integers. android,
> > > eclipse,
> > > java, and others.
> > >
> > > html popularized a hex version like #ff8800 ... tho really in rgba
> space
> > > that
> > > is 0x8800 (a is high byte). so there is a possibility to see color
> as a
> > > single 32bit integer ... OR as 4 values (just 4 ints. we could have
> used 4
> > > unsigned chars just as well but whatever).
> > >
> > > tbh - i don't know which is better. the single int does have the
> benefit of
> > >
> > > efl_color_set(obj, efl_color_premul(input));
> > >
> > > just return a premultipled version of a non-premul color.
> > >
> > > a lot of api's actually like to make whole color objects... with
> multiple
> > > api's
> > > on setting them. we have not done that. a whole eo object for color
> would
> > > be
> > > ridiculous. a struct with api's to set/fill/get values in various
> spaces
> > > might
> > > be ok. but is that a good idea?
> > >
> > > oh yeah. there is a good reason to stick to 4 ints. javascript and
> lua. an
> > > unsigned int here would have to become a "number" in js and lua.
> numbers
> > > are
> > > doubles. while a double can express precision for whole values up to
> (and
> > > beyond) 32bits (unsigned) so it wouldn't be a problem, these languages
> are
> > > going
> > > to be far more painful to work in in dividing up r, g, b and a when you
> > > have a
> > > combined number and then combining them again.
> > >
> > > in languages with integer types that are at least 32bit this is
> generally
> > > not a
> > > problem as they give you bit operators like and/or and 

[EGIT] [tools/enventor] master 01/01: template: updated watchface.

2016-05-31 Thread Hermet Park
hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=fc8096c8787d4ff4b04df1c3695ee6b0e127f260

commit fc8096c8787d4ff4b04df1c3695ee6b0e127f260
Author: Hermet Park 
Date:   Tue May 31 16:01:29 2016 +0900

template: updated watchface.
---
 data/images/ENVENTOR_EMBEDDED_CALENDAR_UNIT.png | Bin 24493 -> 0 bytes
 data/images/ENVENTOR_EMBEDDED_DATE_BG.png   | Bin 2881 -> 0 bytes
 data/images/ENVENTOR_EMBEDDED_NEEDLE_HOUR.png   | Bin 511 -> 5711 bytes
 data/images/ENVENTOR_EMBEDDED_NEEDLE_MINUTE.png | Bin 548 -> 1037 bytes
 data/images/ENVENTOR_EMBEDDED_NEEDLE_SECOND.png | Bin 753 -> 1276 bytes
 data/images/ENVENTOR_EMBEDDED_WATCHFACE.png | Bin 75840 -> 102692 bytes
 data/images/Makefile.am |   2 -
 data/templates/watchface.edc|  73 +---
 8 files changed, 26 insertions(+), 49 deletions(-)

diff --git a/data/images/ENVENTOR_EMBEDDED_CALENDAR_UNIT.png 
b/data/images/ENVENTOR_EMBEDDED_CALENDAR_UNIT.png
deleted file mode 100644
index dfe7b80..000
Binary files a/data/images/ENVENTOR_EMBEDDED_CALENDAR_UNIT.png and /dev/null 
differ
diff --git a/data/images/ENVENTOR_EMBEDDED_DATE_BG.png 
b/data/images/ENVENTOR_EMBEDDED_DATE_BG.png
deleted file mode 100644
index 14434c9..000
Binary files a/data/images/ENVENTOR_EMBEDDED_DATE_BG.png and /dev/null differ
diff --git a/data/images/ENVENTOR_EMBEDDED_NEEDLE_HOUR.png 
b/data/images/ENVENTOR_EMBEDDED_NEEDLE_HOUR.png
index 6e51387..d1ad63a 100644
Binary files a/data/images/ENVENTOR_EMBEDDED_NEEDLE_HOUR.png and 
b/data/images/ENVENTOR_EMBEDDED_NEEDLE_HOUR.png differ
diff --git a/data/images/ENVENTOR_EMBEDDED_NEEDLE_MINUTE.png 
b/data/images/ENVENTOR_EMBEDDED_NEEDLE_MINUTE.png
index 987c3e2..93f6d88 100644
Binary files a/data/images/ENVENTOR_EMBEDDED_NEEDLE_MINUTE.png and 
b/data/images/ENVENTOR_EMBEDDED_NEEDLE_MINUTE.png differ
diff --git a/data/images/ENVENTOR_EMBEDDED_NEEDLE_SECOND.png 
b/data/images/ENVENTOR_EMBEDDED_NEEDLE_SECOND.png
index bb89631..f3acc15 100644
Binary files a/data/images/ENVENTOR_EMBEDDED_NEEDLE_SECOND.png and 
b/data/images/ENVENTOR_EMBEDDED_NEEDLE_SECOND.png differ
diff --git a/data/images/ENVENTOR_EMBEDDED_WATCHFACE.png 
b/data/images/ENVENTOR_EMBEDDED_WATCHFACE.png
index 40c0f96..9597790 100644
Binary files a/data/images/ENVENTOR_EMBEDDED_WATCHFACE.png and 
b/data/images/ENVENTOR_EMBEDDED_WATCHFACE.png differ
diff --git a/data/images/Makefile.am b/data/images/Makefile.am
index 59c3487..3cfa6f6 100644
--- a/data/images/Makefile.am
+++ b/data/images/Makefile.am
@@ -14,8 +14,6 @@ files_DATA = ENVENTOR_EMBEDDED_IMAGE.png \
  ENVENTOR_EMBEDDED_TRIAB-10.png \
  ENVENTOR_EMBEDDED_TRIAB-11.png \
  ENVENTOR_EMBEDDED_TRIAB-12.png \
- ENVENTOR_EMBEDDED_CALENDAR_UNIT.png \
- ENVENTOR_EMBEDDED_DATE_BG.png \
  ENVENTOR_EMBEDDED_MONTH_STROKE.png \
  ENVENTOR_EMBEDDED_MOONPHASE_COVER.png \
  ENVENTOR_EMBEDDED_MOONPHASE_MOON.png \
diff --git a/data/templates/watchface.edc b/data/templates/watchface.edc
index 5798933..2ea5a6c 100644
--- a/data/templates/watchface.edc
+++ b/data/templates/watchface.edc
@@ -4,11 +4,9 @@ collections {
   /* TODO: Please replace embedded image files to your application image 
files. */
   images {
  image: "ENVENTOR_EMBEDDED_WATCHFACE.png" COMP;
- image: "ENVENTOR_EMBEDDED_CALENDAR_UNIT.png" COMP;
  image: "ENVENTOR_EMBEDDED_MOONPHASE_COVER.png" COMP;
  image: "ENVENTOR_EMBEDDED_MOONPHASE_MOON.png" COMP;
  image: "ENVENTOR_EMBEDDED_MONTH_STROKE.png" COMP;
- image: "ENVENTOR_EMBEDDED_DATE_BG.png" COMP;
  image: "ENVENTOR_EMBEDDED_NEEDLE_HOUR.png" COMP;
  image: "ENVENTOR_EMBEDDED_NEEDLE_MINUTE.png" COMP;
  image: "ENVENTOR_EMBEDDED_NEEDLE_SECOND.png" COMP;
@@ -19,18 +17,7 @@ collections {
 desc { "default";
/* TODO: Please replace embedded image files to your 
application image files. */
image.normal: "ENVENTOR_EMBEDDED_WATCHFACE.png";
-   min: 250 250;
-   rel1.relative: 0.5 0.5;
-   rel2.relative: 0.5 0.5;
-   fixed: 1 1;
-}
- }
- image { "calendar";
-scale: 1;
-desc { "default";
-   /* TODO: Please replace embedded image files to your 
application image files. */
-   image.normal: "ENVENTOR_EMBEDDED_CALENDAR_UNIT.png";
-   min: 200 200;
+   min: 300 300;
rel1.relative: 0.5 0.5;
rel2.relative: 0.5 0.5;
fixed: 1 1;
@@ -57,7 +44,7 @@ collections {
 desc { "default";
/* TODO: Please replace embedded image files to your 
application image files. */
image.normal: "ENVENTOR_EMBEDDED_MOONPHASE_COVER.png";
-   min: 109 109;
+

Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread The Rasterman
On Tue, 31 May 2016 06:38:52 + Andrew Williams  said:

> Not to be picky but Java is not rgba by default - it prefers Color too,
> some r g b a helper methods exist. It additionally provides many standard
> Color definitions for "system" colours... (As well as convenience such as
> Color.BLACK)

as i said, it's an object (well a color class you create color objects). :)

public class Color
extends Object

:) there are different constructors that use polymorphism:

Color(float r, float g, float b)
Color(float r, float g, float b, float a)
Color(int rgb)
Color(int rgba, boolean hasalpha)
Color(int r, int g, int b)
Color(int r, int g, int b, int a)

the separate r, g, b, a is pretty common in api's. that's what i was saying.

> On Tue, 31 May 2016 at 07:34, Carsten Haitzler  wrote:
> 
> > On Mon, 30 May 2016 14:03:43 +0900 Conrad Um  said:
> >
> > > In Efl layer, there is a data type named as Efl.Gfx.Color which contains
> > > four members (r, g, b, a) & its type (8bits or 16bits). Then why aren't
> > we
> > > using Efl.Gfx.Color instead of 4 integers.
> > >
> > >efl_gfx_color_set(obj, color); // color is Efl.Gfx.Color data
> > structure
> > >
> > > Moreover, inline methods (helper) can be added which passes 4 integers
> > and
> > > returns Efl.Gfx.Color. These helper functions can provide conversion
> > > between premultiplied and straight color.
> > >
> > > evas_object_color_set() uses premultiplied color, but
> > > edje_object_color_set() uses straight one. They are not inconsistent.
> > Even
> > > though EDC uses straight (because it can be used by designer), but using
> > > premultiplied in API level seems more consistent.
> > > I'm making APIs to change the color of Elemenatry widget by using
> > > edje_object_color_class_set() internally, but their name like
> > > evas_object_color_set(). (eg: elm_object_color_set())
> > > The problem which type of color will be used still exists here.
> > >
> > > Only my concern is that manual conversion between premultiplied and
> > > straight is annoying. This work can be done by helper functions mentioned
> > > above.
> > > Please give your ideas about this. Thank you.
> >
> > well we've used 4 int's because... well.. that's how it's always been. :)
> > doing
> > higher resolution colors doesn't need much special (eg 16bit per rgb) other
> > than a "high dynamic range" api that takes values from 0 to 65535 instead
> > of 0
> > to 255.
> >
> > so that''s why. now using a single 32bit int for a color instead of r, g,
> > b, a
> > separate values...  that's a matter for style.
> >
> > i agree that the api should be premul here. the api reflected what was in
> > the
> > edc side instead of what is considered normal at the api level (for edje
> > colorclasses etc.).
> >
> > the common case in api's is to see r, g, b, a as 4 integers. android,
> > eclipse,
> > java, and others.
> >
> > html popularized a hex version like #ff8800 ... tho really in rgba space
> > that
> > is 0x8800 (a is high byte). so there is a possibility to see color as a
> > single 32bit integer ... OR as 4 values (just 4 ints. we could have used 4
> > unsigned chars just as well but whatever).
> >
> > tbh - i don't know which is better. the single int does have the benefit of
> >
> > efl_color_set(obj, efl_color_premul(input));
> >
> > just return a premultipled version of a non-premul color.
> >
> > a lot of api's actually like to make whole color objects... with multiple
> > api's
> > on setting them. we have not done that. a whole eo object for color would
> > be
> > ridiculous. a struct with api's to set/fill/get values in various spaces
> > might
> > be ok. but is that a good idea?
> >
> > oh yeah. there is a good reason to stick to 4 ints. javascript and lua. an
> > unsigned int here would have to become a "number" in js and lua. numbers
> > are
> > doubles. while a double can express precision for whole values up to (and
> > beyond) 32bits (unsigned) so it wouldn't be a problem, these languages are
> > going
> > to be far more painful to work in in dividing up r, g, b and a when you
> > have a
> > combined number and then combining them again.
> >
> > in languages with integer types that are at least 32bit this is generally
> > not a
> > problem as they give you bit operators like and/or and bitshift, this is
> > less
> > nice in languages like lua that don't do this. well not out of the box.
> >
> > http://www.lua.org/manual/5.2/manual.html#6.7
> >
> > much less nice than just having 4 value params. so things begin to look
> > quite
> > ugly here. :(
> >
> > so i think this is one of those times where people need to provide their
> > input,
> > but a single "unsigned int" for a color seems less nice for languages like
> > lua,
> > but it's nicer for returning a color value.
> >
> >
> > > Best Regards,
> > > conr2d (Jee-Yong Um)
> > >
> > --
> > 

Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread Andrew Williams
Not to be picky but Java is not rgba by default - it prefers Color too,
some r g b a helper methods exist. It additionally provides many standard
Color definitions for "system" colours... (As well as convenience such as
Color.BLACK)
On Tue, 31 May 2016 at 07:34, Carsten Haitzler  wrote:

> On Mon, 30 May 2016 14:03:43 +0900 Conrad Um  said:
>
> > In Efl layer, there is a data type named as Efl.Gfx.Color which contains
> > four members (r, g, b, a) & its type (8bits or 16bits). Then why aren't
> we
> > using Efl.Gfx.Color instead of 4 integers.
> >
> >efl_gfx_color_set(obj, color); // color is Efl.Gfx.Color data
> structure
> >
> > Moreover, inline methods (helper) can be added which passes 4 integers
> and
> > returns Efl.Gfx.Color. These helper functions can provide conversion
> > between premultiplied and straight color.
> >
> > evas_object_color_set() uses premultiplied color, but
> > edje_object_color_set() uses straight one. They are not inconsistent.
> Even
> > though EDC uses straight (because it can be used by designer), but using
> > premultiplied in API level seems more consistent.
> > I'm making APIs to change the color of Elemenatry widget by using
> > edje_object_color_class_set() internally, but their name like
> > evas_object_color_set(). (eg: elm_object_color_set())
> > The problem which type of color will be used still exists here.
> >
> > Only my concern is that manual conversion between premultiplied and
> > straight is annoying. This work can be done by helper functions mentioned
> > above.
> > Please give your ideas about this. Thank you.
>
> well we've used 4 int's because... well.. that's how it's always been. :)
> doing
> higher resolution colors doesn't need much special (eg 16bit per rgb) other
> than a "high dynamic range" api that takes values from 0 to 65535 instead
> of 0
> to 255.
>
> so that''s why. now using a single 32bit int for a color instead of r, g,
> b, a
> separate values...  that's a matter for style.
>
> i agree that the api should be premul here. the api reflected what was in
> the
> edc side instead of what is considered normal at the api level (for edje
> colorclasses etc.).
>
> the common case in api's is to see r, g, b, a as 4 integers. android,
> eclipse,
> java, and others.
>
> html popularized a hex version like #ff8800 ... tho really in rgba space
> that
> is 0x8800 (a is high byte). so there is a possibility to see color as a
> single 32bit integer ... OR as 4 values (just 4 ints. we could have used 4
> unsigned chars just as well but whatever).
>
> tbh - i don't know which is better. the single int does have the benefit of
>
> efl_color_set(obj, efl_color_premul(input));
>
> just return a premultipled version of a non-premul color.
>
> a lot of api's actually like to make whole color objects... with multiple
> api's
> on setting them. we have not done that. a whole eo object for color would
> be
> ridiculous. a struct with api's to set/fill/get values in various spaces
> might
> be ok. but is that a good idea?
>
> oh yeah. there is a good reason to stick to 4 ints. javascript and lua. an
> unsigned int here would have to become a "number" in js and lua. numbers
> are
> doubles. while a double can express precision for whole values up to (and
> beyond) 32bits (unsigned) so it wouldn't be a problem, these languages are
> going
> to be far more painful to work in in dividing up r, g, b and a when you
> have a
> combined number and then combining them again.
>
> in languages with integer types that are at least 32bit this is generally
> not a
> problem as they give you bit operators like and/or and bitshift, this is
> less
> nice in languages like lua that don't do this. well not out of the box.
>
> http://www.lua.org/manual/5.2/manual.html#6.7
>
> much less nice than just having 4 value params. so things begin to look
> quite
> ugly here. :(
>
> so i think this is one of those times where people need to provide their
> input,
> but a single "unsigned int" for a color seems less nice for languages like
> lua,
> but it's nicer for returning a color value.
>
>
> > Best Regards,
> > conr2d (Jee-Yong Um)
> >
> --
> > What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> > patterns at an interface-level. Reveals which users, apps, and protocols
> are
> > consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> > J-Flow, sFlow and other flows. Make informed decisions using capacity
> > planning reports.
> https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
>
>
> --
> - Codito, ergo sum - "I code, therefore I am" --
> The Rasterman (Carsten Haitzler)

Re: [E-devel] What about using Efl.Gfx.Color instead of 4 integers?

2016-05-31 Thread The Rasterman
On Mon, 30 May 2016 14:03:43 +0900 Conrad Um  said:

> In Efl layer, there is a data type named as Efl.Gfx.Color which contains
> four members (r, g, b, a) & its type (8bits or 16bits). Then why aren't we
> using Efl.Gfx.Color instead of 4 integers.
> 
>efl_gfx_color_set(obj, color); // color is Efl.Gfx.Color data structure
> 
> Moreover, inline methods (helper) can be added which passes 4 integers and
> returns Efl.Gfx.Color. These helper functions can provide conversion
> between premultiplied and straight color.
> 
> evas_object_color_set() uses premultiplied color, but
> edje_object_color_set() uses straight one. They are not inconsistent. Even
> though EDC uses straight (because it can be used by designer), but using
> premultiplied in API level seems more consistent.
> I'm making APIs to change the color of Elemenatry widget by using
> edje_object_color_class_set() internally, but their name like
> evas_object_color_set(). (eg: elm_object_color_set())
> The problem which type of color will be used still exists here.
> 
> Only my concern is that manual conversion between premultiplied and
> straight is annoying. This work can be done by helper functions mentioned
> above.
> Please give your ideas about this. Thank you.

well we've used 4 int's because... well.. that's how it's always been. :) doing
higher resolution colors doesn't need much special (eg 16bit per rgb) other
than a "high dynamic range" api that takes values from 0 to 65535 instead of 0
to 255.

so that''s why. now using a single 32bit int for a color instead of r, g, b, a
separate values...  that's a matter for style.

i agree that the api should be premul here. the api reflected what was in the
edc side instead of what is considered normal at the api level (for edje
colorclasses etc.).

the common case in api's is to see r, g, b, a as 4 integers. android, eclipse,
java, and others.

html popularized a hex version like #ff8800 ... tho really in rgba space that
is 0x8800 (a is high byte). so there is a possibility to see color as a
single 32bit integer ... OR as 4 values (just 4 ints. we could have used 4
unsigned chars just as well but whatever).

tbh - i don't know which is better. the single int does have the benefit of

efl_color_set(obj, efl_color_premul(input));

just return a premultipled version of a non-premul color.

a lot of api's actually like to make whole color objects... with multiple api's
on setting them. we have not done that. a whole eo object for color would be
ridiculous. a struct with api's to set/fill/get values in various spaces might
be ok. but is that a good idea?

oh yeah. there is a good reason to stick to 4 ints. javascript and lua. an
unsigned int here would have to become a "number" in js and lua. numbers are
doubles. while a double can express precision for whole values up to (and
beyond) 32bits (unsigned) so it wouldn't be a problem, these languages are going
to be far more painful to work in in dividing up r, g, b and a when you have a
combined number and then combining them again.

in languages with integer types that are at least 32bit this is generally not a
problem as they give you bit operators like and/or and bitshift, this is less
nice in languages like lua that don't do this. well not out of the box.

http://www.lua.org/manual/5.2/manual.html#6.7

much less nice than just having 4 value params. so things begin to look quite
ugly here. :(

so i think this is one of those times where people need to provide their input,
but a single "unsigned int" for a color seems less nice for languages like lua,
but it's nicer for returning a color value.


> Best Regards,
> conr2d (Jee-Yong Um)
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are 
> consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
> J-Flow, sFlow and other flows. Make informed decisions using capacity 
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___