From 7fd4984cce7e900224cc49b94c7d277341bf4289 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Wed, 13 May 2026 15:24:33 -0400 Subject: Add support for reading underline text markup annotations Backported from https://gitlab.gnome.org/GNOME/evince/-/commit/4bd88ed0 --- libdocument/ev-annotation.c | 9 +++++++++ libdocument/ev-annotation.h | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'libdocument') diff --git a/libdocument/ev-annotation.c b/libdocument/ev-annotation.c index 1cb13010..93e2194a 100644 --- a/libdocument/ev-annotation.c +++ b/libdocument/ev-annotation.c @@ -1334,6 +1334,15 @@ ev_annotation_text_markup_strike_out_new (EvPage *page) NULL)); } +EvAnnotation * +ev_annotation_text_markup_underline_new (EvPage *page) +{ + return EV_ANNOTATION (g_object_new (EV_TYPE_ANNOTATION_TEXT_MARKUP, + "page", page, + "type", EV_ANNOTATION_TEXT_MARKUP_UNDERLINE, + NULL)); +} + EvAnnotationTextMarkupType ev_annotation_text_markup_get_markup_type (EvAnnotationTextMarkup *annot) { diff --git a/libdocument/ev-annotation.h b/libdocument/ev-annotation.h index e608ed37..025c6ab1 100644 --- a/libdocument/ev-annotation.h +++ b/libdocument/ev-annotation.h @@ -112,7 +112,8 @@ typedef enum { typedef enum { EV_ANNOTATION_TEXT_MARKUP_HIGHLIGHT, - EV_ANNOTATION_TEXT_MARKUP_STRIKE_OUT + EV_ANNOTATION_TEXT_MARKUP_STRIKE_OUT, + EV_ANNOTATION_TEXT_MARKUP_UNDERLINE } EvAnnotationTextMarkupType; /* EvAnnotation */ @@ -185,6 +186,7 @@ gboolean ev_annotation_attachment_set_attachment (EvAnnotationAttach GType ev_annotation_text_markup_get_type (void) G_GNUC_CONST; EvAnnotation *ev_annotation_text_markup_highlight_new (EvPage *page); EvAnnotation *ev_annotation_text_markup_strike_out_new (EvPage *page); +EvAnnotation *ev_annotation_text_markup_underline_new (EvPage *page); EvAnnotationTextMarkupType ev_annotation_text_markup_get_markup_type (EvAnnotationTextMarkup *annot); G_END_DECLS -- cgit v1.2.1