From 5ab9f4b980907ac0757e4c5127f34eb7735dbe53 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Thu, 10 Jan 2013 21:11:59 +0000 Subject: [PATCH] elm access: Added const for getters. SVN revision: 82588 --- legacy/elementary/src/lib/elm_access.c | 14 +++++++------- legacy/elementary/src/lib/elm_access.h | 6 +++--- legacy/elementary/src/lib/elm_widget.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/legacy/elementary/src/lib/elm_access.c b/legacy/elementary/src/lib/elm_access.c index dd31172..8cef7f6 100644 --- a/legacy/elementary/src/lib/elm_access.c +++ b/legacy/elementary/src/lib/elm_access.c @@ -344,7 +344,7 @@ _elm_access_highlight_cycle(Evas_Object *obj, Elm_Focus_Direction dir) } EAPI char * -_elm_access_text_get(const Elm_Access_Info *ac, int type, Evas_Object *obj) +_elm_access_text_get(const Elm_Access_Info *ac, int type, const Evas_Object *obj) { Elm_Access_Item *ai; Eina_List *l; @@ -354,7 +354,7 @@ _elm_access_text_get(const Elm_Access_Info *ac, int type, Evas_Object *obj) { if (ai->type == type) { - if (ai->func) return ai->func((void *)(ai->data), obj); + if (ai->func) return ai->func((void *)(ai->data), (Evas_Object *)obj); else if (ai->data) return strdup(ai->data); return NULL; } @@ -363,7 +363,7 @@ _elm_access_text_get(const Elm_Access_Info *ac, int type, Evas_Object *obj) } EAPI void -_elm_access_read(Elm_Access_Info *ac, int type, Evas_Object *obj) +_elm_access_read(Elm_Access_Info *ac, int type, const Evas_Object *obj) { char *txt = _elm_access_text_get(ac, type, obj); @@ -787,7 +787,7 @@ elm_access_object_item_unregister(Elm_Object_Item *item) } EAPI Evas_Object * -elm_access_object_item_access_get(Elm_Object_Item *item) +elm_access_object_item_access_get(const Elm_Object_Item *item) { if (!item) return NULL; @@ -807,7 +807,7 @@ elm_access_object_unregister(Evas_Object *obj) } EAPI Evas_Object * -elm_access_object_access_get(Evas_Object *obj) +elm_access_object_access_get(const Evas_Object *obj) { return evas_object_data_get(obj, "_part_access_obj"); } @@ -819,7 +819,7 @@ elm_access_text_set(Evas_Object *obj, int type, const char *text) } EAPI char * -elm_access_text_get(Evas_Object *obj, int type) +elm_access_text_get(const Evas_Object *obj, int type) { return _elm_access_text_get(_elm_access_object_get(obj), type, obj); } @@ -857,7 +857,7 @@ elm_access_external_info_get(const Evas_Object *obj) Elm_Access_Info *ac; ac = _elm_access_object_get(obj); - return _elm_access_text_get(ac, ELM_ACCESS_CONTEXT_INFO, (Evas_Object *)obj); + return _elm_access_text_get(ac, ELM_ACCESS_CONTEXT_INFO, obj); } static void diff --git a/legacy/elementary/src/lib/elm_access.h b/legacy/elementary/src/lib/elm_access.h index fe84aba..70f2b0b 100644 --- a/legacy/elementary/src/lib/elm_access.h +++ b/legacy/elementary/src/lib/elm_access.h @@ -50,7 +50,7 @@ EAPI void elm_access_object_item_unregister(Elm_Object_Item *item); * * @ingroup Access */ -EAPI Evas_Object *elm_access_object_item_access_get(Elm_Object_Item *item); +EAPI Evas_Object *elm_access_object_item_access_get(const Elm_Object_Item *item); /** * @brief Register evas object as an accessible object. @@ -83,7 +83,7 @@ EAPI void elm_access_object_unregister(Evas_Object *obj); * * @ingroup Access */ -EAPI Evas_Object *elm_access_object_access_get(Evas_Object *obj); +EAPI Evas_Object *elm_access_object_access_get(const Evas_Object *obj); /** * @brief Set text to give information for specific type. @@ -108,7 +108,7 @@ EAPI void elm_access_text_set(Evas_Object *obj, int type, const char *text); * @see elm_access_content_cb_set * @ingroup Access */ -EAPI char *elm_access_text_get(Evas_Object *obj, int type); +EAPI char *elm_access_text_get(const Evas_Object *obj, int type); /** * @brief Set content callback to give information for specific type. diff --git a/legacy/elementary/src/lib/elm_widget.h b/legacy/elementary/src/lib/elm_widget.h index c0ec8c3..3652f84 100644 --- a/legacy/elementary/src/lib/elm_widget.h +++ b/legacy/elementary/src/lib/elm_widget.h @@ -489,8 +489,8 @@ 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 char *_elm_access_text_get(const Elm_Access_Info *ac, int type, 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, Evas_Object *obj); +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); EAPI Elm_Access_Info *_elm_access_object_get(const Evas_Object *obj); EAPI void _elm_access_object_hilight(Evas_Object *obj); -- 2.7.4