]> Pileus Git - ~andy/gtk/commitdiff
Convert GailContainer to GtkContainerAccessible
authorMatthias Clasen <mclasen@redhat.com>
Sat, 2 Jul 2011 03:29:06 +0000 (23:29 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 5 Jul 2011 20:08:57 +0000 (16:08 -0400)
37 files changed:
gtk/a11y/Makefile.am
gtk/a11y/gail.c
gtk/a11y/gailcontainer.c [deleted file]
gtk/a11y/gailcontainer.h [deleted file]
gtk/a11y/gtkboxaccessible.c
gtk/a11y/gtkboxaccessible.h
gtk/a11y/gtkbuttonaccessible.c
gtk/a11y/gtkbuttonaccessible.h
gtk/a11y/gtkcomboboxaccessible.c
gtk/a11y/gtkcomboboxaccessible.h
gtk/a11y/gtkcontaineraccessible.c [new file with mode: 0644]
gtk/a11y/gtkcontaineraccessible.h [new file with mode: 0644]
gtk/a11y/gtkexpanderaccessible.c
gtk/a11y/gtkexpanderaccessible.h
gtk/a11y/gtkframeaccessible.c
gtk/a11y/gtkframeaccessible.h
gtk/a11y/gtkmenuitemaccessible.c
gtk/a11y/gtkmenuitemaccessible.h
gtk/a11y/gtkmenushellaccessible.c
gtk/a11y/gtkmenushellaccessible.h
gtk/a11y/gtknotebookaccessible.c
gtk/a11y/gtknotebookaccessible.h
gtk/a11y/gtkpanedaccessible.c
gtk/a11y/gtkpanedaccessible.h
gtk/a11y/gtkscrolledwindowaccessible.c
gtk/a11y/gtkscrolledwindowaccessible.h
gtk/a11y/gtkstatusbaraccessible.c
gtk/a11y/gtksubmenuitemaccessible.c
gtk/a11y/gtktextviewaccessible.c
gtk/a11y/gtktextviewaccessible.h
gtk/a11y/gtktreeviewaccessible.c
gtk/a11y/gtktreeviewaccessible.h
gtk/a11y/gtkwindowaccessible.c
gtk/a11y/gtkwindowaccessible.h
gtk/gtkcontainer.c
gtk/gtkiconview.c
tests/a11y/colorchooser.txt

index 031fb4956a6a3f079177c158a1484b23d5fb7965..f960d438532a05ac83f652ce2e27949987c24f7e 100644 (file)
@@ -13,7 +13,7 @@ gail_c_sources =                      \
        gtkcheckmenuitemaccessible.c    \
        gtkchecksubmenuitemaccessible.c \
        gtkcomboboxaccessible.c         \
-       gailcontainer.c                 \
+       gtkcontaineraccessible.c        \
        gailcontainercell.c             \
        gtkentryaccessible.c            \
        gtkexpanderaccessible.c         \
@@ -64,8 +64,8 @@ gail_private_h_sources =              \
        gtkcheckmenuitemaccessible.h    \
        gtkchecksubmenuitemaccessible.h \
        gtkcomboboxaccessible.h         \
+       gtkcontaineraccessible.h        \
        gailcontainercell.h             \
-       gailcontainer.h                 \
        gtkentryaccessible.h            \
        gtkexpanderaccessible.h         \
        gailfactory.h                   \
index 00110641535b221d9ae7d4b93dec2622dbee18e1..fcf09f76f163283321062864256a38701f736ffc 100644 (file)
@@ -25,7 +25,6 @@
 #include <gtk/gtkx.h>
 #include "gailbooleancell.h"
 #include "gailcell.h"
-#include "gailcontainer.h"
 #include "gailcontainercell.h"
 #include "gailimagecell.h"
 #include "gailrenderercell.h"
@@ -79,7 +78,6 @@ static guint focus_tracker_id = 0;
 static GQuark quark_focus_object = 0;
 
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_WIDGET, GailWidget, gail_widget, GTK_TYPE_WIDGET)
-GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_CONTAINER, GailContainer, gail_container, GTK_TYPE_CONTAINER)
 GAIL_IMPLEMENT_FACTORY_WITH_FUNC_DUMMY (GAIL_TYPE_RENDERER_CELL, GailRendererCell, gail_renderer_cell, GTK_TYPE_CELL_RENDERER, gail_renderer_cell_new)
 GAIL_IMPLEMENT_FACTORY_WITH_FUNC_DUMMY (GAIL_TYPE_BOOLEAN_CELL, GailBooleanCell, gail_boolean_cell, GTK_TYPE_CELL_RENDERER_TOGGLE, gail_boolean_cell_new)
 GAIL_IMPLEMENT_FACTORY_WITH_FUNC_DUMMY (GAIL_TYPE_IMAGE_CELL, GailImageCell, gail_image_cell, GTK_TYPE_CELL_RENDERER_PIXBUF, gail_image_cell_new)
@@ -825,7 +823,6 @@ gail_accessibility_module_init (void)
     fprintf (stderr, "GTK Accessibility Module initialized\n");
 
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_WIDGET, gail_widget);
-  GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CONTAINER, gail_container);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CELL_RENDERER_TEXT, gail_text_cell);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CELL_RENDERER_TOGGLE, gail_boolean_cell);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CELL_RENDERER_PIXBUF, gail_image_cell);
diff --git a/gtk/a11y/gailcontainer.c b/gtk/a11y/gailcontainer.c
deleted file mode 100644 (file)
index 81e0c05..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-/* GAIL - The GNOME Accessibility Implementation Library
- * 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 <gtk/gtk.h>
-#include "gailcontainer.h"
-
-static void         gail_container_class_init          (GailContainerClass *klass);
-static void         gail_container_init                (GailContainer      *container);
-
-static gint         gail_container_get_n_children      (AtkObject          *obj);
-static AtkObject*   gail_container_ref_child           (AtkObject          *obj,
-                                                        gint               i);
-static gint         gail_container_add_gtk             (GtkContainer       *container,
-                                                        GtkWidget          *widget,
-                                                        gpointer           data);
-static gint         gail_container_remove_gtk          (GtkContainer       *container,
-                                                        GtkWidget          *widget,
-                                                        gpointer           data);
-static gint         gail_container_real_add_gtk        (GtkContainer       *container,
-                                                        GtkWidget          *widget,
-                                                        gpointer           data);
-static gint         gail_container_real_remove_gtk     (GtkContainer       *container,
-                                                        GtkWidget          *widget,
-                                                        gpointer           data);
-
-static void          gail_container_real_initialize    (AtkObject          *obj,
-                                                        gpointer           data);
-
-static void          gail_container_finalize           (GObject            *object);
-
-G_DEFINE_TYPE (GailContainer, gail_container, GAIL_TYPE_WIDGET)
-
-static void
-gail_container_class_init (GailContainerClass *klass)
-{
-  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-  AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
-  gobject_class->finalize = gail_container_finalize;
-
-  class->get_n_children = gail_container_get_n_children;
-  class->ref_child = gail_container_ref_child;
-  class->initialize = gail_container_real_initialize;
-
-  klass->add_gtk = gail_container_real_add_gtk;
-  klass->remove_gtk = gail_container_real_remove_gtk;
-}
-
-static void
-gail_container_init (GailContainer      *container)
-{
-  container->children = NULL;
-}
-
-static gint
-gail_container_get_n_children (AtkObject* obj)
-{
-  GtkWidget *widget;
-  GList *children;
-  gint count = 0;
-
-  g_return_val_if_fail (GAIL_IS_CONTAINER (obj), count);
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  if (widget == NULL)
-    return 0;
-
-  children = gtk_container_get_children (GTK_CONTAINER(widget));
-  count = g_list_length (children);
-  g_list_free (children);
-
-  return count; 
-}
-
-static AtkObject* 
-gail_container_ref_child (AtkObject *obj,
-                          gint       i)
-{
-  GList *children, *tmp_list;
-  AtkObject  *accessible;
-  GtkWidget *widget;
-
-  g_return_val_if_fail (GAIL_IS_CONTAINER (obj), NULL);
-  g_return_val_if_fail ((i >= 0), NULL);
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
-  if (widget == NULL)
-    return NULL;
-
-  children = gtk_container_get_children (GTK_CONTAINER (widget));
-  tmp_list = g_list_nth (children, i);
-  if (!tmp_list)
-    {
-      g_list_free (children);
-      return NULL;
-    }  
-  accessible = gtk_widget_get_accessible (GTK_WIDGET (tmp_list->data));
-
-  g_list_free (children);
-  g_object_ref (accessible);
-  return accessible; 
-}
-
-static gint
-gail_container_add_gtk (GtkContainer *container,
-                        GtkWidget    *widget,
-                        gpointer     data)
-{
-  GailContainer *gail_container = GAIL_CONTAINER (data);
-  GailContainerClass *klass;
-
-  klass = GAIL_CONTAINER_GET_CLASS (gail_container);
-
-  if (klass->add_gtk)
-    return klass->add_gtk (container, widget, data);
-  else
-    return 1;
-}
-static gint
-gail_container_remove_gtk (GtkContainer *container,
-                           GtkWidget    *widget,
-                           gpointer     data)
-{
-  GailContainer *gail_container = GAIL_CONTAINER (data);
-  GailContainerClass *klass;
-
-  klass = GAIL_CONTAINER_GET_CLASS (gail_container);
-
-  if (klass->remove_gtk)
-    return klass->remove_gtk (container, widget, data);
-  else
-    return 1;
-}
-static gint
-gail_container_real_add_gtk (GtkContainer *container,
-                             GtkWidget    *widget,
-                             gpointer     data)
-{
-  AtkObject* atk_parent = ATK_OBJECT (data);
-  AtkObject* atk_child = gtk_widget_get_accessible (widget);
-  GailContainer *gail_container = GAIL_CONTAINER (atk_parent);
-  gint       index;
-
-  g_object_notify (G_OBJECT (atk_child), "accessible_parent");
-
-  g_list_free (gail_container->children);
-  gail_container->children = gtk_container_get_children (container);
-  index = g_list_index (gail_container->children, widget);
-  g_signal_emit_by_name (atk_parent, "children_changed::add", 
-                         index, atk_child, NULL);
-
-  return 1;
-}
-
-static gint
-gail_container_real_remove_gtk (GtkContainer       *container,
-                                GtkWidget          *widget,
-                                gpointer           data)
-{
-  AtkPropertyValues values = { NULL };
-  AtkObject* atk_parent;
-  AtkObject *atk_child;
-  GailContainer *gail_container;
-  gint       index;
-
-  atk_parent = ATK_OBJECT (data);
-  atk_child = gtk_widget_get_accessible (widget);
-
-  if (atk_child)
-    {
-      g_value_init (&values.old_value, G_TYPE_POINTER);
-      g_value_set_pointer (&values.old_value, atk_parent);
-    
-      values.property_name = "accessible-parent";
-
-      g_object_ref (atk_child);
-      g_signal_emit_by_name (atk_child,
-                             "property_change::accessible-parent", &values, NULL);
-      g_object_unref (atk_child);
-    }
-  gail_container = GAIL_CONTAINER (atk_parent);
-  index = g_list_index (gail_container->children, widget);
-  g_list_free (gail_container->children);
-  gail_container->children = gtk_container_get_children (container);
-  if (index >= 0 && index <= g_list_length (gail_container->children))
-    g_signal_emit_by_name (atk_parent, "children_changed::remove", 
-                          index, atk_child, NULL);
-
-  return 1;
-}
-
-static void
-gail_container_real_initialize (AtkObject *obj,
-                                gpointer  data)
-{
-  GailContainer *container = GAIL_CONTAINER (obj);
-
-  ATK_OBJECT_CLASS (gail_container_parent_class)->initialize (obj, data);
-
-  container->children = gtk_container_get_children (GTK_CONTAINER (data));
-
-  g_signal_connect (data, "add",
-                    G_CALLBACK (gail_container_add_gtk),
-                    obj);
-  g_signal_connect (data, "remove",
-                    G_CALLBACK (gail_container_remove_gtk),
-                    obj);
-
-  if (GTK_IS_TOOLBAR (data))
-    obj->role = ATK_ROLE_TOOL_BAR;
-  else if (GTK_IS_VIEWPORT (data))
-    obj->role = ATK_ROLE_VIEWPORT;
-  else
-    obj->role = ATK_ROLE_PANEL;
-}
-
-static void
-gail_container_finalize (GObject *object)
-{
-  GailContainer *container = GAIL_CONTAINER (object);
-
-  g_list_free (container->children);
-  G_OBJECT_CLASS (gail_container_parent_class)->finalize (object);
-}
diff --git a/gtk/a11y/gailcontainer.h b/gtk/a11y/gailcontainer.h
deleted file mode 100644 (file)
index d5094f6..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/* GAIL - The GNOME Accessibility Implementation Library
- * 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.
- */
-
-#ifndef __GAIL_CONTAINER_H__
-#define __GAIL_CONTAINER_H__
-
-#include "gailwidget.h"
-
-G_BEGIN_DECLS
-
-#define GAIL_TYPE_CONTAINER                  (gail_container_get_type ())
-#define GAIL_CONTAINER(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_CONTAINER, GailContainer))
-#define GAIL_CONTAINER_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GAIL_TYPE_CONTAINER, GailContainerClass))
-#define GAIL_IS_CONTAINER(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_CONTAINER))
-#define GAIL_IS_CONTAINER_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_CONTAINER))
-#define GAIL_CONTAINER_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_CONTAINER, GailContainerClass))
-
-typedef struct _GailContainer                 GailContainer;
-typedef struct _GailContainerClass            GailContainerClass;
-
-struct _GailContainer
-{
-  GailWidget parent;
-
-  GList *children;
-};
-
-GType gail_container_get_type (void);
-
-struct _GailContainerClass
-{
-  GailWidgetClass parent_class;
-
-  gint (*add_gtk) (GtkContainer *container,
-                   GtkWidget    *widget,
-                   gpointer     data);
-  gint (*remove_gtk) (GtkContainer *container,
-                      GtkWidget    *widget,
-                      gpointer     data);
-};
-
-G_END_DECLS
-
-#endif /* __GAIL_CONTAINER_H__ */
index 53526195fb81cc885594cbbb7b52d557d840edcd..94aae411c0e4fcf0282bded4afe3b2b2e2c2c8f3 100644 (file)
@@ -22,7 +22,8 @@
 #include <gtk/gtk.h>
 #include "gtkboxaccessible.h"
 
-G_DEFINE_TYPE (GtkBoxAccessible, gtk_box_accessible, GAIL_TYPE_CONTAINER)
+
+G_DEFINE_TYPE (GtkBoxAccessible, gtk_box_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE)
 
 static void
 gtk_box_accessible_initialize (AtkObject *accessible,
index 79598f52ee658ef47407da7e5418f03b213967ed..ad0e7d4065180594ddefd4f04eff0d3461ff883d 100644 (file)
 #ifndef __GTK_BOX_ACCESSIBLE_H__
 #define __GTK_BOX_ACCESSIBLE_H__
 
-#include "gailcontainer.h"
+#include "gtkcontaineraccessible.h"
 
 G_BEGIN_DECLS
 
-#define GTK_TYPE_BOX_ACCESSIBLE                         (gtk_box_accessible_get_type ())
-#define GTK_BOX_ACCESSIBLE(obj)                         (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BOX_ACCESSIBLE, GtkBoxAccessible))
-#define GTK_BOX_ACCESSIBLE_CLASS(klass)                       (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_BOX_ACCESSIBLE, GtkBoxAccessibleClass))
-#define GTK_IS_BOX_ACCESSIBLE(obj)                      (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_BOX_ACCESSIBLE))
-#define GTK_IS_BOX_ACCESSIBLE_CLASS(klass)              (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BOX_ACCESSIBLE))
-#define GTK_BOX_ACCESSIBLE_GET_CLASS(obj)             (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_BOX_ACCESSIBLE, GtkBoxAccessibleClass))
+#define GTK_TYPE_BOX_ACCESSIBLE            (gtk_box_accessible_get_type ())
+#define GTK_BOX_ACCESSIBLE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BOX_ACCESSIBLE, GtkBoxAccessible))
+#define GTK_BOX_ACCESSIBLE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_BOX_ACCESSIBLE, GtkBoxAccessibleClass))
+#define GTK_IS_BOX_ACCESSIBLE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_BOX_ACCESSIBLE))
+#define GTK_IS_BOX_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BOX_ACCESSIBLE))
+#define GTK_BOX_ACCESSIBLE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_BOX_ACCESSIBLE, GtkBoxAccessibleClass))
 
 typedef struct _GtkBoxAccessible      GtkBoxAccessible;
 typedef struct _GtkBoxAccessibleClass GtkBoxAccessibleClass;
 
 struct _GtkBoxAccessible
 {
-  GailContainer parent;
+  GtkContainerAccessible parent;
 };
 
 struct _GtkBoxAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType gtk_box_accessible_get_type (void);
index 64b6d251a357e6571570872b6ca9ac25f2ad548e..1be1137d160d60467d0a9247bc6b23199051f698 100644 (file)
@@ -28,7 +28,7 @@
 static void atk_action_interface_init (AtkActionIface *iface);
 static void atk_image_interface_init  (AtkImageIface  *iface);
 
-G_DEFINE_TYPE_WITH_CODE (GtkButtonAccessible, gtk_button_accessible, GAIL_TYPE_CONTAINER,
+G_DEFINE_TYPE_WITH_CODE (GtkButtonAccessible, gtk_button_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_IMAGE, atk_image_interface_init))
 
@@ -226,7 +226,7 @@ static void
 gtk_button_accessible_class_init (GtkButtonAccessibleClass *klass)
 {
   AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-  GailContainerClass *container_class = (GailContainerClass*)klass;
+  GtkContainerAccessibleClass *container_class = (GtkContainerAccessibleClass*)klass;
   GailWidgetClass *widget_class = (GailWidgetClass*)klass;
 
   class->get_name = gtk_button_accessible_get_name;
index 66986da94e6ff54a02b6e6e19e1c5e6dddae109f..8142028b7d13bcc2cdb9542abb3f4d6adf21c846 100644 (file)
@@ -20,8 +20,7 @@
 #ifndef __GTK_BUTTON_ACCESSIBLE_H__
 #define __GTK_BUTTON_ACCESSIBLE_H__
 
-#include "gailcontainer.h"
-#include "gailtextutil.h"
+#include "gtkcontaineraccessible.h"
 
 G_BEGIN_DECLS
 
@@ -37,12 +36,12 @@ typedef struct _GtkButtonAccessibleClass GtkButtonAccessibleClass;
 
 struct _GtkButtonAccessible
 {
-  GailContainer parent;
+  GtkContainerAccessible parent;
 };
 
 struct _GtkButtonAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType gtk_button_accessible_get_type (void);
index 0e3c3f767435bd426318b285b4b88bd4ed0a9527..58f8763630cf6b22598288ca9557bf8f6a005be5 100644 (file)
@@ -26,7 +26,7 @@
 static void atk_action_interface_init    (AtkActionIface    *iface);
 static void atk_selection_interface_init (AtkSelectionIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (GtkComboBoxAccessible, gtk_combo_box_accessible, GAIL_TYPE_CONTAINER,
+G_DEFINE_TYPE_WITH_CODE (GtkComboBoxAccessible, gtk_combo_box_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_SELECTION, atk_selection_interface_init))
 
index d4228057c004dcc0ea44fac7c5e4c92f98c48be6..bb1142d5a5f1af227b39e28d1ebf26297b0f04d2 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __GTK_COMBO_BOX_ACCESSIBLE_H__
 #define __GTK_COMBO_BOX_ACCESSIBLE_H__
 
-#include "gailcontainer.h"
+#include "gtkcontaineraccessible.h"
 
 G_BEGIN_DECLS
 
@@ -36,7 +36,7 @@ typedef struct _GtkComboBoxAccessibleClass GtkComboBoxAccessibleClass;
 
 struct _GtkComboBoxAccessible
 {
-  GailContainer  parent;
+  GtkContainerAccessible parent;
 
   gchar         *name;
   gint           old_selection;
@@ -45,7 +45,7 @@ struct _GtkComboBoxAccessible
 
 struct _GtkComboBoxAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType gtk_combo_box_accessible_get_type (void);
diff --git a/gtk/a11y/gtkcontaineraccessible.c b/gtk/a11y/gtkcontaineraccessible.c
new file mode 100644 (file)
index 0000000..ad475a4
--- /dev/null
@@ -0,0 +1,202 @@
+/* GAIL - The GNOME Accessibility Implementation Library
+ * 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 <gtk/gtk.h>
+#include "gtkcontaineraccessible.h"
+
+
+G_DEFINE_TYPE (GtkContainerAccessible, gtk_container_accessible, GAIL_TYPE_WIDGET)
+
+static void
+gtk_container_accessible_init (GtkContainerAccessible *container)
+{
+}
+
+static gint
+gtk_container_accessible_get_n_children (AtkObject* obj)
+{
+  GtkWidget *widget;
+  GList *children;
+  gint count = 0;
+
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
+  if (widget == NULL)
+    return 0;
+
+  children = gtk_container_get_children (GTK_CONTAINER(widget));
+  count = g_list_length (children);
+  g_list_free (children);
+
+  return count;
+}
+
+static AtkObject *
+gtk_container_accessible_ref_child (AtkObject *obj,
+                                    gint       i)
+{
+  GList *children, *tmp_list;
+  AtkObject  *accessible;
+  GtkWidget *widget;
+
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
+  if (widget == NULL)
+    return NULL;
+
+  children = gtk_container_get_children (GTK_CONTAINER (widget));
+  tmp_list = g_list_nth (children, i);
+  if (!tmp_list)
+    {
+      g_list_free (children);
+      return NULL;
+    }
+  accessible = gtk_widget_get_accessible (GTK_WIDGET (tmp_list->data));
+
+  g_list_free (children);
+  g_object_ref (accessible);
+
+  return accessible;
+}
+
+static gint
+gtk_container_accessible_add_gtk (GtkContainer *container,
+                                  GtkWidget    *widget,
+                                  gpointer      data)
+{
+  GtkContainerAccessible *accessible = GTK_CONTAINER_ACCESSIBLE (data);
+  GtkContainerAccessibleClass *klass;
+
+  klass = GTK_CONTAINER_ACCESSIBLE_GET_CLASS (accessible);
+
+  if (klass->add_gtk)
+    return klass->add_gtk (container, widget, data);
+  else
+    return 1;
+}
+static gint
+gtk_container_accessible_remove_gtk (GtkContainer *container,
+                           GtkWidget    *widget,
+                           gpointer     data)
+{
+  GtkContainerAccessible *accessible = GTK_CONTAINER_ACCESSIBLE (data);
+  GtkContainerAccessibleClass *klass;
+
+  klass = GTK_CONTAINER_ACCESSIBLE_GET_CLASS (accessible);
+
+  if (klass->remove_gtk)
+    return klass->remove_gtk (container, widget, data);
+  else
+    return 1;
+}
+
+static gint
+gtk_container_accessible_real_add_gtk (GtkContainer *container,
+                                       GtkWidget    *widget,
+                                       gpointer      data)
+{
+  AtkObject *atk_parent;
+  AtkObject *atk_child;
+  GtkContainerAccessible *accessible;
+  gint index;
+
+  atk_parent = ATK_OBJECT (data);
+  atk_child = gtk_widget_get_accessible (widget);
+  accessible = GTK_CONTAINER_ACCESSIBLE (atk_parent);
+
+  g_object_notify (G_OBJECT (atk_child), "accessible_parent");
+  g_list_free (accessible->children);
+  accessible->children = gtk_container_get_children (container);
+  index = g_list_index (accessible->children, widget);
+  g_signal_emit_by_name (atk_parent, "children_changed::add", index, atk_child, NULL);
+
+  return 1;
+}
+
+static gint
+gtk_container_accessible_real_remove_gtk (GtkContainer *container,
+                                          GtkWidget    *widget,
+                                          gpointer      data)
+{
+  AtkObject* atk_parent;
+  AtkObject *atk_child;
+  GtkContainerAccessible *accessible;
+  gint index;
+
+  atk_parent = ATK_OBJECT (data);
+  atk_child = gtk_widget_get_accessible (widget);
+  accessible = GTK_CONTAINER_ACCESSIBLE (atk_parent);
+
+  g_object_notify (G_OBJECT (atk_child), "accessible_parent");
+  index = g_list_index (accessible->children, widget);
+  g_list_free (accessible->children);
+  accessible->children = gtk_container_get_children (container);
+  if (index >= 0 && index <= g_list_length (accessible->children))
+    g_signal_emit_by_name (atk_parent, "children_changed::remove", index, atk_child, NULL);
+
+  return 1;
+}
+
+static void
+gtk_container_accessible_real_initialize (AtkObject *obj,
+                                          gpointer   data)
+{
+  GtkContainerAccessible *accessible = GTK_CONTAINER_ACCESSIBLE (obj);
+
+  ATK_OBJECT_CLASS (gtk_container_accessible_parent_class)->initialize (obj, data);
+
+  accessible->children = gtk_container_get_children (GTK_CONTAINER (data));
+
+  g_signal_connect (data, "add", G_CALLBACK (gtk_container_accessible_add_gtk), obj);
+  g_signal_connect (data, "remove", G_CALLBACK (gtk_container_accessible_remove_gtk), obj);
+
+  if (GTK_IS_TOOLBAR (data))
+    obj->role = ATK_ROLE_TOOL_BAR;
+  else if (GTK_IS_VIEWPORT (data))
+    obj->role = ATK_ROLE_VIEWPORT;
+  else
+    obj->role = ATK_ROLE_PANEL;
+}
+
+static void
+gtk_container_accessible_finalize (GObject *object)
+{
+  GtkContainerAccessible *accessible = GTK_CONTAINER_ACCESSIBLE (object);
+
+  g_list_free (accessible->children);
+
+  G_OBJECT_CLASS (gtk_container_accessible_parent_class)->finalize (object);
+}
+
+static void
+gtk_container_accessible_class_init (GtkContainerAccessibleClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
+
+  gobject_class->finalize = gtk_container_accessible_finalize;
+
+  class->get_n_children = gtk_container_accessible_get_n_children;
+  class->ref_child = gtk_container_accessible_ref_child;
+  class->initialize = gtk_container_accessible_real_initialize;
+
+  klass->add_gtk = gtk_container_accessible_real_add_gtk;
+  klass->remove_gtk = gtk_container_accessible_real_remove_gtk;
+}
diff --git a/gtk/a11y/gtkcontaineraccessible.h b/gtk/a11y/gtkcontaineraccessible.h
new file mode 100644 (file)
index 0000000..1e60c6d
--- /dev/null
@@ -0,0 +1,60 @@
+/* GAIL - The GNOME Accessibility Implementation Library
+ * 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.
+ */
+
+#ifndef __GTK_CONTAINER_ACCESSIBLE_H__
+#define __GTK_CONTAINER_ACCESSIBLE_H__
+
+#include "gailwidget.h"
+
+G_BEGIN_DECLS
+
+#define GTK_TYPE_CONTAINER_ACCESSIBLE                  (gtk_container_accessible_get_type ())
+#define GTK_CONTAINER_ACCESSIBLE(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CONTAINER_ACCESSIBLE, GtkContainerAccessible))
+#define GTK_CONTAINER_ACCESSIBLE_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CONTAINER_ACCESSIBLE, GtkContainerAccessibleClass))
+#define GTK_IS_CONTAINER_ACCESSIBLE(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CONTAINER_ACCESSIBLE))
+#define GTK_IS_CONTAINER_ACCESSIBLE_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CONTAINER_ACCESSIBLE))
+#define GTK_CONTAINER_ACCESSIBLE_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CONTAINER_ACCESSIBLE, GtkContainerAccessibleClass))
+
+typedef struct _GtkContainerAccessible      GtkContainerAccessible;
+typedef struct _GtkContainerAccessibleClass GtkContainerAccessibleClass;
+
+struct _GtkContainerAccessible
+{
+  GailWidget parent;
+
+  GList *children;
+};
+
+struct _GtkContainerAccessibleClass
+{
+  GailWidgetClass parent_class;
+
+  gint (*add_gtk)    (GtkContainer *container,
+                      GtkWidget    *widget,
+                      gpointer     data);
+  gint (*remove_gtk) (GtkContainer *container,
+                      GtkWidget    *widget,
+                      gpointer     data);
+};
+
+GType gtk_container_accessible_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GTK_CONTAINER_ACCESSIBLE_H__ */
index 3ad5bd281db0d0240174a1b194f9da16204e1131..10510f14cfdfa13c38075e7959a37a979dbec215 100644 (file)
@@ -25,7 +25,7 @@
 
 static void atk_action_interface_init (AtkActionIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (GtkExpanderAccessible, gtk_expander_accessible, GAIL_TYPE_CONTAINER,
+G_DEFINE_TYPE_WITH_CODE (GtkExpanderAccessible, gtk_expander_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
 
 static const gchar *
index 986a9b38956b889bf6275983739604fc7d52cad5..27e2433c211670e929fce15d37b9ce1391032dde 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __GTK_EXPANDER_ACCESSIBLE_H__
 #define __GTK_EXPANDER_ACCESSIBLE_H__
 
-#include "gailcontainer.h"
+#include "gtkcontaineraccessible.h"
 
 G_BEGIN_DECLS
 
@@ -36,12 +36,12 @@ typedef struct _GtkExpanderAccessibleClass GtkExpanderAccessibleClass;
 
 struct _GtkExpanderAccessible
 {
-  GailContainer parent;
+  GtkContainerAccessible parent;
 };
 
 struct _GtkExpanderAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType gtk_expander_accessible_get_type (void);
index 964ddb99dc171dfca1b204c68b53482a82918526..03d4f271b86bb26c95c639cb3e1daa976a3e09ca 100644 (file)
@@ -24,7 +24,7 @@
 #include "gtkframeaccessible.h"
 
 
-G_DEFINE_TYPE (GtkFrameAccessible, gtk_frame_accessible, GAIL_TYPE_CONTAINER)
+G_DEFINE_TYPE (GtkFrameAccessible, gtk_frame_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE)
 
 static void
 gtk_frame_accessible_initialize (AtkObject *accessible,
index 02e638eed25c567ea8e6ccabadcbae17d9ab338c..78df07268c573f48703cbf4a5d8939762903b346 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __GTK_FRAME_ACCESSIBLE_H__
 #define __GTK_FRAME_ACCESSIBLE_H__
 
-#include "gailcontainer.h"
+#include "gtkcontaineraccessible.h"
 
 G_BEGIN_DECLS
 
@@ -36,12 +36,12 @@ typedef struct _GtkFrameAccessibleClass GtkFrameAccessibleClass;
 
 struct _GtkFrameAccessible
 {
-  GailContainer parent;
+  GtkContainerAccessible parent;
 };
 
 struct _GtkFrameAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType gtk_frame_accessible_get_type (void);
index 3f8d908f8b54e34597120a747fcacca83268991c..e0eb01a6f7a33acb23841a9ebf0cfe8a756d6518 100644 (file)
@@ -33,7 +33,7 @@ static gchar     *get_text_from_label_widget (GtkWidget *widget);
 
 static void atk_action_interface_init (AtkActionIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (GtkMenuItemAccessible, gtk_menu_item_accessible, GAIL_TYPE_CONTAINER,
+G_DEFINE_TYPE_WITH_CODE (GtkMenuItemAccessible, gtk_menu_item_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
 
 static void
index 88470da1cc9f5cff423ecbe4bc991b5a18732668..2c13048280a91b51516943beaf42791d64162b5a 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __GTK_MENU_ITEM_ACCESSIBLE_H__
 #define __GTK_MENU_ITEM_ACCESSIBLE_H__
 
-#include "gailcontainer.h"
+#include "gtkcontaineraccessible.h"
 
 G_BEGIN_DECLS
 
@@ -36,14 +36,14 @@ typedef struct _GtkMenuItemAccessibleClass GtkMenuItemAccessibleClass;
 
 struct _GtkMenuItemAccessible
 {
-  GailContainer parent;
+  GtkContainerAccessible parent;
 
   gchar *text;
 };
 
 struct _GtkMenuItemAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType gtk_menu_item_accessible_get_type (void);
index 138152392464b3ce11e521d44619bce1b8aa4c34..ba11ddce0848138db3d292ab78d9a89b0d29f0e3 100644 (file)
@@ -25,7 +25,7 @@
 
 static void atk_selection_interface_init (AtkSelectionIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (GtkMenuShellAccessible, gtk_menu_shell_accessible, GAIL_TYPE_CONTAINER,
+G_DEFINE_TYPE_WITH_CODE (GtkMenuShellAccessible, gtk_menu_shell_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_SELECTION, atk_selection_interface_init))
 
 static void
index 265b74eccb127d41f7d49b2ffd80f75da467af8b..b5392e960448365929a5ad97539f0442c8003c2d 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __GTK_MENU_SHELL_ACCESSIBLE_H__
 #define __GTK_MENU_SHELL_ACCESSIBLE_H__
 
-#include "gailcontainer.h"
+#include "gtkcontaineraccessible.h"
 
 G_BEGIN_DECLS
 
@@ -36,12 +36,12 @@ typedef struct _GtkMenuShellAccessibleClass GtkMenuShellAccessibleClass;
 
 struct _GtkMenuShellAccessible
 {
-  GailContainer parent;
+  GtkContainerAccessible parent;
 };
 
 struct _GtkMenuShellAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType gtk_menu_shell_accessible_get_type (void);
index 6a3eae7130b46e47ae4ba4e8902048960c0b5f86..0668e007f35ec61ff3048e449b3bba7ecadfb8b5 100644 (file)
@@ -27,7 +27,7 @@
 
 static void atk_selection_interface_init (AtkSelectionIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (GtkNotebookAccessible, gtk_notebook_accessible, GAIL_TYPE_CONTAINER,
+G_DEFINE_TYPE_WITH_CODE (GtkNotebookAccessible, gtk_notebook_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_SELECTION, atk_selection_interface_init))
 
 static gboolean
@@ -310,7 +310,7 @@ gtk_notebook_accessible_class_init (GtkNotebookAccessibleClass *klass)
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
   AtkObjectClass  *class = ATK_OBJECT_CLASS (klass);
   GailWidgetClass *widget_class = (GailWidgetClass*)klass;
-  GailContainerClass *container_class = (GailContainerClass*)klass;
+  GtkContainerAccessibleClass *container_class = (GtkContainerAccessibleClass*)klass;
 
 
   gobject_class->finalize = gtk_notebook_accessible_finalize;
index 770c12b0704885423593f423b5033eb1b7d076bd..1164bb774928b311e9732fe0df55de8458119d25 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __GTK_NOTEBOOK_ACCESSIBLE_H__
 #define __GTK_NOTEBOOK_ACCESSIBLE_H__
 
-#include "gailcontainer.h"
+#include "gtkcontaineraccessible.h"
 
 G_BEGIN_DECLS
 
@@ -36,7 +36,7 @@ typedef struct _GtkNotebookAccessibleClass GtkNotebookAccessibleClass;
 
 struct _GtkNotebookAccessible
 {
-  GailContainer parent;
+  GtkContainerAccessible parent;
 
   /*
    * page_cache maintains a list of pre-ref'd Notebook Pages.
@@ -52,7 +52,7 @@ struct _GtkNotebookAccessible
 
 struct _GtkNotebookAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType gtk_notebook_accessible_get_type (void);
index 939087021c52a6e51508c17d63a0f6805bb265ee..40704fd44189f0c1587d05722eb50bbb01970e63 100644 (file)
@@ -25,7 +25,7 @@
 
 static void atk_value_interface_init (AtkValueIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (GtkPanedAccessible, gtk_paned_accessible, GAIL_TYPE_CONTAINER,
+G_DEFINE_TYPE_WITH_CODE (GtkPanedAccessible, gtk_paned_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_VALUE, atk_value_interface_init))
 
 static void
index e255ec2e19e5dadb446b9bfddff661a4d85b18ba..5b73e3e67bd342663c841d255f896d5747c41e3b 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __GTK_PANED_ACCESSIBLE_H__
 #define __GTK_PANED_ACCESSIBLE_H__
 
-#include "gailcontainer.h"
+#include "gtkcontaineraccessible.h"
 
 G_BEGIN_DECLS
 
@@ -36,12 +36,12 @@ typedef struct _GtkPanedAccessibleClass GtkPanedAccessibleClass;
 
 struct _GtkPanedAccessible
 {
-  GailContainer parent;
+  GtkContainerAccessible parent;
 };
 
 struct _GtkPanedAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType gtk_paned_accessible_get_type (void);
index 7cd4ab640cbc534e9be48b609c5cd4c2c7c0bfcf..d094909cece9c16cbfb483b81a31025f4330ea6e 100644 (file)
@@ -24,7 +24,7 @@
 #include "gtkscrolledwindowaccessible.h"
 
 
-G_DEFINE_TYPE (GtkScrolledWindowAccessible, gtk_scrolled_window_accessible, GAIL_TYPE_CONTAINER)
+G_DEFINE_TYPE (GtkScrolledWindowAccessible, gtk_scrolled_window_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE)
 
 static void
 visibility_changed (GObject    *object,
index c3f1ac573defe4114c2da0cf88845d21d3a9fe59..139c99d83ca61a8066221e6468ebda6a90d8c453 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __GTK_SCROLLED_WINDOW_ACCESSIBLE_H__
 #define __GTK_SCROLLED_WINDOW_ACCESSIBLE_H__
 
-#include "gailcontainer.h"
+#include "gtkcontaineraccessible.h"
 
 G_BEGIN_DECLS
 
@@ -36,12 +36,12 @@ typedef struct _GtkScrolledWindowAccessibleClass GtkScrolledWindowAccessibleClas
 
 struct _GtkScrolledWindowAccessible
 {
-  GailContainer parent;
+  GtkContainerAccessible parent;
 };
 
 struct _GtkScrolledWindowAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType gtk_scrolled_window_accessible_get_type (void);
index 404b1fa8278636bcba6564d197666a9bb788c83e..4d92c0d64b75e35a75b648de8d30083078643673 100644 (file)
@@ -130,7 +130,7 @@ static void
 gtk_statusbar_accessible_class_init (GtkStatusbarAccessibleClass *klass)
 {
   AtkObjectClass  *class = ATK_OBJECT_CLASS (klass);
-  GailContainerClass *container_class = (GailContainerClass*)klass;
+  GtkContainerAccessibleClass *container_class = (GtkContainerAccessibleClass*)klass;
 
   class->get_name = gtk_statusbar_accessible_get_name;
   class->get_n_children = gtk_statusbar_accessible_get_n_children;
index cf879eb8c0f558ea42c768ec9f2f50a96f85b71f..f9a0453a01eb71b71959e60d7cb7b3233fb2429d 100644 (file)
@@ -242,7 +242,7 @@ menu_item_add_gtk (GtkContainer *container,
   GtkWidget *parent_widget;
   AtkObject *atk_parent;
   AtkObject *atk_child;
-  GailContainer *gail_container;
+  GtkContainerAccessible *container_accessible;
   gint index;
 
   g_return_val_if_fail (GTK_IS_MENU (container), 1);
@@ -254,10 +254,10 @@ menu_item_add_gtk (GtkContainer *container,
       atk_child = gtk_widget_get_accessible (widget);
 
       g_object_notify (G_OBJECT (atk_child), "accessible-parent");
-      gail_container = GAIL_CONTAINER (atk_parent);
-      g_list_free (gail_container->children);
-      gail_container->children = gtk_container_get_children (container);
-      index = g_list_index (gail_container->children, widget);
+      container_accessible = GTK_CONTAINER_ACCESSIBLE (atk_parent);
+      g_list_free (container_accessible->children);
+      container_accessible->children = gtk_container_get_children (container);
+      index = g_list_index (container_accessible->children, widget);
       g_signal_emit_by_name (atk_parent, "children_changed::add",
                              index, atk_child, NULL);
     }
@@ -271,7 +271,7 @@ menu_item_remove_gtk (GtkContainer *container,
   GtkWidget *parent_widget;
   AtkObject *atk_parent;
   AtkObject *atk_child;
-  GailContainer *gail_container;
+  GtkContainerAccessible *container_accessible;
   gint index;
   gint list_length;
 
@@ -285,11 +285,11 @@ menu_item_remove_gtk (GtkContainer *container,
 
       g_object_notify (G_OBJECT (atk_child), "accessible-parent");
 
-      gail_container = GAIL_CONTAINER (atk_parent);
-      index = g_list_index (gail_container->children, widget);
-      list_length = g_list_length (gail_container->children);
-      g_list_free (gail_container->children);
-      gail_container->children = gtk_container_get_children (container);
+      container_accessible = GTK_CONTAINER_ACCESSIBLE (atk_parent);
+      index = g_list_index (container_accessible->children, widget);
+      list_length = g_list_length (container_accessible->children);
+      g_list_free (container_accessible->children);
+      container_accessible->children = gtk_container_get_children (container);
       if (index >= 0 && index <= list_length)
         g_signal_emit_by_name (atk_parent, "children_changed::remove",
                                index, atk_child, NULL);
index 7789fcdda9d5250b3bb6ed9a3a69f3361bfdf4e1..f98021b7fe1f536001cdde4b12dc9fa81b31dfc3 100644 (file)
@@ -53,7 +53,7 @@ static void atk_editable_text_interface_init      (AtkEditableTextIface      *if
 static void atk_text_interface_init               (AtkTextIface              *iface);
 static void atk_streamable_content_interface_init (AtkStreamableContentIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (GtkTextViewAccessible, gtk_text_view_accessible, GAIL_TYPE_CONTAINER,
+G_DEFINE_TYPE_WITH_CODE (GtkTextViewAccessible, gtk_text_view_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_EDITABLE_TEXT, atk_editable_text_interface_init)
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_TEXT, atk_text_interface_init)
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_STREAMABLE_CONTENT, atk_streamable_content_interface_init))
index 9e0dd6073508b33b6c31df37aa326d041aa3caad..3f69fad3d8b3679c50d4e27bc5686dc888512444 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __GTK_TEXT_VIEW_ACCESSIBLE_H__
 #define __GTK_TEXT_VIEW_ACCESSIBLE_H__
 
-#include "gailcontainer.h"
+#include "gtkcontaineraccessible.h"
 
 G_BEGIN_DECLS
 
@@ -31,12 +31,12 @@ G_BEGIN_DECLS
 #define GTK_IS_TEXT_VIEW_ACCESSIBLE_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TEXT_VIEW_ACCESSIBLE))
 #define GTK_TEXT_VIEW_ACCESSIBLE_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TEXT_VIEW_ACCESSIBLE, GtkTextViewAccessibleClass))
 
-typedef struct _GtkTextViewAccessible              GtkTextViewAccessible;
-typedef struct _GtkTextViewAccessibleClass         GtkTextViewAccessibleClass;
+typedef struct _GtkTextViewAccessible      GtkTextViewAccessible;
+typedef struct _GtkTextViewAccessibleClass GtkTextViewAccessibleClass;
 
 struct _GtkTextViewAccessible
 {
-  GailContainer  parent;
+  GtkContainerAccessible parent;
 
   gint           previous_insert_offset;
   gint           previous_selection_bound;
@@ -52,7 +52,7 @@ struct _GtkTextViewAccessible
 
 struct _GtkTextViewAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType gtk_text_view_accessible_get_type (void);
index 09e3e5702edc8b466d32d564138a6ba71241763f..86ef72e45b19c834b647523ab40d925e5b4a97da 100644 (file)
@@ -160,7 +160,7 @@ static void atk_selection_interface_init    (AtkSelectionIface   *iface);
 static void atk_component_interface_init    (AtkComponentIface   *iface);
 static void gail_cell_parent_interface_init (GailCellParentIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (GtkTreeViewAccessible, gtk_tree_view_accessible, GAIL_TYPE_CONTAINER,
+G_DEFINE_TYPE_WITH_CODE (GtkTreeViewAccessible, gtk_tree_view_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_TABLE, atk_table_interface_init)
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_SELECTION, atk_selection_interface_init)
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init)
@@ -724,11 +724,11 @@ gtk_tree_view_accessible_class_init (GtkTreeViewAccessibleClass *klass)
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
   GtkAccessibleClass *accessible_class;
   GailWidgetClass *widget_class;
-  GailContainerClass *container_class;
+  GtkContainerAccessibleClass *container_class;
 
   accessible_class = (GtkAccessibleClass*)klass;
   widget_class = (GailWidgetClass*)klass;
-  container_class = (GailContainerClass*)klass;
+  container_class = (GtkContainerAccessibleClass*)klass;
 
   class->get_n_children = gtk_tree_view_accessible_get_n_children;
   class->ref_child = gtk_tree_view_accessible_ref_child;
index 698a83bc28fd177516a5919bba5a398496c92127..64d9d6e241aff3bdb31138741b407c0c35b95ecb 100644 (file)
@@ -21,7 +21,7 @@
 #define __GTK_TREE_VIEW_ACCESSIBLE_H__
 
 #include <gtk/gtk.h>
-#include "gailcontainer.h"
+#include "gtkcontaineraccessible.h"
 #include "gailcell.h"
 
 G_BEGIN_DECLS
@@ -38,7 +38,7 @@ typedef struct _GtkTreeViewAccessibleClass GtkTreeViewAccessibleClass;
 
 struct _GtkTreeViewAccessible
 {
-  GailContainer parent;
+  GtkContainerAccessible parent;
 
   gint           n_children_deleted;
   gint           n_rows;
@@ -58,7 +58,7 @@ struct _GtkTreeViewAccessible
 
 struct _GtkTreeViewAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType      gtk_tree_view_accessible_get_type       (void);
index f07d35f550a70ca4a564fa0c7cfb90bc6cb544c7..e421093fc60c7bc768ceb081883c9c5507e736b3 100644 (file)
@@ -56,7 +56,7 @@ static guint gtk_window_accessible_signals [LAST_SIGNAL] = { 0, };
 
 static void atk_component_interface_init (AtkComponentIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (GtkWindowAccessible, gtk_window_accessible, GAIL_TYPE_CONTAINER,
+G_DEFINE_TYPE_WITH_CODE (GtkWindowAccessible, gtk_window_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init))
 
 
index ee9cb82cf561fe6a1ffe6b2e444818269a8f0810..5c781b3f57752121152fc2e5f1b60ecf2fd53e0b 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __GTK_WINDOW_ACCESSIBLE_H__
 #define __GTK_WINDOW_ACCESSIBLE_H__
 
-#include "gailcontainer.h"
+#include "gtkcontaineraccessible.h"
 
 G_BEGIN_DECLS
 
@@ -36,12 +36,12 @@ typedef struct _GtkWindowAccessibleClass GtkWindowAccessibleClass;
 
 struct _GtkWindowAccessible
 {
-  GailContainer parent;
+  GtkContainerAccessible parent;
 };
 
 struct _GtkWindowAccessibleClass
 {
-  GailContainerClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
 GType gtk_window_accessible_get_type (void);
index 66e7a0c21d6fd45fc9dd3143f6b03c2a35064e1d..e9ddd0fd079fa3a6383f2e2606ccbe53bde2acd2 100644 (file)
@@ -47,7 +47,7 @@
 #include "gtkwindow.h"
 #include "gtkintl.h"
 #include "gtktoolbar.h"
-
+#include "a11y/gtkcontaineraccessible.h"
 
 /**
  * SECTION:gtkcontainer
@@ -512,6 +512,8 @@ gtk_container_class_init (GtkContainerClass *class)
                   GTK_TYPE_WIDGET);
 
   g_type_class_add_private (class, sizeof (GtkContainerPrivate));
+
+  gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_CONTAINER_ACCESSIBLE);
 }
 
 static void
index b395f43f46f05ed8c305b6f9114d6f1c311eb7a0..3dd5d37a7cd093343500dc093f4fac493a95d76d 100644 (file)
@@ -47,6 +47,7 @@
 #include "gtktreednd.h"
 #include "gtktypebuiltins.h"
 #include "gtkprivate.h"
+#include "a11y/gtkcontaineraccessible.h"
 
 /**
  * SECTION:gtkiconview
@@ -447,6 +448,7 @@ static void     gtk_icon_view_buildable_custom_tag_end   (GtkBuildable  *buildab
                                                          GObject       *child,
                                                          const gchar   *tagname,
                                                          gpointer      *data);
+static GType    gtk_icon_view_accessible_get_type        (void);
 
 static guint icon_view_signals[LAST_SIGNAL] = { 0 };
 
@@ -1046,6 +1048,8 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                                  GTK_MOVEMENT_VISUAL_POSITIONS, 1);
   gtk_icon_view_add_move_binding (binding_set, GDK_KEY_KP_Left, 0, 
                                  GTK_MOVEMENT_VISUAL_POSITIONS, -1);
+
+  gtk_widget_class_set_accessible_type (widget_class, gtk_icon_view_accessible_get_type ());
 }
 
 static void
@@ -9216,13 +9220,13 @@ gtk_icon_view_accessible_get_type (void)
     {
       GTypeInfo tinfo =
       {
-        0, /* class size */
+        sizeof (GtkContainerAccessibleClass), /* class size */
         (GBaseInitFunc) NULL, /* base init */
         (GBaseFinalizeFunc) NULL, /* base finalize */
         (GClassInitFunc) gtk_icon_view_accessible_class_init,
         (GClassFinalizeFunc) NULL, /* class finalize */
         NULL, /* class data */
-        0, /* instance size */
+        sizeof (GtkContainerAccessible), /* instance size */
         0, /* nb preallocs */
         (GInstanceInitFunc) NULL, /* instance init */
         NULL /* value table */
@@ -9240,26 +9244,8 @@ gtk_icon_view_accessible_get_type (void)
         NULL
       };
 
-      /*
-       * Figure out the size of the class and instance
-       * we are deriving from
-       */
-      AtkObjectFactory *factory;
-      GType derived_type;
-      GTypeQuery query;
-      GType derived_atk_type;
-
-      derived_type = g_type_parent (GTK_TYPE_ICON_VIEW);
-      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);
-      tinfo.class_size = query.class_size;
-      tinfo.instance_size = query.instance_size;
-      type = g_type_register_static (derived_atk_type, 
-                                     I_("GtkIconViewAccessible"), 
-                                     &tinfo, 0);
+      type = g_type_register_static (GTK_TYPE_CONTAINER_ACCESSIBLE,
+                                     I_("GtkIconViewAccessible"), &tinfo, 0);
       g_type_add_interface_static (type, ATK_TYPE_COMPONENT,
                                    &atk_component_info);
       g_type_add_interface_static (type, ATK_TYPE_SELECTION,
index 84c82abbd11535331958c1ef6087eaa599727fb2..b4455848bb3108ff7756d1eec257c9a08738ee85 100644 (file)
@@ -126,7 +126,7 @@ window1
           <AtkComponent>
           layer: widget
           alpha: 1
-          unnamed-GailContainer-12
+          unnamed-GtkContainerAccessible-12
             "panel"
             parent: unnamed-GtkBoxAccessible-11
             index: 0
@@ -137,7 +137,7 @@ window1
             alpha: 1
             #FFFFFF
               "text"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 0
               description: You can enter an HTML-style hexadecimal color value, or simply a color name such as 'orange' in this entry.
               labelled-by: Color name:
@@ -180,7 +180,7 @@ window1
               action 0 keybinding: <Alt>n
             Color name:
               "label"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 1
               name: Color name:
               label-for: #FFFFFF
@@ -220,7 +220,7 @@ window1
                                   wrap-mode: word
             255
               "text"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 2
               description: Transparency of the color.
               state: editable enabled focusable sensitive single-line
@@ -261,7 +261,7 @@ window1
               action 0 name: activate
             unnamed-GtkScaleAccessible-13
               "slider"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 3
               description: Transparency of the color.
               labelled-by: Opacity:
@@ -280,7 +280,7 @@ window1
               minimum increment: 1.000000
             Opacity:
               "label"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 4
               name: Opacity:
               label-for: unnamed-GtkScaleAccessible-13
@@ -320,7 +320,7 @@ window1
                                   wrap-mode: word
             unnamed-GailWidget-14
               "separator"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 5
               state: enabled horizontal sensitive showing visible
               toolkit: gail
@@ -329,7 +329,7 @@ window1
               alpha: 1
             255
               "spin button"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 6
               description: Amount of blue light in the color.
               controller-for: unnamed-GailWidget-4
@@ -378,7 +378,7 @@ window1
               minimum increment: 1.000000
             Blue:
               "label"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 7
               name: Blue:
               label-for: 255
@@ -418,7 +418,7 @@ window1
                                   wrap-mode: word
             255
               "spin button"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 8
               description: Amount of green light in the color.
               controller-for: unnamed-GailWidget-4
@@ -467,7 +467,7 @@ window1
               minimum increment: 1.000000
             Green:
               "label"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 9
               name: Green:
               label-for: 255
@@ -507,7 +507,7 @@ window1
                                   wrap-mode: word
             255
               "spin button"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 10
               description: Amount of red light in the color.
               controller-for: unnamed-GailWidget-4
@@ -556,7 +556,7 @@ window1
               minimum increment: 1.000000
             Red:
               "label"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 11
               name: Red:
               label-for: 255
@@ -596,7 +596,7 @@ window1
                                   wrap-mode: word
             100
               "spin button"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 12
               description: Brightness of the color.
               controller-for: unnamed-GailWidget-4
@@ -645,7 +645,7 @@ window1
               minimum increment: 1.000000
             Value:
               "label"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 13
               name: Value:
               label-for: 100
@@ -685,7 +685,7 @@ window1
                                   wrap-mode: word
             0
               "spin button"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 14
               description: Intensity of the color.
               controller-for: unnamed-GailWidget-4
@@ -734,7 +734,7 @@ window1
               minimum increment: 1.000000
             Saturation:
               "label"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 15
               name: Saturation:
               label-for: 0
@@ -774,7 +774,7 @@ window1
                                   wrap-mode: word
             0
               "spin button"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 16
               description: Position on the color wheel.
               controller-for: unnamed-GailWidget-4
@@ -823,7 +823,7 @@ window1
               minimum increment: 1.000000
             Hue:
               "label"
-              parent: unnamed-GailContainer-12
+              parent: unnamed-GtkContainerAccessible-12
               index: 17
               name: Hue:
               label-for: 0
@@ -910,7 +910,7 @@ window1
                                   variant: <omitted>
                                   weight: <omitted>
                                   wrap-mode: word
-            unnamed-GailContainer-17
+            unnamed-GtkContainerAccessible-17
               "panel"
               parent: unnamed-GtkBoxAccessible-15
               index: 1
@@ -921,7 +921,7 @@ window1
               alpha: 1
               unnamed-GtkFrameAccessible-18
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 0
                 state: enabled sensitive visible
                 toolkit: gail
@@ -940,7 +940,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-20
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 1
                 state: enabled sensitive visible
                 toolkit: gail
@@ -959,7 +959,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-22
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 2
                 state: enabled sensitive visible
                 toolkit: gail
@@ -978,7 +978,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-24
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 3
                 state: enabled sensitive visible
                 toolkit: gail
@@ -997,7 +997,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-26
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 4
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1016,7 +1016,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-28
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 5
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1035,7 +1035,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-30
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 6
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1054,7 +1054,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-32
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 7
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1073,7 +1073,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-34
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 8
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1092,7 +1092,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-36
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 9
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1111,7 +1111,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-38
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 10
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1130,7 +1130,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-40
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 11
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1149,7 +1149,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-42
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 12
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1168,7 +1168,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-44
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 13
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1187,7 +1187,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-46
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 14
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1206,7 +1206,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-48
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 15
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1225,7 +1225,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-50
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 16
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1244,7 +1244,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-52
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 17
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1263,7 +1263,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-54
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 18
                 state: enabled sensitive visible
                 toolkit: gail
@@ -1282,7 +1282,7 @@ window1
                   alpha: 1
               unnamed-GtkFrameAccessible-56
                 "panel"
-                parent: unnamed-GailContainer-17
+                parent: unnamed-GtkContainerAccessible-17
                 index: 19
                 state: enabled sensitive visible
                 toolkit: gail