diff options
author | Kim Shinwoo <kimcinoo.efl@gmail.com> | 2012-08-20 08:06:43 +0000 |
---|---|---|
committer | Carsten Haitzler <raster@rasterman.com> | 2012-08-20 08:06:43 +0000 |
commit | 9790f14b54b0bef3d290c7cb17452d7050518c15 (patch) | |
tree | 380b75d1b3601de379a0ae7fb680167a837483a6 /src/modules/datetime_input_ctxpopup | |
parent | cc8e2c24513b0b43250dc007ab8445933c812c9f (diff) |
From: Kim Shinwoo <kimcinoo.efl@gmail.com>
Subject: [E-devel] [patch][elementary] datetime - accessibility feature
the attached patch is to add accessibility feature to datetime.
unfortunately this patch depends on previous patch (
http://sourceforge.net/mailarchive/forum.php?thread_name=CAP-c0nHQ1z5B07Nb6P7dUQhfZ8tkqnoHvj_ZEJHGZUr6Ki4SiA%40mail.gmail.com&forum_name=enlightenment-devel
)
anyhow, it will be great if i can get your feedback. thanks a lot
always.
SVN revision: 75454
Diffstat (limited to 'src/modules/datetime_input_ctxpopup')
-rw-r--r-- | src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c b/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c index 59b42a35f..043bc65b4 100644 --- a/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c +++ b/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c | |||
@@ -207,6 +207,47 @@ _field_clicked_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) | |||
207 | evas_object_show(ctx_mod->ctxpopup); | 207 | evas_object_show(ctx_mod->ctxpopup); |
208 | } | 208 | } |
209 | 209 | ||
210 | static void | ||
211 | _access_set(Evas_Object *obj, Elm_Datetime_Field_Type field_type) | ||
212 | { | ||
213 | const char* type = NULL; | ||
214 | |||
215 | switch (field_type) | ||
216 | { | ||
217 | case ELM_DATETIME_YEAR: | ||
218 | type = "datetime field, year"; | ||
219 | break; | ||
220 | |||
221 | case ELM_DATETIME_MONTH: | ||
222 | type = "datetime field, month"; | ||
223 | break; | ||
224 | |||
225 | case ELM_DATETIME_DATE: | ||
226 | type = "datetime field, date"; | ||
227 | break; | ||
228 | |||
229 | case ELM_DATETIME_HOUR: | ||
230 | type = "datetime field, hour"; | ||
231 | break; | ||
232 | |||
233 | case ELM_DATETIME_MINUTE: | ||
234 | type = "datetime field, minute"; | ||
235 | break; | ||
236 | |||
237 | case ELM_DATETIME_AMPM: | ||
238 | type = "datetime field, AM PM"; | ||
239 | break; | ||
240 | |||
241 | default: | ||
242 | break; | ||
243 | } | ||
244 | |||
245 | _elm_access_text_set | ||
246 | (_elm_access_object_get(obj), ELM_ACCESS_TYPE, type); | ||
247 | _elm_access_callback_set | ||
248 | (_elm_access_object_get(obj), ELM_ACCESS_STATE, NULL, NULL); | ||
249 | } | ||
250 | |||
210 | // module fucns for the specific module type | 251 | // module fucns for the specific module type |
211 | EAPI void | 252 | EAPI void |
212 | field_value_display(Elm_Datetime_Module_Data *module_data, Evas_Object *obj) | 253 | field_value_display(Elm_Datetime_Module_Data *module_data, Evas_Object *obj) |
@@ -251,6 +292,10 @@ field_create(Elm_Datetime_Module_Data *module_data, Elm_Datetime_Field_Type fie | |||
251 | evas_object_smart_callback_add(field_obj, "clicked", _field_clicked_cb, ctx_mod); | 292 | evas_object_smart_callback_add(field_obj, "clicked", _field_clicked_cb, ctx_mod); |
252 | } | 293 | } |
253 | evas_object_data_set(field_obj, "_field_type", (void *)field_type); | 294 | evas_object_data_set(field_obj, "_field_type", (void *)field_type); |
295 | |||
296 | // ACCESS | ||
297 | _access_set(field_obj, field_type); | ||
298 | |||
254 | return field_obj; | 299 | return field_obj; |
255 | } | 300 | } |
256 | 301 | ||