xref: /aosp_15_r20/external/cronet/base/win/windowsx_shim.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1*6777b538SAndroid Build Coastguard Worker // Copyright 2018 The Chromium Authors
2*6777b538SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
3*6777b538SAndroid Build Coastguard Worker // found in the LICENSE file.
4*6777b538SAndroid Build Coastguard Worker 
5*6777b538SAndroid Build Coastguard Worker #ifndef BASE_WIN_WINDOWSX_SHIM_H_
6*6777b538SAndroid Build Coastguard Worker #define BASE_WIN_WINDOWSX_SHIM_H_
7*6777b538SAndroid Build Coastguard Worker 
8*6777b538SAndroid Build Coastguard Worker // The Win32 platform header <windowsx.h> contains some macros for
9*6777b538SAndroid Build Coastguard Worker // common function names. To work around that, windowsx.h is not to be
10*6777b538SAndroid Build Coastguard Worker // included directly, and instead this file should be included. If one
11*6777b538SAndroid Build Coastguard Worker // of the removed Win32 macros is wanted, use the expanded form
12*6777b538SAndroid Build Coastguard Worker // manually instead.
13*6777b538SAndroid Build Coastguard Worker 
14*6777b538SAndroid Build Coastguard Worker #ifdef _INC_WINDOWS_X
15*6777b538SAndroid Build Coastguard Worker #error "There is an include of windowsx.h in the code. Use windowsx_shim.h"
16*6777b538SAndroid Build Coastguard Worker #endif  // _INC_WINDOWS_X
17*6777b538SAndroid Build Coastguard Worker 
18*6777b538SAndroid Build Coastguard Worker #include <windowsx.h>
19*6777b538SAndroid Build Coastguard Worker 
20*6777b538SAndroid Build Coastguard Worker #undef GetNextSibling  // Same as GetWindow(hwnd, GW_HWNDNEXT)
21*6777b538SAndroid Build Coastguard Worker #undef GetFirstChild   // Same as GetTopWindow(hwnd)
22*6777b538SAndroid Build Coastguard Worker #undef IsMaximized     // Defined to IsZoomed, use IsZoomed directly instead
23*6777b538SAndroid Build Coastguard Worker #undef IsMinimized     // Defined to IsIconic, use IsIconic directly instead
24*6777b538SAndroid Build Coastguard Worker #undef IsRestored      // Macro to check that neither WS_MINIMIZE, nor
25*6777b538SAndroid Build Coastguard Worker                        // WS_MAXIMIZE is set in the GetWindowStyle return
26*6777b538SAndroid Build Coastguard Worker                        // value.
27*6777b538SAndroid Build Coastguard Worker 
28*6777b538SAndroid Build Coastguard Worker #endif  // BASE_WIN_WINDOWSX_SHIM_H_
29