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_WINDOWSRENDERDEVICE_H_ 8 #define CORE_FXGE_CFX_WINDOWSRENDERDEVICE_H_ 9 10 #ifdef _WIN32 11 #ifndef _WINDOWS_ 12 #include <windows.h> 13 #endif 14 15 #include "core/fxge/cfx_renderdevice.h" 16 17 enum WindowsPrintMode { 18 kModeEmf = 0, 19 kModeTextOnly = 1, 20 kModePostScript2 = 2, 21 kModePostScript3 = 3, 22 }; 23 24 class IFX_RenderDeviceDriver; 25 26 #if defined(PDFIUM_PRINT_TEXT_WITH_GDI) 27 typedef void (*PDFiumEnsureTypefaceCharactersAccessible)(const LOGFONT* font, 28 const wchar_t* text, 29 size_t text_length); 30 31 extern bool g_pdfium_print_text_with_gdi; 32 extern PDFiumEnsureTypefaceCharactersAccessible 33 g_pdfium_typeface_accessible_func; 34 #endif 35 extern int g_pdfium_print_mode; 36 37 class CFX_WindowsRenderDevice : public CFX_RenderDevice { 38 public: 39 static IFX_RenderDeviceDriver* CreateDriver(HDC hDC); 40 41 explicit CFX_WindowsRenderDevice(HDC hDC); 42 ~CFX_WindowsRenderDevice() override; 43 }; 44 45 #endif // _WIN32 46 47 #endif // CORE_FXGE_CFX_WINDOWSRENDERDEVICE_H_ 48