elm_photo: remove all legacy usage from eo files

this takes the current generated output from eolian for legacy code in
efl 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/D8190
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent feba0d905c
commit f536d1030e
8 changed files with 128 additions and 23 deletions

View File

@ -211,7 +211,6 @@ elm_legacy_eolian_files = \
lib/elementary/elm_actionslider_part.eo \
lib/elementary/elm_bubble_part.eo \
lib/elementary/elm_fileselector_part.eo \
lib/elementary/elm_photo.eo \
lib/elementary/elm_prefs.eo \
lib/elementary/elm_segment_control.eo \
lib/elementary/elm_segment_control_item.eo \
@ -377,6 +376,7 @@ lib/elementary/elm_panel_eo.c \
lib/elementary/elm_panel_eo.legacy.c \
lib/elementary/elm_pan_eo.c \
lib/elementary/elm_pan_eo.legacy.c \
lib/elementary/elm_photo_eo.c \
$(NULL)
elm_legacy_eo_headers = \
@ -536,6 +536,8 @@ lib/elementary/elm_panel_eo.h \
lib/elementary/elm_panel_eo.legacy.h \
lib/elementary/elm_pan_eo.h \
lib/elementary/elm_pan_eo.legacy.h \
lib/elementary/elm_photo_eo.h \
lib/elementary/elm_photo_eo.legacy.h \
$(NULL)

View File

@ -8,7 +8,7 @@
#include "elm_priv.h"
#include "elm_widget_photo.h"
#include "elm_photo.eo.h"
#include "elm_photo_eo.h"
#include "elm_icon_eo.h"
#define MY_CLASS ELM_PHOTO_CLASS
@ -493,4 +493,4 @@ elm_photo_thumb_set(Evas_Object *obj, const char *file, const char *group)
#define ELM_PHOTO_EXTRA_OPS \
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_photo)
#include "elm_photo.eo.c"
#include "elm_photo_eo.c"

View File

@ -1,18 +0,0 @@
class Elm.Photo extends Efl.Ui.Widget implements Efl.File, Efl.Ui.Clickable, Efl.Ui.Draggable,
Efl.Ui.Legacy
{
[[Elementary photo class]]
legacy_prefix: elm_photo;
eo_prefix: elm_obj_photo;
implements {
class.constructor;
Efl.Object.constructor;
Efl.Object.finalize;
Efl.File.file { get; set; }
Efl.File.key { get; set; }
Efl.File.mmap { get; set; }
Efl.File.load;
Efl.Ui.Widget.theme_apply;
Efl.Ui.Draggable.drag_target { get; set; }
}
}

View File

@ -0,0 +1,79 @@
Efl_Object *_elm_photo_efl_object_constructor(Eo *obj, Elm_Photo_Data *pd);
Efl_Object *_elm_photo_efl_object_finalize(Eo *obj, Elm_Photo_Data *pd);
Eina_Error _elm_photo_efl_file_file_set(Eo *obj, Elm_Photo_Data *pd, const char *file);
const char *_elm_photo_efl_file_file_get(const Eo *obj, Elm_Photo_Data *pd);
void _elm_photo_efl_file_key_set(Eo *obj, Elm_Photo_Data *pd, const char *key);
const char *_elm_photo_efl_file_key_get(const Eo *obj, Elm_Photo_Data *pd);
Eina_Error _elm_photo_efl_file_mmap_set(Eo *obj, Elm_Photo_Data *pd, const Eina_File *f);
const Eina_File *_elm_photo_efl_file_mmap_get(const Eo *obj, Elm_Photo_Data *pd);
Eina_Error _elm_photo_efl_file_load(Eo *obj, Elm_Photo_Data *pd);
Eina_Error _elm_photo_efl_ui_widget_theme_apply(Eo *obj, Elm_Photo_Data *pd);
void _elm_photo_efl_ui_draggable_drag_target_set(Eo *obj, Elm_Photo_Data *pd, Eina_Bool set);
Eina_Bool _elm_photo_efl_ui_draggable_drag_target_get(const Eo *obj, Elm_Photo_Data *pd);
static Eina_Bool
_elm_photo_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_PHOTO_EXTRA_OPS
#define ELM_PHOTO_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_photo_efl_object_constructor),
EFL_OBJECT_OP_FUNC(efl_finalize, _elm_photo_efl_object_finalize),
EFL_OBJECT_OP_FUNC(efl_file_set, _elm_photo_efl_file_file_set),
EFL_OBJECT_OP_FUNC(efl_file_get, _elm_photo_efl_file_file_get),
EFL_OBJECT_OP_FUNC(efl_file_key_set, _elm_photo_efl_file_key_set),
EFL_OBJECT_OP_FUNC(efl_file_key_get, _elm_photo_efl_file_key_get),
EFL_OBJECT_OP_FUNC(efl_file_mmap_set, _elm_photo_efl_file_mmap_set),
EFL_OBJECT_OP_FUNC(efl_file_mmap_get, _elm_photo_efl_file_mmap_get),
EFL_OBJECT_OP_FUNC(efl_file_load, _elm_photo_efl_file_load),
EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_photo_efl_ui_widget_theme_apply),
EFL_OBJECT_OP_FUNC(efl_ui_draggable_drag_target_set, _elm_photo_efl_ui_draggable_drag_target_set),
EFL_OBJECT_OP_FUNC(efl_ui_draggable_drag_target_get, _elm_photo_efl_ui_draggable_drag_target_get),
ELM_PHOTO_EXTRA_OPS
);
opsp = &ops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _elm_photo_class_desc = {
EO_VERSION,
"Elm.Photo",
EFL_CLASS_TYPE_REGULAR,
sizeof(Elm_Photo_Data),
_elm_photo_class_initializer,
_elm_photo_class_constructor,
NULL
};
EFL_DEFINE_CLASS(elm_photo_class_get, &_elm_photo_class_desc, EFL_UI_WIDGET_CLASS, EFL_FILE_MIXIN, EFL_UI_CLICKABLE_INTERFACE, EFL_UI_DRAGGABLE_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL);

View File

@ -0,0 +1,24 @@
#ifndef _ELM_PHOTO_EO_H_
#define _ELM_PHOTO_EO_H_
#ifndef _ELM_PHOTO_EO_CLASS_TYPE
#define _ELM_PHOTO_EO_CLASS_TYPE
typedef Eo Elm_Photo;
#endif
#ifndef _ELM_PHOTO_EO_TYPES
#define _ELM_PHOTO_EO_TYPES
#endif
/** Elementary photo class
*
* @ingroup Elm_Photo
*/
#define ELM_PHOTO_CLASS elm_photo_class_get()
EWAPI const Efl_Class *elm_photo_class_get(void);
#endif

View File

@ -0,0 +1,17 @@
#ifndef _ELM_PHOTO_EO_LEGACY_H_
#define _ELM_PHOTO_EO_LEGACY_H_
#ifndef _ELM_PHOTO_EO_CLASS_TYPE
#define _ELM_PHOTO_EO_CLASS_TYPE
typedef Eo Elm_Photo;
#endif
#ifndef _ELM_PHOTO_EO_TYPES
#define _ELM_PHOTO_EO_TYPES
#endif
#endif

View File

@ -116,4 +116,4 @@ EAPI int elm_photo_size_get(const Evas_Object *obj);
*/
EAPI void elm_photo_thumb_set(Evas_Object *obj, const char *file, const char *group);
#include "elm_photo.eo.legacy.h"
#include "elm_photo_eo.legacy.h"

View File

@ -28,7 +28,6 @@ pub_legacy_eo_files = [
'elm_actionslider_part.eo',
'elm_bubble_part.eo',
'elm_fileselector_part.eo',
'elm_photo.eo',
'elm_prefs.eo',
'elm_segment_control.eo',
'elm_segment_control_item.eo',
@ -780,6 +779,8 @@ elementary_pub_headers = [
'elm_panel_eo.legacy.h',
'elm_pan_eo.h',
'elm_pan_eo.legacy.h',
'elm_photo_eo.h',
'elm_photo_eo.legacy.h',
]
elementary_header_src = [