diff options
author | Jane Liu <janeliulwq@google.com> | 2017-08-24 12:31:10 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-28 20:13:02 +0000 |
commit | d1ed1ce582efc877487c749924e21772e73df6a2 (patch) | |
tree | 83a13bf3423fd16de1b7c29d7004bbfac476c103 /public/fpdf_annot.h | |
parent | 827f6ff220edea40252e52d128662d37a591fdb9 (diff) | |
download | pdfium-d1ed1ce582efc877487c749924e21772e73df6a2.tar.xz |
Added FPDFAnnot_GetAnnotIndex()
Added FPDFAnnot_GetAnnotIndex() to get the index of an annotation. This
is useful if linked annotations are renedered together - then we need to
know which ones in the annotation list we need to skip.
Bug=pdfium:863,pdfium:737
Change-Id: I53482a15e0fd9a896b348b64d68e99f9c21da9f9
Reviewed-on: https://pdfium-review.googlesource.com/11970
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public/fpdf_annot.h')
-rw-r--r-- | public/fpdf_annot.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/public/fpdf_annot.h b/public/fpdf_annot.h index 6a89ff9384..429a3f7541 100644 --- a/public/fpdf_annot.h +++ b/public/fpdf_annot.h @@ -134,6 +134,17 @@ FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV FPDFPage_GetAnnot(FPDF_PAGE page, int index); // Experimental API. +// Get the index of |annot| in |page|. This is the opposite of +// FPDFPage_GetAnnot(). +// +// page - handle to the page that the annotation is on. +// annot - handle to an annotation. +// +// Returns the index of |annot|, or -1 on failure. +FPDF_EXPORT int FPDF_CALLCONV FPDFPage_GetAnnotIndex(FPDF_PAGE page, + FPDF_ANNOTATION annot); + +// Experimental API. // Close an annotation. Must be called when the annotation returned by // FPDFPage_CreateAnnot() or FPDFPage_GetAnnot() is no longer needed. This // function does not remove the annotation from the document. |