| 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/include/fpdfapi/fpdf_module.h" | 10 #include "../../core/include/fpdfapi/fpdf_module.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 ((FX_DWORD)rgb & 0x0000FF00) | (((FX_DWORD)rgb & 0x00FF0000) >> 16)) | 39 ((FX_DWORD)rgb & 0x0000FF00) | (((FX_DWORD)rgb & 0x00FF0000) >> 16)) |
| 40 #endif | 40 #endif |
| 41 | 41 |
| 42 typedef unsigned int FX_UINT; | 42 typedef unsigned int FX_UINT; |
| 43 class CRenderContext; | 43 class CRenderContext; |
| 44 class IFSDK_PAUSE_Adapter; | 44 class IFSDK_PAUSE_Adapter; |
| 45 | 45 |
| 46 class CPDF_CustomAccess final : public IFX_FileRead { | 46 class CPDF_CustomAccess final : public IFX_FileRead { |
| 47 public: | 47 public: |
| 48 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); | 48 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); |
| 49 ~CPDF_CustomAccess() {} | 49 ~CPDF_CustomAccess() override {} |
| 50 | 50 |
| 51 virtual FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; } | 51 FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; } |
| 52 | 52 |
| 53 virtual void Release() override { delete this; } | 53 void Release() override { delete this; } |
| 54 | 54 |
| 55 virtual FX_BOOL ReadBlock(void* buffer, | 55 FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override; |
| 56 FX_FILESIZE offset, | |
| 57 size_t size) override; | |
| 58 | 56 |
| 59 private: | 57 private: |
| 60 FPDF_FILEACCESS m_FileAccess; | 58 FPDF_FILEACCESS m_FileAccess; |
| 61 }; | 59 }; |
| 62 | 60 |
| 63 void DropContext(void* data); | 61 void DropContext(void* data); |
| 64 void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable); | 62 void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable); |
| 65 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy); | 63 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy); |
| 66 void FPDF_RenderPage_Retail(CRenderContext* pContext, | 64 void FPDF_RenderPage_Retail(CRenderContext* pContext, |
| 67 FPDF_PAGE page, | 65 FPDF_PAGE page, |
| 68 int start_x, | 66 int start_x, |
| 69 int start_y, | 67 int start_y, |
| 70 int size_x, | 68 int size_x, |
| 71 int size_y, | 69 int size_y, |
| 72 int rotate, | 70 int rotate, |
| 73 int flags, | 71 int flags, |
| 74 FX_BOOL bNeedToRestore, | 72 FX_BOOL bNeedToRestore, |
| 75 IFSDK_PAUSE_Adapter* pause); | 73 IFSDK_PAUSE_Adapter* pause); |
| 76 | 74 |
| 77 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_ | 75 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_ |
| OLD | NEW |