Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.2 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Copyright (c) Microsoft Corporation. All rights reserved.
  4. //
  5. // Abstract:
  6. // Public API definitions for DWrite and D2D
  7. //
  8. //----------------------------------------------------------------------------
  9. #ifndef DCOMMON_H_INCLUDED
  10. #define DCOMMON_H_INCLUDED
  11. //
  12. //These macros are defined in the Windows 7 SDK, however to enable development using the technical preview,
  13. //they are included here temporarily.
  14. //
  15. #ifndef DEFINE_ENUM_FLAG_OPERATORS
  16. #define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \
  17. extern "C++" { \
  18. inline ENUMTYPE operator | (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) | ((int)b)); } \
  19. inline ENUMTYPE &operator |= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) |= ((int)b)); } \
  20. inline ENUMTYPE operator & (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) & ((int)b)); } \
  21. inline ENUMTYPE &operator &= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) &= ((int)b)); } \
  22. inline ENUMTYPE operator ~ (ENUMTYPE a) { return ENUMTYPE(~((int)a)); } \
  23. inline ENUMTYPE operator ^ (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) ^ ((int)b)); } \
  24. inline ENUMTYPE &operator ^= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) ^= ((int)b)); } \
  25. }
  26. #endif
  27. #ifndef __field_ecount_opt
  28. #define __field_ecount_opt(x)
  29. #endif
  30. #ifndef __range
  31. #define __range(x,y)
  32. #endif
  33. #ifndef __field_ecount
  34. #define __field_ecount(x)
  35. #endif
  36. /// <summary>
  37. /// The measuring method used for text layout.
  38. /// </summary>
  39. typedef enum DWRITE_MEASURING_MODE
  40. {
  41. /// <summary>
  42. /// Text is measured using glyph ideal metrics whose values are independent to the current display resolution.
  43. /// </summary>
  44. DWRITE_MEASURING_MODE_NATURAL,
  45. /// <summary>
  46. /// Text is measured using glyph display compatible metrics whose values tuned for the current display resolution.
  47. /// </summary>
  48. DWRITE_MEASURING_MODE_GDI_CLASSIC,
  49. /// <summary>
  50. /// Text is measured using the same glyph display metrics as text measured by GDI using a font
  51. /// created with CLEARTYPE_NATURAL_QUALITY.
  52. /// </summary>
  53. DWRITE_MEASURING_MODE_GDI_NATURAL
  54. } DWRITE_MEASURING_MODE;
  55. #endif /* DCOMMON_H_INCLUDED */