| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef CORE_FXGE_INCLUDE_CFX_GEMODULE_H_ | |
| 8 #define CORE_FXGE_INCLUDE_CFX_GEMODULE_H_ | |
| 9 | |
| 10 #include <memory> | |
| 11 | |
| 12 #include "core/fxge/include/cfx_fontmgr.h" | |
| 13 #include "core/fxge/include/fx_font.h" | |
| 14 | |
| 15 class CCodec_ModuleMgr; | |
| 16 class CFX_FontCache; | |
| 17 class CFX_FontMgr; | |
| 18 | |
| 19 class CFX_GEModule { | |
| 20 public: | |
| 21 static CFX_GEModule* Get(); | |
| 22 static void Destroy(); | |
| 23 | |
| 24 void Init(const char** pUserFontPaths, CCodec_ModuleMgr* pCodecModule); | |
| 25 CFX_FontCache* GetFontCache(); | |
| 26 CFX_FontMgr* GetFontMgr() { return m_pFontMgr.get(); } | |
| 27 void SetTextGamma(FX_FLOAT gammaValue); | |
| 28 const uint8_t* GetTextGammaTable() const; | |
| 29 | |
| 30 CCodec_ModuleMgr* GetCodecModule() { return m_pCodecModule; } | |
| 31 void* GetPlatformData() { return m_pPlatformData; } | |
| 32 | |
| 33 FXFT_Library m_FTLibrary; | |
| 34 | |
| 35 private: | |
| 36 CFX_GEModule(); | |
| 37 ~CFX_GEModule(); | |
| 38 | |
| 39 void InitPlatform(); | |
| 40 void DestroyPlatform(); | |
| 41 | |
| 42 uint8_t m_GammaValue[256]; | |
| 43 CFX_FontCache* m_pFontCache; | |
| 44 std::unique_ptr<CFX_FontMgr> m_pFontMgr; | |
| 45 CCodec_ModuleMgr* m_pCodecModule; | |
| 46 void* m_pPlatformData; | |
| 47 const char** m_pUserFontPaths; | |
| 48 }; | |
| 49 | |
| 50 #endif // CORE_FXGE_INCLUDE_CFX_GEMODULE_H_ | |
| OLD | NEW |