stanluk pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=1e30b5422c2156c2b8efeceb18045d199ef9aaaa

commit 1e30b5422c2156c2b8efeceb18045d199ef9aaaa
Author: Lukasz Stanislawski <l.stanisl...@samsung.com>
Date:   Wed May 13 15:37:47 2015 +0200

    atspi: add ACTIVE state to elm_win
---
 src/lib/elm_win.c  | 22 ++++++++++++++++++++--
 src/lib/elm_win.eo |  1 +
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 556030e..c243735 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -1044,7 +1044,10 @@ _elm_win_focus_in(Ecore_Evas *ee)
      }
 
    if (_elm_config->atspi_mode)
-     eo_do(obj, 
eo_event_callback_call(ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_ACTIVATED, 
NULL));
+     {
+        eo_do(obj, 
eo_event_callback_call(ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_ACTIVATED, 
NULL));
+        elm_interface_atspi_accessible_state_changed_signal_emit(obj, 
ELM_ATSPI_STATE_ACTIVE, EINA_TRUE);
+     }
 
    /* do nothing */
    /* else if (sd->img_obj) */
@@ -1076,7 +1079,10 @@ _elm_win_focus_out(Ecore_Evas *ee)
    _elm_access_object_highlight_disable(evas_object_evas_get(obj));
 
    if (_elm_config->atspi_mode)
-     eo_do(obj, 
eo_event_callback_call(ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_DEACTIVATED, 
NULL));
+     {
+        eo_do(obj, 
eo_event_callback_call(ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_DEACTIVATED, 
NULL));
+        elm_interface_atspi_accessible_state_changed_signal_emit(obj, 
ELM_ATSPI_STATE_ACTIVE, EINA_FALSE);
+     }
 
    /* do nothing */
    /* if (sd->img_obj) */
@@ -5417,4 +5423,16 @@ 
_elm_win_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED,
    return &atspi_actions[0];
 }
 
+EOLIAN static Elm_Atspi_State_Set
+_elm_win_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Win_Data 
*sd EINA_UNUSED)
+{
+   Elm_Atspi_State_Set ret;
+   eo_do_super(obj, MY_CLASS, ret = 
elm_interface_atspi_accessible_state_set_get());
+
+   if (elm_win_focus_get(obj))
+     STATE_TYPE_SET(ret, ELM_ATSPI_STATE_ACTIVE);
+
+   return ret;
+}
+
 #include "elm_win.eo.c"
diff --git a/src/lib/elm_win.eo b/src/lib/elm_win.eo
index 34cc837..8909e45 100644
--- a/src/lib/elm_win.eo
+++ b/src/lib/elm_win.eo
@@ -1620,6 +1620,7 @@ class Elm.Win (Elm.Widget, Elm_Interface_Atspi_Window,
       Elm.Widget.on_focus;
       Elm.Widget.event;
       Elm_Interface_Atspi_Accessible.parent.get;
+      Elm_Interface_Atspi_Accessible.state_set.get;
       Elm_Interface_Atspi_Widget_Action.elm_actions.get;
    }
    constructors {

-- 


Reply via email to