+ g_object_class->set_property = ev_annotation_set_property;
+ g_object_class->get_property = ev_annotation_get_property;
+
+ g_object_class_install_property (g_object_class,
+ PROP_ANNOT_PAGE,
+ g_param_spec_object ("page",
+ "Page",
+ "The page wehere the annotation is",
+ EV_TYPE_PAGE,
+ G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (g_object_class,
+ PROP_ANNOT_CONTENTS,
+ g_param_spec_string ("contents",
+ "Contents",
+ "The annotation contents",
+ NULL,
+ G_PARAM_READWRITE));
+ g_object_class_install_property (g_object_class,
+ PROP_ANNOT_NAME,
+ g_param_spec_string ("name",
+ "Name",
+ "The annotation unique name",
+ NULL,
+ G_PARAM_READWRITE));
+ g_object_class_install_property (g_object_class,
+ PROP_ANNOT_MODIFIED,
+ g_param_spec_string ("modified",
+ "Modified",
+ "Last modified date as string",
+ NULL,
+ G_PARAM_READWRITE));
+ g_object_class_install_property (g_object_class,
+ PROP_ANNOT_COLOR,
+ g_param_spec_pointer ("color",
+ "Color",
+ "The annotation color",
+ G_PARAM_READWRITE));
+}
+
+EvAnnotationType
+ev_annotation_get_annotation_type (EvAnnotation *annot)
+{
+ g_return_val_if_fail (EV_IS_ANNOTATION (annot), 0);
+
+ return annot->type;
+}
+
+EvPage *
+ev_annotation_get_page (EvAnnotation *annot)
+{
+ g_return_val_if_fail (EV_IS_ANNOTATION (annot), NULL);
+
+ return annot->page;
+}
+
+guint
+ev_annotation_get_page_index (EvAnnotation *annot)
+{
+ g_return_val_if_fail (EV_IS_ANNOTATION (annot), 0);
+
+ return annot->page->index;
+}
+
+gboolean
+ev_annotation_equal (EvAnnotation *annot,
+ EvAnnotation *other)
+{
+ g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
+ g_return_val_if_fail (EV_IS_ANNOTATION (other), FALSE);
+
+ return (annot == other || g_strcmp0 (annot->name, other->name) == 0);
+}
+
+const gchar *
+ev_annotation_get_contents (EvAnnotation *annot)
+{
+ g_return_val_if_fail (EV_IS_ANNOTATION (annot), NULL);
+
+ return annot->contents;
+}
+
+gboolean
+ev_annotation_set_contents (EvAnnotation *annot,
+ const gchar *contents)
+{
+ g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
+
+ if (g_strcmp0 (annot->contents, contents) == 0)
+ return FALSE;
+
+ if (annot->contents)
+ g_free (annot->contents);
+ annot->contents = contents ? g_strdup (contents) : NULL;
+
+ g_object_notify (G_OBJECT (annot), "contents");
+
+ return TRUE;
+}
+
+const gchar *
+ev_annotation_get_name (EvAnnotation *annot)
+{
+ g_return_val_if_fail (EV_IS_ANNOTATION (annot), NULL);
+
+ return annot->name;
+}
+
+gboolean
+ev_annotation_set_name (EvAnnotation *annot,
+ const gchar *name)
+{
+ g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
+
+ if (g_strcmp0 (annot->name, name) == 0)
+ return FALSE;
+
+ if (annot->name)
+ g_free (annot->name);
+ annot->name = name ? g_strdup (name) : NULL;
+
+ g_object_notify (G_OBJECT (annot), "name");
+
+ return TRUE;
+}
+
+const gchar *
+ev_annotation_get_modified (EvAnnotation *annot)
+{
+ g_return_val_if_fail (EV_IS_ANNOTATION (annot), NULL);
+
+ return annot->modified;
+}
+
+gboolean
+ev_annotation_set_modified (EvAnnotation *annot,
+ const gchar *modified)
+{
+ g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
+
+ if (g_strcmp0 (annot->modified, modified) == 0)
+ return FALSE;
+
+ if (annot->modified)
+ g_free (annot->modified);
+ annot->modified = modified ? g_strdup (modified) : NULL;
+
+ g_object_notify (G_OBJECT (annot), "modified");
+
+ return TRUE;
+}
+
+gboolean
+ev_annotation_set_modified_from_time (EvAnnotation *annot,
+ GTime utime)
+{
+ gchar *modified;
+
+ g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
+
+ modified = ev_document_misc_format_date (utime);
+
+ if (g_strcmp0 (annot->modified, modified) == 0) {
+ g_free (modified);
+ return FALSE;
+ }
+
+ if (annot->modified)
+ g_free (annot->modified);
+ annot->modified = modified;
+
+ g_object_notify (G_OBJECT (annot), "modified");
+
+ return TRUE;
+}
+
+void
+ev_annotation_get_color (EvAnnotation *annot,
+ GdkColor *color)
+{
+ g_return_if_fail (EV_IS_ANNOTATION (annot));
+
+ if (color)
+ *color = annot->color;
+}
+
+gboolean
+ev_annotation_set_color (EvAnnotation *annot,
+ const GdkColor *color)
+{
+ g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
+
+ if (annot->color.red == color->red &&
+ annot->color.green == color->green &&
+ annot->color.blue == color->blue)
+ return FALSE;
+
+ if (color)
+ annot->color = *color;
+
+ g_object_notify (G_OBJECT (annot), "color");
+
+ return TRUE;