Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(659)

Side by Side Diff: core/fxge/win32/cfx_windowsdib.h

Issue 2197513004: Refactor fxge/fx_apple and fx_win header files (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fixing nits Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fxge/include/fx_ge_win32.h ('k') | core/fxge/win32/fx_win32_device.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_FXGE_INCLUDE_FX_GE_WIN32_H_ 7 #ifndef CORE_FXGE_WIN32_CFX_WINDOWSDIB_H_
8 #define CORE_FXGE_INCLUDE_FX_GE_WIN32_H_ 8 #define CORE_FXGE_WIN32_CFX_WINDOWSDIB_H_
9
10 #ifdef _WIN32 9 #ifdef _WIN32
11 #ifndef _WINDOWS_ 10 #ifndef _WINDOWS_
12 #include <windows.h> 11 #include <windows.h>
13 #endif 12 #endif
14 #define WINDIB_OPEN_MEMORY 0x1 13 #define WINDIB_OPEN_MEMORY 0x1
15 #define WINDIB_OPEN_PATHNAME 0x2 14 #define WINDIB_OPEN_PATHNAME 0x2
16 15
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
29 typedef struct WINDIB_Open_Args_ { 16 typedef struct WINDIB_Open_Args_ {
30 int flags; 17 int flags;
31 18
32 const uint8_t* memory_base; 19 const uint8_t* memory_base;
33 20
34 size_t memory_size; 21 size_t memory_size;
35 22
36 const FX_WCHAR* path_name; 23 const FX_WCHAR* path_name;
37 } WINDIB_Open_Args_; 24 } WINDIB_Open_Args_;
38 25
(...skipping 14 matching lines...) Expand all
53 40
54 void LoadFromDevice(HDC hDC, int left, int top); 41 void LoadFromDevice(HDC hDC, int left, int top);
55 void SetToDevice(HDC hDC, int left, int top); 42 void SetToDevice(HDC hDC, int left, int top);
56 43
57 protected: 44 protected:
58 HDC m_hMemDC; 45 HDC m_hMemDC;
59 HBITMAP m_hBitmap; 46 HBITMAP m_hBitmap;
60 HBITMAP m_hOldBitmap; 47 HBITMAP m_hOldBitmap;
61 }; 48 };
62 49
63 class CFX_WindowsDevice : public CFX_RenderDevice { 50 #endif // _WIN32
64 public:
65 static IFX_RenderDeviceDriver* CreateDriver(HDC hDC);
66 51
67 explicit CFX_WindowsDevice(HDC hDC); 52 #endif // CORE_FXGE_WIN32_CFX_WINDOWSDIB_H_
68 ~CFX_WindowsDevice() override;
69
70 HDC GetDC() const;
71 };
72
73 class CFX_WinBitmapDevice : public CFX_RenderDevice {
74 public:
75 CFX_WinBitmapDevice(int width, int height, FXDIB_Format format);
76 ~CFX_WinBitmapDevice() override;
77
78 HDC GetDC() { return m_hDC; }
79
80 protected:
81 HBITMAP m_hBitmap;
82
83 HBITMAP m_hOldBitmap;
84
85 HDC m_hDC;
86 };
87 #endif
88
89 #endif // CORE_FXGE_INCLUDE_FX_GE_WIN32_H_
OLDNEW
« no previous file with comments | « core/fxge/include/fx_ge_win32.h ('k') | core/fxge/win32/fx_win32_device.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698