Debian Codegraph @

src/utils/win/SkDWriteNTDDI_VERSION.h

raw
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
8 #ifndef SkDWriteNTDDI_VERSION_DEFINED
9 #define SkDWriteNTDDI_VERSION_DEFINED
10
11 // More strictly, this header should be the first thing in a translation unit,
12 // since it is effectively negating build flags.
13 #if defined(_WINDOWS_) || defined(DWRITE_3_H_INCLUDED)
14 #error Must include SkDWriteNTDDI_VERSION.h before any Windows or DWrite headers.
15 #endif
16
17 // If the build defines NTDDI_VERSION, pretend it didn't.
18 // This also requires resetting _WIN32_WINNT and WINVER.
19 // dwrite_3.h guards enum, macro, and interface declarations behind NTDDI_VERSION,
20 // but it is not clear this is correct since these are all immutable.
21 #if defined(NTDDI_VERSION)
22 # undef NTDDI_VERSION
23 # if defined(_WIN32_WINNT)
24 # undef _WIN32_WINNT
25 # endif
26 # if defined(WINVER)
27 # undef WINVER
28 # endif
29 #endif
30
31 #endif