Index: object.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/a11y/object.c,v
retrieving revision 1.2.6.1
diff -u -r1.2.6.1 object.c
--- object.c	2 Jul 2003 04:22:46 -0000	1.2.6.1
+++ object.c	21 Jul 2003 09:05:43 -0000
@@ -28,6 +28,7 @@
 #include "object.h"
 #include "paragraph.h"
 #include "utils.h"
+#include "text.h"
 
 static void gtk_html_a11y_class_init (GtkHTMLA11YClass *klass);
 static void gtk_html_a11y_init       (GtkHTMLA11Y *a11y);
@@ -188,7 +189,15 @@
 		prev_object = focus_object;
         	g_object_set_data (obj, "gail-focus-object", focus_object);
         	atk_focus_tracker_notify (focus_object);
-	}
+	} else {
+		if (G_IS_HTML_A11Y_TEXT(focus_object)) {
+			gint offset;
+                                                                                
+			offset = (GTK_HTML(widget))->engine->cursor->offset;
+			g_object_set_data(G_OBJECT(focus_object), "caret-offset", offset);
+			g_signal_emit_by_name(focus_object, "text_caret_moved",offset);
+                }
+        }
 }
 
 AtkObject* 
Index: text.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/a11y/text.c,v
retrieving revision 1.3
diff -u -r1.3 text.c
--- text.c	15 Nov 2002 13:56:44 -0000	1.3
+++ text.c	21 Jul 2003 09:05:44 -0000
@@ -59,6 +59,8 @@
 static gboolean html_a11y_text_add_selection (AtkText *text, gint start_offset, gint end_offset);
 static gboolean html_a11y_text_remove_selection (AtkText *text, gint selection_num);
 static gboolean html_a11y_text_set_selection (AtkText *text, gint selection_num, gint start_offset, gint end_offset);
+static gint html_a11y_text_get_caret_offset (AtkText *text);
+static gboolean html_a11y_text_set_caret_offset (AtkText *text, gint offset);
 
 static AtkObjectClass *parent_class = NULL;
 
@@ -125,6 +127,8 @@
 	iface->get_selection = html_a11y_text_get_selection;
 	iface->remove_selection = html_a11y_text_remove_selection;
 	iface->set_selection = html_a11y_text_set_selection;
+	iface->get_caret_offset = html_a11y_text_get_caret_offset;
+	iface->set_caret_offset = html_a11y_text_set_caret_offset;
 }
 
 static void
@@ -257,6 +261,24 @@
 	str = html_text_get_text (to, start_offset);
 
 	return g_strndup (str, g_utf8_offset_to_pointer (str, end_offset - start_offset) - str);
+}
+
+static gint
+html_a11y_text_get_caret_offset(AtkText * text)
+{
+	HTMLObject * p;
+	HTMLEngine * e;
+
+	g_return_val_if_fail(text && G_IS_HTML_A11Y_TEXT(text), 0);
+
+	return (gint)g_object_get_data(G_OBJECT(text), "caret-offset");
+}
+
+static gboolean
+html_a11y_text_set_caret_offset(AtkText * text, gint offset)
+{
+	printf("FIXME, set_caret_offset not implmented");
+	return FALSE;	
 }
 
 static gchar *
