summaryrefslogtreecommitdiff
path: root/libdocument/ev-document.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2026-05-14 14:49:59 -0400
committerLuke from DC <[email protected]>2026-07-12 20:34:07 +0000
commitc429210e1cdbd648caa46b0621029992eb777f7a (patch)
treeeb5c52bb760f852e9807406e93cb138aa0808508 /libdocument/ev-document.c
parent789af2fb86aa6fbb5ec42370bc672afb6a84478e (diff)
downloadatril-c429210e1cdbd648caa46b0621029992eb777f7a.tar.bz2
atril-c429210e1cdbd648caa46b0621029992eb777f7a.tar.xz
epub: Replace backend internals with libgepub
Replace the hand-rolled EPUB parsing with libgepub. This removes the bundled minizip library, custom XML utilities, and temporary directory extraction in favor of GepubDoc which handles archive access, metadata, spine navigation, and table of contents. An epub:// URI scheme handler serves resources directly from the archive without extracting to disk. Search and night mode are stubbed as no-ops pending follow-up commits. Assisted-by: OpenCode:claude-opus-4-6
Diffstat (limited to 'libdocument/ev-document.c')
-rw-r--r--libdocument/ev-document.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libdocument/ev-document.c b/libdocument/ev-document.c
index 96b80946..74efc1d4 100644
--- a/libdocument/ev-document.c
+++ b/libdocument/ev-document.c
@@ -942,6 +942,30 @@ ev_rect_cmp (EvRectangle *a,
(ABS (a->y2 - b->y2) < EPSILON));
}
+GBytes *
+ev_document_get_resource (EvDocument *document,
+ const gchar *path)
+{
+ EvDocumentClass *klass = EV_DOCUMENT_GET_CLASS (document);
+
+ if (klass->get_resource)
+ return klass->get_resource (document, path);
+
+ return NULL;
+}
+
+gchar *
+ev_document_get_resource_mime (EvDocument *document,
+ const gchar *path)
+{
+ EvDocumentClass *klass = EV_DOCUMENT_GET_CLASS (document);
+
+ if (klass->get_resource_mime)
+ return klass->get_resource_mime (document, path);
+
+ return NULL;
+}
+
void
ev_document_toggle_night_mode(EvDocument *document,gboolean night)
{