summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Aliste <[email protected]>2012-06-27 08:51:19 -0400
committerraveit65 <[email protected]>2017-08-28 16:04:00 +0200
commit0f5c79f2e03bd71b91d2fbf3aa48f4ffbf1dd1b1 (patch)
tree73c11f5dd58cbe67e9fc03810825648abae82434
parent7e53c5708bd38b99adf1a4b363ed2c21304dccdd (diff)
downloadatril-0f5c79f2e03bd71b91d2fbf3aa48f4ffbf1dd1b1.tar.bz2
atril-0f5c79f2e03bd71b91d2fbf3aa48f4ffbf1dd1b1.tar.xz
libdocument: Add remove_annotation to DocumentAnnotations.
https://bugzilla.gnome.org/show_bug.cgi?id=649044 origin commit: https://git.gnome.org/browse/evince/commit/?id=d0ed4e6
-rw-r--r--libdocument/ev-document-annotations.c18
-rw-r--r--libdocument/ev-document-annotations.h8
2 files changed, 25 insertions, 1 deletions
diff --git a/libdocument/ev-document-annotations.c b/libdocument/ev-document-annotations.c
index 05084906..a732f3fc 100644
--- a/libdocument/ev-document-annotations.c
+++ b/libdocument/ev-document-annotations.c
@@ -73,3 +73,21 @@ ev_document_annotations_can_add_annotation (EvDocumentAnnotations *document_anno
return iface->add_annotation != NULL;
}
+
+void
+ev_document_annotations_remove_annotation (EvDocumentAnnotations *document_annots,
+ EvAnnotation *annot)
+{
+ EvDocumentAnnotationsInterface *iface = EV_DOCUMENT_ANNOTATIONS_GET_IFACE (document_annots);
+
+ if (iface->remove_annotation)
+ iface->remove_annotation (document_annots, annot);
+}
+
+gboolean
+ev_document_annotations_can_remove_annotation (EvDocumentAnnotations *document_annots)
+{
+ EvDocumentAnnotationsInterface *iface = EV_DOCUMENT_ANNOTATIONS_GET_IFACE (document_annots);
+
+ return iface->remove_annotation != NULL;
+}
diff --git a/libdocument/ev-document-annotations.h b/libdocument/ev-document-annotations.h
index b0046609..5a28e510 100644
--- a/libdocument/ev-document-annotations.h
+++ b/libdocument/ev-document-annotations.h
@@ -79,6 +79,8 @@ struct _EvDocumentAnnotationsInterface
void (* save_annotation) (EvDocumentAnnotations *document_annots,
EvAnnotation *annot,
EvAnnotationsSaveMask mask);
+ void (* remove_annotation) (EvDocumentAnnotations *document_annots,
+ EvAnnotation *annot);
};
GType ev_document_annotations_get_type (void) G_GNUC_CONST;
@@ -88,10 +90,14 @@ gboolean ev_document_annotations_document_is_modified (EvDocumentAnnotatio
void ev_document_annotations_add_annotation (EvDocumentAnnotations *document_annots,
EvAnnotation *annot,
EvRectangle *rect);
+void ev_document_annotations_remove_annotation (EvDocumentAnnotations *document_annots,
+ EvAnnotation *annot);
+
void ev_document_annotations_save_annotation (EvDocumentAnnotations *document_annots,
EvAnnotation *annot,
EvAnnotationsSaveMask mask);
-gboolean ev_document_annotations_can_add_annotation (EvDocumentAnnotations *document_annots);
+gboolean ev_document_annotations_can_add_annotation (EvDocumentAnnotations *document_annots);
+gboolean ev_document_annotations_can_remove_annotation (EvDocumentAnnotations *document_annots);
G_END_DECLS