SkDWriteNTDDI_VERSION.h 938 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright 2018 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef SkDWriteNTDDI_VERSION_DEFINED
  8. #define SkDWriteNTDDI_VERSION_DEFINED
  9. // More strictly, this header should be the first thing in a translation unit,
  10. // since it is effectively negating build flags.
  11. #if defined(_WINDOWS_) || defined(DWRITE_3_H_INCLUDED)
  12. #error Must include SkDWriteNTDDI_VERSION.h before any Windows or DWrite headers.
  13. #endif
  14. // If the build defines NTDDI_VERSION, pretend it didn't.
  15. // This also requires resetting _WIN32_WINNT and WINVER.
  16. // dwrite_3.h guards enum, macro, and interface declarations behind NTDDI_VERSION,
  17. // but it is not clear this is correct since these are all immutable.
  18. #if defined(NTDDI_VERSION)
  19. # undef NTDDI_VERSION
  20. # if defined(_WIN32_WINNT)
  21. # undef _WIN32_WINNT
  22. # endif
  23. # if defined(WINVER)
  24. # undef WINVER
  25. # endif
  26. #endif
  27. #endif