Index: a11y/object.c
===================================================================
RCS file: /export/src/cvs/gtkhtml/a11y/object.c,v
retrieving revision 1.7
diff -u -r1.7 object.c
--- a11y/object.c	2004/05/26 02:32:07	1.7
+++ a11y/object.c	2004/07/28 01:56:30
@@ -35,6 +35,106 @@
 
 static GtkAccessibleClass *parent_class = NULL;
 
+static gint
+get_n_actions (AtkAction *action)
+{
+        return 1;
+}
+
+static G_CONST_RETURN gchar*
+get_description (AtkAction *action,
+                             gint      i)
+{
+        if (i == 0)
+                return "grab";
+
+        return NULL;
+}
+
+static G_CONST_RETURN gchar*
+action_get_name (AtkAction *action, gint      i)
+{
+        if (i == 0)
+                return "grab";
+
+        return NULL;
+}
+
+
+static uint action_idle_handler = 0;
+static gboolean
+idle_do_action (gpointer data)
+{
+	GtkHTMLA11Y * a11y;
+	GtkWidget *widget;
+
+	action_idle_handler = 0;
+
+	a11y = GTK_HTML_A11Y (data);
+	widget = GTK_ACCESSIBLE (a11y)->widget;
+	if (widget == NULL) {
+	/*
+	* State is defunct
+	*/
+	return FALSE;
+	}
+
+	if (!GTK_WIDGET_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget)) {
+		return FALSE;
+	}
+
+	gtk_widget_grab_focus (widget);
+
+	return FALSE;
+}
+
+static gboolean
+do_action (AtkAction * action, gint i)
+{
+	GtkHTMLA11Y * a11y;
+	GtkWidget *widget;
+	gboolean return_value = TRUE;
+
+	a11y = GTK_HTML_A11Y (action);
+	widget = GTK_ACCESSIBLE (action)->widget;
+
+	if (widget == NULL) {
+	/*
+	* State is defunct
+	*/
+	return FALSE;
+	}
+
+	if (!GTK_WIDGET_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
+		return FALSE;
+
+
+	switch (i) {
+	case 0:
+		if (action_idle_handler)
+			return_value = FALSE;
+		else
+			action_idle_handler = g_idle_add (idle_do_action, a11y);
+		break;
+	default:
+		return_value = FALSE;
+		break;
+	}
+	return return_value;
+}
+
+static void
+atk_action_interface_init (AtkActionIface *iface)
+{
+        g_return_if_fail (iface != NULL);
+
+        iface->do_action = do_action;
+        iface->get_n_actions = get_n_actions;
+        iface->get_description = get_description;
+        iface->get_name = action_get_name;
+}
+
+
 GType
 gtk_html_a11y_get_type (void)
 {
@@ -54,6 +154,12 @@
 			NULL                                             /* value table */
 		};
 
+                static const GInterfaceInfo atk_action_info = {
+                        (GInterfaceInitFunc) atk_action_interface_init,
+                        (GInterfaceFinalizeFunc) NULL,
+                        NULL
+                };
+
 		/*
 		 * Figure out the size of the class and instance 
 		 * we are deriving from
@@ -69,6 +175,9 @@
 		tinfo.instance_size = query.instance_size;
 
 		type = g_type_register_static (derived_atk_type, "GtkHTMLA11Y", &tinfo, 0);
+
+                g_type_add_interface_static (type, ATK_TYPE_ACTION, &atk_action_info);
+
 	}
 
 	return type;
@@ -110,6 +219,7 @@
 {
 	HTMLObject *child;
 	AtkObject *accessible_child = NULL;
+
 	
 	if (GTK_HTML_A11Y_GTKHTML (accessible)->engine->clue) {
 		child = html_object_get_child (GTK_HTML_A11Y_GTKHTML (accessible)->engine->clue, index);
@@ -125,6 +235,14 @@
 	return accessible_child;
 }
 
+static G_CONST_RETURN gchar*
+gtk_html_a11y_get_name (AtkObject *obj)
+{
+  G_CONST_RETURN gchar *name;
+
+  return "html container";
+}
+
 static void
 gtk_html_a11y_class_init (GtkHTMLA11YClass *klass)
 {
@@ -136,6 +254,7 @@
 	atk_class->initialize = gtk_html_a11y_initialize;
 	atk_class->get_n_children = gtk_html_a11y_get_n_children;
 	atk_class->ref_child = gtk_html_a11y_ref_child;
+	atk_class->get_name = gtk_html_a11y_get_name;
 
 	gobject_class->finalize = gtk_html_a11y_finalize;
 }
@@ -212,8 +331,9 @@
 
 	accessible = ATK_OBJECT (object);
 	atk_object_initialize (accessible, widget);
+
+	accessible->role = ATK_ROLE_PANEL;
 
-	accessible->role = ATK_ROLE_HTML_CONTAINER;
 	g_signal_connect_after(widget, "grab_focus", 
 			G_CALLBACK (gtk_html_a11y_grab_focus_cb),
 			NULL);
Index: a11y/object.h
===================================================================
RCS file: /export/src/cvs/gtkhtml/a11y/object.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 object.h
--- a11y/object.h	2003/09/26 06:38:00	1.1.1.1
+++ a11y/object.h	2004/07/28 01:56:30
@@ -43,8 +43,6 @@
 struct _GtkHTMLA11Y
 {
 	GtkAccessible parent;
-
-	AtkObject *tree;
 };
 
 GType gtk_html_a11y_get_type (void);
