[evince] libdocument: adding annotation highlight



commit 6a6135d81caf85dfd743e34bf60f1e0653617534
Author: Giselle Reis <gisellemnr src gnome org>
Date:   Thu Aug 7 16:03:39 2014 +0200

    libdocument: adding annotation highlight
    
    Implementing the type and a method to create
    highlight annotations.

 libdocument/ev-annotation.c |   11 +++++++++++
 libdocument/ev-annotation.h |    6 ++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/libdocument/ev-annotation.c b/libdocument/ev-annotation.c
index 477d033..b6fd112 100644
--- a/libdocument/ev-annotation.c
+++ b/libdocument/ev-annotation.c
@@ -1263,3 +1263,14 @@ static void
 ev_annotation_text_markup_markup_iface_init (EvAnnotationMarkupInterface *iface)
 {
 }
+
+EvAnnotation *
+ev_annotation_text_markup_highlight_new (EvPage *page)
+{
+        EvAnnotation *annot = EV_ANNOTATION (g_object_new (EV_TYPE_ANNOTATION_TEXT_MARKUP,
+                                                           "page", page,
+                                                           NULL));
+        annot->type = EV_ANNOTATION_TYPE_HIGHLIGHT;
+
+        return annot;
+}
diff --git a/libdocument/ev-annotation.h b/libdocument/ev-annotation.h
index de27e64..dc1023e 100644
--- a/libdocument/ev-annotation.h
+++ b/libdocument/ev-annotation.h
@@ -92,7 +92,8 @@ typedef struct _EvAnnotationTextMarkupClass EvAnnotationTextMarkupClass;
 typedef enum {
        EV_ANNOTATION_TYPE_UNKNOWN,
        EV_ANNOTATION_TYPE_TEXT,
-       EV_ANNOTATION_TYPE_ATTACHMENT
+       EV_ANNOTATION_TYPE_ATTACHMENT,
+       EV_ANNOTATION_TYPE_HIGHLIGHT
 } EvAnnotationType;
 
 typedef enum {
@@ -175,7 +176,8 @@ gboolean             ev_annotation_attachment_set_attachment (EvAnnotationAttach
                                                              EvAttachment           *attachment);
 
 /* EvAnnotationTextMarkup */
-GType                ev_annotation_text_markup_get_type     (void) G_GNUC_CONST;
+GType                ev_annotation_text_markup_get_type      (void) G_GNUC_CONST;
+EvAnnotation        *ev_annotation_text_markup_highlight_new (EvPage *page);
 
 G_END_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]