summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinwoo Kim <kimcinoo.efl@gmail.com>2013-01-15 04:20:37 +0000
committerShinwoo Kim <kimcinoo.efl@gmail.com>2013-01-15 04:20:37 +0000
commit2a102f60f8669c0bbfa0d3ccb653f7ac6bdb4dd5 (patch)
treec5e5c8fa2ff6d9650518737bade17a427657414c
parente0388105feb8c3a82ba710ece0d46a231b809ee1 (diff)
[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
-rw-r--r--src/lib/elm_access.c37
-rw-r--r--src/lib/elm_access.h45
-rw-r--r--src/lib/elm_main.c27
-rw-r--r--src/lib/elm_object_item.h32
-rw-r--r--src/lib/elm_widget.h4
5 files changed, 73 insertions, 72 deletions
diff --git a/src/lib/elm_access.c b/src/lib/elm_access.c
index 8cef7f69a..435505624 100644
--- a/src/lib/elm_access.c
+++ b/src/lib/elm_access.c
@@ -277,7 +277,7 @@ _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text)
277} 277}
278 278
279EAPI void 279EAPI void
280_elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Content_Cb func, const void *data) 280_elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Info_Cb func, const void *data)
281{ 281{
282 Elm_Access_Item *ai = _access_add_set(ac, type); 282 Elm_Access_Item *ai = _access_add_set(ac, type);
283 if (!ai) return; 283 if (!ai) return;
@@ -768,33 +768,6 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
768} 768}
769 769
770EAPI Evas_Object * 770EAPI Evas_Object *
771elm_access_object_item_register(Elm_Object_Item *item)
772{
773 Elm_Widget_Item *it;
774
775 it = (Elm_Widget_Item *)item;
776
777 _elm_access_widget_item_register(it);
778
779 if (it) return it->access_obj;
780 return NULL;
781}
782
783EAPI void
784elm_access_object_item_unregister(Elm_Object_Item *item)
785{
786 _elm_access_widget_item_unregister((Elm_Widget_Item *)item);
787}
788
789EAPI Evas_Object *
790elm_access_object_item_access_get(const Elm_Object_Item *item)
791{
792 if (!item) return NULL;
793
794 return ((Elm_Widget_Item *)item)->access_obj;
795}
796
797EAPI Evas_Object *
798elm_access_object_register(Evas_Object *obj, Evas_Object *parent) 771elm_access_object_register(Evas_Object *obj, Evas_Object *parent)
799{ 772{
800 return _access_object_register(obj, parent); 773 return _access_object_register(obj, parent);
@@ -813,20 +786,20 @@ elm_access_object_access_get(const Evas_Object *obj)
813} 786}
814 787
815EAPI void 788EAPI void
816elm_access_text_set(Evas_Object *obj, int type, const char *text) 789elm_access_info_set(Evas_Object *obj, int type, const char *text)
817{ 790{
818 _elm_access_text_set(_elm_access_object_get(obj), type, text); 791 _elm_access_text_set(_elm_access_object_get(obj), type, text);
819} 792}
820 793
821EAPI char * 794EAPI char *
822elm_access_text_get(const Evas_Object *obj, int type) 795elm_access_info_get(const Evas_Object *obj, int type)
823{ 796{
824 return _elm_access_text_get(_elm_access_object_get(obj), type, obj); 797 return _elm_access_text_get(_elm_access_object_get(obj), type, obj);
825} 798}
826 799
827EAPI void 800EAPI void
828elm_access_content_cb_set(Evas_Object *obj, int type, 801elm_access_info_cb_set(Evas_Object *obj, int type,
829 Elm_Access_Content_Cb func, const void *data) 802 Elm_Access_Info_Cb func, const void *data)
830{ 803{
831 _elm_access_callback_set(_elm_access_object_get(obj), type, func, data); 804 _elm_access_callback_set(_elm_access_object_get(obj), type, func, data);
832} 805}
diff --git a/src/lib/elm_access.h b/src/lib/elm_access.h
index 70f2b0bfe..01ba75786 100644
--- a/src/lib/elm_access.h
+++ b/src/lib/elm_access.h
@@ -18,41 +18,10 @@ const Eo_Class *elm_obj_access_class_get(void) EINA_CONST;
18 * then read state out */ 18 * then read state out */
19#define ELM_ACCESS_CONTEXT_INFO 3 /* to give contextual information */ 19#define ELM_ACCESS_CONTEXT_INFO 3 /* to give contextual information */
20 20
21typedef char *(*Elm_Access_Content_Cb)(void *data, Evas_Object *obj); 21typedef char *(*Elm_Access_Info_Cb)(void *data, Evas_Object *obj);
22typedef void (*Elm_Access_Activate_Cb)(void *data, Evas_Object *part_obj, Elm_Object_Item *item); 22typedef void (*Elm_Access_Activate_Cb)(void *data, Evas_Object *part_obj, Elm_Object_Item *item);
23 23
24/** 24/**
25 * @brief Register object item as an accessible object.
26 * @since 1.8
27 *
28 * @param item The elementary object item
29 *
30 * @ingroup Access
31 */
32EAPI Evas_Object *elm_access_object_item_register(Elm_Object_Item *item);
33
34/**
35 * @brief Unregister accessible object of the object item.
36 * @since 1.8
37 *
38 * @param item The elementary object item
39 *
40 * @ingroup Access
41 */
42EAPI void elm_access_object_item_unregister(Elm_Object_Item *item);
43
44/**
45 * @brief Get an accessible object of the object item.
46 * @since 1.8
47 *
48 * @param item The elementary object item
49 * @return Accessible object of the object item or NULL for any error
50 *
51 * @ingroup Access
52 */
53EAPI Evas_Object *elm_access_object_item_access_get(const Elm_Object_Item *item);
54
55/**
56 * @brief Register evas object as an accessible object. 25 * @brief Register evas object as an accessible object.
57 * @since 1.8 26 * @since 1.8
58 * 27 *
@@ -93,10 +62,10 @@ EAPI Evas_Object *elm_access_object_access_get(const Evas_Object *obj);
93 * @param type The type of content that will be read 62 * @param type The type of content that will be read
94 * @param text The text information that will be read 63 * @param text The text information that will be read
95 * 64 *
96 * @see elm_access_content_cb_set 65 * @see elm_access_info_cb_set
97 * @ingroup Access 66 * @ingroup Access
98 */ 67 */
99EAPI void elm_access_text_set(Evas_Object *obj, int type, const char *text); 68EAPI void elm_access_info_set(Evas_Object *obj, int type, const char *text);
100 69
101/** 70/**
102 * @brief Set text to give information for specific type. 71 * @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);
105 * @param obj Accessible object. 74 * @param obj Accessible object.
106 * @param type The type of content that will be read 75 * @param type The type of content that will be read
107 * 76 *
108 * @see elm_access_content_cb_set 77 * @see elm_access_info_cb_set
109 * @ingroup Access 78 * @ingroup Access
110 */ 79 */
111EAPI char *elm_access_text_get(const Evas_Object *obj, int type); 80EAPI char *elm_access_info_get(const Evas_Object *obj, int type);
112 81
113/** 82/**
114 * @brief Set content callback to give information for specific type. 83 * @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);
125 * In the case of button widget, the content of ELM_ACCESS_TYPE would be 94 * In the case of button widget, the content of ELM_ACCESS_TYPE would be
126 * "button". The label of button such as "ok", "cancel" is for ELM_ACCESS_INFO. 95 * "button". The label of button such as "ok", "cancel" is for ELM_ACCESS_INFO.
127 * If the button is disabled, content of ELM_ACCESS_STATE would be "disabled". 96 * If the button is disabled, content of ELM_ACCESS_STATE would be "disabled".
128 * And if there is contextual information, ELM_ACCESS_CONTEXT_INFO is used. 97 * And if there is contextual information, use ELM_ACCESS_CONTEXT_INFO.
129 * 98 *
130 * @ingroup Access 99 * @ingroup Access
131 */ 100 */
132EAPI void elm_access_content_cb_set(Evas_Object *obj, int type, Elm_Access_Content_Cb func, const void *data); 101EAPI void elm_access_info_cb_set(Evas_Object *obj, int type, Elm_Access_Info_Cb func, const void *data);
133 102
134/** 103/**
135 * @brief Set activate callback to activate highlight object. 104 * @brief Set activate callback to activate highlight object.
diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c
index 0804a6a72..7e8aaf254 100644
--- a/src/lib/elm_main.c
+++ b/src/lib/elm_main.c
@@ -1534,6 +1534,33 @@ elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt)
1534 _elm_widget_item_access_info_set((Elm_Widget_Item *)it, txt); 1534 _elm_widget_item_access_info_set((Elm_Widget_Item *)it, txt);
1535} 1535}
1536 1536
1537EAPI Evas_Object *
1538elm_object_item_access_register(Elm_Object_Item *item)
1539{
1540 Elm_Widget_Item *it;
1541
1542 it = (Elm_Widget_Item *)item;
1543
1544 _elm_access_widget_item_register(it);
1545
1546 if (it) return it->access_obj;
1547 return NULL;
1548}
1549
1550EAPI void
1551elm_object_item_access_unregister(Elm_Object_Item *item)
1552{
1553 _elm_access_widget_item_unregister((Elm_Widget_Item *)item);
1554}
1555
1556EAPI Evas_Object *
1557elm_object_item_access_object_get(const Elm_Object_Item *item)
1558{
1559 if (!item) return NULL;
1560
1561 return ((Elm_Widget_Item *)item)->access_obj;
1562}
1563
1537EAPI void * 1564EAPI void *
1538elm_object_item_data_get(const Elm_Object_Item *it) 1565elm_object_item_data_get(const Elm_Object_Item *it)
1539{ 1566{
diff --git a/src/lib/elm_object_item.h b/src/lib/elm_object_item.h
index 1bf8596f9..7a4735fe9 100644
--- a/src/lib/elm_object_item.h
+++ b/src/lib/elm_object_item.h
@@ -109,6 +109,38 @@ EAPI const char *elm_object_item_part_text_get(const Elm_Object
109EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt); 109EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt);
110 110
111/** 111/**
112 * @brief Register object item as an accessible object.
113 * @since 1.8
114 *
115 * @param item The elementary object item
116 * @return Accessible object of the object item or NULL for any error
117 *
118 * @ingroup General
119 */
120EAPI Evas_Object *elm_object_item_access_register(Elm_Object_Item *item);
121
122/**
123 * @brief Unregister accessible object of the object item.
124 * @since 1.8
125 *
126 * @param item The elementary object item
127 *
128 * @ingroup General
129 */
130EAPI void elm_object_item_access_unregister(Elm_Object_Item *item);
131
132/**
133 * @brief Get an accessible object of the object item.
134 * @since 1.8
135 *
136 * @param item The elementary object item
137 * @return Accessible object of the object item or NULL for any error
138 *
139 * @ingroup General
140 */
141EAPI Evas_Object *elm_object_item_access_object_get(const Elm_Object_Item *item);
142
143/**
112 * Get the data associated with an object item 144 * Get the data associated with an object item
113 * @param it The Elementary object item 145 * @param it The Elementary object item
114 * @return The data associated with @p it 146 * @return The data associated with @p it
diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h
index 3652f844f..dfa5efb41 100644
--- a/src/lib/elm_widget.h
+++ b/src/lib/elm_widget.h
@@ -465,7 +465,7 @@ struct _Elm_Access_Item
465{ 465{
466 int type; 466 int type;
467 const void *data; 467 const void *data;
468 Elm_Access_Content_Cb func; 468 Elm_Access_Info_Cb func;
469}; 469};
470 470
471struct _Elm_Access_Info 471struct _Elm_Access_Info
@@ -488,7 +488,7 @@ struct _Elm_Access_Info
488 488
489EAPI void _elm_access_clear(Elm_Access_Info *ac); 489EAPI void _elm_access_clear(Elm_Access_Info *ac);
490EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text); 490EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text);
491EAPI void _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Content_Cb func, const void *data); 491EAPI void _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Info_Cb func, const void *data);
492EAPI 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! */ 492EAPI 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! */
493EAPI void _elm_access_read(Elm_Access_Info *ac, int type, const Evas_Object *obj); 493EAPI void _elm_access_read(Elm_Access_Info *ac, int type, const Evas_Object *obj);
494EAPI void _elm_access_say(const char *txt); 494EAPI void _elm_access_say(const char *txt);