[evince] libdocument: Add remove_annotation to DocumentAnnotations.
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] libdocument: Add remove_annotation to DocumentAnnotations.
- Date: Fri, 15 Aug 2014 10:28:41 +0000 (UTC)
commit d0ed4e6903ec8a938bf5d386c2d4e07930a65993
Author: José Aliste <jaliste gnome org>
Date: Wed Jun 27 08:51:19 2012 -0400
libdocument: Add remove_annotation to DocumentAnnotations.
https://bugzilla.gnome.org/show_bug.cgi?id=649044
libdocument/ev-document-annotations.c | 18 ++++++++++++++++++
libdocument/ev-document-annotations.h | 8 +++++++-
2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/libdocument/ev-document-annotations.c b/libdocument/ev-document-annotations.c
index 620d117..96ce4f6 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 9c191ca..5f2a98d 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]