OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_ | 7 #ifndef CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_ |
8 #define CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_ | 8 #define CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "core/include/fxcrt/fx_coordinates.h" | 12 #include "core/fpdfapi/ipdf_pagemodule.h" |
13 #include "core/include/fxcrt/fx_system.h" | 13 #include "core/include/fxcrt/fx_basic.h" |
14 | 14 |
15 class CCodec_ModuleMgr; | 15 class CCodec_ModuleMgr; |
16 class CPDF_ColorSpace; | |
17 class CPDF_DocPageData; | |
18 class CPDF_DocRenderData; | |
19 class CPDF_Document; | |
20 class CPDF_FontGlobals; | |
21 class CPDF_Page; | |
22 class CPDF_PageRenderCache; | |
23 class ICodec_FaxModule; | 16 class ICodec_FaxModule; |
24 class ICodec_FlateModule; | 17 class ICodec_FlateModule; |
25 class ICodec_IccModule; | 18 class ICodec_IccModule; |
26 class ICodec_Jbig2Module; | 19 class ICodec_Jbig2Module; |
27 class ICodec_JpegModule; | 20 class ICodec_JpegModule; |
28 class ICodec_JpxModule; | 21 class ICodec_JpxModule; |
| 22 |
29 class IPDF_PageModule; | 23 class IPDF_PageModule; |
30 class IPDF_RenderModule; | 24 class IPDF_RenderModule; |
31 | 25 |
32 class CPDF_ModuleMgr { | 26 class CPDF_ModuleMgr { |
33 public: | 27 public: |
34 static CPDF_ModuleMgr* Get(); | 28 static CPDF_ModuleMgr* Get(); |
35 static void Create(); | 29 static void Create(); |
36 static void Destroy(); | 30 static void Destroy(); |
37 static const int kFileBufSize = 512; | 31 static const int kFileBufSize = 512; |
38 | 32 |
(...skipping 27 matching lines...) Expand all Loading... |
66 private: | 60 private: |
67 CPDF_ModuleMgr(); | 61 CPDF_ModuleMgr(); |
68 ~CPDF_ModuleMgr(); | 62 ~CPDF_ModuleMgr(); |
69 | 63 |
70 CCodec_ModuleMgr* m_pCodecModule; | 64 CCodec_ModuleMgr* m_pCodecModule; |
71 std::unique_ptr<IPDF_RenderModule> m_pRenderModule; | 65 std::unique_ptr<IPDF_RenderModule> m_pRenderModule; |
72 std::unique_ptr<IPDF_PageModule> m_pPageModule; | 66 std::unique_ptr<IPDF_PageModule> m_pPageModule; |
73 CFX_PrivateData m_privateData; | 67 CFX_PrivateData m_privateData; |
74 }; | 68 }; |
75 | 69 |
76 class IPDF_PageModule { | 70 #endif // CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_ |
77 public: | |
78 virtual ~IPDF_PageModule() {} | |
79 | |
80 virtual CPDF_DocPageData* CreateDocData(CPDF_Document* pDoc) = 0; | |
81 virtual void ReleaseDoc(CPDF_Document* pDoc) = 0; | |
82 virtual void ClearDoc(CPDF_Document* pDoc) = 0; | |
83 virtual CPDF_FontGlobals* GetFontGlobals() = 0; | |
84 virtual void ClearStockFont(CPDF_Document* pDoc) = 0; | |
85 virtual void NotifyCJKAvailable() = 0; | |
86 virtual CPDF_ColorSpace* GetStockCS(int family) = 0; | |
87 }; | |
88 | |
89 class IPDF_RenderModule { | |
90 public: | |
91 virtual ~IPDF_RenderModule() {} | |
92 | |
93 virtual CPDF_DocRenderData* CreateDocData(CPDF_Document* pDoc) = 0; | |
94 virtual void DestroyDocData(CPDF_DocRenderData* pDocRenderData) = 0; | |
95 virtual void ClearDocData(CPDF_DocRenderData* pDocRenderData) = 0; | |
96 virtual CPDF_DocRenderData* GetRenderData() = 0; | |
97 virtual CPDF_PageRenderCache* CreatePageCache(CPDF_Page* pPage) = 0; | |
98 virtual void DestroyPageCache(CPDF_PageRenderCache* pCache) = 0; | |
99 }; | |
100 | |
101 #endif // CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_ | |
OLD | NEW |