OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef _FPDFDOC_H_ | 7 #ifndef _FPDFDOC_H_ |
8 #define _FPDFDOC_H_ | 8 #define _FPDFDOC_H_ |
9 | 9 |
10 #include "fpdfview.h" | 10 #include "fpdfview.h" |
11 | 11 |
12 // Exported Functions | 12 // Exported Functions |
13 #ifdef __cplusplus | 13 #ifdef __cplusplus |
14 extern "C" { | 14 extern "C" { |
15 #endif | 15 #endif |
16 | 16 |
| 17 // Function: FPDFBookmark_GetFirstChild |
| 18 // Get the first child of a bookmark item, or the first top
level bookmark item. |
| 19 // Parameters: |
| 20 // document - Handle to the document. Returned
by FPDF_LoadDocument or FPDF_LoadMemDocument. |
| 21 // bookmark - Handle to the current bookmark.
Can be NULL if you want to get the first top level item. |
| 22 // Return value: |
| 23 // Handle to the first child or top level bookmark item. NU
LL if no child or top level bookmark found. |
| 24 // |
| 25 DLLEXPORT FPDF_BOOKMARK STDCALL FPDFBookmark_GetFirstChild(FPDF_DOCUMENT documen
t, FPDF_BOOKMARK bookmark); |
| 26 |
| 27 // Function: FPDFBookmark_GetNextSibling |
| 28 // Get next bookmark item at the same level. |
| 29 // Parameters: |
| 30 // document - Handle to the document. Returned
by FPDF_LoadDocument or FPDF_LoadMemDocument. |
| 31 // bookmark - Handle to the current bookmark.
Cannot be NULL. |
| 32 // Return value: |
| 33 // Handle to the next bookmark item at the same level. NULL
if this is the last bookmark at this level. |
| 34 // |
| 35 DLLEXPORT FPDF_BOOKMARK STDCALL FPDFBookmark_GetNextSibling(FPDF_DOCUMENT docume
nt, FPDF_BOOKMARK bookmark); |
| 36 |
| 37 // Function: FPDFBookmark_GetTitle |
| 38 // Get title of a bookmark. |
| 39 // Parameters: |
| 40 // bookmark - Handle to the bookmark. |
| 41 // buffer - Buffer for the title. Can be NUL
L. |
| 42 // buflen - The length of the buffer in bytes. Can be 0. |
| 43 // Return value: |
| 44 // Number of bytes the title consumes, including trailing z
eros. |
| 45 // Comments: |
| 46 // Regardless of the platform, the title is always in UTF-1
6LE encoding. That means the buffer |
| 47 // can be treated as an array of WORD (on Intel and compatible CPUs), e
ach WORD representing the Unicode of |
| 48 // a character(some special Unicode may take 2 WORDs).The string is fol
lowed by two bytes of zero |
| 49 // indicating the end of the string. |
| 50 // |
| 51 // The return value always indicates the number of bytes required for t
he buffer, even if no buffer is specified |
| 52 // or the buffer size is less then required. In these cases, the buffer
will not be modified. |
| 53 // |
| 54 DLLEXPORT unsigned long STDCALL FPDFBookmark_GetTitle(FPDF_BOOKMARK bookmark, vo
id* buffer, unsigned long buflen); |
| 55 |
17 // Function: FPDFBookmark_Find | 56 // Function: FPDFBookmark_Find |
18 // Find a bookmark in the document, using the bookmark titl
e. | 57 // Find a bookmark in the document, using the bookmark titl
e. |
19 // Parameters: | 58 // Parameters: |
20 // document - Handle to the document. Returned
by FPDF_LoadDocument or FPDF_LoadMemDocument. | 59 // document - Handle to the document. Returned
by FPDF_LoadDocument or FPDF_LoadMemDocument. |
21 // title - The UTF-16LE encoded Unicode str
ing for the bookmark title to be searched. Can't be NULL. | 60 // title - The UTF-16LE encoded Unicode str
ing for the bookmark title to be searched. Can't be NULL. |
22 // Return value: | 61 // Return value: |
23 // Handle to the found bookmark item. NULL if the title can
't be found. | 62 // Handle to the found bookmark item. NULL if the title can
't be found. |
24 // Comments: | 63 // Comments: |
25 // It always returns the first found bookmark if more than
one bookmarks have the same title. | 64 // It always returns the first found bookmark if more than
one bookmarks have the same title. |
26 // | 65 // |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // | 260 // |
222 DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, FPDF_BYTESTR
ING tag, | 261 DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, FPDF_BYTESTR
ING tag, |
223
void* buffer, unsigned long buflen); | 262
void* buffer, unsigned long buflen); |
224 | 263 |
225 | 264 |
226 #ifdef __cplusplus | 265 #ifdef __cplusplus |
227 }; | 266 }; |
228 #endif | 267 #endif |
229 | 268 |
230 #endif // _FPDFDOC_H_ | 269 #endif // _FPDFDOC_H_ |
OLD | NEW |