[EGIT] [core/efl] master 01/01: Eo composite: change composite objects to not be tied to parent

2016-05-05 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 537b138a2328008c16cf54401dc442bd6c8d11c5
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu May 5 16:08:08 2016 +0100

Eo composite: change composite objects to not be tied to parent

This commit breaks behaviour!
Re-parenting no longer detaches composite objects, so watch out.

Now you can have an object be a composite object of an object although
it's not its child. This allows widgets to do things like having an
object as the child of a child object while still making it a composite
object to the main object.

With this change, composite objects don't keep a reference to the child,
but instead composite "bonds" are implicitly removed when either the
parent or the child are destructed.
---
 src/lib/eo/eo_base_class.c   | 62 +---
 src/lib/eo/eo_private.h  |  1 -
 src/tests/eo/suite/eo_test_general.c | 18 +--
 3 files changed, 59 insertions(+), 22 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 1cbb644..f8f1814 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -19,6 +19,7 @@ typedef struct
 {
const char*id;
const char*comment;
+   Eo*composite_parent;
Eina_Inlist   *generic_data;
Eo  ***wrefs;
 } Eo_Base_Extension;
@@ -82,7 +83,7 @@ _eo_base_extension_noneed(Eo_Base_Data *pd)
 {
Eo_Base_Extension *ext = pd->ext;
if ((!ext) || (ext->id) || (ext->comment) || (ext->generic_data) ||
-   (ext->wrefs)) return;
+   (ext->wrefs) || (ext->composite_parent)) return;
_eo_base_extension_free(pd->ext);
pd->ext = NULL;
 }
@@ -478,11 +479,6 @@ _eo_base_parent_set(Eo *obj, Eo_Base_Data *pd, Eo 
*parent_id)
if (pd->parent == parent_id)
  return;
 
-   if (eo_composite_part_is(obj) && pd->parent)
- {
-eo_composite_detach(pd->parent, obj);
- }
-
if (pd->parent)
  {
 Eo_Base_Data *old_parent_pd;
@@ -1236,23 +1232,34 @@ _eo_base_composite_attach(Eo *parent_id, Eo_Base_Data 
*pd EINA_UNUSED, Eo *comp_
EO_OBJ_POINTER_RETURN_VAL(comp_obj_id, comp_obj, EINA_FALSE);
EO_OBJ_POINTER_RETURN_VAL(parent_id, parent, EINA_FALSE);
 
-   if (!eo_isa(parent_id, _eo_class_id_get(comp_obj->klass))) return 
EINA_FALSE;
+   if (!eo_isa(parent_id, _eo_class_id_get(comp_obj->klass)))
+ {
+return EINA_FALSE;
+ }
 
+   Eo_Base_Data *comp_pd = eo_data_scope_get(comp_obj_id, EO_BASE_CLASS);
+   /* Don't composite if we already have a composite object of this type */
  {
 Eina_List *itr;
 Eo *emb_obj_id;
 EINA_LIST_FOREACH(parent->composite_objects, itr, emb_obj_id)
   {
  EO_OBJ_POINTER_RETURN_VAL(emb_obj_id, emb_obj, EINA_FALSE);
- if(emb_obj->klass == comp_obj->klass)
+ if (emb_obj->klass == comp_obj->klass)
return EINA_FALSE;
   }
  }
 
-   comp_obj->composite = EINA_TRUE;
-   parent->composite_objects = eina_list_prepend(parent->composite_objects, 
comp_obj_id);
+   if (eo_composite_part_is(comp_obj_id))
+ {
+eo_composite_detach(comp_pd->ext->composite_parent, comp_obj_id);
+ }
+
+   /* Set the parent comp on the child. */
+   _eo_base_extension_need(comp_pd);
+   comp_pd->ext->composite_parent = parent_id;
 
-   eo_parent_set(comp_obj_id, parent_id);
+   parent->composite_objects = eina_list_prepend(parent->composite_objects, 
comp_obj_id);
 
return EINA_TRUE;
 }
@@ -1263,22 +1270,25 @@ _eo_base_composite_detach(Eo *parent_id, Eo_Base_Data 
*pd EINA_UNUSED, Eo *comp_
EO_OBJ_POINTER_RETURN_VAL(comp_obj_id, comp_obj, EINA_FALSE);
EO_OBJ_POINTER_RETURN_VAL(parent_id, parent, EINA_FALSE);
 
-   if (!comp_obj->composite)
+   if (!eo_composite_part_is(comp_obj_id))
   return EINA_FALSE;
 
-   comp_obj->composite = EINA_FALSE;
parent->composite_objects = eina_list_remove(parent->composite_objects, 
comp_obj_id);
-   eo_parent_set(comp_obj_id, NULL);
+   /* Clear the comp parent on the child. */
+ {
+Eo_Base_Data *comp_pd = eo_data_scope_get(comp_obj_id, EO_BASE_CLASS);
+comp_pd->ext->composite_parent = NULL;
+
+_eo_base_extension_noneed(comp_pd);
+ }
 
return EINA_TRUE;
 }
 
 EOLIAN static Eina_Bool
-_eo_base_composite_part_is(Eo *comp_obj_id, Eo_Base_Data *pd EINA_UNUSED)
+_eo_base_composite_part_is(Eo *comp_obj_id EINA_UNUSED, Eo_Base_Data *pd)
 {
-   EO_OBJ_POINTER_RETURN_VAL(comp_obj_id, comp_obj, EINA_FALSE);
-
-   return comp_obj->composite;
+   return pd->ext && pd->ext->composite_parent;
 }
 
 /* Eo_Dbg */
@@ -1408,6 +1418,22 

[EGIT] [core/efl] master 01/01: Eo define class: Don't force EWAPI for class_get().

2016-05-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 9fca3f7a147287b30482d4f7923b891bade2128f
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue May 3 09:53:43 2016 +0100

Eo define class: Don't force EWAPI for class_get().

Because we were forcing EWAPI in this macro, one couldn't create a class
that is "static" or even just private or the module. The symbol was
always exposed.
Since in C the attributes of a function are set based on the first
declaration, we don't need to specify any attributes in this macro and
we can just rely on them being specified in the declaration. So for
example, for class "foo":

foo.h:
EWAPI const Eo_Class *foo_class_get(...);

foo.c:
const Eo_Class *foo_class_get(...);

Would give the desired results, a class would be EWAPI. This is already
done automatically for all of the classes using Eolian. Because of the
lack of specifiers, the default visibility will now be the default
visibility based on compiler flags and settings.

Thanks to JP for reporting this issue.

This can potentially (but very unlikely) break things.
---
 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 be78f81..6152d4f 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -313,7 +313,7 @@ typedef unsigned int Eo_Op;
  * You must use this macro if you want thread safety in class creation.
  */
 #define EO_DEFINE_CLASS(class_get_func_name, class_desc, parent_class, ...) \
-EWAPI const Eo_Class * \
+const Eo_Class * \
 class_get_func_name(void) \
 { \
const Eo_Class *_tmp_parent_class; \

-- 




[EGIT] [core/efl] master 02/04: Eo keyed data: No need to register to see if a subobject was deleted.

2016-04-29 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 9195d008dad901645bebfc83e240649c6b4c69e0
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Apr 29 13:13:00 2016 +0100

Eo keyed data: No need to register to see if a subobject was deleted.

This is completely unnecessary. We are holding a reference to the
object, it can't get deleted under our feet.
---
 src/lib/eo/eo_base_class.c | 50 +-
 1 file changed, 5 insertions(+), 45 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 85ed41b..75967bf 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -95,36 +95,8 @@ _eo_generic_data_node_free(Eo_Generic_Data_Node *node)
free(node);
 }
 
-static Eina_Bool
-_eo_base_cb_key_obj_del(void *data, const Eo_Event *event)
-{
-   Eo *parent_obj = data;
-   Eo_Base_Data *pd = eo_data_scope_get(parent_obj, EO_BASE_CLASS);
-
-   if (pd)
- {
-Eo_Generic_Data_Node *node;
-Eo_Base_Extension *ext = pd->ext;
-
-if (!ext) return EINA_TRUE;
-EINA_INLIST_FOREACH(ext->generic_data, node)
-  {
- if ((node->d_type == DATA_OBJ) && (node->d.obj == event->obj))
-   {
-  ext->generic_data = eina_inlist_remove
-(ext->generic_data, EINA_INLIST_GET(node));
-  eo_event_callback_del(node->d.obj, EO_BASE_EVENT_DEL,
-_eo_base_cb_key_obj_del, data);
-  _eo_generic_data_node_free(node);
-  break;
-   }
-  }
- }
-   return EINA_TRUE;
-}
-
 static void
-_eo_generic_data_del_all(Eo *obj, Eo_Base_Data *pd)
+_eo_generic_data_del_all(Eo *obj EINA_UNUSED, Eo_Base_Data *pd)
 {
Eo_Generic_Data_Node *node;
Eo_Base_Extension *ext = pd->ext;
@@ -137,8 +109,6 @@ _eo_generic_data_del_all(Eo *obj, Eo_Base_Data *pd)
EINA_INLIST_GET(node));
 if (node->d_type == DATA_OBJ)
   {
- eo_event_callback_del(node->d.obj, EO_BASE_EVENT_DEL,
-   _eo_base_cb_key_obj_del, obj);
  eo_unref(node->d.obj);
   }
 else if (node->d_type == DATA_VAL) eina_value_free(node->d.val);
@@ -147,7 +117,7 @@ _eo_generic_data_del_all(Eo *obj, Eo_Base_Data *pd)
 }
 
 EOLIAN static void
-_eo_base_key_data_set(Eo *obj, Eo_Base_Data *pd, const char *key, const void 
*data)
+_eo_base_key_data_set(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key, 
const void *data)
 {
Eo_Generic_Data_Node *node;
Eo_Base_Extension *ext = pd->ext;
@@ -165,8 +135,6 @@ _eo_base_key_data_set(Eo *obj, Eo_Base_Data *pd, const char 
*key, const void *da
 (ext->generic_data, EINA_INLIST_GET(node));
   if (node->d_type == DATA_OBJ)
 {
-   eo_event_callback_del(node->d.obj, EO_BASE_EVENT_DEL,
- _eo_base_cb_key_obj_del, obj);
eo_unref(node->d.obj);
 }
   else if (node->d_type == DATA_VAL) 
eina_value_free(node->d.val);
@@ -220,7 +188,7 @@ _eo_base_key_data_get(const Eo *obj, Eo_Base_Data *pd, 
const char *key)
 }
 
 EOLIAN static void
-_eo_base_key_del(Eo *obj, Eo_Base_Data *pd, const char *key)
+_eo_base_key_del(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key)
 {
Eo_Generic_Data_Node *node;
Eo_Base_Extension *ext = pd->ext;
@@ -235,8 +203,6 @@ _eo_base_key_del(Eo *obj, Eo_Base_Data *pd, const char *key)
(ext->generic_data, EINA_INLIST_GET(node));
  if (node->d_type == DATA_OBJ)
{
-  eo_event_callback_del(node->d.obj, EO_BASE_EVENT_DEL,
-_eo_base_cb_key_obj_del, obj);
   eo_unref(node->d.obj);
}
  else if (node->d_type == DATA_VAL) eina_value_free(node->d.val);
@@ -247,7 +213,7 @@ _eo_base_key_del(Eo *obj, Eo_Base_Data *pd, const char *key)
 }
 
 EOLIAN static void
-_eo_base_key_obj_set(Eo *obj, Eo_Base_Data *pd, const char *key, Eo *objdata)
+_eo_base_key_obj_set(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key, 
Eo *objdata)
 {
Eo_Generic_Data_Node *node;
Eo_Base_Extension *ext = pd->ext;
@@ -264,8 +230,6 @@ _eo_base_key_obj_set(Eo *obj, Eo_Base_Data *pd, const char 
*key, Eo *objdata)
 (ext->generic_data, EINA_INLIST_GET(node));
   if (node->d_type == DATA_OBJ)
 {
-   eo_event_callback_del(node->d.obj, EO_BASE_EVENT_DEL,
- _eo_base_cb_key_obj_del, obj);

[EGIT] [core/efl] master 03/04: Eo keyed data: Unify node cleanup code.

2016-04-29 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 0730152deb57749b78d378213bf2f7565390bb6e
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Apr 29 13:20:21 2016 +0100

Eo keyed data: Unify node cleanup code.
---
 src/lib/eo/eo_base_class.c | 40 ++--
 1 file changed, 14 insertions(+), 26 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 75967bf..c397c82 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -91,6 +91,17 @@ _eo_base_extension_noneed(Eo_Base_Data *pd)
 static void
 _eo_generic_data_node_free(Eo_Generic_Data_Node *node)
 {
+   switch (node->d_type)
+ {
+  case DATA_OBJ:
+ eo_unref(node->d.obj);
+ break;
+  case DATA_VAL:
+ eina_value_free(node->d.val);
+ break;
+  case DATA_PTR:
+ break;
+ }
eina_stringshare_del(node->key);
free(node);
 }
@@ -102,16 +113,13 @@ _eo_generic_data_del_all(Eo *obj EINA_UNUSED, 
Eo_Base_Data *pd)
Eo_Base_Extension *ext = pd->ext;
 
if (!ext) return;
+
while (ext->generic_data)
  {
 node = (Eo_Generic_Data_Node *)ext->generic_data;
 ext->generic_data = eina_inlist_remove(ext->generic_data,
-   EINA_INLIST_GET(node));
-if (node->d_type == DATA_OBJ)
-  {
- eo_unref(node->d.obj);
-  }
-else if (node->d_type == DATA_VAL) eina_value_free(node->d.val);
+  EINA_INLIST_GET(node));
+
 _eo_generic_data_node_free(node);
  }
 }
@@ -133,11 +141,6 @@ _eo_base_key_data_set(Eo *obj EINA_UNUSED, Eo_Base_Data 
*pd, const char *key, co
  return;
   ext->generic_data = eina_inlist_remove
 (ext->generic_data, EINA_INLIST_GET(node));
-  if (node->d_type == DATA_OBJ)
-{
-   eo_unref(node->d.obj);
-}
-  else if (node->d_type == DATA_VAL) 
eina_value_free(node->d.val);
   _eo_generic_data_node_free(node);
   break;
}
@@ -201,11 +204,6 @@ _eo_base_key_del(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, 
const char *key)
   {
  ext->generic_data = eina_inlist_remove
(ext->generic_data, EINA_INLIST_GET(node));
- if (node->d_type == DATA_OBJ)
-   {
-  eo_unref(node->d.obj);
-   }
- else if (node->d_type == DATA_VAL) eina_value_free(node->d.val);
  _eo_generic_data_node_free(node);
  return;
   }
@@ -228,11 +226,6 @@ _eo_base_key_obj_set(Eo *obj EINA_UNUSED, Eo_Base_Data 
*pd, const char *key, Eo
   if ((node->d_type == DATA_OBJ) && (node->d.obj == objdata)) 
return;
   ext->generic_data = eina_inlist_remove
 (ext->generic_data, EINA_INLIST_GET(node));
-  if (node->d_type == DATA_OBJ)
-{
-   eo_unref(node->d.obj);
-}
-  else if (node->d_type == DATA_VAL) 
eina_value_free(node->d.val);
   _eo_generic_data_node_free(node);
   break;
}
@@ -299,11 +292,6 @@ _eo_base_key_value_set(Eo *obj EINA_UNUSED, Eo_Base_Data 
*pd, const char *key, E
   if ((node->d_type == DATA_VAL) && (node->d.val == value)) 
return;
   ext->generic_data = eina_inlist_remove
 (ext->generic_data, EINA_INLIST_GET(node));
-  if (node->d_type == DATA_OBJ)
-{
-   eo_unref(node->d.obj);
-}
-  else if (node->d_type == DATA_VAL) 
eina_value_free(node->d.val);
   _eo_generic_data_node_free(node);
   break;
}

-- 




[EGIT] [core/efl] master 01/04: Eo keyed data: Clean up code and fix a bug with 'Value'.

2016-04-29 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 393ca3c3f94e2a7c834c3c580e0541bb8f9ef107
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Apr 29 13:08:07 2016 +0100

Eo keyed data: Clean up code and fix a bug with 'Value'.

This code is an absolute mess. This is the first step towards fixing that.
This cleanup let me find a bug that would have printed errors when using
Eina_Value so I fixed that too.
---
 src/lib/eo/eo_base_class.c | 95 --
 1 file changed, 50 insertions(+), 45 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index d2c7168..85ed41b 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -43,9 +43,16 @@ typedef struct
 {
EINA_INLIST;
Eina_Stringshare  *key;
-   void  *data;
-   Eina_Bool  data_is_obj : 1;
-   Eina_Bool  data_is_value : 1;
+   union {
+Eina_Value *val;
+Eo *obj;
+void *ptr;
+   } d;
+   enum {
+DATA_PTR,
+DATA_OBJ,
+DATA_VAL
+   } d_type;
 } Eo_Generic_Data_Node;
 
 typedef struct
@@ -102,11 +109,11 @@ _eo_base_cb_key_obj_del(void *data, const Eo_Event *event)
 if (!ext) return EINA_TRUE;
 EINA_INLIST_FOREACH(ext->generic_data, node)
   {
- if ((node->data_is_obj) && (node->data == event->obj))
+ if ((node->d_type == DATA_OBJ) && (node->d.obj == event->obj))
{
   ext->generic_data = eina_inlist_remove
 (ext->generic_data, EINA_INLIST_GET(node));
-  eo_event_callback_del(node->data, EO_BASE_EVENT_DEL,
+  eo_event_callback_del(node->d.obj, EO_BASE_EVENT_DEL,
 _eo_base_cb_key_obj_del, data);
   _eo_generic_data_node_free(node);
   break;
@@ -128,13 +135,13 @@ _eo_generic_data_del_all(Eo *obj, Eo_Base_Data *pd)
 node = (Eo_Generic_Data_Node *)ext->generic_data;
 ext->generic_data = eina_inlist_remove(ext->generic_data,
EINA_INLIST_GET(node));
-if (node->data_is_obj)
+if (node->d_type == DATA_OBJ)
   {
- eo_event_callback_del(node->data, EO_BASE_EVENT_DEL,
+ eo_event_callback_del(node->d.obj, EO_BASE_EVENT_DEL,
_eo_base_cb_key_obj_del, obj);
- eo_unref(node->data);
+ eo_unref(node->d.obj);
   }
-else if (node->data_is_value) eina_value_free(node->data);
+else if (node->d_type == DATA_VAL) eina_value_free(node->d.val);
 _eo_generic_data_node_free(node);
  }
 }
@@ -152,17 +159,17 @@ _eo_base_key_data_set(Eo *obj, Eo_Base_Data *pd, const 
char *key, const void *da
   {
  if (!strcmp(node->key, key))
{
-  if ((!node->data_is_obj) && (!node->data_is_value) &&
-  (node->data == data)) return;
+  if ((node->d_type == DATA_PTR) && (node->d.ptr == data))
+ return;
   ext->generic_data = eina_inlist_remove
 (ext->generic_data, EINA_INLIST_GET(node));
-  if (node->data_is_obj)
+  if (node->d_type == DATA_OBJ)
 {
-   eo_event_callback_del(node->data, EO_BASE_EVENT_DEL,
+   eo_event_callback_del(node->d.obj, EO_BASE_EVENT_DEL,
  _eo_base_cb_key_obj_del, obj);
-   eo_unref(node->data);
+   eo_unref(node->d.obj);
 }
-  else if (node->data_is_value) eina_value_free(node->data);
+  else if (node->d_type == DATA_VAL) 
eina_value_free(node->d.val);
   _eo_generic_data_node_free(node);
   break;
}
@@ -176,8 +183,8 @@ _eo_base_key_data_set(Eo *obj, Eo_Base_Data *pd, const char 
*key, const void *da
 node = calloc(1, sizeof(Eo_Generic_Data_Node));
 if (!node) return;
 node->key = eina_stringshare_add(key);
-node->data = (void *)data;
-node->data_is_obj = EINA_FALSE;
+node->d.ptr = (void *)data;
+node->d_type = DATA_PTR;
 ext->generic_data = eina_inlist_prepend
   (ext->generic_data, EINA_INLIST_GET(node));
  }
@@ -195,11 +202,11 @@ _eo_base_key_data_get(const Eo *obj, Eo_Base_Data *pd, 
const char *key)
  {
 if (!strcmp(node->key, key))
   {
- if ((!node->d

[EGIT] [core/efl] master 04/04: Eo keyed data: Refactor the code so it's mostly shared.

2016-04-29 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 42346e22f4c06634e180c44cf63924dbc50a5184
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Apr 29 13:43:36 2016 +0100

Eo keyed data: Refactor the code so it's mostly shared.

The code was redundant though essentially the same. This refactoring
removes a lot of this code and made everything shared.
---
 src/lib/eo/eo_base_class.c | 190 -
 1 file changed, 51 insertions(+), 139 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index c397c82..34ab13c 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -39,6 +39,12 @@ typedef struct
Eina_Bool  deletions_waiting : 1;
 } Eo_Base_Data;
 
+typedef enum {
+ DATA_PTR,
+ DATA_OBJ,
+ DATA_VAL
+} Eo_Generic_Data_Node_Type;
+
 typedef struct
 {
EINA_INLIST;
@@ -48,11 +54,7 @@ typedef struct
 Eo *obj;
 void *ptr;
} d;
-   enum {
-DATA_PTR,
-DATA_OBJ,
-DATA_VAL
-   } d_type;
+   Eo_Generic_Data_Node_Type  d_type;
 } Eo_Generic_Data_Node;
 
 typedef struct
@@ -125,72 +127,6 @@ _eo_generic_data_del_all(Eo *obj EINA_UNUSED, Eo_Base_Data 
*pd)
 }
 
 EOLIAN static void
-_eo_base_key_data_set(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key, 
const void *data)
-{
-   Eo_Generic_Data_Node *node;
-   Eo_Base_Extension *ext = pd->ext;
-
-   if (!key) return;
-   if (ext)
- {
-EINA_INLIST_FOREACH(ext->generic_data, node)
-  {
- if (!strcmp(node->key, key))
-   {
-  if ((node->d_type == DATA_PTR) && (node->d.ptr == data))
- return;
-  ext->generic_data = eina_inlist_remove
-(ext->generic_data, EINA_INLIST_GET(node));
-  _eo_generic_data_node_free(node);
-  break;
-   }
-  }
- }
-
-   _eo_base_extension_need(pd);
-   ext = pd->ext;
-   if (ext)
- {
-node = calloc(1, sizeof(Eo_Generic_Data_Node));
-if (!node) return;
-node->key = eina_stringshare_add(key);
-node->d.ptr = (void *)data;
-node->d_type = DATA_PTR;
-ext->generic_data = eina_inlist_prepend
-  (ext->generic_data, EINA_INLIST_GET(node));
- }
-}
-
-EOLIAN static void *
-_eo_base_key_data_get(const Eo *obj, Eo_Base_Data *pd, const char *key)
-{
-   Eo_Generic_Data_Node *node;
-   Eo_Base_Extension *ext = pd->ext;
-
-   if (!key) return NULL;
-   if (!ext) return NULL;
-   EINA_INLIST_FOREACH(ext->generic_data, node)
- {
-if (!strcmp(node->key, key))
-  {
- if (node->d_type == DATA_PTR)
-   {
-  ext->generic_data = eina_inlist_promote
-(ext->generic_data, EINA_INLIST_GET(node));
-  return node->d.ptr;
-   }
- else
-   {
-  ERR("Object %p key '%s' wants raw data but is not raw data",
-  obj, key);
-  return NULL;
-   }
-  }
- }
-   return NULL;
-}
-
-EOLIAN static void
 _eo_base_key_del(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key)
 {
Eo_Generic_Data_Node *node;
@@ -210,20 +146,22 @@ _eo_base_key_del(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, 
const char *key)
  }
 }
 
-EOLIAN static void
-_eo_base_key_obj_set(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key, 
Eo *objdata)
+/* Return TRUE if the object was newly added. */
+static Eina_Bool
+_key_generic_set(const Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key, 
const void *data, Eo_Generic_Data_Node_Type d_type)
 {
Eo_Generic_Data_Node *node;
Eo_Base_Extension *ext = pd->ext;
 
-   if (!key) return;
+   if (!key) return EINA_FALSE;
if (ext)
  {
 EINA_INLIST_FOREACH(ext->generic_data, node)
   {
  if (!strcmp(node->key, key))
{
-  if ((node->d_type == DATA_OBJ) && (node->d.obj == objdata)) 
return;
+  if ((node->d_type == d_type) && (node->d.ptr == data))
+ return EINA_FALSE;
   ext->generic_data = eina_inlist_remove
 (ext->generic_data, EINA_INLIST_GET(node));
   _eo_generic_data_node_free(node);
@@ -237,18 +175,20 @@ _eo_base_key_obj_set(Eo *obj EINA_UNUSED, Eo_Base_Data 
*pd, const char *key, Eo
if (ext)
  {
 node = calloc(1, sizeof(Eo_Generic_Data_Node));
-if (!node) return;
+if (!node) return EINA_FALSE;
 node->key = eina_stringshare_add(key);
-node->d.obj = objdata;
-node->d_type = DATA_OBJ;
-eo_ref(node->d.o

[EGIT] [core/efl] master 01/01: Elm combobox: composite attach objects after reparenting.

2016-04-28 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 46ac246a3195721bd207300c5db14e7aac593686
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Apr 28 15:54:34 2016 +0100

Elm combobox: composite attach objects after reparenting.

This fixes the segfault reported by Jack.

The problem was that the object was being reparented and thus
removed from the composition and never added back.
---
 src/lib/elementary/elc_combobox.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elc_combobox.c 
b/src/lib/elementary/elc_combobox.c
index 792017e..c347b1e 100644
--- a/src/lib/elementary/elc_combobox.c
+++ b/src/lib/elementary/elc_combobox.c
@@ -380,7 +380,6 @@ _elm_combobox_multiple_selection_set(Eo *obj, 
Elm_Combobox_Data *pd,
 elm_object_part_text_set(pd->mbe, "guide", 
elm_object_part_text_get(pd->entry,
  "guide"));
 evas_object_hide(pd->entry);
-eo_composite_attach(obj, pd->mbe);
 
 scr = elm_scroller_add(obj);
 elm_scroller_bounce_set(scr, EINA_FALSE, EINA_TRUE);
@@ -391,6 +390,8 @@ _elm_combobox_multiple_selection_set(Eo *obj, 
Elm_Combobox_Data *pd,
 elm_object_content_set(scr, pd->mbe);
 elm_object_part_content_set(obj, "elm.swallow.content", scr);
 elm_widget_can_focus_set(pd->genlist, EINA_FALSE);
+
+eo_composite_attach(obj, pd->mbe);
  }
else
  {
@@ -402,6 +403,8 @@ _elm_combobox_multiple_selection_set(Eo *obj, 
Elm_Combobox_Data *pd,
 elm_widget_can_focus_set(pd->genlist, EINA_TRUE);
 elm_genlist_item_bring_in(pd->item, ELM_GENLIST_ITEM_SCROLLTO_NONE);
 evas_object_hide(scr);
+
+eo_composite_attach(obj, pd->entry);
  }
 }
 
@@ -481,10 +484,11 @@ _elm_combobox_eo_base_constructor(Eo *obj, 
Elm_Combobox_Data *sd)
eo_event_callback_array_add(entry, entry_callbacks(), obj);
evas_object_show(entry);
 
+   elm_object_part_content_set(obj, "elm.swallow.content", entry);
+
eo_composite_attach(obj, gl);
eo_composite_attach(obj, entry);
 
-   elm_object_part_content_set(obj, "elm.swallow.content", entry);
return obj;
 }
 

-- 




[EGIT] [core/efl] master 02/02: Eo tests: Mark unused variables as such.

2016-04-26 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 7c4fce78df5ff6fbd0c70a51312b6d7ce6a5693b
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Apr 26 16:22:37 2016 +0100

Eo tests: Mark unused variables as such.
---
 src/tests/eo/signals/signals_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/eo/signals/signals_main.c 
b/src/tests/eo/signals/signals_main.c
index 5d8839f..496e107 100644
--- a/src/tests/eo/signals/signals_main.c
+++ b/src/tests/eo/signals/signals_main.c
@@ -34,7 +34,7 @@ static Eina_Bool inside = EINA_FALSE;
 static int called = 0;
 
 static Eina_Bool
-_restart_1_cb(void *data, const Eo_Event *event)
+_restart_1_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
 {
fprintf(stderr, "restart 1 inside: %i\n", inside);
fail_if(!inside);

-- 




[EGIT] [core/efl] master 01/02: Eo: Make eo_del() an eo function.

2016-04-26 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 106951a61de97459a1cc9cdc248408e204c061dc
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Apr 26 16:19:44 2016 +0100

Eo: Make eo_del() an eo function.

This was done following a feature request by @raster. There was no real
reason for it not to be an eo function and this gives us more
flexibility.

The reason why this done was to provide a way for classes to do special
things when an object deletion was requested, for example in the case of
Evas, hide the object.
---
 src/lib/eo/Eo.h| 12 
 src/lib/eo/eo.c| 13 -
 src/lib/eo/eo_base.eo  |  9 +
 src/lib/eo/eo_base_class.c | 12 
 4 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 1d492b1..be78f81 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -855,18 +855,6 @@ EAPI void eo_del_intercept_set(Eo *obj, Eo_Del_Intercept 
del_intercept_func);
 EAPI Eo_Del_Intercept eo_del_intercept_get(const Eo *obj);
 
 /**
- * @brief Unrefs the object and reparents it to NULL.
- * @param obj the object to work on.
- *
- * Because eo_del() unrefs and reparents to NULL, it doesn't really delete the
- * object.
- *
- * @see eo_unref()
- * @see eo_parent_set()
- */
-EAPI void eo_del(const Eo *obj);
-
-/**
  * @def eo_xref(obj, ref_obj)
  * Convenience macro around eo_xref_internal()
  * @see eo_xref()
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index e88d742..7d707a4 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1371,19 +1371,6 @@ eo_unref(const Eo *obj_id)
_eo_unref(obj);
 }
 
-EAPI void
-eo_del(const Eo *obj)
-{
-   if (eo_parent_get((Eo *) obj))
- {
-eo_parent_set((Eo *) obj, NULL);
- }
-   else
- {
-eo_unref(obj);
- }
-}
-
 EAPI int
 eo_ref_get(const Eo *obj_id)
 {
diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo
index 19c50eb..01ce468 100644
--- a/src/lib/eo/eo_base.eo
+++ b/src/lib/eo/eo_base.eo
@@ -74,6 +74,15 @@ abstract Eo.Base ()
 parent: Eo.Base * @nullable; [[the new parent]]
  }
   }
+  del @const {
+ [[Unrefs the object and reparents it to NULL.
+
+   Because eo_del() unrefs and reparents to NULL, it doesn't really 
delete the object.
+
+   This method accepts a const object for convenience, so all objects
+   could be passed to it easily.
+ ]]
+  }
   @property id {
  [[ The id/name of the object.
 
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 7e3c442..d2c7168 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -594,6 +594,18 @@ _eo_base_comment_get(Eo *obj EINA_UNUSED, Eo_Base_Data *pd)
return pd->ext->comment;
 }
 
+EOLIAN static void
+_eo_base_del(const Eo *obj, Eo_Base_Data *pd EINA_UNUSED)
+{
+   if (eo_parent_get((Eo *) obj))
+ {
+eo_parent_set((Eo *) obj, NULL);
+ }
+   else
+ {
+eo_unref(obj);
+ }
+}
 
 EOLIAN static void
 _eo_base_parent_set(Eo *obj, Eo_Base_Data *pd, Eo *parent_id)

-- 




[EGIT] [core/efl] master 01/01: Eolian cxx tests: don't redefine Ecore_Cb.

2016-04-20 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 115b69fd479a08db2e8b401f28aa6867179e5de3
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Apr 20 12:51:37 2016 +0100

Eolian cxx tests: don't redefine Ecore_Cb.
---
 src/tests/eolian_cxx/generic.eo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/eolian_cxx/generic.eo b/src/tests/eolian_cxx/generic.eo
index a66d560..72722a9 100644
--- a/src/tests/eolian_cxx/generic.eo
+++ b/src/tests/eolian_cxx/generic.eo
@@ -1,4 +1,4 @@
-type @extern Ecore_Cb: __undefined_type;
+import ecore_types;
 
 class Generic (Eo.Base)
 {

-- 




[EGIT] [core/efl] master 01/01: Ecore eo: Resolve duplicate Ecore_Cb definition.

2016-04-20 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 5bec0d07b4d23f1742e3c218a485b28b232cf09b
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Apr 20 10:11:21 2016 +0100

Ecore eo: Resolve duplicate Ecore_Cb definition.
---
 src/lib/ecore/ecore_job.eo| 2 +-
 src/lib/ecore/ecore_types.eot | 1 +
 src/lib/elementary/elm_box.eo | 3 +--
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore/ecore_job.eo b/src/lib/ecore/ecore_job.eo
index fac6b62..26dedec 100644
--- a/src/lib/ecore/ecore_job.eo
+++ b/src/lib/ecore/ecore_job.eo
@@ -1,4 +1,4 @@
-type @extern Ecore_Cb: __undefined_type;
+import ecore_types;
 
 class Ecore.Job (Eo.Base)
 {
diff --git a/src/lib/ecore/ecore_types.eot b/src/lib/ecore/ecore_types.eot
index b216524..2c355fe 100644
--- a/src/lib/ecore/ecore_types.eot
+++ b/src/lib/ecore/ecore_types.eot
@@ -1,5 +1,6 @@
 type @extern Ecore_Timeline_Cb: __undefined_type;
 type @extern Ecore_Task_Cb: __undefined_type;
+type @extern Ecore_Cb: __undefined_type;
 
 enum Ecore.Pos_Map
 {
diff --git a/src/lib/elementary/elm_box.eo b/src/lib/elementary/elm_box.eo
index ad558f6..c10ae14 100644
--- a/src/lib/elementary/elm_box.eo
+++ b/src/lib/elementary/elm_box.eo
@@ -1,6 +1,5 @@
 import evas_box;
-
-type Ecore_Cb: __undefined_type;
+import ecore_types;
 
 class Elm.Box (Elm.Widget)
 {

-- 




[EGIT] [core/efl] master 01/01: Merge strict eolian type checking branch.

2016-04-19 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit daed567e3c58800e254564d03aa85f45ecc54905
Merge: 81f45c1 cfd7b57
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Apr 19 17:16:20 2016 +0100

Merge strict eolian type checking branch.

In this branch I turned on strict eolian type checking and silenced all
of the errors that came to be because of it (fixed some).

I did it so new code will not introduce new errors. We've had more
errors introduced recently, and I believe it's because of ignorance. No
more excuses, compilation will now fail if you fail to handle types
correctly.

We need to fix my workarounds. Many of the .eo files that I worked
around on need to be removed anyway, and a lot of the rest need a lot of
changes, so there was no point wasting my time into fixing it properly.

 src/lib/elementary/elm_app_client.eo   |  7 +++-
 src/lib/elementary/elm_app_client_view.eo  |  6 ++-
 src/lib/elementary/elm_app_server.eo   | 11 --
 src/lib/elementary/elm_app_server_view.eo  |  2 +
 src/lib/elementary/elm_box.eo  |  4 ++
 src/lib/elementary/elm_calendar.eo |  4 ++
 src/lib/elementary/elm_check.eo|  2 +-
 src/lib/elementary/elm_datetime.eo |  2 +
 src/lib/elementary/elm_entry.eo|  4 ++
 src/lib/elementary/elm_general.eot | 14 +++
 src/lib/elementary/elm_gengrid.eo  |  1 +
 src/lib/elementary/elm_genlist.eo  |  1 +
 src/lib/elementary/elm_gesture_layer.eo|  2 +
 src/lib/elementary/elm_glview.eo   |  4 ++
 src/lib/elementary/elm_hoversel_item.eo|  2 +
 src/lib/elementary/elm_image.eo|  2 +-
 .../elementary/elm_interface_atspi_accessible.eo   |  3 ++
 src/lib/elementary/elm_interface_atspi_text.eo | 16 
 .../elm_interface_atspi_widget_action.eo   |  2 +
 src/lib/elementary/elm_interface_fileselector.eo   |  4 ++
 src/lib/elementary/elm_interface_scrollable.eo | 44 ++
 src/lib/elementary/elm_interface_scrollable.h  |  5 ++-
 src/lib/elementary/elm_layout.eo   |  6 ++-
 src/lib/elementary/elm_map.eo  |  7 
 src/lib/elementary/elm_multibuttonentry.eo |  3 ++
 src/lib/elementary/elm_naviframe_item.eo   |  2 +
 src/lib/elementary/elm_photocam.eo |  4 +-
 src/lib/elementary/elm_prefs.eo|  9 -
 src/lib/elementary/elm_scroller.eo | 36 --
 src/lib/elementary/elm_scroller_legacy.h   |  1 +
 src/lib/elementary/elm_slider.eo   |  5 ++-
 src/lib/elementary/elm_slideshow.eo|  2 +
 src/lib/elementary/elm_sys_notify_interface.eo |  2 +
 src/lib/elementary/elm_systray.eo  |  2 +-
 src/lib/elementary/elm_toolbar.eo  |  1 +
 src/lib/elementary/elm_toolbar_item.eo |  2 +-
 src/lib/elementary/elm_view_list.eo|  2 +
 src/lib/elementary/elm_web.eo  |  7 
 src/lib/elementary/elm_widget.eo   |  5 +++
 src/lib/elementary/elm_widget_item.eo  |  2 +
 src/lib/elementary/elm_win.eo  |  8 
 src/lib/eo/eina_types.eot  |  4 ++
 src/lib/eo/eo_base.eo  |  4 +-
 src/lib/eolian/database_validate.c | 15 ++--
 44 files changed, 198 insertions(+), 73 deletions(-)

-- 




[EGIT] [core/efl] master 05/08: Elm popup: use the correct parent for calculations.

2016-04-18 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 1d7caffed5fc0be6e92db633e37dc182fd30b583
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Apr 11 18:11:23 2016 +0100

Elm popup: use the correct parent for calculations.

It just so happens that these parents are the same at the moment.
They don't have to be. We should use the correct, popup specific parent for
that.
---
 src/lib/elementary/elc_popup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index 9f1e029..212ac74 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -472,7 +472,7 @@ _elm_popup_elm_layout_sizing_eval(Eo *obj, Elm_Popup_Data 
*sd)
 
edje_object_message_signal_process(elm_layout_edje_get(sd->content_area));
 
 elm_popup_align_get(obj, , );
-evas_object_geometry_get(elm_widget_parent_get(obj), NULL, NULL, , 
);
+evas_object_geometry_get(sd->parent, NULL, NULL, , );
 
 if (horizontal == ELM_NOTIFY_ALIGN_FILL)
   minw = w;

-- 




[EGIT] [core/efl] master 06/08: Elm layout: Add parent updating tests to elm layout.

2016-04-18 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit cd26435434efb8c84bac15f0ade75a149b6c83c4
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Apr 15 15:06:41 2016 +0100

Elm layout: Add parent updating tests to elm layout.
---
 src/Makefile_Elementary.am |  1 +
 src/tests/elementary/elm_test_layout.c | 34 ++
 2 files changed, 35 insertions(+)

diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 17c5f79..00427ba 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -1232,6 +1232,7 @@ tests_elementary_elm_suite_SOURCES = \
 tests_elementary_elm_suite_CPPFLAGS = \
-DTESTS_BUILD_DIR=\"${top_builddir}/src/tests/elementary\" \
-DELM_IMAGE_DATA_DIR=\"${top_srcdir}/data/elementary\" \
+   -DELM_TEST_DATA_DIR=\"${abs_top_builddir}/data/elementary\" \
-I$(top_srcdir)/src/lib/elementary \
-I$(top_builddir)/src/lib/elementary \
@CHECK_CFLAGS@ \
diff --git a/src/tests/elementary/elm_test_layout.c 
b/src/tests/elementary/elm_test_layout.c
index 923ce32..e90390a 100644
--- a/src/tests/elementary/elm_test_layout.c
+++ b/src/tests/elementary/elm_test_layout.c
@@ -24,7 +24,41 @@ START_TEST(elm_atspi_role_get)
 }
 END_TEST
 
+START_TEST(elm_layout_swallows)
+{
+   char buf[PATH_MAX];
+   Evas_Object *win, *ly, *bt, *bt2;
+
+   elm_init(1, NULL);
+   win = elm_win_add(NULL, "layout", ELM_WIN_BASIC);
+
+   ly = eo_add(ELM_LAYOUT_CLASS, win);
+   snprintf(buf, sizeof(buf), "%s/objects/test.edj", ELM_TEST_DATA_DIR);
+   elm_layout_file_set(ly, buf, "layout");
+   evas_object_show(ly);
+
+   bt = eo_add(ELM_BUTTON_CLASS, ly);
+   fail_if(!elm_obj_container_content_set(ly, "element1", bt));
+   ck_assert_ptr_eq(eo_parent_get(bt), ly);
+
+   bt = elm_obj_container_content_unset(ly, "element1");
+   ck_assert_ptr_eq(eo_parent_get(bt), evas_common_evas_get(bt));
+
+   fail_if(!elm_obj_container_content_set(ly, "element1", bt));
+   ck_assert_ptr_eq(eo_parent_get(bt), ly);
+
+   bt2 = eo_add(ELM_BUTTON_CLASS, ly);
+   fail_if(!elm_obj_container_content_set(ly, "element1", bt2));
+   ck_assert_ptr_eq(eo_parent_get(bt2), ly);
+   /* bt is deleted at this point. */
+   ck_assert_ptr_eq(eo_parent_get(bt), evas_common_evas_get(bt));
+
+   elm_shutdown();
+}
+END_TEST
+
 void elm_test_layout(TCase *tc)
 {
tcase_add_test(tc, elm_atspi_role_get);
+   tcase_add_test(tc, elm_layout_swallows);
 }

-- 




[EGIT] [core/efl] master 07/08: Edje tests: Add parent upadting tests to edje.

2016-04-18 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 70537370a1116a92e8a2caef13672cbcf8398ecf
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Apr 15 17:45:52 2016 +0100

Edje tests: Add parent upadting tests to edje.
---
 src/Makefile_Edje.am  |  2 ++
 src/tests/edje/data/test_swallows.edc | 23 +++
 src/tests/edje/edje_test_edje.c   | 32 
 3 files changed, 57 insertions(+)

diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index b811642..54bf1ce 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -254,6 +254,7 @@ tests/edje/data/test_filters.edc \
 tests/edje/data/test_snapshot.edc \
 tests/edje/data/test_size_class.edc \
 tests/edje/data/test_color_class.edc \
+tests/edje/data/test_swallows.edc \
 tests/edje/data/filter.lua
 
 
@@ -297,6 +298,7 @@ EDJE_TEST_FILES = tests/edje/data/test_layout.edj \
  tests/edje/data/test_filters.edj \
  tests/edje/data/test_snapshot.edj \
  tests/edje/data/test_size_class.edj \
+ tests/edje/data/test_swallows.edj \
  tests/edje/data/test_color_class.edj
 
 noinst_DATA += $(EDJE_TEST_FILES)
diff --git a/src/tests/edje/data/test_swallows.edc 
b/src/tests/edje/data/test_swallows.edc
new file mode 100644
index 000..b1b9e91
--- /dev/null
+++ b/src/tests/edje/data/test_swallows.edc
@@ -0,0 +1,23 @@
+collections {
+   group {
+  name: "test_group";
+
+  parts {
+ part {
+name: "swallow";
+type: SWALLOW;
+
+description {
+   state: "default" 0.0;
+
+   rel1 {
+  relative: 0.0 0.0;
+   }
+   rel2 {
+  relative: 1.0 1.0;
+   }
+}
+ }
+  }
+   }
+}
diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c
index 8a3d645..658f115 100644
--- a/src/tests/edje/edje_test_edje.c
+++ b/src/tests/edje/edje_test_edje.c
@@ -350,6 +350,37 @@ START_TEST(edje_test_color_class)
 }
 END_TEST
 
+START_TEST(edje_test_swallows)
+{
+   Evas *evas = EDJE_TEST_INIT_EVAS();
+   Evas_Object *ly, *o1, *o2;
+
+   ly = eo_add(EDJE_OBJECT_CLASS, evas);
+   fail_unless(edje_object_file_set(ly, test_layout_get("test_swallows.edj"), 
"test_group"));
+
+   fail_unless(edje_object_part_exists(ly, "swallow"));
+
+
+   o1 = eo_add(EDJE_OBJECT_CLASS, ly);
+   fail_if(!edje_obj_part_swallow(ly, "swallow", o1));
+   ck_assert_ptr_eq(eo_parent_get(o1), ly);
+
+   edje_obj_part_unswallow(ly, o1);
+   ck_assert_ptr_eq(eo_parent_get(o1), evas_common_evas_get(o1));
+
+   fail_if(!edje_obj_part_swallow(ly, "swallow", o1));
+   ck_assert_ptr_eq(eo_parent_get(o1), ly);
+
+   o2 = eo_add(EDJE_OBJECT_CLASS, ly);
+   fail_if(!edje_obj_part_swallow(ly, "swallow", o2));
+   ck_assert_ptr_eq(eo_parent_get(o2), ly);
+   /* o1 is deleted at this point. */
+   ck_assert_ptr_eq(eo_parent_get(o1), evas_common_evas_get(o1));
+
+   EDJE_TEST_FREE_EVAS();
+}
+END_TEST
+
 void edje_test_edje(TCase *tc)
 {
tcase_add_test(tc, edje_test_edje_init);
@@ -363,4 +394,5 @@ void edje_test_edje(TCase *tc)
tcase_add_test(tc, edje_test_snapshot);
tcase_add_test(tc, edje_test_size_class);
tcase_add_test(tc, edje_test_color_class);
+   tcase_add_test(tc, edje_test_swallows);
 }

-- 




[EGIT] [core/efl] master 01/08: Evas object: rename smart_parent to render_parent and mark as protected.

2016-04-18 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 878a3d952cf1acdbe3f8bb9dd4b15fb039acc7c5
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Apr 14 18:33:25 2016 +0100

Evas object: rename smart_parent to render_parent and mark as protected.
---
 src/lib/evas/canvas/evas_object.eo | 19 +--
 src/lib/evas/canvas/evas_object_main.c |  4 +++-
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object.eo 
b/src/lib/evas/canvas/evas_object.eo
index 628580f..65020c8 100644
--- a/src/lib/evas/canvas/evas_object.eo
+++ b/src/lib/evas/canvas/evas_object.eo
@@ -964,13 +964,20 @@ abstract Evas.Object (Eo.Base, Evas.Common_Interface, 
Efl.Gfx.Base, Efl.Gfx.Stac
 return: const(list<Evas.Object*>)* @warn_unused; [[A list of 
objects being clipped by $obj.]]
  }
   }
-  @property smart_parent {
+  @property render_parent @protected {
+ [[Gets the parent smart object of a given Evas object, if it has one.
+
+   This can be different from @Eo.Base.parent because this one is
+   used internally for rendering and the normal parent is what the
+   user expects to be the parent.
+
+   @since 1.18
+ ]]
  get {
-[[Gets the parent smart object of a given Evas object, if it
-  has one.
-]]
-return: Evas.Object * @warn_unused; [[The parent smart object
-  of $obj or $null.]]
+legacy: evas_object_smart_parent_get;
+ }
+ values {
+parent: Evas.Object *; [[The parent smart object of $obj or 
$null.]]
  }
   }
   @property size_hint_display_mode {
diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index 8085f41..6a1983f 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -1,3 +1,5 @@
+#define EVAS_OBJECT_PROTECTED
+
 #include "evas_common_private.h"
 #include "evas_private.h"
 
@@ -2065,7 +2067,7 @@ _evas_object_is_frame_object_get(Eo *eo_obj  EINA_UNUSED, 
Evas_Object_Protected_
 }
 
 EOLIAN static Evas_Object *
-_evas_object_smart_parent_get(Eo *eo_obj EINA_UNUSED, 
Evas_Object_Protected_Data *obj)
+_evas_object_render_parent_get(Eo *eo_obj EINA_UNUSED, 
Evas_Object_Protected_Data *obj)
 {
if (!obj) return NULL;
return obj->smart.parent;

-- 




[EGIT] [core/efl] master 04/08: Elm widget: rename parent to widget_parent and mark as protected.

2016-04-18 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit aff4171e738bd47259e49ae0515742dd2543e7f6
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Apr 11 17:51:15 2016 +0100

Elm widget: rename parent to widget_parent and mark as protected.

This removes the conflicts between the different parents and also
indicates that this is to be used internally by widgets and should
not be confused with the normal user visible parent.

It is an internal attribute that should not be used by people
not implementing widgets. Marking it as protected signifies it
as such.
---
 src/lib/elementary/elc_ctxpopup.c| 4 +++-
 src/lib/elementary/elc_hoversel.c| 3 ++-
 src/lib/elementary/elc_popup.c   | 3 ++-
 src/lib/elementary/elm_conform.c | 3 ++-
 src/lib/elementary/elm_conformant.eo | 2 +-
 src/lib/elementary/elm_ctxpopup.eo   | 2 +-
 src/lib/elementary/elm_hover.c   | 5 +++--
 src/lib/elementary/elm_hover.eo  | 2 +-
 src/lib/elementary/elm_hoversel.eo   | 2 +-
 src/lib/elementary/elm_inwin.c   | 3 ++-
 src/lib/elementary/elm_inwin.eo  | 2 +-
 src/lib/elementary/elm_menu.c| 5 +++--
 src/lib/elementary/elm_menu.eo   | 2 +-
 src/lib/elementary/elm_notify.c  | 5 +++--
 src/lib/elementary/elm_notify.eo | 2 +-
 src/lib/elementary/elm_popup.eo  | 2 +-
 src/lib/elementary/elm_widget.c  | 5 +++--
 src/lib/elementary/elm_widget.eo | 5 -
 18 files changed, 35 insertions(+), 22 deletions(-)

diff --git a/src/lib/elementary/elc_ctxpopup.c 
b/src/lib/elementary/elc_ctxpopup.c
index 07964f1..0a4e370 100644
--- a/src/lib/elementary/elc_ctxpopup.c
+++ b/src/lib/elementary/elc_ctxpopup.c
@@ -5,7 +5,9 @@
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 #define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
 
+#define ELM_WIDGET_PROTECTED
 #define ELM_WIDGET_ITEM_PROTECTED
+
 #include 
 
 #include "elm_priv.h"
@@ -1158,7 +1160,7 @@ _elm_ctxpopup_evas_object_smart_del(Eo *obj, 
Elm_Ctxpopup_Data *sd)
 }
 
 EOLIAN static void
-_elm_ctxpopup_elm_widget_parent_set(Eo *obj, Elm_Ctxpopup_Data *_pd 
EINA_UNUSED, Evas_Object *parent)
+_elm_ctxpopup_elm_widget_widget_parent_set(Eo *obj, Elm_Ctxpopup_Data *_pd 
EINA_UNUSED, Evas_Object *parent)
 {
//default parent is to be hover parent
elm_ctxpopup_hover_parent_set(obj, parent);
diff --git a/src/lib/elementary/elc_hoversel.c 
b/src/lib/elementary/elc_hoversel.c
index e14e0e6..fcf52d3 100644
--- a/src/lib/elementary/elc_hoversel.c
+++ b/src/lib/elementary/elc_hoversel.c
@@ -5,6 +5,7 @@
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 #define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
 
+#define ELM_WIDGET_PROTECTED
 #define ELM_WIDGET_ITEM_PROTECTED
 #include 
 #include "elm_priv.h"
@@ -596,7 +597,7 @@ _elm_hoversel_evas_object_smart_hide(Eo *obj, 
Elm_Hoversel_Data *sd)
 }
 
 EOLIAN static void
-_elm_hoversel_elm_widget_parent_set(Eo *obj, Elm_Hoversel_Data *_pd 
EINA_UNUSED, Evas_Object *parent)
+_elm_hoversel_elm_widget_widget_parent_set(Eo *obj, Elm_Hoversel_Data *_pd 
EINA_UNUSED, Evas_Object *parent)
 {
elm_hoversel_hover_parent_set(obj, parent);
 }
diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index 88b8167..9f1e029 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -4,6 +4,7 @@
 
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 #define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
+#define ELM_WIDGET_PROTECTED
 #define ELM_WIDGET_ITEM_PROTECTED
 
 #include 
@@ -1572,7 +1573,7 @@ _parent_geom_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj, void *event_i
 }
 
 EOLIAN static void
-_elm_popup_elm_widget_parent_set(Eo *obj, Elm_Popup_Data *sd, Evas_Object 
*parent)
+_elm_popup_elm_widget_widget_parent_set(Eo *obj, Elm_Popup_Data *sd, 
Evas_Object *parent)
 {
Evas_Coord x, y, w, h;
evas_object_geometry_get(parent, , , , );
diff --git a/src/lib/elementary/elm_conform.c b/src/lib/elementary/elm_conform.c
index 529c8e9..2d434ec 100644
--- a/src/lib/elementary/elm_conform.c
+++ b/src/lib/elementary/elm_conform.c
@@ -2,6 +2,7 @@
 # include "elementary_config.h"
 #endif
 
+#define ELM_WIDGET_PROTECTED
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 
 #include 
@@ -954,7 +955,7 @@ _elm_conformant_evas_object_smart_del(Eo *obj, 
Elm_Conformant_Data *sd)
 }
 
 EOLIAN static void
-_elm_conformant_elm_widget_parent_set(Eo *obj, Elm_Conformant_Data *sd, 
Evas_Object *parent)
+_elm_conformant_elm_widget_widget_parent_set(Eo *obj, Elm_Conformant_Data *sd, 
Evas_Object *parent)
 {
 #ifdef HAVE_ELEMENTARY_X
Evas_Object *top = elm_widget_top_get(parent);
diff --git a/src/lib/elementary/elm_conformant.eo 
b/src/lib/elementary/elm_conformant.eo
index 98023c7..c719c21 100644
--- a/src/lib/elementary/elm_conformant.eo
+++ b/src/lib/elementary/elm_conformant.eo
@@ -6,7 +6,7 @@ class Elm.Conformant (El

[EGIT] [core/efl] master 02/08: Edje: Reparent when swallowing/unswallowing.

2016-04-18 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 4d0494574b2cda85ff0c6b968be362594c36aa37
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Apr 7 14:56:57 2016 +0100

Edje: Reparent when swallowing/unswallowing.

On swallow make the edje object the parent, on unswallow the canvas.
---
 src/lib/edje/edje_edit.c |  7 ++-
 src/lib/edje/edje_util.c | 13 +
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 05ed301..5ddd4f4 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -315,6 +315,7 @@ _edje_real_part_free(Edje *ed, Edje_Real_Part *rp)
if ((rp->type == EDJE_RP_TYPE_SWALLOW) && (rp->typedata.swallow)
&& (rp->typedata.swallow->swallowed_object))
  {
+eo_parent_set(rp->typedata.swallow->swallowed_object, 
evas_common_evas_get(ed->obj));
 evas_object_smart_member_del(rp->typedata.swallow->swallowed_object);
 evas_object_event_callback_del(rp->typedata.swallow->swallowed_object,
EVAS_CALLBACK_FREE, 
_edje_object_part_swallow_free_cb);
@@ -3147,7 +3148,11 @@ _edje_edit_real_part_add(Evas_Object *obj, const char 
*name, Edje_Part_Type type
 evas_object_show(rp->object);
 evas_object_smart_member_add(rp->object, ed->obj);
 evas_object_layer_set(rp->object, evas_object_layer_get(ed->obj));
-if (ep->type != EDJE_PART_TYPE_SWALLOW && ep->type != 
EDJE_PART_TYPE_GROUP)
+if (ep->type == EDJE_PART_TYPE_SWALLOW)
+  {
+ eo_parent_set(rp->object, ed->obj);
+  }
+else if (ep->type != EDJE_PART_TYPE_GROUP)
   {
  if (ep->mouse_events)
{
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 4a522d8..a34d81c 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -4966,6 +4966,7 @@ _edje_child_add(Edje *ed, Edje_Real_Part *rp, Evas_Object 
*child)
evas_object_event_callback_add(child, EVAS_CALLBACK_DEL, 
_edje_child_del_cb, rp);
evas_object_data_set(child, ".edje", ed);
if (!ed) return;
+   eo_parent_set(child, ed->obj);
ed->dirty = EINA_TRUE;
ed->recalc_call = EINA_TRUE;
 #ifdef EDJE_CALC_CACHE
@@ -4975,11 +4976,21 @@ _edje_child_add(Edje *ed, Edje_Real_Part *rp, 
Evas_Object *child)
 }
 
 static void
+_eo_unparent_helper(Eo *child, Eo *parent)
+{
+   if (eo_parent_get(child) == parent)
+ {
+eo_parent_set(child, evas_common_evas_get(parent));
+ }
+}
+
+static void
 _edje_child_remove(Edje *ed, Edje_Real_Part *rp, Evas_Object *child)
 {
evas_object_event_callback_del_full(child, EVAS_CALLBACK_DEL, 
_edje_child_del_cb, rp);
evas_object_data_del(child, ".edje");
if (!ed) return;
+   _eo_unparent_helper(child, ed->obj);
ed->dirty = EINA_TRUE;
ed->recalc_call = EINA_TRUE;
 #ifdef EDJE_CALC_CACHE
@@ -6322,6 +6333,7 @@ _edje_real_part_swallow(Edje *ed,
 #endif
if (!obj_swallow) return;
rp->typedata.swallow->swallowed_object = obj_swallow;
+   eo_parent_set(obj_swallow, ed->obj);
evas_object_smart_member_add(rp->typedata.swallow->swallowed_object, 
ed->obj);
if (rp->part->clip_to_id >= 0)
  {
@@ -6380,6 +6392,7 @@ _edje_real_part_swallow_clear(Edje *ed, Edje_Real_Part 
*rp)
if ((rp->type != EDJE_RP_TYPE_SWALLOW) ||
(!rp->typedata.swallow)) return;
if (!rp->typedata.swallow->swallowed_object) return;
+   _eo_unparent_helper(rp->typedata.swallow->swallowed_object, ed->obj);
evas_object_smart_member_del(rp->typedata.swallow->swallowed_object);
evas_object_event_callback_del_full(rp->typedata.swallow->swallowed_object,
EVAS_CALLBACK_DEL,

-- 




[EGIT] [core/efl] master 01/02: Edje tests: Fix tests when running out of source and remove hack.

2016-04-15 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit b337558fd673b88d3ae016f018dbab6f321150e1
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Apr 15 17:54:32 2016 +0100

Edje tests: Fix tests when running out of source and remove hack.

There was a seriously horrible hack here to workaround this issue. This
hacks goes all the way back to 3e07236. The essence of the hack was to
try the system files for the tests (and I guess that's why we were
shipping them although we really shouldn't).

This change fixes the file lookup for out of source files.

Hat-tip to zmike for pointing me to abs_top_buildir.
---
 src/Makefile_Edje.am|  2 +-
 src/tests/edje/edje_test_edje.c | 10 --
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index 2bcf7d2..458a98f 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -276,7 +276,7 @@ tests/edje/edje_suite.h
 tests_edje_edje_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
 $(EDJE_COMMON_CPPFLAGS) \
 -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/edje\" \
--DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/edje\" \
+-DTESTS_BUILD_DIR=\"$(abs_top_builddir)/src/tests/edje\" \
 @CHECK_CFLAGS@
 tests_edje_edje_suite_LDADD = @CHECK_LIBS@  $(USE_EDJE_BIN_LIBS)
 tests_edje_edje_suite_DEPENDENCIES = @USE_EDJE_INTERNAL_LIBS@
diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c
index 87a0afd..8a3d645 100644
--- a/src/tests/edje/edje_test_edje.c
+++ b/src/tests/edje/edje_test_edje.c
@@ -49,16 +49,6 @@ test_layout_get(const char *name)
 
snprintf(filename, PATH_MAX, TESTS_BUILD_DIR"/data/%s", name);
 
-   static int is_local = -1;
-   if (is_local == -1)
- {
-struct stat st;
-is_local = (stat(filename, ) == 0);
- }
-
-   if (!is_local)
- snprintf(filename, PATH_MAX, PACKAGE_DATA_DIR"/data/%s", name);
-
return filename;
 }
 

-- 




[EGIT] [core/efl] master 02/02: Edje tests: Don't ship test edje files and clean up their generation.

2016-04-15 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit e3e9de236c7a2cb37eb01746513ecf877b4a030c
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Apr 15 18:18:03 2016 +0100

Edje tests: Don't ship test edje files and clean up their generation.

This was duplication hell and also quite stupid. This commit should fix
this mess (to an extent).
---
 src/Makefile_Edje.am | 25 +++--
 1 file changed, 3 insertions(+), 22 deletions(-)

diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index 458a98f..d716a97 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -289,18 +289,7 @@ tests/edje/data/%.edj: tests/edje/data/%.edc 
bin/edje/edje_cc${EXEEXT}
-dd $(srcdir)/tests/edje/data \
$< $@
 
-EDJE_DATA_FILES = tests/edje/data/test_layout.edc \
-  tests/edje/data/complex_layout.edc \
-  tests/edje/data/test_parens.edc \
-  tests/edje/data/test_masking.edc \
-  tests/edje/data/test_filters.edc \
-  tests/edje/data/test_snapshot.edc \
-  tests/edje/data/test_size_class.edc \
-  tests/edje/data/test_color_class.edc \
-  tests/edje/data/filter.lua
-
-edjedatafilesdir = $(datadir)/edje/data
-edjedatafiles_DATA = tests/edje/data/test_layout.edj \
+EDJE_TEST_FILES = tests/edje/data/test_layout.edj \
  tests/edje/data/complex_layout.edj \
  tests/edje/data/test_parens.edj \
  tests/edje/data/test_masking.edj \
@@ -309,19 +298,11 @@ edjedatafiles_DATA = tests/edje/data/test_layout.edj \
  tests/edje/data/test_size_class.edj \
  tests/edje/data/test_color_class.edj
 
-CLEANFILES += tests/edje/data/test_layout.edj \
-  tests/edje/data/complex_layout.edj \
-  tests/edje/data/test_parens.edj \
-  tests/edje/data/test_masking.edj \
-  tests/edje/data/test_filters.edj \
-  tests/edje/data/test_snapshot.edj \
-  tests/edje/data/test_size_class.edj \
-  tests/edje/data/test_color_class.edj
+noinst_DATA += $(EDJE_TEST_FILES)
+CLEANFILES += $(EDJE_TEST_FILES)
 
 endif
 
-EXTRA_DIST += $(EDJE_DATA_FILES)
-
 if HAVE_ELUA
 
 edje_eolian_lua = $(edje_eolian_files:%.eo=%.eo.lua)

-- 




[EGIT] [core/efl] master 01/01: Elm ctxpopup: Remove useless implementation of sub_object_add.

2016-04-15 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 6d135944beb79782d0e5ddd69a23fa5fedd5ee2e
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Apr 15 13:40:23 2016 +0100

Elm ctxpopup: Remove useless implementation of sub_object_add.

Was just calling super and nothing more.
---
 src/lib/elementary/elc_ctxpopup.c  | 10 --
 src/lib/elementary/elm_ctxpopup.eo |  1 -
 2 files changed, 11 deletions(-)

diff --git a/src/lib/elementary/elc_ctxpopup.c 
b/src/lib/elementary/elc_ctxpopup.c
index b366493..07964f1 100644
--- a/src/lib/elementary/elc_ctxpopup.c
+++ b/src/lib/elementary/elc_ctxpopup.c
@@ -617,16 +617,6 @@ _elm_ctxpopup_elm_layout_sub_object_add_enable(Eo *obj 
EINA_UNUSED, Elm_Ctxpopup
return EINA_FALSE;
 }
 
-EOLIAN static Eina_Bool
-_elm_ctxpopup_elm_widget_sub_object_add(Eo *obj, Elm_Ctxpopup_Data *_pd 
EINA_UNUSED, Evas_Object *sobj)
-{
-   Eina_Bool int_ret = EINA_FALSE;
-
-   int_ret = elm_obj_widget_sub_object_add(eo_super(obj, MY_CLASS), sobj);
-
-   return int_ret;
-}
-
 EOLIAN static void
 _elm_ctxpopup_elm_layout_sizing_eval(Eo *obj, Elm_Ctxpopup_Data *sd)
 {
diff --git a/src/lib/elementary/elm_ctxpopup.eo 
b/src/lib/elementary/elm_ctxpopup.eo
index 33447a2..d04e9e8 100644
--- a/src/lib/elementary/elm_ctxpopup.eo
+++ b/src/lib/elementary/elm_ctxpopup.eo
@@ -205,7 +205,6 @@ class Elm.Ctxpopup (Elm.Layout, 
Elm.Interface_Atspi_Widget_Action, Efl.Orientati
   Evas.Object_Smart.add;
   Elm.Widget.parent.set;
   Elm.Widget.focus_direction;
-  Elm.Widget.sub_object_add;
   Elm.Widget.focus_direction_manager_is;
   Elm.Widget.focus_next_manager_is;
   Elm.Widget.focus_next;

-- 




[EGIT] [core/efl] master 01/01: Eo base: Improve documentation.

2016-04-14 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit ba4796d1b2d9b86c09d0a9d463fefcb8f253e75d
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Apr 14 18:32:45 2016 +0100

Eo base: Improve documentation.
---
 src/lib/eo/eo_base.eo | 24 
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo
index 9043cf9..9ca1c24 100644
--- a/src/lib/eo/eo_base.eo
+++ b/src/lib/eo/eo_base.eo
@@ -49,17 +49,25 @@ abstract Eo.Base ()
 
methods {
   @property parent {
- set {
-[[Set the parent of an object.
+ [[The parent of an object.
 
-  Parents keep references to their children so in order to
-  delete objects that have parents you need to set parent to
-  NULL or use eo_del() that does that for you (and also unrefs
-  the object).
-]]
+   Parents keep references to their children so in order to
+   delete objects that have parents you need to set parent to
+   NULL or use eo_del() that does that for you (and also unrefs
+   the object).
+
+   The Eo parent is conceptually user set. That means that a parent
+   should not be changed behind the scenes in a surprising manner.
+
+   For example:
+   if you have a widget that has a box internally, and
+   when you swallow into that widget the object you swallow ends up in
+   the box, the parent should be the widget, and not the box.
+ ]]
+
+ set {
  }
  get {
-[[Get the parent of an object]]
  }
  values {
 parent: Eo.Base * @nullable; [[the new parent]]

-- 




[EGIT] [core/efl] master 01/01: Eo base: Make parent nullable.

2016-04-14 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit bd98b517178e4d07680de9005a6bbaf8bba6549f
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Apr 11 17:29:15 2016 +0100

Eo base: Make parent nullable.

It's allowed to be null, so mark it as such. This is useful
for languages that support nullable vs non-nullable types.
---
 src/lib/eo/eo_base.eo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo
index ad6cd68..9043cf9 100644
--- a/src/lib/eo/eo_base.eo
+++ b/src/lib/eo/eo_base.eo
@@ -62,7 +62,7 @@ abstract Eo.Base ()
 [[Get the parent of an object]]
  }
  values {
-parent: Eo.Base*; [[the new parent]]
+parent: Eo.Base * @nullable; [[the new parent]]
  }
   }
   @property event_global_freeze_count @class {

-- 




[EGIT] [core/efl] master 03/03: Eina matrix/vector tests: pass correct pointers to arrays.

2016-04-12 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit de1a7759fac1ae37b47b02b4b4bf390bcf318b3e
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Apr 12 15:45:10 2016 +0100

Eina matrix/vector tests: pass correct pointers to arrays.

Clang (rightfully) complained about passing double ** where we should have
passed a double *.
---
 src/tests/eina/eina_test_matrix.c | 6 +++---
 src/tests/eina/eina_test_vector.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/tests/eina/eina_test_matrix.c 
b/src/tests/eina/eina_test_matrix.c
index 1a0d9ae..a2f6d9c 100644
--- a/src/tests/eina/eina_test_matrix.c
+++ b/src/tests/eina/eina_test_matrix.c
@@ -83,7 +83,7 @@ START_TEST(eina_matrix2_operation)
xy != yx ||
xy != 0);
 
-   eina_matrix2_array_set(, );
+   eina_matrix2_array_set(, arr);
eina_matrix2_values_get(,
, ,
, );
@@ -260,7 +260,7 @@ START_TEST(eina_matrix4_operation)
 wx != xx ||
 ww != zy);
 
-   eina_matrix4_array_set(, );
+   eina_matrix4_array_set(, arr);
eina_matrix4_values_get(,
, , , ,
, , , ,
@@ -575,7 +575,7 @@ START_TEST(eina_matrix3_operations)
 yx != 1 || yy != 1 || yz != 1 ||
 zx != 0 || zy != 0 || zz != 0);
 
-   eina_matrix3_array_set(, );
+   eina_matrix3_array_set(, arr);
eina_matrix3_values_get(,
, , ,
, , ,
diff --git a/src/tests/eina/eina_test_vector.c 
b/src/tests/eina/eina_test_vector.c
index 4a7e3ff..3617f7f 100644
--- a/src/tests/eina/eina_test_vector.c
+++ b/src/tests/eina/eina_test_vector.c
@@ -45,7 +45,7 @@ START_TEST(eina_test_vector2_operations)
eina_vector2_set(, x, y);
fail_if((v1.x != 1) || (v1.y != 2));
 
-   eina_vector2_array_set(, );
+   eina_vector2_array_set(, arr);
fail_if((v2.x != 5) || (v2.y != 5));
 
eina_vector2_copy(, );
@@ -131,7 +131,7 @@ START_TEST(eina_test_vector3_operations)
eina_vector3_set(, x, y, z);
fail_if((v1.x != 1) || (v1.y != 2) || (v1.z != 3));
 
-   eina_vector3_array_set(, );
+   eina_vector3_array_set(, arr);
fail_if((v2.x != 5) || (v2.y != 5) || (v2.z != 5));
 
eina_vector3_copy(, );

-- 




[EGIT] [core/efl] master 01/03: Elm test web: Correctly disable the web tests.

2016-04-12 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit b4da02cac26326a7c9bf0beeffcd8db00c0835f5
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Apr 12 15:39:36 2016 +0100

Elm test web: Correctly disable the web tests.

This gets rid of some clang warnings.
---
 src/tests/elementary/elm_test_web.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/tests/elementary/elm_test_web.c 
b/src/tests/elementary/elm_test_web.c
index 755c3f9..e986e8c 100644
--- a/src/tests/elementary/elm_test_web.c
+++ b/src/tests/elementary/elm_test_web.c
@@ -9,6 +9,7 @@
 
 START_TEST (elm_atspi_role_get)
 {
+#if 0
Evas_Object *win, *web;
Elm_Atspi_Role role;
 
@@ -21,10 +22,11 @@ START_TEST (elm_atspi_role_get)
ck_assert(role == ELM_ATSPI_ROLE_HTML_CONTAINER);
 
elm_shutdown();
+#endif
 }
 END_TEST
 
 void elm_test_web(TCase *tc)
 {
- /* tcase_add_test(tc, elm_atspi_role_get); */
+   tcase_add_test(tc, elm_atspi_role_get);
 }

-- 




[EGIT] [core/efl] master 02/03: Eet test: renamed shadowing variable.

2016-04-12 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 1d71d21d35baf9d02e7533e5c1a5c082d5d360bd
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Apr 12 15:40:42 2016 +0100

Eet test: renamed shadowing variable.
---
 src/tests/eet/eet_test_identity.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tests/eet/eet_test_identity.c 
b/src/tests/eet/eet_test_identity.c
index 4e445d5..30ccc8d 100644
--- a/src/tests/eet/eet_test_identity.c
+++ b/src/tests/eet/eet_test_identity.c
@@ -193,7 +193,7 @@ START_TEST(eet_test_identity_open_pkcs8_enc)
 }
 END_TEST
 
-static const char *_cert_dir_find(const char *argv0)
+static const char *_cert_dir_find(const char *_argv0)
 {
static char base[PATH_MAX] = "";
char path[PATH_MAX];
@@ -212,7 +212,7 @@ static const char *_cert_dir_find(const char *argv0)
   return base;
  }
 
-   eina_strlcpy(base, argv0, sizeof(base));
+   eina_strlcpy(base, _argv0, sizeof(base));
do
  {
 char *p = strrchr(base, '/');

-- 




[EGIT] [tools/expedite] master 01/01: Adjust according to the eo event member changes.

2016-04-12 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=9a98d6376b3024bea4e07269ab64f85d73de01d6

commit 9a98d6376b3024bea4e07269ab64f85d73de01d6
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Apr 12 15:27:38 2016 +0100

Adjust according to the eo event member changes.
---
 src/bin/ui.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/ui.c b/src/bin/ui.c
index f63c9fe..18ea8d6 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -258,7 +258,7 @@ _ui_select(void)
 static Eina_Bool
 _ui_key(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Evas_Event_Key_Down *ev = event->event_info;
+   Evas_Event_Key_Down *ev = event->info;
 
if (key_func)
  {
@@ -297,7 +297,7 @@ static int down_menu_sel = 0;
 static Eina_Bool
 _ui_mouse_down(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Evas_Event_Mouse_Down *ev = event->event_info;
+   Evas_Event_Mouse_Down *ev = event->info;
 
if (ev->button != 1) return EINA_TRUE;
if (menu_active)
@@ -313,7 +313,7 @@ _ui_mouse_down(void *data EINA_UNUSED, const Eo_Event 
*event)
 static Eina_Bool
 _ui_mouse_up(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Evas_Event_Mouse_Up *ev = event->event_info;
+   Evas_Event_Mouse_Up *ev = event->info;
 
if (ev->button != 1) return EINA_TRUE;
if (menu_active)
@@ -338,7 +338,7 @@ _ui_mouse_up(void *data EINA_UNUSED, const Eo_Event *event)
 static Eina_Bool
 _ui_mouse_move(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Evas_Event_Mouse_Move *ev = event->event_info;
+   Evas_Event_Mouse_Move *ev = event->info;
 
if (ev->buttons != 1) return EINA_TRUE;
if (menu_active)

-- 




[EGIT] [core/efl] master 01/01: Eo event: rename Eo_Event->event_info to Eo_Event->info.

2016-04-12 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit f14305024e28d9d427b69a2fc2ebc9f842f25353
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Apr 12 15:23:55 2016 +0100

Eo event: rename Eo_Event->event_info to Eo_Event->info.

The previous naming was redundant and too long.
---
 src/bindings/eo_cxx/eo_event.hh|  4 ++--
 src/bindings/js/eo_js/eo_js_event.hh   |  4 ++--
 src/examples/eldbus/dbusmodel.c|  4 ++--
 src/examples/elementary/filemvc.c  |  4 ++--
 src/examples/evas/evas-3d-shadows.c|  8 
 src/lib/ecore_con/ecore_con_url.c  |  6 +++---
 src/lib/ecore_evas/ecore_evas.c|  4 ++--
 src/lib/edje/edje_callbacks.c  | 14 +++---
 src/lib/elementary/elc_combobox.c  |  2 +-
 src/lib/elementary/elc_fileselector.c  | 18 +-
 src/lib/elementary/elc_fileselector_button.c   |  2 +-
 src/lib/elementary/elc_fileselector_entry.c|  8 
 src/lib/elementary/elm_atspi_bridge.c  | 12 ++--
 src/lib/elementary/elm_box.c   |  8 
 src/lib/elementary/elm_color_class.c   |  2 +-
 src/lib/elementary/elm_entry.c |  4 ++--
 src/lib/elementary/elm_glview.c|  2 +-
 src/lib/elementary/elm_helper.c|  2 +-
 src/lib/elementary/elm_interface_atspi_accessible.c|  2 +-
 src/lib/elementary/elm_menu.c  |  2 +-
 src/lib/elementary/elm_spinner.c   |  2 +-
 src/lib/elementary/elm_store.c |  4 ++--
 src/lib/elementary/elm_view_form.c |  2 +-
 src/lib/elementary/elm_view_list.c | 10 +-
 src/lib/elementary/elm_widget.c|  8 
 src/lib/eo/eo_base.eo  |  2 +-
 src/lib/eo/eo_base_class.c |  4 ++--
 src/lib/evas/canvas/evas_callbacks.c   |  4 ++--
 src/lib/evas/canvas/evas_canvas3d_node.c   |  4 ++--
 src/lib/evas/canvas/evas_object_main.c |  6 +++---
 src/lib/evas/canvas/evas_object_smart.c|  2 +-
 src/lib/evas/canvas/evas_vg_node.c |  2 +-
 .../datetime_input_ctxpopup/datetime_input_ctxpopup.c  |  2 +-
 src/tests/eio/eio_model_test_file.c|  6 +++---
 src/tests/eio/eio_model_test_monitor_add.c |  8 
 src/tests/eldbus/eldbus_test_eldbus_model.c|  2 +-
 src/tests/elementary/elm_test_genlist.c|  2 +-
 src/tests/emotion/emotion_test_main-eo.c   |  2 +-
 .../eo/composite_objects/composite_objects_main.c  |  2 +-
 src/tests/eo/signals/signals_main.c|  2 +-
 src/tests/eo/signals/signals_simple.c  |  4 ++--
 src/tests/eo/suite/eo_test_general.c   |  2 +-
 src/tests/eolian_cxx/callback.c|  2 +-
 43 files changed, 98 insertions(+), 98 deletions(-)

diff --git a/src/bindings/eo_cxx/eo_event.hh b/src/bindings/eo_cxx/eo_event.hh
index fbc3bf6..5633e89 100644
--- a/src/bindings/eo_cxx/eo_event.hh
+++ b/src/bindings/eo_cxx/eo_event.hh
@@ -141,8 +141,8 @@ event_callback(void *data, ::Eo_Event const* event)
 {
T wrapper(::eo_ref(event->obj));
F *f = static_cast<F*>(data);
-   return _detail::really_call_event(wrapper, *f, *event->desc, 
event->event_info
- , std::is_void<decltype((*f)(wrapper, 
*event->desc, event->event_info))>());
+   return _detail::really_call_event(wrapper, *f, *event->desc, event->info
+ , std::is_void<decltype((*f)(wrapper, 
*event->desc, event->info))>());
 }
 
 }
diff --git a/src/bindings/js/eo_js/eo_js_event.hh 
b/src/bindings/js/eo_js/eo_js_event.hh
index b589e5d..3e1ff63 100644
--- a/src/bindings/js/eo_js/eo_js_event.hh
+++ b/src/bindings/js/eo_js/eo_js_event.hh
@@ -60,11 +60,11 @@ inline Eina_Bool event_callback(void* data, Eo_Event const* 
eo_event)
   v8::HandleScope handle_scope(isolate);
   event_callback_information* event = 
static_cast<event_callback_information*>(data);
   v8::Handle a[] = 
{eina::js::compatibility_new(isolate, eo_event->obj)};
-  v8::Local self = 
(event->event_info->constructor->handle())->NewInstance(1, a);
+  v8::Local self = 
(event->info->constructor->handle())->NewInstance(1, a);
 
   v8::Local call_args[] = {
 self,
-get_event_info(eo_event->event_info, isolate, 
event->event_info->class_name)
+get_event_info(eo_event->info, isolate, event->info->class_name)
  

[EGIT] [core/efl] master 01/02: Evas langauge: Prevent potential buffer overflow and clean code.

2016-04-08 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 8203c79678b4777837ce25b5d1f6fd328d4ef246
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Apr 8 11:34:53 2016 +0100

Evas langauge: Prevent potential buffer overflow and clean code.

We were copying a user defined string into a fixed size buffer
without doing any boundary checks. This commit fixes that.
Also cleaned up similar code that was using hardcoded numbers.

@fix.
---
 src/lib/evas/common/language/evas_language_utils.c | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/common/language/evas_language_utils.c 
b/src/lib/evas/common/language/evas_language_utils.c
index f8b38b6..ce075a1 100644
--- a/src/lib/evas/common/language/evas_language_utils.c
+++ b/src/lib/evas/common/language/evas_language_utils.c
@@ -145,8 +145,9 @@ evas_common_language_from_locale_get(void)
if (locale && *locale)
  {
 char *itr;
-strncpy(lang, locale, 5);
-lang[5] = '\0';
+const size_t size = sizeof(lang);
+strncpy(lang, locale, size - 1);
+lang[size - 1] = '\0';
 itr = lang;
 while (*itr)
   {
@@ -171,6 +172,7 @@ evas_common_language_from_locale_full_get(void)
locale = setlocale(LC_MESSAGES, NULL);
if (locale && *locale)
  {
+const size_t size = sizeof(lang_full);
 size_t i;
 for (i = 0 ; locale[i] ; i++)
   {
@@ -178,6 +180,12 @@ evas_common_language_from_locale_full_get(void)
  if ((c == '.') || (c == '@') || (c == ' ')) /* Looks like 
en_US.UTF8 or de_DE@euro or aa_ER UTF-8*/
 break;
   }
+
+if (i >= size)
+  {
+ i = size - 1;
+  }
+
 strncpy(lang_full, locale, i);
 lang_full[i] = '\0';
 return lang_full;

-- 




[EGIT] [core/efl] master 02/02: Elm tests: Silence warnings in the unused elm prefs test.

2016-04-08 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 1b14a33a912c797a6131dfea84debe933183bd52
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Apr 8 11:35:18 2016 +0100

Elm tests: Silence warnings in the unused elm prefs test.
---
 src/tests/elementary/elm_test_prefs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/tests/elementary/elm_test_prefs.c 
b/src/tests/elementary/elm_test_prefs.c
index 4271756..091e697 100644
--- a/src/tests/elementary/elm_test_prefs.c
+++ b/src/tests/elementary/elm_test_prefs.c
@@ -9,6 +9,7 @@
 
 START_TEST (elm_atspi_role_get)
 {
+#if 0
Evas_Object *win, *prefs;
Elm_Atspi_Role role;
 
@@ -21,10 +22,11 @@ START_TEST (elm_atspi_role_get)
ck_assert(role == ELM_ATSPI_ROLE_REDUNDANT_OBJECT);
 
elm_shutdown();
+#endif
 }
 END_TEST
 
 void elm_test_prefs(TCase *tc)
 {
- /* tcase_add_test(tc, elm_atspi_role_get); */
+   tcase_add_test(tc, elm_atspi_role_get);
 }

-- 




[EGIT] [core/efl] master 01/01: Revert "Eo: Fix rare crash after call_resolve"

2016-04-06 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit c9347b1ca2c3f75af771ed6654cc7f46d9eaaa00
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Apr 6 11:17:05 2016 +0100

Revert "Eo: Fix rare crash after call_resolve"

I'm reverting this because according to jpeg it was possibly fixed in
5284b62e930f0bef0ed3125b3a485e0599451ef8.
I reverted this patch after his fix and followed his reproduction cases
and it seems that his second patch does indeed fix this issue so this
patch is no longer needed.

This reverts commit 0862b9d08384bc1d862b90952130ec988f56b33b.
---
 src/lib/eo/eo.c | 11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index d1dd8e8..434ab3e 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -347,15 +347,12 @@ _eo_call_resolve(Eo *eo_id, const char *func_name, 
Eo_Op_Call_Data *call, Eo_Cal
  if ((const void *)inputklass == cache->index[i].klass)
{
   func = (const op_type_funcs *)cache->entry[i].func;
-  if (EINA_LIKELY(func->func && func->src))
+  call->func = func->func;
+  if (is_obj)
 {
-   call->func = func->func;
-   if (is_obj)
- {
-call->data = (char *) obj + cache->off[i].off;
- }
-   return EINA_TRUE;
+   call->data = (char *) obj + cache->off[i].off;
 }
+  return EINA_TRUE;
}
   }
 #endif

-- 




[EGIT] [core/efl] master 01/01: Eo tests: Also test function calls in reinit test.

2016-04-06 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit c6159e042bb08dffecf60de3497126d0c60d0b68
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Apr 6 10:16:24 2016 +0100

Eo tests: Also test function calls in reinit test.

Since we cache ops we also need to check function calls work
when we reinit eo, not just class_get functions.

This commit essentially verifies that
5284b62e930f0bef0ed3125b3a485e0599451ef8 was done correctly.
---
 src/tests/eo/suite/eo_test_class_simple.c | 27 ++-
 src/tests/eo/suite/eo_test_class_simple.h |  5 +
 src/tests/eo/suite/eo_test_init.c | 15 +++
 3 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/src/tests/eo/suite/eo_test_class_simple.c 
b/src/tests/eo/suite/eo_test_class_simple.c
index 224e80a..8566ed9 100644
--- a/src/tests/eo/suite/eo_test_class_simple.c
+++ b/src/tests/eo/suite/eo_test_class_simple.c
@@ -89,7 +89,6 @@ EO_VOID_FUNC_BODY(simple_pure_virtual);
 EO_VOID_FUNC_BODY(simple_no_implementation);
 
 static Eo_Op_Description op_descs[] = {
- EO_OP_FUNC_OVERRIDE(eo_dbg_info_get, _dbg_info_get),
  EO_OP_FUNC(simple_a_set, _a_set),
  EO_OP_FUNC(simple_a_get, _a_get),
  EO_OP_FUNC(simple_a_print, _a_print),
@@ -97,6 +96,7 @@ static Eo_Op_Description op_descs[] = {
  EO_OP_FUNC(simple_recursive, _recursive),
  EO_OP_FUNC(simple_part_get, _part_get),
  EO_OP_FUNC(simple_pure_virtual, NULL),
+ EO_OP_FUNC_OVERRIDE(eo_dbg_info_get, _dbg_info_get),
 };
 
 static const Eo_Class_Description class_desc = {
@@ -112,3 +112,28 @@ static const Eo_Class_Description class_desc = {
 
 EO_DEFINE_CLASS(simple_class_get, _desc, EO_CLASS, NULL)
 
+
+static int
+_beef_get(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED)
+{
+   return 0xBEEF;
+}
+
+EO_FUNC_BODY_CONST(simple2_class_beef_get, int, 0);
+
+static Eo_Op_Description op_descs2[] = {
+ EO_OP_CLASS_FUNC(simple2_class_beef_get, _beef_get),
+};
+
+static const Eo_Class_Description class_desc2 = {
+ EO_VERSION,
+ "Simple2",
+ EO_CLASS_TYPE_REGULAR,
+ EO_CLASS_DESCRIPTION_OPS(op_descs2),
+ NULL,
+ 0,
+ NULL,
+ NULL
+};
+
+EO_DEFINE_CLASS(simple2_class_get, _desc2, EO_CLASS, NULL)
diff --git a/src/tests/eo/suite/eo_test_class_simple.h 
b/src/tests/eo/suite/eo_test_class_simple.h
index 3360ea8..32e3844 100644
--- a/src/tests/eo/suite/eo_test_class_simple.h
+++ b/src/tests/eo/suite/eo_test_class_simple.h
@@ -24,4 +24,9 @@ extern const Eo_Event_Description _EV_A_CHANGED2;
 #define SIMPLE_CLASS simple_class_get()
 const Eo_Class *simple_class_get(void);
 
+EAPI int simple2_class_beef_get(const Eo_Class *obj);
+
+#define SIMPLE2_CLASS simple2_class_get()
+const Eo_Class *simple2_class_get(void);
+
 #endif
diff --git a/src/tests/eo/suite/eo_test_init.c 
b/src/tests/eo/suite/eo_test_init.c
index ef04d31..4a1948c 100644
--- a/src/tests/eo/suite/eo_test_init.c
+++ b/src/tests/eo/suite/eo_test_init.c
@@ -5,6 +5,7 @@
 #include 
 
 #include "eo_suite.h"
+#include "eo_test_class_simple.h"
 
 START_TEST(eo_test_simple)
 {
@@ -17,12 +18,26 @@ END_TEST
 
 START_TEST(eo_test_init_shutdown)
 {
+   Eo *obj;
+
fail_if(!eo_init());
ck_assert_str_eq("Eo_Base", eo_class_name_get(EO_BASE_CLASS));
+
+   /* XXX-1: Essential for the next test to assign the wrong op. */
+   obj = eo_add(SIMPLE_CLASS, NULL);
+   simple_a_set(obj, 1);
+   ck_assert_int_eq(1, simple_a_get(obj));
+
+   /* XXX-1: Essential for the next test to cache the op. */
+   ck_assert_int_eq(0xBEEF, simple2_class_beef_get(SIMPLE2_CLASS));
+   eo_unref(obj);
fail_if(eo_shutdown());
 
fail_if(!eo_init());
ck_assert_str_eq("Eo_Base", eo_class_name_get(EO_BASE_CLASS));
+
+   /* XXX-1: Verify that the op was not cached. */
+   ck_assert_int_eq(0xBEEF, simple2_class_beef_get(SIMPLE2_CLASS));
fail_if(eo_shutdown());
 }
 END_TEST

-- 




[EGIT] [core/efl] master 01/01: Eo: Implement the fallback eo_add implementation.

2016-03-29 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 4a75116cb44ef10a93925d2505bcce337d663b6e
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Mar 29 14:47:22 2016 +0100

Eo: Implement the fallback eo_add implementation.

The current eo_add uses a (very useful) gcc extension that is only
available in gcc compatible compilers (e.g clang). Until this commit we
just temporarily ignored this fact. This adds a fallback implementation that
can be used interchangeably with the non portable one. This means that the
same binary can call either at any point in time and the code will work.

Breaks ABI.
---
 src/Makefile_Eo.am   |  15 +++-
 src/lib/eo/Eo.h  |  30 +--
 src/lib/eo/eo.c  |  25 +-
 src/lib/eo/eo_add_fallback.c | 188 +++
 src/lib/eo/eo_add_fallback.h |  18 +
 5 files changed, 267 insertions(+), 9 deletions(-)

diff --git a/src/Makefile_Eo.am b/src/Makefile_Eo.am
index e388318..c8fbd52 100644
--- a/src/Makefile_Eo.am
+++ b/src/Makefile_Eo.am
@@ -31,6 +31,8 @@ lib/eo/eo_ptr_indirection.c \
 lib/eo/eo_ptr_indirection.h \
 lib/eo/eo_base_class.c \
 lib/eo/eo_class_class.c \
+lib/eo/eo_add_fallback.c \
+lib/eo/eo_add_fallback.h \
 lib/eo/eo_private.h
 
 lib_eo_libeo_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EO_CFLAGS@
@@ -58,6 +60,7 @@ tests/eo/test_interface \
 tests/eo/test_mixin \
 tests/eo/test_signals \
 tests/eo/test_children \
+tests/eo/eo_suite_add_fallback \
 tests/eo/eo_suite
 
 tests_eo_test_children_SOURCES = \
@@ -129,15 +132,25 @@ tests/eo/suite/eo_test_general.c \
 tests/eo/suite/eo_test_value.c \
 tests/eo/suite/eo_test_threaded_calls.c \
 tests/eo/suite/eo_test_init.c
+
 tests_eo_eo_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
 -DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eo\" \
 @CHECK_CFLAGS@ \
 @EO_CFLAGS@
-TESTS += tests/eo/eo_suite
 
 tests_eo_eo_suite_LDADD = @CHECK_LIBS@ @USE_EO_LIBS@
 tests_eo_eo_suite_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@
 
+TESTS += tests/eo/eo_suite
+
+tests_eo_eo_suite_add_fallback_SOURCES = $(tests_eo_eo_suite_SOURCES)
+tests_eo_eo_suite_add_fallback_CPPFLAGS = $(tests_eo_eo_suite_CPPFLAGS) \
+  -D_EO_ADD_FALLBACK_FORCE=1
+tests_eo_eo_suite_add_fallback_LDADD = $(tests_eo_eo_suite_LDADD)
+tests_eo_eo_suite_add_fallback_DEPENDENCIES = $(tests_eo_eo_suite_DEPENDENCIES)
+
+TESTS += tests/eo/eo_suite_add_fallback
+
 tests_eo_test_function_overrides_SOURCES = \
 tests/eo/function_overrides/function_overrides_inherit.c \
 tests/eo/function_overrides/function_overrides_inherit.h \
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 13d8283..dc6aa0e 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -582,7 +582,7 @@ EAPI Eina_Bool _eo_call_resolve(Eo *obj, const char 
*func_name, Eo_Op_Call_Data
 EAPI void _eo_call_end(Eo_Op_Call_Data *call);
 
 // end of the eo_add. Calls finalize among others
-EAPI Eo * _eo_add_end(Eo *obj);
+EAPI Eo * _eo_add_end(Eo *obj, Eina_Bool is_fallback);
 
 EAPI Eo *eo_super(const Eo *obj, const Eo_Class *cur_klass);
 
@@ -597,15 +597,33 @@ EAPI Eo *eo_super(const Eo *obj, const Eo_Class 
*cur_klass);
  */
 EAPI const Eo_Class *eo_class_get(const Eo *obj);
 
-#define eo_self __eo_self
+EAPI Eo *_eo_self_get(void);
 
-#define _eo_add_common(klass, parent, is_ref, ...) \
+/* Check if GCC compatible (both GCC and clang define this) */
+#if defined(__GNUC__) && !defined(_EO_ADD_FALLBACK_FORCE)
+
+# define eo_self __eo_self
+
+# define _eo_add_common(klass, parent, is_ref, ...) \
({ \
- Eo * const __eo_self = _eo_add_internal_start(__FILE__, __LINE__, klass, 
parent, is_ref); \
+ Eo * const __eo_self = _eo_add_internal_start(__FILE__, __LINE__, klass, 
parent, is_ref, EINA_FALSE); \
  __VA_ARGS__; \
- (Eo *) _eo_add_end(eo_self); \
+ (Eo *) _eo_add_end(eo_self, EINA_FALSE); \
 })
 
+#else
+
+# define eo_self _eo_self_get()
+
+# define _eo_add_common(klass, parent, is_ref, ...) \
+   ( \
+ _eo_add_internal_start(__FILE__, __LINE__, klass, parent, is_ref, 
EINA_TRUE), \
+ ##__VA_ARGS__, \
+ (Eo *) _eo_add_end(eo_self, EINA_TRUE) \
+   )
+
+#endif
+
 /**
  * @def eo_add
  * @brief Create a new object and call its constructor(If it exits).
@@ -644,7 +662,7 @@ EAPI const Eo_Class *eo_class_get(const Eo *obj);
  */
 #define eo_add_ref(klass, parent, ...) _eo_add_common(klass, parent, 
EINA_TRUE, ##__VA_ARGS__)
 
-EAPI Eo * _eo_add_internal_start(const char *file, int line, const Eo_Class 
*klass_id, Eo *parent, Eina_Bool ref);
+EAPI Eo * _eo_add_internal_start(const char *file, int line, const Eo_Class 
*klass_id, Eo *parent, Eina_Bool ref, Eina_Bool is_fallback);
 
 /**
  * @brief Get a pointer to the data of an object for a specific class.
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index ba12fbd..434ab3e 100644
--- a/src/lib/eo/eo

[EGIT] [core/efl] master 01/01: Ecore: Move all of the duplicate type definitions to ecore_types.eot.

2016-03-23 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit fea89136336e1810af237c2273a8e27f8f524309
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 23 15:05:20 2016 +

Ecore: Move all of the duplicate type definitions to ecore_types.eot.
---
 src/lib/ecore/ecore_animator.eo | 3 +--
 src/lib/ecore/ecore_idle_enterer.eo | 2 +-
 src/lib/ecore/ecore_idle_exiter.eo  | 2 +-
 src/lib/ecore/ecore_idler.eo| 2 +-
 src/lib/ecore/ecore_poller.eo   | 2 +-
 src/lib/ecore/ecore_timer.eo| 2 +-
 src/lib/ecore/ecore_types.eot   | 2 ++
 7 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/lib/ecore/ecore_animator.eo b/src/lib/ecore/ecore_animator.eo
index 35edede..d250691 100644
--- a/src/lib/ecore/ecore_animator.eo
+++ b/src/lib/ecore/ecore_animator.eo
@@ -1,5 +1,4 @@
-type @extern Ecore_Timeline_Cb: __undefined_type;
-type @extern Ecore_Task_Cb: __undefined_type;
+import ecore_types;
 
 class Ecore.Animator (Eo.Base)
 {
diff --git a/src/lib/ecore/ecore_idle_enterer.eo 
b/src/lib/ecore/ecore_idle_enterer.eo
index aef93a4..2cdc1c8 100644
--- a/src/lib/ecore/ecore_idle_enterer.eo
+++ b/src/lib/ecore/ecore_idle_enterer.eo
@@ -1,4 +1,4 @@
-type @extern Ecore_Task_Cb: __undefined_type;
+import ecore_types;
 
 class Ecore.Idle.Enterer (Eo.Base)
 {
diff --git a/src/lib/ecore/ecore_idle_exiter.eo 
b/src/lib/ecore/ecore_idle_exiter.eo
index 33982ac..dcd5b6b 100644
--- a/src/lib/ecore/ecore_idle_exiter.eo
+++ b/src/lib/ecore/ecore_idle_exiter.eo
@@ -1,4 +1,4 @@
-type @extern Ecore_Task_Cb: __undefined_type;
+import ecore_types;
 
 class Ecore.Idle.Exiter (Eo.Base)
 {
diff --git a/src/lib/ecore/ecore_idler.eo b/src/lib/ecore/ecore_idler.eo
index 948189b..1197baa 100644
--- a/src/lib/ecore/ecore_idler.eo
+++ b/src/lib/ecore/ecore_idler.eo
@@ -1,4 +1,4 @@
-type @extern Ecore_Task_Cb: __undefined_type;
+import ecore_types;
 
 class Ecore.Idler (Eo.Base)
 {
diff --git a/src/lib/ecore/ecore_poller.eo b/src/lib/ecore/ecore_poller.eo
index 0c647bb..a40b576 100644
--- a/src/lib/ecore/ecore_poller.eo
+++ b/src/lib/ecore/ecore_poller.eo
@@ -1,4 +1,4 @@
-type @extern Ecore_Task_Cb: __undefined_type;
+import ecore_types;
 
 enum Ecore.Poller_Type
 {
diff --git a/src/lib/ecore/ecore_timer.eo b/src/lib/ecore/ecore_timer.eo
index da89b86..99f30a8 100644
--- a/src/lib/ecore/ecore_timer.eo
+++ b/src/lib/ecore/ecore_timer.eo
@@ -1,4 +1,4 @@
-type @extern Ecore_Task_Cb: __undefined_type;
+import ecore_types;
 
 class Ecore.Timer (Eo.Base)
 {
diff --git a/src/lib/ecore/ecore_types.eot b/src/lib/ecore/ecore_types.eot
index 6e5744e..b216524 100644
--- a/src/lib/ecore/ecore_types.eot
+++ b/src/lib/ecore/ecore_types.eot
@@ -1,3 +1,5 @@
+type @extern Ecore_Timeline_Cb: __undefined_type;
+type @extern Ecore_Task_Cb: __undefined_type;
 
 enum Ecore.Pos_Map
 {

-- 




[EGIT] [core/efl] master 02/02: Change the EFL according to the renaming of the eo_add() current object.

2016-03-15 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 8706d03b43a59578e9c0965545efbc13f4407cab
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Mar 15 14:07:52 2016 +

Change the EFL according to the renaming of the eo_add() current object.
---
 src/examples/ecore/ecore_idler_example.c   |  2 +-
 src/examples/ecore/ecore_poller_example.c  |  6 +++---
 src/examples/eldbus/dbusmodel.c|  2 +-
 src/examples/evas/evas-3d-aabb.c   | 10 -
 src/examples/evas/evas-3d-blending.c   | 10 -
 src/examples/evas/evas-3d-colorpick.c  |  8 
 src/examples/evas/evas-3d-cube-rotate.c|  8 
 src/examples/evas/evas-3d-cube.c   |  8 
 src/examples/evas/evas-3d-cube2.c  |  8 
 src/examples/evas/evas-3d-eet.c| 10 -
 src/examples/evas/evas-3d-fog.c| 12 +--
 src/examples/evas/evas-3d-frustum.c| 10 -
 src/examples/evas/evas-3d-hull.c   | 12 +--
 src/examples/evas/evas-3d-md2.c|  8 
 src/examples/evas/evas-3d-mmap-set.c   |  8 
 src/examples/evas/evas-3d-obj.c|  8 
 src/examples/evas/evas-3d-parallax-occlusion.c |  8 
 src/examples/evas/evas-3d-pick.c   |  6 +++---
 src/examples/evas/evas-3d-ply.c|  8 
 src/examples/evas/evas-3d-proxy.c  |  8 
 src/examples/evas/evas-3d-shadows.c| 24 +++---
 src/examples/evas/evas-vg-simple.c | 24 +++---
 src/examples/evas/shooter/evas-3d-shooter-header.c |  6 +++---
 src/examples/evas/shooter/evas-3d-shooter-macros.h |  2 +-
 src/examples/evas/shooter/evas-3d-shooter.c|  4 ++--
 src/lib/ecore/ecore_anim.c |  4 ++--
 src/lib/ecore/ecore_exe.c  |  2 +-
 src/lib/ecore/ecore_idle_enterer.c |  4 ++--
 src/lib/ecore/ecore_idle_exiter.c  |  2 +-
 src/lib/ecore/ecore_idler.c|  2 +-
 src/lib/ecore/ecore_job.c  |  2 +-
 src/lib/ecore/ecore_poller.c   |  2 +-
 src/lib/ecore/ecore_timer.c|  4 ++--
 src/lib/ecore_con/ecore_con.c  |  6 +++---
 src/lib/ecore_con/ecore_con_eet.c  |  4 ++--
 src/lib/ecore_con/ecore_con_url.c  |  2 +-
 src/lib/ector/cairo/ector_cairo_surface.c  |  6 +++---
 src/lib/ector/gl/ector_gl_surface.c|  6 +++---
 src/lib/ector/software/ector_software_surface.c|  8 
 src/lib/edje/edje_load.c   |  6 +++---
 src/lib/edje/edje_multisense.c |  6 +++---
 src/lib/eio/eio_model.c|  4 ++--
 src/lib/eldbus/eldbus_model_connection.c   |  2 +-
 src/lib/eldbus/eldbus_model_object.c   |  2 +-
 src/lib/eldbus/eldbus_model_proxy.c|  4 ++--
 src/lib/evas/canvas/evas_canvas3d_node.c   |  2 +-
 src/lib/evas/canvas/evas_object_image.c|  7 ++-
 src/lib/evas/canvas/evas_vg_container.c|  2 +-
 src/lib/evas/canvas/evas_vg_node.c |  2 +-
 src/lib/evas/canvas/evas_vg_shape.c|  6 +++---
 src/modules/evas/engines/gl_generic/evas_engine.c  |  6 +++---
 .../evas/engines/software_generic/evas_engine.c|  4 ++--
 src/tests/ecore/ecore_test_animator.c  |  4 ++--
 src/tests/eio/eio_model_test_file.c|  2 +-
 src/tests/eio/eio_model_test_monitor_add.c |  2 +-
 src/tests/eldbus/eldbus_test_eldbus_model.c|  4 ++--
 src/tests/eldbus/eldbus_test_eldbus_model_method.c |  2 +-
 src/tests/eldbus/eldbus_test_eldbus_model_signal.c |  2 +-
 .../eldbus_test_fake_server_eldbus_model_proxy.c   |  2 +-
 src/tests/eo/constructors/constructors_main.c  |  4 ++--
 src/tests/eo/suite/eo_test_general.c   |  8 
 src/tests/eo/suite/eo_test_threaded_calls.c|  2 +-
 .../eolian_js_test_constructor_method_impl.c   |  4 ++--
 src/tests/evas/evas_test_image.c   |  2 +-
 64 files changed, 181 insertions(+), 184 deletions(-)

diff --git a/src/examples/ecore/ecore_idler_example.c 
b/src/examples/ecore/ecore_idler_example.c
index aa749d9..8831a4d 100644
--- a/src/examples/ecore/ecore_idler_example.c
+++ b/src/examples/ecore/ecore_idler_example.c
@@ -110,7 +110,7 @@ main(void)
ctxt.enterer = ecore_idle_enterer_add(_enterer_cb, );
ctxt.exiter = ecore_idle_exiter_add(_exiter_cb, );
ctxt.idler = ecore_idler_add(_idler_cb, );
-//   ctxt.idler = eo_add(ECORE_IDLER_CLASS, NULL, 
ecore_idler_constructor(eoid, _idler_cb, ));
+//   ctxt

[EGIT] [core/efl] master 01/02: Eo: eo_add(), change current object's name (api).

2016-03-15 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit bd2a9015c354073a4bd378d5c5362397f2aee6e4
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Mar 15 14:03:00 2016 +

Eo: eo_add(), change current object's name (api).

It was temporarily eoid, change it to eo_self which is more
descriptive. In this process I also made it a macro to prepare
for the proposed changes on the ML for the fallback implementation
for compilers that don't support the compound statements returning
values gcc extension.
---
 src/lib/eo/Eo.h | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 4ac541f..13d8283 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -597,11 +597,13 @@ EAPI Eo *eo_super(const Eo *obj, const Eo_Class 
*cur_klass);
  */
 EAPI const Eo_Class *eo_class_get(const Eo *obj);
 
+#define eo_self __eo_self
+
 #define _eo_add_common(klass, parent, is_ref, ...) \
({ \
- Eo * const eoid = _eo_add_internal_start(__FILE__, __LINE__, klass, 
parent, is_ref); \
+ Eo * const __eo_self = _eo_add_internal_start(__FILE__, __LINE__, klass, 
parent, is_ref); \
  __VA_ARGS__; \
- (Eo *) _eo_add_end(eoid); \
+ (Eo *) _eo_add_end(eo_self); \
 })
 
 /**

-- 




[EGIT] [core/elementary] master 01/01: Change elm according to the renaming of the eo_add() current object.

2016-03-15 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=5d0f5cfdf541c2c54cc3744d3a6c57dcbfb39989

commit 5d0f5cfdf541c2c54cc3744d3a6c57dcbfb39989
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Mar 15 15:30:32 2016 +

Change elm according to the renaming of the eo_add() current object.
---
 src/bin/test_application_server.c  |  4 ++--
 src/bin/test_task_switcher.c   |  2 +-
 src/examples/evas3d_map_example.c  | 10 +-
 src/examples/evas3d_object_on_button_example.c |  8 
 src/examples/evas3d_scene_on_button_example.c  |  8 
 src/examples/filemvc.c |  8 
 src/examples/fileviewlist.c|  4 ++--
 src/examples/performance/graphical.c   | 12 ++--
 src/examples/sphere_hunter/evas_3d_sphere_hunter.c | 12 ++--
 src/lib/elc_ctxpopup.c |  4 ++--
 src/lib/elm_app_client.c   |  4 ++--
 src/lib/elm_app_server.c   |  2 +-
 src/lib/elm_glview.c   |  4 ++--
 src/lib/elm_win.c  |  4 ++--
 14 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/src/bin/test_application_server.c 
b/src/bin/test_application_server.c
index 1272ff6..d05d74e 100644
--- a/src/bin/test_application_server.c
+++ b/src/bin/test_application_server.c
@@ -100,7 +100,7 @@ _create_view_cb(Elm_App_Server *app_server, const 
Eina_Value *args EINA_UNUSED,
 return NULL;
  }
 
-   view = eo_add(ELM_APP_SERVER_VIEW_CLASS, app_server, 
elm_app_server_view_id_set(eoid, NULL));
+   view = eo_add(ELM_APP_SERVER_VIEW_CLASS, app_server, 
elm_app_server_view_id_set(eo_self, NULL));
 
id = elm_app_server_view_id_get(view);
pkg = elm_app_server_package_get(app_server);
@@ -141,7 +141,7 @@ test_application_server_common(const char *pkg)
Elm_App_Server_View *view;
Elm_App_Server *server;
 
-   server = eo_add(ELM_APP_SERVER_CLASS, NULL, 
elm_app_server_constructor(eoid, pkg, _create_view_cb));
+   server = eo_add(ELM_APP_SERVER_CLASS, NULL, 
elm_app_server_constructor(eo_self, pkg, _create_view_cb));
elm_app_server_title_set(server, pkg);
views_iter = elm_app_server_views_get(server);
eo_event_callback_add(server, ELM_APP_SERVER_EVENT_TERMINATE, 
_terminate_cb, NULL);
diff --git a/src/bin/test_task_switcher.c b/src/bin/test_task_switcher.c
index 1c2b441..fae686e 100644
--- a/src/bin/test_task_switcher.c
+++ b/src/bin/test_task_switcher.c
@@ -303,7 +303,7 @@ _app_open(const char *package)
   return;
  }
 
-   app = eo_add(ELM_APP_CLIENT_CLASS, NULL, elm_app_client_constructor(eoid, 
package));
+   app = eo_add(ELM_APP_CLIENT_CLASS, NULL, 
elm_app_client_constructor(eo_self, package));
eo_event_callback_add(app, ELM_APP_CLIENT_EVENT_VIEW_LIST_LOADED, 
_view_list_update_cb, table);
eo_event_callback_add(app, ELM_APP_CLIENT_EVENT_VIEW_CREATED, 
_view_list_update_cb, table);
eo_event_callback_add(app, ELM_APP_CLIENT_EVENT_VIEW_DELETED, 
_view_list_update_cb, table);
diff --git a/src/examples/evas3d_map_example.c 
b/src/examples/evas3d_map_example.c
index ca58452..eefa029 100644
--- a/src/examples/evas3d_map_example.c
+++ b/src/examples/evas3d_map_example.c
@@ -881,7 +881,7 @@ skybox_setup(void)
evas_canvas3d_material_color_set(skybox_material, 
EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.1, 0.1, 0.1, 1.0);
evas_canvas3d_material_shininess_set(skybox_material, 50.0);
 
-   skybox_mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+   skybox_mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(eo_self, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(root_node, skybox_mesh_node);
evas_canvas3d_node_mesh_add(skybox_mesh_node, skybox_mesh);
evas_canvas3d_mesh_shade_mode_set(skybox_mesh, 
EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
@@ -940,7 +940,7 @@ camera_setup(void)
camera_right_vec.y = 0.0;
camera_right_vec.z = 0.0;
 
-   camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+   camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(eo_self, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_position_set(camera_node, camera_pos.x, camera_pos.y, 
camera_pos.z);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 
0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, camera_up_vec.x, camera_up_vec.y, 
camera_up_vec.z);
@@ -955,7 +955,7 @@ light_setup(void)
evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(light, 0.2, 0.2, 0.2, 1.0);
 
-   light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS

[EGIT] [core/efl] master 01/01: Eo: Move generation of Eo_Event_Cb to Eolian.

2016-03-14 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit da37a41fd1cb861df56862a2e0d88e8ff4b2cb59
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Mar 14 17:19:58 2016 +

Eo: Move generation of Eo_Event_Cb to Eolian.

This fixes the type redefinition warning (apparently it's C11).

Thanks to bu5hm4n for reporting this.
---
 src/lib/eo/Eo.h   | 13 -
 src/lib/eo/eo_base.eo | 21 +++--
 2 files changed, 11 insertions(+), 23 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 387f187..4ac541f 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -153,19 +153,6 @@ enum _Eo_Op_Type
  */
 typedef enum _Eo_Op_Type Eo_Op_Type;
 
-/** This has to be duplicated here because Eolian doesn't support event 
callbacks. */
-typedef struct _Eo_Event Eo_Event;
-/**
- * @typedef Eo_Event_Cb
- *
- * An event callback prototype.
- *
- * @param data The user data registered with the callback.
- * @param event the object's event structure and information. @see Eo_Event
- * @return #EO_CALLBACK_STOP to stop calling additional callbacks for the 
event, #EO_CALLBACK_CONTINUE to continue.
- */
-typedef Eina_Bool (*Eo_Event_Cb)(void *data, const Eo_Event *event);
-
 /**
  * @typedef Eo_Del_Intercept
  *
diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo
index 8a31a35..aa952c0 100644
--- a/src/lib/eo/eo_base.eo
+++ b/src/lib/eo/eo_base.eo
@@ -1,8 +1,5 @@
 import eina_types;
 
-/* Event callbacks are a special case and have to be external as eolian 
doesn't support function pointers. */
-type @extern Eo.Event_Cb: __builtin_event_cb;
-
 struct Eo.Event_Description {
 [[This struct holds the description of a specific event.]]
 name: const(char) *; [[name of the event.]]
@@ -10,6 +7,17 @@ struct Eo.Event_Description {
 legacy_is: bool; [[Internal use: if is a legacy event.]]
 }
 
+struct Eo.Event {
+ [[Parameter passed in event callbacks holding extra event parameters]]
+ obj: Eo.Base *; [[The object the event was called on.]]
+ desc: const(Eo.Event_Description) *; [[The event description.]]
+ event_info: void *; [[Extra event information passed by the event 
caller.]]
+}
+
+type Eo.Event_Cb: __builtin_event_cb; [[An event callback prototype.
+return $EO_CALLBACK_STOP to stop calling additional callbacks for the 
event, $EO_CALLBACK_CONTINUE to continue.]]
+
+
 struct Eo.Callback_Array_Item {
 [[An item in an array of callback desc/func.
 
@@ -34,13 +42,6 @@ type Eo.Callback_Priority: short; [[Callback priority value. 
Range is -32k - 32k
 \@ref EO_CALLBACK_PRIORITY_DEFAULT
   ]]
 
-struct Eo.Event {
- [[Parameter passed in event callbacks holding extra event parameters]]
- obj: Eo.Base *; [[The object the event was called on.]]
- desc: const(Eo.Event_Description) *; [[The event description.]]
- event_info: void *; [[Extra event information passed by the event 
caller.]]
-}
-
 abstract Eo.Base ()
 {
eo_prefix: eo;

-- 




[EGIT] [tools/expedite] master 01/01: Revert "Automatic migration to the new eo_add syntax."

2016-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=a927cdd1a41f418dd1ca6f5db5138e629b1b3758

commit a927cdd1a41f418dd1ca6f5db5138e629b1b3758
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 11 12:40:21 2016 +

Revert "Automatic migration to the new eo_add syntax."

We reverted those changes.

This reverts commit 1c99584bcb72aabedfb7e9696bae1661c14ddd0c.
---
 src/bin/about.c  |  2 +-
 src/bin/image_blend_border.c |  2 +-
 src/bin/image_blend_border_recolor.c |  2 +-
 src/bin/image_blend_fade_pow2_unscaled.c |  2 +-
 src/bin/image_blend_fade_unscaled.c  |  2 +-
 src/bin/image_blend_many_smooth_same_scaled.c|  2 +-
 src/bin/image_blend_nearest_same_scaled.c|  2 +-
 src/bin/image_blend_nearest_scaled.c |  2 +-
 src/bin/image_blend_nearest_solid_same_scaled.c  |  2 +-
 src/bin/image_blend_nearest_solid_scaled.c   |  2 +-
 src/bin/image_blend_occlude1.c   |  2 +-
 src/bin/image_blend_occlude1_few.c   |  2 +-
 src/bin/image_blend_occlude1_many.c  |  2 +-
 src/bin/image_blend_occlude1_very_many.c |  2 +-
 src/bin/image_blend_occlude2.c   |  2 +-
 src/bin/image_blend_occlude2_few.c   |  2 +-
 src/bin/image_blend_occlude2_many.c  |  2 +-
 src/bin/image_blend_occlude2_very_many.c |  2 +-
 src/bin/image_blend_occlude3.c   |  2 +-
 src/bin/image_blend_occlude3_few.c   |  2 +-
 src/bin/image_blend_occlude3_many.c  |  2 +-
 src/bin/image_blend_occlude3_very_many.c |  2 +-
 src/bin/image_blend_smooth_same_scaled.c |  2 +-
 src/bin/image_blend_smooth_scaled.c  |  2 +-
 src/bin/image_blend_smooth_solid_same_scaled.c   |  2 +-
 src/bin/image_blend_smooth_solid_scaled.c|  2 +-
 src/bin/image_blend_solid_border.c   |  2 +-
 src/bin/image_blend_solid_fade_pow2_unscaled.c   |  2 +-
 src/bin/image_blend_solid_fade_unscaled.c|  2 +-
 src/bin/image_blend_solid_middle_border.c|  2 +-
 src/bin/image_blend_solid_middle_unscaled.c  |  2 +-
 src/bin/image_blend_solid_unscaled.c |  2 +-
 src/bin/image_blend_unscaled.c   |  2 +-
 src/bin/image_crossfade.c|  4 ++--
 src/bin/image_data_argb.c|  2 +-
 src/bin/image_data_argb_alpha.c  |  2 +-
 src/bin/image_data_ycbcr601pl.c  |  2 +-
 .../image_data_ycbcr601pl_map_nearest_solid_rotate.c |  2 +-
 src/bin/image_data_ycbcr601pl_map_solid_rotate.c |  2 +-
 src/bin/image_data_ycbcr601pl_wide_stride.c  |  2 +-
 src/bin/image_map_3d_1.c |  2 +-
 src/bin/image_map_3d_2.c |  2 +-
 src/bin/image_map_3d_3.c |  2 +-
 src/bin/image_map_3d_4.c |  2 +-
 src/bin/image_map_3d_5.c |  2 +-
 src/bin/image_map_3d_6.c |  2 +-
 src/bin/image_map_3d_flow.c  |  4 ++--
 src/bin/image_map_color_alpha_nearest_rotate.c   |  2 +-
 src/bin/image_map_color_alpha_nearest_solid_rotate.c |  2 +-
 src/bin/image_map_color_alpha_rotate.c   |  2 +-
 src/bin/image_map_color_alpha_solid_rotate.c |  2 +-
 src/bin/image_map_color_nearest_rotate.c |  2 +-
 src/bin/image_map_color_nearest_solid_rotate.c   |  2 +-
 src/bin/image_map_color_rotate.c |  2 +-
 src/bin/image_map_color_solid_rotate.c   |  2 +-
 src/bin/image_map_nearest_rotate.c   |  2 +-
 src/bin/image_map_nearest_solid_rotate.c |  2 +-
 src/bin/image_map_rotate.c   |  2 +-
 src/bin/image_map_solid_rotate.c |  2 +-
 src/bin/image_mask.c |  4 ++--
 src/bin/image_mask_10.c  |  4 ++--
 src/bin/image_mask_11.c  |  4 ++--
 src/bin/image_mask_12.c  |  4 ++--
 src/bin/image_mask_13.c  |  4 ++--
 src/bin/image_mask_2.c   |  4 ++--
 src/bin/image_mask_3.c   |  4 ++--
 src/bin/image_mask_4.c   |  4 ++--
 src/bin/image_mask_5.c   |  4 ++--
 src/bin/image_mask_6.c   |  4 ++--
 src/bin/image_mask_7.c   |  4 ++--
 src/bin/image_mask_8.c   |  4 ++--
 src/bin/image_mask_9.c   |  4 ++--
 src/bin/image_quality_scale.c

[EGIT] [tools/enventor] master 01/01: Revert "fix the build break that introduced by eo syntax change."

2016-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 0e03164b68cfe5b5c6675558a3f9bd76c72abb38
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 11 12:42:09 2016 +

Revert "fix the build break that introduced by eo syntax change."

This reverts commit 986663f5ed27d21ab3a309f6db5895ef1892a7cd.
---
 src/lib/enventor_smart.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lib/enventor_smart.c b/src/lib/enventor_smart.c
index 694b557..a5b118c 100644
--- a/src/lib/enventor_smart.c
+++ b/src/lib/enventor_smart.c
@@ -751,8 +751,7 @@ EAPI Evas_Object *
 enventor_object_add(Evas_Object *parent)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
-   Evas_Object *obj;
-   eo_add(, MY_CLASS, parent);
+   Evas_Object *obj = eo_add(MY_CLASS, parent);
return obj;
 }
 

-- 




[EGIT] [core/efl] master 03/07: Revert "Examples: Update according to recent eo_add changes."

2016-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 9fdac37187e35f45570c3808011d0283c658652d
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 11 12:24:06 2016 +

Revert "Examples: Update according to recent eo_add changes."

This reverts commit 6594ba0b6df9ba72f031a00d0e8ba3b23cf2c0b2.
---
 src/examples/evas/evas-3d-colorpick.c  | 14 --
 src/examples/evas/evas-3d-hull.c   |  4 ++--
 src/examples/evas/evas-3d-mmap-set.c   |  4 ++--
 src/examples/evas/evas-3d-obj.c|  4 ++--
 src/examples/evas/evas-3d-ply.c|  4 ++--
 src/examples/evas/evas-3d-shadows.c|  8 
 src/examples/evas/evas-object-manipulation-eo.c|  8 
 src/examples/evas/shooter/evas-3d-shooter-macros.h | 12 ++--
 src/examples/evas/shooter/evas-3d-shooter.c|  2 +-
 9 files changed, 31 insertions(+), 29 deletions(-)

diff --git a/src/examples/evas/evas-3d-colorpick.c 
b/src/examples/evas/evas-3d-colorpick.c
index ceda8bc..4a7594b 100644
--- a/src/examples/evas/evas-3d-colorpick.c
+++ b/src/examples/evas/evas-3d-colorpick.c
@@ -272,25 +272,27 @@ _init_scene(const char *texture)
Evas_Real tmp;
Test_object *m;
 
-   eo_add(, EVAS_CANVAS3D_SCENE_CLASS, evas);
+   globalscene.scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
 
-   eo_add(_node, EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(globalscene.root_node, 
EVAS_CANVAS3D_NODE_TYPE_NODE));
+   globalscene.root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
 
-   eo_add(, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+   globalscene.camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(globalscene.camera, 30.0, 
1.0, 1.0, 1000.0);
 
-   eo_add(_node, EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(globalscene.camera_node, 
EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+   globalscene.camera_node =
+  eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(globalscene.camera_node, globalscene.camera);
evas_canvas3d_node_member_add(globalscene.root_node, 
globalscene.camera_node);
evas_canvas3d_node_position_set(globalscene.camera_node, 0.0, 30.0, 800.0);
evas_canvas3d_node_look_at_set(globalscene.camera_node, 
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, -1000.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 
1.0, 0.0);
-   eo_add(, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+   globalscene.light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(globalscene.light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_diffuse_set(globalscene.light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(globalscene.light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_directional_set(globalscene.light, EINA_TRUE);
 
-   eo_add(_node, EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(globalscene.light_node, 
EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+   globalscene.light_node =
+  eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(globalscene.light_node, globalscene.light);
evas_canvas3d_node_position_set(globalscene.light_node, 100.0, 50.0, 300.0);
evas_canvas3d_node_look_at_set(globalscene.light_node, 
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 1.0, 
1.0, 1.0);
diff --git a/src/examples/evas/evas-3d-hull.c b/src/examples/evas/evas-3d-hull.c
index 32c1d01..130ad37 100644
--- a/src/examples/evas/evas-3d-hull.c
+++ b/src/examples/evas/evas-3d-hull.c
@@ -84,7 +84,7 @@ typedef struct _Scene_Data
 int rr;
 
 #define MODEL_MESH_INIT(name, model, shade)
  \
-   eo_add(>mesh_##name, EVAS_CANVAS3D_MESH_CLASS, evas); 
 \
+   data->mesh_##name = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 
 \
efl_file_set(data->mesh_##name, model, NULL); \
evas_canvas3d_mesh_vertex_assembly_set(data->mesh_##name, 
EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES); \
evas_canvas3d_mesh_shade_mode_set(data->mesh_##name, 
EVAS_CANVAS3D_SHADE_MODE_##shade); \
@@ -96,7 +96,7 @@ int rr;
evas_canvas3d_mesh_convex_hull_data_get(data->mesh_##name, 0, vert, ind);  \
vertex = (float*) vert->members;\
index = ind->members;\
-   eo_add(>mesh_##name##_ch, EVAS_CANVAS3D_MESH_CLASS, evas);
\
+   data->mesh_##name##_ch = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
\
evas_canvas3d_mesh_vertex_count_set(data->mesh_##name##_ch, (vert->len / 
10)); \
evas_canvas3d_mesh_frame_add(data->mesh_##name##_ch, 0); \

[EGIT] [core/efl] master 07/07: Revert "Eo: Change to the Eo4 eo_add syntax."

2016-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 8a56f5c98e04bdb945cc9ef82d24d0bf9c52f62c
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 11 12:24:11 2016 +

Revert "Eo: Change to the Eo4 eo_add syntax."

I found a way to keep eo_add() the way it was and gracefully degrade to
a portable (but not as fast) solution for compilers that don't support
the compound macros returning a value gnu extension: ({int a; a;}).

I'm reverting these changes now, and I'll introduce the fallback as soon
as I can.

This reverts commit b85bb3718389470bfc78c079dd5e06def5e963f3.
---
 src/lib/eo/Eo.h | 18 --
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index a6e4f96..387f187 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -610,12 +610,12 @@ EAPI Eo *eo_super(const Eo *obj, const Eo_Class 
*cur_klass);
  */
 EAPI const Eo_Class *eo_class_get(const Eo *obj);
 
-#define _eo_add_common(objp, klass, parent, is_ref, ...) \
-   ((Eo *) ( \
- *objp = _eo_add_internal_start(__FILE__, __LINE__, klass, parent, 
is_ref), \
- ##__VA_ARGS__, \
- *objp = _eo_add_end(*objp) \
-   ))
+#define _eo_add_common(klass, parent, is_ref, ...) \
+   ({ \
+ Eo * const eoid = _eo_add_internal_start(__FILE__, __LINE__, klass, 
parent, is_ref); \
+ __VA_ARGS__; \
+ (Eo *) _eo_add_end(eoid); \
+})
 
 /**
  * @def eo_add
@@ -631,13 +631,12 @@ EAPI const Eo_Class *eo_class_get(const Eo *obj);
  *
  * If you want a more "consistent" behaviour, take a look at #eo_add_ref.
  *
- * @param objp a pointer to the object id (Eo **)
  * @param klass the class of the object to create.
  * @param parent the parent to set to the object.
  * @param ... The ops to run.
  * @return An handle to the new object on success, NULL otherwise.
  */
-#define eo_add(objp, klass, parent, ...) _eo_add_common(objp, klass, parent, 
EINA_FALSE, ##__VA_ARGS__)
+#define eo_add(klass, parent, ...) _eo_add_common(klass, parent, EINA_FALSE, 
##__VA_ARGS__)
 
 /**
  * @def eo_add_ref
@@ -649,13 +648,12 @@ EAPI const Eo_Class *eo_class_get(const Eo *obj);
  * when the parent object is deleted until you manually remove the ref
  * by calling eo_unref().
  *
- * @param objp a pointer to the object id (Eo **)
  * @param klass the class of the object to create.
  * @param parent the parent to set to the object.
  * @param ... The ops to run.
  * @return An handle to the new object on success, NULL otherwise.
  */
-#define eo_add_ref(objp, klass, parent, ...) _eo_add_common(objp, klass, 
parent, EINA_TRUE, ##__VA_ARGS__)
+#define eo_add_ref(klass, parent, ...) _eo_add_common(klass, parent, 
EINA_TRUE, ##__VA_ARGS__)
 
 EAPI Eo * _eo_add_internal_start(const char *file, int line, const Eo_Class 
*klass_id, Eo *parent, Eina_Bool ref);
 

-- 




[EGIT] [core/elementary] master 01/04: Revert "combobox: fix borkage after eo_add change."

2016-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit a1f55ce68a0e652af38bc4b4c59ed5f8bd5029e9
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 11 12:31:40 2016 +

Revert "combobox: fix borkage after eo_add change."

This reverts commit da8287fa370bb579a4a592dd280ac5c8a6a25830.
---
 src/lib/elc_combobox.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/lib/elc_combobox.c b/src/lib/elc_combobox.c
index 6899543..0c552b5 100644
--- a/src/lib/elc_combobox.c
+++ b/src/lib/elc_combobox.c
@@ -458,8 +458,7 @@ _elm_combobox_eo_base_constructor(Eo *obj, 
Elm_Combobox_Data *sd)
elm_table_pack(sd->tbl, sd->spacer, 0, 0, 1, 1);
 
// This is the genlist object that will take over the genlist call
-   eo_add(, ELM_GENLIST_CLASS, obj);
-   sd->genlist = gl;
+   sd->genlist = gl = eo_add(, ELM_GENLIST_CLASS, obj);
elm_genlist_filter_set(gl, NULL);
elm_widget_mirrored_automatic_set(gl, EINA_FALSE);
elm_widget_mirrored_set(gl, elm_widget_mirrored_get(obj));
@@ -473,8 +472,7 @@ _elm_combobox_eo_base_constructor(Eo *obj, 
Elm_Combobox_Data *sd)
elm_table_pack(sd->tbl, gl, 0, 0, 1, 1);
 
// This is the entry object that will take over the entry call
-   eo_add(, ELM_ENTRY_CLASS, obj);
-   sd->entry = entry;
+   sd->entry = entry = eo_add(, ELM_ENTRY_CLASS, obj);
elm_widget_mirrored_automatic_set(entry, EINA_FALSE);
elm_widget_mirrored_set(entry, elm_widget_mirrored_get(obj));
elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF,

-- 




[EGIT] [core/elementary] master 02/04: Revert "Automatic migration to the new eo_add syntax."

2016-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=97ca9e387903306c01c0a7b7dcbb3f3886d03862

commit 97ca9e387903306c01c0a7b7dcbb3f3886d03862
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 11 12:34:16 2016 +

Revert "Automatic migration to the new eo_add syntax."

This reverts commit d1a1819813d74361b25fd5c1123f7ac76be9b84f.
---
 src/bin/test_application_server.c  |  4 +--
 src/bin/test_systray.c |  2 +-
 src/bin/test_task_switcher.c   |  2 +-
 src/examples/evas3d_map_example.c  | 32 ++--
 src/examples/evas3d_object_on_button_example.c | 24 ---
 src/examples/evas3d_scene_on_button_example.c  | 22 --
 src/examples/filemvc.c | 10 +++
 src/examples/fileviewlist.c|  4 +--
 src/examples/performance/graphical.c   | 35 --
 src/examples/sphere_hunter/evas_3d_sphere_hunter.c | 30 +--
 src/lib/elc_ctxpopup.c |  7 ++---
 src/lib/elc_fileselector.c |  3 +-
 src/lib/elc_fileselector_button.c  |  3 +-
 src/lib/elc_fileselector_entry.c   |  3 +-
 src/lib/elc_hoversel.c |  6 ++--
 src/lib/elc_multibuttonentry.c |  5 ++--
 src/lib/elc_naviframe.c|  5 ++--
 src/lib/elc_player.c   |  3 +-
 src/lib/elc_popup.c|  5 ++--
 src/lib/elm_access.c   |  3 +-
 src/lib/elm_actionslider.c |  3 +-
 src/lib/elm_app_client.c   |  4 +--
 src/lib/elm_app_server.c   |  2 +-
 src/lib/elm_atspi_bridge.c |  2 +-
 src/lib/elm_bg.c   |  3 +-
 src/lib/elm_box.c  |  3 +-
 src/lib/elm_bubble.c   |  3 +-
 src/lib/elm_button.c   |  3 +-
 src/lib/elm_calendar.c |  3 +-
 src/lib/elm_check.c|  3 +-
 src/lib/elm_clock.c|  3 +-
 src/lib/elm_colorselector.c|  7 ++---
 src/lib/elm_conform.c  |  3 +-
 src/lib/elm_datetime.c |  3 +-
 src/lib/elm_dayselector.c  |  6 ++--
 src/lib/elm_diskselector.c |  6 ++--
 src/lib/elm_entry.c|  3 +-
 src/lib/elm_flip.c |  3 +-
 src/lib/elm_flipselector.c |  5 ++--
 src/lib/elm_frame.c|  3 +-
 src/lib/elm_gengrid.c  |  8 ++---
 src/lib/elm_genlist.c  |  8 ++---
 src/lib/elm_gesture_layer.c|  3 +-
 src/lib/elm_glview.c   |  6 ++--
 src/lib/elm_grid.c |  3 +-
 src/lib/elm_hover.c|  3 +-
 src/lib/elm_icon.c |  3 +-
 src/lib/elm_image.c|  3 +-
 src/lib/elm_index.c|  5 ++--
 src/lib/elm_interface_atspi_accessible.c   |  2 +-
 src/lib/elm_interface_scrollable.c |  3 +-
 src/lib/elm_inwin.c|  3 +-
 src/lib/elm_label.c|  3 +-
 src/lib/elm_layout.c   |  3 +-
 src/lib/elm_list.c |  6 ++--
 src/lib/elm_map.c  |  5 ++--
 src/lib/elm_mapbuf.c   |  3 +-
 src/lib/elm_menu.c |  7 ++---
 src/lib/elm_notify.c   |  3 +-
 src/lib/elm_panel.c|  3 +-
 src/lib/elm_panes.c|  3 +-
 src/lib/elm_photo.c|  3 +-
 src/lib/elm_photocam.c |  5 ++--
 src/lib/elm_plug.c |  3 +-
 src/lib/elm_prefs.c|  3 +-
 src/lib/elm_progressbar.c  |  3 +-
 src/lib/elm_radio.c|  3 +-
 src/lib/elm_route.c|  3 +-
 src/lib/elm_scroller.c |  3 +-
 src/lib/elm_segment_control.c  |  5 ++--
 src/lib/elm_separator.c|  3 +-
 src/lib/elm_slider.c   |  3 +-
 src/lib/elm_slideshow.c|  7 ++---
 src/lib/elm_spinner.c  |  3 +-
 src/lib/

[EGIT] [core/efl] master 02/07: Revert "Fix examples according to the recent eo event changes."

2016-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 15646cf5e639bdd4309a2b215f394436f652d2d1
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 11 12:24:05 2016 +

Revert "Fix examples according to the recent eo event changes."

This reverts commit d2fba6c5959f82f35984167131d3b67207780f48.
---
 src/examples/eldbus/dbusmodel.c| 22 +++-
 src/examples/emotion/emotion_basic_example.c   |  3 +-
 src/examples/emotion/emotion_border_example.c  | 28 ++--
 src/examples/emotion/emotion_generic_example.c | 30 ++---
 .../emotion/emotion_generic_subtitle_example.c |  3 +-
 src/examples/emotion/emotion_signals_example.c | 39 +-
 6 files changed, 75 insertions(+), 50 deletions(-)

diff --git a/src/examples/eldbus/dbusmodel.c b/src/examples/eldbus/dbusmodel.c
index ec37309..3e4063e 100644
--- a/src/examples/eldbus/dbusmodel.c
+++ b/src/examples/eldbus/dbusmodel.c
@@ -14,9 +14,11 @@
 static unsigned int children_count = 0;
 
 static Eina_Bool
-_event_interface_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
+_event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
+   const Eo_Event_Description *desc EINA_UNUSED,
+   void *event_info)
 {
-   Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info;
+   Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info;
Eina_Array *properties_list;
Eina_Array_Iterator iterator;
Eina_Value const* property_value;
@@ -27,8 +29,8 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, const 
Eo_Event *event)
if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
  return EINA_TRUE;
 
-   name = eldbus_model_proxy_name_get(event->obj);
-   efl_model_properties_get(event->obj, _list);
+   name = eldbus_model_proxy_name_get(model);
+   efl_model_properties_get(model, _list);
 
printf(" -> %s\n", name);
if (eina_array_count(properties_list))
@@ -36,7 +38,7 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, const 
Eo_Event *event)
 
EINA_ARRAY_ITER_NEXT(properties_list, i, property, iterator)
  {
-efl_model_property_get(event->obj, property, _value);
+efl_model_property_get(model, property, _value);
 if (property_value)
   {
  prop_str = eina_value_to_string(property_value);
@@ -55,9 +57,11 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, 
const Eo_Event *event)
 }
 
 static Eina_Bool
-_event_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
+_event_load_status_cb(void *data EINA_UNUSED, Eo *model,
+   const Eo_Event_Description *desc EINA_UNUSED,
+   void *event_info)
 {
-   Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info;
+   Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info;
Eina_Accessor *accessor;
Eo *child = NULL;
unsigned int i;
@@ -65,7 +69,7 @@ _event_load_status_cb(void *data EINA_UNUSED, const Eo_Event 
*event)
if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
  return EINA_TRUE;
 
-   efl_model_children_count_get(event->obj, _count);
+   efl_model_children_count_get(model, _count);
if (children_count == 0)
  {
 printf("Don't find Interfaces\n");
@@ -73,7 +77,7 @@ _event_load_status_cb(void *data EINA_UNUSED, const Eo_Event 
*event)
 return EINA_FALSE;
  }
 
-   efl_model_children_slice_get(event->obj, 0, 0, );
+   efl_model_children_slice_get(model, 0, 0, );
printf("\nInterfaces:\n");
EINA_ACCESSOR_FOREACH(accessor, i, child)
  {
diff --git a/src/examples/emotion/emotion_basic_example.c 
b/src/examples/emotion/emotion_basic_example.c
index 9ad3575..9675f6b 100644
--- a/src/examples/emotion/emotion_basic_example.c
+++ b/src/examples/emotion/emotion_basic_example.c
@@ -15,7 +15,8 @@
 #define HEIGHT (240)
 
 static Eina_Bool
-_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
+_playback_started_cb(void *data EINA_UNUSED,
+  Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
 printf("Emotion object started playback.\n");
 
diff --git a/src/examples/emotion/emotion_border_example.c 
b/src/examples/emotion/emotion_border_example.c
index f422fbe..ea3c07d 100644
--- a/src/examples/emotion/emotion_border_example.c
+++ b/src/examples/emotion/emotion_border_example.c
@@ -18,7 +18,8 @@ static Eina_List *filenames = NULL;
 static Eina_List *curfile = NULL;
 
 static Eina_Bool
-_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
+_playback_started_cb(void *data EINA_UNUSED,
+Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, 
void *event_info

[EGIT] [core/efl] master 05/07: Revert "Ector and eo suite: Semi automatically migrate to the new eo_add."

2016-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 81240669e82a71645011b2d3ba4034fbe297447c
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 11 12:24:09 2016 +

Revert "Ector and eo suite: Semi automatically migrate to the new eo_add."

This reverts commit df83edaeb6b10324868f28e8f1910147ba22e5e5.
---
 src/lib/ector/cairo/ector_cairo_surface.c   |   7 +-
 src/lib/ector/gl/ector_gl_surface.c |   7 +-
 src/lib/ector/software/ector_software_surface.c |   9 +-
 src/tests/eo/suite/eo_test_general.c| 129 ++--
 4 files changed, 64 insertions(+), 88 deletions(-)

diff --git a/src/lib/ector/cairo/ector_cairo_surface.c 
b/src/lib/ector/cairo/ector_cairo_surface.c
index 93336db..3cc47e3 100644
--- a/src/lib/ector/cairo/ector_cairo_surface.c
+++ b/src/lib/ector/cairo/ector_cairo_surface.c
@@ -61,13 +61,12 @@ 
_ector_cairo_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
 
Ector_Cairo_Surface_Data *pd EINA_UNUSED,
 const Eo_Class 
*type)
 {
-   Eo *ret = NULL;
if (type == ECTOR_RENDERER_GENERIC_SHAPE_MIXIN)
- return eo_add(, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
+ return eo_add(ECTOR_RENDERER_CAIRO_SHAPE_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN)
- return eo_add(, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
+ return eo_add(ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN)
- return eo_add(, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
+ return eo_add(ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
 
ERR("Couldn't find class for type: %s\n", eo_class_name_get(type));
return NULL;
diff --git a/src/lib/ector/gl/ector_gl_surface.c 
b/src/lib/ector/gl/ector_gl_surface.c
index fe3658c..2ad6653 100644
--- a/src/lib/ector/gl/ector_gl_surface.c
+++ b/src/lib/ector/gl/ector_gl_surface.c
@@ -44,13 +44,12 @@ 
_ector_gl_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
  
Ector_GL_Surface_Data *pd EINA_UNUSED,
  const Eo_Class 
*type)
 {
-   Eo *ret = NULL;
if (type == ECTOR_RENDERER_GENERIC_SHAPE_MIXIN)
- return eo_add(, ECTOR_RENDERER_GL_SHAPE_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
+ return eo_add(ECTOR_RENDERER_GL_SHAPE_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN)
- return eo_add(, ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
+ return eo_add(ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN)
- return eo_add(, ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
+ return eo_add(ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
 
ERR("Couldn't find class for type: %s\n", eo_class_name_get(type));
return NULL;
diff --git a/src/lib/ector/software/ector_software_surface.c 
b/src/lib/ector/software/ector_software_surface.c
index 551211f..f67b194 100644
--- a/src/lib/ector/software/ector_software_surface.c
+++ b/src/lib/ector/software/ector_software_surface.c
@@ -15,15 +15,14 @@ 
_ector_software_surface_ector_generic_surface_renderer_factory_new(Eo *obj,

Ector_Software_Surface_Data *pd EINA_UNUSED,
const 
Eo_Class *type)
 {
-   Eo *ret = NULL;
if (type == ECTOR_RENDERER_GENERIC_SHAPE_MIXIN)
- return eo_add(, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
+ return eo_add(ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN)
- return eo_add(, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
+ return eo_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN)
- return eo_add(, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
+ return eo_add(ECTOR_RENDERER_

[EGIT] [core/elementary] master 04/04: Combobox: Fix according to the new (old) eo_add syntax.

2016-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit a462b1d404b316eddb22e350667b93c1a13805a4
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 11 12:38:26 2016 +

Combobox: Fix according to the new (old) eo_add syntax.
---
 src/lib/elc_combobox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elc_combobox.c b/src/lib/elc_combobox.c
index fe3f4a3..65e8205 100644
--- a/src/lib/elc_combobox.c
+++ b/src/lib/elc_combobox.c
@@ -369,7 +369,7 @@ _elm_combobox_multiple_selection_set(Eo *obj, 
Elm_Combobox_Data *pd,
if (enabled)
  {
 // This is multibuttonentry object that will take over the MBE call
-eo_add(>mbe,ELM_MULTIBUTTONENTRY_CLASS, obj);
+pd->mbe = eo_add(ELM_MULTIBUTTONENTRY_CLASS, obj);
 evas_object_size_hint_weight_set(pd->mbe, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
 evas_object_size_hint_align_set(pd->mbe, EVAS_HINT_FILL, 
EVAS_HINT_FILL);
 eo_event_callback_array_add(elm_multibuttonentry_entry_get(pd->mbe), 
entry_callbacks(), obj);

-- 




[EGIT] [core/elementary] master 03/04: Revert "Combobox: Semi automatic migration to the new eo_add."

2016-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit c32d0bc58f1e6e1f5e4721f0dd2a359c79170b4d
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 11 12:34:19 2016 +

Revert "Combobox: Semi automatic migration to the new eo_add."

Reverted eo_add() changes following the return to the old eo_add()
syntax.

This reverts commit 90e465317d10ca01ff39824e56828ee983f7ae41.
---
 src/lib/elc_combobox.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/lib/elc_combobox.c b/src/lib/elc_combobox.c
index 0c552b5..fe3f4a3 100644
--- a/src/lib/elc_combobox.c
+++ b/src/lib/elc_combobox.c
@@ -409,8 +409,7 @@ EAPI Evas_Object *
 elm_combobox_add(Evas_Object *parent)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
-   Evas_Object *obj = NULL;
-   eo_add(, MY_CLASS, parent);
+   Evas_Object *obj = eo_add(MY_CLASS, parent);
return obj;
 }
 
@@ -433,7 +432,7 @@ _elm_combobox_eo_base_constructor(Eo *obj, 
Elm_Combobox_Data *sd)
sd->hover_parent = elm_object_parent_widget_get(obj);
 
//hover
-   eo_add(>hover, ELM_HOVER_CLASS, sd->hover_parent);
+   sd->hover = eo_add(ELM_HOVER_CLASS, sd->hover_parent);
elm_widget_mirrored_automatic_set(sd->hover, EINA_FALSE);
elm_hover_target_set(sd->hover, obj);
snprintf(buf, sizeof(buf), "combobox_vertical/%s",
@@ -458,7 +457,7 @@ _elm_combobox_eo_base_constructor(Eo *obj, 
Elm_Combobox_Data *sd)
elm_table_pack(sd->tbl, sd->spacer, 0, 0, 1, 1);
 
// This is the genlist object that will take over the genlist call
-   sd->genlist = gl = eo_add(, ELM_GENLIST_CLASS, obj);
+   sd->genlist = gl = eo_add(ELM_GENLIST_CLASS, obj);
elm_genlist_filter_set(gl, NULL);
elm_widget_mirrored_automatic_set(gl, EINA_FALSE);
elm_widget_mirrored_set(gl, elm_widget_mirrored_get(obj));
@@ -472,7 +471,7 @@ _elm_combobox_eo_base_constructor(Eo *obj, 
Elm_Combobox_Data *sd)
elm_table_pack(sd->tbl, gl, 0, 0, 1, 1);
 
// This is the entry object that will take over the entry call
-   sd->entry = entry = eo_add(, ELM_ENTRY_CLASS, obj);
+   sd->entry = entry = eo_add(ELM_ENTRY_CLASS, obj);
elm_widget_mirrored_automatic_set(entry, EINA_FALSE);
elm_widget_mirrored_set(entry, elm_widget_mirrored_get(obj));
elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF,

-- 




[EGIT] [tools/abi_checks] master 01/01: Add efl + elm 1.17 dumps.

2016-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/tools/abi_checks.git/commit/?id=4e427b3b8050d9ff3faaca553edca8e4a28d0353

commit 4e427b3b8050d9ff3faaca553edca8e4a28d0353
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 11 11:10:58 2016 +

Add efl + elm 1.17 dumps.
---
 abi_dumps/efl/efl_1.17.0.abi.tar.gz   | Bin 0 -> 637064 bytes
 abi_dumps/elementary/elementary_1.17.0.abi.tar.gz | Bin 0 -> 413536 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/abi_dumps/efl/efl_1.17.0.abi.tar.gz 
b/abi_dumps/efl/efl_1.17.0.abi.tar.gz
new file mode 100644
index 000..05c9717
Binary files /dev/null and b/abi_dumps/efl/efl_1.17.0.abi.tar.gz differ
diff --git a/abi_dumps/elementary/elementary_1.17.0.abi.tar.gz 
b/abi_dumps/elementary/elementary_1.17.0.abi.tar.gz
new file mode 100644
index 000..6aca71e
Binary files /dev/null and b/abi_dumps/elementary/elementary_1.17.0.abi.tar.gz 
differ

-- 




[EGIT] [core/efl] master 01/01: Fix examples according to the recent eo event changes.

2016-03-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit d2fba6c5959f82f35984167131d3b67207780f48
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 9 17:16:19 2016 +

Fix examples according to the recent eo event changes.
---
 src/examples/eldbus/dbusmodel.c| 22 +---
 src/examples/emotion/emotion_basic_example.c   |  3 +-
 src/examples/emotion/emotion_border_example.c  | 28 ++--
 src/examples/emotion/emotion_generic_example.c | 30 +++--
 .../emotion/emotion_generic_subtitle_example.c |  3 +-
 src/examples/emotion/emotion_signals_example.c | 39 +-
 6 files changed, 50 insertions(+), 75 deletions(-)

diff --git a/src/examples/eldbus/dbusmodel.c b/src/examples/eldbus/dbusmodel.c
index 3e4063e..ec37309 100644
--- a/src/examples/eldbus/dbusmodel.c
+++ b/src/examples/eldbus/dbusmodel.c
@@ -14,11 +14,9 @@
 static unsigned int children_count = 0;
 
 static Eina_Bool
-_event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
-   const Eo_Event_Description *desc EINA_UNUSED,
-   void *event_info)
+_event_interface_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info;
+   Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info;
Eina_Array *properties_list;
Eina_Array_Iterator iterator;
Eina_Value const* property_value;
@@ -29,8 +27,8 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo 
*model,
if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
  return EINA_TRUE;
 
-   name = eldbus_model_proxy_name_get(model);
-   efl_model_properties_get(model, _list);
+   name = eldbus_model_proxy_name_get(event->obj);
+   efl_model_properties_get(event->obj, _list);
 
printf(" -> %s\n", name);
if (eina_array_count(properties_list))
@@ -38,7 +36,7 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo 
*model,
 
EINA_ARRAY_ITER_NEXT(properties_list, i, property, iterator)
  {
-efl_model_property_get(model, property, _value);
+efl_model_property_get(event->obj, property, _value);
 if (property_value)
   {
  prop_str = eina_value_to_string(property_value);
@@ -57,11 +55,9 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo 
*model,
 }
 
 static Eina_Bool
-_event_load_status_cb(void *data EINA_UNUSED, Eo *model,
-   const Eo_Event_Description *desc EINA_UNUSED,
-   void *event_info)
+_event_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info;
+   Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info;
Eina_Accessor *accessor;
Eo *child = NULL;
unsigned int i;
@@ -69,7 +65,7 @@ _event_load_status_cb(void *data EINA_UNUSED, Eo *model,
if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
  return EINA_TRUE;
 
-   efl_model_children_count_get(model, _count);
+   efl_model_children_count_get(event->obj, _count);
if (children_count == 0)
  {
 printf("Don't find Interfaces\n");
@@ -77,7 +73,7 @@ _event_load_status_cb(void *data EINA_UNUSED, Eo *model,
 return EINA_FALSE;
  }
 
-   efl_model_children_slice_get(model, 0, 0, );
+   efl_model_children_slice_get(event->obj, 0, 0, );
printf("\nInterfaces:\n");
EINA_ACCESSOR_FOREACH(accessor, i, child)
  {
diff --git a/src/examples/emotion/emotion_basic_example.c 
b/src/examples/emotion/emotion_basic_example.c
index 9675f6b..9ad3575 100644
--- a/src/examples/emotion/emotion_basic_example.c
+++ b/src/examples/emotion/emotion_basic_example.c
@@ -15,8 +15,7 @@
 #define HEIGHT (240)
 
 static Eina_Bool
-_playback_started_cb(void *data EINA_UNUSED,
-  Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
 {
 printf("Emotion object started playback.\n");
 
diff --git a/src/examples/emotion/emotion_border_example.c 
b/src/examples/emotion/emotion_border_example.c
index ea3c07d..f422fbe 100644
--- a/src/examples/emotion/emotion_border_example.c
+++ b/src/examples/emotion/emotion_border_example.c
@@ -18,8 +18,7 @@ static Eina_List *filenames = NULL;
 static Eina_List *curfile = NULL;
 
 static Eina_Bool
-_playback_started_cb(void *data EINA_UNUSED,
-Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, 
void *event_info EINA_UNUSED)
+_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
 {
 printf("Emotion object started playback.\n");
 
@@ -109,8 +108,7 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, E

[EGIT] [core/efl] master 01/01: Examples: Update according to recent eo_add changes.

2016-03-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 6594ba0b6df9ba72f031a00d0e8ba3b23cf2c0b2
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 9 17:02:42 2016 +

Examples: Update according to recent eo_add changes.
---
 src/examples/evas/evas-3d-colorpick.c  | 14 ++
 src/examples/evas/evas-3d-hull.c   |  4 ++--
 src/examples/evas/evas-3d-mmap-set.c   |  4 ++--
 src/examples/evas/evas-3d-obj.c|  4 ++--
 src/examples/evas/evas-3d-ply.c|  4 ++--
 src/examples/evas/evas-3d-shadows.c|  8 
 src/examples/evas/evas-object-manipulation-eo.c|  8 
 src/examples/evas/shooter/evas-3d-shooter-macros.h | 12 ++--
 src/examples/evas/shooter/evas-3d-shooter.c|  2 +-
 9 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/src/examples/evas/evas-3d-colorpick.c 
b/src/examples/evas/evas-3d-colorpick.c
index 4a7594b..ceda8bc 100644
--- a/src/examples/evas/evas-3d-colorpick.c
+++ b/src/examples/evas/evas-3d-colorpick.c
@@ -272,27 +272,25 @@ _init_scene(const char *texture)
Evas_Real tmp;
Test_object *m;
 
-   globalscene.scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+   eo_add(, EVAS_CANVAS3D_SCENE_CLASS, evas);
 
-   globalscene.root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+   eo_add(_node, EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(globalscene.root_node, 
EVAS_CANVAS3D_NODE_TYPE_NODE));
 
-   globalscene.camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+   eo_add(, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(globalscene.camera, 30.0, 
1.0, 1.0, 1000.0);
 
-   globalscene.camera_node =
-  eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+   eo_add(_node, EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(globalscene.camera_node, 
EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(globalscene.camera_node, globalscene.camera);
evas_canvas3d_node_member_add(globalscene.root_node, 
globalscene.camera_node);
evas_canvas3d_node_position_set(globalscene.camera_node, 0.0, 30.0, 800.0);
evas_canvas3d_node_look_at_set(globalscene.camera_node, 
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, -1000.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 
1.0, 0.0);
-   globalscene.light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+   eo_add(, EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(globalscene.light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_diffuse_set(globalscene.light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(globalscene.light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_directional_set(globalscene.light, EINA_TRUE);
 
-   globalscene.light_node =
-  eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+   eo_add(_node, EVAS_CANVAS3D_NODE_CLASS, evas, 
evas_canvas3d_node_constructor(globalscene.light_node, 
EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(globalscene.light_node, globalscene.light);
evas_canvas3d_node_position_set(globalscene.light_node, 100.0, 50.0, 300.0);
evas_canvas3d_node_look_at_set(globalscene.light_node, 
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 1.0, 
1.0, 1.0);
diff --git a/src/examples/evas/evas-3d-hull.c b/src/examples/evas/evas-3d-hull.c
index 130ad37..32c1d01 100644
--- a/src/examples/evas/evas-3d-hull.c
+++ b/src/examples/evas/evas-3d-hull.c
@@ -84,7 +84,7 @@ typedef struct _Scene_Data
 int rr;
 
 #define MODEL_MESH_INIT(name, model, shade)
  \
-   data->mesh_##name = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 
 \
+   eo_add(>mesh_##name, EVAS_CANVAS3D_MESH_CLASS, evas); 
 \
efl_file_set(data->mesh_##name, model, NULL); \
evas_canvas3d_mesh_vertex_assembly_set(data->mesh_##name, 
EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES); \
evas_canvas3d_mesh_shade_mode_set(data->mesh_##name, 
EVAS_CANVAS3D_SHADE_MODE_##shade); \
@@ -96,7 +96,7 @@ int rr;
evas_canvas3d_mesh_convex_hull_data_get(data->mesh_##name, 0, vert, ind);  \
vertex = (float*) vert->members;\
index = ind->members;\
-   data->mesh_##name##_ch = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
\
+   eo_add(>mesh_##name##_ch, EVAS_CANVAS3D_MESH_CLASS, evas);
\
evas_canvas3d_mesh_vertex_count_set(data->mesh_##name##_ch, (vert->len / 
10)); \
evas_canvas3d_mesh_frame_add(data->mesh_##name##_ch, 0); \
evas_canvas3d_mesh_frame_vertex_data_copy_set(data->mesh_##name##_ch, 0, 
EVAS_CAN

[EGIT] [tools/expedite] master 01/01: Automatic migration to the new eo_add syntax.

2016-03-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=1c99584bcb72aabedfb7e9696bae1661c14ddd0c

commit 1c99584bcb72aabedfb7e9696bae1661c14ddd0c
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 9 16:31:15 2016 +

Automatic migration to the new eo_add syntax.
---
 src/bin/about.c  |  2 +-
 src/bin/image_blend_border.c |  2 +-
 src/bin/image_blend_border_recolor.c |  2 +-
 src/bin/image_blend_fade_pow2_unscaled.c |  2 +-
 src/bin/image_blend_fade_unscaled.c  |  2 +-
 src/bin/image_blend_many_smooth_same_scaled.c|  2 +-
 src/bin/image_blend_nearest_same_scaled.c|  2 +-
 src/bin/image_blend_nearest_scaled.c |  2 +-
 src/bin/image_blend_nearest_solid_same_scaled.c  |  2 +-
 src/bin/image_blend_nearest_solid_scaled.c   |  2 +-
 src/bin/image_blend_occlude1.c   |  2 +-
 src/bin/image_blend_occlude1_few.c   |  2 +-
 src/bin/image_blend_occlude1_many.c  |  2 +-
 src/bin/image_blend_occlude1_very_many.c |  2 +-
 src/bin/image_blend_occlude2.c   |  2 +-
 src/bin/image_blend_occlude2_few.c   |  2 +-
 src/bin/image_blend_occlude2_many.c  |  2 +-
 src/bin/image_blend_occlude2_very_many.c |  2 +-
 src/bin/image_blend_occlude3.c   |  2 +-
 src/bin/image_blend_occlude3_few.c   |  2 +-
 src/bin/image_blend_occlude3_many.c  |  2 +-
 src/bin/image_blend_occlude3_very_many.c |  2 +-
 src/bin/image_blend_smooth_same_scaled.c |  2 +-
 src/bin/image_blend_smooth_scaled.c  |  2 +-
 src/bin/image_blend_smooth_solid_same_scaled.c   |  2 +-
 src/bin/image_blend_smooth_solid_scaled.c|  2 +-
 src/bin/image_blend_solid_border.c   |  2 +-
 src/bin/image_blend_solid_fade_pow2_unscaled.c   |  2 +-
 src/bin/image_blend_solid_fade_unscaled.c|  2 +-
 src/bin/image_blend_solid_middle_border.c|  2 +-
 src/bin/image_blend_solid_middle_unscaled.c  |  2 +-
 src/bin/image_blend_solid_unscaled.c |  2 +-
 src/bin/image_blend_unscaled.c   |  2 +-
 src/bin/image_crossfade.c|  4 ++--
 src/bin/image_data_argb.c|  2 +-
 src/bin/image_data_argb_alpha.c  |  2 +-
 src/bin/image_data_ycbcr601pl.c  |  2 +-
 .../image_data_ycbcr601pl_map_nearest_solid_rotate.c |  2 +-
 src/bin/image_data_ycbcr601pl_map_solid_rotate.c |  2 +-
 src/bin/image_data_ycbcr601pl_wide_stride.c  |  2 +-
 src/bin/image_map_3d_1.c |  2 +-
 src/bin/image_map_3d_2.c |  2 +-
 src/bin/image_map_3d_3.c |  2 +-
 src/bin/image_map_3d_4.c |  2 +-
 src/bin/image_map_3d_5.c |  2 +-
 src/bin/image_map_3d_6.c |  2 +-
 src/bin/image_map_3d_flow.c  |  4 ++--
 src/bin/image_map_color_alpha_nearest_rotate.c   |  2 +-
 src/bin/image_map_color_alpha_nearest_solid_rotate.c |  2 +-
 src/bin/image_map_color_alpha_rotate.c   |  2 +-
 src/bin/image_map_color_alpha_solid_rotate.c |  2 +-
 src/bin/image_map_color_nearest_rotate.c |  2 +-
 src/bin/image_map_color_nearest_solid_rotate.c   |  2 +-
 src/bin/image_map_color_rotate.c |  2 +-
 src/bin/image_map_color_solid_rotate.c   |  2 +-
 src/bin/image_map_nearest_rotate.c   |  2 +-
 src/bin/image_map_nearest_solid_rotate.c |  2 +-
 src/bin/image_map_rotate.c   |  2 +-
 src/bin/image_map_solid_rotate.c |  2 +-
 src/bin/image_mask.c |  4 ++--
 src/bin/image_mask_10.c  |  4 ++--
 src/bin/image_mask_11.c  |  4 ++--
 src/bin/image_mask_12.c  |  4 ++--
 src/bin/image_mask_13.c  |  4 ++--
 src/bin/image_mask_2.c   |  4 ++--
 src/bin/image_mask_3.c   |  4 ++--
 src/bin/image_mask_4.c   |  4 ++--
 src/bin/image_mask_5.c   |  4 ++--
 src/bin/image_mask_6.c   |  4 ++--
 src/bin/image_mask_7.c   |  4 ++--
 src/bin/image_mask_8.c   |  4 ++--
 src/bin/image_mask_9.c   |  4 ++--
 src/bin/image_quality_scale.c|  2 +-
 src/bin/line_blend.c |  2 +-
 src/bin/poly_blend.c   

[EGIT] [core/elementary] master 01/01: Image test: Migrate to the new event cb signature.

2016-03-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit de897d633f58b81a3b73c0af3ff3c586fdeb8056
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 9 16:27:01 2016 +

Image test: Migrate to the new event cb signature.
---
 src/tests/elm_test_image.c | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/tests/elm_test_image.c b/src/tests/elm_test_image.c
index fcc728c..ef631c7 100644
--- a/src/tests/elm_test_image.c
+++ b/src/tests/elm_test_image.c
@@ -35,28 +35,24 @@ START_TEST (elm_atspi_role_get)
 END_TEST
 
 static Eina_Bool
-_async_error_cb(void *data, Eo *obj,
-const Eo_Event_Description *desc EINA_UNUSED,
-void *event_info EINA_UNUSED)
+_async_error_cb(void *data, const Eo_Event *event)
 {
Test_Data *td = data;
char path[PATH_MAX];
sprintf(path, pathfmt, td->image_id);
-   efl_file_set(obj, path, NULL);
+   efl_file_set(event->obj, path, NULL);
return EO_CALLBACK_CONTINUE;
 }
 
 static Eina_Bool
-_async_opened_cb(void *data, Eo *obj,
- const Eo_Event_Description *desc EINA_UNUSED,
- void *event_info EINA_UNUSED)
+_async_opened_cb(void *data, const Eo_Event *event)
 {
Test_Data *td = data;
const char *ff, *kk, *r1, *r2;
char path[PATH_MAX];
 
sprintf(path, pathfmt, td->image_id);
-   efl_file_get(obj, , );
+   efl_file_get(event->obj, , );
r1 = strrchr(ff, '/');
r2 = strrchr(path, '/');
ck_assert(!strcmp(r1, r2));
@@ -66,7 +62,7 @@ _async_opened_cb(void *data, Eo *obj,
  {
 td->image_id++;
 sprintf(path, pathfmt, td->image_id);
-efl_file_set(obj, path, NULL);
+efl_file_set(event->obj, path, NULL);
 return EO_CALLBACK_CONTINUE;
  }
else if (td->image_id < MAX_IMAGE_ID)
@@ -75,7 +71,7 @@ _async_opened_cb(void *data, Eo *obj,
 for (; td->image_id < MAX_IMAGE_ID;)
   {
  sprintf(path, pathfmt, ++td->image_id);
- efl_file_set(obj, path, NULL);
+ efl_file_set(event->obj, path, NULL);
   }
 return EO_CALLBACK_CONTINUE;
  }

-- 




[EGIT] [core/elementary] master 02/02: Automatic migration to the new eo_add syntax.

2016-03-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit d1a1819813d74361b25fd5c1123f7ac76be9b84f
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 9 16:08:12 2016 +

Automatic migration to the new eo_add syntax.
---
 src/bin/test_application_server.c  |  4 +--
 src/bin/test_systray.c |  2 +-
 src/bin/test_task_switcher.c   |  2 +-
 src/examples/evas3d_map_example.c  | 32 ++--
 src/examples/evas3d_object_on_button_example.c | 24 +++
 src/examples/evas3d_scene_on_button_example.c  | 22 ++
 src/examples/filemvc.c | 10 +++
 src/examples/fileviewlist.c|  4 +--
 src/examples/performance/graphical.c   | 35 ++
 src/examples/sphere_hunter/evas_3d_sphere_hunter.c | 30 +--
 src/lib/elc_ctxpopup.c |  7 +++--
 src/lib/elc_fileselector.c |  3 +-
 src/lib/elc_fileselector_button.c  |  3 +-
 src/lib/elc_fileselector_entry.c   |  3 +-
 src/lib/elc_hoversel.c |  6 ++--
 src/lib/elc_multibuttonentry.c |  5 ++--
 src/lib/elc_naviframe.c|  5 ++--
 src/lib/elc_player.c   |  3 +-
 src/lib/elc_popup.c|  5 ++--
 src/lib/elm_access.c   |  3 +-
 src/lib/elm_actionslider.c |  3 +-
 src/lib/elm_app_client.c   |  4 +--
 src/lib/elm_app_server.c   |  2 +-
 src/lib/elm_atspi_bridge.c |  2 +-
 src/lib/elm_bg.c   |  3 +-
 src/lib/elm_box.c  |  3 +-
 src/lib/elm_bubble.c   |  3 +-
 src/lib/elm_button.c   |  3 +-
 src/lib/elm_calendar.c |  3 +-
 src/lib/elm_check.c|  3 +-
 src/lib/elm_clock.c|  3 +-
 src/lib/elm_colorselector.c|  7 +++--
 src/lib/elm_conform.c  |  3 +-
 src/lib/elm_datetime.c |  3 +-
 src/lib/elm_dayselector.c  |  6 ++--
 src/lib/elm_diskselector.c |  6 ++--
 src/lib/elm_entry.c|  3 +-
 src/lib/elm_flip.c |  3 +-
 src/lib/elm_flipselector.c |  5 ++--
 src/lib/elm_frame.c|  3 +-
 src/lib/elm_gengrid.c  |  8 +++--
 src/lib/elm_genlist.c  |  8 +++--
 src/lib/elm_gesture_layer.c|  3 +-
 src/lib/elm_glview.c   |  6 ++--
 src/lib/elm_grid.c |  3 +-
 src/lib/elm_hover.c|  3 +-
 src/lib/elm_icon.c |  3 +-
 src/lib/elm_image.c|  3 +-
 src/lib/elm_index.c|  5 ++--
 src/lib/elm_interface_atspi_accessible.c   |  2 +-
 src/lib/elm_interface_scrollable.c |  3 +-
 src/lib/elm_inwin.c|  3 +-
 src/lib/elm_label.c|  3 +-
 src/lib/elm_layout.c   |  3 +-
 src/lib/elm_list.c |  6 ++--
 src/lib/elm_map.c  |  5 ++--
 src/lib/elm_mapbuf.c   |  3 +-
 src/lib/elm_menu.c |  7 +++--
 src/lib/elm_notify.c   |  3 +-
 src/lib/elm_panel.c|  3 +-
 src/lib/elm_panes.c|  3 +-
 src/lib/elm_photo.c|  3 +-
 src/lib/elm_photocam.c |  5 ++--
 src/lib/elm_plug.c |  3 +-
 src/lib/elm_prefs.c|  3 +-
 src/lib/elm_progressbar.c  |  3 +-
 src/lib/elm_radio.c|  3 +-
 src/lib/elm_route.c|  3 +-
 src/lib/elm_scroller.c |  3 +-
 src/lib/elm_segment_control.c  |  5 ++--
 src/lib/elm_separator.c|  3 +-
 src/lib/elm_slider.c   |  3 +-
 src/lib/elm_slideshow.c|  7 +++--
 src/lib/elm_spinner.c  |  3 +-
 src/lib/elm_sys_notify.c   |  4 +--
 src/lib/elm_t

[EGIT] [core/elementary] master 01/02: Combobox: Semi automatic migration to the new eo_add.

2016-03-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=90e465317d10ca01ff39824e56828ee983f7ae41

commit 90e465317d10ca01ff39824e56828ee983f7ae41
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 9 16:01:26 2016 +

Combobox: Semi automatic migration to the new eo_add.
---
 src/lib/elc_combobox.c | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/lib/elc_combobox.c b/src/lib/elc_combobox.c
index af79c72..4227cea 100644
--- a/src/lib/elc_combobox.c
+++ b/src/lib/elc_combobox.c
@@ -309,7 +309,8 @@ EAPI Evas_Object *
 elm_combobox_add(Evas_Object *parent)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
-   Evas_Object *obj = eo_add(MY_CLASS, parent);
+   Evas_Object *obj = NULL;
+   eo_add(, MY_CLASS, parent);
return obj;
 }
 
@@ -332,7 +333,7 @@ _elm_combobox_eo_base_constructor(Eo *obj, 
Elm_Combobox_Data *sd)
sd->hover_parent = elm_object_parent_widget_get(obj);
 
//hover
-   sd->hover = eo_add(ELM_HOVER_CLASS, sd->hover_parent);
+   eo_add(>hover, ELM_HOVER_CLASS, sd->hover_parent);
elm_widget_mirrored_automatic_set(sd->hover, EINA_FALSE);
elm_hover_target_set(sd->hover, obj);
elm_widget_sub_object_add(obj, sd->hover);
@@ -358,7 +359,7 @@ _elm_combobox_eo_base_constructor(Eo *obj, 
Elm_Combobox_Data *sd)
elm_table_pack(sd->tbl, sd->spacer, 0, 0, 1, 1);
 
// This is the genlist object that will take over the genlist call
-   sd->genlist = gl = eo_add(ELM_GENLIST_CLASS, obj);
+   sd->genlist = gl = eo_add(, ELM_GENLIST_CLASS, obj);
elm_genlist_filter_set(gl, NULL);
elm_widget_mirrored_automatic_set(gl, EINA_FALSE);
elm_widget_mirrored_set(gl, elm_widget_mirrored_get(obj));
@@ -372,7 +373,7 @@ _elm_combobox_eo_base_constructor(Eo *obj, 
Elm_Combobox_Data *sd)
elm_table_pack(sd->tbl, gl, 0, 0, 1, 1);
 
// This is the entry object that will take over the entry call
-   sd->entry = entry = eo_add(ELM_ENTRY_CLASS, obj);
+   sd->entry = entry = eo_add(, ELM_ENTRY_CLASS, obj);
elm_widget_mirrored_automatic_set(entry, EINA_FALSE);
elm_widget_mirrored_set(entry, elm_widget_mirrored_get(obj));
elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF,

-- 




[EGIT] [core/efl] master 01/04: Eo: Change to the Eo4 eo_add syntax.

2016-03-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit b85bb3718389470bfc78c079dd5e06def5e963f3
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 9 15:06:49 2016 +

Eo: Change to the Eo4 eo_add syntax.

The current one was a hack in the meanwhile and was not protable.
---
 src/lib/eo/Eo.h | 18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 387f187..a6e4f96 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -610,12 +610,12 @@ EAPI Eo *eo_super(const Eo *obj, const Eo_Class 
*cur_klass);
  */
 EAPI const Eo_Class *eo_class_get(const Eo *obj);
 
-#define _eo_add_common(klass, parent, is_ref, ...) \
-   ({ \
- Eo * const eoid = _eo_add_internal_start(__FILE__, __LINE__, klass, 
parent, is_ref); \
- __VA_ARGS__; \
- (Eo *) _eo_add_end(eoid); \
-})
+#define _eo_add_common(objp, klass, parent, is_ref, ...) \
+   ((Eo *) ( \
+ *objp = _eo_add_internal_start(__FILE__, __LINE__, klass, parent, 
is_ref), \
+ ##__VA_ARGS__, \
+ *objp = _eo_add_end(*objp) \
+   ))
 
 /**
  * @def eo_add
@@ -631,12 +631,13 @@ EAPI const Eo_Class *eo_class_get(const Eo *obj);
  *
  * If you want a more "consistent" behaviour, take a look at #eo_add_ref.
  *
+ * @param objp a pointer to the object id (Eo **)
  * @param klass the class of the object to create.
  * @param parent the parent to set to the object.
  * @param ... The ops to run.
  * @return An handle to the new object on success, NULL otherwise.
  */
-#define eo_add(klass, parent, ...) _eo_add_common(klass, parent, EINA_FALSE, 
##__VA_ARGS__)
+#define eo_add(objp, klass, parent, ...) _eo_add_common(objp, klass, parent, 
EINA_FALSE, ##__VA_ARGS__)
 
 /**
  * @def eo_add_ref
@@ -648,12 +649,13 @@ EAPI const Eo_Class *eo_class_get(const Eo *obj);
  * when the parent object is deleted until you manually remove the ref
  * by calling eo_unref().
  *
+ * @param objp a pointer to the object id (Eo **)
  * @param klass the class of the object to create.
  * @param parent the parent to set to the object.
  * @param ... The ops to run.
  * @return An handle to the new object on success, NULL otherwise.
  */
-#define eo_add_ref(klass, parent, ...) _eo_add_common(klass, parent, 
EINA_TRUE, ##__VA_ARGS__)
+#define eo_add_ref(objp, klass, parent, ...) _eo_add_common(objp, klass, 
parent, EINA_TRUE, ##__VA_ARGS__)
 
 EAPI Eo * _eo_add_internal_start(const char *file, int line, const Eo_Class 
*klass_id, Eo *parent, Eina_Bool ref);
 

-- 




[EGIT] [core/efl] master 03/04: Ector and eo suite: Semi automatically migrate to the new eo_add.

2016-03-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit df83edaeb6b10324868f28e8f1910147ba22e5e5
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 9 15:39:51 2016 +

Ector and eo suite: Semi automatically migrate to the new eo_add.

There were some issues with the migration that required manual
intervention.
---
 src/lib/ector/cairo/ector_cairo_surface.c   |   7 +-
 src/lib/ector/gl/ector_gl_surface.c |   7 +-
 src/lib/ector/software/ector_software_surface.c |   9 +-
 src/tests/eo/suite/eo_test_general.c| 129 ++--
 4 files changed, 88 insertions(+), 64 deletions(-)

diff --git a/src/lib/ector/cairo/ector_cairo_surface.c 
b/src/lib/ector/cairo/ector_cairo_surface.c
index 3cc47e3..93336db 100644
--- a/src/lib/ector/cairo/ector_cairo_surface.c
+++ b/src/lib/ector/cairo/ector_cairo_surface.c
@@ -61,12 +61,13 @@ 
_ector_cairo_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
 
Ector_Cairo_Surface_Data *pd EINA_UNUSED,
 const Eo_Class 
*type)
 {
+   Eo *ret = NULL;
if (type == ECTOR_RENDERER_GENERIC_SHAPE_MIXIN)
- return eo_add(ECTOR_RENDERER_CAIRO_SHAPE_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
+ return eo_add(, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN)
- return eo_add(ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
+ return eo_add(, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN)
- return eo_add(ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
+ return eo_add(, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
 
ERR("Couldn't find class for type: %s\n", eo_class_name_get(type));
return NULL;
diff --git a/src/lib/ector/gl/ector_gl_surface.c 
b/src/lib/ector/gl/ector_gl_surface.c
index 2ad6653..fe3658c 100644
--- a/src/lib/ector/gl/ector_gl_surface.c
+++ b/src/lib/ector/gl/ector_gl_surface.c
@@ -44,12 +44,13 @@ 
_ector_gl_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
  
Ector_GL_Surface_Data *pd EINA_UNUSED,
  const Eo_Class 
*type)
 {
+   Eo *ret = NULL;
if (type == ECTOR_RENDERER_GENERIC_SHAPE_MIXIN)
- return eo_add(ECTOR_RENDERER_GL_SHAPE_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
+ return eo_add(, ECTOR_RENDERER_GL_SHAPE_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN)
- return eo_add(ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
+ return eo_add(, ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN)
- return eo_add(ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
+ return eo_add(, ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
 
ERR("Couldn't find class for type: %s\n", eo_class_name_get(type));
return NULL;
diff --git a/src/lib/ector/software/ector_software_surface.c 
b/src/lib/ector/software/ector_software_surface.c
index f67b194..551211f 100644
--- a/src/lib/ector/software/ector_software_surface.c
+++ b/src/lib/ector/software/ector_software_surface.c
@@ -15,14 +15,15 @@ 
_ector_software_surface_ector_generic_surface_renderer_factory_new(Eo *obj,

Ector_Software_Surface_Data *pd EINA_UNUSED,
const 
Eo_Class *type)
 {
+   Eo *ret = NULL;
if (type == ECTOR_RENDERER_GENERIC_SHAPE_MIXIN)
- return eo_add(ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
+ return eo_add(, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN)
- return eo_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
+ return eo_add(, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, NULL, 
ector_renderer_surface_set(ret, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN)
- return eo_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, NULL, 
ector_renderer_surface_set(eoid, obj));
+ return eo_add(, ECTOR_RENDERER_SOFTWARE_G

[EGIT] [core/efl] master 02/04: Vg node: modify so the eo_add migration script won't break.

2016-03-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 6ac1fb78d855be27d28378a659887b693e5fb266
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 9 15:22:09 2016 +

Vg node: modify so the eo_add migration script won't break.
---
 src/lib/evas/canvas/evas_vg_node.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_vg_node.c 
b/src/lib/evas/canvas/evas_vg_node.c
index 3a80b63..2ae9135 100644
--- a/src/lib/evas/canvas/evas_vg_node.c
+++ b/src/lib/evas/canvas/evas_vg_node.c
@@ -778,7 +778,8 @@ _efl_vg_base_dup(Eo *obj, Efl_VG_Base_Data *pd, const 
Efl_VG_Base *from)
_efl_vg_clean_object(>mask);
if (fromd->mask)
  {
-pd->mask = eo_add(eo_class_get(fromd->mask), obj, efl_vg_dup(eoid, 
pd->mask));
+Eo *tmp = pd->mask;
+pd->mask = eo_add(eo_class_get(fromd->mask), obj, efl_vg_dup(eoid, 
tmp));
  }
 
pd->x = fromd->x;

-- 




[EGIT] [core/efl] master 01/01: Revert "ecore: Create Promises"

2016-03-08 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 7d8cd6c40f61537bff5ced41dce62d54cd311eb5
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Mar 8 14:23:57 2016 +

Revert "ecore: Create Promises"

Reverting this at Felipe's request following my email. There are many
things I strongly object to in this commit. I've touched the surface of
those on the ML (which doesn't work at the moment), though we need to
better discuss it.

The gist:
1. dlsym is a really bad hack that is not even needed.
2. I don't see why eo should even be aware of promises. It's not aware
of list, hash and etc.
3. The eolian changes were done wrong.

This should have been discussed and consulted before done, even if only
because of the amount of hacks it includes and the cross-domain (ecore,
eo and eolian) nature of it.

This reverts commit f9ba80ab33e0b94dad7ec103e6d261a644f7835f.
---
 src/Makefile_Ecore.am|   5 +-
 src/bin/eolian/eo_generator.c|  30 +--
 src/lib/ecore/Ecore.h|   1 -
 src/lib/ecore/ecore_promise.c| 452 ---
 src/lib/ecore/ecore_promise.h| 136 ---
 src/lib/eo/Eo.h  |  63 ++---
 src/lib/eolian/eo_lexer.c|   3 +-
 src/lib/eolian/eo_lexer.h|   6 +-
 src/lib/eolian/eo_parser.c   |   2 +-
 src/tests/ecore/ecore_suite.c|   1 -
 src/tests/ecore/ecore_suite.h|   1 -
 src/tests/ecore/ecore_test_promise.c | 364 
 12 files changed, 22 insertions(+), 1042 deletions(-)

diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index 79ac16c..49936af 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -47,8 +47,7 @@ lib/ecore/Ecore.h \
 lib/ecore/Ecore_Common.h \
 lib/ecore/Ecore_Legacy.h \
 lib/ecore/Ecore_Eo.h \
-lib/ecore/Ecore_Getopt.h \
-lib/ecore/ecore_promise.h
+lib/ecore/Ecore_Getopt.h
 
 nodist_installed_ecoremainheaders_DATA = \
  $(ecore_eolian_h)
@@ -73,7 +72,6 @@ lib/ecore/ecore_timer.c \
 lib/ecore/ecore_thread.c \
 lib/ecore/ecore_throttle.c \
 lib/ecore/ecore_exe.c \
-lib/ecore/ecore_promise.c \
 lib/ecore/ecore_exe_private.h \
 lib/ecore/ecore_private.h
 
@@ -201,7 +199,6 @@ tests/ecore/ecore_test_animator.c \
 tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c \
 tests/ecore/ecore_test_ecore_input.c \
 tests/ecore/ecore_test_ecore_file.c \
-tests/ecore/ecore_test_promise.c \
 tests/ecore/ecore_suite.h
 
 tests_ecore_ecore_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index 4810658..a97f2f0 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -311,9 +311,6 @@ eo_bind_func_generate(const Eolian_Class *class, const 
Eolian_Function *funcid,
if (ftype != EOLIAN_PROP_GET && ftype != EOLIAN_PROP_SET) ftype = 
eolian_function_type_get(funcid);
Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET);
 
-   Eina_Bool has_promise = EINA_FALSE;
-   const char* promise_param_name = NULL;
-   const char* promise_value_type = NULL;
Eina_Bool need_implementation = EINA_TRUE;
if (!impl_env && eolian_function_is_virtual_pure(funcid, ftype)) 
need_implementation = EINA_FALSE;
 
@@ -340,11 +337,9 @@ eo_bind_func_generate(const Eolian_Class *class, const 
Eolian_Function *funcid,
  if (eina_iterator_next(itr, ) && !eina_iterator_next(itr, 
))
{
   Eolian_Function_Parameter *param = data;
-  const char* rettype_str = NULL;
   rettypet = eolian_parameter_type_get(param);
   var_as_ret = EINA_TRUE;
   default_ret_val = eolian_parameter_default_value_get(param);
-  eina_stringshare_del(rettype_str);
}
  eina_iterator_free(itr);
   }
@@ -380,24 +375,9 @@ eo_bind_func_generate(const Eolian_Class *class, const 
Eolian_Function *funcid,
  const char *ptype = eolian_type_c_type_get(ptypet);
  Eolian_Parameter_Dir pdir = eolian_parameter_direction_get(param);
  Eina_Bool had_star = !!strchr(ptype, '*');
-
- if(!has_promise && !strcmp(ptype, "Ecore_Promise *"))
-   {
-  Eina_Iterator* promise_values;
-  has_promise = EINA_TRUE;
-  promise_param_name = eina_stringshare_add(pname);
-  promise_values = 
eolian_type_subtypes_get(eolian_type_base_type_get(ptypet));
-  Eolian_Type* subtype;
-  if(eina_iterator_next(promise_values, (void**)))
-  promise_value_type = eolian_type_c_type_get(subtype)

[EGIT] [core/efl] master 01/01: Eo event cb: Update documentation.

2016-03-07 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit f9a47b18488518b49f81e5581fa7469095a8314c
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Mar 7 10:34:52 2016 +

Eo event cb: Update documentation.
---
 src/lib/eo/Eo.h   | 2 +-
 src/lib/eo/eo_base.eo | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index a163e2a..cf10bb3 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -153,7 +153,7 @@ enum _Eo_Op_Type
  */
 typedef enum _Eo_Op_Type Eo_Op_Type;
 
-/** XXX: Hack until fixed in Eolian */
+/** This has to be duplicated here because Eolian doesn't support event 
callbacks. */
 typedef struct _Eo_Event Eo_Event;
 /**
  * @typedef Eo_Event_Cb
diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo
index 2dfd6ab..8a31a35 100644
--- a/src/lib/eo/eo_base.eo
+++ b/src/lib/eo/eo_base.eo
@@ -1,6 +1,6 @@
 import eina_types;
 
-/* XXX: Hack until Eolian is ready. */
+/* Event callbacks are a special case and have to be external as eolian 
doesn't support function pointers. */
 type @extern Eo.Event_Cb: __builtin_event_cb;
 
 struct Eo.Event_Description {

-- 




[EGIT] [core/efl] master 01/02: Eo: get rid of Eo_Event2.

2016-03-07 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 8c7c8b32416849889324b7cace58fa09680cfa2a
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Mar 7 10:23:48 2016 +

Eo: get rid of Eo_Event2.

The hack is still there, but much cleaner now.
---
 src/lib/eo/Eo.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 936c8c8..51b253f 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -154,7 +154,7 @@ enum _Eo_Op_Type
 typedef enum _Eo_Op_Type Eo_Op_Type;
 
 /** XXX: Hack until fixed in Eolian */
-typedef struct _Eo_Event Eo_Event2;
+typedef struct _Eo_Event Eo_Event;
 /**
  * @typedef Eo_Event_Cb
  *
@@ -166,7 +166,7 @@ typedef struct _Eo_Event Eo_Event2;
  * @param event_info additional data passed with the event.
  * @return #EO_CALLBACK_STOP to stop calling additional callbacks for the 
event, #EO_CALLBACK_CONTINUE to continue.
  */
-typedef Eina_Bool (*Eo_Event_Cb)(void *data, const Eo_Event2 *event);
+typedef Eina_Bool (*Eo_Event_Cb)(void *data, const Eo_Event *event);
 
 #include "eo_base.eo.h"
 #define EO_CLASS EO_BASE_CLASS

-- 




[EGIT] [core/efl] master 02/02: Eo: Update documentation according to the event cb changes.

2016-03-07 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 8c567bbb1702857d756a73c9aa0489828ffe50f5
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Mar 7 10:25:01 2016 +

Eo: Update documentation according to the event cb changes.
---
 src/lib/eo/Eo.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 51b253f..a163e2a 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -161,9 +161,7 @@ typedef struct _Eo_Event Eo_Event;
  * An event callback prototype.
  *
  * @param data The user data registered with the callback.
- * @param obj The object which initiated the event.
- * @param desc The event's description.
- * @param event_info additional data passed with the event.
+ * @param event the object's event structure and information. @see Eo_Event
  * @return #EO_CALLBACK_STOP to stop calling additional callbacks for the 
event, #EO_CALLBACK_CONTINUE to continue.
  */
 typedef Eina_Bool (*Eo_Event_Cb)(void *data, const Eo_Event *event);

-- 




[EGIT] [core/efl] master 01/07: Eo tests: Increase coverage for children iterator tests.

2016-03-04 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit b5b843bcdec508a24726ff62524dc26d8c21ebf6
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 4 14:16:30 2016 +

Eo tests: Increase coverage for children iterator tests.
---
 src/tests/eo/children/children_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tests/eo/children/children_main.c 
b/src/tests/eo/children/children_main.c
index 8935228..9d30277 100644
--- a/src/tests/eo/children/children_main.c
+++ b/src/tests/eo/children/children_main.c
@@ -36,6 +36,8 @@ main(int argc, char *argv[])
CHECK_ITER_DATA(iter, chld, child3);
fail_if(eina_iterator_next(iter, ));
 
+   fail_if(eina_iterator_container_get(iter) != parent);
+
eina_iterator_free(iter);
 
eo_del(child2);

-- 




[EGIT] [core/efl] master 04/07: Eo: remove the long deprecated eo_data_get.

2016-03-04 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit b55ec7a34e12e36ca54541ee0b250e802ab0a13f
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 4 14:23:02 2016 +

Eo: remove the long deprecated eo_data_get.

It has been deprecated for a while, and now it's time to actually stop
using it.
---
 src/lib/eo/Eo.h  | 9 -
 src/lib/eo/eo.c  | 6 --
 src/tests/eo/suite/eo_test_general.c | 1 -
 3 files changed, 16 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index a0b817c..57d1c12 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -652,15 +652,6 @@ EAPI Eo * _eo_add_internal_start(const char *file, int 
line, const Eo_Class *kla
 
 /**
  * @brief Get a pointer to the data of an object for a specific class.
- * @param obj the object to work on.
- * @param klass the klass associated with the data.
- * @return a pointer to the data.
- * @deprecated use eo_data_scope_get or eo_data_ref instead.
- */
-EAPI void *eo_data_get(const Eo *obj, const Eo_Class *klass) EINA_DEPRECATED;
-
-/**
- * @brief Get a pointer to the data of an object for a specific class.
  * The data reference count is not incremented. The pointer must be used only
  * in the scope of the function and its callees.
  * @param obj the object to work on.
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index cc0c978..996b961 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1454,12 +1454,6 @@ _eo_data_xunref_internal(_Eo_Object *obj, void *data, 
const _Eo_Object *ref_obj)
 }
 
 EAPI void *
-eo_data_get(const Eo *obj_id, const Eo_Class *klass_id)
-{
-   return eo_data_scope_get(obj_id, klass_id);
-}
-
-EAPI void *
 eo_data_scope_get(const Eo *obj_id, const Eo_Class *klass_id)
 {
void *ret;
diff --git a/src/tests/eo/suite/eo_test_general.c 
b/src/tests/eo/suite/eo_test_general.c
index cfe5767..c01a621 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -200,7 +200,6 @@ START_TEST(eo_data_fetch)
 
obj = eo_add(klass, NULL);
fail_if(!obj);
-   fail_if(eo_data_get(obj, klass));
fail_if(eo_data_scope_get(obj, klass));
fail_if(!eo_data_scope_get(obj, EO_BASE_CLASS));
eo_unref(obj);

-- 




[EGIT] [core/efl] master 03/07: Eo tests: Test more cases with legacy events.

2016-03-04 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 70e900db10473638ddb1d8e55e58d5fd14497142
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 4 14:21:08 2016 +

Eo tests: Test more cases with legacy events.
---
 src/tests/eo/suite/eo_test_general.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/tests/eo/suite/eo_test_general.c 
b/src/tests/eo/suite/eo_test_general.c
index c6514cc..cfe5767 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -134,6 +134,11 @@ START_TEST(eo_signals)
 ck_assert_str_eq(a_desc->name, "a,changed");
 fail_if(a_desc == EV_A_CHANGED);
 
+/* Check that when calling again we still get the same event. */
+const Eo_Event_Description *a_desc2 = 
eo_base_legacy_only_event_description_get("a,changed");
+fail_if(!a_desc2);
+fail_if(a_desc2 != a_desc);
+
 const Eo_Event_Description *bad_desc = 
eo_base_legacy_only_event_description_get("bad");
 fail_if(!bad_desc);
 ck_assert_str_eq(bad_desc->name, "bad");

-- 




[EGIT] [core/efl] master 02/07: Eo legacy events: remove pointless string copies.

2016-03-04 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 912f03d6e2cc71b82676a0a73a1df4551eb1d7ab
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 4 14:17:55 2016 +

Eo legacy events: remove pointless string copies.

This was there because the old code modified the string. It is no
longer needed now that we just stringshare it.
---
 src/lib/eo/eo_base_class.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 665f684..0740b39 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -404,10 +404,7 @@ static Eina_Hash *_legacy_events_hash = NULL;
 EAPI const Eo_Event_Description *
 eo_base_legacy_only_event_description_get(const char *_event_name)
 {
-   char buf[1024];
-   strncpy(buf, _event_name, sizeof(buf) - 1);
-   buf[sizeof(buf) - 1] = '\0';
-   Eina_Stringshare *event_name = eina_stringshare_add(buf);
+   Eina_Stringshare *event_name = eina_stringshare_add(_event_name);
Eo_Event_Description *event_desc = eina_hash_find(_legacy_events_hash, 
event_name);
if (!event_desc)
  {

-- 




[EGIT] [core/efl] master 06/07: Eo: unmark Eo_Class as deprecated.

2016-03-04 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 8e437300069c22eb1200721db5f39c6063c82dd3
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 4 14:25:28 2016 +

Eo: unmark Eo_Class as deprecated.

It's not deprecated, it's actually a useful alias.
---
 src/lib/eo/Eo.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index de129fc..ab920ee 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -110,7 +110,6 @@ typedef struct _Eo_Opaque Eo;
 /**
  * @typedef Eo_Class
  * The basic class type - should be removed, just for compat.
- * @deprecated
  */
 typedef Eo Eo_Class;
 

-- 




[EGIT] [core/efl] master 02/02: Eo: Remove useless safety checks.

2016-03-04 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit d2f799e4cb9a31d645fb95ff0b7de95a9b0f9900
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 4 14:05:57 2016 +

Eo: Remove useless safety checks.

Those can never happen, ever.
---
 src/lib/eo/eo.c | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 7408f41..cc0c978 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -747,9 +747,7 @@ eo_class_get(const Eo *eo_id)
 
EO_OBJ_POINTER_RETURN_VAL(eo_id, obj, NULL);
 
-   if (obj->klass)
-  return _eo_class_id_get(obj->klass);
-   return NULL;
+   return _eo_class_id_get(obj->klass);
 }
 
 EAPI const char *
@@ -908,9 +906,6 @@ _eo_class_mro_init(const Eo_Class_Description *desc, const 
_Eo_Class *parent, Ei
 static void
 _eo_class_constructor(_Eo_Class *klass)
 {
-   if (klass->constructed)
- return;
-
klass->constructed = EINA_TRUE;
 
if (klass->desc->class_constructor)

-- 




[EGIT] [core/efl] master 01/02: Eo tests: add more eo_data_get tests.

2016-03-04 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit d72b336f6963afebbfbd75905a0083a250ad1c53
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 4 14:03:41 2016 +

Eo tests: add more eo_data_get tests.
---
 src/tests/eo/suite/eo_test_general.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tests/eo/suite/eo_test_general.c 
b/src/tests/eo/suite/eo_test_general.c
index b87f37a..c6514cc 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -195,7 +195,9 @@ START_TEST(eo_data_fetch)
 
obj = eo_add(klass, NULL);
fail_if(!obj);
+   fail_if(eo_data_get(obj, klass));
fail_if(eo_data_scope_get(obj, klass));
+   fail_if(!eo_data_scope_get(obj, EO_BASE_CLASS));
eo_unref(obj);
 
eo_shutdown();

-- 




[EGIT] [core/elementary] master 01/01: Genlist test: Adjust according to the recent eo event changes.

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit c63ee44cfc888016691c72d7fc1c934fffe860f3
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Mar 3 13:44:07 2016 +

Genlist test: Adjust according to the recent eo event changes.

Thanks to zmike for letting me know.
---
 src/tests/elm_test_genlist.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/tests/elm_test_genlist.c b/src/tests/elm_test_genlist.c
index 5d23930..614fda9 100644
--- a/src/tests/elm_test_genlist.c
+++ b/src/tests/elm_test_genlist.c
@@ -81,14 +81,13 @@ START_TEST(elm_atspi_children_get2)
 END_TEST
 
 static Eina_Bool
-_children_changed_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
- const Eo_Event_Description *desc, void *event_info 
EINA_UNUSED)
+_children_changed_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   if (desc != ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_CHILDREN_CHANGED)
+   if (event->desc != ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_CHILDREN_CHANGED)
  return EINA_TRUE;
 
-   ev_data = *(Elm_Atspi_Event_Children_Changed_Data*)event_info;
-   current = obj;
+   ev_data = *(Elm_Atspi_Event_Children_Changed_Data*)event->event_info;
+   current = event->obj;
counter++;
 
return EINA_TRUE;

-- 




[EGIT] [core/efl] master 01/01: Fix more wrong migration to Eo4.

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit b60db90ddc45001db2128f96aa0f5196f844b8c5
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Mar 3 12:58:24 2016 +

Fix more wrong migration to Eo4.

The if wasn't using {} so one of the statements was out of the scope
of the condition.
There was some misindented code.
---
 src/modules/evas/model_loaders/md2/evas_model_load_md2.c |  9 ++---
 src/modules/evas/model_loaders/obj/evas_model_load_obj.c | 16 ++--
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/modules/evas/model_loaders/md2/evas_model_load_md2.c 
b/src/modules/evas/model_loaders/md2/evas_model_load_md2.c
index 40a2aa6..02842ad 100644
--- a/src/modules/evas/model_loaders/md2/evas_model_load_md2.c
+++ b/src/modules/evas/model_loaders/md2/evas_model_load_md2.c
@@ -347,15 +347,18 @@ evas_model_load_file_md2(Evas_Canvas3D_Mesh *mesh, 
Eina_File *file)
 int  f = i * MD2_FRAME_SCALE;
 
 /* Add a mesh frame. */
-  evas_canvas3d_mesh_frame_add(mesh, f);
+evas_canvas3d_mesh_frame_add(mesh, f);
+
 /* Allocate vertex buffer for the frame. */
-  evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, f, 
EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 0, NULL);
+evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, f, 
EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 0, NULL);
 evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, f, 
EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 0, NULL);
 evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, f, 
EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 0, NULL);
+
 /* Map vertex buffer. */
-  pos = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, f, 
EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION);
+pos = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, f, 
EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION);
 nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, f, 
EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
 tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, f, 
EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
+
 stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, f, 
EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION);
 stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, f, 
EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
 stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, f, 
EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
diff --git a/src/modules/evas/model_loaders/obj/evas_model_load_obj.c 
b/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
index 718b8c9..4f1c8f6 100644
--- a/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
+++ b/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
@@ -380,14 +380,18 @@ evas_model_load_file_obj(Evas_Canvas3D_Mesh *mesh, 
Eina_File *file)
stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION);
 
if (counts.existence_of_normal)
- evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 0, NULL);
- nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
- stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
+ {
+evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 0, NULL);
+nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
+stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
+ }
 
if (counts.existence_of_tex_point)
- evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 0, NULL);
- tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
- stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
+ {
+evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 0, NULL);
+tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
+stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, 0, 
EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
+ }
 
if (stride_pos == 0) stride_pos = sizeof(float) * 3;
if ((counts.existence_of_normal) && (stride_nor == 0))

-- 




[EGIT] [core/efl] master 01/01: Edje calc: Fix wrong migration to Eo4.

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 12d8654f147ba2e93411840dbb17a3285435f4c5
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Mar 3 12:23:04 2016 +

Edje calc: Fix wrong migration to Eo4.

The if wasn't using {} so one of the statements was executed
unconditionally.
---
 src/lib/edje/edje_calc.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 8fa3cb9..c30efb2 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -4777,8 +4777,10 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int 
flags, Edje_Calc_Params *sta
 
  frame_exist = evas_canvas3d_mesh_frame_exist(mesh, 
pf->type.node.frame);
  if (!frame_exist)
-   evas_canvas3d_mesh_frame_add(mesh, pf->type.node.frame);
-   evas_canvas3d_mesh_frame_material_set(mesh, 
pf->type.node.frame, material);
+   {
+  evas_canvas3d_mesh_frame_add(mesh, 
pf->type.node.frame);
+  evas_canvas3d_mesh_frame_material_set(mesh, 
pf->type.node.frame, material);
+   }
  evas_canvas3d_mesh_shade_mode_set(mesh, 
pd_mesh_node->mesh_node.properties.shade);
  evas_canvas3d_mesh_vertex_assembly_set(mesh, 
pd_mesh_node->mesh_node.mesh.assembly);
  evas_canvas3d_node_mesh_frame_set(ep->node, mesh, 
pf->type.node.frame);

-- 




[EGIT] [core/efl] master 01/01: Eo examples: remove another reference to the eo examples.

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 800e760b7e8e26a6676f7ca06a83e375b3e2c344
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Mar 3 11:50:25 2016 +

Eo examples: remove another reference to the eo examples.

Thanks to _ami_ for reporting.
---
 configure.ac | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 4b25b55..f60bdb2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5060,7 +5060,6 @@ src/benchmarks/evas/Makefile
 src/examples/eina/Makefile
 src/examples/eina_cxx/Makefile
 src/examples/eet/Makefile
-src/examples/eo/Makefile
 src/examples/evas/Makefile
 src/examples/ecore/Makefile
 src/examples/ecore_avahi/Makefile

-- 




[EGIT] [core/efl] master 12/14: Examples: Remove eo examples.

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit dbdb5b8a33cecfb8c8f6cade9bfd21c2eecec081
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 2 16:11:35 2016 +

Examples: Remove eo examples.

Those were always bad, inaccurate and outdated, and are not really needed
because you should be using Eolian, and not Eo directly.
---
 src/Makefile.am |   1 -
 src/examples/eo/.gitignore  |   2 -
 src/examples/eo/Makefile.am | 103 
 src/examples/eo/Makefile.examples   |  42 
 src/examples/eo/evas/evas_elw_box.c |  74 --
 src/examples/eo/evas/evas_elw_box.h |  25 -
 src/examples/eo/evas/evas_elw_boxedbutton.c |  57 ---
 src/examples/eo/evas/evas_elw_boxedbutton.h |   9 --
 src/examples/eo/evas/evas_elw_button.c  | 115 --
 src/examples/eo/evas/evas_elw_button.h  |  29 --
 src/examples/eo/evas/evas_elw_win.c |  74 --
 src/examples/eo/evas/evas_elw_win.h |   9 --
 src/examples/eo/evas/evas_evas_obj.c| 146 
 src/examples/eo/evas/evas_evas_obj.h|  90 -
 src/examples/eo/evas/evas_test.c|  67 -
 src/examples/eo/isa/eo_isa_complex.c|  21 
 src/examples/eo/isa/eo_isa_complex.h|  10 --
 src/examples/eo/isa/eo_isa_interface.c  |  28 --
 src/examples/eo/isa/eo_isa_interface.h  |  16 ---
 src/examples/eo/isa/eo_isa_main.c   |  36 ---
 src/examples/eo/isa/eo_isa_mixin.c  |  39 
 src/examples/eo/isa/eo_isa_mixin.h  |  16 ---
 src/examples/eo/isa/eo_isa_simple.c |  59 ---
 src/examples/eo/isa/eo_isa_simple.h |  25 -
 src/examples/eo/simple/simple_interface.c   |  28 --
 src/examples/eo/simple/simple_interface.h   |  16 ---
 src/examples/eo/simple/simple_main.c|  31 --
 src/examples/eo/simple/simple_mixin.c   |  39 
 src/examples/eo/simple/simple_mixin.h   |  16 ---
 src/examples/eo/simple/simple_simple.c  |  59 ---
 src/examples/eo/simple/simple_simple.h  |  25 -
 31 files changed, 1307 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index dacb79c..c03ffa5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -108,7 +108,6 @@ benchmark: all
 
 EXAMPLES_SUBDIRS = \
 examples/eina \
-examples/eo \
 examples/eet \
 examples/evas \
 examples/ecore \
diff --git a/src/examples/eo/.gitignore b/src/examples/eo/.gitignore
deleted file mode 100644
index c299c4b..000
--- a/src/examples/eo/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/eo_isa
-/eo_simple
diff --git a/src/examples/eo/Makefile.am b/src/examples/eo/Makefile.am
deleted file mode 100644
index 9bd1a92..000
--- a/src/examples/eo/Makefile.am
+++ /dev/null
@@ -1,103 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = \
--I$(top_builddir)/src/lib/efl \
--I. \
--I$(top_srcdir)/src/lib/eina \
--I$(top_srcdir)/src/lib/eo \
--I$(top_builddir)/src/lib/eina \
--I$(top_builddir)/src/lib/eo \
-@EO_CFLAGS@
-
-EXTRA_PROGRAMS = eo_isa eo_simple
-
-if EO_BUILD_EXAMPLE_EVAS
-
-EXTRA_PROGRAMS += eo_evas
-
-endif
-
-eo_isa_SOURCES = \
-isa/eo_isa_complex.c \
-isa/eo_isa_complex.h \
-isa/eo_isa_interface.c \
-isa/eo_isa_interface.h \
-isa/eo_isa_main.c \
-isa/eo_isa_mixin.c \
-isa/eo_isa_mixin.h \
-isa/eo_isa_simple.c \
-isa/eo_isa_simple.h
-
-eo_isa_LDADD = $(top_builddir)/src/lib/eo/libeo.la 
$(top_builddir)/src/lib/eina/libeina.la @EO_LDFLAGS@ @EFL_PTHREAD_LIBS@
-
-if EO_BUILD_EXAMPLE_EVAS
-
-AM_CPPFLAGS += @ELM_CFLAGS@
-
-eo_evas_SOURCES = \
-evas/evas_elw_box.c \
-evas/evas_elw_box.h \
-evas/evas_elw_boxedbutton.c \
-evas/evas_elw_boxedbutton.h  \
-evas/evas_elw_button.c \
-evas/evas_elw_button.h \
-evas/evas_elw_win.h \
-evas/evas_elw_win.c \
-evas/evas_evas_obj.c \
-evas/evas_evas_obj.h \
-evas/evas_test.c
-
-eo_evas_LDADD = $(top_builddir)/src/lib/eo/libeo.la @ELM_LIBS@ @EO_LDFLAGS@ 
@EFL_PTHREAD_LIBS@
-
-endif
-
-eo_simple_SOURCES = \
-simple/simple_interface.c \
-simple/simple_interface.h \
-simple/simple_main.c \
-simple/simple_mixin.c \
-simple/simple_mixin.h \
-simple/simple_simple.c \
-simple/simple_simple.h
-
-eo_simple_LDADD = $(top_builddir)/src/lib/eo/libeo.la 
$(top_builddir)/src/lib/eina/libeina.la @EO_LDFLAGS@ @EFL_PTHREAD_LIBS@
-
-DATA_FILES = Makefile.examples
-
-EXTRA_DIST = $(DATA_FILES)
-
-examples: $(EXTRA_PROGRAMS)
-
-clean-local:
-   rm -f $(EXTRA_PROGRAMS)
-
-install-examples:
-   $(MKDIR_P) $(datadir)/eo/examples
-   $(MKDIR_P) $(datadir)/eo/examples/isa
-   $(MKDIR_P) $(datadir)/eo/examples/simple
-   cd $(srcdir); \
-   $(install_sh_DATA) -c $(DATA_FILES) $(datadir)/eo/examples; \
-   $(install_sh_DATA) -c $(eo_isa_SOURCES) $(datadir)/eo/examples/isa; \
-   $(install_sh_DA

[EGIT] [core/elementary] master 05/07: Map: Correct broken migration.

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=7bd1d488408ae36d346ef274e6b93039dfa6de8b

commit 7bd1d488408ae36d346ef274e6b93039dfa6de8b
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 2 15:17:43 2016 +

Map: Correct broken migration.

The script failed migrating some code, so I needed to fix it manually.
---
 src/lib/elm_map.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index 120b9d1..b88edac 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -1209,7 +1209,7 @@ _zoom_animator_set(Elm_Map_Data *sd,
sd->zoom_animator = !!callback;
r = eo_event_callback_del(sd->obj, EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, 
_zoom_anim_cb, sd->obj);
r |= eo_event_callback_del(sd->obj, EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, 
_zoom_bring_anim_cb, sd->obj);
-   if (sd->obj, callback);
+   if (callback) eo_event_callback_add(sd->obj, 
EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, callback, sd->obj);
 
return r;
 }

-- 




[EGIT] [core/elementary] master 02/07: Manually migrate some eo_do for the migration script

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=306f50bf5c53d4f09a8c72b15921cd666adef923

commit 306f50bf5c53d4f09a8c72b15921cd666adef923
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 2 11:50:51 2016 +

Manually migrate some eo_do for the migration script

The script doesn't handle a few corner cases well. Update the code
manually so it doesn't have to deal with those.
---
 src/examples/performance/graphical.c | 2 --
 src/lib/elm_win.c| 6 ++
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/examples/performance/graphical.c 
b/src/examples/performance/graphical.c
index 9bc60e8..1390ac7 100644
--- a/src/examples/performance/graphical.c
+++ b/src/examples/performance/graphical.c
@@ -452,8 +452,6 @@ _init_scene(Evas_Object *img)
  evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
  evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
  evas_canvas3d_light_projection_perspective_set(globalGraphical.angle 
/ 5, 1.0, 1.0, 1000.0),
- /*evas_canvas3d_light_projection_perspective_set(value, ...) =>
-  evas_canvas3d_light_spot_cutoff_set(~(value / 3))*/
  evas_canvas3d_light_spot_cutoff_set(globalGraphical.angle / 15));
 
globalGraphical.light_node =
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 03b3006..f3806af 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -67,8 +67,7 @@ static const Elm_Win_Trap *trap = NULL;
  {  \
 edje_object_signal_emit(cursd->edje, \
 "elm,action,hide_blocker", "elm");  \
-eo_do(cursd->main_menu, eo_event_callback_call  \
-  (ELM_MENU_EVENT_ELM_ACTION_UNBLOCK_MENU, NULL));  \
+eo_event_callback_call(cursd->main_menu, 
ELM_MENU_EVENT_ELM_ACTION_UNBLOCK_MENU, NULL); \
  }  \
 }
 
@@ -84,8 +83,7 @@ static const Elm_Win_Trap *trap = NULL;
  {  \
 edje_object_signal_emit(cursd->edje, \
  "elm,action,show_blocker", "elm"); \
-eo_do(cursd->main_menu, eo_event_callback_call  \
-  (ELM_WIN_EVENT_ELM_ACTION_BLOCK_MENU, NULL)); \
+eo_event_callback_call(cursd->main_menu, 
ELM_WIN_EVENT_ELM_ACTION_BLOCK_MENU, NULL); \
  }  \
 }
 

-- 




[EGIT] [core/elementary] master 01/07: Remove redundant defines.

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=9274efb94c47833aa4dc89832c7f2efcccea19b4

commit 9274efb94c47833aa4dc89832c7f2efcccea19b4
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 2 11:53:04 2016 +

Remove redundant defines.
---
 src/lib/elm_main.c | 17 -
 1 file changed, 17 deletions(-)

diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c
index 4469873..1229444 100644
--- a/src/lib/elm_main.c
+++ b/src/lib/elm_main.c
@@ -1713,23 +1713,6 @@ elm_coords_finger_size_adjust(int times_w,
  *h = elm_config_finger_size_get() * times_h;
 }
 
-
-// Object item Eo migration defines, will be removed later
-#define IF_EO_DO(obj, func)\
-   if (eo_isa(obj, ELM_WIDGET_ITEM_CLASS))   \
- { \
-eo_do (obj, func);   \
-return;\
- }
-
-#define IF_EO_RETURN(obj, type, func)  \
-   if (eo_isa(obj, ELM_WIDGET_ITEM_CLASS))   \
- { \
-type ret;  \
-eo_do (obj, ret = func); \
-return ret;\
- }
-
 EAPI void
 elm_object_access_info_set(Evas_Object *obj, const char *txt)
 {

-- 




[EGIT] [core/elementary] master 07/07: Migrate elementary to the new Eo4 syntax

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=7b3fa8abc46ca049f2ddb335ba33d2d8f32cf963

commit 7b3fa8abc46ca049f2ddb335ba33d2d8f32cf963
Merge: 36669f1 02e87e8
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Mar 3 10:10:20 2016 +

Migrate elementary to the new Eo4 syntax

Eo's syntax has changed (see efl.git for more info), this adjusts
elementary accordingly.

This is a merge commit that merges my branch will all of the fixes

 src/bin/test_anim.c|   2 +-
 src/bin/test_application_server.c  |  55 +--
 src/bin/test_entry.c   |  14 +-
 src/bin/test_systray.c |  14 +-
 src/bin/test_task_switcher.c   |  54 +--
 src/bin/test_win_plug.c|   2 +-
 src/examples/evas3d_map_example.c  | 244 --
 src/examples/evas3d_object_on_button_example.c | 131 ++---
 src/examples/evas3d_scene_on_button_example.c  | 126 ++---
 src/examples/filemvc.c |  46 +-
 src/examples/fileviewlist.c|  13 +-
 src/examples/performance/camera_light.c|  18 +-
 src/examples/performance/graphical.c   | 270 ---
 src/examples/performance/performance.c |  33 +-
 src/examples/sphere_hunter/evas_3d_sphere_hunter.c | 270 +--
 src/lib/elc_combobox.c |  71 ++-
 src/lib/elc_ctxpopup.c |  52 +-
 src/lib/elc_fileselector.c | 199 
 src/lib/elc_fileselector_button.c  |  49 +-
 src/lib/elc_fileselector_entry.c   |  62 ++-
 src/lib/elc_hoversel.c |  69 ++-
 src/lib/elc_multibuttonentry.c |  97 ++--
 src/lib/elc_naviframe.c|  89 ++--
 src/lib/elc_player.c   |  57 +--
 src/lib/elc_popup.c| 115 +++--
 src/lib/elm_access.c   |   7 +-
 src/lib/elm_actionslider.c |  83 ++--
 src/lib/elm_app_client.c   |  30 +-
 src/lib/elm_app_client_view.c  |  39 +-
 src/lib/elm_app_server.c   |  43 +-
 src/lib/elm_app_server_view.c  |  32 +-
 src/lib/elm_atspi_app_object.c |   4 +-
 src/lib/elm_atspi_bridge.c | 237 +-
 src/lib/elm_bg.c   |  18 +-
 src/lib/elm_box.c  |  45 +-
 src/lib/elm_bubble.c   |  17 +-
 src/lib/elm_button.c   |  41 +-
 src/lib/elm_calendar.c |  21 +-
 src/lib/elm_check.c|  31 +-
 src/lib/elm_clock.c|  19 +-
 src/lib/elm_cnp.c  |  32 +-
 src/lib/elm_color_class.c  |  12 +-
 src/lib/elm_colorselector.c|  84 ++--
 src/lib/elm_conform.c  |  49 +-
 src/lib/elm_datetime.c |  29 +-
 src/lib/elm_dayselector.c  |  34 +-
 src/lib/elm_dbus_menu.c|   4 +-
 src/lib/elm_diskselector.c | 124 +++--
 src/lib/elm_entry.c| 291 ++--
 src/lib/elm_flip.c |  29 +-
 src/lib/elm_flipselector.c |  35 +-
 src/lib/elm_frame.c|  26 +-
 src/lib/elm_gengrid.c  | 382 +++
 src/lib/elm_genlist.c  | 525 ++---
 src/lib/elm_gesture_layer.c|  10 +-
 src/lib/elm_glview.c   |  23 +-
 src/lib/elm_grid.c |  15 +-
 src/lib/elm_helper.h   |   4 +-
 src/lib/elm_hover.c|  69 ++-
 src/lib/elm_icon.c |  35 +-
 src/lib/elm_image.c| 103 ++--
 src/lib/elm_index.c|  75 ++-
 src/lib/elm_interface_atspi_accessible.c   |  30 +-
 src/lib/elm_interface_atspi_accessible.h   |  24 +-
 src/lib/elm_interface_atspi_action.c   |   2 +-
 src/lib/elm_interface_atspi_component.c|  18 +-
 src/lib/elm_interface_atspi_image.c|  10 +-
 src/lib/elm_interface_atspi_widget_action.c|   8 +-
 src/lib/elm_interface_atspi_window.h   |  14 +-
 src/lib/elm_interface_scrollable.c | 331 +++--
 src/lib/elm_inwin.c|  17 +-
 src/lib/elm_l

[EGIT] [core/elementary] master 03/07: App client/server and entry: Mix of automatic migration and manual adjustments.

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit b805c84bbc72d07bbaff487c35bd0ea7420cdda2
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 2 11:57:19 2016 +

App client/server and entry: Mix of automatic migration and manual 
adjustments.

The script couldn't handle everything correctly on its own.
---
 src/lib/elm_app_client_view.c |  39 +++---
 src/lib/elm_app_server_view.c |  32 ++---
 src/lib/elm_entry.c   | 291 +-
 3 files changed, 176 insertions(+), 186 deletions(-)

diff --git a/src/lib/elm_app_client_view.c b/src/lib/elm_app_client_view.c
index 62fa1fd..7ea6d8a 100644
--- a/src/lib/elm_app_client_view.c
+++ b/src/lib/elm_app_client_view.c
@@ -58,34 +58,26 @@ _prop_changed(void *user_data, Eldbus_Proxy *proxy 
EINA_UNUSED, void *event_info
Elm_App_Client_View_Data *cdata = eo_data_scope_get(eo, MY_CLASS);
 
if (!strcmp(prop_event->name, "Title"))
- eo_do(eo, eo_event_callback_call(ELM_APP_CLIENT_VIEW_EVENT_TITLE_CHANGED,
-  (void *) _string_prop_get(v)));
+ eo_event_callback_call(eo, ELM_APP_CLIENT_VIEW_EVENT_TITLE_CHANGED, (void 
*) _string_prop_get(v));
else if (!strcmp(prop_event->name, "IconName"))
- eo_do(eo, eo_event_callback_call(ELM_APP_CLIENT_VIEW_EVENT_ICON_CHANGED,
-  (void *) _string_prop_get(v)));
+ eo_event_callback_call(eo, ELM_APP_CLIENT_VIEW_EVENT_ICON_CHANGED, (void 
*) _string_prop_get(v));
else if (!strcmp(prop_event->name, "IconPixels"))
- eo_do(eo, 
eo_event_callback_call(ELM_APP_CLIENT_VIEW_EVENT_ICON_PIXELS_CHANGED,
-  NULL));
+ eo_event_callback_call(eo, ELM_APP_CLIENT_VIEW_EVENT_ICON_PIXELS_CHANGED, 
NULL);
else if (!strcmp(prop_event->name, "NewEvents"))
- eo_do(eo, 
eo_event_callback_call(ELM_APP_CLIENT_VIEW_EVENT_NEW_EVENTS_CHANGED,
-  (void *)(uintptr_t)_int_prop_get(v)));
+ eo_event_callback_call(eo, ELM_APP_CLIENT_VIEW_EVENT_NEW_EVENTS_CHANGED, 
(void *)(uintptr_t)_int_prop_get(v));
else if (!strcmp(prop_event->name, "Progress"))
- eo_do(eo, 
eo_event_callback_call(ELM_APP_CLIENT_VIEW_EVENT_PROGRESS_CHANGED,
-  (void *)(uintptr_t)_short_prop_get(v)));
+ eo_event_callback_call(eo, ELM_APP_CLIENT_VIEW_EVENT_PROGRESS_CHANGED, 
(void *)(uintptr_t)_short_prop_get(v));
else if (!strcmp(prop_event->name, "State"))
  {
 cdata->state = _string_state_to_id(_string_prop_get(v));
-eo_do(eo, 
eo_event_callback_call(ELM_APP_CLIENT_VIEW_EVENT_STATE_CHANGED,
- (void *)(uintptr_t)cdata->state));
+eo_event_callback_call(eo, ELM_APP_CLIENT_VIEW_EVENT_STATE_CHANGED, 
(void *)(uintptr_t)cdata->state);
  }
else if (!strcmp(prop_event->name, "WindowId"))
- eo_do(eo, eo_event_callback_call(ELM_APP_CLIENT_VIEW_EVENT_WINDOW_CHANGED,
-  (void *)(uintptr_t)_int_prop_get(v)));
+ eo_event_callback_call(eo, ELM_APP_CLIENT_VIEW_EVENT_WINDOW_CHANGED, 
(void *)(uintptr_t)_int_prop_get(v));
else
   return;
 
-   eo_do(eo, eo_event_callback_call(ELM_APP_CLIENT_VIEW_EVENT_PROPERTY_CHANGED,
-(void *) prop_event->name));
+   eo_event_callback_call(eo, ELM_APP_CLIENT_VIEW_EVENT_PROPERTY_CHANGED, 
(void *) prop_event->name);
 }
 
 static void
@@ -123,8 +115,7 @@ elm_app_client_view_internal_state_set(Eo *eo, 
Elm_App_View_State state)
cdata->state = state;
if (!changed)
  return;
-   eo_do(eo, eo_event_callback_call(ELM_APP_CLIENT_VIEW_EVENT_STATE_CHANGED,
-(void *)(uintptr_t)cdata->state));
+   eo_event_callback_call(eo, ELM_APP_CLIENT_VIEW_EVENT_STATE_CHANGED, (void 
*)(uintptr_t)cdata->state);
 }
 
 EOLIAN static Eo *
@@ -135,13 +126,13 @@ _elm_app_client_view_eo_base_finalize(Eo *eo, 
Elm_App_Client_View_Data *data)
Eldbus_Connection *conn;
Eldbus_Object *obj;
 
-   eo_do(eo, parent = eo_parent_get());
+   parent = eo_parent_get(eo);
EINA_SAFETY_ON_TRUE_RETURN_VAL((!parent) ||
 (!eo_isa(parent, ELM_APP_CLIENT_CLASS)), NULL);
 
EINA_SAFETY_ON_NULL_RETURN_VAL(data->path, NULL);
 
-   eo_do(parent, package = elm_app_client_package_get());
+   package = elm_app_client_package_get(parent);
 
eldbus_init();
conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
@@ -156,7 +147,7 @@ _elm_app_client_view_eo_base_finalize(Eo *eo, 
Elm_App_Client_View_Data *data)
ELDBUS_PROXY_EVENT_PROPERTY_LOADED,
_props_loaded, eo);
 
-   return eo_do_su

[EGIT] [core/efl] master 14/14: Eo: Migrate to the new syntax (Eo4) and adjust the EFL

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit f46afbcbdf1380e93c4e1e092b8f06b4c743e6db
Merge: 0ceca70 f1b1c53
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Mar 3 10:05:38 2016 +

Eo: Migrate to the new syntax (Eo4) and adjust the EFL

This is a merge commit for all of the relevant changes.

The syntax is described in: https://phab.enlightenment.org/w/eo/

Summary:
eo_do(obj, a_set(1)) -> a_set(obj, 1)
eo_do_super(obj, CLASS, a_set(1)) -> a_set(eo_super(obj, CLASS), 1)

eo_do_*_ret() set of functions are no longer needed.

This is the first step, the next step would be to also fix up eo_add()
which currently still uses the old syntax and is not 100% portable.

 src/Makefile.am|   1 -
 src/benchmarks/eo/class_simple.c   |   2 +-
 src/benchmarks/eo/eo_bench_callbacks.c |   6 +-
 src/benchmarks/eo/eo_bench_eo_do.c |  12 +-
 src/bin/eolian/eo_generator.c  |  24 +-
 src/bin/eolian/impl_generator.c|   6 +-
 src/bin/eolian/legacy_generator.c  |  12 +-
 src/examples/ecore/ecore_audio_custom.c|  14 +-
 src/examples/ecore/ecore_audio_playback.c  |  82 ++--
 src/examples/ecore/ecore_audio_to_ogg.c|  14 +-
 src/examples/ecore/ecore_idler_example.c   |   2 +-
 src/examples/ecore/ecore_poller_example.c  |  11 +-
 src/examples/edje/edje-text.c  |   6 +-
 src/examples/eldbus/dbusmodel.c|  26 +-
 src/examples/emotion/emotion_basic_example.c   |   4 +-
 src/examples/emotion/emotion_border_example.c  |   5 +-
 src/examples/emotion/emotion_generic_example.c |  10 +-
 .../emotion/emotion_generic_subtitle_example.c |   4 +-
 src/examples/emotion/emotion_signals_example.c |  10 +-
 src/examples/eo/.gitignore |   2 -
 src/examples/eo/Makefile.am| 103 
 src/examples/eo/Makefile.examples  |  42 --
 src/examples/eo/evas/evas_elw_box.c|  74 ---
 src/examples/eo/evas/evas_elw_box.h|  25 -
 src/examples/eo/evas/evas_elw_boxedbutton.c|  57 ---
 src/examples/eo/evas/evas_elw_boxedbutton.h|   9 -
 src/examples/eo/evas/evas_elw_button.c | 115 -
 src/examples/eo/evas/evas_elw_button.h |  29 --
 src/examples/eo/evas/evas_elw_win.c|  74 ---
 src/examples/eo/evas/evas_elw_win.h|   9 -
 src/examples/eo/evas/evas_evas_obj.c   | 146 --
 src/examples/eo/evas/evas_evas_obj.h   |  90 
 src/examples/eo/evas/evas_test.c   |  66 ---
 src/examples/eo/isa/eo_isa_complex.c   |  21 -
 src/examples/eo/isa/eo_isa_complex.h   |  10 -
 src/examples/eo/isa/eo_isa_interface.c |  28 --
 src/examples/eo/isa/eo_isa_interface.h |  16 -
 src/examples/eo/isa/eo_isa_main.c  |  36 --
 src/examples/eo/isa/eo_isa_mixin.c |  39 --
 src/examples/eo/isa/eo_isa_mixin.h |  16 -
 src/examples/eo/isa/eo_isa_simple.c|  59 ---
 src/examples/eo/isa/eo_isa_simple.h|  25 -
 src/examples/eo/simple/simple_interface.c  |  28 --
 src/examples/eo/simple/simple_interface.h  |  16 -
 src/examples/eo/simple/simple_main.c   |  31 --
 src/examples/eo/simple/simple_mixin.c  |  39 --
 src/examples/eo/simple/simple_mixin.h  |  16 -
 src/examples/eo/simple/simple_simple.c |  59 ---
 src/examples/eo/simple/simple_simple.h |  25 -
 src/examples/eolian_cxx/colourable.c   |   6 +-
 src/examples/eolian_cxx/colourablesquare.c |   2 +-
 src/examples/evas/evas-3d-aabb.c   | 157 +++---
 src/examples/evas/evas-3d-blending.c   | 128 ++---
 src/examples/evas/evas-3d-colorpick.c  | 156 +++---
 src/examples/evas/evas-3d-cube-rotate.c|  91 ++--
 src/examples/evas/evas-3d-cube.c   | 123 ++---
 src/examples/evas/evas-3d-cube2.c  | 150 +++---
 src/examples/evas/evas-3d-eet.c| 136 +++---
 src/examples/evas/evas-3d-fog.c| 127 +++--
 src/examples/evas/evas-3d-frustum.c| 229 -
 src/examples/evas/evas-3d-hull.c   | 242 -
 src/examples/evas/evas-3d-md2.c| 120 ++---
 src/examples/evas/evas-3d-mmap-set.c   | 137 +++---
 src/examples/evas/evas-3d-obj.c| 129 ++---
 src/examples/evas/evas-3d-parallax-occlusion.c | 186 +++
 src/examples/evas/evas-3d-pick.c   |  97 ++--
 src/examples/evas/evas-3d-ply.c| 132 ++---
 

[EGIT] [core/efl] master 06/14: Eo: Migrate to the new syntax (Eo 4).

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit fc88037977dcc39dfd6d817c522cce01f5bfa024
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Nov 9 11:45:04 2015 +

Eo: Migrate to the new syntax (Eo 4).

The syntax is described in: https://phab.enlightenment.org/w/eo/

Summary:
eo_do(obj, a_set(1)) -> a_set(obj, 1)
eo_do_super(obj, CLASS, a_set(1)) -> a_set(eo_super(obj, CLASS), 1)

eo_do_*_ret() set of functions are no longer needed.

This is the first step, the next step would be to also fix up eo_add()
which currently still uses the old syntax and is not 100% portable.

@feature
---
 src/lib/eo/Eo.h | 136 +
 src/lib/eo/eo.c | 422 
 src/lib/eo/eo_private.h |   7 +-
 src/lib/eo/eo_ptr_indirection.x |  21 +-
 4 files changed, 154 insertions(+), 432 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index cfabd74..a0b817c 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -99,6 +99,8 @@ extern "C" {
  * @{
  */
 
+typedef struct _Eo_Object _Eo_Object;
+
 /**
  * @typedef Eo
  * The basic Object type.
@@ -452,7 +454,8 @@ EAPI Eina_Bool eo_shutdown(void);
 // to fetch internal function and object data at once
 typedef struct _Eo_Op_Call_Data
 {
-   Eo   *obj;
+   Eo *eo_id;
+   _Eo_Object *obj;
void *func;
void *data;
 } Eo_Op_Call_Data;
@@ -497,7 +500,7 @@ typedef struct _Eo_Call_Cache
 #endif
 
 // cache OP id, get real fct and object data then do the call
-#define EO_FUNC_COMMON_OP(Name, DefRet) \
+#define EO_FUNC_COMMON_OP(Obj, Name, DefRet) \
  static Eo_Call_Cache ___cache; /* static 0 by default */   \
  Eo_Op_Call_Data ___call;   \
  if (EINA_UNLIKELY(___cache.op == EO_NOOP)) \
@@ -505,51 +508,65 @@ typedef struct _Eo_Call_Cache
   ___cache.op = _eo_api_op_id_get(EO_FUNC_COMMON_OP_FUNC(Name)); \
   if (___cache.op == EO_NOOP) return DefRet;\
}\
- if (!_eo_call_resolve(#Name, &___call, &___cache,  \
+ if (!_eo_call_resolve((Eo *) Obj, #Name, &___call, &___cache, 
 \
__FILE__, __LINE__)) return DefRet;  \
  _Eo_##Name##_func _func_ = (_Eo_##Name##_func) ___call.func;   \
 
 // to define an EAPI function
-#define EO_FUNC_BODY(Name, Ret, DefRet) \
+#define _EO_FUNC_BODY(Name, ObjType, Ret, DefRet)  
   \
   Ret   \
-  Name(void)\
+  Name(ObjType obj)
\
   { \
  typedef Ret (*_Eo_##Name##_func)(Eo *, void *obj_data);\
  Ret _r;\
- EO_FUNC_COMMON_OP(Name, DefRet);   \
- _r = _func_(___call.obj, ___call.data);\
+ EO_FUNC_COMMON_OP(obj, Name, DefRet);   \
+ _r = _func_(___call.eo_id, ___call.data);\
+ _eo_call_end(&___call); \
  return _r; \
   }
 
-#define EO_VOID_FUNC_BODY(Name)\
+#define _EO_VOID_FUNC_BODY(Name, ObjType)  
\
   void \
-  Name(void)\
+  Name(ObjType obj)
\
   { \
  typedef void (*_Eo_##Name##_func)(Eo *, void *obj_data);   \
- EO_FUNC_COMMON_OP(Name, ); \
- _func_(___call.obj, ___call.data); \
+ EO_FUNC_COMMON_OP(obj, Name, ); \
+ _func_(___call.eo_id, ___call.data); \
+ _eo_call_end(&___call); \
   }
 
-#define EO_FUNC_BODYV(Name, Ret, DefRet, Arguments, ...)\
+#define _EO_FUNC_BODYV(Name, ObjType, Ret, DefRet, Arguments, ...) 
   \
   Ret   \
-  Name(__VA_ARGS__) 

[EGIT] [core/efl] master 08/14: Some automatic migration and some manual adjustments to calc and text.

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 3faf3f3fc68a839f06b311c35ba020cb25e7c9c4
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Mar 1 18:02:49 2016 +

Some automatic migration and some manual adjustments to calc and text.

These file needed some manual adjustments in addition to the automatic
migration, that's why these are separate from the previous and next
commits, so I can easily know there are additional changes to these, and
it wasn't just the script.
---
 src/lib/edje/edje_calc.c | 321 ++-
 src/lib/edje/edje_text.c | 113 +++--
 2 files changed, 166 insertions(+), 268 deletions(-)

diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 28a346b..8fa3cb9 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -57,40 +57,35 @@ static void  
_edje_part_recalc_single(Edje *ed, Edje_Rea
  \
eina_quaternion_scale(, , 1/norm);  \
  \
-   eo_do(ep->node,   \
- evas_canvas3d_node_orientation_set(quaternion.x, quaternion.y,
\
-  quaternion.z, quaternion.w));
+   evas_canvas3d_node_orientation_set(ep->node, quaternion.x, quaternion.y, \
+  quaternion.z, quaternion.w);
 
 #define SET_LOOK_AT(type) \
-   eo_do(ep->node,\
- evas_canvas3d_node_look_at_set(pd_##type->type.position.space,
 \
-  pd_##type->type.orientation.data[0],\
-  pd_##type->type.orientation.data[1],\
-  pd_##type->type.orientation.data[2],\
-  pd_##type->type.position.space, \
-  pd_##type->type.orientation.data[3],\
-  pd_##type->type.orientation.data[4],\
-  pd_##type->type.orientation.data[5]));
+   evas_canvas3d_node_look_at_set(ep->node, pd_##type->type.position.space, \
+  pd_##type->type.orientation.data[0], \
+  pd_##type->type.orientation.data[1], \
+  pd_##type->type.orientation.data[2], \
+  pd_##type->type.position.space, \
+  pd_##type->type.orientation.data[3], \
+  pd_##type->type.orientation.data[4], \
+  pd_##type->type.orientation.data[5]);
 
 #define SET_LOOK_TO(type)  
  \
Edje_Real_Part *look_to;
  \
Evas_Real x, y ,z;  
  \
look_to = ed->table_parts[pd_##type->type.orientation.look_to % 
ed->table_parts_size];\
-   eo_do(look_to->node,
  \
- evas_canvas3d_node_position_get(pd_##type->type.position.space, , 
, )); \
-   eo_do(ep->node, 
  \
- evas_canvas3d_node_look_at_set(pd_##type->type.position.space, x, y, 
z,   \
-  pd_##type->type.position.space,  
  \
-  pd_##type->type.orientation.data[3], 
  \
-  pd_##type->type.orientation.data[4], 
  \
-  pd_##type->type.orientation.data[5]));
+   evas_canvas3d_node_position_get(look_to->node, 
pd_##type->type.position.space, , , ); \
+   evas_canvas3d_node_look_at_set(ep->node, pd_##type->type.position.space, x, 
y, z, \
+  pd_##type->type.position.space, \
+  pd_##type->type.orientation.data[3], \
+  pd_##type->type.orientation.data[4], \
+  pd_##type->type.orientation.data[5]);
 
 #define SET_ANGLE_AXIS(type)   
  \
-   eo_do(ep->node, 
  \
- 
evas_canvas3d_node_orie

[EGIT] [core/efl] master 13/14: Manually fix extra eo_do calls that were added after I migrated

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit f1b1c5354b7d36edd5b8a6cfca0c082cab01b965
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Mar 3 10:00:26 2016 +

Manually fix extra eo_do calls that were added after I migrated
---
 src/lib/evas/canvas/evas_filter_mixin.c | 2 +-
 src/lib/evas/canvas/evas_object_text.c  | 4 ++--
 src/tests/evas/evas_test_filters.c  | 8 
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/lib/evas/canvas/evas_filter_mixin.c 
b/src/lib/evas/canvas/evas_filter_mixin.c
index 0933665..4d4b7ca 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -702,7 +702,7 @@ _evas_filter_efl_gfx_filter_filter_data_set(Eo *eo_obj, 
Evas_Filter_Data *pd,
FCOW_END(fcow, pd);
 
// update object
-   eo_do(eo_obj, evas_filter_dirty());
+   evas_filter_dirty(eo_obj);
evas_object_change(eo_obj, obj);
evas_object_clip_dirty(eo_obj, obj);
evas_object_coords_recalc(eo_obj, obj);
diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index 7efb37f..a492ebd 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2340,13 +2340,13 @@ _evas_text_efl_gfx_filter_filter_program_set(Eo *obj, 
Evas_Text_Data *pd EINA_UN
 EAPI void
 evas_object_text_filter_program_set(Evas_Object *obj, const char *code, const 
char *name)
 {
-   eo_do(obj, efl_gfx_filter_program_set(code, name));
+   efl_gfx_filter_program_set(obj, code, name);
 }
 
 EAPI void
 evas_object_text_filter_source_set(Evas_Object *obj, const char *name, 
Evas_Object *source)
 {
-   eo_do(obj, efl_gfx_filter_source_set(name, source));
+   efl_gfx_filter_source_set(obj, name, source);
 }
 
 EOLIAN static void
diff --git a/src/tests/evas/evas_test_filters.c 
b/src/tests/evas/evas_test_filters.c
index 5841fa2..65028a7 100644
--- a/src/tests/evas/evas_test_filters.c
+++ b/src/tests/evas/evas_test_filters.c
@@ -438,8 +438,8 @@ START_TEST(evas_filter_state_test)
ecore_evas_transparent_set(ee, EINA_TRUE);
 
evas_object_color_set(to, 255, 0, 0, 255);
-   eo_do(to, efl_gfx_filter_program_set(code, "merf"));
-   eo_do(to, efl_gfx_filter_state_set("state1", 0.0, "state2", 1.0, 0.5));
+   efl_gfx_filter_program_set(to, code, "merf");
+   efl_gfx_filter_state_set(to, "state1", 0.0, "state2", 1.0, 0.5);
 
/* check pixels */
ecore_evas_manual_render(ee);
@@ -447,12 +447,12 @@ START_TEST(evas_filter_state_test)
fail_if(!pixels || (*pixels != 0x),
"state render test failed: %p (%#x)", pixels, pixels ? *pixels : 0);
 
-   eo_do(to, efl_gfx_filter_state_get(, , , , ));
+   efl_gfx_filter_state_get(to, , , , , );
fail_unless(strequal(s1, "state1") && strequal(s2, "state2") && (v1 == 0.0) 
&& (v2 == 1.0) && (p == 0.5),
"got: %s %f %s %f %f", s1, v1, s2, v2, p);
 
/* data test */
-   eo_do(to, efl_gfx_filter_data_set("data", "{r=0, g=255, b=0, a=255}", 1));
+   efl_gfx_filter_data_set(to, "data", "{r=0, g=255, b=0, a=255}", 1);
ecore_evas_manual_render(ee);
pixels = ecore_evas_buffer_pixels_get(ee);
fail_if(!pixels || (*pixels != 0xFF00FF00),

-- 




[EGIT] [core/efl] master 11/14: Fix migration script mistakes and compilation warnings.

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 23a6b12183aa1365a6da33ab4f06bdf04b42e1e1
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 2 14:42:46 2016 +

Fix migration script mistakes and compilation warnings.

Mostly unused vars following the removal of eo_do_ret().
However, there are some cases where the migration script got some things
wrong, and I had to manually fix them.
---
 src/examples/evas/evas-3d-parallax-occlusion.c |  2 +-
 src/examples/evas/shooter/evas-3d-shooter.c| 26 +++---
 src/lib/ecore_con/ecore_con.c  | 15 -
 src/lib/ecore_con/ecore_con_eet.c  |  2 --
 src/lib/edje/edje_smart.c  |  2 --
 src/lib/emotion/emotion_smart.c| 10 -
 src/lib/eo/eo_base_class.c |  1 -
 src/lib/evas/canvas/evas_canvas3d_node.c   |  7 +++---
 src/lib/evas/canvas/evas_canvas3d_scene.c  |  5 ++---
 src/lib/evas/canvas/evas_layer.c   |  2 --
 src/lib/evas/canvas/evas_object_image.c|  5 -
 src/lib/evas/canvas/evas_object_main.c |  2 --
 src/lib/evas/canvas/evas_object_text.c |  1 -
 src/lib/evas/canvas/evas_stack.c   |  4 
 src/lib/evas/canvas/evas_vg_gradient.c |  2 --
 src/lib/evas/canvas/evas_vg_gradient_radial.c  |  2 --
 src/lib/evas/canvas/evas_vg_node.c |  2 --
 src/lib/evas/canvas/evas_vg_shape.c| 14 
 .../gl_generic/evas_ector_gl_rgbaimage_buffer.c|  1 -
 .../software_generic/evas_ector_software_buffer.c  |  1 -
 src/tests/edje/edje_test_edje.c|  3 ---
 .../eo/composite_objects/composite_objects_comp.c  |  1 -
 .../eo/composite_objects/composite_objects_main.c  |  1 -
 .../function_overrides/function_overrides_simple.c |  4 ++--
 .../function_overrides/function_overrides_simple.h |  4 ++--
 src/tests/eo/signals/signals_simple.c  |  4 ++--
 src/tests/eo/suite/eo_test_class_simple.c  |  2 +-
 src/tests/eo/suite/eo_test_class_simple.h  |  2 +-
 src/tests/eo/suite/eo_test_general.c   |  3 +--
 29 files changed, 33 insertions(+), 97 deletions(-)

diff --git a/src/examples/evas/evas-3d-parallax-occlusion.c 
b/src/examples/evas/evas-3d-parallax-occlusion.c
index ff20dfe..67be665 100644
--- a/src/examples/evas/evas-3d-parallax-occlusion.c
+++ b/src/examples/evas/evas-3d-parallax-occlusion.c
@@ -246,7 +246,7 @@ main(void)
image = evas_object_image_filled_add(evas);
efl_gfx_size_set(image, WIDTH, HEIGHT);
efl_gfx_visible_set(image, EINA_TRUE);
-   evas_object_focus_set(image, image, EINA_TRUE);
+   evas_object_focus_set(image, EINA_TRUE);
 
/* Set the image object as render target for 3D scene. */
evas_obj_image_scene_set(image, data.scene);
diff --git a/src/examples/evas/shooter/evas-3d-shooter.c 
b/src/examples/evas/shooter/evas-3d-shooter.c
index 9ea9ceb..2e83fd8 100644
--- a/src/examples/evas/shooter/evas-3d-shooter.c
+++ b/src/examples/evas/shooter/evas-3d-shooter.c
@@ -250,13 +250,19 @@ _key_down(void *data,
   }
  }
else if (!strcmp(ev->key, "F1"))
- evas_canvas3d_node_position_set(scene->camera_node, 0.0, 80.0, 30.0);
- evas_canvas3d_node_look_at_set(scene->camera_node, 
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 
1.0, 0.0);
+ {
+evas_canvas3d_node_position_set(scene->camera_node, 0.0, 80.0, 30.0);
+evas_canvas3d_node_look_at_set(scene->camera_node, 
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 
1.0, 0.0);
+ }
else if (!strcmp(ev->key, "F2"))
- evas_canvas3d_node_position_set(scene->camera_node, -2.0, 0.0, 4.0);
+ {
+evas_canvas3d_node_position_set(scene->camera_node, -2.0, 0.0, 4.0);
  evas_canvas3d_node_look_at_set(scene->camera_node, 
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, -100.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 
1.0, 0.0);
+ }
else if (!strcmp(ev->key, "A"))
- aabb_index++;
+ {
+aabb_index++;
+ }
 }
 
 static void
@@ -831,8 +837,10 @@ _mesh_setup_wall(Scene_Data *data, int index)
 
/* placing of wall carpet on the floor grid */
if (index == 0)
- evas_canvas3d_node_scale_set(data->mesh_node_wall[index], 6.7 * 19.5, 
20.0, 2.0);
- evas_canvas3d_node_position_set(data->mesh_node_wall[index], -39.7 + 18.6 
* 3, 0.0, -60.3);
+ {
+evas_canvas3d_node_scale_set(data->mesh_node_wall[index], 6.7 * 19.5, 
20.0, 2.0);
+evas_canvas3d_node_position_set(data->mesh_node_wall[index], -39.7 + 
18.6 * 3, 0.0, -60.3);
+ }
else if (index == 1)
  {
 evas_canvas3d_node_scale_set(data->mesh_node_wall[index], 5 * 19.

[EGIT] [core/efl] master 10/14: Eo tests: Update tests according to the new syntax

2016-03-03 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 8780da1fbdb4e06a12508bcc86023ee2d1b4e30a
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Mar 1 19:06:05 2016 +

Eo tests: Update tests according to the new syntax

These tests don't use eolian, but are plain Eo, so they need manual
updating.
---
 src/tests/eo/access/access_inherit.h   |   2 +-
 src/tests/eo/access/access_simple.h|   2 +-
 .../composite_objects/composite_objects_simple.h   | 132 ++---
 src/tests/eo/constructors/constructors_mixin.h |   2 +-
 src/tests/eo/constructors/constructors_simple.h|   8 +-
 .../function_overrides_inherit2.h  |   4 +-
 .../function_overrides/function_overrides_simple.h |   8 +-
 src/tests/eo/interface/interface_interface.h   |   2 +-
 src/tests/eo/interface/interface_interface2.h  |   2 +-
 src/tests/eo/interface/interface_simple.h  |   8 +-
 src/tests/eo/mixin/mixin_mixin.h   |   2 +-
 src/tests/eo/mixin/mixin_simple.h  |   8 +-
 src/tests/eo/signals/signals_simple.h  |   2 +-
 src/tests/eo/suite/eo_test_class_simple.h  |  16 +--
 src/tests/eo/suite/eo_test_general.c   |  36 --
 15 files changed, 99 insertions(+), 135 deletions(-)

diff --git a/src/tests/eo/access/access_inherit.h 
b/src/tests/eo/access/access_inherit.h
index 0c15436..c1535f1 100644
--- a/src/tests/eo/access/access_inherit.h
+++ b/src/tests/eo/access/access_inherit.h
@@ -1,7 +1,7 @@
 #ifndef INHERIT_H
 #define INHERIT_H
 
-EAPI void inherit_prot_print(void);
+EAPI void inherit_prot_print(Eo *obj);
 
 #define INHERIT_CLASS inherit_class_get()
 const Eo_Class *inherit_class_get(void);
diff --git a/src/tests/eo/access/access_simple.h 
b/src/tests/eo/access/access_simple.h
index 3c92d21..e2e1031 100644
--- a/src/tests/eo/access/access_simple.h
+++ b/src/tests/eo/access/access_simple.h
@@ -1,7 +1,7 @@
 #ifndef SIMPLE_H
 #define SIMPLE_H
 
-EAPI void simple_a_set(int a);
+EAPI void simple_a_set(Eo *obj, int a);
 
 typedef struct
 {
diff --git a/src/tests/eo/composite_objects/composite_objects_simple.h 
b/src/tests/eo/composite_objects/composite_objects_simple.h
index 55b8f9e..4de0ac4 100644
--- a/src/tests/eo/composite_objects/composite_objects_simple.h
+++ b/src/tests/eo/composite_objects/composite_objects_simple.h
@@ -6,73 +6,73 @@ typedef struct
int a;
 } Simple_Public_Data;
 
-EAPI void simple_a_set(int a);
-EAPI int simple_a_get(void);
+EAPI void simple_a_set(Eo *obj, int a);
+EAPI int simple_a_get(Eo *obj);
 
-EAPI void simple_a_set1(int a);
-EAPI void simple_a_set2(int a);
-EAPI void simple_a_set3(int a);
-EAPI void simple_a_set4(int a);
-EAPI void simple_a_set5(int a);
-EAPI void simple_a_set6(int a);
-EAPI void simple_a_set7(int a);
-EAPI void simple_a_set8(int a);
-EAPI void simple_a_set9(int a);
-EAPI void simple_a_set10(int a);
-EAPI void simple_a_set11(int a);
-EAPI void simple_a_set12(int a);
-EAPI void simple_a_set13(int a);
-EAPI void simple_a_set14(int a);
-EAPI void simple_a_set15(int a);
-EAPI void simple_a_set16(int a);
-EAPI void simple_a_set17(int a);
-EAPI void simple_a_set18(int a);
-EAPI void simple_a_set19(int a);
-EAPI void simple_a_set20(int a);
-EAPI void simple_a_set21(int a);
-EAPI void simple_a_set22(int a);
-EAPI void simple_a_set23(int a);
-EAPI void simple_a_set24(int a);
-EAPI void simple_a_set25(int a);
-EAPI void simple_a_set26(int a);
-EAPI void simple_a_set27(int a);
-EAPI void simple_a_set28(int a);
-EAPI void simple_a_set29(int a);
-EAPI void simple_a_set30(int a);
-EAPI void simple_a_set31(int a);
-EAPI void simple_a_set32(int a);
-EAPI void simple_a_get1(int a);
-EAPI void simple_a_get2(int a);
-EAPI void simple_a_get3(int a);
-EAPI void simple_a_get4(int a);
-EAPI void simple_a_get5(int a);
-EAPI void simple_a_get6(int a);
-EAPI void simple_a_get7(int a);
-EAPI void simple_a_get8(int a);
-EAPI void simple_a_get9(int a);
-EAPI void simple_a_get10(int a);
-EAPI void simple_a_get11(int a);
-EAPI void simple_a_get12(int a);
-EAPI void simple_a_get13(int a);
-EAPI void simple_a_get14(int a);
-EAPI void simple_a_get15(int a);
-EAPI void simple_a_get16(int a);
-EAPI void simple_a_get17(int a);
-EAPI void simple_a_get18(int a);
-EAPI void simple_a_get19(int a);
-EAPI void simple_a_get20(int a);
-EAPI void simple_a_get21(int a);
-EAPI void simple_a_get22(int a);
-EAPI void simple_a_get23(int a);
-EAPI void simple_a_get24(int a);
-EAPI void simple_a_get25(int a);
-EAPI void simple_a_get26(int a);
-EAPI void simple_a_get27(int a);
-EAPI void simple_a_get28(int a);
-EAPI void simple_a_get29(int a);
-EAPI void simple_a_get30(int a);
-EAPI void simple_a_get31(int a);
-EAPI void simple_a_get32(int a);
+EAPI void simple_a_set1(Eo *obj, int a);
+EAPI void simple_a_set2(Eo *obj, int a);
+EAPI void simple_a_set3(Eo *obj, int a);
+EAPI void simple_a_set4(Eo *ob

[EGIT] [core/elementary] master 01/01: Spinner: Swap abs with fabs because we're dealing with doubles.

2016-03-02 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=4e7af3352c229738f79b6bb151e2f1878c956e32

commit 4e7af3352c229738f79b6bb151e2f1878c956e32
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Mar 2 15:29:14 2016 +

Spinner: Swap abs with fabs because we're dealing with doubles.
---
 src/lib/elm_spinner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_spinner.c b/src/lib/elm_spinner.c
index 75deea1..cb7318c 100644
--- a/src/lib/elm_spinner.c
+++ b/src/lib/elm_spinner.c
@@ -554,7 +554,7 @@ _min_max_validity_filter(void *data, Evas_Object *obj, char 
**text)
new_str = _text_insert(str, insert, elm_entry_cursor_pos_get(obj));
if (!new_str) return;
 
-   max_len = log10(abs(sd->val_max)) + 1;
+   max_len = log10(fabs(sd->val_max)) + 1;
len = evas_string_char_len_get(new_str);
if (len < max_len) return;
 

-- 




[EGIT] [core/efl] master 01/01: Eo: Add an interface for other interfaces to inherit from.

2016-02-29 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit a761171009521587a8136fb51e2383757143a29a
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Feb 29 11:56:17 2016 +

Eo: Add an interface for other interfaces to inherit from.
---
 src/Makefile_Eo.am | 3 ++-
 src/lib/eo/eo_interface.eo | 7 +++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/Makefile_Eo.am b/src/Makefile_Eo.am
index 51924fe..e388318 100644
--- a/src/Makefile_Eo.am
+++ b/src/Makefile_Eo.am
@@ -3,7 +3,8 @@
 
 eo_eolian_files = \
lib/eo/eo_base.eo \
-   lib/eo/eo_abstract_class.eo
+   lib/eo/eo_abstract_class.eo \
+   lib/eo/eo_interface.eo
 
 eo_eolian_c = $(eo_eolian_files:%.eo=%.eo.c)
 eo_eolian_h = $(eo_eolian_files:%.eo=%.eo.h)
diff --git a/src/lib/eo/eo_interface.eo b/src/lib/eo/eo_interface.eo
new file mode 100644
index 000..e2a3e9c
--- /dev/null
+++ b/src/lib/eo/eo_interface.eo
@@ -0,0 +1,7 @@
+interface Eo.Interface ()
+{
+   [[An interface for other interfaces to inherit from.
+This is useful when you want to create interfaces and mixins that expose
+functions from a normal class, like for example @Eo.Base.constructor.]]
+}
+

-- 




[EGIT] [core/efl] master 01/01: Edje edit: Fix wrong return value type.

2016-02-29 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 02b0c5878d89a6a55b02d08f37790aa9a5ec66ff
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Feb 29 11:50:52 2016 +

Edje edit: Fix wrong return value type.
---
 src/lib/edje/edje_edit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 1aaac03..8bacc49 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -7641,10 +7641,10 @@ edje_edit_text_class_font_get(Evas_Object *obj, const 
char *class_name)
Eina_List *l;
Edje_Text_Class *tc;
 
-   GET_ED_OR_RETURN(EINA_FALSE);
+   GET_ED_OR_RETURN(NULL);
 
if (!ed->file || !ed->file->text_classes)
- return EINA_FALSE;
+ return NULL;
 
EINA_LIST_FOREACH(ed->file->text_classes, l, tc)
   if (!strcmp(tc->name, class_name))

-- 




[EGIT] [tools/expedite] master 01/01: Eo events: Migrate to the new eo event cb signature.

2016-02-29 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=1c72554acc7b7390e65b487d2a428b6faea068b8

commit 1c72554acc7b7390e65b487d2a428b6faea068b8
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Feb 29 11:38:38 2016 +

Eo events: Migrate to the new eo event cb signature.
---
 src/bin/ui.c | 20 
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/bin/ui.c b/src/bin/ui.c
index be5185f..e36fdaf 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -256,10 +256,9 @@ _ui_select(void)
 }
 
 static Eina_Bool
-_ui_key(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
-const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
+_ui_key(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Evas_Event_Key_Down *ev = event_info;
+   Evas_Event_Key_Down *ev = event->event_info;
 
if (key_func)
  {
@@ -290,10 +289,9 @@ static Evas_Coord down_x, down_y;
 static int down_menu_sel = 0;
 
 static Eina_Bool
-_ui_mouse_down(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
-   const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
+_ui_mouse_down(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Evas_Event_Mouse_Down *ev = event_info;
+   Evas_Event_Mouse_Down *ev = event->event_info;
 
if (ev->button != 1) return EINA_TRUE;
if (menu_active)
@@ -307,10 +305,9 @@ _ui_mouse_down(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
 }
 
 static Eina_Bool
-_ui_mouse_up(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
- const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
+_ui_mouse_up(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Evas_Event_Mouse_Up *ev = event_info;
+   Evas_Event_Mouse_Up *ev = event->event_info;
 
if (ev->button != 1) return EINA_TRUE;
if (menu_active)
@@ -333,10 +330,9 @@ _ui_mouse_up(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
 }
 
 static Eina_Bool
-_ui_mouse_move(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
-   const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
+_ui_mouse_move(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Evas_Event_Mouse_Move *ev = event_info;
+   Evas_Event_Mouse_Move *ev = event->event_info;
 
if (ev->buttons != 1) return EINA_TRUE;
if (menu_active)

-- 




[EGIT] [core/efl] master 02/02: Eo callbacks: Migrate all of the EFL to the new event cb signatures.

2016-02-29 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit e71e6561eeb5f0a10e5b08e44d2977e58bfd682b
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Feb 29 10:18:40 2016 +

Eo callbacks: Migrate all of the EFL to the new event cb signatures.
---
 src/benchmarks/eo/eo_bench_callbacks.c |  2 +-
 src/examples/ecore/ecore_audio_playback.c  | 12 +--
 src/examples/ecore/ecore_audio_to_ogg.c|  8 +-
 src/examples/eo/evas/evas_test.c   |  6 +-
 src/examples/evas/evas-3d-shadows.c| 12 +--
 src/lib/ecore_audio/ecore_audio_obj_out_pulse.c| 14 ++--
 src/lib/ecore_con/ecore_con_url.c  | 18 ++---
 src/lib/ecore_evas/ecore_evas.c| 14 +---
 src/lib/ector/cairo/ector_renderer_cairo_shape.c   |  2 +-
 src/lib/ector/gl/ector_renderer_gl_shape.c |  2 +-
 .../ector/software/ector_renderer_software_shape.c |  4 +-
 src/lib/edje/edje_callbacks.c  | 59 +++
 src/lib/edje/edje_multisense.c |  8 +-
 src/lib/edje/edje_private.h|  2 +-
 src/lib/edje/edje_program.c|  3 +-
 src/lib/eo/eo_base_class.c |  4 +-
 src/lib/evas/canvas/evas_callbacks.c   |  8 +-
 src/lib/evas/canvas/evas_canvas3d_node.c   | 12 +--
 src/lib/evas/canvas/evas_canvas3d_node_callback.h  |  6 +-
 src/lib/evas/canvas/evas_clip.c|  6 +-
 src/lib/evas/canvas/evas_filter_mixin.c|  4 +-
 src/lib/evas/canvas/evas_object_box.c  |  8 +-
 src/lib/evas/canvas/evas_object_main.c | 21 ++
 src/lib/evas/canvas/evas_object_smart.c|  4 +-
 src/lib/evas/canvas/evas_object_table.c|  6 +-
 src/lib/evas/canvas/evas_object_textblock.c|  6 +-
 src/lib/evas/canvas/evas_object_vg.c   |  5 +-
 src/lib/evas/canvas/evas_vg_node.c |  6 +-
 src/lib/evas/canvas/evas_vg_root_node.c|  6 +-
 src/modules/ethumb/emotion/emotion.c   |  9 +--
 .../evas/engines/gl_common/evas_gl_preload.c   |  5 +-
 src/tests/ecore/ecore_test_ecore_audio.c   |  8 +-
 src/tests/eio/eio_model_test_file.c| 24 +++---
 src/tests/eio/eio_model_test_monitor_add.c | 26 +++
 src/tests/eldbus/eldbus_test_eldbus_model.c| 11 +--
 src/tests/emotion/emotion_test_main-eo.c   | 86 +-
 .../eo/composite_objects/composite_objects_main.c  |  6 +-
 src/tests/eo/signals/signals_main.c| 16 ++--
 src/tests/eo/signals/signals_simple.c  | 20 ++---
 src/tests/eo/suite/eo_test_general.c   | 12 +--
 40 files changed, 210 insertions(+), 281 deletions(-)

diff --git a/src/benchmarks/eo/eo_bench_callbacks.c 
b/src/benchmarks/eo/eo_bench_callbacks.c
index fde611e..5f67559 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -7,7 +7,7 @@
 #include "class_simple.h"
 
 static Eina_Bool
-_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description 
*desc EINA_UNUSED, void *event_info EINA_UNUSED)
+_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
return EO_CALLBACK_CONTINUE;
 }
diff --git a/src/examples/ecore/ecore_audio_playback.c 
b/src/examples/ecore/ecore_audio_playback.c
index 78c98a3..95ab90a 100644
--- a/src/examples/ecore/ecore_audio_playback.c
+++ b/src/examples/ecore/ecore_audio_playback.c
@@ -191,17 +191,17 @@ handle_input(void *data EINA_UNUSED, Ecore_Fd_Handler 
*handler)
return EINA_TRUE;
 }
 
-static Eina_Bool _play_finished(void *data EINA_UNUSED, Eo *in, const 
Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
+static Eina_Bool _play_finished(void *data EINA_UNUSED, const Eo_Event *event)
 {
   const char *name;
   Eina_Bool ret;
 
-  eo_do(in, ecore_audio_obj_name_get());
+  eo_do(event->obj, ecore_audio_obj_name_get());
   printf("Done: %s\n", name);
 
-  inputs = eina_list_remove(inputs, in);
-  eo_do(out, ret = ecore_audio_obj_out_input_detach(in));
-  eo_del(in);
+  inputs = eina_list_remove(inputs, event->obj);
+  eo_do(out, ret = ecore_audio_obj_out_input_detach(event->obj));
+  eo_del(event->obj);
 
   if (!ret)
 printf("Could not detach input %s\n", name);
@@ -210,7 +210,7 @@ static Eina_Bool _play_finished(void *data EINA_UNUSED, Eo 
*in, const Eo_Event_D
   if (eina_list_count(inputs) > 0)
 {
   const char *name;
-  in = (Eo *)eina_list_data_get(inputs);
+  Eo *in = (Eo *)eina_list_data_get(inputs);
 
   eo_do(in, ecore_audio_obj_name_get());
   printf("Start: %s\n", name);
diff --git a/src/examples/ecore/ecore_audio_to_ogg.c 
b/src/examples/ecore/ecore_audio_to_ogg.c
index 7048ed5..9d3162a 100644
--- a/src/examples/ecore/ecore_audio_to_ogg.c
+

[EGIT] [core/elementary] master 01/01: Eo events: Migrate all of elm to the new event callback signatures

2016-02-29 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit c0363a2979ba37d4c2e8c525ef6388a003a79a06
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Feb 29 11:32:52 2016 +

Eo events: Migrate all of elm to the new event callback signatures
---
 src/bin/test_anim.c|  10 +-
 src/bin/test_application_server.c  |  22 ++--
 src/bin/test_entry.c   |   9 +-
 src/bin/test_task_switcher.c   |  12 +--
 src/bin/test_win_plug.c|   4 +-
 src/examples/filemvc.c |   6 +-
 src/lib/elc_combobox.c |  21 ++--
 src/lib/elc_fileselector.c | 104 +++---
 src/lib/elc_fileselector_button.c  |  10 +-
 src/lib/elc_fileselector_entry.c   |  19 ++--
 src/lib/elc_hoversel.c |  22 ++--
 src/lib/elc_multibuttonentry.c |  24 ++---
 src/lib/elc_naviframe.c|  13 +--
 src/lib/elc_player.c   |  80 +-
 src/lib/elc_popup.c|  24 ++---
 src/lib/elm_app_server.c   |   4 +-
 src/lib/elm_atspi_bridge.c | 116 ++---
 src/lib/elm_box.c  |  20 ++--
 src/lib/elm_cnp.c  |   6 +-
 src/lib/elm_color_class.c  |  14 +--
 src/lib/elm_colorselector.c|  54 +-
 src/lib/elm_conform.c  |  28 ++---
 src/lib/elm_dayselector.c  |   3 +-
 src/lib/elm_entry.c|  25 ++---
 src/lib/elm_frame.c|   3 +-
 src/lib/elm_genlist.c  |   5 +-
 src/lib/elm_helper.c   |   7 +-
 src/lib/elm_helper.h   |   2 +-
 src/lib/elm_interface_atspi_accessible.c   |  10 +-
 src/lib/elm_interface_atspi_image.c|   2 +-
 src/lib/elm_interface_scrollable.c |  38 +++
 src/lib/elm_map.c  |  10 +-
 src/lib/elm_menu.c |  12 +--
 src/lib/elm_panel.c|   4 +-
 src/lib/elm_photo.c|   3 +-
 src/lib/elm_photocam.c |  14 +--
 src/lib/elm_spinner.c  |  40 +++
 src/lib/elm_store.c|   8 +-
 src/lib/elm_video.c|  48 +++--
 src/lib/elm_view_form.c|   4 +-
 src/lib/elm_view_list.c|  37 +++
 src/lib/elm_widget.c   |  79 +-
 src/lib/elm_win.c  |   2 +-
 .../datetime_input_ctxpopup.c  |  28 ++---
 src/modules/prefs/elm_button.c |   6 +-
 src/modules/prefs/elm_check.c  |   6 +-
 src/modules/prefs/elm_datetime.c   |   6 +-
 src/modules/prefs/elm_entry.c  |   6 +-
 src/modules/prefs/elm_slider.c |   6 +-
 src/modules/prefs/elm_spinner.c|   6 +-
 50 files changed, 398 insertions(+), 644 deletions(-)

diff --git a/src/bin/test_anim.c b/src/bin/test_anim.c
index 6d6cd39..8f24281 100644
--- a/src/bin/test_anim.c
+++ b/src/bin/test_anim.c
@@ -11,7 +11,7 @@ static const char *names[] =
 };
 
 static Eina_Bool
-_anim_tick(void *data EINA_UNUSED, Eo *win, const Eo_Event_Description *desc 
EINA_UNUSED, void *event_info EINA_UNUSED)
+_anim_tick(void *data EINA_UNUSED, const Eo_Event *event)
 {
Evas_Object *bub, *sh;
Evas_Coord x, y, w, h, vw, vh;
@@ -19,18 +19,18 @@ _anim_tick(void *data EINA_UNUSED, Eo *win, const 
Eo_Event_Description *desc EIN
double lx, ly;
unsigned int i;
 
-   evas_output_viewport_get(evas_object_evas_get(win), 0, 0, , );
+   evas_output_viewport_get(evas_object_evas_get(event->obj), 0, 0, , );
r = 48;
t = ecore_loop_time_get();
fac = 2.0 / (double)((sizeof(names) / sizeof(char *) / 2));
-   evas_pointer_canvas_xy_get(evas_object_evas_get(win), , );
+   evas_pointer_canvas_xy_get(evas_object_evas_get(event->obj), , );
lx = x;
ly = y;
 
for (i = 0; i < (sizeof(names) / sizeof(char *) / 2); i++)
  {
-bub = evas_object_data_get(win, names[i * 2]);
-sh = evas_object_data_get(win, names[(i * 2) + 1]);
+bub = evas_object_data_get(event->obj, names[i * 2]);
+sh = evas_object_data_get(event->obj, names[(i * 2) + 1]);
 zz = (((2 + sin(t * 6 + (M_PI * (i * fac / 3) * 64) * 2;
 xx = (c

[EGIT] [core/efl] master 01/02: Eo events: Change event callback signature.

2016-02-29 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 56ea371dfb064c28906c7d8344b0c0e03c1d3d4d
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Feb 29 09:12:35 2016 +

Eo events: Change event callback signature.

Change the Eo event callback signature to what suggested by Marcel
Hollerbach in the ML (Thread: EFL interface change - Animator).

This changes the signature of callbacks from
Eina_Bool cb(void *data, Eo *obj const Eo_Event_Description *desc, void 
*event_info)
to
Eina_Bool cb(void *data, const Eo_Event *event)

Where Eo_Event is a structure that holds these parameters.

This makes it less annoying to not use parameters (you end up using
EINA_UNUSED less), and allows for future extensions to callback
parameters.

@feature
---
 src/lib/eo/Eo.h|  4 ++--
 src/lib/eo/eo_base.eo  |  7 +++
 src/lib/eo/eo_base_class.c | 13 +++--
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 4580722..cfabd74 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -153,7 +153,7 @@ enum _Eo_Op_Type
 typedef enum _Eo_Op_Type Eo_Op_Type;
 
 /** XXX: Hack until fixed in Eolian */
-typedef struct _Eo_Event_Description Eo_Event_Description2;
+typedef struct _Eo_Event Eo_Event2;
 /**
  * @typedef Eo_Event_Cb
  *
@@ -165,7 +165,7 @@ typedef struct _Eo_Event_Description Eo_Event_Description2;
  * @param event_info additional data passed with the event.
  * @return #EO_CALLBACK_STOP to stop calling additional callbacks for the 
event, #EO_CALLBACK_CONTINUE to continue.
  */
-typedef Eina_Bool (*Eo_Event_Cb)(void *data, Eo *obj, const 
Eo_Event_Description2 *desc, void *event_info);
+typedef Eina_Bool (*Eo_Event_Cb)(void *data, const Eo_Event2 *event);
 
 #include "eo_base.eo.h"
 #define EO_CLASS EO_BASE_CLASS
diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo
index 7695208..29a1531 100644
--- a/src/lib/eo/eo_base.eo
+++ b/src/lib/eo/eo_base.eo
@@ -34,6 +34,13 @@ type Eo.Callback_Priority: short; [[Callback priority value. 
Range is -32k - 32k
 \@ref EO_CALLBACK_PRIORITY_DEFAULT
   ]]
 
+struct Eo.Event {
+ [[Parameter passed in event callbacks holding extra event parameters]]
+ obj: Eo.Base *; [[The object the event was called on.]]
+ desc: const(Eo.Event_Description) *; [[The event description.]]
+ event_info: void *; [[Extra event information passed by the event 
caller.]]
+}
+
 abstract Eo.Base ()
 {
eo_prefix: eo;
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 64c6df3..948a0b0 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -676,6 +676,10 @@ _eo_base_event_callback_call(Eo *obj_id, Eo_Base_Data *pd,
 {
Eina_Bool ret = EINA_TRUE;
Eo_Callback_Description *cb;
+   Eo_Event ev;
+   ev.obj = obj_id;
+   ev.desc = desc;
+   ev.event_info = event_info;
 
pd->walking_list++;
 
@@ -696,8 +700,7 @@ _eo_base_event_callback_call(Eo *obj_id, Eo_Base_Data *pd,
   continue;
 
/* Abort callback calling if the func says so. */
-   if (!it->func((void *) cb->func_data, obj_id, desc,
-(void *) event_info))
+   if (!it->func((void *) cb->func_data, ))
  {
 ret = EINA_FALSE;
 goto end;
@@ -713,8 +716,7 @@ _eo_base_event_callback_call(Eo *obj_id, Eo_Base_Data *pd,
 continue;
 
   /* Abort callback calling if the func says so. */
-  if (!cb->items.item.func((void *) cb->func_data, obj_id, 
desc,
-   (void *) event_info))
+  if (!cb->items.item.func((void *) cb->func_data, ))
 {
ret = EINA_FALSE;
goto end;
@@ -731,9 +733,8 @@ end:
 }
 
 static Eina_Bool
-_eo_event_forwarder_callback(void *data, Eo *obj, const Eo_Event_Description 
*desc, void *event_info)
+_eo_event_forwarder_callback(void *data, Eo *obj EINA_UNUSED, const 
Eo_Event_Description *desc, void *event_info)
 {
-   (void) obj;
Eo *new_obj = (Eo *) data;
Eina_Bool ret = EINA_FALSE;
 

-- 




[EGIT] [core/efl] master 01/01: Evas textblock tests: Fix wrong test suite tests.

2016-02-26 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 84fd52921e86df91f2a5e305fb38583a8460040a
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Feb 26 09:34:36 2016 +

Evas textblock tests: Fix wrong test suite tests.

The tests were assuming that textblock returns a sanitised utf8 string.
This is not always correct, because textblock may cache and return the
set utf8 markup if the text hasn't changed since the last set.
---
 src/tests/evas/evas_test_textblock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 379bc2e..cfa0aee 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -3642,11 +3642,11 @@ START_TEST(evas_textblock_escaping)
 
const char *buf = "This  is";
evas_object_textblock_text_markup_set(tb, buf);
-   fail_if(strcmp(evas_object_textblock_text_markup_get(tb), "This \xc2\xb7 
is"));
+   fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf));
 
buf = "This  is";
evas_object_textblock_text_markup_set(tb, buf);
-   fail_if(strcmp(evas_object_textblock_text_markup_get(tb), "This \xc2\xa0 
is"));
+   fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf));
 
END_TB_TEST();
 }

-- 




[EGIT] [core/efl] efl-1.17 01/01: Evas textblock tests: Fix wrong test suite tests.

2016-02-26 Thread Tom Hacohen
tasn pushed a commit to branch efl-1.17.

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

commit 7ac3dbbfe376792edd902e2380795f0bc2466012
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Feb 26 09:34:36 2016 +

Evas textblock tests: Fix wrong test suite tests.

The tests were assuming that textblock returns a sanitised utf8 string.
This is not always correct, because textblock may cache and return the
set utf8 markup if the text hasn't changed since the last set.
---
 src/tests/evas/evas_test_textblock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 332a658..0f1ac08 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -3644,11 +3644,11 @@ START_TEST(evas_textblock_escaping)
 
const char *buf = "This  is";
evas_object_textblock_text_markup_set(tb, buf);
-   fail_if(strcmp(evas_object_textblock_text_markup_get(tb), "This \xc2\xb7 
is"));
+   fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf));
 
buf = "This  is";
evas_object_textblock_text_markup_set(tb, buf);
-   fail_if(strcmp(evas_object_textblock_text_markup_get(tb), "This \xc2\xa0 
is"));
+   fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf));
 
END_TB_TEST();
 }

-- 




[EGIT] [core/efl] efl-1.17 02/02: Edje textblock: Assume textblock knows to deal with setting the same markup.

2016-02-26 Thread Tom Hacohen
tasn pushed a commit to branch efl-1.17.

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

commit 8d9a883f3a953b42920cf289d2d7346a2c7dac2a
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Feb 26 09:07:20 2016 +

Edje textblock: Assume textblock knows to deal with setting the same markup.

Edje was trying to be smart and ask textblock for its markup and compare
with its own cache before setting it again. This is completely wrong,
and textblock is smart enough to deal with it now.

@fix
---
 src/lib/edje/edje_calc.c | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 1704670..4a60ef4 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -1564,8 +1564,6 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
 
 if (stl)
   {
- const char *ptxt;
-
  if (evas_object_textblock_style_get(ep->object) != stl->style)
evas_object_textblock_style_set(ep->object, stl->style);
  // FIXME: need to account for editing
@@ -1575,11 +1573,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
}
  else
{
-  ptxt = evas_object_textblock_text_markup_get(ep->object);
-  if (((!ptxt) && (text)) ||
-  ((ptxt) && (text) && (strcmp(ptxt, text))) ||
-  ((ptxt) && (!text)))
-evas_object_textblock_text_markup_set(ep->object, text);
+  evas_object_textblock_text_markup_set(ep->object, text);
}
  if ((chosen_desc->text.min_x) || (chosen_desc->text.min_y))
{

-- 




[EGIT] [core/efl] efl-1.17 01/02: Evas textblock: Fix markup cache, was completely broken.

2016-02-26 Thread Tom Hacohen
tasn pushed a commit to branch efl-1.17.

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

commit 00300e7761282cd04a49f8d4f851a670436a3b2f
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Feb 26 09:06:00 2016 +

Evas textblock: Fix markup cache, was completely broken.

The markup cache was completely broken. It was not compared correctly,
so it wasn't even used, but regardless it was cleared just after being
set in some of the cases.

This is the first part of a performance regression fix in elm label.

@fix
---
 src/lib/evas/canvas/evas_object_textblock.c | 29 +
 1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 70a9e3a..0287349 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -505,7 +505,7 @@ struct _Evas_Object_Textblock
   int  l, r, t, b;
} style_pad;
double  valign;
-   char   *markup_text;
+   Eina_Stringshare   *markup_text;
void   *engine_data;
const char *repch;
const char *bidi_delimiters;
@@ -6473,7 +6473,7 @@ _textblock_style_generic_set(Evas_Object *eo_obj, 
Evas_Textblock_Style *ts,
 Evas_Textblock_Style *old_ts;
 if (o->markup_text)
   {
- free(o->markup_text);
+ eina_stringshare_del(o->markup_text);
  o->markup_text = NULL;
   }
 
@@ -6831,10 +6831,14 @@ _evas_textblock_text_markup_set(Eo *eo_obj EINA_UNUSED, 
Evas_Textblock_Data *o,
 {
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
-   if ((text != o->markup_text) && (o->markup_text))
+
  {
-free(o->markup_text);
-o->markup_text = NULL;
+text = eina_stringshare_add(text);
+if (text == o->markup_text)
+  {
+ /* Text is the same, do nothing. */
+ return;
+  }
  }
 
_nodes_clear(eo_obj);
@@ -6844,15 +6848,6 @@ _evas_textblock_text_markup_set(Eo *eo_obj EINA_UNUSED, 
Evas_Textblock_Data *o,
 EINA_INLIST_GET(o->text_nodes),
 EINA_INLIST_GET(o->cursor->node)));
 
-   if (!o->style && !o->style_user)
- {
-if (text != o->markup_text)
-  {
- if (text) o->markup_text = strdup(text);
-  }
-return;
- }
-
evas_textblock_cursor_paragraph_first(o->cursor);
 
evas_object_textblock_text_markup_prepend(o->cursor, text);
@@ -6865,6 +6860,8 @@ _evas_textblock_text_markup_set(Eo *eo_obj EINA_UNUSED, 
Evas_Textblock_Data *o,
 EINA_LIST_FOREACH(o->cursors, l, data)
evas_textblock_cursor_paragraph_first(data);
  }
+
+o->markup_text = text;
 }
 
 EAPI void
@@ -7134,7 +7131,7 @@ _evas_textblock_text_markup_get(Eo *eo_obj EINA_UNUSED, 
Evas_Textblock_Data *o)
 free(text_base);
  }
 
-   (((Evas_Textblock_Data *)o)->markup_text) = eina_strbuf_string_steal(txt);
+   (((Evas_Textblock_Data *)o)->markup_text) = 
eina_stringshare_add(eina_strbuf_string_get(txt));
eina_strbuf_free(txt);
markup = (o->markup_text);
 
@@ -9248,7 +9245,7 @@ _evas_textblock_changed(Evas_Textblock_Data *o, 
Evas_Object *eo_obj)
o->content_changed = 1;
if (o->markup_text)
  {
-free(o->markup_text);
+eina_stringshare_del(o->markup_text);
 o->markup_text = NULL;
  }
 

-- 




[EGIT] [core/efl] master 01/02: Evas textblock: Fix markup cache, was completely broken.

2016-02-26 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 34020ed131c7a5da4d60bb3a452fac0d9ee5fdd1
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Feb 26 09:06:00 2016 +

Evas textblock: Fix markup cache, was completely broken.

The markup cache was completely broken. It was not compared correctly,
so it wasn't even used, but regardless it was cleared just after being
set in some of the cases.

This is the first part of a performance regression fix in elm label.

@fix
---
 src/lib/evas/canvas/evas_object_textblock.c | 29 +
 1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 79e6754..11ff1fe 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -505,7 +505,7 @@ struct _Evas_Object_Textblock
   int  l, r, t, b;
} style_pad;
double  valign;
-   char   *markup_text;
+   Eina_Stringshare   *markup_text;
void   *engine_data;
const char *repch;
const char *bidi_delimiters;
@@ -6490,7 +6490,7 @@ _textblock_style_generic_set(Evas_Object *eo_obj, 
Evas_Textblock_Style *ts,
 Evas_Textblock_Style *old_ts;
 if (o->markup_text)
   {
- free(o->markup_text);
+ eina_stringshare_del(o->markup_text);
  o->markup_text = NULL;
   }
 
@@ -6848,10 +6848,14 @@ _evas_textblock_text_markup_set(Eo *eo_obj EINA_UNUSED, 
Evas_Textblock_Data *o,
 {
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
-   if ((text != o->markup_text) && (o->markup_text))
+
  {
-free(o->markup_text);
-o->markup_text = NULL;
+text = eina_stringshare_add(text);
+if (text == o->markup_text)
+  {
+ /* Text is the same, do nothing. */
+ return;
+  }
  }
 
_nodes_clear(eo_obj);
@@ -6861,15 +6865,6 @@ _evas_textblock_text_markup_set(Eo *eo_obj EINA_UNUSED, 
Evas_Textblock_Data *o,
 EINA_INLIST_GET(o->text_nodes),
 EINA_INLIST_GET(o->cursor->node)));
 
-   if (!o->style && !o->style_user)
- {
-if (text != o->markup_text)
-  {
- if (text) o->markup_text = strdup(text);
-  }
-return;
- }
-
evas_textblock_cursor_paragraph_first(o->cursor);
 
evas_object_textblock_text_markup_prepend(o->cursor, text);
@@ -6882,6 +6877,8 @@ _evas_textblock_text_markup_set(Eo *eo_obj EINA_UNUSED, 
Evas_Textblock_Data *o,
 EINA_LIST_FOREACH(o->cursors, l, data)
evas_textblock_cursor_paragraph_first(data);
  }
+
+o->markup_text = text;
 }
 
 EAPI void
@@ -7151,7 +7148,7 @@ _evas_textblock_text_markup_get(Eo *eo_obj EINA_UNUSED, 
Evas_Textblock_Data *o)
 free(text_base);
  }
 
-   (((Evas_Textblock_Data *)o)->markup_text) = eina_strbuf_string_steal(txt);
+   (((Evas_Textblock_Data *)o)->markup_text) = 
eina_stringshare_add(eina_strbuf_string_get(txt));
eina_strbuf_free(txt);
markup = (o->markup_text);
 
@@ -9266,7 +9263,7 @@ _evas_textblock_changed(Evas_Textblock_Data *o, 
Evas_Object *eo_obj)
o->content_changed = 1;
if (o->markup_text)
  {
-free(o->markup_text);
+eina_stringshare_del(o->markup_text);
 o->markup_text = NULL;
  }
 

-- 




[EGIT] [core/efl] master 02/02: Edje textblock: Assume textblock knows to deal with setting the same markup.

2016-02-26 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 675a263f97a9766640eea7b5c4dab9850c817949
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Feb 26 09:07:20 2016 +

Edje textblock: Assume textblock knows to deal with setting the same markup.

Edje was trying to be smart and ask textblock for its markup and compare
with its own cache before setting it again. This is completely wrong,
and textblock is smart enough to deal with it now.

@fix
---
 src/lib/edje/edje_calc.c | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index a36a80e..ea416c9 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -1564,8 +1564,6 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
 
 if (stl)
   {
- const char *ptxt;
-
  if (evas_object_textblock_style_get(ep->object) != stl->style)
evas_object_textblock_style_set(ep->object, stl->style);
  // FIXME: need to account for editing
@@ -1575,11 +1573,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
}
  else
{
-  ptxt = evas_object_textblock_text_markup_get(ep->object);
-  if (((!ptxt) && (text)) ||
-  ((ptxt) && (text) && (strcmp(ptxt, text))) ||
-  ((ptxt) && (!text)))
-evas_object_textblock_text_markup_set(ep->object, text);
+  evas_object_textblock_text_markup_set(ep->object, text);
}
  if ((chosen_desc->text.min_x) || (chosen_desc->text.min_y))
{

-- 




[EGIT] [core/efl] master 01/01: Eo: Print an ERR when deleting an object with data refs.

2016-02-18 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit ec2f92e35f5a0836933d82b6b7f518a1d7550afc
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Feb 18 15:53:40 2016 +

Eo: Print an ERR when deleting an object with data refs.
---
 src/lib/eo/eo_private.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h
index 869745c..f3ec7db 100644
--- a/src/lib/eo/eo_private.h
+++ b/src/lib/eo/eo_private.h
@@ -245,12 +245,11 @@ _eo_free(_Eo_Object *obj)
 {
_Eo_Class *klass = (_Eo_Class*) obj->klass;
 
-#ifdef EO_DEBUG
if (obj->datarefcount)
  {
 ERR("Object %p data still referenced %d time(s).", obj, 
obj->datarefcount);
  }
-#endif
+
_eo_id_release((Eo_Id) _eo_id_get(obj));
 
eina_spinlock_take(>objects.trash_lock);

-- 




[EGIT] [core/efl] master 01/01: Evas image: Migrate all the remaining types to Eolian.

2016-02-17 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 8c1933c388db6a7ddbb0915a8a92dd9455ab0b5b
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Feb 17 12:11:46 2016 +

Evas image: Migrate all the remaining types to Eolian.
---
 src/lib/evas/Evas_Common.h | 33 --
 src/lib/evas/canvas/evas_image.eo  | 28 ++
 src/lib/evas/canvas/evas_types.eot | 41 ++
 3 files changed, 56 insertions(+), 46 deletions(-)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 5da6437..9713e0e 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -172,7 +172,6 @@ typedef Eo  Efl_VG;
 
 typedef voidEvas_Performance; /**< An Evas Performance 
handle */
 typedef struct _Evas_Smart  Evas_Smart; /**< An Evas Smart Object 
handle */
-typedef struct _Evas_Native_Surface Evas_Native_Surface; /**< A generic 
datatype for engine specific native surface information */
 
 /**
  * @typedef Evas_Video_Surface
@@ -427,44 +426,12 @@ typedef enum _Evas_Video_Surface_Caps
 #define evas_object_size_hint_expand_set evas_object_size_hint_weight_set /**< 
Convenience macro to make it easier to understand that weight is also used for 
expand properties */
 #define evas_object_size_hint_expand_get evas_object_size_hint_weight_get /**< 
Convenience macro to make it easier to understand that weight is also used for 
expand properties */
 
-typedef enum _Evas_Border_Fill_Mode
-{
-   EVAS_BORDER_FILL_NONE = 0, /**< Image's center region is @b not to be 
rendered */
-   EVAS_BORDER_FILL_DEFAULT = 1, /**< Image's center region is to be @b 
blended with objects underneath it, if it has transparency. This is the default 
behavior for image objects */
-   EVAS_BORDER_FILL_SOLID = 2 /**< Image's center region is to be made solid, 
even if it has transparency on it */
-} Evas_Border_Fill_Mode; /**< How an image's center region (the complement to 
the border region) should be rendered by Evas */
-
 typedef enum _Evas_Engine_Render_Mode
 {
EVAS_RENDER_MODE_BLOCKING = 0, /**< The rendering is blocking mode*/
EVAS_RENDER_MODE_NONBLOCKING = 1, /**< The rendering is non blocking mode*/
 } Evas_Engine_Render_Mode; /**< behaviour of the renderer*/
 
-typedef enum _Evas_Image_Content_Hint
-{
-   EVAS_IMAGE_CONTENT_HINT_NONE = 0, /**< No hint at all */
-   EVAS_IMAGE_CONTENT_HINT_DYNAMIC = 1, /**< The contents will change over 
time */
-   EVAS_IMAGE_CONTENT_HINT_STATIC = 2 /**< The contents won't change over time 
*/
-} Evas_Image_Content_Hint; /**< How an image's data is to be treated by Evas, 
for optimization */
-
-/**
- * Possible orientation options for evas_object_image_orient_set().
- * @brief Types of orientation available
- * @since 1.14
- */
-typedef enum _Evas_Image_Orient
-{
-   EVAS_IMAGE_ORIENT_NONE = 0, /**< no orientation change */
-   EVAS_IMAGE_ORIENT_0 = 0, /**< no orientation change */
-   EVAS_IMAGE_ORIENT_90 = 1, /**< orient 90 degrees clockwise*/
-   EVAS_IMAGE_ORIENT_180 = 2, /**< orient 180 degrees clockwise */
-   EVAS_IMAGE_ORIENT_270 = 3, /**< rotate 90 degrees counter-clockwise (i.e. 
270 degrees clockwise)*/
-   EVAS_IMAGE_FLIP_HORIZONTAL = 4, /**< flip image horizontally */
-   EVAS_IMAGE_FLIP_VERTICAL = 5, /**< flip image vertically */
-   EVAS_IMAGE_FLIP_TRANSPOSE = 6, /**< flip image along the y = (width - x) 
line (bottom-left to top-right) */
-   EVAS_IMAGE_FLIP_TRANSVERSE = 7 /**< flip image along the y = x line 
(top-left to bottom-right) */
-} Evas_Image_Orient;
-
 typedef enum _Evas_Device_Class
 {
EVAS_DEVICE_CLASS_NONE, /**< Not a device @since 1.8 */
diff --git a/src/lib/evas/canvas/evas_image.eo 
b/src/lib/evas/canvas/evas_image.eo
index cb5da1a..a14f183 100644
--- a/src/lib/evas/canvas/evas_image.eo
+++ b/src/lib/evas/canvas/evas_image.eo
@@ -1,3 +1,5 @@
+type @extern Evas_Object_Image_Pixels_Get_Cb: __undefined_type; /* FIXME: func 
pointers are not supported. */
+
 class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Gfx.Fill, 
Efl.Gfx.View, Evas.Filter)
 {
legacy_prefix: evas_object_image;
@@ -113,8 +115,8 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, 
Efl.Gfx.Fill, Efl.Gfx.View,
 ]]
  }
  values {
-hint: Evas_Image_Content_Hint; [[The content hint value, one of
- the #Evas_Image_Content_Hint 
ones.]]
+hint: Evas.Image_Content_Hint; [[The content hint value, one of
+ the @Evas.Image_Content_Hint 
ones.]]
  }
   }
   @property load_region {
@@ -264,7 +266,7 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, 
Efl.Gfx.Fill, Efl.Gfx.View,
   @since 1.1
 ]]

  1   2   3   4   >