| 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_INCLUDE_FSDK_DEFINE_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_DEFINE_H_ |
| 8 #define FPDFSDK_INCLUDE_FSDK_DEFINE_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_DEFINE_H_ |
| 9 | 9 |
| 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_parser.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_parser.h" |
| 11 #include "core/fpdfdoc/include/fpdf_doc.h" | 11 #include "core/fxge/include/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/include/fpdfxfa_doc.h" | 15 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.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 // Convert a #FX_ARGB to a #FX_COLORREF. | 23 // Convert a #FX_ARGB to a #FX_COLORREF. |
| 24 #define FX_ARGBTOCOLORREF(argb) \ | 24 #define FX_ARGBTOCOLORREF(argb) \ |
| 25 ((((uint32_t)argb & 0x00FF0000) >> 16) | ((uint32_t)argb & 0x0000FF00) | \ | 25 ((((uint32_t)argb & 0x00FF0000) >> 16) | ((uint32_t)argb & 0x0000FF00) | \ |
| 26 (((uint32_t)argb & 0x000000FF) << 16)) | 26 (((uint32_t)argb & 0x000000FF) << 16)) |
| 27 | 27 |
| 28 // Convert a #FX_COLORREF to a #FX_ARGB. | 28 // Convert a #FX_COLORREF to a #FX_ARGB. |
| 29 #define FX_COLORREFTOARGB(rgb) \ | 29 #define FX_COLORREFTOARGB(rgb) \ |
| 30 ((uint32_t)0xFF000000 | (((uint32_t)rgb & 0x000000FF) << 16) | \ | 30 ((uint32_t)0xFF000000 | (((uint32_t)rgb & 0x000000FF) << 16) | \ |
| 31 ((uint32_t)rgb & 0x0000FF00) | (((uint32_t)rgb & 0x00FF0000) >> 16)) | 31 ((uint32_t)rgb & 0x0000FF00) | (((uint32_t)rgb & 0x00FF0000) >> 16)) |
| 32 | 32 |
| 33 typedef unsigned int FX_UINT; | 33 typedef unsigned int FX_UINT; |
| 34 |
| 35 class CPDF_Annot; |
| 36 class CPDF_Page; |
| 34 class CPDF_PageRenderContext; | 37 class CPDF_PageRenderContext; |
| 35 class IFSDK_PAUSE_Adapter; | 38 class IFSDK_PAUSE_Adapter; |
| 36 | 39 |
| 37 class CPDF_CustomAccess final : public IFX_FileRead { | 40 class CPDF_CustomAccess final : public IFX_FileRead { |
| 38 public: | 41 public: |
| 39 explicit CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); | 42 explicit CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); |
| 40 ~CPDF_CustomAccess() override {} | 43 ~CPDF_CustomAccess() override {} |
| 41 | 44 |
| 42 // IFX_FileRead | 45 // IFX_FileRead |
| 43 FX_FILESIZE GetSize() override; | 46 FX_FILESIZE GetSize() override; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 int rotate, | 124 int rotate, |
| 122 int flags, | 125 int flags, |
| 123 FX_BOOL bNeedToRestore, | 126 FX_BOOL bNeedToRestore, |
| 124 IFSDK_PAUSE_Adapter* pause); | 127 IFSDK_PAUSE_Adapter* pause); |
| 125 | 128 |
| 126 void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code); | 129 void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code); |
| 127 void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot); | 130 void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot); |
| 128 void ProcessParseError(CPDF_Parser::Error err); | 131 void ProcessParseError(CPDF_Parser::Error err); |
| 129 | 132 |
| 130 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_ | 133 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_ |
| OLD | NEW |