summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-03-27 16:26:44 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-27 16:26:44 +0000
commitc90adc58b97200d20b0532bde95b79dcba00637f (patch)
tree002895239afa554f84a0fb76e6cb85265fef19b3 /public
parentc526e38a47a7fc7d83cc87aaf521d14bb7b7304d (diff)
downloadpdfium-c90adc58b97200d20b0532bde95b79dcba00637f.tar.xz
Open FPDF_PAGEOBJECTMARK API.
Initially it contains: - FPDFPageObj_CountMarks - FPDFPageObj_GetMark - FPDFPageObjMark_GetName This allows reading the content marks from a page object. Bug: pdfium:1037 Change-Id: I3d7554b71f938778890fdb44088e0d45dd2718d9 Reviewed-on: https://pdfium-review.googlesource.com/28710 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_edit.h34
-rw-r--r--public/fpdfview.h1
2 files changed, 35 insertions, 0 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index 1e84e8f7ff..7c37b83aa9 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -281,6 +281,40 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_TransformAnnots(FPDF_PAGE page,
FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
FPDFPageObj_NewImageObj(FPDF_DOCUMENT document);
+// Get number of content marks in |page_object|.
+//
+// page_object - handle to a page object.
+//
+// Returns the number of content marks in |page_object|, or -1 in case of
+// failure.
+FPDF_EXPORT int FPDF_CALLCONV
+FPDFPageObj_CountMarks(FPDF_PAGEOBJECT page_object);
+
+// Get content mark in |page_object| at |index|.
+//
+// page_object - handle to a page object.
+// index - the index of a page object.
+//
+// Returns the handle to the content mark, or NULL on failure. The handle is
+// still owned by the library, and it should not be freed directly. It becomes
+// invalid if the page object is destroyed, either directly or indirectly by
+// unloading the page.
+FPDF_EXPORT FPDF_PAGEOBJECTMARK FPDF_CALLCONV
+FPDFPageObj_GetMark(FPDF_PAGEOBJECT page_object, unsigned long index);
+
+// Get name of a content mark. |buffer| is only modified if |buflen| is longer
+// than the length of the name.
+//
+// mark - handle to a content mark.
+// buffer - buffer for holding the returned name in UTF16-LE.
+// buflen - length of the buffer.
+//
+// Returns the length of the name.
+FPDF_EXPORT unsigned long FPDF_CALLCONV
+FPDFPageObjMark_GetName(FPDF_PAGEOBJECTMARK mark,
+ void* buffer,
+ unsigned long buflen);
+
// 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.
diff --git a/public/fpdfview.h b/public/fpdfview.h
index ffa4678347..de7fbe4663 100644
--- a/public/fpdfview.h
+++ b/public/fpdfview.h
@@ -46,6 +46,7 @@ typedef void* FPDF_LINK;
typedef void* FPDF_PAGE;
typedef void* FPDF_PAGELINK;
typedef void* FPDF_PAGEOBJECT; // Page object(text, path, etc)
+typedef void const* FPDF_PAGEOBJECTMARK;
typedef void* FPDF_PAGERANGE;
typedef void* FPDF_RECORDER;
typedef void* FPDF_SCHHANDLE;