diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2010-07-20 15:01:56 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2010-07-20 15:07:40 (GMT) |
commit | 584f014b63c56fe3770cba9682fc21c31e09a2e9 (patch) | |
tree | de1a6a07ff5bd7b8a52e176e72af12a8172b5ed9 /libdocument/ev-document-annotations.c | |
parent | dfed06b88fae63bbd0460e43df977c0d33ef1045 (diff) |
Preliminary support for adding new annotations
At the moment only Text annotations can be added. See bug #168304.
Diffstat (limited to 'libdocument/ev-document-annotations.c')
-rw-r--r-- | libdocument/ev-document-annotations.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/libdocument/ev-document-annotations.c b/libdocument/ev-document-annotations.c index 6ccdd57..4bc039e 100644 --- a/libdocument/ev-document-annotations.c +++ b/libdocument/ev-document-annotations.c @@ -38,11 +38,30 @@ ev_document_annotations_get_annotations (EvDocumentAnnotations *document_annots, } void -ev_document_annotations_annotation_set_contents (EvDocumentAnnotations *document_annots, - EvAnnotation *annot, - const gchar *contents) +ev_document_annotations_save_annotation (EvDocumentAnnotations *document_annots, + EvAnnotation *annot, + EvAnnotationsSaveMask mask) { EvDocumentAnnotationsInterface *iface = EV_DOCUMENT_ANNOTATIONS_GET_IFACE (document_annots); - iface->annotation_set_contents (document_annots, annot, contents); + iface->save_annotation (document_annots, annot, mask); +} + +void +ev_document_annotations_add_annotation (EvDocumentAnnotations *document_annots, + EvAnnotation *annot, + EvRectangle *rect) +{ + EvDocumentAnnotationsInterface *iface = EV_DOCUMENT_ANNOTATIONS_GET_IFACE (document_annots); + + if (iface->add_annotation) + iface->add_annotation (document_annots, annot, rect); +} + +gboolean +ev_document_annotations_can_add_annotation (EvDocumentAnnotations *document_annots) +{ + EvDocumentAnnotationsInterface *iface = EV_DOCUMENT_ANNOTATIONS_GET_IFACE (document_annots); + + return iface->add_annotation != NULL; } |