[gtk/wip/ebassi/a11y] Move ATK inside GTK



commit b8fb4353b60f647e78102a82374880a07b9e7f4e
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Jan 21 17:55:50 2020 +0000

    Move ATK inside GTK
    
    This is a temporary move that aims to make GTK's accessibility support
    independent of external components.
    
    ATK has lived outside of GTK since its inception, as it was meant to be
    a generic API implemented by different toolkits; that mostly failed, and
    we're now stuck with an abstraction layer that doesn't really abstract
    anything of value. What it did bring, on the other hand, was maintenance
    burden, with changes being propagated across different projects—ATK,
    GTK, and whatever accessibility layer implemented the bridge to ATSPI on
    Linux. This complexity is completely unwarranted for the benefits it
    gives us.
    
    Ideally, we'd get rid of ATK entirely, and expose the accessility API as
    part of the GTK namespace, but that is a fairly sizeable work, so we can
    start from this step. The ATK namespace is maintained, similarly to how
    we maintain the GDK, GSK, and GTK namespaces. The API is still public,
    so that GTK and out of tree widgets can consume it.
    
    The inclusion of ATK comes with the removal of the deprecated entry
    points and types, as that's a good chance to begin the cleanup of this
    mess of an API. Sadly, this also means we have to disable the a11y tests
    for the time being, as they depend on rando API from 2002.
    
    Another side effect of moving ATK in tree is that we cannot link to
    atk-bridge on X11, as that will link to the out of tree ATK; this means
    that accessibility is disabled on X11.

 atk/atk.h                           |   62 ++
 atk/atkaction.c                     |  286 +++++++
 atk/atkaction.h                     |  130 +++
 atk/atkcomponent.c                  |  598 ++++++++++++++
 atk/atkcomponent.h                  |  232 ++++++
 atk/atkdocument.c                   |  324 ++++++++
 atk/atkdocument.h                   |  103 +++
 atk/atkeditabletext.c               |  237 ++++++
 atk/atkeditabletext.h               |  108 +++
 atk/atkenums.h                      |  870 ++++++++++++++++++++
 atk/atkenumtypes.c.template         |   38 +
 atk/atkenumtypes.h.template         |   26 +
 atk/atkgobjectaccessible.c          |  206 +++++
 atk/atkgobjectaccessible.h          |   68 ++
 atk/atkhyperlink.c                  |  373 +++++++++
 atk/atkhyperlink.h                  |  101 +++
 atk/atkhyperlinkimpl.c              |  108 +++
 atk/atkhyperlinkimpl.h              |   67 ++
 atk/atkhypertext.c                  |  181 +++++
 atk/atkhypertext.h                  |   77 ++
 atk/atkimage.c                      |  246 ++++++
 atk/atkimage.h                      |   89 ++
 atk/atkmarshal.list                 |   29 +
 atk/atknoopobject.c                 |  208 +++++
 atk/atknoopobject.h                 |   59 ++
 atk/atknoopobjectfactory.c          |  116 +++
 atk/atknoopobjectfactory.h          |   59 ++
 atk/atkobject.c                     | 1514 +++++++++++++++++++++++++++++++++++
 atk/atkobject.h                     |  389 +++++++++
 atk/atkobjectfactory.c              |  147 ++++
 atk/atkobjectfactory.h              |   72 ++
 atk/atkplug.c                       |  194 +++++
 atk/atkplug.h                       |   68 ++
 atk/atkprivate.c                    |  131 +++
 atk/atkprivate.h                    |   36 +
 atk/atkrange.c                      |  169 ++++
 atk/atkrange.h                      |   58 ++
 atk/atkregistry.c                   |  274 +++++++
 atk/atkregistry.h                   |   74 ++
 atk/atkrelation.c                   |  501 ++++++++++++
 atk/atkrelation.h                   |   97 +++
 atk/atkrelationset.c                |  409 ++++++++++
 atk/atkrelationset.h                |   91 +++
 atk/atkrelationtype.h               |   33 +
 atk/atkselection.c                  |  289 +++++++
 atk/atkselection.h                  |  100 +++
 atk/atksocket.c                     |  199 +++++
 atk/atksocket.h                     |   71 ++
 atk/atkstate.c                      |  143 ++++
 atk/atkstate.h                      |   43 +
 atk/atkstateset.c                   |  384 +++++++++
 atk/atkstateset.h                   |   92 +++
 atk/atkstreamablecontent.c          |  181 +++++
 atk/atkstreamablecontent.h          |  110 +++
 atk/atktable.c                      |  892 +++++++++++++++++++++
 atk/atktable.h                      |  223 ++++++
 atk/atktablecell.c                  |  277 +++++++
 atk/atktablecell.h                  |  110 +++
 atk/atktext.c                       | 1444 +++++++++++++++++++++++++++++++++
 atk/atktext.h                       |  329 ++++++++
 atk/atktypes.h                      |    9 +
 atk/atkutil.c                       |  374 +++++++++
 atk/atkutil.h                       |  306 +++++++
 atk/atkvalue.c                      |  591 ++++++++++++++
 atk/atkvalue.h                      |   96 +++
 atk/atkwindow.c                     |  168 ++++
 atk/atkwindow.h                     |   53 ++
 atk/meson.build                     |  114 +++
 gtk/a11y/gtkaccessibility.c         |    9 -
 gtk/a11y/gtkaccessibilityutil.c     |   14 -
 gtk/a11y/gtklevelbaraccessible.c    |   65 --
 gtk/a11y/gtkpanedaccessible.c       |   87 --
 gtk/a11y/gtkprogressbaraccessible.c |   35 -
 gtk/a11y/gtkrangeaccessible.c       |   98 ---
 gtk/a11y/gtkscalebuttonaccessible.c |   91 ---
 gtk/a11y/gtkspinbuttonaccessible.c  |   91 ---
 gtk/gtkiconview.c                   |    3 -
 gtk/meson.build                     |   29 +-
 meson.build                         |   14 +-
 testsuite/meson.build               |    1 -
 80 files changed, 15882 insertions(+), 511 deletions(-)
---
diff --git a/atk/atk.h b/atk/atk.h
new file mode 100644
index 0000000000..14ca29dbca
--- /dev/null
+++ b/atk/atk.h
@@ -0,0 +1,62 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_H__
+#define __ATK_H__
+
+#define __ATK_H_INSIDE__
+
+#include <atk/atktypes.h>
+
+#include <atk/atkobject.h>
+#include <atk/atkaction.h>
+#include <atk/atkcomponent.h>
+#include <atk/atkdocument.h>
+#include <atk/atkeditabletext.h>
+#include <atk/atkenums.h>
+#include <atk/atkgobjectaccessible.h>
+#include <atk/atkhyperlink.h>
+#include <atk/atkhyperlinkimpl.h>
+#include <atk/atkhypertext.h>
+#include <atk/atkimage.h>
+#include <atk/atknoopobject.h>
+#include <atk/atknoopobjectfactory.h>
+#include <atk/atkobjectfactory.h>
+#include <atk/atkplug.h>
+#include <atk/atkrange.h>
+#include <atk/atkregistry.h>
+#include <atk/atkrelation.h>
+#include <atk/atkrelationset.h>
+#include <atk/atkselection.h>
+#include <atk/atksocket.h>
+#include <atk/atkstate.h>
+#include <atk/atkstateset.h>
+#include <atk/atkstreamablecontent.h>
+#include <atk/atktable.h>
+#include <atk/atktablecell.h>
+#include <atk/atktext.h>
+#include <atk/atkutil.h>
+#include <atk/atkvalue.h>
+#include <atk/atkwindow.h>
+
+#include <atk/atkenumtypes.h>
+
+#undef __ATK_H_INSIDE__
+
+#endif /* __ATK_H__ */
diff --git a/atk/atkaction.c b/atk/atkaction.c
new file mode 100644
index 0000000000..bc12cb23cc
--- /dev/null
+++ b/atk/atkaction.c
@@ -0,0 +1,286 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkaction.h"
+
+/**
+ * SECTION:atkaction
+ * @Short_description: The ATK interface provided by UI components
+ * which the user can activate/interact with.
+ * @Title:AtkAction
+ *
+ * #AtkAction should be implemented by instances of #AtkObject classes
+ * with which the user can interact directly, i.e. buttons,
+ * checkboxes, scrollbars, e.g. components which are not "passive"
+ * providers of UI information.
+ *
+ * Exceptions: when the user interaction is already covered by another
+ * appropriate interface such as #AtkEditableText (insert/delete text,
+ * etc.) or #AtkValue (set value) then these actions should not be
+ * exposed by #AtkAction as well.
+ *
+ * Though most UI interactions on components should be invocable via
+ * keyboard as well as mouse, there will generally be a close mapping
+ * between "mouse actions" that are possible on a component and the
+ * AtkActions.  Where mouse and keyboard actions are redundant in
+ * effect, #AtkAction should expose only one action rather than
+ * exposing redundant actions if possible.  By convention we have been
+ * using "mouse centric" terminology for #AtkAction names.
+ *
+ */
+
+GType
+atk_action_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) {
+    GTypeInfo tinfo =
+    {
+      sizeof (AtkActionIface),
+      (GBaseInitFunc) NULL,
+      (GBaseFinalizeFunc) NULL,
+
+    };
+
+    type = g_type_register_static (G_TYPE_INTERFACE, "AtkAction", &tinfo, 0);
+  }
+
+  return type;
+}
+
+/**
+ * atk_action_do_action:
+ * @action: a #GObject instance that implements AtkActionIface
+ * @i: the action index corresponding to the action to be performed 
+ *
+ * Perform the specified action on the object.
+ *
+ * Returns: %TRUE if success, %FALSE otherwise
+ *
+ **/
+gboolean
+atk_action_do_action (AtkAction *obj,
+                      gint      i)
+{
+  AtkActionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_ACTION (obj), FALSE);
+
+  iface = ATK_ACTION_GET_IFACE (obj);
+
+  if (iface->do_action)
+    return (iface->do_action) (obj, i);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_action_get_n_actions:
+ * @action: a #GObject instance that implements AtkActionIface
+ * 
+ * Gets the number of accessible actions available on the object.
+ * If there are more than one, the first one is considered the
+ * "default" action of the object.
+ *
+ * Returns: a the number of actions, or 0 if @action does not
+ * implement this interface.
+ **/
+gint
+atk_action_get_n_actions  (AtkAction *obj)
+{
+  AtkActionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_ACTION (obj), 0);
+
+  iface = ATK_ACTION_GET_IFACE (obj);
+
+  if (iface->get_n_actions)
+    return (iface->get_n_actions) (obj);
+  else
+    return 0;
+}
+
+/**
+ * atk_action_get_description:
+ * @action: a #GObject instance that implements AtkActionIface
+ * @i: the action index corresponding to the action to be performed 
+ *
+ * Returns a description of the specified action of the object.
+ *
+ * Returns: (nullable): a description string, or %NULL if @action does
+ * not implement this interface.
+ **/
+const gchar*
+atk_action_get_description (AtkAction *obj,
+                            gint      i)
+{
+  AtkActionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_ACTION (obj), NULL);
+
+  iface = ATK_ACTION_GET_IFACE (obj);
+
+  if (iface->get_description)
+    return (iface->get_description) (obj, i);
+  else
+    return NULL;
+}
+
+/**
+ * atk_action_get_name:
+ * @action: a #GObject instance that implements AtkActionIface
+ * @i: the action index corresponding to the action to be performed 
+ *
+ * Returns a non-localized string naming the specified action of the 
+ * object. This name is generally not descriptive of the end result 
+ * of the action, but instead names the 'interaction type' which the 
+ * object supports. By convention, the above strings should be used to 
+ * represent the actions which correspond to the common point-and-click 
+ * interaction techniques of the same name: i.e. 
+ * "click", "press", "release", "drag", "drop", "popup", etc.
+ * The "popup" action should be used to pop up a context menu for the 
+ * object, if one exists.
+ *
+ * For technical reasons, some toolkits cannot guarantee that the 
+ * reported action is actually 'bound' to a nontrivial user event;
+ * i.e. the result of some actions via atk_action_do_action() may be
+ * NIL.
+ *
+ * Returns: (nullable): a name string, or %NULL if @action does not
+ * implement this interface.
+ **/
+const gchar*
+atk_action_get_name (AtkAction *obj,
+                     gint      i)
+{
+  AtkActionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_ACTION (obj), NULL);
+
+  iface = ATK_ACTION_GET_IFACE (obj);
+
+  if (iface->get_name)
+    return (iface->get_name) (obj, i);
+  else
+    return NULL;
+}
+
+/**
+ * atk_action_get_localized_name:
+ * @action: a #GObject instance that implements AtkActionIface
+ * @i: the action index corresponding to the action to be performed 
+ *
+ * Returns the localized name of the specified action of the object.
+ *
+ * Returns: (nullable): a name string, or %NULL if @action does not
+ * implement this interface.
+ **/
+const gchar*
+atk_action_get_localized_name (AtkAction *obj,
+                               gint      i)
+{
+  AtkActionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_ACTION (obj), NULL);
+
+  iface = ATK_ACTION_GET_IFACE (obj);
+
+  if (iface->get_localized_name)
+    return (iface->get_localized_name) (obj, i);
+  else
+    return NULL;
+}
+
+/**
+ * atk_action_get_keybinding:
+ * @action: a #GObject instance that implements AtkActionIface
+ * @i: the action index corresponding to the action to be performed
+ *
+ * Gets the keybinding which can be used to activate this action, if one
+ * exists. The string returned should contain localized, human-readable,
+ * key sequences as they would appear when displayed on screen. It must
+ * be in the format "mnemonic;sequence;shortcut".
+ *
+ * - The mnemonic key activates the object if it is presently enabled onscreen.
+ *   This typically corresponds to the underlined letter within the widget.
+ *   Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for
+ *   a button.
+ * - The sequence is the full list of keys which invoke the action even if the
+ *   relevant element is not currently shown on screen. For instance, for a menu
+ *   item the sequence is the keybindings used to open the parent menus before
+ *   invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a
+ *   traditional "New..." menu item.
+ * - The shortcut, if it exists, will invoke the same action without showing
+ *   the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a
+ *   traditional "New..." menu item.
+ *
+ * Example: For a traditional "New..." menu item, the expected return value
+ * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N"
+ * for the German locale. If, hypothetically, this menu item lacked a mnemonic,
+ * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.
+ *
+ * Returns: (nullable): the keybinding which can be used to activate
+ * this action, or %NULL if there is no keybinding for this action.
+ *
+ **/
+const gchar*
+atk_action_get_keybinding (AtkAction *obj,
+                           gint      i)
+{
+  AtkActionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_ACTION (obj), NULL);
+
+  iface = ATK_ACTION_GET_IFACE (obj);
+
+  if (iface->get_keybinding)
+    return (iface->get_keybinding) (obj, i);
+  else
+    return NULL;
+}
+
+/**
+ * atk_action_set_description:
+ * @action: a #GObject instance that implements AtkActionIface
+ * @i: the action index corresponding to the action to be performed 
+ * @desc: the description to be assigned to this action
+ *
+ * Sets a description of the specified action of the object.
+ *
+ * Returns: a gboolean representing if the description was successfully set;
+ **/
+gboolean
+atk_action_set_description (AtkAction   *obj,
+                            gint        i,
+                            const gchar *desc)
+{
+  AtkActionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_ACTION (obj), FALSE);
+
+  iface = ATK_ACTION_GET_IFACE (obj);
+
+  if (iface->set_description)
+    return (iface->set_description) (obj, i, desc);
+  else
+    return FALSE;
+}
diff --git a/atk/atkaction.h b/atk/atkaction.h
new file mode 100644
index 0000000000..e2a74271f9
--- /dev/null
+++ b/atk/atkaction.h
@@ -0,0 +1,130 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_ACTION_H__
+#define __ATK_ACTION_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atktypes.h>
+
+G_BEGIN_DECLS
+
+/*
+ */
+
+
+#define ATK_TYPE_ACTION                    (atk_action_get_type ())
+#define ATK_IS_ACTION(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_ACTION)
+#define ATK_ACTION(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_ACTION, AtkAction)
+#define ATK_ACTION_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_ACTION, 
AtkActionIface))
+
+#ifndef _TYPEDEF_ATK_ACTION_
+#define _TYPEDEF_ATK_ACTION_
+typedef struct _AtkAction AtkAction;
+#endif
+typedef struct _AtkActionIface AtkActionIface;
+
+/**
+ * AtkActionIface:
+ * @do_action:
+ * @get_n_actions:
+ * @get_description:
+ * @get_name:
+ * @get_keybinding:
+ * @set_description:
+ * @get_localized_name:
+ *
+ * The #AtkAction interface should be supported by any object that can
+ * perform one or more actions. The interface provides the standard
+ * mechanism for an assistive technology to determine what those actions
+ * are as well as tell the object to perform them. Any object that can
+ * be manipulated should support this interface.
+ */
+struct _AtkActionIface
+{
+  /*< private >*/
+  GTypeInterface parent;
+
+  /*< public >*/
+  gboolean                (*do_action)         (AtkAction         *action,
+                                                gint              i);
+  gint                    (*get_n_actions)     (AtkAction         *action);
+  const gchar*            (*get_description)   (AtkAction         *action,
+                                                gint              i);
+  const gchar*            (*get_name)          (AtkAction         *action,
+                                                gint              i);
+  const gchar*            (*get_keybinding)    (AtkAction         *action,
+                                                gint              i);
+  gboolean                (*set_description)   (AtkAction         *action,
+                                                gint              i,
+                                                const gchar       *desc);
+  const gchar*            (*get_localized_name)(AtkAction         *action,
+                                               gint              i);
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_action_get_type (void);
+
+/*
+ * These are the function which would be called by an application with
+ * the argument being a AtkObject object cast to (AtkAction).
+ *
+ * The function will just check that * the corresponding
+ * function pointer is not NULL and will call it.
+ *
+ * The "real" implementation of the function for accessible will be
+ * provided in a support library
+ */
+
+GDK_AVAILABLE_IN_ALL
+gboolean   atk_action_do_action                (AtkAction         *action,
+                                            gint              i);
+GDK_AVAILABLE_IN_ALL
+gint   atk_action_get_n_actions            (AtkAction *action);
+GDK_AVAILABLE_IN_ALL
+const gchar*          atk_action_get_description  (AtkAction         *action,
+                                                   gint              i);
+GDK_AVAILABLE_IN_ALL
+const gchar*          atk_action_get_name         (AtkAction         *action,
+                                                   gint              i);
+GDK_AVAILABLE_IN_ALL
+const gchar*          atk_action_get_keybinding   (AtkAction         *action,
+                                                   gint              i);
+GDK_AVAILABLE_IN_ALL
+gboolean              atk_action_set_description  (AtkAction         *action,
+                                                   gint              i,
+                                                   const gchar       *desc);
+
+/* NEW in ATK 1.1: */
+GDK_AVAILABLE_IN_ALL
+const gchar* atk_action_get_localized_name (AtkAction       *action,
+                                                    gint            i);
+
+/*
+ * Additional GObject properties exported by AtkAction:
+ *    "accessible_action"
+ *       (an accessible action, or the list of actions, has changed)
+ */
+
+G_END_DECLS
+
+#endif /* __ATK_ACTION_H__ */
diff --git a/atk/atkcomponent.c b/atk/atkcomponent.c
new file mode 100644
index 0000000000..cc7cd540d6
--- /dev/null
+++ b/atk/atkcomponent.c
@@ -0,0 +1,598 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkcomponent.h"
+
+/**
+ * SECTION:atkcomponent
+ * @Short_description: The ATK interface provided by UI components
+ * which occupy a physical area on the screen.
+ * which the user can activate/interact with.
+ * @Title:AtkComponent
+ *
+ * #AtkComponent should be implemented by most if not all UI elements
+ * with an actual on-screen presence, i.e. components which can be
+ * said to have a screen-coordinate bounding box.  Virtually all
+ * widgets will need to have #AtkComponent implementations provided
+ * for their corresponding #AtkObject class.  In short, only UI
+ * elements which are *not* GUI elements will omit this ATK interface.
+ *
+ * A possible exception might be textual information with a
+ * transparent background, in which case text glyph bounding box
+ * information is provided by #AtkText.
+ */
+
+enum {
+  BOUNDS_CHANGED,
+  LAST_SIGNAL
+};
+
+static void       atk_component_base_init (AtkComponentIface *class);
+
+static gboolean   atk_component_real_contains                (AtkComponent *component,
+                                                              gint         x,
+                                                              gint         y,
+                                                              AtkCoordType coord_type);
+
+static AtkObject* atk_component_real_ref_accessible_at_point (AtkComponent *component,
+                                                              gint         x,
+                                                              gint         y,
+                                                              AtkCoordType coord_type);
+
+static void      atk_component_real_get_position             (AtkComponent *component,
+                                                              gint         *x,
+                                                              gint         *y,
+                                                              AtkCoordType coord_type);
+
+static void      atk_component_real_get_size                 (AtkComponent *component,
+                                                              gint         *width,
+                                                              gint         *height);
+
+static guint atk_component_signals[LAST_SIGNAL] = { 0 };
+
+GType
+atk_component_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) {
+    static const GTypeInfo tinfo =
+    {
+      sizeof (AtkComponentIface),
+      (GBaseInitFunc) atk_component_base_init,
+      (GBaseFinalizeFunc) NULL,
+
+    };
+
+    type = g_type_register_static (G_TYPE_INTERFACE, "AtkComponent", &tinfo, 0);
+  }
+
+  return type;
+}
+
+static void
+atk_component_base_init (AtkComponentIface *class)
+{
+  static gboolean initialized = FALSE;
+
+  if (! initialized)
+    {
+      class->ref_accessible_at_point = atk_component_real_ref_accessible_at_point;
+      class->contains = atk_component_real_contains;
+      class->get_position = atk_component_real_get_position;
+      class->get_size = atk_component_real_get_size;
+
+
+      /**
+       * AtkComponent::bounds-changed:
+       * @atkcomponent: the object which received the signal.
+       * @arg1: The AtkRectangle giving the new position and size.
+       *
+       * The 'bounds-changed" signal is emitted when the bposition or
+       * size of the component changes.
+       */
+      atk_component_signals[BOUNDS_CHANGED] =
+        g_signal_new ("bounds_changed",
+                      ATK_TYPE_COMPONENT,
+                      G_SIGNAL_RUN_LAST,
+                      G_STRUCT_OFFSET (AtkComponentIface, bounds_changed),
+                      (GSignalAccumulator) NULL, NULL,
+                      g_cclosure_marshal_VOID__BOXED,
+                      G_TYPE_NONE, 1,
+                      ATK_TYPE_RECTANGLE | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+      initialized = TRUE;
+    }
+}
+
+
+/**
+ * atk_component_contains:
+ * @component: the #AtkComponent
+ * @x: x coordinate
+ * @y: y coordinate
+ * @coord_type: specifies whether the coordinates are relative to the screen
+ * or to the components top level window
+ *
+ * Checks whether the specified point is within the extent of the @component.
+ *
+ * Toolkit implementor note: ATK provides a default implementation for
+ * this virtual method. In general there are little reason to
+ * re-implement it.
+ *
+ * Returns: %TRUE or %FALSE indicating whether the specified point is within
+ * the extent of the @component or not
+ **/
+gboolean
+atk_component_contains (AtkComponent    *component,
+                        gint            x,
+                        gint            y,
+                        AtkCoordType    coord_type)
+{
+  AtkComponentIface *iface = NULL;
+  g_return_val_if_fail (ATK_IS_COMPONENT (component), FALSE);
+
+  iface = ATK_COMPONENT_GET_IFACE (component);
+
+  if (iface->contains)
+    return (iface->contains) (component, x, y, coord_type);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_component_ref_accessible_at_point:
+ * @component: the #AtkComponent
+ * @x: x coordinate
+ * @y: y coordinate
+ * @coord_type: specifies whether the coordinates are relative to the screen
+ * or to the components top level window
+ *
+ * Gets a reference to the accessible child, if one exists, at the
+ * coordinate point specified by @x and @y.
+ *
+ * Returns: (nullable) (transfer full): a reference to the accessible
+ * child, if one exists
+ **/
+AtkObject*
+atk_component_ref_accessible_at_point (AtkComponent    *component,
+                                       gint            x,
+                                       gint            y,
+                                       AtkCoordType    coord_type)
+{
+  AtkComponentIface *iface = NULL;
+  g_return_val_if_fail (ATK_IS_COMPONENT (component), NULL);
+
+  iface = ATK_COMPONENT_GET_IFACE (component);
+
+  if (iface->ref_accessible_at_point)
+    return (iface->ref_accessible_at_point) (component, x, y, coord_type);
+  else
+    return NULL;
+}
+
+/**
+ * atk_component_get_extents:
+ * @component: an #AtkComponent
+ * @x: (out) (optional): address of #gint to put x coordinate
+ * @y: (out) (optional): address of #gint to put y coordinate
+ * @width: (out) (optional): address of #gint to put width
+ * @height: (out) (optional): address of #gint to put height
+ * @coord_type: specifies whether the coordinates are relative to the screen
+ * or to the components top level window
+ *
+ * Gets the rectangle which gives the extent of the @component.
+ *
+ * If the extent can not be obtained (e.g. a non-embedded plug or missing
+ * support), all of x, y, width, height are set to -1.
+ *
+ **/
+void
+atk_component_get_extents    (AtkComponent    *component,
+                              gint            *x,
+                              gint            *y,
+                              gint            *width,
+                              gint            *height,
+                              AtkCoordType    coord_type)
+{
+  AtkComponentIface *iface = NULL;
+  gint local_x, local_y, local_width, local_height;
+  gint *real_x, *real_y, *real_width, *real_height;
+
+  g_return_if_fail (ATK_IS_COMPONENT (component));
+
+  if (x)
+    real_x = x;
+  else
+    real_x = &local_x;
+  if (y)
+    real_y = y;
+  else
+    real_y = &local_y;
+  if (width)
+    real_width = width;
+  else
+    real_width = &local_width;
+  if (height)
+    real_height = height;
+  else
+    real_height = &local_height;
+
+  iface = ATK_COMPONENT_GET_IFACE (component);
+
+  if (iface->get_extents)
+    (iface->get_extents) (component, real_x, real_y, real_width, real_height, coord_type);
+  else
+    {
+      *real_x = -1;
+      *real_y = -1;
+      *real_width = -1;
+      *real_height = -1;
+    }
+}
+
+/**
+ * atk_component_get_layer:
+ * @component: an #AtkComponent
+ *
+ * Gets the layer of the component.
+ *
+ * Returns: an #AtkLayer which is the layer of the component
+ **/
+AtkLayer
+atk_component_get_layer (AtkComponent *component) 
+{
+  AtkComponentIface *iface;
+
+  g_return_val_if_fail (ATK_IS_COMPONENT (component), ATK_LAYER_INVALID);
+
+  iface = ATK_COMPONENT_GET_IFACE (component);
+  if (iface->get_layer)
+    return (iface->get_layer) (component);
+  else
+    return ATK_LAYER_WIDGET;
+}
+
+/**
+ * atk_component_get_mdi_zorder:
+ * @component: an #AtkComponent
+ *
+ * Gets the zorder of the component. The value G_MININT will be returned 
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
+ *
+ * Returns: a gint which is the zorder of the component, i.e. the depth at 
+ * which the component is shown in relation to other components in the same 
+ * container.
+ **/
+gint
+atk_component_get_mdi_zorder (AtkComponent *component) 
+{
+  AtkComponentIface *iface;
+
+  g_return_val_if_fail (ATK_IS_COMPONENT (component), G_MININT);
+
+  iface = ATK_COMPONENT_GET_IFACE (component);
+  if (iface->get_mdi_zorder)
+    return (iface->get_mdi_zorder) (component);
+  else
+    return G_MININT;
+}
+
+/**
+ * atk_component_get_alpha:
+ * @component: an #AtkComponent
+ *
+ * Returns the alpha value (i.e. the opacity) for this
+ * @component, on a scale from 0 (fully transparent) to 1.0
+ * (fully opaque).
+ *
+ * Returns: An alpha value from 0 to 1.0, inclusive.
+ * Since: 1.12
+ **/
+gdouble
+atk_component_get_alpha (AtkComponent    *component)
+{
+  AtkComponentIface *iface;
+
+  g_return_val_if_fail (ATK_IS_COMPONENT (component), G_MININT);
+
+  iface = ATK_COMPONENT_GET_IFACE (component);
+  if (iface->get_alpha)
+    return (iface->get_alpha) (component);
+  else
+    return (gdouble) 1.0;
+}
+
+/**
+ * atk_component_grab_focus:
+ * @component: an #AtkComponent
+ *
+ * Grabs focus for this @component.
+ *
+ * Returns: %TRUE if successful, %FALSE otherwise.
+ **/
+gboolean
+atk_component_grab_focus (AtkComponent    *component)
+{
+  AtkComponentIface *iface = NULL;
+  g_return_val_if_fail (ATK_IS_COMPONENT (component), FALSE);
+
+  iface = ATK_COMPONENT_GET_IFACE (component);
+
+  if (iface->grab_focus)
+    return (iface->grab_focus) (component);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_component_set_extents:
+ * @component: an #AtkComponent
+ * @x: x coordinate
+ * @y: y coordinate
+ * @width: width to set for @component
+ * @height: height to set for @component
+ * @coord_type: specifies whether the coordinates are relative to the screen
+ * or to the components top level window
+ *
+ * Sets the extents of @component.
+ *
+ * Returns: %TRUE or %FALSE whether the extents were set or not
+ **/
+gboolean
+atk_component_set_extents   (AtkComponent    *component,
+                             gint            x,
+                             gint            y,
+                             gint            width,
+                             gint            height,
+                             AtkCoordType    coord_type)
+{
+  AtkComponentIface *iface = NULL;
+  g_return_val_if_fail (ATK_IS_COMPONENT (component), FALSE);
+
+  iface = ATK_COMPONENT_GET_IFACE (component);
+
+  if (iface->set_extents)
+    return (iface->set_extents) (component, x, y, width, height, coord_type);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_component_set_position:
+ * @component: an #AtkComponent
+ * @x: x coordinate
+ * @y: y coordinate
+ * @coord_type: specifies whether the coordinates are relative to the screen
+ * or to the component's top level window
+ *
+ * Sets the position of @component.
+ *
+ * Contrary to atk_component_scroll_to, this does not trigger any scrolling,
+ * this just moves @component in its parent.
+ *
+ * Returns: %TRUE or %FALSE whether or not the position was set or not
+ **/
+gboolean
+atk_component_set_position   (AtkComponent    *component,
+                              gint            x,
+                              gint            y,
+                              AtkCoordType    coord_type)
+{
+  AtkComponentIface *iface = NULL;
+  g_return_val_if_fail (ATK_IS_COMPONENT (component), FALSE);
+
+  iface = ATK_COMPONENT_GET_IFACE (component);
+
+  if (iface->set_position)
+    return (iface->set_position) (component, x, y, coord_type);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_component_set_size:
+ * @component: an #AtkComponent
+ * @width: width to set for @component
+ * @height: height to set for @component
+ *
+ * Set the size of the @component in terms of width and height.
+ *
+ * Returns: %TRUE or %FALSE whether the size was set or not
+ **/
+gboolean
+atk_component_set_size       (AtkComponent    *component,
+                              gint            x,
+                              gint            y)
+{
+  AtkComponentIface *iface = NULL;
+  g_return_val_if_fail (ATK_IS_COMPONENT (component), FALSE);
+
+  iface = ATK_COMPONENT_GET_IFACE (component);
+
+  if (iface->set_size)
+    return (iface->set_size) (component, x, y);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_component_scroll_to:
+ * @component: an #AtkComponent
+ * @type: specify where the object should be made visible.
+ *
+ * Makes @component visible on the screen by scrolling all necessary parents.
+ *
+ * Contrary to atk_component_set_position, this does not actually move
+ * @component in its parent, this only makes the parents scroll so that the
+ * object shows up on the screen, given its current position within the parents.
+ *
+ * Returns: whether scrolling was successful.
+ *
+ * Since: 2.30
+ */
+gboolean
+atk_component_scroll_to (AtkComponent  *component,
+                         AtkScrollType  type)
+{
+  AtkComponentIface *iface = NULL;
+  g_return_val_if_fail (ATK_IS_COMPONENT (component), FALSE);
+
+  iface = ATK_COMPONENT_GET_IFACE (component);
+
+  if (iface->scroll_to)
+    return (iface->scroll_to) (component, type);
+
+  return FALSE;
+}
+
+/**
+ * atk_component_scroll_to_point:
+ * @component: an #AtkComponent
+ * @coords: specify whether coordinates are relative to the screen or to the
+ * parent object.
+ * @x: x-position where to scroll to
+ * @y: y-position where to scroll to
+ *
+ * Move the top-left of @component to a given position of the screen by
+ * scrolling all necessary parents.
+ *
+ * Returns: whether scrolling was successful.
+ *
+ * Since: 2.30
+ */
+gboolean
+atk_component_scroll_to_point (AtkComponent *component,
+                               AtkCoordType  coords,
+                               gint          x,
+                               gint          y)
+{
+  AtkComponentIface *iface = NULL;
+  g_return_val_if_fail (ATK_IS_COMPONENT (component), FALSE);
+
+  iface = ATK_COMPONENT_GET_IFACE (component);
+
+  if (iface->scroll_to_point)
+    return (iface->scroll_to_point) (component, coords, x, y);
+
+  return FALSE;
+}
+
+static gboolean
+atk_component_real_contains (AtkComponent *component,
+                             gint         x,
+                             gint         y,
+                             AtkCoordType coord_type)
+{
+  gint real_x, real_y, width, height;
+
+  real_x = real_y = width = height = 0;
+
+  atk_component_get_extents (component, &real_x, &real_y, &width, &height, coord_type);
+
+  if ((x >= real_x) &&
+      (x < real_x + width) &&
+      (y >= real_y) &&
+      (y < real_y + height))
+    return TRUE;
+  else
+    return FALSE;
+}
+
+static AtkObject* 
+atk_component_real_ref_accessible_at_point (AtkComponent *component,
+                                            gint         x,
+                                            gint         y,
+                                            AtkCoordType coord_type)
+{
+  gint count, i;
+
+  count = atk_object_get_n_accessible_children (ATK_OBJECT (component));
+
+  for (i = 0; i < count; i++)
+  {
+    AtkObject *obj;
+
+    obj = atk_object_ref_accessible_child (ATK_OBJECT (component), i);
+
+    if (obj != NULL)
+    {
+      if (atk_component_contains (ATK_COMPONENT (obj), x, y, coord_type))
+      {
+        return obj;
+      }
+      else
+      {
+        g_object_unref (obj);
+      }
+    }
+  }
+  return NULL;
+}
+
+static void
+atk_component_real_get_position (AtkComponent *component,
+                                 gint         *x,
+                                 gint         *y,
+                                 AtkCoordType coord_type)
+{
+  gint width, height;
+
+  atk_component_get_extents (component, x, y, &width, &height, coord_type);
+}
+
+static void
+atk_component_real_get_size (AtkComponent *component,
+                             gint         *width,
+                             gint         *height)
+{
+  gint x, y;
+  AtkCoordType coord_type;
+
+  /*
+   * Pick one coordinate type; it does not matter for size
+   */
+  coord_type = ATK_XY_WINDOW;
+
+  atk_component_get_extents (component, &x, &y, width, height, coord_type);
+}
+
+static AtkRectangle *
+atk_rectangle_copy (const AtkRectangle *rectangle)
+{
+  AtkRectangle *result = g_new (AtkRectangle, 1);
+  *result = *rectangle;
+
+  return result;
+}
+
+GType
+atk_rectangle_get_type (void)
+{
+  static GType our_type = 0;
+
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static ("AtkRectangle",
+                                             (GBoxedCopyFunc)atk_rectangle_copy,
+                                             (GBoxedFreeFunc)g_free);
+  return our_type;
+}
+
diff --git a/atk/atkcomponent.h b/atk/atkcomponent.h
new file mode 100644
index 0000000000..de33022075
--- /dev/null
+++ b/atk/atkcomponent.h
@@ -0,0 +1,232 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_COMPONENT_H__
+#define __ATK_COMPONENT_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atktypes.h>
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_COMPONENT                    (atk_component_get_type ())
+#define ATK_IS_COMPONENT(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_COMPONENT)
+#define ATK_COMPONENT(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_COMPONENT, 
AtkComponent)
+#define ATK_COMPONENT_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_COMPONENT, 
AtkComponentIface))
+
+#ifndef _TYPEDEF_ATK_COMPONENT_
+#define _TYPEDEF_ATK_COMPONENT_
+typedef struct _AtkComponent AtkComponent;
+#endif
+typedef struct _AtkComponentIface  AtkComponentIface;
+
+typedef struct _AtkRectangle       AtkRectangle;
+
+/**
+ * AtkRectangle:
+ * @x: X coordinate of the left side of the rectangle.
+ * @y: Y coordinate of the top side of the rectangle.
+ * @width: width of the rectangle.
+ * @height: height of the rectangle.
+ *
+ * A data structure for holding a rectangle. Those coordinates are
+ * relative to the component top-level parent.
+ */
+struct _AtkRectangle
+{
+  gint x;
+  gint y;
+  gint width;
+  gint height;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_rectangle_get_type (void);
+
+#define ATK_TYPE_RECTANGLE (atk_rectangle_get_type ())
+
+/**
+ * AtkComponentIface:
+ * @add_focus_handler: This virtual function is deprecated since 2.9.4
+ *   and it should not be overriden. See atk_component_add_focus_handler()
+ *   for more information.
+ * @get_position: This virtual function is deprecated since 2.12 and
+ *   it should not be overriden. Use @AtkComponentIface.get_extents instead.
+ * @get_size: This virtual function is deprecated since 2.12 and it
+ *   should not be overriden. Use @AtkComponentIface.get_extents instead.
+ * @remove_focus_handler: This virtual function is deprecated since
+ *   2.9.4 and it should not be overriden. See atk_component_remove_focus_handler()
+ *   for more information.
+ * @contains:
+ * @ref_accessible_at_point:
+ * @get_extents:
+ * @grab_focus:
+ * @set_extents:
+ * @set_position:
+ * @set_size:
+ * @get_layer:
+ * @get_mdi_zorder:
+ * @bounds_changed:
+ * @get_alpha:
+ * @scroll_to:
+ * @scroll_to_point:
+ *
+ * The AtkComponent interface should be supported by any object that is
+ * rendered on the screen. The interface provides the standard mechanism
+ * for an assistive technology to determine and set the graphical
+ * representation of an object.
+ */
+struct _AtkComponentIface
+{
+  /*< private >*/
+  GTypeInterface parent;
+
+  /*< public >*/
+  gboolean       (* contains)           (AtkComponent          *component,
+                                         gint                   x,
+                                         gint                   y,
+                                         AtkCoordType           coord_type);
+
+  AtkObject*    (* ref_accessible_at_point)  (AtkComponent     *component,
+                                         gint                   x,
+                                         gint                   y,
+                                         AtkCoordType           coord_type);
+  void          (* get_extents)         (AtkComponent          *component,
+                                         gint                  *x,
+                                         gint                  *y,
+                                         gint                  *width,
+                                         gint                  *height,
+                                         AtkCoordType          coord_type);
+  void                     (* get_position)     (AtkComponent   *component,
+                                                 gint           *x,
+                                                 gint           *y,
+                                                 AtkCoordType   coord_type);
+  void                     (* get_size)                 (AtkComponent   *component,
+                                                         gint           *width,
+                                                         gint           *height);
+  gboolean                 (* grab_focus)               (AtkComponent   *component);
+  void                     (* remove_focus_handler)      (AtkComponent  *component,
+                                                          guint         handler_id);
+  gboolean                 (* set_extents)      (AtkComponent   *component,
+                                                 gint           x,
+                                                 gint           y,
+                                                 gint           width,
+                                                 gint           height,
+                                                 AtkCoordType   coord_type);
+  gboolean                 (* set_position)     (AtkComponent   *component,
+                                                 gint           x,
+                                                 gint           y,
+                                                 AtkCoordType   coord_type);
+  gboolean                 (* set_size)         (AtkComponent   *component,
+                                                 gint           width,
+                                                 gint           height);
+       
+  AtkLayer                 (* get_layer)        (AtkComponent   *component);
+  gint                     (* get_mdi_zorder)   (AtkComponent   *component);
+
+  /*
+   * signal handlers
+   */
+  void                     (* bounds_changed)   (AtkComponent   *component,
+                                                 AtkRectangle   *bounds);
+  gdouble                  (* get_alpha)        (AtkComponent   *component);
+
+  /*
+   * Scrolls this object so it becomes visible on the screen.
+   *
+   * scroll_to lets the implementation compute an appropriate target
+   * position on the screen, with type used as a positioning hint.
+   *
+   * scroll_to_point lets the client specify a precise target position
+   * on the screen for the top-left of the object.
+   *
+   * Since ATK 2.30
+   */
+  gboolean                (*scroll_to)          (AtkComponent   *component,
+                                                 AtkScrollType   type);
+
+  gboolean                (*scroll_to_point)    (AtkComponent   *component,
+                                                 AtkCoordType    coords,
+                                                 gint            x,
+                                                 gint            y);
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_component_get_type (void);
+
+/* convenience functions */
+GDK_AVAILABLE_IN_ALL
+gboolean              atk_component_contains               (AtkComponent    *component,
+                                                            gint            x,
+                                                            gint            y,
+                                                            AtkCoordType    coord_type);
+GDK_AVAILABLE_IN_ALL
+AtkObject*            atk_component_ref_accessible_at_point(AtkComponent    *component,
+                                                            gint            x,
+                                                            gint            y,
+                                                            AtkCoordType    coord_type);
+GDK_AVAILABLE_IN_ALL
+void                  atk_component_get_extents            (AtkComponent    *component,
+                                                            gint            *x,
+                                                            gint            *y,
+                                                            gint            *width,
+                                                            gint            *height,
+                                                            AtkCoordType    coord_type);
+GDK_AVAILABLE_IN_ALL
+AtkLayer              atk_component_get_layer              (AtkComponent    *component);
+GDK_AVAILABLE_IN_ALL
+gint                  atk_component_get_mdi_zorder         (AtkComponent    *component);
+GDK_AVAILABLE_IN_ALL
+gboolean              atk_component_grab_focus             (AtkComponent    *component);
+GDK_AVAILABLE_IN_ALL
+gboolean              atk_component_set_extents            (AtkComponent    *component,
+                                                            gint            x,
+                                                            gint            y,
+                                                            gint            width,
+                                                            gint            height,
+                                                            AtkCoordType    coord_type);
+GDK_AVAILABLE_IN_ALL
+gboolean              atk_component_set_position           (AtkComponent    *component,
+                                                            gint            x,
+                                                            gint            y,
+                                                            AtkCoordType    coord_type);
+GDK_AVAILABLE_IN_ALL
+gboolean              atk_component_set_size               (AtkComponent    *component,
+                                                            gint            width,
+                                                            gint            height);
+GDK_AVAILABLE_IN_ALL
+gdouble               atk_component_get_alpha              (AtkComponent    *component);
+
+GDK_AVAILABLE_IN_ALL
+gboolean              atk_component_scroll_to              (AtkComponent    *component,
+                                                            AtkScrollType   type);
+
+GDK_AVAILABLE_IN_ALL
+gboolean              atk_component_scroll_to_point        (AtkComponent    *component,
+                                                            AtkCoordType    coords,
+                                                            gint            x,
+                                                            gint            y);
+
+G_END_DECLS
+
+#endif /* __ATK_COMPONENT_H__ */
diff --git a/atk/atkdocument.c b/atk/atkdocument.c
new file mode 100644
index 0000000000..7e2bbd48df
--- /dev/null
+++ b/atk/atkdocument.c
@@ -0,0 +1,324 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkdocument.h"
+
+/**
+ * SECTION:atkdocument
+ * @Short_description: The ATK interface which represents the toplevel
+ *  container for document content.
+ * @Title:AtkDocument
+ *
+ * The AtkDocument interface should be supported by any object whose
+ * content is a representation or view of a document.  The AtkDocument
+ * interface should appear on the toplevel container for the document
+ * content; however AtkDocument instances may be nested (i.e. an
+ * AtkDocument may be a descendant of another AtkDocument) in those
+ * cases where one document contains "embedded content" which can
+ * reasonably be considered a document in its own right.
+ *
+ */
+
+enum {
+  LOAD_COMPLETE,
+  RELOAD,
+  LOAD_STOPPED,
+  PAGE_CHANGED,
+  LAST_SIGNAL
+};
+
+static void atk_document_base_init (AtkDocumentIface *class);
+
+static guint atk_document_signals[LAST_SIGNAL] = {0};
+
+GType
+atk_document_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) {
+    static const GTypeInfo tinfo =
+    {
+      sizeof (AtkDocumentIface),
+      (GBaseInitFunc) atk_document_base_init,
+      (GBaseFinalizeFunc) NULL,
+
+    };
+
+    type = g_type_register_static (G_TYPE_INTERFACE, "AtkDocument", &tinfo, 0);
+  }
+
+  return type;
+}
+
+static void
+atk_document_base_init (AtkDocumentIface *class)
+{
+  static gboolean initialized = FALSE;
+  if (!initialized)
+    {
+      /**
+       * AtkDocument::load-complete:
+       * @atkdocument: the object which received the signal.
+       *
+       * The 'load-complete' signal is emitted when a pending load of
+       * a static document has completed.  This signal is to be
+       * expected by ATK clients if and when AtkDocument implementors
+       * expose ATK_STATE_BUSY.  If the state of an AtkObject which
+       * implements AtkDocument does not include ATK_STATE_BUSY, it
+       * should be safe for clients to assume that the AtkDocument's
+       * static contents are fully loaded into the container.
+       * (Dynamic document contents should be exposed via other
+       * signals.)
+       */
+      atk_document_signals[LOAD_COMPLETE] =
+        g_signal_new ("load_complete",
+                      ATK_TYPE_DOCUMENT,
+                      G_SIGNAL_RUN_LAST,
+                      0,
+                      (GSignalAccumulator) NULL, NULL,
+                      g_cclosure_marshal_VOID__VOID,
+                      G_TYPE_NONE, 0);
+      /**
+       * AtkDocument::reload:
+       * @atkdocument: the object which received the signal.
+       *
+       * The 'reload' signal is emitted when the contents of a
+       * document is refreshed from its source.  Once 'reload' has
+       * been emitted, a matching 'load-complete' or 'load-stopped'
+       * signal should follow, which clients may await before
+       * interrogating ATK for the latest document content.
+       */
+      atk_document_signals[RELOAD] =
+        g_signal_new ("reload",
+                      ATK_TYPE_DOCUMENT,
+                      G_SIGNAL_RUN_LAST,
+                      0,
+                      (GSignalAccumulator) NULL, NULL,
+                      g_cclosure_marshal_VOID__VOID,
+                      G_TYPE_NONE, 0);
+
+      /**
+       * AtkDocument::load-stopped:
+       * @atkdocument: the object which received the signal.
+       *
+       * The 'load-stopped' signal is emitted when a pending load of
+       * document contents is cancelled, paused, or otherwise
+       * interrupted by the user or application logic.  It should not
+       * however be emitted while waiting for a resource (for instance
+       * while blocking on a file or network read) unless a
+       * user-significant timeout has occurred.
+       */
+      atk_document_signals[LOAD_STOPPED] =
+        g_signal_new ("load_stopped",
+                      ATK_TYPE_DOCUMENT,
+                      G_SIGNAL_RUN_LAST,
+                      0,
+                      (GSignalAccumulator) NULL, NULL,
+                      g_cclosure_marshal_VOID__VOID,
+                      G_TYPE_NONE, 0);
+
+      /**
+       * AtkDocument::page-changed:
+       * @atkdocument: the object on which the signal was emitted
+       * @page_number: the new page number. If this value is unknown
+       * or not applicable, -1 should be provided.
+       *
+       * The 'page-changed' signal is emitted when the current page of
+       * a document changes, e.g. pressing page up/down in a document
+       * viewer.
+       *
+       * Since: 2.12
+       */
+      atk_document_signals[PAGE_CHANGED] =
+        g_signal_new ("page_changed",
+                      ATK_TYPE_DOCUMENT,
+                      G_SIGNAL_RUN_LAST,
+                      0,
+                      (GSignalAccumulator) NULL, NULL,
+                      g_cclosure_marshal_VOID__INT,
+                      G_TYPE_NONE, 1, G_TYPE_INT);
+
+      initialized = TRUE;
+    }
+}
+
+/**
+ * atk_document_get_attributes: (virtual get_document_attributes)
+ * @document: a #GObject instance that implements AtkDocumentIface
+ *
+ * Gets an AtkAttributeSet which describes document-wide
+ *          attributes as name-value pairs.
+ *
+ * Since: 1.12
+ *
+ * Returns: (transfer none): An AtkAttributeSet containing the explicitly
+ *          set name-value-pair attributes associated with this document
+ *          as a whole.
+ **/
+AtkAttributeSet *
+atk_document_get_attributes (AtkDocument *document)
+{
+  AtkDocumentIface *iface;
+
+  g_return_val_if_fail (ATK_IS_DOCUMENT (document), NULL);
+
+  iface = ATK_DOCUMENT_GET_IFACE (document);
+
+  if (iface->get_document_attributes)
+    {
+      return (iface->get_document_attributes) (document);
+    }
+  else
+    {
+      return NULL;
+    }
+}
+
+/**
+ * atk_document_get_attribute_value: (virtual get_document_attribute_value)
+ * @document: a #GObject instance that implements AtkDocumentIface
+ * @attribute_name: a character string representing the name of the attribute
+ *   whose value is being queried.
+ *
+ * Retrieves the value of the given @attribute_name inside @document.
+ *
+ * Returns: (nullable): a string value associated with the named
+ *    attribute for this document, or %NULL if a value for
+ *    @attribute_name has not been specified for this document.
+ *
+ * Since: 1.12
+ */
+const gchar *
+atk_document_get_attribute_value (AtkDocument *document, 
+                                 const gchar *attribute_name)
+{
+  AtkDocumentIface *iface;
+
+  g_return_val_if_fail (ATK_IS_DOCUMENT (document), NULL);
+
+  iface = ATK_DOCUMENT_GET_IFACE (document);
+
+  if (iface->get_document_attribute_value)
+    {
+      return (iface->get_document_attribute_value) (document, attribute_name);
+    }
+  else
+    {
+      return NULL;
+    }
+}
+
+/**
+ * atk_document_set_attribute_value: (virtual set_document_attribute)
+ * @document: a #GObject instance that implements #AtkDocumentIface
+ * @attribute_name: a character string representing the name of the attribute
+ *   whose value is being set.
+ * @attribute_value: a string value to be associated with @attribute_name.
+ *
+ * Sets the value for the given @attribute_name inside @document.
+ *
+ * Since: 1.12
+ *
+ * Returns: %TRUE if @attribute_value is successfully associated
+ *   with @attribute_name for this @document, and %FALSE if if the
+ *   document does not allow the attribute to be modified
+ */
+gboolean
+atk_document_set_attribute_value (AtkDocument *document, 
+                                 const gchar *attribute_name,
+                                 const gchar *attribute_value)
+{
+  AtkDocumentIface *iface;
+
+  g_return_val_if_fail (ATK_IS_DOCUMENT (document), FALSE);
+
+  iface = ATK_DOCUMENT_GET_IFACE (document);
+
+  if (iface->set_document_attribute)
+    {
+      return (iface->set_document_attribute) (document, attribute_name, attribute_value);
+    }
+  else
+    {
+      return FALSE;
+    }
+}
+
+/**
+ * atk_document_get_current_page_number:
+ * @document: the #AtkDocument
+ *
+ * Retrieves the current page number inside @document.
+ *
+ * Returns: the current page number inside @document, or -1 if
+ *   not implemented, not know by the implementor, or irrelevant.
+ *
+ * Since: 2.12
+ */
+gint
+atk_document_get_current_page_number (AtkDocument *document)
+{
+  AtkDocumentIface *iface;
+
+  g_return_val_if_fail (ATK_IS_DOCUMENT (document), FALSE);
+
+  iface = ATK_DOCUMENT_GET_IFACE (document);
+
+  if (iface->get_current_page_number)
+    {
+      return (iface->get_current_page_number) (document);
+    }
+  else
+    {
+      return -1;
+    }
+}
+
+/**
+ * atk_document_get_page_count:
+ * @document: the #AtkDocument
+ *
+ * Retrieves the total number of pages inside @document.
+ *
+ * Returns: total page count of @document, or -1 if not implemented,
+ *   not know by the implementor or irrelevant.
+ *
+ * Since: 2.12
+ */
+gint
+atk_document_get_page_count (AtkDocument *document)
+{
+  AtkDocumentIface *iface;
+
+  g_return_val_if_fail (ATK_IS_DOCUMENT (document), FALSE);
+
+  iface = ATK_DOCUMENT_GET_IFACE (document);
+
+  if (iface->get_page_count)
+    {
+      return (iface->get_page_count) (document);
+    }
+  else
+    {
+      return -1;
+    }
+}
diff --git a/atk/atkdocument.h b/atk/atkdocument.h
new file mode 100644
index 0000000000..108f4da298
--- /dev/null
+++ b/atk/atkdocument.h
@@ -0,0 +1,103 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_DOCUMENT_H__
+#define __ATK_DOCUMENT_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+/*
+ * The AtkDocument interface should be supported by any object that is a container
+ * for 'document content' as opposed to a collection of user interface elements.
+ *
+ */
+
+#define ATK_TYPE_DOCUMENT                   (atk_document_get_type ())
+#define ATK_IS_DOCUMENT(obj)                G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_DOCUMENT)
+#define ATK_DOCUMENT(obj)                   G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_DOCUMENT, 
AtkDocument)
+#define ATK_DOCUMENT_GET_IFACE(obj)         (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_DOCUMENT, 
AtkDocumentIface))
+
+#ifndef _TYPEDEF_ATK_DOCUMENT_
+#define _TYPEDEF_ATK_DOCUMENT_
+typedef struct _AtkDocument AtkDocument;
+#endif
+typedef struct _AtkDocumentIface AtkDocumentIface;
+
+/**
+ * AtkDocumentIface:
+ * @get_document_type: gets a string indicating the document
+ *   type. This virtual function is deprecated since 2.12 and it
+ *   should not be overriden.
+ * @get_document: a #GObject instance that implements
+ *   AtkDocumentIface. This virtual method is deprecated since 2.12
+ *   and it should not be overriden.
+ * @get_document_locale: gets locale. This virtual function is
+ *   deprecated since 2.7.90 and it should not be overriden.
+ * @get_document_attributes: gets an AtkAttributeSet which describes
+ *   document-wide attributes as name-value pairs.
+ * @get_document_attribute_value: returns a string value assocciated
+ *   with the named attribute for this document, or NULL
+ * @set_document_attribute: sets the value of an attribute. Returns
+ *   TRUE on success, FALSE otherwise
+ * @get_current_page_number: gets the current page number. Since 2.12
+ * @get_page_count: gets the page count of the document. Since 2.12
+ */
+struct _AtkDocumentIface
+{
+  GTypeInterface parent;
+  const gchar*          ( *get_document_type) (AtkDocument              *document);
+  gpointer              ( *get_document)      (AtkDocument              *document);
+
+  const gchar*          ( *get_document_locale) (AtkDocument              *document);
+  AtkAttributeSet *     ( *get_document_attributes) (AtkDocument        *document);
+  const gchar*          ( *get_document_attribute_value) (AtkDocument   *document,
+                                                          const gchar   *attribute_name);
+  gboolean              ( *set_document_attribute) (AtkDocument         *document,
+                                                    const gchar         *attribute_name,
+                                                    const gchar         *attribute_value);
+  gint                  ( *get_current_page_number) (AtkDocument *document);
+  gint                  ( *get_page_count) (AtkDocument *document);
+};
+
+GDK_AVAILABLE_IN_ALL
+GType  atk_document_get_type             (void);
+
+GDK_AVAILABLE_IN_ALL
+AtkAttributeSet*      atk_document_get_attributes (AtkDocument *document);
+GDK_AVAILABLE_IN_ALL
+const gchar*          atk_document_get_attribute_value (AtkDocument *document,
+                                                        const gchar *attribute_name);
+GDK_AVAILABLE_IN_ALL
+gboolean              atk_document_set_attribute_value (AtkDocument *document,
+                                                        const gchar *attribute_name,
+                                                        const gchar *attribute_value);
+GDK_AVAILABLE_IN_ALL
+gint                  atk_document_get_current_page_number (AtkDocument *document);
+GDK_AVAILABLE_IN_ALL
+gint                  atk_document_get_page_count      (AtkDocument *document);
+
+G_END_DECLS
+
+#endif /* __ATK_DOCUMENT_H__ */
diff --git a/atk/atkeditabletext.c b/atk/atkeditabletext.c
new file mode 100644
index 0000000000..d44f8bff91
--- /dev/null
+++ b/atk/atkeditabletext.c
@@ -0,0 +1,237 @@
+/* ATK - The Accessibility Toolkit for GTK+
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkeditabletext.h"
+
+/**
+ * SECTION:atkeditabletext
+ * @Short_description: The ATK interface implemented by components
+ *  containing user-editable text content.
+ * @Title:AtkEditableText
+ *
+ * #AtkEditableText should be implemented by UI components which
+ * contain text which the user can edit, via the #AtkObject
+ * corresponding to that component (see #AtkObject).
+ *
+ * #AtkEditableText is a subclass of #AtkText, and as such, an object
+ * which implements #AtkEditableText is by definition an #AtkText
+ * implementor as well.
+ *
+ * See also: #AtkText
+ */
+
+GType
+atk_editable_text_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) {
+    static const GTypeInfo tinfo =
+    {
+      sizeof (AtkEditableTextIface),
+      (GBaseInitFunc) NULL,
+      (GBaseFinalizeFunc) NULL,
+
+    };
+
+    type = g_type_register_static (G_TYPE_INTERFACE, "AtkEditableText", &tinfo, 0);
+  }
+
+  return type;
+}
+
+/**
+ *atk_editable_text_set_run_attributes:
+ *@text: an #AtkEditableText
+ *@attrib_set: an #AtkAttributeSet
+ *@start_offset: start of range in which to set attributes
+ *@end_offset: end of range in which to set attributes
+ *
+ *Sets the attributes for a specified range. See the ATK_ATTRIBUTE
+ *macros (such as #ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes 
+ *that can be set. Note that other attributes that do not have corresponding
+ *ATK_ATTRIBUTE macros may also be set for certain text widgets.
+ *
+ *Returns: %TRUE if attributes successfully set for the specified
+ *range, otherwise %FALSE
+ **/
+gboolean
+atk_editable_text_set_run_attributes (AtkEditableText *text,
+                                      AtkAttributeSet *attrib_set,
+                                     gint start_offset,
+                                      gint end_offset)
+{
+  AtkEditableTextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_EDITABLE_TEXT (text), FALSE);
+
+  iface = ATK_EDITABLE_TEXT_GET_IFACE (text);
+
+  if (iface->set_run_attributes)
+    {
+      return (*(iface->set_run_attributes)) (text, attrib_set, start_offset, end_offset);
+    }
+  else
+    {
+      return FALSE;
+    }
+}
+
+
+/**
+ * atk_editable_text_set_text_contents:
+ * @text: an #AtkEditableText
+ * @string: string to set for text contents of @text
+ *
+ * Set text contents of @text.
+ **/
+void 
+atk_editable_text_set_text_contents (AtkEditableText  *text,
+                                     const gchar      *string)
+{
+  AtkEditableTextIface *iface;
+
+  g_return_if_fail (ATK_IS_EDITABLE_TEXT (text));
+
+  iface = ATK_EDITABLE_TEXT_GET_IFACE (text);
+
+  if (iface->set_text_contents)
+    (*(iface->set_text_contents)) (text, string);
+}
+
+/**
+ * atk_editable_text_insert_text:
+ * @text: an #AtkEditableText
+ * @string: the text to insert
+ * @length: the length of text to insert, in bytes
+ * @position: The caller initializes this to 
+ * the position at which to insert the text. After the call it
+ * points at the position after the newly inserted text.
+ *
+ * Insert text at a given position.
+ **/
+void 
+atk_editable_text_insert_text (AtkEditableText  *text,
+                               const gchar      *string,
+                               gint             length,
+                               gint             *position)
+{
+  AtkEditableTextIface *iface;
+
+  g_return_if_fail (ATK_IS_EDITABLE_TEXT (text));
+
+  iface = ATK_EDITABLE_TEXT_GET_IFACE (text);
+
+  if (iface->insert_text)
+    (*(iface->insert_text)) (text, string, length, position);
+}
+
+/**
+ * atk_editable_text_copy_text:
+ * @text: an #AtkEditableText
+ * @start_pos: start position
+ * @end_pos: end position
+ *
+ * Copy text from @start_pos up to, but not including @end_pos 
+ * to the clipboard.
+ **/
+void 
+atk_editable_text_copy_text (AtkEditableText  *text,
+                             gint             start_pos,
+                             gint             end_pos)
+{
+  AtkEditableTextIface *iface;
+
+  g_return_if_fail (ATK_IS_EDITABLE_TEXT (text));
+
+  iface = ATK_EDITABLE_TEXT_GET_IFACE (text);
+
+  if (iface->copy_text)
+    (*(iface->copy_text)) (text, start_pos, end_pos);
+}
+
+/**
+ * atk_editable_text_cut_text:
+ * @text: an #AtkEditableText
+ * @start_pos: start position
+ * @end_pos: end position
+ *
+ * Copy text from @start_pos up to, but not including @end_pos
+ * to the clipboard and then delete from the widget.
+ **/
+void 
+atk_editable_text_cut_text  (AtkEditableText  *text,
+                             gint             start_pos,
+                             gint             end_pos)
+{
+  AtkEditableTextIface *iface;
+
+  g_return_if_fail (ATK_IS_EDITABLE_TEXT (text));
+
+  iface = ATK_EDITABLE_TEXT_GET_IFACE (text);
+
+  if (iface->cut_text)
+    (*(iface->cut_text)) (text, start_pos, end_pos);
+}
+
+/**
+ * atk_editable_text_delete_text:
+ * @text: an #AtkEditableText
+ * @start_pos: start position
+ * @end_pos: end position
+ *
+ * Delete text @start_pos up to, but not including @end_pos.
+ **/
+void 
+atk_editable_text_delete_text (AtkEditableText  *text,
+                               gint             start_pos,
+                               gint             end_pos)
+{
+  AtkEditableTextIface *iface;
+
+  g_return_if_fail (ATK_IS_EDITABLE_TEXT (text));
+
+  iface = ATK_EDITABLE_TEXT_GET_IFACE (text);
+
+  if (iface->delete_text)
+    (*(iface->delete_text)) (text, start_pos, end_pos);
+}
+
+/**
+ * atk_editable_text_paste_text:
+ * @text: an #AtkEditableText
+ * @position: position to paste
+ *
+ * Paste text from clipboard to specified @position.
+ **/
+void 
+atk_editable_text_paste_text (AtkEditableText  *text,
+                              gint             position)
+{
+  AtkEditableTextIface *iface;
+
+  g_return_if_fail (ATK_IS_EDITABLE_TEXT (text));
+
+  iface = ATK_EDITABLE_TEXT_GET_IFACE (text);
+
+  if (iface->paste_text)
+    (*(iface->paste_text)) (text, position);
+}
diff --git a/atk/atkeditabletext.h b/atk/atkeditabletext.h
new file mode 100644
index 0000000000..3cd119355b
--- /dev/null
+++ b/atk/atkeditabletext.h
@@ -0,0 +1,108 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_EDITABLE_TEXT_H__
+#define __ATK_EDITABLE_TEXT_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+/*
+ * AtkEditableText is used to support access in an "accessibility" context
+ * to editing features of editable text widgets.
+ */
+
+#define ATK_TYPE_EDITABLE_TEXT                    (atk_editable_text_get_type ())
+#define ATK_IS_EDITABLE_TEXT(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_EDITABLE_TEXT)
+#define ATK_EDITABLE_TEXT(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_EDITABLE_TEXT, 
AtkEditableText)
+#define ATK_EDITABLE_TEXT_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), 
ATK_TYPE_EDITABLE_TEXT, AtkEditableTextIface))
+
+#ifndef _TYPEDEF_ATK_EDITABLE_TEXT_
+#define _TYPEDEF_ATK_EDITABLE_TEXT_
+typedef struct _AtkEditableText AtkEditableText;
+#endif
+typedef struct _AtkEditableTextIface AtkEditableTextIface;
+
+struct _AtkEditableTextIface
+{
+  GTypeInterface parent_interface;
+
+  gboolean (* set_run_attributes) (AtkEditableText  *text,
+                                   AtkAttributeSet  *attrib_set,
+                                   gint                    start_offset,
+                                  gint             end_offset);
+  void   (* set_text_contents)    (AtkEditableText  *text,
+                                   const gchar      *string);
+  void   (* insert_text)          (AtkEditableText  *text,
+                                   const gchar      *string,
+                                   gint             length,
+                                   gint             *position);
+  void   (* copy_text)            (AtkEditableText  *text,
+                                   gint             start_pos,
+                                   gint             end_pos);
+  void   (* cut_text)             (AtkEditableText  *text,
+                                   gint             start_pos,
+                                   gint             end_pos);
+  void   (* delete_text)          (AtkEditableText  *text,
+                                   gint             start_pos,
+                                   gint             end_pos);
+  void   (* paste_text)           (AtkEditableText  *text,
+                                   gint             position);
+};
+GDK_AVAILABLE_IN_ALL
+GType atk_editable_text_get_type (void);
+
+
+GDK_AVAILABLE_IN_ALL
+gboolean atk_editable_text_set_run_attributes (AtkEditableText          *text,
+                                               AtkAttributeSet  *attrib_set,
+                                               gint                    start_offset,
+                                              gint             end_offset);
+GDK_AVAILABLE_IN_ALL
+void atk_editable_text_set_text_contents    (AtkEditableText  *text,
+                                             const gchar      *string);
+GDK_AVAILABLE_IN_ALL
+void atk_editable_text_insert_text          (AtkEditableText  *text,
+                                             const gchar      *string,
+                                             gint             length,
+                                             gint             *position);
+GDK_AVAILABLE_IN_ALL
+void atk_editable_text_copy_text            (AtkEditableText  *text,
+                                             gint             start_pos,
+                                             gint             end_pos);
+GDK_AVAILABLE_IN_ALL
+void atk_editable_text_cut_text             (AtkEditableText  *text,
+                                             gint             start_pos,
+                                             gint             end_pos);
+GDK_AVAILABLE_IN_ALL
+void atk_editable_text_delete_text          (AtkEditableText  *text,
+                                             gint             start_pos,
+                                             gint             end_pos);
+GDK_AVAILABLE_IN_ALL
+void atk_editable_text_paste_text           (AtkEditableText  *text,
+                                             gint             position);
+
+G_END_DECLS
+
+#endif /* __ATK_EDITABLE_TEXT_H__ */
diff --git a/atk/atkenums.h b/atk/atkenums.h
new file mode 100644
index 0000000000..14001228c3
--- /dev/null
+++ b/atk/atkenums.h
@@ -0,0 +1,870 @@
+#pragma once
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/**
+ * AtkHyperlinkStateFlags:
+ * @ATK_HYPERLINK_IS_INLINE: Link is inline
+ *
+ * Describes the type of link
+ */ 
+typedef enum 
+{
+  ATK_HYPERLINK_IS_INLINE = 1 << 0
+} AtkHyperlinkStateFlags;
+
+/**
+ *AtkStateType:
+ *@ATK_STATE_INVALID: Indicates an invalid state - probably an error condition.
+ *@ATK_STATE_ACTIVE: Indicates a window is currently the active window, or an object is the active 
subelement within a container or table. ATK_STATE_ACTIVE should not be used for objects which have 
ATK_STATE_FOCUSABLE or ATK_STATE_SELECTABLE: Those objects should use ATK_STATE_FOCUSED and 
ATK_STATE_SELECTED respectively. ATK_STATE_ACTIVE is a means to indicate that an object which is not 
focusable and not selectable is the currently-active item within its parent container.
+ *@ATK_STATE_ARMED: Indicates that the object is 'armed', i.e. will be activated by if a pointer 
button-release event occurs within its bounds.  Buttons often enter this state when a pointer click occurs 
within their bounds, as a precursor to activation. ATK_STATE_ARMED has been deprecated since ATK-2.16 and 
should not be used in newly-written code.
+ *@ATK_STATE_BUSY:  Indicates the current object is busy, i.e. onscreen representation is in the process of 
changing, or the object is temporarily unavailable for interaction due to activity already in progress.  This 
state may be used by implementors of Document to indicate that content loading is underway.  It also may 
indicate other 'pending' conditions; clients may wish to interrogate this object when the ATK_STATE_BUSY flag 
is removed.
+ *@ATK_STATE_CHECKED: Indicates this object is currently checked, for instance a checkbox is 'non-empty'.
+ *@ATK_STATE_DEFUNCT: Indicates that this object no longer has a valid backing widget (for instance, if its 
peer object has been destroyed)
+ *@ATK_STATE_EDITABLE: Indicates that this object can contain text, and that the
+ * user can change the textual contents of this object by editing those contents
+ * directly. For an object which is expected to be editable due to its type, but
+ * which cannot be edited due to the application or platform preventing the user
+ * from doing so, that object's #AtkStateSet should lack ATK_STATE_EDITABLE and
+ * should contain ATK_STATE_READ_ONLY.
+ *@ATK_STATE_ENABLED:  Indicates that this object is enabled, i.e. that it currently reflects some 
application state. Objects that are "greyed out" may lack this state, and may lack the STATE_SENSITIVE if 
direct user interaction cannot cause them to acquire STATE_ENABLED. See also: ATK_STATE_SENSITIVE
+ *@ATK_STATE_EXPANDABLE: Indicates this object allows progressive disclosure of its children
+ *@ATK_STATE_EXPANDED: Indicates this object its expanded - see ATK_STATE_EXPANDABLE above
+ *@ATK_STATE_FOCUSABLE: Indicates this object can accept keyboard focus, which means all events resulting 
from typing on the keyboard will normally be passed to it when it has focus
+ *@ATK_STATE_FOCUSED: Indicates this object currently has the keyboard focus
+ *@ATK_STATE_HORIZONTAL: Indicates the orientation of this object is horizontal; used, for instance, by 
objects of ATK_ROLE_SCROLL_BAR.  For objects where vertical/horizontal orientation is especially meaningful.
+ *@ATK_STATE_ICONIFIED: Indicates this object is minimized and is represented only by an icon
+ *@ATK_STATE_MODAL: Indicates something must be done with this object before the user can interact with an 
object in a different window
+ *@ATK_STATE_MULTI_LINE: Indicates this (text) object can contain multiple lines of text
+ *@ATK_STATE_MULTISELECTABLE: Indicates this object allows more than one of its children to be selected at 
the same time, or in the case of text objects, that the object supports non-contiguous text selections.
+ *@ATK_STATE_OPAQUE: Indicates this object paints every pixel within its rectangular region.
+ *@ATK_STATE_PRESSED: Indicates this object is currently pressed.
+ *@ATK_STATE_RESIZABLE: Indicates the size of this object is not fixed
+ *@ATK_STATE_SELECTABLE: Indicates this object is the child of an object that allows its children to be 
selected and that this child is one of those children that can be selected
+ *@ATK_STATE_SELECTED: Indicates this object is the child of an object that allows its children to be 
selected and that this child is one of those children that has been selected
+ *@ATK_STATE_SENSITIVE: Indicates this object is sensitive, e.g. to user interaction. 
+ * STATE_SENSITIVE usually accompanies STATE_ENABLED for user-actionable controls,
+ * but may be found in the absence of STATE_ENABLED if the current visible state of the 
+ * control is "disconnected" from the application state.  In such cases, direct user interaction
+ * can often result in the object gaining STATE_SENSITIVE, for instance if a user makes 
+ * an explicit selection using an object whose current state is ambiguous or undefined.
+ * @see STATE_ENABLED, STATE_INDETERMINATE.
+ *@ATK_STATE_SHOWING: Indicates this object, the object's parent, the object's parent's parent, and so on, 
+ * are all 'shown' to the end-user, i.e. subject to "exposure" if blocking or obscuring objects do not 
interpose
+ * between this object and the top of the window stack.
+ *@ATK_STATE_SINGLE_LINE: Indicates this (text) object can contain only a single line of text
+ *@ATK_STATE_STALE: Indicates that the information returned for this object may no longer be
+ * synchronized with the application state.  This is implied if the object has STATE_TRANSIENT,
+ * and can also occur towards the end of the object peer's lifecycle. It can also be used to indicate that 
+ * the index associated with this object has changed since the user accessed the object (in lieu of
+ * "index-in-parent-changed" events).
+ *@ATK_STATE_TRANSIENT: Indicates this object is transient, i.e. a snapshot which may not emit events when 
its
+ * state changes.  Data from objects with ATK_STATE_TRANSIENT should not be cached, since there may be no
+ * notification given when the cached data becomes obsolete.
+ *@ATK_STATE_VERTICAL: Indicates the orientation of this object is vertical
+ *@ATK_STATE_VISIBLE: Indicates this object is visible, e.g. has been explicitly marked for exposure to the 
user.
+ * **note**: %ATK_STATE_VISIBLE is no guarantee that the object is actually unobscured on the screen, only
+ * that it is 'potentially' visible, barring obstruction, being scrolled or clipped out of the 
+ * field of view, or having an ancestor container that has not yet made visible.
+ * A widget is potentially onscreen if it has both %ATK_STATE_VISIBLE and %ATK_STATE_SHOWING.
+ * The absence of %ATK_STATE_VISIBLE and %ATK_STATE_SHOWING is semantically equivalent to saying
+ * that an object is 'hidden'.  See also %ATK_STATE_TRUNCATED, which applies if an object with
+ * %ATK_STATE_VISIBLE and %ATK_STATE_SHOWING set lies within a viewport which means that its
+ * contents are clipped, e.g. a truncated spreadsheet cell or
+ * an image within a scrolling viewport.  Mostly useful for screen-review and magnification
+ * algorithms.
+ *@ATK_STATE_MANAGES_DESCENDANTS: Indicates that "active-descendant-changed" event
+ * is sent when children become 'active' (i.e. are selected or navigated to onscreen).
+ * Used to prevent need to enumerate all children in very large containers, like tables.
+ * The presence of STATE_MANAGES_DESCENDANTS is an indication to the client.
+ * that the children should not, and need not, be enumerated by the client.
+ * Objects implementing this state are expected to provide relevant state
+ * notifications to listening clients, for instance notifications of visibility
+ * changes and activation of their contained child objects, without the client 
+ * having previously requested references to those children.
+ *@ATK_STATE_INDETERMINATE: Indicates that the value, or some other quantifiable
+ * property, of this AtkObject cannot be fully determined. In the case of a large
+ * data set in which the total number of items in that set is unknown (e.g. 1 of
+ * 999+), implementors should expose the currently-known set size (999) along
+ * with this state. In the case of a check box, this state should be used to
+ * indicate that the check box is a tri-state check box which is currently
+ * neither checked nor unchecked.
+ *@ATK_STATE_TRUNCATED: Indicates that an object is truncated, e.g. a text value in a speradsheet cell.
+ *@ATK_STATE_REQUIRED: Indicates that explicit user interaction with an object is required by the user 
interface, e.g. a required field in a "web-form" interface.
+ *@ATK_STATE_INVALID_ENTRY: Indicates that the object has encountered an error condition due to failure of 
input validation. For instance, a form control may acquire this state in response to invalid or malformed 
user input.
+ *@ATK_STATE_SUPPORTS_AUTOCOMPLETION:  Indicates that the object in question implements some form of 
¨typeahead¨ or 
+ * pre-selection behavior whereby entering the first character of one or more sub-elements
+ * causes those elements to scroll into view or become selected.  Subsequent character input
+ * may narrow the selection further as long as one or more sub-elements match the string.
+ * This state is normally only useful and encountered on objects that implement Selection.
+ * In some cases the typeahead behavior may result in full or partial ¨completion¨ of 
+ * the data in the input field, in which case these input events may trigger text-changed
+ * events from the AtkText interface.  This state supplants @ATK_ROLE_AUTOCOMPLETE.
+ *@ATK_STATE_SELECTABLE_TEXT:Indicates that the object in question supports text selection. It should only 
be exposed on objects which implement the Text interface, in order to distinguish this state from 
@ATK_STATE_SELECTABLE, which infers that the object in question is a selectable child of an object which 
implements Selection. While similar, text selection and subelement selection are distinct operations.
+ *@ATK_STATE_DEFAULT: Indicates that the object is the "default" active component, i.e. the object which is 
activated by an end-user press of the "Enter" or "Return" key.  Typically a "close" or "submit" button.
+ *@ATK_STATE_ANIMATED: Indicates that the object changes its appearance dynamically as an inherent part of 
its presentation.  This state may come and go if an object is only temporarily animated on the way to a 
'final' onscreen presentation.
+ * **note**: some applications, notably content viewers, may not be able to detect
+ * all kinds of animated content.  Therefore the absence of this state should not
+ * be taken as definitive evidence that the object's visual representation is
+ * static; this state is advisory.
+ *@ATK_STATE_VISITED: Indicates that the object (typically a hyperlink) has already been 'activated', and/or 
its backing data has already been downloaded, rendered, or otherwise "visited".
+ *@ATK_STATE_CHECKABLE: Indicates this object has the potential to be
+ *  checked, such as a checkbox or toggle-able table cell. @Since:
+ *  ATK-2.12
+ *@ATK_STATE_HAS_POPUP: Indicates that the object has a popup context
+ * menu or sub-level menu which may or may not be showing. This means
+ * that activation renders conditional content.  Note that ordinary
+ * tooltips are not considered popups in this context. @Since: ATK-2.12
+ *@ATK_STATE_HAS_TOOLTIP: Indicates this object has a tooltip. @Since: ATK-2.16
+ *@ATK_STATE_READ_ONLY: Indicates that a widget which is ENABLED and SENSITIVE
+ * has a value which can be read, but not modified, by the user. Note that this
+ * state should only be applied to widget types whose value is normally directly
+ * user modifiable, such as check boxes, radio buttons, spin buttons, text input
+ * fields, and combo boxes, as a means to convey that the expected interaction
+ * with that widget is not possible. When the expected interaction with a
+ * widget does not include modification by the user, as is the case with
+ * labels and containers, ATK_STATE_READ_ONLY should not be applied. See also
+ * ATK_STATE_EDITABLE. @Since: ATK-2-16
+ *@ATK_STATE_LAST_DEFINED: Not a valid state, used for finding end of enumeration
+ *
+ *The possible types of states of an object
+ **/
+typedef enum
+{
+  ATK_STATE_INVALID,
+  ATK_STATE_ACTIVE,
+  ATK_STATE_ARMED,
+  ATK_STATE_BUSY,
+  ATK_STATE_CHECKED,
+  ATK_STATE_DEFUNCT,
+  ATK_STATE_EDITABLE,
+  ATK_STATE_ENABLED,
+  ATK_STATE_EXPANDABLE,
+  ATK_STATE_EXPANDED,
+  ATK_STATE_FOCUSABLE,
+  ATK_STATE_FOCUSED,
+  ATK_STATE_HORIZONTAL,
+  ATK_STATE_ICONIFIED,
+  ATK_STATE_MODAL,
+  ATK_STATE_MULTI_LINE,
+  ATK_STATE_MULTISELECTABLE,
+  ATK_STATE_OPAQUE,
+  ATK_STATE_PRESSED,
+  ATK_STATE_RESIZABLE,
+  ATK_STATE_SELECTABLE,
+  ATK_STATE_SELECTED,
+  ATK_STATE_SENSITIVE,
+  ATK_STATE_SHOWING,
+  ATK_STATE_SINGLE_LINE,
+  ATK_STATE_STALE,
+  ATK_STATE_TRANSIENT,
+  ATK_STATE_VERTICAL,
+  ATK_STATE_VISIBLE,
+  ATK_STATE_MANAGES_DESCENDANTS,
+  ATK_STATE_INDETERMINATE,
+  ATK_STATE_TRUNCATED,
+  ATK_STATE_REQUIRED,
+  ATK_STATE_INVALID_ENTRY,
+  ATK_STATE_SUPPORTS_AUTOCOMPLETION,
+  ATK_STATE_SELECTABLE_TEXT,
+  ATK_STATE_DEFAULT,
+  ATK_STATE_ANIMATED,
+  ATK_STATE_VISITED,
+  ATK_STATE_CHECKABLE,
+  ATK_STATE_HAS_POPUP,
+  ATK_STATE_HAS_TOOLTIP,
+  ATK_STATE_READ_ONLY,
+  ATK_STATE_LAST_DEFINED
+} AtkStateType;
+
+/**
+ * AtkScrollType:
+ * @ATK_SCROLL_TOP_LEFT: Scroll the object vertically and horizontally to bring
+ *   its top left corner to the top left corner of the window.
+ * @ATK_SCROLL_BOTTOM_RIGHT: Scroll the object vertically and horizontally to
+ *   bring its bottom right corner to the bottom right corner of the window.
+ * @ATK_SCROLL_TOP_EDGE: Scroll the object vertically to bring its top edge to
+ *   the top edge of the window.
+ * @ATK_SCROLL_BOTTOM_EDGE: Scroll the object vertically to bring its bottom
+ *   edge to the bottom edge of the window.
+ * @ATK_SCROLL_LEFT_EDGE: Scroll the object vertically and horizontally to bring
+ *   its left edge to the left edge of the window.
+ * @ATK_SCROLL_RIGHT_EDGE: Scroll the object vertically and horizontally to
+ *   bring its right edge to the right edge of the window.
+ * @ATK_SCROLL_ANYWHERE: Scroll the object vertically and horizontally so that
+ *   as much as possible of the object becomes visible. The exact placement is
+ *   determined by the application.
+ *
+ * Specifies where an object should be placed on the screen when using scroll_to.
+ */
+typedef enum {
+  ATK_SCROLL_TOP_LEFT,
+  ATK_SCROLL_BOTTOM_RIGHT,
+  ATK_SCROLL_TOP_EDGE,
+  ATK_SCROLL_BOTTOM_EDGE,
+  ATK_SCROLL_LEFT_EDGE,
+  ATK_SCROLL_RIGHT_EDGE,
+  ATK_SCROLL_ANYWHERE
+} AtkScrollType;
+
+/**
+ *AtkRelationType:
+ *@ATK_RELATION_NULL: Not used, represens "no relationship" or an error condition.
+ *@ATK_RELATION_CONTROLLED_BY: Indicates an object controlled by one or more target objects.
+ *@ATK_RELATION_CONTROLLER_FOR: Indicates an object is an controller for one or more target objects.
+ *@ATK_RELATION_LABEL_FOR: Indicates an object is a label for one or more target objects.
+ *@ATK_RELATION_LABELLED_BY: Indicates an object is labelled by one or more target objects.
+ *@ATK_RELATION_MEMBER_OF: Indicates an object is a member of a group of one or more target objects.
+ *@ATK_RELATION_NODE_CHILD_OF: Indicates an object is a cell in a treetable which is displayed because a 
cell in the same column is expanded and identifies that cell.
+ *@ATK_RELATION_FLOWS_TO: Indicates that the object has content that flows logically to another
+ *  AtkObject in a sequential way, (for instance text-flow).
+ *@ATK_RELATION_FLOWS_FROM: Indicates that the object has content that flows logically from
+ *  another AtkObject in a sequential way, (for instance text-flow).
+ *@ATK_RELATION_SUBWINDOW_OF: Indicates a subwindow attached to a component but otherwise has no connection 
in  the UI heirarchy to that component.
+ *@ATK_RELATION_EMBEDS: Indicates that the object visually embeds 
+ *  another object's content, i.e. this object's content flows around 
+ *  another's content.
+ *@ATK_RELATION_EMBEDDED_BY: Reciprocal of %ATK_RELATION_EMBEDS, indicates that
+ *  this object's content is visualy embedded in another object.
+ *@ATK_RELATION_POPUP_FOR: Indicates that an object is a popup for another object.
+ *@ATK_RELATION_PARENT_WINDOW_OF: Indicates that an object is a parent window of another object.
+ *@ATK_RELATION_DESCRIBED_BY: Reciprocal of %ATK_RELATION_DESCRIPTION_FOR. Indicates that one
+ * or more target objects provide descriptive information about this object. This relation
+ * type is most appropriate for information that is not essential as its presentation may
+ * be user-configurable and/or limited to an on-demand mechanism such as an assistive
+ * technology command. For brief, essential information such as can be found in a widget's
+ * on-screen label, use %ATK_RELATION_LABELLED_BY. For an on-screen error message, use
+ * %ATK_RELATION_ERROR_MESSAGE. For lengthy extended descriptive information contained in
+ * an on-screen object, consider using %ATK_RELATION_DETAILS as assistive technologies may
+ * provide a means for the user to navigate to objects containing detailed descriptions so
+ * that their content can be more closely reviewed.
+ *@ATK_RELATION_DESCRIPTION_FOR: Reciprocal of %ATK_RELATION_DESCRIBED_BY. Indicates that this
+ * object provides descriptive information about the target object(s). See also
+ * %ATK_RELATION_DETAILS_FOR and %ATK_RELATION_ERROR_FOR.
+ *@ATK_RELATION_NODE_PARENT_OF: Indicates an object is a cell in a treetable and is expanded to display 
other cells in the same column.
+ *@ATK_RELATION_DETAILS: Reciprocal of %ATK_RELATION_DETAILS_FOR. Indicates that this object
+ * has a detailed or extended description, the contents of which can be found in the target
+ * object(s). This relation type is most appropriate for information that is sufficiently
+ * lengthy as to make navigation to the container of that information desirable. For less
+ * verbose information suitable for announcement only, see %ATK_RELATION_DESCRIBED_BY. If
+ * the detailed information describes an error condition, %ATK_RELATION_ERROR_FOR should be
+ * used instead. @Since: ATK-2.26.
+ *@ATK_RELATION_DETAILS_FOR: Reciprocal of %ATK_RELATION_DETAILS. Indicates that this object
+ * provides a detailed or extended description about the target object(s). See also
+ * %ATK_RELATION_DESCRIPTION_FOR and %ATK_RELATION_ERROR_FOR. @Since: ATK-2.26.
+ *@ATK_RELATION_ERROR_MESSAGE: Reciprocal of %ATK_RELATION_ERROR_FOR. Indicates that this object
+ * has one or more errors, the nature of which is described in the contents of the target
+ * object(s). Objects that have this relation type should also contain %ATK_STATE_INVALID_ENTRY
+ * in their #AtkStateSet. @Since: ATK-2.26.
+ *@ATK_RELATION_ERROR_FOR: Reciprocal of %ATK_RELATION_ERROR_MESSAGE. Indicates that this object
+ * contains an error message describing an invalid condition in the target object(s). @Since:
+ * ATK_2.26.
+ *@ATK_RELATION_LAST_DEFINED: Not used, this value indicates the end of the enumeration.
+ * 
+ *Describes the type of the relation
+ **/
+typedef enum
+{
+  ATK_RELATION_NULL = 0,
+  ATK_RELATION_CONTROLLED_BY,
+  ATK_RELATION_CONTROLLER_FOR,
+  ATK_RELATION_LABEL_FOR,
+  ATK_RELATION_LABELLED_BY,
+  ATK_RELATION_MEMBER_OF,
+  ATK_RELATION_NODE_CHILD_OF,
+  ATK_RELATION_FLOWS_TO,
+  ATK_RELATION_FLOWS_FROM,
+  ATK_RELATION_SUBWINDOW_OF, 
+  ATK_RELATION_EMBEDS, 
+  ATK_RELATION_EMBEDDED_BY, 
+  ATK_RELATION_POPUP_FOR, 
+  ATK_RELATION_PARENT_WINDOW_OF, 
+  ATK_RELATION_DESCRIBED_BY,
+  ATK_RELATION_DESCRIPTION_FOR,
+  ATK_RELATION_NODE_PARENT_OF,
+  ATK_RELATION_DETAILS,
+  ATK_RELATION_DETAILS_FOR,
+  ATK_RELATION_ERROR_MESSAGE,
+  ATK_RELATION_ERROR_FOR,
+  ATK_RELATION_LAST_DEFINED
+} AtkRelationType;
+
+/**
+ *AtkTextAttribute:
+ *@ATK_TEXT_ATTR_INVALID: Invalid attribute, like bad spelling or grammar.
+ *@ATK_TEXT_ATTR_LEFT_MARGIN: The pixel width of the left margin
+ *@ATK_TEXT_ATTR_RIGHT_MARGIN: The pixel width of the right margin
+ *@ATK_TEXT_ATTR_INDENT: The number of pixels that the text is indented
+ *@ATK_TEXT_ATTR_INVISIBLE: Either "true" or "false" indicating whether text is visible or not
+ *@ATK_TEXT_ATTR_EDITABLE: Either "true" or "false" indicating whether text is editable or not
+ *@ATK_TEXT_ATTR_PIXELS_ABOVE_LINES: Pixels of blank space to leave above each newline-terminated line. 
+ *@ATK_TEXT_ATTR_PIXELS_BELOW_LINES: Pixels of blank space to leave below each newline-terminated line.
+ *@ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP: Pixels of blank space to leave between wrapped lines inside the same 
newline-terminated line (paragraph).
+ *@ATK_TEXT_ATTR_BG_FULL_HEIGHT: "true" or "false" whether to make the background color for each character 
the height of the highest font used on the current line, or the height of the font used for the current 
character.
+ *@ATK_TEXT_ATTR_RISE: Number of pixels that the characters are risen above the baseline. See also 
ATK_TEXT_ATTR_TEXT_POSITION.
+ *@ATK_TEXT_ATTR_UNDERLINE: "none", "single", "double", "low", or "error"
+ *@ATK_TEXT_ATTR_STRIKETHROUGH: "true" or "false" whether the text is strikethrough 
+ *@ATK_TEXT_ATTR_SIZE: The size of the characters in points. eg: 10
+ *@ATK_TEXT_ATTR_SCALE: The scale of the characters. The value is a string representation of a double 
+ *@ATK_TEXT_ATTR_WEIGHT: The weight of the characters.
+ *@ATK_TEXT_ATTR_LANGUAGE: The language used
+ *@ATK_TEXT_ATTR_FAMILY_NAME: The font family name
+ *@ATK_TEXT_ATTR_BG_COLOR: The background color. The value is an RGB value of the format "%u,%u,%u"
+ *@ATK_TEXT_ATTR_FG_COLOR:The foreground color. The value is an RGB value of the format "%u,%u,%u"
+ *@ATK_TEXT_ATTR_BG_STIPPLE: "true" if a #GdkBitmap is set for stippling the background color.
+ *@ATK_TEXT_ATTR_FG_STIPPLE: "true" if a #GdkBitmap is set for stippling the foreground color.
+ *@ATK_TEXT_ATTR_WRAP_MODE: The wrap mode of the text, if any. Values are "none", "char", "word", or 
"word_char".
+ *@ATK_TEXT_ATTR_DIRECTION: The direction of the text, if set. Values are "none", "ltr" or "rtl" 
+ *@ATK_TEXT_ATTR_JUSTIFICATION: The justification of the text, if set. Values are "left", "right", "center" 
or "fill" 
+ *@ATK_TEXT_ATTR_STRETCH: The stretch of the text, if set. Values are "ultra_condensed", "extra_condensed", 
"condensed", "semi_condensed", "normal", "semi_expanded", "expanded", "extra_expanded" or "ultra_expanded"
+ *@ATK_TEXT_ATTR_VARIANT: The capitalization variant of the text, if set. Values are "normal" or "small_caps"
+ *@ATK_TEXT_ATTR_STYLE: The slant style of the text, if set. Values are "normal", "oblique" or "italic"
+ *@ATK_TEXT_ATTR_TEXT_POSITION: The vertical position with respect to the baseline. Values are "baseline", 
"super", or "sub". Note that a super or sub text attribute refers to position with respect to the baseline of 
the prior character.
+ *@ATK_TEXT_ATTR_LAST_DEFINED: not a valid text attribute, used for finding end of enumeration
+ *
+ * Describes the text attributes supported
+ **/
+typedef enum
+{
+  ATK_TEXT_ATTR_INVALID = 0,
+  ATK_TEXT_ATTR_LEFT_MARGIN,
+  ATK_TEXT_ATTR_RIGHT_MARGIN,
+  ATK_TEXT_ATTR_INDENT,
+  ATK_TEXT_ATTR_INVISIBLE,
+  ATK_TEXT_ATTR_EDITABLE,
+  ATK_TEXT_ATTR_PIXELS_ABOVE_LINES,
+  ATK_TEXT_ATTR_PIXELS_BELOW_LINES,
+  ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP,
+  ATK_TEXT_ATTR_BG_FULL_HEIGHT,
+  ATK_TEXT_ATTR_RISE,
+  ATK_TEXT_ATTR_UNDERLINE,
+  ATK_TEXT_ATTR_STRIKETHROUGH,
+  ATK_TEXT_ATTR_SIZE,
+  ATK_TEXT_ATTR_SCALE,
+  ATK_TEXT_ATTR_WEIGHT,
+  ATK_TEXT_ATTR_LANGUAGE,
+  ATK_TEXT_ATTR_FAMILY_NAME,
+  ATK_TEXT_ATTR_BG_COLOR,
+  ATK_TEXT_ATTR_FG_COLOR,
+  ATK_TEXT_ATTR_BG_STIPPLE,
+  ATK_TEXT_ATTR_FG_STIPPLE,
+  ATK_TEXT_ATTR_WRAP_MODE,
+  ATK_TEXT_ATTR_DIRECTION,
+  ATK_TEXT_ATTR_JUSTIFICATION,
+  ATK_TEXT_ATTR_STRETCH,
+  ATK_TEXT_ATTR_VARIANT,
+  ATK_TEXT_ATTR_STYLE,
+  ATK_TEXT_ATTR_TEXT_POSITION,
+  ATK_TEXT_ATTR_LAST_DEFINED
+} AtkTextAttribute;
+
+/**
+ *AtkTextBoundary:
+ *@ATK_TEXT_BOUNDARY_CHAR: Boundary is the boundary between characters
+ * (including non-printing characters)
+ *@ATK_TEXT_BOUNDARY_WORD_START: Boundary is the start (i.e. first character) of a word.
+ *@ATK_TEXT_BOUNDARY_WORD_END: Boundary is the end (i.e. last
+ * character) of a word.
+ *@ATK_TEXT_BOUNDARY_SENTENCE_START: Boundary is the first character in a sentence.
+ *@ATK_TEXT_BOUNDARY_SENTENCE_END: Boundary is the last (terminal)
+ * character in a sentence; in languages which use "sentence stop"
+ * punctuation such as English, the boundary is thus the '.', '?', or
+ * similar terminal punctuation character.
+ *@ATK_TEXT_BOUNDARY_LINE_START: Boundary is the initial character of the content or a
+ * character immediately following a newline, linefeed, or return character.
+ *@ATK_TEXT_BOUNDARY_LINE_END: Boundary is the linefeed, or return
+ * character.
+ *
+ * Text boundary types used for specifying boundaries for regions of text.
+ * This enumeration is deprecated since 2.9.4 and should not be used. Use
+ * AtkTextGranularity with #atk_text_get_string_at_offset instead.
+ **/
+typedef enum {
+  ATK_TEXT_BOUNDARY_CHAR,
+  ATK_TEXT_BOUNDARY_WORD_START,
+  ATK_TEXT_BOUNDARY_WORD_END,
+  ATK_TEXT_BOUNDARY_SENTENCE_START,
+  ATK_TEXT_BOUNDARY_SENTENCE_END,
+  ATK_TEXT_BOUNDARY_LINE_START,
+  ATK_TEXT_BOUNDARY_LINE_END
+} AtkTextBoundary;
+
+/**
+ *AtkTextGranularity:
+ *@ATK_TEXT_GRANULARITY_CHAR: Granularity is defined by the boundaries between characters
+ * (including non-printing characters)
+ *@ATK_TEXT_GRANULARITY_WORD: Granularity is defined by the boundaries of a word,
+ * starting at the beginning of the current word and finishing at the beginning of
+ * the following one, if present.
+ *@ATK_TEXT_GRANULARITY_SENTENCE: Granularity is defined by the boundaries of a sentence,
+ * starting at the beginning of the current sentence and finishing at the beginning of
+ * the following one, if present.
+ *@ATK_TEXT_GRANULARITY_LINE: Granularity is defined by the boundaries of a line,
+ * starting at the beginning of the current line and finishing at the beginning of
+ * the following one, if present.
+ *@ATK_TEXT_GRANULARITY_PARAGRAPH: Granularity is defined by the boundaries of a paragraph,
+ * starting at the beginning of the current paragraph and finishing at the beginning of
+ * the following one, if present.
+ *
+ * Text granularity types used for specifying the granularity of the region of
+ * text we are interested in.
+ **/
+typedef enum {
+  ATK_TEXT_GRANULARITY_CHAR,
+  ATK_TEXT_GRANULARITY_WORD,
+  ATK_TEXT_GRANULARITY_SENTENCE,
+  ATK_TEXT_GRANULARITY_LINE,
+  ATK_TEXT_GRANULARITY_PARAGRAPH
+} AtkTextGranularity;
+
+/**
+ *AtkTextClipType:
+ *@ATK_TEXT_CLIP_NONE: No clipping to be done
+ *@ATK_TEXT_CLIP_MIN: Text clipped by min coordinate is omitted
+ *@ATK_TEXT_CLIP_MAX: Text clipped by max coordinate is omitted
+ *@ATK_TEXT_CLIP_BOTH: Only text fully within mix/max bound is retained
+ *
+ *Describes the type of clipping required.
+ **/
+typedef enum {
+    ATK_TEXT_CLIP_NONE,
+    ATK_TEXT_CLIP_MIN,
+    ATK_TEXT_CLIP_MAX,
+    ATK_TEXT_CLIP_BOTH
+} AtkTextClipType;
+
+/**
+ *AtkKeyEventType:
+ *@ATK_KEY_EVENT_PRESS: specifies a key press event
+ *@ATK_KEY_EVENT_RELEASE: specifies a key release event
+ *@ATK_KEY_EVENT_LAST_DEFINED: Not a valid value; specifies end of enumeration
+ *
+ *Specifies the type of a keyboard evemt.
+ **/
+typedef enum
+{
+  ATK_KEY_EVENT_PRESS,
+  ATK_KEY_EVENT_RELEASE,
+  ATK_KEY_EVENT_LAST_DEFINED
+} AtkKeyEventType;
+
+/**
+ *AtkCoordType:
+ *@ATK_XY_SCREEN: specifies xy coordinates relative to the screen
+ *@ATK_XY_WINDOW: specifies xy coordinates relative to the widget's
+ * top-level window
+ *@ATK_XY_PARENT: specifies xy coordinates relative to the widget's
+ * immediate parent. Since: 2.30
+ *
+ *Specifies how xy coordinates are to be interpreted. Used by functions such
+ *as atk_component_get_position() and atk_text_get_character_extents() 
+ **/
+typedef enum {
+  ATK_XY_SCREEN,
+  ATK_XY_WINDOW,
+  ATK_XY_PARENT
+}AtkCoordType;
+
+/**
+ *AtkRole:
+ *@ATK_ROLE_INVALID: Invalid role
+ *@ATK_ROLE_ACCEL_LABEL: A label which represents an accelerator
+ *@ATK_ROLE_ALERT: An object which is an alert to the user. Assistive Technologies typically respond to 
ATK_ROLE_ALERT by reading the entire onscreen contents of containers advertising this role.  Should be used 
for warning dialogs, etc.
+ *@ATK_ROLE_ANIMATION: An object which is an animated image
+ *@ATK_ROLE_ARROW: An arrow in one of the four cardinal directions
+ *@ATK_ROLE_CALENDAR:  An object that displays a calendar and allows the user to select a date
+ *@ATK_ROLE_CANVAS: An object that can be drawn into and is used to trap events
+ *@ATK_ROLE_CHECK_BOX: A choice that can be checked or unchecked and provides a separate indicator for the 
current state
+ *@ATK_ROLE_CHECK_MENU_ITEM: A menu item with a check box
+ *@ATK_ROLE_COLOR_CHOOSER: A specialized dialog that lets the user choose a color
+ *@ATK_ROLE_COLUMN_HEADER: The header for a column of data
+ *@ATK_ROLE_COMBO_BOX: A collapsible list of choices the user can select from
+ *@ATK_ROLE_DATE_EDITOR: An object whose purpose is to allow a user to edit a date
+ *@ATK_ROLE_DESKTOP_ICON: An inconifed internal frame within a DESKTOP_PANE
+ *@ATK_ROLE_DESKTOP_FRAME: A pane that supports internal frames and iconified versions of those internal 
frames
+ *@ATK_ROLE_DIAL: An object whose purpose is to allow a user to set a value
+ *@ATK_ROLE_DIALOG: A top level window with title bar and a border
+ *@ATK_ROLE_DIRECTORY_PANE: A pane that allows the user to navigate through and select the contents of a 
directory
+ *@ATK_ROLE_DRAWING_AREA: An object used for drawing custom user interface elements
+ *@ATK_ROLE_FILE_CHOOSER: A specialized dialog that lets the user choose a file
+ *@ATK_ROLE_FILLER: A object that fills up space in a user interface
+ *@ATK_ROLE_FONT_CHOOSER: A specialized dialog that lets the user choose a font
+ *@ATK_ROLE_FRAME: A top level window with a title bar, border, menubar, etc.
+ *@ATK_ROLE_GLASS_PANE: A pane that is guaranteed to be painted on top of all panes beneath it
+ *@ATK_ROLE_HTML_CONTAINER: A document container for HTML, whose children represent the document content
+ *@ATK_ROLE_ICON: A small fixed size picture, typically used to decorate components
+ *@ATK_ROLE_IMAGE: An object whose primary purpose is to display an image
+ *@ATK_ROLE_INTERNAL_FRAME: A frame-like object that is clipped by a desktop pane
+ *@ATK_ROLE_LABEL: An object used to present an icon or short string in an interface
+ *@ATK_ROLE_LAYERED_PANE: A specialized pane that allows its children to be drawn in layers, providing a 
form of stacking order
+ *@ATK_ROLE_LIST: An object that presents a list of objects to the user and allows the user to select one or 
more of them 
+ *@ATK_ROLE_LIST_ITEM: An object that represents an element of a list 
+ *@ATK_ROLE_MENU: An object usually found inside a menu bar that contains a list of actions the user can 
choose from
+ *@ATK_ROLE_MENU_BAR: An object usually drawn at the top of the primary dialog box of an application that 
contains a list of menus the user can choose from 
+ *@ATK_ROLE_MENU_ITEM: An object usually contained in a menu that presents an action the user can choose
+ *@ATK_ROLE_OPTION_PANE: A specialized pane whose primary use is inside a DIALOG
+ *@ATK_ROLE_PAGE_TAB: An object that is a child of a page tab list
+ *@ATK_ROLE_PAGE_TAB_LIST: An object that presents a series of panels (or page tabs), one at a time, through 
some mechanism provided by the object 
+ *@ATK_ROLE_PANEL: A generic container that is often used to group objects
+ *@ATK_ROLE_PASSWORD_TEXT: A text object uses for passwords, or other places where the text content is not 
shown visibly to the user
+ *@ATK_ROLE_POPUP_MENU: A temporary window that is usually used to offer the user a list of choices, and 
then hides when the user selects one of those choices
+ *@ATK_ROLE_PROGRESS_BAR: An object used to indicate how much of a task has been completed
+ *@ATK_ROLE_PUSH_BUTTON: An object the user can manipulate to tell the application to do something
+ *@ATK_ROLE_RADIO_BUTTON: A specialized check box that will cause other radio buttons in the same group to 
become unchecked when this one is checked
+ *@ATK_ROLE_RADIO_MENU_ITEM: A check menu item which belongs to a group. At each instant exactly one of the 
radio menu items from a group is selected
+ *@ATK_ROLE_ROOT_PANE: A specialized pane that has a glass pane and a layered pane as its children
+ *@ATK_ROLE_ROW_HEADER: The header for a row of data
+ *@ATK_ROLE_SCROLL_BAR: An object usually used to allow a user to incrementally view a large amount of data.
+ *@ATK_ROLE_SCROLL_PANE: An object that allows a user to incrementally view a large amount of information
+ *@ATK_ROLE_SEPARATOR: An object usually contained in a menu to provide a visible and logical separation of 
the contents in a menu
+ *@ATK_ROLE_SLIDER: An object that allows the user to select from a bounded range
+ *@ATK_ROLE_SPLIT_PANE: A specialized panel that presents two other panels at the same time
+ *@ATK_ROLE_SPIN_BUTTON: An object used to get an integer or floating point number from the user
+ *@ATK_ROLE_STATUSBAR: An object which reports messages of minor importance to the user
+ *@ATK_ROLE_TABLE: An object used to represent information in terms of rows and columns
+ *@ATK_ROLE_TABLE_CELL: A cell in a table
+ *@ATK_ROLE_TABLE_COLUMN_HEADER: The header for a column of a table
+ *@ATK_ROLE_TABLE_ROW_HEADER: The header for a row of a table
+ *@ATK_ROLE_TEAR_OFF_MENU_ITEM: A menu item used to tear off and reattach its menu
+ *@ATK_ROLE_TERMINAL: An object that represents an accessible terminal.  (Since: 0.6)
+ *@ATK_ROLE_TEXT: An interactive widget that supports multiple lines of text and
+ * optionally accepts user input, but whose purpose is not to solicit user input.
+ * Thus ATK_ROLE_TEXT is appropriate for the text view in a plain text editor
+ * but inappropriate for an input field in a dialog box or web form. For widgets
+ * whose purpose is to solicit input from the user, see ATK_ROLE_ENTRY and
+ * ATK_ROLE_PASSWORD_TEXT. For generic objects which display a brief amount of
+ * textual information, see ATK_ROLE_STATIC.
+ *@ATK_ROLE_TOGGLE_BUTTON: A specialized push button that can be checked or unchecked, but does not provide 
a separate indicator for the current state
+ *@ATK_ROLE_TOOL_BAR: A bar or palette usually composed of push buttons or toggle buttons
+ *@ATK_ROLE_TOOL_TIP: An object that provides information about another object
+ *@ATK_ROLE_TREE: An object used to represent hierarchical information to the user
+ *@ATK_ROLE_TREE_TABLE: An object capable of expanding and collapsing rows as well as showing multiple 
columns of data.   (Since: 0.7)
+ *@ATK_ROLE_UNKNOWN: The object contains some Accessible information, but its role is not known
+ *@ATK_ROLE_VIEWPORT: An object usually used in a scroll pane
+ *@ATK_ROLE_WINDOW: A top level window with no title or border.
+ *@ATK_ROLE_HEADER: An object that serves as a document header. (Since: 1.1.1)
+ *@ATK_ROLE_FOOTER: An object that serves as a document footer.  (Since: 1.1.1)
+ *@ATK_ROLE_PARAGRAPH: An object which is contains a paragraph of text content.   (Since: 1.1.1)
+ *@ATK_ROLE_RULER: An object which describes margins and tab stops, etc. for text objects which it controls 
(should have CONTROLLER_FOR relation to such).   (Since: 1.1.1)
+ *@ATK_ROLE_APPLICATION: The object is an application object, which may contain @ATK_ROLE_FRAME objects or 
other types of accessibles.  The root accessible of any application's ATK hierarchy should have 
ATK_ROLE_APPLICATION.   (Since: 1.1.4)
+ *@ATK_ROLE_AUTOCOMPLETE: The object is a dialog or list containing items for insertion into an entry 
widget, for instance a list of words for completion of a text entry.   (Since: 1.3)
+ *@ATK_ROLE_EDITBAR: The object is an editable text object in a toolbar.  (Since: 1.5)
+ *@ATK_ROLE_EMBEDDED: The object is an embedded container within a document or panel.  This role is a 
grouping "hint" indicating that the contained objects share a context.  (Since: 1.7.2)
+ *@ATK_ROLE_ENTRY: The object is a component whose textual content may be entered or modified by the user, 
provided @ATK_STATE_EDITABLE is present.   (Since: 1.11)
+ *@ATK_ROLE_CHART: The object is a graphical depiction of quantitative data. It may contain multiple 
subelements whose attributes and/or description may be queried to obtain both the quantitative data and 
information about how the data is being presented. The LABELLED_BY relation is particularly important in 
interpreting objects of this type, as is the accessible-description property.  (Since: 1.11)
+ *@ATK_ROLE_CAPTION: The object contains descriptive information, usually textual, about another user 
interface element such as a table, chart, or image.  (Since: 1.11)
+ *@ATK_ROLE_DOCUMENT_FRAME: The object is a visual frame or container which contains a view of document 
content. Document frames may occur within another Document instance, in which case the second document may be 
said to be embedded in the containing instance. HTML frames are often ROLE_DOCUMENT_FRAME. Either this 
object, or a singleton descendant, should implement the Document interface.  (Since: 1.11)
+ *@ATK_ROLE_HEADING: The object serves as a heading for content which follows it in a document. The 'heading 
level' of the heading, if availabe, may be obtained by querying the object's attributes.
+ *@ATK_ROLE_PAGE: The object is a containing instance which encapsulates a page of information. 
@ATK_ROLE_PAGE is used in documents and content which support a paginated navigation model.  (Since: 1.11)
+ *@ATK_ROLE_SECTION: The object is a containing instance of document content which constitutes a particular 
'logical' section of the document. The type of content within a section, and the nature of the section 
division itself, may be obtained by querying the object's attributes. Sections may be nested. (Since: 1.11)
+ *@ATK_ROLE_REDUNDANT_OBJECT: The object is redundant with another object in the hierarchy, and is exposed 
for purely technical reasons.  Objects of this role should normally be ignored by clients. (Since: 1.11)
+ *@ATK_ROLE_FORM: The object is a container for form controls, for instance as part of a 
+ * web form or user-input form within a document.  This role is primarily a tag/convenience for 
+ * clients when navigating complex documents, it is not expected that ordinary GUI containers will 
+ * always have ATK_ROLE_FORM. (Since: 1.12.0)
+ *@ATK_ROLE_LINK: The object is a hypertext anchor, i.e. a "link" in a
+ * hypertext document.  Such objects are distinct from 'inline'
+ * content which may also use the Hypertext/Hyperlink interfaces
+ * to indicate the range/location within a text object where
+ * an inline or embedded object lies.  (Since: 1.12.1)
+ *@ATK_ROLE_INPUT_METHOD_WINDOW: The object is a window or similar viewport 
+ * which is used to allow composition or input of a 'complex character',
+ * in other words it is an "input method window." (Since: 1.12.1)
+ *@ATK_ROLE_TABLE_ROW: A row in a table.  (Since: 2.1.0)
+ *@ATK_ROLE_TREE_ITEM: An object that represents an element of a tree.  (Since: 2.1.0)
+ *@ATK_ROLE_DOCUMENT_SPREADSHEET: A document frame which contains a spreadsheet.  (Since: 2.1.0)
+ *@ATK_ROLE_DOCUMENT_PRESENTATION: A document frame which contains a presentation or slide content.  (Since: 
2.1.0)
+ *@ATK_ROLE_DOCUMENT_TEXT: A document frame which contains textual content, such as found in a word 
processing application.  (Since: 2.1.0)
+ *@ATK_ROLE_DOCUMENT_WEB: A document frame which contains HTML or other markup suitable for display in a web 
browser.  (Since: 2.1.0)
+ *@ATK_ROLE_DOCUMENT_EMAIL: A document frame which contains email content to be displayed or composed either 
in plain text or HTML.  (Since: 2.1.0)
+ *@ATK_ROLE_COMMENT: An object found within a document and designed to present a comment, note, or other 
annotation. In some cases, this object might not be visible until activated.  (Since: 2.1.0)
+ *@ATK_ROLE_LIST_BOX: A non-collapsible list of choices the user can select from. (Since: 2.1.0)
+ *@ATK_ROLE_GROUPING: A group of related widgets. This group typically has a label. (Since: 2.1.0)
+ *@ATK_ROLE_IMAGE_MAP: An image map object. Usually a graphic with multiple hotspots, where each hotspot can 
be activated resulting in the loading of another document or section of a document. (Since: 2.1.0)
+ *@ATK_ROLE_NOTIFICATION: A transitory object designed to present a message to the user, typically at the 
desktop level rather than inside a particular application.  (Since: 2.1.0)
+ *@ATK_ROLE_INFO_BAR: An object designed to present a message to the user within an existing window. (Since: 
2.1.0)
+ *@ATK_ROLE_LEVEL_BAR: A bar that serves as a level indicator to, for instance, show the strength of a 
password or the state of a battery.  (Since: 2.7.3)
+ *@ATK_ROLE_TITLE_BAR: A bar that serves as the title of a window or a
+ * dialog. (Since: 2.12)
+ *@ATK_ROLE_BLOCK_QUOTE: An object which contains a text section
+ * that is quoted from another source. (Since: 2.12)
+ *@ATK_ROLE_AUDIO: An object which represents an audio element. (Since: 2.12)
+ *@ATK_ROLE_VIDEO: An object which represents a video element. (Since: 2.12)
+ *@ATK_ROLE_DEFINITION: A definition of a term or concept. (Since: 2.12)
+ *@ATK_ROLE_ARTICLE: A section of a page that consists of a
+ * composition that forms an independent part of a document, page, or
+ * site. Examples: A blog entry, a news story, a forum post. (Since: 2.12)
+ *@ATK_ROLE_LANDMARK: A region of a web page intended as a
+ * navigational landmark. This is designed to allow Assistive
+ * Technologies to provide quick navigation among key regions within a
+ * document. (Since: 2.12)
+ *@ATK_ROLE_LOG: A text widget or container holding log content, such
+ * as chat history and error logs. In this role there is a
+ * relationship between the arrival of new items in the log and the
+ * reading order. The log contains a meaningful sequence and new
+ * information is added only to the end of the log, not at arbitrary
+ * points. (Since: 2.12)
+ *@ATK_ROLE_MARQUEE: A container where non-essential information
+ * changes frequently. Common usages of marquee include stock tickers
+ * and ad banners. The primary difference between a marquee and a log
+ * is that logs usually have a meaningful order or sequence of
+ * important content changes. (Since: 2.12)
+ *@ATK_ROLE_MATH: A text widget or container that holds a mathematical
+ * expression. (Since: 2.12)
+ *@ATK_ROLE_RATING: A widget whose purpose is to display a rating,
+ * such as the number of stars associated with a song in a media
+ * player. Objects of this role should also implement
+ * AtkValue. (Since: 2.12)
+ *@ATK_ROLE_TIMER: An object containing a numerical counter which
+ * indicates an amount of elapsed time from a start point, or the time
+ * remaining until an end point. (Since: 2.12)
+ *@ATK_ROLE_DESCRIPTION_LIST: An object that represents a list of
+ * term-value groups. A term-value group represents a individual
+ * description and consist of one or more names
+ * (ATK_ROLE_DESCRIPTION_TERM) followed by one or more values
+ * (ATK_ROLE_DESCRIPTION_VALUE). For each list, there should not be
+ * more than one group with the same term name. (Since: 2.12)
+ *@ATK_ROLE_DESCRIPTION_TERM: An object that represents a term or phrase
+ * with a corresponding definition. (Since: 2.12)
+ *@ATK_ROLE_DESCRIPTION_VALUE: An object that represents the
+ * description, definition or value of a term. (Since: 2.12)
+ *@ATK_ROLE_STATIC: A generic non-container object whose purpose is to display a
+ * brief amount of information to the user and whose role is known by the
+ * implementor but lacks semantic value for the user. Examples in which
+ * %ATK_ROLE_STATIC is appropriate include the message displayed in a message box
+ * and an image used as an alternative means to display text. %ATK_ROLE_STATIC
+ * should not be applied to widgets which are traditionally interactive, objects
+ * which display a significant amount of content, or any object which has an
+ * accessible relation pointing to another object. Implementors should expose the
+ * displayed information through the accessible name of the object. If doing so seems
+ * inappropriate, it may indicate that a different role should be used. For
+ * labels which describe another widget, see %ATK_ROLE_LABEL. For text views, see
+ * %ATK_ROLE_TEXT. For generic containers, see %ATK_ROLE_PANEL. For objects whose
+ * role is not known by the implementor, see %ATK_ROLE_UNKNOWN. (Since: 2.16)
+ *@ATK_ROLE_MATH_FRACTION: An object that represents a mathematical fraction.
+ * (Since: 2.16)
+ *@ATK_ROLE_MATH_ROOT: An object that represents a mathematical expression
+ * displayed with a radical. (Since: 2.16)
+ *@ATK_ROLE_SUBSCRIPT: An object that contains text that is displayed as a
+ * subscript. (Since: 2.16)
+ *@ATK_ROLE_SUPERSCRIPT: An object that contains text that is displayed as a
+ * superscript. (Since: 2.16)
+ *@ATK_ROLE_FOOTNOTE: An object that contains the text of a footnote. (Since: 2.26)
+ *@ATK_ROLE_CONTENT_DELETION: Content previously deleted or proposed to be
+ * deleted, e.g. in revision history or a content view providing suggestions
+ * from reviewers. (Since: 2.34)
+ *@ATK_ROLE_CONTENT_INSERTION: Content previously inserted or proposed to be
+ * inserted, e.g. in revision history or a content view providing suggestions
+ * from reviewers. (Since: 2.34)
+ *@ATK_ROLE_MARK: A run of content that is marked or highlighted, such as for
+ * reference purposes, or to call it out as having a special purpose. If the
+ * marked content has an associated section in the document elaborating on the
+ * reason for the mark, then %ATK_RELATION_DETAILS should be used on the mark
+ * to point to that associated section. In addition, the reciprocal relation
+ * %ATK_RELATION_DETAILS_FOR should be used on the associated content section
+ * to point back to the mark. (Since: 2.36)
+ *@ATK_ROLE_SUGGESTION: A container for content that is called out as a proposed
+ * change from the current version of the document, such as by a reviewer of the
+ * content. This role should include either %ATK_ROLE_CONTENT_DELETION and/or
+ * %ATK_ROLE_CONTENT_INSERTION children, in any order, to indicate what the
+ * actual change is. (Since: 2.36)
+ *@ATK_ROLE_LAST_DEFINED: not a valid role, used for finding end of the enumeration
+ *
+ * Describes the role of an object
+ *
+ * These are the built-in enumerated roles that UI components can have
+ * in ATK.  Other roles may be added at runtime, so an AtkRole >=
+ * %ATK_ROLE_LAST_DEFINED is not necessarily an error.
+ */
+typedef enum
+{
+  ATK_ROLE_INVALID = 0,
+  ATK_ROLE_ACCEL_LABEL,      /*<nick=accelerator-label>*/
+  ATK_ROLE_ALERT,
+  ATK_ROLE_ANIMATION,
+  ATK_ROLE_ARROW,
+  ATK_ROLE_CALENDAR,
+  ATK_ROLE_CANVAS,
+  ATK_ROLE_CHECK_BOX,
+  ATK_ROLE_CHECK_MENU_ITEM,
+  ATK_ROLE_COLOR_CHOOSER,
+  ATK_ROLE_COLUMN_HEADER,
+  ATK_ROLE_COMBO_BOX,
+  ATK_ROLE_DATE_EDITOR,
+  ATK_ROLE_DESKTOP_ICON,
+  ATK_ROLE_DESKTOP_FRAME,
+  ATK_ROLE_DIAL,
+  ATK_ROLE_DIALOG,
+  ATK_ROLE_DIRECTORY_PANE,
+  ATK_ROLE_DRAWING_AREA,
+  ATK_ROLE_FILE_CHOOSER,
+  ATK_ROLE_FILLER,
+  ATK_ROLE_FONT_CHOOSER,
+  ATK_ROLE_FRAME,
+  ATK_ROLE_GLASS_PANE,
+  ATK_ROLE_HTML_CONTAINER,
+  ATK_ROLE_ICON,
+  ATK_ROLE_IMAGE,
+  ATK_ROLE_INTERNAL_FRAME,
+  ATK_ROLE_LABEL,
+  ATK_ROLE_LAYERED_PANE,
+  ATK_ROLE_LIST,
+  ATK_ROLE_LIST_ITEM,
+  ATK_ROLE_MENU,
+  ATK_ROLE_MENU_BAR,
+  ATK_ROLE_MENU_ITEM,
+  ATK_ROLE_OPTION_PANE,
+  ATK_ROLE_PAGE_TAB,
+  ATK_ROLE_PAGE_TAB_LIST,
+  ATK_ROLE_PANEL,
+  ATK_ROLE_PASSWORD_TEXT,
+  ATK_ROLE_POPUP_MENU,
+  ATK_ROLE_PROGRESS_BAR,
+  ATK_ROLE_PUSH_BUTTON,
+  ATK_ROLE_RADIO_BUTTON,
+  ATK_ROLE_RADIO_MENU_ITEM,
+  ATK_ROLE_ROOT_PANE,
+  ATK_ROLE_ROW_HEADER,
+  ATK_ROLE_SCROLL_BAR,
+  ATK_ROLE_SCROLL_PANE,
+  ATK_ROLE_SEPARATOR,
+  ATK_ROLE_SLIDER,
+  ATK_ROLE_SPLIT_PANE,
+  ATK_ROLE_SPIN_BUTTON,
+  ATK_ROLE_STATUSBAR,
+  ATK_ROLE_TABLE,
+  ATK_ROLE_TABLE_CELL,
+  ATK_ROLE_TABLE_COLUMN_HEADER,
+  ATK_ROLE_TABLE_ROW_HEADER,
+  ATK_ROLE_TEAR_OFF_MENU_ITEM,
+  ATK_ROLE_TERMINAL,
+  ATK_ROLE_TEXT,
+  ATK_ROLE_TOGGLE_BUTTON,
+  ATK_ROLE_TOOL_BAR,
+  ATK_ROLE_TOOL_TIP,
+  ATK_ROLE_TREE,
+  ATK_ROLE_TREE_TABLE,
+  ATK_ROLE_UNKNOWN,
+  ATK_ROLE_VIEWPORT,
+  ATK_ROLE_WINDOW,
+  ATK_ROLE_HEADER,
+  ATK_ROLE_FOOTER,
+  ATK_ROLE_PARAGRAPH,
+  ATK_ROLE_RULER,
+  ATK_ROLE_APPLICATION,
+  ATK_ROLE_AUTOCOMPLETE,
+  ATK_ROLE_EDITBAR,          /*<nick=edit-bar>*/
+  ATK_ROLE_EMBEDDED,
+  ATK_ROLE_ENTRY,
+  ATK_ROLE_CHART,
+  ATK_ROLE_CAPTION,
+  ATK_ROLE_DOCUMENT_FRAME,
+  ATK_ROLE_HEADING,
+  ATK_ROLE_PAGE,
+  ATK_ROLE_SECTION,
+  ATK_ROLE_REDUNDANT_OBJECT,
+  ATK_ROLE_FORM,
+  ATK_ROLE_LINK,
+  ATK_ROLE_INPUT_METHOD_WINDOW,
+  ATK_ROLE_TABLE_ROW,
+  ATK_ROLE_TREE_ITEM,
+  ATK_ROLE_DOCUMENT_SPREADSHEET,
+  ATK_ROLE_DOCUMENT_PRESENTATION,
+  ATK_ROLE_DOCUMENT_TEXT,
+  ATK_ROLE_DOCUMENT_WEB,
+  ATK_ROLE_DOCUMENT_EMAIL,
+  ATK_ROLE_COMMENT,
+  ATK_ROLE_LIST_BOX,
+  ATK_ROLE_GROUPING,
+  ATK_ROLE_IMAGE_MAP,
+  ATK_ROLE_NOTIFICATION,
+  ATK_ROLE_INFO_BAR,
+  ATK_ROLE_LEVEL_BAR,
+  ATK_ROLE_TITLE_BAR,
+  ATK_ROLE_BLOCK_QUOTE,
+  ATK_ROLE_AUDIO,
+  ATK_ROLE_VIDEO,
+  ATK_ROLE_DEFINITION,
+  ATK_ROLE_ARTICLE,
+  ATK_ROLE_LANDMARK,
+  ATK_ROLE_LOG,
+  ATK_ROLE_MARQUEE,
+  ATK_ROLE_MATH,
+  ATK_ROLE_RATING,
+  ATK_ROLE_TIMER,
+  ATK_ROLE_DESCRIPTION_LIST,
+  ATK_ROLE_DESCRIPTION_TERM,
+  ATK_ROLE_DESCRIPTION_VALUE,
+  ATK_ROLE_STATIC,
+  ATK_ROLE_MATH_FRACTION,
+  ATK_ROLE_MATH_ROOT,
+  ATK_ROLE_SUBSCRIPT,
+  ATK_ROLE_SUPERSCRIPT,
+  ATK_ROLE_FOOTNOTE,
+  ATK_ROLE_CONTENT_DELETION,
+  ATK_ROLE_CONTENT_INSERTION,
+  ATK_ROLE_MARK,
+  ATK_ROLE_SUGGESTION,
+  ATK_ROLE_LAST_DEFINED
+} AtkRole;
+
+/**
+ *AtkLayer:
+ *@ATK_LAYER_INVALID: The object does not have a layer
+ *@ATK_LAYER_BACKGROUND: This layer is reserved for the desktop background
+ *@ATK_LAYER_CANVAS: This layer is used for Canvas components
+ *@ATK_LAYER_WIDGET: This layer is normally used for components
+ *@ATK_LAYER_MDI: This layer is used for layered components
+ *@ATK_LAYER_POPUP: This layer is used for popup components, such as menus
+ *@ATK_LAYER_OVERLAY: This layer is reserved for future use.
+ *@ATK_LAYER_WINDOW: This layer is used for toplevel windows.
+ *
+ * Describes the layer of a component
+ *
+ * These enumerated "layer values" are used when determining which UI
+ * rendering layer a component is drawn into, which can help in making
+ * determinations of when components occlude one another.
+ **/
+typedef enum
+{
+  ATK_LAYER_INVALID,
+  ATK_LAYER_BACKGROUND,
+  ATK_LAYER_CANVAS,
+  ATK_LAYER_WIDGET,
+  ATK_LAYER_MDI,
+  ATK_LAYER_POPUP,
+  ATK_LAYER_OVERLAY,
+  ATK_LAYER_WINDOW
+} AtkLayer;
+
+/**
+ * AtkValueType:
+ *
+ * Default types for a given value. Those are defined in order to
+ * easily get localized strings to describe a given value or a given
+ * subrange, using atk_value_type_get_localized_name().
+ *
+ */
+typedef enum
+{
+  ATK_VALUE_VERY_WEAK,
+  ATK_VALUE_WEAK,
+  ATK_VALUE_ACCEPTABLE,
+  ATK_VALUE_STRONG,
+  ATK_VALUE_VERY_STRONG,
+  ATK_VALUE_VERY_LOW,
+  ATK_VALUE_LOW,
+  ATK_VALUE_MEDIUM,
+  ATK_VALUE_HIGH,
+  ATK_VALUE_VERY_HIGH,
+  ATK_VALUE_VERY_BAD,
+  ATK_VALUE_BAD,
+  ATK_VALUE_GOOD,
+  ATK_VALUE_VERY_GOOD,
+  ATK_VALUE_BEST,
+  ATK_VALUE_LAST_DEFINED
+}AtkValueType;
+
+G_END_DECLS
diff --git a/atk/atkenumtypes.c.template b/atk/atkenumtypes.c.template
new file mode 100644
index 0000000000..1a53af81cc
--- /dev/null
+++ b/atk/atkenumtypes.c.template
@@ -0,0 +1,38 @@
+/*** BEGIN file-header ***/
+#include "config.h"
+
+#include "atktypes.h"
+
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+
+/* enumerations from "@basename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+
+GType
+@enum_name@_get_type (void)
+{
+  static volatile gsize g_define_type_id__volatile;
+
+  if (g_once_init_enter (&g_define_type_id__volatile))
+    {
+      static const G@Type@Value values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+        { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+        { 0, NULL, NULL }
+      };
+      GType g_define_type_id =
+        g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
+      g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+    }
+  return g_define_type_id__volatile;
+}
+/*** END value-tail ***/
diff --git a/atk/atkenumtypes.h.template b/atk/atkenumtypes.h.template
new file mode 100644
index 0000000000..8400593979
--- /dev/null
+++ b/atk/atkenumtypes.h.template
@@ -0,0 +1,26 @@
+/*** BEGIN file-header ***/
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#pragma once
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+
+/* enumerations from "@basename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GDK_AVAILABLE_IN_ALL
+GType @enum_name@_get_type (void);
+#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
+/*** END value-header ***/
+
+/*** BEGIN file-tail ***/
+G_END_DECLS
+/*** END file-tail ***/
diff --git a/atk/atkgobjectaccessible.c b/atk/atkgobjectaccessible.c
new file mode 100644
index 0000000000..d651c43934
--- /dev/null
+++ b/atk/atkgobjectaccessible.c
@@ -0,0 +1,206 @@
+/* ATK - Accessibility Toolkit
+ * Copyright 2001, 2002, 2003 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <atk/atkgobjectaccessible.h>
+#include <atk/atkregistry.h>
+#include <atk/atkutil.h>
+
+/**
+ * SECTION:atkgobjectaccessible
+ * @Short_description: This object class is derived from AtkObject and
+ *  can be used as a basis implementing accessible objects.
+ * @Title:AtkGObjectAccessible
+ *
+ * This object class is derived from AtkObject. It can be used as a
+ * basis for implementing accessible objects for GObjects which are
+ * not derived from GtkWidget. One example of its use is in providing
+ * an accessible object for GnomeCanvasItem in the GAIL library.
+ */
+static void       atk_gobject_accessible_class_init       (AtkGObjectAccessibleClass   *klass);
+static void       atk_real_gobject_accessible_initialize  (AtkObject         *atk_obj,
+                                                           gpointer          data);
+static void       atk_gobject_accessible_object_gone_cb   (gpointer          data);
+
+static GQuark quark_accessible_object = 0;
+static GQuark quark_object = 0;
+static gpointer parent_class = NULL;
+
+GType
+atk_gobject_accessible_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type)
+    {
+      static const GTypeInfo tinfo =
+      {
+        sizeof (AtkGObjectAccessibleClass),
+        (GBaseInitFunc) NULL, /* base init */
+        (GBaseFinalizeFunc) NULL, /* base finalize */
+        (GClassInitFunc) atk_gobject_accessible_class_init,
+        (GClassFinalizeFunc) NULL, /* class finalize */
+        NULL, /* class data */
+        sizeof (AtkGObjectAccessible),
+        0, /* nb preallocs */
+        (GInstanceInitFunc) NULL, /* instance init */
+        NULL /* value table */
+      };
+
+      type = g_type_register_static (ATK_TYPE_OBJECT,
+                                     "AtkGObjectAccessible", &tinfo, 0);
+    }
+
+  return type;
+}
+
+/**
+ * atk_gobject_accessible_for_object:
+ * @obj: a #GObject
+ *
+ * Gets the accessible object for the specified @obj.
+ *
+ * Returns: (transfer none): a #AtkObject which is the accessible object for
+ * the @obj
+ **/
+AtkObject*
+atk_gobject_accessible_for_object (GObject *obj)
+{
+  AtkObject* accessible;
+
+  g_return_val_if_fail (G_IS_OBJECT (obj), NULL);
+  /* See if we have a cached accessible for this object */
+
+  accessible = quark_accessible_object ? g_object_get_qdata (obj, quark_accessible_object) : NULL;
+
+  if (!accessible)
+    {
+      AtkObjectFactory *factory;
+      AtkRegistry *default_registry;
+
+      default_registry = atk_get_default_registry ();
+      factory = atk_registry_get_factory (default_registry, 
+                                          G_OBJECT_TYPE (obj));
+      accessible = atk_object_factory_create_accessible (factory,
+                                                         obj);
+      if (!ATK_IS_GOBJECT_ACCESSIBLE (accessible))
+        {
+          /*
+           * The AtkObject which was created was not a AtkGObjectAccessible
+           */
+          g_object_weak_ref (obj,
+                             (GWeakNotify) g_object_unref,
+                             accessible); 
+          if (!quark_accessible_object)
+            quark_accessible_object = g_quark_from_static_string ("accessible-object");
+        }
+      g_object_set_qdata (obj, quark_accessible_object, accessible);
+    }
+  return accessible;
+}
+
+/**
+ * atk_gobject_accessible_get_object:
+ * @obj: a #AtkGObjectAccessible
+ *
+ * Gets the GObject for which @obj is the accessible object.
+ *
+ * Returns: (transfer none): a #GObject which is the object for which @obj is
+ * the accessible object
+ **/
+GObject *
+atk_gobject_accessible_get_object (AtkGObjectAccessible *obj)
+{
+  g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (obj), NULL);
+
+  return g_object_get_qdata (G_OBJECT (obj), quark_object);
+}
+ 
+static void
+atk_real_gobject_accessible_initialize (AtkObject  *atk_obj,
+                                        gpointer   data)
+{
+  AtkGObjectAccessible *atk_gobj;
+
+  atk_gobj = ATK_GOBJECT_ACCESSIBLE (atk_obj);
+
+  g_object_set_qdata (G_OBJECT (atk_gobj), quark_object, data);
+  atk_obj->layer = ATK_LAYER_WIDGET;
+
+  g_object_weak_ref (data,
+                     (GWeakNotify) atk_gobject_accessible_object_gone_cb,
+                     atk_gobj);
+}
+
+static void
+atk_gobject_accessible_object_gone_cb (gpointer  data)
+{
+  GObject *object;
+
+  g_return_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (data));
+
+  object = atk_gobject_accessible_get_object (data);
+  if (object)
+      g_object_set_qdata (object, quark_accessible_object, NULL);
+
+  g_object_set_qdata (G_OBJECT (data), quark_object, NULL);
+  atk_object_notify_state_change (ATK_OBJECT (data), ATK_STATE_DEFUNCT,
+                                  TRUE); 
+  g_object_unref (data);
+}
+
+static void
+atk_gobject_accessible_dispose (GObject *atk_obj)
+{
+   GObject *obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (atk_obj));
+
+   if (obj) {
+      g_object_set_qdata (obj, quark_accessible_object, NULL);
+      g_object_weak_unref (obj,
+                           (GWeakNotify) atk_gobject_accessible_object_gone_cb,
+                           atk_obj);
+
+      g_object_set_qdata (atk_obj, quark_object, NULL);
+      atk_object_notify_state_change (ATK_OBJECT (atk_obj), ATK_STATE_DEFUNCT,
+                                      TRUE); 
+   }
+
+   G_OBJECT_CLASS (parent_class)->dispose (atk_obj);
+}
+
+static void
+atk_gobject_accessible_class_init (AtkGObjectAccessibleClass *klass)
+{ 
+  AtkObjectClass *class;
+  GObjectClass *object_class;
+
+  class = ATK_OBJECT_CLASS (klass);
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  class->initialize = atk_real_gobject_accessible_initialize;
+
+  object_class = G_OBJECT_CLASS (klass);
+  object_class->dispose = atk_gobject_accessible_dispose;
+
+  if (!quark_accessible_object)
+    quark_accessible_object = g_quark_from_static_string ("accessible-object");
+  quark_object = g_quark_from_static_string ("object-for-accessible");
+}
diff --git a/atk/atkgobjectaccessible.h b/atk/atkgobjectaccessible.h
new file mode 100644
index 0000000000..c5a8a4fd19
--- /dev/null
+++ b/atk/atkgobjectaccessible.h
@@ -0,0 +1,68 @@
+/* ATK - Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_GOBJECT_ACCESSIBLE_H__
+#define __ATK_GOBJECT_ACCESSIBLE_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+/*
+ * The AtkGObjectAccessible class is provided as a basis for implementing
+ * accessibility support for objects which are not GTK+ widgets
+ */
+#define ATK_TYPE_GOBJECT_ACCESSIBLE            (atk_gobject_accessible_get_type ())
+#define ATK_GOBJECT_ACCESSIBLE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
ATK_TYPE_GOBJECT_ACCESSIBLE, AtkGObjectAccessible))
+#define ATK_GOBJECT_ACCESSIBLE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), 
ATK_TYPE_GOBJECT_ACCESSIBLE, AtkGObjectAccessibleClass))
+#define ATK_IS_GOBJECT_ACCESSIBLE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
ATK_TYPE_GOBJECT_ACCESSIBLE))
+#define ATK_IS_GOBJECT_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), 
ATK_TYPE_GOBJECT_ACCESSIBLE))
+#define ATK_GOBJECT_ACCESSIBLE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), 
ATK_TYPE_GOBJECT_ACCESSIBLE, AtkGObjectAccessibleClass))
+
+typedef struct _AtkGObjectAccessible                AtkGObjectAccessible;
+typedef struct _AtkGObjectAccessibleClass           AtkGObjectAccessibleClass;
+
+struct _AtkGObjectAccessible
+{
+  AtkObject parent;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_gobject_accessible_get_type (void);
+
+struct _AtkGObjectAccessibleClass
+{
+  AtkObjectClass parent_class;
+
+  AtkFunction pad1;
+  AtkFunction pad2;
+};
+
+GDK_AVAILABLE_IN_ALL
+AtkObject *atk_gobject_accessible_for_object      (GObject           *obj);
+GDK_AVAILABLE_IN_ALL
+GObject   *atk_gobject_accessible_get_object      (AtkGObjectAccessible *obj);
+
+G_END_DECLS
+
+#endif /* __ATK_GOBJECT_ACCESSIBLE_H__ */
diff --git a/atk/atkhyperlink.c b/atk/atkhyperlink.c
new file mode 100644
index 0000000000..624edd7657
--- /dev/null
+++ b/atk/atkhyperlink.c
@@ -0,0 +1,373 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001, 2002, 2003 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include "atkhyperlink.h"
+#include <glib/gi18n-lib.h>
+
+/**
+ * SECTION:atkhyperlink
+ * @Short_description: An ATK object which encapsulates a link or set
+ *  of links in a hypertext document.
+ * @Title:AtkHyperlink
+ *
+ * An ATK object which encapsulates a link or set of links (for
+ * instance in the case of client-side image maps) in a hypertext
+ * document.  It may implement the AtkAction interface.  AtkHyperlink
+ * may also be used to refer to inline embedded content, since it
+ * allows specification of a start and end offset within the host
+ * AtkHypertext object.
+ */
+
+enum
+{
+  LINK_ACTIVATED,
+
+  LAST_SIGNAL
+};
+
+enum
+{
+  PROP_0,  /* gobject convention */
+
+  PROP_NUMBER_ANCHORS,
+  PROP_END_INDEX,
+  PROP_START_INDEX,
+  PROP_LAST
+};
+
+static void atk_hyperlink_class_init (AtkHyperlinkClass *klass);
+static void atk_hyperlink_init       (AtkHyperlink      *link,
+                                      AtkHyperlinkClass *klass);
+
+static void atk_hyperlink_real_get_property (GObject            *object,
+                                             guint              prop_id,
+                                             GValue             *value,
+                                             GParamSpec         *pspec);
+
+static void atk_hyperlink_action_iface_init (AtkActionIface *iface);
+
+static guint atk_hyperlink_signals[LAST_SIGNAL] = { 0, };
+
+static gpointer  parent_class = NULL;
+
+GType
+atk_hyperlink_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type)
+    {
+      static const GTypeInfo typeInfo =
+      {
+        sizeof (AtkHyperlinkClass),
+        (GBaseInitFunc) NULL,
+        (GBaseFinalizeFunc) NULL,
+        (GClassInitFunc) atk_hyperlink_class_init,
+        (GClassFinalizeFunc) NULL,
+        NULL,
+        sizeof (AtkHyperlink),
+        0,
+        (GInstanceInitFunc) atk_hyperlink_init,
+      } ;
+
+      static const GInterfaceInfo action_info =
+      {
+        (GInterfaceInitFunc) atk_hyperlink_action_iface_init,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+      };
+
+      type = g_type_register_static (G_TYPE_OBJECT, "AtkHyperlink", &typeInfo, 0) ;
+      g_type_add_interface_static (type, ATK_TYPE_ACTION, &action_info);
+    }
+  return type;
+}
+
+static void
+atk_hyperlink_class_init (AtkHyperlinkClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  gobject_class->get_property = atk_hyperlink_real_get_property;
+
+  klass->link_activated = NULL;
+
+  g_object_class_install_property (gobject_class,
+                                   PROP_NUMBER_ANCHORS,
+                                   g_param_spec_int ("number-of-anchors",
+                                                     _("Number of Anchors"),
+                                                     _("The number of anchors associated with the 
AtkHyperlink object"),
+                                                     0,
+                                                     G_MAXINT,
+                                                     0,
+                                                     G_PARAM_READABLE));
+  g_object_class_install_property (gobject_class,
+                                   PROP_END_INDEX,
+                                   g_param_spec_int ("end-index",
+                                                     _("End index"),
+                                                     _("The end index of the AtkHyperlink object"),
+                                                     0,
+                                                     G_MAXINT,
+                                                     0,
+                                                     G_PARAM_READABLE));
+  g_object_class_install_property (gobject_class,
+                                   PROP_START_INDEX,
+                                   g_param_spec_int ("start-index",
+                                                     _("Start index"),
+                                                     _("The start index of the AtkHyperlink object"),
+                                                     0,
+                                                     G_MAXINT,
+                                                     0,
+                                                     G_PARAM_READABLE));
+
+  /**
+   * AtkHyperlink::link-activated:
+   * @atkhyperlink: the object which received the signal.
+   *
+   * The signal link-activated is emitted when a link is activated.
+   */
+  atk_hyperlink_signals[LINK_ACTIVATED] =
+    g_signal_new ("link_activated",
+                  G_TYPE_FROM_CLASS (klass),
+                  G_SIGNAL_RUN_LAST,
+                  G_STRUCT_OFFSET (AtkHyperlinkClass, link_activated),
+                  NULL, NULL,
+                  g_cclosure_marshal_VOID__VOID,
+                  G_TYPE_NONE,
+                  0);
+
+}
+
+static void
+atk_hyperlink_init  (AtkHyperlink        *link,
+                     AtkHyperlinkClass   *klass)
+{
+}
+
+static void
+atk_hyperlink_real_get_property (GObject    *object,
+                                 guint      prop_id,
+                                 GValue     *value,
+                                 GParamSpec *pspec)
+{
+  AtkHyperlink* link;
+
+  link = ATK_HYPERLINK (object);
+
+  switch (prop_id)
+    {
+    case PROP_NUMBER_ANCHORS:
+      g_value_set_int (value,  atk_hyperlink_get_n_anchors (link));
+      break;
+    case PROP_END_INDEX:
+      g_value_set_int (value, atk_hyperlink_get_end_index (link));
+      break;
+    case PROP_START_INDEX:
+      g_value_set_int (value, atk_hyperlink_get_start_index (link));
+      break;
+    default:
+      break;
+    }
+}
+
+/**
+ * atk_hyperlink_get_uri:
+ * @link_: an #AtkHyperlink
+ * @i: a (zero-index) integer specifying the desired anchor
+ *
+ * Get a the URI associated with the anchor specified 
+ * by @i of @link_. 
+ *
+ * Multiple anchors are primarily used by client-side image maps.
+ *
+ * Returns: a string specifying the URI 
+ **/
+gchar*
+atk_hyperlink_get_uri (AtkHyperlink *link,
+                       gint         i)
+{
+  AtkHyperlinkClass *klass;
+
+  g_return_val_if_fail (ATK_IS_HYPERLINK (link), NULL);
+
+  klass = ATK_HYPERLINK_GET_CLASS (link);
+  if (klass->get_uri)
+    return (klass->get_uri) (link, i);
+  else
+    return NULL;
+}
+
+/**
+ * atk_hyperlink_get_object:
+ * @link_: an #AtkHyperlink
+ * @i: a (zero-index) integer specifying the desired anchor
+ *
+ * Returns the item associated with this hyperlinks nth anchor.
+ * For instance, the returned #AtkObject will implement #AtkText
+ * if @link_ is a text hyperlink, #AtkImage if @link_ is an image
+ * hyperlink etc. 
+ * 
+ * Multiple anchors are primarily used by client-side image maps.
+ *
+ * Returns: (transfer none): an #AtkObject associated with this hyperlinks
+ * i-th anchor
+ **/
+AtkObject*
+atk_hyperlink_get_object (AtkHyperlink *link,
+                          gint         i)
+{
+  AtkHyperlinkClass *klass;
+
+  g_return_val_if_fail (ATK_IS_HYPERLINK (link), NULL);
+
+  klass = ATK_HYPERLINK_GET_CLASS (link);
+  if (klass->get_object)
+    return (klass->get_object) (link, i);
+  else
+    return NULL;
+}
+
+/**
+ * atk_hyperlink_get_end_index:
+ * @link_: an #AtkHyperlink
+ *
+ * Gets the index with the hypertext document at which this link ends.
+ *
+ * Returns: the index with the hypertext document at which this link ends
+ **/
+gint
+atk_hyperlink_get_end_index (AtkHyperlink *link)
+{
+  AtkHyperlinkClass *klass;
+
+  g_return_val_if_fail (ATK_IS_HYPERLINK (link), 0);
+
+  klass = ATK_HYPERLINK_GET_CLASS (link);
+  if (klass->get_end_index)
+    return (klass->get_end_index) (link);
+  else
+    return 0;
+}
+
+/**
+ * atk_hyperlink_get_start_index:
+ * @link_: an #AtkHyperlink
+ *
+ * Gets the index with the hypertext document at which this link begins.
+ *
+ * Returns: the index with the hypertext document at which this link begins
+ **/
+gint
+atk_hyperlink_get_start_index (AtkHyperlink *link)
+{
+  AtkHyperlinkClass *klass;
+
+  g_return_val_if_fail (ATK_IS_HYPERLINK (link), 0);
+
+  klass = ATK_HYPERLINK_GET_CLASS (link);
+  if (klass->get_start_index)
+    return (klass->get_start_index) (link);
+  else
+    return 0;
+}
+
+/**
+ * atk_hyperlink_is_valid:
+ * @link_: an #AtkHyperlink
+ *
+ * Since the document that a link is associated with may have changed
+ * this method returns %TRUE if the link is still valid (with
+ * respect to the document it references) and %FALSE otherwise.
+ *
+ * Returns: whether or not this link is still valid
+ **/
+gboolean
+atk_hyperlink_is_valid (AtkHyperlink *link)
+{
+  AtkHyperlinkClass *klass;
+
+  g_return_val_if_fail (ATK_IS_HYPERLINK (link), FALSE);
+
+  klass = ATK_HYPERLINK_GET_CLASS (link);
+  if (klass->is_valid)
+    return (klass->is_valid) (link);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_hyperlink_is_inline:
+ * @link_: an #AtkHyperlink
+ *
+ * Indicates whether the link currently displays some or all of its
+ *           content inline.  Ordinary HTML links will usually return
+ *           %FALSE, but an inline &lt;src&gt; HTML element will return
+ *           %TRUE.
+ *
+ * Returns: whether or not this link displays its content inline.
+ *
+ **/
+gboolean
+atk_hyperlink_is_inline (AtkHyperlink *link)
+{
+  AtkHyperlinkClass *klass;
+
+  g_return_val_if_fail (ATK_IS_HYPERLINK (link), FALSE);
+
+  klass = ATK_HYPERLINK_GET_CLASS (link);
+  if (klass->link_state)
+    return (klass->link_state (link) & ATK_HYPERLINK_IS_INLINE);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_hyperlink_get_n_anchors:
+ * @link_: an #AtkHyperlink
+ *
+ * Gets the number of anchors associated with this hyperlink.
+ *
+ * Returns: the number of anchors associated with this hyperlink
+ **/
+gint
+atk_hyperlink_get_n_anchors (AtkHyperlink *link)
+{
+  AtkHyperlinkClass *klass;
+
+  g_return_val_if_fail (ATK_IS_HYPERLINK (link), 0);
+
+  klass = ATK_HYPERLINK_GET_CLASS (link);
+  if (klass->get_n_anchors)
+    return (klass->get_n_anchors) (link);
+  else
+    return 0;
+}
+
+static void atk_hyperlink_action_iface_init (AtkActionIface *iface)
+{
+  /*
+   * We do nothing here
+   *
+   * When we come to derive a class from AtkHyperlink we will provide an
+   * implementation of the AtkAction interface. 
+   */
+}
diff --git a/atk/atkhyperlink.h b/atk/atkhyperlink.h
new file mode 100644
index 0000000000..e9993b7030
--- /dev/null
+++ b/atk/atkhyperlink.h
@@ -0,0 +1,101 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_HYPERLINK_H__
+#define __ATK_HYPERLINK_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkaction.h>
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+/*
+ * AtkHyperlink encapsulates a link or set of links in a hypertext document.
+ *
+ * It implements the AtkAction interface.
+ */
+
+#define ATK_TYPE_HYPERLINK                        (atk_hyperlink_get_type ())
+#define ATK_HYPERLINK(obj)                        (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_HYPERLINK, 
AtkHyperlink))
+#define ATK_HYPERLINK_CLASS(klass)                (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_HYPERLINK, 
AtkHyperlinkClass))
+#define ATK_IS_HYPERLINK(obj)                     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_HYPERLINK))
+#define ATK_IS_HYPERLINK_CLASS(klass)             (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_HYPERLINK))
+#define ATK_HYPERLINK_GET_CLASS(obj)              (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_HYPERLINK, 
AtkHyperlinkClass))
+
+typedef struct _AtkHyperlink                      AtkHyperlink;
+typedef struct _AtkHyperlinkClass                 AtkHyperlinkClass;
+
+struct _AtkHyperlink
+{
+  GObject parent;
+};
+
+struct _AtkHyperlinkClass
+{
+  GObjectClass parent;
+
+  gchar*           (* get_uri)             (AtkHyperlink     *link_,
+                                            gint             i);
+  AtkObject*       (* get_object)          (AtkHyperlink     *link_,
+                                            gint             i);
+  gint             (* get_end_index)       (AtkHyperlink     *link_);
+  gint             (* get_start_index)     (AtkHyperlink     *link_);
+  gboolean         (* is_valid)            (AtkHyperlink     *link_);
+  gint            (* get_n_anchors)       (AtkHyperlink     *link_);
+  guint                   (* link_state)          (AtkHyperlink     *link_);
+  gboolean         (* is_selected_link)    (AtkHyperlink     *link_);
+
+  /* Signals */
+  void             ( *link_activated)      (AtkHyperlink     *link_);
+  AtkFunction      pad1;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType            atk_hyperlink_get_type             (void);
+
+GDK_AVAILABLE_IN_ALL
+gchar*           atk_hyperlink_get_uri              (AtkHyperlink     *link_,
+                                                     gint             i);
+
+GDK_AVAILABLE_IN_ALL
+AtkObject*       atk_hyperlink_get_object           (AtkHyperlink     *link_,
+                                                     gint             i);
+
+GDK_AVAILABLE_IN_ALL
+gint             atk_hyperlink_get_end_index        (AtkHyperlink     *link_);
+
+GDK_AVAILABLE_IN_ALL
+gint             atk_hyperlink_get_start_index      (AtkHyperlink     *link_);
+
+GDK_AVAILABLE_IN_ALL
+gboolean         atk_hyperlink_is_valid             (AtkHyperlink     *link_);
+
+GDK_AVAILABLE_IN_ALL
+gboolean         atk_hyperlink_is_inline             (AtkHyperlink     *link_);
+
+GDK_AVAILABLE_IN_ALL
+gint            atk_hyperlink_get_n_anchors        (AtkHyperlink     *link_);
+
+G_END_DECLS
+
+#endif /* __ATK_HYPERLINK_H__ */
diff --git a/atk/atkhyperlinkimpl.c b/atk/atkhyperlinkimpl.c
new file mode 100644
index 0000000000..7021bcf63c
--- /dev/null
+++ b/atk/atkhyperlinkimpl.c
@@ -0,0 +1,108 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2006 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include "atkhyperlinkimpl.h"
+
+/**
+ * SECTION:atkhyperlinkimpl
+ * @Short_description: An interface from which the AtkHyperlink
+ *  associated with an AtkObject may be obtained.
+ * @Title:AtkHyperlinImpl
+ *
+ * AtkHyperlinkImpl allows AtkObjects to refer to their associated
+ * AtkHyperlink instance, if one exists.  AtkHyperlinkImpl differs
+ * from AtkHyperlink in that AtkHyperlinkImpl is an interface, whereas
+ * AtkHyperlink is a object type.  The AtkHyperlinkImpl interface
+ * allows a client to query an AtkObject for the availability of an
+ * associated AtkHyperlink instance, and obtain that instance.  It is
+ * thus particularly useful in cases where embedded content or inline
+ * content within a text object is present, since the embedding text
+ * object implements AtkHypertext and the inline/embedded objects are
+ * exposed as children which implement AtkHyperlinkImpl, in addition
+ * to their being obtainable via AtkHypertext:getLink followed by
+ * AtkHyperlink:getObject.
+ *
+ * The AtkHyperlinkImpl interface should be supported by objects
+ * exposed within the hierarchy as children of an AtkHypertext
+ * container which correspond to "links" or embedded content within
+ * the text.  HTML anchors are not, for instance, normally exposed
+ * this way, but embedded images and components which appear inline in
+ * the content of a text object are. The AtkHyperlinkIface interface
+ * allows a means of determining which children are hyperlinks in this
+ * sense of the word, and for obtaining their corresponding
+ * AtkHyperlink object, from which the embedding range, URI, etc. can
+ * be obtained.
+ *
+ * To some extent this interface exists because, for historical
+ * reasons, AtkHyperlink was defined as an object type, not an
+ * interface.  Thus, in order to interact with AtkObjects via
+ * AtkHyperlink semantics, a new interface was required.
+ */
+
+GType
+atk_hyperlink_impl_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) {
+    GTypeInfo tinfo =
+    {
+      sizeof (AtkHyperlinkImplIface),
+      (GBaseInitFunc) NULL,
+      (GBaseFinalizeFunc) NULL,
+
+    };
+
+    type = g_type_register_static (G_TYPE_INTERFACE, "AtkHyperlinkImpl", &tinfo, 0);
+  }
+
+  return type;
+}
+
+/**
+ * atk_hyperlink_impl_get_hyperlink:
+ * @impl: a #GObject instance that implements AtkHyperlinkImplIface
+ *
+ * Gets the hyperlink associated with this object.
+ *
+ * Returns: (transfer full):  an AtkHyperlink object which points to this
+ * implementing AtkObject.
+ *
+ * Since: 1.12
+ **/
+AtkHyperlink *
+atk_hyperlink_impl_get_hyperlink (AtkHyperlinkImpl *impl)
+{
+  AtkHyperlinkImplIface *iface;
+
+  g_return_val_if_fail (impl != NULL, NULL);
+  g_return_val_if_fail (ATK_IS_HYPERLINK_IMPL (impl), NULL);
+
+  iface = ATK_HYPERLINK_IMPL_GET_IFACE (impl);
+
+  if (iface->get_hyperlink)
+    {
+      return (iface->get_hyperlink) (impl);
+    }
+  return NULL;
+}
+
diff --git a/atk/atkhyperlinkimpl.h b/atk/atkhyperlinkimpl.h
new file mode 100644
index 0000000000..95d2958622
--- /dev/null
+++ b/atk/atkhyperlinkimpl.h
@@ -0,0 +1,67 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_HYPERLINK_IMPL_H__
+#define __ATK_HYPERLINK_IMPL_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkhyperlink.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_HYPERLINK_IMPL          (atk_hyperlink_impl_get_type ())
+#define ATK_IS_HYPERLINK_IMPL(obj)       G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_HYPERLINK_IMPL)
+#define ATK_HYPERLINK_IMPL(obj)             G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_HYPERLINK_IMPL, 
AtkHyperlinkImpl)
+#define ATK_HYPERLINK_IMPL_GET_IFACE(obj)   G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_HYPERLINK_IMPL, 
AtkHyperlinkImplIface)
+
+#ifndef _TYPEDEF_ATK_HYPERLINK_IMPL_
+#define _TYPEDEF_ATK_HYPERLINK_IMPL__
+
+/**
+ * AtkHyperlinkImpl:
+ *
+ * A queryable interface which allows AtkHyperlink instances
+ * associated with an AtkObject to be obtained.  AtkHyperlinkImpl
+ * corresponds to AT-SPI's Hyperlink interface, and differs from
+ * AtkHyperlink in that AtkHyperlink is an object type, rather than an
+ * interface, and thus cannot be directly queried. FTW
+ */
+typedef struct _AtkHyperlinkImpl AtkHyperlinkImpl;
+#endif
+typedef struct _AtkHyperlinkImplIface AtkHyperlinkImplIface;
+
+struct _AtkHyperlinkImplIface
+{
+  GTypeInterface parent;
+    
+  AtkHyperlink*  (* get_hyperlink) (AtkHyperlinkImpl *impl);
+};
+
+GDK_AVAILABLE_IN_ALL
+GType            atk_hyperlink_impl_get_type (void);
+
+GDK_AVAILABLE_IN_ALL
+AtkHyperlink    *atk_hyperlink_impl_get_hyperlink (AtkHyperlinkImpl *impl);
+
+G_END_DECLS
+
+#endif /* __ATK_HYPERLINK_IMPL_H__ */
diff --git a/atk/atkhypertext.c b/atk/atkhypertext.c
new file mode 100644
index 0000000000..984899a566
--- /dev/null
+++ b/atk/atkhypertext.c
@@ -0,0 +1,181 @@
+/* ATK - The Accessibility Toolkit for GTK+
+ * Copyright 2001, 2002, 2003 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkhypertext.h"
+
+/**
+ * SECTION:atkhypertext
+ * @Short_description: The ATK interface which provides standard
+ *  mechanism for manipulating hyperlinks.
+ * @Title:AtkHypertext
+ *
+ * An interface used for objects which implement linking between
+ * multiple resource or content locations, or multiple 'markers'
+ * within a single document.  A Hypertext instance is associated with
+ * one or more Hyperlinks, which are associated with particular
+ * offsets within the Hypertext's included content.  While this
+ * interface is derived from Text, there is no requirement that
+ * Hypertext instances have textual content; they may implement Image
+ * as well, and Hyperlinks need not have non-zero text offsets.
+ */
+
+enum {
+  LINK_SELECTED,
+  LAST_SIGNAL
+};
+
+static void atk_hypertext_base_init (AtkHypertextIface *class);
+
+static guint atk_hypertext_signals[LAST_SIGNAL] = { 0 };
+
+
+GType
+atk_hypertext_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) {
+    static const GTypeInfo tinfo =
+    {
+      sizeof (AtkHypertextIface),
+      (GBaseInitFunc) atk_hypertext_base_init,
+      (GBaseFinalizeFunc) NULL,
+
+    };
+
+    type = g_type_register_static (G_TYPE_INTERFACE, "AtkHypertext", &tinfo, 0);
+  }
+
+  return type;
+}
+
+static void
+atk_hypertext_base_init (AtkHypertextIface *class)
+{
+  static gboolean initialized = FALSE;
+
+  if (!initialized)
+    {
+      /**
+       * AtkHypertext::link-selected:
+       * @atkhypertext: the object which received the signal.
+       * @arg1: the index of the hyperlink which is selected
+       *
+       * The "link-selected" signal is emitted by an AtkHyperText
+       * object when one of the hyperlinks associated with the object
+       * is selected.
+       */
+      atk_hypertext_signals[LINK_SELECTED] =
+        g_signal_new ("link_selected",
+                      ATK_TYPE_HYPERTEXT,
+                      G_SIGNAL_RUN_LAST,
+                      G_STRUCT_OFFSET (AtkHypertextIface, link_selected),
+                      (GSignalAccumulator) NULL, NULL,
+                      g_cclosure_marshal_VOID__INT,
+                      G_TYPE_NONE,
+                      1, G_TYPE_INT);
+
+      initialized = TRUE;
+    }
+}
+
+/**
+ * atk_hypertext_get_link:
+ * @hypertext: an #AtkHypertext
+ * @link_index: an integer specifying the desired link
+ *
+ * Gets the link in this hypertext document at index 
+ * @link_index
+ *
+ * Returns: (transfer none): the link in this hypertext document at
+ * index @link_index
+ **/
+AtkHyperlink* 
+atk_hypertext_get_link (AtkHypertext  *hypertext,
+                        gint          link_index)
+{
+  AtkHypertextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_HYPERTEXT (hypertext), NULL);
+
+  if (link_index < 0)
+    return NULL;
+
+  iface = ATK_HYPERTEXT_GET_IFACE (hypertext);
+
+  if (iface->get_link)
+    return (*(iface->get_link)) (hypertext, link_index);
+  else
+    return NULL;
+}
+
+/**
+ * atk_hypertext_get_n_links:
+ * @hypertext: an #AtkHypertext
+ *
+ * Gets the number of links within this hypertext document.
+ *
+ * Returns: the number of links within this hypertext document
+ **/
+gint 
+atk_hypertext_get_n_links (AtkHypertext  *hypertext)
+{
+  AtkHypertextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_HYPERTEXT (hypertext), 0);
+
+  iface = ATK_HYPERTEXT_GET_IFACE (hypertext);
+
+  if (iface->get_n_links)
+    return (*(iface->get_n_links)) (hypertext);
+  else
+    return 0;
+}
+
+/**
+ * atk_hypertext_get_link_index:
+ * @hypertext: an #AtkHypertext
+ * @char_index: a character index
+ *
+ * Gets the index into the array of hyperlinks that is associated with
+ * the character specified by @char_index.
+ *
+ * Returns: an index into the array of hyperlinks in @hypertext,
+ * or -1 if there is no hyperlink associated with this character.
+ **/
+gint 
+atk_hypertext_get_link_index (AtkHypertext  *hypertext,
+                              gint          char_index)
+{
+  AtkHypertextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_HYPERTEXT (hypertext), -1);
+
+  if (char_index < 0)
+    return -1;
+
+  iface = ATK_HYPERTEXT_GET_IFACE (hypertext);
+
+  if (iface->get_link_index)
+    return (*(iface->get_link_index)) (hypertext, char_index);
+  else
+    return -1;
+}
diff --git a/atk/atkhypertext.h b/atk/atkhypertext.h
new file mode 100644
index 0000000000..bdfe202564
--- /dev/null
+++ b/atk/atkhypertext.h
@@ -0,0 +1,77 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_HYPERTEXT_H__
+#define __ATK_HYPERTEXT_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkhyperlink.h>
+
+G_BEGIN_DECLS
+
+/*
+ * The AtkHypertext interface provides standard  mechanisms for manipulating 
+ * hyperlinks.
+ */
+
+#define ATK_TYPE_HYPERTEXT                    (atk_hypertext_get_type ())
+#define ATK_IS_HYPERTEXT(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_HYPERTEXT)
+#define ATK_HYPERTEXT(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_HYPERTEXT, 
AtkHypertext)
+#define ATK_HYPERTEXT_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_HYPERTEXT, 
AtkHypertextIface))
+
+#ifndef _TYPEDEF_ATK_HYPERTEXT_
+#define _TYPEDEF_ATK_HYPERTEXT_
+typedef struct _AtkHypertext AtkHypertext;
+#endif
+typedef struct _AtkHypertextIface AtkHypertextIface;
+
+struct _AtkHypertextIface
+{
+  GTypeInterface parent;
+
+  AtkHyperlink*(* get_link)                 (AtkHypertext       *hypertext,
+                                             gint               link_index);
+  gint         (* get_n_links)              (AtkHypertext       *hypertext);
+  gint         (* get_link_index)           (AtkHypertext       *hypertext,
+                                             gint               char_index);
+
+  /*
+   * signal handlers
+   */
+  void         (* link_selected)            (AtkHypertext       *hypertext,
+                                             gint               link_index);
+};
+GDK_AVAILABLE_IN_ALL
+GType atk_hypertext_get_type (void);
+
+GDK_AVAILABLE_IN_ALL
+AtkHyperlink* atk_hypertext_get_link       (AtkHypertext *hypertext,
+                                            gint          link_index);
+GDK_AVAILABLE_IN_ALL
+gint          atk_hypertext_get_n_links    (AtkHypertext *hypertext);
+GDK_AVAILABLE_IN_ALL
+gint          atk_hypertext_get_link_index (AtkHypertext *hypertext,
+                                            gint          char_index);
+
+G_END_DECLS
+
+#endif /* __ATK_HYPERTEXT_H__ */
diff --git a/atk/atkimage.c b/atk/atkimage.c
new file mode 100644
index 0000000000..3a7bdc78a2
--- /dev/null
+++ b/atk/atkimage.c
@@ -0,0 +1,246 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkimage.h"
+
+/**
+ * SECTION:atkimage
+ * @Short_description: The ATK Interface implemented by components
+ *  which expose image or pixmap content on-screen.
+ * @Title:AtkImage
+ *
+ * #AtkImage should be implemented by #AtkObject subtypes on behalf of
+ * components which display image/pixmap information onscreen, and
+ * which provide information (other than just widget borders, etc.)
+ * via that image content.  For instance, icons, buttons with icons,
+ * toolbar elements, and image viewing panes typically should
+ * implement #AtkImage.
+ *
+ * #AtkImage primarily provides two types of information: coordinate
+ * information (useful for screen review mode of screenreaders, and
+ * for use by onscreen magnifiers), and descriptive information.  The
+ * descriptive information is provided for alternative, text-only
+ * presentation of the most significant information present in the
+ * image.
+ */
+
+GType
+atk_image_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) {
+    static const GTypeInfo tinfo =
+    {
+      sizeof (AtkImageIface),
+      (GBaseInitFunc) NULL,
+      (GBaseFinalizeFunc) NULL
+    };
+
+    type = g_type_register_static (G_TYPE_INTERFACE, "AtkImage", &tinfo, 0);
+  }
+
+  return type;
+}
+
+/**
+ * atk_image_get_image_description:
+ * @image: a #GObject instance that implements AtkImageIface
+ *
+ * Get a textual description of this image.
+ *
+ * Returns: a string representing the image description
+ **/
+const gchar*
+atk_image_get_image_description (AtkImage *image)
+{
+  AtkImageIface *iface;
+
+  g_return_val_if_fail (ATK_IS_IMAGE (image), NULL);
+
+  iface = ATK_IMAGE_GET_IFACE (image);
+
+  if (iface->get_image_description)
+    {
+      return (iface->get_image_description) (image);
+    }
+  else
+    {
+      return NULL;
+    }
+}
+
+/**
+ * atk_image_get_image_size:
+ * @image: a #GObject instance that implements AtkImageIface
+ * @width: (out) (optional): filled with the image width, or -1 if the value cannot be obtained.
+ * @height: (out) (optional): filled with the image height, or -1 if the value cannot be obtained.
+ *
+ * Get the width and height in pixels for the specified image.
+ * The values of @width and @height are returned as -1 if the
+ * values cannot be obtained (for instance, if the object is not onscreen).
+ *
+ * If the size can not be obtained (e.g. missing support), x and y are set
+ * to -1.
+ **/
+void
+atk_image_get_image_size (AtkImage *image, 
+                          int      *width,
+                          int      *height)
+{
+  AtkImageIface *iface;
+  gint local_width, local_height;
+  gint *real_width, *real_height;
+
+  g_return_if_fail (ATK_IS_IMAGE (image));
+
+  if (width)
+    real_width = width;
+  else
+    real_width = &local_width;
+  if (height)
+    real_height = height;
+  else
+    real_height = &local_height;
+  
+  iface = ATK_IMAGE_GET_IFACE (image);
+
+  if (iface->get_image_size)
+  {
+    iface->get_image_size (image, real_width, real_height);
+  }
+  else
+  {
+    *real_width = -1;
+    *real_height = -1;
+  }
+}
+
+/**
+ * atk_image_set_image_description:
+ * @image: a #GObject instance that implements AtkImageIface
+ * @description: a string description to set for @image
+ *
+ * Sets the textual description for this image.
+ *
+ * Returns: boolean TRUE, or FALSE if operation could
+ * not be completed.
+ **/
+gboolean
+atk_image_set_image_description (AtkImage        *image,
+                                 const gchar     *description)
+{
+  AtkImageIface *iface;
+
+  g_return_val_if_fail (ATK_IS_IMAGE (image), FALSE);
+
+  iface = ATK_IMAGE_GET_IFACE (image);
+
+  if (iface->set_image_description)
+    {
+      return (iface->set_image_description) (image, description);
+    }
+  else
+    {
+      return FALSE;
+    }
+}
+
+/**
+ * atk_image_get_image_position:
+ * @image: a #GObject instance that implements AtkImageIface
+ * @x: (out) (optional): address of #gint to put x coordinate position; otherwise, -1 if value cannot be 
obtained.
+ * @y: (out) (optional): address of #gint to put y coordinate position; otherwise, -1 if value cannot be 
obtained.
+ * @coord_type: specifies whether the coordinates are relative to the screen
+ * or to the components top level window
+ * 
+ * Gets the position of the image in the form of a point specifying the
+ * images top-left corner.
+ *
+ * If the position can not be obtained (e.g. missing support), x and y are set
+ * to -1.
+ **/
+void     
+atk_image_get_image_position (AtkImage *image,
+                        gint *x,
+                       gint *y,
+                       AtkCoordType coord_type)
+{
+  AtkImageIface *iface;
+  gint local_x, local_y;
+  gint *real_x, *real_y;
+
+  g_return_if_fail (ATK_IS_IMAGE (image));
+
+  if (x)
+    real_x = x;
+  else
+    real_x = &local_x;
+  if (y)
+    real_y = y;
+  else
+    real_y = &local_y;
+
+  iface = ATK_IMAGE_GET_IFACE (image);
+
+  if (iface->get_image_position)
+  {
+    (iface->get_image_position) (image, real_x, real_y, coord_type);
+  }
+  else
+  {
+    *real_x = -1;
+    *real_y = -1;
+  }
+}
+
+/**
+ * atk_image_get_image_locale: 
+ * @image: An #AtkImage
+ *
+ * Retrieves the locale identifier associated to the #AtkImage.
+ *
+ * Since: 1.12
+ *
+ * Returns: (nullable): a string corresponding to the POSIX
+ *   `LC_MESSAGES` locale used by the image description, or
+ *   %NULL if the image does not specify a locale.
+ *
+ */
+const gchar*
+atk_image_get_image_locale (AtkImage   *image)
+{
+       
+  AtkImageIface *iface;
+
+  g_return_val_if_fail (ATK_IS_IMAGE (image), NULL);
+
+  iface = ATK_IMAGE_GET_IFACE (image);
+
+  if (iface->get_image_locale)
+    {
+      return (iface->get_image_locale) (image);
+    }
+  else
+    {
+      return NULL;
+    }
+}
diff --git a/atk/atkimage.h b/atk/atkimage.h
new file mode 100644
index 0000000000..1dcc35d486
--- /dev/null
+++ b/atk/atkimage.h
@@ -0,0 +1,89 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_IMAGE_H__
+#define __ATK_IMAGE_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atktypes.h>
+
+G_BEGIN_DECLS
+
+/*
+ * The AtkImage interface should be supported by any object that has an 
+ * associated image. This interface provides the standard mechanism for 
+ * an assistive technology to get descriptive information about images.
+ */
+
+#define ATK_TYPE_IMAGE                   (atk_image_get_type ())
+#define ATK_IS_IMAGE(obj)                G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_IMAGE)
+#define ATK_IMAGE(obj)                   G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_IMAGE, AtkImage)
+#define ATK_IMAGE_GET_IFACE(obj)         (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_IMAGE, 
AtkImageIface))
+
+#ifndef _TYPEDEF_ATK_IMAGE_
+#define _TYPEDEF_ATK_IMAGE_
+typedef struct _AtkImage AtkImage;
+#endif
+typedef struct _AtkImageIface AtkImageIface;
+
+struct _AtkImageIface
+{
+  GTypeInterface parent;
+  void                 ( *get_image_position)    (AtkImage              *image,
+                                                   gint                  *x,
+                                                  gint                  *y,
+                                                  AtkCoordType          coord_type);
+  const gchar*          ( *get_image_description) (AtkImage              *image);
+  void                  ( *get_image_size)        (AtkImage              *image,
+                                                   gint                  *width,
+                                                   gint                  *height);
+  gboolean              ( *set_image_description) (AtkImage              *image,
+                                                   const gchar           *description);
+  const gchar*          ( *get_image_locale)      (AtkImage              *image);
+};
+
+GDK_AVAILABLE_IN_ALL
+GType  atk_image_get_type             (void);
+
+GDK_AVAILABLE_IN_ALL
+const gchar* atk_image_get_image_description (AtkImage   *image);
+
+GDK_AVAILABLE_IN_ALL
+void     atk_image_get_image_size        (AtkImage           *image,
+                                          gint               *width,
+                                          gint               *height);
+
+GDK_AVAILABLE_IN_ALL
+gboolean atk_image_set_image_description (AtkImage           *image,
+                                          const gchar       *description);
+GDK_AVAILABLE_IN_ALL
+void     atk_image_get_image_position    (AtkImage          *image,
+                                          gint               *x,
+                                         gint               *y,
+                                         AtkCoordType       coord_type);
+
+GDK_AVAILABLE_IN_ALL
+const gchar* atk_image_get_image_locale (AtkImage   *image);
+
+G_END_DECLS
+
+#endif /* __ATK_IMAGE_H__ */
diff --git a/atk/atkmarshal.list b/atk/atkmarshal.list
new file mode 100644
index 0000000000..2bb343d77e
--- /dev/null
+++ b/atk/atkmarshal.list
@@ -0,0 +1,29 @@
+# see glib-genmarshal(1) for a detailed description of the file format,
+# possible parameter types are:
+#   VOID       indicates   no   return   type,  or  no  extra
+#              parameters. if VOID is used as  the  parameter
+#              list, no additional parameters may be present.
+#   BOOLEAN    for boolean types (gboolean)
+#   CHAR       for signed char types (gchar)
+#   UCHAR      for unsigned char types (guchar)
+#   INT                for signed integer types (gint)
+#   UINT       for unsigned integer types (guint)
+#   LONG       for signed long integer types (glong)
+#   ULONG      for unsigned long integer types (gulong)
+#   ENUM       for enumeration types (gint)
+#   FLAGS      for flag enumeration types (guint)
+#   FLOAT      for single-precision float types (gfloat)
+#   DOUBLE     for double-precision float types (gdouble)
+#   STRING     for string types (gchar*)
+#   PARAM      for GParamSpec or derived types  (GParamSpec*)
+#   BOXED      for boxed (anonymous but reference counted) types (GBoxed*)
+#   POINTER    for anonymous pointer types (gpointer)
+#   OBJECT     for GObject or derived types (GObject*)
+#   NONE       deprecated alias for VOID
+#   BOOL       deprecated alias for BOOLEAN
+
+VOID:INT,INT
+VOID:INT,INT,STRING
+VOID:INT,INT,INT,STRING
+VOID:STRING,BOOLEAN
+VOID:DOUBLE,STRING
diff --git a/atk/atknoopobject.c b/atk/atknoopobject.c
new file mode 100644
index 0000000000..41b6551de7
--- /dev/null
+++ b/atk/atknoopobject.c
@@ -0,0 +1,208 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001, 2002, 2003 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atk.h"
+#include "atknoopobject.h"
+
+/**
+ * SECTION:atknoopobject
+ * @Short_description: An AtkObject which purports to implement all ATK interfaces.
+ * @Title:AtkNoOpObject
+ *
+ * An AtkNoOpObject is an AtkObject which purports to implement all
+ * ATK interfaces. It is the type of AtkObject which is created if an
+ * accessible object is requested for an object type for which no
+ * factory type is specified.
+ *
+ */
+
+
+static void atk_no_op_object_class_init (AtkNoOpObjectClass *klass);
+
+static gpointer parent_class = NULL;
+
+
+GType
+atk_no_op_object_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type)
+  {
+    static const GTypeInfo tinfo =
+    {
+      sizeof (AtkObjectClass),
+      (GBaseInitFunc) NULL, /* base init */
+      (GBaseFinalizeFunc) NULL, /* base finalize */
+      (GClassInitFunc) atk_no_op_object_class_init, /* class init */
+      (GClassFinalizeFunc) NULL, /* class finalize */
+      NULL, /* class data */
+      sizeof (AtkNoOpObject), /* instance size */
+      0, /* nb preallocs */
+      (GInstanceInitFunc) NULL, /* instance init */
+      NULL /* value table */
+    };
+
+    static const GInterfaceInfo atk_component_info =
+    {
+        (GInterfaceInitFunc) NULL,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+    };
+
+    static const GInterfaceInfo atk_action_info =
+    {
+        (GInterfaceInitFunc) NULL,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+    };
+
+    static const GInterfaceInfo atk_editable_text_info =
+    {
+        (GInterfaceInitFunc) NULL,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+    };
+
+    static const GInterfaceInfo atk_image_info =
+    {
+        (GInterfaceInitFunc) NULL,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+    };
+
+    static const GInterfaceInfo atk_selection_info =
+    {
+        (GInterfaceInitFunc) NULL,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+    };
+
+    static const GInterfaceInfo atk_table_info =
+    {
+        (GInterfaceInitFunc) NULL,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+    };
+
+    static const GInterfaceInfo atk_table_cell_info =
+    {
+        (GInterfaceInitFunc) NULL,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+    };
+
+    static const GInterfaceInfo atk_text_info =
+    {
+        (GInterfaceInitFunc) NULL,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+    };
+
+    static const GInterfaceInfo atk_hypertext_info =
+    {
+        (GInterfaceInitFunc) NULL,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+    };
+
+    static const GInterfaceInfo atk_value_info =
+    {
+        (GInterfaceInitFunc) NULL,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+    };
+
+    static const GInterfaceInfo atk_document_info =
+    {
+        (GInterfaceInitFunc) NULL,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+    };
+
+    static const GInterfaceInfo atk_window_info =
+    {
+        (GInterfaceInitFunc) NULL,
+        (GInterfaceFinalizeFunc) NULL,
+        NULL
+    };
+
+    type = g_type_register_static (ATK_TYPE_OBJECT,
+                                    "AtkNoOpObject", &tinfo, 0);
+    g_type_add_interface_static (type, ATK_TYPE_COMPONENT,
+                                 &atk_component_info);
+    g_type_add_interface_static (type, ATK_TYPE_ACTION,
+                                 &atk_action_info);
+    g_type_add_interface_static (type, ATK_TYPE_EDITABLE_TEXT,
+                                 &atk_editable_text_info);
+    g_type_add_interface_static (type, ATK_TYPE_IMAGE,
+                                 &atk_image_info);
+    g_type_add_interface_static (type, ATK_TYPE_SELECTION,
+                                 &atk_selection_info);
+    g_type_add_interface_static (type, ATK_TYPE_TABLE,
+                                 &atk_table_info);
+    g_type_add_interface_static (type, ATK_TYPE_TABLE_CELL,
+                                 &atk_table_cell_info);
+    g_type_add_interface_static (type, ATK_TYPE_TEXT,
+                                 &atk_text_info);
+    g_type_add_interface_static (type, ATK_TYPE_HYPERTEXT,
+                                 &atk_hypertext_info);
+    g_type_add_interface_static (type, ATK_TYPE_VALUE,
+                                 &atk_value_info);
+    g_type_add_interface_static (type, ATK_TYPE_DOCUMENT,
+                                 &atk_document_info);
+    g_type_add_interface_static (type, ATK_TYPE_WINDOW,
+                                 &atk_window_info);
+  }
+  return type;
+}
+
+static void
+atk_no_op_object_class_init (AtkNoOpObjectClass *klass)
+{
+  parent_class = g_type_class_peek_parent (klass);
+}
+
+/**
+ * atk_no_op_object_new:
+ * @obj: a #GObject
+ *
+ * Provides a default (non-functioning stub) #AtkObject.
+ * Application maintainers should not use this method. 
+ *
+ * Returns: a default (non-functioning stub) #AtkObject
+ **/
+AtkObject*
+atk_no_op_object_new (GObject *obj)
+{
+  AtkObject *accessible;
+
+  g_return_val_if_fail (obj != NULL, NULL);
+
+  accessible = g_object_new (ATK_TYPE_NO_OP_OBJECT, NULL);
+  g_return_val_if_fail (accessible != NULL, NULL);
+
+  accessible->role = ATK_ROLE_INVALID;
+  accessible->layer = ATK_LAYER_INVALID;
+
+  return accessible;
+}
+
diff --git a/atk/atknoopobject.h b/atk/atknoopobject.h
new file mode 100644
index 0000000000..f2d7a193cc
--- /dev/null
+++ b/atk/atknoopobject.h
@@ -0,0 +1,59 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+
+#ifndef __ATK_NO_OP_OBJECT_H__
+#define __ATK_NO_OP_OBJECT_H__
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_NO_OP_OBJECT                (atk_no_op_object_get_type ())
+#define ATK_NO_OP_OBJECT(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_NO_OP_OBJECT, 
AtkNoOpObject))
+#define ATK_NO_OP_OBJECT_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_NO_OP_OBJECT, 
AtkNoOpObjectClass))
+#define ATK_IS_NO_OP_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_NO_OP_OBJECT))
+#define ATK_IS_NO_OP_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_NO_OP_OBJECT))
+#define ATK_NO_OP_OBJECT_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_NO_OP_OBJECT, 
AtkNoOpObjectClass))
+
+typedef struct _AtkNoOpObject                   AtkNoOpObject;
+typedef struct _AtkNoOpObjectClass              AtkNoOpObjectClass;
+
+struct _AtkNoOpObject
+{
+  AtkObject     parent;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_no_op_object_get_type (void);
+
+struct _AtkNoOpObjectClass
+{
+  AtkObjectClass parent_class;
+};
+
+GDK_AVAILABLE_IN_ALL
+AtkObject *atk_no_op_object_new (GObject  *obj);
+
+G_END_DECLS
+
+#endif /* __ATK_NO_OP_OBJECT_H__ */
diff --git a/atk/atknoopobjectfactory.c b/atk/atknoopobjectfactory.c
new file mode 100644
index 0000000000..501476b738
--- /dev/null
+++ b/atk/atknoopobjectfactory.c
@@ -0,0 +1,116 @@
+/* ATK - Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkobject.h"
+#include "atknoopobject.h"
+#include "atknoopobjectfactory.h"
+
+/**
+ * SECTION:atknoopobjectfactory
+ * @Short_description: The AtkObjectFactory which creates an AtkNoOpObject.
+ * @Title:AtkNoOpObjectFactory
+ *
+ * The AtkObjectFactory which creates an AtkNoOpObject. An instance of
+ * this is created by an AtkRegistry if no factory type has not been
+ * specified to create an accessible object of a particular type.
+ */
+static void atk_no_op_object_factory_class_init (
+                              AtkNoOpObjectFactoryClass        *klass);
+
+static AtkObject* atk_no_op_object_factory_create_accessible (
+                              GObject                          *obj);
+static GType      atk_no_op_object_factory_get_accessible_type (void);
+
+static gpointer    parent_class = NULL;
+
+GType
+atk_no_op_object_factory_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) 
+  {
+    static const GTypeInfo tinfo =
+    {
+      sizeof (AtkNoOpObjectFactoryClass),
+      (GBaseInitFunc) NULL, /* base init */
+      (GBaseFinalizeFunc) NULL, /* base finalize */
+      (GClassInitFunc) atk_no_op_object_factory_class_init, /* class init */
+      (GClassFinalizeFunc) NULL, /* class finalize */
+      NULL, /* class data */
+      sizeof (AtkNoOpObjectFactory), /* instance size */
+      0, /* nb preallocs */
+      (GInstanceInitFunc) NULL, /* instance init */
+      NULL /* value table */
+    };
+    type = g_type_register_static (
+                           ATK_TYPE_OBJECT_FACTORY, 
+                           "AtkNoOpObjectFactory" , &tinfo, 0);
+  }
+
+  return type;
+}
+
+static void 
+atk_no_op_object_factory_class_init (AtkNoOpObjectFactoryClass *klass)
+{
+  AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass);
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  class->create_accessible = atk_no_op_object_factory_create_accessible;
+  class->get_accessible_type = atk_no_op_object_factory_get_accessible_type;
+}
+
+/**
+ * atk_no_op_object_factory_new:
+ *
+ * Creates an instance of an #AtkObjectFactory which generates primitive
+ * (non-functioning) #AtkObjects. 
+ *
+ * Returns: an instance of an #AtkObjectFactory
+ **/
+AtkObjectFactory* 
+atk_no_op_object_factory_new (void)
+{
+  GObject *factory;
+
+  factory = g_object_new (ATK_TYPE_NO_OP_OBJECT_FACTORY, NULL);
+
+  g_return_val_if_fail (factory != NULL, NULL);
+  return ATK_OBJECT_FACTORY (factory);
+} 
+
+static AtkObject* 
+atk_no_op_object_factory_create_accessible (GObject   *obj)
+{
+  AtkObject     *accessible;
+
+  accessible = atk_no_op_object_new (obj);
+
+  return accessible;
+}
+
+static GType
+atk_no_op_object_factory_get_accessible_type (void)
+{
+  return ATK_TYPE_NO_OP_OBJECT;
+}
diff --git a/atk/atknoopobjectfactory.h b/atk/atknoopobjectfactory.h
new file mode 100644
index 0000000000..1ab1b52d1f
--- /dev/null
+++ b/atk/atknoopobjectfactory.h
@@ -0,0 +1,59 @@
+/* ATK - Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_NO_OP_OBJECT_FACTORY_H__
+#define __ATK_NO_OP_OBJECT_FACTORY_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobjectfactory.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_NO_OP_OBJECT_FACTORY                (atk_no_op_object_factory_get_type ())
+#define ATK_NO_OP_OBJECT_FACTORY(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
ATK_TYPE_NO_OP_OBJECT_FACTORY, AtkNoOpObjectFactory))
+#define ATK_NO_OP_OBJECT_FACTORY_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), 
ATK_TYPE_NO_OP_OBJECT_FACTORY, AtkNoOpObjectFactoryClass))
+#define ATK_IS_NO_OP_OBJECT_FACTORY(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
ATK_TYPE_NO_OP_OBJECT_FACTORY))
+#define ATK_IS_NO_OP_OBJECT_FACTORY_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), 
ATK_TYPE_NO_OP_OBJECT_FACTORY))
+#define ATK_NO_OP_OBJECT_FACTORY_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ( (obj), 
ATK_TYPE_NO_OP_OBJECT_FACTORY, AtkNoOpObjectFactoryClass))
+
+typedef struct _AtkNoOpObjectFactory                 AtkNoOpObjectFactory;
+typedef struct _AtkNoOpObjectFactoryClass            AtkNoOpObjectFactoryClass;
+
+struct _AtkNoOpObjectFactory
+{
+  AtkObjectFactory parent;
+};
+
+struct _AtkNoOpObjectFactoryClass
+{
+  AtkObjectFactoryClass parent_class;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_no_op_object_factory_get_type(void);
+
+GDK_AVAILABLE_IN_ALL
+AtkObjectFactory *atk_no_op_object_factory_new(void);
+
+G_END_DECLS
+
+#endif /* __ATK_NO_OP_OBJECT_FACTORY_H__ */
diff --git a/atk/atkobject.c b/atk/atkobject.c
new file mode 100644
index 0000000000..7ece1754f5
--- /dev/null
+++ b/atk/atkobject.c
@@ -0,0 +1,1514 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <locale.h>
+
+#include <glib-object.h>
+#include <glib/gi18n-lib.h>
+
+#include "atk.h"
+#include "atkmarshal.h"
+#include "atkprivate.h"
+
+/**
+ * SECTION:atkobject
+ * @Short_description: The base object class for the Accessibility Toolkit API.
+ * @Title:AtkObject
+ *
+ * This class is the primary class for accessibility support via the
+ * Accessibility ToolKit (ATK).  Objects which are instances of
+ * #AtkObject (or instances of AtkObject-derived types) are queried
+ * for properties which relate basic (and generic) properties of a UI
+ * component such as name and description.  Instances of #AtkObject
+ * may also be queried as to whether they implement other ATK
+ * interfaces (e.g. #AtkAction, #AtkComponent, etc.), as appropriate
+ * to the role which a given UI component plays in a user interface.
+ *
+ * All UI components in an application which provide useful
+ * information or services to the user must provide corresponding
+ * #AtkObject instances on request (in GTK+, for instance, usually on
+ * a call to #gtk_widget_get_accessible ()), either via ATK support
+ * built into the toolkit for the widget class or ancestor class, or
+ * in the case of custom widgets, if the inherited #AtkObject
+ * implementation is insufficient, via instances of a new #AtkObject
+ * subclass.
+ *
+ * See also: #AtkObjectFactory, #AtkRegistry.  (GTK+ users see also
+ * #GtkAccessible).
+ *
+ */
+
+static GPtrArray *role_names = NULL;
+
+enum
+{
+  PROP_0,  /* gobject convention */
+
+  PROP_NAME,
+  PROP_DESCRIPTION,
+  PROP_PARENT,      /* ancestry has changed */
+  PROP_ROLE,
+  PROP_LAYER,
+  PROP_MDI_ZORDER,
+  PROP_TABLE_SUMMARY,
+  PROP_TABLE_CAPTION_OBJECT,
+  PROP_HYPERTEXT_NUM_LINKS,
+  PROP_ACCESSIBLE_ID,
+  PROP_LAST         /* gobject convention */
+};
+
+enum {
+  CHILDREN_CHANGED,
+  PROPERTY_CHANGE,
+  STATE_CHANGE,
+  VISIBLE_DATA_CHANGED,
+  ACTIVE_DESCENDANT_CHANGED,
+  
+  LAST_SIGNAL
+};
+
+/* These are listed here for extraction by intltool */
+#if 0
+  N_("invalid")
+  N_("accelerator label")
+  N_("alert")
+  N_("animation")
+  N_("arrow")
+  N_("calendar")
+  N_("canvas")
+  N_("check box")
+  N_("check menu item")
+  N_("color chooser")
+  N_("column header")
+  N_("combo box")
+  N_("dateeditor")
+  N_("desktop icon")
+  N_("desktop frame")
+  N_("dial")
+  N_("dialog")
+  N_("directory pane")
+  N_("drawing area")
+  N_("file chooser")
+  N_("filler")
+  /* I know it looks wrong but that is what Java returns */
+  N_("fontchooser")
+  N_("frame")
+  N_("glass pane")
+  N_("html container")
+  N_("icon")
+  N_("image")
+  N_("internal frame")
+  N_("label")
+  N_("layered pane")
+  N_("list")
+  N_("list item")
+  N_("menu")
+  N_("menu bar")
+  N_("menu item")
+  N_("option pane")
+  N_("page tab")
+  N_("page tab list")
+  N_("panel")
+  N_("password text")
+  N_("popup menu")
+  N_("progress bar")
+  N_("push button")
+  N_("radio button")
+  N_("radio menu item")
+  N_("root pane")
+  N_("row header")
+  N_("scroll bar")
+  N_("scroll pane")
+  N_("separator")
+  N_("slider")
+  N_("split pane")
+  N_("spin button")
+  N_("statusbar")
+  N_("table")
+  N_("table cell")
+  N_("table column header")
+  N_("table row header")
+  N_("tear off menu item")
+  N_("terminal")
+  N_("text")
+  N_("toggle button")
+  N_("tool bar")
+  N_("tool tip")
+  N_("tree")
+  N_("tree table")
+  N_("unknown")
+  N_("viewport")
+  N_("window")
+  N_("header")
+  N_("footer")
+  N_("paragraph")
+  N_("ruler")
+  N_("application")
+  N_("autocomplete")
+  N_("edit bar")
+  N_("embedded component")
+  N_("entry")
+  N_("chart")
+  N_("caption")
+  N_("document frame")
+  N_("heading")
+  N_("page")
+  N_("section")
+  N_("redundant object")
+  N_("form")
+  N_("link")
+  N_("input method window")
+  N_("table row")
+  N_("tree item")
+  N_("document spreadsheet")
+  N_("document presentation")
+  N_("document text")
+  N_("document web")
+  N_("document email")
+  N_("comment")
+  N_("list box")
+  N_("grouping")
+  N_("image map")
+  N_("notification")
+  N_("info bar")
+  N_("level bar")
+  N_("title bar")
+  N_("block quote")
+  N_("audio")
+  N_("video")
+  N_("definition")
+  N_("article")
+  N_("landmark")
+  N_("log")
+  N_("marquee")
+  N_("math")
+  N_("rating")
+  N_("timer")
+  N_("description list")
+  N_("description term")
+  N_("description value")
+#endif /* 0 */
+
+typedef struct {
+  gchar *accessible_id;
+} AtkObjectPrivate;
+
+static gint AtkObject_private_offset;
+
+static void            atk_object_class_init        (AtkObjectClass  *klass);
+static void            atk_object_init              (AtkObject       *accessible,
+                                                     AtkObjectClass  *klass);
+static AtkRelationSet* atk_object_real_ref_relation_set 
+                                                    (AtkObject       *accessible);
+static void            atk_object_real_initialize   (AtkObject       *accessible,
+                                                     gpointer        data);
+static void            atk_object_real_set_property (GObject         *object,
+                                                     guint            prop_id,
+                                                     const GValue    *value,
+                                                     GParamSpec      *pspec);
+static void            atk_object_real_get_property (GObject         *object,
+                                                     guint            prop_id,
+                                                     GValue          *value,
+                                                     GParamSpec      *pspec);
+static void            atk_object_finalize          (GObject         *object);
+static const gchar*    atk_object_real_get_name     (AtkObject       *object);
+static const gchar*    atk_object_real_get_description
+                                                   (AtkObject       *object);
+static AtkObject*      atk_object_real_get_parent  (AtkObject       *object);
+static AtkRole         atk_object_real_get_role    (AtkObject       *object);
+static AtkLayer        atk_object_real_get_layer   (AtkObject       *object);
+static AtkStateSet*    atk_object_real_ref_state_set
+                                                   (AtkObject       *object);
+static void            atk_object_real_set_name    (AtkObject       *object,
+                                                    const gchar     *name);
+static void            atk_object_real_set_description
+                                                   (AtkObject       *object,
+                                                    const gchar     *description);
+static void            atk_object_real_set_parent  (AtkObject       *object,
+                                                    AtkObject       *parent);
+static void            atk_object_real_set_role    (AtkObject       *object,
+                                                    AtkRole         role);
+static void            atk_object_notify           (GObject         *obj,
+                                                    GParamSpec      *pspec);
+static const gchar*    atk_object_real_get_object_locale
+                                                   (AtkObject       *object);
+
+static guint atk_object_signals[LAST_SIGNAL] = { 0, };
+
+static gpointer parent_class = NULL;
+
+static const gchar* const atk_object_name_property_name = "accessible-name";
+static const gchar* const atk_object_name_property_description = "accessible-description";
+static const gchar* const atk_object_name_property_parent = "accessible-parent";
+static const gchar* const atk_object_name_property_role = "accessible-role";
+static const gchar* const atk_object_name_property_component_layer = "accessible-component-layer";
+static const gchar* const atk_object_name_property_component_mdi_zorder = "accessible-component-mdi-zorder";
+static const gchar* const atk_object_name_property_table_summary = "accessible-table-summary";
+static const gchar* const atk_object_name_property_table_caption_object = "accessible-table-caption-object";
+static const gchar* const atk_object_name_property_hypertext_num_links = "accessible-hypertext-nlinks";
+
+static void
+initialize_role_names ()
+{
+  GTypeClass *enum_class;
+  GEnumValue *enum_value;
+  int i;
+  gchar *role_name = NULL;
+
+  if (role_names)
+    return;
+
+  role_names = g_ptr_array_new ();
+  enum_class = g_type_class_ref (ATK_TYPE_ROLE);
+  if (!G_IS_ENUM_CLASS(enum_class))
+    return;
+
+  for (i = 0; i < ATK_ROLE_LAST_DEFINED; i++)
+    {
+      enum_value = g_enum_get_value (G_ENUM_CLASS (enum_class), i);
+      role_name = g_strdup (enum_value->value_nick);
+      // We want the role names to be in the format "check button" and not "check-button"
+      _compact_name (role_name);
+      g_ptr_array_add (role_names, role_name);
+    }
+
+  g_type_class_unref (enum_class);
+
+}
+
+GType
+atk_object_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type)
+    {
+      static const GTypeInfo typeInfo =
+      {
+        sizeof (AtkObjectClass),
+        (GBaseInitFunc) NULL,
+        (GBaseFinalizeFunc) NULL,
+        (GClassInitFunc) atk_object_class_init,
+        (GClassFinalizeFunc) NULL,
+        NULL,
+        sizeof (AtkObject),
+        0,
+        (GInstanceInitFunc) atk_object_init,
+      } ;
+      type = g_type_register_static (G_TYPE_OBJECT, "AtkObject", &typeInfo, 0) ;
+
+      AtkObject_private_offset =
+        g_type_add_instance_private (type, sizeof (AtkObjectPrivate));
+    }
+  return type;
+}
+
+static inline gpointer
+atk_object_get_instance_private (AtkObject *self)
+{
+  return (G_STRUCT_MEMBER_P (self, AtkObject_private_offset));
+}
+
+static void
+atk_object_class_init (AtkObjectClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  if (AtkObject_private_offset != 0)
+    g_type_class_adjust_private_offset (klass, &AtkObject_private_offset);
+
+  gobject_class->set_property = atk_object_real_set_property;
+  gobject_class->get_property = atk_object_real_get_property;
+  gobject_class->finalize = atk_object_finalize;
+  gobject_class->notify = atk_object_notify;
+
+  klass->get_name = atk_object_real_get_name;
+  klass->get_description = atk_object_real_get_description;
+  klass->get_parent = atk_object_real_get_parent;
+  klass->get_n_children = NULL;
+  klass->ref_child = NULL;
+  klass->get_index_in_parent = NULL;
+  klass->ref_relation_set = atk_object_real_ref_relation_set;
+  klass->get_role = atk_object_real_get_role;
+  klass->get_layer = atk_object_real_get_layer;
+  klass->get_mdi_zorder = NULL;
+  klass->initialize = atk_object_real_initialize;
+  klass->ref_state_set = atk_object_real_ref_state_set;
+  klass->set_name = atk_object_real_set_name;
+  klass->set_description = atk_object_real_set_description;
+  klass->set_parent = atk_object_real_set_parent;
+  klass->set_role = atk_object_real_set_role;
+  klass->get_object_locale = atk_object_real_get_object_locale;
+
+  /*
+   * We do not define default signal handlers here
+   */
+  klass->children_changed = NULL;
+  klass->focus_event = NULL;
+  klass->property_change = NULL;
+  klass->visible_data_changed = NULL;
+  klass->active_descendant_changed = NULL;
+
+  _gettext_initialization ();
+
+  g_object_class_install_property (gobject_class,
+                                   PROP_NAME,
+                                   g_param_spec_string (atk_object_name_property_name,
+                                                        _("Accessible Name"),
+                                                        _("Object instance’s name formatted for assistive 
technology access"),
+                                                        NULL,
+                                                        G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class,
+                                   PROP_DESCRIPTION,
+                                   g_param_spec_string (atk_object_name_property_description,
+                                                        _("Accessible Description"),
+                                                        _("Description of an object, formatted for assistive 
technology access"),
+                                                        NULL,
+                                                        G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class,
+                                   PROP_PARENT,
+                                   g_param_spec_object (atk_object_name_property_parent,
+                                                        _("Accessible Parent"),
+                                                        _("Parent of the current accessible as returned by 
atk_object_get_parent()"),
+                                                        ATK_TYPE_OBJECT,
+                                                        G_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
+                                   PROP_ROLE,
+                                   g_param_spec_enum   (atk_object_name_property_role,
+                                                        _("Accessible Role"),
+                                                        _("The accessible role of this object"),
+                                                        ATK_TYPE_ROLE,
+                                                        ATK_ROLE_UNKNOWN,
+                                                        G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class,
+                                   PROP_LAYER,
+                                   g_param_spec_int    (atk_object_name_property_component_layer,
+                                                        _("Accessible Layer"),
+                                                        _("The accessible layer of this object"),
+                                                        0,
+                                                        G_MAXINT,
+                                                        0,
+                                                        G_PARAM_READABLE));
+  g_object_class_install_property (gobject_class,
+                                   PROP_MDI_ZORDER,
+                                   g_param_spec_int    (atk_object_name_property_component_mdi_zorder,
+                                                        _("Accessible MDI Value"),
+                                                        _("The accessible MDI value of this object"),
+                                                        G_MININT,
+                                                        G_MAXINT,
+                                                        G_MININT,
+                                                        G_PARAM_READABLE));
+
+  g_object_class_install_property (gobject_class,
+                                   PROP_TABLE_SUMMARY,
+                                   g_param_spec_object (atk_object_name_property_table_summary,
+                                                        _("Accessible Table Summary"),
+                                                        _("Is used to notify that the table summary has 
changed"),
+                                                        ATK_TYPE_OBJECT,
+                                                        G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class,
+                                   PROP_TABLE_CAPTION_OBJECT,
+                                   g_param_spec_object (atk_object_name_property_table_caption_object,
+                                                        _("Accessible Table Caption Object"),
+                                                        _("Is used to notify that the table caption has 
changed"),
+                                                        ATK_TYPE_OBJECT,
+                                                        G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class,
+                                   PROP_HYPERTEXT_NUM_LINKS,
+                                   g_param_spec_int    (atk_object_name_property_hypertext_num_links,
+                                                        _("Number of Accessible Hypertext Links"),
+                                                        _("The number of links which the current 
AtkHypertext has"),
+                                                        0,
+                                                        G_MAXINT,
+                                                        0,
+                                                        G_PARAM_READABLE));
+
+  /**
+   * AtkObject::children-changed:
+   * @atkobject: the object which received the signal.
+   * @arg1: The index of the added or removed child. The value can be
+   * -1. This is used if the value is not known by the implementor
+   * when the child is added/removed or irrelevant.
+   * @arg2: (type AtkObject): A gpointer to the child AtkObject which was added or
+   * removed. If the child was removed, it is possible that it is not
+   * available for the implementor. In that case this pointer can be
+   * NULL.
+   *
+   * The signal "children-changed" is emitted when a child is added or
+   * removed form an object. It supports two details: "add" and
+   * "remove"
+   */
+  atk_object_signals[CHILDREN_CHANGED] =
+    g_signal_new ("children_changed",
+                 G_TYPE_FROM_CLASS (klass),
+                 G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
+                 G_STRUCT_OFFSET (AtkObjectClass, children_changed),
+                 NULL, NULL,
+                 g_cclosure_marshal_VOID__UINT_POINTER,
+                 G_TYPE_NONE,
+                 2, G_TYPE_UINT, G_TYPE_POINTER);
+
+  /**
+   * AtkObject::property-change:
+   * @atkobject: the object which received the signal.
+   * @arg1: (type AtkPropertyValues): an #AtkPropertyValues containing the new
+   * value of the property which changed.
+   *
+   * The signal "property-change" is emitted when an object's property
+   * value changes. @arg1 contains an #AtkPropertyValues with the name
+   * and the new value of the property whose value has changed. Note
+   * that, as with GObject notify, getting this signal does not
+   * guarantee that the value of the property has actually changed; it
+   * may also be emitted when the setter of the property is called to
+   * reinstate the previous value.
+   *
+   * Toolkit implementor note: ATK implementors should use
+   * g_object_notify() to emit property-changed
+   * notifications. #AtkObject::property-changed is needed by the
+   * implementation of atk_add_global_event_listener() because GObject
+   * notify doesn't support emission hooks.
+   */
+  atk_object_signals[PROPERTY_CHANGE] =
+    g_signal_new ("property_change",
+                  G_TYPE_FROM_CLASS (klass),
+                  G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
+                  G_STRUCT_OFFSET (AtkObjectClass, property_change),
+                  (GSignalAccumulator) NULL, NULL,
+                  g_cclosure_marshal_VOID__POINTER,
+                  G_TYPE_NONE, 1,
+                  G_TYPE_POINTER);
+
+  /**
+   * AtkObject::state-change:
+   * @atkobject: the object which received the signal.
+   * @arg1: The name of the state which has changed
+   * @arg2: A boolean which indicates whether the state has been set or unset.
+   *
+   * The "state-change" signal is emitted when an object's state
+   * changes.  The detail value identifies the state type which has
+   * changed.
+   */
+  atk_object_signals[STATE_CHANGE] =
+    g_signal_new ("state_change",
+                  G_TYPE_FROM_CLASS (klass),
+                  G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
+                  G_STRUCT_OFFSET (AtkObjectClass, state_change),
+                  (GSignalAccumulator) NULL, NULL,
+                  atk_marshal_VOID__STRING_BOOLEAN,
+                  G_TYPE_NONE, 2,
+                  G_TYPE_STRING,
+                  G_TYPE_BOOLEAN);
+
+  /**
+   * AtkObject::visible-data-changed:
+   * @atkobject: the object which received the signal.
+   *
+   * The "visible-data-changed" signal is emitted when the visual
+   * appearance of the object changed.
+   */
+  atk_object_signals[VISIBLE_DATA_CHANGED] =
+    g_signal_new ("visible_data_changed",
+                  G_TYPE_FROM_CLASS (klass),
+                  G_SIGNAL_RUN_LAST,
+                  G_STRUCT_OFFSET (AtkObjectClass, visible_data_changed),
+                  (GSignalAccumulator) NULL, NULL,
+                  g_cclosure_marshal_VOID__VOID,
+                  G_TYPE_NONE, 0);
+
+  /**
+   * AtkObject::active-descendant-changed:
+   * @atkobject: the object which received the signal.
+   * @arg1: (type AtkObject): the newly focused object.
+   *
+   * The "active-descendant-changed" signal is emitted by an object
+   * which has the state ATK_STATE_MANAGES_DESCENDANTS when the focus
+   * object in the object changes. For instance, a table will emit the
+   * signal when the cell in the table which has focus changes.
+   */
+  atk_object_signals[ACTIVE_DESCENDANT_CHANGED] =
+    g_signal_new ("active_descendant_changed",
+                 G_TYPE_FROM_CLASS (klass),
+                 G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
+                 G_STRUCT_OFFSET (AtkObjectClass, active_descendant_changed),
+                 NULL, NULL,
+                 g_cclosure_marshal_VOID__POINTER,
+                 G_TYPE_NONE,
+                 1, G_TYPE_POINTER);
+}
+
+static void
+atk_object_init  (AtkObject        *accessible,
+                  AtkObjectClass   *klass)
+{
+  AtkObjectPrivate *private = atk_object_get_instance_private (accessible);
+
+  accessible->name = NULL;
+  accessible->description = NULL;
+  accessible->accessible_parent = NULL;
+  accessible->relation_set = atk_relation_set_new();
+  accessible->role = ATK_ROLE_UNKNOWN;
+  private->accessible_id = NULL;
+}
+
+GType
+atk_implementor_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type)
+    {
+      static const GTypeInfo typeInfo =
+      {
+        sizeof (AtkImplementorIface),
+        (GBaseInitFunc) NULL,
+        (GBaseFinalizeFunc) NULL,
+      } ;
+
+      type = g_type_register_static (G_TYPE_INTERFACE, "AtkImplementorIface", &typeInfo, 0) ;
+    }
+
+  return type;
+}
+
+/**
+ * atk_object_get_name:
+ * @accessible: an #AtkObject
+ *
+ * Gets the accessible name of the accessible.
+ *
+ * Returns: a character string representing the accessible name of the object.
+ **/
+const gchar*
+atk_object_get_name (AtkObject *accessible)
+{
+  AtkObjectClass *klass;
+
+  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->get_name)
+    return (klass->get_name) (accessible);
+  else
+    return NULL;
+}
+
+/**
+ * atk_object_get_description:
+ * @accessible: an #AtkObject
+ *
+ * Gets the accessible description of the accessible.
+ *
+ * Returns: a character string representing the accessible description
+ * of the accessible.
+ *
+ **/
+const gchar*
+atk_object_get_description (AtkObject *accessible)
+{
+  AtkObjectClass *klass;
+
+  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->get_description)
+    return (klass->get_description) (accessible);
+  else
+    return NULL;
+}
+
+/**
+ * atk_object_get_parent:
+ * @accessible: an #AtkObject
+ *
+ * Gets the accessible parent of the accessible. By default this is
+ * the one assigned with atk_object_set_parent(), but it is assumed
+ * that ATK implementors have ways to get the parent of the object
+ * without the need of assigning it manually with
+ * atk_object_set_parent(), and will return it with this method.
+ *
+ * If you are only interested on the parent assigned with
+ * atk_object_set_parent(), use atk_object_peek_parent().
+ *
+ * Returns: (transfer none): an #AtkObject representing the accessible
+ * parent of the accessible
+ **/
+AtkObject*
+atk_object_get_parent (AtkObject *accessible)
+{
+  AtkObjectClass *klass;
+
+  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->get_parent)
+    return (klass->get_parent) (accessible);
+  else
+    return NULL;
+}
+
+/**
+ * atk_object_peek_parent:
+ * @accessible: an #AtkObject
+ *
+ * Gets the accessible parent of the accessible, if it has been
+ * manually assigned with atk_object_set_parent. Otherwise, this
+ * function returns %NULL.
+ *
+ * This method is intended as an utility for ATK implementors, and not
+ * to be exposed to accessible tools. See atk_object_get_parent() for
+ * further reference.
+ *
+ * Returns: (transfer none): an #AtkObject representing the accessible
+ * parent of the accessible if assigned
+ **/
+AtkObject*
+atk_object_peek_parent (AtkObject *accessible)
+{
+  return accessible->accessible_parent;
+}
+
+/**
+ * atk_object_get_n_accessible_children:
+ * @accessible: an #AtkObject
+ *
+ * Gets the number of accessible children of the accessible.
+ *
+ * Returns: an integer representing the number of accessible children
+ * of the accessible.
+ **/
+gint
+atk_object_get_n_accessible_children (AtkObject *accessible)
+{
+  AtkObjectClass *klass;
+
+  g_return_val_if_fail (ATK_IS_OBJECT (accessible), 0);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->get_n_children)
+    return (klass->get_n_children) (accessible);
+  else
+    return 0;
+}
+
+/**
+ * atk_object_ref_accessible_child:
+ * @accessible: an #AtkObject
+ * @i: a gint representing the position of the child, starting from 0
+ *
+ * Gets a reference to the specified accessible child of the object.
+ * The accessible children are 0-based so the first accessible child is
+ * at index 0, the second at index 1 and so on.
+ *
+ * Returns: (transfer full): an #AtkObject representing the specified
+ * accessible child of the accessible.
+ **/
+AtkObject*
+atk_object_ref_accessible_child (AtkObject   *accessible,
+                                 gint        i)
+{
+  AtkObjectClass *klass;
+
+  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->ref_child)
+    return (klass->ref_child) (accessible, i);
+  else
+    return NULL;
+}
+
+/**
+ * atk_object_ref_relation_set:
+ * @accessible: an #AtkObject
+ *
+ * Gets the #AtkRelationSet associated with the object.
+ *
+ * Returns: (transfer full): an #AtkRelationSet representing the relation set
+ * of the object.
+ **/
+AtkRelationSet*
+atk_object_ref_relation_set (AtkObject *accessible)
+{
+  AtkObjectClass *klass;
+
+  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->ref_relation_set)
+    return (klass->ref_relation_set) (accessible);
+  else
+    return NULL;
+}
+
+/**
+ * atk_object_get_role:
+ * @accessible: an #AtkObject
+ *
+ * Gets the role of the accessible.
+ *
+ * Returns: an #AtkRole which is the role of the accessible
+ **/
+AtkRole
+atk_object_get_role (AtkObject *accessible) 
+{
+  AtkObjectClass *klass;
+
+  g_return_val_if_fail (ATK_IS_OBJECT (accessible), ATK_ROLE_UNKNOWN);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->get_role)
+    return (klass->get_role) (accessible);
+  else
+    return ATK_ROLE_UNKNOWN;
+}
+
+/**
+ * atk_object_ref_state_set:
+ * @accessible: an #AtkObject
+ *
+ * Gets a reference to the state set of the accessible; the caller must
+ * unreference it when it is no longer needed.
+ *
+ * Returns: (transfer full): a reference to an #AtkStateSet which is the state
+ * set of the accessible
+ **/
+AtkStateSet*
+atk_object_ref_state_set (AtkObject *accessible) 
+{
+  AtkObjectClass *klass;
+
+  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->ref_state_set)
+    return (klass->ref_state_set) (accessible);
+  else
+    return NULL;
+}
+
+/**
+ * atk_object_get_index_in_parent:
+ * @accessible: an #AtkObject
+ *
+ * Gets the 0-based index of this accessible in its parent; returns -1 if the
+ * accessible does not have an accessible parent.
+ *
+ * Returns: an integer which is the index of the accessible in its parent
+ **/
+gint
+atk_object_get_index_in_parent (AtkObject *accessible)
+{
+  AtkObjectClass *klass;
+
+  g_return_val_if_fail (ATK_OBJECT (accessible), -1);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->get_index_in_parent)
+    return (klass->get_index_in_parent) (accessible);
+  else
+    return -1;
+}
+
+/**
+ * atk_object_set_name:
+ * @accessible: an #AtkObject
+ * @name: a character string to be set as the accessible name
+ *
+ * Sets the accessible name of the accessible. You can't set the name
+ * to NULL. This is reserved for the initial value. In this aspect
+ * NULL is similar to ATK_ROLE_UNKNOWN. If you want to set the name to
+ * a empty value you can use "".
+ **/
+void
+atk_object_set_name (AtkObject    *accessible,
+                     const gchar  *name)
+{
+  AtkObjectClass *klass;
+  gboolean notify = FALSE;
+
+  g_return_if_fail (ATK_IS_OBJECT (accessible));
+  g_return_if_fail (name != NULL);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->set_name)
+    {
+      /* Do not notify for initial name setting. See bug 665870 */
+      notify = (accessible->name != NULL);
+
+      (klass->set_name) (accessible, name);
+      if (notify)
+        g_object_notify (G_OBJECT (accessible), atk_object_name_property_name);
+    }
+}
+
+/**
+ * atk_object_set_description:
+ * @accessible: an #AtkObject
+ * @description: a character string to be set as the accessible description
+ *
+ * Sets the accessible description of the accessible. You can't set
+ * the description to NULL. This is reserved for the initial value. In
+ * this aspect NULL is similar to ATK_ROLE_UNKNOWN. If you want to set
+ * the name to a empty value you can use "".
+ **/
+void
+atk_object_set_description (AtkObject   *accessible,
+                            const gchar *description)
+{
+  AtkObjectClass *klass;
+  gboolean notify = FALSE;
+
+  g_return_if_fail (ATK_IS_OBJECT (accessible));
+  g_return_if_fail (description != NULL);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->set_description)
+    {
+      /* Do not notify for initial name setting. See bug 665870 */
+      notify = (accessible->description != NULL);
+
+      (klass->set_description) (accessible, description);
+      if (notify)
+        g_object_notify (G_OBJECT (accessible),
+                         atk_object_name_property_description);
+    }
+}
+
+/**
+ * atk_object_set_parent:
+ * @accessible: an #AtkObject
+ * @parent: an #AtkObject to be set as the accessible parent
+ *
+ * Sets the accessible parent of the accessible. @parent can be NULL.
+ **/
+void
+atk_object_set_parent (AtkObject *accessible,
+                       AtkObject *parent)
+{
+  AtkObjectClass *klass;
+
+  g_return_if_fail (ATK_IS_OBJECT (accessible));
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->set_parent)
+    {
+      (klass->set_parent) (accessible, parent);
+      g_object_notify (G_OBJECT (accessible), atk_object_name_property_parent);
+    }
+}
+
+/**
+ * atk_object_set_role:
+ * @accessible: an #AtkObject
+ * @role: an #AtkRole to be set as the role
+ *
+ * Sets the role of the accessible.
+ **/
+void
+atk_object_set_role (AtkObject *accessible, 
+                     AtkRole   role)
+{
+  AtkObjectClass *klass;
+  AtkRole old_role;
+
+  g_return_if_fail (ATK_IS_OBJECT (accessible));
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->set_role)
+    {
+      old_role = atk_object_get_role (accessible);
+      if (old_role != role)
+        {
+          (klass->set_role) (accessible, role);
+          if (old_role != ATK_ROLE_UNKNOWN)
+          /* Do not notify for initial role setting */
+            g_object_notify (G_OBJECT (accessible), atk_object_name_property_role);
+        }
+    }
+}
+
+/**
+ * atk_object_notify_state_change:
+ * @accessible: an #AtkObject
+ * @state: an #AtkState whose state is changed
+ * @value: a gboolean which indicates whether the state is being set on or off
+ * 
+ * Emits a state-change signal for the specified state.
+ *
+ * Note that as a general rule when the state of an existing object changes,
+ * emitting a notification is expected.
+ **/
+void
+atk_object_notify_state_change (AtkObject *accessible,
+                                AtkState  state,
+                                gboolean  value)
+{
+  const gchar* name;
+
+  g_return_if_fail (ATK_IS_OBJECT (accessible));
+
+  name = atk_state_type_get_name (state);
+  g_signal_emit (accessible, atk_object_signals[STATE_CHANGE],
+                 g_quark_from_string (name),
+                 name, value, NULL);
+}
+
+/**
+ * atk_implementor_ref_accessible:
+ * @implementor: The #GObject instance which should implement #AtkImplementorIface
+ * if a non-null return value is required.
+ * 
+ * Gets a reference to an object's #AtkObject implementation, if
+ * the object implements #AtkObjectIface
+ *
+ * Returns: (transfer full): a reference to an object's #AtkObject
+ * implementation
+ */
+AtkObject *
+atk_implementor_ref_accessible (AtkImplementor *implementor)
+{
+  AtkImplementorIface *iface;
+  AtkObject           *accessible = NULL;
+
+  g_return_val_if_fail (ATK_IS_IMPLEMENTOR (implementor), NULL);
+
+  iface = ATK_IMPLEMENTOR_GET_IFACE (implementor);
+
+  if (iface != NULL) 
+    accessible =  iface->ref_accessible (implementor);
+
+  g_return_val_if_fail ((accessible != NULL), NULL);
+
+  return accessible;
+}
+
+       
+/**
+ * atk_object_get_attributes:
+ * @accessible: An #AtkObject.
+ *
+ * Get a list of properties applied to this object as a whole, as an #AtkAttributeSet consisting of 
+ * name-value pairs. As such these attributes may be considered weakly-typed properties or annotations, 
+ * as distinct from strongly-typed object data available via other get/set methods.
+ * Not all objects have explicit "name-value pair" #AtkAttributeSet properties.
+ *
+ * Since: 1.12
+ *
+ * Returns: (transfer full): an #AtkAttributeSet consisting of all
+ * explicit properties/annotations applied to the object, or an empty
+ * set if the object has no name-value pair attributes assigned to
+ * it. This #atkattributeset should be freed by a call to
+ * atk_attribute_set_free().
+ */
+AtkAttributeSet *
+atk_object_get_attributes (AtkObject                  *accessible)
+{
+  AtkObjectClass *klass;
+
+  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->get_attributes)
+    return (klass->get_attributes) (accessible); 
+  else 
+    return NULL;
+       
+}
+
+static AtkRelationSet*
+atk_object_real_ref_relation_set (AtkObject *accessible)
+{
+  g_return_val_if_fail (accessible->relation_set, NULL);
+  g_object_ref (accessible->relation_set); 
+
+  return accessible->relation_set;
+}
+
+static void
+atk_object_real_set_property (GObject      *object,
+                              guint         prop_id,
+                              const GValue *value,
+                              GParamSpec   *pspec)
+{
+  AtkObject *accessible;
+
+  accessible = ATK_OBJECT (object);
+
+  switch (prop_id)
+    {
+    case PROP_NAME:
+      atk_object_set_name (accessible, g_value_get_string (value));
+      break;
+    case PROP_DESCRIPTION:
+      atk_object_set_description (accessible, g_value_get_string (value));
+      break;
+    case PROP_ROLE:
+      atk_object_set_role (accessible, g_value_get_enum (value));
+      break;
+    case PROP_PARENT:
+      atk_object_set_parent (accessible, g_value_get_object (value));
+      break;
+    case PROP_TABLE_SUMMARY:
+      if (ATK_IS_TABLE (accessible))
+        atk_table_set_summary (ATK_TABLE (accessible), g_value_get_object (value));
+      break;
+    case PROP_TABLE_CAPTION_OBJECT:
+      if (ATK_IS_TABLE (accessible))
+        atk_table_set_caption (ATK_TABLE (accessible), g_value_get_object (value));
+      break;
+    case PROP_ACCESSIBLE_ID:
+      atk_object_set_accessible_id (accessible, g_value_get_string (value));
+      break;
+    default:
+      break;
+    }
+}
+
+static void
+atk_object_real_get_property (GObject      *object,
+                              guint         prop_id,
+                              GValue       *value,
+                              GParamSpec   *pspec)
+{
+  AtkObject *accessible;
+
+  accessible = ATK_OBJECT (object);
+
+  switch (prop_id)
+    {
+    case PROP_NAME:
+      g_value_set_string (value, atk_object_get_name (accessible));
+      break;
+    case PROP_DESCRIPTION:
+      g_value_set_string (value, atk_object_get_description (accessible));
+      break;
+    case PROP_ROLE:
+      g_value_set_enum (value, atk_object_get_role (accessible));
+      break;
+    case PROP_LAYER:
+      if (ATK_IS_COMPONENT (accessible))
+        g_value_set_int (value, atk_component_get_layer (ATK_COMPONENT (accessible)));
+      break;
+    case PROP_MDI_ZORDER:
+      if (ATK_IS_COMPONENT (accessible))
+        g_value_set_int (value, atk_component_get_mdi_zorder (ATK_COMPONENT (accessible)));
+      break;
+    case PROP_PARENT:
+      g_value_set_object (value, atk_object_get_parent (accessible));
+      break;
+    case PROP_TABLE_SUMMARY:
+      if (ATK_IS_TABLE (accessible))
+        g_value_set_object (value, atk_table_get_summary (ATK_TABLE (accessible)));
+      break;
+    case PROP_TABLE_CAPTION_OBJECT:
+      if (ATK_IS_TABLE (accessible))
+        g_value_set_object (value, atk_table_get_caption (ATK_TABLE (accessible)));
+      break;
+    case PROP_HYPERTEXT_NUM_LINKS:
+      if (ATK_IS_HYPERTEXT (accessible))
+        g_value_set_int (value, atk_hypertext_get_n_links (ATK_HYPERTEXT (accessible)));
+      break;
+    case PROP_ACCESSIBLE_ID:
+      g_value_set_string (value, atk_object_get_accessible_id (accessible));
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+atk_object_finalize (GObject *object)
+{
+  AtkObject        *accessible;
+  AtkObjectPrivate *private;
+
+  g_return_if_fail (ATK_IS_OBJECT (object));
+
+  accessible = ATK_OBJECT (object);
+  private = atk_object_get_instance_private (accessible);
+
+  g_free (accessible->name);
+  g_free (accessible->description);
+
+  /*
+   * Free memory allocated for relation set if it have been allocated.
+   */
+  if (accessible->relation_set)
+    g_object_unref (accessible->relation_set);
+
+  if (accessible->accessible_parent)
+    g_object_unref (accessible->accessible_parent);
+
+  g_free(private->accessible_id);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static const gchar*
+atk_object_real_get_name (AtkObject *object)
+{
+  return object->name;
+}
+
+static const gchar*
+atk_object_real_get_description (AtkObject *object)
+{
+  return object->description;
+}
+
+static AtkObject*
+atk_object_real_get_parent (AtkObject       *object)
+{
+  return atk_object_peek_parent (object);
+}
+
+static AtkRole
+atk_object_real_get_role (AtkObject       *object)
+{
+  return object->role;
+}
+
+static AtkLayer
+atk_object_real_get_layer (AtkObject       *object)
+{
+  return object->layer;
+}
+
+static AtkStateSet*
+atk_object_real_ref_state_set (AtkObject *accessible) 
+{
+  AtkStateSet *state_set;
+  AtkObject *focus_object;
+
+  state_set = atk_state_set_new ();
+
+  focus_object = atk_get_focus_object ();
+  if (focus_object == accessible)
+    atk_state_set_add_state (state_set, ATK_STATE_FOCUSED);
+
+  return state_set; 
+}
+
+static void
+atk_object_real_set_name (AtkObject       *object,
+                          const gchar     *name)
+{
+  g_free (object->name);
+  object->name = g_strdup (name);
+}
+
+static void
+atk_object_real_set_description (AtkObject       *object,
+                                 const gchar     *description)
+{
+  g_free (object->description);
+  object->description = g_strdup (description);
+}
+
+static void
+atk_object_real_set_parent (AtkObject       *object,
+                            AtkObject       *parent)
+{
+  if (object->accessible_parent)
+    g_object_unref (object->accessible_parent);
+
+  object->accessible_parent = parent;
+  if (object->accessible_parent)
+    g_object_ref (object->accessible_parent);
+}
+
+static void
+atk_object_real_set_role (AtkObject *object,
+                          AtkRole   role)
+{
+  object->role = role;
+}
+
+/**
+ * atk_object_initialize:
+ * @accessible: a #AtkObject
+ * @data: a #gpointer which identifies the object for which the AtkObject was created.
+ *
+ * This function is called when implementing subclasses of #AtkObject.
+ * It does initialization required for the new object. It is intended
+ * that this function should called only in the ..._new() functions used
+ * to create an instance of a subclass of #AtkObject
+ **/
+void
+atk_object_initialize (AtkObject  *accessible,
+                       gpointer   data)
+{
+  AtkObjectClass *klass;
+
+  g_return_if_fail (ATK_IS_OBJECT (accessible));
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->initialize)
+    klass->initialize (accessible, data);
+}
+
+/*
+ * This function is a signal handler for notify signal which gets emitted
+ * when a property changes value.
+ *
+ * It constructs an AtkPropertyValues structure and emits a "property_changed"
+ * signal which causes the user specified AtkPropertyChangeHandler
+ * to be called.
+ */
+static void
+atk_object_notify (GObject     *obj,
+                   GParamSpec  *pspec)
+{
+  AtkPropertyValues values = { NULL, };
+
+  g_value_init (&values.new_value, pspec->value_type);
+  g_object_get_property (obj, pspec->name, &values.new_value);
+  values.property_name = pspec->name;
+  g_signal_emit (obj, atk_object_signals[PROPERTY_CHANGE],
+                 g_quark_from_string (pspec->name),
+                 &values, NULL);
+  g_value_unset (&values.new_value);
+}
+
+/**
+ * atk_role_get_name:
+ * @role: The #AtkRole whose name is required
+ *
+ * Gets the description string describing the #AtkRole @role.
+ *
+ * Returns: the string describing the AtkRole
+ */
+const gchar*
+atk_role_get_name (AtkRole role)
+{
+  g_return_val_if_fail (role >= 0, NULL);
+
+  if (!role_names)
+    initialize_role_names ();
+
+  if (role < role_names->len)
+    return g_ptr_array_index (role_names, role);
+
+  return NULL;
+}
+
+/**
+ * atk_role_get_localized_name:
+ * @role: The #AtkRole whose localized name is required
+ *
+ * Gets the localized description string describing the #AtkRole @role.
+ *
+ * Returns: the localized string describing the AtkRole
+ **/
+const gchar*
+atk_role_get_localized_name (AtkRole role)
+{
+  _gettext_initialization ();
+
+  return dgettext (GETTEXT_PACKAGE, atk_role_get_name (role));
+}
+
+static const gchar*
+atk_object_real_get_object_locale (AtkObject *object)
+{
+  return setlocale (LC_MESSAGES, NULL);
+}
+
+/**
+ * atk_object_get_object_locale:
+ * @accessible: an #AtkObject
+ *
+ * Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale
+ * of @accessible.
+ *
+ * Since: 2.8
+ *
+ * Returns: a UTF-8 string indicating the POSIX-style LC_MESSAGES
+ *          locale of @accessible.
+ **/
+const gchar*
+atk_object_get_object_locale (AtkObject *accessible)
+{
+  AtkObjectClass *klass;
+
+  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);
+
+  klass = ATK_OBJECT_GET_CLASS (accessible);
+  if (klass->get_object_locale)
+    return (klass->get_object_locale) (accessible);
+  else
+    return NULL;
+}
+
+
+/**
+ * atk_role_for_name:
+ * @name: a string which is the (non-localized) name of an ATK role.
+ *
+ * Get the #AtkRole type corresponding to a rolew name.
+ *
+ * Returns: the #AtkRole enumerated type corresponding to the specified name,
+ *          or #ATK_ROLE_INVALID if no matching role is found.
+ **/
+AtkRole
+atk_role_for_name (const gchar *name)
+{
+  AtkRole role = ATK_ROLE_INVALID;
+  gint i;
+
+  g_return_val_if_fail (name, ATK_ROLE_INVALID);
+
+  if (!role_names)
+    initialize_role_names ();
+
+  for (i = 0; i < role_names->len; i++)
+    {
+      gchar *role_name = (gchar *)g_ptr_array_index (role_names, i);
+
+      g_return_val_if_fail (role_name, ATK_ROLE_INVALID);
+
+      if (strcmp (name, role_name) == 0)
+        {
+          role = i;
+          break;
+        }
+    }
+
+  return role;
+}
+
+/**
+ * atk_object_add_relationship:
+ * @object: The #AtkObject to which an AtkRelation is to be added. 
+ * @relationship: The #AtkRelationType of the relation
+ * @target: The #AtkObject which is to be the target of the relation.
+ *
+ * Adds a relationship of the specified type with the specified target.
+ *
+ * Returns: TRUE if the relationship is added.
+ **/
+gboolean
+atk_object_add_relationship (AtkObject       *object,
+                             AtkRelationType relationship,
+                             AtkObject       *target)
+{
+  AtkObject *array[1];
+  AtkRelation *relation;
+
+  g_return_val_if_fail (ATK_IS_OBJECT (object), FALSE);
+  g_return_val_if_fail (ATK_IS_OBJECT (target), FALSE);
+
+  if (atk_relation_set_contains_target (object->relation_set,
+                                        relationship, target))
+    return FALSE;
+
+  array[0] = target;
+  relation = atk_relation_new (array, 1, relationship);
+  atk_relation_set_add (object->relation_set, relation);
+  g_object_unref (relation);
+
+  return TRUE;
+}
+
+/**
+ * atk_object_remove_relationship:
+ * @object: The #AtkObject from which an AtkRelation is to be removed. 
+ * @relationship: The #AtkRelationType of the relation
+ * @target: The #AtkObject which is the target of the relation to be removed.
+ *
+ * Removes a relationship of the specified type with the specified target.
+ *
+ * Returns: TRUE if the relationship is removed.
+ **/
+gboolean
+atk_object_remove_relationship (AtkObject       *object,
+                                AtkRelationType relationship,
+                                AtkObject       *target)
+{
+  gboolean ret = FALSE;
+  AtkRelation *relation;
+  GPtrArray *array;
+
+  g_return_val_if_fail (ATK_IS_OBJECT (object), FALSE);
+  g_return_val_if_fail (ATK_IS_OBJECT (target), FALSE);
+
+  relation = atk_relation_set_get_relation_by_type (object->relation_set, relationship);
+
+  if (relation)
+    {
+      ret = atk_relation_remove_target (relation, target);
+      array = atk_relation_get_target (relation);
+      if (!array || array->len == 0)
+        atk_relation_set_remove (object->relation_set, relation);
+    }
+  return ret;
+}
+
+/**
+ * atk_object_get_accessible_id:
+ * @accessible: an #AtkObject
+ *
+ * Gets the accessible id of the accessible.
+ *
+ * Since: 2.34
+ *
+ * Returns: a character string representing the accessible id of the object, or
+ * NULL if no such string was set.
+ **/
+const gchar*
+atk_object_get_accessible_id (AtkObject *accessible)
+{
+  AtkObjectPrivate *private = atk_object_get_instance_private (accessible);
+  return private->accessible_id;
+}
+
+/**
+ * atk_object_set_accessible_id:
+ * @accessible: an #AtkObject
+ * @name: a character string to be set as the accessible id
+ *
+ * Sets the accessible ID of the accessible.  This is not meant to be presented
+ * to the user, but to be an ID which is stable over application development.
+ * Typically, this is the gtkbuilder ID. Such an ID will be available for
+ * instance to identify a given well-known accessible object for tailored screen
+ * reading, or for automatic regression testing.
+ *
+ * Since: 2.34
+ **/
+void
+atk_object_set_accessible_id (AtkObject *accessible, const gchar *id)
+{
+  AtkObjectPrivate *private = atk_object_get_instance_private (accessible);
+  g_free (private->accessible_id);
+  private->accessible_id = g_strdup (id);
+}
+
+static void
+atk_object_real_initialize (AtkObject *accessible,
+                            gpointer  data)
+{
+  return;
+}
diff --git a/atk/atkobject.h b/atk/atkobject.h
new file mode 100644
index 0000000000..4b6dbdf1d7
--- /dev/null
+++ b/atk/atkobject.h
@@ -0,0 +1,389 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_OBJECT_H__
+#define __ATK_OBJECT_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atktypes.h>
+#include <atk/atkstate.h>
+
+G_BEGIN_DECLS
+
+/**
+ * AtkAttributeSet:
+ *
+ * This is a singly-linked list (a #GSList) of #AtkAttribute. It is
+ * used by atk_text_get_run_attributes(),
+ * atk_text_get_default_attributes(),
+ * atk_editable_text_set_run_attributes(),
+ * atk_document_get_attributes() and atk_object_get_attributes()
+ **/
+typedef GSList AtkAttributeSet;
+
+/**
+ * AtkAttribute:
+ * @name: The attribute name.
+ * @value: the value of the attribute, represented as a string.
+ *
+ * AtkAttribute is a string name/value pair representing a generic
+ * attribute. This can be used to expose additional information from
+ * an accessible object as a whole (see atk_object_get_attributes())
+ * or an document (see atk_document_get_attributes()). In the case of
+ * text attributes (see atk_text_get_default_attributes()),
+ * #AtkTextAttribute enum defines all the possible text attribute
+ * names. You can use atk_text_attribute_get_name() to get the string
+ * name from the enum value. See also atk_text_attribute_for_name()
+ * and atk_text_attribute_get_value() for more information.
+ *
+ * A string name/value pair representing a generic attribute.
+ **/
+typedef struct _AtkAttribute AtkAttribute;
+
+struct _AtkAttribute {
+  gchar* name;
+  gchar* value;
+};
+
+#define ATK_TYPE_OBJECT                           (atk_object_get_type ())
+#define ATK_OBJECT(obj)                           (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_OBJECT, 
AtkObject))
+#define ATK_OBJECT_CLASS(klass)                   (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_OBJECT, 
AtkObjectClass))
+#define ATK_IS_OBJECT(obj)                        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_OBJECT))
+#define ATK_IS_OBJECT_CLASS(klass)                (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_OBJECT))
+#define ATK_OBJECT_GET_CLASS(obj)                 (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_OBJECT, 
AtkObjectClass))
+
+#define ATK_TYPE_IMPLEMENTOR                      (atk_implementor_get_type ())
+#define ATK_IS_IMPLEMENTOR(obj)                   G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_IMPLEMENTOR)
+#define ATK_IMPLEMENTOR(obj)                      G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_IMPLEMENTOR, 
AtkImplementor)
+#define ATK_IMPLEMENTOR_GET_IFACE(obj)            (G_TYPE_INSTANCE_GET_INTERFACE ((obj), 
ATK_TYPE_IMPLEMENTOR, AtkImplementorIface))
+
+
+typedef struct _AtkImplementor            AtkImplementor; /* dummy typedef */
+typedef struct _AtkImplementorIface       AtkImplementorIface;
+
+
+typedef struct _AtkObject                 AtkObject;
+typedef struct _AtkObjectClass            AtkObjectClass;
+typedef struct _AtkRelationSet            AtkRelationSet;
+typedef struct _AtkStateSet               AtkStateSet;
+
+/**
+ * AtkPropertyValues:
+ * @property_name: The name of the ATK property which has changed.
+ * @old_value: NULL. This field is not used anymore.
+ * @new_value: The new value of the named property.
+ *
+ * Note: @old_value field of #AtkPropertyValues will not contain a
+ * valid value. This is a field defined with the purpose of contain
+ * the previous value of the property, but is not used anymore.
+ *
+ **/
+struct _AtkPropertyValues
+{
+  const gchar  *property_name;
+  GValue old_value;
+  GValue new_value;
+};
+
+typedef struct _AtkPropertyValues        AtkPropertyValues;
+
+/**
+ * AtkFunction:
+ * @user_data: custom data defined by the user
+ *
+ * An AtkFunction is a function definition used for padding which has
+ * been added to class and interface structures to allow for expansion
+ * in the future.
+ *
+ * Returns: not used
+ */
+typedef gboolean (*AtkFunction)          (gpointer user_data);
+/*
+ * For most properties the old_value field of AtkPropertyValues will
+ * not contain a valid value.
+ *
+ * Currently, the only property for which old_value is used is
+ * accessible-state; for instance if there is a focus state the
+ * property change handler will be called for the object which lost the focus
+ * with the old_value containing an AtkState value corresponding to focused
+ * and the property change handler will be called for the object which
+ * received the focus with the new_value containing an AtkState value
+ * corresponding to focused.
+ */
+
+struct _AtkObject
+{
+  GObject parent;
+
+  gchar *description;
+  gchar *name;
+  AtkObject *accessible_parent;
+  AtkRole role;
+  AtkRelationSet *relation_set;
+  AtkLayer layer;
+};
+
+
+/**
+ * AtkObjectClass:
+ * @connect_property_change_handler: specifies a function to be called
+ *   when a property changes value. This virtual function is
+ *   deprecated since 2.12 and it should not be overriden. Connect
+ *   directly to property-change or notify signal instead.
+ * @remove_property_change_handler: removes a property changed handler
+ *   as returned by @connect_property_change_handler. This virtual
+ *   function is deprecated sice 2.12 and it should not be overriden.
+ * @focus_event: The signal handler which is executed when there is a
+ *   focus event for an object. This virtual function is deprecated
+ *   since 2.9.4 and it should not be overriden. Use
+ *   the #AtkObject::state-change "focused" signal instead.
+ */
+struct _AtkObjectClass
+{
+  GObjectClass parent;
+
+  /*
+   * Gets the accessible name of the object
+   */
+  const gchar*             (* get_name)            (AtkObject                *accessible);
+  /*
+   * Gets the accessible description of the object
+   */
+  const gchar*             (* get_description)     (AtkObject                *accessible);
+  /*
+   * Gets the accessible parent of the object
+   */
+  AtkObject*               (*get_parent)           (AtkObject                *accessible);
+
+  /*
+   * Gets the number of accessible children of the object
+   */
+  gint                    (* get_n_children)       (AtkObject                *accessible);
+  /*
+   * Returns a reference to the specified accessible child of the object.
+   * The accessible children are 0-based so the first accessible child is
+   * at index 0, the second at index 1 and so on.
+   */
+  AtkObject*              (* ref_child)            (AtkObject                *accessible,
+                                                    gint                      i);
+  /*
+   * Gets the 0-based index of this object in its parent; returns -1 if the
+   * object does not have an accessible parent.
+   */
+  gint                    (* get_index_in_parent) (AtkObject                 *accessible);
+  /*
+   * Gets the RelationSet associated with the object
+   */
+  AtkRelationSet*         (* ref_relation_set)    (AtkObject                 *accessible);
+  /*
+   * Gets the role of the object
+   */
+  AtkRole                 (* get_role)            (AtkObject                 *accessible);
+  AtkLayer                (* get_layer)           (AtkObject                 *accessible);
+  gint                    (* get_mdi_zorder)      (AtkObject                 *accessible);
+  /*
+   * Gets the state set of the object
+   */
+  AtkStateSet*            (* ref_state_set)       (AtkObject                 *accessible);
+  /*
+   * Sets the accessible name of the object
+   */
+  void                    (* set_name)            (AtkObject                 *accessible,
+                                                   const gchar               *name);
+  /*
+   * Sets the accessible description of the object
+   */
+  void                    (* set_description)     (AtkObject                 *accessible,
+                                                   const gchar               *description);
+  /*
+   * Sets the accessible parent of the object
+   */
+  void                    (* set_parent)          (AtkObject                 *accessible,
+                                                   AtkObject                 *parent);
+  /*
+   * Sets the accessible role of the object
+   */
+  void                    (* set_role)            (AtkObject                 *accessible,
+                                                   AtkRole                   role);
+  /*
+   * Removes a property change handler which was specified using
+   * connect_property_change_handler
+   */
+void                      (* remove_property_change_handler)     (AtkObject
+                *accessible,
+                                                                  guint
+                handler_id);
+void                      (* initialize)                         (AtkObject                     *accessible,
+                                                                  gpointer                      data);
+  /*
+   * The signal handler which is executed when there is a change in the
+   * children of the object
+   */
+  void                    (* children_changed)    (AtkObject                  *accessible,
+                                                   guint                      change_index,
+                                                   gpointer                   changed_child);
+  /*
+   * The signal handler which is executed  when there is a focus event
+   * for an object.
+   */
+  void                    (* focus_event)         (AtkObject                  *accessible,
+                                                   gboolean                   focus_in);
+  /*
+   * The signal handler which is executed  when there is a property_change 
+   * signal for an object.
+   */
+  void                    (* property_change)     (AtkObject                  *accessible,
+                                                   AtkPropertyValues          *values);
+  /*
+   * The signal handler which is executed  when there is a state_change 
+   * signal for an object.
+   */
+  void                    (* state_change)        (AtkObject                  *accessible,
+                                                   const gchar                *name,
+                                                   gboolean                   state_set);
+  /*
+   * The signal handler which is executed when there is a change in the
+   * visible data for an object
+   */
+  void                    (*visible_data_changed) (AtkObject                  *accessible);
+
+  /*
+   * The signal handler which is executed when there is a change in the
+   * 'active' child or children of the object, for instance when 
+   * interior focus changes in a table or list.  This signal should be emitted
+   * by objects whose state includes ATK_STATE_MANAGES_DESCENDANTS.
+   */
+  void                    (*active_descendant_changed) (AtkObject                  *accessible,
+                                                        gpointer                   *child);
+
+  /*           
+   * Gets a list of properties applied to this object as a whole, as an #AtkAttributeSet consisting of 
name-value pairs. 
+   * Since ATK 1.12
+   */
+  AtkAttributeSet*       (*get_attributes)            (AtkObject                  *accessible);
+
+  const gchar*            (*get_object_locale)         (AtkObject                  *accessible);
+
+  AtkFunction             pad1;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType            atk_object_get_type   (void);
+
+/**
+ * AtkImplementorIface:
+ *
+ * The AtkImplementor interface is implemented by objects for which
+ * AtkObject peers may be obtained via calls to
+ * iface->(ref_accessible)(implementor);
+ */
+struct _AtkImplementorIface
+{
+  GTypeInterface parent;
+
+  AtkObject*   (*ref_accessible) (AtkImplementor *implementor);
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_implementor_get_type (void);
+GDK_AVAILABLE_IN_ALL
+AtkObject*              atk_implementor_ref_accessible            (AtkImplementor *implementor);
+
+/*
+ * Properties directly supported by AtkObject
+ */
+
+GDK_AVAILABLE_IN_ALL
+const gchar*            atk_object_get_name                       (AtkObject *accessible);
+GDK_AVAILABLE_IN_ALL
+const gchar*            atk_object_get_description                (AtkObject *accessible);
+GDK_AVAILABLE_IN_ALL
+AtkObject*              atk_object_get_parent                     (AtkObject *accessible);
+GDK_AVAILABLE_IN_ALL
+AtkObject*              atk_object_peek_parent                    (AtkObject *accessible);
+GDK_AVAILABLE_IN_ALL
+gint                    atk_object_get_n_accessible_children      (AtkObject *accessible);
+GDK_AVAILABLE_IN_ALL
+AtkObject*              atk_object_ref_accessible_child           (AtkObject *accessible,
+                                                                   gint        i);
+GDK_AVAILABLE_IN_ALL
+AtkRelationSet*         atk_object_ref_relation_set               (AtkObject *accessible);
+GDK_AVAILABLE_IN_ALL
+AtkRole                 atk_object_get_role                       (AtkObject *accessible);
+
+GDK_AVAILABLE_IN_ALL
+AtkAttributeSet*        atk_object_get_attributes                 (AtkObject *accessible);
+GDK_AVAILABLE_IN_ALL
+AtkStateSet*            atk_object_ref_state_set                  (AtkObject *accessible);
+GDK_AVAILABLE_IN_ALL
+gint                    atk_object_get_index_in_parent            (AtkObject *accessible);
+GDK_AVAILABLE_IN_ALL
+void                    atk_object_set_name                       (AtkObject *accessible,
+                                                                   const gchar *name);
+GDK_AVAILABLE_IN_ALL
+void                    atk_object_set_description                (AtkObject *accessible,
+                                                                   const gchar *description);
+GDK_AVAILABLE_IN_ALL
+void                    atk_object_set_parent                     (AtkObject *accessible,
+                                                                   AtkObject *parent);
+GDK_AVAILABLE_IN_ALL
+void                    atk_object_set_role                       (AtkObject *accessible,
+                                                                   AtkRole   role);
+
+
+GDK_AVAILABLE_IN_ALL
+void                 atk_object_notify_state_change              (AtkObject                      *accessible,
+                                                                  AtkState                       state,
+                                                                  gboolean                       value);
+GDK_AVAILABLE_IN_ALL
+void                 atk_object_initialize                       (AtkObject                     *accessible,
+                                                                  gpointer                      data);
+
+GDK_AVAILABLE_IN_ALL
+const gchar*          atk_role_get_name      (AtkRole         role);
+GDK_AVAILABLE_IN_ALL
+AtkRole               atk_role_for_name      (const gchar     *name);
+
+
+GDK_AVAILABLE_IN_ALL
+gboolean              atk_object_add_relationship              (AtkObject      *object,
+                                                               AtkRelationType relationship,
+                                                               AtkObject      *target);
+GDK_AVAILABLE_IN_ALL
+gboolean              atk_object_remove_relationship           (AtkObject      *object,
+                                                               AtkRelationType relationship,
+                                                               AtkObject      *target);
+GDK_AVAILABLE_IN_ALL
+const gchar*          atk_role_get_localized_name              (AtkRole     role);
+GDK_AVAILABLE_IN_ALL
+const gchar*          atk_object_get_object_locale             (AtkObject   *accessible);
+
+GDK_AVAILABLE_IN_ALL
+const gchar*          atk_object_get_accessible_id             (AtkObject   *accessible);
+
+GDK_AVAILABLE_IN_ALL
+void                  atk_object_set_accessible_id             (AtkObject   *accessible,
+                                                                const gchar *name);
+
+G_END_DECLS
+
+#endif /* __ATK_OBJECT_H__ */
diff --git a/atk/atkobjectfactory.c b/atk/atkobjectfactory.c
new file mode 100644
index 0000000000..298f3c240b
--- /dev/null
+++ b/atk/atkobjectfactory.c
@@ -0,0 +1,147 @@
+/* ATK - Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkobjectfactory.h"
+#include "atknoopobjectfactory.h"
+
+/**
+ * SECTION:atkobjectfactory
+ * @Short_description: The base object class for a factory used to
+ *  create accessible objects for objects of a specific GType.
+ * @Title:AtkObjectFactory
+ *
+ * This class is the base object class for a factory used to create an
+ * accessible object for a specific GType. The function
+ * atk_registry_set_factory_type() is normally called to store in the
+ * registry the factory type to be used to create an accessible of a
+ * particular GType.
+ */
+
+static void atk_object_factory_class_init   (AtkObjectFactoryClass        *klass);
+
+static gpointer    parent_class = NULL;
+
+GType
+atk_object_factory_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) {
+    GTypeInfo tinfo =
+    {
+      sizeof (AtkObjectFactoryClass),
+      (GBaseInitFunc) NULL, /* base init */
+      (GBaseFinalizeFunc) NULL, /* base finalize */
+      (GClassInitFunc) atk_object_factory_class_init, /* class init */
+      (GClassFinalizeFunc) NULL, /* class finalize */
+      NULL, /* class data */
+      sizeof (AtkObjectFactory), /* instance size */
+      0, /* nb preallocs */
+      (GInstanceInitFunc) NULL, /* instance init */
+      NULL /* value table */
+    };
+
+    type = g_type_register_static (G_TYPE_OBJECT, "AtkObjectFactory", &tinfo, 0);
+  }
+  return type;
+}
+
+static void 
+atk_object_factory_class_init (AtkObjectFactoryClass *klass)
+{
+  parent_class = g_type_class_peek_parent (klass);
+
+}
+
+/**
+ * atk_object_factory_create_accessible:
+ * @factory: The #AtkObjectFactory associated with @obj's
+ * object type
+ * @obj: a #GObject 
+ * 
+ * Provides an #AtkObject that implements an accessibility interface 
+ * on behalf of @obj
+ *
+ * Returns: (transfer full): an #AtkObject that implements an accessibility
+ * interface on behalf of @obj
+ **/
+AtkObject* 
+atk_object_factory_create_accessible (AtkObjectFactory *factory,
+                                      GObject          *obj)
+{
+  AtkObjectFactoryClass *klass;
+  AtkObject *accessible = NULL;
+
+  g_return_val_if_fail (ATK_IS_OBJECT_FACTORY (factory), NULL);
+  g_return_val_if_fail (G_IS_OBJECT (obj), NULL);
+
+  klass = ATK_OBJECT_FACTORY_GET_CLASS (factory);
+
+  if (klass->create_accessible)
+  {
+      accessible = klass->create_accessible (obj);
+  }
+  return accessible;
+} 
+
+/**
+ * atk_object_factory_invalidate:
+ * @factory: an #AtkObjectFactory to invalidate
+ *
+ * Inform @factory that it is no longer being used to create
+ * accessibles. When called, @factory may need to inform
+ * #AtkObjects which it has created that they need to be re-instantiated.
+ * Note: primarily used for runtime replacement of #AtkObjectFactorys
+ * in object registries.
+ **/
+void 
+atk_object_factory_invalidate (AtkObjectFactory *factory)
+{
+  AtkObjectFactoryClass *klass;
+
+  g_return_if_fail (ATK_OBJECT_FACTORY (factory));
+
+  klass = ATK_OBJECT_FACTORY_GET_CLASS (factory);
+  if (klass->invalidate)
+     (klass->invalidate) (factory);
+}
+
+/**
+ * atk_object_factory_get_accessible_type:
+ * @factory: an #AtkObjectFactory 
+ *
+ * Gets the GType of the accessible which is created by the factory. 
+ * Returns: the type of the accessible which is created by the @factory.
+ * The value G_TYPE_INVALID is returned if no type if found.
+ **/
+GType
+atk_object_factory_get_accessible_type (AtkObjectFactory *factory)
+{
+  AtkObjectFactoryClass *klass;
+
+  g_return_val_if_fail (ATK_OBJECT_FACTORY (factory), G_TYPE_INVALID);
+
+  klass = ATK_OBJECT_FACTORY_GET_CLASS (factory);
+  if (klass->get_accessible_type)
+     return (klass->get_accessible_type) ();
+  else
+     return G_TYPE_INVALID;
+}
diff --git a/atk/atkobjectfactory.h b/atk/atkobjectfactory.h
new file mode 100644
index 0000000000..4dbf50812e
--- /dev/null
+++ b/atk/atkobjectfactory.h
@@ -0,0 +1,72 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_OBJECT_FACTORY_H__
+#define __ATK_OBJECT_FACTORY_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <glib-object.h>
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_OBJECT_FACTORY                     (atk_object_factory_get_type ())
+#define ATK_OBJECT_FACTORY(obj)                     (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
ATK_TYPE_OBJECT_FACTORY, AtkObjectFactory))
+#define ATK_OBJECT_FACTORY_CLASS(klass)             (G_TYPE_CHECK_CLASS_CAST ((klass), 
ATK_TYPE_OBJECT_FACTORY, AtkObjectFactoryClass))
+#define ATK_IS_OBJECT_FACTORY(obj)                  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
ATK_TYPE_OBJECT_FACTORY))
+#define ATK_IS_OBJECT_FACTORY_CLASS(klass)          (G_TYPE_CHECK_CLASS_TYPE ((klass), 
ATK_TYPE_OBJECT_FACTORY))
+#define ATK_OBJECT_FACTORY_GET_CLASS(obj)           (G_TYPE_INSTANCE_GET_CLASS ((obj), 
ATK_TYPE_OBJECT_FACTORY, AtkObjectFactoryClass))
+
+typedef struct _AtkObjectFactory                AtkObjectFactory;
+typedef struct _AtkObjectFactoryClass           AtkObjectFactoryClass;
+
+struct _AtkObjectFactory
+{
+  GObject parent;
+};
+
+struct _AtkObjectFactoryClass
+{
+  GObjectClass parent_class;
+
+  AtkObject* (* create_accessible) (GObject          *obj);
+  void       (* invalidate)        (AtkObjectFactory *factory);
+  GType      (* get_accessible_type)    (void);
+
+  AtkFunction pad1;
+  AtkFunction pad2;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_object_factory_get_type(void);
+
+
+GDK_AVAILABLE_IN_ALL
+AtkObject* atk_object_factory_create_accessible (AtkObjectFactory *factory, GObject *obj);
+GDK_AVAILABLE_IN_ALL
+void       atk_object_factory_invalidate (AtkObjectFactory *factory);
+GDK_AVAILABLE_IN_ALL
+GType      atk_object_factory_get_accessible_type (AtkObjectFactory *factory);
+
+G_END_DECLS
+
+#endif /* __GTK_OBJECT_FACTORY_H__ */
diff --git a/atk/atkplug.c b/atk/atkplug.c
new file mode 100644
index 0000000000..ddd86ed0f0
--- /dev/null
+++ b/atk/atkplug.c
@@ -0,0 +1,194 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright (C) 2009 Novell, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atk.h"
+#include "atkplug.h"
+
+/**
+ * SECTION:atkplug
+ * @Short_description: Toplevel for embedding into other processes
+ * @Title: AtkPlug
+ * @See_also: #AtkPlug
+ *
+ * See #AtkSocket
+ *
+ */
+
+static void atk_component_interface_init (AtkComponentIface *iface);
+
+typedef struct {
+  AtkObject *child;
+} AtkPlugPrivate;
+
+static gint AtkPlug_private_offset;
+
+G_DEFINE_TYPE_WITH_CODE (AtkPlug, atk_plug, ATK_TYPE_OBJECT,
+                         G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init)
+                         G_ADD_PRIVATE(AtkPlug))
+
+static AtkObject*
+atk_plug_ref_child (AtkObject *obj, int i)
+{
+  AtkPlugPrivate *private = atk_plug_get_instance_private (ATK_PLUG (obj));
+  AtkObject *child;
+
+  if (i != 0)
+    return NULL;
+
+  child = private->child;
+
+  if (child == NULL)
+    return NULL;
+
+  return g_object_ref (child);
+}
+
+static int
+atk_plug_get_n_children (AtkObject *obj)
+{
+  AtkPlugPrivate *private = atk_plug_get_instance_private (ATK_PLUG (obj));
+
+  if (private->child == NULL)
+    return 0;
+
+  return 1;
+}
+
+static AtkStateSet*
+atk_plug_ref_state_set (AtkObject *obj)
+{
+  AtkPlugPrivate *private = atk_plug_get_instance_private (ATK_PLUG (obj));
+  AtkObject *child;
+
+  child = private->child;
+
+  if (child == NULL)
+    return NULL;
+
+  return atk_object_ref_state_set (child);
+}
+
+static void
+atk_plug_init (AtkPlug* obj)
+{
+  AtkObject *accessible = ATK_OBJECT (obj);
+
+  accessible->role = ATK_ROLE_FILLER;
+  accessible->layer = ATK_LAYER_WIDGET;
+}
+
+static void
+atk_plug_class_init (AtkPlugClass* klass)
+{
+  AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
+
+  if (AtkPlug_private_offset != 0)
+    g_type_class_adjust_private_offset (klass, &AtkPlug_private_offset);
+
+  klass->get_object_id = NULL;
+
+  class->get_n_children = atk_plug_get_n_children;
+  class->ref_child      = atk_plug_ref_child;
+  class->ref_state_set  = atk_plug_ref_state_set;
+}
+
+static void
+atk_component_interface_init (AtkComponentIface *iface)
+{
+}
+
+/**
+ * atk_plug_new:
+ *
+ * Creates a new #AtkPlug instance.
+ *
+ * Returns: (transfer full): the newly created #AtkPlug
+ *
+ * Since: 1.30
+ */
+AtkObject *
+atk_plug_new (void)
+{
+  return g_object_new (ATK_TYPE_PLUG, NULL);
+}
+
+/**
+ * atk_plug_set_child:
+ * @plug: an #AtkPlug to be set as accessible parent of @child.
+ * @child: an #AtkObject to be set as accessible child of @plug.
+ *
+ * Sets @child as accessible child of @plug and @plug as accessible parent of
+ * @child. @child can be NULL.
+ *
+ * In some cases, one can not use the AtkPlug type directly as accessible
+ * object for the toplevel widget of the application. For instance in the gtk
+ * case, GtkPlugAccessible can not inherit both from GtkWindowAccessible and
+ * from AtkPlug. In such a case, one can create, in addition to the standard
+ * accessible object for the toplevel widget, an AtkPlug object, and make the
+ * former the child of the latter by calling atk_plug_set_child().
+ *
+ * Since: 2.35.0
+ */
+void
+atk_plug_set_child (AtkPlug *plug, AtkObject *child)
+{
+  AtkPlugPrivate *private = atk_plug_get_instance_private (plug);
+
+  if (private->child)
+    atk_object_set_parent (private->child, NULL);
+
+  private->child = child;
+
+  if (child)
+    atk_object_set_parent (child, ATK_OBJECT(plug));
+}
+
+/**
+ * atk_plug_get_id:
+ * @plug: an #AtkPlug
+ *
+ * Gets the unique ID of an #AtkPlug object, which can be used to
+ * embed inside of an #AtkSocket using atk_socket_embed().
+ *
+ * Internally, this calls a class function that should be registered
+ * by the IPC layer (usually at-spi2-atk). The implementor of an
+ * #AtkPlug object should call this function (after atk-bridge is
+ * loaded) and pass the value to the process implementing the
+ * #AtkSocket, so it could embed the plug.
+ *
+ * Returns: the unique ID for the plug
+ *
+ * Since: 1.30
+ **/
+gchar*
+atk_plug_get_id (AtkPlug* plug)
+{
+  AtkPlugClass *klass;
+
+  g_return_val_if_fail (ATK_IS_PLUG (plug), NULL);
+
+  klass = g_type_class_peek (ATK_TYPE_PLUG);
+
+  if (klass && klass->get_object_id)
+    return (klass->get_object_id) (plug);
+  else
+    return NULL;
+}
diff --git a/atk/atkplug.h b/atk/atkplug.h
new file mode 100644
index 0000000000..4b5e6e44c8
--- /dev/null
+++ b/atk/atkplug.h
@@ -0,0 +1,68 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2009 Novell, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_PLUG_H__
+#define __ATK_PLUG_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_PLUG               (atk_plug_get_type ())
+#define ATK_PLUG(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_PLUG, AtkPlug))
+#define ATK_IS_PLUG(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_PLUG))
+#define ATK_PLUG_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_PLUG, AtkPlugClass))
+#define ATK_IS_PLUG_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_PLUG))
+#define ATK_PLUG_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_PLUG, AtkPlugClass))
+
+typedef struct _AtkPlug         AtkPlug;
+typedef struct _AtkPlugClass    AtkPlugClass;
+
+struct _AtkPlug
+{
+  AtkObject parent;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_plug_get_type (void);
+
+struct _AtkPlugClass
+{
+  AtkObjectClass parent_class;
+  
+  /* to be subscribed to by atk-bridge */
+
+  /*< protected >*/
+  gchar* (* get_object_id) (AtkPlug* obj);
+};
+
+GDK_AVAILABLE_IN_ALL
+AtkObject*    atk_plug_new       (void);
+GDK_AVAILABLE_IN_ALL
+void          atk_plug_set_child (AtkPlug *plug, AtkObject *child);
+GDK_AVAILABLE_IN_ALL
+gchar*        atk_plug_get_id    (AtkPlug* plug);
+
+G_END_DECLS
+
+#endif /* __ATK_PLUG_H__ */
diff --git a/atk/atkprivate.c b/atk/atkprivate.c
new file mode 100644
index 0000000000..e414bf20be
--- /dev/null
+++ b/atk/atkprivate.c
@@ -0,0 +1,131 @@
+/* ATK -  Accessibility Toolkit
+ *
+ * Copyright (C) 2014 Igalia, S.L.
+ *
+ * Author: Alejandro Piñeiro Iglesias <apinheiro igalia com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <locale.h>
+
+#include <glib-object.h>
+#include <glib/gi18n-lib.h>
+
+#include "atkprivate.h"
+
+#ifdef G_OS_WIN32
+
+#define STRICT
+#include <windows.h>
+#undef STRICT
+
+static HMODULE atk_dll;
+
+BOOL WINAPI
+DllMain (HINSTANCE hinstDLL,
+         DWORD     fdwReason,
+         LPVOID    lpvReserved)
+{
+  switch (fdwReason)
+    {
+    case DLL_PROCESS_ATTACH:
+      atk_dll = (HMODULE) hinstDLL;
+      break;
+    }
+
+  return TRUE;
+}
+
+static const char *
+get_atk_locale_dir (void)
+{
+  static gchar *atk_localedir = NULL;
+
+  if (!atk_localedir)
+    {
+      const gchar *p;
+      gchar *root, *temp;
+      
+      /* ATK_LOCALEDIR might end in either /lib/locale or
+       * /share/locale. Scan for that slash.
+       */
+      p = ATK_LOCALEDIR + strlen (ATK_LOCALEDIR);
+      while (*--p != '/')
+       ;
+      while (*--p != '/')
+       ;
+
+      root = g_win32_get_package_installation_directory_of_module (atk_dll);
+      temp = g_build_filename (root, p, NULL);
+      g_free (root);
+
+      /* atk_localedir is passed to bindtextdomain() which isn't
+       * UTF-8-aware.
+       */
+      atk_localedir = g_win32_locale_filename_from_utf8 (temp);
+      g_free (temp);
+    }
+  return atk_localedir;
+}
+
+#undef ATK_LOCALEDIR
+
+#define ATK_LOCALEDIR get_atk_locale_dir()
+
+#endif
+
+void
+_gettext_initialization (void)
+{
+#ifdef ENABLE_NLS
+  static gboolean gettext_initialized = FALSE;
+
+  if (!gettext_initialized)
+    {
+      const char *dir = g_getenv ("ATK_ALT_LOCALEDIR");
+
+      gettext_initialized = TRUE;
+      if (dir == NULL)
+        dir = ATK_LOCALEDIR;
+
+      bindtextdomain (GETTEXT_PACKAGE, dir);
+#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
+      bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+#endif
+    }
+#endif
+}
+
+/*
+ * Compacts a name. For example: to get "accelerator label" instead of
+ * "accelerator-label"
+ */
+void
+_compact_name (gchar *name)
+{
+  gchar *p = name;
+
+  while (*p)
+    {
+      if (*p == '-')
+        *p = ' ';
+      p++;
+    }
+}
diff --git a/atk/atkprivate.h b/atk/atkprivate.h
new file mode 100644
index 0000000000..85a1c09463
--- /dev/null
+++ b/atk/atkprivate.h
@@ -0,0 +1,36 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright (C) 2014 Igalia, S.L.
+ *
+ * Author: Alejandro Piñeiro Iglesias <apinheiro igalia com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_PRIVATE_H__
+#define __ATK_PRIVATE_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+G_BEGIN_DECLS
+
+void      _gettext_initialization (void);
+void      _compact_name (gchar *name);
+
+G_END_DECLS
+
+#endif /* __ATK_PRIVATE_H__ */
diff --git a/atk/atkrange.c b/atk/atkrange.c
new file mode 100644
index 0000000000..bb69ca5ca1
--- /dev/null
+++ b/atk/atkrange.c
@@ -0,0 +1,169 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2014 Igalia S.L.
+ *
+ * Author: Alejandro Piñeiro Iglesias <apinheiro igalia com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkvalue.h"
+
+/**
+ * SECTION:atkrange
+ * @Short_description: A given range or subrange, to be used with #AtkValue
+ * @Title:AtkRange
+ *
+ * #AtkRange are used on #AtkValue, in order to represent the full
+ * range of a given component (for example an slider or a range
+ * control), or to define each individual subrange this full range is
+ * splitted if available. See #AtkValue documentation for further
+ * details.
+ */
+
+struct _AtkRange {
+  gdouble lower;
+  gdouble upper;
+  gchar *description;
+};
+
+/**
+ * atk_range_copy:
+ * @src: #AtkRange to copy
+ *
+ * Returns a new #AtkRange that is a exact copy of @src
+ *
+ * Since: 2.12
+ *
+ * Returns: (transfer full): a new #AtkRange copy of @src
+ */
+AtkRange *
+atk_range_copy (AtkRange *src)
+{
+  g_return_val_if_fail (src != NULL, NULL);
+
+  return atk_range_new (src->lower,
+                        src->upper,
+                        src->description);
+}
+
+/**
+ * atk_range_free:
+ * @range: #AtkRange to free
+ *
+ * Free @range
+ *
+ * Since: 2.12
+ */
+void
+atk_range_free (AtkRange *range)
+{
+  g_return_if_fail (range != NULL);
+
+  if (range->description)
+    g_free (range->description);
+
+  g_slice_free (AtkRange, range);
+}
+
+G_DEFINE_BOXED_TYPE (AtkRange, atk_range, atk_range_copy,
+                     atk_range_free)
+
+
+/**
+ * atk_range_new:
+ * @lower_limit: inferior limit for this range
+ * @upper_limit: superior limit for this range
+ * @description: human readable description of this range.
+ *
+ * Creates a new #AtkRange.
+ *
+ * Since: 2.12
+ *
+ * Returns: (transfer full): a new #AtkRange
+ *
+ */
+AtkRange*
+atk_range_new  (gdouble   lower_limit,
+                gdouble   upper_limit,
+                const gchar *description)
+{
+  AtkRange *range;
+
+  range = g_slice_new0 (AtkRange);
+
+  range->lower = lower_limit;
+  range->upper = upper_limit;
+  if (description != NULL)
+    range->description = g_strdup (description);
+
+  return range;
+}
+
+/**
+ * atk_range_get_lower_limit:
+ * @range: an #AtkRange
+ *
+ * Returns the lower limit of @range
+ *
+ * Since: 2.12
+ *
+ * Returns: the lower limit of @range
+ */
+gdouble
+atk_range_get_lower_limit  (AtkRange *range)
+{
+  g_return_val_if_fail (range != NULL, 0);
+
+  return range->lower;
+}
+
+/**
+ * atk_range_get_upper_limit:
+ * @range: an #AtkRange
+ *
+ * Returns the upper limit of @range
+ *
+ * Since: 2.12
+ *
+ * Returns: the upper limit of @range
+ */
+gdouble
+atk_range_get_upper_limit (AtkRange *range)
+{
+  g_return_val_if_fail (range != NULL, 0);
+
+  return range->upper;
+}
+
+/**
+ * atk_range_get_description:
+ * @range: an #AtkRange
+ *
+ * Returns the human readable description of @range
+ *
+ * Since: 2.12
+ *
+ * Returns: the human-readable description of @range
+ */
+const gchar*
+atk_range_get_description  (AtkRange *range)
+{
+  g_return_val_if_fail (range != NULL, NULL);
+
+  return range->description;
+}
diff --git a/atk/atkrange.h b/atk/atkrange.h
new file mode 100644
index 0000000000..fa7ee78b1d
--- /dev/null
+++ b/atk/atkrange.h
@@ -0,0 +1,58 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2014 Igalia S.L.
+ *
+ * Author: Alejandro Piñeiro Iglesias <apinheiro igalia com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#ifndef __ATK_RANGE_H__
+#define __ATK_RANGE_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_RANGE         (atk_range_get_type ())
+
+typedef struct _AtkRange AtkRange;
+
+/* AtkRange methods */
+GDK_AVAILABLE_IN_ALL
+GType atk_range_get_type (void);
+
+GDK_AVAILABLE_IN_ALL
+AtkRange*    atk_range_copy (AtkRange *src);
+GDK_AVAILABLE_IN_ALL
+void         atk_range_free (AtkRange *range);
+
+GDK_AVAILABLE_IN_ALL
+gdouble      atk_range_get_lower_limit  (AtkRange    *range);
+GDK_AVAILABLE_IN_ALL
+gdouble      atk_range_get_upper_limit  (AtkRange    *range);
+GDK_AVAILABLE_IN_ALL
+const gchar* atk_range_get_description  (AtkRange    *range);
+GDK_AVAILABLE_IN_ALL
+AtkRange*    atk_range_new              (gdouble      lower_limit,
+                                         gdouble      upper_limit,
+                                         const gchar *description);
+
+G_END_DECLS
+
+#endif /* __ATK_RANGE_H__ */
diff --git a/atk/atkregistry.c b/atk/atkregistry.c
new file mode 100644
index 0000000000..45fabdebdb
--- /dev/null
+++ b/atk/atkregistry.c
@@ -0,0 +1,274 @@
+/* ATK - Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkregistry.h"
+#include "atknoopobjectfactory.h"
+
+/**
+ * SECTION:atkregistry
+ * @Short_description: An object used to store the GType of the
+ * factories used to create an accessible object for an object of a
+ * particular GType.
+ * @Title:AtkRegistry
+ *
+ * The AtkRegistry is normally used to create appropriate ATK "peers"
+ * for user interface components.  Application developers usually need
+ * only interact with the AtkRegistry by associating appropriate ATK
+ * implementation classes with GObject classes via the
+ * atk_registry_set_factory_type call, passing the appropriate GType
+ * for application custom widget classes.
+ */
+
+static AtkRegistry *default_registry = NULL;
+
+static void              atk_registry_init           (AtkRegistry      *instance,
+                                                      AtkRegistryClass *klass);
+static void              atk_registry_finalize       (GObject          *instance);
+static void              atk_registry_class_init     (AtkRegistryClass *klass);
+static AtkRegistry*      atk_registry_new            (void);
+
+static gpointer parent_class = NULL;
+
+GType
+atk_registry_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type)
+    {
+      static const GTypeInfo info =
+      {
+        sizeof (AtkRegistryClass),
+        (GBaseInitFunc) NULL,                             /* base_init */
+        (GBaseFinalizeFunc) NULL,                         /* base_finalize */
+        (GClassInitFunc) atk_registry_class_init,         /* class_init */
+        (GClassFinalizeFunc) NULL,                        /* class_finalize */
+        NULL,                                             /* class_data */
+        sizeof (AtkRegistry),                             /* instance size */
+        0,                                                /* n_preallocs */
+        (GInstanceInitFunc) atk_registry_init,            /* instance init */
+        NULL                                              /* value table */
+      };
+
+      type = g_type_register_static (G_TYPE_OBJECT, "AtkRegistry", &info, 0);
+    }
+
+  return type;
+}
+
+static void
+atk_registry_class_init (AtkRegistryClass *klass)
+{
+  GObjectClass *object_class = (GObjectClass *) klass;
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  object_class->finalize = atk_registry_finalize;
+}
+
+static void
+atk_registry_init (AtkRegistry *instance, AtkRegistryClass *klass)
+{
+  instance->factory_type_registry = g_hash_table_new ((GHashFunc) NULL, 
+                                                      (GEqualFunc) NULL);
+  instance->factory_singleton_cache = g_hash_table_new ((GHashFunc) NULL, 
+                                                        (GEqualFunc) NULL);
+}
+
+static AtkRegistry *
+atk_registry_new (void)
+{
+  GObject *object;
+
+  object = g_object_new (ATK_TYPE_REGISTRY, NULL);
+
+  g_return_val_if_fail (ATK_IS_REGISTRY (object), NULL);
+
+  return (AtkRegistry *) object;
+}
+
+static void
+atk_registry_finalize (GObject *object)
+{
+  AtkRegistry *registry = ATK_REGISTRY (object);
+
+  g_hash_table_destroy (registry->factory_type_registry);
+  g_hash_table_destroy (registry->factory_singleton_cache);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+/**
+ * atk_registry_set_factory_type:
+ * @registry: the #AtkRegistry in which to register the type association
+ * @type: an #AtkObject type 
+ * @factory_type: an #AtkObjectFactory type to associate with @type.  Must
+ * implement AtkObject appropriate for @type.
+ *
+ * Associate an #AtkObjectFactory subclass with a #GType. Note:
+ * The associated @factory_type will thereafter be responsible for
+ * the creation of new #AtkObject implementations for instances
+ * appropriate for @type.
+ **/
+void
+atk_registry_set_factory_type (AtkRegistry *registry,
+                               GType type,
+                               GType factory_type)
+{
+  GType old_type;
+  gpointer value;
+  AtkObjectFactory *old_factory;
+
+  g_return_if_fail (ATK_IS_REGISTRY (registry));
+
+  value = g_hash_table_lookup (registry->factory_type_registry, 
+                                  (gpointer) type);
+  old_type = (GType) value;
+  if (old_type && old_type != factory_type)
+    {
+      g_hash_table_remove (registry->factory_type_registry, 
+                           (gpointer) type);
+      /*
+       * If the old factory was created, notify it that it has
+       * been replaced, then free it.
+       */
+      old_factory = g_hash_table_lookup (registry->factory_singleton_cache, 
+                                         (gpointer) old_type);
+      if (old_factory)
+        {
+          atk_object_factory_invalidate (old_factory);
+          g_type_free_instance ((GTypeInstance *) old_factory);
+        }
+    }
+  g_hash_table_insert (registry->factory_type_registry, 
+                       (gpointer) type, 
+                       (gpointer) factory_type);
+}
+
+/**
+ * atk_registry_get_factory_type:
+ * @registry: an #AtkRegistry
+ * @type: a #GType with which to look up the associated #AtkObjectFactory
+ * subclass
+ *
+ * Provides a #GType indicating the #AtkObjectFactory subclass
+ * associated with @type.
+ *
+ * Returns: a #GType associated with type @type
+ **/
+GType
+atk_registry_get_factory_type (AtkRegistry *registry,
+                               GType type)
+{
+  GType factory_type;
+  gpointer value;
+
+  /*
+   * look up factory type in first hash;
+   * if there isn't an explicitly registered factory type,
+   * try inheriting one...
+   */
+  do {
+    value =
+        g_hash_table_lookup (registry->factory_type_registry, 
+                             (gpointer) type);
+    type = g_type_parent (type);
+    if (type == G_TYPE_INVALID)
+      {
+        break;
+      }
+  } while (value == NULL);
+
+  factory_type = (GType) value;
+  return factory_type;
+}
+
+/**
+ * atk_registry_get_factory:
+ * @registry: an #AtkRegistry
+ * @type: a #GType with which to look up the associated #AtkObjectFactory
+ *
+ * Gets an #AtkObjectFactory appropriate for creating #AtkObjects
+ * appropriate for @type.
+ *
+ * Returns: (transfer none): an #AtkObjectFactory appropriate for creating
+ * #AtkObjects appropriate for @type.
+ **/
+AtkObjectFactory*
+atk_registry_get_factory (AtkRegistry *registry,
+                          GType type)
+{
+  gpointer factory_pointer = NULL;
+  GType factory_type;
+
+  factory_type = atk_registry_get_factory_type (registry, type);
+
+  if (factory_type == G_TYPE_INVALID)
+  {
+  /* Factory type has not been specified for this object type */
+    static AtkObjectFactory* default_factory = NULL;
+
+    if (!default_factory)
+      default_factory = atk_no_op_object_factory_new ();
+
+    return default_factory;
+  }
+
+  /* ask second hashtable for instance of factory type */
+  factory_pointer =
+        g_hash_table_lookup (registry->factory_singleton_cache, 
+        (gpointer) factory_type);
+
+  /* if there isn't one already, create one and save it */
+  if (factory_pointer == NULL)
+    {
+      factory_pointer = g_type_create_instance (factory_type);
+      g_hash_table_insert (registry->factory_singleton_cache,
+                           (gpointer) factory_type,
+                           factory_pointer);
+    }
+
+  return ATK_OBJECT_FACTORY (factory_pointer);
+}
+
+/**
+ * atk_get_default_registry:
+ *
+ * Gets a default implementation of the #AtkObjectFactory/type
+ * registry.
+ * Note: For most toolkit maintainers, this will be the correct
+ * registry for registering new #AtkObject factories. Following
+ * a call to this function, maintainers may call atk_registry_set_factory_type()
+ * to associate an #AtkObjectFactory subclass with the GType of objects
+ * for whom accessibility information will be provided.
+ *
+ * Returns: (transfer full): a default implementation of the
+ * #AtkObjectFactory/type registry
+ **/
+AtkRegistry*
+atk_get_default_registry (void)
+{
+  if (!default_registry)
+    {
+      default_registry = atk_registry_new ();
+    }
+  return default_registry;
+}
diff --git a/atk/atkregistry.h b/atk/atkregistry.h
new file mode 100644
index 0000000000..da49dfa58c
--- /dev/null
+++ b/atk/atkregistry.h
@@ -0,0 +1,74 @@
+/* ATK - Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_REGISTRY_H__
+#define __ATK_REGISTRY_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <glib-object.h>
+#include "atkobjectfactory.h"
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_REGISTRY                (atk_registry_get_type ())
+#define ATK_REGISTRY(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_REGISTRY, AtkRegistry))
+#define ATK_REGISTRY_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_REGISTRY, 
AtkRegistryClass))
+#define ATK_IS_REGISTRY(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_REGISTRY))
+#define ATK_IS_REGISTRY_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_REGISTRY))
+#define ATK_REGISTRY_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_REGISTRY, 
AtkRegistryClass))
+
+struct _AtkRegistry
+{
+  GObject    parent;
+  GHashTable *factory_type_registry;
+  GHashTable *factory_singleton_cache;
+};
+
+struct _AtkRegistryClass
+{
+  GObjectClass    parent_class;
+};
+
+typedef struct _AtkRegistry             AtkRegistry;
+typedef struct _AtkRegistryClass        AtkRegistryClass;
+
+
+GDK_AVAILABLE_IN_ALL
+GType             atk_registry_get_type         (void);
+GDK_AVAILABLE_IN_ALL
+void              atk_registry_set_factory_type (AtkRegistry *registry,
+                                                 GType type,
+                                                 GType factory_type);
+GDK_AVAILABLE_IN_ALL
+GType             atk_registry_get_factory_type (AtkRegistry *registry,
+                                                GType type);
+GDK_AVAILABLE_IN_ALL
+AtkObjectFactory* atk_registry_get_factory      (AtkRegistry *registry,
+                                                 GType type);
+
+GDK_AVAILABLE_IN_ALL
+AtkRegistry*      atk_get_default_registry      (void);
+
+G_END_DECLS
+
+#endif /* __ATK_REGISTRY_H__ */
+
diff --git a/atk/atkrelation.c b/atk/atkrelation.c
new file mode 100644
index 0000000000..6dcb1c477e
--- /dev/null
+++ b/atk/atkrelation.c
@@ -0,0 +1,501 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <glib-object.h>
+#include "atk.h"
+
+/**
+ * SECTION:atkrelation
+ * @Short_description: An object used to describe a relation between a
+ *  object and one or more other objects.
+ * @Title:AtkRelation
+ *
+ * An AtkRelation describes a relation between an object and one or
+ * more other objects. The actual relations that an object has with
+ * other objects are defined as an AtkRelationSet, which is a set of
+ * AtkRelations.
+ */
+enum {
+  PROP_0,
+
+  PROP_RELATION_TYPE,
+  PROP_TARGET,
+  PROP_LAST
+};
+
+static GPtrArray *extra_names = NULL;
+
+static gpointer parent_class = NULL;
+  
+static void atk_relation_class_init   (AtkRelationClass *klass);
+static void atk_relation_finalize     (GObject          *object);
+static void atk_relation_set_property (GObject          *object,
+                                       guint            prop_id,
+                                       const GValue     *value,
+                                       GParamSpec       *pspec);
+static void atk_relation_get_property (GObject          *object,
+                                       guint            prop_id,
+                                       GValue           *value,
+                                       GParamSpec       *pspec);
+
+static GPtrArray* atk_relation_get_ptr_array_from_value_array (GValueArray *array);
+static GValueArray* atk_relation_get_value_array_from_ptr_array (GPtrArray *array);
+
+GType
+atk_relation_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type)
+    {
+      static const GTypeInfo typeInfo =
+      {
+        sizeof (AtkRelationClass),
+        (GBaseInitFunc) NULL,
+        (GBaseFinalizeFunc) NULL,
+        (GClassInitFunc) atk_relation_class_init,
+        (GClassFinalizeFunc) NULL,
+        NULL,
+        sizeof (AtkRelation),
+        0,
+        (GInstanceInitFunc) NULL,
+      } ;
+      type = g_type_register_static (G_TYPE_OBJECT, "AtkRelation", &typeInfo, 0) ;
+    }
+  return type;
+}
+
+static void
+atk_relation_class_init (AtkRelationClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  parent_class = g_type_class_peek_parent (klass);
+  
+  gobject_class->finalize = atk_relation_finalize;
+  gobject_class->set_property = atk_relation_set_property;
+  gobject_class->get_property = atk_relation_get_property;
+
+  g_object_class_install_property (gobject_class,
+                                   PROP_RELATION_TYPE,
+                                   g_param_spec_enum ("relation_type",
+                                                      "Relation Type",
+                                                      "The type of the relation",
+                                                      ATK_TYPE_RELATION_TYPE,
+                                                      ATK_RELATION_NULL,
+                                                      G_PARAM_READWRITE));
+  g_object_class_install_property (gobject_class,
+                                   PROP_TARGET,
+                                   g_param_spec_value_array ("target",
+                                                             "Target",
+                                                             "An array of the targets for the relation",
+                                                             NULL,
+
+                                                             G_PARAM_READWRITE));
+}
+
+/**
+ * atk_relation_type_register:
+ * @name: a name string
+ *
+ * Associate @name with a new #AtkRelationType
+ 
+ * Returns: an #AtkRelationType associated with @name
+ **/
+AtkRelationType
+atk_relation_type_register (const gchar *name)
+{
+  g_return_val_if_fail (name, ATK_RELATION_NULL);
+
+  if (!extra_names)
+    extra_names = g_ptr_array_new ();
+
+  g_ptr_array_add (extra_names, g_strdup (name));
+  return extra_names->len + ATK_RELATION_LAST_DEFINED;
+}
+
+/**
+ * atk_relation_type_get_name:
+ * @type: The #AtkRelationType whose name is required
+ *
+ * Gets the description string describing the #AtkRelationType @type.
+ *
+ * Returns: the string describing the AtkRelationType
+ */
+const gchar*
+atk_relation_type_get_name (AtkRelationType type)
+{
+  GTypeClass *type_class;
+  GEnumValue *value;
+  const gchar *name = NULL;
+
+  type_class = g_type_class_ref (ATK_TYPE_RELATION_TYPE);
+  g_return_val_if_fail (G_IS_ENUM_CLASS (type_class), NULL);
+
+  value = g_enum_get_value (G_ENUM_CLASS (type_class), type);
+
+  if (value)
+    {
+      name = value->value_nick;
+    }
+  else
+    {
+      if (extra_names)
+        {
+          gint n = type;
+
+          n -= ATK_RELATION_LAST_DEFINED + 1;
+
+          if (n < extra_names->len)
+            name = g_ptr_array_index (extra_names, n);
+        }
+    }
+  g_type_class_unref (type_class);
+  return name;
+}
+
+/**
+ * atk_relation_type_for_name:
+ * @name: a string which is the (non-localized) name of an ATK relation type.
+ *
+ * Get the #AtkRelationType type corresponding to a relation name.
+ *
+ * Returns: the #AtkRelationType enumerated type corresponding to the specified name,
+ *          or #ATK_RELATION_NULL if no matching relation type is found.
+ **/
+AtkRelationType
+atk_relation_type_for_name (const gchar *name)
+{
+  GTypeClass *type_class;
+  GEnumValue *value;
+  AtkRelationType type = ATK_RELATION_NULL;
+
+  g_return_val_if_fail (name, ATK_RELATION_NULL);
+
+  type_class = g_type_class_ref (ATK_TYPE_RELATION_TYPE);
+  g_return_val_if_fail (G_IS_ENUM_CLASS (type_class), ATK_RELATION_NULL);
+
+  value = g_enum_get_value_by_nick (G_ENUM_CLASS (type_class), name);
+
+  if (value)
+    {
+      type = value->value;
+    }
+  else
+    {
+      gint i;
+
+      if (extra_names)
+        {
+          for (i = 0; i < extra_names->len; i++)
+            {
+              gchar *extra_name = (gchar *)g_ptr_array_index (extra_names, i);
+
+              g_return_val_if_fail (extra_name, ATK_RELATION_NULL);
+         
+              if (strcmp (name, extra_name) == 0)
+                {
+                  type = i + 1 + ATK_RELATION_LAST_DEFINED;
+                  break;
+                }
+            }
+        }
+    }
+  g_type_class_unref (type_class);
+ 
+  return type;
+}
+
+
+/**
+ * atk_relation_new:
+ * @targets: (array length=n_targets): an array of pointers to
+ *  #AtkObjects
+ * @n_targets: number of #AtkObjects pointed to by @targets
+ * @relationship: an #AtkRelationType with which to create the new
+ *  #AtkRelation
+ *
+ * Create a new relation for the specified key and the specified list
+ * of targets.  See also atk_object_add_relationship().
+ *
+ * Returns: a pointer to a new #AtkRelation
+ **/
+AtkRelation*
+atk_relation_new (AtkObject       **targets,
+                  gint            n_targets,
+                  AtkRelationType relationship)
+{
+  AtkRelation *relation;
+  int         i;
+  GValueArray *array;
+  GValue      *value;
+
+  g_return_val_if_fail (targets != NULL, NULL);
+
+  array = g_value_array_new (n_targets);
+  for (i = 0; i < n_targets; i++)
+  {
+    value = g_new0 (GValue, 1);
+    g_value_init (value, ATK_TYPE_OBJECT);
+    g_value_set_object (value, targets[i]);
+    array = g_value_array_append (array, value);
+    g_value_unset (value);
+    g_free (value);
+  }
+  
+  relation =  g_object_new (ATK_TYPE_RELATION, 
+                            "relation_type", relationship,
+                            "target", array,
+                            NULL);
+
+  g_value_array_free (array);
+
+  return relation;
+}
+
+/**
+ * atk_relation_get_relation_type:
+ * @relation: an #AtkRelation 
+ *
+ * Gets the type of @relation
+ *
+ * Returns: the type of @relation
+ **/
+AtkRelationType
+atk_relation_get_relation_type (AtkRelation *relation)
+{
+  g_return_val_if_fail (ATK_IS_RELATION (relation), 0);
+  
+  return relation->relationship;
+}
+
+/**
+ * atk_relation_get_target:
+ * @relation: an #AtkRelation
+ *
+ * Gets the target list of @relation
+ *
+ * Returns: (transfer none) (element-type Atk.Object): the target list of @relation
+ **/
+GPtrArray*
+atk_relation_get_target (AtkRelation *relation)
+{
+  g_return_val_if_fail (ATK_IS_RELATION (relation), NULL);
+
+  return relation->target;
+}
+
+static void
+delete_object_while_in_relation (gpointer callback_data,
+                                 GObject *where_the_object_was)
+{
+  GPtrArray *array;
+
+  g_assert (callback_data != NULL);
+
+  array = callback_data;
+  g_ptr_array_remove (array, where_the_object_was);
+}
+
+/**
+ * atk_relation_add_target:
+ * @relation: an #AtkRelation
+ * @target: an #AtkObject
+ *
+ * Adds the specified AtkObject to the target for the relation, if it is
+ * not already present.  See also atk_object_add_relationship().
+ *
+ *
+ * Since: 1.9
+ **/
+void
+atk_relation_add_target (AtkRelation *relation,
+                         AtkObject   *target)
+{
+  guint i;
+
+  g_return_if_fail (ATK_IS_RELATION (relation));
+  g_return_if_fail (ATK_IS_OBJECT (target));
+
+  /* first check if target occurs in array ... */
+  for (i = 0; i < relation->target->len; i++)
+    if (g_ptr_array_index(relation->target, i) == target)
+      return;
+
+  g_ptr_array_add (relation->target, target);
+  g_object_weak_ref (G_OBJECT (target), (GWeakNotify) delete_object_while_in_relation, relation->target);
+}
+
+/**
+ * atk_relation_remove_target:
+ * @relation: an #AtkRelation
+ * @target: an #AtkObject
+ *
+ * Remove the specified AtkObject from the target for the relation.
+ *
+ * Returns: TRUE if the removal is successful.
+ **/
+
+gboolean
+atk_relation_remove_target (AtkRelation *relation,
+                            AtkObject *target)
+{
+  gboolean ret = FALSE;
+  GPtrArray *array;
+
+  array = atk_relation_get_target (relation);
+
+  if (array && g_ptr_array_remove (array, target))
+    {
+      g_object_weak_unref (G_OBJECT (target),
+                           (GWeakNotify) delete_object_while_in_relation,
+                           relation->target);
+      ret = TRUE;
+    }
+  return ret;
+}
+
+static void
+atk_relation_finalize (GObject *object)
+{
+  AtkRelation        *relation;
+
+  g_return_if_fail (ATK_IS_RELATION (object));
+
+  relation = ATK_RELATION (object);
+
+  if (relation->target)
+  {
+    gint i;
+
+    for (i = 0; i < relation->target->len; i++)
+    {
+      g_object_weak_unref (G_OBJECT (g_ptr_array_index (relation->target, i)),
+                           (GWeakNotify) delete_object_while_in_relation, 
+                           relation->target);
+    }
+    g_ptr_array_free (relation->target, TRUE);
+  } 
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void 
+atk_relation_set_property (GObject       *object,
+                           guint         prop_id,
+                           const GValue  *value,
+                           GParamSpec    *pspec)
+{
+  AtkRelation *relation;
+  gpointer boxed;
+
+  relation = ATK_RELATION (object);
+
+  switch (prop_id)
+    {
+    case PROP_RELATION_TYPE:
+      relation->relationship = g_value_get_enum (value);
+      break; 
+    case PROP_TARGET:
+      if (relation->target)
+      {
+        gint i;
+
+        for (i = 0; i < relation->target->len; i++)
+        {
+          g_object_weak_unref (G_OBJECT (g_ptr_array_index (relation->target, i)),
+                               (GWeakNotify) delete_object_while_in_relation,
+                               relation->target);
+        }
+        g_ptr_array_free (relation->target, TRUE);
+      }
+      boxed = g_value_get_boxed (value);
+      relation->target = atk_relation_get_ptr_array_from_value_array ( (GValueArray *) boxed);
+      break; 
+    default:
+      break;
+    }  
+}
+
+static void
+atk_relation_get_property (GObject    *object,
+                           guint      prop_id,
+                           GValue     *value,
+                           GParamSpec *pspec)
+{
+  AtkRelation *relation;
+  GValueArray *array;
+
+  relation = ATK_RELATION (object);
+
+  switch (prop_id)
+    {
+    case PROP_RELATION_TYPE:
+      g_value_set_enum (value, relation->relationship);
+      break;
+    case PROP_TARGET:
+      array = atk_relation_get_value_array_from_ptr_array (relation->target);
+      g_value_set_boxed (value, array);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }  
+}
+
+static GPtrArray*
+atk_relation_get_ptr_array_from_value_array (GValueArray *array)
+{
+  gint i;
+  GPtrArray *return_array;
+  GValue *value;
+  GObject *obj;
+
+  return_array = g_ptr_array_sized_new (array->n_values);
+  for (i = 0; i < array->n_values; i++)
+    {
+      value = g_value_array_get_nth (array, i);
+      obj = g_value_get_object (value);
+      g_ptr_array_add (return_array, obj);
+      g_object_weak_ref (obj, (GWeakNotify) delete_object_while_in_relation, return_array);
+    }
+      
+  return return_array;
+}
+
+static GValueArray*
+atk_relation_get_value_array_from_ptr_array (GPtrArray *array)
+{
+  int         i;
+  GValueArray *return_array;
+  GValue      *value;
+
+  return_array = g_value_array_new (array->len);
+  for (i = 0; i < array->len; i++)
+    {
+      value = g_new0 (GValue, 1);
+      g_value_init (value, ATK_TYPE_OBJECT);
+      g_value_set_object (value, g_ptr_array_index (array, i));
+      return_array = g_value_array_append (return_array, value);
+    }
+  return return_array;
+}
diff --git a/atk/atkrelation.h b/atk/atkrelation.h
new file mode 100644
index 0000000000..3ea42e3d47
--- /dev/null
+++ b/atk/atkrelation.h
@@ -0,0 +1,97 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_RELATION_H__
+#define __ATK_RELATION_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+G_BEGIN_DECLS
+
+#include <atk/atktypes.h>
+
+/*
+ * An AtkRelation describes a relation between the object and one or more 
+ * other objects. The actual relations that an object has with other objects
+ * are defined as an AtkRelationSet, which is a set of AtkRelations. 
+ */
+
+#define ATK_TYPE_RELATION                         (atk_relation_get_type ())
+#define ATK_RELATION(obj)                         (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_RELATION, 
AtkRelation))
+#define ATK_RELATION_CLASS(klass)                 (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_RELATION, 
AtkRelationClass))
+#define ATK_IS_RELATION(obj)                      (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_RELATION))
+#define ATK_IS_RELATION_CLASS(klass)              (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_RELATION))
+#define ATK_RELATION_GET_CLASS(obj)               (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_RELATION, 
AtkRelationClass))
+
+typedef struct _AtkRelation            AtkRelation;
+typedef struct _AtkRelationClass       AtkRelationClass;
+
+struct _AtkRelation
+{
+  GObject parent;
+
+  GPtrArray       *target;
+  AtkRelationType relationship;
+};
+
+struct _AtkRelationClass
+{
+  GObjectClass parent;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_relation_get_type (void);
+
+GDK_AVAILABLE_IN_ALL
+AtkRelationType       atk_relation_type_register      (const gchar     *name);
+GDK_AVAILABLE_IN_ALL
+const gchar*          atk_relation_type_get_name      (AtkRelationType type);
+GDK_AVAILABLE_IN_ALL
+AtkRelationType       atk_relation_type_for_name      (const gchar     *name);
+
+/*
+ * Create a new relation for the specified key and the specified list
+ * of targets.
+ */
+GDK_AVAILABLE_IN_ALL
+AtkRelation*          atk_relation_new                (AtkObject       **targets,
+                                                       gint            n_targets,
+                                                       AtkRelationType relationship);
+/*
+ * Returns the type of a relation.
+ */
+GDK_AVAILABLE_IN_ALL
+AtkRelationType       atk_relation_get_relation_type  (AtkRelation     *relation);
+/*
+ * Returns the target list of a relation.
+ */
+GDK_AVAILABLE_IN_ALL
+GPtrArray*            atk_relation_get_target         (AtkRelation     *relation);
+GDK_AVAILABLE_IN_ALL
+void                  atk_relation_add_target         (AtkRelation     *relation,
+                                                       AtkObject       *target);
+GDK_AVAILABLE_IN_ALL
+gboolean              atk_relation_remove_target      (AtkRelation     *relation,
+                                                       AtkObject       *target);
+
+G_END_DECLS
+
+#endif /* __ATK_RELATION_H__ */
diff --git a/atk/atkrelationset.c b/atk/atkrelationset.c
new file mode 100644
index 0000000000..95d50e66b9
--- /dev/null
+++ b/atk/atkrelationset.c
@@ -0,0 +1,409 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include "atk.h"
+
+/**
+ * SECTION:atkrelationset
+ * @Short_description: A set of AtkRelations, normally the set of
+ *  AtkRelations which an AtkObject has.
+ * @Title:AtkRelationSet
+ *
+ * The AtkRelationSet held by an object establishes its relationships
+ * with objects beyond the normal "parent/child" hierarchical
+ * relationships that all user interface objects have.
+ * AtkRelationSets establish whether objects are labelled or
+ * controlled by other components, share group membership with other
+ * components (for instance within a radio-button group), or share
+ * content which "flows" between them, among other types of possible
+ * relationships.
+ */
+
+static gpointer parent_class = NULL;
+
+static void atk_relation_set_class_init (AtkRelationSetClass  *klass);
+static void atk_relation_set_finalize   (GObject              *object);
+
+GType
+atk_relation_set_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type)
+    {
+      static const GTypeInfo typeInfo =
+      {
+        sizeof (AtkRelationSetClass),
+        (GBaseInitFunc) NULL,
+        (GBaseFinalizeFunc) NULL,
+        (GClassInitFunc) atk_relation_set_class_init,
+        (GClassFinalizeFunc) NULL,
+        NULL,
+        sizeof (AtkRelationSet),
+        0,
+        (GInstanceInitFunc) NULL,
+      } ;
+      type = g_type_register_static (G_TYPE_OBJECT, "AtkRelationSet", &typeInfo, 0) ;
+    }
+  return type;
+}
+
+static void
+atk_relation_set_class_init (AtkRelationSetClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  gobject_class->finalize = atk_relation_set_finalize;
+}
+
+/**
+ * atk_relation_set_new:
+ * 
+ * Creates a new empty relation set.
+ * 
+ * Returns: a new #AtkRelationSet 
+ **/
+AtkRelationSet*
+atk_relation_set_new (void)
+{
+  AtkRelationSet *relation_set;
+
+  relation_set = g_object_new (ATK_TYPE_RELATION_SET, NULL);
+  return relation_set;
+}
+
+/**
+ * atk_relation_set_contains:
+ * @set: an #AtkRelationSet
+ * @relationship: an #AtkRelationType
+ *
+ * Determines whether the relation set contains a relation that matches the
+ * specified type.
+ *
+ * Returns: %TRUE if @relationship is the relationship type of a relation
+ * in @set, %FALSE otherwise
+ **/
+gboolean
+atk_relation_set_contains (AtkRelationSet   *set,
+                           AtkRelationType  relationship)
+{
+  GPtrArray *array_item;
+  AtkRelation *item;
+  gint  i;
+
+  g_return_val_if_fail (ATK_IS_RELATION_SET (set), FALSE);
+
+  array_item = set->relations;
+  if (array_item == NULL)
+    return FALSE;
+  for (i = 0; i < array_item->len; i++)
+  {
+    item = g_ptr_array_index (array_item, i);
+    if (item->relationship == relationship)
+      return TRUE;
+  }
+  return FALSE;
+}
+
+/**
+ * atk_relation_set_remove:
+ * @set: an #AtkRelationSet
+ * @relation: an #AtkRelation
+ *
+ * Removes a relation from the relation set.
+ * This function unref's the #AtkRelation so it will be deleted unless there
+ * is another reference to it.
+ **/
+void
+atk_relation_set_remove (AtkRelationSet *set,
+                         AtkRelation    *relation)
+{
+  GPtrArray *array_item;
+  AtkRelationType relationship;
+
+  g_return_if_fail (ATK_IS_RELATION_SET (set));
+
+  array_item = set->relations;
+  if (array_item == NULL)
+    return;
+
+  if (g_ptr_array_remove (array_item, relation))
+  {
+    g_object_unref (relation);
+  }
+  else
+  {
+    relationship = atk_relation_get_relation_type (relation);
+    if (atk_relation_set_contains (set, relationship))
+    {
+      AtkRelation *exist_relation;
+      gint i;
+      exist_relation = atk_relation_set_get_relation_by_type (set, relationship);
+      for (i = 0; i < relation->target->len; i++)
+      {
+        AtkObject *target = g_ptr_array_index(relation->target, i);
+        atk_relation_remove_target (exist_relation, target);
+      }
+    }
+  }
+}
+
+/**
+ * atk_relation_set_add:
+ * @set: an #AtkRelationSet
+ * @relation: an #AtkRelation
+ *
+ * Add a new relation to the current relation set if it is not already
+ * present.
+ * This function ref's the AtkRelation so the caller of this function
+ * should unref it to ensure that it will be destroyed when the AtkRelationSet
+ * is destroyed.
+ **/
+void
+atk_relation_set_add (AtkRelationSet *set,
+                      AtkRelation    *relation)
+{
+  AtkRelationType relationship;
+
+  g_return_if_fail (ATK_IS_RELATION_SET (set));
+  g_return_if_fail (relation != NULL);
+
+  if (set->relations == NULL)
+  {
+    set->relations = g_ptr_array_new ();
+  }
+
+  relationship = atk_relation_get_relation_type (relation);
+  if (!atk_relation_set_contains (set, relationship))
+  {
+    g_ptr_array_add (set->relations, relation);
+    g_object_ref (relation);
+  }
+  else
+  {
+    AtkRelation *exist_relation;
+    gint i;
+    exist_relation = atk_relation_set_get_relation_by_type (set, relationship);
+    for (i = 0; i < relation->target->len; i++)
+    {
+      AtkObject *target = g_ptr_array_index(relation->target, i);
+      atk_relation_add_target (exist_relation, target); 
+    }
+  }
+}
+
+/**
+ * atk_relation_set_get_n_relations:
+ * @set: an #AtkRelationSet
+ *
+ * Determines the number of relations in a relation set.
+ *
+ * Returns: an integer representing the number of relations in the set.
+ **/
+gint
+atk_relation_set_get_n_relations (AtkRelationSet *set)
+{
+  g_return_val_if_fail (ATK_IS_RELATION_SET (set), 0);
+
+  if (set->relations == NULL)
+    return 0;
+
+  return set->relations->len;
+}
+
+/**
+ * atk_relation_set_get_relation:
+ * @set: an #AtkRelationSet
+ * @i: a gint representing a position in the set, starting from 0.
+ *
+ * Determines the relation at the specified position in the relation set.
+ *
+ * Returns: (transfer none): a #AtkRelation, which is the relation at
+ * position i in the set.
+ **/
+AtkRelation*
+atk_relation_set_get_relation (AtkRelationSet *set,
+                               gint           i)
+{
+  GPtrArray *array_item;
+  AtkRelation* item;
+
+  g_return_val_if_fail (ATK_IS_RELATION_SET (set), NULL);
+  g_return_val_if_fail (i >= 0, NULL);
+
+  array_item = set->relations;
+  if (array_item == NULL)
+    return NULL;
+  item = g_ptr_array_index (array_item, i);
+  if (item == NULL)
+    return NULL;
+
+  return item;
+}
+
+/**
+ * atk_relation_set_get_relation_by_type:
+ * @set: an #AtkRelationSet
+ * @relationship: an #AtkRelationType
+ *
+ * Finds a relation that matches the specified type.
+ *
+ * Returns: (transfer none): an #AtkRelation, which is a relation matching the
+ * specified type.
+ **/
+AtkRelation*
+atk_relation_set_get_relation_by_type (AtkRelationSet  *set,
+                                       AtkRelationType relationship)
+{
+  GPtrArray *array_item;
+  AtkRelation *item;
+  gint i;
+
+  g_return_val_if_fail (ATK_IS_RELATION_SET (set), NULL);
+
+  array_item = set->relations;
+  if (array_item == NULL)
+    return NULL;
+  for (i = 0; i < array_item->len; i++)
+  {
+    item = g_ptr_array_index (array_item, i);
+    if (item->relationship == relationship)
+      return item;
+  }
+  return NULL;
+}
+
+static void
+atk_relation_set_finalize (GObject *object)
+{
+  AtkRelationSet     *relation_set;
+  GPtrArray             *array;
+  gint               i;
+
+  g_return_if_fail (ATK_IS_RELATION_SET (object));
+
+  relation_set = ATK_RELATION_SET (object);
+  array = relation_set->relations;
+
+  if (array)
+  {
+    for (i = 0; i < array->len; i++)
+    {
+      g_object_unref (g_ptr_array_index (array, i));
+    }
+    g_ptr_array_free (array, TRUE);
+  }
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+/**
+ * atk_relation_set_add_relation_by_type:
+ * @set: an #AtkRelationSet
+ * @relationship: an #AtkRelationType
+ * @target: an #AtkObject
+ *
+ * Add a new relation of the specified type with the specified target to 
+ * the current relation set if the relation set does not contain a relation
+ * of that type. If it is does contain a relation of that typea the target
+ * is added to the relation.
+ *
+ * Since: 1.9
+ **/
+void
+atk_relation_set_add_relation_by_type (AtkRelationSet  *set,
+                                       AtkRelationType relationship,
+                                       AtkObject       *target)
+{
+  AtkRelation *relation;
+
+  g_return_if_fail (ATK_IS_RELATION_SET (set));
+  g_return_if_fail (ATK_IS_OBJECT (target));
+
+  relation = atk_relation_set_get_relation_by_type (set,
+                                                    relationship);
+  if (relation)
+    {
+      atk_relation_add_target (relation, target);
+    } 
+  else 
+    {
+      /* the relation hasn't been created yet ... */
+      relation = atk_relation_new (&target, 1, relationship);
+      atk_relation_set_add (set, relation);
+      g_object_unref(relation);
+    }
+}
+
+/**
+ * atk_relation_set_contains_target:
+ * @set: an #AtkRelationSet
+ * @relationship: an #AtkRelationType
+ * @target: an #AtkObject
+ *
+ * Determines whether the relation set contains a relation that
+ * matches the specified pair formed by type @relationship and object
+ * @target.
+ *
+ * Returns: %TRUE if @set contains a relation with the relationship
+ * type @relationship with an object @target, %FALSE otherwise
+ **/
+
+gboolean
+atk_relation_set_contains_target (AtkRelationSet  *set,
+                                  AtkRelationType relationship,
+                                  AtkObject       *target)
+{
+  GPtrArray *array_relations;
+  GPtrArray *array_target;
+  AtkObject *current_target;
+  AtkRelation *relation;
+  gint i;
+  gint c;
+
+  g_return_val_if_fail (ATK_IS_RELATION_SET (set), FALSE);
+  g_return_val_if_fail (ATK_IS_OBJECT (target), FALSE);
+
+  array_relations = set->relations;
+  if (array_relations == NULL)
+    return FALSE;
+
+  for (i = 0; i < array_relations->len; i++)
+  {
+    relation = g_ptr_array_index (array_relations, i);
+    if (relation->relationship == relationship)
+      {
+        array_target = atk_relation_get_target (relation);
+        for (c = 0; c < array_target->len; c++)
+          {
+            current_target = g_ptr_array_index (array_target, c);
+            if (target == current_target)
+              return TRUE;
+          }
+      }
+  }
+
+  return FALSE;
+}
diff --git a/atk/atkrelationset.h b/atk/atkrelationset.h
new file mode 100644
index 0000000000..295b26824f
--- /dev/null
+++ b/atk/atkrelationset.h
@@ -0,0 +1,91 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_RELATION_SET_H__
+#define __ATK_RELATION_SET_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+G_BEGIN_DECLS
+
+#include <glib-object.h>
+#include <atk/atkobject.h>
+#include <atk/atkrelation.h>
+
+#define ATK_TYPE_RELATION_SET                     (atk_relation_set_get_type ())
+#define ATK_RELATION_SET(obj)                     (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_RELATION_SET, 
AtkRelationSet))
+#define ATK_RELATION_SET_CLASS(klass)             (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_RELATION_SET, 
AtkRelationSetClass))
+#define ATK_IS_RELATION_SET(obj)                  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_RELATION_SET))
+#define ATK_IS_RELATION_SET_CLASS(klass)          (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_RELATION_SET))
+#define ATK_RELATION_SET_GET_CLASS(obj)           (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_RELATION_SET, 
AtkRelationSetClass))
+
+typedef struct _AtkRelationSetClass       AtkRelationSetClass;
+
+
+struct _AtkRelationSet
+{
+  GObject parent;
+
+  GPtrArray *relations;
+};
+
+struct _AtkRelationSetClass
+{
+  GObjectClass parent;
+
+  AtkFunction pad1;
+  AtkFunction pad2;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_relation_set_get_type (void);
+
+GDK_AVAILABLE_IN_ALL
+AtkRelationSet* atk_relation_set_new                  (void);
+GDK_AVAILABLE_IN_ALL
+gboolean        atk_relation_set_contains             (AtkRelationSet  *set,
+                                                       AtkRelationType relationship);
+GDK_AVAILABLE_IN_ALL
+gboolean        atk_relation_set_contains_target      (AtkRelationSet  *set,
+                                                       AtkRelationType relationship,
+                                                       AtkObject       *target);
+GDK_AVAILABLE_IN_ALL
+void            atk_relation_set_remove               (AtkRelationSet  *set,
+                                                       AtkRelation     *relation);
+GDK_AVAILABLE_IN_ALL
+void            atk_relation_set_add                  (AtkRelationSet  *set,
+                                                       AtkRelation     *relation);
+GDK_AVAILABLE_IN_ALL
+gint            atk_relation_set_get_n_relations      (AtkRelationSet  *set);
+GDK_AVAILABLE_IN_ALL
+AtkRelation*    atk_relation_set_get_relation         (AtkRelationSet  *set,
+                                                       gint            i);
+GDK_AVAILABLE_IN_ALL
+AtkRelation*    atk_relation_set_get_relation_by_type (AtkRelationSet  *set,
+                                                       AtkRelationType relationship);
+GDK_AVAILABLE_IN_ALL
+void            atk_relation_set_add_relation_by_type (AtkRelationSet  *set,
+                                                       AtkRelationType relationship,
+                                                       AtkObject       *target);
+
+G_END_DECLS
+
+#endif /* __ATK_RELATION_SET_H__ */
diff --git a/atk/atkrelationtype.h b/atk/atkrelationtype.h
new file mode 100644
index 0000000000..c37b479b43
--- /dev/null
+++ b/atk/atkrelationtype.h
@@ -0,0 +1,33 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2002 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_RELATION_TYPE_H__
+#define __ATK_RELATION_TYPE_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+G_END_DECLS
+
+#endif /* __ATK_RELATION_TYPE_H__ */
diff --git a/atk/atkselection.c b/atk/atkselection.c
new file mode 100644
index 0000000000..d4bd8363ec
--- /dev/null
+++ b/atk/atkselection.c
@@ -0,0 +1,289 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkselection.h"
+
+/**
+ * SECTION:atkselection
+ * @Short_description: The ATK interface implemented by container
+ *  objects whose #AtkObject children can be selected.
+ * @Title:AtkSelection
+ *
+ * #AtkSelection should be implemented by UI components with children
+ * which are exposed by #atk_object_ref_child and
+ * #atk_object_get_n_children, if the use of the parent UI component
+ * ordinarily involves selection of one or more of the objects
+ * corresponding to those #AtkObject children - for example,
+ * selectable lists.
+ *
+ * Note that other types of "selection" (for instance text selection)
+ * are accomplished a other ATK interfaces - #AtkSelection is limited
+ * to the selection/deselection of children.
+ */
+
+
+enum {
+  SELECTION_CHANGED,
+  LAST_SIGNAL
+};
+
+static void atk_selection_base_init (gpointer *g_class);
+
+static guint atk_selection_signals[LAST_SIGNAL] = { 0 };
+
+GType
+atk_selection_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) {
+    GTypeInfo tinfo =
+    {
+      sizeof (AtkSelectionIface),
+      (GBaseInitFunc)atk_selection_base_init,
+      (GBaseFinalizeFunc) NULL,
+
+    };
+
+    type = g_type_register_static (G_TYPE_INTERFACE, "AtkSelection", &tinfo, 0);
+  }
+
+  return type;
+}
+
+static void
+atk_selection_base_init (gpointer *g_class)
+{
+  static gboolean initialized = FALSE;
+
+  if (! initialized)
+    {
+      /**
+       * AtkSelection::selection-changed:
+       * @atkselection: the object which received the signal.
+       *
+       * The "selection-changed" signal is emitted by an object which
+       * implements AtkSelection interface when the selection changes.
+       */
+      atk_selection_signals[SELECTION_CHANGED] =
+        g_signal_new ("selection_changed",
+                      ATK_TYPE_SELECTION,
+                      G_SIGNAL_RUN_LAST,
+                      G_STRUCT_OFFSET (AtkSelectionIface, selection_changed),
+                      (GSignalAccumulator) NULL, NULL,
+                      g_cclosure_marshal_VOID__VOID,
+                      G_TYPE_NONE, 0);
+
+
+      initialized = TRUE;
+    }
+}
+
+/**
+ * atk_selection_add_selection:
+ * @selection: a #GObject instance that implements AtkSelectionIface
+ * @i: a #gint specifying the child index.
+ *
+ * Adds the specified accessible child of the object to the
+ * object's selection.
+ *
+ * Returns: TRUE if success, FALSE otherwise.
+ **/
+gboolean
+atk_selection_add_selection (AtkSelection *obj,
+                             gint         i)
+{
+  AtkSelectionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_SELECTION (obj), FALSE);
+
+  iface = ATK_SELECTION_GET_IFACE (obj);
+
+  if (iface->add_selection)
+    return (iface->add_selection) (obj, i);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_selection_clear_selection:
+ * @selection: a #GObject instance that implements AtkSelectionIface
+ *
+ * Clears the selection in the object so that no children in the object
+ * are selected.
+ *
+ * Returns: TRUE if success, FALSE otherwise.
+ **/
+gboolean
+atk_selection_clear_selection (AtkSelection *obj)
+{
+  AtkSelectionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_SELECTION (obj), FALSE);
+
+  iface = ATK_SELECTION_GET_IFACE (obj);
+
+  if (iface->clear_selection)
+    return (iface->clear_selection) (obj);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_selection_ref_selection:
+ * @selection: a #GObject instance that implements AtkSelectionIface
+ * @i: a #gint specifying the index in the selection set.  (e.g. the
+ * ith selection as opposed to the ith child).
+ *
+ * Gets a reference to the accessible object representing the specified 
+ * selected child of the object.
+ * Note: callers should not rely on %NULL or on a zero value for
+ * indication of whether AtkSelectionIface is implemented, they should
+ * use type checking/interface checking macros or the
+ * atk_get_accessible_value() convenience method.
+ *
+ * Returns: (nullable) (transfer full): an #AtkObject representing the
+ * selected accessible, or %NULL if @selection does not implement this
+ * interface.
+ **/
+AtkObject*
+atk_selection_ref_selection (AtkSelection *obj,
+                             gint         i)
+{
+  AtkSelectionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_SELECTION (obj), NULL);
+
+  iface = ATK_SELECTION_GET_IFACE (obj);
+
+  if (iface->ref_selection)
+    return (iface->ref_selection) (obj, i);
+  else
+    return NULL;
+}
+
+/**
+ * atk_selection_get_selection_count:
+ * @selection: a #GObject instance that implements AtkSelectionIface
+ *
+ * Gets the number of accessible children currently selected.
+ * Note: callers should not rely on %NULL or on a zero value for
+ * indication of whether AtkSelectionIface is implemented, they should
+ * use type checking/interface checking macros or the
+ * atk_get_accessible_value() convenience method.
+ *
+ * Returns: a gint representing the number of items selected, or 0
+ * if @selection does not implement this interface.
+ **/
+gint
+atk_selection_get_selection_count (AtkSelection *obj)
+{
+  AtkSelectionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_SELECTION (obj), 0);
+
+  iface = ATK_SELECTION_GET_IFACE (obj);
+
+  if (iface->get_selection_count)
+    return (iface->get_selection_count) (obj);
+  else
+    return 0;
+}
+
+/**
+ * atk_selection_is_child_selected:
+ * @selection: a #GObject instance that implements AtkSelectionIface
+ * @i: a #gint specifying the child index.
+ *
+ * Determines if the current child of this object is selected
+ * Note: callers should not rely on %NULL or on a zero value for
+ * indication of whether AtkSelectionIface is implemented, they should
+ * use type checking/interface checking macros or the
+ * atk_get_accessible_value() convenience method.
+ *
+ * Returns: a gboolean representing the specified child is selected, or 0
+ * if @selection does not implement this interface.
+ **/
+gboolean
+atk_selection_is_child_selected (AtkSelection *obj,
+                                 gint         i)
+{
+  AtkSelectionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_SELECTION (obj), FALSE);
+
+  iface = ATK_SELECTION_GET_IFACE (obj);
+
+  if (iface->is_child_selected)
+    return (iface->is_child_selected) (obj, i);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_selection_remove_selection:
+ * @selection: a #GObject instance that implements AtkSelectionIface
+ * @i: a #gint specifying the index in the selection set.  (e.g. the
+ * ith selection as opposed to the ith child).
+ *
+ * Removes the specified child of the object from the object's selection.
+ *
+ * Returns: TRUE if success, FALSE otherwise.
+ **/
+gboolean
+atk_selection_remove_selection (AtkSelection *obj,
+                                gint         i)
+{
+  AtkSelectionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_SELECTION (obj), FALSE);
+
+  iface = ATK_SELECTION_GET_IFACE (obj);
+
+  if (iface->remove_selection)
+    return (iface->remove_selection) (obj, i);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_selection_select_all_selection:
+ * @selection: a #GObject instance that implements AtkSelectionIface
+ *
+ * Causes every child of the object to be selected if the object
+ * supports multiple selections.
+ *
+ * Returns: TRUE if success, FALSE otherwise.
+ **/
+gboolean
+atk_selection_select_all_selection (AtkSelection *obj)
+{
+  AtkSelectionIface *iface;
+
+  g_return_val_if_fail (ATK_IS_SELECTION (obj), FALSE);
+
+  iface = ATK_SELECTION_GET_IFACE (obj);
+
+  if (iface->select_all_selection)
+    return (iface->select_all_selection) (obj);
+  else
+    return FALSE;
+}
diff --git a/atk/atkselection.h b/atk/atkselection.h
new file mode 100644
index 0000000000..867de653e5
--- /dev/null
+++ b/atk/atkselection.h
@@ -0,0 +1,100 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_SELECTION_H__
+#define __ATK_SELECTION_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+/*
+ * This AtkSelection interface provides the standard mechanism for an 
+ * assistive technology to determine what the current selected children are, 
+ * as well as modify the selection set. Any object that has children that 
+ * can be selected should support the AtkSelection interface.
+ */
+
+#define ATK_TYPE_SELECTION                        (atk_selection_get_type ())
+#define ATK_IS_SELECTION(obj)                     G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_SELECTION)
+#define ATK_SELECTION(obj)                        G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_SELECTION, 
AtkSelection)
+#define ATK_SELECTION_GET_IFACE(obj)              (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_SELECTION, 
AtkSelectionIface))
+
+#ifndef _TYPEDEF_ATK_SELECTION_
+#define _TYPEDEF_ATK_SELECTION_
+typedef struct _AtkSelection AtkSelection;
+#endif
+typedef struct _AtkSelectionIface AtkSelectionIface;
+
+struct _AtkSelectionIface
+{
+  GTypeInterface parent;
+
+  gboolean     (* add_selection)        (AtkSelection   *selection,
+                                         gint           i);
+  gboolean     (* clear_selection)      (AtkSelection   *selection);
+  AtkObject*   (* ref_selection)        (AtkSelection   *selection,
+                                         gint           i);
+  gint         (* get_selection_count)  (AtkSelection   *selection);
+  gboolean     (* is_child_selected)    (AtkSelection   *selection,
+                                         gint           i);
+  gboolean     (* remove_selection)     (AtkSelection   *selection,
+                                         gint           i);
+  gboolean     (* select_all_selection) (AtkSelection   *selection);
+
+  /* signal handlers */
+  
+  void         (*selection_changed)     (AtkSelection   *selection);
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_selection_get_type (void);
+
+GDK_AVAILABLE_IN_ALL
+gboolean     atk_selection_add_selection        (AtkSelection   *selection,
+                                                 gint           i);
+
+GDK_AVAILABLE_IN_ALL
+gboolean     atk_selection_clear_selection      (AtkSelection   *selection);
+
+GDK_AVAILABLE_IN_ALL
+AtkObject*   atk_selection_ref_selection        (AtkSelection   *selection,
+                                                 gint           i);
+
+GDK_AVAILABLE_IN_ALL
+gint         atk_selection_get_selection_count  (AtkSelection   *selection);
+
+GDK_AVAILABLE_IN_ALL
+gboolean     atk_selection_is_child_selected    (AtkSelection   *selection,
+                                                 gint           i);
+
+GDK_AVAILABLE_IN_ALL
+gboolean     atk_selection_remove_selection     (AtkSelection   *selection,
+                                                 gint           i);
+
+GDK_AVAILABLE_IN_ALL
+gboolean     atk_selection_select_all_selection (AtkSelection   *selection);
+
+G_END_DECLS
+
+#endif /* __ATK_SELECTION_H__ */
diff --git a/atk/atksocket.c b/atk/atksocket.c
new file mode 100644
index 0000000000..887fb5c02a
--- /dev/null
+++ b/atk/atksocket.c
@@ -0,0 +1,199 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright (C) 2009 Novell, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atk.h"
+#include "atksocket.h"
+
+/**
+ * SECTION:atksocket
+ * @Short_description: Container for AtkPlug objects from other processes
+ * @Title: AtkSocket
+ * @See_also: #AtkPlug
+ *
+ * Together with #AtkPlug, #AtkSocket provides the ability to embed
+ * accessibles from one process into another in a fashion that is
+ * transparent to assistive technologies. #AtkSocket works as the
+ * container of #AtkPlug, embedding it using the method
+ * atk_socket_embed(). Any accessible contained in the #AtkPlug will
+ * appear to the assistive technologies as being inside the
+ * application that created the #AtkSocket.
+ *
+ * The communication between a #AtkSocket and a #AtkPlug is done by
+ * the IPC layer of the accessibility framework, normally implemented
+ * by the D-Bus based implementation of AT-SPI (at-spi2). If that is
+ * the case, at-spi-atk2 is the responsible to implement the abstract
+ * methods atk_plug_get_id() and atk_socket_embed(), so an ATK
+ * implementor shouldn't reimplement them. The process that contains
+ * the #AtkPlug is responsible to send the ID returned by
+ * atk_plug_id() to the process that contains the #AtkSocket, so it
+ * could call the method atk_socket_embed() in order to embed it.
+ *
+ * For the same reasons, an implementor doesn't need to implement
+ * atk_object_get_n_accessible_children() and
+ * atk_object_ref_accessible_child(). All the logic related to those
+ * functions will be implemented by the IPC layer.
+ */
+
+static void atk_socket_finalize   (GObject *obj);
+
+static void atk_component_interface_init (AtkComponentIface *iface);
+
+static void atk_socket_component_real_get_extents (AtkComponent *component,
+                                                   gint         *x,
+                                                   gint         *y,
+                                                   gint         *width,
+                                                   gint         *height,
+                                                   AtkCoordType  coord_type);
+
+G_DEFINE_TYPE_WITH_CODE (AtkSocket, atk_socket, ATK_TYPE_OBJECT,
+                         G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init))
+
+static void
+atk_socket_init (AtkSocket* obj)
+{
+  AtkObject *accessible = ATK_OBJECT (obj);
+
+  obj->embedded_plug_id = NULL;
+
+  accessible->role = ATK_ROLE_FILLER;
+  accessible->layer = ATK_LAYER_WIDGET;
+}
+
+static void
+atk_socket_class_init (AtkSocketClass* klass)
+{
+  GObjectClass *obj_class = G_OBJECT_CLASS (klass);
+
+  obj_class->finalize = atk_socket_finalize;
+
+  klass->embed = NULL;
+}
+
+static void
+atk_socket_finalize (GObject *_obj)
+{
+  AtkSocket *obj = ATK_SOCKET (_obj);
+
+  g_free (obj->embedded_plug_id);
+  obj->embedded_plug_id = NULL;
+
+  G_OBJECT_CLASS (atk_socket_parent_class)->finalize (_obj);
+}
+
+static void
+atk_component_interface_init (AtkComponentIface *iface)
+{
+  iface->get_extents = atk_socket_component_real_get_extents;
+}
+
+/**
+ * atk_socket_new:
+ *
+ * Creates a new #AtkSocket.
+ *
+ * Returns: (transfer full): the newly created #AtkSocket instance
+ */
+AtkObject*
+atk_socket_new (void)
+{
+  return g_object_new (ATK_TYPE_SOCKET, NULL);
+}
+
+/**
+ * atk_socket_embed:
+ * @obj: an #AtkSocket
+ * @plug_id: the ID of an #AtkPlug
+ *
+ * Embeds the children of an #AtkPlug as the children of the
+ * #AtkSocket. The plug may be in the same process or in a different
+ * process.
+ *
+ * The class item used by this function should be filled in by the IPC
+ * layer (usually at-spi2-atk). The implementor of the AtkSocket
+ * should call this function and pass the id for the plug as returned
+ * by atk_plug_get_id().  It is the responsibility of the application
+ * to pass the plug id on to the process implementing the #AtkSocket
+ * as needed.
+ *
+ * Since: 1.30
+ **/
+void
+atk_socket_embed (AtkSocket* obj, const gchar* plug_id)
+{
+  AtkSocketClass *klass;
+
+  g_return_if_fail (plug_id != NULL);
+  g_return_if_fail (ATK_IS_SOCKET (obj));
+
+  klass = g_type_class_peek (ATK_TYPE_SOCKET);
+  if (klass && klass->embed)
+    {
+      if (obj->embedded_plug_id)
+        g_free (obj->embedded_plug_id);
+      obj->embedded_plug_id = g_strdup (plug_id);
+      (klass->embed) (obj, plug_id);
+    }
+}
+
+/**
+ * atk_socket_is_occupied:
+ * @obj: an #AtkSocket
+ *
+ * Determines whether or not the socket has an embedded plug.
+ *
+ * Returns: TRUE if a plug is embedded in the socket
+ *
+ * Since: 1.30
+ **/
+gboolean
+atk_socket_is_occupied (AtkSocket* obj)
+{
+  g_return_val_if_fail (ATK_IS_SOCKET (obj), FALSE);
+
+  return (obj->embedded_plug_id != NULL);
+}
+
+static void
+atk_socket_component_real_get_extents (AtkComponent *component,
+                                       gint         *x,
+                                       gint         *y,
+                                       gint         *width,
+                                       gint         *height,
+                                       AtkCoordType  coord_type)
+{
+  AtkObject *parent = atk_object_get_parent (ATK_OBJECT (component));
+
+  if (parent == NULL || !ATK_IS_COMPONENT (parent))
+  {
+    if (x)
+      *x = -1;
+    if (y)
+      *y = -1;
+    if (width)
+      *width = -1;
+    if (height)
+      *height = -1;
+
+    return;
+  }
+
+  atk_component_get_extents (ATK_COMPONENT (parent), x, y, width, height, coord_type);
+}
diff --git a/atk/atksocket.h b/atk/atksocket.h
new file mode 100644
index 0000000000..8ecf83e38c
--- /dev/null
+++ b/atk/atksocket.h
@@ -0,0 +1,71 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2009 Novell, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_SOCKET_H__
+#define __ATK_SOCKET_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_SOCKET               (atk_socket_get_type ())
+#define ATK_SOCKET(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_SOCKET, AtkSocket))
+#define ATK_IS_SOCKET(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_SOCKET))
+#define ATK_SOCKET_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_SOCKET, AtkSocketClass))
+#define ATK_IS_SOCKET_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_SOCKET))
+#define ATK_SOCKET_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_SOCKET, AtkSocketClass))
+
+typedef struct _AtkSocket         AtkSocket;
+typedef struct _AtkSocketClass    AtkSocketClass;
+
+struct _AtkSocket
+{
+  AtkObject parent;
+
+  /*< private >*/
+  gchar* embedded_plug_id;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_socket_get_type (void);
+
+struct _AtkSocketClass
+{
+  AtkObjectClass parent_class;
+  
+  /* to be subscribed to by atk-bridge */
+
+  /*< protected >*/
+  void (* embed) (AtkSocket *obj, const gchar* plug_id);
+};
+
+GDK_AVAILABLE_IN_ALL
+AtkObject*    atk_socket_new           (void);
+GDK_AVAILABLE_IN_ALL
+void          atk_socket_embed         (AtkSocket* obj, const gchar* plug_id);
+GDK_AVAILABLE_IN_ALL
+gboolean      atk_socket_is_occupied   (AtkSocket* obj);
+
+G_END_DECLS
+
+#endif /* __ATK_SOCKET_H__ */
diff --git a/atk/atkstate.c b/atk/atkstate.c
new file mode 100644
index 0000000000..5d5bd17520
--- /dev/null
+++ b/atk/atkstate.c
@@ -0,0 +1,143 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atk.h"
+
+#include <string.h>
+
+/**
+ * SECTION:atkstate
+ * @Short_description: An AtkState describes a single state of an object.
+ * @Title:AtkState
+ *
+ * An AtkState describes a single state of an object. The full set of states
+ * that apply to an object at a given time are contained in its #AtkStateSet.
+ * See also #atk_object_ref_state_set and #atk_object_notify_state_change.
+ */
+
+static guint last_type = ATK_STATE_LAST_DEFINED;
+
+#define NUM_POSSIBLE_STATES               (sizeof(AtkState)*8)
+
+static gchar* state_names[NUM_POSSIBLE_STATES];
+
+/**
+ * atk_state_type_register:
+ * @name: a character string describing the new state.
+ *
+ * Register a new object state.
+ *
+ * Returns: an #AtkState value for the new state.
+ **/
+AtkStateType
+atk_state_type_register (const gchar *name)
+{
+  g_return_val_if_fail (name, ATK_STATE_INVALID);
+
+  if (last_type < NUM_POSSIBLE_STATES -1)
+    {
+      state_names[++last_type] = g_strdup (name); 
+      return (last_type);
+    }
+  return ATK_STATE_INVALID; /* caller needs to check */
+}
+
+/**
+ * atk_state_type_get_name:
+ * @type: The #AtkStateType whose name is required
+ *
+ * Gets the description string describing the #AtkStateType @type.
+ *
+ * Returns: the string describing the AtkStateType
+ */
+const gchar*
+atk_state_type_get_name (AtkStateType type)
+{
+  GTypeClass *type_class;
+  GEnumValue *value;
+  const gchar *name = NULL;
+
+  type_class = g_type_class_ref (ATK_TYPE_STATE_TYPE);
+  g_return_val_if_fail (G_IS_ENUM_CLASS (type_class), NULL);
+
+  value = g_enum_get_value (G_ENUM_CLASS (type_class), type);
+
+  if (value)
+    {
+      name = value->value_nick;
+    }
+  else
+    {
+      if (type <= last_type)
+        {
+          if (type >= 0)
+            name = state_names[type];
+        }
+    }
+
+  g_type_class_unref (type_class);
+
+  return name;
+}
+
+/**
+ * atk_state_type_for_name:
+ * @name: a character string state name
+ *
+ * Gets the #AtkStateType corresponding to the description string @name.
+ *
+ * Returns: an #AtkStateType corresponding to @name 
+ */
+AtkStateType
+atk_state_type_for_name (const gchar *name)
+{
+  GTypeClass *type_class;
+  GEnumValue *value;
+  AtkStateType type = ATK_STATE_INVALID;
+
+  g_return_val_if_fail (name, ATK_STATE_INVALID);
+
+  type_class = g_type_class_ref (ATK_TYPE_STATE_TYPE);
+  g_return_val_if_fail (G_IS_ENUM_CLASS (type_class), ATK_STATE_INVALID);
+
+  value = g_enum_get_value_by_nick (G_ENUM_CLASS (type_class), name);
+
+  if (value)
+    {
+      type = value->value;
+    }
+  else
+    {
+      gint i;
+
+      for (i = ATK_STATE_LAST_DEFINED + 1; i <= last_type; i++)
+        {
+          if (state_names[i] == NULL)
+            continue; 
+          if (!strcmp(name, state_names[i])) 
+            {
+              type = i;
+              break;
+            }
+        }
+    }
+  return type;
+}
diff --git a/atk/atkstate.h b/atk/atkstate.h
new file mode 100644
index 0000000000..4b4fb24360
--- /dev/null
+++ b/atk/atkstate.h
@@ -0,0 +1,43 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_STATE_H__
+#define __ATK_STATE_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atktypes.h>
+
+G_BEGIN_DECLS
+
+typedef guint64      AtkState;
+
+GDK_AVAILABLE_IN_ALL
+AtkStateType atk_state_type_register            (const gchar *name);
+
+GDK_AVAILABLE_IN_ALL
+const gchar*          atk_state_type_get_name   (AtkStateType type);
+GDK_AVAILABLE_IN_ALL
+AtkStateType          atk_state_type_for_name   (const gchar  *name);
+
+G_END_DECLS
+
+#endif /* __ATK_STATE_H__ */
diff --git a/atk/atkstateset.c b/atk/atkstateset.c
new file mode 100644
index 0000000000..d240ee6e10
--- /dev/null
+++ b/atk/atkstateset.c
@@ -0,0 +1,384 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include "atkobject.h"
+#include "atkstateset.h"
+
+/**
+ * SECTION:atkstateset
+ * @Short_description: An AtkStateSet contains the states of an object.
+ * @Title:AtkStateSet
+ *
+ * An AtkStateSet is a read-only representation of the full set of #AtkStates
+ * that apply to an object at a given time. This set is not meant to be
+ * modified, but rather created when #atk_object_ref_state_set() is called.
+ */
+
+#define ATK_STATE(state_enum)             ((AtkState)((guint64)1 << ((state_enum)%64)))
+
+struct _AtkRealStateSet
+{
+  GObject parent;
+
+  AtkState state;
+};
+
+typedef struct _AtkRealStateSet      AtkRealStateSet;
+
+static void            atk_state_set_class_init       (AtkStateSetClass  *klass);
+
+GType
+atk_state_set_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type)
+    {
+      static const GTypeInfo typeInfo =
+      {
+        sizeof (AtkStateSetClass),
+        (GBaseInitFunc) NULL,
+        (GBaseFinalizeFunc) NULL,
+        (GClassInitFunc) atk_state_set_class_init,
+        (GClassFinalizeFunc) NULL,
+        NULL,
+        sizeof (AtkRealStateSet),
+        0,
+        (GInstanceInitFunc) NULL,
+      } ;
+      type = g_type_register_static (G_TYPE_OBJECT, "AtkStateSet", &typeInfo, 0) ;
+    }
+  return type;
+}
+
+static void
+atk_state_set_class_init (AtkStateSetClass *klass)
+{
+}
+
+/**
+ * atk_state_set_new:
+ * 
+ * Creates a new empty state set.
+ * 
+ * Returns: a new #AtkStateSet 
+ **/
+AtkStateSet*
+atk_state_set_new (void)
+{
+  return (AtkStateSet*) g_object_new (ATK_TYPE_STATE_SET, NULL);
+}
+
+/**
+ * atk_state_set_is_empty:
+ * @set: an #AtkStateType
+ *
+ * Checks whether the state set is empty, i.e. has no states set.
+ *
+ * Returns: %TRUE if @set has no states set, otherwise %FALSE
+ **/
+gboolean
+atk_state_set_is_empty (AtkStateSet   *set)
+{
+  AtkRealStateSet *real_set;
+  g_return_val_if_fail (ATK_IS_STATE_SET (set), FALSE);
+
+  real_set = (AtkRealStateSet *)set;
+
+  if (real_set->state)
+    return FALSE;
+  else
+    return TRUE;
+}
+
+/**
+ * atk_state_set_add_state:
+ * @set: an #AtkStateSet
+ * @type: an #AtkStateType
+ *
+ * Adds the state of the specified type to the state set if it is not already
+ * present.
+ *
+ * Note that because an #AtkStateSet is a read-only object, this method should
+ * be used to add a state to a newly-created set which will then be returned by
+ * #atk_object_ref_state_set. It should not be used to modify the existing state
+ * of an object. See also #atk_object_notify_state_change.
+ *
+ * Returns: %TRUE if  the state for @type is not already in @set.
+ **/
+gboolean
+atk_state_set_add_state (AtkStateSet   *set,
+                         AtkStateType  type)
+{
+  AtkRealStateSet *real_set;
+  g_return_val_if_fail (ATK_IS_STATE_SET (set), FALSE);
+
+  real_set = (AtkRealStateSet *)set;
+
+  if (real_set->state & ATK_STATE (type))
+    return FALSE;
+  else
+  {
+    real_set->state |= ATK_STATE (type);
+    return TRUE;
+  }
+}
+/**
+ * atk_state_set_add_states:
+ * @set: an #AtkStateSet
+ * @types: (array length=n_types): an array of #AtkStateType
+ * @n_types: The number of elements in the array
+ *
+ * Adds the states of the specified types to the state set.
+ *
+ * Note that because an #AtkStateSet is a read-only object, this method should
+ * be used to add states to a newly-created set which will then be returned by
+ * #atk_object_ref_state_set. It should not be used to modify the existing state
+ * of an object. See also #atk_object_notify_state_change.
+ **/
+void
+atk_state_set_add_states (AtkStateSet   *set,
+                          AtkStateType  *types,
+                          gint          n_types)
+{
+  AtkRealStateSet *real_set;
+  gint     i;
+  g_return_if_fail (ATK_IS_STATE_SET (set));
+
+  real_set = (AtkRealStateSet *)set;
+
+  for (i = 0; i < n_types; i++)
+  {
+    real_set->state |= ATK_STATE (types[i]);
+  }
+}
+
+/**
+ * atk_state_set_clear_states:
+ * @set: an #AtkStateSet
+ *
+ * Removes all states from the state set.
+ **/
+void
+atk_state_set_clear_states (AtkStateSet   *set)
+{
+  AtkRealStateSet *real_set;
+  g_return_if_fail (ATK_IS_STATE_SET (set));
+
+  real_set = (AtkRealStateSet *)set;
+
+  real_set->state = 0;
+}
+
+/**
+ * atk_state_set_contains_state:
+ * @set: an #AtkStateSet
+ * @type: an #AtkStateType
+ *
+ * Checks whether the state for the specified type is in the specified set.
+ *
+ * Returns: %TRUE if @type is the state type is in @set.
+ **/
+gboolean
+atk_state_set_contains_state (AtkStateSet   *set,
+                              AtkStateType  type)
+{
+  AtkRealStateSet *real_set;
+  g_return_val_if_fail (ATK_IS_STATE_SET (set), FALSE);
+
+  real_set = (AtkRealStateSet *)set;
+
+  if (real_set->state & ATK_STATE (type))
+    return TRUE;
+  else
+    return FALSE;
+}
+
+/**
+ * atk_state_set_contains_states:
+ * @set: an #AtkStateSet
+ * @types: (array length=n_types): an array of #AtkStateType
+ * @n_types: The number of elements in the array
+ *
+ * Checks whether the states for all the specified types are in the 
+ * specified set.
+ *
+ * Returns: %TRUE if all the states for @type are in @set.
+ **/
+gboolean
+atk_state_set_contains_states (AtkStateSet   *set,
+                               AtkStateType  *types,
+                               gint          n_types)
+{
+  AtkRealStateSet *real_set;
+  gint i;
+  g_return_val_if_fail (ATK_IS_STATE_SET (set), FALSE);
+
+  real_set = (AtkRealStateSet *)set;
+
+  for (i = 0; i < n_types; i++)
+  {
+    if (!(real_set->state & ATK_STATE (types[i])))
+      return FALSE;
+  }
+  return TRUE;
+}
+
+/**
+ * atk_state_set_remove_state:
+ * @set: an #AtkStateSet
+ * @type: an #AtkType
+ *
+ * Removes the state for the specified type from the state set.
+ *
+ * Note that because an #AtkStateSet is a read-only object, this method should
+ * be used to remove a state to a newly-created set which will then be returned
+ * by #atk_object_ref_state_set. It should not be used to modify the existing
+ * state of an object. See also #atk_object_notify_state_change.
+ *
+ * Returns: %TRUE if @type was the state type is in @set.
+ **/
+gboolean
+atk_state_set_remove_state (AtkStateSet  *set,
+                            AtkStateType type)
+{
+  AtkRealStateSet *real_set;
+  g_return_val_if_fail (ATK_IS_STATE_SET (set), FALSE);
+
+  real_set = (AtkRealStateSet *)set;
+
+  if (real_set->state & ATK_STATE (type))
+  {
+    real_set->state ^= ATK_STATE (type);
+    return TRUE;
+  }
+  else
+    return FALSE;
+}
+
+/**
+ * atk_state_set_and_sets:
+ * @set: an #AtkStateSet
+ * @compare_set: another #AtkStateSet
+ *
+ * Constructs the intersection of the two sets, returning %NULL if the
+ * intersection is empty.
+ *
+ * Returns: (transfer full): a new #AtkStateSet which is the intersection of
+ * the two sets.
+ **/
+AtkStateSet*
+atk_state_set_and_sets (AtkStateSet  *set,
+                        AtkStateSet  *compare_set)
+{
+  AtkRealStateSet *real_set, *real_compare_set;
+  AtkStateSet *return_set = NULL;
+  AtkState state;
+
+  g_return_val_if_fail (ATK_IS_STATE_SET (set), NULL);
+  g_return_val_if_fail (ATK_IS_STATE_SET (compare_set), NULL);
+
+  real_set = (AtkRealStateSet *)set;
+  real_compare_set = (AtkRealStateSet *)compare_set;
+
+  state = real_set->state & real_compare_set->state;
+  if (state)
+  {
+    return_set = atk_state_set_new();
+    ((AtkRealStateSet *) return_set)->state = state;
+  }
+  return return_set;
+}
+
+/**
+ * atk_state_set_or_sets:
+ * @set: an #AtkStateSet
+ * @compare_set: another #AtkStateSet
+ *
+ * Constructs the union of the two sets.
+ *
+ * Returns: (nullable) (transfer full): a new #AtkStateSet which is
+ * the union of the two sets, returning %NULL is empty.
+ **/
+AtkStateSet*
+atk_state_set_or_sets (AtkStateSet  *set,
+                       AtkStateSet  *compare_set)
+{
+  AtkRealStateSet *real_set, *real_compare_set;
+  AtkStateSet *return_set = NULL;
+  AtkState state;
+
+  g_return_val_if_fail (ATK_IS_STATE_SET (set), NULL);
+  g_return_val_if_fail (ATK_IS_STATE_SET (compare_set), NULL);
+
+  real_set = (AtkRealStateSet *)set;
+  real_compare_set = (AtkRealStateSet *)compare_set;
+
+  state = real_set->state | real_compare_set->state;
+
+  if (state)
+  {
+    return_set = atk_state_set_new();
+    ((AtkRealStateSet *) return_set)->state = state;
+  }
+
+  return return_set;
+}
+
+/**
+ * atk_state_set_xor_sets:
+ * @set: an #AtkStateSet
+ * @compare_set: another #AtkStateSet
+ *
+ * Constructs the exclusive-or of the two sets, returning %NULL is empty.
+ * The set returned by this operation contains the states in exactly
+ * one of the two sets.
+ *
+ * Returns: (transfer full): a new #AtkStateSet which contains the states
+ * which are in exactly one of the two sets.
+ **/
+AtkStateSet*
+atk_state_set_xor_sets (AtkStateSet  *set,
+                        AtkStateSet  *compare_set)
+{
+  AtkRealStateSet *real_set, *real_compare_set;
+  AtkStateSet *return_set = NULL;
+  AtkState state, state1, state2;
+
+  g_return_val_if_fail (ATK_IS_STATE_SET (set), NULL);
+  g_return_val_if_fail (ATK_IS_STATE_SET (compare_set), NULL);
+
+  real_set = (AtkRealStateSet *)set;
+  real_compare_set = (AtkRealStateSet *)compare_set;
+
+  state1 = real_set->state & (~real_compare_set->state);
+  state2 = (~real_set->state) & real_compare_set->state;
+  state = state1 | state2;
+
+  if (state)
+  {
+    return_set = atk_state_set_new();
+    ((AtkRealStateSet *) return_set)->state = state;
+  }
+  return return_set;
+}
diff --git a/atk/atkstateset.h b/atk/atkstateset.h
new file mode 100644
index 0000000000..1fb1a0c9f2
--- /dev/null
+++ b/atk/atkstateset.h
@@ -0,0 +1,92 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_STATE_SET_H__
+#define __ATK_STATE_SET_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <glib-object.h>
+#include <atk/atkobject.h>
+#include <atk/atkstate.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_STATE_SET                        (atk_state_set_get_type ())
+#define ATK_STATE_SET(obj)                        (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_STATE_SET, 
AtkStateSet))
+#define ATK_STATE_SET_CLASS(klass)                (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_STATE_SET, 
AtkStateSetClass))
+#define ATK_IS_STATE_SET(obj)                     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_STATE_SET))
+#define ATK_IS_STATE_SET_CLASS(klass)             (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_STATE_SET))
+#define ATK_STATE_SET_GET_CLASS(obj)              (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_STATE_SET, 
AtkStateSetClass))
+
+typedef struct _AtkStateSetClass       AtkStateSetClass;
+
+
+struct _AtkStateSet
+{
+  GObject parent;
+
+};
+
+struct _AtkStateSetClass
+{
+  GObjectClass parent;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_state_set_get_type (void);
+
+GDK_AVAILABLE_IN_ALL
+AtkStateSet*    atk_state_set_new               (void);
+GDK_AVAILABLE_IN_ALL
+gboolean        atk_state_set_is_empty          (AtkStateSet  *set);
+GDK_AVAILABLE_IN_ALL
+gboolean        atk_state_set_add_state         (AtkStateSet  *set,
+                                                 AtkStateType type);
+GDK_AVAILABLE_IN_ALL
+void            atk_state_set_add_states        (AtkStateSet  *set,
+                                                 AtkStateType *types,
+                                                 gint         n_types);
+GDK_AVAILABLE_IN_ALL
+void            atk_state_set_clear_states      (AtkStateSet  *set);
+GDK_AVAILABLE_IN_ALL
+gboolean        atk_state_set_contains_state    (AtkStateSet  *set,
+                                                 AtkStateType type);
+GDK_AVAILABLE_IN_ALL
+gboolean        atk_state_set_contains_states   (AtkStateSet  *set,
+                                                 AtkStateType *types,
+                                                 gint         n_types);
+GDK_AVAILABLE_IN_ALL
+gboolean        atk_state_set_remove_state      (AtkStateSet  *set,
+                                                 AtkStateType type);
+GDK_AVAILABLE_IN_ALL
+AtkStateSet*    atk_state_set_and_sets          (AtkStateSet  *set,
+                                                 AtkStateSet  *compare_set);
+GDK_AVAILABLE_IN_ALL
+AtkStateSet*    atk_state_set_or_sets           (AtkStateSet  *set,
+                                                 AtkStateSet  *compare_set);
+GDK_AVAILABLE_IN_ALL
+AtkStateSet*    atk_state_set_xor_sets          (AtkStateSet  *set,
+                                                 AtkStateSet  *compare_set);
+
+G_END_DECLS
+
+#endif /* __ATK_STATE_SET_H__ */
diff --git a/atk/atkstreamablecontent.c b/atk/atkstreamablecontent.c
new file mode 100644
index 0000000000..571ca2b6a1
--- /dev/null
+++ b/atk/atkstreamablecontent.c
@@ -0,0 +1,181 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkstreamablecontent.h"
+
+/**
+ * SECTION:atkstreamablecontent
+ * @Short_description: The ATK interface which provides access to
+ *  streamable content.
+ * @Title:AtkStreamableContent
+ *
+ * An interface whereby an object allows its backing content to be
+ * streamed to clients.  Typical implementors would be images or
+ * icons, HTML content, or multimedia display/rendering widgets.
+ *
+ * Negotiation of content type is allowed. Clients may examine the
+ * backing data and transform, convert, or parse the content in order
+ * to present it in an alternate form to end-users.
+ *
+ * The AtkStreamableContent interface is particularly useful for
+ * saving, printing, or post-processing entire documents, or for
+ * persisting alternate views of a document. If document content
+ * itself is being serialized, stored, or converted, then use of the
+ * AtkStreamableContent interface can help address performance
+ * issues. Unlike most ATK interfaces, this interface is not strongly
+ * tied to the current user-agent view of the a particular document,
+ * but may in some cases give access to the underlying model data.
+ */
+
+GType
+atk_streamable_content_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) {
+    GTypeInfo tinfo =
+    {
+      sizeof (AtkStreamableContentIface),
+      (GBaseInitFunc) NULL,
+      (GBaseFinalizeFunc) NULL,
+
+    };
+
+    type = g_type_register_static (G_TYPE_INTERFACE, "AtkStreamableContent", &tinfo, 0);
+  }
+
+  return type;
+}
+
+/**
+ * atk_streamable_content_get_n_mime_types:
+ * @streamable: a GObject instance that implements AtkStreamableContentIface
+ *
+ * Gets the number of mime types supported by this object.
+ *
+ * Returns: a gint which is the number of mime types supported by the object.
+ **/
+gint
+atk_streamable_content_get_n_mime_types (AtkStreamableContent *streamable)
+{
+  AtkStreamableContentIface *iface;
+
+  g_return_val_if_fail (ATK_IS_STREAMABLE_CONTENT (streamable), 0);
+
+  iface = ATK_STREAMABLE_CONTENT_GET_IFACE (streamable);
+
+  if (iface->get_n_mime_types)
+    return (iface->get_n_mime_types) (streamable);
+  else
+    return 0;
+}
+
+/**
+ * atk_streamable_content_get_mime_type:
+ * @streamable: a GObject instance that implements AtkStreamableContent
+ * @i: a gint representing the position of the mime type starting from 0
+ *
+ * Gets the character string of the specified mime type. The first mime
+ * type is at position 0, the second at position 1, and so on.
+ *
+ * Returns: a gchar* representing the specified mime type; the caller
+ * should not free the character string.
+ **/
+const gchar*
+atk_streamable_content_get_mime_type (AtkStreamableContent *streamable,
+                                      gint                 i)
+{
+  AtkStreamableContentIface *iface;
+
+  g_return_val_if_fail (i >= 0, NULL);
+  g_return_val_if_fail (ATK_IS_STREAMABLE_CONTENT (streamable), NULL);
+
+  iface = ATK_STREAMABLE_CONTENT_GET_IFACE (streamable);
+
+  if (iface->get_mime_type)
+    return (iface->get_mime_type) (streamable, i);
+  else
+    return NULL;
+}
+
+/**
+ * atk_streamable_content_get_stream:
+ * @streamable: a GObject instance that implements AtkStreamableContentIface
+ * @mime_type: a gchar* representing the mime type
+ *
+ * Gets the content in the specified mime type.
+ *
+ * Returns: (transfer full): A #GIOChannel which contains the content in the
+ * specified mime type.
+ **/
+GIOChannel*
+atk_streamable_content_get_stream (AtkStreamableContent *streamable,
+                                   const gchar          *mime_type)
+{
+  AtkStreamableContentIface *iface;
+
+  g_return_val_if_fail (mime_type != NULL, NULL);
+  g_return_val_if_fail (ATK_IS_STREAMABLE_CONTENT (streamable), NULL);
+
+  iface = ATK_STREAMABLE_CONTENT_GET_IFACE (streamable);
+
+  if (iface->get_stream)
+    return (iface->get_stream) (streamable, mime_type);
+  else
+    return NULL;
+}
+
+/**
+ * atk_streamable_content_get_uri:
+ * @streamable: a GObject instance that implements AtkStreamableContentIface
+ * @mime_type: a gchar* representing the mime type, or NULL to request a URI 
+ * for the default mime type.
+ *
+ * Get a string representing a URI in IETF standard format
+ * (see http://www.ietf.org/rfc/rfc2396.txt) from which the object's content
+ * may be streamed in the specified mime-type, if one is available.
+ * If mime_type is NULL, the URI for the default (and possibly only) mime-type is
+ * returned. 
+ *
+ * Note that it is possible for get_uri to return NULL but for
+ * get_stream to work nonetheless, since not all GIOChannels connect to URIs.
+ *
+ * Returns: (nullable): Returns a string representing a URI, or %NULL
+ * if no corresponding URI can be constructed.
+ *
+ * Since: 1.12
+ **/
+const gchar*
+atk_streamable_content_get_uri (AtkStreamableContent *streamable,
+                               const gchar          *mime_type)
+{
+  AtkStreamableContentIface *iface;
+
+  g_return_val_if_fail (mime_type != NULL, NULL);
+  g_return_val_if_fail (ATK_IS_STREAMABLE_CONTENT (streamable), NULL);
+
+  iface = ATK_STREAMABLE_CONTENT_GET_IFACE (streamable);
+
+  if (iface->get_uri)
+    return (iface->get_uri) (streamable, mime_type);
+  else
+    return NULL;
+}
diff --git a/atk/atkstreamablecontent.h b/atk/atkstreamablecontent.h
new file mode 100644
index 0000000000..8933a9712b
--- /dev/null
+++ b/atk/atkstreamablecontent.h
@@ -0,0 +1,110 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_STREAMABLE_CONTENT_H__
+#define __ATK_STREAMABLE_CONTENT_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_STREAMABLE_CONTENT           (atk_streamable_content_get_type ())
+#define ATK_IS_STREAMABLE_CONTENT(obj)        G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_STREAMABLE_CONTENT)
+#define ATK_STREAMABLE_CONTENT(obj)           G_TYPE_CHECK_INSTANCE_CAST ((obj), 
ATK_TYPE_STREAMABLE_CONTENT, AtkStreamableContent)
+#define ATK_STREAMABLE_CONTENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), 
ATK_TYPE_STREAMABLE_CONTENT, AtkStreamableContentIface))
+
+#ifndef _TYPEDEF_ATK_STREAMABLE_CONTENT
+#define _TYPEDEF_ATK_STREAMABLE_CONTENT
+typedef struct _AtkStreamableContent AtkStreamableContent;
+#endif
+typedef struct _AtkStreamableContentIface AtkStreamableContentIface;
+
+struct _AtkStreamableContentIface
+{
+  GTypeInterface parent;
+
+  /*
+   * Get the number of mime types supported by this object
+   */
+  gint                      (* get_n_mime_types)  (AtkStreamableContent     *streamable);
+  /*
+   * Gets the specified mime type supported by this object.
+   * The mime types are 0-based so the first mime type is 
+   * at index 0, the second at index 1 and so on.  The mime-type
+   * at index 0 should be considered the "default" data type for the stream.
+   *
+   * This assumes that the strings for the mime types are stored in the
+   * AtkStreamableContent. Alternatively the const could be removed
+   * and the caller would be responsible for calling g_free() on the
+   * returned value.
+   */
+  const gchar*              (* get_mime_type)     (AtkStreamableContent     *streamable,
+                                                   gint                     i);
+  /*
+   * One possible implementation for this method is that it constructs the
+   * content appropriate for the mime type and then creates a temporary
+   * file containing the content, opens the file and then calls
+   * g_io_channel_unix_new_fd().
+   */
+  GIOChannel*               (* get_stream)        (AtkStreamableContent     *streamable,
+                                                   const gchar              *mime_type);
+
+/*
+ * Returns a string representing a URI in IETF standard format
+ * (see http://www.ietf.org/rfc/rfc2396.txt) from which the object's content
+ * may be streamed in the specified mime-type.
+ * If mime_type is NULL, the URI for the default (and possibly only) mime-type is
+ * returned.
+ *
+ * returns NULL if the mime-type is not supported, or if no URI can be 
+ * constructed.  Note that it is possible for get_uri to return NULL but for
+ * get_stream to work nonetheless, since not all GIOChannels connect to URIs.
+ */
+    const  gchar*           (* get_uri)           (AtkStreamableContent     *streamable,
+                                                   const gchar              *mime_type);
+
+
+  AtkFunction               pad1;
+  AtkFunction               pad2;
+  AtkFunction               pad3;
+};
+GDK_AVAILABLE_IN_ALL
+GType                  atk_streamable_content_get_type (void);
+
+GDK_AVAILABLE_IN_ALL
+gint                   atk_streamable_content_get_n_mime_types (AtkStreamableContent     *streamable);
+
+GDK_AVAILABLE_IN_ALL
+const gchar*           atk_streamable_content_get_mime_type    (AtkStreamableContent     *streamable,
+                                                                gint                     i);
+GDK_AVAILABLE_IN_ALL
+GIOChannel*             atk_streamable_content_get_stream       (AtkStreamableContent     *streamable,
+                                                                 const gchar              *mime_type);
+
+GDK_AVAILABLE_IN_ALL
+const gchar*           atk_streamable_content_get_uri          (AtkStreamableContent     *streamable,
+                                                                const gchar              *mime_type);
+
+G_END_DECLS
+
+#endif /* __ATK_STREAMABLE_CONTENT_H__ */
diff --git a/atk/atktable.c b/atk/atktable.c
new file mode 100644
index 0000000000..4e8da94cc4
--- /dev/null
+++ b/atk/atktable.c
@@ -0,0 +1,892 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atktable.h"
+#include "atkmarshal.h"
+
+/**
+ * SECTION:atktable
+ * @Short_description: The ATK interface implemented for UI components
+ *  which contain tabular or row/column information.
+ * @Title:AtkTable
+ *
+ * #AtkTable should be implemented by components which present
+ * elements ordered via rows and columns.  It may also be used to
+ * present tree-structured information if the nodes of the trees can
+ * be said to contain multiple "columns".  Individual elements of an
+ * #AtkTable are typically referred to as "cells". Those cells should
+ * implement the interface #AtkTableCell, but #Atk doesn't require
+ * them to be direct children of the current #AtkTable. They can be
+ * grand-children, grand-grand-children etc. #AtkTable provides the
+ * API needed to get a individual cell based on the row and column
+ * numbers.
+ *
+ * Children of #AtkTable are frequently "lightweight" objects, that
+ * is, they may not have backing widgets in the host UI toolkit.  They
+ * are therefore often transient.
+ *
+ * Since tables are often very complex, #AtkTable includes provision
+ * for offering simplified summary information, as well as row and
+ * column headers and captions.  Headers and captions are #AtkObjects
+ * which may implement other interfaces (#AtkText, #AtkImage, etc.) as
+ * appropriate.  #AtkTable summaries may themselves be (simplified)
+ * #AtkTables, etc.
+ *
+ * Note for implementors: in the past, #AtkTable required that all the
+ * cells should be direct children of #AtkTable, and provided some
+ * index based methods to request the cells. The practice showed that
+ * that forcing made #AtkTable implementation complex, and hard to
+ * expose other kind of children, like rows or captions. Right now,
+ * index-based methods are deprecated.
+ */
+
+enum {
+  ROW_INSERTED,
+  ROW_DELETED,
+  COLUMN_INSERTED,
+  COLUMN_DELETED,
+  ROW_REORDERED,
+  COLUMN_REORDERED,
+  MODEL_CHANGED,
+  LAST_SIGNAL
+};
+
+static void  atk_table_base_init (gpointer *g_class);
+
+static guint atk_table_signals[LAST_SIGNAL] = { 0 };
+
+GType
+atk_table_get_type (void)
+{
+  static GType type = 0;
+  
+  if (!type) {
+    GTypeInfo tinfo =
+    {
+      sizeof (AtkTableIface),
+      (GBaseInitFunc) atk_table_base_init,
+      (GBaseFinalizeFunc) NULL,
+      
+    };
+    
+    type = g_type_register_static (G_TYPE_INTERFACE, "AtkTable", &tinfo, 0);
+  }
+  
+  return type;
+}
+
+
+static void
+atk_table_base_init (gpointer *g_class)
+{
+  static gboolean initialized = FALSE;
+  
+  if (!initialized)
+    {
+      /**
+       * AtkTable::row-inserted:
+       * @atktable: the object which received the signal.
+       * @arg1: The index of the first row inserted.
+       * @arg2: The number of rows inserted.
+       *
+       * The "row-inserted" signal is emitted by an object which
+       * implements the AtkTable interface when a row is inserted.
+       */
+      atk_table_signals[ROW_INSERTED] =
+       g_signal_new ("row_inserted",
+                     ATK_TYPE_TABLE,
+                     G_SIGNAL_RUN_LAST,
+                     G_STRUCT_OFFSET (AtkTableIface, row_inserted),
+                     (GSignalAccumulator) NULL, NULL,
+                     atk_marshal_VOID__INT_INT,
+                     G_TYPE_NONE,
+                     2, G_TYPE_INT, G_TYPE_INT);
+      /**
+       * AtkTable::column-inserted:
+       * @atktable: the object which received the signal.
+       * @arg1: The index of the column inserted.
+       * @arg2: The number of colums inserted.
+       *
+       * The "column-inserted" signal is emitted by an object which
+       * implements the AtkTable interface when a column is inserted.
+       */
+      atk_table_signals[COLUMN_INSERTED] =
+       g_signal_new ("column_inserted",
+                     ATK_TYPE_TABLE,
+                     G_SIGNAL_RUN_LAST,
+                     G_STRUCT_OFFSET (AtkTableIface, column_inserted),
+                     (GSignalAccumulator) NULL, NULL,
+                     atk_marshal_VOID__INT_INT,
+                     G_TYPE_NONE,
+                     2, G_TYPE_INT, G_TYPE_INT);
+      /**
+       * AtkTable::row-deleted:
+       * @atktable: the object which received the signal.
+       * @arg1: The index of the first row deleted.
+       * @arg2: The number of rows deleted.
+       *
+       * The "row-deleted" signal is emitted by an object which
+       * implements the AtkTable interface when a row is deleted.
+       */
+      atk_table_signals[ROW_DELETED] =
+       g_signal_new ("row_deleted",
+                     ATK_TYPE_TABLE,
+                     G_SIGNAL_RUN_LAST,
+                     G_STRUCT_OFFSET (AtkTableIface, row_deleted),
+                     (GSignalAccumulator) NULL, NULL,
+                     atk_marshal_VOID__INT_INT,
+                     G_TYPE_NONE,
+                     2, G_TYPE_INT, G_TYPE_INT);
+      /**
+       * AtkTable::column-deleted:
+       * @atktable: the object which received the signal.
+       * @arg1: The index of the first column deleted.
+       * @arg2: The number of columns deleted.
+       *
+       * The "column-deleted" signal is emitted by an object which
+       * implements the AtkTable interface when a column is deleted.
+       */
+      atk_table_signals[COLUMN_DELETED] =
+       g_signal_new ("column_deleted",
+                     ATK_TYPE_TABLE,
+                     G_SIGNAL_RUN_LAST,
+                     G_STRUCT_OFFSET (AtkTableIface, column_deleted),
+                     (GSignalAccumulator) NULL, NULL,
+                     atk_marshal_VOID__INT_INT,
+                     G_TYPE_NONE,
+                     2, G_TYPE_INT, G_TYPE_INT);
+      /**
+       * AtkTable::row-reordered:
+       * @atktable: the object which received the signal.
+       *
+       * The "row-reordered" signal is emitted by an object which
+       * implements the AtkTable interface when the rows are
+       * reordered.
+       */
+      atk_table_signals[ROW_REORDERED] =
+       g_signal_new ("row_reordered",
+                     ATK_TYPE_TABLE,
+                     G_SIGNAL_RUN_LAST,
+                     G_STRUCT_OFFSET (AtkTableIface, row_reordered),
+                     (GSignalAccumulator) NULL, NULL,
+                     g_cclosure_marshal_VOID__VOID,
+                     G_TYPE_NONE,
+                     0);
+      /**
+       * AtkTable::column-reordered:
+       * @atktable: the object which received the signal.
+       *
+       * The "column-reordered" signal is emitted by an object which
+       * implements the AtkTable interface when the columns are
+       * reordered.
+       */
+      atk_table_signals[COLUMN_REORDERED] =
+       g_signal_new ("column_reordered",
+                     ATK_TYPE_TABLE,
+                     G_SIGNAL_RUN_LAST,
+                     G_STRUCT_OFFSET (AtkTableIface, column_reordered),
+                     (GSignalAccumulator) NULL, NULL,
+                     g_cclosure_marshal_VOID__VOID,
+                     G_TYPE_NONE,
+                     0);
+
+      /**
+       * AtkTable::model-changed:
+       * @atktable: the object which received the signal.
+       *
+       * The "model-changed" signal is emitted by an object which
+       * implements the AtkTable interface when the model displayed by
+       * the table changes.
+       */
+      atk_table_signals[MODEL_CHANGED] =
+        g_signal_new ("model_changed",
+                      ATK_TYPE_TABLE,
+                      G_SIGNAL_RUN_LAST,
+                      G_STRUCT_OFFSET (AtkTableIface, model_changed),
+                      (GSignalAccumulator) NULL, NULL,
+                      g_cclosure_marshal_VOID__VOID,
+                      G_TYPE_NONE, 0);
+
+      initialized = TRUE;
+    }
+}
+
+/**
+ * atk_table_ref_at:
+ * @table: a GObject instance that implements AtkTableIface
+ * @row: a #gint representing a row in @table
+ * @column: a #gint representing a column in @table
+ *
+ * Get a reference to the table cell at @row, @column. This cell
+ * should implement the interface #AtkTableCell
+ *
+ * Returns: (transfer full): an #AtkObject representing the referred
+ * to accessible
+ **/
+AtkObject*
+atk_table_ref_at (AtkTable *table,
+                  gint     row,
+                  gint     column)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
+  g_return_val_if_fail (row >= 0, NULL);
+  g_return_val_if_fail (column >= 0, NULL);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->ref_at)
+    return (iface->ref_at) (table, row, column);
+  else
+    return NULL;
+}
+
+/**
+ * atk_table_get_caption:
+ * @table: a GObject instance that implements AtkTableInterface
+ *
+ * Gets the caption for the @table.
+ *
+ * Returns: (nullable) (transfer none): a AtkObject* representing the
+ * table caption, or %NULL if value does not implement this interface.
+ **/
+AtkObject*
+atk_table_get_caption (AtkTable *table)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->get_caption)
+    return (iface->get_caption) (table);
+  else
+    return NULL;
+}
+
+/**
+ * atk_table_get_n_columns:
+ * @table: a GObject instance that implements AtkTableIface
+ *
+ * Gets the number of columns in the table.
+ *
+ * Returns: a gint representing the number of columns, or 0
+ * if value does not implement this interface.
+ **/
+gint
+atk_table_get_n_columns (AtkTable *table)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), 0);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->get_n_columns)
+    return (iface->get_n_columns) (table);
+  else
+    return 0;
+}
+
+/**
+ * atk_table_get_column_description:
+ * @table: a GObject instance that implements AtkTableIface
+ * @column: a #gint representing a column in @table
+ *
+ * Gets the description text of the specified @column in the table
+ *
+ * Returns: a gchar* representing the column description, or %NULL
+ * if value does not implement this interface.
+ **/
+const gchar*
+atk_table_get_column_description (AtkTable *table,
+                                  gint     column)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->get_column_description)
+    return (iface->get_column_description) (table, column);
+  else
+    return NULL;
+}
+
+/**
+ * atk_table_get_column_extent_at:
+ * @table: a GObject instance that implements AtkTableIface
+ * @row: a #gint representing a row in @table
+ * @column: a #gint representing a column in @table
+ *
+ * Gets the number of columns occupied by the accessible object
+ * at the specified @row and @column in the @table.
+ *
+ * Returns: a gint representing the column extent at specified position, or 0
+ * if value does not implement this interface.
+ **/
+gint
+atk_table_get_column_extent_at (AtkTable *table,
+                                gint     row,
+                                gint     column)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), 0);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->get_column_extent_at)
+    return (iface->get_column_extent_at) (table, row, column);
+  else
+    return 0;
+}
+
+/**
+ * atk_table_get_column_header:
+ * @table: a GObject instance that implements AtkTableIface
+ * @column: a #gint representing a column in the table
+ *
+ * Gets the column header of a specified column in an accessible table.
+ *
+ * Returns: (nullable) (transfer none): a AtkObject* representing the
+ * specified column header, or %NULL if value does not implement this
+ * interface.
+ **/
+AtkObject*
+atk_table_get_column_header (AtkTable *table, gint column)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->get_column_header)
+    return (iface->get_column_header) (table, column);
+  else
+    return NULL;
+}
+
+/**
+ * atk_table_get_n_rows:
+ * @table: a GObject instance that implements AtkTableIface
+ *
+ * Gets the number of rows in the table.
+ *
+ * Returns: a gint representing the number of rows, or 0
+ * if value does not implement this interface.
+ **/
+gint
+atk_table_get_n_rows (AtkTable *table)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), 0);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->get_n_rows)
+    return (iface->get_n_rows) (table);
+  else
+    return 0;
+}
+
+/**
+ * atk_table_get_row_description:
+ * @table: a GObject instance that implements AtkTableIface
+ * @row: a #gint representing a row in @table
+ *
+ * Gets the description text of the specified row in the table
+ *
+ * Returns: (nullable): a gchar* representing the row description, or
+ * %NULL if value does not implement this interface.
+ **/
+const gchar*
+atk_table_get_row_description (AtkTable *table,
+                               gint      row)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->get_row_description)
+    return (iface->get_row_description) (table, row);
+  else
+    return NULL;
+}
+
+/**
+ * atk_table_get_row_extent_at:
+ * @table: a GObject instance that implements AtkTableIface
+ * @row: a #gint representing a row in @table
+ * @column: a #gint representing a column in @table
+ *
+ * Gets the number of rows occupied by the accessible object
+ * at a specified @row and @column in the @table.
+ *
+ * Returns: a gint representing the row extent at specified position, or 0
+ * if value does not implement this interface.
+ **/
+gint
+atk_table_get_row_extent_at (AtkTable *table,
+                             gint     row,
+                             gint     column)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), 0);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->get_row_extent_at)
+    return (iface->get_row_extent_at) (table, row, column);
+  else
+    return 0;
+}
+
+/**
+ * atk_table_get_row_header:
+ * @table: a GObject instance that implements AtkTableIface
+ * @row: a #gint representing a row in the table
+ *
+ * Gets the row header of a specified row in an accessible table.
+ *
+ * Returns: (nullable) (transfer none): a AtkObject* representing the
+ * specified row header, or %NULL if value does not implement this
+ * interface.
+ **/
+AtkObject*
+atk_table_get_row_header (AtkTable *table, gint row)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->get_row_header)
+    return (iface->get_row_header) (table, row);
+  else
+    return NULL;
+}
+
+/**
+ * atk_table_get_summary:
+ * @table: a GObject instance that implements AtkTableIface
+ *
+ * Gets the summary description of the table.
+ *
+ * Returns: (transfer full): a AtkObject* representing a summary description
+ * of the table, or zero if value does not implement this interface.
+ **/
+AtkObject*
+atk_table_get_summary (AtkTable *table)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->get_summary)
+    return (iface->get_summary) (table);
+  else
+    return NULL;
+}
+
+/**
+ * atk_table_get_selected_rows:
+ * @table: a GObject instance that implements AtkTableIface
+ * @selected: a #gint** that is to contain the selected row numbers
+ *
+ * Gets the selected rows of the table by initializing **selected with 
+ * the selected row numbers. This array should be freed by the caller.
+ *
+ * Returns: a gint representing the number of selected rows,
+ * or zero if value does not implement this interface.
+ **/
+gint
+atk_table_get_selected_rows (AtkTable *table, gint **selected)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), 0);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->get_selected_rows)
+    return (iface->get_selected_rows) (table, selected);
+  else
+    return 0;
+}
+
+/**
+ * atk_table_get_selected_columns:
+ * @table: a GObject instance that implements AtkTableIface
+ * @selected: a #gint** that is to contain the selected columns numbers
+ *
+ * Gets the selected columns of the table by initializing **selected with 
+ * the selected column numbers. This array should be freed by the caller.
+ *
+ * Returns: a gint representing the number of selected columns,
+ * or %0 if value does not implement this interface.
+ **/
+gint 
+atk_table_get_selected_columns (AtkTable *table, gint **selected)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), 0);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->get_selected_columns)
+    return (iface->get_selected_columns) (table, selected);
+  else
+    return 0;
+}
+
+/**
+ * atk_table_is_column_selected:
+ * @table: a GObject instance that implements AtkTableIface
+ * @column: a #gint representing a column in @table
+ *
+ * Gets a boolean value indicating whether the specified @column
+ * is selected
+ *
+ * Returns: a gboolean representing if the column is selected, or 0
+ * if value does not implement this interface.
+ **/
+gboolean
+atk_table_is_column_selected (AtkTable *table,
+                              gint     column)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->is_column_selected)
+    return (iface->is_column_selected) (table, column);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_table_is_row_selected:
+ * @table: a GObject instance that implements AtkTableIface
+ * @row: a #gint representing a row in @table
+ *
+ * Gets a boolean value indicating whether the specified @row
+ * is selected
+ *
+ * Returns: a gboolean representing if the row is selected, or 0
+ * if value does not implement this interface.
+ **/
+gboolean
+atk_table_is_row_selected (AtkTable *table,
+                           gint     row)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->is_row_selected)
+    return (iface->is_row_selected) (table, row);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_table_is_selected:
+ * @table: a GObject instance that implements AtkTableIface
+ * @row: a #gint representing a row in @table
+ * @column: a #gint representing a column in @table
+ *
+ * Gets a boolean value indicating whether the accessible object
+ * at the specified @row and @column is selected
+ *
+ * Returns: a gboolean representing if the cell is selected, or 0
+ * if value does not implement this interface.
+ **/
+gboolean
+atk_table_is_selected (AtkTable *table,
+                       gint     row,
+                       gint     column)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->is_selected)
+    return (iface->is_selected) (table, row, column);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_table_add_row_selection:
+ * @table: a GObject instance that implements AtkTableIface
+ * @row: a #gint representing a row in @table
+ *
+ * Adds the specified @row to the selection. 
+ *
+ * Returns: a gboolean representing if row was successfully added to selection,
+ * or 0 if value does not implement this interface.
+ **/
+gboolean
+atk_table_add_row_selection (AtkTable *table,
+                                        gint     row)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->add_row_selection)
+    return (iface->add_row_selection) (table, row);
+  else
+    return FALSE;
+}
+/**
+ * atk_table_remove_row_selection:
+ * @table: a GObject instance that implements AtkTableIface
+ * @row: a #gint representing a row in @table
+ *
+ * Removes the specified @row from the selection. 
+ *
+ * Returns: a gboolean representing if the row was successfully removed from
+ * the selection, or 0 if value does not implement this interface.
+ **/
+gboolean
+atk_table_remove_row_selection (AtkTable *table,
+                                           gint     row)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->remove_row_selection)
+    return (iface->remove_row_selection) (table, row);
+  else
+    return FALSE;
+}
+/**
+ * atk_table_add_column_selection:
+ * @table: a GObject instance that implements AtkTableIface
+ * @column: a #gint representing a column in @table
+ *
+ * Adds the specified @column to the selection. 
+ *
+ * Returns: a gboolean representing if the column was successfully added to 
+ * the selection, or 0 if value does not implement this interface.
+ **/
+gboolean
+atk_table_add_column_selection (AtkTable *table,
+                                           gint     column)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->add_column_selection)
+    return (iface->add_column_selection) (table, column);
+  else
+    return FALSE;
+}
+/**
+ * atk_table_remove_column_selection:
+ * @table: a GObject instance that implements AtkTableIface
+ * @column: a #gint representing a column in @table
+ *
+ * Adds the specified @column to the selection. 
+ *
+ * Returns: a gboolean representing if the column was successfully removed from
+ * the selection, or 0 if value does not implement this interface.
+ **/
+gboolean
+atk_table_remove_column_selection (AtkTable *table,
+                                                  gint     column)
+{
+  AtkTableIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->remove_column_selection)
+    return (iface->remove_column_selection) (table, column);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_table_set_caption:
+ * @table: a GObject instance that implements AtkTableIface
+ * @caption: a #AtkObject representing the caption to set for @table
+ *
+ * Sets the caption for the table.
+ **/
+void
+atk_table_set_caption (AtkTable       *table,
+                       AtkObject      *caption)
+{
+  AtkTableIface *iface;
+
+  g_return_if_fail (ATK_IS_TABLE (table));
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->set_caption)
+    (iface->set_caption) (table, caption);
+}
+
+/**
+ * atk_table_set_column_description:
+ * @table: a GObject instance that implements AtkTableIface
+ * @column: a #gint representing a column in @table
+ * @description: a #gchar representing the description text
+ * to set for the specified @column of the @table
+ *
+ * Sets the description text for the specified @column of the @table.
+ **/
+void
+atk_table_set_column_description (AtkTable       *table,
+                                  gint           column,
+                                  const gchar    *description)
+{
+  AtkTableIface *iface;
+
+  g_return_if_fail (ATK_IS_TABLE (table));
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->set_column_description)
+    (iface->set_column_description) (table, column, description);
+}
+
+/**
+ * atk_table_set_column_header:
+ * @table: a GObject instance that implements AtkTableIface
+ * @column: a #gint representing a column in @table
+ * @header: an #AtkTable
+ *
+ * Sets the specified column header to @header.
+ **/
+void
+atk_table_set_column_header (AtkTable  *table,
+                             gint      column,
+                             AtkObject *header)
+{
+  AtkTableIface *iface;
+
+  g_return_if_fail (ATK_IS_TABLE (table));
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->set_column_header)
+    (iface->set_column_header) (table, column, header);
+}
+
+/**
+ * atk_table_set_row_description:
+ * @table: a GObject instance that implements AtkTableIface
+ * @row: a #gint representing a row in @table
+ * @description: a #gchar representing the description text
+ * to set for the specified @row of @table
+ *
+ * Sets the description text for the specified @row of @table.
+ **/
+void
+atk_table_set_row_description (AtkTable       *table,
+                               gint           row,
+                               const gchar    *description)
+{
+  AtkTableIface *iface;
+
+  g_return_if_fail (ATK_IS_TABLE (table));
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->set_row_description)
+    (iface->set_row_description) (table, row, description);
+}
+
+/**
+ * atk_table_set_row_header:
+ * @table: a GObject instance that implements AtkTableIface
+ * @row: a #gint representing a row in @table
+ * @header: an #AtkTable 
+ *
+ * Sets the specified row header to @header.
+ **/
+void
+atk_table_set_row_header (AtkTable  *table,
+                          gint      row,
+                          AtkObject *header)
+{
+  AtkTableIface *iface;
+
+  g_return_if_fail (ATK_IS_TABLE (table));
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->set_row_header)
+    (iface->set_row_header) (table, row, header);
+}
+
+/**
+ * atk_table_set_summary:
+ * @table: a GObject instance that implements AtkTableIface
+ * @accessible: an #AtkObject representing the summary description
+ * to set for @table
+ *
+ * Sets the summary description of the table.
+ **/
+void
+atk_table_set_summary (AtkTable       *table,
+                       AtkObject      *accessible)
+{
+  AtkTableIface *iface;
+
+  g_return_if_fail (ATK_IS_TABLE (table));
+
+  iface = ATK_TABLE_GET_IFACE (table);
+
+  if (iface->set_summary)
+    (iface->set_summary) (table, accessible);
+}
diff --git a/atk/atktable.h b/atk/atktable.h
new file mode 100644
index 0000000000..5d644168a9
--- /dev/null
+++ b/atk/atktable.h
@@ -0,0 +1,223 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_TABLE_H__
+#define __ATK_TABLE_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_TABLE                    (atk_table_get_type ())
+#define ATK_IS_TABLE(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_TABLE)
+#define ATK_TABLE(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_TABLE, AtkTable)
+#define ATK_TABLE_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_TABLE, 
AtkTableIface))
+
+#ifndef _TYPEDEF_ATK_TABLE_
+#define _TYPEDEF_ATK_TABLE_
+typedef struct _AtkTable AtkTable;
+#endif
+typedef struct _AtkTableIface AtkTableIface;
+
+struct _AtkTableIface
+{
+  GTypeInterface parent;
+
+  AtkObject*        (* ref_at)                   (AtkTable      *table,
+                                                  gint          row,
+                                                  gint          column);
+  gint              (* get_index_at)             (AtkTable      *table,
+                                                  gint          row,
+                                                  gint          column);
+  gint              (* get_column_at_index)      (AtkTable      *table,
+                                                  gint          index_);
+  gint              (* get_row_at_index)         (AtkTable      *table,
+                                                  gint          index_);
+  gint              (* get_n_columns)           (AtkTable      *table);
+  gint              (* get_n_rows)               (AtkTable      *table);
+  gint              (* get_column_extent_at)     (AtkTable      *table,
+                                                  gint          row,
+                                                  gint          column);
+  gint              (* get_row_extent_at)        (AtkTable      *table,
+                                                  gint          row,
+                                                  gint          column);
+  AtkObject*
+                    (* get_caption)              (AtkTable      *table);
+  const gchar*      (* get_column_description)   (AtkTable      *table,
+                                                  gint          column);
+  AtkObject*        (* get_column_header)        (AtkTable      *table,
+                                                 gint          column);
+  const gchar*      (* get_row_description)      (AtkTable      *table,
+                                                  gint          row);
+  AtkObject*        (* get_row_header)           (AtkTable      *table,
+                                                 gint          row);
+  AtkObject*        (* get_summary)              (AtkTable      *table);
+  void              (* set_caption)              (AtkTable      *table,
+                                                  AtkObject     *caption);
+  void              (* set_column_description)   (AtkTable      *table,
+                                                  gint          column,
+                                                  const gchar   *description);
+  void              (* set_column_header)        (AtkTable      *table,
+                                                  gint          column,
+                                                  AtkObject     *header);
+  void              (* set_row_description)      (AtkTable      *table,
+                                                  gint          row,
+                                                  const gchar   *description);
+  void              (* set_row_header)           (AtkTable      *table,
+                                                  gint          row,
+                                                  AtkObject     *header);
+  void              (* set_summary)              (AtkTable      *table,
+                                                  AtkObject     *accessible);
+  gint              (* get_selected_columns)     (AtkTable      *table,
+                                                  gint          **selected);
+  gint              (* get_selected_rows)        (AtkTable      *table,
+                                                  gint          **selected);
+  gboolean          (* is_column_selected)       (AtkTable      *table,
+                                                  gint          column);
+  gboolean          (* is_row_selected)          (AtkTable      *table,
+                                                  gint          row);
+  gboolean          (* is_selected)              (AtkTable      *table,
+                                                  gint          row,
+                                                  gint          column);
+  gboolean          (* add_row_selection)        (AtkTable      *table,
+                                                  gint          row);
+  gboolean          (* remove_row_selection)     (AtkTable      *table,
+                                                  gint          row);
+  gboolean          (* add_column_selection)     (AtkTable      *table,
+                                                  gint          column);
+  gboolean          (* remove_column_selection)  (AtkTable      *table,
+                                                  gint          column);
+
+  /*
+   * signal handlers
+   */
+  void              (* row_inserted)             (AtkTable      *table,
+                                                  gint          row,
+                                                  gint          num_inserted);
+  void              (* column_inserted)          (AtkTable      *table,
+                                                  gint          column,
+                                                  gint          num_inserted);
+  void              (* row_deleted)              (AtkTable      *table,
+                                                  gint          row,
+                                                  gint          num_deleted);
+  void              (* column_deleted)           (AtkTable      *table,
+                                                  gint          column,
+                                                  gint          num_deleted);
+  void              (* row_reordered)            (AtkTable      *table);
+  void              (* column_reordered)         (AtkTable      *table);
+  void              (* model_changed)            (AtkTable      *table);
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_table_get_type (void);
+
+GDK_AVAILABLE_IN_ALL
+AtkObject*        atk_table_ref_at               (AtkTable         *table,
+                                                  gint             row,
+                                                  gint             column);
+GDK_AVAILABLE_IN_ALL
+gint              atk_table_get_n_columns        (AtkTable         *table);
+GDK_AVAILABLE_IN_ALL
+gint              atk_table_get_n_rows           (AtkTable         *table);
+GDK_AVAILABLE_IN_ALL
+gint              atk_table_get_column_extent_at (AtkTable         *table,
+                                                  gint             row,
+                                                  gint             column);
+GDK_AVAILABLE_IN_ALL
+gint              atk_table_get_row_extent_at    (AtkTable         *table,
+                                                  gint             row,
+                                                  gint             column);
+GDK_AVAILABLE_IN_ALL
+AtkObject*
+                  atk_table_get_caption          (AtkTable         *table);
+GDK_AVAILABLE_IN_ALL
+const gchar*      atk_table_get_column_description
+                                                 (AtkTable         *table,
+                                                  gint             column);
+GDK_AVAILABLE_IN_ALL
+AtkObject*        atk_table_get_column_header    (AtkTable         *table,
+                                                 gint             column);
+GDK_AVAILABLE_IN_ALL
+const gchar*      atk_table_get_row_description  (AtkTable         *table,
+                                                  gint             row);
+GDK_AVAILABLE_IN_ALL
+AtkObject*        atk_table_get_row_header       (AtkTable         *table,
+                                                 gint             row);
+GDK_AVAILABLE_IN_ALL
+AtkObject*        atk_table_get_summary          (AtkTable         *table);
+GDK_AVAILABLE_IN_ALL
+void              atk_table_set_caption          (AtkTable         *table,
+                                                  AtkObject        *caption);
+GDK_AVAILABLE_IN_ALL
+void              atk_table_set_column_description 
+                                                 (AtkTable         *table,
+                                                  gint             column,
+                                                  const gchar      *description);
+GDK_AVAILABLE_IN_ALL
+void              atk_table_set_column_header    (AtkTable         *table,
+                                                  gint             column,
+                                                  AtkObject        *header);
+GDK_AVAILABLE_IN_ALL
+void              atk_table_set_row_description  (AtkTable         *table,
+                                                  gint             row,
+                                                  const gchar      *description);
+GDK_AVAILABLE_IN_ALL
+void              atk_table_set_row_header       (AtkTable         *table,
+                                                  gint             row,
+                                                  AtkObject        *header);
+GDK_AVAILABLE_IN_ALL
+void              atk_table_set_summary          (AtkTable         *table,
+                                                  AtkObject        *accessible);
+GDK_AVAILABLE_IN_ALL
+gint              atk_table_get_selected_columns (AtkTable         *table,
+                                                  gint             **selected);
+GDK_AVAILABLE_IN_ALL
+gint              atk_table_get_selected_rows    (AtkTable         *table,
+                                                  gint             **selected);
+GDK_AVAILABLE_IN_ALL
+gboolean          atk_table_is_column_selected   (AtkTable         *table,
+                                                  gint             column);
+GDK_AVAILABLE_IN_ALL
+gboolean          atk_table_is_row_selected      (AtkTable         *table,
+                                                  gint             row);
+GDK_AVAILABLE_IN_ALL
+gboolean          atk_table_is_selected          (AtkTable         *table,
+                                                  gint             row,
+                                                  gint             column);
+GDK_AVAILABLE_IN_ALL
+gboolean          atk_table_add_row_selection    (AtkTable         *table,
+                                                  gint             row);
+GDK_AVAILABLE_IN_ALL
+gboolean          atk_table_remove_row_selection (AtkTable         *table,
+                                                  gint             row);
+GDK_AVAILABLE_IN_ALL
+gboolean          atk_table_add_column_selection (AtkTable         *table,
+                                                  gint             column);
+GDK_AVAILABLE_IN_ALL
+gboolean          atk_table_remove_column_selection  
+                                                 (AtkTable         *table,
+                                                  gint             column);
+
+G_END_DECLS
+
+#endif /* __ATK_TABLE_H__ */
diff --git a/atk/atktablecell.c b/atk/atktablecell.c
new file mode 100644
index 0000000000..1cec6fa2b1
--- /dev/null
+++ b/atk/atktablecell.c
@@ -0,0 +1,277 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2014 SUSE LLC.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atktablecell.h"
+
+
+/**
+ * SECTION:atktablecell
+ * @Short_description: The ATK interface implemented for a cell inside
+ * a two-dimentional #AtkTable
+ * @Title:AtkTableCell
+ *
+ * Being #AtkTable a component which present elements ordered via rows
+ * and columns, an #AtkTableCell is the interface which each of those
+ * elements, so "cells" should implement.
+ *
+ * See also #AtkTable.
+ */
+
+typedef AtkTableCellIface AtkTableCellInterface;
+G_DEFINE_INTERFACE (AtkTableCell, atk_table_cell, ATK_TYPE_OBJECT)
+
+static gboolean atk_table_cell_real_get_row_column_span (AtkTableCell *cell,
+                                                         gint         *row,
+                                                         gint         *column,
+                                                         gint         *row_span,
+                                                         gint         *column_span);
+
+static void
+atk_table_cell_default_init (AtkTableCellInterface *iface)
+{
+  iface->get_row_column_span = atk_table_cell_real_get_row_column_span;
+}
+
+/**
+ * atk_table_cell_get_column_span:
+ * @cell: a GObject instance that implements AtkTableCellIface
+ *
+ * Returns the number of columns occupied by this cell accessible.
+ *
+ * Returns: a gint representing the number of columns occupied by this cell,
+ * or 0 if the cell does not implement this method.
+ *
+ * Since: 2.12
+ */
+gint
+atk_table_cell_get_column_span (AtkTableCell *cell)
+{
+  AtkTableCellIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE_CELL (cell), 0);
+
+  iface = ATK_TABLE_CELL_GET_IFACE (cell);
+
+  if (iface->get_column_span)
+    return (iface->get_column_span) (cell);
+  else
+    return 0;
+}
+
+/**
+ * atk_table_cell_get_column_header_cells:
+ * @cell: a GObject instance that implements AtkTableCellIface
+ *
+ * Returns the column headers as an array of cell accessibles.
+ *
+ * Returns: (element-type AtkObject) (transfer full): a GPtrArray of AtkObjects
+ * representing the column header cells.
+ *
+ * Since: 2.12
+ */
+GPtrArray *
+atk_table_cell_get_column_header_cells (AtkTableCell *cell)
+{
+  AtkTableCellIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE_CELL (cell), NULL);
+
+  iface = ATK_TABLE_CELL_GET_IFACE (cell);
+
+  if (iface->get_column_header_cells)
+    return (iface->get_column_header_cells) (cell);
+  else
+    return NULL;
+}
+
+/**
+ * atk_table_cell_get_position:
+ * @cell: a GObject instance that implements AtkTableCellIface
+ * @row: (out): the row of the given cell.
+ * @column: (out): the column of the given cell.
+ *
+ * Retrieves the tabular position of this cell.
+ *
+ * Returns: TRUE if successful; FALSE otherwise.
+ *
+ * Since: 2.12
+ */
+gboolean
+atk_table_cell_get_position (AtkTableCell *cell,
+                             gint         *row,
+                             gint         *column)
+{
+  AtkTableCellIface *iface;
+  gint tmp_row, tmp_column;
+  gint *real_row = (row ? row : &tmp_row);
+  gint *real_column = (column ? column : &tmp_column);
+
+  *real_row = -1;
+  *real_column = -1;
+
+  g_return_val_if_fail (ATK_IS_TABLE_CELL (cell), FALSE);
+
+  iface = ATK_TABLE_CELL_GET_IFACE (cell);
+
+  if (iface->get_position)
+    return (iface->get_position) (cell, real_row, real_column);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_table_cell_get_row_span:
+ * @cell: a GObject instance that implements AtkTableCellIface
+ *
+ * Returns the number of rows occupied by this cell accessible.
+ *
+ * Returns: a gint representing the number of rows occupied by this cell,
+ * or 0 if the cell does not implement this method.
+ *
+ * Since: 2.12
+ */
+gint
+atk_table_cell_get_row_span (AtkTableCell *cell)
+{
+  AtkTableCellIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE_CELL (cell), 0);
+
+  iface = ATK_TABLE_CELL_GET_IFACE (cell);
+
+  if (iface->get_row_span)
+    return (iface->get_row_span) (cell);
+  else
+    return 0;
+}
+
+/**
+ * atk_table_cell_get_row_header_cells:
+ * @cell: a GObject instance that implements AtkTableCellIface
+ *
+ * Returns the row headers as an array of cell accessibles.
+ *
+ * Returns: (element-type AtkObject) (transfer full): a GPtrArray of AtkObjects
+ * representing the row header cells.
+ *
+ * Since: 2.12
+ */
+GPtrArray *
+atk_table_cell_get_row_header_cells (AtkTableCell *cell)
+{
+  AtkTableCellIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE_CELL (cell), NULL);
+
+  iface = ATK_TABLE_CELL_GET_IFACE (cell);
+
+  if (iface->get_row_header_cells)
+    return (iface->get_row_header_cells) (cell);
+  else
+    return NULL;
+}
+
+/**
+ * atk_table_cell_get_row_column_span:
+ * @cell: a GObject instance that implements AtkTableCellIface
+ * @row: (out): the row index of the given cell.
+ * @column: (out): the column index of the given cell.
+ * @row_span: (out): the number of rows occupied by this cell.
+ * @column_span: (out): the number of columns occupied by this cell.
+ *
+ * Gets the row and column indexes and span of this cell accessible.
+ *
+ * Note: If the object does not implement this function, then, by default, atk
+ * will implement this function by calling get_row_span and get_column_span
+ * on the object.
+ *
+ * Returns: TRUE if successful; FALSE otherwise.
+ *
+ * Since: 2.12
+ */
+gboolean
+atk_table_cell_get_row_column_span (AtkTableCell *cell,
+                                    gint         *row,
+                                    gint         *column,
+                                    gint         *row_span,
+                                    gint         *column_span)
+{
+  AtkTableCellIface *iface;
+  gint local_row = 0, local_column = 0;
+  gint local_row_span = 0, local_column_span = 0;
+  gint *real_row, *real_column;
+  gint *real_row_span, *real_column_span;
+
+  g_return_val_if_fail (ATK_IS_TABLE_CELL (cell), FALSE);
+
+  real_row = (row ? row : &local_row);
+  real_column = (column ? column : &local_column);
+  real_row_span = (row_span ? row_span : &local_row_span);
+  real_column_span = (column_span ? column_span : &local_column_span);
+
+  iface = ATK_TABLE_CELL_GET_IFACE (cell);
+
+  if (iface->get_row_column_span)
+    return (iface->get_row_column_span) (cell, real_row, real_column,
+                                           real_row_span,
+                                           real_column_span);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_table_cell_get_table:
+ * @cell: a GObject instance that implements AtkTableCellIface
+ *
+ * Returns a reference to the accessible of the containing table.
+ *
+ * Returns: (transfer full): the atk object for the containing table.
+ *
+ * Since: 2.12
+ */
+AtkObject *
+atk_table_cell_get_table (AtkTableCell *cell)
+{
+  AtkTableCellIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TABLE_CELL (cell), FALSE);
+
+  iface = ATK_TABLE_CELL_GET_IFACE (cell);
+
+  if (iface->get_table)
+    return (iface->get_table) (cell);
+  else
+    return NULL;
+}
+
+static gboolean
+atk_table_cell_real_get_row_column_span (AtkTableCell *cell,
+                                         gint         *row,
+                                         gint         *column,
+                                         gint         *row_span,
+                                         gint         *column_span)
+{
+  atk_table_cell_get_position (cell, row, column);
+  *row_span = atk_table_cell_get_row_span (cell);
+  *column_span = atk_table_cell_get_column_span (cell);
+
+  return (*row != 0 && *column != 0 && *row_span > 0 && *column_span > 0);
+}
diff --git a/atk/atktablecell.h b/atk/atktablecell.h
new file mode 100644
index 0000000000..5ce4842e5d
--- /dev/null
+++ b/atk/atktablecell.h
@@ -0,0 +1,110 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2014 SUSE LLC.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_TABLE_CELL_H__
+#define __ATK_TABLE_CELL_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_TABLE_CELL                    (atk_table_cell_get_type ())
+#define ATK_IS_TABLE_CELL(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_TABLE_CELL)
+#define ATK_TABLE_CELL(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_TABLE_CELL, 
AtkTableCell)
+#define ATK_TABLE_CELL_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_TABLE_CELL, 
AtkTableCellIface))
+
+#ifndef _TYPEDEF_ATK_TABLE_CELL_
+#define _TYPEDEF_ATK_TABLE_CELL_
+typedef struct _AtkTableCell AtkTableCell;
+#endif
+typedef struct _AtkTableCellIface AtkTableCellIface;
+
+/**
+ * AtkTableCellIface:
+ * @get_column_span: virtual function that returns the number of
+ *   columns occupied by this cell accessible
+ * @get_column_header_cells: virtual function that returns the column
+ *   headers as an array of cell accessibles
+ * @get_position: virtual function that retrieves the tabular position
+ *   of this cell
+ * @get_row_span: virtual function that returns the number of rows
+ *   occupied by this cell
+ * @get_row_header_cells: virtual function that returns the row
+ *   headers as an array of cell accessibles
+ * @get_row_column_span: virtual function that get the row an column
+ *   indexes and span of this cell
+ * @get_table: virtual function that returns a reference to the
+ *   accessible of the containing table
+ *
+ * AtkTableCell is an interface for cells inside an #AtkTable.
+ *
+ * Since: 2.12
+ */
+struct _AtkTableCellIface
+{
+  /*< private >*/
+  GTypeInterface parent;
+
+  /*< public >*/
+  gint          (*get_column_span)         (AtkTableCell *cell);
+  GPtrArray *   (*get_column_header_cells) (AtkTableCell *cell);
+  gboolean      (*get_position)            (AtkTableCell *cell,
+                                            gint         *row,
+                                            gint         *column);
+  gint          (*get_row_span)            (AtkTableCell *cell);
+  GPtrArray *   (*get_row_header_cells)    (AtkTableCell *cell);
+  gboolean      (*get_row_column_span)     (AtkTableCell *cell,
+                                            gint         *row,
+                                            gint         *column,
+                                            gint         *row_span,
+                                            gint         *column_span);
+  AtkObject *   (*get_table)               (AtkTableCell *cell);
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_table_cell_get_type (void);
+
+GDK_AVAILABLE_IN_ALL
+gint        atk_table_cell_get_column_span         (AtkTableCell *cell);
+GDK_AVAILABLE_IN_ALL
+GPtrArray * atk_table_cell_get_column_header_cells (AtkTableCell *cell);
+GDK_AVAILABLE_IN_ALL
+gboolean    atk_table_cell_get_position            (AtkTableCell *cell,
+                                                    gint         *row,
+                                                    gint         *column);
+GDK_AVAILABLE_IN_ALL
+gint        atk_table_cell_get_row_span            (AtkTableCell *cell);
+GDK_AVAILABLE_IN_ALL
+GPtrArray * atk_table_cell_get_row_header_cells    (AtkTableCell *cell);
+GDK_AVAILABLE_IN_ALL
+gboolean    atk_table_cell_get_row_column_span     (AtkTableCell *cell,
+                                                    gint         *row,
+                                                    gint         *column,
+                                                    gint         *row_span,
+                                                    gint         *column_span);
+GDK_AVAILABLE_IN_ALL
+AtkObject * atk_table_cell_get_table               (AtkTableCell *cell);
+
+G_END_DECLS
+
+#endif /* __ATK_TABLE_CELL_H__ */
diff --git a/atk/atktext.c b/atk/atktext.c
new file mode 100644
index 0000000000..182559253b
--- /dev/null
+++ b/atk/atktext.c
@@ -0,0 +1,1444 @@
+/* ATK - The Accessibility Toolkit for GTK+
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atk.h"
+#include "atkmarshal.h"
+
+#include <string.h>
+
+/**
+ * SECTION:atktext
+ * @Short_description: The ATK interface implemented by components
+ *  with text content.
+ * @Title:AtkText
+ *
+ * #AtkText should be implemented by #AtkObjects on behalf of widgets
+ * that have text content which is either attributed or otherwise
+ * non-trivial.  #AtkObjects whose text content is simple,
+ * unattributed, and very brief may expose that content via
+ * #atk_object_get_name instead; however if the text is editable,
+ * multi-line, typically longer than three or four words, attributed,
+ * selectable, or if the object already uses the 'name' ATK property
+ * for other information, the #AtkText interface should be used to
+ * expose the text content.  In the case of editable text content,
+ * #AtkEditableText (a subtype of the #AtkText interface) should be
+ * implemented instead.
+ *
+ *  #AtkText provides not only traversal facilities and change
+ * notification for text content, but also caret tracking and glyph
+ * bounding box calculations.  Note that the text strings are exposed
+ * as UTF-8, and are therefore potentially multi-byte, and
+ * caret-to-byte offset mapping makes no assumptions about the
+ * character length; also bounding box glyph-to-offset mapping may be
+ * complex for languages which use ligatures.
+ */
+
+static GPtrArray *extra_attributes = NULL;
+
+enum {
+  TEXT_CARET_MOVED,
+  TEXT_SELECTION_CHANGED,
+  TEXT_ATTRIBUTES_CHANGED,
+  TEXT_INSERT,
+  TEXT_REMOVE,
+  LAST_SIGNAL
+};
+
+static const char boolean[] =
+  "false\0"
+  "true";
+static const guint8 boolean_offsets[] = {
+  0, 6
+};
+
+static const char style[] =
+  "normal\0"
+  "oblique\0"
+  "italic";
+static const guint8 style_offsets[] = {
+  0, 7, 15
+};
+
+static const char variant[] =
+  "normal\0"
+  "small_caps";
+static const guint8 variant_offsets[] = {
+  0, 7
+};
+
+static const char stretch[] =
+  "ultra_condensed\0"
+  "extra_condensed\0"
+  "condensed\0"
+  "semi_condensed\0"
+  "normal\0"
+  "semi_expanded\0"
+  "expanded\0"
+  "extra_expanded\0"
+  "ultra_expanded";
+static const guint8 stretch_offsets[] = {
+  0, 16, 32, 42, 57, 64, 78, 87, 102
+};
+
+static const char justification[] =
+  "left\0"
+  "right\0"
+  "center\0"
+  "fill";
+static const guint8 justification_offsets[] = {
+  0, 5, 11, 18
+};
+
+static const char direction[] =
+  "none\0"
+  "ltr\0"
+  "rtl";
+static const guint8 direction_offsets[] = {
+  0, 5, 9
+};
+
+static const char wrap_mode[] =
+  "none\0"
+  "char\0"
+  "word\0"
+  "word_char";
+static const guint8 wrap_mode_offsets[] = {
+  0, 5, 10, 15
+};
+
+static const char underline[] =
+  "none\0"
+  "single\0"
+  "double\0"
+  "low\0"
+  "error";
+static const guint8 underline_offsets[] = {
+  0, 5, 12, 19, 23
+};
+
+static const char text_position[] =
+  "baseline\0"
+  "super\0"
+  "sub\0";
+static const guint8 text_position_offsets[] = {
+  0, 9, 15,
+};
+
+static void atk_text_base_init (AtkTextIface *class);
+
+static void atk_text_real_get_range_extents  (AtkText          *text,
+                                              gint             start_offset,
+                                              gint             end_offset,
+                                              AtkCoordType     coord_type,
+                                              AtkTextRectangle *rect);
+
+static AtkTextRange** atk_text_real_get_bounded_ranges (AtkText          *text,
+                                                        AtkTextRectangle *rect,
+                                                        AtkCoordType     coord_type,
+                                                        AtkTextClipType  x_clip_type,
+                                                        AtkTextClipType  y_clip_type);
+
+static guint atk_text_signals[LAST_SIGNAL] = { 0 };
+
+GType
+atk_text_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) 
+    {
+      static const GTypeInfo tinfo =
+      {
+        sizeof (AtkTextIface),
+        (GBaseInitFunc) atk_text_base_init,
+        (GBaseFinalizeFunc) NULL,
+        (GClassInitFunc) NULL /* atk_text_interface_init */ ,
+        (GClassFinalizeFunc) NULL,
+
+      };
+
+      type = g_type_register_static (G_TYPE_INTERFACE, "AtkText", &tinfo, 0);
+    }
+
+  return type;
+}
+
+static void
+atk_text_base_init (AtkTextIface *class)
+{
+  static gboolean initialized = FALSE;
+  
+  if (! initialized)
+    {
+      /* 
+       * Note that text_changed signal supports details "insert", "delete", 
+       * possibly "replace". 
+       */
+     
+      class->get_range_extents = atk_text_real_get_range_extents; 
+      class->get_bounded_ranges = atk_text_real_get_bounded_ranges; 
+
+      /**
+       * AtkText::text-insert:
+       * @atktext: the object which received the signal.
+       * @arg1: The position (character offset) of the insertion.
+       * @arg2: The length (in characters) of text inserted.
+       * @arg3: The new text inserted
+       *
+       * The "text-insert" signal is emitted when a new text is
+       * inserted. If the signal was not triggered by the user
+       * (e.g. typing or pasting text), the "system" detail should be
+       * included.
+       */
+      atk_text_signals[TEXT_INSERT] =
+       g_signal_new ("text_insert",
+                     ATK_TYPE_TEXT,
+                     G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
+                     0,
+                     (GSignalAccumulator) NULL, NULL,
+                     atk_marshal_VOID__INT_INT_STRING,
+                     G_TYPE_NONE,
+                     3, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING);
+
+      /**
+       * AtkText::text-remove:
+       * @atktext: the object which received the signal.
+       * @arg1: The position (character offset) of the removal.
+       * @arg2: The length (in characters) of text removed.
+       * @arg3: The old text removed
+       *
+       * The "text-remove" signal is emitted when a new text is
+       * removed. If the signal was not triggered by the user
+       * (e.g. typing or pasting text), the "system" detail should be
+       * included.
+       */
+      atk_text_signals[TEXT_REMOVE] =
+       g_signal_new ("text_remove",
+                     ATK_TYPE_TEXT,
+                     G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
+                     0,
+                     (GSignalAccumulator) NULL, NULL,
+                     atk_marshal_VOID__INT_INT_STRING,
+                     G_TYPE_NONE,
+                     3, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING);
+
+      /**
+       * AtkText::text-caret-moved:
+       * @atktext: the object which received the signal.
+       * @arg1: The new position of the text caret.
+       *
+       * The "text-caret-moved" signal is emitted when the caret
+       * position of the text of an object which implements AtkText
+       * changes.
+       */
+      atk_text_signals[TEXT_CARET_MOVED] =
+       g_signal_new ("text_caret_moved",
+                     ATK_TYPE_TEXT,
+                     G_SIGNAL_RUN_LAST,
+                     G_STRUCT_OFFSET (AtkTextIface, text_caret_moved),
+                     (GSignalAccumulator) NULL, NULL,
+                     g_cclosure_marshal_VOID__INT,
+                     G_TYPE_NONE,
+                     1, G_TYPE_INT);
+
+      /**
+       * AtkText::text-selection-changed:
+       * @atktext: the object which received the signal.
+       *
+       * The "text-selection-changed" signal is emitted when the
+       * selected text of an object which implements AtkText changes.
+       */
+      atk_text_signals[TEXT_SELECTION_CHANGED] =
+        g_signal_new ("text_selection_changed",
+                      ATK_TYPE_TEXT,
+                      G_SIGNAL_RUN_LAST,
+                      G_STRUCT_OFFSET (AtkTextIface, text_selection_changed),
+                      (GSignalAccumulator) NULL, NULL,
+                      g_cclosure_marshal_VOID__VOID,
+                      G_TYPE_NONE, 0);
+      /**
+       * AtkText::text-attributes-changed:
+       * @atktext: the object which received the signal.
+       *
+       * The "text-attributes-changed" signal is emitted when the text
+       * attributes of the text of an object which implements AtkText
+       * changes.
+       */
+      atk_text_signals[TEXT_ATTRIBUTES_CHANGED] =
+        g_signal_new ("text_attributes_changed",
+                      ATK_TYPE_TEXT,
+                      G_SIGNAL_RUN_LAST,
+                      G_STRUCT_OFFSET (AtkTextIface, text_attributes_changed),
+                      (GSignalAccumulator) NULL, NULL,
+                      g_cclosure_marshal_VOID__VOID,
+                      G_TYPE_NONE, 0);
+
+      
+      initialized = TRUE;
+    }
+}
+
+/**
+ * atk_text_get_text:
+ * @text: an #AtkText
+ * @start_offset: a starting character offset within @text
+ * @end_offset: an ending character offset within @text, or -1 for the end of the string.
+ *
+ * Gets the specified text.
+ *
+ * Returns: a newly allocated string containing the text from @start_offset up
+ *          to, but not including @end_offset. Use g_free() to free the returned
+ *          string.
+ **/
+gchar*
+atk_text_get_text (AtkText      *text,
+                   gint         start_offset,
+                   gint         end_offset)
+{
+  AtkTextIface *iface;
+  
+  g_return_val_if_fail (ATK_IS_TEXT (text), NULL);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (start_offset < 0 || end_offset < -1 ||
+      (end_offset != -1 && end_offset < start_offset))
+    return NULL;
+
+  if (iface->get_text)
+    return (*(iface->get_text)) (text, start_offset, end_offset);
+  else
+    return NULL;
+}
+
+/**
+ * atk_text_get_character_at_offset:
+ * @text: an #AtkText
+ * @offset: a character offset within @text
+ *
+ * Gets the specified text.
+ *
+ * Returns: the character at @offset or 0 in the case of failure.
+ **/
+gunichar
+atk_text_get_character_at_offset (AtkText      *text,
+                                  gint         offset)
+{
+  AtkTextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), (gunichar) 0);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->get_character_at_offset)
+    return (*(iface->get_character_at_offset)) (text, offset);
+  else
+    return (gunichar) 0;
+}
+
+/**
+ * atk_text_get_string_at_offset:
+ * @text: an #AtkText
+ * @offset: position
+ * @granularity: An #AtkTextGranularity
+ * @start_offset: (out): the starting character offset of the returned string, or -1
+ *                in the case of error (e.g. invalid offset, not implemented)
+ * @end_offset: (out): the offset of the first character after the returned string,
+ *              or -1 in the case of error (e.g. invalid offset, not implemented)
+ *
+ * Gets a portion of the text exposed through an #AtkText according to a given @offset
+ * and a specific @granularity, along with the start and end offsets defining the
+ * boundaries of such a portion of text.
+ *
+ * If @granularity is ATK_TEXT_GRANULARITY_CHAR the character at the
+ * offset is returned.
+ *
+ * If @granularity is ATK_TEXT_GRANULARITY_WORD the returned string
+ * is from the word start at or before the offset to the word start after
+ * the offset.
+ *
+ * The returned string will contain the word at the offset if the offset
+ * is inside a word and will contain the word before the offset if the
+ * offset is not inside a word.
+ *
+ * If @granularity is ATK_TEXT_GRANULARITY_SENTENCE the returned string
+ * is from the sentence start at or before the offset to the sentence
+ * start after the offset.
+ *
+ * The returned string will contain the sentence at the offset if the offset
+ * is inside a sentence and will contain the sentence before the offset
+ * if the offset is not inside a sentence.
+ *
+ * If @granularity is ATK_TEXT_GRANULARITY_LINE the returned string
+ * is from the line start at or before the offset to the line
+ * start after the offset.
+ *
+ * If @granularity is ATK_TEXT_GRANULARITY_PARAGRAPH the returned string
+ * is from the start of the paragraph at or before the offset to the start
+ * of the following paragraph after the offset.
+ *
+ * Since: 2.10
+ *
+ * Returns: (nullable): a newly allocated string containing the text at
+ *          the @offset bounded by the specified @granularity. Use g_free()
+ *          to free the returned string.  Returns %NULL if the offset is invalid
+ *          or no implementation is available.
+ **/
+gchar* atk_text_get_string_at_offset (AtkText *text,
+                                      gint offset,
+                                      AtkTextGranularity granularity,
+                                      gint *start_offset,
+                                      gint *end_offset)
+{
+  AtkTextIface *iface;
+  gint local_start_offset, local_end_offset;
+  gint *real_start_offset, *real_end_offset;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), NULL);
+
+  if (start_offset)
+    {
+      *start_offset = -1;
+      real_start_offset = start_offset;
+    }
+  else
+    real_start_offset = &local_start_offset;
+
+  if (end_offset)
+    {
+      *end_offset = -1;
+      real_end_offset = end_offset;
+    }
+  else
+    real_end_offset = &local_end_offset;
+
+  if (offset < 0)
+    return NULL;
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->get_string_at_offset)
+    return (*(iface->get_string_at_offset)) (text, offset, granularity, real_start_offset, real_end_offset);
+  else
+    return NULL;
+}
+
+/**
+ * atk_text_get_caret_offset:
+ * @text: an #AtkText
+ *
+ * Gets the offset of the position of the caret (cursor).
+ *
+ * Returns: the character offset of the position of the caret or -1 if
+ *          the caret is not located inside the element or in the case of
+ *          any other failure.
+ **/
+gint
+atk_text_get_caret_offset (AtkText *text)
+{
+  AtkTextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), 0);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->get_caret_offset)
+    return (*(iface->get_caret_offset)) (text);
+  else
+    return -1;
+}
+
+/**
+ * atk_text_get_character_extents:
+ * @text: an #AtkText
+ * @offset: The offset of the text character for which bounding information is required.
+ * @x: (out) (optional): Pointer for the x coordinate of the bounding box
+ * @y: (out) (optional): Pointer for the y coordinate of the bounding box
+ * @width: (out) (optional): Pointer for the width of the bounding box
+ * @height: (out) (optional): Pointer for the height of the bounding box
+ * @coords: specify whether coordinates are relative to the screen or widget window 
+ *
+ * If the extent can not be obtained (e.g. missing support), all of x, y, width,
+ * height are set to -1.
+ *
+ * Get the bounding box containing the glyph representing the character at 
+ *     a particular text offset. 
+ **/
+void
+atk_text_get_character_extents (AtkText *text,
+                                gint offset,
+                                gint *x,
+                                gint *y,
+                                gint *width,
+                                gint *height,
+                                AtkCoordType coords)
+{
+  AtkTextIface *iface;
+  gint local_x, local_y, local_width, local_height;
+  gint *real_x, *real_y, *real_width, *real_height;
+
+  g_return_if_fail (ATK_IS_TEXT (text));
+
+  if (x)
+    real_x = x;
+  else
+    real_x = &local_x;
+  if (y)
+    real_y = y;
+  else
+    real_y = &local_y;
+  if (width)
+    real_width = width;
+  else
+    real_width = &local_width;
+  if (height)
+    real_height = height;
+  else
+    real_height = &local_height;
+
+  *real_x = -1;
+  *real_y = -1;
+  *real_width = -1;
+  *real_height = -1;
+
+  if (offset < 0)
+    return;
+ 
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->get_character_extents)
+    (*(iface->get_character_extents)) (text, offset, real_x, real_y, real_width, real_height, coords);
+
+  if (*real_width <0)
+    {
+      *real_x = *real_x + *real_width;
+      *real_width *= -1;
+    }
+}
+
+/**
+ * atk_text_get_run_attributes:
+ *@text: an #AtkText
+ *@offset: the character offset at which to get the attributes, -1 means the offset of
+ *the character to be inserted at the caret location.
+ *@start_offset: (out): the address to put the start offset of the range
+ *@end_offset: (out): the address to put the end offset of the range
+ *
+ *Creates an #AtkAttributeSet which consists of the attributes explicitly
+ *set at the position @offset in the text. @start_offset and @end_offset are
+ *set to the start and end of the range around @offset where the attributes are
+ *invariant. Note that @end_offset is the offset of the first character
+ *after the range.  See the enum AtkTextAttribute for types of text 
+ *attributes that can be returned. Note that other attributes may also be 
+ *returned.
+ *
+ *Returns: (transfer full): an #AtkAttributeSet which contains the attributes
+ *         explicitly set at @offset. This #AtkAttributeSet should be freed by
+ *         a call to atk_attribute_set_free().
+ **/
+AtkAttributeSet* 
+atk_text_get_run_attributes (AtkText          *text,
+                             gint             offset,
+                             gint             *start_offset,
+                             gint             *end_offset)
+{
+  AtkTextIface *iface;
+  gint local_start_offset, local_end_offset;
+  gint *real_start_offset, *real_end_offset;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), NULL);
+
+  if (start_offset)
+    real_start_offset = start_offset;
+  else
+    real_start_offset = &local_start_offset;
+  if (end_offset)
+    real_end_offset = end_offset;
+  else
+    real_end_offset = &local_end_offset;
+
+  if (offset < -1)
+    return NULL;
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->get_run_attributes)
+    return (*(iface->get_run_attributes)) (text, offset, real_start_offset, real_end_offset);
+  else
+    return NULL;
+}
+
+/**
+ * atk_text_get_default_attributes:
+ *@text: an #AtkText
+ *
+ *Creates an #AtkAttributeSet which consists of the default values of
+ *attributes for the text. See the enum AtkTextAttribute for types of text 
+ *attributes that can be returned. Note that other attributes may also be 
+ *returned.
+ *
+ *Returns: (transfer full): an #AtkAttributeSet which contains the default text
+ *          attributes for this #AtkText. This #AtkAttributeSet should be freed by
+ *          a call to atk_attribute_set_free().
+ */
+AtkAttributeSet*
+atk_text_get_default_attributes (AtkText          *text)
+{
+  AtkTextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), NULL);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->get_default_attributes)
+    return (*(iface->get_default_attributes)) (text);
+  else
+    return NULL;
+}
+
+/**
+ * atk_text_get_character_count:
+ * @text: an #AtkText
+ *
+ * Gets the character count.
+ *
+ * Returns: the number of characters or -1 in case of failure.
+ **/
+gint
+atk_text_get_character_count (AtkText *text)
+{
+  AtkTextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), -1);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->get_character_count)
+    return (*(iface->get_character_count)) (text);
+  else
+    return -1;
+}
+
+/**
+ * atk_text_get_offset_at_point:
+ * @text: an #AtkText
+ * @x: screen x-position of character
+ * @y: screen y-position of character
+ * @coords: specify whether coordinates are relative to the screen or
+ * widget window 
+ *
+ * Gets the offset of the character located at coordinates @x and @y. @x and @y
+ * are interpreted as being relative to the screen or this widget's window
+ * depending on @coords.
+ *
+ * Returns: the offset to the character which is located at  the specified
+ *          @x and @y coordinates of -1 in case of failure.
+ **/
+gint
+atk_text_get_offset_at_point (AtkText *text,
+                              gint x,
+                              gint y,
+                             AtkCoordType coords)
+{
+  AtkTextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), -1);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->get_offset_at_point)
+    return (*(iface->get_offset_at_point)) (text, x, y, coords);
+  else
+    return -1;
+}
+
+/**
+ * atk_text_get_n_selections:
+ * @text: an #AtkText
+ *
+ * Gets the number of selected regions.
+ *
+ * Returns: The number of selected regions, or -1 in the case of failure.
+ **/
+gint
+atk_text_get_n_selections (AtkText *text)
+{
+  AtkTextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), -1);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->get_n_selections)
+    return (*(iface->get_n_selections)) (text);
+  else
+    return -1;
+}
+
+/**
+ * atk_text_get_selection:
+ * @text: an #AtkText
+ * @selection_num: The selection number.  The selected regions are
+ * assigned numbers that correspond to how far the region is from the
+ * start of the text.  The selected region closest to the beginning
+ * of the text region is assigned the number 0, etc.  Note that adding,
+ * moving or deleting a selected region can change the numbering.
+ * @start_offset: (out): passes back the starting character offset of the selected region
+ * @end_offset: (out): passes back the ending character offset (offset immediately past)
+ * of the selected region
+ *
+ * Gets the text from the specified selection.
+ *
+ * Returns: a newly allocated string containing the selected text. Use g_free()
+ *          to free the returned string.
+ **/
+gchar*
+atk_text_get_selection (AtkText *text, 
+                        gint    selection_num,
+                        gint    *start_offset,
+                        gint    *end_offset)
+{
+  AtkTextIface *iface;
+  gint local_start_offset, local_end_offset;
+  gint *real_start_offset, *real_end_offset;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), NULL);
+
+  if (start_offset)
+    real_start_offset = start_offset;
+  else
+    real_start_offset = &local_start_offset;
+  if (end_offset)
+    real_end_offset = end_offset;
+  else
+    real_end_offset = &local_end_offset;
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->get_selection)
+  {
+    return (*(iface->get_selection)) (text, selection_num,
+       real_start_offset, real_end_offset);
+  }
+  else
+    return NULL;
+}
+
+/**
+ * atk_text_add_selection:
+ * @text: an #AtkText
+ * @start_offset: the starting character offset of the selected region
+ * @end_offset: the offset of the first character after the selected region.
+ *
+ * Adds a selection bounded by the specified offsets.
+ *
+ * Returns: %TRUE if successful, %FALSE otherwise
+ **/
+gboolean
+atk_text_add_selection (AtkText *text, 
+                        gint    start_offset,
+                        gint    end_offset)
+{
+  AtkTextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), FALSE);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->add_selection)
+    return (*(iface->add_selection)) (text, start_offset, end_offset);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_text_remove_selection:
+ * @text: an #AtkText
+ * @selection_num: The selection number.  The selected regions are
+ * assigned numbers that correspond to how far the region is from the
+ * start of the text.  The selected region closest to the beginning
+ * of the text region is assigned the number 0, etc.  Note that adding,
+ * moving or deleting a selected region can change the numbering.
+ *
+ * Removes the specified selection.
+ *
+ * Returns: %TRUE if successful, %FALSE otherwise
+ **/
+gboolean
+atk_text_remove_selection (AtkText *text, 
+                           gint    selection_num)
+{
+  AtkTextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), FALSE);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->remove_selection)
+    return (*(iface->remove_selection)) (text, selection_num);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_text_set_selection:
+ * @text: an #AtkText
+ * @selection_num: The selection number.  The selected regions are
+ * assigned numbers that correspond to how far the region is from the
+ * start of the text.  The selected region closest to the beginning
+ * of the text region is assigned the number 0, etc.  Note that adding,
+ * moving or deleting a selected region can change the numbering.
+ * @start_offset: the new starting character offset of the selection
+ * @end_offset: the new end position of (e.g. offset immediately past) 
+ * the selection
+ *
+ * Changes the start and end offset of the specified selection.
+ *
+ * Returns: %TRUE if successful, %FALSE otherwise
+ **/
+gboolean
+atk_text_set_selection (AtkText *text, 
+                        gint    selection_num,
+                        gint    start_offset, 
+                        gint    end_offset)
+{
+  AtkTextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), FALSE);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->set_selection)
+  {
+    return (*(iface->set_selection)) (text, selection_num,
+       start_offset, end_offset);
+  }
+  else
+    return FALSE;
+}
+
+/**
+ * atk_text_set_caret_offset:
+ * @text: an #AtkText
+ * @offset: the character offset of the new caret position
+ *
+ * Sets the caret (cursor) position to the specified @offset.
+ *
+ * In the case of rich-text content, this method should either grab focus
+ * or move the sequential focus navigation starting point (if the application
+ * supports this concept) as if the user had clicked on the new caret position.
+ * Typically, this means that the target of this operation is the node containing
+ * the new caret position or one of its ancestors. In other words, after this
+ * method is called, if the user advances focus, it should move to the first
+ * focusable node following the new caret position.
+ *
+ * Calling this method should also scroll the application viewport in a way
+ * that matches the behavior of the application's typical caret motion or tab
+ * navigation as closely as possible. This also means that if the application's
+ * caret motion or focus navigation does not trigger a scroll operation, this
+ * method should not trigger one either. If the application does not have a caret
+ * motion or focus navigation operation, this method should try to scroll the new
+ * caret position into view while minimizing unnecessary scroll motion.
+ *
+ * Returns: %TRUE if successful, %FALSE otherwise.
+ **/
+gboolean
+atk_text_set_caret_offset (AtkText *text,
+                           gint    offset)
+{
+  AtkTextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), FALSE);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->set_caret_offset)
+    {
+      return (*(iface->set_caret_offset)) (text, offset);
+    }
+  else
+    {
+      return FALSE;
+    }
+}
+
+/**
+ * atk_text_get_range_extents:
+ * @text: an #AtkText
+ * @start_offset: The offset of the first text character for which boundary 
+ *        information is required.
+ * @end_offset: The offset of the text character after the last character 
+ *        for which boundary information is required.
+ * @coord_type: Specify whether coordinates are relative to the screen or widget window.
+ * @rect: (out): A pointer to a AtkTextRectangle which is filled in by this function.
+ *
+ * Get the bounding box for text within the specified range.
+ *
+ * If the extents can not be obtained (e.g. or missing support), the rectangle
+ * fields are set to -1.
+ *
+ * Since: 1.3
+ **/
+void
+atk_text_get_range_extents (AtkText          *text,
+                            gint             start_offset,
+                            gint             end_offset,
+                            AtkCoordType     coord_type,
+                            AtkTextRectangle *rect)
+{
+  AtkTextIface *iface;
+
+  g_return_if_fail (ATK_IS_TEXT (text));
+  g_return_if_fail (rect);
+  g_return_if_fail (start_offset >= 0 && start_offset < end_offset);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->get_range_extents)
+    (*(iface->get_range_extents)) (text, start_offset, end_offset, coord_type, rect);
+  else
+    {
+      rect->x = -1;
+      rect->y = -1;
+      rect->width = -1;
+      rect->height = -1;
+    }
+}
+
+/**
+ * atk_text_get_bounded_ranges: (virtual get_bounded_ranges)
+ * @text: an #AtkText
+ * @rect: An AtkTextRectangle giving the dimensions of the bounding box.
+ * @coord_type: Specify whether coordinates are relative to the screen or widget window.
+ * @x_clip_type: Specify the horizontal clip type.
+ * @y_clip_type: Specify the vertical clip type.
+ *
+ * Get the ranges of text in the specified bounding box.
+ *
+ * Since: 1.3
+ *
+ * Returns: (array zero-terminated=1): Array of AtkTextRange. The last
+ *          element of the array returned by this function will be NULL.
+ **/
+AtkTextRange**
+atk_text_get_bounded_ranges (AtkText          *text,
+                             AtkTextRectangle *rect,
+                             AtkCoordType      coord_type,
+                             AtkTextClipType   x_clip_type,
+                             AtkTextClipType   y_clip_type)
+{
+  AtkTextIface *iface;
+
+  g_return_val_if_fail (ATK_IS_TEXT (text), NULL);
+  g_return_val_if_fail (rect, NULL);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->get_bounded_ranges)
+    return (*(iface->get_bounded_ranges)) (text, rect, coord_type, x_clip_type, y_clip_type);
+  else
+    return NULL;
+}
+
+/**
+ * atk_attribute_set_free:
+ * @attrib_set: The #AtkAttributeSet to free
+ *
+ * Frees the memory used by an #AtkAttributeSet, including all its
+ * #AtkAttributes.
+ **/
+void
+atk_attribute_set_free (AtkAttributeSet *attrib_set)
+{
+  GSList *temp;
+
+  temp = attrib_set;
+
+  while (temp != NULL)
+    {
+      AtkAttribute *att;
+
+      att = temp->data;
+
+      g_free (att->name);
+      g_free (att->value);
+      g_free (att);
+      temp = temp->next;
+    }
+  g_slist_free (attrib_set);
+}
+
+/**
+ * atk_text_attribute_register:
+ * @name: a name string
+ *
+ * Associate @name with a new #AtkTextAttribute
+ *
+ * Returns: an #AtkTextAttribute associated with @name
+ **/
+AtkTextAttribute
+atk_text_attribute_register (const gchar *name)
+{
+  g_return_val_if_fail (name, ATK_TEXT_ATTR_INVALID);
+
+  if (!extra_attributes)
+    extra_attributes = g_ptr_array_new ();
+
+  g_ptr_array_add (extra_attributes, g_strdup (name));
+  return extra_attributes->len + ATK_TEXT_ATTR_LAST_DEFINED;
+}
+
+/**
+ * atk_text_attribute_get_name:
+ * @attr: The #AtkTextAttribute whose name is required
+ *
+ * Gets the name corresponding to the #AtkTextAttribute
+ *
+ * Returns: a string containing the name; this string should not be freed
+ **/
+const gchar*
+atk_text_attribute_get_name (AtkTextAttribute attr)
+{
+  GTypeClass *type_class;
+  GEnumValue *value;
+  const gchar *name = NULL;
+
+  type_class = g_type_class_ref (ATK_TYPE_TEXT_ATTRIBUTE);
+  g_return_val_if_fail (G_IS_ENUM_CLASS (type_class), NULL);
+
+  value = g_enum_get_value (G_ENUM_CLASS (type_class), attr);
+
+  if (value)
+    {
+      name = value->value_nick;
+    }
+  else
+    {
+      if (extra_attributes)
+        {
+          gint n = attr;
+
+          n -= ATK_TEXT_ATTR_LAST_DEFINED + 1;
+
+          if (n < extra_attributes->len)
+
+            name = g_ptr_array_index (extra_attributes, n);
+        }
+    }
+  g_type_class_unref (type_class);
+  return name;
+}
+
+/**
+ * atk_text_attribute_for_name:
+ * @name: a string which is the (non-localized) name of an ATK text attribute.
+ *
+ * Get the #AtkTextAttribute type corresponding to a text attribute name.
+ *
+ * Returns: the #AtkTextAttribute enumerated type corresponding to the specified
+ *          name, or #ATK_TEXT_ATTRIBUTE_INVALID if no matching text attribute
+ *          is found.
+ **/
+AtkTextAttribute
+atk_text_attribute_for_name (const gchar *name)
+{
+  GTypeClass *type_class;
+  GEnumValue *value;
+  AtkTextAttribute type = ATK_TEXT_ATTR_INVALID;
+
+  g_return_val_if_fail (name, ATK_TEXT_ATTR_INVALID);
+
+  type_class = g_type_class_ref (ATK_TYPE_TEXT_ATTRIBUTE);
+  g_return_val_if_fail (G_IS_ENUM_CLASS (type_class), ATK_TEXT_ATTR_INVALID);
+
+  value = g_enum_get_value_by_nick (G_ENUM_CLASS (type_class), name);
+
+  if (value)
+    {
+      type = value->value;
+    }
+  else
+    {
+      gint i;
+
+      if (extra_attributes)
+        {
+          for (i = 0; i < extra_attributes->len; i++)
+            {
+              gchar *extra_attribute = (gchar *)g_ptr_array_index (extra_attributes, i);
+
+              g_return_val_if_fail (extra_attribute, ATK_TEXT_ATTR_INVALID);
+
+              if (strcmp (name, extra_attribute) == 0)
+                {
+                  type = i + 1 + ATK_TEXT_ATTR_LAST_DEFINED;
+                  break;
+                }
+            }
+        }
+    }
+  g_type_class_unref (type_class);
+
+  return type;
+}
+
+/**
+ * atk_text_attribute_get_value:
+ * @attr: The #AtkTextAttribute for which a value is required
+ * @index_: The index of the required value
+ *
+ * Gets the value for the index of the #AtkTextAttribute
+ *
+ * Returns: (nullable): a string containing the value; this string
+ * should not be freed; %NULL is returned if there are no values
+ * maintained for the attr value.
+ **/
+const gchar*
+atk_text_attribute_get_value (AtkTextAttribute attr,
+                              gint             index)
+{
+  switch (attr)
+    {
+    case ATK_TEXT_ATTR_INVISIBLE:
+    case ATK_TEXT_ATTR_EDITABLE:
+    case ATK_TEXT_ATTR_BG_FULL_HEIGHT:
+    case ATK_TEXT_ATTR_STRIKETHROUGH:
+    case ATK_TEXT_ATTR_BG_STIPPLE:
+    case ATK_TEXT_ATTR_FG_STIPPLE:
+      g_assert (index >= 0 && index < G_N_ELEMENTS (boolean_offsets));
+      return boolean + boolean_offsets[index];
+    case ATK_TEXT_ATTR_UNDERLINE:
+      g_assert (index >= 0 && index < G_N_ELEMENTS (underline_offsets));
+      return underline + underline_offsets[index];
+    case ATK_TEXT_ATTR_WRAP_MODE:
+      g_assert (index >= 0 && index < G_N_ELEMENTS (wrap_mode_offsets));
+      return wrap_mode + wrap_mode_offsets[index];
+    case ATK_TEXT_ATTR_DIRECTION:
+      g_assert (index >= 0 && index < G_N_ELEMENTS (direction_offsets));
+      return direction + direction_offsets[index];
+    case ATK_TEXT_ATTR_JUSTIFICATION:
+      g_assert (index >= 0 && index < G_N_ELEMENTS (justification_offsets));
+      return justification + justification_offsets[index];
+    case ATK_TEXT_ATTR_STRETCH:
+      g_assert (index >= 0 && index < G_N_ELEMENTS (stretch_offsets));
+      return stretch + stretch_offsets[index];
+    case ATK_TEXT_ATTR_VARIANT:
+      g_assert (index >= 0 && index < G_N_ELEMENTS (variant_offsets));
+      return variant + variant_offsets[index];
+    case ATK_TEXT_ATTR_STYLE:
+      g_assert (index >= 0 && index < G_N_ELEMENTS (style_offsets));
+      return style + style_offsets[index];
+    case ATK_TEXT_ATTR_TEXT_POSITION:
+      g_assert (index >= 0 && index < G_N_ELEMENTS (text_position_offsets));
+      return text_position + text_position_offsets[index];
+    default:
+      return NULL;
+   }
+}
+
+static void
+atk_text_rectangle_union (AtkTextRectangle *src1,
+                          AtkTextRectangle *src2,
+                          AtkTextRectangle *dest)
+{
+  gint dest_x, dest_y;
+
+  /*
+   * Some invocations of e.g. atk_text_get_character_extents
+   * may return "-1" rectangles for character positions without support for
+   * getting an extent. In that case we have to ignore them instead of using -1
+   * values in computations.
+   */
+  if (src1->width == -1)
+    {
+      *dest = *src2;
+      return;
+    }
+  if (src2->width == -1)
+    {
+      *dest = *src1;
+      return;
+    }
+
+  dest_x = MIN (src1->x, src2->x);
+  dest_y = MIN (src1->y, src2->y);
+  dest->width = MAX (src1->x + src1->width, src2->x + src2->width) - dest_x;
+  dest->height = MAX (src1->y + src1->height, src2->y + src2->height) - dest_y;
+  dest->x = dest_x;
+  dest->y = dest_y;
+}
+
+static gboolean
+atk_text_rectangle_contain (AtkTextRectangle *clip,
+                            AtkTextRectangle *bounds,
+                            AtkTextClipType  x_clip_type,
+                            AtkTextClipType  y_clip_type)
+{
+  gboolean x_min_ok, x_max_ok, y_min_ok, y_max_ok;
+
+  x_min_ok = (bounds->x >= clip->x) ||
+             ((bounds->x + bounds->width >= clip->x) &&
+              ((x_clip_type == ATK_TEXT_CLIP_NONE) ||
+               (x_clip_type == ATK_TEXT_CLIP_MAX)));
+
+  x_max_ok = (bounds->x + bounds->width <= clip->x + clip->width) ||
+             ((bounds->x <= clip->x + clip->width) &&
+              ((x_clip_type == ATK_TEXT_CLIP_NONE) ||
+               (x_clip_type == ATK_TEXT_CLIP_MIN)));
+
+  y_min_ok = (bounds->y >= clip->y) ||
+             ((bounds->y + bounds->height >= clip->y) &&
+              ((y_clip_type == ATK_TEXT_CLIP_NONE) ||
+               (y_clip_type == ATK_TEXT_CLIP_MAX)));
+
+  y_max_ok = (bounds->y + bounds->height <= clip->y + clip->height) ||
+             ((bounds->y <= clip->y + clip->height) &&
+              ((y_clip_type == ATK_TEXT_CLIP_NONE) ||
+               (y_clip_type == ATK_TEXT_CLIP_MIN)));
+
+  return (x_min_ok && x_max_ok && y_min_ok && y_max_ok);
+  
+}
+
+/**
+ * atk_text_scroll_substring_to:
+ * @text: an #AtkText
+ * @start_offset: start offset in the @text
+ * @end_offset: end offset in the @text, or -1 for the end of the text.
+ * @type: specify where the object should be made visible.
+ *
+ * Makes a substring of @text visible on the screen by scrolling all necessary parents.
+ *
+ * Since: 2.32
+ *
+ * Returns: whether scrolling was successful.
+ */
+gboolean
+atk_text_scroll_substring_to (AtkText       *text,
+                              gint          start_offset,
+                              gint          end_offset,
+                              AtkScrollType type)
+{
+  AtkTextIface *iface = NULL;
+  g_return_val_if_fail (ATK_IS_TEXT (text), FALSE);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->scroll_substring_to)
+    return (iface->scroll_substring_to) (text, start_offset, end_offset, type);
+  else
+    return FALSE;
+}
+
+/**
+ * atk_text_scroll_substring_to_point:
+ * @text: an #AtkText
+ * @start_offset: start offset in the @text
+ * @end_offset: end offset in the @text, or -1 for the end of the text.
+ * @coords: specify whether coordinates are relative to the screen or to the
+ * parent object.
+ * @x: x-position where to scroll to
+ * @y: y-position where to scroll to
+ *
+ * Move the top-left of a substring of @text to a given position of the screen
+ * by scrolling all necessary parents.
+ *
+ * Since: 2.32
+ *
+ * Returns: whether scrolling was successful.
+ */
+gboolean
+atk_text_scroll_substring_to_point (AtkText      *text,
+                                    gint         start_offset,
+                                    gint         end_offset,
+                                    AtkCoordType coords,
+                                    gint         x,
+                                    gint         y)
+{
+  AtkTextIface *iface = NULL;
+  g_return_val_if_fail (ATK_IS_TEXT (text), FALSE);
+
+  iface = ATK_TEXT_GET_IFACE (text);
+
+  if (iface->scroll_substring_to_point)
+    return (iface->scroll_substring_to_point) (text, start_offset, end_offset, coords, x, y);
+  else
+    return FALSE;
+}
+
+static void 
+atk_text_real_get_range_extents (AtkText           *text,
+                                 gint              start_offset,
+                                 gint              end_offset,
+                                 AtkCoordType      coord_type,
+                                 AtkTextRectangle  *rect)
+{
+  gint i;
+  AtkTextRectangle cbounds, bounds;
+
+  atk_text_get_character_extents (text, start_offset,
+                                  &bounds.x, &bounds.y,
+                                  &bounds.width, &bounds.height,
+                                  coord_type);
+
+  for (i = start_offset + 1; i < end_offset; i++)
+    {
+      atk_text_get_character_extents (text, i,
+                                      &cbounds.x, &cbounds.y, 
+                                      &cbounds.width, &cbounds.height, 
+                                      coord_type);
+      atk_text_rectangle_union (&bounds, &cbounds, &bounds);
+    }
+
+  rect->x = bounds.x;
+  rect->y = bounds.y;
+  rect->width = bounds.width;
+  rect->height = bounds.height;
+}
+
+static AtkTextRange**
+atk_text_real_get_bounded_ranges (AtkText          *text,
+                                  AtkTextRectangle *rect,
+                                  AtkCoordType     coord_type,
+                                  AtkTextClipType  x_clip_type,
+                                  AtkTextClipType  y_clip_type)
+{
+  gint bounds_min_offset, bounds_max_offset;
+  gint min_line_start, min_line_end;
+  gint max_line_start, max_line_end;
+  gchar *line;
+  gint curr_offset;
+  gint offset;
+  gint num_ranges = 0;
+  gint range_size = 1;
+  AtkTextRectangle cbounds;
+  AtkTextRange **range;
+
+  range = NULL;
+  bounds_min_offset = atk_text_get_offset_at_point (text, rect->x, rect->y, coord_type);
+  bounds_max_offset = atk_text_get_offset_at_point (text, rect->x + rect->width, rect->y + rect->height, 
coord_type);
+
+  if (bounds_min_offset == 0 &&
+      bounds_min_offset == bounds_max_offset)
+    return NULL;
+
+  line = atk_text_get_string_at_offset (text, bounds_min_offset, 
+                                        ATK_TEXT_BOUNDARY_LINE_START,
+                                        &min_line_start, &min_line_end);
+  g_free (line);
+  line = atk_text_get_string_at_offset (text, bounds_max_offset, 
+                                        ATK_TEXT_BOUNDARY_LINE_START,
+                                        &max_line_start, &max_line_end);
+  g_free (line);
+  bounds_min_offset = MIN (min_line_start, max_line_start);
+  bounds_max_offset = MAX (min_line_end, max_line_end);
+
+  curr_offset = bounds_min_offset;
+  while (curr_offset < bounds_max_offset)
+    {
+      offset = curr_offset;
+
+      while (curr_offset < bounds_max_offset)
+        {
+          atk_text_get_character_extents (text, curr_offset,
+                                          &cbounds.x, &cbounds.y,
+                                          &cbounds.width, &cbounds.height,
+                                          coord_type);
+          if (!atk_text_rectangle_contain (rect, &cbounds, x_clip_type, y_clip_type))
+           break;
+          curr_offset++;
+        }
+      if (curr_offset > offset)
+        {
+          AtkTextRange *one_range = g_new (AtkTextRange, 1);
+
+          one_range->start_offset = offset;
+          one_range->end_offset = curr_offset;
+          one_range->content = atk_text_get_text (text, offset, curr_offset);
+          atk_text_get_range_extents (text, offset, curr_offset, coord_type, &one_range->bounds);
+
+          if (num_ranges >= range_size - 1)
+            {
+              range_size *= 2;
+              range = g_realloc (range, range_size * sizeof (gpointer));
+            }
+          range[num_ranges] = one_range;
+          num_ranges++; 
+        }   
+      curr_offset++;
+      if (range)
+        range[num_ranges] = NULL;
+    }
+  return range;
+}
+
+/**
+ * atk_text_free_ranges:
+ * @ranges: (array): A pointer to an array of #AtkTextRange which is
+ *   to be freed.
+ *
+ * Frees the memory associated with an array of AtkTextRange. It is assumed
+ * that the array was returned by the function atk_text_get_bounded_ranges
+ * and is NULL terminated.
+ *
+ * Since: 1.3
+ **/
+void
+atk_text_free_ranges (AtkTextRange **ranges)
+{
+  AtkTextRange **first = ranges;
+
+  if (ranges)
+    {
+      while (*ranges)
+        {
+          AtkTextRange *range;
+
+          range = *ranges;
+          ranges++;
+          g_free (range->content);
+          g_free (range);
+        }
+      g_free (first);
+    }
+}
+
+static AtkTextRange *
+atk_text_range_copy (AtkTextRange *src)
+{
+  AtkTextRange *dst = g_new0 (AtkTextRange, 1);
+  dst->bounds = src->bounds;
+  dst->start_offset = src->start_offset;
+  dst->end_offset = src->end_offset;
+  if (src->content)
+    dst->content = g_strdup (src->content);
+  return dst;
+}
+
+static void
+atk_text_range_free (AtkTextRange *range)
+{
+  g_free (range->content);
+  g_free (range);
+}
+
+G_DEFINE_BOXED_TYPE (AtkTextRange, atk_text_range, atk_text_range_copy,
+                     atk_text_range_free)
diff --git a/atk/atktext.h b/atk/atktext.h
new file mode 100644
index 0000000000..002965062d
--- /dev/null
+++ b/atk/atktext.h
@@ -0,0 +1,329 @@
+/* ATK - The Accessibility Toolkit for GTK+
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_TEXT_H__
+#define __ATK_TEXT_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <glib-object.h>
+#include <atk/atkobject.h>
+#include <atk/atkutil.h>
+#include <atk/atkcomponent.h>
+
+G_BEGIN_DECLS
+
+GDK_AVAILABLE_IN_ALL
+AtkTextAttribute         atk_text_attribute_register   (const gchar *name);
+
+
+#define ATK_TYPE_TEXT                    (atk_text_get_type ())
+#define ATK_IS_TEXT(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_TEXT)
+#define ATK_TEXT(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_TEXT, AtkText)
+#define ATK_TEXT_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_TEXT, AtkTextIface))
+
+#ifndef _TYPEDEF_ATK_TEXT_
+#define _TYPEDEF_ATK_TEXT_
+typedef struct _AtkText AtkText;
+#endif
+typedef struct _AtkTextIface AtkTextIface;
+
+
+/**
+ * AtkTextRectangle:
+ * @x: The horizontal coordinate of a rectangle
+ * @y: The vertical coordinate of a rectangle
+ * @width: The width of a rectangle
+ * @height: The height of a rectangle
+ *
+ * A structure used to store a rectangle used by AtkText.
+ **/
+
+typedef struct _AtkTextRectangle AtkTextRectangle;
+
+struct _AtkTextRectangle {
+  gint x;
+  gint y;
+  gint width;
+  gint height;
+};
+
+/**
+ * AtkTextRange:
+ * @bounds: A rectangle giving the bounds of the text range
+ * @start_offset: The start offset of a AtkTextRange
+ * @end_offset: The end offset of a AtkTextRange
+ * @content: The text in the text range
+ *
+ * A structure used to describe a text range.
+ **/
+typedef struct _AtkTextRange AtkTextRange;
+
+struct _AtkTextRange {
+  AtkTextRectangle bounds;
+  gint start_offset;
+  gint end_offset;
+  gchar* content;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_text_range_get_type (void);
+
+/**
+ * AtkTextIface:
+ * @get_text_after_offset: Gets specified text. This virtual function
+ *   is deprecated and it should not be overridden.
+ * @get_text_at_offset: Gets specified text. This virtual function
+ *   is deprecated and it should not be overridden.
+ * @get_text_before_offset: Gets specified text. This virtual function
+ *   is deprecated and it should not be overridden.
+ * @get_string_at_offset: Gets a portion of the text exposed through
+ *   an AtkText according to a given offset and a specific
+ *   granularity, along with the start and end offsets defining the
+ *   boundaries of such a portion of text.
+ * @text_changed: the signal handler which is executed when there is a
+ *   text change. This virtual function is deprecated sice 2.9.4 and
+ *   it should not be overriden.
+ */
+struct _AtkTextIface
+{
+  GTypeInterface parent;
+
+  gchar*         (* get_text)                     (AtkText          *text,
+                                                   gint             start_offset,
+                                                   gint             end_offset);
+  gchar*         (* get_text_after_offset)        (AtkText          *text,
+                                                   gint             offset,
+                                                   AtkTextBoundary  boundary_type,
+                                                  gint             *start_offset,
+                                                  gint             *end_offset);
+  gchar*         (* get_text_at_offset)           (AtkText          *text,
+                                                   gint             offset,
+                                                   AtkTextBoundary  boundary_type,
+                                                  gint             *start_offset,
+                                                  gint             *end_offset);
+  gunichar       (* get_character_at_offset)      (AtkText          *text,
+                                                   gint             offset);
+  gchar*         (* get_text_before_offset)       (AtkText          *text,
+                                                   gint             offset,
+                                                   AtkTextBoundary  boundary_type,
+                                                  gint             *start_offset,
+                                                  gint             *end_offset);
+  gint           (* get_caret_offset)             (AtkText          *text);
+  AtkAttributeSet* (* get_run_attributes)         (AtkText         *text,
+                                                  gint             offset,
+                                                  gint             *start_offset,
+                                                  gint             *end_offset);
+  AtkAttributeSet* (* get_default_attributes)     (AtkText         *text);
+  void           (* get_character_extents)        (AtkText          *text,
+                                                   gint             offset,
+                                                   gint             *x,
+                                                   gint             *y,
+                                                   gint             *width,
+                                                   gint             *height,
+                                                   AtkCoordType            coords);
+  gint           (* get_character_count)          (AtkText          *text);
+  gint           (* get_offset_at_point)          (AtkText          *text,
+                                                   gint             x,
+                                                   gint             y,
+                                                   AtkCoordType            coords);
+  gint          (* get_n_selections)             (AtkText          *text);
+  gchar*         (* get_selection)               (AtkText          *text,
+                                                  gint             selection_num,
+                                                  gint             *start_offset,
+                                                  gint             *end_offset);
+  gboolean       (* add_selection)               (AtkText          *text,
+                                                  gint             start_offset,
+                                                  gint             end_offset);
+  gboolean       (* remove_selection)            (AtkText          *text,
+                                                  gint             selection_num);
+  gboolean       (* set_selection)               (AtkText          *text,
+                                                  gint             selection_num,
+                                                  gint             start_offset,
+                                                  gint             end_offset);
+  gboolean       (* set_caret_offset)             (AtkText          *text,
+                                                   gint             offset);
+
+  /*
+   * signal handlers
+   */
+  void          (* text_changed)                 (AtkText          *text,
+                                                   gint             position,
+                                                   gint             length);
+  void           (* text_caret_moved)             (AtkText          *text,
+                                                   gint             location);
+  void           (* text_selection_changed)       (AtkText          *text);
+
+  void           (* text_attributes_changed)      (AtkText          *text);
+
+
+  void           (* get_range_extents)            (AtkText          *text,
+                                                   gint             start_offset,
+                                                   gint             end_offset,
+                                                   AtkCoordType     coord_type,
+                                                   AtkTextRectangle *rect);
+
+  AtkTextRange** (* get_bounded_ranges)           (AtkText          *text,
+                                                   AtkTextRectangle *rect,
+                                                   AtkCoordType     coord_type,
+                                                   AtkTextClipType  x_clip_type,
+                                                   AtkTextClipType  y_clip_type);
+
+  gchar*         (* get_string_at_offset)         (AtkText            *text,
+                                                   gint               offset,
+                                                   AtkTextGranularity granularity,
+                                                   gint               *start_offset,
+                                                   gint               *end_offset);
+  /*
+   * Scrolls this text range so it becomes visible on the screen.
+   *
+   * scroll_substring_to lets the implementation compute an appropriate target
+   * position on the screen, with type used as a positioning hint.
+   *
+   * scroll_substring_to_point lets the client specify a precise target position
+   * on the screen for the top-left of the substring.
+   *
+   * Since ATK 2.32
+   */
+  gboolean       (* scroll_substring_to)          (AtkText          *text,
+                                                   gint             start_offset,
+                                                   gint             end_offset,
+                                                   AtkScrollType    type);
+  gboolean       (* scroll_substring_to_point)    (AtkText          *text,
+                                                   gint             start_offset,
+                                                   gint             end_offset,
+                                                   AtkCoordType     coords,
+                                                   gint             x,
+                                                   gint             y);
+};
+
+GDK_AVAILABLE_IN_ALL
+GType            atk_text_get_type (void);
+
+
+/*
+ * Additional AtkObject properties used by AtkText:
+ *    "accessible_text" (accessible text has changed)
+ *    "accessible_caret" (accessible text cursor position changed:
+ *                         editable text only)
+ */
+
+GDK_AVAILABLE_IN_ALL
+gchar*        atk_text_get_text                           (AtkText          *text,
+                                                           gint             start_offset,
+                                                           gint             end_offset);
+GDK_AVAILABLE_IN_ALL
+gunichar      atk_text_get_character_at_offset            (AtkText          *text,
+                                                           gint             offset);
+GDK_AVAILABLE_IN_ALL
+gchar*        atk_text_get_string_at_offset               (AtkText            *text,
+                                                           gint               offset,
+                                                           AtkTextGranularity granularity,
+                                                           gint               *start_offset,
+                                                           gint               *end_offset);
+GDK_AVAILABLE_IN_ALL
+gint          atk_text_get_caret_offset                   (AtkText          *text);
+GDK_AVAILABLE_IN_ALL
+void          atk_text_get_character_extents              (AtkText          *text,
+                                                           gint             offset,
+                                                           gint             *x,
+                                                           gint             *y,
+                                                           gint             *width,
+                                                           gint             *height,
+                                                           AtkCoordType            coords);
+GDK_AVAILABLE_IN_ALL
+AtkAttributeSet* atk_text_get_run_attributes              (AtkText         *text,
+                                                          gint             offset,
+                                                          gint             *start_offset,
+                                                          gint             *end_offset);
+GDK_AVAILABLE_IN_ALL
+AtkAttributeSet* atk_text_get_default_attributes          (AtkText         *text);
+GDK_AVAILABLE_IN_ALL
+gint          atk_text_get_character_count                (AtkText          *text);
+GDK_AVAILABLE_IN_ALL
+gint          atk_text_get_offset_at_point                (AtkText          *text,
+                                                           gint             x,
+                                                           gint             y,
+                                                           AtkCoordType            coords);
+GDK_AVAILABLE_IN_ALL
+gint          atk_text_get_n_selections                          (AtkText          *text);
+GDK_AVAILABLE_IN_ALL
+gchar*        atk_text_get_selection                     (AtkText          *text,
+                                                          gint             selection_num,
+                                                          gint             *start_offset,
+                                                          gint             *end_offset);
+GDK_AVAILABLE_IN_ALL
+gboolean      atk_text_add_selection                      (AtkText          *text,
+                                                          gint             start_offset,
+                                                          gint             end_offset);
+GDK_AVAILABLE_IN_ALL
+gboolean      atk_text_remove_selection                   (AtkText          *text,
+                                                          gint             selection_num);
+GDK_AVAILABLE_IN_ALL
+gboolean      atk_text_set_selection                      (AtkText          *text,
+                                                          gint             selection_num,
+                                                          gint             start_offset,
+                                                          gint             end_offset);
+GDK_AVAILABLE_IN_ALL
+gboolean      atk_text_set_caret_offset                   (AtkText          *text,
+                                                           gint             offset);
+GDK_AVAILABLE_IN_ALL
+void          atk_text_get_range_extents                  (AtkText          *text,
+
+                                                           gint             start_offset,
+                                                           gint             end_offset,
+                                                           AtkCoordType     coord_type,
+                                                           AtkTextRectangle *rect);
+GDK_AVAILABLE_IN_ALL
+AtkTextRange**  atk_text_get_bounded_ranges               (AtkText          *text,
+                                                           AtkTextRectangle *rect,
+                                                           AtkCoordType     coord_type,
+                                                           AtkTextClipType  x_clip_type,
+                                                           AtkTextClipType  y_clip_type);
+GDK_AVAILABLE_IN_ALL
+void          atk_text_free_ranges                        (AtkTextRange     **ranges);
+GDK_AVAILABLE_IN_ALL
+void         atk_attribute_set_free                      (AtkAttributeSet  *attrib_set);
+GDK_AVAILABLE_IN_ALL
+const gchar*  atk_text_attribute_get_name                 (AtkTextAttribute attr);
+GDK_AVAILABLE_IN_ALL
+AtkTextAttribute       atk_text_attribute_for_name        (const gchar      *name);
+GDK_AVAILABLE_IN_ALL
+const gchar*  atk_text_attribute_get_value                (AtkTextAttribute attr,
+                                                           gint             index_);
+
+GDK_AVAILABLE_IN_ALL
+gboolean      atk_text_scroll_substring_to                (AtkText          *text,
+                                                           gint             start_offset,
+                                                           gint             end_offset,
+                                                           AtkScrollType    type);
+
+GDK_AVAILABLE_IN_ALL
+gboolean      atk_text_scroll_substring_to_point          (AtkText          *text,
+                                                           gint             start_offset,
+                                                           gint             end_offset,
+                                                           AtkCoordType     coords,
+                                                           gint             x,
+                                                           gint             y);
+
+G_END_DECLS
+
+#endif /* __ATK_TEXT_H__ */
diff --git a/atk/atktypes.h b/atk/atktypes.h
new file mode 100644
index 0000000000..2ad23deba7
--- /dev/null
+++ b/atk/atktypes.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#if !defined(__ATK_H_INSIDE__) && !defined(GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <glib-object.h>
+#include <gdk/gdk.h>
+#include <atk/atkenums.h>
diff --git a/atk/atkutil.c b/atk/atkutil.c
new file mode 100644
index 0000000000..d0c35e0ae7
--- /dev/null
+++ b/atk/atkutil.c
@@ -0,0 +1,374 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkutil.h"
+#include "atkmarshal.h"
+
+/**
+ * SECTION:atkutil
+ * @Short_description: A set of ATK utility functions for event and toolkit support.
+ * @Title:AtkUtil
+ *
+ * A set of ATK utility functions which are used to support event
+ * registration of various types, and obtaining the 'root' accessible
+ * of a process and information about the current ATK implementation
+ * and toolkit version.
+ */
+
+static void atk_util_class_init (AtkUtilClass *klass);
+
+static AtkObject *previous_focus_object = NULL;
+
+typedef struct _AtkUtilListenerInfo AtkUtilListenerInfo;
+struct _AtkUtilListenerInfo
+{
+  gint key;
+  guint signal_id;
+  gulong hook_id;
+};
+static GHashTable *listener_list = NULL;
+
+GType
+atk_util_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type)
+    {
+      static const GTypeInfo typeInfo =
+      {
+        sizeof (AtkUtilClass),
+        (GBaseInitFunc) NULL,
+        (GBaseFinalizeFunc) NULL,
+        (GClassInitFunc) atk_util_class_init,
+        (GClassFinalizeFunc) NULL,
+        NULL,
+        sizeof (AtkUtil),
+        0,
+        (GInstanceInitFunc) NULL,
+      } ;
+      type = g_type_register_static (G_TYPE_OBJECT, "AtkUtil", &typeInfo, 0) ;
+    }
+  return type;
+}
+
+typedef struct _FocusTracker FocusTracker;
+
+struct _FocusTracker {
+  guint index;
+  AtkEventListener func;
+};
+
+static guint
+add_listener (GSignalEmissionHook listener,
+              const gchar         *object_type,
+              const gchar         *signal_name,
+              const gchar         *detail_string,
+              const gchar         *hook_data)
+{
+  GType type;
+  guint signal_id;
+  gint  rc = 0;
+  static gint listener_idx = 1;
+  GQuark detail_quark = 0;
+
+  type = g_type_from_name (object_type);
+  if (type)
+    {
+      signal_id  = g_signal_lookup (signal_name, type);
+      detail_quark = g_quark_from_string (detail_string);
+
+      if (signal_id > 0)
+        {
+          AtkUtilListenerInfo *listener_info;
+
+          rc = listener_idx;
+
+          listener_info = g_new (AtkUtilListenerInfo, 1);
+          listener_info->key = listener_idx;
+          listener_info->hook_id =
+            g_signal_add_emission_hook (signal_id, detail_quark, listener,
+                                        g_strdup (hook_data),
+                                        (GDestroyNotify) g_free);
+          listener_info->signal_id = signal_id;
+
+         g_hash_table_insert(listener_list, &(listener_info->key), listener_info);
+          listener_idx++;
+        }
+      else
+        {
+          g_debug ("Signal type %s not supported\n", signal_name);
+        }
+    }
+  else
+    {
+      g_warning("Invalid object type %s\n", object_type);
+    }
+  return rc;
+}
+
+static guint
+atk_util_real_add_global_event_listener (GSignalEmissionHook listener,
+                                         const gchar *event_type)
+{
+  guint rc = 0;
+  gchar **split_string;
+  guint length;
+
+  split_string = g_strsplit (event_type, ":", 0);
+  length = g_strv_length (split_string);
+
+  if ((length == 3) || (length == 4))
+    rc = add_listener (listener, split_string[1], split_string[2],
+                       split_string[3], event_type);
+
+  g_strfreev (split_string);
+
+  return rc;
+}
+
+static void
+atk_util_real_remove_global_event_listener (guint remove_listener)
+{
+  if (remove_listener > 0)
+    {
+      AtkUtilListenerInfo *listener_info;
+      gint tmp_idx = remove_listener;
+
+      listener_info = (AtkUtilListenerInfo *)
+        g_hash_table_lookup(listener_list, &tmp_idx);
+
+      if (listener_info != NULL)
+        {
+          /* Hook id of 0 and signal id of 0 are invalid */
+          if (listener_info->hook_id != 0 && listener_info->signal_id != 0)
+            {
+              /* Remove the emission hook */
+              g_signal_remove_emission_hook(listener_info->signal_id,
+                                            listener_info->hook_id);
+
+              /* Remove the element from the hash */
+              g_hash_table_remove(listener_list, &tmp_idx);
+            }
+          else
+            {
+              g_warning("Invalid listener hook_id %ld or signal_id %d\n",
+                        listener_info->hook_id, listener_info->signal_id);
+            }
+        }
+      else
+        {
+          g_warning("No listener with the specified listener id %d",
+                    remove_listener);
+        }
+    }
+  else
+    {
+      g_warning("Invalid listener_id %d", remove_listener);
+    }
+}
+
+
+/**
+ * atk_add_global_event_listener: (skip)
+ * @listener: the listener to notify
+ * @event_type: the type of event for which notification is requested
+ *
+ * Adds the specified function to the list of functions to be called
+ * when an ATK event of type event_type occurs.
+ *
+ * The format of event_type is the following:
+ *  "ATK:&lt;atk_type&gt;:&lt;atk_event&gt;:&lt;atk_event_detail&gt;
+ *
+ * Where "ATK" works as the namespace, &lt;atk_interface&gt; is the name of
+ * the ATK type (interface or object), &lt;atk_event&gt; is the name of the
+ * signal defined on that interface and &lt;atk_event_detail&gt; is the
+ * gsignal detail of that signal. You can find more info about gsignal
+ * details here:
+ * http://developer.gnome.org/gobject/stable/gobject-Signals.html
+ *
+ * The first three parameters are mandatory. The last one is optional.
+ *
+ * For example:
+ *   ATK:AtkObject:state-change
+ *   ATK:AtkText:text-selection-changed
+ *   ATK:AtkText:text-insert:system
+ *
+ * Toolkit implementor note: ATK provides a default implementation for
+ * this virtual method. ATK implementors are discouraged from
+ * reimplementing this method.
+ *
+ * Toolkit implementor note: this method is not intended to be used by
+ * ATK implementors but by ATK consumers.
+ *
+ * ATK consumers note: as this method adds a listener for a given ATK
+ * type, that type should be already registered on the GType system
+ * before calling this method. A simple way to do that is creating an
+ * instance of #AtkNoOpObject. This class implements all ATK
+ * interfaces, so creating the instance will register all ATK types as
+ * a collateral effect.
+ *
+ * Returns: added event listener id, or 0 on failure.
+ **/
+guint
+atk_add_global_event_listener (GSignalEmissionHook listener,
+                              const gchar        *event_type)
+{
+  guint retval;
+  AtkUtilClass *klass = g_type_class_ref (ATK_TYPE_UTIL);
+
+  if (klass->add_global_event_listener)
+    {
+      retval = klass->add_global_event_listener (listener, event_type);
+    }
+  else
+    {
+      retval = 0;
+    }
+  g_type_class_unref (klass);
+
+  return retval;
+}
+
+/**
+ * atk_remove_global_event_listener:
+ * @listener_id: the id of the event listener to remove
+ *
+ * @listener_id is the value returned by #atk_add_global_event_listener
+ * when you registered that event listener.
+ *
+ * Toolkit implementor note: ATK provides a default implementation for
+ * this virtual method. ATK implementors are discouraged from
+ * reimplementing this method.
+ *
+ * Toolkit implementor note: this method is not intended to be used by
+ * ATK implementors but by ATK consumers.
+ *
+ * Removes the specified event listener
+ **/
+void
+atk_remove_global_event_listener (guint listener_id)
+{
+  AtkUtilClass *klass = g_type_class_peek (ATK_TYPE_UTIL);
+
+  if (klass && klass->remove_global_event_listener)
+    klass->remove_global_event_listener (listener_id);
+}
+
+/**
+ * atk_add_key_event_listener: (skip)
+ * @listener: the listener to notify
+ * @data: a #gpointer that points to a block of data that should be sent to the registered listeners,
+ *        along with the event notification, when it occurs.  
+ *
+ * Adds the specified function to the list of functions to be called
+ *        when a key event occurs.  The @data element will be passed to the
+ *        #AtkKeySnoopFunc (@listener) as the @func_data param, on notification.
+ *
+ * Returns: added event listener id, or 0 on failure.
+ **/
+guint
+atk_add_key_event_listener (AtkKeySnoopFunc listener, gpointer data)
+{
+  guint retval;
+  AtkUtilClass *klass = g_type_class_peek (ATK_TYPE_UTIL);
+  if (klass && klass->add_key_event_listener)
+    {
+      retval = klass->add_key_event_listener (listener, data);
+    }
+  else
+    {
+      retval = 0;
+    }
+
+  return retval;
+}
+
+/**
+ * atk_remove_key_event_listener:
+ * @listener_id: the id of the event listener to remove
+ *
+ * @listener_id is the value returned by #atk_add_key_event_listener
+ * when you registered that event listener.
+ *
+ * Removes the specified event listener.
+ **/
+void
+atk_remove_key_event_listener (guint listener_id)
+{
+  AtkUtilClass *klass = g_type_class_peek (ATK_TYPE_UTIL);
+
+  if (klass->remove_key_event_listener)
+    klass->remove_key_event_listener (listener_id);
+}
+
+/**
+ * atk_get_root:
+ *
+ * Gets the root accessible container for the current application.
+ *
+ * Returns: (transfer none): the root accessible container for the current
+ * application
+ **/
+AtkObject*
+atk_get_root (void)
+{
+  AtkUtilClass *klass = g_type_class_ref (ATK_TYPE_UTIL);
+  AtkObject    *retval;
+  if (klass->get_root)
+    {
+      retval = klass->get_root ();
+    }
+  else
+    {
+      retval = NULL;
+    }
+  g_type_class_unref (klass);
+
+  return retval;
+}
+
+/**
+ * atk_get_focus_object:
+ *
+ * Gets the currently focused object.
+ * 
+ * Since: 1.6
+ *
+ * Returns: (transfer none): the currently focused object for the current
+ * application
+ **/
+AtkObject*
+atk_get_focus_object (void)
+{
+  return previous_focus_object;
+}
+
+static void
+atk_util_class_init (AtkUtilClass *klass)
+{
+  klass->add_global_event_listener = atk_util_real_add_global_event_listener;
+  klass->remove_global_event_listener = atk_util_real_remove_global_event_listener;
+  klass->get_root = NULL;
+
+  listener_list = g_hash_table_new_full (g_int_hash, g_int_equal, NULL,
+                                         g_free);
+}
diff --git a/atk/atkutil.h b/atk/atkutil.h
new file mode 100644
index 0000000000..a6af7ceeec
--- /dev/null
+++ b/atk/atkutil.h
@@ -0,0 +1,306 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_UTIL_H__
+#define __ATK_UTIL_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_UTIL                   (atk_util_get_type ())
+#define ATK_IS_UTIL(obj)                G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_UTIL)
+#define ATK_UTIL(obj)                   G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_UTIL, AtkUtil)
+#define ATK_UTIL_CLASS(klass)                   (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_UTIL, 
AtkUtilClass))
+#define ATK_IS_UTIL_CLASS(klass)                (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_UTIL))
+#define ATK_UTIL_GET_CLASS(obj)                 (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_UTIL, 
AtkUtilClass))
+
+
+#ifndef _TYPEDEF_ATK_UTIL_
+#define _TYPEDEF_ATK_UTIL_
+typedef struct _AtkUtil      AtkUtil;
+typedef struct _AtkUtilClass AtkUtilClass;
+typedef struct _AtkKeyEventStruct AtkKeyEventStruct;
+#endif
+
+/**
+ * AtkEventListener: 
+ * @obj: An #AtkObject instance for whom the callback will be called when
+ * the specified event (e.g. 'focus:') takes place.
+ *
+ * A function which is called when an object emits a matching event,
+ * as used in #atk_add_focus_tracker.
+ * Currently the only events for which object-specific handlers are
+ * supported are events of type "focus:".  Most clients of ATK will prefer to 
+ * attach signal handlers for the various ATK signals instead.
+ *
+ * see atk_add_focus_tracker.
+ **/
+typedef void  (*AtkEventListener) (AtkObject* obj);
+/**
+ * AtkEventListenerInit:
+ *
+ * An #AtkEventListenerInit function is a special function that is
+ * called in order to initialize the per-object event registration system
+ * used by #AtkEventListener, if any preparation is required.  
+ *
+ * see atk_focus_tracker_init.
+ **/
+typedef void  (*AtkEventListenerInit) (void);
+/**
+ * AtkKeySnoopFunc:
+ * @event: an AtkKeyEventStruct containing information about the key event for which
+ * notification is being given.
+ * @user_data: a block of data which will be passed to the event listener, on notification.
+ *
+ * An #AtkKeySnoopFunc is a type of callback which is called whenever a key event occurs, 
+ * if registered via atk_add_key_event_listener.  It allows for pre-emptive 
+ * interception of key events via the return code as described below.
+ *
+ * Returns: TRUE (nonzero) if the event emission should be stopped and the event 
+ * discarded without being passed to the normal GUI recipient; FALSE (zero) if the 
+ * event dispatch to the client application should proceed as normal.
+ *
+ * see atk_add_key_event_listener.
+ **/
+typedef gint  (*AtkKeySnoopFunc)  (AtkKeyEventStruct *event,
+                                  gpointer user_data);
+
+/**
+ * AtkKeyEventStruct:
+ * @type: An AtkKeyEventType, generally one of ATK_KEY_EVENT_PRESS or ATK_KEY_EVENT_RELEASE
+ * @state: A bitmask representing the state of the modifier keys immediately after the event takes place.   
+ * The meaning of the bits is currently defined to match the bitmask used by GDK in
+ * GdkEventType.state, see 
+ * http://developer.gnome.org/doc/API/2.0/gdk/gdk-Event-Structures.html#GdkEventKey
+ * @keyval: A guint representing a keysym value corresponding to those used by GDK and X11: see
+ * /usr/X11/include/keysymdef.h.
+ * @length: The length of member #string.
+ * @string: A string containing one of the following: either a string approximating the text that would 
+ * result from this keypress, if the key is a control or graphic character, or a symbolic name for this 
keypress.
+ * Alphanumeric and printable keys will have the symbolic key name in this string member, for instance "A". 
"0", 
+ * "semicolon", "aacute".  Keypad keys have the prefix "KP".
+ * @keycode: The raw hardware code that generated the key event.  This field is raraly useful.
+ * @timestamp: A timestamp in milliseconds indicating when the event occurred.  
+ * These timestamps are relative to a starting point which should be considered arbitrary, 
+ * and only used to compare the dispatch times of events to one another.
+ *
+ * Encapsulates information about a key event.
+ **/
+struct _AtkKeyEventStruct {
+  gint type;
+  guint state;
+  guint keyval;
+  gint length;
+  gchar *string;
+  guint16 keycode;
+  guint32 timestamp;   
+};
+
+struct _AtkUtil
+{
+  GObject parent;
+};
+
+/**
+ * AtkUtilClass:
+ * @add_global_event_listener: adds the specified function to the list
+ *  of functions to be called when an ATK event occurs. ATK
+ *  implementors are discouraged from reimplementing this method.
+ * @remove_global_event_listener: removes the specified function to
+ *  the list of functions to be called when an ATK event occurs. ATK
+ *  implementors are discouraged from reimplementing this method.
+ * @add_key_event_listener: adds the specified function to the list of
+ *  functions to be called when a key event occurs.
+ * @remove_key_event_listener: remove the specified function to the
+ *  list of functions to be called when a key event occurs.
+ * @get_root: gets the root accessible container for the current
+ *  application.
+ */
+struct _AtkUtilClass
+{
+   GObjectClass parent;
+   guint        (* add_global_event_listener)    (GSignalEmissionHook listener,
+                                                 const gchar        *event_type);
+   void         (* remove_global_event_listener) (guint               listener_id);
+   guint       (* add_key_event_listener)       (AtkKeySnoopFunc     listener,
+                                                 gpointer data);
+   void         (* remove_key_event_listener)    (guint               listener_id);
+   AtkObject*   (* get_root)                     (void);
+};
+GDK_AVAILABLE_IN_ALL
+GType atk_util_get_type (void);
+
+GDK_AVAILABLE_IN_ALL
+guint  atk_add_global_event_listener (GSignalEmissionHook listener,
+                                      const gchar        *event_type);
+GDK_AVAILABLE_IN_ALL
+void   atk_remove_global_event_listener (guint listener_id);
+GDK_AVAILABLE_IN_ALL
+guint  atk_add_key_event_listener (AtkKeySnoopFunc listener, gpointer data);
+GDK_AVAILABLE_IN_ALL
+void   atk_remove_key_event_listener (guint listener_id);
+
+GDK_AVAILABLE_IN_ALL
+AtkObject* atk_get_root(void);
+GDK_AVAILABLE_IN_ALL
+AtkObject* atk_get_focus_object (void);
+
+/* --- GType boilerplate --- */
+/* convenience macros for atk type implementations, which for a type GtkGadgetAccessible will:
+ * - prototype: static void     gtk_gadget_accessible_class_init (GtkGadgetClass *klass);
+ * - prototype: static void     gtk_gadget_accessible_init       (GtkGadget      *self);
+ * - define:    static gpointer gtk_gadget_accessible_parent_class = NULL;
+ *   gtk_gadget_accessible_parent_class is initialized prior to calling gtk_gadget_class_init()
+ * - implement: GType           gtk_gadget_accessible_get_type (void) { ... }
+ * - support custom code in gtk_gadget_accessible_get_type() after the type is registered.
+ *
+ * macro arguments: TypeName, type_name, TYPE_PARENT, CODE
+ * example: ATK_DEFINE_TYPE_WITH_CODE (GtkGadgetAccessible, gtk_gadget_accessible, GTK_TYPE_GADGET,
+ *                                     G_IMPLEMENT_INTERFACE (ATK_TYPE_TABLE, 
gtk_gadget_accessible_table_iface_init))
+ */
+
+/**
+ * ATK_DEFINE_TYPE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ *
+ * A convenience macro for type ATK implementations, which declares a class
+ * initialization function, an instance initialization function (see #GTypeInfo
+ * for information about these) and a static variable named
+ * @t_n _parent_class pointing to the parent class. Furthermore, it
+ * defines a _get_type() function.
+ *
+ * Since: 1.22
+ */
+#define ATK_DEFINE_TYPE(TN, t_n, T_P)                         ATK_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
+
+/**
+ * ATK_DEFINE_TYPE_WITH_CODE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ * @_C_: Custom code that gets inserted in the _get_type() function.
+ *
+ * A convenience macro for ATK type implementations.
+ * Similar to ATK_DEFINE_TYPE(), but allows you to insert custom code into the
+ * _get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
+ *
+ * Since: 1.22
+ */
+#define ATK_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_)         _ATK_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 
0) {_C_;} _ATK_DEFINE_TYPE_EXTENDED_END()
+
+/**
+ * ATK_DEFINE_ABSTRACT_TYPE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ *
+ * A convenience macro for ATK type implementations.
+ * Similar to ATK_DEFINE_TYPE(), but defines an abstract type.
+ *
+ * Since: 1.22
+ */
+#define ATK_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P)                ATK_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 
G_TYPE_FLAG_ABSTRACT, {})
+
+/**
+ * ATK_DEFINE_ABSTRACT_TYPE_WITH_CODE:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ * @_C_: Custom code that gets inserted in the _get_type() function.
+ *
+ * A convenience macro for ATK type implementations.
+ * Similar to ATK_DEFINE_TYPE_WITH_CODE(), but defines an abstract type.
+ *
+ * Since: 1.22
+ */
+#define ATK_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _ATK_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 
G_TYPE_FLAG_ABSTRACT) {_C_;} _ATK_DEFINE_TYPE_EXTENDED_END()
+
+/**
+ * ATK_DEFINE_TYPE_EXTENDED:
+ * @TN: The name of the new type, in Camel case.
+ * @t_n: The name of the new type, in lowercase, with words separated by '_'.
+ * @T_P: The #GType of the parent type.
+ * @_f_: #GTypeFlags to pass to g_type_register_static()
+ * @_C_: Custom code that gets inserted in the _get_type() function.
+ *
+ * The most general convenience macro for ATK type implementations, on which
+ * ATK_DEFINE_TYPE(), etc are based.
+ *
+ * Since: 1.22
+ */
+#define ATK_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)      _ATK_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 
_f_) {_C_;} _ATK_DEFINE_TYPE_EXTENDED_END()
+
+#define _ATK_DEFINE_TYPE_EXTENDED_BEGIN(TypeName, type_name, TYPE, flags) \
+\
+static void     type_name##_init              (TypeName        *self); \
+static void     type_name##_class_init        (TypeName##Class *klass); \
+static gpointer type_name##_parent_class = NULL; \
+static void     type_name##_class_intern_init (gpointer klass) \
+{ \
+  type_name##_parent_class = g_type_class_peek_parent (klass); \
+  type_name##_class_init ((TypeName##Class*) klass); \
+} \
+\
+GDK_AVAILABLE_IN_ALL \
+GType \
+type_name##_get_type (void) \
+{ \
+  static volatile gsize g_define_type_id__volatile = 0; \
+  if (g_once_init_enter (&g_define_type_id__volatile))  \
+    { \
+      AtkObjectFactory *factory; \
+      GType derived_type; \
+      GTypeQuery query; \
+      GType derived_atk_type; \
+      GType g_define_type_id; \
+\
+      /* Figure out the size of the class and instance we are deriving from */ \
+      derived_type = g_type_parent (TYPE); \
+      factory = atk_registry_get_factory (atk_get_default_registry (), \
+                                          derived_type); \
+      derived_atk_type = atk_object_factory_get_accessible_type (factory); \
+      g_type_query (derived_atk_type, &query); \
+\
+      g_define_type_id = \
+        g_type_register_static_simple (derived_atk_type, \
+                                       g_intern_static_string (#TypeName), \
+                                       query.class_size, \
+                                       (GClassInitFunc) type_name##_class_intern_init, \
+                                       query.instance_size, \
+                                       (GInstanceInitFunc) type_name##_init, \
+                                       (GTypeFlags) flags); \
+      { /* custom code follows */
+#define _ATK_DEFINE_TYPE_EXTENDED_END()        \
+        /* following custom code */    \
+      }                                        \
+      g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
+    }                                  \
+  return g_define_type_id__volatile;   \
+} /* closes type_name##_get_type() */
+
+G_END_DECLS
+
+#endif /* __ATK_UTIL_H__ */
diff --git a/atk/atkvalue.c b/atk/atkvalue.c
new file mode 100644
index 0000000000..b8b36da7c4
--- /dev/null
+++ b/atk/atkvalue.c
@@ -0,0 +1,591 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001, 2002, 2003 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <glib/gi18n-lib.h>
+
+#include "atkvalue.h"
+#include "atkmarshal.h"
+#include "atk-enum-types.h"
+#include "atkprivate.h"
+
+/**
+ * SECTION:atkvalue
+ * @Short_description: The ATK interface implemented by valuators and
+ *  components which display or select a value from a bounded range of
+ *  values.
+ * @Title:AtkValue
+ *
+ * #AtkValue should be implemented for components which either display
+ * a value from a bounded range, or which allow the user to specify a
+ * value from a bounded range, or both. For instance, most sliders and
+ * range controls, as well as dials, should have #AtkObject
+ * representations which implement #AtkValue on the component's
+ * behalf. #AtKValues may be read-only, in which case attempts to
+ * alter the value return would fail.
+ *
+ * <refsect1 id="current-value-text">
+ * <title>On the subject of current value text</title>
+ * <para>
+ * In addition to providing the current value, implementors can
+ * optionally provide an end-user-consumable textual description
+ * associated with this value. This description should be included
+ * when the numeric value fails to convey the full, on-screen
+ * representation seen by users.
+ * </para>
+ *
+ * <example>
+ * <title>Password strength</title>
+ * A password strength meter whose value changes as the user types
+ * their new password. Red is used for values less than 4.0, yellow
+ * for values between 4.0 and 7.0, and green for values greater than
+ * 7.0. In this instance, value text should be provided by the
+ * implementor. Appropriate value text would be "weak", "acceptable,"
+ * and "strong" respectively.
+ * </example>
+ *
+ * A level bar whose value changes to reflect the battery charge. The
+ * color remains the same regardless of the charge and there is no
+ * on-screen text reflecting the fullness of the battery. In this
+ * case, because the position within the bar is the only indication
+ * the user has of the current charge, value text should not be
+ * provided by the implementor.
+ *
+ * <refsect2 id="implementor-notes">
+ * <title>Implementor Notes</title>
+ * <para>
+ * Implementors should bear in mind that assistive technologies will
+ * likely prefer the value text provided over the numeric value when
+ * presenting a widget's value. As a result, strings not intended for
+ * end users should not be exposed in the value text, and strings
+ * which are exposed should be localized. In the case of widgets which
+ * display value text on screen, for instance through a separate label
+ * in close proximity to the value-displaying widget, it is still
+ * expected that implementors will expose the value text using the
+ * above API.
+ * </para>
+ *
+ * <para>
+ * #AtkValue should NOT be implemented for widgets whose displayed
+ * value is not reflective of a meaningful amount. For instance, a
+ * progress pulse indicator whose value alternates between 0.0 and 1.0
+ * to indicate that some process is still taking place should not
+ * implement #AtkValue because the current value does not reflect
+ * progress towards completion.
+ * </para>
+ * </refsect2>
+ * </refsect1>
+ *
+ * <refsect1 id="ranges">
+ * <title>On the subject of ranges</title>
+ * <para>
+ * In addition to providing the minimum and maximum values,
+ * implementors can optionally provide details about subranges
+ * associated with the widget. These details should be provided by the
+ * implementor when both of the following are communicated visually to
+ * the end user:
+ * </para>
+ * <itemizedlist>
+ *   <listitem>The existence of distinct ranges such as "weak",
+ *   "acceptable", and "strong" indicated by color, bar tick marks,
+ *   and/or on-screen text.</listitem>
+ *   <listitem>Where the current value stands within a given subrange,
+ *   for instance illustrating progression from very "weak" towards
+ *   nearly "acceptable" through changes in shade and/or position on
+ *   the bar within the "weak" subrange.</listitem>
+ * </itemizedlist>
+ * <para>
+ * If both of the above do not apply to the widget, it should be
+ * sufficient to expose the numeric value, along with the value text
+ * if appropriate, to make the widget accessible.
+ * </para>
+ *
+ * <refsect2 id="ranges-implementor-notes">
+ * <title>Implementor Notes</title>
+ * <para>
+ * If providing subrange details is deemed necessary, all possible
+ * values of the widget are expected to fall within one of the
+ * subranges defined by the implementor.
+ * </para>
+ * </refsect2>
+ * </refsect1>
+ *
+ * <refsect1 id="localization">
+ * <title>On the subject of localization of end-user-consumable text
+ * values</title>
+ * <para>
+ * Because value text and subrange descriptors are human-consumable,
+ * implementors are expected to provide localized strings which can be
+ * directly presented to end users via their assistive technology. In
+ * order to simplify this for implementors, implementors can use
+ * atk_value_type_get_localized_name() with the following
+ * already-localized constants for commonly-needed values can be used:
+ * </para>
+ *
+ * <itemizedlist>
+ *   <listitem>ATK_VALUE_VERY_WEAK</listitem>
+ *   <listitem>ATK_VALUE_WEAK</listitem>
+ *   <listitem>ATK_VALUE_ACCEPTABLE</listitem>
+ *   <listitem>ATK_VALUE_STRONG</listitem>
+ *   <listitem>ATK_VALUE_VERY_STRONG</listitem>
+ *   <listitem>ATK_VALUE_VERY_LOW</listitem>
+ *   <listitem>ATK_VALUE_LOW</listitem>
+ *   <listitem>ATK_VALUE_MEDIUM</listitem>
+ *   <listitem>ATK_VALUE_HIGH</listitem>
+ *   <listitem>ATK_VALUE_VERY_HIGH</listitem>
+ *   <listitem>ATK_VALUE_VERY_BAD</listitem>
+ *   <listitem>ATK_VALUE_BAD</listitem>
+ *   <listitem>ATK_VALUE_GOOD</listitem>
+ *   <listitem>ATK_VALUE_VERY_GOOD</listitem>
+ *   <listitem>ATK_VALUE_BEST</listitem>
+ *   <listitem>ATK_VALUE_SUBSUBOPTIMAL</listitem>
+ *   <listitem>ATK_VALUE_SUBOPTIMAL</listitem>
+ *   <listitem>ATK_VALUE_OPTIMAL</listitem>
+ * </itemizedlist>
+ * <para>
+ * Proposals for additional constants, along with their use cases,
+ * should be submitted to the GNOME Accessibility Team.
+ * </para>
+ * </refsect1>
+ *
+ * <refsect1 id="changes">
+ * <title>On the subject of changes</title>
+ * <para>
+ * Note that if there is a textual description associated with the new
+ * numeric value, that description should be included regardless of
+ * whether or not it has also changed.
+ * </para>
+ * </refsect1>
+ */
+
+static GPtrArray *value_type_names = NULL;
+
+enum {
+  VALUE_CHANGED,
+  LAST_SIGNAL
+};
+
+/* These are listed here for extraction by intltool */
+#if 0
+/* Translators: This string describes a range within value-related
+ * widgets such as a password-strength meter. Note that what such a
+ * widget presents is controlled by application developers. Thus
+ * assistive technologies such as screen readers are expected to
+ * present this string alone or as a token in a list.
+ */
+N_("very weak")
+/* Translators: This string describes a range within value-related
+ * widgets such as a password-strength meter. Note that what such a
+ * widget presents is controlled by application developers. Thus
+ * assistive technologies such as screen readers are expected to
+ * present this string alone or as a token in a list.
+ */
+N_("weak")
+/* Translators: This string describes a range within value-related
+ * widgets such as a password-strength meter. Note that what such a
+ * widget presents is controlled by application developers. Thus
+ * assistive technologies such as screen readers are expected to
+ * present this string alone or as a token in a list.
+ */
+N_("acceptable")
+/* Translators: This string describes a range within value-related
+ * widgets such as a password-strength meter. Note that what such a
+ * widget presents is controlled by application developers. Thus
+ * assistive technologies such as screen readers are expected to
+ * present this string alone or as a token in a list.
+ */
+N_("strong")
+/* Translators: This string describes a range within value-related
+ * widgets such as a password-strength meter. Note that what such a
+ * widget presents is controlled by application developers. Thus
+ * assistive technologies such as screen readers are expected to
+ * present this string alone or as a token in a list.
+ */
+N_("very strong")
+/* Translators: This string describes a range within value-related
+ * widgets such as a volume slider. Note that what such a widget
+ * presents (e.g. temperature, volume, price) is controlled by
+ * application developers. Thus assistive technologies such as screen
+ * readers are expected to present this string alone or as a token in
+ * a list.
+ */
+N_("very low")
+/* Translators: This string describes a range within value-related
+ * widgets such as a volume slider. Note that what such a widget
+ * presents (e.g. temperature, volume, price) is controlled by
+ * application developers. Thus assistive technologies such as screen
+ * readers are expected to present this string alone or as a token in
+ * a list.
+ */
+N_("medium")
+/* Translators: This string describes a range within value-related
+ * widgets such as a volume slider. Note that what such a widget
+ * presents (e.g. temperature, volume, price) is controlled by
+ * application developers. Thus assistive technologies such as screen
+ * readers are expected to present this string alone or as a token in
+ * a list.
+ */
+N_("high")
+/* Translators: This string describes a range within value-related
+ * widgets such as a volume slider. Note that what such a widget
+ * presents (e.g. temperature, volume, price) is controlled by
+ * application developers. Thus assistive technologies such as screen
+ * readers are expected to present this string alone or as a token in
+ * a list.
+ */
+N_("very high")
+/* Translators: This string describes a range within value-related
+ * widgets such as a hard drive usage. Note that what such a widget
+ * presents (e.g. hard drive usage, network traffic) is controlled by
+ * application developers. Thus assistive technologies such as screen
+ * readers are expected to present this string alone or as a token in
+ * a list.
+ */
+N_("very bad")
+/* Translators: This string describes a range within value-related
+ * widgets such as a hard drive usage. Note that what such a widget
+ * presents (e.g. hard drive usage, network traffic) is controlled by
+ * application developers. Thus assistive technologies such as screen
+ * readers are expected to present this string alone or as a token in
+ * a list.
+ */
+N_("bad")
+/* Translators: This string describes a range within value-related
+ * widgets such as a hard drive usage. Note that what such a widget
+ * presents (e.g. hard drive usage, network traffic) is controlled by
+ * application developers. Thus assistive technologies such as screen
+ * readers are expected to present this string alone or as a token in
+ * a list.
+ */
+N_("good")
+/* Translators: This string describes a range within value-related
+ * widgets such as a hard drive usage. Note that what such a widget
+ * presents (e.g. hard drive usage, network traffic) is controlled by
+ * application developers. Thus assistive technologies such as screen
+ * readers are expected to present this string alone or as a token in
+ * a list.
+ */
+N_("very good")
+/* Translators: This string describes a range within value-related
+ * widgets such as a hard drive usage. Note that what such a widget
+ * presents (e.g. hard drive usage, network traffic) is controlled by
+ * application developers. Thus assistive technologies such as screen
+ * readers are expected to present this string alone or as a token in
+ * a list.
+ */
+N_("best")
+#endif
+
+static void atk_value_base_init (AtkValueIface *class);
+
+static guint atk_value_signals[LAST_SIGNAL] = {0};
+
+GType
+atk_value_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type) {
+    GTypeInfo tinfo =
+    {
+      sizeof (AtkValueIface),
+      (GBaseInitFunc) atk_value_base_init,
+      (GBaseFinalizeFunc) NULL,
+
+    };
+
+    type = g_type_register_static (G_TYPE_INTERFACE, "AtkValue", &tinfo, 0);
+  }
+
+  return type;
+}
+
+static void
+atk_value_base_init (AtkValueIface *class)
+{
+  static gboolean initialized = FALSE;
+  if (!initialized)
+    {
+      /**
+       * AtkValue::value-changed:
+       * @atkvalue: the object on which the signal was emitted.
+       * @value: the new value in a numerical form.
+       * @text: human readable text alternative (also called
+       * description) of this object. NULL if not available.
+       *
+       * The 'value-changed' signal is emitted when the current value
+       * that represent the object changes. @value is the numerical
+       * representation of this new value.  @text is the human
+       * readable text alternative of @value, and can be NULL if it is
+       * not available. Note that if there is a textual description
+       * associated with the new numeric value, that description
+       * should be included regardless of whether or not it has also
+       * changed.
+       *
+       * Example: a password meter whose value changes as the user
+       * types their new password. Appropiate value text would be
+       * "weak", "acceptable" and "strong".
+       *
+       * Since: 2.12
+       */
+      atk_value_signals[VALUE_CHANGED] =
+        g_signal_new ("value_changed",
+                      ATK_TYPE_VALUE,
+                      G_SIGNAL_RUN_LAST,
+                      0,
+                      (GSignalAccumulator) NULL, NULL,
+                      atk_marshal_VOID__DOUBLE_STRING,
+                      G_TYPE_NONE,
+                      2, G_TYPE_DOUBLE, G_TYPE_STRING);
+
+      initialized = TRUE;
+    }
+}
+
+/**
+ * atk_value_get_value_and_text:
+ * @obj: a GObject instance that implements AtkValueIface
+ * @value: (out): address of #gdouble to put the current value of @obj
+ * @text: (out) (allow-none): address of #gchar to put the human
+ * readable text alternative for @value
+ *
+ * Gets the current value and the human readable text alternative of
+ * @obj. @text is a newly created string, that must be freed by the
+ * caller. Can be NULL if no descriptor is available.
+ *
+ * Since: 2.12
+ **/
+
+void
+atk_value_get_value_and_text (AtkValue *obj,
+                              gdouble *value,
+                              gchar  **text)
+{
+  AtkValueIface *iface;
+
+  g_return_if_fail (ATK_IS_VALUE (obj));
+
+  iface = ATK_VALUE_GET_IFACE (obj);
+
+  if (iface->get_value_and_text)
+    {
+      (iface->get_value_and_text) (obj, value, text);
+    }
+  else
+    {
+      *value = 0.0;
+      *text = NULL;
+    }
+}
+
+/**
+ * atk_value_get_range:
+ * @obj: a GObject instance that implements AtkValueIface
+ *
+ * Gets the range of this object.
+ *
+ * Returns: (nullable) (transfer full): a newly allocated #AtkRange
+ * that represents the minimum, maximum and descriptor (if available)
+ * of @obj. NULL if that range is not defined.
+ *
+ * Since: 2.12
+ **/
+AtkRange*
+atk_value_get_range (AtkValue *obj)
+{
+  AtkValueIface *iface;
+
+  g_return_val_if_fail (ATK_IS_VALUE (obj), NULL);
+
+  iface = ATK_VALUE_GET_IFACE (obj);
+
+  if (iface->get_range)
+    {
+      return (iface->get_range) (obj);
+    }
+  else
+    return NULL;
+}
+
+/**
+ * atk_value_get_increment:
+ * @obj: a GObject instance that implements AtkValueIface
+ *
+ * Gets the minimum increment by which the value of this object may be
+ * changed.  If zero, the minimum increment is undefined, which may
+ * mean that it is limited only by the floating point precision of the
+ * platform.
+ *
+ * Return value: the minimum increment by which the value of this
+ * object may be changed. zero if undefined.
+ *
+ * Since: 2.12
+ **/
+gdouble
+atk_value_get_increment (AtkValue *obj)
+{
+  AtkValueIface *iface;
+
+  g_return_val_if_fail (ATK_IS_VALUE (obj), 0);
+
+  iface = ATK_VALUE_GET_IFACE (obj);
+
+  if (iface->get_increment)
+    {
+      return (iface->get_increment) (obj);
+    }
+  else
+    return 0;
+}
+
+
+/**
+ * atk_value_get_sub_ranges:
+ * @obj: a GObject instance that implements AtkValueIface
+ *
+ * Gets the list of subranges defined for this object. See #AtkValue
+ * introduction for examples of subranges and when to expose them.
+ *
+ * Returns: (element-type AtkRange) (transfer full): an #GSList of
+ * #AtkRange which each of the subranges defined for this object. Free
+ * the returns list with g_slist_free().
+ *
+ * Since: 2.12
+ **/
+GSList*
+atk_value_get_sub_ranges (AtkValue *obj)
+{
+  AtkValueIface *iface;
+
+  g_return_val_if_fail (ATK_IS_VALUE (obj), NULL);
+
+  iface = ATK_VALUE_GET_IFACE (obj);
+
+  if (iface->get_sub_ranges)
+    {
+      return (iface->get_sub_ranges) (obj);
+    }
+  else
+    return NULL;
+}
+
+/**
+ * atk_value_set_value:
+ * @obj: a GObject instance that implements AtkValueIface
+ * @new_value: a double which is the desired new accessible value.
+ *
+ * Sets the value of this object.
+ *
+ * This method is intended to provide a way to change the value of the
+ * object. In any case, it is possible that the value can't be
+ * modified (ie: a read-only component). If the value changes due this
+ * call, it is possible that the text could change, and will trigger
+ * an #AtkValue::value-changed signal emission.
+ *
+ * Note for implementors: the deprecated atk_value_set_current_value()
+ * method returned TRUE or FALSE depending if the value was assigned
+ * or not. In the practice several implementors were not able to
+ * decide it, and returned TRUE in any case. For that reason it is not
+ * required anymore to return if the value was properly assigned or
+ * not.
+ *
+ * Since: 2.12
+ **/
+void
+atk_value_set_value (AtkValue     *obj,
+                     const gdouble new_value)
+{
+  AtkValueIface *iface;
+
+  g_return_if_fail (ATK_IS_VALUE (obj));
+
+  iface = ATK_VALUE_GET_IFACE (obj);
+
+  if (iface->set_value)
+    {
+      (iface->set_value) (obj, new_value);
+    }
+}
+
+static void
+initialize_value_type_names ()
+{
+  GTypeClass *enum_class;
+  GEnumValue *enum_value;
+  int i;
+  gchar *value_type_name = NULL;
+
+  if (value_type_names)
+    return;
+
+  value_type_names = g_ptr_array_new ();
+  enum_class = g_type_class_ref (ATK_TYPE_VALUE_TYPE);
+  if (!G_IS_ENUM_CLASS(enum_class))
+    return;
+
+  for (i = 0; i < ATK_VALUE_LAST_DEFINED; i++)
+    {
+      enum_value = g_enum_get_value (G_ENUM_CLASS (enum_class), i);
+      value_type_name = g_strdup (enum_value->value_nick);
+      _compact_name (value_type_name);
+      g_ptr_array_add (value_type_names, value_type_name);
+    }
+
+  g_type_class_unref (enum_class);
+}
+
+/**
+ * atk_value_type_get_name:
+ * @value_type: The #AtkValueType whose name is required
+ *
+ * Gets the description string describing the #AtkValueType @value_type.
+ *
+ * Returns: the string describing the #AtkValueType
+ */
+const gchar*
+atk_value_type_get_name (AtkValueType value_type)
+{
+  g_return_val_if_fail (value_type >= 0, NULL);
+
+  if (!value_type_names)
+    initialize_value_type_names ();
+
+  if (value_type < value_type_names->len)
+    return g_ptr_array_index (value_type_names, value_type);
+
+  return NULL;
+}
+
+/**
+ * atk_value_type_get_localized_name:
+ * @value_type: The #AtkValueType whose localized name is required
+ *
+ * Gets the localized description string describing the #AtkValueType @value_type.
+ *
+ * Returns: the localized string describing the #AtkValueType
+ **/
+const gchar*
+atk_value_type_get_localized_name (AtkValueType value_type)
+{
+  _gettext_initialization ();
+
+  return dgettext (GETTEXT_PACKAGE, atk_value_type_get_name (value_type));
+}
diff --git a/atk/atkvalue.h b/atk/atkvalue.h
new file mode 100644
index 0000000000..af1191d068
--- /dev/null
+++ b/atk/atkvalue.h
@@ -0,0 +1,96 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_VALUE_H__
+#define __ATK_VALUE_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+#include <atk/atkrange.h>
+
+G_BEGIN_DECLS
+
+#define ATK_TYPE_VALUE                    (atk_value_get_type ())
+#define ATK_IS_VALUE(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_VALUE)
+#define ATK_VALUE(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_VALUE, AtkValue)
+#define ATK_VALUE_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_VALUE, 
AtkValueIface))
+
+#ifndef _TYPEDEF_ATK_VALUE_
+#define _TYPEDEF_ATK_VALUE__
+typedef struct _AtkValue AtkValue;
+#endif
+typedef struct _AtkValueIface AtkValueIface;
+
+/**
+ * AtkValueIface:
+ * @get_value_and_text: gets the current value and the human readable
+ * text alternative (if available) of this object. Since 2.12.
+ * @get_range: gets the range that defines the minimum and maximum
+ *  value of this object. Returns NULL if there is no range
+ *  defined. Since 2.12.
+ * @get_increment: gets the minimum increment by which the value of
+ *  this object may be changed. If zero it is undefined. Since 2.12.
+ * @get_sub_ranges: returns a list of different subranges, and their
+ *  description (if available) of this object. Returns NULL if there
+ *  is not subranges defined. Since 2.12.
+ * @set_value: sets the value of this object. Since 2.12.
+ */
+struct _AtkValueIface
+{
+  GTypeInterface parent;
+
+  void     (* get_value_and_text) (AtkValue *obj,
+                                   gdouble *value,
+                                   gchar  **text);
+  AtkRange*(* get_range)          (AtkValue *obj);
+  gdouble  (* get_increment)      (AtkValue *obj);
+  GSList*  (* get_sub_ranges)     (AtkValue *obj);
+  void     (* set_value)          (AtkValue     *obj,
+                                   const gdouble new_value);
+
+};
+
+GDK_AVAILABLE_IN_ALL
+GType            atk_value_get_type (void);
+
+GDK_AVAILABLE_IN_ALL
+void      atk_value_get_value_and_text (AtkValue *obj,
+                                        gdouble *value,
+                                        gchar  **text);
+GDK_AVAILABLE_IN_ALL
+AtkRange* atk_value_get_range          (AtkValue *obj);
+GDK_AVAILABLE_IN_ALL
+gdouble   atk_value_get_increment      (AtkValue *obj);
+GDK_AVAILABLE_IN_ALL
+GSList*   atk_value_get_sub_ranges     (AtkValue *obj);
+GDK_AVAILABLE_IN_ALL
+void      atk_value_set_value          (AtkValue     *obj,
+                                        const gdouble new_value);
+/* AtkValueType methods */
+GDK_AVAILABLE_IN_ALL
+const gchar* atk_value_type_get_name           (AtkValueType value_type);
+GDK_AVAILABLE_IN_ALL
+const gchar* atk_value_type_get_localized_name (AtkValueType value_type);
+
+G_END_DECLS
+
+#endif /* __ATK_VALUE_H__ */
diff --git a/atk/atkwindow.c b/atk/atkwindow.c
new file mode 100644
index 0000000000..8e7ad8ac57
--- /dev/null
+++ b/atk/atkwindow.c
@@ -0,0 +1,168 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "atkwindow.h"
+#include "atkmarshal.h"
+
+/**
+ * SECTION:atkwindow
+ * @Short_description: The ATK Interface provided by UI components that represent a top-level window.
+ * @Title: AtkWindow
+ * @See_also: #AtkObject
+ *
+ * #AtkWindow should be implemented by the UI elements that represent
+ * a top-level window, such as the main window of an application or
+ * dialog.
+ *
+ */
+
+enum {
+  ACTIVATE,
+  CREATE,
+  DEACTIVATE,
+  DESTROY,
+  MAXIMIZE,
+  MINIMIZE,
+  MOVE,
+  RESIZE,
+  RESTORE,
+  LAST_SIGNAL
+};
+
+static guint atk_window_signals[LAST_SIGNAL] = { 0 };
+
+static guint
+atk_window_add_signal (const gchar *name)
+{
+  return g_signal_new (name,
+                      ATK_TYPE_WINDOW,
+                      G_SIGNAL_RUN_LAST,
+                      0,
+                      (GSignalAccumulator) NULL, NULL,
+                      g_cclosure_marshal_VOID__VOID,
+                      G_TYPE_NONE,
+                      0);
+}
+
+typedef AtkWindowIface AtkWindowInterface;
+G_DEFINE_INTERFACE (AtkWindow, atk_window, ATK_TYPE_OBJECT)
+
+static void
+atk_window_default_init (AtkWindowIface *iface)
+{
+  static gboolean initialized = FALSE;
+
+  if (!initialized)
+    {
+      /**
+       * AtkWindow::activate:
+       * @object: the object which received the signal
+       *
+       * The signal #AtkWindow::activate is emitted when a window
+       * becomes the active window of the application or session.
+       *
+       * Since: 2.2
+       */
+      atk_window_signals[ACTIVATE] = atk_window_add_signal ("activate");
+      /**
+       * AtkWindow::create:
+       * @object: the object which received the signal
+       *
+       * The signal #AtkWindow::create is emitted when a new window
+       * is created.
+       *
+       * Since: 2.2
+       */
+      atk_window_signals[CREATE] = atk_window_add_signal ("create");
+      /**
+       * AtkWindow::deactivate:
+       * @object: the object which received the signal
+       *
+       * The signal #AtkWindow::deactivate is emitted when a window is
+       * no longer the active window of the application or session.
+       *
+       * Since: 2.2
+       */
+      atk_window_signals[DEACTIVATE] = atk_window_add_signal ("deactivate");
+      /**
+       * AtkWindow::destroy:
+       * @object: the object which received the signal
+       *
+       * The signal #AtkWindow::destroy is emitted when a window is
+       * destroyed.
+       *
+       * Since: 2.2
+       */
+      atk_window_signals[DESTROY] = atk_window_add_signal ("destroy");
+      /**
+       * AtkWindow::maximize:
+       * @object: the object which received the signal
+       *
+       * The signal #AtkWindow::maximize is emitted when a window
+       * is maximized.
+       *
+       * Since: 2.2
+       */
+      atk_window_signals[MAXIMIZE] = atk_window_add_signal ("maximize");
+      /**
+       * AtkWindow::minimize:
+       * @object: the object which received the signal
+       *
+       * The signal #AtkWindow::minimize is emitted when a window
+       * is minimized.
+       *
+       * Since: 2.2
+       */
+      atk_window_signals[MINIMIZE] = atk_window_add_signal ("minimize");
+      /**
+       * AtkWindow::move:
+       * @object: the object which received the signal
+       *
+       * The signal #AtkWindow::move is emitted when a window
+       * is moved.
+       *
+       * Since: 2.2
+       */
+      atk_window_signals[MOVE] = atk_window_add_signal ("move");
+      /**
+       * AtkWindow::resize:
+       * @object: the object which received the signal
+       *
+       * The signal #AtkWindow::resize is emitted when a window
+       * is resized.
+       *
+       * Since: 2.2
+       */
+      atk_window_signals[RESIZE] = atk_window_add_signal ("resize");
+      /**
+       * AtkWindow::restore:
+       * @object: the object which received the signal
+       *
+       * The signal #AtkWindow::restore is emitted when a window
+       * is restored.
+       *
+       * Since: 2.2
+       */
+      atk_window_signals[RESTORE] = atk_window_add_signal ("restore");
+
+      initialized = TRUE;
+    }
+}
diff --git a/atk/atkwindow.h b/atk/atkwindow.h
new file mode 100644
index 0000000000..c6a8897f55
--- /dev/null
+++ b/atk/atkwindow.h
@@ -0,0 +1,53 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ATK_WINDOW_H__
+#define __ATK_WINDOW_H__
+
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#include <atk/atkobject.h>
+
+G_BEGIN_DECLS
+
+/*
+ * AtkWindow describes signals pertaining to on-screen windows.
+ */
+
+
+#define ATK_TYPE_WINDOW                    (atk_window_get_type ())
+#define ATK_IS_WINDOW(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_WINDOW)
+#define ATK_WINDOW(obj)                    G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_WINDOW, AtkWindow)
+#define ATK_WINDOW_GET_IFACE(obj)          (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_WINDOW, 
AtkWindowIface))
+
+typedef struct _AtkWindow AtkWindow; /* Dummy typedef */
+typedef struct _AtkWindowIface AtkWindowIface;
+
+struct _AtkWindowIface
+{
+  GTypeInterface parent;
+};
+
+GDK_AVAILABLE_IN_ALL
+GType atk_window_get_type (void);
+G_END_DECLS
+
+#endif /* __ATK_WINDOW_H__ */
diff --git a/atk/meson.build b/atk/meson.build
new file mode 100644
index 0000000000..69d36023dc
--- /dev/null
+++ b/atk/meson.build
@@ -0,0 +1,114 @@
+atk_public_sources = files([
+  'atkaction.c',
+  'atkcomponent.c',
+  'atkdocument.c',
+  'atkeditabletext.c',
+  'atkgobjectaccessible.c',
+  'atkhyperlink.c',
+  'atkhyperlinkimpl.c',
+  'atkhypertext.c',
+  'atkimage.c',
+  'atknoopobject.c',
+  'atknoopobjectfactory.c',
+  'atkobject.c',
+  'atkobjectfactory.c',
+  'atkplug.c',
+  'atkprivate.c',
+  'atkrange.c',
+  'atkregistry.c',
+  'atkrelation.c',
+  'atkrelationset.c',
+  'atkselection.c',
+  'atksocket.c',
+  'atkstate.c',
+  'atkstateset.c',
+  'atkstreamablecontent.c',
+  'atktable.c',
+  'atktablecell.c',
+  'atktext.c',
+  'atkutil.c',
+  'atkvalue.c',
+  'atkwindow.c',
+])
+
+atk_public_headers = files([
+  'atkaction.h',
+  'atkcomponent.h',
+  'atkdocument.h',
+  'atkeditabletext.h',
+  'atkenums.h',
+  'atkgobjectaccessible.h',
+  'atkhyperlink.h',
+  'atkhyperlinkimpl.h',
+  'atkhypertext.h',
+  'atkimage.h',
+  'atknoopobject.h',
+  'atknoopobjectfactory.h',
+  'atkobject.h',
+  'atkobjectfactory.h',
+  'atkplug.h',
+  'atkrange.h',
+  'atkregistry.h',
+  'atkrelation.h',
+  'atkrelationset.h',
+  'atkselection.h',
+  'atksocket.h',
+  'atkstate.h',
+  'atkstateset.h',
+  'atkstreamablecontent.h',
+  'atktable.h',
+  'atktablecell.h',
+  'atktext.h',
+  'atktypes.h',
+  'atkutil.h',
+  'atkvalue.h',
+  'atkwindow.h',
+])
+
+install_headers(atk_public_headers + ['atk.h'], subdir: 'gtk-4.0/atk')
+
+# Marshallers
+atk_marshals = gnome.genmarshal('atkmarshal',
+  sources: 'atkmarshal.list',
+  prefix: 'atk_marshal',
+)
+atk_marshal_h = atk_marshals[1]
+
+# Enumerations for GType
+atk_enums = gnome.mkenums('atkenumtypes',
+  sources: atk_public_headers,
+  c_template: 'atkenumtypes.c.template',
+  h_template: 'atkenumtypes.h.template',
+  install_dir: gtk_includedir / 'gtk-4.0' / 'atk',
+  install_header: true,
+)
+atk_enum_h = atk_enums[1]
+
+atk_deps = [
+  libgdk_dep,
+]
+
+libatk = static_library('atk',
+  sources: [atk_public_sources, atk_enums, atk_marshals],
+  dependencies: atk_deps,
+  include_directories: [confinc, ],
+  c_args: [
+    '-DGTK_COMPILATION',
+    '-DG_LOG_DOMAIN="Atk"',
+    '-DG_LOG_USE_STRUCTURED=1',
+    '-DGLIB_DISABLE_DEPRECATION_WARNINGS',
+    '-DATK_DISABLE_DEPRECATION_WARNINGS',
+    '-DATK_LOCALEDIR="@0@"'.format(join_paths(gtk_datadir, 'locale')),
+  ],
+  link_with: libgdk,
+  link_args: common_ldflags,
+)
+
+# We don't have link_with: to internal static libs here on purpose, just
+# list the dependencies and generated headers and such, for use in the
+# "public" libgtk_dep used by internal executables.
+libatk_dep = declare_dependency(
+  include_directories: confinc,
+  sources: [atk_enum_h],
+  dependencies: libgdk_dep,
+)
diff --git a/gtk/a11y/gtkaccessibility.c b/gtk/a11y/gtkaccessibility.c
index ad9d3b0e1c..7712d120f7 100644
--- a/gtk/a11y/gtkaccessibility.c
+++ b/gtk/a11y/gtkaccessibility.c
@@ -20,10 +20,6 @@
 #include "gtkaccessibility.h"
 #include "gtkaccessibilityutil.h"
 
-#ifdef GDK_WINDOWING_X11
-#include <atk-bridge.h>
-#endif
-
 static int initialized = FALSE;
 
 void
@@ -35,9 +31,4 @@ _gtk_accessibility_init (void)
   initialized = TRUE;
 
   _gtk_accessibility_override_atk_util ();
-
-#ifdef GDK_WINDOWING_X11
-  atk_bridge_adaptor_init (NULL, NULL);
-#endif
-
 }
diff --git a/gtk/a11y/gtkaccessibilityutil.c b/gtk/a11y/gtkaccessibilityutil.c
index 1b840f80e1..08870a0af0 100644
--- a/gtk/a11y/gtkaccessibilityutil.c
+++ b/gtk/a11y/gtkaccessibilityutil.c
@@ -84,18 +84,6 @@ get_root (void)
   return root;
 }
 
-static const gchar *
-get_toolkit_name (void)
-{
-  return "gtk";
-}
-
-static const gchar *
-get_toolkit_version (void)
-{
-  return GTK_VERSION;
-}
-
 void
 _gtk_accessibility_override_atk_util (void)
 {
@@ -104,8 +92,6 @@ _gtk_accessibility_override_atk_util (void)
   atk_class->add_key_event_listener = add_key_event_listener;
   atk_class->remove_key_event_listener = remove_key_event_listener;
   atk_class->get_root = get_root;
-  atk_class->get_toolkit_name = get_toolkit_name;
-  atk_class->get_toolkit_version = get_toolkit_version;
 }
 
 static void
diff --git a/gtk/a11y/gtklevelbaraccessible.c b/gtk/a11y/gtklevelbaraccessible.c
index f4fd19d620..11ce803632 100644
--- a/gtk/a11y/gtklevelbaraccessible.c
+++ b/gtk/a11y/gtklevelbaraccessible.c
@@ -70,66 +70,6 @@ gtk_level_bar_accessible_init (GtkLevelBarAccessible *button)
 {
 }
 
-static void
-gtk_level_bar_accessible_get_current_value (AtkValue *obj,
-                                            GValue   *value)
-{
-  GtkWidget *widget;
-  GtkLevelBar *level_bar;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  level_bar = GTK_LEVEL_BAR (widget);
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_level_bar_get_value (level_bar));
-}
-
-static void
-gtk_level_bar_accessible_get_maximum_value (AtkValue *obj,
-                                            GValue   *value)
-{
-  GtkWidget *widget;
-  GtkLevelBar *level_bar;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  level_bar = GTK_LEVEL_BAR (widget);
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_level_bar_get_max_value (level_bar));
-}
-
-static void
-gtk_level_bar_accessible_get_minimum_value (AtkValue *obj,
-                                            GValue   *value)
-{
-  GtkWidget *widget;
-  GtkLevelBar *level_bar;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  level_bar = GTK_LEVEL_BAR (widget);
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_level_bar_get_min_value (level_bar));
-}
-
-static gboolean
-gtk_level_bar_accessible_set_current_value (AtkValue     *obj,
-                                            const GValue *value)
-{
-  GtkWidget *widget;
-  GtkLevelBar *level_bar;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  level_bar = GTK_LEVEL_BAR (widget);
-
-  gtk_level_bar_set_value (level_bar, g_value_get_double (value));
-
-  return TRUE;
-}
-
 static void
 gtk_level_bar_accessible_get_value_and_text (AtkValue  *obj,
                                              gdouble   *value,
@@ -175,11 +115,6 @@ gtk_level_bar_accessible_set_value (AtkValue      *obj,
 static void
 atk_value_interface_init (AtkValueIface *iface)
 {
-  iface->get_current_value = gtk_level_bar_accessible_get_current_value;
-  iface->get_maximum_value = gtk_level_bar_accessible_get_maximum_value;
-  iface->get_minimum_value = gtk_level_bar_accessible_get_minimum_value;
-  iface->set_current_value = gtk_level_bar_accessible_set_current_value;
-
   iface->get_value_and_text = gtk_level_bar_accessible_get_value_and_text;
   iface->get_range = gtk_level_bar_accessible_get_range;
   iface->set_value = gtk_level_bar_accessible_set_value;
diff --git a/gtk/a11y/gtkpanedaccessible.c b/gtk/a11y/gtkpanedaccessible.c
index 48dc9e454a..dd68ec775e 100644
--- a/gtk/a11y/gtkpanedaccessible.c
+++ b/gtk/a11y/gtkpanedaccessible.c
@@ -60,88 +60,6 @@ gtk_paned_accessible_init (GtkPanedAccessible *paned)
 {
 }
 
-static void
-gtk_paned_accessible_get_current_value (AtkValue *obj,
-                                        GValue   *value)
-{
-  GtkWidget* widget;
-  gint current_value;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  if (widget == NULL)
-    return;
-
-  current_value = gtk_paned_get_position (GTK_PANED (widget));
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_INT);
-  g_value_set_int (value, current_value);
-}
-
-static void
-gtk_paned_accessible_get_maximum_value (AtkValue *obj,
-                                        GValue   *value)
-{
-  GtkWidget* widget;
-  gint maximum_value;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  if (widget == NULL)
-    return;
-
-  g_object_get (GTK_PANED (widget),
-                "max-position", &maximum_value,
-                NULL);
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_INT);
-  g_value_set_int (value, maximum_value);
-}
-
-static void
-gtk_paned_accessible_get_minimum_value (AtkValue *obj,
-                                        GValue   *value)
-{
-  GtkWidget* widget;
-  gint minimum_value;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  if (widget == NULL)
-    return;
-
-  g_object_get (GTK_PANED (widget),
-                "min-position", &minimum_value,
-                NULL);
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_INT);
-  g_value_set_int (value, minimum_value);
-}
-
-/* Calling atk_value_set_current_value() is no guarantee that the value
- * is acceptable; it is necessary to listen for accessible-value signals
- * and check whether the current value has been changed or check what the
- * maximum and minimum values are.
- */
-static gboolean
-gtk_paned_accessible_set_current_value (AtkValue     *obj,
-                                        const GValue *value)
-{
-  GtkWidget* widget;
-  gint new_value;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  if (widget == NULL)
-    return FALSE;
-
-  if (G_VALUE_HOLDS_INT (value))
-    {
-      new_value = g_value_get_int (value);
-      gtk_paned_set_position (GTK_PANED (widget), new_value);
-
-      return TRUE;
-    }
-  else
-    return FALSE;
-}
-
 static void
 gtk_paned_accessible_get_value_and_text (AtkValue  *obj,
                                          gdouble   *value,
@@ -190,11 +108,6 @@ gtk_paned_accessible_set_value (AtkValue      *obj,
 static void
 atk_value_interface_init (AtkValueIface *iface)
 {
-  iface->get_current_value = gtk_paned_accessible_get_current_value;
-  iface->get_maximum_value = gtk_paned_accessible_get_maximum_value;
-  iface->get_minimum_value = gtk_paned_accessible_get_minimum_value;
-  iface->set_current_value = gtk_paned_accessible_set_current_value;
-
   iface->get_value_and_text = gtk_paned_accessible_get_value_and_text;
   iface->get_range = gtk_paned_accessible_get_range;
   iface->set_value = gtk_paned_accessible_set_value;
diff --git a/gtk/a11y/gtkprogressbaraccessible.c b/gtk/a11y/gtkprogressbaraccessible.c
index 62313f0ccc..11c3f3e877 100644
--- a/gtk/a11y/gtkprogressbaraccessible.c
+++ b/gtk/a11y/gtkprogressbaraccessible.c
@@ -69,37 +69,6 @@ gtk_progress_bar_accessible_init (GtkProgressBarAccessible *bar)
 {
 }
 
-static void
-gtk_progress_bar_accessible_get_current_value (AtkValue *obj,
-                                               GValue   *value)
-{
-  GtkWidget *widget;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-
-  memset (value, 0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (widget)));
-}
-
-static void
-gtk_progress_bar_accessible_get_maximum_value (AtkValue *obj,
-                                               GValue   *value)
-{
-  memset (value, 0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, 1.0);
-}
-
-static void
-gtk_progress_bar_accessible_get_minimum_value (AtkValue *obj,
-                                               GValue   *value)
-{
-  memset (value, 0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, 0.0);
-}
-
 static void
 gtk_progress_bar_accessible_get_value_and_text (AtkValue  *obj,
                                                 gdouble   *value,
@@ -122,10 +91,6 @@ gtk_progress_bar_accessible_get_range (AtkValue *obj)
 static void
 atk_value_interface_init (AtkValueIface *iface)
 {
-  iface->get_current_value = gtk_progress_bar_accessible_get_current_value;
-  iface->get_maximum_value = gtk_progress_bar_accessible_get_maximum_value;
-  iface->get_minimum_value = gtk_progress_bar_accessible_get_minimum_value;
-
   iface->get_value_and_text = gtk_progress_bar_accessible_get_value_and_text;
   iface->get_range = gtk_progress_bar_accessible_get_range;
 }
diff --git a/gtk/a11y/gtkrangeaccessible.c b/gtk/a11y/gtkrangeaccessible.c
index 93cfb62a7e..40b5cd9015 100644
--- a/gtk/a11y/gtkrangeaccessible.c
+++ b/gtk/a11y/gtkrangeaccessible.c
@@ -120,98 +120,6 @@ gtk_range_accessible_init (GtkRangeAccessible *range)
   range->priv = gtk_range_accessible_get_instance_private (range);
 }
 
-static void
-gtk_range_accessible_get_current_value (AtkValue *obj,
-                                        GValue   *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_range_get_adjustment (GTK_RANGE (widget));
-  if (adjustment == NULL)
-    return;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_adjustment_get_value (adjustment));
-}
-
-static void
-gtk_range_accessible_get_maximum_value (AtkValue *obj,
-                                        GValue   *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-  gdouble max;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_range_get_adjustment (GTK_RANGE (widget));
-  if (adjustment == NULL)
-    return;
-
-  max = gtk_adjustment_get_upper (adjustment)
-        - gtk_adjustment_get_page_size (adjustment);
-
-  if (gtk_range_get_restrict_to_fill_level (GTK_RANGE (widget)))
-    max = MIN (max, gtk_range_get_fill_level (GTK_RANGE (widget)));
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, max);
-}
-
-static void
-gtk_range_accessible_get_minimum_value (AtkValue *obj,
-                                        GValue   *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_range_get_adjustment (GTK_RANGE (widget));
-  if (adjustment == NULL)
-    return;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_adjustment_get_lower (adjustment));
-}
-
-static void
-gtk_range_accessible_get_minimum_increment (AtkValue *obj,
-                                            GValue   *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_range_get_adjustment (GTK_RANGE (widget));
-  if (adjustment == NULL)
-    return;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_adjustment_get_minimum_increment (adjustment));
-}
-
-static gboolean
-gtk_range_accessible_set_current_value (AtkValue     *obj,
-                                        const GValue *value)
-{
- GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_range_get_adjustment (GTK_RANGE (widget));
-  if (adjustment == NULL)
-    return FALSE;
-
-  gtk_adjustment_set_value (adjustment, g_value_get_double (value));
-
-  return TRUE;
-}
-
 static void
 gtk_range_accessible_get_value_and_text (AtkValue  *obj,
                                          gdouble   *value,
@@ -283,12 +191,6 @@ gtk_range_accessible_get_increment (AtkValue *obj)
 static void
 atk_value_interface_init (AtkValueIface *iface)
 {
-  iface->get_current_value = gtk_range_accessible_get_current_value;
-  iface->get_maximum_value = gtk_range_accessible_get_maximum_value;
-  iface->get_minimum_value = gtk_range_accessible_get_minimum_value;
-  iface->get_minimum_increment = gtk_range_accessible_get_minimum_increment;
-  iface->set_current_value = gtk_range_accessible_set_current_value;
-
   iface->get_value_and_text = gtk_range_accessible_get_value_and_text;
   iface->get_range = gtk_range_accessible_get_range;
   iface->set_value = gtk_range_accessible_set_value;
diff --git a/gtk/a11y/gtkscalebuttonaccessible.c b/gtk/a11y/gtkscalebuttonaccessible.c
index 1db9db7ba8..7acbaa1755 100644
--- a/gtk/a11y/gtkscalebuttonaccessible.c
+++ b/gtk/a11y/gtkscalebuttonaccessible.c
@@ -185,91 +185,6 @@ atk_action_interface_init (AtkActionIface *iface)
   iface->get_localized_name = gtk_scale_button_accessible_action_get_localized_name;
 }
 
-static void
-gtk_scale_button_accessible_get_current_value (AtkValue *obj,
-                                               GValue   *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_scale_button_get_adjustment (GTK_SCALE_BUTTON (widget));
-  if (adjustment == NULL)
-    return;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_adjustment_get_value (adjustment));
-}
-
-static void
-gtk_scale_button_accessible_get_maximum_value (AtkValue *obj,
-                                               GValue   *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_scale_button_get_adjustment (GTK_SCALE_BUTTON (widget));
-  if (adjustment == NULL)
-    return;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_adjustment_get_upper (adjustment));
-}
-
-static void
-gtk_scale_button_accessible_get_minimum_value (AtkValue *obj,
-                                               GValue   *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_scale_button_get_adjustment (GTK_SCALE_BUTTON (widget));
-  if (adjustment == NULL)
-    return;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_adjustment_get_lower (adjustment));
-}
-
-static void
-gtk_scale_button_accessible_get_minimum_increment (AtkValue *obj,
-                                                   GValue   *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_scale_button_get_adjustment (GTK_SCALE_BUTTON (widget));
-  if (adjustment == NULL)
-    return;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_adjustment_get_minimum_increment (adjustment));
-}
-
-static gboolean
-gtk_scale_button_accessible_set_current_value (AtkValue     *obj,
-                                               const GValue *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_scale_button_get_adjustment (GTK_SCALE_BUTTON (widget));
-  if (adjustment == NULL)
-    return FALSE;
-
-  gtk_adjustment_set_value (adjustment, g_value_get_double (value));
-
-  return TRUE;
-}
-
 static void
 gtk_scale_button_accessible_get_value_and_text (AtkValue  *obj,
                                                 gdouble   *value,
@@ -335,12 +250,6 @@ gtk_scale_button_accessible_get_increment (AtkValue *obj)
 static void
 atk_value_interface_init (AtkValueIface *iface)
 {
-  iface->get_current_value = gtk_scale_button_accessible_get_current_value;
-  iface->get_maximum_value = gtk_scale_button_accessible_get_maximum_value;
-  iface->get_minimum_value = gtk_scale_button_accessible_get_minimum_value;
-  iface->get_minimum_increment = gtk_scale_button_accessible_get_minimum_increment;
-  iface->set_current_value = gtk_scale_button_accessible_set_current_value;
-
   iface->get_value_and_text = gtk_scale_button_accessible_get_value_and_text;
   iface->get_range = gtk_scale_button_accessible_get_range;
   iface->set_value = gtk_scale_button_accessible_set_value;
diff --git a/gtk/a11y/gtkspinbuttonaccessible.c b/gtk/a11y/gtkspinbuttonaccessible.c
index 659f3e1379..84442fa179 100644
--- a/gtk/a11y/gtkspinbuttonaccessible.c
+++ b/gtk/a11y/gtkspinbuttonaccessible.c
@@ -120,91 +120,6 @@ gtk_spin_button_accessible_init (GtkSpinButtonAccessible *button)
   button->priv = gtk_spin_button_accessible_get_instance_private (button);
 }
 
-static void
-gtk_spin_button_accessible_get_current_value (AtkValue *obj,
-                                              GValue   *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
-  if (adjustment == NULL)
-    return;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_adjustment_get_value (adjustment));
-}
-
-static void
-gtk_spin_button_accessible_get_maximum_value (AtkValue *obj,
-                                              GValue   *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
-  if (adjustment == NULL)
-    return;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_adjustment_get_upper (adjustment));
-}
-
-static void
-gtk_spin_button_accessible_get_minimum_value (AtkValue *obj,
-                                              GValue   *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
-  if (adjustment == NULL)
-    return;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_adjustment_get_lower (adjustment));
-}
-
-static void
-gtk_spin_button_accessible_get_minimum_increment (AtkValue *obj,
-                                                  GValue   *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
-  if (adjustment == NULL)
-    return;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_DOUBLE);
-  g_value_set_double (value, gtk_adjustment_get_minimum_increment (adjustment));
-}
-
-static gboolean
-gtk_spin_button_accessible_set_current_value (AtkValue     *obj,
-                                              const GValue *value)
-{
-  GtkWidget *widget;
-  GtkAdjustment *adjustment;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
-  if (adjustment == NULL)
-    return FALSE;
-
-  gtk_adjustment_set_value (adjustment, g_value_get_double (value));
-
-  return TRUE;
-}
-
 static void
 gtk_spin_button_accessible_get_value_and_text (AtkValue  *obj,
                                          gdouble   *value,
@@ -270,12 +185,6 @@ gtk_spin_button_accessible_get_increment (AtkValue *obj)
 static void
 atk_value_interface_init (AtkValueIface *iface)
 {
-  iface->get_current_value = gtk_spin_button_accessible_get_current_value;
-  iface->get_maximum_value = gtk_spin_button_accessible_get_maximum_value;
-  iface->get_minimum_value = gtk_spin_button_accessible_get_minimum_value;
-  iface->get_minimum_increment = gtk_spin_button_accessible_get_minimum_increment;
-  iface->set_current_value = gtk_spin_button_accessible_set_current_value;
-
   iface->get_value_and_text = gtk_spin_button_accessible_get_value_and_text;
   iface->get_range = gtk_spin_button_accessible_get_range;
   iface->set_value = gtk_spin_button_accessible_set_value;
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index c662156488..afefd3d858 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -3058,9 +3058,6 @@ _gtk_icon_view_set_cursor_item (GtkIconView     *icon_view,
 
   if (item_obj != NULL)
     {
-      G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-      atk_focus_tracker_notify (item_obj);
-      G_GNUC_END_IGNORE_DEPRECATIONS;
       atk_object_notify_state_change (item_obj, ATK_STATE_FOCUSED, TRUE);
       g_object_unref (item_obj); 
     }
diff --git a/gtk/meson.build b/gtk/meson.build
index 6f498f54f0..adae8bc5ad 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -900,7 +900,6 @@ gtk_deps = [
   cairo_dep,
   fontconfig_dep,
   pixbuf_dep,
-  atk_dep,
   epoxy_dep,
   libm,
   graphene_dep,
@@ -995,9 +994,9 @@ libgtk = library('gtk-4',
                  soversion: gtk_soversion,
                  sources: [typefuncs, gtk_sources, gtkmarshal_h, gtkprivatetypebuiltins_h],
                  c_args: gtk_cargs + common_cflags,
-                 include_directories: [confinc, gdkinc, gskinc, gtkinc],
-                 dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep],
-                 link_with: [libgtk_css, libgdk, libgsk, ],
+                 include_directories: [confinc, gdkinc, gskinc, gtkinc, atkinc],
+                 dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep, libatk_dep],
+                 link_whole: [libgtk_css, libgdk, libgsk, libatk ],
                  link_args: common_ldflags,
                  install: true)
 
@@ -1083,6 +1082,22 @@ if build_gir
                                    sources: gsk_gir)
   gtk_dep_sources += gsk_gir
 
+  atk_gir = gnome.generate_gir(libgtk,
+    sources: [atk_public_sources, atk_public_headers, atk_enum_h],
+    namespace: 'Atk',
+    nsversion: gtk_api_version,
+    identifier_prefix: 'Atk',
+    symbol_prefix: 'atk',
+    export_packages: 'gtk4',
+    includes: [ 'GObject-2.0' ],
+    header: 'atk/atk.h',
+    install: true,
+    dependencies: [gdk_gir_dep],
+    extra_args: gir_args,
+  )
+  atk_gir_dep = declare_dependency(sources: atk_gir)
+  gtk_dep_sources += atk_gir
+
   gtk_introspection_sources = [
     gtk_public_headers,
     gtk_public_sources,
@@ -1111,10 +1126,10 @@ if build_gir
                                identifier_prefix: 'Gtk',
                                symbol_prefix: 'gtk',
                                export_packages: 'gtk4',
-                               includes: [ gdk_gir[0], gsk_gir[0], 'Atk-1.0', ],
+                               includes: [ gdk_gir[0], gsk_gir[0], atk_gir[0] ],
                                header: 'gtk/gtk.h',
                                install: true,
-                               dependencies: gsk_gir_dep,
+                               dependencies: [gsk_gir_dep, atk_gir_dep],
                                extra_args: gir_args + [
                                  '-DGTK_COMPILATION',
                                  '--c-include=gtk/gtk-a11y.h',
@@ -1124,7 +1139,7 @@ endif
 
 libgtk_dep = declare_dependency(sources: gtk_dep_sources,
                                 include_directories: [confinc, gtkinc],
-                                dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep],
+                                dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep, 
libatk_dep],
                                 link_with: libgtk,
                                 link_args: common_ldflags)
 
diff --git a/meson.build b/meson.build
index 22a211c4fc..13fa35b560 100644
--- a/meson.build
+++ b/meson.build
@@ -29,7 +29,6 @@ endif
 glib_req           = '>= @0@.@1@.@2@'.format(glib_major_req, glib_minor_req, glib_micro_req)
 pango_req          = '>= 1.44.0'
 fribidi_req        = '>= 0.19.7'
-atk_req            = '>= 2.15.1'
 cairo_req          = '>= 1.14.0'
 gdk_pixbuf_req     = '>= 2.30.0'
 introspection_req  = '>= 1.39.0'
@@ -307,6 +306,7 @@ endif
 confinc = include_directories('.')
 gdkinc = include_directories('gdk')
 gskinc = include_directories('gsk')
+atkinc = include_directories('atk')
 gtkinc = include_directories('gtk')
 testinc = include_directories('tests')
 
@@ -351,7 +351,6 @@ pixbuf_dep     = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req,
                             fallback : ['gdk-pixbuf', 'gdkpixbuf_dep'])
 epoxy_dep      = dependency('epoxy', version: epoxy_req,
                             fallback: ['libepoxy', 'libepoxy_dep'])
-atk_dep        = dependency('atk', version: atk_req)
 harfbuzz_dep   = dependency('harfbuzz', version: '>= 0.9', required: false)
 xkbdep         = dependency('xkbcommon', version: xkbcommon_req, required: wayland_enabled)
 graphene_dep   = dependency('graphene-gobject-1.0', version: graphene_req,
@@ -447,8 +446,6 @@ cdata.set('HAVE_CAIRO_SCRIPT_INTERPRETER', cairo_csi_dep.found())
 cdata.set('HAVE_HARFBUZZ', harfbuzz_dep.found())
 cdata.set('HAVE_PANGOFT', pangoft_dep.found())
 
-atk_pkgs = ['atk']
-
 wayland_pkgs = []
 if wayland_enabled
   wlclientdep    = dependency('wayland-client', version:  wayland_req)
@@ -479,7 +476,6 @@ if x11_enabled
   xfixes_dep     = dependency('xfixes', required: false)
   xcomposite_dep = dependency('xcomposite', required: false)
   fontconfig_dep = dependency('fontconfig')
-  atkbridge_dep  = dependency('atk-bridge-2.0', version: atk_req)
 
   backend_immodules += ['xim']
 
@@ -498,8 +494,6 @@ if x11_enabled
     x11_pkgs += ['xdamage']
   endif
 
-  atk_pkgs += ['atk-bridge-2.0']
-
   cdata.set('HAVE_XDAMAGE', xdamage_dep.found())
   cdata.set('HAVE_XCURSOR', xcursor_dep.found())
   cdata.set('HAVE_XCOMPOSITE', xcomposite_dep.found())
@@ -675,6 +669,7 @@ endif
 subdir('gtk/css')
 subdir('gdk')
 subdir('gsk')
+subdir('atk')
 subdir('gtk')
 subdir('modules')
 if get_option('demos')
@@ -726,8 +721,7 @@ pkgconf.set('GDK_PACKAGES', gdk_packages)
 pkgconf.set('GSK_PACKAGES',
             ' '.join([ 'graphene-gobject-1.0', graphene_req ]))
 pkgconf.set('GTK_PACKAGES',
-            ' '.join([ 'atk', atk_req,
-                       'gio-2.0', glib_req ]))
+            ' '.join([ 'gio-2.0', glib_req ]))
 
 # Requires.private
 pc_gdk_extra_libs += cairo_libs
@@ -738,7 +732,7 @@ pkgconf.set('GDK_PRIVATE_PACKAGES',
                        'epoxy', epoxy_req ] + x11_pkgs + wayland_pkgs + cairo_backends))
 pkgconf.set('GSK_PRIVATE_PACKAGES', '') # all already in GDK_PRIVATE_PACKAGES
 pangoft2_pkgs = (wayland_enabled or x11_enabled) ? ['pangoft2'] : []
-pkgconf.set('GTK_PRIVATE_PACKAGES', ' '.join(atk_pkgs + pangoft2_pkgs))
+pkgconf.set('GTK_PRIVATE_PACKAGES', ' '.join(pangoft2_pkgs))
 
 pkgconf.set('GDK_EXTRA_LIBS', ' '.join(pc_gdk_extra_libs))
 pkgconf.set('GSK_EXTRA_LIBS', '')
diff --git a/testsuite/meson.build b/testsuite/meson.build
index bb7c8160f4..79c1aaaf3c 100644
--- a/testsuite/meson.build
+++ b/testsuite/meson.build
@@ -10,6 +10,5 @@ subdir('gdk')
 subdir('gsk')
 subdir('gtk')
 subdir('css')
-subdir('a11y')
 subdir('tools')
 subdir('reftests')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]