summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-04 10:48:19 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-04 15:00:53 +0000
commit29479f6380942515b06240c4933bf3b4cf502013 (patch)
tree17c63412945c264cf3087a2f959d157f2ad1b19b /public
parentf02c8bf51c992057376e0acdd262c18540bd8e13 (diff)
downloadpdfium-29479f6380942515b06240c4933bf3b4cf502013.tar.xz
Add method to get tagged type
This CL adds a FPDF_StructElement_GetType method to get the type of a given tagged struct. This corresponds to the /S key in the structure element dictionary. See PDF1.7 Table 10.10. Bug: pdfium:672 Change-Id: I313eb886dc9623715995d73a76bce01ba9985e4b Reviewed-on: https://pdfium-review.googlesource.com/3623 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_structtree.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/public/fpdf_structtree.h b/public/fpdf_structtree.h
index 3d4da402aa..82156365d9 100644
--- a/public/fpdf_structtree.h
+++ b/public/fpdf_structtree.h
@@ -73,6 +73,26 @@ FPDF_StructElement_GetAltText(FPDF_STRUCTELEMENT struct_element,
void* buffer,
unsigned long buflen);
+// Function: FPDF_StructElement_GetType
+// Get the type (/S) for a given element.
+// Parameters:
+// struct_element - Handle to the struct element.
+// buffer - A buffer for output. May be NULL.
+// buflen - The length of the buffer, in bytes. May be 0.
+// Return value:
+// The number of bytes in the type, including the terminating NUL
+// character. The number of bytes is returned regardless of the
+// |buffer| and |buflen| parameters.
+// Comments:
+// Regardless of the platform, the |buffer| is always in UTF-16LE
+// encoding. The string is terminated by a UTF16 NUL character. If
+// |buflen| is less than the required length, or |buffer| is NULL,
+// |buffer| will not be modified.
+DLLEXPORT unsigned long STDCALL
+FPDF_StructElement_GetType(FPDF_STRUCTELEMENT struct_element,
+ void* buffer,
+ unsigned long buflen);
+
// Function: FPDF_StructElement_CountChildren
// Count the number of children for the structure element.
// Parameters: