forked from enlightenment/efl
[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:
parent
92cb1d522d
commit
fd66920430
|
@ -277,7 +277,7 @@ _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
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);
|
Elm_Access_Item *ai = _access_add_set(ac, type);
|
||||||
if (!ai) return;
|
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);
|
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 *
|
EAPI Evas_Object *
|
||||||
elm_access_object_register(Evas_Object *obj, Evas_Object *parent)
|
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
|
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);
|
_elm_access_text_set(_elm_access_object_get(obj), type, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI char *
|
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);
|
return _elm_access_text_get(_elm_access_object_get(obj), type, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_access_content_cb_set(Evas_Object *obj, int type,
|
elm_access_info_cb_set(Evas_Object *obj, int type,
|
||||||
Elm_Access_Content_Cb func, const void *data)
|
Elm_Access_Info_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
_elm_access_callback_set(_elm_access_object_get(obj), type, func, data);
|
_elm_access_callback_set(_elm_access_object_get(obj), type, func, data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,40 +18,9 @@ const Eo_Class *elm_obj_access_class_get(void) EINA_CONST;
|
||||||
* then read state out */
|
* then read state out */
|
||||||
#define ELM_ACCESS_CONTEXT_INFO 3 /* to give contextual information */
|
#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);
|
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.
|
* @brief Register evas object as an accessible object.
|
||||||
* @since 1.8
|
* @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 type The type of content that will be read
|
||||||
* @param text The text information 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
|
* @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.
|
* @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 obj Accessible object.
|
||||||
* @param type The type of content that will be read
|
* @param type The type of content that will be read
|
||||||
*
|
*
|
||||||
* @see elm_access_content_cb_set
|
* @see elm_access_info_cb_set
|
||||||
* @ingroup Access
|
* @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.
|
* @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
|
* 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.
|
* "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".
|
* 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
|
* @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.
|
* @brief Set activate callback to activate highlight object.
|
||||||
|
|
|
@ -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);
|
_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 *
|
EAPI void *
|
||||||
elm_object_item_data_get(const Elm_Object_Item *it)
|
elm_object_item_data_get(const Elm_Object_Item *it)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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);
|
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
|
* Get the data associated with an object item
|
||||||
* @param it The Elementary object item
|
* @param it The Elementary object item
|
||||||
|
|
|
@ -465,7 +465,7 @@ struct _Elm_Access_Item
|
||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
const void *data;
|
const void *data;
|
||||||
Elm_Access_Content_Cb func;
|
Elm_Access_Info_Cb func;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Elm_Access_Info
|
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_clear(Elm_Access_Info *ac);
|
||||||
EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text);
|
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 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_read(Elm_Access_Info *ac, int type, const Evas_Object *obj);
|
||||||
EAPI void _elm_access_say(const char *txt);
|
EAPI void _elm_access_say(const char *txt);
|
||||||
|
|
Loading…
Reference in New Issue