Chromium Code Reviews| 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 | |
| 19 #define PDF_USE_XFA | 18 #define PDF_USE_XFA |
|
Tom Sepez
2016/03/08 19:27:05
This might be a good place for a comment about tha
dsinclair
2016/03/08 21:08:02
Done.
| |
| 20 #endif // PDF_ENABLE_XFA | 19 #endif // PDF_ENABLE_XFA |
| 21 | 20 |
| 22 // PDF types | 21 // PDF types |
| 23 typedef void* FPDF_ACTION; | 22 typedef void* FPDF_ACTION; |
| 24 typedef void* FPDF_BITMAP; | 23 typedef void* FPDF_BITMAP; |
| 25 typedef void* FPDF_BOOKMARK; | 24 typedef void* FPDF_BOOKMARK; |
| 26 typedef void* FPDF_CLIPPATH; | 25 typedef void* FPDF_CLIPPATH; |
| 27 typedef void* FPDF_DEST; | 26 typedef void* FPDF_DEST; |
| 28 typedef void* FPDF_DOCSCHHANDLE; | 27 typedef void* FPDF_DOCSCHHANDLE; |
| 29 typedef void* FPDF_DOCUMENT; | 28 typedef void* FPDF_DOCUMENT; |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 306 * @param[in] offset Offset position starts from the beginning of file | 305 * @param[in] offset Offset position starts from the beginning of file |
| 307 * stream. This parameter indicates reading position. | 306 * stream. This parameter indicates reading position. |
| 308 * @param[in] buffer Memory buffer to store data which are read from | 307 * @param[in] buffer Memory buffer to store data which are read from |
| 309 * file stream. This parameter should not be <b>NULL</b>. | 308 * file stream. This parameter should not be <b>NULL</b>. |
| 310 * @param[in] size Size of data which should be read from file | 309 * @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> | 310 * stream, in bytes. The buffer indicated by the parameter <i>buffer</i> |
| 312 * should be enough to store specified data. | 311 * should be enough to store specified data. |
| 313 * | 312 * |
| 314 * @return 0 for success, other value for failure. | 313 * @return 0 for success, other value for failure. |
| 315 */ | 314 */ |
| 316 FPDF_RESULT (*ReadBlock)(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPVOI D buffer, FPDF_DWORD size); | 315 FPDF_RESULT (*ReadBlock)(FPDF_LPVOID clientData, |
| 316 FPDF_DWORD offset, | |
| 317 FPDF_LPVOID buffer, | |
| 318 FPDF_DWORD size); | |
| 317 /** | 319 /** |
| 318 * @brief Callback function to write data into the current file stream. | 320 * @brief Callback function to write data into the current file stream. |
| 319 * | 321 * |
| 320 * @param[in] clientData Pointer to user-defined data. | 322 * @param[in] clientData Pointer to user-defined data. |
| 321 * @param[in] offset Offset position starts from the beginning of file | 323 * @param[in] offset Offset position starts from the beginning of file |
| 322 * stream. This parameter indicates writing position. | 324 * stream. This parameter indicates writing position. |
| 323 * @param[in] buffer Memory buffer contains data which is written into | 325 * @param[in] buffer Memory buffer contains data which is written into |
| 324 * file stream. This parameter should not be <b>NULL</b>. | 326 * file stream. This parameter should not be <b>NULL</b>. |
| 325 * @param[in] size Size of data which should be written into file | 327 * @param[in] size Size of data which should be written into file |
| 326 * stream, in bytes. | 328 * stream, in bytes. |
| 327 * | 329 * |
| 328 * @return 0 for success, other value for failure. | 330 * @return 0 for success, other value for failure. |
| 329 */ | 331 */ |
| 330 FPDF_RESULT (*WriteBlock)(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPCV OID buffer, FPDF_DWORD size); | 332 FPDF_RESULT (*WriteBlock)(FPDF_LPVOID clientData, |
| 333 FPDF_DWORD offset, | |
| 334 FPDF_LPCVOID buffer, | |
| 335 FPDF_DWORD size); | |
| 331 /** | 336 /** |
| 332 * @brief Callback function to flush all internal accessing buffers. | 337 * @brief Callback function to flush all internal accessing buffers. |
| 333 * | 338 * |
| 334 * @param[in] clientData Pointer to user-defined data. | 339 * @param[in] clientData Pointer to user-defined data. |
| 335 * | 340 * |
| 336 * @return 0 for success, other value for failure. | 341 * @return 0 for success, other value for failure. |
| 337 */ | 342 */ |
| 338 FPDF_RESULT (*Flush)(FPDF_LPVOID clientData); | 343 FPDF_RESULT (*Flush)(FPDF_LPVOID clientData); |
| 339 /** | 344 /** |
| 340 * @brief Callback function to change file size. | 345 * @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 | 936 // Function: FPDF_BStr_Clear |
| 932 // Helper function to clear a byte string. | 937 // Helper function to clear a byte string. |
| 933 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str); | 938 DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Clear(FPDF_BSTR* str); |
| 934 #endif // PDF_ENABLE_XFA | 939 #endif // PDF_ENABLE_XFA |
| 935 | 940 |
| 936 #ifdef __cplusplus | 941 #ifdef __cplusplus |
| 937 } | 942 } |
| 938 #endif | 943 #endif |
| 939 | 944 |
| 940 #endif // PUBLIC_FPDFVIEW_H_ | 945 #endif // PUBLIC_FPDFVIEW_H_ |
| OLD | NEW |