From 5110c4743751145c4ae1934cd1d83bc6c55bb43f Mon Sep 17 00:00:00 2001 From: John Abd-El-Malek Date: Sat, 17 May 2014 22:33:34 -0700 Subject: Initial commit. --- core/src/fxge/Microsoft SDK/include/Dcommon.h | 65 +++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 core/src/fxge/Microsoft SDK/include/Dcommon.h (limited to 'core/src/fxge/Microsoft SDK/include/Dcommon.h') diff --git a/core/src/fxge/Microsoft SDK/include/Dcommon.h b/core/src/fxge/Microsoft SDK/include/Dcommon.h new file mode 100644 index 0000000000..a6c901aeac --- /dev/null +++ b/core/src/fxge/Microsoft SDK/include/Dcommon.h @@ -0,0 +1,65 @@ +//+-------------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Abstract: +// Public API definitions for DWrite and D2D +// +//---------------------------------------------------------------------------- + +#ifndef DCOMMON_H_INCLUDED +#define DCOMMON_H_INCLUDED + +// +//These macros are defined in the Windows 7 SDK, however to enable development using the technical preview, +//they are included here temporarily. +// +#ifndef DEFINE_ENUM_FLAG_OPERATORS +#define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \ +extern "C++" { \ +inline ENUMTYPE operator | (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) | ((int)b)); } \ +inline ENUMTYPE &operator |= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) |= ((int)b)); } \ +inline ENUMTYPE operator & (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) & ((int)b)); } \ +inline ENUMTYPE &operator &= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) &= ((int)b)); } \ +inline ENUMTYPE operator ~ (ENUMTYPE a) { return ENUMTYPE(~((int)a)); } \ +inline ENUMTYPE operator ^ (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) ^ ((int)b)); } \ +inline ENUMTYPE &operator ^= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) ^= ((int)b)); } \ +} +#endif + +#ifndef __field_ecount_opt +#define __field_ecount_opt(x) +#endif + +#ifndef __range +#define __range(x,y) +#endif + +#ifndef __field_ecount +#define __field_ecount(x) +#endif + +/// +/// The measuring method used for text layout. +/// +typedef enum DWRITE_MEASURING_MODE +{ + /// + /// Text is measured using glyph ideal metrics whose values are independent to the current display resolution. + /// + DWRITE_MEASURING_MODE_NATURAL, + + /// + /// Text is measured using glyph display compatible metrics whose values tuned for the current display resolution. + /// + DWRITE_MEASURING_MODE_GDI_CLASSIC, + + /// + /// Text is measured using the same glyph display metrics as text measured by GDI using a font + /// created with CLEARTYPE_NATURAL_QUALITY. + /// + DWRITE_MEASURING_MODE_GDI_NATURAL + +} DWRITE_MEASURING_MODE; + +#endif /* DCOMMON_H_INCLUDED */ -- cgit v1.2.3