From 7a9a38bd1c41f0f909534e56789a22d57b1a2663 Mon Sep 17 00:00:00 2001 From: Jane Liu Date: Tue, 11 Jul 2017 13:47:37 -0400 Subject: Added API for removing objects from annotations Bug=pdfium:737 Change-Id: Ia485219b9288b9fe7e1ae226035b37dde2bc3abd Reviewed-on: https://pdfium-review.googlesource.com/7213 Commit-Queue: Jane Liu Commit-Queue: dsinclair Reviewed-by: dsinclair Reviewed-by: Lei Zhang --- public/fpdf_annot.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'public/fpdf_annot.h') diff --git a/public/fpdf_annot.h b/public/fpdf_annot.h index 31779a5cd8..c42b7059dc 100644 --- a/public/fpdf_annot.h +++ b/public/fpdf_annot.h @@ -141,6 +141,17 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_RemoveAnnot(FPDF_PAGE page, int index); DLLEXPORT FPDF_ANNOTATION_SUBTYPE STDCALL FPDFAnnot_GetSubtype(FPDF_ANNOTATION annot); +// Experimental API. +// Check if an annotation subtype is currently supported for object extraction, +// update, and removal. +// Currently supported subtypes: ink and stamp. +// +// subtype - the subtype to be checked. +// +// Returns true if this subtype supported. +DLLEXPORT FPDF_BOOL STDCALL +FPDFAnnot_IsObjectSupportedSubtype(FPDF_ANNOTATION_SUBTYPE subtype); + // Experimental API. // Update |obj| in |annot|. |obj| must be in |annot| already and must have // been retrieved by FPDFAnnot_GetObject(). Currently, only ink and stamp @@ -188,6 +199,16 @@ DLLEXPORT int STDCALL FPDFAnnot_GetObjectCount(FPDF_ANNOTATION annot); DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFAnnot_GetObject(FPDF_ANNOTATION annot, int index); +// Experimental API. +// Remove the object in |annot| at |index|. +// +// annot - handle to an annotation. +// index - the index of the object to be removed. +// +// Return true if successful. +DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_RemoveObject(FPDF_ANNOTATION annot, + int index); + // Experimental API. // Set the color of an annotation. Fails when called on annotations with // appearance streams already defined; instead use -- cgit v1.2.3