efl_ui_frame: remove all legacy usage from eo files

this takes the current generated output from eolian for legacy code in
the componenty 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/D8139
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent 5ca4e42957
commit d90c60ea54
11 changed files with 202 additions and 20 deletions

View File

@ -188,7 +188,6 @@ elm_private_eolian_files = \
elm_legacy_eolian_files = \
lib/elementary/efl_ui_radio_legacy.eo \
lib/elementary/efl_ui_video_legacy.eo \
lib/elementary/efl_ui_frame_legacy.eo \
lib/elementary/efl_ui_panes_legacy.eo \
lib/elementary/efl_ui_image_zoomable_legacy.eo \
lib/elementary/efl_ui_win_legacy.eo \
@ -325,6 +324,7 @@ lib/elementary/efl_ui_bg_legacy_eo.c \
lib/elementary/efl_ui_button_legacy_eo.c \
lib/elementary/efl_ui_check_legacy_eo.c \
lib/elementary/efl_ui_flip_legacy_eo.c \
lib/elementary/efl_ui_frame_legacy_eo.c \
lib/elementary/elm_hoversel_eo.c \
lib/elementary/elm_hoversel_eo.legacy.c \
lib/elementary/elm_hoversel_item_eo.c \
@ -343,6 +343,9 @@ lib/elementary/efl_ui_check_legacy_eo.legacy.h \
lib/elementary/efl_ui_flip_eo.legacy.h \
lib/elementary/efl_ui_flip_legacy_eo.h \
lib/elementary/efl_ui_flip_legacy_eo.legacy.h \
lib/elementary/efl_ui_frame_eo.legacy.h \
lib/elementary/efl_ui_frame_legacy_eo.h \
lib/elementary/efl_ui_frame_legacy_eo.legacy.h \
lib/elementary/elm_hoversel_eo.h \
lib/elementary/elm_hoversel_eo.legacy.h \
lib/elementary/elm_hoversel_item_eo.h \

View File

@ -225,8 +225,9 @@ ELM_PART_CONTENT_DEFAULT_IMPLEMENT(efl_ui_frame, Efl_Ui_Frame_Data)
EFL_CANVAS_GROUP_ADD_OPS(efl_ui_frame)
#include "efl_ui_frame.eo.c"
#include "efl_ui_frame_eo.legacy.c"
#include "efl_ui_frame_legacy.eo.h"
#include "efl_ui_frame_legacy_eo.h"
#define MY_CLASS_NAME_LEGACY "elm_frame"
@ -251,4 +252,4 @@ elm_frame_add(Evas_Object *parent)
return elm_legacy_add(EFL_UI_FRAME_LEGACY_CLASS, parent);
}
#include "efl_ui_frame_legacy.eo.c"
#include "efl_ui_frame_legacy_eo.c"

View File

@ -7,7 +7,6 @@ class @beta Efl.Ui.Frame extends Efl.Ui.Layout_Base implements Efl.Ui.Clickable,
by clicking on the frame label.
the label and content can be set using text_set and content_set api.
]]
legacy_prefix: elm_frame;
methods {
@property collapse {
set {

View File

@ -0,0 +1,30 @@
EAPI void
elm_frame_collapse_set(Efl_Ui_Frame *obj, Eina_Bool collapse)
{
efl_ui_frame_collapse_set(obj, collapse);
}
EAPI Eina_Bool
elm_frame_collapse_get(const Efl_Ui_Frame *obj)
{
return efl_ui_frame_collapse_get(obj);
}
EAPI void
elm_frame_autocollapse_set(Efl_Ui_Frame *obj, Eina_Bool autocollapse)
{
efl_ui_frame_autocollapse_set(obj, autocollapse);
}
EAPI Eina_Bool
elm_frame_autocollapse_get(const Efl_Ui_Frame *obj)
{
return efl_ui_frame_autocollapse_get(obj);
}
EAPI void
elm_frame_collapse_go(Efl_Ui_Frame *obj, Eina_Bool collapse)
{
efl_ui_frame_collapse_go(obj, collapse);
}

View File

@ -0,0 +1,78 @@
#ifndef _EFL_UI_FRAME_EO_LEGACY_H_
#define _EFL_UI_FRAME_EO_LEGACY_H_
#ifndef _EFL_UI_FRAME_EO_CLASS_TYPE
#define _EFL_UI_FRAME_EO_CLASS_TYPE
typedef Eo Efl_Ui_Frame;
#endif
#ifndef _EFL_UI_FRAME_EO_TYPES
#define _EFL_UI_FRAME_EO_TYPES
#endif
/**
* @brief Manually collapse a frame without animations Use this to toggle the
* collapsed state of a frame, bypassing animations.
*
* @param[in] obj The object.
* @param[in] collapse @c true to collapse, @c false to expand.
*
* @ingroup Elm_Frame_Group
*/
EAPI void elm_frame_collapse_set(Efl_Ui_Frame *obj, Eina_Bool collapse);
/**
* @brief Determine the collapse state of a frame Use this to determine the
* collapse state of a frame.
*
* @param[in] obj The object.
*
* @return @c true to collapse, @c false to expand.
*
* @ingroup Elm_Frame_Group
*/
EAPI Eina_Bool elm_frame_collapse_get(const Efl_Ui_Frame *obj);
/**
* @brief Toggle autocollapsing of a frame When @c enable is @c true, clicking
* a frame's label will collapse the frame vertically, shrinking it to the
* height of the label. By default, this is DISABLED.
*
* @param[in] obj The object.
* @param[in] autocollapse Whether to enable autocollapse.
*
* @ingroup Elm_Frame_Group
*/
EAPI void elm_frame_autocollapse_set(Efl_Ui_Frame *obj, Eina_Bool autocollapse);
/**
* @brief Determine autocollapsing of a frame
*
* When this returns @c true, clicking a frame's label will collapse the frame
* vertically, shrinking it to the height of the label. By default, this is
* DISABLED.
*
* @param[in] obj The object.
*
* @return Whether to enable autocollapse.
*
* @ingroup Elm_Frame_Group
*/
EAPI Eina_Bool elm_frame_autocollapse_get(const Efl_Ui_Frame *obj);
/**
* @brief Manually collapse a frame with animations Use this to toggle the
* collapsed state of a frame, triggering animations.
*
* @param[in] obj The object.
* @param[in] collapse @c true to collapse, @c false to expand.
*
* @ingroup Elm_Frame_Group
*/
EAPI void elm_frame_collapse_go(Efl_Ui_Frame *obj, Eina_Bool collapse);
#endif

View File

@ -1,14 +0,0 @@
class @beta Efl.Ui.Frame_Legacy extends Efl.Ui.Frame implements Efl.Ui.Legacy
{
[[Frame widget
The Frame widget allows for collapsing and expanding the content widget
by clicking on the frame label.
the label and content can be set using text_set and content_set api.
]]
data: null;
implements {
Efl.Object.constructor;
class.constructor;
}
}

View File

@ -10,4 +10,4 @@ typedef Eo Elm_Frame;
*/
EAPI Evas_Object *elm_frame_add(Evas_Object *parent);
#include "efl_ui_frame.eo.legacy.h"
#include "efl_ui_frame_eo.legacy.h"

View File

@ -0,0 +1,35 @@
Efl_Object *_efl_ui_frame_legacy_efl_object_constructor(Eo *obj, void *pd);
static Eina_Bool
_efl_ui_frame_legacy_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef EFL_UI_FRAME_LEGACY_EXTRA_OPS
#define EFL_UI_FRAME_LEGACY_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(efl_constructor, _efl_ui_frame_legacy_efl_object_constructor),
EFL_UI_FRAME_LEGACY_EXTRA_OPS
);
opsp = &ops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _efl_ui_frame_legacy_class_desc = {
EO_VERSION,
"Efl.Ui.Frame_Legacy",
EFL_CLASS_TYPE_REGULAR,
0,
_efl_ui_frame_legacy_class_initializer,
_efl_ui_frame_legacy_class_constructor,
NULL
};
EFL_DEFINE_CLASS(efl_ui_frame_legacy_class_get, &_efl_ui_frame_legacy_class_desc, EFL_UI_FRAME_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);

View File

@ -0,0 +1,31 @@
#ifndef _EFL_UI_FRAME_LEGACY_EO_H_
#define _EFL_UI_FRAME_LEGACY_EO_H_
#ifndef _EFL_UI_FRAME_LEGACY_EO_CLASS_TYPE
#define _EFL_UI_FRAME_LEGACY_EO_CLASS_TYPE
typedef Eo Efl_Ui_Frame_Legacy;
#endif
#ifndef _EFL_UI_FRAME_LEGACY_EO_TYPES
#define _EFL_UI_FRAME_LEGACY_EO_TYPES
#endif
#ifdef EFL_BETA_API_SUPPORT
/**
* @brief Frame widget
*
* The Frame widget allows for collapsing and expanding the content widget by
* clicking on the frame label. the label and content can be set using text_set
* and content_set api.
*
* @ingroup Efl_Ui_Frame_Legacy
*/
#define EFL_UI_FRAME_LEGACY_CLASS efl_ui_frame_legacy_class_get()
EWAPI const Efl_Class *efl_ui_frame_legacy_class_get(void);
#endif /* EFL_BETA_API_SUPPORT */
#endif

View File

@ -0,0 +1,17 @@
#ifndef _EFL_UI_FRAME_LEGACY_EO_LEGACY_H_
#define _EFL_UI_FRAME_LEGACY_EO_LEGACY_H_
#ifndef _EFL_UI_FRAME_LEGACY_EO_CLASS_TYPE
#define _EFL_UI_FRAME_LEGACY_EO_CLASS_TYPE
typedef Eo Efl_Ui_Frame_Legacy;
#endif
#ifndef _EFL_UI_FRAME_LEGACY_EO_TYPES
#define _EFL_UI_FRAME_LEGACY_EO_TYPES
#endif
#endif

View File

@ -1,7 +1,6 @@
pub_legacy_eo_files = [
'efl_ui_radio_legacy.eo',
'efl_ui_video_legacy.eo',
'efl_ui_frame_legacy.eo',
'efl_ui_panes_legacy.eo',
'efl_ui_image_zoomable_legacy.eo',
'efl_ui_win_legacy.eo',
@ -703,6 +702,9 @@ elementary_pub_headers = [
'efl_ui_flip_eo.legacy.h',
'efl_ui_flip_legacy_eo.h',
'efl_ui_flip_legacy_eo.legacy.h',
'efl_ui_frame_eo.legacy.h',
'efl_ui_frame_legacy_eo.h',
'efl_ui_frame_legacy_eo.legacy.h',
'elm_hoversel_eo.h',
'elm_hoversel_eo.legacy.h',
'elm_hoversel_item_eo.h',