summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_access.c
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2013-03-23 08:45:26 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2013-03-23 08:45:26 +0900
commite8ab610b57a0f88086bdbc6866766a89f73c2d10 (patch)
tree67930b04c947bc468b935a610ba69357cc5d562c /legacy/elementary/src/lib/elm_access.c
parent81c4926a0a2c4aff70ed34a7735ba36226cd0ec3 (diff)
[access] do not call timer callback directly
Diffstat (limited to 'legacy/elementary/src/lib/elm_access.c')
-rw-r--r--legacy/elementary/src/lib/elm_access.c55
1 files changed, 32 insertions, 23 deletions
diff --git a/legacy/elementary/src/lib/elm_access.c b/legacy/elementary/src/lib/elm_access.c
index 6668aa0..5c170fa 100644
--- a/legacy/elementary/src/lib/elm_access.c
+++ b/legacy/elementary/src/lib/elm_access.c
@@ -134,6 +134,22 @@ _access_highlight_object_get(Evas_Object *obj)
134 return ho; 134 return ho;
135} 135}
136 136
137static void
138_access_highlight_read(Elm_Access_Info *ac, Evas_Object *obj)
139{
140 if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
141 {
142 if (ac->on_highlight) ac->on_highlight(ac->on_highlight_data);
143 _elm_access_object_hilight(obj);
144 _elm_access_read(ac, ELM_ACCESS_CANCEL, obj);
145 _elm_access_read(ac, ELM_ACCESS_TYPE, obj);
146 _elm_access_read(ac, ELM_ACCESS_INFO, obj);
147 _elm_access_read(ac, ELM_ACCESS_STATE, obj);
148 _elm_access_read(ac, ELM_ACCESS_CONTEXT_INFO, obj);
149 _elm_access_read(ac, ELM_ACCESS_DONE, obj);
150 }
151}
152
137static Eina_Bool 153static Eina_Bool
138_access_obj_over_timeout_cb(void *data) 154_access_obj_over_timeout_cb(void *data)
139{ 155{
@@ -142,23 +158,12 @@ _access_obj_over_timeout_cb(void *data)
142 158
143 if (!data) return EINA_FALSE; 159 if (!data) return EINA_FALSE;
144 160
145 ho = _access_highlight_object_get(data);
146 if (ho == data) return EINA_FALSE;
147
148 ac = evas_object_data_get(data, "_elm_access"); 161 ac = evas_object_data_get(data, "_elm_access");
149 if (!ac) return EINA_FALSE; 162 if (!ac) return EINA_FALSE;
150 163
151 if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF) 164 ho = _access_highlight_object_get(data);
152 { 165 if (ho != data) _access_highlight_read(ac, data);
153 if (ac->on_highlight) ac->on_highlight(ac->on_highlight_data); 166
154 _elm_access_object_hilight(data);
155 _elm_access_read(ac, ELM_ACCESS_CANCEL, data);
156 _elm_access_read(ac, ELM_ACCESS_TYPE, data);
157 _elm_access_read(ac, ELM_ACCESS_INFO, data);
158 _elm_access_read(ac, ELM_ACCESS_STATE, data);
159 _elm_access_read(ac, ELM_ACCESS_CONTEXT_INFO, data);
160 _elm_access_read(ac, ELM_ACCESS_DONE, data);
161 }
162 ac->delay_timer = NULL; 167 ac->delay_timer = NULL;
163 return EINA_FALSE; 168 return EINA_FALSE;
164} 169}
@@ -359,7 +364,18 @@ _elm_access_widget_item_access_order_unset(Elm_Widget_Item *item)
359EAPI void 364EAPI void
360_elm_access_highlight_set(Evas_Object* obj) 365_elm_access_highlight_set(Evas_Object* obj)
361{ 366{
362 _access_obj_over_timeout_cb(obj); 367 Elm_Access_Info *ac;
368 Evas_Object *ho;
369
370 if (!obj) return;
371
372 ho = _access_highlight_object_get(obj);
373 if (ho == obj) return;
374
375 ac = evas_object_data_get(obj, "_elm_access");
376 if (!ac) return;
377
378 _access_highlight_read(ac, obj);
363} 379}
364 380
365EAPI void 381EAPI void
@@ -968,14 +984,7 @@ elm_access_say(const char *text)
968EAPI void 984EAPI void
969elm_access_highlight_set(Evas_Object* obj) 985elm_access_highlight_set(Evas_Object* obj)
970{ 986{
971 Evas_Object *ho; 987 _elm_access_highlight_set(obj);
972
973 if (!obj) return;
974
975 ho = _access_highlight_object_get(obj);
976 if (ho == obj) return;
977
978 _access_obj_over_timeout_cb(obj);
979} 988}
980 989
981EAPI void 990EAPI void