efl_ui_widget: make interest_region_mode legacy
summary_: interest_region_mode makes it possible, that interest_region_get either returns WIDGET or ITEM coordinates. However, efl-api does not have items. That means, this can be legacy. ref T7553 Depends on D8026 Reviewers: woohyun, cedric, Jaehyun_Cho, zmike, segfaultxavi Reviewed By: segfaultxavi Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7553 Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D8027
This commit is contained in:
parent
29e6d1d364
commit
0aaae8208e
|
@ -23,13 +23,6 @@ enum Efl.Ui.Focus.Direction
|
|||
last = 6 [[ last direction ]]
|
||||
}
|
||||
|
||||
enum Efl.Ui.Interest_Region_Mode
|
||||
{
|
||||
[[Focus region show mode.]]
|
||||
widget, [[As a widget.]]
|
||||
item, [[As an item.]]
|
||||
}
|
||||
|
||||
enum Efl.Ui.Focus.Move_Policy
|
||||
{
|
||||
[[Focus Movement Policy.
|
||||
|
|
|
@ -3342,18 +3342,6 @@ _efl_ui_widget_focus_highlight_geometry_get(const Eo *obj, Elm_Widget_Smart_Data
|
|||
return r;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_widget_interest_region_mode_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd, Elm_Focus_Region_Show_Mode mode)
|
||||
{
|
||||
_pd->focus_region_show_mode = mode;
|
||||
}
|
||||
|
||||
EOLIAN static Elm_Focus_Region_Show_Mode
|
||||
_efl_ui_widget_interest_region_mode_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd)
|
||||
{
|
||||
return _pd->focus_region_show_mode;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_widget_activate(Evas_Object *obj, Efl_Ui_Activate act)
|
||||
{
|
||||
|
|
|
@ -360,8 +360,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
|
|||
i.e. X,Y start from 0,0 to indicate the top-left corner of the
|
||||
widget. W,H must be greater or equal to 1 for this region to be
|
||||
taken into account, otherwise it is ignored.
|
||||
|
||||
See also @.interest_region_mode
|
||||
]]
|
||||
get {
|
||||
legacy: elm_widget_focus_region_get;
|
||||
|
@ -372,24 +370,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
|
|||
will be ignored, and no action will be taken.]]
|
||||
}
|
||||
}
|
||||
@property interest_region_mode {
|
||||
[[Defines how @.interest_region should be calculated.
|
||||
|
||||
It is up to the implementation of @.interest_region.get to take this
|
||||
value into account (or ignore it).
|
||||
]]
|
||||
get {
|
||||
legacy: elm_widget_focus_region_show_mode_get;
|
||||
}
|
||||
set {
|
||||
legacy: elm_widget_focus_region_show_mode_set;
|
||||
}
|
||||
values {
|
||||
mode: Efl.Ui.Interest_Region_Mode;
|
||||
[[Whether to show a specific item or the widget as a whole.]]
|
||||
}
|
||||
}
|
||||
|
||||
/* Focus highlight (visual focus rectangle) properties */
|
||||
@property focus_highlight_geometry @protected {
|
||||
[[The rectangle region to be highlighted on focus.
|
||||
|
|
|
@ -50,9 +50,12 @@ typedef enum
|
|||
} Elm_Object_Layer;
|
||||
|
||||
/** How the focus region should be calculated (not related to input focus). */
|
||||
typedef Efl_Ui_Interest_Region_Mode Elm_Focus_Region_Show_Mode;
|
||||
#define ELM_FOCUS_REGION_SHOW_WIDGET EFL_UI_INTEREST_REGION_MODE_WIDGET
|
||||
#define ELM_FOCUS_REGION_SHOW_ITEM EFL_UI_INTEREST_REGION_MODE_ITEM
|
||||
typedef enum
|
||||
{
|
||||
ELM_FOCUS_REGION_SHOW_WIDGET = 0, /**< As a widget. */
|
||||
ELM_FOCUS_REGION_SHOW_ITEM /**< As an item. */
|
||||
} Elm_Focus_Region_Show_Mode;
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
EAPI extern int ELM_ECORE_EVENT_ETHUMB_CONNECT;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
//we need those for legacy compatible code
|
||||
#include "elm_genlist.eo.h"
|
||||
#include "elm_gengrid.eo.h"
|
||||
#include "elm_widget_gengrid.h"
|
||||
|
||||
#define SEMI_BROKEN_QUICKLAUNCH 1
|
||||
|
||||
|
@ -1965,13 +1966,22 @@ elm_object_focused_item_get(const Evas_Object *obj)
|
|||
EAPI void
|
||||
elm_object_focus_region_show_mode_set(Evas_Object *obj, Elm_Focus_Region_Show_Mode mode)
|
||||
{
|
||||
elm_widget_focus_region_show_mode_set(obj, mode);
|
||||
if (efl_isa(obj, ELM_GENGRID_CLASS))
|
||||
{
|
||||
Elm_Gengrid_Data *pd = efl_data_scope_get(obj, ELM_GENGRID_CLASS);
|
||||
pd->mode = mode;
|
||||
}
|
||||
}
|
||||
|
||||
EAPI Elm_Focus_Region_Show_Mode
|
||||
elm_object_focus_region_show_mode_get(const Evas_Object *obj)
|
||||
{
|
||||
return elm_widget_focus_region_show_mode_get(obj);
|
||||
if (efl_isa(obj, ELM_GENGRID_CLASS))
|
||||
{
|
||||
Elm_Gengrid_Data *pd = efl_data_scope_get(obj, ELM_GENGRID_CLASS);
|
||||
return pd->mode;
|
||||
}
|
||||
return ELM_FOCUS_REGION_SHOW_WIDGET;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -94,6 +94,8 @@ struct _Elm_Gengrid_Data
|
|||
Elm_Gengrid_Reorder_Type type; /**< Reorder type */
|
||||
Eina_Bool running : 1; /**< animation is happening */
|
||||
} reorder;
|
||||
Elm_Focus_Region_Show_Mode mode; /**< the mode which describes which rectangle should be returned in the interest region getter*/
|
||||
|
||||
|
||||
Eina_Bool reorder_item_changed : 1;
|
||||
Eina_Bool move_effect_enabled : 1;
|
||||
|
|
Loading…
Reference in New Issue