summaryrefslogtreecommitdiff
path: root/core/fxge/cfx_gemodule.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-09-29 16:41:42 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-29 16:41:42 -0700
commit74a34fc71ab02400a4c958709138302a1ab4c0e7 (patch)
treeab987bfd6c92679843c030654f62e2fb9ecf45b3 /core/fxge/cfx_gemodule.h
parenta52ab741019342fbca0468e43a01deb44fa5f1bd (diff)
downloadpdfium-74a34fc71ab02400a4c958709138302a1ab4c0e7.tar.xz
Move core/fxge/include to core/fxge
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2377393002
Diffstat (limited to 'core/fxge/cfx_gemodule.h')
-rw-r--r--core/fxge/cfx_gemodule.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/core/fxge/cfx_gemodule.h b/core/fxge/cfx_gemodule.h
new file mode 100644
index 0000000000..c5bd841002
--- /dev/null
+++ b/core/fxge/cfx_gemodule.h
@@ -0,0 +1,50 @@
+// Copyright 2016 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef CORE_FXGE_CFX_GEMODULE_H_
+#define CORE_FXGE_CFX_GEMODULE_H_
+
+#include <memory>
+
+#include "core/fxge/cfx_fontmgr.h"
+#include "core/fxge/fx_font.h"
+
+class CCodec_ModuleMgr;
+class CFX_FontCache;
+class CFX_FontMgr;
+
+class CFX_GEModule {
+ public:
+ static CFX_GEModule* Get();
+ static void Destroy();
+
+ void Init(const char** pUserFontPaths, CCodec_ModuleMgr* pCodecModule);
+ CFX_FontCache* GetFontCache();
+ CFX_FontMgr* GetFontMgr() { return m_pFontMgr.get(); }
+ void SetTextGamma(FX_FLOAT gammaValue);
+ const uint8_t* GetTextGammaTable() const;
+
+ CCodec_ModuleMgr* GetCodecModule() { return m_pCodecModule; }
+ void* GetPlatformData() { return m_pPlatformData; }
+
+ FXFT_Library m_FTLibrary;
+
+ private:
+ CFX_GEModule();
+ ~CFX_GEModule();
+
+ void InitPlatform();
+ void DestroyPlatform();
+
+ uint8_t m_GammaValue[256];
+ CFX_FontCache* m_pFontCache;
+ std::unique_ptr<CFX_FontMgr> m_pFontMgr;
+ CCodec_ModuleMgr* m_pCodecModule;
+ void* m_pPlatformData;
+ const char** m_pUserFontPaths;
+};
+
+#endif // CORE_FXGE_CFX_GEMODULE_H_