summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2015-05-13 09:57:16 +0200
committerLukasz Stanislawski <l.stanislaws@samsung.com>2015-05-13 15:39:24 +0200
commit16fc2b347835b165ab033e3a502e0a08d33f41ba (patch)
treee65e93396490b706e4ffb34c4f98784755fb7188
parent56120ffc53ee6498f8bf58c171a0d16dcc7f9b77 (diff)
atspi: handle state change notifications in on_focus function
-rw-r--r--src/lib/elm_entry.c4
-rw-r--r--src/lib/elm_layout.c4
-rw-r--r--src/lib/elm_widget.c13
3 files changed, 12 insertions, 9 deletions
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 9e2e743e5..16b0fbd9c 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -1099,6 +1099,8 @@ _elm_entry_elm_widget_on_focus(Eo *obj, Elm_Entry_Data *sd)
1099 !edje_object_part_text_imf_context_get(sd->entry_edje, "elm.text")) 1099 !edje_object_part_text_imf_context_get(sd->entry_edje, "elm.text"))
1100 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON); 1100 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
1101 evas_object_smart_callback_call(obj, SIG_FOCUSED, NULL); 1101 evas_object_smart_callback_call(obj, SIG_FOCUSED, NULL);
1102 if (_elm_config->atspi_mode)
1103 elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
1102 _return_key_enabled_check(obj); 1104 _return_key_enabled_check(obj);
1103 _validate(obj); 1105 _validate(obj);
1104 } 1106 }
@@ -1110,6 +1112,8 @@ _elm_entry_elm_widget_on_focus(Eo *obj, Elm_Entry_Data *sd)
1110 !edje_object_part_text_imf_context_get(sd->entry_edje, "elm.text")) 1112 !edje_object_part_text_imf_context_get(sd->entry_edje, "elm.text"))
1111 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF); 1113 elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
1112 evas_object_smart_callback_call(obj, SIG_UNFOCUSED, NULL); 1114 evas_object_smart_callback_call(obj, SIG_UNFOCUSED, NULL);
1115 if (_elm_config->atspi_mode)
1116 elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
1113 1117
1114 if (_elm_config->selection_clear_enable) 1118 if (_elm_config->selection_clear_enable)
1115 { 1119 {
diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c
index f04b80f03..06adc9de7 100644
--- a/src/lib/elm_layout.c
+++ b/src/lib/elm_layout.c
@@ -406,12 +406,16 @@ _elm_layout_elm_widget_on_focus(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
406 elm_layout_signal_emit(obj, "elm,action,focus", "elm"); 406 elm_layout_signal_emit(obj, "elm,action,focus", "elm");
407 evas_object_focus_set(wd->resize_obj, EINA_TRUE); 407 evas_object_focus_set(wd->resize_obj, EINA_TRUE);
408 evas_object_smart_callback_call(obj, SIG_LAYOUT_FOCUSED, NULL); 408 evas_object_smart_callback_call(obj, SIG_LAYOUT_FOCUSED, NULL);
409 if (_elm_config->atspi_mode)
410 elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
409 } 411 }
410 else 412 else
411 { 413 {
412 elm_layout_signal_emit(obj, "elm,action,unfocus", "elm"); 414 elm_layout_signal_emit(obj, "elm,action,unfocus", "elm");
413 evas_object_focus_set(wd->resize_obj, EINA_FALSE); 415 evas_object_focus_set(wd->resize_obj, EINA_FALSE);
414 evas_object_smart_callback_call(obj, SIG_LAYOUT_UNFOCUSED, NULL); 416 evas_object_smart_callback_call(obj, SIG_LAYOUT_UNFOCUSED, NULL);
417 if (_elm_config->atspi_mode)
418 elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
415 } 419 }
416 420
417 return EINA_TRUE; 421 return EINA_TRUE;
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 1763bc505..8f48d6b18 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -5430,13 +5430,6 @@ elm_widget_tree_dot_dump(const Evas_Object *top,
5430#endif 5430#endif
5431} 5431}
5432 5432
5433static void
5434_on_focus_change(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
5435{
5436 Eina_Bool val = data ? EINA_TRUE : EINA_FALSE;
5437 elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, val);
5438}
5439
5440EOLIAN static void 5433EOLIAN static void
5441_elm_widget_eo_base_constructor(Eo *obj, Elm_Widget_Smart_Data *sd) 5434_elm_widget_eo_base_constructor(Eo *obj, Elm_Widget_Smart_Data *sd)
5442{ 5435{
@@ -5452,8 +5445,6 @@ _elm_widget_eo_base_constructor(Eo *obj, Elm_Widget_Smart_Data *sd)
5452 sd->on_create = EINA_FALSE; 5445 sd->on_create = EINA_FALSE;
5453 5446
5454 sd->role = ELM_ATSPI_ROLE_UNKNOWN; 5447 sd->role = ELM_ATSPI_ROLE_UNKNOWN;
5455 evas_object_smart_callback_add(obj, "focused", _on_focus_change, (void*)1);
5456 evas_object_smart_callback_add(obj, "unfocused", _on_focus_change, NULL);
5457} 5448}
5458 5449
5459EOLIAN static void 5450EOLIAN static void
@@ -5479,12 +5470,16 @@ _elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd)
5479 if (!sd->resize_obj) 5470 if (!sd->resize_obj)
5480 evas_object_focus_set(obj, EINA_TRUE); 5471 evas_object_focus_set(obj, EINA_TRUE);
5481 evas_object_smart_callback_call(obj, SIG_WIDGET_FOCUSED, NULL); 5472 evas_object_smart_callback_call(obj, SIG_WIDGET_FOCUSED, NULL);
5473 if (_elm_config->atspi_mode)
5474 elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
5482 } 5475 }
5483 else 5476 else
5484 { 5477 {
5485 if (!sd->resize_obj) 5478 if (!sd->resize_obj)
5486 evas_object_focus_set(obj, EINA_FALSE); 5479 evas_object_focus_set(obj, EINA_FALSE);
5487 evas_object_smart_callback_call(obj, SIG_WIDGET_UNFOCUSED, NULL); 5480 evas_object_smart_callback_call(obj, SIG_WIDGET_UNFOCUSED, NULL);
5481 if (_elm_config->atspi_mode)
5482 elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
5488 } 5483 }
5489 } 5484 }
5490 else 5485 else