Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: public/fpdf_structtree.h

Issue 2519343002: Add APIs for limited use of document tagged code. (Closed)
Patch Set: Add test Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef PUBLIC_FPDF_STRUCTTREE_H_
8 #define PUBLIC_FPDF_STRUCTTREE_H_
9
10 // NOLINTNEXTLINE(build/include)
11 #include "fpdfview.h"
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 // Function: FPDF_StructTree_GetForPage
18 // Get the structure tree for a page.
19 // Parameters:
20 // page - Handle to the page. Returned by FPDF_LoadPage
21 // function.
22 // Return value:
23 // A handle to the structure tree.
24 DLLEXPORT FPDF_STRUCTTREE STDCALL FPDF_StructTree_GetForPage(FPDF_PAGE page);
25
26 // Function: FPDF_StructTree_Close
27 // Release the resource allocate by FPDF_StructTree_GetForPage.
28 // Parameters:
29 // struct_tree - Handle to the struct tree. Returned by
30 // FPDF_StructTree_LoadPage function.
31 // Return value:
32 // NULL
33 DLLEXPORT void STDCALL FPDF_StructTree_Close(FPDF_STRUCTTREE struct_tree);
34
35 // Function: FPDF_StructTree_CountChildren
36 // Count the number of children for the structure tree.
37 // Parameters:
38 // struct_tree - Handle to the struct tree. Returned by
39 // FPDF_StructTree_LoadPage function.
40 // Return value:
41 // The number of children, or -1 on error.
42 DLLEXPORT int STDCALL
43 FPDF_StructTree_CountChildren(FPDF_STRUCTTREE struct_tree);
44
45 // Function: FPDF_StructTree_GetChildAtIndex
46 // Get a child in the structure tree.
47 // Parameters:
48 // struct_tree - Handle to the struct tree. Returned by
49 // FPDF_StructTree_LoadPage function.
50 // index - The index for the child, 0-based.
51 // Return value:
52 // The child at the n-th index.
53 DLLEXPORT FPDF_STRUCTELEMENT STDCALL
54 FPDF_StructTree_GetChildAtIndex(FPDF_STRUCTTREE struct_tree, int index);
55
56 // Function: FPDF_StructElement_GetAltText
57 // Get the alt text for a given element.
58 // Parameters:
59 // struct_element - Handle to the struct element.
60 // buffer - A buffer for output the alt text. May be NULL.
61 // buflen - The length of the buffer, in bytes. May be 0.
62 // Return value:
63 // The number of bytes in the alt text, including NUL terminator.
64 // Comments:
65 // If |buflen| is less than the returned length, or |buffer| is NULL,
66 // |buffer| will not be modified.
67 DLLEXPORT unsigned long STDCALL
68 FPDF_StructElement_GetAltText(FPDF_STRUCTELEMENT struct_element,
69 void* buffer,
70 unsigned long buflen);
71
72 // Function: FPDF_StructElement_CountChildren
73 // Count the number of children for the structure element.
74 // Parameters:
75 // struct_element - Handle to the struct element.
76 // Return value:
77 // The number of children, or -1 on error.
78 DLLEXPORT int STDCALL
79 FPDF_StructElement_CountChildren(FPDF_STRUCTELEMENT struct_element);
80
81 // Function: FPDF_StructElement_GetChildAtIndex
82 // Get a child in the structure element.
83 // Parameters:
84 // struct_tree - Handle to the struct element.
85 // index - The index for the child, 0-based.
86 // Return value:
87 // The child at the n-th index.
88 DLLEXPORT FPDF_STRUCTELEMENT STDCALL
89 FPDF_StructElement_GetChildAtIndex(FPDF_STRUCTELEMENT struct_element,
90 int index);
91
92 #ifdef __cplusplus
93 }
94 #endif
95
96 #endif // PUBLIC_FPDF_STRUCTTREE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698