cvs server: Diffing .
Index: atkhyperlink.c
===================================================================
RCS file: /cvs/gnome/atk/atk/atkhyperlink.c,v
retrieving revision 1.11
diff -u -p -r1.11 atkhyperlink.c
--- atkhyperlink.c	14 Nov 2002 17:50:54 -0000	1.11
+++ atkhyperlink.c	29 Jan 2003 09:28:12 -0000
@@ -19,11 +19,23 @@
 
 #include "atkhyperlink.h"
 
+enum
+{
+  PROP_0,  /* gobject convention */
+
+  PROP_SELECTED_LINK,
+  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 gpointer  parent_class = NULL;
@@ -64,8 +76,19 @@ atk_hyperlink_get_type (void)
 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;
+
+  g_object_class_install_property (gobject_class,
+                                   PROP_SELECTED_LINK,
+                                   g_param_spec_boolean ("selected-link",
+                                                         "Selected Link",
+                                                         "Specifies whether theAtkHyperlink object is selected",
+                                                         FALSE,
+                                                         G_PARAM_READABLE));
 }
 
 static void
@@ -74,6 +97,26 @@ atk_hyperlink_init  (AtkHyperlink       
 {
 }
 
+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_SELECTED_LINK:
+      g_value_set_boolean (value, atk_hyperlink_is_selected_link (link));
+      break;
+    default:
+      break;
+    }
+}
+
 /**
  * atk_hyperlink_get_uri:
  * @link_: an #AtkHyperlink
@@ -246,6 +289,28 @@ atk_hyperlink_get_n_anchors (AtkHyperlin
     return 0;
 }
 
+/**
+ * atk_hyperlink_is_selected_link:
+ * @link_: an #AtkHyperlink
+ *
+ * Determines whether this AtkHyperlink is selected
+ *
+ * Returns: True is the AtkHyperlink is selected, False otherwise
+ **/
+gboolean
+atk_hyperlink_is_selected_link (AtkHyperlink *link)
+{
+  AtkHyperlinkClass *klass;
+
+  g_return_val_if_fail (ATK_IS_HYPERLINK (link), FALSE);
+
+  klass = ATK_HYPERLINK_GET_CLASS (link);
+  if (klass->is_selected_link)
+    return (klass->is_selected_link) (link);
+  else
+    return FALSE;
+}
+
 static void atk_hyperlink_action_iface_init (AtkActionIface *iface)
 {
   /*
@@ -253,8 +318,5 @@ static void atk_hyperlink_action_iface_i
    *
    * When we come to derive a class from AtkHyperlink we will provide an
    * implementation of the AtkAction interface. 
-   *
-   * This depends on being able to override an interface in a derived class
-   * which currently (March 2001) is not implemented but will be in GTK+ 2.0.
    */
 }
Index: atkhyperlink.h
===================================================================
RCS file: /cvs/gnome/atk/atk/atkhyperlink.h,v
retrieving revision 1.8
diff -u -p -r1.8 atkhyperlink.h
--- atkhyperlink.h	14 Nov 2002 17:50:54 -0000	1.8
+++ atkhyperlink.h	29 Jan 2003 09:28:13 -0000
@@ -104,9 +104,9 @@ struct _AtkHyperlinkClass
    */
   guint	           (* link_state)	   (AtkHyperlink     *link_);
   
+  gboolean         (* is_selected_link)    (AtkHyperlink     *link_);
   AtkFunction      pad1;
   AtkFunction      pad2;
-  AtkFunction      pad3;
 };
 
 GType            atk_hyperlink_get_type             (void);
@@ -126,6 +126,7 @@ gboolean         atk_hyperlink_is_valid 
 gboolean         atk_hyperlink_is_inline             (AtkHyperlink     *link_);
 
 gint		 atk_hyperlink_get_n_anchors        (AtkHyperlink     *link_);
+gboolean         atk_hyperlink_is_selected_link     (AtkHyperlink     *link_);
 
 
 #ifdef __cplusplus
Index: atkhypertext.c
===================================================================
RCS file: /cvs/gnome/atk/atk/atkhypertext.c,v
retrieving revision 1.8
diff -u -p -r1.8 atkhypertext.c
--- atkhypertext.c	14 Nov 2001 14:38:00 -0000	1.8
+++ atkhypertext.c	29 Jan 2003 09:28:13 -0000
@@ -19,6 +19,16 @@
 
 #include "atkhypertext.h"
 
+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 ()
 {
@@ -28,7 +38,7 @@ atk_hypertext_get_type ()
     static const GTypeInfo tinfo =
     {
       sizeof (AtkHypertextIface),
-      (GBaseInitFunc) NULL,
+      (GBaseInitFunc) atk_hypertext_base_init,
       (GBaseFinalizeFunc) NULL,
 
     };
@@ -37,6 +47,27 @@ atk_hypertext_get_type ()
   }
 
   return type;
+}
+
+static void
+atk_hypertext_base_init (AtkHypertextIface *class)
+{
+  static gboolean initialized = FALSE;
+
+  if (!initialized)
+    {
+      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;
+    }
 }
 
 /**
Index: atkhypertext.h
===================================================================
RCS file: /cvs/gnome/atk/atk/atkhypertext.h,v
retrieving revision 1.6
diff -u -p -r1.6 atkhypertext.h
--- atkhypertext.h	28 Feb 2002 13:36:39 -0000	1.6
+++ atkhypertext.h	29 Jan 2003 09:28:13 -0000
@@ -52,10 +52,16 @@ struct _AtkHypertextIface
   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);
+
   AtkFunction pad1;
   AtkFunction pad2;
   AtkFunction pad3;
-  AtkFunction pad4;
 };
 GType atk_hypertext_get_type (void);
 
