| 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 FPDFSDK_FSDK_DEFINE_H_ | 7 #ifndef FPDFSDK_FSDK_DEFINE_H_ |
| 8 #define FPDFSDK_FSDK_DEFINE_H_ | 8 #define FPDFSDK_FSDK_DEFINE_H_ |
| 9 | 9 |
| 10 #include "core/fpdfapi/parser/cpdf_parser.h" | 10 #include "core/fpdfapi/parser/cpdf_parser.h" |
| 11 #include "core/fxge/fx_dib.h" | 11 #include "core/fxge/fx_dib.h" |
| 12 #include "public/fpdfview.h" | 12 #include "public/fpdfview.h" |
| 13 | 13 |
| 14 #ifdef PDF_ENABLE_XFA | 14 #ifdef PDF_ENABLE_XFA |
| 15 #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" | 15 #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" |
| 16 #endif // PDF_ENABLE_XFA | 16 #endif // PDF_ENABLE_XFA |
| 17 | 17 |
| 18 #ifdef _WIN32 | 18 #ifdef _WIN32 |
| 19 #include <math.h> | 19 #include <math.h> |
| 20 #include <tchar.h> | 20 #include <tchar.h> |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 class CPDF_Annot; | 23 class CPDF_Annot; |
| 24 class CPDF_Page; | 24 class CPDF_Page; |
| 25 class CPDF_PageRenderContext; | 25 class CPDF_PageRenderContext; |
| 26 class IFSDK_PAUSE_Adapter; | 26 class IFSDK_PAUSE_Adapter; |
| 27 | 27 |
| 28 class CPDF_CustomAccess final : public IFX_SeekableReadStream { | 28 // Layering prevents fxcrt from knowing about FPDF_FILEACCESS, so this can't |
| 29 public: | 29 // be a static method of IFX_SeekableReadStream. |
| 30 explicit CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); | 30 IFX_SeekableReadStream* MakeSeekableReadStream(FPDF_FILEACCESS* pFileAccess); |
| 31 ~CPDF_CustomAccess() override {} | |
| 32 | |
| 33 // IFX_SeekableReadStream | |
| 34 FX_FILESIZE GetSize() override; | |
| 35 void Release() override; | |
| 36 bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override; | |
| 37 | |
| 38 private: | |
| 39 FPDF_FILEACCESS m_FileAccess; | |
| 40 }; | |
| 41 | 31 |
| 42 #ifdef PDF_ENABLE_XFA | 32 #ifdef PDF_ENABLE_XFA |
| 43 class CFPDF_FileStream : public IFX_SeekableStream { | 33 class CFPDF_FileStream : public IFX_SeekableStream { |
| 44 public: | 34 public: |
| 45 explicit CFPDF_FileStream(FPDF_FILEHANDLER* pFS); | 35 explicit CFPDF_FileStream(FPDF_FILEHANDLER* pFS); |
| 46 ~CFPDF_FileStream() override {} | 36 ~CFPDF_FileStream() override {} |
| 47 | 37 |
| 48 // IFX_SeekableStream: | 38 // IFX_SeekableStream: |
| 49 IFX_SeekableStream* Retain() override; | 39 IFX_SeekableStream* Retain() override; |
| 50 void Release() override; | 40 void Release() override; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 int rotate, | 90 int rotate, |
| 101 int flags, | 91 int flags, |
| 102 bool bNeedToRestore, | 92 bool bNeedToRestore, |
| 103 IFSDK_PAUSE_Adapter* pause); | 93 IFSDK_PAUSE_Adapter* pause); |
| 104 | 94 |
| 105 void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code); | 95 void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code); |
| 106 void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot); | 96 void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot); |
| 107 void ProcessParseError(CPDF_Parser::Error err); | 97 void ProcessParseError(CPDF_Parser::Error err); |
| 108 | 98 |
| 109 #endif // FPDFSDK_FSDK_DEFINE_H_ | 99 #endif // FPDFSDK_FSDK_DEFINE_H_ |
| OLD | NEW |