ecore: create ecore_types.eot and add Ecore.Time to it
authorVitor Sousa <vitorsousasilva@gmail.com>
Mon, 25 Jan 2016 22:17:52 +0000 (20:17 -0200)
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Tue, 9 Feb 2016 13:38:58 +0000 (11:38 -0200)
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
src/lib/ecore/Ecore_Common.h
src/lib/ecore/ecore_types.eot [new file with mode: 0644]

index 13e5473..49936af 100644 (file)
@@ -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}
index 0723fdc..6a4ab2f 100644 (file)
@@ -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 (file)
index 0000000..6ba0de5
--- /dev/null
@@ -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
+                           ]]