summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-04-23 16:35:56 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-23 16:35:56 +0000
commit132c38e7bdd0bdd1aa526b35c7bcb79c286fb061 (patch)
tree20801fa3c9ce77a72d2195dcd6e2daba8298d853 /public
parentfd016f4e9b0df99ed4670b50b30e5c6f18028f9a (diff)
downloadpdfium-132c38e7bdd0bdd1aa526b35c7bcb79c286fb061.tar.xz
Create API to get PageObject mark parameters.
New calls added in this cl: - FPDFPageObjMark_GetParamKey - FPDFPageObjMark_GetParamValueType - FPDFPageObjMark_GetParamIntValue Bug: pdfium:1037 Change-Id: Iedb74ddbf8a5483de62094ec295dadd6367d5175 Reviewed-on: https://pdfium-review.googlesource.com/30912 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_edit.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index 4968a7f003..8228bb759a 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -281,6 +281,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_TransformAnnots(FPDF_PAGE page,
FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
FPDFPageObj_NewImageObj(FPDF_DOCUMENT document);
+// Experimental API.
// Get number of content marks in |page_object|.
//
// page_object - handle to a page object.
@@ -290,6 +291,7 @@ FPDFPageObj_NewImageObj(FPDF_DOCUMENT document);
FPDF_EXPORT int FPDF_CALLCONV
FPDFPageObj_CountMarks(FPDF_PAGEOBJECT page_object);
+// Experimental API.
// Get content mark in |page_object| at |index|.
//
// page_object - handle to a page object.
@@ -302,6 +304,7 @@ FPDFPageObj_CountMarks(FPDF_PAGEOBJECT page_object);
FPDF_EXPORT FPDF_PAGEOBJECTMARK FPDF_CALLCONV
FPDFPageObj_GetMark(FPDF_PAGEOBJECT page_object, unsigned long index);
+// Experimental API.
// Get name of a content mark. |buffer| is only modified if |buflen| is longer
// than the length of the name.
//
@@ -315,6 +318,7 @@ FPDFPageObjMark_GetName(FPDF_PAGEOBJECTMARK mark,
void* buffer,
unsigned long buflen);
+// Experimental API.
// Get number of key/value pair parameters in |mark|.
//
// mark - handle to a content mark.
@@ -324,6 +328,45 @@ FPDFPageObjMark_GetName(FPDF_PAGEOBJECTMARK mark,
FPDF_EXPORT int FPDF_CALLCONV
FPDFPageObjMark_CountParams(FPDF_PAGEOBJECTMARK mark);
+// Experimental API.
+// Get the key of a property in a content mark. |buffer| is only modified if
+// |buflen| is longer than the length of the key.
+//
+// mark - handle to a content mark.
+// index - index of the property.
+// buffer - buffer for holding the returned key in UTF16-LE.
+// buflen - length of the buffer.
+//
+// Returns the length of the key.
+FPDF_EXPORT unsigned long FPDF_CALLCONV
+FPDFPageObjMark_GetParamKey(FPDF_PAGEOBJECTMARK mark,
+ unsigned long index,
+ void* buffer,
+ unsigned long buflen);
+
+// Experimental API.
+// Get type of the value of a property in a content mark.
+//
+// mark - handle to a content mark.
+// index - index of the property.
+//
+// Returns the type of the value, or FPDF_OBJECT_UNKNOWN in case of failure.
+FPDF_EXPORT FPDF_OBJECT_TYPE FPDF_CALLCONV
+FPDFPageObjMark_GetParamValueType(FPDF_PAGEOBJECTMARK mark,
+ unsigned long index);
+
+// Experimental API.
+// Get value of an int property in a content mark.
+// FPDFPageObjMark_GetParamValueType() should have returned FPDF_OBJECT_NUMBER
+// for this property.
+//
+// mark - handle to a content mark.
+// index - index of the property.
+//
+// Returns the int value, 0 in case of failure.
+FPDF_EXPORT int FPDF_CALLCONV
+FPDFPageObjMark_GetParamIntValue(FPDF_PAGEOBJECTMARK mark, unsigned long index);
+
// Load an image from a JPEG image file and then set it into |image_object|.
//
// pages - pointer to the start of all loaded pages, may be NULL.