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.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8126
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent 1cab2e5fde
commit 0f9078070d
7 changed files with 128 additions and 22 deletions

View File

@ -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)

View File

@ -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"
/**
* @}

View File

@ -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"

View File

@ -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.]]

View File

@ -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);
}

View File

@ -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

View File

@ -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 = [