Dear All, Hello

The attached patch has following features. Please review and give some
feedbacks.

  1. I removed all EAPIs from my previous patch.
  2. The accessibility supports all layout on the ELM_ACCESS_MODE_ON. sense.
  3. The default string of text part is not supported by the accessibility.
Because there is no way to get the default string.
      (Raster also said that the default string is for the design factor.)
  4. The previously set access_object will not be removed but be reused.
The text is retrieved by using callback of the access_obj.

Sincerely,
Shinwoo Kim.



2012/6/12 Kim Shinwoo <kimcinoo....@gmail.com>

> Dear Mr. Gustavo Lima Chaves
>
> hey, sorry for below query. please ignore it.
>
>
>   "Yeap, EAPIs.. if application developer would use this APIs, then those
> APIs should be in the elm_access.h?
>   and the elm_access.h would be included in the elm_widget.h. right?"
>
> then, thanks.
>
>
> 2012/6/12 Kim Shinwoo <kimcinoo....@gmail.com>
>
>> Dear Mr. Gustavo Lima Chaves
>> Hello, Thanks for your response.
>>
>>
>> > Besides you had previous internal access calls EAPId there, remove
>> > them, as I said :)
>>
>> Yeap, EAPIs.. if application developer would use this APIs, then those
>> APIs should be in the elm_access.h?
>> and the elm_access.h would be included in the elm_widget.h. right?
>>
>>
>> > Do we really want to be selective on each layout should get
>> > accessibility support on it's text??
>>
>> No, not really want to..
>> All layouts should be support the accessibility that makes sense.
>>
>>
>> > It seems we can't list an Edje object's parts, so that we apply to
>> > each textual ones the accessibility thing on the layout creation, not
>> > just the text setting of it :/.
>> >
>>
>> yeap, you right. the creation time should be considered.
>>
>>
>> > Don't forget to delete a previously set access_object on sub_d->obj,
>> > here.
>> >
>>
>> good point, the revised patch will take care of this.
>>
>>
>> > What about _elm_access_text_register(Evas_Object *parent, Evas_Object
>> > *text_obj), and we fetch the text string from the object
>> > internally. The item version of it I dislike, as it just highlights
>> > things on mouse in, with apparently no text attached.
>> >
>>
>> This _elm_access_text_set() is for the ELM_ACCESS_TYPE. Accessibility
>> works as following.
>> If there is a button which has label "OK" and the button is disabled,
>> then accessibility says...
>>  "Button, OK, Disabled" (ordered by ELM_ACCESS_TYPE, ELM_ACCESS_INFO,
>> ELM_ACCESS_STATE)
>>
>> catch you later with revised patch. thanks.
>>
>> Sincerly,
>> Shinwoo Kim.
>>
>>
>>
>> 2012/6/11 Gustavo Lima Chaves <gl...@profusion.mobi>:
>>
>> > * Kim Shinwoo <kimcinoo....@gmail.com> [2012-06-08 19:55:40 +0900]:
>> >
>> >> Dear all,
>> >>
>> >> Revised patch has followings
>> >>   1. The TEXT part is contemplated also
>> >>   2. The Elm_Widget_Smart_Class is parent class of elm_access not the
>> >> Elm_Layout_Smart_Class
>> >>   3. The elm_access_edje_object_part_object_register() is added
>> >>       - Why I does not integrated with _elm_access_add is there are
>> >> following APIs for the consistency
>> >>         a.  _elm_access_object_register(): is for the widget object
>> >>         b.  _elm_access_item_register(): is for the widget item
>> >>
>> >> I have attached EXAMPLE code also. Thanks.
>> >>
>> >> Sincerely,
>> >> Shinwoo Kim.
>> >>
>> >
>> > Hi, Kim Shinwoo.
>> >
>> > Here go my thoughts on it, then.
>> >
>> >> Index: src/lib/elm_widget.h
>> >> ===================================================================
>> >> --- src/lib/elm_widget.h        (리비전 71695)
>> >> +++ src/lib/elm_widget.h        (작업 사본)
>> >> @@ -478,6 +478,7 @@ typedef struct _Elm_Widget_Smart_Data
>> >>                                                            * TRUE by
>> >>                                                            * default */
>> >>     Eina_Bool                     still_in : 1;
>> >> +   Eina_Bool                     can_access : 1;
>> >>  } Elm_Widget_Smart_Data;
>> >>
>> >>  /**
>> >> @@ -544,6 +545,8 @@ EAPI void             _elm_access_object_register(
>> >>  EAPI void             _elm_access_item_unregister(Elm_Widget_Item
>> *item);
>> >>  EAPI void             _elm_access_item_register(Elm_Widget_Item
>> *item, Evas_Object *hoverobj);
>> >>  EAPI Eina_Bool        _elm_access_2nd_click_timeout(Evas_Object *obj);
>> >> +EAPI Evas_Object*
>> _elm_access_edje_object_part_object_register(Evas_Object *obj, const
>> Evas_Object *partobj, const char *text);
>> >> +EAPI void             _elm_access_highlight_set(Evas_Object* obj);
>> >
>> > Besides you had previous internal access calls EAPId there, remove
>> > them, as I said :)
>>
>> Yeap, EAPIs.. if application developer would use this APIs, then those
>> APIs should be in the elm_access.h?
>> and the elm_access.h would be included in the elm_widget.h. right?
>>
>>
>> >
>> >>
>> >>  /**< put this as the first member in your widget item struct */
>> >>  #define ELM_WIDGET_ITEM       Elm_Widget_Item base
>> >> Index: src/lib/elm_widget.c
>> >> ===================================================================
>> >> --- src/lib/elm_widget.c        (리비전 71695)
>> >> +++ src/lib/elm_widget.c        (작업 사본)
>> >> @@ -839,6 +839,9 @@ _parent_focus(Evas_Object *obj)
>> >>          _elm_widget_focus_region_show(obj);
>> >>       }
>> >>     sd->focus_order_on_calc = EINA_FALSE;
>> >> +
>> >> +   if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
>> >> +     _elm_access_highlight_set(obj);
>> >>  }
>> >>
>> >>  static void
>> >> Index: src/lib/elm_layout.h
>> >> ===================================================================
>> >> --- src/lib/elm_layout.h        (리비전 71695)
>> >> +++ src/lib/elm_layout.h        (작업 사본)
>> >> @@ -646,6 +646,22 @@ EAPI Eina_Bool                    elm_layout_part_
>> >>  EAPI Eina_Bool
>>  elm_layout_part_cursor_engine_only_get(const Evas_Object *obj, const char
>> *part_name);
>> >>
>> >>  /**
>> >> + *
>> >> + * 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 EINA_TRUE on success or EINA_FALSE on failure. If @p obj
>> is not
>> >> + * a proper layout object, @c EINA_FALSE is returned.
>> >> + *
>> >> + * @ingroup Layout
>> >> + */
>> >> +EAPI Eina_Bool
>> >> +elm_layout_edje_object_access_set(Evas_Object *obj, Eina_Bool
>> can_access);
>> >> +
>> >> +/**
>> >>   * Set the layout content.
>> >>   *
>> >>   * @param obj The layout object
>> >
>> > Do we really want to be selective on each layout should get
>> > accessibility support on it's text??
>>
>> No, not really want to..
>> All layouts should be support the accessibility that makes sense.
>>
>>
>> >
>> >> Index: src/lib/elm_layout.c
>> >> ===================================================================
>> >> --- src/lib/elm_layout.c        (리비전 71695)
>> >> +++ src/lib/elm_layout.c        (작업 사본)
>> >> @@ -655,6 +655,11 @@ _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 &&
>> >> +       ELM_WIDGET_DATA(sd)->can_access)
>> >> +     sub_d->obj = _elm_access_edje_object_part_object_register
>> >> +       (obj, edje_object_part_object_get(elm_layout_edje_get(obj),
>> part), text);
>> >> +
>> >
>> > It seems we can't list an Edje object's parts, so that we apply to
>> > each textual ones the accessibility thing on the layout creation, not
>> > just the text setting of it :/.
>> >
>>
>> yeap, you right. the creation time should be considered.
>>
>>
>> > Don't forget to delete a previously set access_object on sub_d->obj,
>> > here.
>> >
>>
>> good point, the revised patch will take care of this.
>>
>>
>> >>     return EINA_TRUE;
>> >>  }
>> >>
>> >> @@ -1772,6 +1777,16 @@
>> _elm_layout_widget_smart_set_user(Elm_Layout_Smart
>> >>     sc->text_aliases = _text_aliases;
>> >>  }
>> >>
>> >> +EAPI Eina_Bool
>> >> +elm_layout_edje_object_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;
>> >> +}
>> >> +
>> >>  /* And now the basic layout widget itself */
>> >>  EAPI Evas_Object *
>> >>  elm_layout_add(Evas_Object *parent)
>> >> Index: src/lib/elm_access.c
>> >> ===================================================================
>> >> --- src/lib/elm_access.c        (리비전 71695)
>> >> +++ src/lib/elm_access.c        (작업 사본)
>> >> @@ -1,6 +1,45 @@
>> >>  #include <Elementary.h>
>> >>  #include "elm_priv.h"
>> >> +//#include "elm_widget_layout.h"
>> >
>> > Again, none of the EAPI on this file should be here: all internal
>> > calls, here.
>> >
>>
>> Yeap.
>>
>>
>> >>
>> >> +static const char ACCESS_SMART_NAME[] = "elm_access";
>> >> +
>> >> +EVAS_SMART_SUBCLASS_NEW
>> >> +  (ACCESS_SMART_NAME, _elm_access, Elm_Widget_Smart_Class,
>> >> +  Elm_Widget_Smart_Class, elm_widget_smart_class_get, NULL);
>> >> +
>> >> +static Evas_Object * _elm_access_add(Evas_Object *parent);
>> >> +
>> >> +static void
>> >> +_elm_access_smart_add(Evas_Object *obj)
>> >> +{
>> >> +   EVAS_SMART_DATA_ALLOC(obj, Elm_Widget_Smart_Data);
>> >> +   ELM_WIDGET_CLASS(_elm_access_parent_sc)->base.add(obj);
>> >> +
>> >> +   elm_widget_can_focus_set(obj, EINA_TRUE);
>> >> +}
>> >> +
>> >> +static Eina_Bool
>> >> +_elm_access_smart_on_focus(Evas_Object *obj)
>> >> +{
>> >> +   evas_object_focus_set(obj, elm_widget_focus_get(obj));
>> >> +
>> >> +   return EINA_TRUE;
>> >> +}
>> >> +
>> >> +static void
>> >> +_elm_access_smart_set_user(Elm_Widget_Smart_Class *sc)
>> >> +{
>> >> +   sc->base.add = _elm_access_smart_add;
>> >> +
>> >> +   /* not a 'focus chain manager' */
>> >> +   sc->focus_next = NULL;
>> >> +   sc->focus_direction = NULL;
>> >> +   sc->on_focus = _elm_access_smart_on_focus;
>> >> +
>> >> +   return;
>> >> +}
>> >> +
>> >>  typedef struct _Mod_Api Mod_Api;
>> >>
>> >>  struct _Mod_Api
>> >> @@ -194,9 +233,12 @@ _access_obj_hilight_resize_cb(void *data __UNUSED_
>> >>     evas_object_resize(o, w, h);
>> >>  }
>> >>
>> >> -
>> >> -
>> >>
>>  
>> //-------------------------------------------------------------------------//
>> >> +EAPI void
>> >> +_elm_access_highlight_set(Evas_Object* obj)
>> >> +{
>> >> +   _access_obj_over_timeout_cb(obj);
>> >> +}
>> >>
>> >>  EAPI void
>> >>  _elm_access_clear(Elm_Access_Info *ac)
>> >> @@ -383,6 +425,72 @@ _elm_access_object_unhilight(Evas_Object *obj)
>> >>       }
>> >>  }
>> >>
>> >> +static void
>> >> +_content_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj,
>> >> +                void *event_info __UNUSED__)
>> >> +{
>> >> +   Evas_Object *accessobj;
>> >> +   Evas_Coord w, h;
>> >> +
>> >> +   accessobj = data;
>> >> +   if (!accessobj) return;
>> >> +
>> >> +   evas_object_geometry_get(obj, NULL, NULL, &w, &h);
>> >> +   evas_object_resize(accessobj, w, h);
>> >> +}
>> >> +
>> >> +static void
>> >> +_content_move(void *data, Evas *e __UNUSED__, Evas_Object *obj,
>> >> +              void *event_info __UNUSED__)
>> >> +{
>> >> +   Evas_Object *accessobj;
>> >> +   Evas_Coord x, y;
>> >> +
>> >> +   accessobj = data;
>> >> +   if (!accessobj) return;
>> >> +
>> >> +   evas_object_geometry_get(obj, &x, &y, NULL, NULL);
>> >> +   evas_object_move(accessobj, x, y);
>> >> +}
>> >> +
>> >> +static char *
>> >> +_access_info_cb(void *data __UNUSED__, Evas_Object *obj,
>> >> +                Elm_Widget_Item *item __UNUSED__)
>> >> +{
>> >> +   const char *txt = elm_widget_access_info_get(obj);
>> >> +   if (txt) return strdup(txt);
>> >> +   return NULL;
>> >> +}
>> >> +
>> >> +EAPI Evas_Object *
>> >> +_elm_access_edje_object_part_object_register(Evas_Object* obj,
>> >> +                                             const Evas_Object
>> *partobj,
>> >> +                                             const char* text)
>> >
>> > What about _elm_access_text_register(Evas_Object *parent, Evas_Object
>> > *text_obj), and we fetch the text string from the object
>> > internally. The item version of it I dislike, as it just highlights
>> > things on mouse in, with apparently no text attached.
>> >
>>
>> This _elm_access_text_set() is for the ELM_ACCESS_TYPE. Accessibility
>> works as following.
>> If there is a button which has label "OK" and the button is disabled,
>> then accessibility says...
>>  "Button, OK, Disabled" (ordered by ELM_ACCESS_TYPE, ELM_ACCESS_INFO,
>> ELM_ACCESS_STATE)
>>
>>
>> >> +{
>> >> +   Evas_Object *ao;
>> >> +   Evas_Object *po = (Evas_Object *)partobj;
>> >> +
>> >> +   if (!obj || !po) return NULL;
>> >> +
>> >> +   // create access object
>> >> +   ao = _elm_access_add(obj);
>> >> +   evas_object_event_callback_add(po, EVAS_CALLBACK_RESIZE,
>> >> +                                  _content_resize, ao);
>> >> +   evas_object_event_callback_add(po, EVAS_CALLBACK_MOVE,
>> >> +                                  _content_move, ao);
>> >> +   evas_object_show(ao);
>> >> +
>> >> +   // register access object
>> >> +   _elm_access_object_register(ao, po);
>> >> +   _elm_access_text_set(_elm_access_object_get(ao),
>> >> +                        ELM_ACCESS_TYPE, evas_object_type_get(po));
>> >> +   _elm_access_callback_set(_elm_access_object_get(ao),
>> >> +                            ELM_ACCESS_INFO,
>> >> +                            _access_info_cb, NULL);
>> >> +   elm_widget_access_info_set(ao, text);
>> >> +
>> >> +   return ao;
>> >> +}
>> >>  EAPI void
>> >>  _elm_access_object_hilight_disable(Evas *e)
>> >>  {
>> >> @@ -534,3 +642,22 @@ _elm_access_2nd_click_timeout(Evas_Object *obj)
>> >>                                    _access_2nd_click_del_cb, NULL);
>> >>     return EINA_FALSE;
>> >>  }
>> >> +
>> >> +static Evas_Object *
>> >> +_elm_access_add(Evas_Object *parent)
>> >> +{
>> >> +   Evas *e;
>> >> +   Evas_Object *obj;
>> >> +
>> >> +   EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
>> >> +
>> >> +   e = evas_object_evas_get(parent);
>> >> +   if (!e) return NULL;
>> >> +
>> >> +   obj = evas_object_smart_add(e, _elm_access_smart_class_new());
>> >> +
>> >> +   if (!elm_widget_sub_object_add(parent, obj))
>> >> +     ERR("could not add %p as sub object of %p", obj, parent);
>> >> +
>> >> +   return obj;
>> >> +}
>> >
>> > BR,
>> >
>> >
>> >>
>> ------------------------------------------------------------------------------
>> >> Live Security Virtual Conference
>> >> Exclusive live event will cover all the ways today's security and
>> >> threat landscape has changed and how IT managers can respond.
>> Discussions
>> >> will include endpoint security, mobile security and the latest in
>> malware
>> >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> >
>> >> _______________________________________________
>> >> enlightenment-devel mailing list
>> >> enlightenment-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> >
>> >
>> > --
>> > Gustavo Lima Chaves
>> > Computer Engineer @ ProFUSION Embedded Systems
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Live Security Virtual Conference
>> > Exclusive live event will cover all the ways today's security and
>> > threat landscape has changed and how IT managers can respond.
>> Discussions
>> > will include endpoint security, mobile security and the latest in
>> malware
>> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> > _______________________________________________
>> > enlightenment-devel mailing list
>> > enlightenment-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>>
>> Sincerely,
>> Shinwoo Kim.
>>
>>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to