OSDN Git Service

Make <winnls.h> header effectively self-contained.
[mingw/mingw-org-wsl.git] / w32api / include / windows.h
1 /*
2  * windows.h
3  *
4  * Include supplementary headers for core Win32 API definitions.
5  *
6  * $Id$
7  *
8  * Written by Anders Norlander <anorland@hem2.passagen.se>
9  * Copyright (C) 1998-2003, 2006, 2007, 2016, 2017, 2019, MinGW.org Project
10  *
11  *
12  * Permission is hereby granted, free of charge, to any person obtaining a
13  * copy of this software and associated documentation files (the "Software"),
14  * to deal in the Software without restriction, including without limitation
15  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16  * and/or sell copies of the Software, and to permit persons to whom the
17  * Software is furnished to do so, subject to the following conditions:
18  *
19  * The above copyright notice and this permission notice (including the next
20  * paragraph) shall be included in all copies or substantial portions of the
21  * Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29  * DEALINGS IN THE SOFTWARE.
30  *
31  */
32 #ifndef _WINDOWS_H
33 #pragma GCC system_header
34 #define _WINDOWS_H
35
36 #ifdef RC_INVOKED
37 /* winresrc.h includes the necessary headers */
38 #include <winresrc.h>
39 #else
40
41 #include <stdarg.h>
42 #include <windef.h>
43 #include <wincon.h>
44 #include <winbase.h>
45 #if !(defined NOGDI || defined  _WINGDI_H)
46 #include <wingdi.h>
47 #endif
48 #include <winuser.h>
49 #include <winnls.h>
50 #include <winver.h>
51 #include <winnetwk.h>
52 #include <winreg.h>
53 #include <winsvc.h>
54
55 #ifndef WIN32_LEAN_AND_MEAN
56 #include <cderr.h>
57 #include <dde.h>
58 #include <ddeml.h>
59 #include <dlgs.h>
60 #include <imm.h>
61 #include <lzexpand.h>
62 #include <mmsystem.h>
63 #include <nb30.h>
64 #include <rpc.h>
65 #include <shellapi.h>
66 #include <winperf.h>
67 #ifndef NOGDI
68 #include <commdlg.h>
69 #include <winspool.h>
70 #endif
71 #if defined Win32_Winsock
72 #warning "The Win32_Winsock macro is deprecated; use __USE_W32_SOCKETS instead."
73 # ifndef __USE_W32_SOCKETS
74 #  define __USE_W32_SOCKETS
75 # endif
76 #endif
77 #if defined __USE_W32_SOCKETS \
78  || ! (defined __CYGWIN__ || defined __MSYS__ || defined _UWIN)
79  /* The WinSock API should be declared; including <winsock.h>,
80   * under the control of the __USE_MINGW_WINSOCK_DEFAULT feature
81   * test, will ensure that we make an informed choice between the
82   * WinSock v1.1 API, as declared in <winsock.h>, and WinSock v2,
83   * as declared in <winsock2.h>, as the preferred default level
84   * of WinSock API support to be offered.
85   */
86 # define __USE_MINGW_WINSOCK_DEFAULT
87 # include "winsock.h"
88  /*
89   * FIXME: strict Microsoft compatibility may require inclusion
90   * of <mswsock.h> here as well; however, this has been observed
91   * to produce undefined symbol errors, if <winsock2.h> has been
92   * included before <windows.h>, so we omit this.
93   */
94 # /* include <mswsock.h> */
95 #endif
96 #ifndef NOGDI
97 /* In older versions we disallowed COM declarations in __OBJC__
98    because of conflicts with @interface directive.  Define _OBJC_NO_COM
99    to keep this behaviour.  */
100 #if !defined (_OBJC_NO_COM)
101 #if (__GNUC__ >= 3) || defined (__WATCOMC__)
102 #include <ole2.h>
103 #endif
104 #endif /* _OBJC_NO_COM */
105 #endif
106
107 #endif /* WIN32_LEAN_AND_MEAN */
108
109 #endif /* RC_INVOKED */
110
111 #ifdef __OBJC__
112 /* FIXME: Not undefining BOOL here causes all BOOLs to be WINBOOL (int),
113    but undefining it causes trouble as well if a file is included after
114    windows.h
115 */
116 #undef BOOL
117 #endif
118
119 #endif  /* _WINDOWS_H: $RCSfile$: end of file */