[access] follow consistent naming rule in elementary as below.

- elm_access_object_item_register(); -> elm_object_item_access_register();
  - elm_access_content_cb_set(); -> elm_access_info_cb_set(); The content would be considered as an evas object.
  - elm_access_text_set(); -> elm_access_info_set();


SVN revision: 82791
This commit is contained in:
Shinwoo Kim 2013-01-15 04:20:37 +00:00
parent 92cb1d522d
commit fd66920430
5 changed files with 73 additions and 72 deletions

View File

@ -277,7 +277,7 @@ _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text)
}
EAPI void
_elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Content_Cb func, const void *data)
_elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Info_Cb func, const void *data)
{
Elm_Access_Item *ai = _access_add_set(ac, type);
if (!ai) return;
@ -767,33 +767,6 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
ERR("could not add %p as sub object of %p", obj, parent);
}
EAPI Evas_Object *
elm_access_object_item_register(Elm_Object_Item *item)
{
Elm_Widget_Item *it;
it = (Elm_Widget_Item *)item;
_elm_access_widget_item_register(it);
if (it) return it->access_obj;
return NULL;
}
EAPI void
elm_access_object_item_unregister(Elm_Object_Item *item)
{
_elm_access_widget_item_unregister((Elm_Widget_Item *)item);
}
EAPI Evas_Object *
elm_access_object_item_access_get(const Elm_Object_Item *item)
{
if (!item) return NULL;
return ((Elm_Widget_Item *)item)->access_obj;
}
EAPI Evas_Object *
elm_access_object_register(Evas_Object *obj, Evas_Object *parent)
{
@ -813,20 +786,20 @@ elm_access_object_access_get(const Evas_Object *obj)
}
EAPI void
elm_access_text_set(Evas_Object *obj, int type, const char *text)
elm_access_info_set(Evas_Object *obj, int type, const char *text)
{
_elm_access_text_set(_elm_access_object_get(obj), type, text);
}
EAPI char *
elm_access_text_get(const Evas_Object *obj, int type)
elm_access_info_get(const Evas_Object *obj, int type)
{
return _elm_access_text_get(_elm_access_object_get(obj), type, obj);
}
EAPI void
elm_access_content_cb_set(Evas_Object *obj, int type,
Elm_Access_Content_Cb func, const void *data)
elm_access_info_cb_set(Evas_Object *obj, int type,
Elm_Access_Info_Cb func, const void *data)
{
_elm_access_callback_set(_elm_access_object_get(obj), type, func, data);
}

View File

@ -18,40 +18,9 @@ const Eo_Class *elm_obj_access_class_get(void) EINA_CONST;
* then read state out */
#define ELM_ACCESS_CONTEXT_INFO 3 /* to give contextual information */
typedef char *(*Elm_Access_Content_Cb)(void *data, Evas_Object *obj);
typedef char *(*Elm_Access_Info_Cb)(void *data, Evas_Object *obj);
typedef void (*Elm_Access_Activate_Cb)(void *data, Evas_Object *part_obj, Elm_Object_Item *item);
/**
* @brief Register object item as an accessible object.
* @since 1.8
*
* @param item The elementary object item
*
* @ingroup Access
*/
EAPI Evas_Object *elm_access_object_item_register(Elm_Object_Item *item);
/**
* @brief Unregister accessible object of the object item.
* @since 1.8
*
* @param item The elementary object item
*
* @ingroup Access
*/
EAPI void elm_access_object_item_unregister(Elm_Object_Item *item);
/**
* @brief Get an accessible object of the object item.
* @since 1.8
*
* @param item The elementary object item
* @return Accessible object of the object item or NULL for any error
*
* @ingroup Access
*/
EAPI Evas_Object *elm_access_object_item_access_get(const Elm_Object_Item *item);
/**
* @brief Register evas object as an accessible object.
* @since 1.8
@ -93,10 +62,10 @@ EAPI Evas_Object *elm_access_object_access_get(const Evas_Object *obj);
* @param type The type of content that will be read
* @param text The text information that will be read
*
* @see elm_access_content_cb_set
* @see elm_access_info_cb_set
* @ingroup Access
*/
EAPI void elm_access_text_set(Evas_Object *obj, int type, const char *text);
EAPI void elm_access_info_set(Evas_Object *obj, int type, const char *text);
/**
* @brief Set text to give information for specific type.
@ -105,10 +74,10 @@ EAPI void elm_access_text_set(Evas_Object *obj, int type, const char *text);
* @param obj Accessible object.
* @param type The type of content that will be read
*
* @see elm_access_content_cb_set
* @see elm_access_info_cb_set
* @ingroup Access
*/
EAPI char *elm_access_text_get(const Evas_Object *obj, int type);
EAPI char *elm_access_info_get(const Evas_Object *obj, int type);
/**
* @brief Set content callback to give information for specific type.
@ -125,11 +94,11 @@ EAPI char *elm_access_text_get(const Evas_Object *obj, int type);
* In the case of button widget, the content of ELM_ACCESS_TYPE would be
* "button". The label of button such as "ok", "cancel" is for ELM_ACCESS_INFO.
* If the button is disabled, content of ELM_ACCESS_STATE would be "disabled".
* And if there is contextual information, ELM_ACCESS_CONTEXT_INFO is used.
* And if there is contextual information, use ELM_ACCESS_CONTEXT_INFO.
*
* @ingroup Access
*/
EAPI void elm_access_content_cb_set(Evas_Object *obj, int type, Elm_Access_Content_Cb func, const void *data);
EAPI void elm_access_info_cb_set(Evas_Object *obj, int type, Elm_Access_Info_Cb func, const void *data);
/**
* @brief Set activate callback to activate highlight object.

View File

@ -1534,6 +1534,33 @@ elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt)
_elm_widget_item_access_info_set((Elm_Widget_Item *)it, txt);
}
EAPI Evas_Object *
elm_object_item_access_register(Elm_Object_Item *item)
{
Elm_Widget_Item *it;
it = (Elm_Widget_Item *)item;
_elm_access_widget_item_register(it);
if (it) return it->access_obj;
return NULL;
}
EAPI void
elm_object_item_access_unregister(Elm_Object_Item *item)
{
_elm_access_widget_item_unregister((Elm_Widget_Item *)item);
}
EAPI Evas_Object *
elm_object_item_access_object_get(const Elm_Object_Item *item)
{
if (!item) return NULL;
return ((Elm_Widget_Item *)item)->access_obj;
}
EAPI void *
elm_object_item_data_get(const Elm_Object_Item *it)
{

View File

@ -108,6 +108,38 @@ EAPI const char *elm_object_item_part_text_get(const Elm_Object
*/
EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt);
/**
* @brief Register object item as an accessible object.
* @since 1.8
*
* @param item The elementary object item
* @return Accessible object of the object item or NULL for any error
*
* @ingroup General
*/
EAPI Evas_Object *elm_object_item_access_register(Elm_Object_Item *item);
/**
* @brief Unregister accessible object of the object item.
* @since 1.8
*
* @param item The elementary object item
*
* @ingroup General
*/
EAPI void elm_object_item_access_unregister(Elm_Object_Item *item);
/**
* @brief Get an accessible object of the object item.
* @since 1.8
*
* @param item The elementary object item
* @return Accessible object of the object item or NULL for any error
*
* @ingroup General
*/
EAPI Evas_Object *elm_object_item_access_object_get(const Elm_Object_Item *item);
/**
* Get the data associated with an object item
* @param it The Elementary object item

View File

@ -465,7 +465,7 @@ struct _Elm_Access_Item
{
int type;
const void *data;
Elm_Access_Content_Cb func;
Elm_Access_Info_Cb func;
};
struct _Elm_Access_Info
@ -488,7 +488,7 @@ struct _Elm_Access_Info
EAPI void _elm_access_clear(Elm_Access_Info *ac);
EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text);
EAPI void _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Content_Cb func, const void *data);
EAPI void _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Info_Cb func, const void *data);
EAPI char *_elm_access_text_get(const Elm_Access_Info *ac, int type, const Evas_Object *obj); /* this is ok it actually returns a strduped string - it's meant to! */
EAPI void _elm_access_read(Elm_Access_Info *ac, int type, const Evas_Object *obj);
EAPI void _elm_access_say(const char *txt);