• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_CFX_GEMODULE_H_
8 #define CORE_FXGE_CFX_GEMODULE_H_
9 
10 #include <memory>
11 
12 class CFX_FontCache;
13 class CFX_FontMgr;
14 
15 class CFX_GEModule {
16  public:
17   static CFX_GEModule* Get();
18   static void Destroy();
19 
20   void Init(const char** pUserFontPaths);
21   CFX_FontCache* GetFontCache();
GetFontMgr()22   CFX_FontMgr* GetFontMgr() { return m_pFontMgr.get(); }
23 
GetPlatformData()24   void* GetPlatformData() { return m_pPlatformData; }
25 
26  private:
27   CFX_GEModule();
28   ~CFX_GEModule();
29 
30   void InitPlatform();
31   void DestroyPlatform();
32 
33   std::unique_ptr<CFX_FontCache> m_pFontCache;
34   std::unique_ptr<CFX_FontMgr> m_pFontMgr;
35   void* m_pPlatformData;
36   const char** m_pUserFontPaths;
37 };
38 
39 #endif  // CORE_FXGE_CFX_GEMODULE_H_
40