cedric pushed a commit to branch master.

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

commit 0f9078070d8633e73162c970fa3a7f7d7021155e
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Tue Mar 5 17:00:37 2019 -0500

    efl_loop_timer: remove all legacy usage from eo files
    
    this takes the current generated output from eolian for legacy code in
    evas and adds it to the tree, then removes legacy references from the
    corresponding eo files. in the case where the entire eo file was for
    a legacy object, that eo file has been removed from the tree
    
    ref T7724
    
    Reviewed-by: Cedric BAIL <cedric.b...@free.fr>
    Differential Revision: https://phab.enlightenment.org/D8126
---
 src/Makefile_Ecore.am                    |  8 +--
 src/lib/ecore/Ecore_Legacy.h             |  2 +-
 src/lib/ecore/ecore_timer.c              |  1 +
 src/lib/ecore/efl_loop_timer.eo          |  1 -
 src/lib/ecore/efl_loop_timer_eo.legacy.c | 36 +++++++++++++
 src/lib/ecore/efl_loop_timer_eo.legacy.h | 86 ++++++++++++++++++++++++++++++++
 src/lib/ecore/meson.build                | 16 +-----
 7 files changed, 128 insertions(+), 22 deletions(-)

diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index 70f5692ee9..24ee19bc1c 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -5,9 +5,6 @@ ecore_eolian_files_priv = \
        lib/ecore/ecore_event_message.eo \
        lib/ecore/ecore_event_message_handler.eo
 
-ecore_eolian_files_legacy = \
-       lib/ecore/efl_loop_timer.eo
-
 ecore_eolian_files_public = \
        lib/ecore/efl_app.eo \
        lib/ecore/efl_loop.eo \
@@ -18,6 +15,7 @@ ecore_eolian_files_public = \
        lib/ecore/efl_loop_message_handler.eo \
        lib/ecore/efl_loop_message_future.eo \
        lib/ecore/efl_loop_message_future_handler.eo \
+ lib/ecore/efl_loop_timer.eo \
        lib/ecore/efl_exe.eo \
        lib/ecore/efl_thread.eo \
        lib/ecore/efl_threadio.eo \
@@ -58,12 +56,10 @@ ecore_test_eolian_files = \
  tests/ecore/ecore_audio_out_test.eo
 
 ecore_eolian_files = \
-       $(ecore_eolian_files_legacy) \
        $(ecore_eolian_files_public)
 
 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_h = $(ecore_eolian_files:%.eo=%.eo.h)
 ecore_test_c = $(ecore_test_eolian_files:%.eo=%.eo.c)
 ecore_test_h = $(ecore_test_eolian_files:%.eo=%.eo.h)
 
diff --git a/src/lib/ecore/Ecore_Legacy.h b/src/lib/ecore/Ecore_Legacy.h
index e47f07bf3f..9c951f5a93 100644
--- a/src/lib/ecore/Ecore_Legacy.h
+++ b/src/lib/ecore/Ecore_Legacy.h
@@ -295,7 +295,7 @@ EAPI Eina_Bool ecore_timer_freeze_get(Ecore_Timer *timer);
  */
 EAPI void ecore_timer_thaw(Ecore_Timer *timer);
 
-#include "efl_loop_timer.eo.legacy.h"
+#include "efl_loop_timer_eo.legacy.h"
 
 /**
  * @}
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index 1beae5d0a4..cf9be54239 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -670,3 +670,4 @@ _efl_loop_timer_set(Efl_Loop_Timer_Data *timer, double at, 
double in)
 }
 
 #include "efl_loop_timer.eo.c"
+#include "efl_loop_timer_eo.legacy.c"
diff --git a/src/lib/ecore/efl_loop_timer.eo b/src/lib/ecore/efl_loop_timer.eo
index f788d067ee..97812a976d 100644
--- a/src/lib/ecore/efl_loop_timer.eo
+++ b/src/lib/ecore/efl_loop_timer.eo
@@ -9,7 +9,6 @@ class @beta Efl.Loop_Timer extends Efl.Loop_Consumer
 
      The @Efl.Object.event_freeze and @Efl.Object.event_thaw calls are used to 
pause and unpause the timer.
    ]]
-   legacy_prefix: ecore_timer;
    methods {
       @property interval {
          [[Interval the timer ticks on.]]
diff --git a/src/lib/ecore/efl_loop_timer_eo.legacy.c 
b/src/lib/ecore/efl_loop_timer_eo.legacy.c
new file mode 100644
index 0000000000..a479bdb6f5
--- /dev/null
+++ b/src/lib/ecore/efl_loop_timer_eo.legacy.c
@@ -0,0 +1,36 @@
+
+EAPI void
+ecore_timer_interval_set(Efl_Loop_Timer *obj, double in)
+{
+   efl_loop_timer_interval_set(obj, in);
+}
+
+EAPI double
+ecore_timer_interval_get(const Efl_Loop_Timer *obj)
+{
+   return efl_loop_timer_interval_get(obj);
+}
+
+EAPI double
+ecore_timer_pending_get(const Efl_Loop_Timer *obj)
+{
+   return efl_loop_timer_pending_get(obj);
+}
+
+EAPI void
+ecore_timer_reset(Efl_Loop_Timer *obj)
+{
+   efl_loop_timer_reset(obj);
+}
+
+EAPI void
+ecore_timer_loop_reset(Efl_Loop_Timer *obj)
+{
+   efl_loop_timer_loop_reset(obj);
+}
+
+EAPI void
+ecore_timer_delay(Efl_Loop_Timer *obj, double add)
+{
+   efl_loop_timer_delay(obj, add);
+}
diff --git a/src/lib/ecore/efl_loop_timer_eo.legacy.h 
b/src/lib/ecore/efl_loop_timer_eo.legacy.h
new file mode 100644
index 0000000000..43c372a5d7
--- /dev/null
+++ b/src/lib/ecore/efl_loop_timer_eo.legacy.h
@@ -0,0 +1,86 @@
+#ifndef _EFL_LOOP_TIMER_EO_LEGACY_H_
+#define _EFL_LOOP_TIMER_EO_LEGACY_H_
+
+#ifndef _EFL_LOOP_TIMER_EO_CLASS_TYPE
+#define _EFL_LOOP_TIMER_EO_CLASS_TYPE
+
+typedef Eo Efl_Loop_Timer;
+
+#endif
+
+#ifndef _EFL_LOOP_TIMER_EO_TYPES
+#define _EFL_LOOP_TIMER_EO_TYPES
+
+
+#endif
+
+/**
+ * @brief Interval the timer ticks on.
+ *
+ * If set during a timer call this will affect the next interval.
+ *
+ * @param[in] obj The object.
+ * @param[in] in The new interval in seconds
+ *
+ * @ingroup Ecore_Timer_Group
+ */
+EAPI void ecore_timer_interval_set(Efl_Loop_Timer *obj, double in);
+
+/**
+ * @brief Interval the timer ticks on.
+ *
+ * @param[in] obj The object.
+ *
+ * @return The new interval in seconds
+ *
+ * @ingroup Ecore_Timer_Group
+ */
+EAPI double ecore_timer_interval_get(const Efl_Loop_Timer *obj);
+
+/**
+ * @brief Pending time regarding a timer.
+ *
+ * @param[in] obj The object.
+ *
+ * @return Pending time
+ *
+ * @ingroup Ecore_Timer_Group
+ */
+EAPI double ecore_timer_pending_get(const Efl_Loop_Timer *obj);
+
+/**
+ * @brief Resets a timer to its full interval. This effectively makes the timer
+ * start ticking off from zero now.
+ *
+ * This is equal to delaying the timer by the already passed time, since the
+ * timer started ticking
+ *
+ * @param[in] obj The object.
+ *
+ * @since 1.2
+ *
+ * @ingroup Ecore_Timer_Group
+ */
+EAPI void ecore_timer_reset(Efl_Loop_Timer *obj);
+
+/** This effectively resets a timer but based on the time when this iteration
+ * of the main loop started.
+ *
+ * @since 1.18
+ *
+ * @ingroup Ecore_Timer_Group
+ */
+EAPI void ecore_timer_loop_reset(Efl_Loop_Timer *obj);
+
+/**
+ * @brief Adds a delay to the next occurrence of a timer. This doesn't affect
+ * the timer interval.
+ *
+ * @param[in] obj The object.
+ * @param[in] add The amount of time by which to delay the timer in seconds
+ *
+ * @ingroup Ecore_Timer_Group
+ */
+EAPI void ecore_timer_delay(Efl_Loop_Timer *obj, double add);
+
+#endif
diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build
index 959a8bbef2..a40c45a5e3 100644
--- a/src/lib/ecore/meson.build
+++ b/src/lib/ecore/meson.build
@@ -4,7 +4,6 @@ ecore_pub_deps = [eina, eo, efl]
 pub_legacy_eo_files = [
   'ecore_event_message.eo',
   'ecore_event_message_handler.eo',
-  'efl_loop_timer.eo'
 ]
 
 pub_eo_file_target = []
@@ -20,16 +19,6 @@ foreach eo_file : pub_legacy_eo_files
                            '-o', 'c:' + join_paths(meson.current_build_dir(), 
eo_file + '.c'),
                            '-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.d'),
                            '-gchd', '@INPUT@'])
-  pub_eo_file_target += custom_target('eolian_gen_legacy_' + eo_file,
-    input : eo_file,
-    output : [eo_file + '.legacy.h'],
-    depfile : eo_file + '.legacy.d',
-    install : true,
-    install_dir : dir_package_include,
-    command : eolian_gen + [ '-I', meson.current_source_dir(), 
eolian_include_directories,
-                           '-o', 'l:' + join_paths(meson.current_build_dir(), 
eo_file + '.legacy.h'),
-                           '-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.legacy.d'),
-                           '-gld', '@INPUT@'])
 endforeach
 
 pub_eo_files = [
@@ -76,6 +65,7 @@ pub_eo_files = [
   'efl_core_env.eo',
   'efl_core_proc_env.eo',
   'efl_core_command_line.eo',
+  'efl_loop_timer.eo',
 ]
 
 foreach eo_file : pub_eo_files
@@ -92,9 +82,6 @@ foreach eo_file : pub_eo_files
                            '-gchd', '@INPUT@'])
 endforeach
 
-# special handling, because this is already eo API and legacy API
-pub_eo_files += ['efl_loop_timer.eo']
-
 pub_eo_types_files = []
 
 eolian_include_directories += ['-I', meson.current_source_dir()]
@@ -109,6 +96,7 @@ ecore_header_src = [
   'Ecore_Getopt.h',
   'ecore_exe_eo.h',
   'ecore_exe_eo.legacy.h',
+  'efl_loop_timer_eo.legacy.h',
 ]
 
 ecore_src = [

-- 


Reply via email to