forked from enlightenment/efl
From: Kim Shinwoo <kimcinoo.efl@gmail.com>
Subject: Re: [E-devel] [Patch][layout] select layout in access mode I revised the patch which has the way to get the state of accessibility now. elm_layout_edje_object_can_access_set/get(). SVN revision: 73393
This commit is contained in:
parent
e99f497332
commit
86f0153542
|
@ -278,4 +278,10 @@
|
|||
* No mouse cursor displayed in fb when needed, so add a
|
||||
softcursor mode defaulting to auto.
|
||||
* Add elm_win_screen_dpi_get()
|
||||
|
||||
2012-07-6 Shinwoo Kim (kimcinoo)
|
||||
|
||||
* Add layout access enable/disable api:
|
||||
* elm_layout_edje_object_can_access_set/get()
|
||||
|
||||
|
||||
|
|
|
@ -657,7 +657,8 @@ _elm_layout_smart_text_set(Evas_Object *obj,
|
|||
|
||||
ELM_LAYOUT_CLASS(ELM_WIDGET_DATA(sd)->api)->sizing_eval(obj);
|
||||
|
||||
if (_elm_config->access_mode == ELM_ACCESS_MODE_ON && !(sub_d->obj))
|
||||
if (_elm_config->access_mode == ELM_ACCESS_MODE_ON &&
|
||||
ELM_WIDGET_DATA(sd)->can_access && !(sub_d->obj))
|
||||
sub_d->obj = _elm_access_edje_object_part_object_register
|
||||
(obj, elm_layout_edje_get(obj), part);
|
||||
|
||||
|
@ -1778,6 +1779,25 @@ _elm_layout_widget_smart_set_user(Elm_Layout_Smart_Class *sc)
|
|||
sc->text_aliases = _text_aliases;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_layout_edje_object_can_access_set(Evas_Object *obj, Eina_Bool can_access)
|
||||
{
|
||||
ELM_LAYOUT_CHECK(obj) EINA_FALSE;
|
||||
ELM_LAYOUT_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
|
||||
|
||||
ELM_WIDGET_DATA(sd)->can_access = !!can_access;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_layout_edje_object_can_access_get(Evas_Object *obj)
|
||||
{
|
||||
ELM_LAYOUT_CHECK(obj) EINA_FALSE;
|
||||
ELM_LAYOUT_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
|
||||
|
||||
return ELM_WIDGET_DATA(sd)->can_access;
|
||||
}
|
||||
|
||||
/* And now the basic layout widget itself */
|
||||
EAPI Evas_Object *
|
||||
elm_layout_add(Evas_Object *parent)
|
||||
|
|
|
@ -636,6 +636,41 @@ EAPI const char *elm_layout_part_cursor_style_get(const Evas_Ob
|
|||
*/
|
||||
EAPI Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only);
|
||||
|
||||
/*
|
||||
* Set accessibility to all texblock(text) parts in the layout object
|
||||
*
|
||||
* @param obj The layout object.
|
||||
* @param can_access makes all textblock(text) parts in the layout @p obj possible
|
||||
* to have accessibility. @c EINA_TRUE means textblock(text) parts can be accessible
|
||||
*
|
||||
* @return @c EINA_TRUE on success or @c EINA_FALSE on failure. If @p obj is not
|
||||
* a proper layout object, @c EINA_FALSE is returned.
|
||||
*
|
||||
* @since 1.1
|
||||
*
|
||||
* @ingroup Layout
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
elm_layout_edje_object_can_access_set(Evas_Object *obj, Eina_Bool can_access);
|
||||
|
||||
/*
|
||||
* Get accessibility state of texblock(text) parts in the layout object
|
||||
*
|
||||
* @param obj The layout object.
|
||||
*
|
||||
* @return @c EINA_TRUE, if all textblock(text) parts in the layout can be accessible
|
||||
* @c EINA_FALSET if those cannot be accessible. If @p obj is not a proper layout
|
||||
* object, @c EINA_FALSE is returned.
|
||||
*
|
||||
* @see elm_layout_edje_object_access_set()
|
||||
*
|
||||
* @since 1.1
|
||||
*
|
||||
* @ingroup Layout
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
elm_layout_edje_object_can_access_get(Evas_Object *obj);
|
||||
|
||||
/**
|
||||
* Gets a specific cursor engine_only for an edje part.
|
||||
*
|
||||
|
|
|
@ -495,6 +495,7 @@ typedef struct _Elm_Widget_Smart_Data
|
|||
* TRUE by
|
||||
* default */
|
||||
Eina_Bool still_in : 1;
|
||||
Eina_Bool can_access : 1;
|
||||
} Elm_Widget_Smart_Data;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue