edje_edit: 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/D8130
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent 1b8487bc99
commit 87614044cd
9 changed files with 97 additions and 31 deletions

View File

@ -11,8 +11,7 @@ edje_eolian_files = \
lib/edje/efl_canvas_layout_part_external.eo \
lib/edje/efl_canvas_layout_part_swallow.eo \
lib/edje/efl_canvas_layout_part_table.eo \
lib/edje/efl_canvas_layout_part_text.eo \
lib/edje/edje_edit.eo
lib/edje/efl_canvas_layout_part_text.eo
edje_eolian_type_files = \
lib/edje/edje_types.eot
@ -67,10 +66,13 @@ lib/edje/Edje_Common.h \
lib/edje/Edje_Eo.h \
lib/edje/Edje_Legacy.h \
lib/edje/Edje_Edit.h \
lib/edje/edje_edit_eo.h \
lib/edje/edje_edit_eo.legacy.h \
lib/edje/efl_canvas_layout_eo.legacy.h \
lib/edje/efl_layout_group_eo.legacy.h
EXTRA_DIST2 += \
lib/edje/edje_edit_eo.c \
lib/edje/efl_canvas_layout_eo.legacy.c \
lib/edje/efl_layout_group_eo.legacy.c

View File

@ -4,7 +4,7 @@
#include "efl_layout_signal.eo.h"
#include "efl_layout_group.eo.h"
#include "efl_canvas_layout.eo.h"
#include "edje_edit.eo.h"
#include "edje_edit_eo.h"
#include "efl_canvas_layout_part.eo.h"
#include "efl_canvas_layout_part_box.eo.h"

View File

@ -3175,5 +3175,5 @@ typedef Efl_Canvas_Layout_Part_Type Edje_Part_Type;
* @}
*/
#include "efl_canvas_layout_eo.legacy.h"
#include "edje_edit.eo.legacy.h"
#include "edje_edit_eo.legacy.h"
#include "efl_layout_group_eo.legacy.h"

View File

@ -16751,4 +16751,4 @@ edje_edit_print_internal_status(Evas_Object *obj)
#define EDJE_EDIT_EXTRA_OPS \
EFL_CANVAS_GROUP_DEL_OPS(edje_edit)
#include "edje_edit.eo.c"
#include "edje_edit_eo.c"

View File

@ -1,15 +0,0 @@
class Edje.Edit extends Efl.Canvas.Layout
{
[[Edje editing class to access edje object internals.
This was intended ONLY for use in an actual edje editor program. Unless
you are writing one of these, do NOT use this API here.
]]
legacy_prefix: edje_edit;
data: Edje_Edit;
implements {
Efl.Object.constructor;
Efl.Object.destructor;
Efl.File.load;
}
}

View File

@ -0,0 +1,43 @@
Efl_Object *_edje_edit_efl_object_constructor(Eo *obj, Edje_Edit *pd);
void _edje_edit_efl_object_destructor(Eo *obj, Edje_Edit *pd);
Eina_Error _edje_edit_efl_file_load(Eo *obj, Edje_Edit *pd);
static Eina_Bool
_edje_edit_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef EDJE_EDIT_EXTRA_OPS
#define EDJE_EDIT_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(efl_constructor, _edje_edit_efl_object_constructor),
EFL_OBJECT_OP_FUNC(efl_destructor, _edje_edit_efl_object_destructor),
EFL_OBJECT_OP_FUNC(efl_file_load, _edje_edit_efl_file_load),
EDJE_EDIT_EXTRA_OPS
);
opsp = &ops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _edje_edit_class_desc = {
EO_VERSION,
"Edje.Edit",
EFL_CLASS_TYPE_REGULAR,
sizeof(Edje_Edit),
_edje_edit_class_initializer,
NULL,
NULL
};
EFL_DEFINE_CLASS(edje_edit_class_get, &_edje_edit_class_desc, EFL_CANVAS_LAYOUT_CLASS, NULL);

View File

@ -0,0 +1,28 @@
#ifndef _EDJE_EDIT_EO_H_
#define _EDJE_EDIT_EO_H_
#ifndef _EDJE_EDIT_EO_CLASS_TYPE
#define _EDJE_EDIT_EO_CLASS_TYPE
typedef Eo Edje_Edit;
#endif
#ifndef _EDJE_EDIT_EO_TYPES
#define _EDJE_EDIT_EO_TYPES
#endif
/**
* @brief Edje editing class to access edje object internals.
*
* This was intended ONLY for use in an actual edje editor program. Unless you
* are writing one of these, do NOT use this API here.
*
* @ingroup Edje_Edit
*/
#define EDJE_EDIT_CLASS edje_edit_class_get()
EWAPI const Efl_Class *edje_edit_class_get(void);
#endif

View File

@ -0,0 +1,17 @@
#ifndef _EDJE_EDIT_EO_LEGACY_H_
#define _EDJE_EDIT_EO_LEGACY_H_
#ifndef _EDJE_EDIT_EO_CLASS_TYPE
#define _EDJE_EDIT_EO_CLASS_TYPE
typedef Eo Edje_Edit;
#endif
#ifndef _EDJE_EDIT_EO_TYPES
#define _EDJE_EDIT_EO_TYPES
#endif
#endif

View File

@ -21,7 +21,6 @@ if get_option('edje-sound-and-video')
endif
pub_legacy_eo_files = [
'edje_edit.eo',
'efl_layout_calc.eo',
'efl_layout_signal.eo',
'efl_layout_group.eo',
@ -50,16 +49,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_types_files = [
@ -105,6 +94,8 @@ edje_header_src = [
'Edje_Eo.h',
'Edje_Legacy.h',
'Edje_Edit.h',
'edje_edit_eo.h',
'edje_edit_eo.legacy.h',
'efl_layout_group_eo.legacy.h',
'efl_canvas_layout_eo.legacy.h',
]