• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 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_APPLE_APPLE_INT_H_
8 #define CORE_FXGE_APPLE_APPLE_INT_H_
9 
10 #include "core/fxcrt/fx_system.h"
11 
12 #include <Carbon/Carbon.h>
13 
14 #include "core/fxge/cfx_gemodule.h"
15 #include "core/fxge/cfx_graphstatedata.h"
16 #include "core/fxge/cfx_pathdata.h"
17 #include "core/fxge/fx_dib.h"
18 #include "core/fxge/renderdevicedriver_iface.h"
19 
20 class CQuartz2D {
21  public:
22   void* CreateGraphics(const RetainPtr<CFX_DIBitmap>& bitmap);
23   void DestroyGraphics(void* graphics);
24 
25   void* CreateFont(const uint8_t* pFontData, uint32_t dwFontSize);
26   void DestroyFont(void* pFont);
27   void SetGraphicsTextMatrix(void* graphics, const CFX_Matrix& matrix);
28   bool DrawGraphicsString(void* graphics,
29                           void* font,
30                           float fontSize,
31                           uint16_t* glyphIndices,
32                           CGPoint* glyphPositions,
33                           int32_t chars,
34                           FX_ARGB argb);
35 };
36 
37 class CApplePlatform : public CFX_GEModule::PlatformIface {
38  public:
39   CApplePlatform();
40   ~CApplePlatform() override;
41 
42   // CFX_GEModule::PlatformIface:
43   void Init() override;
44 
45   CQuartz2D m_quartz2d;
46 };
47 
48 #endif  // CORE_FXGE_APPLE_APPLE_INT_H_
49