summaryrefslogtreecommitdiff
path: root/atk/atkutil.c
diff options
context:
space:
mode:
authorPadraig O'Briain <padraig.obriain@sun.com>2003-11-26 17:13:29 +0000
committerPadraig O'Briain <padraigo@src.gnome.org>2003-11-26 17:13:29 +0000
commit28cb9499b8c268e1e50608f90ae09417599de293 (patch)
treecf47335fd8c47310b04aa51e60d52b77be9564a4 /atk/atkutil.c
parentf3f15d1b08f403f5e4f1c93e6661af34f0e4aae2 (diff)
downloadatk-28cb9499b8c268e1e50608f90ae09417599de293.tar.gz
Add state FOCUSED if object is focus object.
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.
Diffstat (limited to 'atk/atkutil.c')
-rwxr-xr-xatk/atkutil.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/atk/atkutil.c b/atk/atkutil.c
index 7089782..5e4cdab 100755
--- a/atk/atkutil.c
+++ b/atk/atkutil.c
@@ -20,9 +20,10 @@
#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)
{
@@ -174,7 +175,6 @@ void
atk_focus_tracker_notify (AtkObject *object)
{
FocusTracker *item;
- static AtkObject *previous_focus_object = NULL;
guint i;
if (trackers == NULL)
@@ -318,6 +318,19 @@ atk_get_root (void)
}
/**
+ * 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.