elm_grid: 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/D8174
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent 3a1c4229f4
commit 641de5be24
9 changed files with 305 additions and 68 deletions

View File

@ -227,7 +227,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_grid.eo \
lib/elementary/elm_icon.eo \
lib/elementary/elm_inwin.eo \
lib/elementary/elm_mapbuf.eo \
@ -355,6 +354,8 @@ lib/elementary/elm_gesture_layer_eo.legacy.c \
lib/elementary/elm_gesture_layer_eo.c \
lib/elementary/elm_glview_eo.legacy.c \
lib/elementary/elm_glview_eo.c \
lib/elementary/elm_grid_eo.legacy.c \
lib/elementary/elm_grid_eo.c \
lib/elementary/elm_hoversel_eo.c \
lib/elementary/elm_hoversel_item_eo.c \
lib/elementary/elm_hoversel_item_eo.legacy.c
@ -468,6 +469,8 @@ lib/elementary/elm_gesture_layer_eo.h \
lib/elementary/elm_gesture_layer_eo.legacy.h \
lib/elementary/elm_glview_eo.h \
lib/elementary/elm_glview_eo.legacy.h \
lib/elementary/elm_grid_eo.h \
lib/elementary/elm_grid_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

@ -6,7 +6,7 @@
#define EFL_UI_FOCUS_COMPOSITION_PROTECTED
#include <Elementary.h>
#include <elm_grid.eo.h>
#include <elm_grid_eo.h>
#include "elm_priv.h"
#include "elm_widget_grid.h"
@ -217,4 +217,4 @@ _elm_grid_class_constructor(Efl_Class *klass)
#define ELM_GRID_EXTRA_OPS \
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_grid)
#include "elm_grid.eo.c"
#include "elm_grid_eo.c"

View File

@ -1,63 +0,0 @@
class Elm.Grid extends Efl.Ui.Widget implements Efl.Ui.Focus.Composition, Efl.Ui.Legacy
{
[[Elementary grid class]]
legacy_prefix: elm_grid;
eo_prefix: elm_obj_grid;
data: null;
methods {
@property grid_size {
set {
[[Set the virtual size of the grid]]
legacy: elm_grid_size_set;
}
get {
[[Get the virtual size of the grid]]
legacy: elm_grid_size_get;
}
values {
w: int; [[The virtual width of the grid]]
h: int; [[The virtual height of the grid]]
}
}
@property children {
get {
[[Get the list of the children for the grid.
Note: This is a duplicate of the list kept by the grid internally.
It's up to the user to destroy it when it no longer needs it.
It's possible to remove objects from the grid when walking this
list, but these removals won't be reflected on it.
]]
return: list<Efl.Canvas.Object> @owned @warn_unused; [[List of children]]
}
}
clear {
[[Faster way to remove all child objects from a grid object.]]
params {
@in clear: bool; [[If $true, it will delete just removed children]]
}
}
unpack {
[[Unpack a child from a grid object]]
params {
@in subobj: Efl.Canvas.Object; [[The child to unpack]]
}
}
pack {
[[Pack child at given position and size]]
params {
@in subobj: Efl.Canvas.Object; [[The child to pack.]]
@in x: int; [[The virtual x coord at which to pack it.]]
@in y: int; [[The virtual y coord at which to pack it.]]
@in w: int; [[The virtual width at which to pack it.]]
@in h: int; [[The virtual height at which to pack it.]]
}
}
}
implements {
class.constructor;
Efl.Object.constructor;
Efl.Ui.Widget.theme_apply;
Efl.Ui.Focus.Composition.prepare;
}
}

View File

@ -0,0 +1,75 @@
void _elm_grid_grid_size_set(Eo *obj, void *pd, int w, int h);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_grid_size_set, EFL_FUNC_CALL(w, h), int w, int h);
void _elm_grid_grid_size_get(const Eo *obj, void *pd, int *w, int *h);
EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_grid_size_get, EFL_FUNC_CALL(w, h), int *w, int *h);
Eina_List *_elm_grid_children_get(const Eo *obj, void *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_grid_children_get, Eina_List *, NULL);
void _elm_grid_clear(Eo *obj, void *pd, Eina_Bool clear);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_grid_clear, EFL_FUNC_CALL(clear), Eina_Bool clear);
void _elm_grid_unpack(Eo *obj, void *pd, Efl_Canvas_Object *subobj);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_grid_unpack, EFL_FUNC_CALL(subobj), Efl_Canvas_Object *subobj);
void _elm_grid_pack(Eo *obj, void *pd, Efl_Canvas_Object *subobj, int x, int y, int w, int h);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_grid_pack, EFL_FUNC_CALL(subobj, x, y, w, h), Efl_Canvas_Object *subobj, int x, int y, int w, int h);
Efl_Object *_elm_grid_efl_object_constructor(Eo *obj, void *pd);
Eina_Error _elm_grid_efl_ui_widget_theme_apply(Eo *obj, void *pd);
void _elm_grid_efl_ui_focus_composition_prepare(Eo *obj, void *pd);
static Eina_Bool
_elm_grid_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_GRID_EXTRA_OPS
#define ELM_GRID_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(elm_obj_grid_size_set, _elm_grid_grid_size_set),
EFL_OBJECT_OP_FUNC(elm_obj_grid_size_get, _elm_grid_grid_size_get),
EFL_OBJECT_OP_FUNC(elm_obj_grid_children_get, _elm_grid_children_get),
EFL_OBJECT_OP_FUNC(elm_obj_grid_clear, _elm_grid_clear),
EFL_OBJECT_OP_FUNC(elm_obj_grid_unpack, _elm_grid_unpack),
EFL_OBJECT_OP_FUNC(elm_obj_grid_pack, _elm_grid_pack),
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_grid_efl_object_constructor),
EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_grid_efl_ui_widget_theme_apply),
EFL_OBJECT_OP_FUNC(efl_ui_focus_composition_prepare, _elm_grid_efl_ui_focus_composition_prepare),
ELM_GRID_EXTRA_OPS
);
opsp = &ops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _elm_grid_class_desc = {
EO_VERSION,
"Elm.Grid",
EFL_CLASS_TYPE_REGULAR,
0,
_elm_grid_class_initializer,
_elm_grid_class_constructor,
NULL
};
EFL_DEFINE_CLASS(elm_grid_class_get, &_elm_grid_class_desc, EFL_UI_WIDGET_CLASS, EFL_UI_FOCUS_COMPOSITION_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL);
#include "elm_grid_eo.legacy.c"

View File

@ -0,0 +1,96 @@
#ifndef _ELM_GRID_EO_H_
#define _ELM_GRID_EO_H_
#ifndef _ELM_GRID_EO_CLASS_TYPE
#define _ELM_GRID_EO_CLASS_TYPE
typedef Eo Elm_Grid;
#endif
#ifndef _ELM_GRID_EO_TYPES
#define _ELM_GRID_EO_TYPES
#endif
/** Elementary grid class
*
* @ingroup Elm_Grid
*/
#define ELM_GRID_CLASS elm_grid_class_get()
EWAPI const Efl_Class *elm_grid_class_get(void);
/**
* @brief Set the virtual size of the grid
*
* @param[in] obj The object.
* @param[in] w The virtual width of the grid
* @param[in] h The virtual height of the grid
*
* @ingroup Elm_Grid
*/
EOAPI void elm_obj_grid_size_set(Eo *obj, int w, int h);
/**
* @brief Get the virtual size of the grid
*
* @param[in] obj The object.
* @param[out] w The virtual width of the grid
* @param[out] h The virtual height of the grid
*
* @ingroup Elm_Grid
*/
EOAPI void elm_obj_grid_size_get(const Eo *obj, int *w, int *h);
/**
* @brief Get the list of the children for the grid.
*
* @note This is a duplicate of the list kept by the grid internally. It's up
* to the user to destroy it when it no longer needs it. It's possible to
* remove objects from the grid when walking this list, but these removals
* won't be reflected on it.
*
* @param[in] obj The object.
*
* @return List of children
*
* @ingroup Elm_Grid
*/
EOAPI Eina_List *elm_obj_grid_children_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Faster way to remove all child objects from a grid object.
*
* @param[in] obj The object.
* @param[in] clear If @c true, it will delete just removed children
*
* @ingroup Elm_Grid
*/
EOAPI void elm_obj_grid_clear(Eo *obj, Eina_Bool clear);
/**
* @brief Unpack a child from a grid object
*
* @param[in] obj The object.
* @param[in] subobj The child to unpack
*
* @ingroup Elm_Grid
*/
EOAPI void elm_obj_grid_unpack(Eo *obj, Efl_Canvas_Object *subobj);
/**
* @brief Pack child at given position and size
*
* @param[in] obj The object.
* @param[in] subobj The child to pack.
* @param[in] x The virtual x coord at which to pack it.
* @param[in] y The virtual y coord at which to pack it.
* @param[in] w The virtual width at which to pack it.
* @param[in] h The virtual height at which to pack it.
*
* @ingroup Elm_Grid
*/
EOAPI void elm_obj_grid_pack(Eo *obj, Efl_Canvas_Object *subobj, int x, int y, int w, int h);
#endif

View File

@ -0,0 +1,36 @@
EAPI void
elm_grid_size_set(Elm_Grid *obj, int w, int h)
{
elm_obj_grid_size_set(obj, w, h);
}
EAPI void
elm_grid_size_get(const Elm_Grid *obj, int *w, int *h)
{
elm_obj_grid_size_get(obj, w, h);
}
EAPI Eina_List *
elm_grid_children_get(const Elm_Grid *obj)
{
return elm_obj_grid_children_get(obj);
}
EAPI void
elm_grid_clear(Elm_Grid *obj, Eina_Bool clear)
{
elm_obj_grid_clear(obj, clear);
}
EAPI void
elm_grid_unpack(Elm_Grid *obj, Efl_Canvas_Object *subobj)
{
elm_obj_grid_unpack(obj, subobj);
}
EAPI void
elm_grid_pack(Elm_Grid *obj, Efl_Canvas_Object *subobj, int x, int y, int w, int h)
{
elm_obj_grid_pack(obj, subobj, x, y, w, h);
}

View File

@ -0,0 +1,89 @@
#ifndef _ELM_GRID_EO_LEGACY_H_
#define _ELM_GRID_EO_LEGACY_H_
#ifndef _ELM_GRID_EO_CLASS_TYPE
#define _ELM_GRID_EO_CLASS_TYPE
typedef Eo Elm_Grid;
#endif
#ifndef _ELM_GRID_EO_TYPES
#define _ELM_GRID_EO_TYPES
#endif
/**
* @brief Set the virtual size of the grid
*
* @param[in] obj The object.
* @param[in] w The virtual width of the grid
* @param[in] h The virtual height of the grid
*
* @ingroup Elm_Grid_Group
*/
EAPI void elm_grid_size_set(Elm_Grid *obj, int w, int h);
/**
* @brief Get the virtual size of the grid
*
* @param[in] obj The object.
* @param[out] w The virtual width of the grid
* @param[out] h The virtual height of the grid
*
* @ingroup Elm_Grid_Group
*/
EAPI void elm_grid_size_get(const Elm_Grid *obj, int *w, int *h);
/**
* @brief Get the list of the children for the grid.
*
* @note This is a duplicate of the list kept by the grid internally. It's up
* to the user to destroy it when it no longer needs it. It's possible to
* remove objects from the grid when walking this list, but these removals
* won't be reflected on it.
*
* @param[in] obj The object.
*
* @return List of children
*
* @ingroup Elm_Grid_Group
*/
EAPI Eina_List *elm_grid_children_get(const Elm_Grid *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Faster way to remove all child objects from a grid object.
*
* @param[in] obj The object.
* @param[in] clear If @c true, it will delete just removed children
*
* @ingroup Elm_Grid_Group
*/
EAPI void elm_grid_clear(Elm_Grid *obj, Eina_Bool clear);
/**
* @brief Unpack a child from a grid object
*
* @param[in] obj The object.
* @param[in] subobj The child to unpack
*
* @ingroup Elm_Grid_Group
*/
EAPI void elm_grid_unpack(Elm_Grid *obj, Efl_Canvas_Object *subobj);
/**
* @brief Pack child at given position and size
*
* @param[in] obj The object.
* @param[in] subobj The child to pack.
* @param[in] x The virtual x coord at which to pack it.
* @param[in] y The virtual y coord at which to pack it.
* @param[in] w The virtual width at which to pack it.
* @param[in] h The virtual height at which to pack it.
*
* @ingroup Elm_Grid_Group
*/
EAPI void elm_grid_pack(Elm_Grid *obj, Efl_Canvas_Object *subobj, int x, int y, int w, int h);
#endif

View File

@ -34,4 +34,4 @@ EAPI void elm_grid_pack_set(Evas_Object *subobj, Evas_Coord x, Evas_Coor
*/
EAPI void elm_grid_pack_get(Evas_Object *subobj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
#include "elm_grid.eo.legacy.h"
#include "elm_grid_eo.legacy.h"

View File

@ -41,7 +41,6 @@ pub_legacy_eo_files = [
'elm_actionslider_part.eo',
'elm_bubble_part.eo',
'elm_fileselector_part.eo',
'elm_grid.eo',
'elm_icon.eo',
'elm_inwin.eo',
'elm_mapbuf.eo',
@ -754,6 +753,8 @@ elementary_pub_headers = [
'elm_gesture_layer_eo.legacy.h',
'elm_glview_eo.h',
'elm_glview_eo.legacy.h',
'elm_grid_eo.h',
'elm_grid_eo.legacy.h',
'elm_hoversel_eo.h',
'elm_hoversel_eo.legacy.h',
'elm_hoversel_item_eo.h',