diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-03-14 13:35:12 -0400 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2016-03-14 13:35:12 -0400 |
commit | 764ec513eecbebd12781bcc96ce81ed5e736ee92 (patch) | |
tree | 12763fde4be1f10ea1183d92185917b2b587e00b /core/fxge/win32/dwrite_int.h | |
parent | 97da97662417085774f75c26e535c6fbe70266ae (diff) | |
download | pdfium-764ec513eecbebd12781bcc96ce81ed5e736ee92.tar.xz |
Move core/src/ up to core/.
This CL moves the core/src/ files up to core/ and fixes up the include guards,
includes and build files.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1800523005 .
Diffstat (limited to 'core/fxge/win32/dwrite_int.h')
-rw-r--r-- | core/fxge/win32/dwrite_int.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/core/fxge/win32/dwrite_int.h b/core/fxge/win32/dwrite_int.h new file mode 100644 index 0000000000..62672b2387 --- /dev/null +++ b/core/fxge/win32/dwrite_int.h @@ -0,0 +1,66 @@ +// Copyright 2014 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_WIN32_DWRITE_INT_H_ +#define CORE_FXGE_WIN32_DWRITE_INT_H_ + +#ifndef DECLSPEC_UUID +#if (_MSC_VER >= 1100) && defined(__cplusplus) +#define DECLSPEC_UUID(x) __declspec(uuid(x)) +#else +#define DECLSPEC_UUID(x) +#endif +#endif +#ifndef DECLSPEC_NOVTABLE +#if (_MSC_VER >= 1100) && defined(__cplusplus) +#define DECLSPEC_NOVTABLE __declspec(novtable) +#else +#define DECLSPEC_NOVTABLE +#endif +#endif +#if (WINVER < 0x0500) +#ifndef _MAC +DECLARE_HANDLE(HMONITOR); +#endif +#endif +class CDWriteExt { + public: + CDWriteExt(); + ~CDWriteExt(); + + void Load(); + void Unload(); + + FX_BOOL IsAvailable() { return m_pDWriteFactory != NULL; } + + void* DwCreateFontFaceFromStream(uint8_t* pData, + FX_DWORD size, + int simulation_style); + FX_BOOL DwCreateRenderingTarget(CFX_DIBitmap* pSrc, void** renderTarget); + void DwDeleteRenderingTarget(void* renderTarget); + FX_BOOL DwRendingString(void* renderTarget, + CFX_ClipRgn* pClipRgn, + FX_RECT& stringRect, + CFX_Matrix* pMatrix, + void* font, + FX_FLOAT font_size, + FX_ARGB text_color, + int glyph_count, + unsigned short* glyph_indices, + FX_FLOAT baselineOriginX, + FX_FLOAT baselineOriginY, + void* glyph_offsets, + FX_FLOAT* glyph_advances); + void DwDeleteFont(void* pFont); + + protected: + void* m_hModule; + void* m_pDWriteFactory; + void* m_pDwFontContext; + void* m_pDwTextRenderer; +}; + +#endif // CORE_FXGE_WIN32_DWRITE_INT_H_ |