summaryrefslogtreecommitdiff
path: root/public/fpdf_annot.h
diff options
context:
space:
mode:
authorJane Liu <janeliulwq@google.com>2017-07-05 15:04:33 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-06 13:09:26 +0000
commitb137e75343cada31ddcf905fc581a3a86a63b5d5 (patch)
tree69c8a46658e61739da60852b522b5dbfcc3b9cac /public/fpdf_annot.h
parentddf2418ba8e5d925909d7955ac22b33f37ccce44 (diff)
downloadpdfium-b137e75343cada31ddcf905fc581a3a86a63b5d5.tar.xz
Added APIs for setting annotation flag values
1. Added APIs for getting/setting/unsetting annotation flag values in annotation dictionaries. * Added an embedder test testing all the new functions. Bug=pdfium:737 Change-Id: Ib6bbcf05d6e93c43ec4dcd7120db71bc244afdbf Reviewed-on: https://pdfium-review.googlesource.com/7154 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public/fpdf_annot.h')
-rw-r--r--public/fpdf_annot.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/public/fpdf_annot.h b/public/fpdf_annot.h
index 89edd01613..971662f8e8 100644
--- a/public/fpdf_annot.h
+++ b/public/fpdf_annot.h
@@ -45,6 +45,18 @@ extern "C" {
#define FPDF_ANNOT_RICHMEDIA 26
#define FPDF_ANNOT_XFAWIDGET 27
+// Refer to PDF Reference (6th edition) table 8.16 for all annotation flags.
+#define FPDF_ANNOT_FLAG_NONE 0
+#define FPDF_ANNOT_FLAG_INVISIBLE (1 << 0)
+#define FPDF_ANNOT_FLAG_HIDDEN (1 << 1)
+#define FPDF_ANNOT_FLAG_PRINT (1 << 2)
+#define FPDF_ANNOT_FLAG_NOZOOM (1 << 3)
+#define FPDF_ANNOT_FLAG_NOROTATE (1 << 4)
+#define FPDF_ANNOT_FLAG_NOVIEW (1 << 5)
+#define FPDF_ANNOT_FLAG_READONLY (1 << 6)
+#define FPDF_ANNOT_FLAG_LOCKED (1 << 7)
+#define FPDF_ANNOT_FLAG_TOGGLENOVIEW (1 << 8)
+
typedef enum FPDFANNOT_COLORTYPE {
FPDFANNOT_COLORTYPE_Color = 0,
FPDFANNOT_COLORTYPE_InteriorColor
@@ -275,6 +287,24 @@ DLLEXPORT unsigned long STDCALL FPDFAnnot_GetText(FPDF_ANNOTATION annot,
void* buffer,
unsigned long buflen);
+// Experimental API.
+// Get the annotation flags of |annot|.
+//
+// annot - handle to an annotation.
+//
+// Returns the annotation flags.
+DLLEXPORT int STDCALL FPDFAnnot_GetFlags(FPDF_ANNOTATION annot);
+
+// Experimental API.
+// Set the |annot|'s flags to be of the value |flags|.
+//
+// annot - handle to an annotation.
+// flags - the flag values to be set.
+//
+// Returns true if successful.
+DLLEXPORT FPDF_BOOL STDCALL FPDFAnnot_SetFlags(FPDF_ANNOTATION annot,
+ int flags);
+
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus