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 // NOTE: External docs refer to this file as "fpdfview.h", so do not rename | 7 // NOTE: External docs refer to this file as "fpdfview.h", so do not rename |
8 // despite lack of consistency with other public files. | 8 // despite lack of consistency with other public files. |
9 | 9 |
10 #ifndef PUBLIC_FPDFVIEW_H_ | 10 #ifndef PUBLIC_FPDFVIEW_H_ |
11 #define PUBLIC_FPDFVIEW_H_ | 11 #define PUBLIC_FPDFVIEW_H_ |
12 | 12 |
13 #if defined(_WIN32) && !defined(__WINDOWS__) | 13 #if defined(_WIN32) && !defined(__WINDOWS__) |
14 #include <windows.h> | 14 #include <windows.h> |
15 #endif | 15 #endif |
16 | 16 |
17 #ifdef PDF_ENABLE_XFA | 17 #ifdef PDF_ENABLE_XFA |
18 // TODO: remove the #define when XFA is officially in pdfium | 18 // PDF_USE_XFA is set in confirmation that this version of PDFium can support |
| 19 // XFA forms as requested by the PDF_ENABLE_XFA setting. |
19 #define PDF_USE_XFA | 20 #define PDF_USE_XFA |
20 #endif // PDF_ENABLE_XFA | 21 #endif // PDF_ENABLE_XFA |
21 | 22 |
22 // PDF types | 23 // PDF types |
23 typedef void* FPDF_ACTION; | 24 typedef void* FPDF_ACTION; |
24 typedef void* FPDF_BITMAP; | 25 typedef void* FPDF_BITMAP; |
25 typedef void* FPDF_BOOKMARK; | 26 typedef void* FPDF_BOOKMARK; |
26 typedef void* FPDF_CLIPPATH; | 27 typedef void* FPDF_CLIPPATH; |
27 typedef void* FPDF_DEST; | 28 typedef void* FPDF_DEST; |
28 typedef void* FPDF_DOCSCHHANDLE; | 29 typedef void* FPDF_DOCSCHHANDLE; |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 * @param[in] offset Offset position starts from the beginning of file | 307 * @param[in] offset Offset position starts from the beginning of file |
307 * stream. This parameter indicates reading position. | 308 * stream. This parameter indicates reading position. |
308 * @param[in] buffer Memory buffer to store data which are read from | 309 * @param[in] buffer Memory buffer to store data which are read from |
309 * file stream. This parameter should not be <b>NULL</b>. | 310 * file stream. This parameter should not be <b>NULL</b>. |
310 * @param[in] size Size of data which should be read from file | 311 * @param[in] size Size of data which should be read from file |
311 * stream, in bytes. The buffer indicated by the parameter <i>buffer</i> | 312 * stream, in bytes. The buffer indicated by the parameter <i>buffer</i> |
312 * should be enough to store specified data. | 313 * should be enough to store specified data. |
313 * | 314 * |
314 * @return 0 for success, other value for failure. | 315 * @return 0 for success, other value for failure. |
315 */ | 316 */ |
316 FPDF_RESULT (*ReadBlock)(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPVOI
D buffer, FPDF_DWORD size); | 317 FPDF_RESULT (*ReadBlock)(FPDF_LPVOID clientData, |
| 318 FPDF_DWORD offset, |
| 319 FPDF_LPVOID buffer, |
| 320 FPDF_DWORD size); |
317 /** | 321 /** |
318 * @brief Callback function to write data into the current file stream. | 322 * @brief Callback function to write data into the current file stream. |
319 * | 323 * |
320 * @param[in] clientData Pointer to user-defined data. | 324 * @param[in] clientData Pointer to user-defined data. |
321 * @param[in] offset Offset position starts from the beginning of file | 325 * @param[in] offset Offset position starts from the beginning of file |
322 * stream. This parameter indicates writing position. | 326 * stream. This parameter indicates writing position. |
323 * @param[in] buffer Memory buffer contains data which is written into | 327 * @param[in] buffer Memory buffer contains data which is written into |
324 * file stream. This parameter should not be <b>NULL</b>. | 328 * file stream. This parameter should not be <b>NULL</b>. |
325 * @param[in] size Size of data which should be written into file | 329 * @param[in] size Size of data which should be written into file |
326 * stream, in bytes. | 330 * stream, in bytes. |
327 * | 331 * |
328 * @return 0 for success, other value for failure. | 332 * @return 0 for success, other value for failure. |
329 */ | 333 */ |
330 FPDF_RESULT (*WriteBlock)(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPCV
OID buffer, FPDF_DWORD size); | 334 FPDF_RESULT (*WriteBlock)(FPDF_LPVOID clientData, |
| 335 FPDF_DWORD offset, |
| 336 FPDF_LPCVOID buffer, |
| 337 FPDF_DWORD size); |
331 /** | 338 /** |
332 * @brief Callback function to flush all internal accessing buffers. | 339 * @brief Callback function to flush all internal accessing buffers. |
333 * | 340 * |
334 * @param[in] clientData Pointer to user-defined data. | 341 * @param[in] clientData Pointer to user-defined data. |
335 * | 342 * |
336 * @return 0 for success, other value for failure. | 343 * @return 0 for success, other value for failure. |
337 */ | 344 */ |
338 FPDF_RESULT (*Flush)(FPDF_LPVOID clientData); | 345 FPDF_RESULT (*Flush)(FPDF_LPVOID clientData); |
339 /** | 346 /** |
340 * @brief Callback function to change file size. | 347 * @brief Callback function to change file size. |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 // Function: FPDF_BStr_Clear | 938 // Function: FPDF_BStr_Clear |
932 // Helper function to clear a byte string. | 939 // Helper function to clear a byte string. |
933 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str); | 940 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str); |
934 #endif // PDF_ENABLE_XFA | 941 #endif // PDF_ENABLE_XFA |
935 | 942 |
936 #ifdef __cplusplus | 943 #ifdef __cplusplus |
937 } | 944 } |
938 #endif | 945 #endif |
939 | 946 |
940 #endif // PUBLIC_FPDFVIEW_H_ | 947 #endif // PUBLIC_FPDFVIEW_H_ |
OLD | NEW |