summaryrefslogtreecommitdiff
path: root/libdocument
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2026-05-13 14:13:17 -0400
committerVictor Kareh <[email protected]>2026-05-19 16:21:12 -0400
commit8bca15ec3b24cb32210843706a625a18d2186fdd (patch)
treee4b66b94ffede16588adbbda6a7305d178412ab7 /libdocument
parenta75bd72bf00bebd34380be95a741d77e053ffd66 (diff)
downloadatril-8bca15ec3b24cb32210843706a625a18d2186fdd.tar.bz2
atril-8bca15ec3b24cb32210843706a625a18d2186fdd.tar.xz
libdocument: adding annotation highlight
Implementing the type and a method to create highlight annotations. Backported from https://gitlab.gnome.org/GNOME/evince/-/commit/6a6135d8
Diffstat (limited to 'libdocument')
-rw-r--r--libdocument/ev-annotation.c11
-rw-r--r--libdocument/ev-annotation.h4
2 files changed, 14 insertions, 1 deletions
diff --git a/libdocument/ev-annotation.c b/libdocument/ev-annotation.c
index 60e9acda..55237cb9 100644
--- a/libdocument/ev-annotation.c
+++ b/libdocument/ev-annotation.c
@@ -1251,3 +1251,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 85783295..d2010103 100644
--- a/libdocument/ev-annotation.h
+++ b/libdocument/ev-annotation.h
@@ -93,7 +93,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 {
@@ -177,6 +178,7 @@ gboolean ev_annotation_attachment_set_attachment (EvAnnotationAttach
/* EvAnnotationTextMarkup */
GType ev_annotation_text_markup_get_type (void) G_GNUC_CONST;
+EvAnnotation *ev_annotation_text_markup_highlight_new (EvPage *page);
G_END_DECLS