felipealmeida pushed a commit to branch master.

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

commit c674f64a070940cdc08a393d5a7c630a8fd8bad4
Author: Vitor Sousa <vitorsousasi...@gmail.com>
Date:   Mon Jan 25 20:17:52 2016 -0200

    ecore: create ecore_types.eot and add Ecore.Time to it
    
    Create the file ecore_types.eot to hold common types related with Ecore.
    
    Add Ecore.Time as an external type to ecore_types.eot.
    This type is intended to be a alias to struct tm (from time.h).
    That way .eo files have a standard way to reference it.
    Each language should manually bind it.
---
 src/Makefile_Ecore.am         |  9 +++++++--
 src/lib/ecore/Ecore_Common.h  | 13 +++++++++++++
 src/lib/ecore/ecore_types.eot |  8 ++++++++
 3 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index 13e5473..49936af 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -16,9 +16,13 @@ ecore_eolian_files = \
        lib/ecore/ecore_mainloop.eo \
        lib/ecore/ecore_parent.eo
 
+ecore_eolian_type_files = \
+       lib/ecore/ecore_types.eot
+
 ecore_eolian_c = $(ecore_eolian_files:%.eo=%.eo.c)
 ecore_eolian_h = $(ecore_eolian_files:%.eo=%.eo.h) \
-                 $(ecore_eolian_files_legacy:%.eo=%.eo.legacy.h)
+                 $(ecore_eolian_files_legacy:%.eo=%.eo.legacy.h) \
+                 $(ecore_eolian_type_files:%.eot=%.eot.h)
 
 BUILT_SOURCES += \
                  $(ecore_eolian_c) \
@@ -29,7 +33,8 @@ CLEANFILES += \
               $(ecore_eolian_h)
 
 ecoreeolianfilesdir = $(datadir)/eolian/include/ecore-@VMAJ@
-ecoreeolianfiles_DATA = $(ecore_eolian_files)
+ecoreeolianfiles_DATA = $(ecore_eolian_files) \
+                        $(ecore_eolian_type_files)
 
 EXTRA_DIST += \
               ${ecoreeolianfiles_DATA}
diff --git a/src/lib/ecore/Ecore_Common.h b/src/lib/ecore/Ecore_Common.h
index 0723fdc..6a4ab2f 100644
--- a/src/lib/ecore/Ecore_Common.h
+++ b/src/lib/ecore/Ecore_Common.h
@@ -4,6 +4,19 @@ extern "C" {
 
 #include <Efl_Config.h>
 
+#include "ecore_types.eot.h"
+
+
+/**
+ * @ingroup Ecore
+ * @since 1.18
+ *
+ * This type is a alias to struct tm.
+ * It is intended to be a standard way to reference it in .eo files.
+ * Each language should manually bind it.
+ */
+typedef struct tm Ecore_Time;
+
 /**
  * @defgroup Ecore_Init_Group Ecore initialization, shutdown functions and 
reset on fork.
  * @ingroup Ecore
diff --git a/src/lib/ecore/ecore_types.eot b/src/lib/ecore/ecore_types.eot
new file mode 100644
index 0000000..6ba0de5
--- /dev/null
+++ b/src/lib/ecore/ecore_types.eot
@@ -0,0 +1,8 @@
+
+struct @extern Ecore.Time; [[
+                             This type is a alias for struct tm.
+                             It is intended to be a standard way to reference
+                             it in .eo files.
+                             Each language should manually bind it.
+                             @since 1.18
+                           ]]

-- 


Reply via email to