evas_grid: remove mirrored property

use efl_ui_base property
This commit is contained in:
Mike Blumenkrantz 2018-02-14 21:14:52 -05:00
parent f903665957
commit 2caaf09ea2
3 changed files with 45 additions and 21 deletions

View File

@ -6932,6 +6932,36 @@ EAPI Evas_Object *evas_object_table_add(Evas *evas) EINA_W
*/
EAPI Evas_Object *evas_object_grid_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
/**
* @brief Sets the mirrored mode of the grid. In mirrored mode the grid items
* go from right to left instead of left to right. That is, 0,0 is top right,
* not to left.
*
* @param[in] obj The object.
* @param[in] mirrored @c true if mirrored mode is set, @c false otherwise
*
* @since 1.1
*
* @ingroup Evas_Grid
*/
EAPI void evas_object_grid_mirrored_set(Eo *obj, Eina_Bool mirrored);
/**
* @brief Gets the mirrored mode of the grid.
*
* See also @ref evas_object_grid_mirrored_set
*
* @param[in] obj The object.
*
* @return @c true if mirrored mode is set, @c false otherwise
*
* @since 1.1
*
* @ingroup Evas_Grid
*/
EAPI Eina_Bool evas_object_grid_mirrored_get(const Eo *obj);
#include "canvas/evas_grid.eo.legacy.h"
/**

View File

@ -4,25 +4,6 @@ class Evas.Grid (Efl.Canvas.Group)
legacy_prefix: evas_object_grid;
eo_prefix: evas_obj_grid;
methods {
@property mirrored {
set {
[[Sets the mirrored mode of the grid. In mirrored mode the grid items go
from right to left instead of left to right. That is, 0,0 is top right, not
to left.
@since 1.1]]
}
get {
[[Gets the mirrored mode of the grid.
See also @.mirrored.set
@since 1.1]]
}
values {
mirrored: bool; [[$true if mirrored mode is set, $false otherwise]]
}
}
@property size {
set {
[[Set the virtual resolution for the grid
@ -135,5 +116,6 @@ class Evas.Grid (Efl.Canvas.Group)
}
implements {
Efl.Object.constructor;
Efl.Ui.Base.mirrored {get; set;}
}
}

View File

@ -480,13 +480,13 @@ _evas_grid_children_get(Eo *o EINA_UNUSED, Evas_Grid_Data *priv)
}
EOLIAN static Eina_Bool
_evas_grid_mirrored_get(Eo *o EINA_UNUSED, Evas_Grid_Data *priv)
_evas_grid_efl_ui_base_mirrored_get(Eo *o EINA_UNUSED, Evas_Grid_Data *priv)
{
return priv->is_mirrored;
}
EOLIAN static void
_evas_grid_mirrored_set(Eo *o EINA_UNUSED, Evas_Grid_Data *priv, Eina_Bool mirrored)
_evas_grid_efl_ui_base_mirrored_set(Eo *o EINA_UNUSED, Evas_Grid_Data *priv, Eina_Bool mirrored)
{
mirrored = !!mirrored;
if (priv->is_mirrored != mirrored)
@ -496,4 +496,16 @@ _evas_grid_mirrored_set(Eo *o EINA_UNUSED, Evas_Grid_Data *priv, Eina_Bool mirro
}
}
EAPI void
evas_object_grid_mirrored_set(Evas_Grid *obj, Eina_Bool mirrored)
{
efl_ui_mirrored_set(obj, mirrored);
}
EAPI Eina_Bool
evas_object_grid_mirrored_get(const Evas_Grid *obj)
{
return efl_ui_mirrored_get(obj);
}
#include "canvas/evas_grid.eo.c"