• 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_WINDOWSDEVICE_H_
8 #define CORE_FXGE_CFX_WINDOWSDEVICE_H_
9 
10 #ifdef _WIN32
11 #ifndef _WINDOWS_
12 #include <windows.h>
13 #endif
14 
15 #include "core/fxge/cfx_renderdevice.h"
16 
17 class IFX_RenderDeviceDriver;
18 
19 #if defined(PDFIUM_PRINT_TEXT_WITH_GDI)
20 typedef void (*PDFiumEnsureTypefaceCharactersAccessible)(const LOGFONT* font,
21                                                          const wchar_t* text,
22                                                          size_t text_length);
23 
24 extern bool g_pdfium_print_text_with_gdi;
25 extern PDFiumEnsureTypefaceCharactersAccessible
26     g_pdfium_typeface_accessible_func;
27 #endif
28 extern int g_pdfium_print_postscript_level;
29 
30 class CFX_WindowsDevice : public CFX_RenderDevice {
31  public:
32   static IFX_RenderDeviceDriver* CreateDriver(HDC hDC);
33 
34   explicit CFX_WindowsDevice(HDC hDC);
35   ~CFX_WindowsDevice() override;
36 
37   HDC GetDC() const;
38 };
39 
40 #endif  // _WIN32
41 
42 #endif  // CORE_FXGE_CFX_WINDOWSDEVICE_H_
43