From c100c4c77a88782ba5c4634994171db611952d44 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 2 Feb 2017 15:55:40 +0100 Subject: Add bookmarks so we can find a location after reflowing a document. --- source/fitz/document.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source/fitz/document.c') diff --git a/source/fitz/document.c b/source/fitz/document.c index 684c8523..41abb736 100644 --- a/source/fitz/document.c +++ b/source/fitz/document.c @@ -182,6 +182,20 @@ fz_is_document_reflowable(fz_context *ctx, fz_document *doc) return doc ? doc->is_reflowable : 0; } +fz_bookmark fz_make_bookmark(fz_context *ctx, fz_document *doc, int page) +{ + if (doc && doc->make_bookmark) + return doc->make_bookmark(ctx, doc, page); + return (fz_bookmark)page; +} + +int fz_lookup_bookmark(fz_context *ctx, fz_document *doc, fz_bookmark mark) +{ + if (doc && doc->lookup_bookmark) + return doc->lookup_bookmark(ctx, doc, mark); + return (int)mark; +} + int fz_needs_password(fz_context *ctx, fz_document *doc) { -- cgit v1.2.3