2003-11-26 Padraig O'Briain <padraig.obriain@sun.com>
+ * atk/atkobject.c (atk_object_real_ref_state_set): Add state FOCUSED
+ if object is focus object.
+
+ * atk/atkutil.[ch] (atk_get_focus_object): New function which returns
+ the last object reported by the application as focused.
+
+ * docs/atk-sections.txt, docs/tmpl/atkutil.sgml:
+ Add atk_get_focus_object.
+
+ Fixes bug #127400.
+
+2003-11-26 Padraig O'Briain <padraig.obriain@sun.com>
+
* atk/atkobject.c: Change role names so that the unlocalized names
do not contain hyphens and match the Java role names. Fixes bug #125024.
* docs/tmpl/atkhyperlink.sgml, docs/tmp/atkhypertext.sgml,
docs/tmpl/atkobject.sgml, docs/tmpl/atkrelatiom.sgml,
docs/tmpl/atkselection.sgml, docs/tmpl/atktable.sgml,
- docs/tmpl/atktext.sgml: Regenernate these files. The location of
+ docs/tmpl/atktext.sgml: Regenerate these files. The location of
signal information has changed.
2003-11-24 Padraig O'Briain <padraig.obriain@sun.com>
{
AtkStateSet *state_set;
AtkObject *ap;
+ AtkObject *focus_object;
state_set = atk_state_set_new ();
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);
return state_set;
}
#include "atkutil.h"
#include "atkmarshal.c"
-
static void atk_util_class_init (AtkUtilClass *klass);
+static AtkObject *previous_focus_object = NULL;
+
GType
atk_util_get_type (void)
{
atk_focus_tracker_notify (AtkObject *object)
{
FocusTracker *item;
- static AtkObject *previous_focus_object = NULL;
guint i;
if (trackers == NULL)
}
/**
+ * atk_get_focus_object:
+ *
+ * Gets the currently focused object.
+ *
+ * Returns: the currently focused object for the current application
+ **/
+AtkObject*
+atk_get_focus_object (void)
+{
+ return previous_focus_object;
+}
+
+/**
* atk_get_toolkit_name:
*
* Gets name string for the GUI toolkit implementing ATK for this application.
*/
AtkObject* atk_get_root(void);
+AtkObject* atk_get_focus_object (void);
+
/*
* Returns name string for the GUI toolkit.
*/
atk_add_key_event_listener
atk_remove_key_event_listener
atk_get_root
+atk_get_focus_object
atk_get_toolkit_name
atk_get_toolkit_version
<SUBSECTION Standard>
@Returns:
+<!-- ##### FUNCTION atk_get_focus_object ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
<!-- ##### FUNCTION atk_get_toolkit_name ##### -->
<para>