summaryrefslogtreecommitdiff
path: root/public/fpdf_annot.h
diff options
context:
space:
mode:
authorJane Liu <janeliulwq@google.com>2017-06-29 13:40:22 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-06-29 20:11:24 +0000
commit8ce58f522e046ae3b1561d592ca7b3cd7c894731 (patch)
tree571c245639b8321dae3c3a1254e317d59ee2b8bc /public/fpdf_annot.h
parentf1eae2c37cb4bbf7a536cf251706147bbac51880 (diff)
downloadpdfium-8ce58f522e046ae3b1561d592ca7b3cd7c894731.tar.xz
Added FPDFAnnot_RemoveAnnot()
Added an API for removing annotation and an embedder test for it. Bug=pdfium:737 Change-Id: I6f01625e8103078b83967a57a5c1a7a26bc0c70a Reviewed-on: https://pdfium-review.googlesource.com/7039 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'public/fpdf_annot.h')
-rw-r--r--public/fpdf_annot.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/public/fpdf_annot.h b/public/fpdf_annot.h
index d997927f64..9e349bdd5e 100644
--- a/public/fpdf_annot.h
+++ b/public/fpdf_annot.h
@@ -62,7 +62,7 @@ typedef enum FPDFANNOT_TEXTTYPE {
//
// subtype - the subtype to be checked.
//
-// Returns true if this subtype supported, false otherwise.
+// Returns true if this subtype supported.
DLLEXPORT FPDF_BOOL STDCALL
FPDFAnnot_IsSupportedSubtype(FPDF_ANNOTATION_SUBTYPE subtype);
@@ -98,6 +98,14 @@ DLLEXPORT FPDF_ANNOTATION STDCALL FPDFPage_GetAnnot(FPDF_PAGE page, int index);
// annot - handle to an annotation.
DLLEXPORT void STDCALL FPDFPage_CloseAnnot(FPDF_ANNOTATION annot);
+// Remove the annotation in |page| at |index|.
+//
+// page - handle to a page.
+// index - the index of the annotation.
+//
+// Returns true if successful.
+DLLEXPORT FPDF_BOOL STDCALL FPDFPage_RemoveAnnot(FPDF_PAGE page, int index);
+
// Get the subtype of an annotation.
//
// annot - handle to an annotation.
@@ -115,7 +123,7 @@ FPDFAnnot_GetSubtype(FPDF_ANNOTATION annot);
// R, G, B - buffer to hold the RGB value of the color. Ranges from 0 to 255.
// A - buffer to hold the opacity. Ranges from 0 to 255.
//
-// Returns true if successful, false otherwise.
+// Returns true if successful.
DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetColor(FPDF_ANNOTATION annot,
FPDFANNOT_COLORTYPE type,
unsigned int R,
@@ -133,7 +141,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetColor(FPDF_ANNOTATION annot,
// R, G, B - buffer to hold the RGB value of the color. Ranges from 0 to 255.
// A - buffer to hold the opacity. Ranges from 0 to 255.
//
-// Returns true if successful, false otherwise.
+// Returns true if successful.
DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_GetColor(FPDF_ANNOTATION annot,
FPDFANNOT_COLORTYPE type,
unsigned int* R,
@@ -162,7 +170,7 @@ FPDFAnnot_HasAttachmentPoints(FPDF_ANNOTATION annot);
// annot - handle to an annotation.
// quadPoints - the quadpoints to be set.
//
-// Returns true if successful, false otherwise.
+// Returns true if successful.
DLLEXPORT FPDF_BOOL STDCALL
FPDFAnnot_SetAttachmentPoints(FPDF_ANNOTATION annot,
const FS_QUADPOINTSF* quadPoints);
@@ -184,7 +192,7 @@ FPDFAnnot_GetAttachmentPoints(FPDF_ANNOTATION annot);
// annot - handle to an annotation.
// rect - the annotation rectangle to be set.
//
-// Returns true if successful, false otherwise.
+// Returns true if successful.
DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetRect(FPDF_ANNOTATION annot,
const FS_RECTF* rect);
@@ -203,7 +211,7 @@ DLLEXPORT FS_RECTF STDCALL FPDFAnnot_GetRect(FPDF_ANNOTATION annot);
// type - type of the text to be set.
// text - the text to be set.
//
-// Returns true if successful, false otherwise.
+// Returns true if successful.
DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetText(FPDF_ANNOTATION annot,
FPDFANNOT_TEXTTYPE type,
FPDF_WIDESTRING text);