atk_object_real_ref_state_set (AtkObject *accessible)
{
AtkStateSet *state_set;
- AtkObject *ap;
AtkObject *focus_object;
state_set = atk_state_set_new ();
- ap = atk_object_get_parent (accessible);
- if (ap)
- if (ATK_IS_SELECTION (ap))
- {
- int i;
-
- atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);
-
- i = atk_object_get_index_in_parent (accessible);
- if (i >= 0)
- if (atk_selection_is_child_selected(ATK_SELECTION (ap), i))
- atk_state_set_add_state (state_set, ATK_STATE_SELECTED);
- }
focus_object = atk_get_focus_object ();
if (focus_object == accessible)
atk_state_set_add_state (state_set, ATK_STATE_FOCUSED);