[EGIT] [core/efl] master 02/02: Elementary: fix Elm.Layout Model Connect

2017-06-08 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit 824699036aa54177a88849e2a5b8f5626e443204
Author: Larry Jr <larry@gmail.com>
Date:   Wed Jun 7 14:23:27 2017 -0300

Elementary: fix Elm.Layout Model Connect

Use "elm" has source to model_connect update
Disconnect part/property in model_connect
---
 src/lib/elementary/elm_layout.c | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 79b88ac842..7d5c3fbfd2 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -1931,7 +1931,6 @@ _prop_future_error_cb(void* data, Efl_Event const*event 
EINA_UNUSED)
 static void
 _view_update(Elm_Layout_Smart_Data *pd, const char *name, const char *property)
 {
-   const char *source;
Eina_Strbuf *buf;
 
if (strncmp(SIGNAL_PREFIX, name, sizeof(SIGNAL_PREFIX) -1) != 0)
@@ -1941,14 +1940,13 @@ _view_update(Elm_Layout_Smart_Data *pd, const char 
*name, const char *property)
  }
 
ELM_WIDGET_DATA_GET_OR_RETURN(pd->obj, wd);
-   source = efl_class_name_get(efl_class_get(pd->model));
 
buf = eina_strbuf_new();
eina_strbuf_append(buf, name);
eina_strbuf_remove(buf, 0, sizeof(SIGNAL_PREFIX)-1);
eina_strbuf_replace_all(buf, "%v", property);
 
-   edje_object_signal_emit(wd->resize_obj, eina_strbuf_string_get(buf), 
source);
+   edje_object_signal_emit(wd->resize_obj, eina_strbuf_string_get(buf), "elm");
eina_strbuf_free(buf);
 }
 
@@ -1997,7 +1995,7 @@ _elm_layout_view_model_update(Elm_Layout_Smart_Data *pd)
Eina_Iterator *it_p;
int size;
 
-   if (!pd->prop_connect) return;
+   if (!pd->prop_connect || !pd->model) return;
 
size = eina_hash_population(pd->prop_connect);
if (size == 0) return;
@@ -2092,6 +2090,8 @@ _elm_layout_efl_ui_view_model_set(Eo *obj EINA_UNUSED, 
Elm_Layout_Smart_Data *pd
  efl_ref(pd->model);
  efl_event_callback_add(pd->model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, 
_efl_model_properties_changed_cb, pd);
  }
+   else
+ return;
 
if (pd->prop_connect)
  _elm_layout_view_model_update(pd);
@@ -2137,6 +2137,13 @@ _elm_layout_efl_ui_model_connect_connect(Eo *obj 
EINA_UNUSED, Elm_Layout_Smart_D
EINA_SAFETY_ON_NULL_RETURN(name);
Eina_Stringshare *ss_name, *ss_prop;
 
+   if (property == NULL && pd->prop_connect)
+ {
+ss_name = eina_stringshare_add(name);
+eina_hash_del(pd->prop_connect, ss_name, NULL);
+return;
+ }
+
if (!_elm_layout_part_aliasing_eval(obj, pd, , EINA_TRUE))
  return;
 

-- 




[EGIT] [core/efl] master 01/02: Ecore: fix Efl.Model.Item

2017-06-08 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit 891976ae1c31cd7595becbe86c9047714cf5ce5b
Author: Larry Jr <larry@gmail.com>
Date:   Wed Jun 7 14:20:41 2017 -0300

Ecore: fix Efl.Model.Item

sent property_changed signal in property_set
---
 src/lib/ecore/efl_model_item.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/lib/ecore/efl_model_item.c b/src/lib/ecore/efl_model_item.c
index d8566d9107..5f61ee79e9 100644
--- a/src/lib/ecore/efl_model_item.c
+++ b/src/lib/ecore/efl_model_item.c
@@ -72,6 +72,7 @@ _efl_model_item_efl_model_property_set(Eo *obj EINA_UNUSED, 
Efl_Model_Item_Data
 {
Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, ecore_main_loop_get());
Efl_Future* future = efl_promise_future_get(promise);
+   Efl_Model_Property_Event evt;
 
Eina_Stringshare *sshared = eina_stringshare_add(property);
Eina_Value *p_v = eina_hash_find(sd->properties, sshared);
@@ -96,6 +97,12 @@ _efl_model_item_efl_model_property_set(Eo *obj EINA_UNUSED, 
Efl_Model_Item_Data
  }
 
efl_promise_value_set(promise, p_v, NULL);
+
+   evt.changed_properties = eina_array_new(20);
+   eina_array_push(evt.changed_properties, property);
+   efl_event_callback_call(obj, EFL_MODEL_EVENT_PROPERTIES_CHANGED, );
+   eina_array_free(evt.changed_properties);
+
return future;
 
 err4:

-- 




[EGIT] [core/efl] master 01/03: efl: add efl_model and efl_ui_view classes

2017-02-06 Thread Larry Jr
cedric pushed a commit to branch master.

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

commit 093c5921888dd4810233c6ba3e97479758e2589c
Author: Larry Jr <larry@gmail.com>
Date:   Tue Jan 31 18:17:58 2017 -0200

efl: add efl_model and efl_ui_view classes

Efl.Model.Container and Efl.Model.Item to efl/interfaces are used
to create Efl.Model objects with predefined property values.
This is useful to any situation where we want an Efl.Model with
explicit defined property values.

Efl.Ui.View and Efl.Ui.Factory are used to connect Efl.Models with
Widgets, Elm.Layout and Efl.Ui.Image has changed to use news interfaces

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/Makefile_Ecore.am  |   7 +
 src/Makefile_Efl.am|  34 +++
 src/Makefile_Elementary.am |   2 +
 src/examples/elementary/Makefile.am|   2 +
 src/examples/elementary/layout_model_connect.c | 176 
 src/lib/ecore/Ecore_Eo.h   |  14 +
 src/lib/ecore/efl_model_container.c| 298 +++
 src/lib/ecore/efl_model_container.eo   |  60 
 src/lib/ecore/efl_model_container_item.c   | 192 +
 src/lib/ecore/efl_model_container_item.eo  |  39 +++
 src/lib/ecore/efl_model_container_private.h|  32 +++
 src/lib/ecore/efl_model_item.c | 202 +
 src/lib/ecore/efl_model_item.eo|  26 ++
 src/lib/efl/Efl.h  |   5 +
 src/lib/efl/Efl_Model_Common.h |   1 +
 src/lib/efl/interfaces/efl_interfaces_main.c   |   4 +
 src/lib/efl/interfaces/efl_model_common.c  |   6 +
 src/lib/efl/interfaces/efl_ui_factory.eo   |  19 ++
 src/lib/efl/interfaces/efl_ui_model_connect.eo |  11 +
 .../efl/interfaces/efl_ui_model_factory_connect.eo |  11 +
 src/lib/efl/interfaces/efl_ui_view.eo  |  12 +
 src/lib/elementary/Elementary.h|   1 +
 src/lib/elementary/efl_ui_image.c  | 198 +
 src/lib/elementary/efl_ui_image.eo |   5 +-
 src/lib/elementary/efl_ui_image_factory.c  |  59 
 src/lib/elementary/efl_ui_image_factory.eo |  10 +
 src/lib/elementary/efl_ui_widget_image.h   |   5 +
 src/lib/elementary/elm_layout.c| 320 +
 src/lib/elementary/elm_layout.eo   |   6 +-
 src/lib/elementary/elm_widget_layout.h |   4 +
 src/lib/eo/eina_types.eot  |   2 +
 src/tests/efl/efl_suite.c  |  51 
 src/tests/efl/efl_suite.h  |  26 ++
 src/tests/efl/efl_test_model_container.c   | 171 +++
 src/tests/elementary/elm_test_layout.c |  36 +++
 35 files changed, 2045 insertions(+), 2 deletions(-)

diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index 7ebef69..3cb58b6 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -26,6 +26,9 @@ ecore_eolian_files_public = \
 ecore_eolian_files = \
$(ecore_eolian_files_public) \
lib/ecore/efl_promise.eo \
+   lib/ecore/efl_model_item.eo \
+   lib/ecore/efl_model_container.eo \
+   lib/ecore/efl_model_container_item.eo \
$(ecore_eolian_files_legacy)
 
 ecore_eolian_type_files = \
@@ -86,6 +89,10 @@ lib/ecore/efl_io_file.c \
 lib/ecore/efl_io_copier.c \
 lib/ecore/efl_io_buffered_stream.c \
 lib/ecore/efl_promise.c \
+lib/ecore/efl_model_item.c \
+lib/ecore/efl_model_container.c \
+lib/ecore/efl_model_container_item.c \
+lib/ecore/efl_model_container_private.h \
 lib/ecore/ecore_pipe.c \
 lib/ecore/ecore_poller.c \
 lib/ecore/ecore_time.c \
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index 79f4661..faccdf5 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -43,6 +43,10 @@ efl_eolian_files = \
   lib/efl/interfaces/efl_vpath_file_core.eo \
   lib/efl/interfaces/efl_ui_spin.eo \
   lib/efl/interfaces/efl_ui_progress.eo \
+  lib/efl/interfaces/efl_ui_view.eo \
+  lib/efl/interfaces/efl_ui_model_connect.eo \
+  lib/efl/interfaces/efl_ui_factory.eo \
+  lib/efl/interfaces/efl_ui_model_factory_connect.eo \
   lib/efl/interfaces/efl_screen.eo \
   lib/efl/interfaces/efl_io_closer.eo \
   lib/efl/interfaces/efl_io_positioner.eo \
@@ -171,3 +175,33 @@ bin_efl_efl_debug_CPPFLAGS = -I$(top_builddir)/src/bin/efl 
@EINA_CFLAGS@ @ECORE_
 bin_efl_efl_debug_LDADD = @EFL_LIBS@ @USE_EINA_INTERNAL_LIBS@ 
@USE_ECORE_INTERNAL_LIBS@ @USE_ECORE_CON_INTERNAL_LIBS@
 bin_efl_efl_debug_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ 
@USE_ECORE_INTERNAL_LIBS@ @USE_ECORE_CON_INTERNAL_LIBS@
 
+
+if EFL_ENABLE_TESTS
+
+check_PROGRAMS += tests/efl/efl_suite
+TESTS += tests/e

[EGIT] [core/efl] master 02/02: elementary: fixed wrong error msg in fileselector

2016-06-14 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit 963d2af9742018059a91a4cfc403e61bcae2e3d0
Author: Larry Jr <larry@gmail.com>
Date:   Tue Jun 14 19:37:48 2016 -0300

elementary: fixed wrong error msg in fileselector
---
 src/lib/elementary/elc_fileselector.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elc_fileselector.c 
b/src/lib/elementary/elc_fileselector.c
index ae70661..ed40636 100644
--- a/src/lib/elementary/elc_fileselector.c
+++ b/src/lib/elementary/elc_fileselector.c
@@ -1666,8 +1666,7 @@ _resource_created_then(void *data, void *values)
!_iterator_next_value_get(value_itt, ) ||
!_iterator_next_value_get(value_itt, ) ||
!_iterator_next_value_get(value_itt, ) ||
-   !_iterator_next_value_get(value_itt, _type) ||
-   !_filter_child(sd, path, filename, dir, mime_type))
+   !_iterator_next_value_get(value_itt, _type))
  {
 ERR("missing Efl.Model data");
 eo_unref(it_data->model);
@@ -1675,6 +1674,13 @@ _resource_created_then(void *data, void *values)
 goto end;
  }
 
+   if (!_filter_child(sd, path, filename, dir, mime_type))
+ {
+eo_unref(it_data->model);
+free(it_data);
+goto end;
+ }
+
it_data->path = eina_stringshare_add(path);
it_data->filename = eina_stringshare_add(filename);
it_data->size = size;

-- 




[EGIT] [core/efl] master 01/02: eio: Fixed Eio_Model monitor life cycle

2016-06-14 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit 3f1466b77d804b6a47dd5e092615d8d3c91a2b5c
Author: Larry Jr <larry@gmail.com>
Date:   Tue Jun 14 19:33:41 2016 -0300

eio: Fixed Eio_Model monitor life cycle
---
 src/lib/eio/eio_model.c | 102 ++--
 src/lib/eio/eio_model_private.h |   2 +-
 2 files changed, 78 insertions(+), 26 deletions(-)

diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 29b83fc..7b8589f 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -129,19 +129,47 @@ _eio_prop_set_error_cb(void *data EINA_UNUSED, Eio_File 
*handler EINA_UNUSED, in
  }
 }
 
-
 /**
  *  Callbacks
  *  Ecore Events
  */
 static Eina_Bool
-_efl_model_evt_added_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event EINA_UNUSED)
+_efl_model_evt_added_ecore_cb(void *data, int type, void *event)
 {
-   Eio_Monitor_Event *evt = (Eio_Monitor_Event*)event;
+   Eio_Monitor_Event *evt = event;
Eio_Model_Data *priv = data;
Efl_Model_Children_Event cevt;
Eina_Value path;
 
+   if (type != EIO_MONITOR_DIRECTORY_CREATED && type != 
EIO_MONITOR_FILE_CREATED)
+ return EINA_TRUE;
+
+   char *dir = ecore_file_dir_get(evt->filename);
+   if (strcmp(priv->path, dir) != 0)
+ {
+free(dir);
+return EINA_TRUE;
+ }
+   free(dir);
+
+   if (priv->children_list)
+ {
+Eina_List* cur = priv->children_list;
+Eina_Stringshare *spath = eina_stringshare_add(evt->filename);
+int i;
+
+for (i = 0; cur; ++i, cur = cur->next)
+  {
+ Eio_Model_Data *cur_priv = eo_data_scope_get(cur->data, MY_CLASS);
+ if(cur_priv->path == spath)
+   {
+   eina_stringshare_del(spath);
+   return EINA_TRUE;
+   }
+  }
+eina_stringshare_del(spath);
+ }
+
cevt.child = eo_add_ref(EIO_MODEL_CLASS, priv->obj, 
eio_model_path_set(eo_self, evt->filename));
priv->children_list = eina_list_append(priv->children_list, cevt.child);
cevt.index = eina_list_count(priv->children_list);
@@ -157,20 +185,24 @@ _efl_model_evt_added_ecore_cb(void *data EINA_UNUSED, int 
type EINA_UNUSED, void
 }
 
 static Eina_Bool
-_efl_model_evt_deleted_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event EINA_UNUSED)
+_efl_model_evt_deleted_ecore_cb(void *data, int type, void *event)
 {
-   Eio_Monitor_Event *evt = (Eio_Monitor_Event*)event;
+   Eio_Monitor_Event *evt = event;
Eio_Model_Data *priv = data;
 
+   if (type != EIO_MONITOR_DIRECTORY_DELETED && type != 
EIO_MONITOR_FILE_DELETED)
+ return EINA_TRUE;
+
if (priv->children_list)
  {
 Eina_List* cur = priv->children_list;
+Eina_Stringshare *spath = eina_stringshare_add(evt->filename);
 int i;
 
 for (i = 0; cur; ++i, cur = cur->next)
   {
  Eio_Model_Data *cur_priv = eo_data_scope_get(cur->data, MY_CLASS);
- if(strcmp(cur_priv->path, evt->filename) == 0)
+ if(cur_priv->path == spath)
break;
   }
 
@@ -185,6 +217,8 @@ _efl_model_evt_deleted_ecore_cb(void *data EINA_UNUSED, int 
type EINA_UNUSED, vo
  priv->children_list = eina_list_remove_list(priv->children_list, 
cur);
  eo_unref(cevt.child);
   }
+
+eina_stringshare_del(spath);
  }
 
return EINA_TRUE;
@@ -270,8 +304,11 @@ _eio_model_efl_model_property_get(Eo *obj EINA_UNUSED, 
Eio_Model_Data *priv, con
 
if(strcmp(_eio_model_prop_names[EIO_MODEL_PROP_FILENAME], property) == 0)
  {
-value = basename(priv->path);
+char* tmp = strdup(priv->path);
+char* basename_ = basename(tmp);
+value = strdup(basename_);
 property_name = EIO_MODEL_PROP_FILENAME;
+free(tmp);
  }
else if(strcmp(_eio_model_prop_names[EIO_MODEL_PROP_PATH], property) == 0)
  {
@@ -347,19 +384,22 @@ _eio_model_efl_model_property_set(Eo *obj EINA_UNUSED,
 return;
  }
 
-   dest = eina_value_to_string(value);
+   eina_value_get(value, );
if (priv->path == NULL || !ecore_file_exists(priv->path))
  {
-free(priv->path);
-priv->path = dest;
+eina_stringshare_replace(>path, dest);
 
-if (!ecore_file_exists(dest))
+if (!ecore_file_exists(priv->path))
   {
  eina_promise_owner_error_set(promise, EFL_MODEL_ERROR_NOT_FOUND);
  return;
   }
 
-INF("path '%s' with filename '%s'.", priv->path, basename(priv->path));
+char* tmp = strdup(priv->path);
+char* basename_ = basename(tmp);
+INF("path '%s' with filename '%s'.", priv->path, basename

[EGIT] [core/efl] master 01/01: eio: fixed Eina_Value_Type in model property mtime

2016-06-10 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit 191bc882d4b6d5fb85a640ef8cd558afd67062e9
Author: Larry Jr <larry@gmail.com>
Date:   Fri Jun 10 19:24:50 2016 -0300

eio: fixed Eina_Value_Type in model property mtime
---
 src/lib/eio/eio_model.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index fbf3f9b..29b83fc 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -53,7 +53,7 @@ _eio_stat_done_cb(void *data, Eio_File *handler EINA_UNUSED, 
const Eina_Stat *st
 eina_value_set(v, eio_file_is_lnk(stat) ? EINA_TRUE : EINA_FALSE);
 break;
   case EIO_MODEL_PROP_MTIME:
-eina_value_setup(v, EINA_VALUE_TYPE_TIMEVAL);
+eina_value_setup(v, EINA_VALUE_TYPE_DOUBLE);
 eina_value_set(v, eio_file_mtime(stat));
 break;
   case EIO_MODEL_PROP_SIZE:

-- 




[EGIT] [core/efl] master 01/03: eina: eina_promise_all callback cast removed

2016-06-06 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit 2e441c3f5eaa2ccc95e6c7012722f68957bc9701
Author: Larry Jr <larry@gmail.com>
Date:   Mon Jun 6 02:20:44 2016 -0300

eina: eina_promise_all callback cast removed
---
 src/lib/eina/eina_promise.c | 50 +
 1 file changed, 28 insertions(+), 22 deletions(-)

diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c
index 9e34481..7ce0112 100644
--- a/src/lib/eina/eina_promise.c
+++ b/src/lib/eina/eina_promise.c
@@ -15,6 +15,19 @@ static int _eina_promise_log_dom = -1;
 #endif
 #define ERR(...) EINA_LOG_DOM_ERR(_eina_promise_log_dom, __VA_ARGS__)
 
+#define _EINA_PROMISE_NULL_CHECK(promise, v)\
+  if(!promise)  \
+{   \
+  eina_error_set(EINA_ERROR_PROMISE_NULL);  \
+  return v; \
+}
+#define EINA_MAGIC_CHECK_PROMISE(promise)   \
+  do if(!EINA_MAGIC_CHECK(promise, EINA_MAGIC_PROMISE))\
+   {EINA_MAGIC_FAIL(promise, EINA_MAGIC_PROMISE);} while(0)
+#define EINA_MAGIC_CHECK_PROMISE_OWNER(promise)   \
+  do {if(!EINA_MAGIC_CHECK(promise, EINA_MAGIC_PROMISE_OWNER))  \
+  {EINA_MAGIC_FAIL(promise, EINA_MAGIC_PROMISE_OWNER);} } while(0)
+
 typedef struct _Eina_Promise_Then_Cb _Eina_Promise_Then_Cb;
 typedef struct _Eina_Promise_Progress_Cb _Eina_Promise_Progress_Cb;
 typedef struct _Eina_Promise_Cancel_Cb _Eina_Promise_Cancel_Cb;
@@ -632,9 +645,11 @@ eina_promise_owner_default_call_then(Eina_Promise_Owner* 
promise)
 }
 
 static void
-_eina_promise_all_compose_then_cb(_Eina_Promise_Default_Owner* promise, void* 
value EINA_UNUSED, Eina_Promise* promise_then EINA_UNUSED)
+_eina_promise_all_compose_then_cb(void *data, void* value EINA_UNUSED)
 {
+   _Eina_Promise_Default_Owner* promise = data;
_Eina_Promise_Iterator* iterator;
+   EINA_MAGIC_CHECK_PROMISE_OWNER(>owner_vtable);
 
if (!promise->promise.has_finished)
  {
@@ -647,8 +662,10 @@ 
_eina_promise_all_compose_then_cb(_Eina_Promise_Default_Owner* promise, void* va
 }
 
 static void
-_eina_promise_all_compose_error_then_cb(_Eina_Promise_Default_Owner* promise, 
Eina_Error error, Eina_Promise* promise_then EINA_UNUSED)
+_eina_promise_all_compose_error_then_cb(void *data, Eina_Error error)
 {
+   _Eina_Promise_Default_Owner* promise = data;
+   EINA_MAGIC_CHECK_PROMISE_OWNER(>owner_vtable);
if (!promise->promise.has_finished)
  {
 promise->promise.has_finished = promise->promise.has_errored = 
EINA_TRUE;
@@ -693,7 +710,6 @@ eina_promise_all(Eina_Iterator* it)
 
sizeof(_Eina_Promise_Default_Owner*)*eina_array_count_get(promises));
internal_it = (_Eina_Promise_Iterator*)>value[0];
_eina_promise_iterator_setup(internal_it, promises);
-   eina_array_free(promises);
 
promise->promise.value_free_cb = 
(Eina_Promise_Free_Cb)&_eina_promise_all_free;
 
@@ -702,10 +718,11 @@ eina_promise_all(Eina_Iterator* it)
for (;cur_promise != last; ++cur_promise)
  {
 eina_promise_ref(*cur_promise); // We need to keep the value alive 
until this promise is freed
-eina_promise_then(*cur_promise, 
(Eina_Promise_Cb)&_eina_promise_all_compose_then_cb,
-  
(Eina_Promise_Error_Cb)&_eina_promise_all_compose_error_then_cb, promise);
+eina_promise_then(*cur_promise, &_eina_promise_all_compose_then_cb,
+  &_eina_promise_all_compose_error_then_cb, promise);
  }
 
+   eina_array_free(promises);
return >promise.vtable;
 }
 
@@ -806,8 +823,9 @@ _eina_promise_race_free(_Eina_Promise_Race_Value_Type* 
value)
 }
 
 static void
-_eina_promise_race_compose_then_cb(struct _Eina_Promise_Race_Information* 
info, void* value EINA_UNUSED, Eina_Promise* promise_then EINA_UNUSED)
+_eina_promise_race_compose_then_cb(void *data, void* value EINA_UNUSED)
 {
+   struct _Eina_Promise_Race_Information* info = data;
_Eina_Promise_Default_Owner* race_promise;
_Eina_Promise_Race_Value_Type *race_value;
 
@@ -823,8 +841,9 @@ _eina_promise_race_compose_then_cb(struct 
_Eina_Promise_Race_Information* info,
 }
 
 static void
-_eina_promise_race_compose_error_then_cb(struct 
_Eina_Promise_Race_Information* info, Eina_Error error, Eina_Promise* 
promise_then EINA_UNUSED)
+_eina_promise_race_compose_error_then_cb(void *data, Eina_Error error)
 {
+   struct _Eina_Promise_Race_Information* info = data;
_Eina_Promise_Default_Owner* race_promise;
_Eina_Promise_Race_Value_Type *race_value;
 
@@ -876,9 +895,9 @@ eina_promise_race(Eina_Iterator* it)
  {
 cur_promise->promise = eina_array_data_get(promises, i);
 cur_promise->self = promise;
-eina_promise_then(cur_promise->

[EGIT] [core/efl] master 02/03: eio: fix free eina_promises in error_callbacks

2016-06-06 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit c9c178f2db01d04fc43ade6f0cdab105a19d4e85
Author: Larry Jr <larry@gmail.com>
Date:   Mon Jun 6 03:10:24 2016 -0300

eio: fix free eina_promises in error_callbacks
---
 src/lib/eio/eio_model.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index e4d4955..da010ef 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -111,6 +111,11 @@ _eio_error_cb(void *data EINA_UNUSED, Eio_File *handler 
EINA_UNUSED, int error)
   {
   eina_promise_owner_error_set(p->promise, 
EFL_MODEL_ERROR_UNKNOWN);
   }
+eina_list_free(priv->property_promises);
+priv->property_promises = NULL;
+
+eio_file_cancel(priv->stat_file);
+priv->stat_file = NULL;
  }
 }
 

-- 




[EGIT] [core/efl] master 03/03: eolian-cxx: fix compilation errors an olders gcc

2016-06-06 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit 6680eca35902360243e99f153a38bdc32eea0314
Author: Larry Jr <larry@gmail.com>
Date:   Mon Jun 6 03:28:33 2016 -0300

eolian-cxx: fix compilation errors an olders gcc
---
 src/lib/eolian_cxx/grammar/type_impl.hpp | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/eolian_cxx/grammar/type_impl.hpp 
b/src/lib/eolian_cxx/grammar/type_impl.hpp
index 5b8e7f2..0827f57 100644
--- a/src/lib/eolian_cxx/grammar/type_impl.hpp
+++ b/src/lib/eolian_cxx/grammar/type_impl.hpp
@@ -201,7 +201,7 @@ struct visitor_generate
   std::swap(pointers, pointee.pointers);
   pointers.erase(pointers.begin());
 
-  attributes::pointer_indirection reference {{{},{}}, true};
+  attributes::pointer_indirection reference 
{{attributes::qualifier_info::is_none,{}}, true};
   
   return as_generator(" ::std::unique_ptr<" << type).generate
 (sink, attributes::type_def{pointee, c_type}, *context)
@@ -213,7 +213,7 @@ struct visitor_generate
{
  auto pointers = regular.pointers;
  if(is_out)
-   pointers.push_back({{{},{}}, true});
+   pointers.push_back({{attributes::qualifier_info::is_none,{}}, 
true});
  if(as_generator(*(string << "_") << string << 
(is_const(regular.base_qualifier)? " const" : ""))
 .generate(sink, std::make_tuple(regular.namespaces, 
regular.base_type), *context))
return detail::generate_pointers(sink, pointers, *context
@@ -225,7 +225,7 @@ struct visitor_generate
bool operator()(attributes::klass_name klass) const
{
  if(is_out)
-   klass.pointers.push_back({{{}, {}}, true});
+   klass.pointers.push_back({{attributes::qualifier_info::is_none, {}}, 
true});
  if(as_generator(" " << *("::" << lower_case[string]) << "::" << string)
 .generate(sink, 
std::make_tuple(attributes::cpp_namespaces(klass.namespaces), 
klass.eolian_name), *context))
return detail::generate_pointers(sink, klass.pointers, *context, false);
@@ -296,7 +296,7 @@ struct visitor_generate
   std::vector pointers;
   pointers.swap(no_pointer_regular.pointers);
   if(is_out)
-pointers.push_back({{{}, {}}, true});
+pointers.push_back({{attributes::qualifier_info::is_none, {}}, 
true});
   return visitor_type{sink, context, c_type, false}(no_pointer_regular)
 && as_generator("<" << (type % ", ") << ">").generate(sink, 
complex.subtypes, *context)
 && detail::generate_pointers(sink, pointers, *context, false);

-- 




[EGIT] [core/efl] master 01/01: eio: treat Eina_Accessor NULL as success instead of failure in model

2016-06-05 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit b57579a295a49927c2a7deade9741e7025ba919d
Author: Larry Jr <larry@gmail.com>
Date:   Sun Jun 5 22:24:52 2016 -0300

eio: treat Eina_Accessor NULL as success instead of failure in model

We treated as errors when Eina_Accessor was NULL, which meant
that we could never get an empty range os children. Treat it
as success and pass an empty Eina_Accessor
---
 src/lib/eio/eio_model.c | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index e9f2ad8..e4d4955 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -453,10 +453,7 @@ _eio_done_children_load_cb(void *data, Eio_File *handler 
EINA_UNUSED)
EINA_LIST_FOREACH(priv->children_promises, i, p)
  {
Eina_Accessor* accessor = efl_model_list_slice(priv->children_list, 
p->start, p->count);
-   if (accessor)
- eina_promise_owner_value_set(p->promise, accessor, 
(Eina_Promise_Free_Cb)_accessor_free);
-   else
- eina_promise_owner_error_set(p->promise, EFL_MODEL_ERROR_NOT_FOUND);
+   eina_promise_owner_value_set(p->promise, accessor, 
(Eina_Promise_Free_Cb)_accessor_free);
free(p);
  }
 
@@ -572,10 +569,7 @@ _eio_model_efl_model_children_slice_get(Eo *obj 
EINA_UNUSED, Eio_Model_Data *pri
  }
 
Eina_Accessor* accessor = efl_model_list_slice(priv->children_list, start, 
count);
-   if (accessor)
- eina_promise_owner_value_set(promise, accessor, 
(Eina_Promise_Free_Cb)_accessor_free);
-   else
- eina_promise_owner_error_set(promise, EFL_MODEL_ERROR_NOT_FOUND);
+   eina_promise_owner_value_set(promise, accessor, 
(Eina_Promise_Free_Cb)_accessor_free);
 }
 
 

-- 




[EGIT] [core/efl] master 03/03: eio: Add mime_type property in Eio_Model

2016-06-05 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit 1ba06bb6429d61997140759b38a5d75bf54a4546
Author: Larry Jr <larry@gmail.com>
Date:   Sun Jun 5 21:21:43 2016 -0300

eio: Add mime_type property in Eio_Model
---
 configure.ac  |  5 +++--
 src/Makefile.am   |  2 +-
 src/examples/elementary/filemvc.c |  2 +-
 src/lib/eio/eio_main.c|  6 ++
 src/lib/eio/eio_model.c   | 24 ++--
 src/lib/eio/eio_model_private.h   |  6 --
 6 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7a27416..c411a83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4673,6 +4673,7 @@ EFL_INTERNAL_DEPEND_PKG([EIO], [eo])
 EFL_INTERNAL_DEPEND_PKG([EIO], [eina])
 EFL_INTERNAL_DEPEND_PKG([EIO], [efl])
 EFL_INTERNAL_DEPEND_PKG([EIO], [emile])
+EFL_INTERNAL_DEPEND_PKG([EIO], [efreet-mime])
 
 EFL_ADD_LIBS([EIO], [-lm])
 
@@ -4858,9 +4859,9 @@ EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-input])
 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-imf])
 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-imf-evas])
 EFL_INTERNAL_DEPEND_PKG([EDJE], [embryo])
-EFL_INTERNAL_DEPEND_PKG([EDJE], [eio])
 EFL_INTERNAL_DEPEND_PKG([EDJE], [emile])
 EFL_INTERNAL_DEPEND_PKG([EDJE], [efreet])
+EFL_INTERNAL_DEPEND_PKG([EDJE], [eio])
 
 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EDJE], [${want_physics}], [ephysics])
 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EDJE], [${want_multisense}], [ecore-audio])
@@ -5418,11 +5419,11 @@ EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [ethumb_client])
 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [emotion])
 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [ecore-imf])
 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [ecore-con])
-EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [eio])
 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [eldbus])
 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [efreet])
 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [efreet-mime])
 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [efreet-trash])
+EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [eio])
 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [elocation])
 
 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ELEMENTARY], [${want_x11_any}], [ecore_x])
diff --git a/src/Makefile.am b/src/Makefile.am
index 50839cb..1ab50e0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -61,8 +61,8 @@ include Makefile_Ecore_Evas.am
 include Makefile_Ecore_Audio.am
 include Makefile_Ecore_Avahi.am
 include Makefile_Embryo.am
-include Makefile_Eio.am
 include Makefile_Efreet.am
+include Makefile_Eio.am
 include Makefile_Ecore_Buffer.am
 include Makefile_EPhysics.am
 include Makefile_Edje.am
diff --git a/src/examples/elementary/filemvc.c 
b/src/examples/elementary/filemvc.c
index 75fe652..eb33d55 100644
--- a/src/examples/elementary/filemvc.c
+++ b/src/examples/elementary/filemvc.c
@@ -168,7 +168,7 @@ elm_main(int argc, char **argv)
genlist = elm_genlist_add(win);
priv.fileview = eo_add(ELM_VIEW_LIST_CLASS, NULL, 
elm_view_list_genlist_set(eo_self, genlist, ELM_GENLIST_ITEM_NONE, 
"double_label"));
elm_view_list_property_connect(priv.fileview, "filename", "elm.text");
-   elm_view_list_property_connect(priv.fileview, "size", "elm.text.sub");
+   elm_view_list_property_connect(priv.fileview, "mime_type", "elm.text.sub");
 
evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, );
_widget_init(genlist);
diff --git a/src/lib/eio/eio_main.c b/src/lib/eio/eio_main.c
index a22e515..b399d9b 100644
--- a/src/lib/eio/eio_main.c
+++ b/src/lib/eio/eio_main.c
@@ -19,6 +19,8 @@
 #include "eio_private.h"
 #include "Eio.h"
 
+#include 
+
 /**
  *  Local *
  
**/
@@ -315,6 +317,8 @@ eio_init(void)
 
eio_monitor_init();
 
+   efreet_mime_init();
+
eina_log_timing(_eio_log_dom_global,
   EINA_LOG_STATE_STOP,
   EINA_LOG_STATE_INIT);
@@ -360,6 +364,8 @@ eio_shutdown(void)
   CRI("We couldn't terminate in less than 30s some pending IO. This 
can led to some crash.");
  }
 
+   efreet_mime_shutdown();
+
eio_monitor_shutdown();
 
eina_condition_free(&(memory_pool_cond));
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 258a7ce..e9f2ad8 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -9,6 +9,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "eio_private.h"
 #include "eio_model.h"
@@ -261,23 +262,33 @@ _eio_model_efl_model_property_get(Eo *obj EINA_UNUSED, 
Eio_Model_Data *priv, con
 return;
  }
 
-   if(!strcmp("filename", property))
+   if(strcmp(_eio_model_prop_names[EIO_MODEL_PROP_FILENAME], proper

[EGIT] [core/efl] master 01/03: eio: Fix Eio_Model promise accessor

2016-06-05 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit e14042eabe8821acbb85cb46eb2eb3fbe59a4896
Author: Larry Jr <larry@gmail.com>
Date:   Sun Jun 5 20:31:21 2016 -0300

eio: Fix Eio_Model promise accessor
---
 src/lib/eio/eio_model.c | 20 +---
 src/tests/eio/eio_model_test_file.c |  6 +++---
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index c5436d9..1bbdf11 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -26,13 +26,6 @@ _eio_stat_do(Eio_Model_Data *priv)
priv->stat_file = eio_file_direct_stat(priv->path, _eio_stat_done_cb, 
_eio_error_cb, priv);
 }
 
-void
-_accessor_free(void *data)
-{
-  Eina_Accessor **ac = data;
-  eina_accessor_free(*ac);
-}
-
 /**
  *  Callbacks
  *  Property
@@ -415,7 +408,7 @@ _eio_main_children_load_cb(void *data, Eio_File *handler 
EINA_UNUSED, const Eina
Eio_Model_Data *priv = data;
EINA_SAFETY_ON_NULL_RETURN(priv);
 
-   child = eo_add(MY_CLASS, NULL, eio_model_path_set(eo_self, info->path));
+   child = eo_add_ref(MY_CLASS, priv->obj, eio_model_path_set(eo_self, 
info->path));
eina_spinlock_take(>filter_lock);
if (priv->filter_cb)
  eio_model_children_filter_set(child, priv->filter_cb, 
priv->filter_userdata);
@@ -441,7 +434,7 @@ _eio_done_children_load_cb(void *data, Eio_File *handler 
EINA_UNUSED)
  {
Eina_Accessor* accessor = efl_model_list_slice(priv->children_list, 
p->start, p->count);
if (accessor)
- eina_promise_owner_value_set(p->promise, , &_accessor_free);
+ eina_promise_owner_value_set(p->promise, accessor, 
(Eina_Promise_Free_Cb)_accessor_free);
else
  eina_promise_owner_error_set(p->promise, EFL_MODEL_ERROR_NOT_FOUND);
free(p);
@@ -467,7 +460,7 @@ static void
 _eio_model_children_filter_set(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, 
Eio_Filter_Direct_Cb filter_cb, void *data)
 {
eina_spinlock_take(>filter_lock);
-   
+
priv->filter_cb = filter_cb;
priv->filter_userdata = data;
 
@@ -530,6 +523,11 @@ _eio_model_efl_model_children_slice_get(Eo *obj 
EINA_UNUSED, Eio_Model_Data *pri
 * children must be already loaded otherwise we do nothing
 * and parameter is set to NULL.
 */
+   if (!priv->path)
+ {
+eina_promise_owner_error_set(promise, EFL_MODEL_ERROR_INIT_FAILED);
+return;
+ }
 
if (!(priv->is_listed))
  {
@@ -555,7 +553,7 @@ _eio_model_efl_model_children_slice_get(Eo *obj 
EINA_UNUSED, Eio_Model_Data *pri
 
Eina_Accessor* accessor = efl_model_list_slice(priv->children_list, start, 
count);
if (accessor)
- eina_promise_owner_value_set(promise, , &_accessor_free);
+ eina_promise_owner_value_set(promise, accessor, 
(Eina_Promise_Free_Cb)_accessor_free);
else
  eina_promise_owner_error_set(promise, EFL_MODEL_ERROR_NOT_FOUND);
 }
diff --git a/src/tests/eio/eio_model_test_file.c 
b/src/tests/eio/eio_model_test_file.c
index 2c0c712..5ed7d7b 100644
--- a/src/tests/eio/eio_model_test_file.c
+++ b/src/tests/eio/eio_model_test_file.c
@@ -69,13 +69,13 @@ promise_then_count(void *data EINA_UNUSED, void *p)
 static void
 promise_then_accessor(void *data EINA_UNUSED, void* p)
 {
-  Eina_Accessor **accessor = (Eina_Accessor**)p;
+  Eina_Accessor *accessor = p;
   ck_assert_ptr_ne(accessor, NULL);
-  printf("efl_model_loaded accessor %p\n", *accessor); fflush(stdout);
+  printf("efl_model_loaded accessor %p\n", accessor); fflush(stdout);
 
   Eo* child;
   int i = 0;
-  EINA_ACCESSOR_FOREACH(*accessor, i, child)
+  EINA_ACCESSOR_FOREACH(accessor, i, child)
 {
   printf("efl_model_loaded child: %d pointer %p\n", i, child);
 }

-- 




[EGIT] [core/efl] master 02/03: eio: Eio_Model parent_get return parent model

2016-06-05 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit c33caa86ab04fd32a32d6b7227c143343267fb56
Author: Larry Jr <larry@gmail.com>
Date:   Sun Jun 5 20:52:52 2016 -0300

eio: Eio_Model parent_get return parent model
---
 configure.ac |  1 +
 src/lib/eio/eio_model.c  | 30 +-
 src/lib/eio/eio_model.eo |  1 +
 3 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 9712945..7a27416 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4667,6 +4667,7 @@ EFL_PLATFORM_DEPEND([EIO], [evil])
 
 ### Checks for libraries
 EFL_INTERNAL_DEPEND_PKG([EIO], [ecore])
+EFL_INTERNAL_DEPEND_PKG([EIO], [ecore-file])
 EFL_INTERNAL_DEPEND_PKG([EIO], [eet])
 EFL_INTERNAL_DEPEND_PKG([EIO], [eo])
 EFL_INTERNAL_DEPEND_PKG([EIO], [eina])
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 1bbdf11..258a7ce 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -7,6 +7,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "eio_private.h"
@@ -330,10 +331,17 @@ _eio_model_efl_model_property_set(Eo *obj EINA_UNUSED,
  }
 
dest = eina_value_to_string(value);
-   if (priv->path == NULL)
+   if (priv->path == NULL || !ecore_file_exists(priv->path))
  {
+free(priv->path);
 priv->path = dest;
 
+if (!ecore_file_exists(dest))
+  {
+ eina_promise_owner_error_set(promise, EFL_MODEL_ERROR_NOT_FOUND);
+ return;
+  }
+
 INF("path '%s' with filename '%s'.", priv->path, basename(priv->path));
 
 _eio_monitors_list_load(priv);
@@ -611,4 +619,24 @@ _eio_model_eo_base_destructor(Eo *obj , Eio_Model_Data 
*priv)
eo_destructor(eo_super(obj, MY_CLASS));
 }
 
+
+static Eo *
+_eio_model_eo_base_parent_get(Eo *obj , Eio_Model_Data *priv)
+{
+   Eo *model = eo_parent_get(eo_super(obj, MY_CLASS));
+
+   if (model == NULL || !eo_isa(model, EFL_MODEL_INTERFACE))
+ {
+char *path = ecore_file_dir_get(priv->path);
+if (path != NULL && strcmp(priv->path, "/") != 0)
+  {
+ model = eo_add(MY_CLASS, NULL, eio_model_path_set(eo_self, path));
+  }
+else
+  model = NULL;
+
+free(path);
+ }
+   return model;
+}
 #include "eio_model.eo.c"
diff --git a/src/lib/eio/eio_model.eo b/src/lib/eio/eio_model.eo
index ca459f8..b730665 100644
--- a/src/lib/eio/eio_model.eo
+++ b/src/lib/eio/eio_model.eo
@@ -36,6 +36,7 @@ class Eio.Model (Eo.Base, Efl.Model)
 implements {
   Eo.Base.constructor;
   Eo.Base.destructor;
+  Eo.Base.parent.get;
   Efl.Model.properties.get;
   Efl.Model.property_set;
   Efl.Model.property_get;

-- 




[EGIT] [core/efl] master 01/01: Eina: Fix eina_promise_all refcount ordering problem

2016-06-03 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit 507bbdb054044640f5c8cbcdd6ff6751e275d1da
Author: Larry Jr <larry@gmail.com>
Date:   Thu Jun 2 13:59:23 2016 -0300

Eina: Fix eina_promise_all refcount ordering problem

The call to eina_promise_then steals the first ref'count, so it is
possible that the promise is freed after the eina_promise_then,
so we need to eina_promise_ref before eina_promise_then.
---
 src/lib/eina/eina_promise.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c
index a39e52e..2c5a14a 100644
--- a/src/lib/eina/eina_promise.c
+++ b/src/lib/eina/eina_promise.c
@@ -614,9 +614,9 @@ eina_promise_all(Eina_Iterator* it)
last = internal_it->data.promises + internal_it->data.num_promises;
for (;cur_promise != last; ++cur_promise)
  {
+eina_promise_ref(*cur_promise); // We need to keep the value alive 
until this promise is freed
 eina_promise_then(*cur_promise, 
(Eina_Promise_Cb)&_eina_promise_all_compose_then_cb,
   
(Eina_Promise_Error_Cb)&_eina_promise_all_compose_error_then_cb, promise);
-eina_promise_ref(*cur_promise); // We need to keep the value alive 
until this promise is freed
  }
 
return >promise.vtable;

-- 




[EGIT] [core/efl] master 01/09: emodel: Created Emodel and Eio_Model.

2015-04-05 Thread Larry Jr
cedric pushed a commit to branch master.

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

commit 05eecf5c8fdceda95649b4ccda7014a76fb0347f
Author: Larry Jr larry@gmail.com
Date:   Sun Apr 5 15:19:45 2015 +0200

emodel: Created Emodel and Eio_Model.
---
 Makefile.am|   5 +-
 configure.ac   |  12 +
 pc/.gitignore  |   3 +
 pc/eio-cxx.pc.in   |  12 +
 pc/emodel-cxx.pc.in|  12 +
 pc/emodel.pc.in|  12 +
 pkgbuild/PKGBUILD  |   2 +-
 src/Makefile.am|   7 +-
 src/Makefile_Efl_Cxx.am|   2 +-
 src/Makefile_Eio.am|  22 +-
 src/Makefile_Eio_Cxx.am|  22 +
 src/Makefile_Emodel.am |  78 +++
 src/Makefile_Emodel_Cxx.am |  22 +
 src/examples/eio/Makefile.am   |   2 +
 src/lib/eio/eio_model.c| 774 +
 src/lib/eio/eio_model.eo   |  49 ++
 src/lib/eio/eio_model.h|  45 ++
 src/lib/eio/eio_model_private.h|  62 +++
 src/lib/emodel/Emodel.h| 127 +
 src/lib/emodel/Emodel_Common.h | 106 
 src/lib/emodel/emodel.c|   6 +
 src/lib/emodel/emodel.eo   | 326 
 src/tests/emodel/emodel_suite.c| 138 +
 src/tests/emodel/emodel_test_file.c| 273 ++
 src/tests/emodel/emodel_test_monitor_add.c | 105 
 25 files changed, 2217 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index dee9478..14b8572 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -143,6 +143,7 @@ pc/ecore-evas.pc \
 pc/ecore-avahi.pc \
 pc/ector.pc \
 pc/embryo.pc \
+pc/emodel.pc \
 pc/eio.pc \
 pc/eldbus.pc \
 pc/efreet.pc \
@@ -162,7 +163,9 @@ pc/ecore-cxx.pc \
 pc/eolian-cxx.pc \
 pc/edje-cxx.pc \
 pc/eet-cxx.pc \
-pc/eo-cxx.pc
+pc/eo-cxx.pc \
+pc/emodel-cxx.pc \
+pc/eio-cxx.pc
 endif
 
 if HAVE_ELUA
diff --git a/configure.ac b/configure.ac
index 9f4b269..da6abf8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3944,6 +3944,14 @@ EFL_EVAL_PKGS([ECORE_EVAS])
 EFL_LIB_END([Ecore_Evas])
  End of Ecore_Evas
 
+ Emodel
+EFL_LIB_START([Emodel])
+EFL_ADD_LIBS([EMODEL], [])
+EFL_INTERNAL_DEPEND_PKG([EMODEL], [eo])
+EFL_INTERNAL_DEPEND_PKG([EMODEL], [eina])
+EFL_LIB_END([Emodel])
+ End of Emodel
+
  Eio
 EFL_LIB_START([Eio])
 
@@ -3957,6 +3965,7 @@ EFL_LIB_START([Eio])
 EFL_PLATFORM_DEPEND([EIO], [evil])
 
 ### Checks for libraries
+EFL_INTERNAL_DEPEND_PKG([EIO], [emodel])
 EFL_INTERNAL_DEPEND_PKG([EIO], [ecore])
 EFL_INTERNAL_DEPEND_PKG([EIO], [eet])
 EFL_INTERNAL_DEPEND_PKG([EIO], [eo])
@@ -4534,6 +4543,8 @@ pc/eolian.pc
 pc/eolian-cxx.pc
 pc/efl.pc
 pc/efl-cxx.pc
+pc/emodel.pc
+pc/emodel-cxx.pc
 pc/evas-fb.pc
 pc/evas-opengl-x11.pc
 pc/evas-opengl-sdl.pc
@@ -4573,6 +4584,7 @@ pc/ecore-avahi.pc
 pc/ector.pc
 pc/embryo.pc
 pc/eio.pc
+pc/eio-cxx.pc
 pc/eldbus.pc
 pc/efreet.pc
 pc/efreet-mime.pc
diff --git a/pc/.gitignore b/pc/.gitignore
index 25049d8..447b417 100644
--- a/pc/.gitignore
+++ b/pc/.gitignore
@@ -28,9 +28,12 @@
 /eina-cxx.pc
 /eet-cxx.pc
 /eio.pc
+/eio-cxx.pc
 /eldbus.pc
 /elocation.pc
 /embryo.pc
+/emodel.pc
+/emodel-cxx.pc
 /emotion.pc
 /eo.pc
 /ephysics.pc
diff --git a/pc/eio-cxx.pc.in b/pc/eio-cxx.pc.in
new file mode 100644
index 000..82c6cfa
--- /dev/null
+++ b/pc/eio-cxx.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: eio C++ API
+Description: Enlightenned Asynchronous Input Output library C++ API.
+Requires.private: @requirements_pc_eio@
+Version: @VERSION@
+Libs: -L${libdir} -leio
+Libs.private: @requirements_libs_eio@
+Cflags: -I${includedir}/efl-@VMAJ@ -I${includedir}/eio-@VMAJ@ 
-I${includedir}/eio-cxx-@VMAJ@
diff --git a/pc/emodel-cxx.pc.in b/pc/emodel-cxx.pc.in
new file mode 100644
index 000..dce3764
--- /dev/null
+++ b/pc/emodel-cxx.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: emodel C++ API
+Description: MVC Library C++ API.
+Version: @PACKAGE_VERSION@
+Requires.private: @requirements_pc_emodel@
+Libs: -L${libdir} -lemodel
+Libs.private: @requirements_libs_emodel@
+Cflags: -I${includedir}/efl-@VMAJ@ -I${includedir}/emodel-@VMAJ@ 
-I${includedir}/emodel-cxx-@VMAJ@
diff --git a/pc/emodel.pc.in b/pc/emodel.pc.in
new file mode 100644
index 000..0d68f11
--- /dev/null
+++ b/pc/emodel.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: emodel
+Description: MVC Library
+Version: @PACKAGE_VERSION@
+Requires.private: @requirements_pc_emodel@
+Libs: -L${libdir} -lemodel
+Libs.private:  @requirements_libs_emodel@
+Cflags: -I

[EGIT] [core/efl] master 07/09: emodel: api change property_get/set and event modelchange

2015-04-05 Thread Larry Jr
cedric pushed a commit to branch master.

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

commit 2f538196004f9113952c864bf9848025a04b
Author: Larry Jr larry@gmail.com
Date:   Sun Apr 5 15:19:55 2015 +0200

emodel: api change property_get/set and event modelchange
---
 src/lib/eio/eio_model.c| 164 -
 src/lib/eio/eio_model.eo   |   2 +-
 src/lib/eio/eio_model_private.h|  24 +++--
 src/lib/emodel/Emodel_Common.h |   4 +-
 src/lib/emodel/emodel.eo   |  33 +++---
 src/tests/emodel/emodel_test_file.c|  76 -
 src/tests/emodel/emodel_test_monitor_add.c |  40 +--
 7 files changed, 150 insertions(+), 193 deletions(-)

diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 31c6f69..72d5bb0 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -17,7 +17,6 @@
 #define MY_CLASS EIO_MODEL_CLASS
 #define MY_CLASS_NAME Eio_Model
 
-static Eina_Value_Struct_Desc *EIO_MODEL_PROPERTIES_DESC = NULL;
 static void _eio_prop_set_error_cb(void *, Eio_File *, int);
 static void _eio_model_emodel_properties_load(Eo *, Eio_Model_Data *);
 static void _eio_model_emodel_children_load(Eo *, Eio_Model_Data *);
@@ -66,31 +65,18 @@ _eio_stat_done_cb(void *data, Eio_File *handler 
EINA_UNUSED, const Eina_Stat *st
 {
Emodel_Property_Event evt;
Eio_Model_Data *priv = data;
-   Eina_Bool changed = EINA_FALSE;
-   Eina_Value_Struct_Desc *desc = EIO_MODEL_PROPERTIES_DESC;
-
EINA_SAFETY_ON_FALSE_RETURN(eo_ref_get(priv-obj));
 
-   priv-stat = stat;
+   priv-is_dir = eio_file_is_dir(stat);
memset(evt, 0, sizeof(Emodel_Property_Event));
 
-   changed |= eina_value_struct_set(priv-properties,
-desc-members[EIO_MODEL_PROP_IS_DIR].name, 
eio_file_is_dir(stat));
-
-   changed |= eina_value_struct_set(priv-properties,
-desc-members[EIO_MODEL_PROP_IS_LNK].name, 
eio_file_is_lnk(stat));
-
-   changed |= eina_value_struct_set(priv-properties,
-desc-members[EIO_MODEL_PROP_MTIME].name, 
eio_file_mtime(stat));
+   eina_value_set(priv-properties_value[EIO_MODEL_PROP_IS_DIR], 
eio_file_is_dir(stat));
+   eina_value_set(priv-properties_value[EIO_MODEL_PROP_IS_LNK], 
eio_file_is_lnk(stat));
+   eina_value_set(priv-properties_value[EIO_MODEL_PROP_MTIME], 
eio_file_mtime(stat));
+   eina_value_set(priv-properties_value[EIO_MODEL_PROP_SIZE], 
eio_file_size(stat));
 
-   changed |= eina_value_struct_set(priv-properties,
-desc-members[EIO_MODEL_PROP_SIZE].name, 
eio_file_size(stat));
-
-   if (changed == EINA_TRUE)
- {
-evt.changed_properties = priv-properties;
-eo_do(priv-obj, 
eo_event_callback_call(EMODEL_EVENT_PROPERTIES_CHANGED, evt));
- }
+   evt.changed_properties = priv-properties_name;
+   eo_do(priv-obj, eo_event_callback_call(EMODEL_EVENT_PROPERTIES_CHANGED, 
evt));
 
_load_set(priv, EMODEL_LOAD_STATUS_LOADED_PROPERTIES);
 
@@ -109,7 +95,7 @@ _eio_move_done_cb(void *data, Eio_File *handler EINA_UNUSED)
 {
Emodel_Property_Event evt;
Eio_Model_Data *priv = data;
-   Eina_Value_Struct_Desc *desc = EIO_MODEL_PROPERTIES_DESC;
+   Eina_Array *properties;
 
EINA_SAFETY_ON_FALSE_RETURN(eo_ref_get(priv-obj));
 
@@ -119,11 +105,16 @@ _eio_move_done_cb(void *data, Eio_File *handler 
EINA_UNUSED)
 * When mv is executed we update our values and
 * notify both path and filename properties listeners.
 */
-   eina_value_struct_set(priv-properties, 
desc-members[EIO_MODEL_PROP_PATH].name, priv-path);
-   eina_value_struct_set(priv-properties, 
desc-members[EIO_MODEL_PROP_FILENAME].name, basename(priv-path));
-   evt.changed_properties = priv-properties;
+   eina_value_set(priv-properties_value[EIO_MODEL_PROP_PATH], priv-path);
+   eina_value_set(priv-properties_value[EIO_MODEL_PROP_FILENAME], 
basename(priv-path));
+
+   properties = eina_array_new(2);
+   eina_array_push(properties, _eio_model_prop_names[EIO_MODEL_PROP_PATH]);
+   eina_array_push(properties, _eio_model_prop_names[EIO_MODEL_PROP_FILENAME]);
+   evt.changed_properties = properties;
 
eo_do(priv-obj, eo_event_callback_call(EMODEL_EVENT_PROPERTIES_CHANGED, 
evt));
+   eina_array_free(properties);
 }
 
 static void
@@ -259,41 +250,43 @@ _eio_error_unlink_cb(void *data EINA_UNUSED, Eio_File 
*handler EINA_UNUSED, int
  * Interfaces impl.
  */
 static Emodel_Load_Status
-_eio_model_emodel_properties_list_get(Eo *obj EINA_UNUSED,
-  Eio_Model_Data *_pd, Eina_Array * const* 
properties_list)
+_eio_model_emodel_properties_get(Eo *obj EINA_UNUSED,
+  Eio_Model_Data *_pd, Eina_Array * const* 
properties)
 {
Eio_Model_Data *priv = _pd;
-   unsigned int i;
 
EINA_SAFETY_ON_NULL_RETURN_VAL(priv, EINA_FALSE

[EGIT] [core/efl] master 03/09: emodel: API changes and removed unnecessary eina_values copy and stringshares

2015-04-05 Thread Larry Jr
cedric pushed a commit to branch master.

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

commit 9ed6bea380719603eb6948b1b794706d688a0dfc
Author: Larry Jr larry@gmail.com
Date:   Sun Apr 5 15:19:49 2015 +0200

emodel: API changes and removed unnecessary eina_values copy and 
stringshares
---
 src/lib/eio/eio_model.c | 172 +++-
 src/lib/eio/eio_model_private.h |  13 +--
 src/lib/emodel/Emodel_Common.h  |  18 +---
 src/lib/emodel/emodel.eo|   2 +-
 src/tests/emodel/emodel_test_file.c |  53 +--
 5 files changed, 76 insertions(+), 182 deletions(-)

diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 7b6bf1d..f642937 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -22,13 +22,16 @@ static void _eio_model_emodel_properties_load(Eo *, 
Eio_Model_Data *);
 static void _eio_model_emodel_children_load(Eo *, Eio_Model_Data *);
 
 static void
-_load_set(Eio_Model_Data *priv, Emodel_Load load)
+_load_set(Eio_Model_Data *priv, Emodel_Load_Status status)
 {
+   Emodel_Load load;
+
+   load.status = status;
if ((priv-load.status  (EMODEL_LOAD_STATUS_LOADED | 
EMODEL_LOAD_STATUS_LOADING)) 
 (load.status  (EMODEL_LOAD_STATUS_LOADED | 
EMODEL_LOAD_STATUS_LOADING)))
  {
-load.status = priv-load.status | load.status;
-switch (load.status)
+load.status = priv-load.status | status;
+switch (status)
   {
case EMODEL_LOAD_STATUS_LOADED_PROPERTIES:
  load.status = ~EMODEL_LOAD_STATUS_LOADING_PROPERTIES;
@@ -53,33 +56,6 @@ _load_set(Eio_Model_Data *priv, Emodel_Load load)
  }
 }
 
-static void
-_stat_pro_set(Eio_Model_Data *priv, int prop_id, const Eina_Value *value, 
Emodel_Property_Event *evt)
-{
-   Eina_Value old_value;
-   int changed;
-   Emodel_Property_Pair *pair = NULL;
-   const char *prop = EIO_MODEL_PROPERTIES_DESC-members[prop_id].name;
-
-   eina_value_struct_value_get(priv-properties, prop, old_value);
-   changed = eina_value_compare(old_value, value);
-
-   if(changed) eina_value_struct_value_set(priv-properties, prop, value);
-   eina_value_flush(old_value);
-   if(!changed) return;
-
-   pair = calloc(1, sizeof(Emodel_Property_Pair));
-   EINA_SAFETY_ON_NULL_RETURN(pair);
-   if(!eina_value_copy((Eina_Value*)value, pair-value))
- {
-free(pair);
-return;
- }
-
-   pair-property = eina_stringshare_add(prop);
-   evt-changed_properties = eina_list_append(evt-changed_properties, pair);
-}
-
 /**
  *  Callbacks
  *  Property
@@ -88,52 +64,34 @@ static void
 _eio_stat_done_cb(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat 
*stat)
 {
Emodel_Property_Event evt;
-   Eina_Value value;
Eio_Model_Data *priv = data;
-   Emodel_Load load;
+   Eina_Bool changed = EINA_FALSE;
+   Eina_Value_Struct_Desc *desc = EIO_MODEL_PROPERTIES_DESC;
+
EINA_SAFETY_ON_FALSE_RETURN(eo_ref_get(priv-obj));
 
priv-stat = stat;
memset(evt, 0, sizeof(Emodel_Property_Event));
 
-   // Setup for Eina_Bool
-   eina_value_setup(value, EINA_VALUE_TYPE_INT);
-   eina_value_set(value, eio_file_is_dir(stat));
-   _stat_pro_set(priv, EIO_MODEL_PROP_IS_DIR, (const Eina_Value*)value, evt);
-   eina_value_flush(value);
-
-   // Setup for Eina_Bool
-   eina_value_setup(value, EINA_VALUE_TYPE_INT);
-   eina_value_set(value, eio_file_is_lnk(stat));
-   _stat_pro_set(priv, EIO_MODEL_PROP_IS_LNK, (const Eina_Value*)value, evt);
-   eina_value_flush(value);
-
-   // Setup for double
-   eina_value_setup(value, EINA_VALUE_TYPE_TIMEVAL);
-   eina_value_set(value, eio_file_mtime(stat));
-   _stat_pro_set(priv, EIO_MODEL_PROP_MTIME, (const Eina_Value*)value, evt);
-   eina_value_flush(value);
-
-   // Setup for long long
-   eina_value_setup(value, EINA_VALUE_TYPE_INT64);
-   eina_value_set(value, eio_file_size(stat));
-   _stat_pro_set(priv, EIO_MODEL_PROP_SIZE, (const Eina_Value*)value, evt);
-   eina_value_flush(value);
-
-   if (evt.changed_properties != NULL)
+   changed |= eina_value_struct_set(priv-properties,
+   desc-members[EIO_MODEL_PROP_IS_DIR].name, 
eio_file_is_dir(stat));
+
+   changed |= eina_value_struct_set(priv-properties,
+   desc-members[EIO_MODEL_PROP_IS_LNK].name, 
eio_file_is_lnk(stat));
+
+   changed |= eina_value_struct_set(priv-properties,
+   desc-members[EIO_MODEL_PROP_MTIME].name, 
eio_file_mtime(stat));
+
+   changed |= eina_value_struct_set(priv-properties,
+   desc-members[EIO_MODEL_PROP_SIZE].name, 
eio_file_size(stat));
+
+   if (changed == EINA_TRUE)
  {
-Emodel_Property_Pair *pair;
+evt.changed_properties = priv-properties;
 eo_do(priv-obj, 
eo_event_callback_call(EMODEL_EVENT_PROPERTIES_CHANGED, evt));
-EINA_LIST_FREE(evt.changed_properties, pair)
-  {
- eina_stringshare_del(pair-property

[EGIT] [core/efl] master 15/20: allow C++ user create new classes inheriting from Eolian generated Classes

2015-01-05 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit 2b12114777cc9e0b7db3894f37dd71f6b5b073b4
Author: Larry Jr larry@gmail.com
Date:   Tue Aug 26 15:54:28 2014 -0300

allow C++ user create new classes inheriting from Eolian generated Classes
---
 src/Makefile.am|  2 +-
 src/Makefile_Eolian_Cxx.am | 13 -
 src/bindings/eo_cxx/eo_private.hh  | 17 ++
 src/examples/eolian_cxx/eolian_cxx_inherit_01.cc   | 24 +++-
 .../grammar/inheritance_base_generator.hh  | 67 +-
 src/tests/eolian_cxx/eolian_cxx_suite.cc   |  2 +
 .../eolian_cxx/eolian_cxx_test_inheritance.cc  | 44 ++
 src/tests/eolian_cxx/simple.c  | 38 
 src/tests/eolian_cxx/simple.eo | 19 ++
 9 files changed, 221 insertions(+), 5 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 57b56b7..b0b4884 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,7 +2,7 @@ MAINTAINERCLEANFILES = Makefile.in
 CLEANFILES =
 BUILT_SOURCES =
 
-EOLIAN_FLAGS = \
+EOLIAN_FLAGS = -I$(srcdir)\
   -I$(srcdir)/lib/eo \
   -I$(srcdir)/lib/evas/canvas \
   -I$(srcdir)/lib/edje \
diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am
index 88f1186..d0b8450 100644
--- a/src/Makefile_Eolian_Cxx.am
+++ b/src/Makefile_Eolian_Cxx.am
@@ -72,6 +72,8 @@ tests/eolian_cxx/d.c \
 tests/eolian_cxx/eolian_cxx_test_callback.cc \
 tests/eolian_cxx/eolian_cxx_test_address_of.cc \
 tests/eolian_cxx/eolian_cxx_test_wrapper.cc \
+tests/eolian_cxx/simple.c \
+tests/eolian_cxx/eolian_cxx_test_inheritance.cc \
 tests/eolian_cxx/eolian_cxx_test_generate.cc
 
 
tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-eolian_cxx_test_callback.$(OBJEXT):
 tests/eolian_cxx/callback.eo.hh
@@ -83,7 +85,15 @@ 
tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-b.$(OBJEXT): tests/eolian_cxx
 tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-c.$(OBJEXT): 
tests/eolian_cxx/c.eo.c tests/eolian_cxx/c.eo.h
 tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-d.$(OBJEXT): 
tests/eolian_cxx/d.eo.c tests/eolian_cxx/d.eo.h
 
-CLEANFILES += tests/eolian_cxx/callback.eo.hh tests/eolian_cxx/callback.eo.c 
tests/eolian_cxx/callback.eo.h \
+tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-eolian_cxx_test_inheritance.$(OBJEXT):
 tests/eolian_cxx/simple.eo.hh
+
+tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-simple.$(OBJEXT): 
tests/eolian_cxx/simple.eo.c tests/eolian_cxx/simple.eo.h
+
+CLEANFILES += tests/eolian_cxx/callback.eo.hh tests/eolian_cxx/callback.eo.c \
+tests/eolian_cxx/callback.eo.h \
+tests/eolian_cxx/simple.eo.c \
+tests/eolian_cxx/simple.eo.h \
+tests/eolian_cxx/simple.eo.hh \
 tests/eolian_cxx/a.eo.hh tests/eolian_cxx/a.eo.c tests/eolian_cxx/a.eo.h \
 tests/eolian_cxx/b.eo.hh tests/eolian_cxx/b.eo.c tests/eolian_cxx/b.eo.h \
 tests/eolian_cxx/c.eo.hh tests/eolian_cxx/c.eo.c tests/eolian_cxx/c.eo.h \
@@ -111,6 +121,7 @@ tests_eolian_cxx_eolian_cxx_suite_DEPENDENCIES = 
@USE_EOLIAN_INTERNAL_LIBS@
 endif
 
 EXTRA_DIST += tests/eolian_cxx/callback.eo \
+tests/eolian_cxx/simple.eo \
 tests/eolian_cxx/a.eo \
 tests/eolian_cxx/b.eo \
 tests/eolian_cxx/c.eo \
diff --git a/src/bindings/eo_cxx/eo_private.hh 
b/src/bindings/eo_cxx/eo_private.hh
index a227173..7640890 100644
--- a/src/bindings/eo_cxx/eo_private.hh
+++ b/src/bindings/eo_cxx/eo_private.hh
@@ -86,6 +86,9 @@ Eo_Class const* do_eo_class_new(Eo_Class_Description 
class_desc)
 
 template typename T struct operation_description_class_size;
 
+template
+struct operation_description_class_sizeefl::eo::base { static const int 
value = 0; };
+
 /// @internal
 ///
 /// @brief Provides the operator to convert @p T to @p D.
@@ -130,6 +133,9 @@ namespace detail {
 ///
 template typename T struct operations;
 
+template 
+struct operationsefl::eo::base { template typename T struct type {}; };
+
 /// @internal
 ///
 /// @brief Provides the operations of an extension as well as its
@@ -153,6 +159,17 @@ struct Inherit_Private_Data
void* this_;
 };
 
+} } } // namespace efl { namespace eo { namespace detail {
+
+namespace efl { namespace eo { namespace detail {
+template typename T
+int initialize_operation_description(efl::eo::detail::tagefl::eo::base
+ , Eo_Op_Description* ops)
+{
+   (void)ops;
+   return 0;
+}
+
 /// @}
 
 } } } // namespace efl { namespace eo { namespace detail {
diff --git a/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc 
b/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc
index b258f05..0e6fce9 100644
--- a/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc
+++ b/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc
@@ -30,7 +30,7 @@ struct ColourableCircle
}
 };
 
-
+/*
 struct ColourableFoo
   : efl::eo::inheritColourableFoo

[EGIT] [core/efl] master 11/20: catch exceptions in cxx wrappers and throw a eina_error

2015-01-05 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit ebebcf64389d4e362ee9efaaf8aad4a1e76149e4
Author: Larry Jr larry@gmail.com
Date:   Thu Aug 14 15:20:49 2014 -0300

catch exceptions in cxx wrappers and throw a eina_error
---
 .../grammar/inheritance_base_generator.hh  | 24 ++
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh 
b/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh
index 36d0821..31539c6 100644
--- a/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh
+++ b/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh
@@ -107,12 +107,28 @@ operator(std::ostream out, inheritance_wrappers const 
x)
  (func.params.size() ? ,  : )
  parameters_c_declaration(func.params)
  )  endl
- {  endl
- tab(1)
- (!function_is_void(func) ? return : )
+ {  endl;
+
+if (!function_is_void(func))
+  out  tab(1)  reinterpret_type(func.ret)   _tmp_ret{};  
endl;
+
+out  tab(1)
+ try  endl
+ tab(2)  {  endl
+ tab(3)
+ (!function_is_void(func) ? _tmp_ret = : )
  static_castT*(self-this_)-
  func.name  (  parameters_cxx_list(func.params)  );  
endl
- }  endl  endl;
+ tab(2)  }  endl
+ tab(1)  catch (...)  endl
+ tab(2)  {  endl
+ tab(3)  eina_error_set( efl::eina::unknown_error() );  
endl
+ tab(2)  }  endl;
+
+if (!function_is_void(func))
+  out  tab(1)  return _tmp_ret;  endl;
+
+out  }  endl  endl;
  }
return out;
 }

-- 




[EGIT] [core/efl] master 08/20: added new types in lookup table

2015-01-05 Thread Larry Jr
felipealmeida pushed a commit to branch master.

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

commit dff706f123789a3df0f370abe470c383ffbdb55c
Author: Larry Jr larry@gmail.com
Date:   Tue Oct 7 15:06:01 2014 -0300

added new types in lookup table

Signed-off-by: Vitor Sousa vitorsousasi...@gmail.com
---
 src/bin/eolian_cxx/type_lookup_table.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/eolian_cxx/type_lookup_table.cc 
b/src/bin/eolian_cxx/type_lookup_table.cc
index 2702225..bb14d95 100644
--- a/src/bin/eolian_cxx/type_lookup_table.cc
+++ b/src/bin/eolian_cxx/type_lookup_table.cc
@@ -12,6 +12,7 @@ type_lookup_table
   {Ecore_Cb, eolian_type::callback_, {Ecore.h}},
   {Ecore_Task_Cb, eolian_type::callback_, {Ecore.h}},
   {Ecore_Timeline_Cb, eolian_type::callback_, {Ecore.h}},
+  {Edje_Signal_Cb, eolian_type::callback_, {Edje.h}},
   {Eina_Accessor *, eolian_type::complex_, false, efl::eina::accessor, 
{eina-cxx/eina_accessor.hh}},
   {Eina_Bool, eolian_type::simple_, false, bool, {}},
   {Eina_Bool *, eolian_type::simple_, false, bool*, {}},
@@ -20,6 +21,8 @@ type_lookup_table
   {Eina_Iterator *, eolian_type::complex_, false, efl::eina::iterator, 
{eina-cxx/eina_iterator.hh}},
   {Eina_List *, eolian_type::complex_, false, efl::eina::range_list, 
{eina-cxx/eina_list.hh}},
   {Eina_List *, eolian_type::complex_, true, efl::eina::list, 
{eina-cxx/eina_list.hh}},
+  {Eio_Filter_Direct_Cb, eolian_type::callback_, {Eio.h}},
+  {Emodel *, eolian_type::simple_, false, emodel, {Emodel.hh}},
   {Eo *, eolian_type::simple_, true, efl::eo::base, {eo_base.hh}},
   {Eo *, eolian_type::simple_, false, efl::eo::base, {eo_base.hh}},
   //{Evas_Object_Box_Layout, eolian_type::callback_, {Evas.h}},

--