| 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 PUBLIC_FPDF_DOC_H_ | 7 #ifndef PUBLIC_FPDF_DOC_H_ |
| 8 #define PUBLIC_FPDF_DOC_H_ | 8 #define PUBLIC_FPDF_DOC_H_ |
| 9 | 9 |
| 10 #include "fpdfview.h" | 10 #include "fpdfview.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Return value: | 103 // Return value: |
| 104 // Handle to the action data. NULL if no action is associated with this | 104 // Handle to the action data. NULL if no action is associated with this |
| 105 // bookmark. In this case, the | 105 // bookmark. In this case, the |
| 106 // application should try FPDFBookmark_GetDest. | 106 // application should try FPDFBookmark_GetDest. |
| 107 // | 107 // |
| 108 DLLEXPORT FPDF_ACTION STDCALL FPDFBookmark_GetAction(FPDF_BOOKMARK bookmark); | 108 DLLEXPORT FPDF_ACTION STDCALL FPDFBookmark_GetAction(FPDF_BOOKMARK bookmark); |
| 109 | 109 |
| 110 #define PDFACTION_UNSUPPORTED 0 // Unsupported action type. | 110 #define PDFACTION_UNSUPPORTED 0 // Unsupported action type. |
| 111 #define PDFACTION_GOTO 1 // Go to a destination within current document. | 111 #define PDFACTION_GOTO 1 // Go to a destination within current document. |
| 112 #define PDFACTION_REMOTEGOTO 2 // Go to a destination within another document. | 112 #define PDFACTION_REMOTEGOTO 2 // Go to a destination within another document. |
| 113 #define PDFACTION_URI \ | 113 #define PDFACTION_URI 3 // Universal Resource Identifier, including web |
| 114 3 // Universal Resource Identifier, including web pages and | 114 // pages and other Internet based resources. |
| 115 // other Internet based resources. | 115 #define PDFACTION_LAUNCH 4 // Launch an application or open a file. |
| 116 #define PDFACTION_LAUNCH 4 // Launch an application or open a file. | |
| 117 | 116 |
| 118 // Function: FPDFAction_GetType | 117 // Function: FPDFAction_GetType |
| 119 // Get type of an action. | 118 // Get type of an action. |
| 120 // Parameters: | 119 // Parameters: |
| 121 // action - Handle to the action. | 120 // action - Handle to the action. |
| 122 // Return value: | 121 // Return value: |
| 123 // A type number as defined above. | 122 // A type number as defined above. |
| 124 // | 123 // |
| 125 DLLEXPORT unsigned long STDCALL FPDFAction_GetType(FPDF_ACTION action); | 124 DLLEXPORT unsigned long STDCALL FPDFAction_GetType(FPDF_ACTION action); |
| 126 | 125 |
| 127 // Function: FPDFAction_GetDest | 126 // Function: FPDFAction_GetDest |
| 128 // Get destination of an action. | 127 // Get destination of an action. |
| 129 // Parameters: | 128 // Parameters: |
| 130 // document - Handle to the document. | 129 // document - Handle to the document. |
| 131 // action - Handle to the action. It must be a GOTO or | 130 // action - Handle to the action. It must be a GOTO or |
| 132 // REMOTEGOTO action. | 131 // REMOTEGOTO action. |
| 133 // Return value: | 132 // Return value: |
| 134 // Handle to the destination data. | 133 // Handle to the destination data. |
| 135 // Comments: | 134 // Comments: |
| 136 // In case of remote goto action, the application should first use | 135 // In case of remote goto action, the application should first use |
| 137 // FPDFAction_GetFilePath to | 136 // FPDFAction_GetFilePath to |
| 138 // get file path, then load that particular document, and use its | 137 // get file path, then load that particular document, and use its |
| 139 // document handle to call this | 138 // document handle to call this |
| 140 // function. | 139 // function. |
| 141 // | 140 // |
| 142 DLLEXPORT FPDF_DEST STDCALL FPDFAction_GetDest(FPDF_DOCUMENT document, | 141 DLLEXPORT FPDF_DEST STDCALL FPDFAction_GetDest(FPDF_DOCUMENT document, |
| 143 FPDF_ACTION action); | 142 FPDF_ACTION action); |
| 144 | 143 |
| 144 // Function: FPDFAction_GetFilePath |
| 145 // Get file path of a remote goto action. |
| 146 // Parameters: |
| 147 // action - Handle to the action. Must be a REMOTEGOTO or |
| 148 // LAUNCH action. |
| 149 // buffer - A buffer for output the path string. Can be NULL. |
| 150 // buflen - The length of the buffer, number of bytes. Can be 0. |
| 151 // Return value: |
| 152 // Number of bytes the file path consumes, including trailing zero. |
| 153 // |
| 154 // Comments: |
| 155 // The file path is UTF-8 encoded. The return value is the number of |
| 156 // bytes required for the buffer, even when there is no buffer |
| 157 // specified, or the buffer size is less then required. In this case, |
| 158 // the buffer will not be modified. |
| 159 // |
| 160 DLLEXPORT unsigned long STDCALL |
| 161 FPDFAction_GetFilePath(FPDF_ACTION action, void* buffer, unsigned long buflen); |
| 162 |
| 145 // Function: FPDFAction_GetURIPath | 163 // Function: FPDFAction_GetURIPath |
| 146 // Get URI path of a URI action. | 164 // Get URI path of a URI action. |
| 147 // Parameters: | 165 // Parameters: |
| 148 // document - Handle to the document. | 166 // document - Handle to the document. |
| 149 // action - Handle to the action. Must be a URI action. | 167 // action - Handle to the action. Must be a URI action. |
| 150 // buffer - A buffer for output the path string. Can be NULL. | 168 // buffer - A buffer for output the path string. Can be NULL. |
| 151 // buflen - The length of the buffer, number of bytes. Can be 0. | 169 // buflen - The length of the buffer, number of bytes. Can be 0. |
| 152 // Return value: | 170 // Return value: |
| 153 // Number of bytes the URI path consumes, including trailing zeros. | 171 // Number of bytes the URI path consumes, including trailing zeros. |
| 154 // Comments: | 172 // Comments: |
| 155 // The URI path is always encoded in 7-bit ASCII. | 173 // The URI path is always encoded in 7-bit ASCII. |
| 156 // | 174 // |
| 157 // The return value always indicated number of bytes required for the | 175 // The return value is the number of bytes required for the buffer, |
| 158 // buffer, even when there is | 176 // even when there is no buffer specified, or the buffer size is less |
| 159 // no buffer specified, or the buffer size is less then required. In | 177 // then required. In this case, the buffer will not be modified. |
| 160 // this case, the buffer will not | |
| 161 // be modified. | |
| 162 // | 178 // |
| 163 DLLEXPORT unsigned long STDCALL FPDFAction_GetURIPath(FPDF_DOCUMENT document, | 179 DLLEXPORT unsigned long STDCALL FPDFAction_GetURIPath(FPDF_DOCUMENT document, |
| 164 FPDF_ACTION action, | 180 FPDF_ACTION action, |
| 165 void* buffer, | 181 void* buffer, |
| 166 unsigned long buflen); | 182 unsigned long buflen); |
| 167 | 183 |
| 168 // Function: FPDFDest_GetPageIndex | 184 // Function: FPDFDest_GetPageIndex |
| 169 // Get page index of a destination. | 185 // Get page index of a destination. |
| 170 // Parameters: | 186 // Parameters: |
| 171 // document - Handle to the document. | 187 // document - Handle to the document. |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, | 368 DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, |
| 353 FPDF_BYTESTRING tag, | 369 FPDF_BYTESTRING tag, |
| 354 void* buffer, | 370 void* buffer, |
| 355 unsigned long buflen); | 371 unsigned long buflen); |
| 356 | 372 |
| 357 #ifdef __cplusplus | 373 #ifdef __cplusplus |
| 358 } | 374 } |
| 359 #endif | 375 #endif |
| 360 | 376 |
| 361 #endif // PUBLIC_FPDF_DOC_H_ | 377 #endif // PUBLIC_FPDF_DOC_H_ |
| OLD | NEW |