efl_ui_flip: 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/D8138
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent 94eda41031
commit 5ca4e42957
12 changed files with 318 additions and 29 deletions

View File

@ -191,7 +191,6 @@ elm_legacy_eolian_files = \
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_flip_legacy.eo \
lib/elementary/efl_ui_win_legacy.eo \
lib/elementary/efl_ui_image_legacy.eo \
lib/elementary/efl_ui_progressbar_legacy.eo \
@ -325,6 +324,7 @@ elm_legacy_eo_files = \
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/elm_hoversel_eo.c \
lib/elementary/elm_hoversel_eo.legacy.c \
lib/elementary/elm_hoversel_item_eo.c \
@ -340,6 +340,9 @@ lib/elementary/efl_ui_button_legacy_eo.legacy.h \
lib/elementary/efl_ui_check_eo.legacy.h \
lib/elementary/efl_ui_check_legacy_eo.h \
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/elm_hoversel_eo.h \
lib/elementary/elm_hoversel_eo.legacy.h \
lib/elementary/elm_hoversel_item_eo.h \

View File

@ -307,7 +307,7 @@ _flip_click(void *data, const Efl_Event *ev EINA_UNUSED)
Eo *flip = efl_key_wref_get(win, "flip");
/* FIXME: The flip APIs don't make sense for N items (front!?) */
efl_ui_flip_go(flip, EFL_UI_FLIP_CROSS_FADE);
efl_ui_flip_go(flip, EFL_UI_FLIP_MODE_CROSS_FADE);
}
static void

View File

@ -2350,7 +2350,7 @@ ELM_PART_CONTENT_DEFAULT_GET(efl_ui_flip, "front")
#include "efl_ui_flip.eo.c"
#include "efl_ui_flip_legacy.eo.h"
#include "efl_ui_flip_legacy_eo.h"
#define MY_CLASS_NAME_LEGACY "elm_flip"
@ -2375,4 +2375,4 @@ elm_flip_add(Evas_Object *parent)
return elm_legacy_add(EFL_UI_FLIP_LEGACY_CLASS, parent);
}
#include "efl_ui_flip_legacy.eo.c"
#include "efl_ui_flip_legacy_eo.c"

View File

@ -3,7 +3,6 @@ import efl_ui_direction;
enum Efl.Ui.Flip_Mode
{
[[Efl UI flip mode ]]
legacy: efl_ui_flip;
rotate_y_center_axis, [[Rotate Y center axis flip mode]]
rotate_x_center_axis, [[Rotate X center axis flip mode]]
rotate_xz_center_axis, [[Rotate XZ center axis flip mode]]

View File

@ -0,0 +1,30 @@
EAPI void
elm_flip_interaction_set(Efl_Ui_Flip *obj, Efl_Ui_Flip_Interaction mode)
{
efl_ui_flip_interaction_set(obj, mode);
}
EAPI Efl_Ui_Flip_Interaction
elm_flip_interaction_get(const Efl_Ui_Flip *obj)
{
return efl_ui_flip_interaction_get(obj);
}
EAPI Eina_Bool
elm_flip_front_visible_get(const Efl_Ui_Flip *obj)
{
return efl_ui_flip_front_visible_get(obj);
}
EAPI void
elm_flip_go(Efl_Ui_Flip *obj, Efl_Ui_Flip_Mode mode)
{
efl_ui_flip_go(obj, mode);
}
EAPI void
elm_flip_go_to(Efl_Ui_Flip *obj, Eina_Bool front, Efl_Ui_Flip_Mode mode)
{
efl_ui_flip_go_to(obj, front, mode);
}

View File

@ -0,0 +1,186 @@
#ifndef _EFL_UI_FLIP_EO_LEGACY_H_
#define _EFL_UI_FLIP_EO_LEGACY_H_
#ifndef _EFL_UI_FLIP_EO_CLASS_TYPE
#define _EFL_UI_FLIP_EO_CLASS_TYPE
typedef Eo Efl_Ui_Flip;
#endif
#ifndef _EFL_UI_FLIP_EO_TYPES
#define _EFL_UI_FLIP_EO_TYPES
/** Efl UI flip mode
*
* @ingroup Efl_Ui
*/
typedef enum
{
EFL_UI_FLIP_ROTATE_Y_CENTER_AXIS = 0, /**< Rotate Y center axis flip mode */
EFL_UI_FLIP_ROTATE_X_CENTER_AXIS, /**< Rotate X center axis flip mode */
EFL_UI_FLIP_ROTATE_XZ_CENTER_AXIS, /**< Rotate XZ center axis flip mode */
EFL_UI_FLIP_ROTATE_YZ_CENTER_AXIS, /**< Rotate YZ center axis flip mode */
EFL_UI_FLIP_CUBE_LEFT, /**< Cube left flip mode */
EFL_UI_FLIP_CUBE_RIGHT, /**< Cube right flip mode */
EFL_UI_FLIP_CUBE_UP, /**< Cube up flip mode */
EFL_UI_FLIP_CUBE_DOWN, /**< Cube down flip mode */
EFL_UI_FLIP_PAGE_LEFT, /**< Page left flip mode */
EFL_UI_FLIP_PAGE_RIGHT, /**< Page right flip mode */
EFL_UI_FLIP_PAGE_UP, /**< Page up flip mode */
EFL_UI_FLIP_PAGE_DOWN, /**< Page down flip mode */
EFL_UI_FLIP_CROSS_FADE /**< Cross fade flip mode */
} Efl_Ui_Flip_Mode;
/** Efl UI flip interaction
*
* @ingroup Efl_Ui
*/
typedef enum
{
EFL_UI_FLIP_INTERACTION_NONE = 0, /**< No interaction */
EFL_UI_FLIP_INTERACTION_ROTATE, /**< Rotate interaction */
EFL_UI_FLIP_INTERACTION_CUBE, /**< Cube interaction */
EFL_UI_FLIP_INTERACTION_PAGE /**< Page interaction */
} Efl_Ui_Flip_Interaction;
#endif
/**
* @brief Set the interactive flip mode.
*
* This sets if the flip should be interactive (allow user to click and drag a
* side of the flip to reveal the back page and cause it to flip). By default a
* flip is not interactive. You may also need to set which sides of the flip
* are "active" for flipping and how much space they use (a minimum of a finger
* size) with @ref Efl.Ui.Flip.interaction_direction_enabled_set and
* @ref Efl.Ui.Flip.interaction_direction_hitsize_set.
*
* The four available mode of interaction are #ELM_FLIP_INTERACTION_NONE,
* #ELM_FLIP_INTERACTION_ROTATE, #ELM_FLIP_INTERACTION_CUBE and
* #ELM_FLIP_INTERACTION_PAGE.
*
* @note #ELM_FLIP_INTERACTION_ROTATE won't cause
* #ELM_FLIP_ROTATE_XZ_CENTER_AXIS or #ELM_FLIP_ROTATE_YZ_CENTER_AXIS to
* happen, those can only be achieved with @ref elm_flip_go.
*
* @param[in] obj The object.
* @param[in] mode The interactive flip mode to use.
*
* @ingroup Elm_Flip_Group
*/
EAPI void elm_flip_interaction_set(Efl_Ui_Flip *obj, Efl_Ui_Flip_Interaction mode);
/**
* @brief Get the interactive flip mode.
*
* @param[in] obj The object.
*
* @return The interactive flip mode to use.
*
* @ingroup Elm_Flip_Group
*/
EAPI Efl_Ui_Flip_Interaction elm_flip_interaction_get(const Efl_Ui_Flip *obj);
/**
* @brief Get flip front visibility state.
*
* @param[in] obj The object.
*
* @return @c true if front front is showing, @c false if the back is showing.
*
* @ingroup Elm_Flip_Group
*/
EAPI Eina_Bool elm_flip_front_visible_get(const Efl_Ui_Flip *obj);
/**
* @brief Runs the flip animation.
*
* Flips the front and back contents using the @c mode animation. This
* effectively hides the currently visible content and shows the hidden one.
*
* There a number of possible animations to use for flipping, namely
* #ELM_FLIP_ROTATE_X_CENTER_AXIS (rotate the currently visible content around
* a horizontal axis in the middle of its height, the other content is shown as
* the other side of the flip), #ELM_FLIP_ROTATE_Y_CENTER_AXIS (rotate the
* currently visible content around a vertical axis in the middle of its width,
* the other content is shown as the other side of the flip),
* #ELM_FLIP_ROTATE_XZ_CENTER_AXIS (rotate the currently visible content around
* a diagonal axis in the middle of its width, the other content is shown as
* the other side of the flip), #ELM_FLIP_ROTATE_YZ_CENTER_AXIS (rotate the
* currently visible content around a diagonal axis in the middle of its
* height, the other content is shown as the other side of the flip).
* #ELM_FLIP_CUBE_LEFT (rotate the currently visible content to the left as if
* the flip was a cube, the other content is shown as the right face of the
* cube), #ELM_FLIP_CUBE_RIGHT (rotate the currently visible content to the
* right as if the flip was a cube, the other content is shown as the left face
* of the cube), #ELM_FLIP_CUBE_UP (rotate the currently visible content up as
* if the flip was a cube, the other content is shown as the bottom face of the
* cube), #ELM_FLIP_CUBE_DOWN (rotate the currently visible content down as if
* the flip was a cube, the other content is shown as the upper face of the
* cube), #ELM_FLIP_PAGE_LEFT (move the currently visible content to the left
* as if the flip was a book, the other content is shown as the page below
* that), #ELM_FLIP_PAGE_RIGHT (move the currently visible content to the right
* as if the flip was a book, the other content is shown as the page below it),
* #ELM_FLIP_PAGE_UP (move the currently visible content up as if the flip was
* a book, the other content is shown as the page below it),
* #ELM_FLIP_PAGE_DOWN (move the currently visible content down as if the flip
* was a book, the other content is shown as the page below that) and
* #ELM_FLIP_CROSS_FADE (fade out the currently visible content, while fading
* in the invisible content).
*
* @param[in] obj The object.
* @param[in] mode The mode type.
*
* @ingroup Elm_Flip_Group
*/
EAPI void elm_flip_go(Efl_Ui_Flip *obj, Efl_Ui_Flip_Mode mode);
/**
* @brief Runs the flip animation to front or back.
*
* Flips the front and back contents using the @c mode animation. This
* effectively hides the currently visible content and shows he hidden one.
*
* There a number of possible animations to use for flipping, namely
* #ELM_FLIP_ROTATE_X_CENTER_AXIS (rotate the currently visible content around
* a horizontal axis in the middle of its height, the other content is shown as
* the other side of the flip), #ELM_FLIP_ROTATE_Y_CENTER_AXIS (rotate the
* currently visible content around a vertical axis in the middle of its width,
* the other content is shown as the other side of the flip),
* #ELM_FLIP_ROTATE_XZ_CENTER_AXIS (rotate the currently visible content around
* a diagonal axis in the middle of its width, the other content is shown as
* the other side of the flip), #ELM_FLIP_ROTATE_YZ_CENTER_AXIS (rotate the
* currently visible content around a diagonal axis in the middle of its
* height, the other content is shown as the other side of the flip).
* #ELM_FLIP_CUBE_LEFT (rotate the currently visible content to the left as if
* the flip was a cube, the other content is show as the right face of the
* cube), #ELM_FLIP_CUBE_RIGHT (rotate the currently visible content to the
* right as if the flip was a cube, the other content is show as the left face
* of the cube), #ELM_FLIP_CUBE_UP (rotate the currently visible content up as
* if the flip was a cube, the other content is shown as the bottom face of the
* cube), #ELM_FLIP_CUBE_DOWN (rotate the currently visible content down as if
* the flip was a cube, the other content is shown as the upper face of the
* cube), #ELM_FLIP_PAGE_LEFT (move the currently visible content to the left
* as if the flip was a book, the other content is shown as the page below
* that), #ELM_FLIP_PAGE_RIGHT (move the currently visible content to the right
* as if the flip was a book, the other content is shown as the page below it),
* #ELM_FLIP_PAGE_UP (move the currently visible content up as if the flip was
* a book, the other content is shown as the page below it) and
* #ELM_FLIP_PAGE_DOWN (move the currently visible content down as if the flip
* was a book, the other content is shown as the page below that).
*
* @param[in] obj The object.
* @param[in] front If @c true, makes front visible, otherwise makes back.
* @param[in] mode The mode type.
*
* @ingroup Elm_Flip_Group
*/
EAPI void elm_flip_go_to(Efl_Ui_Flip *obj, Eina_Bool front, Efl_Ui_Flip_Mode mode);
#endif

View File

@ -1,9 +0,0 @@
class @beta Efl.Ui.Flip_Legacy extends Efl.Ui.Flip implements Efl.Ui.Legacy
{
[[Efl UI flip class]]
data: null;
implements {
class.constructor;
Efl.Object.constructor;
}
}

View File

@ -1,4 +1,4 @@
#include "efl_ui_flip.eo.legacy.h"
#include "efl_ui_flip_eo.legacy.h"
typedef Eo Elm_Flip;
@ -12,19 +12,19 @@ typedef Efl_Ui_Flip_Interaction Elm_Flip_Interaction;
typedef Efl_Ui_Flip_Mode Elm_Flip_Mode;
#define ELM_FLIP_ROTATE_Y_CENTER_AXIS EFL_UI_FLIP_ROTATE_Y_CENTER_AXIS
#define ELM_FLIP_ROTATE_X_CENTER_AXIS EFL_UI_FLIP_ROTATE_X_CENTER_AXIS
#define ELM_FLIP_ROTATE_XZ_CENTER_AXIS EFL_UI_FLIP_ROTATE_XZ_CENTER_AXIS
#define ELM_FLIP_ROTATE_YZ_CENTER_AXIS EFL_UI_FLIP_ROTATE_YZ_CENTER_AXIS
#define ELM_FLIP_CUBE_LEFT EFL_UI_FLIP_CUBE_LEFT
#define ELM_FLIP_CUBE_RIGHT EFL_UI_FLIP_CUBE_RIGHT
#define ELM_FLIP_CUBE_UP EFL_UI_FLIP_CUBE_UP
#define ELM_FLIP_CUBE_DOWN EFL_UI_FLIP_CUBE_DOWN
#define ELM_FLIP_PAGE_LEFT EFL_UI_FLIP_PAGE_LEFT
#define ELM_FLIP_PAGE_RIGHT EFL_UI_FLIP_PAGE_RIGHT
#define ELM_FLIP_PAGE_UP EFL_UI_FLIP_PAGE_UP
#define ELM_FLIP_PAGE_DOWN EFL_UI_FLIP_PAGE_DOWN
#define ELM_FLIP_CROSS_FADE EFL_UI_FLIP_CROSS_FADE
#define ELM_FLIP_ROTATE_Y_CENTER_AXIS EFL_UI_FLIP_MODE_ROTATE_Y_CENTER_AXIS
#define ELM_FLIP_ROTATE_X_CENTER_AXIS EFL_UI_FLIP_MODE_ROTATE_X_CENTER_AXIS
#define ELM_FLIP_ROTATE_XZ_CENTER_AXIS EFL_UI_FLIP_MODE_ROTATE_XZ_CENTER_AXIS
#define ELM_FLIP_ROTATE_YZ_CENTER_AXIS EFL_UI_FLIP_MODE_ROTATE_YZ_CENTER_AXIS
#define ELM_FLIP_CUBE_LEFT EFL_UI_FLIP_MODE_CUBE_LEFT
#define ELM_FLIP_CUBE_RIGHT EFL_UI_FLIP_MODE_CUBE_RIGHT
#define ELM_FLIP_CUBE_UP EFL_UI_FLIP_MODE_CUBE_UP
#define ELM_FLIP_CUBE_DOWN EFL_UI_FLIP_MODE_CUBE_DOWN
#define ELM_FLIP_PAGE_LEFT EFL_UI_FLIP_MODE_PAGE_LEFT
#define ELM_FLIP_PAGE_RIGHT EFL_UI_FLIP_MODE_PAGE_RIGHT
#define ELM_FLIP_PAGE_UP EFL_UI_FLIP_MODE_PAGE_UP
#define ELM_FLIP_PAGE_DOWN EFL_UI_FLIP_MODE_PAGE_DOWN
#define ELM_FLIP_CROSS_FADE EFL_UI_FLIP_MODE_CROSS_FADE
typedef enum
{

View File

@ -0,0 +1,35 @@
Efl_Object *_efl_ui_flip_legacy_efl_object_constructor(Eo *obj, void *pd);
static Eina_Bool
_efl_ui_flip_legacy_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef EFL_UI_FLIP_LEGACY_EXTRA_OPS
#define EFL_UI_FLIP_LEGACY_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(efl_constructor, _efl_ui_flip_legacy_efl_object_constructor),
EFL_UI_FLIP_LEGACY_EXTRA_OPS
);
opsp = &ops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _efl_ui_flip_legacy_class_desc = {
EO_VERSION,
"Efl.Ui.Flip_Legacy",
EFL_CLASS_TYPE_REGULAR,
0,
_efl_ui_flip_legacy_class_initializer,
_efl_ui_flip_legacy_class_constructor,
NULL
};
EFL_DEFINE_CLASS(efl_ui_flip_legacy_class_get, &_efl_ui_flip_legacy_class_desc, EFL_UI_FLIP_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);

View File

@ -0,0 +1,26 @@
#ifndef _EFL_UI_FLIP_LEGACY_EO_H_
#define _EFL_UI_FLIP_LEGACY_EO_H_
#ifndef _EFL_UI_FLIP_LEGACY_EO_CLASS_TYPE
#define _EFL_UI_FLIP_LEGACY_EO_CLASS_TYPE
typedef Eo Efl_Ui_Flip_Legacy;
#endif
#ifndef _EFL_UI_FLIP_LEGACY_EO_TYPES
#define _EFL_UI_FLIP_LEGACY_EO_TYPES
#endif
#ifdef EFL_BETA_API_SUPPORT
/** Efl UI flip class
*
* @ingroup Efl_Ui_Flip_Legacy
*/
#define EFL_UI_FLIP_LEGACY_CLASS efl_ui_flip_legacy_class_get()
EWAPI const Efl_Class *efl_ui_flip_legacy_class_get(void);
#endif /* EFL_BETA_API_SUPPORT */
#endif

View File

@ -0,0 +1,17 @@
#ifndef _EFL_UI_FLIP_LEGACY_EO_LEGACY_H_
#define _EFL_UI_FLIP_LEGACY_EO_LEGACY_H_
#ifndef _EFL_UI_FLIP_LEGACY_EO_CLASS_TYPE
#define _EFL_UI_FLIP_LEGACY_EO_CLASS_TYPE
typedef Eo Efl_Ui_Flip_Legacy;
#endif
#ifndef _EFL_UI_FLIP_LEGACY_EO_TYPES
#define _EFL_UI_FLIP_LEGACY_EO_TYPES
#endif
#endif

View File

@ -4,7 +4,6 @@ pub_legacy_eo_files = [
'efl_ui_frame_legacy.eo',
'efl_ui_panes_legacy.eo',
'efl_ui_image_zoomable_legacy.eo',
'efl_ui_flip_legacy.eo',
'efl_ui_win_legacy.eo',
'efl_ui_image_legacy.eo',
'efl_ui_progressbar_legacy.eo',
@ -701,6 +700,9 @@ elementary_pub_headers = [
'efl_ui_check_eo.legacy.h',
'efl_ui_check_legacy_eo.h',
'efl_ui_check_legacy_eo.legacy.h',
'efl_ui_flip_eo.legacy.h',
'efl_ui_flip_legacy_eo.h',
'efl_ui_flip_legacy_eo.legacy.h',
'elm_hoversel_eo.h',
'elm_hoversel_eo.legacy.h',
'elm_hoversel_item_eo.h',