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.

75 lines
2.8 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. // Deprecated: These aliases are only here to ease potential merge conflicts.
  55. // They will be removed after January 28. BUG: 394869
  56. DWRITE_TEXT_MEASURING_METHOD_USE_IDEAL_METRICS = DWRITE_MEASURING_MODE_NATURAL,
  57. DWRITE_TEXT_MEASURING_METHOD_USE_DISPLAY_COMPATIBLE_METRICS = DWRITE_MEASURING_MODE_GDI_CLASSIC,
  58. DWRITE_TEXT_MEASURING_METHOD_USE_DISPLAY_NATURAL_METRICS = DWRITE_MEASURING_MODE_GDI_NATURAL
  59. } DWRITE_MEASURING_MODE;
  60. // Deprecated: This alias is only here to ease potential merge conflicts.
  61. // It will be removed after January 28. BUG: 394869
  62. typedef DWRITE_MEASURING_MODE DWRITE_TEXT_MEASURING_METHOD;
  63. #endif /* DCOMMON_H_INCLUDED */