Re: [E-devel] Builds

2017-07-19 Thread Bruno Dilly
Hey Cedric,

On Wed, Jul 19, 2017 at 2:46 PM, Cedric BAIL  wrote:

> Hello,
>
> On Wed, Jul 19, 2017 at 7:54 AM, Guilherme Íscaro 
> wrote:
> > I'm playing around with Meson for some days and I really enjoyed its
> > syntax. If you look the meson.build files it's noticeable that it's much
> > more readable when compared to Autotools and as Mike pointed out, it's
> much
> > faster as well!
> >
> >>> what about windows and osx support?
> >
> > Meson supports both OS X and Windows (they even generate visual studio
> > files), but I did not test.
> >
> > I created a meson branch for Terminology (devs/iscaro/meson), please
> take a
> > look and send some feedback, if possible.
>
> I just checked it and it seems it doesn't install the theme and icons
> properly. Try by doing first a make uninstall of terminology before
> doing a ninja install and you should see the problem.
>

I wasn't able to reproduce this issue.
I've tried to install it into a new folder

$ meson --prefix=/tmp/term build

and themes are in place, in share/terminology/themes

Which meson version are you using?
I'm using 0.41 now, but I've tried an older version before and faced issues
(different from that)



>
> Cedric
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
Bruno Dilly
ProFUSION embedded systems
http://profusion.mobi
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: ephysics: set proper geometry when setting an object to a face

2017-06-06 Thread Bruno Dilly
cedric pushed a commit to branch master.

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

commit 30b8c1ce82c91cc9624fa76d197f3c015cba438b
Author: Bruno Dilly 
Date:   Tue Jun 6 14:00:27 2017 -0700

ephysics: set proper geometry when setting an object to a face

Summary:
It was missing a break statement in a switch.

Fixes T5547

@fix

Reviewers: cedric

Subscribers: jpeg

Maniphest Tasks: T5547

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

Signed-off-by: Cedric BAIL 
---
 src/lib/ephysics/ephysics_body.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/ephysics/ephysics_body.cpp 
b/src/lib/ephysics/ephysics_body.cpp
index 7c4754b443..58a35b316c 100644
--- a/src/lib/ephysics/ephysics_body.cpp
+++ b/src/lib/ephysics/ephysics_body.cpp
@@ -4688,10 +4688,12 @@ _ephysics_body_box_face_evas_object_set(EPhysics_Body 
*body, EPhysics_Body_Face
   case EPHYSICS_BODY_BOX_FACE_LEFT:
  _ephysics_body_geometry_set(body, bx, by, bz,
  bw, obj_h, obj_w, rate);
+ break;
   case EPHYSICS_BODY_BOX_FACE_TOP:
   case EPHYSICS_BODY_BOX_FACE_BOTTOM:
  _ephysics_body_geometry_set(body, bx, by, bz,
  obj_w, bh, obj_h, rate);
+ break;
   default:
  break;
  }

-- 




[EGIT] [core/efl] master 01/01: evas_events: look for seats on hash instead of input devices

2017-03-24 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit e0170c2b0dbadb98d8e3c9f831b88764f1f8aa26
Author: Bruno Dilly 
Date:   Thu Mar 23 19:00:44 2017 -0300

evas_events: look for seats on hash instead of input devices

Summary:
Otherwise it won't ever find the modifier masks.

Fixes T5146

@fix

Reviewers: iscaro, Jaehyun_Cho

Subscribers: cedric, jpeg

Maniphest Tasks: T5146

Differential Revision: https://phab.enlightenment.org/D4738
---
 src/lib/evas/canvas/evas_events.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index 82c6dd7..cfaee6e 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -3110,9 +3110,12 @@ _canvas_event_feed_key_down_internal(Evas_Public_Data 
*e, Efl_Input_Key_Data *ev
 Eina_List *l;
 Evas_Key_Grab *g;
 Evas_Modifier_Mask *seat_mask, modifier_mask;
+Efl_Input_Device *seat = NULL;
 
 e->walking_grabs++;
-seat_mask = eina_hash_find(e->modifiers.masks, &ev->device);
+if (ev->device)
+  seat = efl_input_device_seat_get(ev->device);
+seat_mask = eina_hash_find(e->modifiers.masks, &seat);
 modifier_mask = seat_mask ? *seat_mask : 0;
 EINA_LIST_FOREACH(e->grabs, l, g)
   {
@@ -3200,9 +3203,12 @@ _canvas_event_feed_key_up_internal(Evas_Public_Data *e, 
Efl_Input_Key_Data *ev)
 Eina_List *l;
 Evas_Key_Grab *g;
 Evas_Modifier_Mask *seat_mask, modifier_mask;
+Efl_Input_Device *seat = NULL;
 
 e->walking_grabs++;
-seat_mask = eina_hash_find(e->modifiers.masks, &ev->device);
+if (ev->device)
+  seat = efl_input_device_seat_get(ev->device);
+seat_mask = eina_hash_find(e->modifiers.masks, &seat);
 modifier_mask = seat_mask ? *seat_mask : 0;
 EINA_LIST_FOREACH(e->grabs, l, g)
   {

-- 




[EGIT] [core/efl] master 02/02: edje: change seat signals

2017-02-01 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit b251e1a4ac5ddc73c085064431982f6baa909443
Author: Bruno Dilly 
Date:   Wed Feb 1 17:14:39 2017 -0200

edje: change seat signals

Use seat names as prefix, not as suffix, following
a top-down approach and avoiding issues
with applications that may be receiving
doubled signals (legacy + suffixed).

So instead of "mouse,in,seat1" signal will be
"seat,seat1,mouse,in".
---
 src/examples/edje/dynamic_multiseat.edc  |  9 ++--
 src/examples/edje/multiseat.edc  | 64 ++--
 src/examples/edje/multiseat_custom_names.edc |  8 ++--
 src/examples/edje/multiseat_filter.edc   | 34 +--
 src/lib/edje/edje_program.c  |  4 +-
 5 files changed, 65 insertions(+), 54 deletions(-)

diff --git a/src/examples/edje/dynamic_multiseat.edc 
b/src/examples/edje/dynamic_multiseat.edc
index d512f03..eacdcb5 100644
--- a/src/examples/edje/dynamic_multiseat.edc
+++ b/src/examples/edje/dynamic_multiseat.edc
@@ -244,7 +244,8 @@ collections {
 
strncpy(seat_name, sig[strlen("seat,added,")],
strchr(sig[strlen("seat,added,")], ","));
-   snprintf(buf, 128, "seat,color,%s,r=%i,g=%i,b=%i", seat_name,
+   snprintf(buf, sizeof(buf),
+"seat,color,%s,r=%i,g=%i,b=%i", seat_name,
 r, g, b);
emit(buf, "theme");
 }
@@ -252,12 +253,12 @@ collections {
 
  program {
 name: "button,in";
-signal: "mouse,in,*";
+signal: "seat,*,mouse,in";
 source: "button_bg,*";
 script {
new idx, r, g, b;
 
-   idx = atoi(sig[strlen("mouse,in,seat")]) - 1;
+   idx = atoi(sig[strlen("seat,seat")]) - 1;
r = fetch_int(red, idx);
g = fetch_int(green, idx);
b = fetch_int(blue, idx);
@@ -268,7 +269,7 @@ collections {
 
  program {
 name: "button,out";
-signal: "mouse,out,*";
+signal: "seat,*,mouse,out";
 source: "button_bg,*";
 script {
set_color_class(src, 200, 200, 200, 255);
diff --git a/src/examples/edje/multiseat.edc b/src/examples/edje/multiseat.edc
index ce1779b..5738ec9 100644
--- a/src/examples/edje/multiseat.edc
+++ b/src/examples/edje/multiseat.edc
@@ -469,7 +469,7 @@ collections {
 
  program {
 name: "focus,t1,s1";
-signal: "mouse,clicked,1,seat1";
+signal: "seat,seat1,mouse,clicked,1";
 source: "example/text1";
 action: FOCUS_SET "seat1";
 target: "example/text1";
@@ -477,7 +477,7 @@ collections {
 
  program {
 name: "focus,color,t1,s1";
-signal: "focus,part,in,seat1";
+signal: "seat,seat1,focus,part,in";
 source: "example/text1";
 action: STATE_SET "focused,s1" 0.0;
 target: "bg_text1";
@@ -485,7 +485,7 @@ collections {
 
  program {
 name: "unfocus,color,t1,s1";
-signal: "focus,part,out,seat1";
+signal: "seat,seat1,focus,part,out";
 source: "example/text1";
 action: STATE_SET "default" 0.0;
 target: "bg_text1";
@@ -493,7 +493,7 @@ collections {
 
  program {
 name: "focus,t2,s1";
-signal: "mouse,clicked,1,seat1";
+signal: "seat,seat1,mouse,clicked,1";
 source: "example/text2";
 action: FOCUS_SET "seat1";
 target: "example/text2";
@@ -501,7 +501,7 @@ collections {
 
  program {
 name: "focus,color,t2,s1";
-signal: "focus,part,in,seat1";
+signal: "seat,seat1,focus,part,in";
 source: "example/text2";
 action: STATE_SET "focused,s1" 0.0;
 target: "bg_text2";
@@ -509,7 +509,7 @@ collections {
 
  program {
 name: "unfocus,color,t2,s1";
-signal: "focus,part,out,seat1";
+signal: "seat,seat1,focus,part,out";
 source: "example/text2";
 action: STATE_SET "default" 0.0;
 target: "bg_text2";
@@ -517,7 +517,7 @@ collections {
 
  program {
  

[EGIT] [core/efl] master 01/02: edje: fix CID 1368019 - Null pointer dereferences

2017-02-01 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 9893c6d91afb3b2b71d869f4852fbd217d87b6aa
Author: Bruno Dilly 
Date:   Thu Jan 26 18:26:23 2017 -0200

edje: fix CID 1368019 - Null pointer dereferences

It only should check if it's allowed to focus a part
if a part was passed (if rp is null such check should
be skipped).
---
 src/lib/edje/edje_program.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index aac74b2..cc3ae96 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -662,7 +662,7 @@ _edje_part_focus_set(Edje *ed, const char *seat_name, 
Edje_Real_Part *rp)
 
if (focused_part != rp)
  {
-if ((rp->part->allowed_seats) &&
+if (rp && (rp->part->allowed_seats) &&
 (!_edje_part_allowed_seat_find(rp, sname)))
   goto not_allowed;
 

-- 




Re: [E-devel] Problem with new edje seatX signals

2017-01-03 Thread Bruno Dilly
On Mon, Jan 2, 2017 at 3:44 PM, Guilherme Íscaro 
wrote:

> On Fri, Dec 30, 2016 at 10:20 AM, Carsten Haitzler 
> wrote:
>
> > On Fri, 30 Dec 2016 09:09:26 -0200 Gustavo Sverzut Barbieri
> >  said:
> >
> > > Hi all,
> > >
> > > Indeed, breaking backwards compat is a no go and we'll fix that.
> > >
> > > Is the proposed signal name okay with all? Or should we add an extra
> > > prefix, like "seat,Y,mouse,downX"?
> >
> > this seems good to me. :)
> >
>
> I agree
>


Thank you for spotting this issue, Dave.

I believe this changes makes sense, I'll work on that asap.

Regards


> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
Bruno Dilly
ProFUSION embedded systems
http://profusion.mobi
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 03/06: edje: clean erroneous documentation

2016-12-21 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 65723a190ae34157b6e0335fc86ea70370d17b18
Author: Bruno Dilly 
Date:   Wed Dec 14 03:02:00 2016 -0200

edje: clean erroneous documentation

Not implemented functions
---
 src/lib/edje/edje_embryo.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index f4d49d0..c7c70f7 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -193,8 +193,6 @@
  * get_ignore_flags(part_id)
  * set_mask_flags(part_id, flags)
  * get_mask_flags(part_id)
- * set_clip(part_id, clip_part_id)
- * get_clip(part_id)
  *
  * set_focus(part_id, seat_name[])
  * unset_focus(seat_name[])

-- 




[EGIT] [core/efl] master 06/06: Merge branch 'devs/bdilly/edje_multiseat_filter'

2016-12-21 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 8a42514d71195ca28028346a338e4db2b2f4faf9
Merge: 18f41e1 de183e1
Author: Bruno Dilly 
Date:   Wed Dec 21 23:04:48 2016 -0200

Merge branch 'devs/bdilly/edje_multiseat_filter'

This series add support to filter events per seat
on edje parts.
With the flag allowed_seats the developer may choose which
seats are allowed to input each part.

Also it adds functions to embryo to set/unset focus, since
it's relevant when writting multiseat applications with
dynamic seats (not fixed number of seats). Seats are
optional arguments on such functions.

Reviewed By: iscaro

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

@feature

 data/edje/include/edje.inc|   6 +
 src/bin/edje/edje_cc_handlers.c   |  89 
 src/examples/edje/.gitignore  |   1 +
 src/examples/edje/Makefile.am |   3 +
 src/examples/edje/edje-multiseat-filter.c | 130 +
 src/examples/edje/multiseat_filter.edc| 811 ++
 src/lib/edje/edje_data.c  |  13 +
 src/lib/edje/edje_edit.c  |  13 +
 src/lib/edje/edje_embryo.c|  61 ++-
 src/lib/edje/edje_load.c  |  69 +++
 src/lib/edje/edje_private.h   |  11 +
 src/lib/edje/edje_program.c   |  85 ++--
 12 files changed, 1244 insertions(+), 48 deletions(-)

-- 




[EGIT] [core/efl] master 02/06: edje: add function on embryo to control focus

2016-12-21 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 9bc9fde90ec75e58162e94bca4e71b62920afc73
Author: Bruno Dilly 
Date:   Wed Dec 14 02:58:53 2016 -0200

edje: add function on embryo to control focus

Add set_focus(part_id) and unset_focus().
Both functions accept an optional argument "seat_name".
If not provided default seat will be assumed.
---
 data/edje/include/edje.inc  |  6 +
 src/lib/edje/edje_embryo.c  | 59 +
 src/lib/edje/edje_private.h |  1 +
 src/lib/edje/edje_program.c |  2 +-
 4 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/data/edje/include/edje.inc b/data/edje/include/edje.inc
index 7807383..5fa08bf 100644
--- a/data/edje/include/edje.inc
+++ b/data/edje/include/edje.inc
@@ -141,6 +141,12 @@ native   set_mask_flags   (part_id, flags);
 native   get_mask_flags   (part_id);
 native   part_swallow (part_id, GROUP:str[]);
 
+/* set_focus() and unset_focus() may receive an optional parameter
+   seat_name[], as set_focus(part_id, seat_name[]) and
+   unset_focus(seat_name[]) */
+native   set_focus(part_id, ...);
+native   unset_focus  (...);
+
 native   external_param_get_int(id, param_name[]);
 native   external_param_set_int(id, param_name[], value);
 native Float:external_param_get_float(id, param_name[]);
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index bb46310..f4d49d0 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -196,6 +196,9 @@
  * set_clip(part_id, clip_part_id)
  * get_clip(part_id)
  *
+ * set_focus(part_id, seat_name[])
+ * unset_focus(seat_name[])
+ *
  * part_swallow(part_id, group_name)
  *
  * external_param_get_int(id, param_name[])
@@ -3771,6 +3774,59 @@ _edje_embryo_fn_part_swallow(Embryo_Program *ep, 
Embryo_Cell *params)
return 0;
 }
 
+/* set_focus(part_id, seat_name[]) */
+static Embryo_Cell
+_edje_embryo_fn_set_focus(Embryo_Program *ep, Embryo_Cell *params)
+{
+   Edje *ed;
+   int part_id;
+   Edje_Real_Part *rp;
+   char *seat_name = NULL;
+
+   if (!(HASNPARAMS(1) || HASNPARAMS(2))) return -1;
+   ed = embryo_program_data_get(ep);
+
+   part_id = params[1];
+   if (part_id < 0) return 0;
+   rp = ed->table_parts[part_id % ed->table_parts_size];
+   if (!rp) return 0;
+
+   /* if no seat name is passed, that's fine. it means
+  it should be applied to default seat */
+   if (HASNPARAMS(2))
+ {
+GETSTR(seat_name, params[2]);
+if (!seat_name) return 0;
+ }
+
+   _edje_part_focus_set(ed, seat_name, rp);
+
+   return 0;
+}
+
+/* unset_focus(seat_name[]) */
+static Embryo_Cell
+_edje_embryo_fn_unset_focus(Embryo_Program *ep, Embryo_Cell *params)
+{
+   Edje *ed;
+   char *seat_name = NULL;
+
+   if (!(HASNPARAMS(0) || HASNPARAMS(1))) return -1;
+   ed = embryo_program_data_get(ep);
+
+   /* seat name is optional. no seat means
+  it should be applied to default seat */
+   if (HASNPARAMS(1))
+ {
+GETSTR(seat_name, params[1]);
+if (!seat_name) return 0;
+ }
+
+   _edje_part_focus_set(ed, seat_name, NULL);
+
+   return 0;
+}
+
 /* external_param_get_int(id, param_name[]) */
 static Embryo_Cell
 _edje_embryo_fn_external_param_get_int(Embryo_Program *ep, Embryo_Cell *params)
@@ -4510,6 +4566,9 @@ _edje_embryo_script_init(Edje_Part_Collection *edc)
embryo_program_native_call_add(ep, "set_mask_flags", 
_edje_embryo_fn_set_mask_flags);
embryo_program_native_call_add(ep, "get_mask_flags", 
_edje_embryo_fn_get_mask_flags);
 
+   embryo_program_native_call_add(ep, "set_focus", _edje_embryo_fn_set_focus);
+   embryo_program_native_call_add(ep, "unset_focus", 
_edje_embryo_fn_unset_focus);
+
embryo_program_native_call_add(ep, "part_swallow", 
_edje_embryo_fn_part_swallow);
 
embryo_program_native_call_add(ep, "external_param_get_int", 
_edje_embryo_fn_external_param_get_int);
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index f04be21..1a2d7db 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -2491,6 +2491,7 @@ void  
_edje_signals_sources_patterns_clean(Edje_Signals_Sources_Patterns *ssp);
 
 void _edje_focused_part_set(Edje *ed, const char *seat_name, Edje_Real_Part 
*rp);
 Edje_Real_Part *_edje_focused_part_get(Edje *ed, const char *seat_name);
+void _edje_part_focus_set(Edje *ed, const char *seat_name, Edje_Real_Part *rp);
 
 Eina_Stringshare *_edje_seat_name_get(Edje *ed, Efl_Input_Device *device);
 Efl_Input_Device *_edje_seat_get(Edje *ed, Eina_Stringshare *name);
diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index df74b33..ef4cf40 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -641,7 +641,7 @@ _edje_seat_name_emit(Edje *ed, const char 

[EGIT] [core/efl] master 05/06: examples/edje: add seat filtering example

2016-12-21 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit de183e16a30898b665f74ced42318c5a3ea2d56d
Author: Bruno Dilly 
Date:   Fri Dec 9 19:50:33 2016 -0200

examples/edje: add seat filtering example

4 widgets:
 * seat1 only
 * seat2 only
 * seat1 + seat2
 * any seat
---
 src/examples/edje/.gitignore  |   1 +
 src/examples/edje/Makefile.am |   3 +
 src/examples/edje/edje-multiseat-filter.c | 130 +
 src/examples/edje/multiseat_filter.edc| 811 ++
 4 files changed, 945 insertions(+)

diff --git a/src/examples/edje/.gitignore b/src/examples/edje/.gitignore
index 73b171a..027f4d3 100644
--- a/src/examples/edje/.gitignore
+++ b/src/examples/edje/.gitignore
@@ -15,6 +15,7 @@
 /edje-focus
 /edje-multiseat
 /edje-multiseat-custom-names
+/edje-multiseat-filter
 /edje-multisense
 /edje-perspective
 /edje-signals-messages
diff --git a/src/examples/edje/Makefile.am b/src/examples/edje/Makefile.am
index 2afacfc..e34be11 100644
--- a/src/examples/edje/Makefile.am
+++ b/src/examples/edje/Makefile.am
@@ -47,6 +47,7 @@ lua_script.edc \
 messages_echo.edc \
 multiseat.edc \
 multiseat_custom_names.edc \
+multiseat_filter.edc \
 perspective.edc \
 signals-messages.edc \
 signalsBubble.edc \
@@ -148,6 +149,7 @@ edje-entry.c \
 edje-focus.c \
 edje-multiseat.c \
 edje-multiseat-custom-names.c \
+edje-multiseat-filter.c \
 edje-multisense.c \
 edje-perspective.c \
 edje-signals-messages.c \
@@ -225,6 +227,7 @@ edje-entry \
 edje-focus \
 edje-multiseat \
 edje-multiseat-custom-names \
+edje-multiseat-filter \
 edje-perspective \
 edje-signals-messages \
 edje-swallow \
diff --git a/src/examples/edje/edje-multiseat-filter.c 
b/src/examples/edje/edje-multiseat-filter.c
new file mode 100644
index 000..43ae828
--- /dev/null
+++ b/src/examples/edje/edje-multiseat-filter.c
@@ -0,0 +1,130 @@
+/**
+ * Edje example demonstrating how to use multiseat filtering.
+ *
+ * It presents 4 widgets that can be controlled by:
+ *   * seat1 only
+ *   * seat2 only
+ *   * seat1 + seat2
+ *   * any seat
+ *
+ * You'll need at least one Evas engine built for it (excluding the
+ * buffer one) that supports multiseat. It may be wayland or
+ * X11 with VNC support. Using other engines will lead you to a
+ * situation where all seats are reported as the same one ("default").
+ *
+ * @verbatim
+ * edje_cc multiseat_filter.edc && gcc -o edje-multiseat-filter 
edje-multiseat-filter.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
+ * @endverbatim
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#else
+# define EINA_UNUSED
+#endif
+
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
+#include 
+#include 
+#include 
+
+#define WIDTH  400
+#define HEIGHT 400
+
+static const char *GROUPNAME = "example/main";
+static const char *EDJE_FILE = PACKAGE_DATA_DIR"/multiseat_filter.edj";
+
+static void
+_on_destroy(Ecore_Evas *ee EINA_UNUSED)
+{
+   ecore_main_loop_quit();
+}
+
+static void
+_on_canvas_resize(Ecore_Evas *ee)
+{
+   Evas_Object *edje_obj;
+   int w, h;
+
+   edje_obj = ecore_evas_data_get(ee, "edje_obj");
+
+   ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+   evas_object_resize(edje_obj, w, h);
+}
+
+static void
+_device_added(void *data, const Efl_Event *event)
+{
+   Efl_Input_Device *dev = event->info;
+   Evas_Object *edje_obj = data;
+
+   if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ return;
+
+   efl_canvas_object_seat_focus_add(edje_obj, dev);
+}
+
+int
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
+{
+   const Eina_List *devices, *l;
+   Efl_Input_Device *dev;
+   Evas_Object *edje_obj;
+   Ecore_Evas *ee;
+   Evas *evas;
+
+   if (!ecore_evas_init())
+ return EXIT_FAILURE;
+
+   if (!edje_init())
+ goto shutdown_ecore_evas;
+
+   ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
+   if (!ee) goto shutdown_edje;
+
+   ecore_evas_callback_destroy_set(ee, _on_destroy);
+   ecore_evas_callback_resize_set(ee, _on_canvas_resize);
+   ecore_evas_title_set(ee, "Edje Multiseat Filter Example");
+
+   evas = ecore_evas_get(ee);
+
+   edje_obj = edje_object_add(evas);
+
+   if (!edje_object_file_set(edje_obj, EDJE_FILE, GROUPNAME))
+ printf("failed to set file %s.\n", EDJE_FILE);
+
+   evas_object_move(edje_obj, 0, 0);
+   evas_object_resize(edje_obj, WIDTH, HEIGHT);
+   evas_object_show(edje_obj);
+   ecore_evas_data_set(ee, "edje_obj", edje_obj);
+
+   devices = evas_device_list(evas, NULL);
+   EINA_LIST_FOREACH(devices, l, dev)
+ {
+if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_CLASS_SEAT)
+  efl_canvas_object_seat_focus_add(edje_obj, dev);
+
+ }
+   efl_event_callback_add(evas, EFL_CANVAS_EVENT_DEVICE_ADDED,
+

[EGIT] [core/efl] master 01/06: edje: refactor _edje_program_run for FOCUS_SET action

2016-12-21 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit d57d17723e255883dda22b96b61ea5e7cd5f23f8
Author: Bruno Dilly 
Date:   Wed Dec 14 02:55:59 2016 -0200

edje: refactor _edje_program_run for FOCUS_SET action

Improve code readability and avoid code repetition.
---
 src/lib/edje/edje_program.c | 80 +++--
 1 file changed, 34 insertions(+), 46 deletions(-)

diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index 695f57c..df74b33 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -641,6 +641,38 @@ _edje_seat_name_emit(Edje *ed, const char *name, const 
char *sig, const char *sr
_edje_emit_full(ed, buf, src, NULL, NULL);
 }
 
+static void
+_edje_part_focus_set(Edje *ed, const char *seat_name, Edje_Real_Part *rp)
+{
+   Edje_Real_Part *focused_part;
+   Eina_Stringshare *sname;
+   Efl_Input_Device *seat;
+   Evas *e;
+
+   if (seat_name)
+ sname = eina_stringshare_add(seat_name);
+   else /* Use default seat name */
+ {
+e = evas_object_evas_get(ed->obj);
+seat = evas_canvas_default_device_get(e, EFL_INPUT_DEVICE_CLASS_SEAT);
+sname = eina_stringshare_ref(_edje_seat_name_get(ed, seat));
+ }
+
+   focused_part = _edje_focused_part_get(ed, sname);
+
+   if (focused_part != rp)
+ {
+if (focused_part)
+  _edje_seat_name_emit(ed, sname, "focus,part,out",
+   focused_part->part->name);
+_edje_focused_part_set(ed, sname, rp);
+if (rp)
+  _edje_seat_name_emit(ed, sname, "focus,part,in", rp->part->name);
+ }
+
+   eina_stringshare_del(sname);
+}
+
 void
 _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char 
*ssig, const char *ssrc)
 {
@@ -970,35 +1002,8 @@ low_mem_current:
 
   case EDJE_ACTION_TYPE_FOCUS_SET:
   {
- Edje_Real_Part *focused_part;
- Eina_Stringshare *seat_name;
- Eina_Bool unref_name = EINA_FALSE;
-
- if (pr->seat)
-   {
-  seat_name = eina_stringshare_add(pr->seat);
-  unref_name = EINA_TRUE;
-   }
- else /* Use default seat name */
-   {
-  Efl_Input_Device *seat;
-  Evas *e;
-
-  e = evas_object_evas_get(ed->obj);
-  seat = evas_canvas_default_device_get(e, 
EFL_INPUT_DEVICE_CLASS_SEAT);
-  seat_name = _edje_seat_name_get(ed, seat);
-  if (!seat_name)
-break;
-   }
-
 if (!pr->targets)
-  {
- focused_part = _edje_focused_part_get(ed, seat_name);
- if (focused_part)
-   _edje_seat_name_emit(ed, seat_name, "focus,part,out",
-focused_part->part->name);
- _edje_focused_part_set(ed, seat_name, NULL);
-  }
+  _edje_part_focus_set(ed, pr->seat, NULL);
 else
   {
  EINA_LIST_FOREACH(pr->targets, l, pt)
@@ -1007,27 +1012,10 @@ low_mem_current:
 {
rp = ed->table_parts[pt->id % ed->table_parts_size];
if (rp)
- {
-focused_part = _edje_focused_part_get(ed,
-  seat_name);
-if (focused_part != rp)
-  {
- if (focused_part)
-   _edje_seat_name_emit(ed, seat_name,
-"focus,part,out",
-
focused_part->part->name);
- _edje_focused_part_set(ed, seat_name, rp);
- _edje_seat_name_emit(ed, seat_name,
-  "focus,part,in",
-  rp->part->name);
-  }
- }
+ _edje_part_focus_set(ed, pr->seat, rp);
 }
}
   }
-
-if (unref_name)
-  eina_stringshare_del(seat_name);
   }
   break;
 

-- 




[EGIT] [core/efl] master 04/06: edje: support filtering allowed seats per part

2016-12-21 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 9308410479b398169ec81daa6b77ef522a0f84ee
Author: Bruno Dilly 
Date:   Wed Dec 7 21:10:34 2016 -0200

edje: support filtering allowed seats per part

collections.group.parts.part.allowed_seats keeps a list
of seat names to be used for events filter.

So when evas devices of seat type are added, filters
may be applied for each part.

If no seat is listed, every seat may interact with such
part.
---
 src/bin/edje/edje_cc_handlers.c | 89 +
 src/lib/edje/edje_data.c| 13 ++
 src/lib/edje/edje_edit.c| 13 ++
 src/lib/edje/edje_load.c| 69 
 src/lib/edje/edje_private.h | 10 +
 src/lib/edje/edje_program.c |  5 +++
 6 files changed, 199 insertions(+)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 188e169..c496837 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -313,6 +313,7 @@ static void 
st_collections_group_parts_part_dragable_y(void);
 static void st_collections_group_parts_part_dragable_confine(void);
 static void st_collections_group_parts_part_dragable_threshold(void);
 static void st_collections_group_parts_part_dragable_events(void);
+static void st_collections_group_parts_part_allowed_seats(void);
 
 /* box and table items share these */
 static void ob_collections_group_parts_part_box_items_item(void);
@@ -789,6 +790,7 @@ New_Statement_Handler statement_handlers[] =
  {"collections.group.parts.part.cursor_mode", 
st_collections_group_parts_part_cursor_mode},
  {"collections.group.parts.part.multiline", 
st_collections_group_parts_part_multiline},
  {"collections.group.parts.part.access", 
st_collections_group_parts_part_access},
+ {"collections.group.parts.part.allowed_seats", 
st_collections_group_parts_part_allowed_seats},
  IMAGE_SET_STATEMENTS("collections.group.parts.part")
  IMAGE_STATEMENTS("collections.group.parts.part.")
  {"collections.group.parts.part.font", st_fonts_font}, /* dup */
@@ -4418,6 +4420,36 @@ _part_copy(Edje_Part *ep, Edje_Part *ep2)
ep->dragable.count_y = ep2->dragable.count_y;
ep->nested_children_count = ep2->nested_children_count;
 
+   if (ep2->allowed_seats)
+ {
+Edje_Part_Allowed_Seat *seat;
+unsigned int s;
+
+ep->allowed_seats_count = ep2->allowed_seats_count;
+ep->allowed_seats = calloc(ep2->allowed_seats_count,
+   sizeof(Edje_Part_Allowed_Seat *));
+if (!ep->allowed_seats)
+  {
+ ERR("Not enough memory.");
+ exit(-1);
+  }
+
+for (s = 0; s < ep->allowed_seats_count; s++)
+  {
+ seat = mem_alloc(SZ(Edje_Part_Allowed_Seat));
+ if (ep2->allowed_seats[s]->name)
+   {
+  seat->name = strdup(ep2->allowed_seats[s]->name);
+  if (!seat->name)
+{
+   ERR("Not enough memory.");
+   exit(-1);
+}
+   }
+ ep->allowed_seats[s] = seat;
+  }
+ }
+
data_queue_copied_part_lookup(pc, &(ep2->dragable.confine_id), 
&(ep->dragable.confine_id));
data_queue_copied_part_lookup(pc, &(ep2->dragable.threshold_id), 
&(ep->dragable.threshold_id));
data_queue_copied_part_lookup(pc, &(ep2->dragable.event_id), 
&(ep->dragable.event_id));
@@ -5827,6 +5859,9 @@ edje_cc_handlers_part_make(int id)
ep->items = NULL;
ep->nested_children_count = 0;
 
+   ep->allowed_seats = NULL;
+   ep->allowed_seats_count = 0;
+
epp = (Edje_Part_Parser *)ep;
epp->reorder.insert_before = NULL;
epp->reorder.insert_after = NULL;
@@ -6022,6 +6057,13 @@ _part_free(Edje_Part_Collection *pc, Edje_Part *ep)
  free(ep->items[j]);
free(ep->items);
 
+   for (j = 0 ; j < ep->allowed_seats_count; j++)
+ {
+free((void*)(ep->allowed_seats[j]->name));
+free(ep->allowed_seats[j]);
+ }
+   free(ep->allowed_seats);
+
free((void*)ep->name);
free((void*)ep->source);
free((void*)ep->source2);
@@ -7398,6 +7440,53 @@ st_collections_group_parts_part_dragable_events(void)
  }
 }
 
+/**
+@page edcref
+@property
+allowed_seats
+@parameters
+[seat1] [seat2] [seat3] ...
+@effect
+List of seat names allowed to interact with the part.
+
+If no list is defined all seats are allowed. It's the
+default behaviour.
+
+If a seat isn't 

[EGIT] [core/efl] master 07/07: Merge branch 'devs/iscaro/ecore_evas_cursor'

2016-12-20 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit e254e50ae556d178449ddc12bda321c9d538e750
Merge: e64327b 87e4588
Author: Bruno Dilly 
Date:   Tue Dec 20 18:35:14 2016 -0200

Merge branch 'devs/iscaro/ecore_evas_cursor'

This series add new APIs to get the pointer position and set the
pointer icon by device

Patches by Guilherme Iscaro 

Reviewed By: bdilly, jpeg, zmike

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

 src/examples/ecore/.gitignore  |   1 +
 src/examples/ecore/Makefile.am |  12 +-
 src/examples/ecore/ecore_evas_cursor_example.c | 166 ++
 src/lib/ecore_evas/Ecore_Evas.h|  64 ++-
 src/lib/ecore_evas/ecore_evas.c| 561 ++---
 src/lib/ecore_evas/ecore_evas_buffer.c |   6 +
 src/lib/ecore_evas/ecore_evas_ews.c|  57 +--
 src/lib/ecore_evas/ecore_evas_private.h|  34 +-
 src/lib/ecore_wl2/Ecore_Wl2.h  |  13 +
 src/lib/ecore_wl2/ecore_wl2_input.c|   9 -
 src/lib/ecore_wl2/ecore_wl2_private.h  |   9 +
 src/lib/ecore_wl2/ecore_wl2_window.c   |  32 ++
 .../ecore_evas/engines/cocoa/ecore_evas_cocoa.c|  70 +--
 .../ecore_evas/engines/drm/ecore_evas_drm.c|  67 +--
 .../ecore_evas/engines/extn/ecore_evas_extn.c  |   1 +
 src/modules/ecore_evas/engines/fb/ecore_evas_fb.c  | 112 ++--
 .../engines/psl1ght/ecore_evas_psl1ght.c   |  73 +--
 .../ecore_evas/engines/sdl/ecore_evas_sdl.c|  65 +--
 .../engines/wayland/ecore_evas_wayland_common.c| 108 ++--
 .../engines/wayland/ecore_evas_wayland_private.h   |   2 +
 .../ecore_evas/engines/win32/ecore_evas_win32.c|  87 +---
 src/modules/ecore_evas/engines/x/ecore_evas_x.c|  87 +---
 .../ecore_evas/vnc_server/ecore_evas_vnc_server.c  |  33 ++
 23 files changed, 1004 insertions(+), 665 deletions(-)

-- 




[EGIT] [core/efl] master 01/02: evas: remove focus when removed from filter whitelist

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit e78390c4c5910cef98f0f931f162a19d3a83570b
Author: Bruno Dilly 
Date:   Fri Dec 16 18:11:05 2016 -0200

evas: remove focus when removed from filter whitelist

It doesn't make sense to remove it when a seat is added
to the list. It should be removed only when this seat
is blocked.

But when the list receives its first item, then
it also should be checked if the focused seat
is the one just added, otherwise the previous one
must be removed.
---
 src/lib/evas/canvas/evas_object_main.c | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index a030505..a705bd4 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -942,14 +942,28 @@ 
_efl_canvas_object_efl_input_interface_seat_event_filter_set(Eo *eo_obj,
if (add)
  {
 if (eina_list_data_find(obj->events_whitelist, seat)) return;
-if (efl_canvas_object_seat_focus_check(eo_obj, seat))
-  efl_canvas_object_seat_focus_del(eo_obj, seat);
+/* remove all previously focused seats, if any - it may happen
+   since there wasn't a whitelist in place (no restrictions) */
+if ((!obj->events_whitelist) && (obj->layer) && (obj->layer->evas))
+  {
+ const Eina_List *devices, *l;
+ Efl_Input_Device *dev;
+
+ devices = obj->layer->evas->devices;
+ EINA_LIST_FOREACH(devices, l, dev)
+   {
+  if ((efl_input_device_type_get(dev) ==
+   EFL_INPUT_DEVICE_CLASS_SEAT) && (dev != seat))
+efl_canvas_object_seat_focus_del(eo_obj, dev);
+   }
+  }
 obj->events_whitelist = eina_list_append(obj->events_whitelist, seat);
 efl_event_callback_add(seat, EFL_EVENT_DEL,
_whitelist_events_device_remove_cb, obj);
  }
else
  {
+efl_canvas_object_seat_focus_del(eo_obj, seat);
 obj->events_whitelist = eina_list_remove(obj->events_whitelist, seat);
 efl_event_callback_del(seat, EFL_EVENT_DEL,
_whitelist_events_device_remove_cb, obj);

-- 




[EGIT] [core/efl] master 02/02: evas: improve logic regarding events filtering enablement

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit ecdf56de47d5c96711619e7c8dc1586a0dee7f90
Author: Bruno Dilly 
Date:   Mon Dec 19 13:58:01 2016 -0200

evas: improve logic regarding events filtering enablement

Only the size of events_whitelist isn't enough, because in some
cases the user may be disabling the usage of a specific seat.

Considering the following scenario, the issue will easy to understand:
 - an application with two entries (one to be used by seat 1 and other
 by seat 2)
 - the first seat is announced - it is enabled for entry 1 and
 disabled for entry 2
 - the second seat is announced

Before second seat is announced, the first seat would be able
to input the entry 1, because the events_whitelist of such
object will continue empty.

So a flag will be used to identify an object with active
filter.

Reviewed By: iscaro

Differential Revision: https://phab.enlightenment.org/D4498
---
 src/lib/evas/canvas/evas_object_main.c | 6 --
 src/lib/evas/include/evas_private.h| 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index a705bd4..5da0192 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -915,8 +915,8 @@ 
_efl_canvas_object_efl_input_interface_seat_event_filter_get(Eo *eo_obj EINA_UNU
  
Evas_Object_Protected_Data *obj,
  Efl_Input_Device 
*seat)
 {
-   //If the list is empty this object accept events from any seat.
-   if (!obj->events_whitelist)
+   //It means this object accept events from any seat.
+   if (!obj->events_filter_enabled)
  return EINA_TRUE;
return eina_list_data_find(obj->events_whitelist, seat) ?
  EINA_TRUE : EINA_FALSE;
@@ -939,6 +939,8 @@ 
_efl_canvas_object_efl_input_interface_seat_event_filter_set(Eo *eo_obj,
EINA_SAFETY_ON_NULL_RETURN(seat);
 
if (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_CLASS_SEAT) return;
+
+   obj->events_filter_enabled = EINA_TRUE;
if (add)
  {
 if (eina_list_data_find(obj->events_whitelist, seat)) return;
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 25e7a7d..c1f9388 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1118,7 +1118,6 @@ struct _Evas_Object_Protected_Data
/*
   The list below contain the seats (Efl.Input.Devices) which this
   object allows events to be reported (Mouse, Keybord and focus events).
-  If this list is empty, this object will allow events from any seat.
 */
Eina_List  *events_whitelist;
 
@@ -1212,6 +1211,7 @@ struct _Evas_Object_Protected_Data
   Eina_Boolsrc_invisible_valid : 1;
} parent_cache;
 
+   Eina_Bool   events_filter_enabled : 1;
 };
 
 struct _Evas_Data_Node

-- 




[EGIT] [core/efl] master 11/12: edje/examples: add example of use_custom_seat_names flag

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 4449ec869888ff21c46d54ab2baaa1f209986819
Author: Bruno Dilly 
Date:   Wed Dec 14 17:47:18 2016 -0200

edje/examples: add example of use_custom_seat_names flag

Since seat names defined on evas will depend on evas backends,
maybe udev rules, etc, we aren't able to demonstrate it
without manually setting another name for such seats
with efl_input_devices_name_set(). Otherwise
we wouldn't have guarantees it would match
names on EDC.
---
 src/examples/edje/.gitignore|   1 +
 src/examples/edje/Makefile.am   |   3 +
 src/examples/edje/edje-multiseat-custom-names.c | 150 
 src/examples/edje/multiseat_custom_names.edc| 175 
 4 files changed, 329 insertions(+)

diff --git a/src/examples/edje/.gitignore b/src/examples/edje/.gitignore
index d3d1838..73b171a 100644
--- a/src/examples/edje/.gitignore
+++ b/src/examples/edje/.gitignore
@@ -14,6 +14,7 @@
 /edje-entry
 /edje-focus
 /edje-multiseat
+/edje-multiseat-custom-names
 /edje-multisense
 /edje-perspective
 /edje-signals-messages
diff --git a/src/examples/edje/Makefile.am b/src/examples/edje/Makefile.am
index 78365a4..2afacfc 100644
--- a/src/examples/edje/Makefile.am
+++ b/src/examples/edje/Makefile.am
@@ -46,6 +46,7 @@ focus.edc \
 lua_script.edc \
 messages_echo.edc \
 multiseat.edc \
+multiseat_custom_names.edc \
 perspective.edc \
 signals-messages.edc \
 signalsBubble.edc \
@@ -146,6 +147,7 @@ edje-edit-part-box.c \
 edje-entry.c \
 edje-focus.c \
 edje-multiseat.c \
+edje-multiseat-custom-names.c \
 edje-multisense.c \
 edje-perspective.c \
 edje-signals-messages.c \
@@ -222,6 +224,7 @@ edje-edit-part-box \
 edje-entry \
 edje-focus \
 edje-multiseat \
+edje-multiseat-custom-names \
 edje-perspective \
 edje-signals-messages \
 edje-swallow \
diff --git a/src/examples/edje/edje-multiseat-custom-names.c 
b/src/examples/edje/edje-multiseat-custom-names.c
new file mode 100644
index 000..7182d0c
--- /dev/null
+++ b/src/examples/edje/edje-multiseat-custom-names.c
@@ -0,0 +1,150 @@
+/**
+ * Edje example demonstrating how to deal with part and objects focus.
+ *
+ * @verbatim
+ * edje_cc focus.edc && gcc -o edje-focus edje-focus.c `pkg-config --libs 
--cflags evas ecore ecore-evas edje`
+ * @endverbatim
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#else
+# define EINA_UNUSED
+#endif
+
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
+#include 
+#include 
+#include 
+
+#define WIDTH 400
+#define HEIGHT 400
+
+static const char *GROUPNAME = "example/main";
+static const char *EDJE_FILE = PACKAGE_DATA_DIR"/multiseat_custom_names.edj";
+
+static Efl_Input_Device *default_seat = NULL;
+static Efl_Input_Device *secondary_seat = NULL;
+
+static void
+_on_destroy(Ecore_Evas *ee EINA_UNUSED)
+{
+   ecore_main_loop_quit();
+}
+
+static void
+_on_canvas_resize(Ecore_Evas *ee)
+{
+   Evas_Object *edje_obj;
+   int w, h;
+
+   edje_obj = ecore_evas_data_get(ee, "edje_obj");
+
+   ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+   evas_object_resize(edje_obj, w, h);
+}
+
+static void
+_device_rename(Efl_Input_Device *dev)
+{
+   if (!default_seat) {
+   default_seat = dev;
+   efl_input_device_name_set(dev, "default");
+   return;
+   }
+
+   if (!secondary_seat) {
+   secondary_seat = dev;
+   efl_input_device_name_set(dev, "secondary");
+   }
+}
+
+static void
+_device_added(void *data EINA_UNUSED, const Efl_Event *event)
+{
+   Efl_Input_Device *dev = event->info;
+
+   if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ return;
+   _device_rename(dev);
+}
+
+static void
+_device_changed(void *data EINA_UNUSED, const Efl_Event *event)
+{
+   Efl_Input_Device *dev = event->info;
+
+   if (dev == default_seat)
+ efl_input_device_name_set(dev, "default");
+   else if (dev == secondary_seat)
+ efl_input_device_name_set(dev, "secondary");
+}
+
+int
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
+{
+   const Eina_List *devices, *l;
+   Efl_Input_Device *dev;
+   Evas_Object *edje_obj;
+   Ecore_Evas *ee;
+   Evas *evas;
+
+   if (!ecore_evas_init())
+ return EXIT_FAILURE;
+
+   if (!edje_init())
+ goto shutdown_ecore_evas;
+
+   ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
+   if (!ee) goto shutdown_edje;
+
+   ecore_evas_callback_destroy_set(ee, _on_destroy);
+   ecore_evas_callback_resize_set(ee, _on_canvas_resize);
+   ecore_evas_title_set(ee, "Edje Focus Example");
+
+   evas = ecore_evas_get(ee);
+
+   edje_obj = edje_object_add(evas);
+
+   if (!edje_object_file_set(edje_obj, EDJE_FILE, GROUPNAME))
+ printf("failed to set file %s.\n", EDJE_FILE);
+
+   evas_object_move(edje

[EGIT] [core/efl] master 05/12: examples/edje: add multiseat example

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 7ef5f6c3a0a6893552a7f13aa2777e3b9480e343
Author: Bruno Dilly 
Date:   Thu Nov 3 19:10:51 2016 -0200

examples/edje: add multiseat example
---
 src/examples/edje/.gitignore   |   1 +
 src/examples/edje/Makefile.am  |   3 +
 src/examples/edje/edje-multiseat.c | 211 +++
 src/examples/edje/multiseat.edc| 740 +
 4 files changed, 955 insertions(+)

diff --git a/src/examples/edje/.gitignore b/src/examples/edje/.gitignore
index 5b5f5f0..a10bdf9 100644
--- a/src/examples/edje/.gitignore
+++ b/src/examples/edje/.gitignore
@@ -11,6 +11,7 @@
 /edje-drag
 /edje-edit-part-box
 /edje-entry
+/edje-multiseat
 /edje-multisense
 /edje-perspective
 /edje-signals-messages
diff --git a/src/examples/edje/Makefile.am b/src/examples/edje/Makefile.am
index 7dff1e3..6198ccf 100644
--- a/src/examples/edje/Makefile.am
+++ b/src/examples/edje/Makefile.am
@@ -43,6 +43,7 @@ external_elm_panes.edc \
 external_emotion_elm.edc \
 lua_script.edc \
 messages_echo.edc \
+multiseat.edc \
 perspective.edc \
 signals-messages.edc \
 signalsBubble.edc \
@@ -140,6 +141,7 @@ edje-color-class.c \
 edje-drag.c \
 edje-edit-part-box.c \
 edje-entry.c \
+edje-multiseat.c \
 edje-multisense.c \
 edje-perspective.c \
 edje-signals-messages.c \
@@ -213,6 +215,7 @@ edje-color-class \
 edje-drag\
 edje-edit-part-box \
 edje-entry \
+edje-multiseat \
 edje-perspective \
 edje-signals-messages \
 edje-swallow \
diff --git a/src/examples/edje/edje-multiseat.c 
b/src/examples/edje/edje-multiseat.c
new file mode 100644
index 000..4fbc77c
--- /dev/null
+++ b/src/examples/edje/edje-multiseat.c
@@ -0,0 +1,211 @@
+/**
+ * Edje example demonstrating how to use multiseat features.
+ *
+ * You'll need at least one Evas engine built for it (excluding the
+ * buffer one) that supports multiseat. It may be wayland or
+ * X11 with VNC support. Using other engines will lead you to a
+ * situation where all seats are reported as the same one ("default").
+ *
+ * @verbatim
+ * edje_cc multiseat.edc && gcc -o edje-multiseat edje-multiseat.c `pkg-config 
--libs --cflags evas ecore ecore-evas edje`
+ * @endverbatim
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#else
+# define EINA_UNUSED
+#endif
+
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
+#include 
+#include 
+#include 
+
+#define WIDTH  400
+#define HEIGHT 400
+
+static const char *GROUPNAME = "example/main";
+static const char *PARTNAME_KNOB1 = "example/knob1";
+static const char *PARTNAME_KNOB2 = "example/knob2";
+
+static void
+_on_destroy(Ecore_Evas *ee EINA_UNUSED)
+{
+   ecore_main_loop_quit();
+}
+
+static void
+_on_canvas_resize(Ecore_Evas *ee)
+{
+   Evas_Object *bg;
+   Evas_Object *edje_obj;
+   int w, h;
+
+   bg = ecore_evas_data_get(ee, "background");
+   edje_obj = ecore_evas_data_get(ee, "edje_obj");
+
+   ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+   evas_object_resize(bg, w, h);
+   evas_object_resize(edje_obj, w, h);
+}
+
+static void
+_on_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *o, void 
*event_info)
+{
+   Evas_Event_Key_Down *ev = event_info;
+   Efl_Input_Device *seat;
+
+   seat = efl_input_device_seat_get(ev->dev);
+   printf("Seat %s (%s) pressed key %s\n", efl_input_device_name_get(seat),
+   edje_obj_seat_name_get(o, seat), ev->key);
+}
+
+static void
+_on_drag_started(void *data EINA_UNUSED, Evas_Object *o, const char *emission, 
const char *source)
+{
+   Eina_Stringshare *seat_name;
+   const char *seat_name_str;
+   Efl_Input_Device *seat;
+
+   seat_name_str = emission + strlen("drag,start,");
+   seat_name = eina_stringshare_add(seat_name_str);
+   seat = edje_obj_seat_get(o, seat_name);
+   printf("Seat %s (%s) started drag %s\n", efl_input_device_name_get(seat),
+   seat_name, source);
+   eina_stringshare_del(seat_name);
+}
+
+static void
+_setup_drag(Evas_Object *edje_obj, const char *partname)
+{
+   if (!edje_object_part_drag_size_set(edje_obj, partname, 1.0, 0.4))
+ printf("error when setting drag size.\n");
+
+   if (!edje_object_part_drag_step_set(edje_obj, partname, 0.0, 0.1))
+ printf("error when setting drag step size.\n");
+
+   if (!edje_object_part_drag_page_set(edje_obj, partname, 0.0, 0.3))
+ printf("error when setting drag page step size.\n");
+
+   edje_object_signal_callback_add(edje_obj, "drag,start,*", partname,
+   _on_drag_started, NULL);
+}
+
+static void
+_edje_load_cb(void *data EINA_UNUSED, Evas_Object *o EINA_UNUSED, const char 
*emission EINA_UNUSED, const char *source EINA_UNUSED)
+{
+   printf("Edje loaded\n");
+}
+
+static void
+_edje_seat_cb(void *d

[EGIT] [core/efl] master 02/12: edje: add new signals providing seat information

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit fecd59fe3237d930d86e8b166b57271b16c5df43
Author: Bruno Dilly 
Date:   Tue Nov 8 17:50:23 2016 -0200

edje: add new signals providing seat information

Add the following signals:
 * mouse,in,$SEAT
 * mouse,out,$SEAT
 * mouse,move,$SEAT
 * mouse,clicked,$BUTTON,$SEAT
 * hold,on,$SEAT
 * hold,off,$SEAT
 * drag,$SEAT
 * drag,start,$SEAT
 * drag,stop,$SEAT
---
 src/lib/edje/edje_callbacks.c | 38 ++
 src/lib/edje/edje_private.h   |  1 +
 src/lib/edje/edje_program.c   | 20 
 3 files changed, 43 insertions(+), 16 deletions(-)

diff --git a/src/lib/edje/edje_callbacks.c b/src/lib/edje/edje_callbacks.c
index b27049f..b367d0c 100644
--- a/src/lib/edje/edje_callbacks.c
+++ b/src/lib/edje/edje_callbacks.c
@@ -15,9 +15,11 @@ _edje_hold_signal_cb(void *data, const Efl_Event *event)
rp = evas_object_data_get(event->object, "real_part");
if (!rp) return;
if (efl_input_hold_get(ev))
- _edje_emit(ed, "hold,on", rp->part->name);
+ _edje_seat_emit(ed, efl_input_device_get(ev),
+ "hold,on", rp->part->name);
else
- _edje_emit(ed, "hold,off", rp->part->name);
+ _edje_seat_emit(ed, efl_input_device_get(ev),
+ "hold,off", rp->part->name);
 }
 
 static void
@@ -61,7 +63,7 @@ _edje_mouse_in_signal_cb(void *data, const Efl_Event *event)
if (rp)
  {
 if (!(ev->event_flags) || !(rp->part->ignore_flags & ev->event_flags))
-  _edje_emit(ed, "mouse,in", rp->part->name);
+_edje_seat_emit(ed, ev->device, "mouse,in", rp->part->name);
 
 ev->event_flags |= rp->part->mask_flags;
  }
@@ -80,7 +82,7 @@ _edje_mouse_out_signal_cb(void *data, const Efl_Event *event)
if (rp)
  {
 if (!(ev->event_flags) || !(rp->part->ignore_flags & ev->event_flags))
-  _edje_emit(ed, "mouse,out", rp->part->name);
+  _edje_seat_emit(ed, ev->device, "mouse,out", rp->part->name);
 
 ev->event_flags |= rp->part->mask_flags;
  }
@@ -113,7 +115,7 @@ _edje_mouse_down_signal_cb(void *data, const Efl_Event 
*event)
   snprintf(buf, sizeof(buf), "mouse,down,%i,double", ev->button);
 else
   snprintf(buf, sizeof(buf), "mouse,down,%i", ev->button);
-_edje_emit(ed, buf, rp->part->name);
+_edje_seat_emit(ed, ev->device, buf, rp->part->name);
  }
 
if (rp->part->dragable.event_id >= 0)
@@ -122,7 +124,7 @@ _edje_mouse_down_signal_cb(void *data, const Efl_Event 
*event)
 if (!ignored)
   {
  snprintf(buf, sizeof(buf), "mouse,down,%i", ev->button);
- _edje_emit(ed, buf, rp->part->name);
+ _edje_seat_emit(ed, ev->device, buf, rp->part->name);
   }
  }
 
@@ -177,7 +179,7 @@ _edje_mouse_up_signal_cb(void *data, const Efl_Event *event)
if ((!ev->event_flags) || (!ignored))
  {
 snprintf(buf, sizeof(buf), "mouse,up,%i", ev->button);
-_edje_emit(ed, buf, rp->part->name);
+_edje_seat_emit(ed, ev->device, buf, rp->part->name);
  }
 
if (rp->part->dragable.event_id >= 0)
@@ -186,7 +188,7 @@ _edje_mouse_up_signal_cb(void *data, const Efl_Event *event)
 if (!ignored)
   {
  snprintf(buf, sizeof(buf), "mouse,up,%i", ev->button);
- _edje_emit(ed, buf, rp->part->name);
+ _edje_seat_emit(ed, ev->device, buf, rp->part->name);
   }
  }
 
@@ -206,7 +208,8 @@ _edje_mouse_up_signal_cb(void *data, const Efl_Event *event)
   rp->invalidate = EINA_TRUE;
 #endif
   if (!ignored && rp->drag->started)
-_edje_emit(ed, "drag,stop", rp->part->name);
+_edje_seat_emit(ed, ev->device, "drag,stop",
+rp->part->name);
   rp->drag->started = EINA_FALSE;
   _edje_recalc_do(ed);
}
@@ -216,7 +219,7 @@ _edje_mouse_up_signal_cb(void *data, const Efl_Event *event)
if ((rp->still_in) && (rp->clicked_button == ev->button) && 
(!ev->event_flags))
  {
 snprintf(buf, sizeof(buf), "mouse,clicked,%i", ev->button);
-_edje_emit(ed, buf, rp->part->name);
+_edje_seat_emit(ed, ev->device, buf, rp->part->name);
  }
rp->clicked_button = 0;
rp->still_in

[EGIT] [core/efl] master 08/12: examples/edje: add dynamic seats example

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit f34220f0890f5107a330addfc06bbe02c313602a
Author: Bruno Dilly 
Date:   Mon Dec 5 20:41:33 2016 -0200

examples/edje: add dynamic seats example

It's an example of how themes can be implemented even if the number
of seats using the UI is unknown, and how it can be done
using scripts or C code.
---
 src/examples/edje/.gitignore   |   1 +
 src/examples/edje/Makefile.am  |   5 +-
 src/examples/edje/dynamic_multiseat.edc| 279 +
 src/examples/edje/edje-dynamic-multiseat.c | 136 ++
 4 files changed, 420 insertions(+), 1 deletion(-)

diff --git a/src/examples/edje/.gitignore b/src/examples/edje/.gitignore
index a10bdf9..0c3b2c2 100644
--- a/src/examples/edje/.gitignore
+++ b/src/examples/edje/.gitignore
@@ -9,6 +9,7 @@
 /edje-codegen-example
 /edje-color-class
 /edje-drag
+/edje-dynamic-multiseat
 /edje-edit-part-box
 /edje-entry
 /edje-multiseat
diff --git a/src/examples/edje/Makefile.am b/src/examples/edje/Makefile.am
index 6198ccf..afa1528 100644
--- a/src/examples/edje/Makefile.am
+++ b/src/examples/edje/Makefile.am
@@ -23,6 +23,7 @@ box_example.edc \
 codegen.edc \
 color-class.edc \
 drag.edc \
+dynamic_multiseat.edc \
 edje-group.edc \
 edje-nested.edc \
 edje-threshold.edc \
@@ -139,6 +140,7 @@ edje-box2.c \
 edje-codegen-example.c \
 edje-color-class.c \
 edje-drag.c \
+edje-dynamic-multiseat.c \
 edje-edit-part-box.c \
 edje-entry.c \
 edje-multiseat.c \
@@ -212,7 +214,8 @@ edje-box \
 edje-box2 \
 edje-codegen-example \
 edje-color-class \
-edje-drag\
+edje-drag \
+edje-dynamic-multiseat \
 edje-edit-part-box \
 edje-entry \
 edje-multiseat \
diff --git a/src/examples/edje/dynamic_multiseat.edc 
b/src/examples/edje/dynamic_multiseat.edc
new file mode 100644
index 000..d512f03
--- /dev/null
+++ b/src/examples/edje/dynamic_multiseat.edc
@@ -0,0 +1,279 @@
+collections {
+
+   color_classes {
+  color_class {
+ name: "button_bg,1";
+ color: 200 200 200 255;
+  }
+  color_class {
+ name: "button_bg,2";
+ color: 200 200 200 255;
+  }
+  color_class {
+ name: "button_bg,3";
+ color: 200 200 200 255;
+  }
+  color_class {
+ name: "button_bg,4";
+ color: 200 200 200 255;
+  }
+   }
+
+   group {
+  name: "example/main";
+  min: 400 400;
+
+  parts {
+ part {
+name: "bg";
+type: RECT;
+mouse_events: 0;
+description {
+   state: "default" 0.0;
+}
+ }
+
+ part {
+name: "title";
+type: TEXT;
+mouse_events: 0;
+description {
+   state: "default" 0.0;
+   color: 0 0 0 255;
+   rel1 {
+  relative: 0.0 0.0;
+  offset: 0 0;
+  to: "bg";
+   }
+   rel2 {
+  relative: 1.0 0.2;
+  offset: -1 -1;
+  to: "bg";
+   }
+   text {
+  text: "Dynamic Multiseat Example";
+  size: 16;
+  font: "sans";
+  min: 1 1;
+   }
+}
+ }
+
+ part {
+name: "buttons";
+type: RECT;
+mouse_events: 0;
+description {
+   state: "default" 0.0;
+   rel1.relative: 0.2 0.3;
+   rel2.relative: 0.8 0.9;
+   color: 255 255 255 0;
+}
+ }
+
+ part {
+name: "button_bg,1";
+type: RECT;
+mouse_events: 1;
+description {
+   state: "default" 0.0;
+   rel1 {
+  to: "buttons";
+  relative: 0.1 0.1;
+   }
+   rel2 {
+  to: "buttons";
+  relative: 0.45 0.45;
+   }
+   color_class: "button_bg,1";
+}
+ }
+
+ part {
+name: "button1";
+type: RECT;
+mouse_events: 0;
+description {
+   state: "default" 0.0;
+   rel1 {
+  to: "button_bg,1";
+  offset: 10 10;
+   }
+   rel2 {
+  to: "button_bg,1";
+  offset: -11 -11;
+   }
+   color: 200 200 200 255;
+}
+ }
+
+ part {
+name: "button_bg,2";
+type: RECT

[EGIT] [core/efl] master 09/12: edje: add flag to choose between evas or edje seat naming

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 287486e9208687ba57529adc4bd3b33c99bfbdbb
Author: Bruno Dilly 
Date:   Tue Dec 6 15:06:38 2016 -0200

edje: add flag to choose between evas or edje seat naming

collections.group.use_custom_seat_names should be set to '1'
to use seat names on signals as provided by Evas.

By default just follow Edje naming approach
("seat1", "seat2", ...)
---
 src/bin/edje/edje_cc_handlers.c | 40 
 src/lib/edje/edje_data.c|  1 +
 src/lib/edje/edje_edit.c|  3 ++
 src/lib/edje/edje_load.c| 82 -
 src/lib/edje/edje_private.h |  1 +
 5 files changed, 125 insertions(+), 2 deletions(-)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 9428e45..3861cd9 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -262,6 +262,7 @@ static void st_collections_group_broadcast_signal(void);
 static void st_collections_group_data_item(void);
 static void st_collections_group_orientation(void);
 static void st_collections_group_mouse_events(void);
+static void st_collections_group_use_custom_seat_names(void);
 
 static void st_collections_group_limits_vertical(void);
 static void st_collections_group_limits_horizontal(void);
@@ -716,6 +717,7 @@ New_Statement_Handler statement_handlers[] =
  {"collections.group.program_source", st_collections_group_program_source},
  {"collections.group.inherit", st_collections_group_inherit},
  {"collections.group.inherit_only", st_collections_group_inherit_only},
+ {"collections.group.use_custom_seat_names", 
st_collections_group_use_custom_seat_names},
  {"collections.group.target_group", st_collections_group_target_group}, /* 
dup */
  {"collections.group.part_remove", st_collections_group_part_remove},
  {"collections.group.program_remove", st_collections_group_program_remove},
@@ -4517,6 +4519,43 @@ st_collections_group_inherit_only(void)
 /**
 @page edcref
 @property
+use_custom_seat_names
+@parameters
+[1 or 0]
+@effect
+This flags a group as designed to listen for multiseat signals
+following a custom naming instead of default Edje naming.
+Seats are named on Edje as "seat1", "seat2", etc, in an incremental
+way and never are changed.
+
+But on Evas, names may be set on different places
+(Evas, Ecore Evas backends, the application itself)
+and name changes are allowed.
+So custom names come from system at first, but can be overriden with
+evas_device_name_set().
+Also Evas seat names don't need to follow any pattern.
+
+It's useful for cases where there is control of the
+system, as seat names, or when the application
+sets the devices names to guarantee they'll match
+seat names on EDC.
+@since 1.19
+@endproperty
+*/
+static void
+st_collections_group_use_custom_seat_names(void)
+{
+   Edje_Part_Collection *pc;
+
+   check_arg_count(1);
+
+   pc = eina_list_data_get(eina_list_last(edje_collections));
+   pc->use_custom_seat_names = parse_bool(0);
+}
+
+/**
+@page edcref
+@property
 target_group
 @parameters
 [name] [part or program] (part or program) (part or program) ...
@@ -4692,6 +4731,7 @@ st_collections_group_inherit(void)
pc->prop.orientation = pc2->prop.orientation;
 
pc->lua_script_only = pc2->lua_script_only;
+   pc->use_custom_seat_names = pc2->use_custom_seat_names;
 
pcp = (Edje_Part_Collection_Parser *)pc;
pcp2 = (Edje_Part_Collection_Parser *)pc2;
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index 9141ae1..6c4ef6a 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -1814,6 +1814,7 @@ _edje_edd_init(void)
 #endif
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, 
Edje_Part_Collection, "physics_enabled", physics_enabled, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, 
Edje_Part_Collection, "script_recursion", script_recursion, EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, 
Edje_Part_Collection, "use_custom_seat_names", use_custom_seat_names, 
EET_T_UCHAR);
 }
 
 EAPI void
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 3178920..6c57a75 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -15616,6 +15616,9 @@ _edje_generate_source_of_group(Edje *ed, 
Edje_Part_Collection_Directory_Entry *p
/* Limits */
_edje_limits_source_generate(ed, buf, &ret);
 
+   if (pc->use_custom_seat_names)
+ B

[EGIT] [core/efl] master 06/12: edje: accept optional seat parameter on FOCUS_OBJECT

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 0ab6567b3e5ef63e97c97db01497619b7ea57f8d
Author: Bruno Dilly 
Date:   Fri Dec 2 17:50:43 2016 -0200

edje: accept optional seat parameter on FOCUS_OBJECT

If not provided, FOCUS_OBJECT action will keep acting
over default seat.

Also include a usage on edje-multiseat test
(actually no example was exercising this action).
---
 src/bin/edje/edje_cc_handlers.c| 11 ---
 src/examples/edje/edje-multiseat.c | 56 +-
 src/examples/edje/multiseat.edc| 62 +++---
 src/lib/edje/edje_program.c| 28 ++---
 4 files changed, 142 insertions(+), 15 deletions(-)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 1d4b30b..9428e45 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -14094,7 +14094,7 @@ st_collections_group_programs_program_in(void)
 @li DRAG_VAL_STEP 1.0 0.0
 @li DRAG_VAL_PAGE 0.0 0.0
 @li FOCUS_SET ("seat")
-@li FOCUS_OBJECT
+@li FOCUS_OBJECT ("seat")
 @li PARAM_COPY "src_part" "src_param" "dst_part" "dst_param"
 @li PARAM_SET "part" "param" "value"
 @li PLAY_SAMPLE "sample name" speed (channel)
@@ -14111,7 +14111,7 @@ st_collections_group_programs_program_in(void)
 @li PHYSICS_ROT_SET 0.707 0 0 0.707
 
 Only one action can be specified per program.
-
+
 PLAY_SAMPLE (optional) channel can be one of:
 @li EFFECT/FX
 @li BACKGROUND/BG
@@ -14169,9 +14169,10 @@ st_collections_group_programs_program_action(void)
else
  ep->value = parse_float_range(2, 0.0, 1.0);
  }
-   else if (ep->action == EDJE_ACTION_TYPE_FOCUS_SET)
+   else if ((ep->action == EDJE_ACTION_TYPE_FOCUS_SET) ||
+(ep->action == EDJE_ACTION_TYPE_FOCUS_OBJECT))
  {
-   if (get_arg_count() == 1)
+if (get_arg_count() == 1)
   ep->seat = NULL;
 else
   ep->seat = parse_str(1);
@@ -14317,7 +14318,6 @@ st_collections_group_programs_program_action(void)
 * completeness */
break;
   case EDJE_ACTION_TYPE_ACTION_STOP:
-  case EDJE_ACTION_TYPE_FOCUS_OBJECT:
   case EDJE_ACTION_TYPE_PHYSICS_FORCES_CLEAR:
   case EDJE_ACTION_TYPE_PHYSICS_STOP:
 check_arg_count(1);
@@ -14342,6 +14342,7 @@ st_collections_group_programs_program_action(void)
 check_min_arg_count(2);
 break;
   case EDJE_ACTION_TYPE_FOCUS_SET:
+  case EDJE_ACTION_TYPE_FOCUS_OBJECT:
 check_min_arg_count(1);
 break;
   default:
diff --git a/src/examples/edje/edje-multiseat.c 
b/src/examples/edje/edje-multiseat.c
index 4fbc77c..6207244 100644
--- a/src/examples/edje/edje-multiseat.c
+++ b/src/examples/edje/edje-multiseat.c
@@ -54,6 +54,52 @@ _on_canvas_resize(Ecore_Evas *ee)
 }
 
 static void
+_on_rect_focus_in(void *data, const Efl_Event *event)
+{
+   Evas_Object *rect, *edje_obj;
+   Efl_Input_Device *seat;
+   Eina_Stringshare *name;
+   Efl_Input_Focus *ev;
+
+   edje_obj = data;
+   rect = event->object;
+   ev = event->info;
+   seat = efl_input_device_get(ev);
+   name = edje_obj_seat_name_get(edje_obj, seat);
+
+   printf("Seat %s (%s) focused the rect object\n",
+  efl_input_device_name_get(seat), name);
+
+   if (!strcmp(name, "seat1"))
+ evas_object_color_set(rect, 200, 0, 0, 255);
+   else if (!strcmp(name, "seat2"))
+ evas_object_color_set(rect, 0, 200, 0, 255);
+   else
+ printf("Unexpected seat %s - no color change\n", name);
+}
+
+static void
+_on_rect_focus_out(void *data, const Efl_Event *event)
+{
+   Evas_Object *rect, *edje_obj;
+   Efl_Input_Device *seat;
+   Eina_Stringshare *name;
+   Efl_Input_Focus *ev;
+
+   edje_obj = data;
+   rect = event->object;
+   ev = event->info;
+   seat = efl_input_device_get(ev);
+   name = edje_obj_seat_name_get(edje_obj, seat);
+
+   printf("Seat %s (%s) unfocused the rect object\n",
+  efl_input_device_name_get(seat), name);
+   evas_object_color_set(rect, 200, 200, 200, 255);
+
+   efl_canvas_object_seat_focus_add(edje_obj, seat);
+}
+
+static void
 _on_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *o, void 
*event_info)
 {
Evas_Event_Key_Down *ev = event_info;
@@ -127,7 +173,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
const char *edje_file = PACKAGE_DATA_DIR"/multiseat.edj";
const Eina_List *devices, *l;
-   Evas_Object *edje_obj, *bg;
+   Evas_Object *edje_obj, *bg, *rect;
Efl_Input_Device *dev;
Ecore_Evas *ee;
Evas *evas;
@@ -174,6 +220,14 @@ main(int argc EINA_UNUSED, ch

[EGIT] [core/efl] master 01/12: evas: add getter for devices by name

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 2958aba23a8dc99503fad8119eeffef82e410b42
Author: Bruno Dilly 
Date:   Thu Nov 17 16:50:44 2016 -0200

evas: add getter for devices by name

Make it possible to get the evas device given
its name. It sounds useful for Edje since
programs will reference seats by name.
---
 src/lib/evas/Evas_Common.h| 16 
 src/lib/evas/canvas/evas_device.c | 26 ++
 2 files changed, 42 insertions(+)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 2f54174..8d2f85e 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -1240,6 +1240,22 @@ EAPI void evas_device_pop(Evas *e);
 EAPI const Eina_List *evas_device_list(Evas *e, const Evas_Device *dev);
 
 /**
+ * Get a device by its name
+ *
+ * @param e The canvas to create the device node for.
+ * @param name The name of the device.
+ *
+ * Gets the first ocurrence of a device named as @p name
+ * on Evas @p e list of devices.
+ *
+ * @return the device or NULL if an error occurred, no name was provided,
+ * or no device with a matching name was found.
+ *
+ * @since 1.19
+ */
+EAPI Evas_Device *evas_device_get(Evas *e, const char *name);
+
+/**
  * Set the name of a device as a string
  *
  * @p dev The device to set the name of
diff --git a/src/lib/evas/canvas/evas_device.c 
b/src/lib/evas/canvas/evas_device.c
index 4ab6d15..9a65d79 100644
--- a/src/lib/evas/canvas/evas_device.c
+++ b/src/lib/evas/canvas/evas_device.c
@@ -95,6 +95,32 @@ _del_cb(void *data, const Efl_Event *ev)
 }
 
 EAPI Evas_Device *
+evas_device_get(Evas *eo_e, const char *name)
+{
+   const char *dev_name;
+   Evas_Public_Data *e;
+   Evas_Device *dev;
+   Eina_List *l;
+
+   SAFETY_CHECK(eo_e, EVAS_CANVAS_CLASS, NULL);
+
+   if (!name)
+   return NULL;
+
+   e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
+
+   EINA_LIST_FOREACH(e->devices, l, dev)
+ {
+dev_name = efl_input_device_name_get(dev);
+
+if (eina_streq(dev_name, name))
+  return dev;
+ }
+
+   return NULL;
+}
+
+EAPI Evas_Device *
 evas_device_add(Evas *eo_e)
 {
return evas_device_add_full(eo_e, NULL, NULL, NULL, NULL,

-- 




[EGIT] [core/efl] master 04/12: edje: add names for seats following an incremental pattern

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit bb3fd015de8ab75fd509602a3c868ea9fdce9bb3
Author: Bruno Dilly 
Date:   Wed Nov 30 19:52:14 2016 -0200

edje: add names for seats following an incremental pattern

This way it'll be possible to write EDC with seat names that
will work no matter how seats are named by each ecore_evas
backend or users.
---
 src/lib/edje/edje_entry.c   |  49 +-
 src/lib/edje/edje_load.c| 119 +---
 src/lib/edje/edje_object.eo |  34 +
 src/lib/edje/edje_private.h |  16 --
 src/lib/edje/edje_program.c |  95 +--
 5 files changed, 254 insertions(+), 59 deletions(-)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index f999d0a..b836e95 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -121,9 +121,6 @@ _edje_entry_focus_in_cb(void *data, Evas_Object *o, const 
char *emission, const
Entry *en;
Edje *ed;
 
-   seat_name = emission + strlen("focus,part,in,");
-   seat = evas_device_get(evas_object_evas_get(o), seat_name);
-
rp = data;
if ((!rp) || (rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
@@ -135,6 +132,9 @@ _edje_entry_focus_in_cb(void *data, Evas_Object *o, const 
char *emission, const
en = rp->typedata.text->entry_data;
if (!en || !en->imf_context) return;
 
+   seat_name = emission + sizeof("focus,part,in,") - 1;
+   seat = _edje_seat_get(ed, seat_name);
+
if (evas_object_seat_focus_check(ed->obj, seat))
  {
 ecore_imf_context_focus_in(en->imf_context);
@@ -1709,7 +1709,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED,
int old_cur_pos;
 
seat = efl_input_device_seat_get(ev->dev);
-   rp = _edje_focused_part_get(ed, efl_input_device_name_get(seat));
+   rp = _edje_focused_part_get(ed, _edje_seat_name_get(ed, seat));
 
if (!rp) return;
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
@@ -2373,7 +2373,7 @@ _edje_key_up_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED, v
Entry *en;
 
seat = efl_input_device_seat_get(ev->dev);
-   rp = _edje_focused_part_get(ed, efl_input_device_name_get(seat));
+   rp = _edje_focused_part_get(ed, _edje_seat_name_get(ed, seat));
if (!rp) return;
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
@@ -4478,6 +4478,21 @@ _edje_entry_imf_cursor_info_set(Entry *en)
 }
 
 #ifdef HAVE_ECORE_IMF
+
+static Edje_Real_Part *
+_edje_entry_imf_default_focused_rp_get(Edje *ed)
+{
+   Eina_Stringshare *seat_name;
+   Efl_Input_Device *seat;
+   Evas *e;
+
+   e = evas_object_evas_get(ed->obj);
+   seat = evas_canvas_default_device_get(e, EFL_INPUT_DEVICE_CLASS_SEAT);
+   seat_name = _edje_seat_name_get(ed, seat);
+
+   return _edje_focused_part_get(ed, seat_name);
+}
+
 static Eina_Bool
 _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx 
EINA_UNUSED, char **text, int *cursor_pos)
 {
@@ -4487,9 +4502,7 @@ _edje_entry_imf_retrieve_surrounding_cb(void *data, 
Ecore_IMF_Context *ctx EINA_
const char *str;
char *plain_text;
 
-   // FIXME
-   //rp = _edje_focused_part_get(ed, efl_input_device_name_get(seat));
-   rp = _edje_focused_part_get(ed, "default");
+   rp = _edje_entry_imf_default_focused_rp_get(ed);
if (!rp) return EINA_FALSE;
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return EINA_FALSE;
@@ -4567,9 +4580,7 @@ _edje_entry_imf_event_commit_cb(void *data, 
Ecore_IMF_Context *ctx EINA_UNUSED,
char *commit_str = event_info;
Edje_Entry_Change_Info *info = NULL;
 
-   // FIXME
-   //rp = _edje_focused_part_get(ed, efl_input_device_name_get(seat));
-   rp = _edje_focused_part_get(ed, "default");
+   rp = _edje_entry_imf_default_focused_rp_get(ed);
if ((!rp)) return;
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
@@ -4669,9 +4680,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, 
Ecore_IMF_Context *ctx EINA
Eina_Strbuf *buf;
Eina_Strbuf *preedit_attr_str;
 
-   // FIXME
-   //rp = _edje_focused_part_get(ed, efl_input_device_name_get(seat));
-   rp = _edje_focused_part_get(ed, "default");
+   rp = _edje_entry_imf_default_focused_rp_get(ed);
if ((!rp)) return;
 
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
@@ -4821,9 +4830,7 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, 
Ecore_IMF_Context *ctx E
int cursor_pos;
int start, end;
 
-   // FIXME
-   //rp = _edje_focused_part_get(ed, efl_input_device_name_get(seat));
-   rp = _edje_focused_part_get(ed, "default");
+   rp = _edje_entry_imf_default_focused_rp_get(ed);
if ((!rp)) return;
if ((!rp) || (!ev)) return;
if ((rp->

[EGIT] [core/efl] master 03/12: edje: support seat on focus action and signals

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 5cfdf3ec3af60394dfaa19440f475fc23a8567e6
Author: Bruno Dilly 
Date:   Thu Nov 17 15:21:02 2016 -0200

edje: support seat on focus action and signals

Seat goes as an optional parameter for FOCUS_SET (if not
provided, act over default seat), and emit signals
with seat suffix:
 * focus,in,$SEAT
 * focus,out,$SEAT
 * focus,part,in,$SEAT
 * focus,part,out,$SEAT
---
 src/bin/edje/edje_cc_handlers.c |  15 +++-
 src/lib/edje/Edje_Common.h  |   2 +-
 src/lib/edje/edje_callbacks.c   |  10 ++-
 src/lib/edje/edje_data.c|   2 +
 src/lib/edje/edje_edit.c|   2 +
 src/lib/edje/edje_entry.c   | 162 +---
 src/lib/edje/edje_load.c|  13 +++-
 src/lib/edje/edje_private.h |  14 +++-
 src/lib/edje/edje_program.c | 107 +++---
 9 files changed, 263 insertions(+), 64 deletions(-)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 33aeb12..1d4b30b 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -2032,6 +2032,7 @@ _edje_program_copy(Edje_Program *ep, Edje_Program *ep2)
ep->in.from = ep2->in.from;
ep->in.range = ep2->in.range;
ep->action = ep2->action;
+   ep->seat = STRDUP(ep2->seat);
ep->state = STRDUP(ep2->state);
ep->state2 = STRDUP(ep2->state2);
ep->value = ep2->value;
@@ -6067,6 +6068,7 @@ _program_free(Edje_Program *pr)
free((void*)pr->source);
free((void*)pr->filter.part);
free((void*)pr->filter.state);
+   free((void*)pr->seat);
free((void*)pr->state);
free((void*)pr->state2);
free((void*)pr->sample_name);
@@ -14091,7 +14093,7 @@ st_collections_group_programs_program_in(void)
 @li DRAG_VAL_SET 0.5 0.0
 @li DRAG_VAL_STEP 1.0 0.0
 @li DRAG_VAL_PAGE 0.0 0.0
-@li FOCUS_SET
+@li FOCUS_SET ("seat")
 @li FOCUS_OBJECT
 @li PARAM_COPY "src_part" "src_param" "dst_part" "dst_param"
 @li PARAM_SET "part" "param" "value"
@@ -14167,6 +14169,13 @@ st_collections_group_programs_program_action(void)
else
  ep->value = parse_float_range(2, 0.0, 1.0);
  }
+   else if (ep->action == EDJE_ACTION_TYPE_FOCUS_SET)
+ {
+   if (get_arg_count() == 1)
+  ep->seat = NULL;
+else
+  ep->seat = parse_str(1);
+ }
else if (ep->action == EDJE_ACTION_TYPE_SIGNAL_EMIT)
  {
ep->state = parse_str(1);
@@ -14309,7 +14318,6 @@ st_collections_group_programs_program_action(void)
break;
   case EDJE_ACTION_TYPE_ACTION_STOP:
   case EDJE_ACTION_TYPE_FOCUS_OBJECT:
-  case EDJE_ACTION_TYPE_FOCUS_SET:
   case EDJE_ACTION_TYPE_PHYSICS_FORCES_CLEAR:
   case EDJE_ACTION_TYPE_PHYSICS_STOP:
 check_arg_count(1);
@@ -14333,6 +14341,9 @@ st_collections_group_programs_program_action(void)
   case EDJE_ACTION_TYPE_STATE_SET:
 check_min_arg_count(2);
 break;
+  case EDJE_ACTION_TYPE_FOCUS_SET:
+check_min_arg_count(1);
+break;
   default:
check_arg_count(3);
  }
diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h
index b99de45..243a28c 100644
--- a/src/lib/edje/Edje_Common.h
+++ b/src/lib/edje/Edje_Common.h
@@ -1924,7 +1924,7 @@ typedef enum _Edje_Action_Type
EDJE_ACTION_TYPE_DRAG_VAL_STEP= 5,  /**< Drag val step action 
value */
EDJE_ACTION_TYPE_DRAG_VAL_PAGE= 6,  /**< Drag val page action 
value */
EDJE_ACTION_TYPE_SCRIPT   = 7,  /**< Script action value */
-   EDJE_ACTION_TYPE_FOCUS_SET= 8,  /**< Forcus set action 
value */
+   EDJE_ACTION_TYPE_FOCUS_SET= 8,  /**< Focus set action value 
*/
EDJE_ACTION_TYPE_RESERVED00   = 9,  /**< Reversed do action 
value */
EDJE_ACTION_TYPE_FOCUS_OBJECT = 10, /**< Forcus object action 
value */
EDJE_ACTION_TYPE_PARAM_COPY   = 11, /**< Param copy action 
value */
diff --git a/src/lib/edje/edje_callbacks.c b/src/lib/edje/edje_callbacks.c
index b367d0c..c92f329 100644
--- a/src/lib/edje/edje_callbacks.c
+++ b/src/lib/edje/edje_callbacks.c
@@ -25,29 +25,35 @@ _edje_hold_signal_cb(void *data, const Efl_Event *event)
 static void
 _edje_focus_in_signal_cb(void *data, const Efl_Event *event)
 {
+   Efl_Input_Focus *ev;
Edje *ed;
Edje_Real_Part *rp;
 
+   ev = event->info;
ed = data;
rp = evas_object_data_get(event->object, "real_part");
if ((!rp) || (!ed))
  return;
 
-   _edje_emit(ed, "focus,part,in", rp->part->name);
+   _edje_seat_emit(ed, efl_inpu

[EGIT] [core/efl] master 10/12: edje/examples: add example for focus actions

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 60b160f47ce22f30eb62917d4d43628c6c04861e
Author: Bruno Dilly 
Date:   Wed Dec 14 15:47:20 2016 -0200

edje/examples: add example for focus actions

Just a regular (non multiseat) focus example for
actions FOCUS_SET and FOCUS_OBJECT
---
 src/examples/edje/.gitignore   |   1 +
 src/examples/edje/Makefile.am  |   3 +
 src/examples/edje/edje-focus.c | 157 
 src/examples/edje/focus.edc| 330 +
 4 files changed, 491 insertions(+)

diff --git a/src/examples/edje/.gitignore b/src/examples/edje/.gitignore
index 0c3b2c2..d3d1838 100644
--- a/src/examples/edje/.gitignore
+++ b/src/examples/edje/.gitignore
@@ -12,6 +12,7 @@
 /edje-dynamic-multiseat
 /edje-edit-part-box
 /edje-entry
+/edje-focus
 /edje-multiseat
 /edje-multisense
 /edje-perspective
diff --git a/src/examples/edje/Makefile.am b/src/examples/edje/Makefile.am
index afa1528..78365a4 100644
--- a/src/examples/edje/Makefile.am
+++ b/src/examples/edje/Makefile.am
@@ -42,6 +42,7 @@ external_elm_button.edc \
 external_elm_check.edc \
 external_elm_panes.edc \
 external_emotion_elm.edc \
+focus.edc \
 lua_script.edc \
 messages_echo.edc \
 multiseat.edc \
@@ -143,6 +144,7 @@ edje-drag.c \
 edje-dynamic-multiseat.c \
 edje-edit-part-box.c \
 edje-entry.c \
+edje-focus.c \
 edje-multiseat.c \
 edje-multisense.c \
 edje-perspective.c \
@@ -218,6 +220,7 @@ edje-drag \
 edje-dynamic-multiseat \
 edje-edit-part-box \
 edje-entry \
+edje-focus \
 edje-multiseat \
 edje-perspective \
 edje-signals-messages \
diff --git a/src/examples/edje/edje-focus.c b/src/examples/edje/edje-focus.c
new file mode 100644
index 000..01e9e2e
--- /dev/null
+++ b/src/examples/edje/edje-focus.c
@@ -0,0 +1,157 @@
+/**
+ * Edje example demonstrating how to deal with part and objects focus.
+ *
+ * @verbatim
+ * edje_cc focus.edc && gcc -o edje-focus edje-focus.c `pkg-config --libs 
--cflags evas ecore ecore-evas edje`
+ * @endverbatim
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#else
+# define EINA_UNUSED
+#endif
+
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
+#include 
+#include 
+#include 
+
+#define WIDTH 400
+#define HEIGHT 400
+
+static const char *GROUPNAME = "example/main";
+static const char *EDJE_FILE = PACKAGE_DATA_DIR"/focus.edj";
+
+static void
+_on_destroy(Ecore_Evas *ee EINA_UNUSED)
+{
+   ecore_main_loop_quit();
+}
+
+static void
+_on_canvas_resize(Ecore_Evas *ee)
+{
+   Evas_Object *edje_obj;
+   int w, h;
+
+   edje_obj = ecore_evas_data_get(ee, "edje_obj");
+
+   ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+   evas_object_resize(edje_obj, w, h);
+}
+
+static void
+_focus_part_in_cb(void *data EINA_UNUSED, Evas_Object *o EINA_UNUSED,
+  const char *emission EINA_UNUSED, const char *source)
+{
+   printf("Focus set to part %s\n", source);
+}
+
+static void
+_focus_part_out_cb(void *data EINA_UNUSED, Evas_Object *o EINA_UNUSED,
+  const char *emission EINA_UNUSED, const char *source)
+{
+   printf("Focus unset to part %s\n", source);
+}
+
+static void
+_focus_obj_in_cb(void *data EINA_UNUSED, const Efl_Event *event)
+{
+   Efl_Input_Focus *ev = event->info;
+   Evas_Object *rect = event->object;
+   /* it always will print the default seat name, since FOCUS_OBJECT
+  isn't setting a specific seat */
+   printf("Focus set to object %s (seat %s)\n", evas_object_name_get(rect),
+  efl_input_device_name_get(efl_input_device_get(ev)));
+}
+
+static void
+_focus_obj_out_cb(void *data EINA_UNUSED, const Efl_Event *event)
+{
+   Efl_Input_Focus *ev = event->info;
+   Evas_Object *rect = event->object;
+   printf("Focus unset to object %s (seat %s)\n", evas_object_name_get(rect),
+  efl_input_device_name_get(efl_input_device_get(ev)));
+}
+
+int
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
+{
+   Evas_Object *edje_obj, *rect_left, *rect_right;
+   Ecore_Evas *ee;
+   Evas *evas;
+
+   if (!ecore_evas_init())
+ return EXIT_FAILURE;
+
+   if (!edje_init())
+ goto shutdown_ecore_evas;
+
+   ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
+   if (!ee) goto shutdown_edje;
+
+   ecore_evas_callback_destroy_set(ee, _on_destroy);
+   ecore_evas_callback_resize_set(ee, _on_canvas_resize);
+   ecore_evas_title_set(ee, "Edje Focus Example");
+
+   evas = ecore_evas_get(ee);
+
+   edje_obj = edje_object_add(evas);
+
+   if (!edje_object_file_set(edje_obj, EDJE_FILE, GROUPNAME))
+ printf("failed to set file %s.\n", EDJE_FILE);
+
+   evas_object_move(edje_obj, 0, 0);
+   evas_object_resize(edje_obj, WIDTH, HEIGHT);
+   evas_object_show(edje_obj);
+   ecore_evas_data_set(ee, "edje_obj", edje_obj);
+
+   edje_obj

[EGIT] [core/efl] master 12/12: Merge branch 'devs/bdilly/edje_multiseat'

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 6f9deb976a9774a14636cb3131743245347b2dd4
Merge: 25792d6 4449ec8
Author: Bruno Dilly 
Date:   Mon Dec 19 15:19:06 2016 -0200

Merge branch 'devs/bdilly/edje_multiseat'

This series implement multiseat support on Edje:
 * emit signals with seat name as suffix
 * handle multiseat focus
 * add optional argument to FOCUS_SET and FOCUS_OBJECT actions
   to specify a seat
 * add Edje naming for seats (incremental) with flag
   to disable this behaviour - so custom (evas) names will be used
 * add 3 examples exploring all these new features

Reviewed By: cedric, iscaro, jpeg

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

@feature

 src/bin/edje/edje_cc_handlers.c |  62 +-
 src/examples/edje/.gitignore|   4 +
 src/examples/edje/Makefile.am   |  14 +-
 src/examples/edje/dynamic_multiseat.edc | 279 +
 src/examples/edje/edje-dynamic-multiseat.c  | 136 
 src/examples/edje/edje-focus.c  | 157 +
 src/examples/edje/edje-multiseat-custom-names.c | 150 +
 src/examples/edje/edje-multiseat.c  | 287 +
 src/examples/edje/focus.edc | 330 ++
 src/examples/edje/multiseat.edc | 792 
 src/examples/edje/multiseat_custom_names.edc| 175 ++
 src/lib/edje/Edje_Common.h  |   2 +-
 src/lib/edje/edje_callbacks.c   |  48 +-
 src/lib/edje/edje_data.c|   3 +
 src/lib/edje/edje_edit.c|  21 +-
 src/lib/edje/edje_entry.c   | 165 +++--
 src/lib/edje/edje_load.c| 200 +-
 src/lib/edje/edje_object.eo |  34 +
 src/lib/edje/edje_private.h |  22 +-
 src/lib/edje/edje_program.c | 200 +-
 src/lib/evas/Evas_Common.h  |  16 +
 src/lib/evas/canvas/evas_device.c   |  26 +
 22 files changed, 3032 insertions(+), 91 deletions(-)

-- 




[EGIT] [core/efl] master 07/12: edje: support action seats on edje_edit

2016-12-19 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit c6399665ddb0f719df6514b78c9cf6f685dfbb0d
Author: Bruno Dilly 
Date:   Mon Dec 5 15:24:35 2016 -0200

edje: support action seats on edje_edit
---
 src/examples/edje/edje-multiseat.c | 34 --
 src/lib/edje/edje_edit.c   | 16 ++--
 2 files changed, 42 insertions(+), 8 deletions(-)

diff --git a/src/examples/edje/edje-multiseat.c 
b/src/examples/edje/edje-multiseat.c
index 6207244..3387fb1 100644
--- a/src/examples/edje/edje-multiseat.c
+++ b/src/examples/edje/edje-multiseat.c
@@ -25,12 +25,16 @@
 #include 
 #include 
 
+#define EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT
+#include 
+
 #define WIDTH  400
 #define HEIGHT 400
 
 static const char *GROUPNAME = "example/main";
 static const char *PARTNAME_KNOB1 = "example/knob1";
 static const char *PARTNAME_KNOB2 = "example/knob2";
+static const char *EDJE_FILE = PACKAGE_DATA_DIR"/multiseat.edj";
 
 static void
 _on_destroy(Ecore_Evas *ee EINA_UNUSED)
@@ -100,14 +104,31 @@ _on_rect_focus_out(void *data, const Efl_Event *event)
 }
 
 static void
-_on_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *o, void 
*event_info)
+_on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o, void *event_info)
 {
Evas_Event_Key_Down *ev = event_info;
+   const Evas_Modifier *mods;
Efl_Input_Device *seat;
+   Evas *evas = data;
 
seat = efl_input_device_seat_get(ev->dev);
printf("Seat %s (%s) pressed key %s\n", efl_input_device_name_get(seat),
-   edje_obj_seat_name_get(o, seat), ev->key);
+  edje_obj_seat_name_get(o, seat), ev->key);
+
+   mods = evas_key_modifier_get(evas);
+   if (!strcmp(ev->key, "p") &&
+   evas_seat_key_modifier_is_set(mods, "Control", seat))
+ {
+Evas_Object *edje_edit_obj;
+
+edje_edit_obj = edje_edit_object_add(evas);
+if (!edje_object_file_set(edje_edit_obj, EDJE_FILE, GROUPNAME))
+  printf("failed to set file %s.\n", EDJE_FILE);
+
+printf("EDC source code:\n%s\n",
+   edje_edit_source_generate(edje_edit_obj));
+evas_object_del(edje_edit_obj);
+ }
 }
 
 static void
@@ -171,7 +192,6 @@ _device_added(void *data, const Efl_Event *event)
 int
 main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 {
-   const char *edje_file = PACKAGE_DATA_DIR"/multiseat.edj";
const Eina_List *devices, *l;
Evas_Object *edje_obj, *bg, *rect;
Efl_Input_Device *dev;
@@ -201,8 +221,8 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 
edje_obj = edje_object_add(evas);
 
-   if (!edje_object_file_set(edje_obj, edje_file, GROUPNAME))
- printf("failed to set file %s.\n", edje_file);
+   if (!edje_object_file_set(edje_obj, EDJE_FILE, GROUPNAME))
+ printf("failed to set file %s.\n", EDJE_FILE);
 
evas_object_move(edje_obj, 0, 0);
evas_object_resize(edje_obj, WIDTH, HEIGHT);
@@ -238,7 +258,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
efl_event_callback_add(evas, EFL_CANVAS_EVENT_DEVICE_ADDED,
   _device_added, edje_obj);
evas_object_event_callback_add(edje_obj, EVAS_CALLBACK_KEY_DOWN,
-  _on_key_down, NULL);
+  _on_key_down, evas);
edje_object_signal_callback_add(edje_obj, "seat,*", "",
_edje_seat_cb, NULL);
edje_object_signal_callback_add(edje_obj, "load", "",
@@ -246,6 +266,8 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 
printf("Running example on evas engine %s\n",
   ecore_evas_engine_name_get(ee));
+   printf("Press 'Ctrl + p' to print EDC source code\n");
+
ecore_evas_show(ee);
 
ecore_main_loop_begin();
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index eab121f..3178920 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -13187,13 +13187,25 @@ _edje_generate_source_of_program(Evas_Object *obj, 
const char *program, Eina_Str
 
   case EDJE_ACTION_TYPE_FOCUS_SET:
   {
- BUF_APPEND(I4 "action: FOCUS_SET;\n");
+ if (epr->seat)
+   {
+  BUF_APPEND(I4 "action: FOCUS_SET ");
+  BUF_APPENDF("\"%s\";\n", epr->seat);
+   }
+ else
+   BUF_APPEND(I4 "action: FOCUS_SET;\n");
  break;
   }
 
   case EDJE_ACTION_TYPE_FOCUS_OBJECT:
   {
- BUF_APPEND(I4 "action: FOCUS_OBJECT;\n");
+ if (epr->seat)
+   {
+  BUF_APPEND(I4 "action: FOCUS_OBJECT ");
+  BUF_APPENDF("\"%s\";\n", epr->seat);
+   }
+ else
+   BUF_APPEND(I4 "action: FOCUS_OBJECT;\n");
  break;
   }
 

-- 




[EGIT] [core/efl] master 03/03: Merge branch 'devs/iscaro/memory'

2016-12-12 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 5361cc9e4c75114c3f8618706baaadd359227339
Merge: f5a2602 f153d4c
Author: Bruno Dilly 
Date:   Tue Dec 13 03:28:50 2016 -0200

Merge branch 'devs/iscaro/memory'

This series reduce the memory footprint caused by
_evas_object_pointer_data_get() previous implementation.

Patches by Guilherme Iscaro 

Reviewed By: bdilly, cedric, jpeg, raster

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

 src/lib/evas/canvas/evas_events.c  | 77 +-
 src/lib/evas/canvas/evas_object_main.c | 62 ++-
 src/lib/evas/include/evas_private.h|  7 ++--
 3 files changed, 84 insertions(+), 62 deletions(-)

-- 




[EGIT] [core/efl] master 05/05: Merge branch 'devs/iscaro/event-filter'

2016-12-12 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit ddf3558628a7e6b6c5d48741f1ef9a8360d122ca
Merge: eef89ce 200ee18
Author: Bruno Dilly 
Date:   Mon Dec 12 16:04:58 2016 -0200

Merge branch 'devs/iscaro/event-filter'

Series of patches adding support to filter input and focus
events per seat for any evas object.

So it will make it possible to block or unblock keyboard,
mouse and focus events that was originated by a specific seat.
Requested on RFC regarding multiseaet support on Edje -
such feature will be also supported on Edje later.

Patches by Guilherme Iscaro 

Reviewed By: bdilly, cedric, jpeg

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

 src/examples/evas/.gitignore   |   1 +
 src/examples/evas/Makefile.am  |   6 +
 src/examples/evas/evas-event-filter.c  | 277 +
 src/lib/evas/canvas/efl_canvas_object.eo   |   4 +
 src/lib/evas/canvas/efl_input_interface.eo |  16 ++
 src/lib/evas/canvas/evas_focus.c   |   3 +
 src/lib/evas/canvas/evas_object_main.c |  97 ++
 src/lib/evas/include/evas_private.h|   6 +
 8 files changed, 410 insertions(+)

-- 




[EGIT] [core/efl] master 01/01: examples/evas: use new API for key modifiers per seat

2016-12-06 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 9941fbc044e1594d64d45e5a88bd4b1bd56d72cc
Author: Bruno Dilly 
Date:   Tue Dec 6 17:06:05 2016 -0200

examples/evas: use new API for key modifiers per seat
---
 src/examples/evas/evas-multiseat-events.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/examples/evas/evas-multiseat-events.c 
b/src/examples/evas/evas-multiseat-events.c
index 986194b..69125b2 100644
--- a/src/examples/evas/evas-multiseat-events.c
+++ b/src/examples/evas/evas-multiseat-events.c
@@ -179,8 +179,9 @@ _key_down_cb(void *data EINA_UNUSED, const Efl_Event *event)
evas_object_name_get(event->object),
efl_input_device_name_get(seat));
 
-   // FIXME use evas_seat_key_modifier_is_set() after PR is merged
-   (void) mods;
+   if (evas_seat_key_modifier_is_set(mods, "Control", seat))
+ fprintf(stdout, "Ctrl is pressed by seat %s\n",
+ efl_input_device_name_get(seat));
 }
 
 static void

-- 




Re: [E-devel] Edje multiseat support

2016-12-05 Thread Bruno Dilly
On Mon, Dec 5, 2016 at 10:53 PM, Bruno Dilly  wrote:

>
>
> On Mon, Dec 5, 2016 at 8:47 PM, Simon Lees  wrote:
>
>>
>>
>> On 12/06/2016 01:18 AM, Bruno Dilly wrote:
>> > Hi jpeg,
>> >
>> > On Mon, Dec 5, 2016 at 2:21 AM, Jean-Philippe André 
>> > wrote:
>> >
>> >> Hi,
>> >>
>> >>
>> >> This seems to assume a finite and known in advance number of seats?
>> >> I'm not well aware of what the seats are or how that's all supposed to
>> >> work, but this sounds strange to me.
>> >>
>> >>
>> > On theme point of view, I can't see how this could be any different.
>> > If you don't know how many seats do you support or which seats would be
>> > supported,
>> > how could you be able to design it?
>> >
>> > EDC is pretty much a lot of parts with different states and programas
>> > listening to specific signals-sources and taking an action when it
>> matches.
>> > Everything is hardcoded on EDC files, right?
>> >
>> > But nothing stops you to create an UI more dynamic on code.
>> > You could listen to "seat,added,X" and create a random color
>> > to represent it. Then when you receive "mouse,over,X" for specific
>> parts,
>> > you could change their colors, images, emit different sounds or whatever
>> > that makes sense for you.
>> >
>> >
>> >
>> >> Maybe someone can enlighten me? Why would the theme know the number of
>> >> seats?
>> >> (the approach probably makes perfect sense but i'm not sure what edje
>> >> should do wrt. seats)
>> >>
>> >
>>
>> I can't remember if you can currently do something like the % operator
>> with edje, but you could make it so that the first 4 seats get different
>> colors and then the 5th gets the same as the first. If you were only
>> trying to do colors if you can extract the X part (again don't remember
>> if this is possible) you could use a macro and substitute in a lookup
>> table for colors (saves writing every part X times)
>>
>
> Using scripts it is doable.
> Lets say, you could do something like:
>
>  program {
> name: "part,in";
> signal: "mouse,in,*";
> source: "part";
> script {
> handle_mouse_in(sig);
> }
>  }
>
> on handle_mouse_in you would be able to get the seat name
> using something like strcpy(seat_name, sig[strlen("mouse,in,")]);
>
> You could even create a list and append new random colors for each
> announced seat.
>
> But it's not only about colors, you could select images, or font size /
> families... anything
> that could matter for a theme.
>

I've pushed a commit to my branch (devs/bdilly/edje_multiseat) adding an
example
of how to make a theme with no assumptions regarding the amount of seats to
be
supported. It's edje-dynamic-multiseat.

Despite simple - it just change color classes depending on which seat is
over a part - it let's
clear that multiseat works on this scenario.

Sure, we need to use scripts for that, since we don't want to hardcode all
possible seats on theme:
EDC file looks like this:
http://pastebin.com/9YCRRZAN

Regards


>
>
>
>>
>> --
>>
>> Simon Lees (Simotek)http://simotek.net
>>
>> Emergency Update Team   keybase.io/simotek
>> SUSE Linux        Adeliade Australia, UTC+9:30
>> GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B
>>
>>
>> 
>> --
>> Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today.http://sdm.link/xeonphi
>> ___
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>>
>
>
> --
> Bruno Dilly
> ProFUSION embedded systems
> http://profusion.mobi
>



-- 
Bruno Dilly
ProFUSION embedded systems
http://profusion.mobi
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Edje multiseat support

2016-12-05 Thread Bruno Dilly
On Mon, Dec 5, 2016 at 8:47 PM, Simon Lees  wrote:

>
>
> On 12/06/2016 01:18 AM, Bruno Dilly wrote:
> > Hi jpeg,
> >
> > On Mon, Dec 5, 2016 at 2:21 AM, Jean-Philippe André 
> > wrote:
> >
> >> Hi,
> >>
> >>
> >> This seems to assume a finite and known in advance number of seats?
> >> I'm not well aware of what the seats are or how that's all supposed to
> >> work, but this sounds strange to me.
> >>
> >>
> > On theme point of view, I can't see how this could be any different.
> > If you don't know how many seats do you support or which seats would be
> > supported,
> > how could you be able to design it?
> >
> > EDC is pretty much a lot of parts with different states and programas
> > listening to specific signals-sources and taking an action when it
> matches.
> > Everything is hardcoded on EDC files, right?
> >
> > But nothing stops you to create an UI more dynamic on code.
> > You could listen to "seat,added,X" and create a random color
> > to represent it. Then when you receive "mouse,over,X" for specific parts,
> > you could change their colors, images, emit different sounds or whatever
> > that makes sense for you.
> >
> >
> >
> >> Maybe someone can enlighten me? Why would the theme know the number of
> >> seats?
> >> (the approach probably makes perfect sense but i'm not sure what edje
> >> should do wrt. seats)
> >>
> >
>
> I can't remember if you can currently do something like the % operator
> with edje, but you could make it so that the first 4 seats get different
> colors and then the 5th gets the same as the first. If you were only
> trying to do colors if you can extract the X part (again don't remember
> if this is possible) you could use a macro and substitute in a lookup
> table for colors (saves writing every part X times)
>

Using scripts it is doable.
Lets say, you could do something like:

 program {
name: "part,in";
signal: "mouse,in,*";
source: "part";
script {
handle_mouse_in(sig);
}
 }

on handle_mouse_in you would be able to get the seat name
using something like strcpy(seat_name, sig[strlen("mouse,in,")]);

You could even create a list and append new random colors for each
announced seat.

But it's not only about colors, you could select images, or font size /
families... anything
that could matter for a theme.



>
> --
>
> 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
>
>
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>


-- 
Bruno Dilly
ProFUSION embedded systems
http://profusion.mobi
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [apps/ephoto] master 01/01: Update gitignore

2016-12-05 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit bce27ed4d42b227aacac4aa7d0e4783dbadb4f83
Author: Bruno Dilly 
Date:   Mon Dec 5 20:56:51 2016 -0200

Update gitignore
---
 .gitignore | 5 +
 1 file changed, 5 insertions(+)

diff --git a/.gitignore b/.gitignore
index 088810a..e0a7425 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+*.gmo
 *.o
 *.swp
 *.swo
@@ -29,6 +30,7 @@ data/themes/default/Makefile.in
 data/themes/default/ephoto.edj
 data/themes/default/images/Makefile
 data/themes/default/images/Makefile.in
+data/themes/ephoto.edj
 depcomp
 ephoto.spec
 install-sh
@@ -71,6 +73,8 @@ m4/xsize.m4
 m4/ulonglong.m4
 m4/inttypes.m4
 m4/isc-posix.m4
+m4/fcntl-o.m4
+m4/threadlib.m4
 missing
 mkinstalldirs
 po/Makefile
@@ -105,5 +109,6 @@ src/bin/ephoto_ql_la-ephoto_main.lo
 src/bin/ephoto_ql_la-ephoto_single_browser.lo
 src/bin/ephoto_ql_la-ephoto_slideshow.lo
 src/bin/ephoto_ql_la-ephoto_thumb_browser.lo
+src/bin/ephoto_thumbnail
 src/bin/stamp-h1
 

-- 




Re: [E-devel] Edje multiseat support

2016-12-05 Thread Bruno Dilly
On Mon, Dec 5, 2016 at 5:10 PM, Cedric BAIL  wrote:

> On Mon, Dec 5, 2016 at 6:26 AM, Bruno Dilly  wrote:
> > On Fri, Dec 2, 2016 at 8:19 PM, Cedric BAIL  wrote:
> >> On Fri, Dec 2, 2016 at 8:54 AM, Bruno Dilly 
> wrote:
> >> > The idea is that a developer would be able to implement an UI that
> >> > may be used by more than one single seat, properly handling focus,
> >> > and providing different feedback for different seats action.
> >> >
> >> > Let’s say, different colors on focus, different images when different
> >> > seat pointers are over, etc.
> >> >
> >> > I’ve done an initial implementation and wrote an example. It’s
> available
> >> > on my branch devs/bdilly/edje_multiseat . There you’ll be able to find
> >> > edje_multiseat example (C code + EDC).
> >> >
> >> > To make this possible, a few main changes were done:
> >> >   *  New signals were added, adding the seat as suffix. So “mouse,in”
> >> would
> >> > be still be emitted, but also “mouse,in,seat1”, for example
> >> >   * Real Parts now may be focused by multiple seats
> >> >   * Some actions receive an optional seat parameter. For instance,
> >> > FOCUS_SET may receive the seat name, or it will consider it's about
> the
> >> > default seat.
> >> >* Since Evas seat devices may have arbitrary names (at least using
> >> > wayland backend you can name them as you want using udev rules), or
> set
> >> > them on programmatic ways, Edje will have custom names for seats,
> >> following
> >> > a well established pattern. So first announced seat will be named
> >> “seat1”,
> >> > the second “seat2”... If an application supports three seats, on EDC
> you
> >> > know what signals you should expect. It makes it possible to write
> >> general
> >> > applications (in the sense of not knowing exactly seats beforehand).
> But
> >> > let’s say it’s not the case. there is a specific product built in a
> way
> >> > that they know exactly which seats are supported and configured their
> >> > names, or want to check if this seat has pointer, keyboard, or
> whatever…
> >> > for this cases, Edje also emits signals saying when devices were added
> >> (or
> >> > removed) and their names. With these names you can use a new Edje
> >> function
> >> > to fetch the Evas device named as “seat1”.
> >>
> >> I think it would be better to actually emit both a "event,seat1" and a
> >> "event,seat_named". It will be easier to use from theme where named
> >> seat have been customized and won't cost much more I think.
> >
> > It's easy to be done, a very few lines are required.
> >
> > But if you're customizing seat names, you could name them as
> > "seat1", "seat2"... and they would match EDC names.
> >
> > On the other hand, if we emit for both sequential names and
> > evas names, if you name them as seat1, seat2... in the end
> > you receive duplicated events...
> >
> > And when you receive them on C code, you would need to
> > figure out if they're custom names and use edje API to get the seat
> device,
> > or if they're evas names, and use evas API to get the seat device...
> > Having both at the same times seems to make things a bit harder.
> >
> > Adding an API to select what approach to be used seems acceptable?
> > By default using seat1, seat2, but you could require evas_names?
>
> I don't think an API would work as you only know in the theme if it
> handles them. Maybe better would be a flag in the edje group. Do you
> think that would be ok ?
>
>
Yeah, it seems to be a good idea.
I'll try it soon. Thanks


> > Something like
> > edje_multiseat_evas_names_set(bool) ?
> >
> > So you could write your EDC / code knowing if names would be
> > following Edje or Evas.
> >
> >> Something that seems out of the proposal is text cursor. I think we
> >> want to be able to assign a seat per Edje_Cursor so that we have
> >> multiple people able to mess with an entry, but I know that Tom and
> >> Daniel have been working on redefining the API there. So I am not sure
> >> about what needs to be done in that context. Maybe they can share
> >> there thinking on the topic.
> >
> > It was kind of out of the proposal, indeed.
> > I'll take a look on it soon and ping you ba

Re: [E-devel] Edje multiseat support

2016-12-05 Thread Bruno Dilly
Hi jpeg,

On Mon, Dec 5, 2016 at 2:21 AM, Jean-Philippe André 
wrote:

> Hi,
>
>
> This seems to assume a finite and known in advance number of seats?
> I'm not well aware of what the seats are or how that's all supposed to
> work, but this sounds strange to me.
>
>
On theme point of view, I can't see how this could be any different.
If you don't know how many seats do you support or which seats would be
supported,
how could you be able to design it?

EDC is pretty much a lot of parts with different states and programas
listening to specific signals-sources and taking an action when it matches.
Everything is hardcoded on EDC files, right?

But nothing stops you to create an UI more dynamic on code.
You could listen to "seat,added,X" and create a random color
to represent it. Then when you receive "mouse,over,X" for specific parts,
you could change their colors, images, emit different sounds or whatever
that makes sense for you.



> Maybe someone can enlighten me? Why would the theme know the number of
> seats?
> (the approach probably makes perfect sense but i'm not sure what edje
> should do wrt. seats)
>

I can see two different use cases here:

1) you're developing an specific product and you know the limit of seats
that is supported.

When you're writing a game for a console you know that you support 2, or 4
different players,
and know how to interact with each controller, right?

In this case you just have multiple states for EDC parts to represent which
seat is interacting
with it and programs for that.

2) you're developing a program that could handle as many seats as the user
want to add

You'll need to modify your UI in a programmatic way, changing Edje parts
with the API or
sending custom signals or messages for your theme.

I'll create an example exercising this idea. Indeed edje_multiseat example
just cover
the first scenario. Maybe some challenges (and consequently, improvements
on Edje)
may come from this.

Thanks


>
>
> TIA,
>
>
> On 4 December 2016 at 10:58, Carsten Haitzler 
> wrote:
>
> > On Sat, 03 Dec 2016 15:24:17 + Gustavo Sverzut Barbieri
> >  said:
> >
> > > Just seat1, seat2...
> > >
> > > That's what I said we found unusable to get "bob", "jane" in EDC.
> > >
> > > In C you could snprintf() and add signals, or register with ",*" and
> then
> > > parse, BUT that's only in C or bindings, not EDC/Embryo since in a
> > > script/program you can't know the signal that triggered you.
> > >
> > > In C you can retrieve bob from seat1, seat1 from bob and map
> accordingly.
> >
> > ok. so edje will stick to simple seat1, seat2 etc. ok. sensible.
> >
> > > From edc point of view, you can only write theme based on something you
> > > know. Like assign focus color red to seat1, green to seat2, blue to
> > seat3.
> > > If you get bob, you can't figure it out since it is dependent on the
> > system
> > > configuration.
> >
> > yeah. unless the app emits these signals specifically as part of the edje
> > <->
> > app "interface".
> >
> > > Em sáb, 3 de dez de 2016 às 01:20, Carsten Haitzler <
> > ras...@rasterman.com>
> > > escreveu:
> > >
> > > > On Fri, 2 Dec 2016 14:54:20 -0200 Bruno Dilly  >
> > > > said:
> > > >
> > > > > Hi folks,
> > > > >
> > > > > now that multiseat is supported up to Evas, we’re working on Edje.
> > > > >
> > > > > The idea is that a developer would be able to implement an UI that
> > > > > may be used by more than one single seat, properly handling focus,
> > > > > and providing different feedback for different seats action.
> > > > >
> > > > > Let’s say, different colors on focus, different images when
> different
> > > > > seat pointers are over, etc.
> > > > >
> > > > > I’ve done an initial implementation and wrote an example. It’s
> > available
> > > > > on my branch devs/bdilly/edje_multiseat . There you’ll be able to
> > find
> > > > > edje_multiseat example (C code + EDC).
> > > > >
> > > > > To make this possible, a few main changes were done:
> > > > >   *  New signals were added, adding the seat as suffix. So
> “mouse,in”
> > > > would
> > > > > be still be emitted, but also “mouse,in,seat1”, for example
> > > > >   * Real Parts now may be focused by multiple seats
> >

Re: [E-devel] Edje multiseat support

2016-12-05 Thread Bruno Dilly
On Fri, Dec 2, 2016 at 8:19 PM, Cedric BAIL  wrote:

> Hi,
>
> On Fri, Dec 2, 2016 at 8:54 AM, Bruno Dilly  wrote:
> > now that multiseat is supported up to Evas, we’re working on Edje.
>
> Yeah \o/
>
> > The idea is that a developer would be able to implement an UI that
> > may be used by more than one single seat, properly handling focus,
> > and providing different feedback for different seats action.
> >
> > Let’s say, different colors on focus, different images when different
> > seat pointers are over, etc.
> >
> > I’ve done an initial implementation and wrote an example. It’s available
> > on my branch devs/bdilly/edje_multiseat . There you’ll be able to find
> > edje_multiseat example (C code + EDC).
> >
> > To make this possible, a few main changes were done:
> >   *  New signals were added, adding the seat as suffix. So “mouse,in”
> would
> > be still be emitted, but also “mouse,in,seat1”, for example
> >   * Real Parts now may be focused by multiple seats
> >   * Some actions receive an optional seat parameter. For instance,
> > FOCUS_SET may receive the seat name, or it will consider it's about the
> > default seat.
> >* Since Evas seat devices may have arbitrary names (at least using
> > wayland backend you can name them as you want using udev rules), or set
> > them on programmatic ways, Edje will have custom names for seats,
> following
> > a well established pattern. So first announced seat will be named
> “seat1”,
> > the second “seat2”... If an application supports three seats, on EDC you
> > know what signals you should expect. It makes it possible to write
> general
> > applications (in the sense of not knowing exactly seats beforehand). But
> > let’s say it’s not the case. there is a specific product built in a way
> > that they know exactly which seats are supported and configured their
> > names, or want to check if this seat has pointer, keyboard, or whatever…
> > for this cases, Edje also emits signals saying when devices were added
> (or
> > removed) and their names. With these names you can use a new Edje
> function
> > to fetch the Evas device named as “seat1”.
>
> I think it would be better to actually emit both a "event,seat1" and a
> "event,seat_named". It will be easier to use from theme where named
> seat have been customized and won't cost much more I think.
>

It's easy to be done, a very few lines are required.

But if you're customizing seat names, you could name them as
"seat1", "seat2"... and they would match EDC names.

On the other hand, if we emit for both sequential names and
evas names, if you name them as seat1, seat2... in the end
you receive duplicated events...

And when you receive them on C code, you would need to
figure out if they're custom names and use edje API to get the seat device,
or if they're evas names, and use evas API to get the seat device...
Having both at the same times seems to make things a bit harder.

Adding an API to select what approach to be used seems acceptable?
By default using seat1, seat2, but you could require evas_names?

Something like
edje_multiseat_evas_names_set(bool) ?

So you could write your EDC / code knowing if names would be
following Edje or Evas.


>
> Something that seems out of the proposal is text cursor. I think we
> want to be able to assign a seat per Edje_Cursor so that we have
> multiple people able to mess with an entry, but I know that Tom and
> Daniel have been working on redefining the API there. So I am not sure
> about what needs to be done in that context. Maybe they can share
> there thinking on the topic.
>

It was kind of out of the proposal, indeed.
I'll take a look on it soon and ping you back about it.


>
> Another case, that I think we want to handle somehow is specific drag
> per seat. If you look at edje_callback.c, you will see that we need to
> handle seat in that context too. I would guess we want to set some
> kind of filter via both API and theme. Do you have an opinion on that
> bit already ?
>

I'm not sure if I get what do you mean, here.
Have you had the opportunity to test the example I've written?

I've added a couple drag bars on it, that change colors in different ways
depending on which seat is handling them. So seats can move
different drags at the same time, or could even try to use the same
at the same time, and code would receive signals saying which seat
changed it.



>
> Also if we are to do a theme in elementary that support multi seat, I
> would expect to be able to disable a widget for a specific seat in the
> C code. Wouldn't it make sense ? So in which case, wouldn&

[EGIT] [editors/vim-configs] master 01/01: syntax/edc: add 'FOCUS_OBJECT' keyword

2016-12-02 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/editors/vim-configs.git/commit/?id=c79af96aecc0df76a572926554b594f854fa64bf

commit c79af96aecc0df76a572926554b594f854fa64bf
Author: Bruno Dilly 
Date:   Fri Dec 2 18:57:28 2016 -0200

syntax/edc: add 'FOCUS_OBJECT' keyword
---
 syntax/edc.vim | 1 +
 1 file changed, 1 insertion(+)

diff --git a/syntax/edc.vim b/syntax/edc.vim
index c822fb4..5b26ae3 100644
--- a/syntax/edc.vim
+++ b/syntax/edc.vim
@@ -68,6 +68,7 @@ syn keyword   edcConstant GLOW FAR_SHADOW FAR_SOFT_SHADOW
 syn keywordedcConstant BOTTOM_RIGHT BOTTOM BOTTOM_LEFT LEFT
 syn keywordedcConstant TOP_LEFT TOP TOP_RIGHT RIGHT
 syn keywordedcConstant STATE_SET ACTION_STOP SIGNAL_EMIT FOCUS_SET
+syn keywordedcConstant FOCUS_OBJECT
 syn keywordedcConstant DRAG_VAL_SET DRAG_VAL_STEP DRAG_VAL_PAGE
 syn keywordedcConstant LINEAR SINUSOIDAL ACCELERATE DECELERATE
 syn keywordedcConstant LIN DECEL DIVIS BOUNCE SPRING CURRENT

-- 




[EGIT] [core/efl] master 01/01: edje_cc: add FOCUS_OBJECT reference on doc

2016-12-02 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 6f3f514e4f31da2522fe7a23f1f228351a2ce8a3
Author: Bruno Dilly 
Date:   Fri Dec 2 16:41:01 2016 -0200

edje_cc: add FOCUS_OBJECT reference on doc

It was missing on actions list.
---
 src/bin/edje/edje_cc_handlers.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index c5493c0..33aeb12 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -14092,6 +14092,7 @@ st_collections_group_programs_program_in(void)
 @li DRAG_VAL_STEP 1.0 0.0
 @li DRAG_VAL_PAGE 0.0 0.0
 @li FOCUS_SET
+@li FOCUS_OBJECT
 @li PARAM_COPY "src_part" "src_param" "dst_part" "dst_param"
 @li PARAM_SET "part" "param" "value"
 @li PLAY_SAMPLE "sample name" speed (channel)

-- 




[EGIT] [core/efl] master 01/01: eo: fix oops on efl_replace() documentation

2016-12-02 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 5d54c24a4e0e4a4a58c3dc9d1417acef588c0870
Author: Bruno Dilly 
Date:   Fri Dec 2 15:41:48 2016 -0200

eo: fix oops on efl_replace() documentation
---
 src/lib/eo/Eo.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 244478b..cf74b5c 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -1339,7 +1339,7 @@ EAPI int efl_callbacks_cmp(const Efl_Callback_Array_Item 
*a, const Efl_Callback_
  * @param storage The object to replace the old reference. It can not be @c 
NULL.
  * @param new_obj The new object. It may be @c NULL.
  *
- * The string pointed by @c storage must be previously an Eo or
+ * The object pointed by @a storage must be previously an Eo or
  * @c NULL and it will be efl_unref(). The @a new_obj will be passed
  * to efl_ref() and then assigned to @c *storage.
  *

-- 




[EGIT] [core/efl] master 05/05: Merge branch 'devs/iscaro/devices'

2016-12-02 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 81a25bc83f1a18aeb84c9329f017a4a00282c99d
Merge: 04450c4 e0af738
Author: Bruno Dilly 
Date:   Fri Dec 2 15:27:05 2016 -0200

Merge branch 'devs/iscaro/devices'

Series of fixes regarding Efl.Input.Device references.
There were some issues on Evas and on its own interface.

Also adds efl_replace() to replace referenced objects
(using it for devices for now). It follows
eina_stringshare_replace() approach.

Patches by Guilherme Iscaro 
Differential Revision: https://phab.enlightenment.org/D4445

 src/lib/efl/interfaces/efl_input_device.c |  8 +---
 src/lib/eo/Eo.h   | 22 ++
 src/lib/evas/canvas/efl_input_focus.c |  4 ++--
 src/lib/evas/canvas/efl_input_hold.c  |  2 +-
 src/lib/evas/canvas/efl_input_key.c   |  4 ++--
 src/lib/evas/canvas/efl_input_pointer.c   |  4 ++--
 6 files changed, 34 insertions(+), 10 deletions(-)

-- 




[E-devel] Edje multiseat support

2016-12-02 Thread Bruno Dilly
Hi folks,

now that multiseat is supported up to Evas, we’re working on Edje.

The idea is that a developer would be able to implement an UI that
may be used by more than one single seat, properly handling focus,
and providing different feedback for different seats action.

Let’s say, different colors on focus, different images when different
seat pointers are over, etc.

I’ve done an initial implementation and wrote an example. It’s available
on my branch devs/bdilly/edje_multiseat . There you’ll be able to find
edje_multiseat example (C code + EDC).

To make this possible, a few main changes were done:
  *  New signals were added, adding the seat as suffix. So “mouse,in” would
be still be emitted, but also “mouse,in,seat1”, for example
  * Real Parts now may be focused by multiple seats
  * Some actions receive an optional seat parameter. For instance,
FOCUS_SET may receive the seat name, or it will consider it's about the
default seat.
   * Since Evas seat devices may have arbitrary names (at least using
wayland backend you can name them as you want using udev rules), or set
them on programmatic ways, Edje will have custom names for seats, following
a well established pattern. So first announced seat will be named “seat1”,
the second “seat2”... If an application supports three seats, on EDC you
know what signals you should expect. It makes it possible to write general
applications (in the sense of not knowing exactly seats beforehand). But
let’s say it’s not the case. there is a specific product built in a way
that they know exactly which seats are supported and configured their
names, or want to check if this seat has pointer, keyboard, or whatever…
for this cases, Edje also emits signals saying when devices were added (or
removed) and their names. With these names you can use a new Edje function
to fetch the Evas device named as “seat1”.

Please let me know about any suggestions or concerns.

I should make a pull request with this initial patchset soon

Thank you

-- 
Bruno Dilly
ProFUSION embedded systems
http://profusion.mobi
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 06/06: Merge branch 'devs/iscaro/locks_and_mods'

2016-12-02 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 5fdc93c02e0743c8750cd1a03d2f3a6b4df61278
Merge: 2ce2a65 ad1d160
Author: Bruno Dilly 
Date:   Fri Dec 2 09:58:18 2016 -0200

Merge branch 'devs/iscaro/locks_and_mods'

This series add support to setting mode and properties
of mouse pointer, enabling key locks and modifiers per device
on Evas.

Also it fixes Ecore Input Evas keeping an evas device
on Ecore_Input_Last struct to separate event sources and
add support to lock / modifiers per seat.

With that, multiseat support should be complete up
to Evas layer.

Patches by Guilherme Iscaro 
Differential Revision: https://phab.enlightenment.org/D4415

@feature

 src/lib/ecore_input_evas/Ecore_Input_Evas.h|3 +
 src/lib/ecore_input_evas/ecore_input_evas.c|   80 +-
 src/lib/evas/Evas_Common.h |   55 +-
 src/lib/evas/canvas/efl_canvas_object.eo   |   33 +-
 src/lib/evas/canvas/efl_input_key.c|   11 +-
 src/lib/evas/canvas/efl_input_pointer.c|   12 +-
 src/lib/evas/canvas/evas_canvas.eo |  145 ++-
 src/lib/evas/canvas/evas_clip.c|   26 +-
 src/lib/evas/canvas/evas_device.c  |   32 +-
 src/lib/evas/canvas/evas_events.c  | 1136 ++--
 src/lib/evas/canvas/evas_events_legacy.c   |   10 +-
 src/lib/evas/canvas/evas_key.c |  164 ++-
 src/lib/evas/canvas/evas_layer.c   |   15 +-
 src/lib/evas/canvas/evas_main.c|  164 ++-
 src/lib/evas/canvas/evas_map.c |   14 +-
 src/lib/evas/canvas/evas_object_line.c |   32 +-
 src/lib/evas/canvas/evas_object_main.c |  149 +--
 src/lib/evas/canvas/evas_object_polygon.c  |   51 +-
 src/lib/evas/canvas/evas_object_text.c |   63 +-
 src/lib/evas/canvas/evas_object_textgrid.c |   27 +-
 src/lib/evas/canvas/evas_stack.c   |   64 +-
 src/lib/evas/include/evas_private.h|   74 +-
 .../engines/wayland/ecore_evas_wayland_common.c|5 +-
 .../ecore_evas/vnc_server/ecore_evas_vnc_server.c  |   36 +-
 24 files changed, 1663 insertions(+), 738 deletions(-)

-- 




[EGIT] [core/efl] master 01/01: eina: remove tests, examples and docs for eina_model

2016-11-30 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit adb95630ef47abd0ea9e55a8e26f9b731e8fcdb1
Author: Bruno Dilly 
Date:   Wed Nov 30 18:37:34 2016 -0200

eina: remove tests, examples and docs for eina_model

Summary:
Since eina_model was dropped some years ago.
Also a few other points where related stuff is just commented out.

Reviewers: iscaro, barbieri

Reviewed By: barbieri

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4442
---
 doc/eina_examples.dox  |   18 -
 src/examples/eina/Makefile.am  |   22 -
 src/examples/eina/eina_model_01.c  |  235 -
 src/examples/eina/eina_model_02.c  |   61 --
 src/examples/eina/eina_model_03.c  |  236 -
 src/examples/eina/eina_model_04_animal.c   |   76 --
 src/examples/eina/eina_model_04_animal.h   |   26 -
 src/examples/eina/eina_model_04_child.c|   81 --
 src/examples/eina/eina_model_04_child.h|   23 -
 src/examples/eina/eina_model_04_human.c|  157 
 src/examples/eina/eina_model_04_human.h|   24 -
 src/examples/eina/eina_model_04_main.c |  110 ---
 src/examples/eina/eina_model_04_parrot.c   |   95 --
 src/examples/eina/eina_model_04_parrot.h   |   24 -
 src/examples/eina/eina_model_04_whistler.c |   59 --
 src/examples/eina/eina_model_04_whistler.h |   45 -
 src/lib/eina/Eina.h|1 -
 src/lib/eina/eina_main.c   |9 -
 src/lib/eina/eina_value.c  |  133 +--
 src/tests/eina/eina_suite.c|2 -
 src/tests/eina/eina_test_model.c   | 1289 
 src/tests/eina/eina_test_value.c   |   48 --
 22 files changed, 1 insertion(+), 2773 deletions(-)

diff --git a/doc/eina_examples.dox b/doc/eina_examples.dox
index 33e83de..ad7fcc6 100644
--- a/doc/eina_examples.dox
+++ b/doc/eina_examples.dox
@@ -30,15 +30,6 @@
  * @li @ref eina_log_02.c
  * @li @ref eina_log_03.c
  * @li @ref eina_magic_01.c
- * @li @ref eina_model_01.c
- * @li @ref eina_model_02.c
- * @li @ref eina_model_03.c
- * @li @ref eina_model_04_animal.c
- * @li @ref eina_model_04_child.c
- * @li @ref eina_model_04_human.c
- * @li @ref eina_model_04_main.c
- * @li @ref eina_model_04_parrot.c
- * @li @ref eina_model_04_whistler.c
  * @li @ref eina_simple_xml_parser_01.c
  * @li @ref eina_str_01.c
  * @li @ref eina_strbuf_01.c
@@ -87,15 +78,6 @@
  * @example eina_log_02.c
  * @example eina_log_03.c
  * @example eina_magic_01.c
- * @example eina_model_01.c
- * @example eina_model_02.c
- * @example eina_model_03.c
- * @example eina_model_04_animal.c
- * @example eina_model_04_child.c
- * @example eina_model_04_human.c
- * @example eina_model_04_main.c
- * @example eina_model_04_parrot.c
- * @example eina_model_04_whistler.c
  * @example eina_simple_xml_parser_01.c
  * @example eina_str_01.c
  * @example eina_strbuf_01.c
diff --git a/src/examples/eina/Makefile.am b/src/examples/eina/Makefile.am
index 56eb277..4ce1258 100644
--- a/src/examples/eina/Makefile.am
+++ b/src/examples/eina/Makefile.am
@@ -58,10 +58,6 @@ eina_magic_01.c \
 eina_xattr_01.c \
 eina_xattr_02.c
 
-#eina_model_01.c \
-#eina_model_02.c \
-#eina_model_03.c
-
 EXTRA_PROGRAMS = \
 eina_accessor_01 \
 eina_array_01 \
@@ -103,24 +99,6 @@ eina_inarray_03 \
 eina_xattr_01 \
 eina_xattr_02
 
-#eina_model_01 \
-#eina_model_02 \
-#eina_model_03 \
-#eina_model_04
-
-#eina_model_04_SOURCES = \
-#eina_model_04_animal.c \
-#eina_model_04_child.c \
-#eina_model_04_human.c \
-#eina_model_04_main.c \
-#eina_model_04_parrot.c \
-#eina_model_04_whistler.c \
-#eina_model_04_animal.h \
-#eina_model_04_child.h \
-#eina_model_04_human.h \
-#eina_model_04_parrot.h \
-#eina_model_04_whistler.h
-
 EXTRA_PROGRAMS += eina_tiler_01
 
 eina_tiler_01_CPPFLAGS = \
diff --git a/src/examples/eina/eina_model_01.c 
b/src/examples/eina/eina_model_01.c
deleted file mode 100644
index 28895aa..000
--- a/src/examples/eina/eina_model_01.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Compile with:
- * gcc -o eina_model_01 eina_model_01.c `pkg-config --cflags --libs eina`
- */
-
-/*
- * This example demonstrates the usage of Eina Model by implementing
- * Bank Account Class, which is inherited from Base Class;
- * and Credit Card Class, which is inherited from Bank Account Class.
- *
- * Base Class(Eina_Model_Type) --> Bank Account Class --> Credit Card Class
- *
- * Bank Account Class implements "bank_account_data_set()" and "print()" 
methods;
- * Credit Card Class inherits these two and implements "credit_card_data_set()"
- *
- *
- *  Bank Account Class::print() calls for "_bank_account_data_print"
- *  Credit Card Class ::print() is reloaded with "_credit_card_data_print()"
- *  which calls for parent function "_bank_account_data_print"
- *
- */
-

[EGIT] [core/efl] master 01/03: efl_input_focus: fix typo and code style

2016-11-30 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 8051fa1c3517fd2dda58869cbf2577061732677b
Author: Bruno Dilly 
Date:   Mon Nov 28 16:14:39 2016 -0200

efl_input_focus: fix typo and code style
---
 src/lib/evas/canvas/efl_input_focus.eo | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/efl_input_focus.eo 
b/src/lib/evas/canvas/efl_input_focus.eo
index 5097fde..6c12e1a 100644
--- a/src/lib/evas/canvas/efl_input_focus.eo
+++ b/src/lib/evas/canvas/efl_input_focus.eo
@@ -1,9 +1,9 @@
 class Efl.Input.Focus(Efl.Object, Efl.Input.Event)
 {
-   [[Reprents a focus event. @since 1.19]]
+   [[Represents a focus event. @since 1.19]]
methods {
   @property object {
-[[The focused object]]
+ [[The focused object]]
  values {
 object: Efl.Object; [[The focused object.
   In case this represents a canvas

-- 




[EGIT] [core/efl] master 03/03: evas: add example for multiseat events

2016-11-30 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 887be4d4e53712c85d6a4860659faedaa497ed29
Author: Bruno Dilly 
Date:   Tue Nov 29 18:23:49 2016 -0200

evas: add example for multiseat events

Also useful to make some tests / debugging.
---
 src/examples/evas/.gitignore  |   1 +
 src/examples/evas/Makefile.am |   5 +
 src/examples/evas/evas-multiseat-events.c | 300 ++
 3 files changed, 306 insertions(+)

diff --git a/src/examples/evas/.gitignore b/src/examples/evas/.gitignore
index 31a9d20..ae8e78e 100644
--- a/src/examples/evas/.gitignore
+++ b/src/examples/evas/.gitignore
@@ -54,6 +54,7 @@
 /evas_map_utils
 /evas_map_utils_eo
 /evas_multi_touch
+/evas_multiseat_events
 /evas_object_manipulation
 /evas_object_manipulation-eo
 /evas_smart_interface
diff --git a/src/examples/evas/Makefile.am b/src/examples/evas/Makefile.am
index 7f660f7..c4d155d 100644
--- a/src/examples/evas/Makefile.am
+++ b/src/examples/evas/Makefile.am
@@ -119,6 +119,11 @@ evas_events_SOURCES = evas-events.c
 evas_events_LDADD = $(ECORE_EVAS_COMMON_LDADD)
 evas_events_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
 
+EXTRA_PROGRAMS += evas_multiseat_events
+evas_multiseat_events_SOURCES = evas-multiseat-events.c
+evas_multiseat_events_LDADD = $(ECORE_EVAS_COMMON_LDADD)
+evas_multiseat_events_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
+
 EXTRA_PROGRAMS += evas_object_manipulation
 evas_object_manipulation_SOURCES = evas-object-manipulation.c
 evas_object_manipulation_LDADD = $(ECORE_EVAS_COMMON_LDADD)
diff --git a/src/examples/evas/evas-multiseat-events.c 
b/src/examples/evas/evas-multiseat-events.c
new file mode 100644
index 000..986194b
--- /dev/null
+++ b/src/examples/evas/evas-multiseat-events.c
@@ -0,0 +1,300 @@
+/**
+ * Evas example illustrating how to handle events with multiseat information:
+ ** mouse events
+ ** keyboard events
+ ** focus events
+ *
+ * You'll need at least one engine built for it (excluding the buffer
+ * one) and the png image loader also built. See stdout/stderr for
+ * output.
+ *
+ * @verbatim
+ * gcc -o evas_multiseat_events evas-multiseat-events.c `pkg-config --libs 
--cflags evas ecore ecore-evas`
+ * @endverbatim
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+
+#define WIDTH  (400)
+#define HEIGHT (200)
+
+static void
+_canvas_focus_in_cb(void *data EINA_UNUSED, const Efl_Event *event)
+{
+   Efl_Input_Device *seat;
+   Efl_Input_Focus *ev;
+   Evas_Object *focused;
+
+   ev = event->info;
+   seat = efl_input_device_get(ev);
+   focused = efl_input_focus_object_get(ev);
+
+   fprintf(stdout, "Object %s was focused by seat %s\n",
+   evas_object_name_get(focused),
+   efl_input_device_name_get(seat));
+}
+
+static void
+_hold_cb(void *data EINA_UNUSED, const Efl_Event *event)
+{
+   Efl_Input_Device *seat;
+   Efl_Input_Hold *ev;
+
+   ev = event->info;
+   seat = efl_input_device_seat_get(efl_input_device_get(ev));
+
+   fprintf(stdout, "Hold %s at object %s from seat %s\n",
+   efl_input_hold_get(ev) ? "on" : "off",
+   evas_object_name_get(event->object),
+   efl_input_device_name_get(seat));
+}
+
+static void
+_focus_cb(void *data EINA_UNUSED, const Efl_Event *event)
+{
+   Efl_Input_Device *seat;
+   Efl_Input_Focus *ev;
+
+   ev = event->info;
+   seat = efl_input_device_get(ev);
+
+   fprintf(stdout, "Focus %s at object %s from seat %s\n",
+   event->desc == EFL_EVENT_FOCUS_IN ? "in" : "out",
+   evas_object_name_get(event->object),
+   efl_input_device_name_get(seat));
+}
+
+static void
+_pointer_in_out_cb(void *data EINA_UNUSED, const Efl_Event *event)
+{
+   Efl_Input_Pointer *ev;
+   Efl_Input_Device *seat;
+
+   ev = event->info;
+   seat = efl_input_device_seat_get(efl_input_device_get(ev));
+
+   fprintf(stdout, "Pointer %s at object %s from seat %s\n",
+   event->desc == EFL_EVENT_POINTER_IN ? "in" : "out",
+   evas_object_name_get(event->object),
+   efl_input_device_name_get(seat));
+}
+
+static void
+_pointer_down_cb(void *data EINA_UNUSED, const Efl_Event *event)
+{
+   Efl_Input_Pointer *ev;
+   Efl_Input_Device *seat;
+   Efl_Pointer_Flags pointer_flags;
+   char buf[256];
+
+   ev = event->info;
+   seat = efl_input_device_seat_get(efl_input_device_get(ev));
+   pointer_flags = efl_input_pointer_button_flags_get(ev);
+
+   if (pointer_flags & EFL_POINTER_FLAGS_TRIPLE_CLICK)
+ snprintf(buf, sizeof(buf), "Triple click with button %i",
+  efl_input_pointer_button_get(ev));
+   else if (pointer_flags & EFL_POINTER_FLAGS_DOUBLE_CLICK)
+ snprintf(buf, sizeof(

[EGIT] [core/efl] master 02/03: examples/evas: sort gitignore

2016-11-30 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 639e0eeaf5bd7eaff8b78fe3ed3930de43ede3eb
Author: Bruno Dilly 
Date:   Tue Nov 29 19:21:49 2016 -0200

examples/evas: sort gitignore
---
 src/examples/evas/.gitignore | 88 ++--
 1 file changed, 44 insertions(+), 44 deletions(-)

diff --git a/src/examples/evas/.gitignore b/src/examples/evas/.gitignore
index e0621bb..31a9d20 100644
--- a/src/examples/evas/.gitignore
+++ b/src/examples/evas/.gitignore
@@ -1,50 +1,24 @@
-/evas_box
-/evas_buffer_simple
-/evas_events
-/evas_hints
-/evas_images
-/evas_images2
-/evas_images3
-/evas_images4
-/evas_images5
-/evas_init_shutdown
-/evas_object_manipulation
-/evas_object_manipulation-eo
-/evas_smart_interface
-/evas_smart_object
-/evas_stacking
-/evas_text
-/evas_aspect_hints
-/evas_map_utils
-/evas_map_utils_eo
-/evas_table
-/evas_multi_touch
+/evas_3d_aabb
+/evas_3d_blending
+/evas_3d_colorpick
 /evas_3d_cube
 /evas_3d_cube2
-/evas_3d_md2
-/evas_3d_pick
-/evas_3d_colorpick
-/evas_3d_proxy
-/evas_cxx_rectangle
-/evas_3d_aabb
-/evas_3d_frustum
-/evas_3d_obj
-/evas_3d_ply
 /evas_3d_cube_rotate
-/evas_3d_shooter
-/evas_gl
-/evas_transparent
 /evas_3d_eet
-/saved_Sonic_EET.eet
-/evas_3d_blending
-/evas_map_aa
-/evas_map_aa_eo
+/evas_3d_frustum
+/evas_3d_md2
 /evas_3d_mmap
-/evas_3d_shadows
-/evas_3d_parallax_occlusion
-/evas_vg_simple
-/evas_vg_batman
 /evas_3d_moon_space
+/evas_3d_obj
+/evas_3d_parallax_occlusion
+/evas_3d_pick
+/evas_3d_ply
+/evas_3d_proxy
+/evas_3d_shadows
+/evas_3d_shooter
+/evas_aspect_hints
+/evas_box
+/evas_buffer_simple
 /evas_canvas3d_aabb
 /evas_canvas3d_blending
 /evas_canvas3d_colorpick
@@ -52,7 +26,9 @@
 /evas_canvas3d_cube2
 /evas_canvas3d_cube_rotate
 /evas_canvas3d_eet
+/evas_canvas3d_fog
 /evas_canvas3d_frustum
+/evas_canvas3d_hull
 /evas_canvas3d_md2
 /evas_canvas3d_mmap
 /evas_canvas3d_obj
@@ -62,7 +38,31 @@
 /evas_canvas3d_proxy
 /evas_canvas3d_shadows
 /evas_canvas3d_shooter
-/evas_textblock_obstacles
-/evas_canvas3d_hull
 /evas_canvas3d_static_lod
-/evas_canvas3d_fog
+/evas_cxx_rectangle
+/evas_events
+/evas_gl
+/evas_hints
+/evas_images
+/evas_images2
+/evas_images3
+/evas_images4
+/evas_images5
+/evas_init_shutdown
+/evas_map_aa
+/evas_map_aa_eo
+/evas_map_utils
+/evas_map_utils_eo
+/evas_multi_touch
+/evas_object_manipulation
+/evas_object_manipulation-eo
+/evas_smart_interface
+/evas_smart_object
+/evas_stacking
+/evas_table
+/evas_text
+/evas_textblock_obstacles
+/evas_transparent
+/evas_vg_batman
+/evas_vg_simple
+/saved_Sonic_EET.eet

-- 




[EGIT] [core/efl] master 01/01: elementary: fix make examples

2016-11-28 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit e190173338648bcbeb788118230595efe31faa32
Author: Bruno Dilly 
Date:   Mon Nov 28 17:16:22 2016 -0200

elementary: fix make examples

After commit
54abdad6e0c20 elementary-cxx: Fix filemvc wrong usage of Efl_Future
it's required to add libethumb_client.la to ELEMENTARY_LDFLAGS
---
 src/examples/elementary/Makefile.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/examples/elementary/Makefile.am 
b/src/examples/elementary/Makefile.am
index 0aeedc0..6f7cd33 100644
--- a/src/examples/elementary/Makefile.am
+++ b/src/examples/elementary/Makefile.am
@@ -60,7 +60,8 @@ $(top_builddir)/src/lib/ecore_imf/libecore_imf.la \
 $(top_builddir)/src/lib/ecore_imf_evas/libecore_imf_evas.la \
 $(top_builddir)/src/lib/embryo/libembryo.la \
 $(top_builddir)/src/lib/edje/libedje.la \
-$(top_builddir)/src/lib/elementary/libelementary.la
+$(top_builddir)/src/lib/elementary/libelementary.la \
+$(top_builddir)/src/lib/ethumb_client/libethumb_client.la
 
 SRCS = \
 actionslider_example_01.c \

-- 




[EGIT] [core/efl] master 07/07: Merge branch 'devs/iscaro/multi-seat-events'

2016-11-28 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit fc5cc218095dfc3cc772c7ab664358a66ef64379
Merge: 8d97b8b 75e24fc
Author: Bruno Dilly 
Date:   Mon Nov 28 14:02:19 2016 -0200

Merge branch 'devs/iscaro/multi-seat-events'

This series adds support to multiseat on
Evas focus state getter, add seat information
on canvas focus in/out events, per-seat focus
and mouse input / output.

Patches by Guilherme Iscaro 
Differential Revision: https://phab.enlightenment.org/D4406

@feature

 src/lib/ecore_evas/Ecore_Evas.h|  96 ++-
 src/lib/ecore_evas/Ecore_Evas_Types.h  |   2 +
 src/lib/ecore_evas/ecore_evas.c| 189 +++--
 src/lib/ecore_evas/ecore_evas_buffer.c |  24 ++-
 src/lib/ecore_evas/ecore_evas_ews.c|  22 ++-
 src/lib/ecore_evas/ecore_evas_private.h|  22 ++-
 src/lib/ecore_wl2/Ecore_Wl2.h  |   2 +
 src/lib/ecore_wl2/ecore_wl2_input.c|  25 ++-
 src/lib/evas/canvas/evas_canvas.eo |  47 +++--
 src/lib/evas/canvas/evas_events.c  |   9 +-
 src/lib/evas/canvas/evas_main.c|  40 -
 src/lib/evas/include/evas_private.h|   2 +-
 .../ecore_evas/engines/cocoa/ecore_evas_cocoa.c|  15 +-
 .../ecore_evas/engines/drm/ecore_evas_drm.c|   3 +
 .../ecore_evas/engines/extn/ecore_evas_extn.c  |  29 ++--
 src/modules/ecore_evas/engines/fb/ecore_evas_fb.c  |  19 +--
 .../engines/psl1ght/ecore_evas_psl1ght.c   |  23 ++-
 .../ecore_evas/engines/sdl/ecore_evas_sdl.c|  22 +--
 .../engines/wayland/ecore_evas_wayland_common.c|  35 ++--
 .../ecore_evas/engines/win32/ecore_evas_win32.c|  23 +--
 src/modules/ecore_evas/engines/x/ecore_evas_x.c|  37 ++--
 .../ecore_evas/vnc_server/ecore_evas_vnc_server.c  |  30 +++-
 22 files changed, 542 insertions(+), 174 deletions(-)

-- 




[EGIT] [core/efl] master 06/06: Merge branch 'devs/iscaro/focus-event'

2016-11-24 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 6d530356b0be74b317c38b9109df8fbaa4fd4c91
Merge: ec75c62 6572ad9
Author: Bruno Dilly 
Date:   Thu Nov 24 19:18:52 2016 -0200

Merge branch 'devs/iscaro/focus-event'

This series changes evas focus events, always providing
Efl.Input.Focus, making their usage way more straightforward.

Patches by Guilherme Iscaro 
Differential Revision: https://phab.enlightenment.org/D4412

 src/Makefile_Evas.am |   2 +
 src/lib/edje/edje_callbacks.c|   4 +-
 src/lib/efl/interfaces/efl_canvas.eo |   8 +-
 src/lib/efl/interfaces/efl_common_internal.h |   9 ++
 src/lib/evas/Evas_Eo.h   |   1 +
 src/lib/evas/canvas/efl_canvas_object.eo |   6 -
 src/lib/evas/canvas/efl_input_focus.c| 161 +++
 src/lib/evas/canvas/efl_input_focus.eo   |  25 +
 src/lib/evas/canvas/efl_input_interface.eo   |   2 +
 src/lib/evas/canvas/evas_callbacks.c |  31 +-
 src/lib/evas/canvas/evas_events.c|  25 -
 src/lib/evas/canvas/evas_focus.c |  68 ++-
 src/lib/evas/canvas/evas_main.c  |  30 +++--
 src/lib/evas/canvas/evas_object_main.c   |  10 +-
 src/lib/evas/include/evas_private.h  |   3 +
 15 files changed, 324 insertions(+), 61 deletions(-)

-- 




[EGIT] [core/efl] master 01/01: ecore_wl2: avoid adding repeated devices

2016-11-24 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 1e62cd562ee2f35e867e59f640e5ee5f2a7e0f29
Author: Bruno Dilly 
Date:   Thu Nov 24 18:26:50 2016 -0200

ecore_wl2: avoid adding repeated devices

Summary:
After changes done on commit 9f8e2e0d9c9b4150
it was possible to have multiple devices with the same
id added throught the function
_ecore_evas_wl_common_cb_global_added().

To avoid such issue, let's check if the device was already
created first.

Reviewers: iscaro

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4428
---
 .../engines/wayland/ecore_evas_wayland_common.c| 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 2053c21..232d96b 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -555,13 +555,29 @@ _ecore_evas_wl_common_cb_global_added(void *d 
EINA_UNUSED, int t EINA_UNUSED, vo
 {
Ecore_Wl2_Event_Global *ev = event;
Ecore_Evas *ee;
-   Eina_List *l;
+   Eina_List *l, *ll;
+   EE_Wl_Device *device;
 
if ((!ev->interface) || (strcmp(ev->interface, "wl_seat")))
return ECORE_CALLBACK_PASS_ON;
 
EINA_LIST_FOREACH(ee_list, l, ee)
  {
+Eina_Bool already_present = EINA_FALSE;
+Ecore_Evas_Engine_Wl_Data *wdata = ee->engine.data;
+
+EINA_LIST_FOREACH(wdata->devices_list, ll, device)
+  {
+ if (device->id == ev->id)
+   {
+  already_present = EINA_TRUE;
+  break;
+   }
+  }
+
+if (already_present)
+  continue;
+
 if (!_ecore_evas_wl_common_seat_add(ee, ev->id))
   break;
  }

-- 




[EGIT] [core/efl] master 01/01: ecore_wl2: ref / unref evas devices on ecore events

2016-11-16 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 6f66c6e67696faa60e006d7f8ab41d804e799970
Author: Bruno Dilly 
Date:   Wed Nov 16 17:00:55 2016 -0200

ecore_wl2: ref / unref evas devices on ecore events

Summary:
It should avoid issues when device is removed after the ecore
event addition but before listeners are called (so pointer
would be invalid).

Reviewers: iscaro

Reviewed By: iscaro

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4407
---
 src/lib/ecore_wl2/ecore_wl2_input.c | 34 ++
 1 file changed, 22 insertions(+), 12 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index a17c665..c7829f8 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -86,13 +86,21 @@ _ecore_wl2_mouse_dev_get(Ecore_Wl2_Input *input, int 
window_id)
Ecore_Wl2_Input_Devices *devices;
 
devices = _ecore_wl2_devices_get(input, window_id);
-   if (devices)
- return devices->pointer_dev;
+   if (devices && devices->pointer_dev)
+ return efl_ref(devices->pointer_dev);
 
return NULL;
 }
 
 static void
+_input_event_cb_free(void *data, void *event)
+{
+   if (data)
+ efl_unref(data);
+   free(event);
+}
+
+static void
 _ecore_wl2_input_mouse_in_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window 
*window)
 {
Ecore_Event_Mouse_IO *ev;
@@ -108,7 +116,7 @@ _ecore_wl2_input_mouse_in_send(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window)
ev->modifiers = input->keyboard.modifiers;
ev->dev = _ecore_wl2_mouse_dev_get(input, window->id);
 
-   ecore_event_add(ECORE_EVENT_MOUSE_IN, ev, NULL, NULL);
+   ecore_event_add(ECORE_EVENT_MOUSE_IN, ev, _input_event_cb_free, ev->dev);
 }
 
 static void
@@ -127,7 +135,7 @@ _ecore_wl2_input_mouse_out_send(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window
ev->modifiers = input->keyboard.modifiers;
ev->dev = _ecore_wl2_mouse_dev_get(input, window->id);
 
-   ecore_event_add(ECORE_EVENT_MOUSE_OUT, ev, NULL, NULL);
+   ecore_event_add(ECORE_EVENT_MOUSE_OUT, ev, _input_event_cb_free, ev->dev);
 }
 
 static void
@@ -166,7 +174,7 @@ _ecore_wl2_input_mouse_move_send(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *windo
 info->sy = input->pointer.sy;
  }
 
-   ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL);
+   ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, _input_event_cb_free, ev->dev);
 }
 
 static void
@@ -205,7 +213,7 @@ _ecore_wl2_input_mouse_wheel_send(Ecore_Wl2_Input *input, 
unsigned int axis, int
  }
ev->dev = _ecore_wl2_mouse_dev_get(input, ev->window);
 
-   ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL);
+   ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, _input_event_cb_free, ev->dev);
 }
 
 static void
@@ -296,7 +304,8 @@ _ecore_wl2_input_mouse_down_send(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *windo
 ev->dev = _ecore_wl2_mouse_dev_get(input, window->id);
  }
 
-   ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);
+   ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev,
+   _input_event_cb_free, ev->dev);
 
if ((info) && (!info->triple_click))
  {
@@ -366,7 +375,8 @@ _ecore_wl2_input_mouse_up_send(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window,
ev->event_window = window->id;
ev->dev = _ecore_wl2_mouse_dev_get(input, window->id);
 
-   ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
+   ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev,
+   _input_event_cb_free, ev->dev);
 }
 
 static void
@@ -479,8 +489,8 @@ _ecore_wl2_keyboard_dev_get(Ecore_Wl2_Input *input, int 
window_id)
Ecore_Wl2_Input_Devices *devices;
 
devices = _ecore_wl2_devices_get(input, window_id);
-   if (devices)
- return devices->keyboard_dev;
+   if (devices && devices->keyboard_dev)
+ return efl_ref(devices->keyboard_dev);
 
return NULL;
 }
@@ -524,9 +534,9 @@ _ecore_wl2_input_key_send(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window, xkb_
/* DBG("Emitting Key event (%s,%s,%s,%s)\n", ev->keyname, ev->key, 
ev->compose, ev->string); */
 
if (state)
- ecore_event_add(ECORE_EVENT_KEY_DOWN, ev, NULL, NULL);
+ ecore_event_add(ECORE_EVENT_KEY_DOWN, ev, _input_event_cb_free, ev->dev);
else
- ecore_event_add(ECORE_EVENT_KEY_UP, ev, NULL, NULL);
+ ecore_event_add(ECORE_EVENT_KEY_UP, ev, _input_event_cb_free, ev->dev);
 }
 
 void

-- 




[EGIT] [core/efl] master 01/01: efl: add getter for input device's seat

2016-11-09 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit ed48b8d93ee28d7e577c1bf200591db75afca317
Author: Bruno Dilly 
Date:   Tue Nov 8 19:12:28 2016 -0200

efl: add getter for input device's seat

Since this code will be required in many use cases
of the multiseat feature, including examples.

Reviewers: iscaro, barbieri, cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4385
---
 src/examples/ecore/ecore_evas_vnc_example.c| 22 --
 .../ecore/ecore_evas_wayland_multiseat_example.c   | 21 -
 src/lib/efl/interfaces/efl_input_device.c  | 17 +
 src/lib/efl/interfaces/efl_input_device.eo | 16 
 4 files changed, 41 insertions(+), 35 deletions(-)

diff --git a/src/examples/ecore/ecore_evas_vnc_example.c 
b/src/examples/ecore/ecore_evas_vnc_example.c
index 228c173..abed803 100644
--- a/src/examples/ecore/ecore_evas_vnc_example.c
+++ b/src/examples/ecore/ecore_evas_vnc_example.c
@@ -58,20 +58,6 @@ _disc_cb(void *data EINA_UNUSED, Ecore_Evas *ee EINA_UNUSED, 
const char *client_
printf("Client %s disconnected\n", client_host);
 }
 
-static Efl_Input_Device *
-_get_seat(Efl_Input_Device *dev)
-{
-   if (!dev)
- return NULL;
-
-   while ((dev = efl_input_device_parent_get(dev)))
- {
-if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_CLASS_SEAT)
-  return dev;
- }
-   return NULL;
-}
-
 static Eina_Bool
 _keyboard_event(void *data EINA_UNUSED, int type, void *event)
 {
@@ -79,7 +65,7 @@ _keyboard_event(void *data EINA_UNUSED, int type, void *event)
Efl_Input_Device *seat = NULL;
 
if (e->dev)
- seat = _get_seat(e->dev);
+ seat = efl_input_device_seat_get(e->dev);
 
printf("The keyboard on seat '%s' %s the key '%s'\n", seat ?
   efl_input_device_name_get(seat) : "default",
@@ -96,7 +82,7 @@ _mouse_move(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event)
Efl_Input_Device *seat = NULL;
 
if (e->dev)
- seat = _get_seat(e->dev);
+ seat = efl_input_device_seat_get(e->dev);
 
printf("The mouse on seat '%s' is at X: %d Y:%d\n",
   seat ? efl_input_device_name_get(seat) : "default", e->x, e->y);
@@ -110,7 +96,7 @@ _mouse_button(void *data EINA_UNUSED, int type, void *event)
Efl_Input_Device *seat = NULL;
 
if (e->dev)
- seat = _get_seat(e->dev);
+ seat = efl_input_device_seat_get(e->dev);
 
printf("The mouse on seat '%s' %s the following button '%d'\n",
   seat ? efl_input_device_name_get(seat) : "default",
@@ -126,7 +112,7 @@ _mouse_wheel(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event)
Efl_Input_Device *seat = NULL;
 
if (e->dev)
- seat = _get_seat(e->dev);
+ seat = efl_input_device_seat_get(e->dev);
 
printf("The mouse on seat '%s' moved the wheel '%s'\n",
   seat ? efl_input_device_name_get(seat) : "default",
diff --git a/src/examples/ecore/ecore_evas_wayland_multiseat_example.c 
b/src/examples/ecore/ecore_evas_wayland_multiseat_example.c
index 081a0fc..db73889 100644
--- a/src/examples/ecore/ecore_evas_wayland_multiseat_example.c
+++ b/src/examples/ecore/ecore_evas_wayland_multiseat_example.c
@@ -9,19 +9,6 @@
 #include 
 #include 
 
-static Efl_Input_Device *
-_get_seat(Efl_Input_Device *dev)
-{
-   if (!dev) return NULL;
-
-   while ((dev = efl_input_device_parent_get(dev)))
- {
-if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_CLASS_SEAT)
-  return dev;
- }
-   return NULL;
-}
-
 static Eina_Bool
 _keyboard_event(void *data EINA_UNUSED, int type, void *event)
 {
@@ -29,7 +16,7 @@ _keyboard_event(void *data EINA_UNUSED, int type, void *event)
Efl_Input_Device *seat = NULL;
 
if (e->dev)
- seat = _get_seat(e->dev);
+ seat = efl_input_device_seat_get(e->dev);
 
printf("The keyboard on seat '%s' %s the key '%s'\n", seat ?
   efl_input_device_name_get(seat) : "unknown",
@@ -46,7 +33,7 @@ _mouse_move(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event)
Efl_Input_Device *seat = NULL;
 
if (e->dev)
- seat = _get_seat(e->dev);
+ seat = efl_input_device_seat_get(e->dev);
 
printf("The mouse on seat '%s' is at X: %d Y:%d\n",
   seat ? efl_input_device_name_get(seat) : "unknown", e->x, e->y);
@@ -60,7 +47,7 @@ _mouse_button(void *data EINA_UNUSED, int type, void *event)
Efl_Input_Device *seat = NULL;
 
if (e->dev)
- seat = _get_seat(e->dev);
+ seat = efl_input_device_seat_get(e->dev);
 
pri

[EGIT] [core/efl] master 09/09: Merge branch 'devs/iscaro/evas-focus-per-seat'

2016-11-08 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 2a96097a658e0817c95f72b56d37879720886fa5
Merge: 11ef74c 0e53b9a
Author: Bruno Dilly 
Date:   Tue Nov 8 17:55:07 2016 -0200

Merge branch 'devs/iscaro/evas-focus-per-seat'

This series adds support to multiple focused objects
on Evas, so each seat can focus a different object.

Patches by Guilherme Iscaro 
Differential Revision: https://phab.enlightenment.org/D4374

@feature

 src/lib/ecore_evas/ecore_evas.c  |  13 +-
 src/lib/evas/canvas/efl_canvas_object.eo |  53 +++
 src/lib/evas/canvas/efl_input_hold.c |   5 +-
 src/lib/evas/canvas/efl_input_key.c  |   4 +-
 src/lib/evas/canvas/efl_input_pointer.c  |   5 +-
 src/lib/evas/canvas/evas_canvas.eo   |  35 -
 src/lib/evas/canvas/evas_device.c|  65 
 src/lib/evas/canvas/evas_events.c| 107 +-
 src/lib/evas/canvas/evas_focus.c | 246 +++
 src/lib/evas/canvas/evas_main.c  |  37 -
 src/lib/evas/canvas/evas_object_main.c   |  21 ++-
 src/lib/evas/include/evas_private.h  |   9 +-
 12 files changed, 525 insertions(+), 75 deletions(-)

-- 




[EGIT] [core/efl] master 01/01: elementary/test_entry: resize window on test without it

2016-11-04 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 613167333c8cc121b6eaa6e77cdec7bcd382912c
Author: Bruno Dilly 
Date:   Fri Nov 4 19:51:28 2016 -0200

elementary/test_entry: resize window on test without it

test_efl_ui_text was creating a very small window,
with cropped components, etc.
So let's create it with a mininum size to be able to
properly see this test.
---
 src/bin/elementary/test_entry.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/elementary/test_entry.c b/src/bin/elementary/test_entry.c
index b8a7e62..e833cf8 100644
--- a/src/bin/elementary/test_entry.c
+++ b/src/bin/elementary/test_entry.c
@@ -3137,5 +3137,6 @@ test_efl_ui_text(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *eve
 
efl_event_callback_add(en, EFL_UI_TEXT_EVENT_ANCHOR_HOVER_OPENED, 
my_efl_ui_text_anchor_hover_opened, en);
 
+   evas_object_resize(win, 480, 320);
evas_object_show(win);
 }

-- 




[EGIT] [core/efl] master 04/04: Merge branch 'devs/iscaro/vnc-fb'

2016-11-04 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit f869cd580e47bd4783dfedbefc91ddf452ed135d
Merge: 9699503 fc2a305
Author: Bruno Dilly 
Date:   Fri Nov 4 18:52:18 2016 -0200

Merge branch 'devs/iscaro/vnc-fb'

This series adds support to Framebuffer on Ecore Evas VNC.

So both X11 and FB will be supported by Ecore Evas VNC and
may be used to map remote clients as multiple seats.

Patches by Guilherme Iscaro 
Differential Revision: https://phab.enlightenment.org/D4373

 configure.ac   |  13 +-
 src/Makefile_Ecore_Evas.am |  18 +-
 src/examples/ecore/ecore_evas_vnc_example.c|  57 +++-
 .../ecore_evas/vnc_server/ecore_evas_vnc_server.c  | 120 ++-
 .../vnc_server/ecore_evas_vnc_server_fb_keymap.c   | 363 +
 .../vnc_server/ecore_evas_vnc_server_fb_keymap.h   |  12 +
 src/modules/evas/engines/fb/Evas_Engine_FB.h   |   4 +
 src/modules/evas/engines/fb/evas_engine.c  |  76 -
 src/modules/evas/engines/fb/evas_engine.h  |   7 +
 src/modules/evas/engines/fb/evas_outbuf.c  |   1 +
 10 files changed, 635 insertions(+), 36 deletions(-)

-- 




[EGIT] [core/efl] master 03/03: examples/edje: add example of entry - editable text

2016-11-04 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 96995032ea8783bc7c2878eb3df1618a8bad5205
Author: Bruno Dilly 
Date:   Fri Nov 4 14:17:23 2016 -0200

examples/edje: add example of entry - editable text

Not trivial to be done imo, so it deserves an example.
---
 src/examples/edje/.gitignore   |   1 +
 src/examples/edje/Makefile.am  |   3 +
 src/examples/edje/edje-entry.c | 117 
 src/examples/edje/entry.edc| 149 +
 4 files changed, 270 insertions(+)

diff --git a/src/examples/edje/.gitignore b/src/examples/edje/.gitignore
index ab3c677..5b5f5f0 100644
--- a/src/examples/edje/.gitignore
+++ b/src/examples/edje/.gitignore
@@ -10,6 +10,7 @@
 /edje-color-class
 /edje-drag
 /edje-edit-part-box
+/edje-entry
 /edje-multisense
 /edje-perspective
 /edje-signals-messages
diff --git a/src/examples/edje/Makefile.am b/src/examples/edje/Makefile.am
index 59feb80..7dff1e3 100644
--- a/src/examples/edje/Makefile.am
+++ b/src/examples/edje/Makefile.am
@@ -35,6 +35,7 @@ embryo_set_state_anim.edc \
 embryo_set_text.edc \
 embryo_timer.edc \
 embryo_tween_anim.edc \
+entry.edc \
 external_elm_anchorblock.edc \
 external_elm_button.edc \
 external_elm_check.edc \
@@ -138,6 +139,7 @@ edje-codegen-example.c \
 edje-color-class.c \
 edje-drag.c \
 edje-edit-part-box.c \
+edje-entry.c \
 edje-multisense.c \
 edje-perspective.c \
 edje-signals-messages.c \
@@ -210,6 +212,7 @@ edje-codegen-example \
 edje-color-class \
 edje-drag\
 edje-edit-part-box \
+edje-entry \
 edje-perspective \
 edje-signals-messages \
 edje-swallow \
diff --git a/src/examples/edje/edje-entry.c b/src/examples/edje/edje-entry.c
new file mode 100644
index 000..274e331
--- /dev/null
+++ b/src/examples/edje/edje-entry.c
@@ -0,0 +1,117 @@
+/**
+ * Edje example for a entry (editable text)
+ *
+ * @verbatim
+ * edje_cc entry.edc && gcc -o edje-entry edje-entry.c `pkg-config --libs 
--cflags evas ecore ecore-evas edje`
+ * @endverbatim
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#else
+# define EINA_UNUSED
+#endif
+
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
+#include 
+#include 
+#include 
+
+#define WIDTH  (300)
+#define HEIGHT (300)
+
+#define KEY_BG_OBJ "bg_obj"
+#define KEY_EDJE_OBJ "edje_obj"
+
+#define GROUPNAME_MAIN "example/main"
+#define PARTNAME_TEXT "example/text"
+
+static void
+_on_delete(Ecore_Evas *ee EINA_UNUSED)
+{
+   ecore_main_loop_quit();
+}
+
+/* here just to keep our example's window size and background image's
+ * size in synchrony */
+static void
+_on_canvas_resize(Ecore_Evas *ee)
+{
+   Evas_Object *bg, *edj;
+   int w, h;
+
+   ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+   bg = ecore_evas_data_get(ee, KEY_BG_OBJ);
+   evas_object_resize(bg, w, h);
+   edj = ecore_evas_data_get(ee, KEY_EDJE_OBJ);
+   evas_object_resize(edj, w, h);
+}
+
+static void
+_setup_evas_object(Ecore_Evas *ee, Evas_Object *obj, const char *key)
+{
+   evas_object_move(obj, 0, 0);
+   evas_object_resize(obj, WIDTH, HEIGHT);
+   evas_object_show(obj);
+   ecore_evas_data_set(ee, key, obj);
+}
+
+int
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
+{
+   const char *edje_file = PACKAGE_DATA_DIR"/entry.edj";
+   Evas_Object *bg, *edje_obj;
+   Ecore_Evas *ee;
+   Evas *evas;
+
+   if (!ecore_evas_init())
+ return EXIT_FAILURE;
+
+   if (!edje_init())
+ goto shutdown_ecore_evas;
+
+   ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
+   if (!ee) goto shutdown_edje;
+
+   ecore_evas_callback_delete_request_set(ee, _on_delete);
+   ecore_evas_callback_resize_set(ee, _on_canvas_resize);
+   ecore_evas_title_set(ee, "Edje Entry");
+
+   evas = ecore_evas_get(ee);
+
+   bg = evas_object_rectangle_add(evas);
+   evas_object_color_set(bg, 210, 210, 210, 255);
+   _setup_evas_object(ee, bg, KEY_BG_OBJ);
+
+   edje_obj = edje_object_add(evas);
+
+   edje_object_file_set(edje_obj, edje_file, GROUPNAME_MAIN);
+   _setup_evas_object(ee, edje_obj, KEY_EDJE_OBJ);
+
+   /* important to focus it or it won't receive key down strokes */
+   evas_object_focus_set(edje_obj, EINA_TRUE);
+
+   edje_object_part_text_set(edje_obj, PARTNAME_TEXT, "Type here : ");
+   edje_object_part_text_cursor_end_set(edje_obj, PARTNAME_TEXT,
+EDJE_CURSOR_MAIN);
+
+   ecore_evas_show(ee);
+
+   ecore_main_loop_begin();
+
+   ecore_evas_free(ee);
+   ecore_evas_shutdown();
+   edje_shutdown();
+
+   return EXIT_SUCCESS;
+
+ shutdown_edje:
+   edje_shutdown();
+ shutdown_ecore_evas:
+   ecore_evas_shutdown();
+
+   return EXIT_FAILURE;
+}
diff --git a/src/examples/edje/entry.edc b/src/examples/edje/entry.edc
new file mode 100644
index 000..f47e73e
--- /dev/null
+++ b/src/examples/edje/entry.edc
@@ -0,0 +1,149 @

[EGIT] [core/efl] master 02/03: examples/edje: Fix build instructions and titles

2016-11-04 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 24f4d1400491f51301a9055fea041108b3a3fb83
Author: Bruno Dilly 
Date:   Fri Nov 4 13:54:25 2016 -0200

examples/edje: Fix build instructions and titles

Fix a few c&p errors
---
 src/examples/edje/edje-codegen-example.c   | 2 +-
 src/examples/edje/edje-drag.c  | 4 ++--
 src/examples/edje/edje-perspective.c   | 2 +-
 src/examples/edje/edje-signals-messages.c  | 2 +-
 src/examples/edje/edje-text.c  | 2 +-
 src/examples/edje/edje-textblock-hyphenation.c | 2 +-
 src/examples/edje/sigtest.c| 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/examples/edje/edje-codegen-example.c 
b/src/examples/edje/edje-codegen-example.c
index 910fd54..9fd4d5d 100644
--- a/src/examples/edje/edje-codegen-example.c
+++ b/src/examples/edje/edje-codegen-example.c
@@ -121,7 +121,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
if (!ee) goto shutdown_edje;
 
ecore_evas_callback_delete_request_set(ee, _on_delete);
-   ecore_evas_title_set(ee, "Edje codegen Example");
+   ecore_evas_title_set(ee, "Edje Codegen Example");
 
evas = ecore_evas_get(ee);
 
diff --git a/src/examples/edje/edje-drag.c b/src/examples/edje/edje-drag.c
index fcf1ab1..9c1094e 100644
--- a/src/examples/edje/edje-drag.c
+++ b/src/examples/edje/edje-drag.c
@@ -5,7 +5,7 @@
  * buffer one). See stdout/stderr for output.
  *
  * @verbatim
- * edje_cc drag.edc && gcc -o drag-box drag-box.c `pkg-config --libs --cflags 
evas ecore ecore-evas edje`
+ * edje_cc drag.edc && gcc -o edje-drag edje-drag.c `pkg-config --libs 
--cflags evas ecore ecore-evas edje`
  * @endverbatim
  */
 
@@ -138,7 +138,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 
ecore_evas_callback_destroy_set(ee, _on_destroy);
ecore_evas_callback_resize_set(ee, _on_canvas_resize);
-   ecore_evas_title_set(ee, "Edje Box Example");
+   ecore_evas_title_set(ee, "Edje Drag Example");
 
evas = ecore_evas_get(ee);
 
diff --git a/src/examples/edje/edje-perspective.c 
b/src/examples/edje/edje-perspective.c
index 7bdcbf4..cf0e654 100644
--- a/src/examples/edje/edje-perspective.c
+++ b/src/examples/edje/edje-perspective.c
@@ -190,7 +190,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 
ecore_evas_callback_destroy_set(ee, _on_destroy);
ecore_evas_callback_resize_set(ee, _on_canvas_resize);
-   ecore_evas_title_set(ee, "Edje Box Example");
+   ecore_evas_title_set(ee, "Edje Perspective Example");
 
ecore_evas_data_set(ee, "app", &app);
 
diff --git a/src/examples/edje/edje-signals-messages.c 
b/src/examples/edje/edje-signals-messages.c
index 22155fd..060e47e 100644
--- a/src/examples/edje/edje-signals-messages.c
+++ b/src/examples/edje/edje-signals-messages.c
@@ -164,7 +164,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
if (!ee) goto shutdown_edje;
 
ecore_evas_callback_delete_request_set(ee, _on_delete);
-   ecore_evas_title_set(ee, "Edje Basics Example");
+   ecore_evas_title_set(ee, "Edje Signals and Messages Example");
 
evas = ecore_evas_get(ee);
 
diff --git a/src/examples/edje/edje-text.c b/src/examples/edje/edje-text.c
index 21efb05..7109bc3 100644
--- a/src/examples/edje/edje-text.c
+++ b/src/examples/edje/edje-text.c
@@ -91,7 +91,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
if (!ee) goto shutdown_edje;
 
ecore_evas_callback_delete_request_set(ee, _on_delete);
-   ecore_evas_title_set(ee, "Edje text Example");
+   ecore_evas_title_set(ee, "Edje Text Example");
 
evas = ecore_evas_get(ee);
 
diff --git a/src/examples/edje/edje-textblock-hyphenation.c 
b/src/examples/edje/edje-textblock-hyphenation.c
index 3bc53ca..b16ee81 100644
--- a/src/examples/edje/edje-textblock-hyphenation.c
+++ b/src/examples/edje/edje-textblock-hyphenation.c
@@ -5,7 +5,7 @@
  * buffer one). See stdout/stderr for output.
  *
  * @verbatim
- * edje_cc swallow.edc && gcc -o edje-textblock-hyphenation 
edje-textblock-hyphenation.c `pkg-config --libs --cflags evas ecore ecore-evas 
edje`
+ * edje_cc textblock-hyphen.edc && gcc -o edje-textblock-hyphenation 
edje-textblock-hyphenation.c `pkg-config --libs --cflags evas ecore ecore-evas 
edje`
  * @endverbatim
  */
 
diff --git a/src/examples/edje/sigtest.c b/src/examples/edje/sigtest.c
index a949ca3..b02ae1a 100644
--- a/src/examples/edje/sigtest.c
+++ b/src/examples/edje/sigtest.c
@@ -254,7 +254,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
if (!ee) goto shutdown_edje;
 
ecore_evas_callback_delete_request_set(ee, _on_delete);
-   ecore_evas_title_set(ee, "Signals and wessages tester");
+   ecore_evas_title_set(ee, "Signals and messages tester");
 
evas = ecore_evas_get(ee);
 

-- 




[EGIT] [core/efl] master 01/03: examples/edje: sort makefile lists

2016-11-04 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit f8a0515b71afdc00d5e565f5391f27a796529b0c
Author: Bruno Dilly 
Date:   Thu Nov 3 19:09:19 2016 -0200

examples/edje: sort makefile lists
---
 src/examples/edje/.gitignore  |  6 ++--
 src/examples/edje/Makefile.am | 66 +--
 2 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/examples/edje/.gitignore b/src/examples/edje/.gitignore
index 41ee530..ab3c677 100644
--- a/src/examples/edje/.gitignore
+++ b/src/examples/edje/.gitignore
@@ -10,15 +10,15 @@
 /edje-color-class
 /edje-drag
 /edje-edit-part-box
+/edje-multisense
 /edje-perspective
 /edje-signals-messages
 /edje-swallow
 /edje-swallow2
 /edje-table
 /edje-text
+/edje-textblock-hyphenation
+/edje_example
 /signals2
 /sigtest
-/edje-multisense
-/edje_example
-/edje-textblock-hyphenation
 /svg-test
diff --git a/src/examples/edje/Makefile.am b/src/examples/edje/Makefile.am
index 70bbb17..59feb80 100644
--- a/src/examples/edje/Makefile.am
+++ b/src/examples/edje/Makefile.am
@@ -13,24 +13,28 @@ MO_DIR = -md $(top_builddir)/src/examples/edje/
 
 #put here all EDCs one needs to the examples
 EDCS = \
-edje-group.edc \
-edje-threshold.edc \
-animations2.edc \
 animations.edc \
-basic2.edc \
+animations2.edc \
 basic.edc \
+basic2.edc \
+bezier-transition-example.edc \
 box.edc \
+box_example.edc \
 codegen.edc \
 color-class.edc \
 drag.edc \
-edje_example.edc \
+edje-group.edc \
 edje-nested.edc \
+edje-threshold.edc \
+edje_example.edc \
 embryo_custom_state.edc \
 embryo_pong.edc \
 embryo_run_program.edc \
 embryo_set_state.edc \
+embryo_set_state_anim.edc \
 embryo_set_text.edc \
 embryo_timer.edc \
+embryo_tween_anim.edc \
 external_elm_anchorblock.edc \
 external_elm_button.edc \
 external_elm_check.edc \
@@ -39,19 +43,15 @@ external_emotion_elm.edc \
 lua_script.edc \
 messages_echo.edc \
 perspective.edc \
-signalsBubble.edc \
 signals-messages.edc \
+signalsBubble.edc \
 sigtest.edc \
+svg.edc \
 swallow.edc \
 table.edc \
 text.edc \
-toggle_using_filter.edc \
-box_example.edc \
-embryo_tween_anim.edc \
-embryo_set_state_anim.edc \
-bezier-transition-example.edc \
 textblock-hyphen.edc \
-svg.edc
+toggle_using_filter.edc
 
 DIST_EDCS = $(EDCS)
 
@@ -128,27 +128,27 @@ ta_IN/domain_name.mo \
 Makefile.examples
 
 SRCS = \
-edje-codegen-example.c \
-edje_example.c \
+animations2.c \
+edje-animations.c \
 edje-basic.c \
-edje-swallow.c \
-edje-text.c \
-edje-table.c \
+edje-basic2.c \
 edje-box.c \
 edje-box2.c \
-edje-drag.c \
-edje-signals-messages.c \
+edje-codegen-example.c \
 edje-color-class.c \
+edje-drag.c \
+edje-edit-part-box.c \
+edje-multisense.c \
 edje-perspective.c \
-edje-animations.c \
-sigtest.c \
-animations2.c \
-edje-basic2.c \
-signals2.c \
+edje-signals-messages.c \
+edje-swallow.c \
 edje-swallow2.c \
-edje-multisense.c \
-edje-edit-part-box.c \
+edje-table.c \
+edje-text.c \
 edje-textblock-hyphenation.c \
+edje_example.c \
+signals2.c \
+sigtest.c \
 svg-test.c
 
 EXTRA_DIST = $(DIST_EDCS) $(DATA_FILES)
@@ -200,26 +200,26 @@ codegen_example_generated.c \
 codegen_example_generated.h
 
 EXTRA_PROGRAMS = \
-edje_example \
+animations2 \
 edje-animations \
 edje-basic \
+edje-basic2 \
 edje-box \
 edje-box2 \
 edje-codegen-example \
 edje-color-class \
 edje-drag\
+edje-edit-part-box \
 edje-perspective \
 edje-signals-messages \
 edje-swallow \
+edje-swallow2 \
 edje-table \
 edje-text \
-sigtest \
-animations2 \
-edje-basic2 \
-signals2 \
-edje-swallow2 \
-edje-edit-part-box \
 edje-textblock-hyphenation \
+edje_example \
+signals2 \
+sigtest \
 svg-test
 
 if ENABLE_MULTISENSE

-- 




[EGIT] [editors/vim-configs] master 01/01: syntax/edc: recognize select and cursor modes

2016-11-04 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/editors/vim-configs.git/commit/?id=0d3d9df2a6060d82dfdbd5a85ce13f42f9df13ea

commit 0d3d9df2a6060d82dfdbd5a85ce13f42f9df13ea
Author: Bruno Dilly 
Date:   Fri Nov 4 13:26:30 2016 -0200

syntax/edc: recognize select and cursor modes

Labels and constants
---
 syntax/edc.vim | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/syntax/edc.vim b/syntax/edc.vim
index 646ba05..ec99cc0 100644
--- a/syntax/edc.vim
+++ b/syntax/edc.vim
@@ -51,6 +51,7 @@ syn keyword   edcLabelint double string external 
script_only contained
 syn keywordedcLabelinsert_before insert_after contained
 syn keywordedcLabelscript_recursion contained
 syn keywordedcLabellimit broadcast_signal targets target_group 
groups size_range contained
+syn keywordedcLabelselect_mode cursor_mode repch
 " LazEDC synonyms
 syn keywordedcLabelbefore after ignore pointer alt_font clip  
contained
 
@@ -76,6 +77,7 @@ syn keyword   edcConstant EDITABLE PASSWORD "default"
 syn keywordedcConstant DEFAULT EXPLICIT PLAY_SAMPLE
 syn keywordedcConstant SOLID
 syn keywordedcConstant WIDTH HEIGHT
+syn keywordedcConstant BEFORE UNDER
 
 syn keywordedcTodo contained TODO FIXME XXX
 

-- 




[EGIT] [core/efl] master 01/01: examples/edje: cosmetic fixes in a couple examples

2016-11-03 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit fcf9f55150cff6aef23779782e17f603f6c7db10
Author: Bruno Dilly 
Date:   Thu Nov 3 18:44:36 2016 -0200

examples/edje: cosmetic fixes in a couple examples

Fix usage messages, remove unused defines
---
 src/examples/edje/edje-box2.c |  4 ++--
 src/examples/edje/edje-drag.c | 11 ---
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/examples/edje/edje-box2.c b/src/examples/edje/edje-box2.c
index aa5aaf7..21a7115 100644
--- a/src/examples/edje/edje-box2.c
+++ b/src/examples/edje/edje-box2.c
@@ -30,8 +30,8 @@
 
 static const char commands[] = \
   "commands are:\n"
-  "\tShift - remove box\n"
-  "\tCtrl - insert box\n"
+  "\tShift + any key - remove box\n"
+  "\tCtrl + any key - insert box\n"
   "\tEsc - exit\n"
   "\th - print help\n";
 
diff --git a/src/examples/edje/edje-drag.c b/src/examples/edje/edje-drag.c
index 6098fd9..fcf1ab1 100644
--- a/src/examples/edje/edje-drag.c
+++ b/src/examples/edje/edje-drag.c
@@ -26,14 +26,9 @@
 #define WIDTH  300
 #define HEIGHT 300
 
-#define RECTW 30
-#define RECTH 30
-
-#define NRECTS 20
-
 static const char commands[] = \
   "commands are:\n"
-  "\tDdown - set drag step to 1\n"
+  "\tDown - set drag step to 1\n"
   "\tUp - set drag step to -1\n"
   "\tm - set drag value to 0.5\n"
   "\tPrior - set drag page to -1\n"
@@ -158,7 +153,9 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
 
edje_obj = edje_object_add(evas);
 
-   edje_object_file_set(edje_obj, edje_file, "example/group");
+   if (!edje_object_file_set(edje_obj, edje_file, "example/group"))
+ printf("failed to set file %s.\n", edje_file);
+
evas_object_move(edje_obj, 0, 0);
evas_object_resize(edje_obj, WIDTH, HEIGHT);
evas_object_show(edje_obj);

-- 




[EGIT] [core/efl] master 07/08: examples/ecore: add example / test for wayland multiseat

2016-11-01 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 3bc27935887091b0c80c8c7935eee3b194b77c07
Author: Bruno Dilly 
Date:   Fri Oct 7 15:57:04 2016 -0300

examples/ecore: add example / test for wayland multiseat
---
 src/examples/ecore/.gitignore  |   1 +
 src/examples/ecore/Makefile.am |   6 +
 .../ecore/ecore_evas_wayland_multiseat_example.c   | 242 +
 3 files changed, 249 insertions(+)

diff --git a/src/examples/ecore/.gitignore b/src/examples/ecore/.gitignore
index 18a9ea8..cf090e1 100644
--- a/src/examples/ecore/.gitignore
+++ b/src/examples/ecore/.gitignore
@@ -24,6 +24,7 @@
 /ecore_evas_extn_plug_example
 /ecore_evas_extn_socket_example
 /ecore_evas_object_example
+/ecore_evas_wayland_multiseat_example
 /ecore_evas_window_sizes_example
 /ecore_evas_vnc_example
 /ecore_event_example_01
diff --git a/src/examples/ecore/Makefile.am b/src/examples/ecore/Makefile.am
index fe23058..dde9e48 100644
--- a/src/examples/ecore/Makefile.am
+++ b/src/examples/ecore/Makefile.am
@@ -59,6 +59,7 @@ ecore_evas_extn_plug_example \
 ecore_evas_callbacks \
 ecore_evas_ews_example \
 ecore_evas_object_example \
+ecore_evas_wayland_multiseat_example \
 ecore_evas_window_sizes_example \
 ecore_evas_vnc_example \
 ecore_event_example_01 \
@@ -205,6 +206,10 @@ ecore_evas_ews_example_LDADD = $(ECORE_EVAS_COMMON_LDADD)
 ecore_evas_object_example_SOURCES = ecore_evas_object_example.c
 ecore_evas_object_example_LDADD = $(ECORE_EVAS_COMMON_LDADD)
 
+ecore_evas_wayland_multiseat_example_SOURCES = 
ecore_evas_wayland_multiseat_example.c
+ecore_evas_wayland_multiseat_example_LDADD = $(ECORE_EVAS_COMMON_LDADD) \
+$(top_builddir)/src/lib/ecore_input/libecore_input.la
+
 ecore_evas_window_sizes_example_SOURCES = ecore_evas_window_sizes_example.c
 ecore_evas_window_sizes_example_LDADD = $(ECORE_EVAS_COMMON_LDADD)
 
@@ -353,6 +358,7 @@ ecore_evas_extn_plug_example.c \
 ecore_evas_callbacks.c \
 ecore_evas_ews_example.c \
 ecore_evas_object_example.c \
+ecore_evas_wayland_multiseat_example.c \
 ecore_evas_window_sizes_example.c \
 ecore_evas_vnc_example.c \
 ecore_event_example_01.c \
diff --git a/src/examples/ecore/ecore_evas_wayland_multiseat_example.c 
b/src/examples/ecore/ecore_evas_wayland_multiseat_example.c
new file mode 100644
index 000..081a0fc
--- /dev/null
+++ b/src/examples/ecore/ecore_evas_wayland_multiseat_example.c
@@ -0,0 +1,242 @@
+#define EFL_EO_API_SUPPORT
+#define EFL_BETA_API_SUPPORT
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static Efl_Input_Device *
+_get_seat(Efl_Input_Device *dev)
+{
+   if (!dev) return NULL;
+
+   while ((dev = efl_input_device_parent_get(dev)))
+ {
+if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_CLASS_SEAT)
+  return dev;
+ }
+   return NULL;
+}
+
+static Eina_Bool
+_keyboard_event(void *data EINA_UNUSED, int type, void *event)
+{
+   Ecore_Event_Key *e = event;
+   Efl_Input_Device *seat = NULL;
+
+   if (e->dev)
+ seat = _get_seat(e->dev);
+
+   printf("The keyboard on seat '%s' %s the key '%s'\n", seat ?
+  efl_input_device_name_get(seat) : "unknown",
+  type == ECORE_EVENT_KEY_DOWN ? "pressed" : "released",
+  e->keyname);
+
+   return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_mouse_move(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+   Ecore_Event_Mouse_Move *e = event;
+   Efl_Input_Device *seat = NULL;
+
+   if (e->dev)
+ seat = _get_seat(e->dev);
+
+   printf("The mouse on seat '%s' is at X: %d Y:%d\n",
+  seat ? efl_input_device_name_get(seat) : "unknown", e->x, e->y);
+   return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_mouse_button(void *data EINA_UNUSED, int type, void *event)
+{
+   Ecore_Event_Mouse_Button *e = event;
+   Efl_Input_Device *seat = NULL;
+
+   if (e->dev)
+ seat = _get_seat(e->dev);
+
+   printf("The mouse on seat '%s' %s the following button '%d'\n",
+  seat ? efl_input_device_name_get(seat) : "unknown",
+  type == ECORE_EVENT_MOUSE_BUTTON_DOWN ? "pressed" : "released",
+  e->buttons);
+   return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_mouse_wheel(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+   Ecore_Event_Mouse_Wheel *e = event;
+   Efl_Input_Device *seat = NULL;
+
+   if (e->dev)
+ seat = _get_seat(e->dev);
+
+   printf("The mouse on seat '%s' moved the wheel '%s'\n",
+  seat ? efl_input_device_name_get(seat) : "unknown",
+  e->z < 0 ? "up" : "down");
+   return ECORE_CALLBACK_PASS_ON;
+}
+
+static const char *
+_device_type_to_string(Efl_Input_D

[EGIT] [core/efl] master 02/08: ecore_evas/wayland: remove unnecessary NULL attributions

2016-11-01 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 26c1a564d933052653c5918a8ca94b619a78b87c
Author: Bruno Dilly 
Date:   Mon Oct 3 11:19:22 2016 -0300

ecore_evas/wayland: remove unnecessary NULL attributions

When freeing wdata there is no reason to set each
freed field to NULL.
---
 src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index b41e907..0ec70bf 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -521,16 +521,11 @@ _ecore_evas_wl_common_free(Ecore_Evas *ee)
ee_list = eina_list_remove(ee_list, ee);
 
eina_list_free(wdata->regen_objs);
-
if (wdata->anim_callback) wl_callback_destroy(wdata->anim_callback);
-   wdata->anim_callback = NULL;
-
ecore_event_handler_del(wdata->sync_handler);
-
if (wdata->win) ecore_wl2_window_free(wdata->win);
-   wdata->win = NULL;
-
ecore_wl2_display_disconnect(wdata->display);
+
free(wdata);
 
ecore_event_window_unregister(ee->prop.window);

-- 




[EGIT] [core/efl] master 03/08: ecore_evas/wayland: handle added / removed seats

2016-11-01 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 44fc1c6eccd98fa0b7353a89863da4c0f3973818
Author: Bruno Dilly 
Date:   Mon Oct 3 12:34:10 2016 -0300

ecore_evas/wayland: handle added / removed seats

Create or delete evas_devices with class EVAS_DEVICE_CLASS_SEAT
for seats on each ecore_evas created so far.

Initially it's named considering its Wayland id.
---
 .../engines/wayland/ecore_evas_wayland_common.c| 110 -
 .../engines/wayland/ecore_evas_wayland_private.h   |   2 +-
 2 files changed, 110 insertions(+), 2 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 0ec70bf..d420fb4 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -25,6 +25,14 @@ struct _EE_Wl_Smart_Data
Evas_Coord border_size[4]; // same as border
 };
 
+/* local structure for evas devices with IDs */
+typedef struct _EE_Wl_Device EE_Wl_Device;
+struct _EE_Wl_Device
+{
+   Evas_Device *seat;
+   unsigned int id;
+};
+
 static const Evas_Smart_Cb_Description _smart_callbacks[] =
 {
  {NULL, NULL}
@@ -36,7 +44,7 @@ EVAS_SMART_SUBCLASS_NEW(_smart_frame_type, 
_ecore_evas_wl_frame,
 
 /* local variables */
 static int _ecore_evas_wl_init_count = 0;
-static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[8];
+static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[10];
 
 static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
 
@@ -438,6 +446,95 @@ _ecore_evas_wl_common_cb_www(void *d EINA_UNUSED, int t 
EINA_UNUSED, void *event
return ECORE_CALLBACK_RENEW;
 }
 
+static Eina_Bool
+_ecore_evas_wl_common_cb_global_added(void *d EINA_UNUSED, int t EINA_UNUSED, 
void *event)
+{
+   Ecore_Wl2_Event_Global *ev = event;
+   EE_Wl_Device *device;
+   Ecore_Evas *ee;
+   Eina_List *l;
+   char buf[32];
+
+   if ((!ev->interface) || (strcmp(ev->interface, "wl_seat")))
+   return ECORE_CALLBACK_PASS_ON;
+
+   snprintf(buf, sizeof(buf), "seat-%u", ev->id);
+
+   EINA_LIST_FOREACH(ee_list, l, ee)
+ {
+Ecore_Evas_Engine_Wl_Data *wdata;
+Evas_Device *dev;
+
+device = calloc(1, sizeof(EE_Wl_Device));
+EINA_SAFETY_ON_NULL_GOTO(device, err_device);
+
+dev = evas_device_add_full(ee->evas, buf, "Wayland seat",
+   NULL, NULL,
+   EVAS_DEVICE_CLASS_SEAT,
+   EVAS_DEVICE_SUBCLASS_NONE);
+EINA_SAFETY_ON_NULL_GOTO(dev, err_dev);
+
+device->seat = dev;
+device->id = ev->id;
+
+wdata = ee->engine.data;
+wdata->devices_list = eina_list_append(wdata->devices_list, device);
+ }
+
+   return ECORE_CALLBACK_PASS_ON;
+
+err_dev:
+   free(device);
+err_device:
+   return ECORE_CALLBACK_PASS_ON;
+}
+
+static void
+_ecore_evas_wl_common_device_free(EE_Wl_Device *device)
+{
+   if (device->seat)
+ evas_device_del(device->seat);
+   free(device);
+}
+
+static Eina_Bool
+_ecore_evas_wl_common_cb_global_removed(void *d EINA_UNUSED, int t 
EINA_UNUSED, void *event)
+{
+   Ecore_Wl2_Event_Global *ev = event;
+   Ecore_Evas *ee;
+   Eina_List *l, *ll;
+
+   if ((!ev->interface) || (strcmp(ev->interface, "wl_seat")))
+   return ECORE_CALLBACK_PASS_ON;
+
+   EINA_LIST_FOREACH(ee_list, l, ee)
+ {
+Ecore_Evas_Engine_Wl_Data *wdata;
+EE_Wl_Device *device;
+Eina_Bool found = EINA_FALSE;
+
+wdata = ee->engine.data;
+
+EINA_LIST_FOREACH(wdata->devices_list, ll, device)
+  {
+ if (device->id == ev->id)
+   {
+  found = EINA_TRUE;
+  break;
+   }
+  }
+
+if (found)
+  {
+ wdata->devices_list = eina_list_remove(wdata->devices_list,
+device);
+ _ecore_evas_wl_common_device_free(device);
+  }
+ }
+
+   return ECORE_CALLBACK_PASS_ON;
+}
+
 int
 _ecore_evas_wl_common_init(void)
 {
@@ -470,6 +567,13 @@ _ecore_evas_wl_common_init(void)
_ecore_evas_wl_event_hdls[7] =
  ecore_event_handler_add(ECORE_WL2_EVENT_DISCONNECT,
  _ecore_evas_wl_common_cb_disconnect, NULL);
+   _ecore_evas_wl_event_hdls[8] =
+ ecore_event_handler_add(ECORE_WL2_EVENT_GLOBAL_ADDED,
+ _ecore_evas_wl_common_cb_global_added, NULL);
+   _ecore_evas_wl_event_hdls[9] =
+ ecore_event_handler_add(ECORE_WL2_EVENT_GLOBAL_REMOVED,
+ _ecore_evas_wl_common_cb_global_removed, NULL);
+
ecore_event_evas_init();
 

[EGIT] [core/efl] master 01/08: evas: Fix doxygen and normalize function signature

2016-11-01 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit f395fbd9609eaa1bbcb51be68f42b16d7c70e976
Author: Bruno Dilly 
Date:   Mon Oct 3 10:21:47 2016 -0300

evas: Fix doxygen and normalize function signature

On recently added function evas_device_add_full()
---
 src/lib/evas/Evas_Common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 6025c5c..5ae1626 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -1151,7 +1151,7 @@ EAPI Evas_Device *evas_device_add(Evas *e);
  * @see evas_device_del
  * @since 1.19
  */
-EAPI Evas_Device *evas_device_add_full(Evas *eo_e, const char *name,
+EAPI Evas_Device *evas_device_add_full(Evas *e, const char *name,
const char *desc,
Evas_Device *parent_dev,
Evas_Device *emulation_dev,

-- 




[EGIT] [core/efl] master 04/08: ecore_wl2: add ecore event for seat name change

2016-11-01 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit d7b1a5dfebfee95e77c4c4f2037755b75b7be908
Author: Bruno Dilly 
Date:   Tue Oct 4 15:19:51 2016 -0300

ecore_wl2: add ecore event for seat name change

And handle it on ecore_evas/wayland, properly
setting the evas device names.
---
 src/lib/ecore_wl2/Ecore_Wl2.h  |  7 +
 src/lib/ecore_wl2/ecore_wl2.c  |  3 ++
 src/lib/ecore_wl2/ecore_wl2_input.c| 29 +---
 src/lib/ecore_wl2/ecore_wl2_private.h  |  1 +
 .../engines/wayland/ecore_evas_wayland_common.c| 32 +-
 5 files changed, 67 insertions(+), 5 deletions(-)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 30fb5d9..19c9965 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -139,6 +139,12 @@ typedef struct _Ecore_Wl2_Event_Data_Source_Send
int fd;
 } Ecore_Wl2_Event_Data_Source_Send;
 
+typedef struct _Ecore_Wl2_Event_Seat_Name
+{
+   Eina_Stringshare *name;
+   unsigned int id;
+} Ecore_Wl2_Event_Seat_Name;
+
 typedef enum
 {
ECORE_WL2_SELECTION_CNP,
@@ -203,6 +209,7 @@ EAPI extern int ECORE_WL2_EVENT_DATA_SOURCE_SEND; /** 
@since 1.17 */
 EAPI extern int ECORE_WL2_EVENT_WINDOW_CONFIGURE; /** @since 1.17 */
 EAPI extern int ECORE_WL2_EVENT_SYNC_DONE; /** @since 1.17 */
 EAPI extern int ECORE_WL2_EVENT_OFFER_DATA_READY; /** @since 1.19 */
+EAPI extern int ECORE_WL2_EVENT_SEAT_NAME_CHANGED; /** @since 1.19 */
 /**
  * @file
  * @brief Ecore functions for dealing with the Wayland display protocol
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c
index 397f8e3..ceb6dce 100644
--- a/src/lib/ecore_wl2/ecore_wl2.c
+++ b/src/lib/ecore_wl2/ecore_wl2.c
@@ -31,6 +31,7 @@ EAPI int ECORE_WL2_EVENT_DATA_SOURCE_SEND = 0;
 EAPI int ECORE_WL2_EVENT_WINDOW_CONFIGURE = 0;
 EAPI int ECORE_WL2_EVENT_SYNC_DONE = 0;
 EAPI int ECORE_WL2_EVENT_OFFER_DATA_READY = 0;
+EAPI int ECORE_WL2_EVENT_SEAT_NAME_CHANGED = 0;
 
 EAPI int _ecore_wl2_event_window_www = -1;
 EAPI int _ecore_wl2_event_window_www_drag = -1;
@@ -89,6 +90,7 @@ ecore_wl2_init(void)
 ECORE_WL2_EVENT_WINDOW_CONFIGURE = ecore_event_type_new();
 ECORE_WL2_EVENT_SYNC_DONE = ecore_event_type_new();
 ECORE_WL2_EVENT_OFFER_DATA_READY = ecore_event_type_new();
+ECORE_WL2_EVENT_SEAT_NAME_CHANGED = ecore_event_type_new();
 _ecore_wl2_event_window_www = ecore_event_type_new();
 _ecore_wl2_event_window_www_drag = ecore_event_type_new();
  }
@@ -140,6 +142,7 @@ ecore_wl2_shutdown(void)
ECORE_WL2_EVENT_WINDOW_CONFIGURE = 0;
ECORE_WL2_EVENT_SYNC_DONE = 0;
ECORE_WL2_EVENT_OFFER_DATA_READY = 0;
+   ECORE_WL2_EVENT_SEAT_NAME_CHANGED = 0;
 
/* shutdown Ecore_Event */
ecore_event_shutdown();
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index b89e3e1..36013fb 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1188,11 +1188,31 @@ _seat_cb_capabilities(void *data, struct wl_seat *seat, 
enum wl_seat_capability
 }
 
 static void
-_seat_cb_name(void *data EINA_UNUSED, struct wl_seat *seat EINA_UNUSED, const 
char *name EINA_UNUSED)
+_cb_seat_event_free(void *data EINA_UNUSED, void *event)
 {
-   /* NB: No-Op as we don't care about seat name right now.
-*
-* This will likely change as we hash out remaining multi-seat issues */
+   Ecore_Wl2_Event_Seat_Name *ev;
+
+   ev = event;
+   eina_stringshare_del(ev->name);
+   free(ev);
+}
+
+static void
+_seat_cb_name(void *data, struct wl_seat *seat EINA_UNUSED, const char *name)
+{
+   Ecore_Wl2_Event_Seat_Name *ev;
+   Ecore_Wl2_Input *input;
+
+   input = data;
+
+   ev = calloc(1, sizeof(Ecore_Wl2_Event_Seat_Name));
+   EINA_SAFETY_ON_NULL_RETURN(ev);
+
+   ev->id = input->id;
+   ev->name = eina_stringshare_add(name);
+
+   ecore_event_add(ECORE_WL2_EVENT_SEAT_NAME_CHANGED, ev,
+   _cb_seat_event_free, NULL);
 }
 
 static const struct wl_seat_listener _seat_listener =
@@ -1241,6 +1261,7 @@ _ecore_wl2_input_add(Ecore_Wl2_Display *display, unsigned 
int id, unsigned int v
input = calloc(1, sizeof(Ecore_Wl2_Input));
if (!input) return;
 
+   input->id = id;
input->display = display;
input->seat_version = version;
input->repeat.rate = 0.025;
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index ab619aa..30f9d88 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -405,6 +405,7 @@ struct _Ecore_Wl2_Input
Ecore_Wl2_Offer *drag, *selection;
 
unsigned int seat_version;
+   unsigned int id;
 };
 
 typedef struct Ecore_Wl2_Event_Window_WWW
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/s

[EGIT] [core/efl] master 05/08: ecore_wl2: add ecore event for seat capabilities change

2016-11-01 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 7aab35961fcd4a8cb93126ec38bf7690b2c5c7d8
Author: Bruno Dilly 
Date:   Wed Oct 5 10:36:19 2016 -0300

ecore_wl2: add ecore event for seat capabilities change

So when mouse / keyboard are present or not it will
generate events.

ecore_evas/wayland will handle that creating or
deleting evas devices for each one (seat device
will be used as parent).
---
 src/lib/ecore_wl2/Ecore_Wl2.h  |  9 +++
 src/lib/ecore_wl2/ecore_wl2.c  |  3 +
 src/lib/ecore_wl2/ecore_wl2_input.c| 11 +++
 .../engines/wayland/ecore_evas_wayland_common.c| 86 +-
 4 files changed, 108 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 19c9965..be9f68f 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -145,6 +145,14 @@ typedef struct _Ecore_Wl2_Event_Seat_Name
unsigned int id;
 } Ecore_Wl2_Event_Seat_Name;
 
+typedef struct _Ecore_Wl2_Event_Seat_Capabilities
+{
+   unsigned int id;
+   Eina_Bool pointer_enabled : 1;
+   Eina_Bool keyboard_enabled : 1;
+   Eina_Bool touch_enabled : 1;
+} Ecore_Wl2_Event_Seat_Capabilities;
+
 typedef enum
 {
ECORE_WL2_SELECTION_CNP,
@@ -210,6 +218,7 @@ EAPI extern int ECORE_WL2_EVENT_WINDOW_CONFIGURE; /** 
@since 1.17 */
 EAPI extern int ECORE_WL2_EVENT_SYNC_DONE; /** @since 1.17 */
 EAPI extern int ECORE_WL2_EVENT_OFFER_DATA_READY; /** @since 1.19 */
 EAPI extern int ECORE_WL2_EVENT_SEAT_NAME_CHANGED; /** @since 1.19 */
+EAPI extern int ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED; /** @since 1.19 */
 /**
  * @file
  * @brief Ecore functions for dealing with the Wayland display protocol
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c
index ceb6dce..1855a96 100644
--- a/src/lib/ecore_wl2/ecore_wl2.c
+++ b/src/lib/ecore_wl2/ecore_wl2.c
@@ -32,6 +32,7 @@ EAPI int ECORE_WL2_EVENT_WINDOW_CONFIGURE = 0;
 EAPI int ECORE_WL2_EVENT_SYNC_DONE = 0;
 EAPI int ECORE_WL2_EVENT_OFFER_DATA_READY = 0;
 EAPI int ECORE_WL2_EVENT_SEAT_NAME_CHANGED = 0;
+EAPI int ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED = 0;
 
 EAPI int _ecore_wl2_event_window_www = -1;
 EAPI int _ecore_wl2_event_window_www_drag = -1;
@@ -91,6 +92,7 @@ ecore_wl2_init(void)
 ECORE_WL2_EVENT_SYNC_DONE = ecore_event_type_new();
 ECORE_WL2_EVENT_OFFER_DATA_READY = ecore_event_type_new();
 ECORE_WL2_EVENT_SEAT_NAME_CHANGED = ecore_event_type_new();
+ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED = ecore_event_type_new();
 _ecore_wl2_event_window_www = ecore_event_type_new();
 _ecore_wl2_event_window_www_drag = ecore_event_type_new();
  }
@@ -143,6 +145,7 @@ ecore_wl2_shutdown(void)
ECORE_WL2_EVENT_SYNC_DONE = 0;
ECORE_WL2_EVENT_OFFER_DATA_READY = 0;
ECORE_WL2_EVENT_SEAT_NAME_CHANGED = 0;
+   ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED = 0;
 
/* shutdown Ecore_Event */
ecore_event_shutdown();
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 36013fb..3ce69e4 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1130,6 +1130,7 @@ static const struct wl_data_device_listener 
_data_listener =
 static void
 _seat_cb_capabilities(void *data, struct wl_seat *seat, enum 
wl_seat_capability caps)
 {
+   Ecore_Wl2_Event_Seat_Capabilities *ev;
Ecore_Wl2_Input *input;
 
input = data;
@@ -1185,6 +1186,16 @@ _seat_cb_capabilities(void *data, struct wl_seat *seat, 
enum wl_seat_capability
   wl_touch_destroy(input->wl.touch);
 input->wl.touch = NULL;
  }
+
+   ev = calloc(1, sizeof(Ecore_Wl2_Event_Seat_Capabilities));
+   EINA_SAFETY_ON_NULL_RETURN(ev);
+
+   ev->id = input->id;
+   ev->pointer_enabled = !!(caps & WL_SEAT_CAPABILITY_POINTER);
+   ev->keyboard_enabled = !!(caps & WL_SEAT_CAPABILITY_KEYBOARD);
+   ev->touch_enabled = !!(caps & WL_SEAT_CAPABILITY_TOUCH);
+
+   ecore_event_add(ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED, ev, NULL, NULL);
 }
 
 static void
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 980531c..697909c 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -30,6 +30,9 @@ typedef struct _EE_Wl_Device EE_Wl_Device;
 struct _EE_Wl_Device
 {
Evas_Device *seat;
+   Evas_Device *pointer;
+   Evas_Device *keyboard;
+   Evas_Device *touch;
unsigned int id;
 };
 
@@ -44,7 +47,7 @@ EVAS_SMART_SUBCLASS_NEW(_smart_frame_type, 
_ecore_evas_wl_frame,
 
 /* local variables */
 static int _ecore_evas_wl_init_count = 0;
-static Ecore_Event_Handler *_ecore_evas_wl_event_hdls

[EGIT] [core/efl] master 06/08: ecore_wl2: associate evas devices to input ecore events

2016-11-01 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 8bf74da7bcd6a52857380e35449609b712d78f03
Author: Bruno Dilly 
Date:   Thu Oct 6 17:43:12 2016 -0300

ecore_wl2: associate evas devices to input ecore events

So users would be able to differentiate between source
seats.
---
 src/lib/ecore_wl2/Ecore_Wl2.h  |  18 +++
 src/lib/ecore_wl2/ecore_wl2.c  |   6 +
 src/lib/ecore_wl2/ecore_wl2_input.c| 176 +
 src/lib/ecore_wl2/ecore_wl2_private.h  |   5 +
 src/lib/ecore_wl2/ecore_wl2_window.c   |  13 +-
 .../engines/wayland/ecore_evas_wayland_common.c|  55 +++
 6 files changed, 261 insertions(+), 12 deletions(-)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index be9f68f..402206c 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -155,6 +155,22 @@ typedef struct _Ecore_Wl2_Event_Seat_Capabilities
 
 typedef enum
 {
+   ECORE_WL2_DEVICE_TYPE_SEAT,
+   ECORE_WL2_DEVICE_TYPE_POINTER,
+   ECORE_WL2_DEVICE_TYPE_KEYBOARD,
+   ECORE_WL2_DEVICE_TYPE_TOUCH
+} Ecore_Wl2_Device_Type;
+
+typedef struct _Ecore_Wl2_Event_Device
+{
+   Eo *dev;
+   int window_id;
+   unsigned int seat_id;
+   Ecore_Wl2_Device_Type type;
+} Ecore_Wl2_Event_Device;
+
+typedef enum
+{
ECORE_WL2_SELECTION_CNP,
ECORE_WL2_SELECTION_DND
 } Ecore_Wl2_Selection_Type;
@@ -219,6 +235,8 @@ EAPI extern int ECORE_WL2_EVENT_SYNC_DONE; /** @since 1.17 
*/
 EAPI extern int ECORE_WL2_EVENT_OFFER_DATA_READY; /** @since 1.19 */
 EAPI extern int ECORE_WL2_EVENT_SEAT_NAME_CHANGED; /** @since 1.19 */
 EAPI extern int ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED; /** @since 1.19 */
+EAPI extern int ECORE_WL2_EVENT_DEVICE_ADDED; /** @since 1.19 */
+EAPI extern int ECORE_WL2_EVENT_DEVICE_REMOVED; /** @since 1.19 */
 /**
  * @file
  * @brief Ecore functions for dealing with the Wayland display protocol
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c
index 1855a96..bbae13f 100644
--- a/src/lib/ecore_wl2/ecore_wl2.c
+++ b/src/lib/ecore_wl2/ecore_wl2.c
@@ -33,6 +33,8 @@ EAPI int ECORE_WL2_EVENT_SYNC_DONE = 0;
 EAPI int ECORE_WL2_EVENT_OFFER_DATA_READY = 0;
 EAPI int ECORE_WL2_EVENT_SEAT_NAME_CHANGED = 0;
 EAPI int ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED = 0;
+EAPI int ECORE_WL2_EVENT_DEVICE_ADDED = 0;
+EAPI int ECORE_WL2_EVENT_DEVICE_REMOVED = 0;
 
 EAPI int _ecore_wl2_event_window_www = -1;
 EAPI int _ecore_wl2_event_window_www_drag = -1;
@@ -93,6 +95,8 @@ ecore_wl2_init(void)
 ECORE_WL2_EVENT_OFFER_DATA_READY = ecore_event_type_new();
 ECORE_WL2_EVENT_SEAT_NAME_CHANGED = ecore_event_type_new();
 ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED = ecore_event_type_new();
+ECORE_WL2_EVENT_DEVICE_ADDED = ecore_event_type_new();
+ECORE_WL2_EVENT_DEVICE_REMOVED = ecore_event_type_new();
 _ecore_wl2_event_window_www = ecore_event_type_new();
 _ecore_wl2_event_window_www_drag = ecore_event_type_new();
  }
@@ -146,6 +150,8 @@ ecore_wl2_shutdown(void)
ECORE_WL2_EVENT_OFFER_DATA_READY = 0;
ECORE_WL2_EVENT_SEAT_NAME_CHANGED = 0;
ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED = 0;
+   ECORE_WL2_EVENT_DEVICE_ADDED = 0;
+   ECORE_WL2_EVENT_DEVICE_REMOVED = 0;
 
/* shutdown Ecore_Event */
ecore_event_shutdown();
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 3ce69e4..830c6ad 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -18,6 +18,14 @@
 #include 
 #include "ecore_wl2_private.h"
 
+typedef struct _Ecore_Wl2_Input_Devices
+{
+   Eo *pointer_dev;
+   Eo *keyboard_dev;
+   Eo *touch_dev;
+   int window_id;
+} Ecore_Wl2_Input_Devices;
+
 typedef struct _Ecore_Wl2_Mouse_Down_Info
 {
EINA_INLIST;
@@ -57,6 +65,33 @@ _ecore_wl2_input_mouse_down_info_get(int device)
return info;
 }
 
+static Ecore_Wl2_Input_Devices *
+_ecore_wl2_devices_get(Ecore_Wl2_Input *input, int window_id)
+{
+   Ecore_Wl2_Input_Devices *devices;
+   Eina_List *l;
+
+   EINA_LIST_FOREACH(input->devices_list, l, devices)
+ {
+if (devices->window_id == window_id)
+  return devices;
+ }
+
+   return NULL;
+}
+
+static Eo *
+_ecore_wl2_mouse_dev_get(Ecore_Wl2_Input *input, int window_id)
+{
+   Ecore_Wl2_Input_Devices *devices;
+
+   devices = _ecore_wl2_devices_get(input, window_id);
+   if (devices)
+ return devices->pointer_dev;
+
+   return NULL;
+}
+
 static void
 _ecore_wl2_input_mouse_in_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window 
*window)
 {
@@ -71,6 +106,7 @@ _ecore_wl2_input_mouse_in_send(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window)
ev->event_window = window->id;
ev->timestamp = input->timestamp;
ev->modifiers = input->keyboard.modifiers;
+   ev->dev = _e

[EGIT] [core/efl] master 08/08: Merge branch 'devs/bdilly/ecore_evas_wayland'

2016-11-01 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 3ac1812a1f9915f4a8545e5db529bb8003ffdeaa
Merge: 402abca 3bc2793
Author: Bruno Dilly 
Date:   Tue Nov 1 16:07:05 2016 -0200

Merge branch 'devs/bdilly/ecore_evas_wayland'

This series adds multiseat support to wayland engine.

Evas devices are created for seats (parent), keyboard, mouses and
touch input devices.

This way an application would be able to differentiate between
source seat of input events.

Reviewed By: devilhorns, ManMower, iscaro

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

@feature

 src/examples/ecore/.gitignore  |   1 +
 src/examples/ecore/Makefile.am |   6 +
 .../ecore/ecore_evas_wayland_multiseat_example.c   | 242 +
 src/lib/ecore_wl2/Ecore_Wl2.h  |  34 +++
 src/lib/ecore_wl2/ecore_wl2.c  |  12 +
 src/lib/ecore_wl2/ecore_wl2_input.c| 216 +++-
 src/lib/ecore_wl2/ecore_wl2_private.h  |   6 +
 src/lib/ecore_wl2/ecore_wl2_window.c   |  13 +-
 src/lib/evas/Evas_Common.h |   2 +-
 .../engines/wayland/ecore_evas_wayland_common.c| 286 -
 .../engines/wayland/ecore_evas_wayland_private.h   |   2 +-
 11 files changed, 795 insertions(+), 25 deletions(-)

-- 




Re: [E-devel] Repos sending mails to git@lists

2016-10-21 Thread Bruno Dilly
On Fri, Oct 21, 2016 at 7:17 AM, Tom Hacohen  wrote:

> On 20/10/16 20:50, Bruno Dilly wrote:
> > Hey guys,
> >
> > I realized apparently changes on apps/eruler are not sent to our git
> mails
> > list.
> >
> > How is it managed? Do we have a list of repos with hooks to send emails
> to
> > such list? Could you guys please add eruler to this list?
> >
> > Thanks in advance
> >
>
> All repos send mails unless the commits are already available on the
> server (for example, the commits are in a branch).
>
>

Oh, I see.
I wasn't aware about this detail.
That explains why I've been missing some emails  =)

Thanks, Tom



> --
> Tom.
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
Bruno Dilly
ProFUSION embedded systems
http://profusion.mobi
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Repos sending mails to git@lists

2016-10-20 Thread Bruno Dilly
Hey guys,

I realized apparently changes on apps/eruler are not sent to our git mails
list.

How is it managed? Do we have a list of repos with hooks to send emails to
such list? Could you guys please add eruler to this list?

Thanks in advance

-- 
Bruno Dilly
ProFUSION embedded systems
http://profusion.mobi
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [games/eskiss] master 03/04: Add a gitignore file

2016-10-17 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/eskiss.git/commit/?id=f09dc5070564800e153aeefa1466d14006cfcd1e

commit f09dc5070564800e153aeefa1466d14006cfcd1e
Author: Bruno Dilly 
Date:   Mon Oct 17 15:11:32 2016 -0200

Add a gitignore file
---
 .gitignore | 28 
 1 file changed, 28 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..a0ebf09
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,28 @@
+*~
+*.o
+*.edj
+.deps
+Makefile
+Makefile.in
+/INSTALL
+/aclocal.m4
+/autom4te.cache/
+/compile
+/config.guess
+/config.h
+/config.h.in
+/config.log
+/config.status
+/config.sub
+/configure
+/depcomp
+/install-sh
+/ltmain.sh
+m4/libtool.m4
+m4/ltoptions.m4
+m4/ltsugar.m4
+m4/ltversion.m4
+m4/lt~obsolete.m4
+/missing
+src/bin/eskiss
+/stamp-h1

-- 




[EGIT] [games/eskiss] master 04/04: Fix abortion on bodies deletion

2016-10-17 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/eskiss.git/commit/?id=f47833f6c5315df510ef7d2a34acd4697d568775

commit f47833f6c5315df510ef7d2a34acd4697d568775
Author: Bruno Dilly 
Date:   Mon Oct 17 15:14:47 2016 -0200

Fix abortion on bodies deletion

Fix issues when deleting static bodies (when you change levels
or presse menu option).

It was leading to the following error:
Aborting due to Chipmunk error: Cannot remove a body that was not
  added to the space. (Removed twice maybe?)
Failed condition: cpSpaceContainsBody(space, body)
Source:/build/buildd/chipmunk-6.1.5/src/cpSpace.c:403

Static bodies shouldn't be added to space on Chipmunk, and that's correct.
But for some reason we're trying to remove them from space under
certain circustances.
---
 src/bin/physic_object.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/bin/physic_object.c b/src/bin/physic_object.c
index 1f365e5..387768a 100644
--- a/src/bin/physic_object.c
+++ b/src/bin/physic_object.c
@@ -520,7 +520,10 @@ void physic_object_del(PhysicObject *pobj)
 evas_object_del(obj);
 
 //remove body
-cpSpaceRemoveBody(space, pobj->body);
+// But don't try to remove static bodies, since they're not
+// added to space (otherwise they would be simulated).
+if (!pobj->static_body)
+cpSpaceRemoveBody(space, pobj->body);
 cpBodyFree(pobj->body);
 
 physic_objects = eina_list_remove(physic_objects, pobj);

-- 




[EGIT] [games/eskiss] master 02/04: Fix casts

2016-10-17 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/eskiss.git/commit/?id=881510e93d43b81d9550aa1b273d1f1997b30370

commit 881510e93d43b81d9550aa1b273d1f1997b30370
Author: Bruno Dilly 
Date:   Mon Oct 17 15:05:29 2016 -0200

Fix casts

Avoid build warnings like:

physic_object.c: In function ‘physic_object_circle_add’:
physic_object.c:236:33: warning: cast from pointer to integer of different 
size [-Wpointer-to-int-cast]
 shape->collision_type = (int)pobj;

collision_type is a uintptr_t
---
 src/bin/physic_object.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/physic_object.c b/src/bin/physic_object.c
index 15a6532..1f365e5 100644
--- a/src/bin/physic_object.c
+++ b/src/bin/physic_object.c
@@ -157,7 +157,7 @@ PhysicObject *physic_object_drawing_add(Evas_Object *obj, 
DrawPoint center, Eina
 shape->u = 0.6f; //Friction
 //shape->group = number_of_element;
 shape->data = pobj;
-shape->collision_type = (int)pobj;
+shape->collision_type = (uintptr_t)pobj;
 
 pobj->shapes = eina_list_append(pobj->shapes, shape);
 }
@@ -233,7 +233,7 @@ PhysicObject *physic_object_circle_add(Evas_Object *obj, 
DrawPoint center, doubl
 shape->u = 0.6f; //Friction
 //shape->group = number_of_element;
 shape->data = pobj;
-shape->collision_type = (int)pobj;
+shape->collision_type = (uintptr_t)pobj;
 
 pobj->shapes = eina_list_append(pobj->shapes, shape);
 
@@ -360,7 +360,7 @@ PhysicObject *physic_object_segment_add(Evas_Object *obj, 
DrawPoint center, Eina
 shape->u = 0.8f; //Friction
 //shape->group = number_of_element;
 shape->data = pobj;
-shape->collision_type = (int)pobj;
+shape->collision_type = (uintptr_t)pobj;
 
 pobj->shapes = eina_list_append(pobj->shapes, shape);
 
@@ -424,7 +424,7 @@ void physic_object_collision_callback_set(PhysicObject 
*pobj, PhysicObject *pobj
 return;
 }
 
-cpSpaceAddCollisionHandler(space, (int)pobj, (int)pobj2, 
_collision_begin_cb, NULL, NULL, NULL, pobj);
+cpSpaceAddCollisionHandler(space, (uintptr_t)pobj, (uintptr_t)pobj2, 
_collision_begin_cb, NULL, NULL, NULL, pobj);
 
 pobj->collision_callback = cb;
 pobj->collision_data = data;

-- 




[EGIT] [games/eskiss] master 01/04: Update code regarding cpSpace fields

2016-10-17 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/eskiss.git/commit/?id=1ddaab2f6a83c1bb6e33e76e38c086d8607093ed

commit 1ddaab2f6a83c1bb6e33e76e38c086d8607093ed
Author: Bruno Dilly 
Date:   Mon Oct 17 15:01:53 2016 -0200

Update code regarding cpSpace fields

Now chipmunk only have a single field related to
iterations, no more elasticIteractions.
---
 src/bin/physic_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/physic_object.c b/src/bin/physic_object.c
index 2b00f71..15a6532 100644
--- a/src/bin/physic_object.c
+++ b/src/bin/physic_object.c
@@ -40,7 +40,7 @@ void physic_init(void)
 
 space = cpSpaceNew();
 space->gravity = cpv(0, -1000);
-space->elasticIterations = 10;
+space->iterations = 10;
 }
 
 /**

-- 




[EGIT] [games/efbb] master 01/03: Enable subdir-objects to avoid automake warnings

2016-10-17 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/efbb.git/commit/?id=65575a6c1b9ed8fb3dc2e87735e4a96652d56570

commit 65575a6c1b9ed8fb3dc2e87735e4a96652d56570
Author: Bruno Dilly 
Date:   Mon Oct 17 12:26:30 2016 -0200

Enable subdir-objects to avoid automake warnings

Avoid warning:
src/bin/Makefile.am:18: warning: source file '$(builddir)/game_world.c'
  is in a subdirectory,
src/bin/Makefile.am:18: but option 'subdir-objects' is disabled
[...]
automake: You are advised to start using 'subdir-objects' option throughout 
your
automake: project, to avoid future incompatibilities.
---
 configure.ac| 2 +-
 src/bin/Makefile.am | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index ee55dbf..5a2008d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,7 @@ AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 AC_ISC_POSIX
 
-AM_INIT_AUTOMAKE(1.6 dist-bzip2)
+AM_INIT_AUTOMAKE(1.6 dist-bzip2 subdir-objects)
 AC_CONFIG_HEADERS(config.h)
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 032f699..1e22409 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -16,13 +16,13 @@ bin_PROGRAMS += efbb_ql
 endif
 
 GAME_SOURCES = \
-   $(builddir)/game_world.c \
+   game_world.c \
main.c \
main_screen.c \
level_select_screen.c \
cannon.c \
sound.c \
-score.c \
+   score.c \
bg.c
 
 efbb_LDADD = @EFBB_LIBS@

-- 




[EGIT] [tools/geneet] master 01/02: Add information regarding dependencies

2016-10-17 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/tools/geneet.git/commit/?id=bcc223daf419d52cffa3de667ed927a1525499e2

commit bcc223daf419d52cffa3de667ed927a1525499e2
Author: Bruno Dilly 
Date:   Mon Oct 17 12:13:38 2016 -0200

Add information regarding dependencies
---
 README | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/README b/README
index 6909899..1096966 100644
--- a/README
+++ b/README
@@ -59,6 +59,12 @@ Geneet Syntax
 - noencode might be used to create in-memory only fields; they won't be
   encoded in the EET file but will be available as structures members
 
+
+Python modules dependencies
+---
+  - pyparsing
+
+
 Usage
 -
 
@@ -71,6 +77,7 @@ Running:
 Will create phonebook.c and phonebook.h. See the included test-phonebook.c
 to see an example of how to use the generated files.
 
+
 Installing
 --
 To install install geneet.py script:

-- 




[EGIT] [tools/geneet] master 02/02: Add .gitignore for build and test files

2016-10-17 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/tools/geneet.git/commit/?id=2ddc95f15577ddd03c9e94edc09ffb9fca294a9d

commit 2ddc95f15577ddd03c9e94edc09ffb9fca294a9d
Author: Bruno Dilly 
Date:   Mon Oct 17 12:14:01 2016 -0200

Add .gitignore for build and test files

Just ignoring files created during python install
and when executing tests (files are generated)
---
 .gitignore | 5 +
 1 file changed, 5 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..50f2ca2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+build/*
+history.c
+history.h
+phonebook.c
+phonebook.h

-- 




[EGIT] [games/efbb] master 03/03: Remove deprecated INCLUDES

2016-10-17 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/efbb.git/commit/?id=71159b15aa1e802fc9f216dd99fd19bb2e3973a5

commit 71159b15aa1e802fc9f216dd99fd19bb2e3973a5
Author: Bruno Dilly 
Date:   Mon Oct 17 12:32:10 2016 -0200

Remove deprecated INCLUDES

src/bin/Makefile.am:3: warning: 'INCLUDES' is the old name for
'AM_CPPFLAGS' (or '*_CPPFLAGS')
---
 src/bin/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 1e22409..46d0c7e 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-INCLUDES = \
+AM_CPPFLAGS = \
 -I$(top_srcdir) \
 -I$(top_srcdir)/src/bin \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \

-- 




[EGIT] [games/efbb] master 02/03: Stop using svnrevision

2016-10-17 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/efbb.git/commit/?id=22bf9627b1db9f397d989f6a7de855483b42df50

commit 22bf9627b1db9f397d989f6a7de855483b42df50
Author: Bruno Dilly 
Date:   Mon Oct 17 12:30:52 2016 -0200

Stop using svnrevision

Instead use git rev-list just like other e repos.
With that we'll get rid of tons of
"sh: 1: svnversion: not found"
messages when building it.
---
 configure.ac | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5a2008d..2110441 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,10 +3,9 @@
 m4_define([v_maj], [0])
 m4_define([v_min], [1])
 m4_define([v_mic], [0])
-m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v 
export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
-m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep 
-m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
+m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 
0) | tr -d '\n']))
 ##--   When released, remove the dnl on the below line
-m4_undefine([v_rev])
+dnl m4_undefine([v_rev])
 ##--   When doing snapshots - change soname. remove dnl on below line
 dnl m4_define([relname], [ver-pre-svn-07])
 dnl m4_define([v_rel], [-release relname])

-- 




[EGIT] [games/econcentration] master 04/05: Don't let previous card content be hidden

2016-10-14 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/econcentration.git/commit/?id=9c180007635116623da25e636584d741bff9138c

commit 9c180007635116623da25e636584d741bff9138c
Author: Bruno Dilly 
Date:   Fri Oct 14 18:56:17 2016 -0300

Don't let previous card content be hidden

It shouldn't be required (and it wasn't on the past)

For some reason I need to show the content again, after animation is done,
otherwise when the next card is flipped content will be hidden.
---
 src/bin/main.c | 17 +
 1 file changed, 17 insertions(+)

diff --git a/src/bin/main.c b/src/bin/main.c
index 7cb523f..a20accd 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -161,6 +161,21 @@ _player_win(Game *game)
 evas_object_show(popup);
 }
 
+/* FIXME this function shouldn't be required (and it wasn't on the past)
+   For some reason I need to show the content again, after animation is done,
+   otherwise when the next card is flipped content will be hidden */
+static void
+_fl_animate_done(void *data __UNUSED__, Evas_Object *obj, void *event_info 
__UNUSED__)
+{
+Evas_Object *ic;
+
+if (elm_flip_front_visible_get(obj))
+return;
+
+ic = elm_object_part_content_get(obj, "back");
+evas_object_show(ic);
+}
+
 static void
 _fl_selected(void *data, Evas_Object *obj, void *event_info __UNUSED__)
 {
@@ -313,6 +328,8 @@ _prepopulate_table(Game *game)
 elm_table_pack(table, fl, i % game->board_size, i / game->board_size,
 1, 1);
 evas_object_show(fl);
+evas_object_smart_callback_add(fl, "animate,done", _fl_animate_done,
+   NULL);
 game->cards[i].flip = fl;
 
 bt = elm_button_add(table);

-- 




[EGIT] [games/econcentration] master 05/05: Update AUTHORS

2016-10-14 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/econcentration.git/commit/?id=b557f312e330ace31488a0b9f2e024f4b54032fa

commit b557f312e330ace31488a0b9f2e024f4b54032fa
Author: Bruno Dilly 
Date:   Fri Oct 14 19:04:11 2016 -0300

Update AUTHORS

Iscaro contributed the mobile version of the game, back at 2012.
Commits 913aa34e44bca99b86 and d676fefbbb7fce15ff565
---
 AUTHORS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/AUTHORS b/AUTHORS
index 5019971..1fca535 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1 +1,2 @@
 Bruno Dilly 
+Guilherme Iscaro 

-- 




[EGIT] [games/econcentration] master 01/05: Stop using svnrevision

2016-10-14 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/econcentration.git/commit/?id=9662f1ce60e9a8dfdf62245b5956fe0ef32a19db

commit 9662f1ce60e9a8dfdf62245b5956fe0ef32a19db
Author: Bruno Dilly 
Date:   Fri Oct 14 18:52:59 2016 -0300

Stop using svnrevision

Instead use git rev-list just like other e repos.
With that we'll get rid of tons of
"sh: 1: svnversion: not found"
messages when building it.
---
 configure.ac | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index c605e8f..29f1f51 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,10 +3,9 @@
 m4_define([v_maj], [0])
 m4_define([v_min], [1])
 m4_define([v_mic], [0])
-m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v 
export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
-m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep 
-m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
+m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 
0) | tr -d '\n']))
 ##--   When released, remove the dnl on the below line
-m4_undefine([v_rev])
+dnl m4_undefine([v_rev])
 ##--   When doing snapshots - change soname. remove dnl on below line
 dnl m4_define([relname], [ver-pre-svn-07])
 dnl m4_define([v_rel], [-release relname])

-- 




[EGIT] [games/econcentration] master 02/05: Update gitignore

2016-10-14 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/econcentration.git/commit/?id=53130bded3a70e8466c0834df2d26ff0c953d8e8

commit 53130bded3a70e8466c0834df2d26ff0c953d8e8
Author: Bruno Dilly 
Date:   Fri Oct 14 18:53:22 2016 -0300

Update gitignore

Since INSTALL was removed from repo and it's autogenerated.
Removal on commit 812939c252edd0f06899
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 1232b8c..fc49cdf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,3 +34,4 @@ m4/ltversion.m4
 m4/lt~obsolete.m4
 src/bin/econcentration
 src/bin/econcentration_ql
+INSTALL

-- 




[EGIT] [games/econcentration] master 03/05: Remove deprecated INCLUDES

2016-10-14 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/econcentration.git/commit/?id=5aa51bf2e83fc2ed8541eb14f991f359d9a2248c

commit 5aa51bf2e83fc2ed8541eb14f991f359d9a2248c
Author: Bruno Dilly 
Date:   Fri Oct 14 18:53:38 2016 -0300

Remove deprecated INCLUDES

Get rid of warning:
'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
---
 src/bin/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 7234156..16fe1d4 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-INCLUDES = \
+AM_CPPFLAGS = \
 -I$(top_srcdir) \
 -I$(top_srcdir)/src/bin \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \

-- 




[EGIT] [games/e_cho] master 01/03: Stop using svnrevision

2016-10-14 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/e_cho.git/commit/?id=62b0b129326a382442887ba381793878dc61e252

commit 62b0b129326a382442887ba381793878dc61e252
Author: Bruno Dilly 
Date:   Fri Oct 14 12:54:24 2016 -0300

Stop using svnrevision

Instead use git rev-list just like other e repos.
With that we'll get rid of tons of
"sh: 1: svnversion: not found"
messages when building it.
---
 configure.ac | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index bbf5355..1579ce0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,10 +3,9 @@
 m4_define([v_maj], [0])
 m4_define([v_min], [1])
 m4_define([v_mic], [0])
-m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v 
export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
-m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep 
-m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
+m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 
0) | tr -d '\n']))
 ##--   When released, remove the dnl on the below line
-m4_undefine([v_rev])
+dnl m4_undefine([v_rev])
 ##--   When doing snapshots - change soname. remove dnl on below line
 dnl m4_define([relname], [ver-pre-svn-07])
 dnl m4_define([v_rel], [-release relname])

-- 




[EGIT] [games/e_cho] master 03/03: Remove deprecated INCLUDES

2016-10-14 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/e_cho.git/commit/?id=a536902d48619d8c92d6dcfaa85189b9998748d7

commit a536902d48619d8c92d6dcfaa85189b9998748d7
Author: Bruno Dilly 
Date:   Fri Oct 14 13:51:10 2016 -0300

Remove deprecated INCLUDES

Clean msg:

src/bin/Makefile.am:3: warning: 'INCLUDES' is the old name for
  'AM_CPPFLAGS' (or '*_CPPFLAGS')
---
 src/bin/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 4a58179..7633285 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-INCLUDES = \
+AM_CPPFLAGS = \
 -I$(top_srcdir) \
 -I$(top_srcdir)/src/bin \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \

-- 




[EGIT] [games/etrophy] master 01/02: Stop using svnrevision

2016-10-14 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/etrophy.git/commit/?id=422fec37b4647e6cb8dd51bca4eeae45d958399e

commit 422fec37b4647e6cb8dd51bca4eeae45d958399e
Author: Bruno Dilly 
Date:   Fri Oct 14 13:29:15 2016 -0300

Stop using svnrevision

Instead use git rev-list just like other e repos.
With that we'll get rid of tons of
"sh: 1: svnversion: not found"
messages when building it.
---
 configure.ac | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 59da418..5793010 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,8 +3,7 @@
 m4_define([v_maj], [0])
 m4_define([v_min], [5])
 m4_define([v_mic], [1])
-m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v 
'\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", 
$1);}' | tr -d ' :MSP\n']))
-m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep 
-m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
+m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 
0) | tr -d '\n']))
 ##--   When released, remove the dnl on the below line
 dnl m4_undefine([v_rev])
 ##--   When doing snapshots - change soname. remove dnl on below line

-- 




[EGIT] [games/etrophy] master 02/02: Ignore .gmo files

2016-10-14 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/etrophy.git/commit/?id=3fac1cb5a16200b56a5159a46972fc1b8212c0c9

commit 3fac1cb5a16200b56a5159a46972fc1b8212c0c9
Author: Bruno Dilly 
Date:   Fri Oct 14 19:14:22 2016 -0300

Ignore .gmo files
---
 .gitignore | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index aa07d75..19187d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -72,15 +72,14 @@ m4/wchar_t.m4
 m4/wint_t.m4
 m4/xsize.m4
 INSTALL
+po/*.gmo
 po/Makefile.in.in
 po/Makevars.template
 po/POTFILES
 po/Rules-quot
 po/boldquot.sed
-po/en.gmo
 po/en@boldquot.header
 po/en@quot.header
-po/fr.gmo
 po/insert-header.sin
 po/quot.sed
 po/remove-potcdate.sin

-- 




[EGIT] [games/e_cho] master 02/03: Update gitignore

2016-10-14 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/games/e_cho.git/commit/?id=65a5c43ee1b5f938292e0de21120eca24543c50f

commit 65a5c43ee1b5f938292e0de21120eca24543c50f
Author: Bruno Dilly 
Date:   Fri Oct 14 13:31:26 2016 -0300

Update gitignore

Since INSTALL was removed from repo and it's autogenerated.
Removal on commit 812939c252edd0f06899
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index cf3df94..0e811a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -76,3 +76,4 @@ po/quot.sed
 po/remove-potcdate.sed
 po/remove-potcdate.sin
 data/themes/*.edj
+INSTALL

-- 




[EGIT] [core/efl] master 01/01: Merge branch 'devs/iscaro/osx'

2016-10-10 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit c8af4e498ede1db951e1625f6b7880eff5c4adc4
Merge: 16ee5b7 ca53a21
Author: Bruno Dilly 
Date:   Mon Oct 10 15:25:33 2016 -0300

Merge branch 'devs/iscaro/osx'

Some fixes for OS X.

This series fixes two problems pointed by jayji and some other
compiler warnings.

Patches by iscaro.
Differential Revision: https://phab.enlightenment.org/D4339

 src/examples/eet/eet-data-file_descriptor_01.c |  2 +-
 src/lib/ecore/ecore_thread.c   |  2 +-
 src/lib/ecore_cocoa/ecore_cocoa.m  | 25 +-
 src/lib/ecore_cocoa/ecore_cocoa_private.h  |  2 ++
 src/lib/ecore_cocoa/ecore_cocoa_window.m   |  3 +++
 src/lib/elementary/efl_ui_win.c|  3 +++
 .../ecore_evas/engines/cocoa/ecore_evas_cocoa.c|  2 +-
 7 files changed, 26 insertions(+), 13 deletions(-)

-- 




[EGIT] [core/efl] master 02/04: configure: show if vnc server was enabled or not

2016-09-28 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 46c48a498c5834fd098a48065eda908517082900
Author: Bruno Dilly 
Date:   Tue Sep 27 18:29:43 2016 -0300

configure: show if vnc server was enabled or not

So we can see by configure log if it should be working =)
---
 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index cea97db..0192122 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4642,6 +4642,7 @@ AM_CONDITIONAL([BUILD_ECORE_EVAS_WIN32],
 
 ECORE_EVAS_MODULE([software-x11], [${want_x11_any}],
   [EFL_OPTIONAL_DEPEND_PKG([ECORE_EVAS], [${want_vnc_server}], [VNC_SERVER], 
[libvncserver])])
+EFL_ADD_FEATURE([ECORE_EVAS], [vnc_server])
 
 have_ecore_evas_software_xlib="no"
 have_ecore_evas_software_xcb="no"

-- 




[EGIT] [core/efl] master 01/04: examples/ecore: fix vnc example build

2016-09-28 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit e2afcc0ab495f3d65b3868602148958799ffb35a
Author: Bruno Dilly 
Date:   Tue Sep 27 18:17:07 2016 -0300

examples/ecore: fix vnc example build

Fix missing dependency.

Get rid of the following error:

/usr/bin/ld: ecore_evas_vnc.o: undefined reference
  to symbol 'ECORE_EVENT_MOUSE_BUTTON_UP'
src/lib/ecore_input/.libs/libecore_input.so.1: error adding symbols:
  DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:2306: recipe for target 'ecore_evas_vnc' failed
---
 src/examples/ecore/Makefile.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/examples/ecore/Makefile.am b/src/examples/ecore/Makefile.am
index 15d8668..0c50500 100644
--- a/src/examples/ecore/Makefile.am
+++ b/src/examples/ecore/Makefile.am
@@ -205,7 +205,8 @@ ecore_evas_window_sizes_example_SOURCES = 
ecore_evas_window_sizes_example.c
 ecore_evas_window_sizes_example_LDADD = $(ECORE_EVAS_COMMON_LDADD)
 
 ecore_evas_vnc_SOURCES = ecore_evas_vnc.c
-ecore_evas_vnc_LDADD = $(ECORE_EVAS_COMMON_LDADD)
+ecore_evas_vnc_LDADD = $(ECORE_EVAS_COMMON_LDADD) \
+$(top_builddir)/src/lib/ecore_input/libecore_input.la
 
 ecore_event_example_01_SOURCES = ecore_event_example_01.c
 ecore_event_example_01_LDADD = $(ECORE_COMMON_LDADD)

-- 




[EGIT] [core/efl] master 04/04: examples/elementary: drop generated.h from SOURCES

2016-09-28 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 245d69b48081c575f51c3c272d67d7aa4db88cbf
Author: Bruno Dilly 
Date:   Tue Sep 27 22:54:58 2016 -0300

examples/elementary: drop generated.h from SOURCES

Remove codegen_example_generated.h from codegen_example_SOURCES
and let it only on nodist_codegen_example_SOURCES and
on BUILT_SOURCES.

Also add dependency between codegen_example.c
and codegen_example_generated.h since it's required
to compile.

Avoid the following build error:
  CODEGEN  codegen_example_generated.c
  codegen_example.c:26:39: fatal error: codegen_example_generated.h:
  No such file or directory
  compilation terminated.
  Makefile:4960: recipe for target 'codegen_example.o' failed
---
 src/examples/elementary/Makefile.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/examples/elementary/Makefile.am 
b/src/examples/elementary/Makefile.am
index 84bc491..fc279c1 100644
--- a/src/examples/elementary/Makefile.am
+++ b/src/examples/elementary/Makefile.am
@@ -258,8 +258,9 @@ codegen_example_generated.c codegen_example_generated.h: 
codegen_example.edj
 
 BUILT_SOURCES = codegen_example_generated.c codegen_example_generated.h
 
+codegen_example.c: codegen_example_generated.h
+
 codegen_example_SOURCES = \
-   codegen_example_generated.h \
codegen_example.c
 nodist_codegen_example_SOURCES = \
 codegen_example_generated.c \

-- 




[EGIT] [core/efl] master 03/04: examples/ecore: add example suffix to ecore_evas_vnc

2016-09-28 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 8cb4a943ba5906e07d1df64c742cd7bf18b1bf8e
Author: Bruno Dilly 
Date:   Tue Sep 27 19:17:12 2016 -0300

examples/ecore: add example suffix to ecore_evas_vnc

Make its name similar to all the other example
files on this folder.
---
 src/examples/ecore/.gitignore | 2 +-
 src/examples/ecore/Makefile.am| 8 
 src/examples/ecore/{ecore_evas_vnc.c => ecore_evas_vnc_example.c} | 0
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/examples/ecore/.gitignore b/src/examples/ecore/.gitignore
index 0f30050..826eebe 100644
--- a/src/examples/ecore/.gitignore
+++ b/src/examples/ecore/.gitignore
@@ -25,7 +25,7 @@
 /ecore_evas_extn_socket_example
 /ecore_evas_object_example
 /ecore_evas_window_sizes_example
-/ecore_evas_vnc
+/ecore_evas_vnc_example
 /ecore_event_example_01
 /ecore_event_example_02
 /ecore_exe_example
diff --git a/src/examples/ecore/Makefile.am b/src/examples/ecore/Makefile.am
index 0c50500..35c930b 100644
--- a/src/examples/ecore/Makefile.am
+++ b/src/examples/ecore/Makefile.am
@@ -60,7 +60,7 @@ ecore_evas_callbacks \
 ecore_evas_ews_example \
 ecore_evas_object_example \
 ecore_evas_window_sizes_example \
-ecore_evas_vnc \
+ecore_evas_vnc_example \
 ecore_event_example_01 \
 ecore_event_example_02 \
 ecore_exe_example \
@@ -204,8 +204,8 @@ ecore_evas_object_example_LDADD = $(ECORE_EVAS_COMMON_LDADD)
 ecore_evas_window_sizes_example_SOURCES = ecore_evas_window_sizes_example.c
 ecore_evas_window_sizes_example_LDADD = $(ECORE_EVAS_COMMON_LDADD)
 
-ecore_evas_vnc_SOURCES = ecore_evas_vnc.c
-ecore_evas_vnc_LDADD = $(ECORE_EVAS_COMMON_LDADD) \
+ecore_evas_vnc_example_SOURCES = ecore_evas_vnc_example.c
+ecore_evas_vnc_example_LDADD = $(ECORE_EVAS_COMMON_LDADD) \
 $(top_builddir)/src/lib/ecore_input/libecore_input.la
 
 ecore_event_example_01_SOURCES = ecore_event_example_01.c
@@ -335,7 +335,7 @@ ecore_evas_callbacks.c \
 ecore_evas_ews_example.c \
 ecore_evas_object_example.c \
 ecore_evas_window_sizes_example.c \
-ecore_evas_vnc.c \
+ecore_evas_vnc_example.c \
 ecore_event_example_01.c \
 ecore_event_example_02.c \
 ecore_exe_example.c \
diff --git a/src/examples/ecore/ecore_evas_vnc.c 
b/src/examples/ecore/ecore_evas_vnc_example.c
similarity index 100%
rename from src/examples/ecore/ecore_evas_vnc.c
rename to src/examples/ecore/ecore_evas_vnc_example.c

-- 




[EGIT] [core/efl] master 11/11: Merge branch 'devs/iscaro/ecore_evas_vnc_multiseat'

2016-09-26 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 0566abeee85f899dffd1b58260ada696d8a86af7
Merge: fc66dd6 03824e5
Author: Bruno Dilly 
Date:   Mon Sep 26 22:07:13 2016 -0300

Merge branch 'devs/iscaro/ecore_evas_vnc_multiseat'

This series adds the Ecore_Evas multi-seat VNC support
using the software X11 backend.
This implementation tries to mimic the Wayland's multi-seat support.

This series also introduces two new kinds of EFL events, which are:
 * EFL_CANVAS_EVENT_DEVICE_ADDED - Which is emitted every
   time an Evas_Device is created.
 * EFL_CANVAS_EVENT_DEVICE_REMOVED - Which is emmited every
   time an Evas_Device is removed/deleted.

The new events are useful when one wants to monitor how many
and what kind of devices are connected to the system.

Patches by iscaro.
Differential Revision: https://phab.enlightenment.org/D4295

@feature

 configure.ac   |  24 +-
 src/examples/ecore/.gitignore  |   1 +
 src/examples/ecore/Makefile.am |   5 +
 src/examples/ecore/ecore_evas_vnc.c| 244 +
 src/lib/ecore_evas/Ecore_Evas.h|  36 ++
 src/lib/ecore_evas/ecore_evas.c|  31 ++
 src/lib/ecore_evas/ecore_evas_x11.h|   4 +
 src/lib/ecore_input/Ecore_Input.h  |  16 +
 src/lib/efl/interfaces/efl_canvas.eo   |   2 +
 src/lib/efl/interfaces/efl_input_device.c  |  19 +
 src/lib/efl/interfaces/efl_input_device.eo |   4 +-
 src/lib/evas/Evas_Common.h |  50 +-
 src/lib/evas/canvas/evas_device.c  |  44 +-
 src/modules/ecore_evas/engines/x/ecore_evas_x.c| 599 +
 .../software_x11/Evas_Engine_Software_X11.h|   1 +
 .../evas/engines/software_x11/evas_engine.c|  22 +
 .../evas/engines/software_x11/evas_engine.h|   7 +
 .../evas/engines/software_x11/evas_xcb_outbuf.c|  39 +-
 .../evas/engines/software_x11/evas_xlib_outbuf.c   |  35 +-
 19 files changed, 1130 insertions(+), 53 deletions(-)

-- 




[EGIT] [admin/devs] master 01/01: developers: add new pubkey for bdilly

2016-09-21 Thread Bruno Dilly
barbieri pushed a commit to branch master.

http://git.enlightenment.org/admin/devs.git/commit/?id=16f20461b092e4ba12e003b6852ef9af424a

commit 16f20461b092e4ba12e003b6852ef9af424a
Author: Bruno Dilly 
Date:   Wed Sep 21 15:28:01 2016 -0300

developers: add new pubkey for bdilly
---
 developers/bdilly/id_ed25519.pub | 1 +
 1 file changed, 1 insertion(+)

diff --git a/developers/bdilly/id_ed25519.pub b/developers/bdilly/id_ed25519.pub
new file mode 100644
index 000..2bc3fb9
--- /dev/null
+++ b/developers/bdilly/id_ed25519.pub
@@ -0,0 +1 @@
+ssh-ed25519 
C3NzaC1lZDI1NTE5IKx8HkXnjWd2VHxK85/lIAfcClYY8d0HNWdoCtGIBcbF 
bdilly@storm

-- 




[EGIT] [core/efl] master 02/02: ecore_con,elput: fix warnings

2016-09-20 Thread Bruno Dilly
cedric pushed a commit to branch master.

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

commit a3fba57b2616f78fbdab7b43ac8e8aea7c56475b
Author: Bruno Dilly 
Date:   Tue Sep 20 16:13:25 2016 -0700

ecore_con,elput: fix warnings

Summary:
elput: fix warning for unused write result
 ecore_con: fix warning for unused asprintf result

Reviewers: iscaro, devilhorns, cedric

Reviewed By: cedric

Subscribers: cedric, seoz, jpeg

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

Signed-off-by: Cedric BAIL 
---
 src/lib/ecore_con/ecore_con.c | 15 +++
 src/lib/elput/elput_logind.c  | 14 +-
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index cc17fe8..cb66b27 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -4487,11 +4487,18 @@ _efl_net_ip_connect_async_run(void *data, Ecore_Thread 
*thread EINA_UNUSED)
  * parameter must be a URL with schema, otherwise it won't
  * return anything.
  */
-char *url;
+Eina_Stringshare *url;
 
-asprintf(&url, "%s://%s:%s", d->protocol == IPPROTO_UDP ? "udp" : 
"tcp", host, port);
-proxies = ecore_con_libproxy_proxies_get(url);
-free(url);
+url = eina_stringshare_printf("%s://%s:%s", d->protocol == IPPROTO_UDP 
? "udp" : "tcp", host, port);
+if (!url)
+  {
+ ERR("Could not assemble URL");
+  }
+else
+  {
+ proxies = ecore_con_libproxy_proxies_get(url);
+ eina_stringshare_del(url);
+  }
  }
 
EINA_THREAD_CLEANUP_PUSH((Eina_Free_Cb)ecore_con_libproxy_proxies_free, 
proxies);
diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c
index 5d97a02..abe4a38 100644
--- a/src/lib/elput/elput_logind.c
+++ b/src/lib/elput/elput_logind.c
@@ -276,7 +276,19 @@ _logind_device_release(Elput_Manager *em, uint32_t major, 
uint32_t minor)
 static void
 _logind_pipe_write_fd(Elput_Manager *em, int fd)
 {
-   write(em->input.pipe, &fd, sizeof(int));
+   int ret;
+
+   while (1)
+ {
+ret = write(em->input.pipe, &fd, sizeof(int));
+if (ret < 0)
+  {
+ if ((errno == EAGAIN) || (errno == EINTR))
+   continue;
+ WRN("Failed to write to input pipe");
+  }
+break;
+ }
close(em->input.pipe);
em->input.pipe = -1;
 }

-- 




Re: [E-devel] [RFC] EFL Multi-seat

2016-09-14 Thread Bruno Dilly
Hi Cedric,

On Tue, Sep 13, 2016 at 8:17 PM, Cedric BAIL  wrote:

> Hello,
>
> On Tue, Sep 13, 2016 at 3:00 PM, Bruno Dilly 
> wrote:
> > We’re working on improve EFL to support multi-seat in the same
> application
> > window.
>

[...]


> >
> > Also could somebody please help us creating dev accounts for Iscaro and
> me?
> > So we could create dev branches and avoid keeping our work on external
> > repositories and making our workflow a bit more straightforward?
>
> Sure, we have the probie status for that purpose. With the large work
> to be done here, I don't think there is any problem to let you become
> probies. Please send me your info.txt properly filled and a ssh public
> keys. I will wait for a week before pushing it to let a chance to
> everyone to complain here if they feel like it is not motivated.
>
>
Mine in on devs/inactive/bdilly.
All data is still updated (weird, right?), including the public key.

Iscaro is going to send you his info soon.

Thanks

Also thank you and devilhorns for the comments.
We'll wait a bit for more comments and we'll send a new version of the RFC
taking everything on consideration.

Regards

[...]


-- 
Bruno Dilly
ProFUSION embedded systems
http://profusion.mobi
--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [RFC] EFL Multi-seat

2016-09-13 Thread Bruno Dilly
Hi folks,

We’re working on improve EFL to support multi-seat in the same application
window.

For make it doable, we’re considering the following approaches:

   -

   When using Wayland (Weston compositor) just get seat information from it
   -

   When using X11 or FB, use VNC server to gather multiple seats mapped to
   remote clients


To make it possible, the following changes on Evas, Ecore_Evas, Ecore and
Ecore_Wl2 APIs are proposed. Please let us read your comments about it  =)

After this work is done we’ll support it on Edje, but it’s not covered by
this discussion (we’ll send another RFC if it seems required at the time).

Some tests and PoC were written on this repository:

https://github.com/profusion/multi-seat-tests/

Also could somebody please help us creating dev accounts for Iscaro and me?
So we could create dev branches and avoid keeping our work on external
repositories and making our workflow a bit more straightforward?

Thanks in advance


= Changes on Evas =

   -

   _Evas_Public_Data should contain a hash indexed by seat of focused
   Evas_Objects. From “pd->focused” to “pd->focused[seat]”.
   -

   A function similar to evas_object_top_at_pointer_get(const Evas *e)
   should be added. This new function will receive the Efl_Input_Device (the
   seat) as argument. The old function should return the top Evas_Object
   according to the default seat
   -

   evas_canvas_focus_get() should return the object focused by the default
   seat.
   -

   evas_canvas_pointer_canvas_xy_get() Should return the XY from the
   default seat.
   -

   evas_canvas_seat_pointer_canvas_xy_get() - Same thing as
   evas_canvas_pointer_canvas_xy_get(), however it returns the XY based on the
   seat.
   -

   evas_object_focus_set() - Will set/unset the focus only for the default
   seat.
   -

   evas_object_focus_by_seat_set() should be added
   -

   evas_event_feed_hold - Will act in the default seat
   -

   Add evas_event_feed_hold_by_seat() - Should we support this ?
   -

   Add evas_device_seat_get(Evas_Device *dev);
   -

  We may create a helper function in Efl_Input_Device::seat_get
  -

   All evas_event_* functions will work on the top most seat. So in order
   to add an event for ‘seat 1’ one should do: evas_device_push(evas,
   seatOne); evas_event_*(); evas_device_pop(evas);
   -

   Evas will automatically create Evas_Devices



= Changes on Ecore_Evas =

   -

   ecore_evas_x11_vnc_server_enabled(Ecore_Evas *ee, bool enable); -> This
   will enable vnc server for the ecore_evas x11 module.
   -

   The struct _Ecore_Evas_Interface_X11 should contain a new function with
   the following signature Eina_Bool _setup_vnc_server() that will create the
   vnc server and start listening for clients.
   -

   ecore_evas_x11_vnc_server_addr_set(Ecore_Evas *ee, const char *addr);
   -

   ecore_evas_x11_vnc_server_accept_cb_set(Ecore_Evas *ee, Cb accept_cb);
   -

   Ecore_Evas_x11 will create Efl_Input_Devices for every new user and set
   the emulated seat.
   -

   In case of x11 - For every new vnc client an Efl_Input_Device will be
   created and added to the Evas canvas.



= Changes on Evas x11 engine =

   -

   A callback will be created in order to notify the ecore_evas_x11 backend
   with the modified pixels. This will be used to properly draw the VNC remote
   screen.



= Changes on Ecore_Wl2 =

   -

   In _Ecore_Wl2_Input - a Eina_Stringshare * will be added to the wl
   substruct. This Eina_Stringshare * will represent the seat name.
   -

   Implement the _seat_cb_name() function in order to collect the seat name.
   -

   For every wl_pointer/wl_keyboard/wl_seat it will be create an
   Efl_Input_Device. The wl_pointer and wl_keyboard will have the wl_seat as
   parent. After creation of these Efl_Input_Devices an ecore_event will be
   generated, so ecore_evas_input can grab it and properly add the devices
   into the canvas.



= Ecore =

   -

   Ecore_Events structs should contain the Efl_Input_Device that originated
   the event.


   -

   These functions may be useful:
   -

  Eina_List *ecore_input_get_seats() - Return all the available seats
  -

  Ecore_Seat * ecore_input_seat_find(const char *name)



-- 
Bruno Dilly
ProFUSION embedded systems
http://profusion.mobi
--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] edbus - Annoying inconsistency

2013-04-18 Thread Bruno Dilly
> >> >>>>>>>>>
>> > >> >>>>>>>>>
>> > >> >>>>>>>>>
>> > >> >>>>>>>>> I understand putting the 2 was needed, but if we add it
>> once,
>> > >> >>>>>>>>> we should add
>> > >> >>>>>>>>> it everywhere. It's annoyingly inconsistent.
>> > >> >>>>>>>>>
>> > >> >>>>>>>>> Why did you choose 2 then? Why not 4? Or A? You chose 2
>> > >> >>>>>>>>> because it's the
>> > >> >>>>>>>>> best explanation, as it is, although mostly unrelated,
>> e_dbus
>> > >> >>>>>>>>> v2. And if
>> > >> >>>>>>>>
>> > >> >>>>>>>>
>> > >> >>>>>>>> because it was not me is the best explanation.
>> > >> >>>>>>>>
>> > >> >>>>>>>>> that's good enough there, it's good enough everywhere.
>> > >> >>>>>>>>>
>> > >> >>>>>>>>> In conclusion, I see no harm in using edbus2 all around the
>> > >> >>>>>>>>> place.
>> > >> >>>>>>>>
>> > >> >>>>>>>>
>> > >> >>>>>>>> it's not good enough there, even less everywhere.  The
>> visible
>> > >> >>>>>>>> part to the developer is the include path and the namespace.
>> > >> >>>>>>>> And these should reflect the library name. If anything change
>> > >> >>>>>>>> everything to something else, but don't put the 2 there.
>> > >> >>>>>>>
>> > >> >>>>>>>
>> > >> >>>>>>>
>> > >> >>>>>>> Let's wait to see what others think, as we disagree about the
>> > >> >>>>>>> source of the problem, and that's: is this a major
>> > >> >>>>>>> inconsistency that should be solved.
>> > >> >>>>>>>
>> > >> >>>>>>> Anyhow, regarding different names: I suggest edbus2.
>> > >> >>>>>>>
>> > >> >>>>>>> --
>> > >> >>>>>>> Tom.
>> > >> >>>>>>>
>> > >> >>>>>>>
>> > >> >>>>>>> 
>> > >> >>>>>>>
>> > >> >>>>>>> Precog is a next-generation analytics platform capable of
>> > >> >>>>>>> advanced analytics on semi-structured data. The platform
>> > >> >>>>>>> includes APIs for building apps and a phenomenal toolset for
>> > >> >>>>>>> data science. Developers can use our toolset for easy data
>> > >> >>>>>>> analysis & visualization. Get a free account!
>> > >> >>>>>>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> > >> >>>>>>> 
>> > >> >>>>>>>
>> > >> >>>>>>> enlightenment-devel mailing list
>> > >> >>>>>>> enlightenment-devel@lists.sourceforge.net
>> > >> >>>>>>>
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> > >> >>>>>>
>> > >> >>>>>>
>> > >> >>>>>> I agree with whatever demarchi says.
>> > >> >>>>>
>> > >> >>>>> I disagree.
>> > >> >>>>>
>> > >> >>>>>
>> > >> >>>>> oh, wait...
>> > >> >>>>>
>> > >> >>>>> Lucas De Marchi
>> > >> >>>>
>> > >> >>>> :-P ... i have to say though - consistency is good. not just for
>> > >> >>>> devs, but packagers and anyone looking at their filesystem. if
>> > >> >>>> things are named in a consistent pattern it is easy to know what
>> > >> >>>> belongs where without needing package databases or other
>> forensics
>> > >> >>>> tools.
>> > >> >>>
>> > >> >>> Sure it's good, no doubt. Just that renaming to edbus2 for the
>> sake of
>> > >> >>> consistency is even worse, not because of the rename, but because
>> of
>> > >> >>> the name chosen.
>> > >> >>>
>> > >> >>> ebus? anyone?
>> > >> >>
>> > >> >> The name of the ebus goes 'round and 'round.
>> > >> >
>> > >> > As we all like E, I suggest edeebus
>> > >>
>> > >> +1 from me.
>> > >
>> > > For the fun I will give a +1 to edeebus to !
>> > >
>> >
>> > +1 from me too.
>>
>> What about eldbus?
>>
>
>
> +3 for eldbus
>
> and you can count +1 from sachiel, since he is spanish or something like
> that
>
>

lol
El D-Bus es un buen nombrecito.

>
>>
>> Lucas De Marchi
>>
>> >
>> > --
>> > Rafael Antognolli
>> > http://antognolli.org/
>> >
>> >
>>
>> --
>> > Precog is a next-generation analytics platform capable of advanced
>> > analytics on semi-structured data. The platform includes APIs for
>> building
>> > apps and a phenomenal toolset for data science. Developers can use
>> > our toolset for easy data analysis & visualization. Get a free account!
>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> > ___
>> > enlightenment-devel mailing list
>> > enlightenment-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>> --
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> ___
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>
>
>
> --
> Luís Felipe Strano Moraes
> http://www.strano.org
> --
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



--
Bruno Dilly
Lead Developer
ProFUSION embedded systems
http://profusion.mobi

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


  1   2   3   4   >