VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xproto-7.0.18/X11/Xwindows.h@ 68495

Last change on this file since 68495 was 32163, checked in by vboxsync, 14 years ago

Additions/x11/x11include: additional headers for building drivers for X.Org Server 1.9

  • Property svn:eol-style set to native
File size: 2.6 KB
Line 
1/*
2
3Copyright 1996, 1998 The Open Group
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7the above copyright notice appear in all copies and that both that
8copyright notice and this permission notice appear in supporting
9documentation.
10
11The above copyright notice and this permission notice shall be included
12in all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
16ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
17SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-
18ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall
23not be used in advertising or otherwise to promote the sale, use or
24other dealings in this Software without prior written authorization from
25The Open Group.
26
27*/
28
29/*
30 * This header file has the sole purpose of allowing the inclusion of
31 * windows.h without getting any name conflicts with X headers code, by
32 * renaming the conflicting definitions from windows.h
33 *
34 * Some (non-Microsoft) versions of the Windows API headers actually avoid
35 * making the conflicting definitions if XFree86Server is defined, so we
36 * need to remember if that was defined and undefine it during including
37 * windows.h (so the conflicting definitions get wrapped correctly), and
38 * then redefine it afterwards...
39 *
40 * There doesn't seem to be a good way to wrap the min/max macros from
41 * windows.h, so we simply avoid defining them completely, allowing any
42 * pre-existing definition to stand.
43 *
44 */
45
46#undef _XFree86Server
47#ifdef XFree86Server
48# define _XFree86Server
49# undef XFree86Server
50#endif
51
52#define NOMINMAX
53#define BOOL wBOOL
54#define INT32 wINT32
55#undef Status
56#define Status wStatus
57#define ATOM wATOM
58#define BYTE wBYTE
59#define FreeResource wFreeResource
60#include <windows.h>
61#undef NOMINMAX
62#undef Status
63#define Status int
64#undef BYTE
65#undef BOOL
66#undef INT32
67#undef ATOM
68#undef FreeResource
69#undef CreateWindowA
70
71#ifdef RESOURCE_H
72# undef RT_FONT
73# undef RT_CURSOR
74# define RT_FONT ((RESTYPE)4)
75# define RT_CURSOR ((RESTYPE)5)
76#endif
77
78#ifndef __CYGWIN__
79#define sleep(x) Sleep((x) * 1000)
80#endif
81
82#if defined(WIN32) && (!defined(PATH_MAX) || PATH_MAX < 1024)
83# undef PATH_MAX
84# define PATH_MAX 1024
85#endif
86
87#ifdef _XFree86Server
88# define XFree86Server
89# undef _XFree86Server
90#endif
91
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette