Index: atk/atkrelation.c
===================================================================
RCS file: /cvs/gnome/atk/atk/atkrelation.c,v
retrieving revision 1.14
diff -u -p -r1.14 atkrelation.c
--- atk/atkrelation.c	2002/02/22 15:56:49	1.14
+++ atk/atkrelation.c	2002/02/25 15:30:29
@@ -23,12 +23,28 @@
 #include "atkrelation.h"
 #include "atk-enum-types.h"
 
+enum {
+  PROP_0,
+
+  PROP_RELATION_TYPE,
+  PROP_TARGET,
+  PROP_LAST
+};
+
 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_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);
 
 GType
 atk_relation_get_type (void)
@@ -62,6 +78,23 @@ atk_relation_class_init (AtkRelationClas
   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_pointer ("target",
+                                                         "Target",
+                                                         "A pointer array of the targets for the relation",
+                                                         G_PARAM_READWRITE));
 }
 
 /**
@@ -69,7 +102,7 @@ atk_relation_class_init (AtkRelationClas
  * @name: a name string
  *
  * Associate @name with a new #AtkRelationType
- *
+ 
  * Returns: an #AtkRelationType associated with @name
  **/
 AtkRelationType
@@ -200,7 +233,6 @@ atk_relation_new (AtkObject       **targ
 
   g_return_val_if_fail (targets != NULL, NULL);
 
-  relation = g_object_new (ATK_TYPE_RELATION, NULL);
   array = g_ptr_array_sized_new (n_targets);
   for (i = 0; i < n_targets; i++)
   {
@@ -211,8 +243,10 @@ atk_relation_new (AtkObject       **targ
     g_ptr_array_add (array, targets[i]);
   }
   
-  relation->target = array;
-  relation->relationship = relationship;
+  relation =  g_object_new (ATK_TYPE_RELATION, 
+                            "relation_type", relationship,
+                            "target", array,
+                            NULL);
 
   return relation;
 }
@@ -274,3 +308,51 @@ atk_relation_finalize (GObject *object)
 
   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;
+
+  relation = ATK_RELATION (object);
+
+  switch (prop_id)
+    {
+    case PROP_RELATION_TYPE:
+      relation->relationship = g_value_get_enum (value);
+      break; 
+    case PROP_TARGET:
+      relation->target = g_value_get_pointer (value);
+      break; 
+    default:
+      break;
+    }  
+}
+
+static void
+atk_relation_get_property (GObject    *object,
+                           guint      prop_id,
+                           GValue     *value,
+                           GParamSpec *pspec)
+{
+  AtkRelation *relation;
+
+  relation = ATK_RELATION (object);
+
+  switch (prop_id)
+    {
+    case PROP_RELATION_TYPE:
+      g_value_set_enum (value, relation->relationship);
+      break;
+    case PROP_TARGET:
+      g_value_set_pointer (value, relation->target);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }  
+}
+
