Index: /trunk/src/VBox/Additions/x11/x11include/1.5/X11/Xfuncproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/X11/Xfuncproto.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/X11/Xfuncproto.h	(revision 9233)
@@ -0,0 +1,123 @@
+/* Xfuncproto.h.  Generated from Xfuncproto.h.in by configure.  */
+/* $Xorg: Xfuncproto.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
+/*
+ *
+Copyright 1989, 1991, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ */
+/* $XFree86: xc/include/Xfuncproto.h,v 3.4 2001/12/14 19:53:25 dawes Exp $ */
+
+/* Definitions to make function prototypes manageable */
+
+#ifndef _XFUNCPROTO_H_
+#define _XFUNCPROTO_H_
+
+#ifndef NeedFunctionPrototypes
+#define NeedFunctionPrototypes 1
+#endif /* NeedFunctionPrototypes */
+
+#ifndef NeedVarargsPrototypes
+#define NeedVarargsPrototypes 1
+#endif /* NeedVarargsPrototypes */
+
+#if NeedFunctionPrototypes
+
+#ifndef NeedNestedPrototypes
+#define NeedNestedPrototypes 1
+#endif /* NeedNestedPrototypes */
+
+#ifndef _Xconst
+#define _Xconst const
+#endif /* _Xconst */
+
+/* Function prototype configuration (see configure for more info) */
+#ifndef NARROWPROTO
+#define NARROWPROTO 
+#endif
+#ifndef FUNCPROTO
+#define FUNCPROTO 15
+#endif
+
+#ifndef NeedWidePrototypes
+#ifdef NARROWPROTO
+#define NeedWidePrototypes 0
+#else
+#define NeedWidePrototypes 1		/* default to make interropt. easier */
+#endif
+#endif /* NeedWidePrototypes */
+
+#endif /* NeedFunctionPrototypes */
+
+#ifndef _XFUNCPROTOBEGIN
+#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
+#define _XFUNCPROTOBEGIN extern "C" {	/* do not leave open across includes */
+#define _XFUNCPROTOEND }
+#else
+#define _XFUNCPROTOBEGIN
+#define _XFUNCPROTOEND
+#endif
+#endif /* _XFUNCPROTOBEGIN */
+
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
+# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
+#else
+# define _X_SENTINEL(x)
+# define _X_ATTRIBUTE_PRINTF(x,y)
+#endif /* GNUC >= 4 */
+
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+# define _X_EXPORT      __attribute__((visibility("default")))
+# define _X_HIDDEN      __attribute__((visibility("hidden")))
+# define _X_INTERNAL    __attribute__((visibility("internal")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+# define _X_EXPORT      __global
+# define _X_HIDDEN      __hidden
+# define _X_INTERNAL    __hidden
+#else /* not gcc >= 4 and not Sun Studio >= 8 */
+# define _X_EXPORT
+# define _X_HIDDEN
+# define _X_INTERNAL
+#endif /* GNUC >= 4 */
+
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
+# define _X_LIKELY(x)   __builtin_expect(!!(x), 1)
+# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)
+# define _X_INLINE      inline
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+# define _X_LIKELY(x)   (x)
+# define _X_UNLIKELY(x) (x)
+# define _X_INLINE      inline
+#else /* not gcc >= 3.3 and not Sun Studio >= 8 */
+# define _X_LIKELY(x)   (x)
+# define _X_UNLIKELY(x) (x)
+# define _X_INLINE
+#endif
+
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
+# define _X_DEPRECATED  __attribute__((deprecated))
+#else /* not gcc >= 3.1 */
+# define _X_DEPRECATED
+#endif
+
+#endif /* _XFUNCPROTO_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/dpms.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/dpms.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/dpms.h	(revision 9233)
@@ -0,0 +1,67 @@
+/* $Xorg: dpms.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
+/*****************************************************************
+
+Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, 
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, 
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation 
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital 
+Equipment Corporation.
+
+******************************************************************/
+/* $XFree86: xc/include/extensions/dpms.h,v 3.4 2000/03/15 16:51:51 tsi Exp $ */
+
+#ifndef _X11_EXTENSIONS_DPMS_H
+#define _X11_EXTENSIONS_DPMS_H 1
+
+/*
+ * HISTORY
+ */
+/*
+ * @(#)RCSfile: dpms.h,v Revision: 1.1.4.2  (DEC) Date: 1995/11/21 19:34:17
+ */
+
+
+#define DPMSModeOn	0
+#define DPMSModeStandby	1
+#define DPMSModeSuspend	2
+#define DPMSModeOff	3
+
+#ifndef DPMS_SERVER
+
+#include <X11/X.h>
+#include <X11/Xmd.h>
+
+_XFUNCPROTOBEGIN
+
+extern Bool DPMSQueryExtension(Display *, int *, int *);
+extern Status DPMSGetVersion(Display *, int *, int *);
+extern Bool DPMSCapable(Display *);
+extern Status DPMSSetTimeouts(Display *, CARD16, CARD16, CARD16);
+extern Bool DPMSGetTimeouts(Display *, CARD16 *, CARD16 *, CARD16 *);
+extern Status DPMSEnable(Display *);
+extern Status DPMSDisable(Display *);
+extern Status DPMSForceLevel(Display *, CARD16);
+extern Status DPMSInfo(Display *, CARD16 *, BOOL *);
+
+_XFUNCPROTOEND
+#endif /* !DPMS_SERVER */
+#endif /* !_X11_EXTENSIONS_DPMS_H */
+
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/randr.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/randr.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/randr.h	(revision 9233)
@@ -0,0 +1,141 @@
+/*
+ * Copyright © 2000 Compaq Computer Corporation
+ * Copyright © 2002 Hewlett Packard Company
+ * Copyright © 2006 Intel Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no representations
+ * about the suitability of this software for any purpose.  It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * Author:  Jim Gettys, HP Labs, Hewlett-Packard, Inc.
+ *	    Keith Packard, Intel Corporation
+ */
+
+#ifndef _RANDR_H_
+#define _RANDR_H_
+
+typedef unsigned short	Rotation;
+typedef unsigned short	SizeID;
+typedef unsigned short	SubpixelOrder;
+typedef unsigned short	Connection;
+typedef unsigned short	XRandrRotation;
+typedef unsigned short	XRandrSizeID;
+typedef unsigned short	XRandrSubpixelOrder;
+typedef unsigned long	XRandrModeFlags;
+
+#define RANDR_NAME		"RANDR"
+#define RANDR_MAJOR		1
+#define RANDR_MINOR		2
+
+#define RRNumberErrors		3
+#define RRNumberEvents		2
+#define RRNumberRequests	25
+
+#define X_RRQueryVersion	0
+/* we skip 1 to make old clients fail pretty immediately */
+#define X_RROldGetScreenInfo	1
+#define X_RR1_0SetScreenConfig	2
+/* V1.0 apps share the same set screen config request id */
+#define X_RRSetScreenConfig	2
+#define X_RROldScreenChangeSelectInput	3
+/* 3 used to be ScreenChangeSelectInput; deprecated */
+#define X_RRSelectInput		4
+#define X_RRGetScreenInfo	5
+
+/* V1.2 additions */
+#define X_RRGetScreenSizeRange	    6
+#define X_RRSetScreenSize	    7
+#define X_RRGetScreenResources	    8
+#define X_RRGetOutputInfo	    9
+#define X_RRListOutputProperties    10
+#define X_RRQueryOutputProperty	    11
+#define X_RRConfigureOutputProperty 12
+#define X_RRChangeOutputProperty    13
+#define X_RRDeleteOutputProperty    14
+#define X_RRGetOutputProperty	    15
+#define X_RRCreateMode		    16
+#define X_RRDestroyMode		    17
+#define X_RRAddOutputMode	    18
+#define X_RRDeleteOutputMode	    19
+#define X_RRGetCrtcInfo		    20
+#define X_RRSetCrtcConfig	    21
+#define X_RRGetCrtcGammaSize	    22
+#define X_RRGetCrtcGamma	    23
+#define X_RRSetCrtcGamma	    24
+
+/* Event selection bits */
+#define RRScreenChangeNotifyMask  (1L << 0)
+/* V1.2 additions */
+#define RRCrtcChangeNotifyMask	    (1L << 1)
+#define RROutputChangeNotifyMask    (1L << 2)
+#define RROutputPropertyNotifyMask  (1L << 3)
+
+/* Event codes */
+#define RRScreenChangeNotify	0
+/* V1.2 additions */
+#define RRNotify		    1
+/* RRNotify Subcodes */
+#define  RRNotify_CrtcChange	    0
+#define  RRNotify_OutputChange	    1
+#define  RRNotify_OutputProperty    2
+
+/* used in the rotation field; rotation and reflection in 0.1 proto. */
+#define RR_Rotate_0		1
+#define RR_Rotate_90		2
+#define RR_Rotate_180		4
+#define RR_Rotate_270		8
+
+/* new in 1.0 protocol, to allow reflection of screen */
+
+#define RR_Reflect_X		16
+#define RR_Reflect_Y		32
+
+#define RRSetConfigSuccess		0
+#define RRSetConfigInvalidConfigTime	1
+#define RRSetConfigInvalidTime		2
+#define RRSetConfigFailed		3
+
+/* new in 1.2 protocol */
+
+#define RR_HSyncPositive	0x00000001
+#define RR_HSyncNegative	0x00000002
+#define RR_VSyncPositive	0x00000004
+#define RR_VSyncNegative	0x00000008
+#define RR_Interlace		0x00000010
+#define RR_DoubleScan		0x00000020
+#define RR_CSync		0x00000040
+#define RR_CSyncPositive	0x00000080
+#define RR_CSyncNegative	0x00000100
+#define RR_HSkewPresent		0x00000200
+#define RR_BCast		0x00000400
+#define RR_PixelMultiplex	0x00000800
+#define RR_DoubleClock		0x00001000
+#define RR_ClockDivideBy2	0x00002000
+
+#define RR_Connected		0
+#define RR_Disconnected		1
+#define RR_UnknownConnection	2
+
+#define BadRROutput		0
+#define BadRRCrtc		1
+#define BadRRMode		2
+
+/* Conventional RandR output properties */
+
+#define RR_PROPERTY_RANDR_EDID		"RANDR_EDID"
+
+#endif	/* _RANDR_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/randrproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/randrproto.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/randrproto.h	(revision 9233)
@@ -0,0 +1,650 @@
+/*
+ * Copyright © 2000 Compaq Computer Corporation
+ * Copyright © 2002 Hewlett-Packard Company
+ * Copyright © 2006 Intel Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no representations
+ * about the suitability of this software for any purpose.  It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * Author:  Jim Gettys, Hewlett-Packard Company, Inc.
+ *	    Keith Packard, Intel Corporation
+ */
+
+/* note that RANDR 1.0 is incompatible with version 0.0, or 0.1 */
+/* V1.0 removes depth switching from the protocol */
+#ifndef _XRANDRP_H_
+#define _XRANDRP_H_
+
+#include <X11/extensions/randr.h>
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+#define RROutput CARD32
+#define RRMode CARD32
+#define RRCrtc CARD32
+#define RRModeFlags CARD32
+
+#define Rotation CARD16
+#define SizeID CARD16
+#define SubpixelOrder CARD16
+
+/*
+ * data structures
+ */
+
+typedef struct {
+    CARD16 widthInPixels B16;
+    CARD16 heightInPixels B16;
+    CARD16 widthInMillimeters B16;
+    CARD16 heightInMillimeters B16;
+} xScreenSizes;
+#define sz_xScreenSizes 8
+
+/* 
+ * requests and replies
+ */
+
+typedef struct {
+    CARD8   reqType;
+    CARD8   randrReqType;
+    CARD16  length B16;
+    CARD32  majorVersion B32;
+    CARD32  minorVersion B32;
+} xRRQueryVersionReq;
+#define sz_xRRQueryVersionReq   12
+
+typedef struct {
+    BYTE    type;   /* X_Reply */
+    BYTE    pad1;
+    CARD16  sequenceNumber B16;
+    CARD32  length B32;
+    CARD32  majorVersion B32;
+    CARD32  minorVersion B32;
+    CARD32  pad2 B32;
+    CARD32  pad3 B32;
+    CARD32  pad4 B32;
+    CARD32  pad5 B32;
+} xRRQueryVersionReply;
+#define sz_xRRQueryVersionReply	32
+
+typedef struct {
+    CARD8   reqType;
+    CARD8   randrReqType;
+    CARD16  length B16;
+    Window  window B32;
+} xRRGetScreenInfoReq;
+#define sz_xRRGetScreenInfoReq   8
+
+/* 
+ * the xRRScreenInfoReply structure is followed by:
+ *
+ * the size information
+ */
+
+
+typedef struct {
+    BYTE    type;   /* X_Reply */
+    BYTE    setOfRotations;
+    CARD16  sequenceNumber B16;
+    CARD32  length B32;
+    Window  root B32;
+    Time    timestamp B32;
+    Time    configTimestamp B32;
+    CARD16  nSizes B16;
+    SizeID  sizeID B16;
+    Rotation  rotation B16;
+    CARD16  rate B16;
+    CARD16  nrateEnts B16;
+    CARD16  pad B16;
+} xRRGetScreenInfoReply;
+#define sz_xRRGetScreenInfoReply	32
+
+typedef struct {
+    CARD8    reqType;
+    CARD8    randrReqType;
+    CARD16   length B16;
+    Drawable drawable B32;
+    Time     timestamp B32;
+    Time     configTimestamp B32;
+    SizeID   sizeID B16;
+    Rotation rotation B16;
+} xRR1_0SetScreenConfigReq;
+#define sz_xRR1_0SetScreenConfigReq   20
+
+typedef struct {
+    CARD8    reqType;
+    CARD8    randrReqType;
+    CARD16   length B16;
+    Drawable drawable B32;
+    Time     timestamp B32;
+    Time     configTimestamp B32;
+    SizeID   sizeID B16;
+    Rotation rotation B16;
+    CARD16   rate B16;
+    CARD16   pad B16;
+} xRRSetScreenConfigReq;
+#define sz_xRRSetScreenConfigReq   24
+
+typedef struct {
+    BYTE    type;   /* X_Reply */
+    CARD8   status;
+    CARD16  sequenceNumber B16;
+    CARD32  length B32;
+    Time    newTimestamp B32;  
+    Time    newConfigTimestamp B32;
+    Window  root;
+    CARD16  subpixelOrder B16;
+    CARD16  pad4 B16;
+    CARD32  pad5 B32;
+    CARD32  pad6 B32;
+} xRRSetScreenConfigReply;
+#define sz_xRRSetScreenConfigReply 32
+
+typedef struct {
+    CARD8   reqType;
+    CARD8   randrReqType;
+    CARD16  length B16;
+    Window  window B32;
+    CARD16  enable B16;
+    CARD16  pad2 B16;
+} xRRSelectInputReq;
+#define sz_xRRSelectInputReq   12
+
+/*
+ * Additions for version 1.2
+ */
+
+typedef struct _xRRModeInfo {
+    RRMode		id B32;
+    CARD16		width B16;
+    CARD16		height B16;
+    CARD32		dotClock B32;
+    CARD16		hSyncStart B16;
+    CARD16		hSyncEnd B16;
+    CARD16		hTotal B16;
+    CARD16		hSkew B16;
+    CARD16		vSyncStart B16;
+    CARD16		vSyncEnd B16;
+    CARD16		vTotal B16;
+    CARD16		nameLength B16;
+    RRModeFlags		modeFlags B32;
+} xRRModeInfo;
+#define sz_xRRModeInfo		    32
+
+typedef struct {
+    CARD8   reqType;
+    CARD8   randrReqType;
+    CARD16  length B16;
+    Window  window B32;
+} xRRGetScreenSizeRangeReq;
+#define sz_xRRGetScreenSizeRangeReq 8
+
+typedef struct {
+    BYTE    type;   /* X_Reply */
+    CARD8   pad;
+    CARD16  sequenceNumber B16;
+    CARD32  length B32;
+    CARD16  minWidth B16;
+    CARD16  minHeight B16;
+    CARD16  maxWidth B16;
+    CARD16  maxHeight B16;
+    CARD32  pad0 B32;
+    CARD32  pad1 B32;
+    CARD32  pad2 B32;
+    CARD32  pad3 B32;
+} xRRGetScreenSizeRangeReply;
+#define sz_xRRGetScreenSizeRangeReply 32
+
+typedef struct {
+    CARD8   reqType;
+    CARD8   randrReqType;
+    CARD16  length B16;
+    Window  window B32;
+    CARD16  width B16;
+    CARD16  height B16;
+    CARD32  widthInMillimeters B32;
+    CARD32  heightInMillimeters B32;
+} xRRSetScreenSizeReq;
+#define sz_xRRSetScreenSizeReq	    20
+
+typedef struct {
+    CARD8   reqType;
+    CARD8   randrReqType;
+    CARD16  length B16;
+    Window  window B32;
+} xRRGetScreenResourcesReq;
+#define sz_xRRGetScreenResourcesReq 8
+
+typedef struct {
+    BYTE	type;
+    CARD8	pad;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    Time	timestamp B32;
+    Time	configTimestamp B32;
+    CARD16	nCrtcs B16;
+    CARD16	nOutputs B16;
+    CARD16	nModes B16;
+    CARD16	nbytesNames B16;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+} xRRGetScreenResourcesReply;
+#define sz_xRRGetScreenResourcesReply	32
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RROutput	output B32;
+    Time	configTimestamp B32;
+} xRRGetOutputInfoReq;
+#define sz_xRRGetOutputInfoReq		12
+
+typedef struct {
+    BYTE	type;
+    CARD8	status;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    Time	timestamp B32;
+    RRCrtc	crtc B32;
+    CARD32	mmWidth B32;
+    CARD32	mmHeight B32;
+    CARD8	connection;
+    CARD8	subpixelOrder;
+    CARD16	nCrtcs B16;
+    CARD16	nModes B16;
+    CARD16	nPreferred B16;
+    CARD16	nClones B16;
+    CARD16	nameLength B16;
+} xRRGetOutputInfoReply;
+#define sz_xRRGetOutputInfoReply	36
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RROutput	output B32;
+} xRRListOutputPropertiesReq; 
+#define sz_xRRListOutputPropertiesReq	8
+
+typedef struct {
+    BYTE	type;
+    CARD8	pad0;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	nAtoms B16;
+    CARD16	pad1 B16;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xRRListOutputPropertiesReply;
+#define sz_xRRListOutputPropertiesReply	32
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RROutput	output B32;
+    Atom	property B32;
+} xRRQueryOutputPropertyReq; 
+#define sz_xRRQueryOutputPropertyReq	12
+
+typedef struct {
+    BYTE	type;
+    BYTE	pad0;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    BOOL	pending;
+    BOOL	range;
+    BOOL	immutable;
+    BYTE	pad1;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xRRQueryOutputPropertyReply;
+#define sz_xRRQueryOutputPropertyReply	32
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RROutput	output B32;
+    Atom	property B32;
+    BOOL	pending;
+    BOOL	range;
+    CARD16	pad B16;
+} xRRConfigureOutputPropertyReq; 
+#define sz_xRRConfigureOutputPropertyReq	16
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RROutput	output B32;
+    Atom	property B32;
+    Atom	type B32;
+    CARD8	format;
+    CARD8	mode;
+    CARD16	pad;
+    CARD32	nUnits B32;
+} xRRChangeOutputPropertyReq;
+#define sz_xRRChangeOutputPropertyReq	24
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RROutput	output B32;
+    Atom	property B32;
+} xRRDeleteOutputPropertyReq;
+#define sz_xRRDeleteOutputPropertyReq	12
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RROutput	output B32;
+    Atom	property B32;
+    Atom	type B32;
+    CARD32	longOffset B32;
+    CARD32	longLength B32;
+    BOOL	delete;
+    BOOL	pending;
+    CARD16	pad1 B16;
+} xRRGetOutputPropertyReq;
+#define sz_xRRGetOutputPropertyReq	28
+
+typedef struct {
+    BYTE	type;
+    CARD8	format;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    Atom	propertyType B32;
+    CARD32	bytesAfter B32;
+    CARD32	nItems B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+} xRRGetOutputPropertyReply;
+#define sz_xRRGetOutputPropertyReply	32
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    Window	window B32;
+    xRRModeInfo	modeInfo;
+} xRRCreateModeReq; 
+#define sz_xRRCreateModeReq		40
+
+typedef struct {
+    BYTE	type;
+    CARD8	pad0;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    RRMode	mode B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+} xRRCreateModeReply;
+#define sz_xRRCreateModeReply		32
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RRMode	mode B32;
+} xRRDestroyModeReq;
+#define sz_xRRDestroyModeReq		8
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RROutput	output B32;
+    RRMode	mode B32;
+} xRRAddOutputModeReq;
+#define sz_xRRAddOutputModeReq		12
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RROutput	output B32;
+    RRMode	mode B32;
+} xRRDeleteOutputModeReq;
+#define sz_xRRDeleteOutputModeReq	12
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RRCrtc	crtc B32;
+    Time	configTimestamp B32;
+} xRRGetCrtcInfoReq; 
+#define sz_xRRGetCrtcInfoReq		12
+
+typedef struct {
+    BYTE	type;
+    CARD8	status;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    Time	timestamp B32;
+    INT16	x B16;
+    INT16	y B16;
+    CARD16	width B16;
+    CARD16	height B16;
+    RRMode	mode B32;
+    Rotation	rotation B16;
+    Rotation	rotations B16;
+    CARD16	nOutput B16;
+    CARD16	nPossibleOutput B16;
+} xRRGetCrtcInfoReply;
+#define sz_xRRGetCrtcInfoReply		32
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RRCrtc	crtc B32;
+    Time	timestamp B32;
+    Time    	configTimestamp B32;
+    INT16	x B16;
+    INT16	y B16;
+    RRMode	mode B32;
+    Rotation	rotation B16;
+    CARD16	pad B16;
+} xRRSetCrtcConfigReq; 
+#define sz_xRRSetCrtcConfigReq		28
+
+typedef struct {
+    BYTE	type;
+    CARD8	status;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    Time	newTimestamp B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B16;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+} xRRSetCrtcConfigReply;
+#define sz_xRRSetCrtcConfigReply	32
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RRCrtc	crtc B32;
+} xRRGetCrtcGammaSizeReq; 
+#define sz_xRRGetCrtcGammaSizeReq	8
+
+typedef struct {
+    BYTE	type;
+    CARD8	status;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	size B16;
+    CARD16	pad1 B16;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xRRGetCrtcGammaSizeReply;
+#define sz_xRRGetCrtcGammaSizeReply	32
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RRCrtc	crtc B32;
+} xRRGetCrtcGammaReq; 
+#define sz_xRRGetCrtcGammaReq		8
+
+typedef struct {
+    BYTE	type;
+    CARD8	status;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	size B16;
+    CARD16	pad1 B16;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xRRGetCrtcGammaReply;
+#define sz_xRRGetCrtcGammaReply		32
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RRCrtc	crtc B32;
+    CARD16	size B16;
+    CARD16	pad1 B16;
+} xRRSetCrtcGammaReq;
+#define sz_xRRSetCrtcGammaReq		12
+
+/*
+ * event
+ */
+typedef struct {
+    CARD8 type;				/* always evBase + ScreenChangeNotify */
+    CARD8 rotation;			/* new rotation */
+    CARD16 sequenceNumber B16;
+    Time timestamp B32;			/* time screen was changed */
+    Time configTimestamp B32;		/* time config data was changed */
+    Window root B32;			/* root window */
+    Window window B32;			/* window requesting notification */
+    SizeID sizeID B16;			/* new size ID */
+    CARD16 subpixelOrder B16;		/* subpixel order */
+    CARD16 widthInPixels B16;		/* new size */
+    CARD16 heightInPixels B16;
+    CARD16 widthInMillimeters B16;
+    CARD16 heightInMillimeters B16;
+} xRRScreenChangeNotifyEvent;
+#define sz_xRRScreenChangeNotifyEvent	32
+
+typedef struct {
+    CARD8 type;				/* always evBase + RRNotify */
+    CARD8 subCode;			/* RRNotify_CrtcChange */
+    CARD16 sequenceNumber B16;
+    Time timestamp B32;			/* time crtc was changed */
+    Window window B32;			/* window requesting notification */
+    RRCrtc crtc B32;			/* affected CRTC */
+    RRMode mode B32;			/* current mode */
+    CARD16 rotation B16;		/* rotation and reflection */
+    CARD16 pad1 B16;			/* unused */
+    INT16 x B16;			/* new location */
+    INT16 y B16;
+    CARD16 width B16;			/* new size */
+    CARD16 height B16;
+} xRRCrtcChangeNotifyEvent;
+#define sz_xRRCrtcChangeNotifyEvent	32
+
+typedef struct {
+    CARD8 type;				/* always evBase + RRNotify */
+    CARD8 subCode;			/* RRNotify_OutputChange */
+    CARD16 sequenceNumber B16;
+    Time timestamp B32;			/* time crtc was changed */
+    Time configTimestamp B32;		/* time crtc was changed */
+    Window window B32;			/* window requesting notification */
+    RROutput output B32;		/* affected output */
+    RRCrtc crtc B32;			/* current crtc */
+    RRMode mode B32;			/* current mode */
+    CARD16 rotation B16;		/* rotation and reflection */
+    CARD8 connection;			/* connection status */
+    CARD8 subpixelOrder;		/* subpixel order */
+} xRROutputChangeNotifyEvent;
+#define sz_xRROutputChangeNotifyEvent	32
+
+typedef struct {
+    CARD8 type;				/* always evBase + RRNotify */
+    CARD8 subCode;			/* RRNotify_OutputProperty */
+    CARD16 sequenceNumber B16;
+    Window window B32;			/* window requesting notification */
+    RROutput output B32;		/* affected output */
+    Atom atom B32;			/* property name */
+    Time timestamp B32;			/* time crtc was changed */
+    CARD8 state;			/* NewValue or Deleted */
+    CARD8 pad1;
+    CARD16 pad2 B16;
+    CARD32 pad3 B32;
+    CARD32 pad4 B32;
+} xRROutputPropertyNotifyEvent;
+#define sz_xRROutputPropertyNotifyEvent	32
+
+#undef RRModeFlags
+#undef RRCrtc
+#undef RRMode
+#undef RROutput
+#undef RRMode
+#undef RRCrtc
+#undef Drawable
+#undef Window
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef Time
+#undef KeyCode
+#undef KeySym
+#undef Rotation
+#undef SizeID
+#undef SubpixelOrder
+
+#endif /* _XRANDRP_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/render.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/render.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/render.h	(revision 9233)
@@ -0,0 +1,189 @@
+/*
+ * $XFree86: xc/include/extensions/render.h,v 1.10 2002/11/06 22:47:49 keithp Exp $
+ *
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  SuSE makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author:  Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _RENDER_H_
+#define _RENDER_H_
+
+typedef XID		Glyph;
+typedef XID		GlyphSet;
+typedef XID		Picture;
+typedef XID		PictFormat;
+
+#define RENDER_NAME	"RENDER"
+#define RENDER_MAJOR	0
+#define RENDER_MINOR	10
+
+#define X_RenderQueryVersion		    0
+#define X_RenderQueryPictFormats	    1
+#define X_RenderQueryPictIndexValues	    2	/* 0.7 */
+#define X_RenderQueryDithers		    3
+#define X_RenderCreatePicture		    4
+#define X_RenderChangePicture		    5
+#define X_RenderSetPictureClipRectangles    6
+#define X_RenderFreePicture		    7
+#define X_RenderComposite		    8
+#define X_RenderScale			    9
+#define X_RenderTrapezoids		    10
+#define X_RenderTriangles		    11
+#define X_RenderTriStrip		    12
+#define X_RenderTriFan			    13
+#define X_RenderColorTrapezoids		    14
+#define X_RenderColorTriangles		    15
+/* #define X_RenderTransform		    16 */
+#define X_RenderCreateGlyphSet		    17
+#define X_RenderReferenceGlyphSet	    18
+#define X_RenderFreeGlyphSet		    19
+#define X_RenderAddGlyphs		    20
+#define X_RenderAddGlyphsFromPicture	    21
+#define X_RenderFreeGlyphs		    22
+#define X_RenderCompositeGlyphs8	    23
+#define X_RenderCompositeGlyphs16	    24
+#define X_RenderCompositeGlyphs32	    25
+#define X_RenderFillRectangles		    26
+/* 0.5 */
+#define X_RenderCreateCursor		    27
+/* 0.6 */
+#define X_RenderSetPictureTransform	    28
+#define X_RenderQueryFilters		    29
+#define X_RenderSetPictureFilter	    30
+/* 0.8 */
+#define X_RenderCreateAnimCursor	    31
+/* 0.9 */
+#define X_RenderAddTraps		    32
+/* 0.10 */
+#define X_RenderCreateSolidFill             33
+#define X_RenderCreateLinearGradient        34
+#define X_RenderCreateRadialGradient        35
+#define X_RenderCreateConicalGradient       36
+#define RenderNumberRequests		    (X_RenderCreateConicalGradient+1)
+
+#define BadPictFormat			    0
+#define BadPicture			    1
+#define BadPictOp			    2
+#define BadGlyphSet			    3
+#define BadGlyph			    4
+#define RenderNumberErrors		    (BadGlyph+1)
+
+#define PictTypeIndexed			    0
+#define PictTypeDirect			    1
+
+#define PictOpMinimum			    0
+#define PictOpClear			    0
+#define PictOpSrc			    1
+#define PictOpDst			    2
+#define PictOpOver			    3
+#define PictOpOverReverse		    4
+#define PictOpIn			    5
+#define PictOpInReverse			    6
+#define PictOpOut			    7
+#define PictOpOutReverse		    8
+#define PictOpAtop			    9
+#define PictOpAtopReverse		    10
+#define PictOpXor			    11
+#define PictOpAdd			    12
+#define PictOpSaturate			    13
+#define PictOpMaximum			    13
+
+/*
+ * Operators only available in version 0.2
+ */
+#define PictOpDisjointMinimum			    0x10
+#define PictOpDisjointClear			    0x10
+#define PictOpDisjointSrc			    0x11
+#define PictOpDisjointDst			    0x12
+#define PictOpDisjointOver			    0x13
+#define PictOpDisjointOverReverse		    0x14
+#define PictOpDisjointIn			    0x15
+#define PictOpDisjointInReverse			    0x16
+#define PictOpDisjointOut			    0x17
+#define PictOpDisjointOutReverse		    0x18
+#define PictOpDisjointAtop			    0x19
+#define PictOpDisjointAtopReverse		    0x1a
+#define PictOpDisjointXor			    0x1b
+#define PictOpDisjointMaximum			    0x1b
+
+#define PictOpConjointMinimum			    0x20
+#define PictOpConjointClear			    0x20
+#define PictOpConjointSrc			    0x21
+#define PictOpConjointDst			    0x22
+#define PictOpConjointOver			    0x23
+#define PictOpConjointOverReverse		    0x24
+#define PictOpConjointIn			    0x25
+#define PictOpConjointInReverse			    0x26
+#define PictOpConjointOut			    0x27
+#define PictOpConjointOutReverse		    0x28
+#define PictOpConjointAtop			    0x29
+#define PictOpConjointAtopReverse		    0x2a
+#define PictOpConjointXor			    0x2b
+#define PictOpConjointMaximum			    0x2b
+
+#define PolyEdgeSharp			    0
+#define PolyEdgeSmooth			    1
+
+#define PolyModePrecise			    0
+#define PolyModeImprecise		    1
+
+#define CPRepeat			    (1 << 0)
+#define CPAlphaMap			    (1 << 1)
+#define CPAlphaXOrigin			    (1 << 2)
+#define CPAlphaYOrigin			    (1 << 3)
+#define CPClipXOrigin			    (1 << 4)
+#define CPClipYOrigin			    (1 << 5)
+#define CPClipMask			    (1 << 6)
+#define CPGraphicsExposure		    (1 << 7)
+#define CPSubwindowMode			    (1 << 8)
+#define CPPolyEdge			    (1 << 9)
+#define CPPolyMode			    (1 << 10)
+#define CPDither			    (1 << 11)
+#define CPComponentAlpha		    (1 << 12)
+#define CPLastBit			    12
+
+/* Filters included in 0.6 */
+#define FilterNearest			    "nearest"
+#define FilterBilinear			    "bilinear"
+/* Filters included in 0.10 */
+#define FilterConvolution		    "convolution"
+
+#define FilterFast			    "fast"
+#define FilterGood			    "good"
+#define FilterBest			    "best"
+
+#define FilterAliasNone			    -1
+
+/* Subpixel orders included in 0.6 */
+#define SubPixelUnknown			    0
+#define SubPixelHorizontalRGB		    1
+#define SubPixelHorizontalBGR		    2
+#define SubPixelVerticalRGB		    3
+#define SubPixelVerticalBGR		    4
+#define SubPixelNone			    5
+
+/* Extended repeat attributes included in 0.10 */
+#define RepeatNone                          0
+#define RepeatNormal                        1
+#define RepeatPad                           2
+#define RepeatReflect                       3
+
+#endif	/* _RENDER_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/renderproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/renderproto.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/X11/extensions/renderproto.h	(revision 9233)
@@ -0,0 +1,663 @@
+/*
+ * $XFree86: xc/include/extensions/renderproto.h,v 1.12 2002/09/26 02:56:48 keithp Exp $
+ *
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  SuSE makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author:  Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _XRENDERP_H_
+#define _XRENDERP_H_
+
+#include <X11/Xmd.h>
+#include <X11/extensions/render.h>
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+
+#define Picture	    CARD32
+#define PictFormat  CARD32
+#define Fixed	    INT32
+#define Glyphset    CARD32
+
+/*
+ * data structures
+ */
+
+typedef struct {
+    CARD16  red B16;
+    CARD16  redMask B16;
+    CARD16  green B16;
+    CARD16  greenMask B16;
+    CARD16  blue B16;
+    CARD16  blueMask B16;
+    CARD16  alpha B16;
+    CARD16  alphaMask B16;
+} xDirectFormat;
+
+#define sz_xDirectFormat    16
+
+typedef struct {
+    PictFormat	id B32;
+    CARD8	type;
+    CARD8	depth;
+    CARD16	pad1 B16;
+    xDirectFormat   direct;
+    Colormap	colormap;
+} xPictFormInfo;
+
+#define sz_xPictFormInfo    28
+
+typedef struct {
+    VisualID	visual;
+    PictFormat	format;
+} xPictVisual;
+
+#define sz_xPictVisual	    8
+
+typedef struct {
+    CARD8	depth;
+    CARD8	pad1;
+    CARD16	nPictVisuals B16;
+    CARD32	pad2 B32;
+} xPictDepth;
+
+#define sz_xPictDepth	8
+
+typedef struct {
+    CARD32	nDepth B32;
+    PictFormat	fallback B32;
+} xPictScreen;
+
+#define sz_xPictScreen	8
+
+typedef struct {
+    CARD32	pixel B32;
+    CARD16	red B16;
+    CARD16	green B16;
+    CARD16	blue B16;
+    CARD16	alpha B16;
+} xIndexValue;
+
+#define sz_xIndexValue	12
+
+typedef struct {
+    CARD16	red B16;
+    CARD16	green B16;
+    CARD16	blue B16;
+    CARD16	alpha B16;
+} xRenderColor;
+
+#define sz_xRenderColor	8
+
+typedef struct {
+    Fixed	x B32;
+    Fixed	y B32;
+} xPointFixed;
+
+#define sz_xPointFixed	8
+
+typedef struct {
+    xPointFixed	p1;
+    xPointFixed p2;
+} xLineFixed;
+
+#define sz_xLineFixed	16
+
+typedef struct {
+    xPointFixed	p1, p2, p3;
+} xTriangle;
+
+#define sz_xTriangle	24
+
+typedef struct {
+    Fixed	top B32;
+    Fixed	bottom B32;
+    xLineFixed	left;
+    xLineFixed	right;
+} xTrapezoid;
+
+#define sz_xTrapezoid	40
+
+typedef struct {
+    CARD16  width B16;
+    CARD16  height B16;
+    INT16   x B16;
+    INT16   y B16;
+    INT16   xOff B16;
+    INT16   yOff B16;
+} xGlyphInfo;
+
+#define sz_xGlyphInfo	12
+
+typedef struct {
+    CARD8   len;
+    CARD8   pad1;
+    CARD16  pad2;
+    INT16   deltax;
+    INT16   deltay;
+} xGlyphElt;
+
+#define sz_xGlyphElt	8
+
+typedef struct {
+    Fixed   l, r, y;
+} xSpanFix;
+
+#define sz_xSpanFix	12
+
+typedef struct {
+    xSpanFix	top, bot;
+} xTrap;
+
+#define sz_xTrap	24
+
+/*
+ * requests and replies
+ */
+typedef struct {
+    CARD8   reqType;
+    CARD8   renderReqType;
+    CARD16  length B16;
+    CARD32  majorVersion B32;
+    CARD32  minorVersion B32;
+} xRenderQueryVersionReq;
+
+#define sz_xRenderQueryVersionReq   12
+
+typedef struct {
+    BYTE    type;   /* X_Reply */
+    BYTE    pad1;
+    CARD16  sequenceNumber B16;
+    CARD32  length B32;
+    CARD32  majorVersion B32;
+    CARD32  minorVersion B32;
+    CARD32  pad2 B32;
+    CARD32  pad3 B32;
+    CARD32  pad4 B32;
+    CARD32  pad5 B32;
+} xRenderQueryVersionReply;
+
+#define sz_xRenderQueryVersionReply	32
+
+typedef struct {
+    CARD8   reqType;
+    CARD8   renderReqType;
+    CARD16  length B16;
+} xRenderQueryPictFormatsReq;
+
+#define sz_xRenderQueryPictFormatsReq	4
+
+typedef struct {
+    BYTE    type;   /* X_Reply */
+    BYTE    pad1;
+    CARD16  sequenceNumber B16;
+    CARD32  length B32;
+    CARD32  numFormats B32;
+    CARD32  numScreens B32;
+    CARD32  numDepths B32;
+    CARD32  numVisuals B32;
+    CARD32  numSubpixel B32;	    /* Version 0.6 */
+    CARD32  pad5 B32;
+} xRenderQueryPictFormatsReply;
+
+#define sz_xRenderQueryPictFormatsReply	32
+
+typedef struct {
+    CARD8   reqType;
+    CARD8   renderReqType;
+    CARD16  length B16;
+    PictFormat	format B32;
+} xRenderQueryPictIndexValuesReq;
+
+#define sz_xRenderQueryPictIndexValuesReq   8
+
+typedef struct {
+    BYTE    type;   /* X_Reply */
+    BYTE    pad1;
+    CARD16  sequenceNumber B16;
+    CARD32  length B32;
+    CARD32  numIndexValues;
+    CARD32  pad2 B32;
+    CARD32  pad3 B32;
+    CARD32  pad4 B32;
+    CARD32  pad5 B32;
+    CARD32  pad6 B32;
+} xRenderQueryPictIndexValuesReply;
+
+#define sz_xRenderQueryPictIndexValuesReply 32
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	renderReqType;
+    CARD16	length B16;
+    Picture	pid B32;
+    Drawable	drawable B32;
+    PictFormat	format B32;
+    CARD32	mask B32;
+} xRenderCreatePictureReq;
+
+#define sz_xRenderCreatePictureReq	    20
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	renderReqType;
+    CARD16	length B16;
+    Picture	picture B32;
+    CARD32	mask B32;
+} xRenderChangePictureReq;
+
+#define sz_xRenderChangePictureReq	    12
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    Picture     picture B32;
+    INT16	xOrigin B16;
+    INT16	yOrigin B16;
+} xRenderSetPictureClipRectanglesReq;
+
+#define sz_xRenderSetPictureClipRectanglesReq	    12
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    Picture     picture B32;
+} xRenderFreePictureReq;
+
+#define sz_xRenderFreePictureReq	    8
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    CARD8	op;
+    CARD8	pad1;
+    CARD16	pad2 B16;
+    Picture	src B32;
+    Picture	mask B32;
+    Picture	dst B32;
+    INT16	xSrc B16;
+    INT16	ySrc B16;
+    INT16	xMask B16;
+    INT16	yMask B16;
+    INT16	xDst B16;
+    INT16	yDst B16;
+    CARD16	width B16;
+    CARD16	height B16;
+} xRenderCompositeReq;
+
+#define sz_xRenderCompositeReq		    36
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    Picture	src B32;
+    Picture	dst B32;
+    CARD32	colorScale B32;
+    CARD32	alphaScale B32;
+    INT16	xSrc B16;
+    INT16	ySrc B16;
+    INT16	xDst B16;
+    INT16	yDst B16;
+    CARD16	width B16;
+    CARD16	height B16;
+} xRenderScaleReq;
+
+#define sz_xRenderScaleReq			    32
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    CARD8	op;
+    CARD8	pad1;
+    CARD16	pad2 B16;
+    Picture	src B32;
+    Picture	dst B32;
+    PictFormat	maskFormat B32;
+    INT16	xSrc B16;
+    INT16	ySrc B16;
+} xRenderTrapezoidsReq;
+
+#define sz_xRenderTrapezoidsReq			    24
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    CARD8	op;
+    CARD8	pad1;
+    CARD16	pad2 B16;
+    Picture	src B32;
+    Picture	dst B32;
+    PictFormat	maskFormat B32;
+    INT16	xSrc B16;
+    INT16	ySrc B16;
+} xRenderTrianglesReq;
+
+#define sz_xRenderTrianglesReq			    24
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    CARD8	op;
+    CARD8	pad1;
+    CARD16	pad2 B16;
+    Picture	src B32;
+    Picture	dst B32;
+    PictFormat	maskFormat B32;
+    INT16	xSrc B16;
+    INT16	ySrc B16;
+} xRenderTriStripReq;
+
+#define sz_xRenderTriStripReq			    24
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    CARD8	op;
+    CARD8	pad1;
+    CARD16	pad2 B16;
+    Picture	src B32;
+    Picture	dst B32;
+    PictFormat	maskFormat B32;
+    INT16	xSrc B16;
+    INT16	ySrc B16;
+} xRenderTriFanReq;
+
+#define sz_xRenderTriFanReq			    24
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    Glyphset	gsid B32;
+    PictFormat	format B32;
+} xRenderCreateGlyphSetReq;
+
+#define sz_xRenderCreateGlyphSetReq		    12
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    Glyphset    gsid B32;
+    Glyphset    existing B32;
+} xRenderReferenceGlyphSetReq;
+
+#define sz_xRenderReferenceGlyphSetReq		    24
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    Glyphset    glyphset B32;
+} xRenderFreeGlyphSetReq;
+
+#define sz_xRenderFreeGlyphSetReq		    8
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    Glyphset    glyphset B32;
+    CARD32	nglyphs;
+} xRenderAddGlyphsReq;
+
+#define sz_xRenderAddGlyphsReq			    12
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    Glyphset    glyphset B32;
+} xRenderFreeGlyphsReq;
+
+#define sz_xRenderFreeGlyphsReq			    8
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    CARD8	op;
+    CARD8	pad1;
+    CARD16	pad2 B16;
+    Picture	src B32;
+    Picture	dst B32;
+    PictFormat	maskFormat B32;
+    Glyphset    glyphset B32;
+    INT16	xSrc B16;
+    INT16	ySrc B16;
+} xRenderCompositeGlyphsReq, xRenderCompositeGlyphs8Req,
+xRenderCompositeGlyphs16Req, xRenderCompositeGlyphs32Req;
+
+#define sz_xRenderCompositeGlyphs8Req		    28
+#define sz_xRenderCompositeGlyphs16Req		    28
+#define sz_xRenderCompositeGlyphs32Req		    28
+
+/* 0.1 and higher */
+
+typedef struct {
+    CARD8	reqType;
+    CARD8       renderReqType;
+    CARD16      length B16;
+    CARD8	op;
+    CARD8	pad1;
+    CARD16	pad2 B16;
+    Picture	dst B32;
+    xRenderColor    color;
+} xRenderFillRectanglesReq;
+
+#define sz_xRenderFillRectanglesReq		    20
+
+/* 0.5 and higher */
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	renderReqType;
+    CARD16	length B16;
+    Cursor	cid B32;
+    Picture	src B32;
+    CARD16	x B16;
+    CARD16	y B16;
+} xRenderCreateCursorReq;
+
+#define sz_xRenderCreateCursorReq		    16
+
+/* 0.6 and higher */
+
+/*
+ * This can't use an array because 32-bit values may be in bitfields
+ */
+typedef struct {
+    Fixed	matrix11 B32;
+    Fixed	matrix12 B32;
+    Fixed	matrix13 B32;
+    Fixed	matrix21 B32;
+    Fixed	matrix22 B32;
+    Fixed	matrix23 B32;
+    Fixed	matrix31 B32;
+    Fixed	matrix32 B32;
+    Fixed	matrix33 B32;
+} xRenderTransform;
+
+#define sz_xRenderTransform 36
+
+typedef struct {
+    CARD8		reqType;
+    CARD8		renderReqType;
+    CARD16		length B16;
+    Picture		picture B32;
+    xRenderTransform	transform;
+} xRenderSetPictureTransformReq;
+
+#define sz_xRenderSetPictureTransformReq	    44
+
+typedef struct {
+    CARD8		reqType;
+    CARD8		renderReqType;
+    CARD16		length B16;
+    Drawable		drawable B32;
+} xRenderQueryFiltersReq;
+
+#define sz_xRenderQueryFiltersReq		    8
+
+typedef struct {
+    BYTE    type;   /* X_Reply */
+    BYTE    pad1;
+    CARD16  sequenceNumber B16;
+    CARD32  length B32;
+    CARD32  numAliases B32;	/* LISTofCARD16 */
+    CARD32  numFilters B32;	/* LISTofSTRING8 */
+    CARD32  pad2 B32;
+    CARD32  pad3 B32;
+    CARD32  pad4 B32;
+    CARD32  pad5 B32;
+} xRenderQueryFiltersReply;
+
+#define sz_xRenderQueryFiltersReply		    32
+
+typedef struct {
+    CARD8		reqType;
+    CARD8		renderReqType;
+    CARD16		length B16;
+    Picture		picture B32;
+    CARD16		nbytes B16; /* number of bytes in name */
+    CARD16		pad B16;
+} xRenderSetPictureFilterReq;
+
+#define sz_xRenderSetPictureFilterReq		    12
+
+/* 0.8 and higher */
+
+typedef struct {
+    Cursor		cursor B32;
+    CARD32		delay B32;
+} xAnimCursorElt;
+
+#define sz_xAnimCursorElt			    8
+
+typedef struct {
+    CARD8		reqType;
+    CARD8		renderReqType;
+    CARD16		length B16;
+    Cursor		cid B32;
+} xRenderCreateAnimCursorReq;
+
+#define sz_xRenderCreateAnimCursorReq		    8
+
+/* 0.9 and higher */
+
+typedef struct {
+    CARD8		reqType;
+    CARD8		renderReqType;
+    CARD16		length B16;
+    Picture		picture;
+    INT16		xOff B16;
+    INT16		yOff B16;
+} xRenderAddTrapsReq;
+
+#define sz_xRenderAddTrapsReq			    12
+
+/* 0.10 and higher */
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	renderReqType;
+    CARD16	length B16;
+    Picture	pid B32;
+    xRenderColor color;
+} xRenderCreateSolidFillReq;
+
+#define sz_xRenderCreateSolidFillReq                 16
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	renderReqType;
+    CARD16	length B16;
+    Picture	pid B32;
+    xPointFixed p1;
+    xPointFixed p2;
+    CARD32      nStops;
+} xRenderCreateLinearGradientReq;
+
+#define sz_xRenderCreateLinearGradientReq                 28
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	renderReqType;
+    CARD16	length B16;
+    Picture	pid B32;
+    xPointFixed inner;
+    xPointFixed outer;
+    Fixed       inner_radius;
+    Fixed       outer_radius;
+    CARD32      nStops;
+} xRenderCreateRadialGradientReq;
+
+#define sz_xRenderCreateRadialGradientReq                 36
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	renderReqType;
+    CARD16	length B16;
+    Picture	pid B32;
+    xPointFixed center;
+    Fixed       angle; /* in degrees */
+    CARD32      nStops;
+} xRenderCreateConicalGradientReq;
+
+#define sz_xRenderCreateConicalGradientReq                 24
+
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#undef Picture
+#undef PictFormat
+#undef Fixed
+#undef Glyphset
+
+#endif /* _XRENDERP_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/X11/fonts/font.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/X11/fonts/font.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/X11/fonts/font.h	(revision 9233)
@@ -0,0 +1,169 @@
+/* $Xorg: font.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/* $XFree86: xc/include/fonts/font.h,v 3.4 2000/11/27 00:10:02 dawes Exp $ */
+/* $NCDXorg: @(#)font.h,v 1.7 1991/06/24 17:00:23 lemke Exp $ */
+
+#ifndef FONT_H
+#define FONT_H
+
+#ifndef BitmapFormatByteOrderMask
+#include	"fsmasks.h"
+#endif
+
+/* data structures */
+#ifndef _XTYPEDEF_FONTPTR
+typedef struct _Font *FontPtr;
+#define _XTYPEDEF_FONTPTR
+#endif
+
+typedef struct _FontInfo *FontInfoPtr;
+typedef struct _FontProp *FontPropPtr;
+typedef struct _ExtentInfo *ExtentInfoPtr;
+typedef struct _FontPathElement *FontPathElementPtr;
+
+#ifndef _XTYPEDEF_CHARINFOPTR
+typedef struct _CharInfo *CharInfoPtr;
+#define _XTYPEDEF_CHARINFOPTR
+#endif
+
+typedef struct _FontNames *FontNamesPtr;
+typedef struct _FontResolution *FontResolutionPtr;
+
+#define NullCharInfo	((CharInfoPtr) 0)
+#define NullFont	((FontPtr) 0)
+#define NullFontInfo	((FontInfoPtr) 0)
+
+ /* draw direction */
+#define LeftToRight 0
+#define RightToLeft 1
+#define BottomToTop 2
+#define TopToBottom 3
+typedef int DrawDirection;
+
+#define NO_SUCH_CHAR	-1
+
+
+#define	FontAliasType	0x1000
+
+#define	AllocError	80
+#define	StillWorking	81
+#define	FontNameAlias	82
+#define	BadFontName	83
+#define	Suspended	84
+#define	Successful	85
+#define	BadFontPath	86
+#define	BadCharRange	87
+#define	BadFontFormat	88
+#define	FPEResetFailed	89	/* for when an FPE reset won't work */
+
+/* OpenFont flags */
+#define FontLoadInfo	0x0001
+#define FontLoadProps	0x0002
+#define FontLoadMetrics	0x0004
+#define FontLoadBitmaps	0x0008
+#define FontLoadAll	0x000f
+#define	FontOpenSync	0x0010
+#define FontReopen	0x0020
+
+/* Query flags */
+#define	LoadAll		0x1
+#define	FinishRamge	0x2
+#define       EightBitFont    0x4
+#define       SixteenBitFont  0x8
+
+/* Glyph Caching Modes */
+#define CACHING_OFF 0
+#define CACHE_16_BIT_GLYPHS 1
+#define CACHE_ALL_GLYPHS 2
+#define DEFAULT_GLYPH_CACHING_MODE CACHE_16_BIT_GLYPHS
+extern int glyphCachingMode;
+
+struct _Client;
+
+extern int StartListFontsWithInfo(
+    struct _Client * /*client*/,
+    int /*length*/,
+    unsigned char * /*pattern*/,
+    int /*max_names*/
+);
+
+extern FontNamesPtr MakeFontNamesRecord(
+    unsigned /* size */
+);
+
+extern void FreeFontNames(
+    FontNamesPtr /* pFN*/
+);
+
+extern int  AddFontNamesName(
+    FontNamesPtr /* names */,
+    char * /* name */,
+    int /* length */
+);
+
+#if 0 /* unused */
+extern int  FontToFSError();
+extern FontResolutionPtr GetClientResolution();
+#endif
+
+typedef struct _FontPatternCache    *FontPatternCachePtr;
+
+extern FontPatternCachePtr  MakeFontPatternCache (
+    void
+);
+
+extern void		    FreeFontPatternCache (
+    FontPatternCachePtr /* cache */
+);
+
+extern void		    EmptyFontPatternCache (
+    FontPatternCachePtr /* cache */
+);
+
+extern void		    CacheFontPattern (
+    FontPatternCachePtr /* cache */,
+    char * /* pattern */,
+    int /* patlen */,
+    FontPtr /* pFont */
+);
+extern FontResolutionPtr GetClientResolutions(
+    int * /* num */
+);
+
+extern FontPtr		    FindCachedFontPattern (
+    FontPatternCachePtr /* cache */,
+    char * /* pattern */,
+    int /* patlen */
+);
+
+extern void		    RemoveCachedFontPattern (
+    FontPatternCachePtr /* cache */,
+    FontPtr /* pFont */
+);
+
+typedef enum {
+    Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit
+}           FontEncoding;
+
+#endif				/* FONT_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/X11/fonts/fontproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/X11/fonts/fontproto.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/X11/fonts/fontproto.h	(revision 9233)
@@ -0,0 +1,93 @@
+/* $XFree86: xc/include/fonts/fontproto.h,v 1.2 1999/09/04 09:14:08 dawes Exp $ */
+
+/***********************************************************
+
+Copyright (c) 1999  The XFree86 Project Inc.
+
+All Rights Reserved.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The XFree86 Project
+Inc. shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from The XFree86 Project Inc..
+
+*/
+#ifndef _FONTPROTO_H
+#define _FONTPROTO_H
+
+/* Externally provided functions required by libXfont */
+
+extern int RegisterFPEFunctions ( NameCheckFunc name_func, 
+				  InitFpeFunc init_func, 
+				  FreeFpeFunc free_func, 
+				  ResetFpeFunc reset_func, 
+				  OpenFontFunc open_func, 
+				  CloseFontFunc close_func, 
+				  ListFontsFunc list_func, 
+				  StartLfwiFunc start_lfwi_func, 
+				  NextLfwiFunc next_lfwi_func, 
+				  WakeupFpeFunc wakeup_func, 
+				  ClientDiedFunc client_died, 
+				  LoadGlyphsFunc load_glyphs, 
+				  StartLaFunc start_list_alias_func, 
+				  NextLaFunc next_list_alias_func, 
+				  SetPathFunc set_path_func);
+
+extern int GetDefaultPointSize ( void );
+
+extern int init_fs_handlers ( FontPathElementPtr fpe, 
+			      BlockHandlerProcPtr block_handler);
+extern void remove_fs_handlers ( FontPathElementPtr fpe, 
+				 BlockHandlerProcPtr block_handler, 
+				 Bool all );
+
+extern int client_auth_generation ( ClientPtr client );
+
+#ifndef ___CLIENTSIGNAL_DEFINED___
+#define ___CLIENTSIGNAL_DEFINED___
+extern Bool ClientSignal ( ClientPtr client );
+#endif /* ___CLIENTSIGNAL_DEFINED___ */
+
+extern void DeleteFontClientID ( Font id );
+extern Font GetNewFontClientID ( void );
+extern int StoreFontClientFont ( FontPtr pfont, Font id );
+extern void FontFileRegisterFpeFunctions ( void );
+extern void FontFileCheckRegisterFpeFunctions ( void );
+
+extern Bool XpClientIsBitmapClient ( ClientPtr client );
+extern Bool XpClientIsPrintClient( ClientPtr client, FontPathElementPtr fpe );
+extern void PrinterFontRegisterFpeFunctions ( void );
+
+extern void fs_register_fpe_functions ( void );
+extern void check_fs_register_fpe_functions ( void );
+
+/* util/private.c */
+extern FontPtr  CreateFontRec (void);
+extern void  DestroyFontRec (FontPtr font);
+extern Bool     _FontSetNewPrivate (FontPtr        /* pFont */,
+				    int            /* n */,
+				    pointer        /* ptr */);
+extern int      AllocateFontPrivateIndex (void);
+extern void ResetFontPrivateIndex (void);
+
+/* Type1/t1funcs.c */
+extern void Type1RegisterFontFileFunctions(void);
+extern void CIDRegisterFontFileFunctions(void);
+
+/* Speedo/spfuncs.c */
+extern void SpeedoRegisterFontFileFunctions(void);
+
+/* FreeType/ftfuncs.c */
+extern void FreeTypeRegisterFontFileFunctions(void);
+
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/X11/fonts/fontstruct.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/X11/fonts/fontstruct.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/X11/fonts/fontstruct.h	(revision 9233)
@@ -0,0 +1,295 @@
+/* $Xorg: fontstruct.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/* $XFree86: xc/include/fonts/fontstruct.h,v 3.3 1999/08/21 13:47:34 dawes Exp $ */
+
+#ifndef FONTSTR_H
+#define FONTSTR_H
+
+#include <X11/Xproto.h>
+#include "font.h"
+#include <X11/Xfuncproto.h>
+#include <X11/Xdefs.h>
+
+/*
+ * This version of the server font data strucutre is only for describing
+ * the in memory data structure. The file structure is not necessarily a
+ * copy of this. That is up to the compiler and the OS layer font loading
+ * machinery.
+ */
+
+#define GLYPHPADOPTIONS 4	/* 1, 2, 4, or 8 */
+
+typedef struct _FontProp {
+    long        name;
+    long        value;		/* assumes ATOM is not larger than INT32 */
+}           FontPropRec;
+
+typedef struct _FontResolution {
+    unsigned short x_resolution;
+    unsigned short y_resolution;
+    unsigned short point_size;
+}           FontResolutionRec;
+
+typedef struct _ExtentInfo {
+    DrawDirection drawDirection;
+    int         fontAscent;
+    int         fontDescent;
+    int         overallAscent;
+    int         overallDescent;
+    int         overallWidth;
+    int         overallLeft;
+    int         overallRight;
+}           ExtentInfoRec;
+
+typedef struct _CharInfo {
+    xCharInfo   metrics;	/* info preformatted for Queries */
+    char       *bits;		/* pointer to glyph image */
+}           CharInfoRec;
+
+/*
+ * Font is created at font load time. It is specific to a single encoding.
+ * e.g. not all of the glyphs in a font may be part of a single encoding.
+ */
+
+typedef struct _FontInfo {
+    unsigned short firstCol;
+    unsigned short lastCol;
+    unsigned short firstRow;
+    unsigned short lastRow;
+    unsigned short defaultCh;
+    unsigned int noOverlap:1;
+    unsigned int terminalFont:1;
+    unsigned int constantMetrics:1;
+    unsigned int constantWidth:1;
+    unsigned int inkInside:1;
+    unsigned int inkMetrics:1;
+    unsigned int allExist:1;
+    unsigned int drawDirection:2;
+    unsigned int cachable:1;
+    unsigned int anamorphic:1;
+    short       maxOverlap;
+    short       pad;
+    xCharInfo   maxbounds;
+    xCharInfo   minbounds;
+    xCharInfo   ink_maxbounds;
+    xCharInfo   ink_minbounds;
+    short       fontAscent;
+    short       fontDescent;
+    int         nprops;
+    FontPropPtr props;
+    char       *isStringProp;
+}           FontInfoRec;
+
+typedef struct _Font {
+    int         refcnt;
+    FontInfoRec info;
+    char        bit;
+    char        byte;
+    char        glyph;
+    char        scan;
+    fsBitmapFormat format;
+    int         (*get_glyphs) (FontPtr         /* font */,
+			       unsigned long   /* count */,
+			       unsigned char * /* chars */,
+			       FontEncoding    /* encoding */,
+			       unsigned long * /* count */,
+			       CharInfoPtr *   /* glyphs */);
+    int         (*get_metrics) (FontPtr         /* font */,
+				unsigned long   /* count */,
+				unsigned char * /* chars */,
+				FontEncoding    /* encoding */,
+				unsigned long * /* count */,
+				xCharInfo **    /* glyphs */);
+    void        (*unload_font) (FontPtr         /* font */);
+    void        (*unload_glyphs) (FontPtr         /* font */);
+    FontPathElementPtr fpe;
+    pointer     svrPrivate;
+    pointer     fontPrivate;
+    pointer     fpePrivate;
+    int		maxPrivate;
+    pointer	*devPrivates;
+}           FontRec;
+
+#define FontGetPrivate(pFont,n) ((n) > (pFont)->maxPrivate ? (pointer) 0 : \
+			     (pFont)->devPrivates[n])
+
+#define FontSetPrivate(pFont,n,ptr) ((n) > (pFont)->maxPrivate ? \
+			_FontSetNewPrivate (pFont, n, ptr) : \
+			((((pFont)->devPrivates[n] = (ptr)) != 0) || TRUE))
+
+typedef struct _FontNames {
+    int         nnames;
+    int         size;
+    int        *length;
+    char      **names;
+}           FontNamesRec;
+
+/* External view of font paths */
+typedef struct _FontPathElement {
+    int         name_length;
+    char       *name;
+    int         type;
+    int         refcount;
+    pointer     private;
+}           FontPathElementRec;
+
+typedef Bool (*NameCheckFunc) (char *name);
+typedef int (*InitFpeFunc) (FontPathElementPtr fpe);
+typedef int (*FreeFpeFunc) (FontPathElementPtr fpe);
+typedef int (*ResetFpeFunc) (FontPathElementPtr fpe);
+typedef int (*OpenFontFunc) ( pointer client,
+			      FontPathElementPtr fpe,
+			      Mask flags,
+			      char* name,
+			      int namelen,
+			      fsBitmapFormat format,
+			      fsBitmapFormatMask fmask,
+			      XID id,
+			      FontPtr* pFont,
+			      char** aliasName,
+			      FontPtr non_cachable_font);
+typedef void (*CloseFontFunc) (FontPathElementPtr fpe, FontPtr pFont);
+typedef int (*ListFontsFunc) (pointer client,
+			      FontPathElementPtr fpe,
+			      char* pat,
+			      int len,
+			      int max,
+			      FontNamesPtr names);
+
+typedef int (*StartLfwiFunc) (pointer client,
+			      FontPathElementPtr fpe,
+			      char* pat,
+			      int len,
+			      int max,
+			      pointer* privatep);
+
+typedef int (*NextLfwiFunc) (pointer client,
+			     FontPathElementPtr fpe,
+			     char** name,
+			     int* namelen,
+			     FontInfoPtr* info,
+			     int* numFonts,
+			     pointer private);
+
+typedef int (*WakeupFpeFunc) (FontPathElementPtr fpe,
+			      unsigned long* LastSelectMask);
+
+typedef void (*ClientDiedFunc) (pointer client,
+			       FontPathElementPtr fpe);
+
+typedef int (*LoadGlyphsFunc) (pointer client,
+			       FontPtr pfont,
+			       Bool range_flag,
+			       unsigned int nchars,
+			       int item_size,
+			       unsigned char* data);
+
+typedef int (*StartLaFunc) (pointer client,
+			    FontPathElementPtr fpe,
+			    char* pat,
+			    int len,
+			    int max,
+			    pointer* privatep);
+
+typedef int (*NextLaFunc) (pointer client,
+			   FontPathElementPtr fpe,
+			   char** namep,
+			   int* namelenp,
+			   char** resolvedp,
+			   int* resolvedlenp,
+			   pointer private);
+
+typedef void (*SetPathFunc)(void);
+
+typedef struct _FPEFunctions {
+    NameCheckFunc       name_check;
+    InitFpeFunc 	init_fpe;
+    ResetFpeFunc	reset_fpe;
+    FreeFpeFunc         free_fpe;
+    OpenFontFunc        open_font;
+    CloseFontFunc       close_font;
+    ListFontsFunc       list_fonts;
+    StartLaFunc         start_list_fonts_and_aliases;
+    NextLaFunc          list_next_font_or_alias;
+    StartLfwiFunc       start_list_fonts_with_info;
+    NextLfwiFunc        list_next_font_with_info;
+    WakeupFpeFunc       wakeup_fpe;
+    ClientDiedFunc 	client_died;
+		/* for load_glyphs, range_flag = 0 ->
+			nchars = # of characters in data
+			item_size = bytes/char
+			data = list of characters
+		   range_flag = 1 ->
+			nchars = # of fsChar2b's in data
+			item_size is ignored
+			data = list of fsChar2b's */
+    LoadGlyphsFunc	load_glyphs;
+    SetPathFunc		set_path_hook;
+} FPEFunctionsRec, FPEFunctions;
+
+/*
+ * Various macros for computing values based on contents of
+ * the above structures
+ */
+
+#define	GLYPHWIDTHPIXELS(pci) \
+	((pci)->metrics.rightSideBearing - (pci)->metrics.leftSideBearing)
+
+#define	GLYPHHEIGHTPIXELS(pci) \
+ 	((pci)->metrics.ascent + (pci)->metrics.descent)
+
+#define	GLYPHWIDTHBYTES(pci)	(((GLYPHWIDTHPIXELS(pci))+7) >> 3)
+
+#define GLYPHWIDTHPADDED(bc)	(((bc)+7) & ~0x7)
+
+#define BYTES_PER_ROW(bits, nbytes) \
+	((nbytes) == 1 ? (((bits)+7)>>3)	/* pad to 1 byte */ \
+	:(nbytes) == 2 ? ((((bits)+15)>>3)&~1)	/* pad to 2 bytes */ \
+	:(nbytes) == 4 ? ((((bits)+31)>>3)&~3)	/* pad to 4 bytes */ \
+	:(nbytes) == 8 ? ((((bits)+63)>>3)&~7)	/* pad to 8 bytes */ \
+	: 0)
+
+#define BYTES_FOR_GLYPH(ci,pad)	(GLYPHHEIGHTPIXELS(ci) * \
+				 BYTES_PER_ROW(GLYPHWIDTHPIXELS(ci),pad))
+/*
+ * Macros for computing different bounding boxes for fonts; from
+ * the font protocol
+ */
+
+#define FONT_MAX_ASCENT(pi)	((pi)->fontAscent > (pi)->ink_maxbounds.ascent ? \
+			    (pi)->fontAscent : (pi)->ink_maxbounds.ascent)
+#define FONT_MAX_DESCENT(pi)	((pi)->fontDescent > (pi)->ink_maxbounds.descent ? \
+			    (pi)->fontDescent : (pi)->ink_maxbounds.descent)
+#define FONT_MAX_HEIGHT(pi)	(FONT_MAX_ASCENT(pi) + FONT_MAX_DESCENT(pi))
+#define FONT_MIN_LEFT(pi)	((pi)->ink_minbounds.leftSideBearing < 0 ? \
+			    (pi)->ink_minbounds.leftSideBearing : 0)
+#define FONT_MAX_RIGHT(pi)	((pi)->ink_maxbounds.rightSideBearing > \
+				(pi)->ink_maxbounds.characterWidth ? \
+			    (pi)->ink_maxbounds.rightSideBearing : \
+				(pi)->ink_maxbounds.characterWidth)
+#define FONT_MAX_WIDTH(pi)	(FONT_MAX_RIGHT(pi) - FONT_MIN_LEFT(pi))
+
+#include "fontproto.h"
+
+#endif				/* FONTSTR_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/X11/fonts/fsmasks.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/X11/fonts/fsmasks.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/X11/fonts/fsmasks.h	(revision 9233)
@@ -0,0 +1,98 @@
+/* $Xorg: fsmasks.h,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */
+/*
+ * Copyright 1990, 1991 Network Computing Devices;
+ * Portions Copyright 1987 by Digital Equipment Corporation 
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of Network Computing Devices or Digital
+ * not be used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.
+ * Network Computing Devices and Digital make no representations 
+ * about the suitability of this software for any purpose.  It is provided 
+ * "as is" without express or implied warranty.
+ *
+ * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES
+ * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+/*
+
+Portions Copyright 1987, 1994, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+
+/*
+ * masks & values used by the font lib and the font server
+ */
+
+#ifndef _FSMASKS_H_
+#define _FSMASKS_H_
+
+#include <X11/Xmd.h>
+
+/* font format macros */
+#define BitmapFormatByteOrderMask       (1L << 0)
+#define BitmapFormatBitOrderMask        (1L << 1)
+#define BitmapFormatImageRectMask       (3L << 2)
+#define BitmapFormatScanlinePadMask     (3L << 8)
+#define BitmapFormatScanlineUnitMask    (3L << 12)
+
+#define BitmapFormatByteOrderLSB        (0)
+#define BitmapFormatByteOrderMSB        (1L << 0)
+#define BitmapFormatBitOrderLSB         (0)
+#define BitmapFormatBitOrderMSB         (1L << 1)
+
+#define BitmapFormatImageRectMin        (0L << 2)
+#define BitmapFormatImageRectMaxWidth   (1L << 2)
+#define BitmapFormatImageRectMax        (2L << 2)
+
+#define BitmapFormatScanlinePad8        (0L << 8)
+#define BitmapFormatScanlinePad16       (1L << 8)
+#define BitmapFormatScanlinePad32       (2L << 8)
+#define BitmapFormatScanlinePad64       (3L << 8)
+
+#define BitmapFormatScanlineUnit8       (0L << 12)
+#define BitmapFormatScanlineUnit16      (1L << 12)
+#define BitmapFormatScanlineUnit32      (2L << 12)
+#define BitmapFormatScanlineUnit64      (3L << 12)
+
+#define BitmapFormatMaskByte            (1L << 0)
+#define BitmapFormatMaskBit             (1L << 1)
+#define BitmapFormatMaskImageRectangle  (1L << 2)
+#define BitmapFormatMaskScanLinePad     (1L << 3)
+#define BitmapFormatMaskScanLineUnit    (1L << 4)
+
+typedef CARD32 fsBitmapFormat;
+typedef CARD32 fsBitmapFormatMask;
+
+#endif	/* _FSMASKS_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/pciaccess.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/pciaccess.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/pciaccess.h	(revision 9233)
@@ -0,0 +1,438 @@
+/*
+ * (C) Copyright IBM Corporation 2006
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+ * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file pciaccess.h
+ * 
+ * \author Ian Romanick <idr@us.ibm.com>
+ */
+
+#ifndef PCIACCESS_H
+#define PCIACCESS_H
+
+#include <inttypes.h>
+
+#if __GNUC__ >= 3
+#define __deprecated __attribute__((deprecated))
+#else
+#define __deprecated 
+#endif
+
+typedef uint64_t pciaddr_t;
+
+struct pci_device;
+struct pci_device_iterator;
+struct pci_id_match;
+struct pci_slot_match;
+
+int pci_device_read_rom(struct pci_device *dev, void *buffer);
+
+int  __deprecated pci_device_map_region(struct pci_device *dev,
+    unsigned region, int write_enable);
+
+int __deprecated pci_device_unmap_region(struct pci_device *dev,
+    unsigned region);
+
+int pci_device_map_range(struct pci_device *dev, pciaddr_t base,
+    pciaddr_t size, unsigned map_flags, void **addr);
+
+int pci_device_unmap_range(struct pci_device *dev, void *memory,
+    pciaddr_t size);
+
+int __deprecated pci_device_map_memory_range(struct pci_device *dev,
+    pciaddr_t base, pciaddr_t size, int write_enable, void **addr);
+
+int __deprecated pci_device_unmap_memory_range(struct pci_device *dev,
+    void *memory, pciaddr_t size);
+
+int pci_device_probe(struct pci_device *dev);
+
+const struct pci_agp_info *pci_device_get_agp_info(struct pci_device *dev);
+
+const struct pci_bridge_info *pci_device_get_bridge_info(
+    struct pci_device *dev);
+
+const struct pci_pcmcia_bridge_info *pci_device_get_pcmcia_bridge_info(
+    struct pci_device *dev);
+
+int pci_device_get_bridge_buses(struct pci_device *dev, int *primary_bus,
+    int *secondary_bus, int *subordinate_bus);
+
+int pci_system_init(void);
+
+void pci_system_cleanup(void);
+
+struct pci_device_iterator *pci_slot_match_iterator_create(
+    const struct pci_slot_match *match);
+
+struct pci_device_iterator *pci_id_match_iterator_create(
+    const struct pci_id_match *match);
+
+void pci_iterator_destroy(struct pci_device_iterator *iter);
+
+struct pci_device *pci_device_next(struct pci_device_iterator *iter);
+
+struct pci_device *pci_device_find_by_slot(uint32_t domain, uint32_t bus,
+    uint32_t dev, uint32_t func);
+
+void pci_get_strings(const struct pci_id_match *m,
+    const char **device_name, const char **vendor_name,
+    const char **subdevice_name, const char **subvendor_name);
+const char *pci_device_get_device_name(const struct pci_device *dev);
+const char *pci_device_get_subdevice_name(const struct pci_device *dev);
+const char *pci_device_get_vendor_name(const struct pci_device *dev);
+const char *pci_device_get_subvendor_name(const struct pci_device *dev);
+
+int pci_device_cfg_read    (struct pci_device *dev, void *data,
+    pciaddr_t offset, pciaddr_t size, pciaddr_t *bytes_read);
+int pci_device_cfg_read_u8 (struct pci_device *dev, uint8_t  *data,
+    pciaddr_t offset);
+int pci_device_cfg_read_u16(struct pci_device *dev, uint16_t *data,
+    pciaddr_t offset);
+int pci_device_cfg_read_u32(struct pci_device *dev, uint32_t *data,
+    pciaddr_t offset);
+
+int pci_device_cfg_write    (struct pci_device *dev, const void *data,
+    pciaddr_t offset, pciaddr_t size, pciaddr_t *bytes_written);
+int pci_device_cfg_write_u8 (struct pci_device *dev, uint8_t  data,
+    pciaddr_t offset);
+int pci_device_cfg_write_u16(struct pci_device *dev, uint16_t data,
+    pciaddr_t offset);
+int pci_device_cfg_write_u32(struct pci_device *dev, uint32_t data,
+    pciaddr_t offset);
+int pci_device_cfg_write_bits(struct pci_device *dev, uint32_t mask,
+    uint32_t data, pciaddr_t offset);
+
+/**
+ * \name Mapping flags passed to \c pci_device_map_range
+ */
+/*@{*/
+#define PCI_DEV_MAP_FLAG_WRITABLE       (1U<<0)
+#define PCI_DEV_MAP_FLAG_WRITE_COMBINE  (1U<<1)
+#define PCI_DEV_MAP_FLAG_CACHABLE       (1U<<2)
+/*@}*/
+
+
+#define PCI_MATCH_ANY  (~0)
+
+/**
+ * Compare two PCI ID values (either vendor or device).  This is used
+ * internally to compare the fields of \c pci_id_match to the fields of
+ * \c pci_device.
+ */
+#define PCI_ID_COMPARE(a, b) \
+    (((a) == PCI_MATCH_ANY) || ((a) == (b)))
+
+/**
+ */
+struct pci_id_match {
+    /**
+     * \name Device / vendor matching controls
+     * 
+     * Control the search based on the device, vendor, subdevice, or subvendor
+     * IDs.  Setting any of these fields to \c PCI_MATCH_ANY will cause the
+     * field to not be used in the comparison.
+     */
+    /*@{*/
+    uint32_t    vendor_id;
+    uint32_t    device_id;
+    uint32_t    subvendor_id;
+    uint32_t    subdevice_id;
+    /*@}*/
+
+
+    /**
+     * \name Device class matching controls
+     * 
+     */
+    /*@{*/
+    uint32_t    device_class;
+    uint32_t    device_class_mask;
+    /*@}*/
+
+    intptr_t    match_data;
+};
+
+
+/**
+ */
+struct pci_slot_match {
+    /**
+     * \name Device slot matching controls
+     *
+     * Control the search based on the domain, bus, slot, and function of
+     * the device.  Setting any of these fields to \c PCI_MATCH_ANY will cause
+     * the field to not be used in the comparison.
+     */
+    /*@{*/
+    uint32_t    domain;
+    uint32_t    bus;
+    uint32_t    dev;
+    uint32_t    func;
+    /*@}*/
+
+    intptr_t    match_data;
+};
+
+/**
+ * BAR descriptor for a PCI device.
+ */
+struct pci_mem_region {
+    /**
+     * When the region is mapped, this is the pointer to the memory.
+     *
+     * This field is \b only set when the deprecated \c pci_device_map_region
+     * interface is used.  Use \c pci_device_map_range instead.
+     *
+     * \deprecated
+     */
+    void *memory;
+
+
+    /**
+     * Base physical address of the region within its bus / domain.
+     *
+     * \warning
+     * This address is really only useful to other devices in the same
+     * domain.  It's probably \b not the address applications will ever
+     * use.
+     * 
+     * \warning
+     * Most (all?) platform back-ends leave this field unset.
+     */
+    pciaddr_t bus_addr;
+
+
+    /**
+     * Base physical address of the region from the CPU's point of view.
+     * 
+     * This address is typically passed to \c pci_device_map_range to create
+     * a mapping of the region to the CPU's virtual address space.
+     */
+    pciaddr_t base_addr;
+
+
+    /**
+     * Size, in bytes, of the region.
+     */
+    pciaddr_t size;
+
+
+    /**
+     * Is the region I/O ports or memory?
+     */
+    unsigned is_IO:1;
+
+    /**
+     * Is the memory region prefetchable?
+     *
+     * \note
+     * This can only be set if \c is_IO is not set.
+     */
+    unsigned is_prefetchable:1;
+
+
+    /**
+     * Is the memory at a 64-bit address?
+     *
+     * \note
+     * This can only be set if \c is_IO is not set.
+     */
+    unsigned is_64:1;
+};
+
+
+/**
+ * PCI device.
+ *
+ * Contains all of the information about a particular PCI device.
+ */
+struct pci_device {
+    /**
+     * \name Device bus identification.
+     *
+     * Complete bus identification, including domain, of the device.  On
+     * platforms that do not support PCI domains (e.g., 32-bit x86 hardware),
+     * the domain will always be zero.
+     */
+    /*@{*/
+    uint16_t    domain;
+    uint8_t     bus;
+    uint8_t     dev;
+    uint8_t     func;
+    /*@}*/
+
+
+    /**
+     * \name Vendor / device ID
+     *
+     * The vendor ID, device ID, and sub-IDs for the device.
+     */
+    /*@{*/
+    uint16_t    vendor_id;
+    uint16_t    device_id;
+    uint16_t    subvendor_id;
+    uint16_t    subdevice_id;
+    /*@}*/
+
+    /**
+     * Device's class, subclass, and programming interface packed into a
+     * single 32-bit value.  The class is at bits [23:16], subclass is at
+     * bits [15:8], and programming interface is at [7:0].
+     */
+    uint32_t    device_class;
+
+
+    /**
+     * Device revision number, as read from the configuration header.
+     */
+    uint8_t     revision;
+
+
+    /**
+     * BAR descriptors for the device.
+     */
+    struct pci_mem_region regions[6];
+
+
+    /**
+     * Size, in bytes, of the device's expansion ROM.
+     */
+    pciaddr_t   rom_size;
+
+
+    /**
+     * IRQ associated with the device.  If there is no IRQ, this value will
+     * be -1.
+     */
+    int irq;
+
+
+    /**
+     * Storage for user data.  Users of the library can store arbitrary
+     * data in this pointer.  The library will not use it for any purpose.
+     * It is the user's responsability to free this memory before destroying
+     * the \c pci_device structure.
+     */
+    intptr_t user_data;
+};
+
+
+/**
+ * Description of the AGP capability of the device.
+ *
+ * \sa pci_device_get_agp_info
+ */
+struct pci_agp_info {
+    /**
+     * Offset of the AGP registers in the devices configuration register
+     * space.  This is generally used so that the offset of the AGP command
+     * register can be determined.
+     */
+    unsigned    config_offset;
+
+
+    /**
+     * \name AGP major / minor version.
+     */
+    /*@{*/
+    uint8_t	major_version;
+    uint8_t     minor_version;
+    /*@}*/
+
+    /**
+     * Logical OR of the supported AGP rates.  For example, a value of 0x07
+     * means that the device can support 1x, 2x, and 4x.  A value of 0x0c
+     * means that the device can support 8x and 4x.
+     */
+    uint8_t    rates;
+
+    unsigned int    fast_writes:1;  /**< Are fast-writes supported? */
+    unsigned int    addr64:1;
+    unsigned int    htrans:1;
+    unsigned int    gart64:1;
+    unsigned int    coherent:1;
+    unsigned int    sideband:1;     /**< Is side-band addressing supported? */
+    unsigned int    isochronus:1;
+
+    uint8_t    async_req_size;
+    uint8_t    calibration_cycle_timing;
+    uint8_t    max_requests;
+};
+
+/**
+ * Description of a PCI-to-PCI bridge device.
+ *
+ * \sa pci_device_get_bridge_info
+ */
+struct pci_bridge_info {
+    uint8_t    primary_bus;
+    uint8_t    secondary_bus;
+    uint8_t    subordinate_bus;
+    uint8_t    secondary_latency_timer;
+
+    uint8_t     io_type;
+    uint8_t     mem_type;
+    uint8_t     prefetch_mem_type;
+
+    uint16_t    secondary_status;
+    uint16_t    bridge_control;
+
+    uint32_t    io_base;
+    uint32_t    io_limit;
+
+    uint32_t    mem_base;
+    uint32_t    mem_limit;
+
+    uint64_t    prefetch_mem_base;
+    uint64_t    prefetch_mem_limit;
+};
+
+/**
+ * Description of a PCI-to-PCMCIA bridge device.
+ *
+ * \sa pci_device_get_pcmcia_bridge_info
+ */
+struct pci_pcmcia_bridge_info {
+    uint8_t    primary_bus;
+    uint8_t    card_bus;
+    uint8_t    subordinate_bus;
+    uint8_t    cardbus_latency_timer;
+    
+    uint16_t    secondary_status;
+    uint16_t    bridge_control;
+
+    struct {
+	uint32_t    base;
+	uint32_t    limit;
+    } io[2];
+
+    struct {
+	uint32_t    base;
+	uint32_t    limit;
+    } mem[2];
+
+};
+
+#endif /* PCIACCESS_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/pixman-version.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/pixman-version.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/pixman-version.h	(revision 9233)
@@ -0,0 +1,50 @@
+/*
+ * Copyright © 2008 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author: Carl D. Worth <cworth@cworth.org>
+ */
+
+#ifndef PIXMAN_VERSION_H__
+#define PIXMAN_VERSION_H__
+
+#ifndef PIXMAN_H__
+#  error pixman-version.h should only be included by pixman.h
+#endif
+
+#define PIXMAN_VERSION_MAJOR 0
+#define PIXMAN_VERSION_MINOR 10
+#define PIXMAN_VERSION_MICRO 0
+
+#define PIXMAN_VERSION_STRING "0.10.0"
+
+#define PIXMAN_VERSION_ENCODE(major, minor, micro) (	\
+	  ((major) * 10000)				\
+	+ ((minor) *   100)				\
+	+ ((micro) *     1))
+
+#define PIXMAN_VERSION PIXMAN_VERSION_ENCODE(	\
+	PIXMAN_VERSION_MAJOR,			\
+	PIXMAN_VERSION_MINOR,			\
+	PIXMAN_VERSION_MICRO)
+
+#endif /* PIXMAN_VERSION_H__ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/pixman.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/pixman.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/pixman.h	(revision 9233)
@@ -0,0 +1,731 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/*
+ * Copyright © 1998, 2004 Keith Packard
+ * Copyright   2007 Red Hat, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Keith Packard makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef PIXMAN_H__
+#define PIXMAN_H__
+
+#include <pixman-version.h>
+
+/*
+ * Standard integers
+ */
+#if defined (__SVR4) && defined (__sun)
+#  include <sys/int_types.h>
+#  include <stdint.h>
+#elif defined (__OpenBSD__)
+#  include <inttypes.h>
+#elif defined (_MSC_VER)
+typedef __int8 int8_t;
+typedef unsigned __int8 uint8_t;
+typedef __int16 int16_t;
+typedef unsigned __int16 uint16_t;
+typedef __int32 int32_t;
+typedef unsigned __int32 uint32_t;
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#else
+#  include <stdint.h>
+#endif
+
+/* GCC visibility */
+#if defined(__GNUC__) && __GNUC__ >= 4
+#define PIXMAN_EXPORT __attribute__ ((visibility("default")))
+#else
+#define PIXMAN_EXPORT
+#endif
+
+/*
+ * Boolean
+ */
+typedef int pixman_bool_t;
+
+/*
+ * Fixpoint numbers
+ */
+typedef int64_t			pixman_fixed_32_32_t;
+typedef pixman_fixed_32_32_t	pixman_fixed_48_16_t;
+typedef uint32_t		pixman_fixed_1_31_t;
+typedef uint32_t		pixman_fixed_1_16_t;
+typedef int32_t			pixman_fixed_16_16_t;
+typedef pixman_fixed_16_16_t	pixman_fixed_t;
+
+#define pixman_fixed_e			((pixman_fixed_t) 1)
+#define pixman_fixed_1			(pixman_int_to_fixed(1))
+#define pixman_fixed_1_minus_e		(pixman_fixed_1 - pixman_fixed_e)
+#define pixman_fixed_to_int(f)		((int) ((f) >> 16))
+#define pixman_int_to_fixed(i)		((pixman_fixed_t) ((i) << 16))
+#define pixman_fixed_to_double(f)	(double) ((f) / (double) pixman_fixed_1)
+#define pixman_double_to_fixed(d)	((pixman_fixed_t) ((d) * 65536.0))
+#define pixman_fixed_frac(f)		((f) & pixman_fixed_1_minus_e)
+#define pixman_fixed_floor(f)		((f) & ~pixman_fixed_1_minus_e)
+#define pixman_fixed_ceil(f)		pixman_fixed_floor ((f) + pixman_fixed_1_minus_e)
+#define pixman_fixed_fraction(f)	((f) & pixman_fixed_1_minus_e)
+#define pixman_fixed_mod_2(f)		((f) & (pixman_fixed1 | pixman_fixed_1_minus_e))
+#define pixman_max_fixed_48_16		((pixman_fixed_48_16_t) 0x7fffffff)
+#define pixman_min_fixed_48_16		(-((pixman_fixed_48_16_t) 1 << 31))
+
+/*
+ * Misc structs
+ */
+typedef struct pixman_color pixman_color_t;
+typedef struct pixman_point_fixed pixman_point_fixed_t;
+typedef struct pixman_line_fixed pixman_line_fixed_t;
+typedef struct pixman_vector pixman_vector_t;
+typedef struct pixman_transform pixman_transform_t;
+
+struct pixman_color
+{
+    uint16_t	red;
+    uint16_t    green;
+    uint16_t    blue;
+    uint16_t    alpha;
+};
+
+struct pixman_point_fixed
+{
+    pixman_fixed_t	x;
+    pixman_fixed_t	y;
+};
+
+struct pixman_line_fixed
+{
+    pixman_point_fixed_t	p1, p2;
+};
+
+struct pixman_vector
+{
+    pixman_fixed_t	vector[3];
+};
+
+struct pixman_transform
+{
+    pixman_fixed_t	matrix[3][3];
+};
+
+PIXMAN_EXPORT
+pixman_bool_t pixman_transform_point_3d (pixman_transform_t *transform,
+					 pixman_vector_t    *vector);
+
+/* Don't blame me, blame XRender */
+typedef enum
+{
+    PIXMAN_REPEAT_NONE,
+    PIXMAN_REPEAT_NORMAL,
+    PIXMAN_REPEAT_PAD,
+    PIXMAN_REPEAT_REFLECT
+} pixman_repeat_t;
+
+typedef enum
+{
+    PIXMAN_FILTER_FAST,
+    PIXMAN_FILTER_GOOD,
+    PIXMAN_FILTER_BEST,
+    PIXMAN_FILTER_NEAREST,
+    PIXMAN_FILTER_BILINEAR,
+    PIXMAN_FILTER_CONVOLUTION
+} pixman_filter_t;
+
+typedef enum
+{
+    PIXMAN_OP_CLEAR			= 0x00,
+    PIXMAN_OP_SRC			= 0x01,
+    PIXMAN_OP_DST			= 0x02,
+    PIXMAN_OP_OVER			= 0x03,
+    PIXMAN_OP_OVER_REVERSE		= 0x04,
+    PIXMAN_OP_IN			= 0x05,
+    PIXMAN_OP_IN_REVERSE		= 0x06,
+    PIXMAN_OP_OUT			= 0x07,
+    PIXMAN_OP_OUT_REVERSE		= 0x08,
+    PIXMAN_OP_ATOP			= 0x09,
+    PIXMAN_OP_ATOP_REVERSE		= 0x0a,
+    PIXMAN_OP_XOR			= 0x0b,
+    PIXMAN_OP_ADD			= 0x0c,
+    PIXMAN_OP_SATURATE			= 0x0d,
+
+    PIXMAN_OP_DISJOINT_CLEAR		= 0x10,
+    PIXMAN_OP_DISJOINT_SRC		= 0x11,
+    PIXMAN_OP_DISJOINT_DST		= 0x12,
+    PIXMAN_OP_DISJOINT_OVER		= 0x13,
+    PIXMAN_OP_DISJOINT_OVER_REVERSE	= 0x14,
+    PIXMAN_OP_DISJOINT_IN		= 0x15,
+    PIXMAN_OP_DISJOINT_IN_REVERSE	= 0x16,
+    PIXMAN_OP_DISJOINT_OUT		= 0x17,
+    PIXMAN_OP_DISJOINT_OUT_REVERSE	= 0x18,
+    PIXMAN_OP_DISJOINT_ATOP		= 0x19,
+    PIXMAN_OP_DISJOINT_ATOP_REVERSE	= 0x1a,
+    PIXMAN_OP_DISJOINT_XOR		= 0x1b,
+
+    PIXMAN_OP_CONJOINT_CLEAR		= 0x20,
+    PIXMAN_OP_CONJOINT_SRC		= 0x21,
+    PIXMAN_OP_CONJOINT_DST		= 0x22,
+    PIXMAN_OP_CONJOINT_OVER		= 0x23,
+    PIXMAN_OP_CONJOINT_OVER_REVERSE	= 0x24,
+    PIXMAN_OP_CONJOINT_IN		= 0x25,
+    PIXMAN_OP_CONJOINT_IN_REVERSE	= 0x26,
+    PIXMAN_OP_CONJOINT_OUT		= 0x27,
+    PIXMAN_OP_CONJOINT_OUT_REVERSE	= 0x28,
+    PIXMAN_OP_CONJOINT_ATOP		= 0x29,
+    PIXMAN_OP_CONJOINT_ATOP_REVERSE	= 0x2a,
+    PIXMAN_OP_CONJOINT_XOR		= 0x2b,
+
+    PIXMAN_OP_NONE
+} pixman_op_t;
+
+/*
+ * Regions
+ */
+typedef struct pixman_region16_data	pixman_region16_data_t;
+typedef struct pixman_box16		pixman_box16_t;
+typedef struct pixman_rectangle16	pixman_rectangle16_t;
+typedef struct pixman_region16		pixman_region16_t;
+
+struct pixman_region16_data {
+    long		size;
+    long		numRects;
+/*  pixman_box16_t	rects[size];   in memory but not explicitly declared */
+};
+
+struct pixman_rectangle16
+{
+    int16_t x, y;
+    uint16_t width, height;
+};
+
+struct pixman_box16
+{
+    int16_t x1, y1, x2, y2;
+};
+
+struct pixman_region16
+{
+    pixman_box16_t          extents;
+    pixman_region16_data_t  *data;
+};
+
+typedef enum
+{
+    PIXMAN_REGION_OUT,
+    PIXMAN_REGION_IN,
+    PIXMAN_REGION_PART
+} pixman_region_overlap_t;
+
+PIXMAN_EXPORT
+int			pixman_version (void);
+
+PIXMAN_EXPORT
+const char*		pixman_version_string (void);
+
+/* This function exists only to make it possible to preserve the X ABI - it should
+ * go away at first opportunity.
+ */
+PIXMAN_EXPORT
+void		        pixman_region_set_static_pointers (pixman_box16_t *empty_box,
+							   pixman_region16_data_t *empty_data,
+							   pixman_region16_data_t *broken_data);
+
+/* creation/destruction */
+PIXMAN_EXPORT
+void                    pixman_region_init              (pixman_region16_t *region);
+PIXMAN_EXPORT
+void                    pixman_region_init_rect         (pixman_region16_t *region,
+							 int                x,
+							 int                y,
+							 unsigned int       width,
+							 unsigned int       height);
+PIXMAN_EXPORT
+void                    pixman_region_init_with_extents (pixman_region16_t *region,
+							 pixman_box16_t    *extents);
+PIXMAN_EXPORT
+void                    pixman_region_fini              (pixman_region16_t *region);
+
+/* manipulation */
+PIXMAN_EXPORT
+void                    pixman_region_translate  (pixman_region16_t *region,
+						  int                x,
+						  int                y);
+PIXMAN_EXPORT
+pixman_bool_t           pixman_region_copy       (pixman_region16_t *dest,
+						  pixman_region16_t *source);
+PIXMAN_EXPORT
+pixman_bool_t           pixman_region_intersect  (pixman_region16_t *newReg,
+						  pixman_region16_t *reg1,
+						  pixman_region16_t *reg2);
+PIXMAN_EXPORT
+pixman_bool_t           pixman_region_union      (pixman_region16_t *newReg,
+						  pixman_region16_t *reg1,
+						  pixman_region16_t *reg2);
+PIXMAN_EXPORT
+pixman_bool_t           pixman_region_union_rect (pixman_region16_t *dest,
+						  pixman_region16_t *source,
+						  int                x,
+						  int                y,
+						  unsigned int       width,
+						  unsigned int       height);
+PIXMAN_EXPORT
+pixman_bool_t           pixman_region_subtract   (pixman_region16_t *regD,
+						  pixman_region16_t *regM,
+						  pixman_region16_t *regS);
+PIXMAN_EXPORT
+pixman_bool_t           pixman_region_inverse    (pixman_region16_t *newReg,
+						  pixman_region16_t *reg1,
+						  pixman_box16_t    *invRect);
+PIXMAN_EXPORT
+pixman_bool_t           pixman_region_contains_point (pixman_region16_t *region,
+						      int x, int y, pixman_box16_t *box);
+PIXMAN_EXPORT
+pixman_region_overlap_t pixman_region_contains_rectangle (pixman_region16_t *pixman_region16_t,
+							  pixman_box16_t *prect);
+PIXMAN_EXPORT
+pixman_bool_t           pixman_region_not_empty (pixman_region16_t *region);
+PIXMAN_EXPORT
+pixman_box16_t *        pixman_region_extents (pixman_region16_t *region);
+PIXMAN_EXPORT
+int                     pixman_region_n_rects (pixman_region16_t *region);
+PIXMAN_EXPORT
+pixman_box16_t *        pixman_region_rectangles (pixman_region16_t *region,
+						  int		    *n_rects);
+PIXMAN_EXPORT
+pixman_bool_t		pixman_region_equal (pixman_region16_t *region1,
+					     pixman_region16_t *region2);
+PIXMAN_EXPORT
+pixman_bool_t		pixman_region_selfcheck (pixman_region16_t *region);
+PIXMAN_EXPORT
+void			pixman_region_reset (pixman_region16_t *region, pixman_box16_t *box);
+PIXMAN_EXPORT
+pixman_bool_t		pixman_region_init_rects (pixman_region16_t *region,
+						  pixman_box16_t *boxes, int count);
+
+/* Copy / Fill */
+PIXMAN_EXPORT
+pixman_bool_t pixman_blt (uint32_t *src_bits,
+			  uint32_t *dst_bits,
+			  int src_stride,
+			  int dst_stride,
+			  int src_bpp,
+			  int dst_bpp,
+			  int src_x, int src_y,
+			  int dst_x, int dst_y,
+			  int width, int height);
+PIXMAN_EXPORT
+pixman_bool_t pixman_fill (uint32_t *bits,
+			   int stride,
+			   int bpp,
+			   int x,
+			   int y,
+			   int width,
+			   int height,
+			   uint32_t _xor);
+/*
+ * Images
+ */
+typedef  union pixman_image		pixman_image_t;
+typedef struct pixman_indexed		pixman_indexed_t;
+typedef struct pixman_gradient_stop	pixman_gradient_stop_t;
+
+typedef uint32_t (* pixman_read_memory_func_t) (const void *src, int size);
+typedef void     (* pixman_write_memory_func_t) (void *dst, uint32_t value, int size);
+
+struct pixman_gradient_stop {
+    pixman_fixed_t x;
+    pixman_color_t color;
+};
+
+#define PIXMAN_MAX_INDEXED  256 /* XXX depth must be <= 8 */
+
+#if PIXMAN_MAX_INDEXED <= 256
+typedef uint8_t pixman_index_type;
+#endif
+
+struct pixman_indexed
+{
+    pixman_bool_t       color;
+    uint32_t		rgba[PIXMAN_MAX_INDEXED];
+    pixman_index_type	ent[32768];
+};
+
+/*
+ * While the protocol is generous in format support, the
+ * sample implementation allows only packed RGB and GBR
+ * representations for data to simplify software rendering,
+ */
+#define PIXMAN_FORMAT(bpp,type,a,r,g,b)	(((bpp) << 24) |  \
+					 ((type) << 16) | \
+					 ((a) << 12) |	  \
+					 ((r) << 8) |	  \
+					 ((g) << 4) |	  \
+					 ((b)))
+
+#define PIXMAN_FORMAT_BPP(f)	(((f) >> 24)       )
+#define PIXMAN_FORMAT_TYPE(f)	(((f) >> 16) & 0xff)
+#define PIXMAN_FORMAT_A(f)	(((f) >> 12) & 0x0f)
+#define PIXMAN_FORMAT_R(f)	(((f) >>  8) & 0x0f)
+#define PIXMAN_FORMAT_G(f)	(((f) >>  4) & 0x0f)
+#define PIXMAN_FORMAT_B(f)	(((f)      ) & 0x0f)
+#define PIXMAN_FORMAT_RGB(f)	(((f)      ) & 0xfff)
+#define PIXMAN_FORMAT_VIS(f)	(((f)      ) & 0xffff)
+#define PIXMAN_FORMAT_DEPTH(f)	(PIXMAN_FORMAT_A(f) +	\
+				 PIXMAN_FORMAT_R(f) +	\
+				 PIXMAN_FORMAT_G(f) +	\
+				 PIXMAN_FORMAT_B(f))
+
+#define PIXMAN_TYPE_OTHER	0
+#define PIXMAN_TYPE_A		1
+#define PIXMAN_TYPE_ARGB	2
+#define PIXMAN_TYPE_ABGR	3
+#define PIXMAN_TYPE_COLOR	4
+#define PIXMAN_TYPE_GRAY	5
+#define PIXMAN_TYPE_YUY2	6
+#define PIXMAN_TYPE_YV12	7
+
+#define PIXMAN_FORMAT_COLOR(f)	(PIXMAN_FORMAT_TYPE(f) & 2)
+
+/* 32bpp formats */
+typedef enum {
+    PIXMAN_a8r8g8b8 =	PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,8,8,8,8),
+    PIXMAN_x8r8g8b8 =	PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,8,8,8),
+    PIXMAN_a8b8g8r8 =	PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,8,8,8,8),
+    PIXMAN_x8b8g8r8 =	PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,0,8,8,8),
+    
+/* 24bpp formats */
+    PIXMAN_r8g8b8 =	PIXMAN_FORMAT(24,PIXMAN_TYPE_ARGB,0,8,8,8),
+    PIXMAN_b8g8r8 =	PIXMAN_FORMAT(24,PIXMAN_TYPE_ABGR,0,8,8,8),
+    
+/* 16bpp formats */
+    PIXMAN_r5g6b5 =	PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,0,5,6,5),
+    PIXMAN_b5g6r5 =	PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,0,5,6,5),
+    
+    PIXMAN_a1r5g5b5 =	PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,1,5,5,5),
+    PIXMAN_x1r5g5b5 =	PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,0,5,5,5),
+    PIXMAN_a1b5g5r5 =	PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,1,5,5,5),
+    PIXMAN_x1b5g5r5 =	PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,0,5,5,5),
+    PIXMAN_a4r4g4b4 =	PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,4,4,4,4),
+    PIXMAN_x4r4g4b4 =	PIXMAN_FORMAT(16,PIXMAN_TYPE_ARGB,0,4,4,4),
+    PIXMAN_a4b4g4r4 =	PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,4,4,4,4),
+    PIXMAN_x4b4g4r4 =	PIXMAN_FORMAT(16,PIXMAN_TYPE_ABGR,0,4,4,4),
+    
+/* 8bpp formats */
+    PIXMAN_a8 =		PIXMAN_FORMAT(8,PIXMAN_TYPE_A,8,0,0,0),
+    PIXMAN_r3g3b2 =	PIXMAN_FORMAT(8,PIXMAN_TYPE_ARGB,0,3,3,2),
+    PIXMAN_b2g3r3 =	PIXMAN_FORMAT(8,PIXMAN_TYPE_ABGR,0,3,3,2),
+    PIXMAN_a2r2g2b2 =	PIXMAN_FORMAT(8,PIXMAN_TYPE_ARGB,2,2,2,2),
+    PIXMAN_a2b2g2r2 =	PIXMAN_FORMAT(8,PIXMAN_TYPE_ABGR,2,2,2,2),
+    
+    PIXMAN_c8 =		PIXMAN_FORMAT(8,PIXMAN_TYPE_COLOR,0,0,0,0),
+    PIXMAN_g8 =		PIXMAN_FORMAT(8,PIXMAN_TYPE_GRAY,0,0,0,0),
+    
+    PIXMAN_x4a4 =	PIXMAN_FORMAT(8,PIXMAN_TYPE_A,4,0,0,0),
+    
+    PIXMAN_x4c4 =	PIXMAN_FORMAT(8,PIXMAN_TYPE_COLOR,0,0,0,0),
+    PIXMAN_x4g4 =	PIXMAN_FORMAT(8,PIXMAN_TYPE_GRAY,0,0,0,0),
+    
+/* 4bpp formats */
+    PIXMAN_a4 =		PIXMAN_FORMAT(4,PIXMAN_TYPE_A,4,0,0,0),
+    PIXMAN_r1g2b1 =	PIXMAN_FORMAT(4,PIXMAN_TYPE_ARGB,0,1,2,1),
+    PIXMAN_b1g2r1 =	PIXMAN_FORMAT(4,PIXMAN_TYPE_ABGR,0,1,2,1),
+    PIXMAN_a1r1g1b1 =	PIXMAN_FORMAT(4,PIXMAN_TYPE_ARGB,1,1,1,1),
+    PIXMAN_a1b1g1r1 =	PIXMAN_FORMAT(4,PIXMAN_TYPE_ABGR,1,1,1,1),
+    
+    PIXMAN_c4 =		PIXMAN_FORMAT(4,PIXMAN_TYPE_COLOR,0,0,0,0),
+    PIXMAN_g4 =		PIXMAN_FORMAT(4,PIXMAN_TYPE_GRAY,0,0,0,0),
+    
+/* 1bpp formats */
+    PIXMAN_a1 =		PIXMAN_FORMAT(1,PIXMAN_TYPE_A,1,0,0,0),
+    
+    PIXMAN_g1 =		PIXMAN_FORMAT(1,PIXMAN_TYPE_GRAY,0,0,0,0),
+
+/* YUV formats */
+    PIXMAN_yuy2 =	PIXMAN_FORMAT(16,PIXMAN_TYPE_YUY2,0,0,0,0),
+    PIXMAN_yv12 =	PIXMAN_FORMAT(12,PIXMAN_TYPE_YV12,0,0,0,0),
+} pixman_format_code_t;
+
+/* Querying supported format values. */
+PIXMAN_EXPORT
+pixman_bool_t	pixman_format_supported_destination (pixman_format_code_t format);
+
+PIXMAN_EXPORT
+pixman_bool_t	pixman_format_supported_source (pixman_format_code_t format);
+
+/* Constructors */
+PIXMAN_EXPORT
+pixman_image_t *pixman_image_create_solid_fill       (pixman_color_t               *color);
+PIXMAN_EXPORT
+pixman_image_t *pixman_image_create_linear_gradient  (pixman_point_fixed_t         *p1,
+						      pixman_point_fixed_t         *p2,
+						      const pixman_gradient_stop_t *stops,
+						      int                           n_stops);
+PIXMAN_EXPORT
+pixman_image_t *pixman_image_create_radial_gradient  (pixman_point_fixed_t         *inner,
+						      pixman_point_fixed_t         *outer,
+						      pixman_fixed_t                inner_radius,
+						      pixman_fixed_t                outer_radius,
+						      const pixman_gradient_stop_t *stops,
+						      int                           n_stops);
+PIXMAN_EXPORT
+pixman_image_t *pixman_image_create_conical_gradient (pixman_point_fixed_t         *center,
+						      pixman_fixed_t                angle,
+						      const pixman_gradient_stop_t *stops,
+						      int                           n_stops);
+PIXMAN_EXPORT
+pixman_image_t *pixman_image_create_bits             (pixman_format_code_t          format,
+						      int                           width,
+						      int                           height,
+						      uint32_t                     *bits,
+						      int                           rowstride_bytes);
+
+/* Destructor */
+PIXMAN_EXPORT
+pixman_image_t *pixman_image_ref                     (pixman_image_t               *image);
+PIXMAN_EXPORT
+pixman_bool_t   pixman_image_unref                   (pixman_image_t               *image);
+
+
+/* Set properties */
+PIXMAN_EXPORT
+pixman_bool_t   pixman_image_set_clip_region         (pixman_image_t               *image,
+						      pixman_region16_t            *region);
+PIXMAN_EXPORT
+void		pixman_image_set_has_client_clip     (pixman_image_t               *image,
+						      pixman_bool_t		    clien_clip);
+PIXMAN_EXPORT
+pixman_bool_t   pixman_image_set_transform           (pixman_image_t               *image,
+						      const pixman_transform_t     *transform);
+PIXMAN_EXPORT
+void            pixman_image_set_repeat              (pixman_image_t               *image,
+						      pixman_repeat_t               repeat);
+PIXMAN_EXPORT
+pixman_bool_t   pixman_image_set_filter              (pixman_image_t               *image,
+						      pixman_filter_t               filter,
+						      const pixman_fixed_t         *filter_params,
+						      int                           n_filter_params);
+PIXMAN_EXPORT
+void            pixman_image_set_filter_params       (pixman_image_t               *image,
+						      pixman_fixed_t               *params,
+						      int                           n_params);
+PIXMAN_EXPORT
+void		pixman_image_set_source_clipping     (pixman_image_t		   *image,
+						      pixman_bool_t                 source_clipping);
+PIXMAN_EXPORT
+void            pixman_image_set_alpha_map           (pixman_image_t               *image,
+						      pixman_image_t               *alpha_map,
+						      int16_t                       x,
+						      int16_t                       y);
+PIXMAN_EXPORT
+void            pixman_image_set_component_alpha     (pixman_image_t               *image,
+						      pixman_bool_t                 component_alpha);
+PIXMAN_EXPORT
+void		pixman_image_set_accessors	     (pixman_image_t		   *image,
+						      pixman_read_memory_func_t	    read_func,
+						      pixman_write_memory_func_t    write_func);
+PIXMAN_EXPORT
+void		pixman_image_set_indexed	     (pixman_image_t		   *image,
+						      const pixman_indexed_t	   *indexed);
+PIXMAN_EXPORT
+uint32_t       *pixman_image_get_data                (pixman_image_t               *image);
+PIXMAN_EXPORT
+int		pixman_image_get_width               (pixman_image_t               *image);
+PIXMAN_EXPORT
+int             pixman_image_get_height              (pixman_image_t               *image);
+PIXMAN_EXPORT
+int		pixman_image_get_stride              (pixman_image_t               *image);
+PIXMAN_EXPORT
+int		pixman_image_get_depth               (pixman_image_t		   *image);
+PIXMAN_EXPORT
+pixman_bool_t	pixman_image_fill_rectangles	     (pixman_op_t		    op,
+						      pixman_image_t		   *image,
+						      pixman_color_t		   *color,
+						      int			    n_rects,
+						      const pixman_rectangle16_t	   *rects);
+
+/* Composite */
+PIXMAN_EXPORT
+pixman_bool_t   pixman_compute_composite_region (pixman_region16_t *	pRegion,
+						 pixman_image_t *	pSrc,
+						 pixman_image_t *	pMask,
+						 pixman_image_t *	pDst,
+						 int16_t		xSrc,
+						 int16_t		ySrc,
+						 int16_t		xMask,
+						 int16_t		yMask,
+						 int16_t		xDst,
+						 int16_t		yDst,
+						 uint16_t		width,
+						 uint16_t		height);
+PIXMAN_EXPORT
+void		pixman_image_composite          (pixman_op_t		    op,
+						 pixman_image_t		   *src,
+						 pixman_image_t               *mask,
+						 pixman_image_t               *dest,
+						 int16_t                       src_x,
+						 int16_t                       src_y,
+						 int16_t                       mask_x,
+						 int16_t                       mask_y,
+						 int16_t                       dest_x,
+						 int16_t                       dest_y,
+						 uint16_t                      width,
+						 uint16_t                      height);
+
+/*
+ * Trapezoids
+ */
+typedef struct pixman_edge pixman_edge_t;
+typedef struct pixman_trapezoid pixman_trapezoid_t;
+typedef struct pixman_trap pixman_trap_t;
+typedef struct pixman_span_fix pixman_span_fix_t;
+
+/*
+ * An edge structure.  This represents a single polygon edge
+ * and can be quickly stepped across small or large gaps in the
+ * sample grid
+ */
+struct pixman_edge
+{
+    pixman_fixed_t	x;
+    pixman_fixed_t	e;
+    pixman_fixed_t   stepx;
+    pixman_fixed_t   signdx;
+    pixman_fixed_t   dy;
+    pixman_fixed_t   dx;
+
+    pixman_fixed_t   stepx_small;
+    pixman_fixed_t   stepx_big;
+    pixman_fixed_t   dx_small;
+    pixman_fixed_t   dx_big;
+};
+
+struct pixman_trapezoid
+{
+    pixman_fixed_t  top, bottom;
+    pixman_line_fixed_t	left, right;
+};
+
+
+/* whether 't' is a well defined not obviously empty trapezoid */
+#define pixman_trapezoid_valid(t)				\
+    ((t)->left.p1.y != (t)->left.p2.y &&			   \
+     (t)->right.p1.y != (t)->right.p2.y &&			   \
+     (int) ((t)->bottom - (t)->top) > 0)
+
+struct pixman_span_fix
+{
+    pixman_fixed_t	l, r, y;
+};
+
+struct pixman_trap
+{
+    pixman_span_fix_t	top, bot;
+};
+
+PIXMAN_EXPORT
+pixman_fixed_t pixman_sample_ceil_y        (pixman_fixed_t       y,
+					    int                  bpp);
+PIXMAN_EXPORT
+pixman_fixed_t pixman_sample_floor_y       (pixman_fixed_t       y,
+					    int                  bpp);
+PIXMAN_EXPORT
+void           pixman_edge_step            (pixman_edge_t       *e,
+					    int                  n);
+PIXMAN_EXPORT
+void           pixman_edge_init            (pixman_edge_t       *e,
+					    int                  bpp,
+					    pixman_fixed_t       y_start,
+					    pixman_fixed_t       x_top,
+					    pixman_fixed_t       y_top,
+					    pixman_fixed_t       x_bot,
+					    pixman_fixed_t       y_bot);
+PIXMAN_EXPORT
+void           pixman_line_fixed_edge_init (pixman_edge_t       *e,
+					    int                  bpp,
+					    pixman_fixed_t       y,
+					    const pixman_line_fixed_t *line,
+					    int                  x_off,
+					    int                  y_off);
+PIXMAN_EXPORT
+void           pixman_rasterize_edges      (pixman_image_t      *image,
+					    pixman_edge_t       *l,
+					    pixman_edge_t       *r,
+					    pixman_fixed_t       t,
+					    pixman_fixed_t       b);
+PIXMAN_EXPORT
+void           pixman_add_traps            (pixman_image_t      *image,
+					    int16_t              x_off,
+					    int16_t              y_off,
+					    int                  ntrap,
+					    pixman_trap_t       *traps);
+PIXMAN_EXPORT
+void	       pixman_add_trapezoids       (pixman_image_t      *image,
+					    int16_t              x_off,
+					    int                  y_off,
+					    int                  ntraps,
+					    const pixman_trapezoid_t  *traps);
+PIXMAN_EXPORT
+void           pixman_rasterize_trapezoid  (pixman_image_t      *image,
+					    const pixman_trapezoid_t  *trap,
+					    int                  x_off,
+					    int                  y_off);
+
+#endif /* PIXMAN_H__ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/Pci.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/Pci.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/Pci.h	(revision 9233)
@@ -0,0 +1,312 @@
+/*
+ * Copyright 1998 by Concurrent Computer Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Concurrent Computer
+ * Corporation not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior
+ * permission.  Concurrent Computer Corporation makes no representations
+ * about the suitability of this software for any purpose.  It is
+ * provided "as is" without express or implied warranty.
+ *
+ * CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * Copyright 1998 by Metro Link Incorporated
+ *
+ * Permission to use, copy, modify, distribute, and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Metro Link
+ * Incorporated not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior
+ * permission.  Metro Link Incorporated makes no representations
+ * about the suitability of this software for any purpose.  It is
+ * provided "as is" without express or implied warranty.
+ *
+ * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * This file is derived in part from the original xf86_PCI.h that included
+ * following copyright message:
+ *
+ * Copyright 1995 by Robin Cutshaw <robin@XFree86.Org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the above listed copyright holder(s)
+ * not be used in advertising or publicity pertaining to distribution of
+ * the software without specific, written prior permission.  The above listed
+ * copyright holder(s) make(s) no representations about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or
+ * implied warranty.
+ *
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+
+/*
+ * This file has the private Pci definitions.  The public ones are imported
+ * from xf86Pci.h.  Drivers should not use this file.
+ */
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _PCI_H
+#define _PCI_H 1
+
+#include <X11/Xarch.h>
+#include <X11/Xfuncproto.h>
+#include "xf86Pci.h"
+#include "xf86PciInfo.h"
+
+/*
+ * Global Definitions
+ */
+#define MAX_PCI_DEVICES 128	/* Max number of devices accomodated */
+				/* by xf86scanpci		     */
+#if defined(sun) && defined(SVR4) && defined(sparc)
+# define MAX_PCI_BUSES   4096	/* Max number of PCI buses           */
+#elif (defined(__alpha__) || defined(__ia64__)) && defined (linux)
+# define MAX_PCI_DOMAINS	512
+# define PCI_DOM_MASK	0x01fful
+# define MAX_PCI_BUSES	(MAX_PCI_DOMAINS*256) /* 256 per domain      */
+#else
+# define MAX_PCI_BUSES   256	/* Max number of PCI buses           */
+#endif
+
+#define DEVID(vendor, device) \
+    ((CARD32)((PCI_##device << 16) | PCI_##vendor))
+
+#ifndef PCI_DOM_MASK
+# define PCI_DOM_MASK 0x0ffu
+#endif
+#define PCI_DOMBUS_MASK (((PCI_DOM_MASK) << 8) | 0x0ffu)
+
+/*
+ * "b" contains an optional domain number.
+ */
+#define PCI_MAKE_TAG(b,d,f)  ((((b) & (PCI_DOMBUS_MASK)) << 16) | \
+			      (((d) & 0x00001fu) << 11) | \
+			      (((f) & 0x000007u) << 8))
+
+#define PCI_MAKE_BUS(d,b)    ((((d) & (PCI_DOM_MASK)) << 8) | ((b) & 0xffu))
+
+#define PCI_DOM_FROM_TAG(tag)  (((tag) >> 24) & (PCI_DOM_MASK))
+#define PCI_BUS_FROM_TAG(tag)  (((tag) >> 16) & (PCI_DOMBUS_MASK))
+#define PCI_DEV_FROM_TAG(tag)  (((tag) & 0x0000f800u) >> 11)
+#define PCI_FUNC_FROM_TAG(tag) (((tag) & 0x00000700u) >> 8)
+
+#define PCI_DFN_FROM_TAG(tag)  (((tag) & 0x0000ff00u) >> 8)
+#define PCI_BDEV_FROM_TAG(tag) ((tag) & 0x00fff800u)
+
+#define PCI_DOM_FROM_BUS(bus)  (((bus) >> 8) & (PCI_DOM_MASK))
+#define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu)
+#define PCI_TAG_NO_DOMAIN(tag) ((tag) & 0x00ffff00u)
+
+/*
+ * Debug Macros/Definitions
+ */
+/* #define DEBUGPCI  2 */    /* Disable/enable trace in PCI code */
+
+#if defined(DEBUGPCI)
+
+# define PCITRACE(lvl,printfargs) \
+	if (lvl > xf86Verbose) { \
+		ErrorF printfargs; \
+	}
+
+#else /* !defined(DEBUGPCI) */
+
+# define PCITRACE(lvl,printfargs)
+
+#endif /* !defined(DEBUGPCI) */
+
+/*
+ * PCI Config mechanism definitions
+ */
+#define PCI_EN 0x80000000
+
+#define	PCI_CFGMECH1_ADDRESS_REG	0xCF8
+#define	PCI_CFGMECH1_DATA_REG		0xCFC
+
+#define PCI_CFGMECH1_MAXDEV	32
+
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \
+	defined(__DragonFly__)
+#define ARCH_PCI_INIT bsdPciInit
+#endif
+
+#if !defined(ARCH_PCI_INIT)
+/*
+ * Select architecture specific PCI init function
+ */
+#if defined(__alpha__)
+# if defined(linux)
+#  define ARCH_PCI_INIT axpPciInit
+# endif
+#elif defined(__arm__)
+# if defined(linux)
+#  define ARCH_PCI_INIT linuxPciInit
+# endif
+#elif defined(__hppa__)
+# if defined(linux)
+#  define ARCH_PCI_INIT linuxPciInit
+# endif
+#elif defined(__ia64__)
+# if defined(linux)
+#  define ARCH_PCI_INIT linuxPciInit
+# endif
+#elif defined(__i386__) || defined(__i386)
+# if defined(linux)
+#  define ARCH_PCI_INIT linuxPciInit
+# else
+#  define ARCH_PCI_INIT ix86PciInit
+# endif
+#elif defined(__mc68000__)
+# if defined(linux)
+#  define ARCH_PCI_INIT linuxPciInit
+# endif
+#elif defined(__mips__)
+# if defined(linux)
+#  define ARCH_PCI_INIT linuxPciInit
+# endif
+#elif defined(__powerpc__) || defined(__powerpc64__)
+# if defined(linux)
+#  define ARCH_PCI_INIT linuxPciInit
+# else
+#  define ARCH_PCI_INIT ppcPciInit
+# endif
+#elif defined(__s390__)
+# if defined(linux)
+#  define ARCH_PCI_INIT linuxPciInit
+# endif
+#elif defined(__sh__)
+# if defined(linux)
+#  define ARCH_PCI_INIT linuxPciInit
+# endif
+#elif defined(__sparc__) || defined(sparc)
+# if defined(linux)
+#  define ARCH_PCI_INIT linuxPciInit
+# elif defined(sun)
+#  define ARCH_PCI_INIT sparcPciInit
+# endif
+# if !defined(__FreeBSD__) && !defined(linux)
+#  define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
+# endif
+#elif defined(__amd64__) || defined(__amd64) || defined(__x86_64__)
+# if defined(linux)
+#  define ARCH_PCI_INIT linuxPciInit
+# else
+#  define ARCH_PCI_INIT ix86PciInit
+# endif
+#endif
+#endif /* !defined(ARCH_PCI_INIT) */
+
+#ifndef ARCH_PCI_INIT
+#error No PCI support available for this architecture/OS combination
+#endif
+
+extern void ARCH_PCI_INIT(void);
+
+#if defined(XF86SCANPCI_WRAPPER)
+typedef enum {
+    SCANPCI_INIT,
+    SCANPCI_TERM
+} scanpciWrapperOpt;
+extern void XF86SCANPCI_WRAPPER(scanpciWrapperOpt flags);
+#endif
+
+/*
+ * Table of functions used to access a specific PCI bus domain
+ * (e.g. a primary PCI bus and all of its secondaries)
+ */
+typedef struct pci_bus_funcs {
+	ADDRESS (*pciAddrBusToHost)(PCITAG, PciAddrType, ADDRESS);
+} pciBusFuncs_t, *pciBusFuncs_p;
+
+/*
+ * pciBusInfo_t - One structure per defined PCI bus
+ */
+typedef struct pci_bus_info {
+	unsigned char  configMech;   /* PCI config type to use      */
+	unsigned char  numDevices;   /* Range of valid devnums      */
+	unsigned char  secondary;    /* Boolean: bus is a secondary */
+	int            primary_bus;  /* Parent bus                  */
+	pciBusFuncs_p  funcs;        /* PCI access functions        */
+	void          *pciBusPriv;   /* Implementation private data */
+	struct pci_device *bridge;       /* bridge that opens this bus  */
+} pciBusInfo_t;
+
+#define HOST_NO_BUS ((pciBusInfo_t *)(-1))
+
+/* configMech values */
+#define PCI_CFG_MECH_UNKNOWN 0 /* Not yet known  */
+#define PCI_CFG_MECH_1       1 /* Most machines  */
+#define PCI_CFG_MECH_2       2 /* Older PC's     */
+#define PCI_CFG_MECH_OTHER   3 /* Something else */
+
+/* Generic PCI service functions and helpers */
+CARD32        pciCfgMech1Read(PCITAG tag, int offset);
+void          pciCfgMech1Write(PCITAG tag, int offset, CARD32 val);
+void          pciCfgMech1SetBits(PCITAG tag, int offset, CARD32 mask,
+				 CARD32 val);
+ADDRESS       pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS);
+
+extern int    pciMaxBusNum;
+
+extern pciBusInfo_t  *pciBusInfo[];
+
+#endif /* _PCI_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/afb.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/afb.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/afb.h	(revision 9233)
@@ -0,0 +1,972 @@
+/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
+/***********************************************************
+
+Copyright (c) 1987  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/* Monochrome Frame Buffer definitions
+   written by drewry, september 1986
+*/
+
+#include "pixmap.h"
+#include "region.h"
+#include "gc.h"
+#include "colormap.h"
+#include "regionstr.h"
+#include "privates.h"
+#include "mibstore.h"
+#include "mfb.h"
+
+extern int afbInverseAlu[];
+/* warning: PixelType definition duplicated in maskbits.h */
+#ifndef PixelType
+#define PixelType CARD32
+#endif /* PixelType */
+
+#define AFB_MAX_DEPTH 8
+
+/* afbbitblt.c */
+
+extern void afbDoBitblt(
+	DrawablePtr /*pSrc*/,
+	DrawablePtr /*pDst*/,
+	int /*alu*/,
+	RegionPtr /*prgnDst*/,
+	DDXPointPtr /*pptSrc*/,
+	unsigned long /*planemask*/
+);
+
+extern RegionPtr afbCopyArea(
+	DrawablePtr /*pSrcDrawable*/,
+	DrawablePtr /*pDstDrawable*/,
+	GCPtr/*pGC*/,
+	int /*srcx*/,
+	int /*srcy*/,
+	int /*width*/,
+	int /*height*/,
+	int /*dstx*/,
+	int /*dsty*/
+);
+
+/* afbbltC.c */
+
+extern void afbDoBitbltCopy(
+	DrawablePtr /*pSrc*/,
+	DrawablePtr /*pDst*/,
+	int /*alu*/,
+	RegionPtr /*prgnDst*/,
+	DDXPointPtr /*pptSrc*/,
+	unsigned long /*planemask*/
+);
+/* afbbltCI.c */
+
+extern void afbDoBitbltCopyInverted(
+	DrawablePtr /*pSrc*/,
+	DrawablePtr /*pDst*/,
+	int /*alu*/,
+	RegionPtr /*prgnDst*/,
+	DDXPointPtr /*pptSrc*/,
+	unsigned long /*planemask*/
+);
+/* afbbltG.c */
+
+extern void afbDoBitbltGeneral(
+	DrawablePtr /*pSrc*/,
+	DrawablePtr /*pDst*/,
+	int /*alu*/,
+	RegionPtr /*prgnDst*/,
+	DDXPointPtr /*pptSrc*/,
+	unsigned long /*planemask*/
+);
+/* afbbltO.c */
+
+extern void afbDoBitbltOr(
+	DrawablePtr /*pSrc*/,
+	DrawablePtr /*pDst*/,
+	int /*alu*/,
+	RegionPtr /*prgnDst*/,
+	DDXPointPtr /*pptSrc*/,
+	unsigned long /*planemask*/
+);
+/* afbbltX.c */
+
+extern void afbDoBitbltXor(
+	DrawablePtr /*pSrc*/,
+	DrawablePtr /*pDst*/,
+	int /*alu*/,
+	RegionPtr /*prgnDst*/,
+	DDXPointPtr /*pptSrc*/,
+	unsigned long /*planemask*/
+);
+/* afbbres.c */
+
+extern void afbBresS(
+	PixelType * /*addrl*/,
+	int /*nlwidth*/,
+	int /*sizeDst*/,
+	int /*depthDst*/,
+	int /*signdx*/,
+	int /*signdy*/,
+	int /*axis*/,
+	int /*x1*/,
+	int /*y1*/,
+	int /*e*/,
+	int /*e1*/,
+	int /*e2*/,
+	int /*len*/,
+	unsigned char * /*rrops*/
+);
+/* afbbresd.c */
+
+extern void afbBresD(
+	int * /*pdashIndex*/,
+	unsigned char * /*pDash*/,
+	int /*numInDashList*/,
+	int * /*pdashOffset*/,
+	int /*isDoubleDash*/,
+	PixelType * /*addrl*/,
+	int /*nlwidth*/,
+	int /*sizeDst*/,
+	int /*depthDst*/,
+	int /*signdx*/,
+	int /*signdy*/,
+	int /*axis*/,
+	int /*x1*/,
+	int /*y1*/,
+	int /*e*/,
+	int /*e1*/,
+	int /*e2*/,
+	int /*len*/,
+	unsigned char * /*rrops*/,
+	unsigned char * /*bgrrops*/
+);
+
+/* afbclip.c */
+
+extern RegionPtr afbPixmapToRegion(
+	PixmapPtr /*pPix*/
+);
+
+/* afbcmap.c */
+
+extern int afbListInstalledColormaps(
+	ScreenPtr /*pScreen*/,
+	Colormap * /*pmaps*/
+);
+
+extern void afbInstallColormap(
+	ColormapPtr /*pmap*/
+);
+
+extern void afbUninstallColormap(
+	ColormapPtr /*pmap*/
+);
+
+extern void afbResolveColor(
+	unsigned short * /*pred*/,
+	unsigned short * /*pgreen*/,
+	unsigned short * /*pblue*/,
+	VisualPtr /*pVisual*/
+);
+
+extern Bool afbInitializeColormap(
+	ColormapPtr /*pmap*/
+);
+
+extern Bool afbInitVisuals(
+	VisualPtr * /*visualp*/,
+	DepthPtr * /*depthp*/,
+	int * /*nvisualp*/,
+	int * /*ndepthp*/,
+	int * /*rootDepthp*/,
+	VisualID * /*defaultVisp*/,
+	unsigned long /*sizes*/,
+	int /*bitsPerRGB*/
+);
+
+/* afbfillarc.c */
+
+extern void afbPolyFillArcSolid(
+	DrawablePtr /*pDraw*/,
+	GCPtr /*pGC*/,
+	int /*narcs*/,
+	xArc * /*parcs*/
+);
+/* afbfillrct.c */
+
+extern void afbPolyFillRect(
+	DrawablePtr /*pDrawable*/,
+	GCPtr /*pGC*/,
+	int /*nrectFill*/,
+	xRectangle * /*prectInit*/
+);
+
+/* afbply1rct.c */
+extern void afbFillPolygonSolid(
+	DrawablePtr /*pDrawable*/,
+	GCPtr /*pGC*/,
+	int /*mode*/,
+	int /*shape*/,
+	int /*count*/,
+	DDXPointPtr /*ptsIn*/
+);
+
+/* afbfillsp.c */
+
+extern void afbSolidFS(
+	DrawablePtr /*pDrawable*/,
+	GCPtr /*pGC*/,
+	int /*nInit*/,
+	DDXPointPtr /*pptInit*/,
+	int * /*pwidthInit*/,
+	int /*fSorted*/
+);
+
+extern void afbStippleFS(
+	DrawablePtr /*pDrawable*/,
+	GCPtr/*pGC*/,
+	int /*nInit*/,
+	DDXPointPtr /*pptInit*/,
+	int * /*pwidthInit*/,
+	int /*fSorted*/
+);
+
+extern void afbTileFS(
+	DrawablePtr /*pDrawable*/,
+	GCPtr/*pGC*/,
+	int /*nInit*/,
+	DDXPointPtr /*pptInit*/,
+	int * /*pwidthInit*/,
+	int /*fSorted*/
+);
+
+extern void afbUnnaturalTileFS(
+	DrawablePtr /*pDrawable*/,
+	GCPtr/*pGC*/,
+	int /*nInit*/,
+	DDXPointPtr /*pptInit*/,
+	int * /*pwidthInit*/,
+	int /*fSorted*/
+);
+
+extern void afbUnnaturalStippleFS(
+	DrawablePtr /*pDrawable*/,
+	GCPtr/*pGC*/,
+	int /*nInit*/,
+	DDXPointPtr /*pptInit*/,
+	int * /*pwidthInit*/,
+	int /*fSorted*/
+);
+
+extern void afbOpaqueStippleFS(
+	DrawablePtr /*pDrawable*/,
+	GCPtr/*pGC*/,
+	int /*nInit*/,
+	DDXPointPtr /*pptInit*/,
+	int * /*pwidthInit*/,
+	int /*fSorted*/
+);
+
+extern void afbUnnaturalOpaqueStippleFS(
+	DrawablePtr /*pDrawable*/,
+	GCPtr/*pGC*/,
+	int /*nInit*/,
+	DDXPointPtr /*pptInit*/,
+	int * /*pwidthInit*/,
+	int /*fSorted*/
+);
+
+/* afbfont.c */
+
+extern Bool afbRealizeFont(
+	ScreenPtr /*pscr*/,
+	FontPtr /*pFont*/
+);
+
+extern Bool afbUnrealizeFont(
+	ScreenPtr /*pscr*/,
+	FontPtr /*pFont*/
+);
+/* afbgc.c */
+
+extern Bool afbCreateGC(
+	GCPtr /*pGC*/
+);
+
+extern void afbReduceRop(
+	int /*alu*/,
+	Pixel /*src*/,
+	unsigned long /*planemask*/,
+	int /*depth*/,
+	unsigned char * /*rrops*/
+);
+
+/* afbgetsp.c */
+
+extern void afbGetSpans(
+	DrawablePtr /*pDrawable*/,
+	int /*wMax*/,
+	DDXPointPtr /*ppt*/,
+	int * /*pwidth*/,
+	int /*nspans*/,
+	char * /*pdstStart*/
+);
+/* afbhrzvert.c */
+
+extern void afbHorzS(
+	PixelType * /*addrl*/,
+	int /*nlwidth*/,
+	int /*sizeDst*/,
+	int /*depthDst*/,
+	int /*x1*/,
+	int /*y1*/,
+	int /*len*/,
+	unsigned char * /*rrops*/
+);
+
+extern void afbVertS(
+	PixelType * /*addrl*/,
+	int /*nlwidth*/,
+	int /*sizeDst*/,
+	int /*depthDst*/,
+	int /*x1*/,
+	int /*y1*/,
+	int /*len*/,
+	unsigned char * /*rrops*/
+);
+/* afbigbblak.c */
+
+extern void afbImageGlyphBlt (
+	DrawablePtr /*pDrawable*/,
+	GCPtr/*pGC*/,
+	int /*x*/,
+	int /*y*/,
+	unsigned int /*nglyph*/,
+	CharInfoPtr * /*ppci*/,
+	pointer /*pglyphBase*/
+);
+/* afbigbwht.c */
+
+/* afbimage.c */
+
+extern void afbPutImage(
+	DrawablePtr /*dst*/,
+	GCPtr /*pGC*/,
+	int /*depth*/,
+	int /*x*/,
+	int /*y*/,
+	int /*w*/,
+	int /*h*/,
+	int /*leftPad*/,
+	int /*format*/,
+	char * /*pImage*/
+);
+
+extern void afbGetImage(
+	DrawablePtr /*pDrawable*/,
+	int /*sx*/,
+	int /*sy*/,
+	int /*w*/,
+	int /*h*/,
+	unsigned int /*format*/,
+	unsigned long /*planeMask*/,
+	char * /*pdstLine*/
+);
+/* afbline.c */
+
+extern void afbLineSS(
+	DrawablePtr /*pDrawable*/,
+	GCPtr /*pGC*/,
+	int /*mode*/,
+	int /*npt*/,
+	DDXPointPtr /*pptInit*/
+);
+
+extern void afbLineSD(
+	DrawablePtr /*pDrawable*/,
+	GCPtr /*pGC*/,
+	int /*mode*/,
+	int /*npt*/,
+	DDXPointPtr /*pptInit*/
+);
+
+/* afbmisc.c */
+
+extern void afbQueryBestSize(
+	int /*class*/,
+	unsigned short * /*pwidth*/,
+	unsigned short * /*pheight*/,
+	ScreenPtr /*pScreen*/
+);
+/* afbpntarea.c */
+
+extern void afbSolidFillArea(
+	DrawablePtr /*pDraw*/,
+	int /*nbox*/,
+	BoxPtr /*pbox*/,
+	unsigned char * /*rrops*/
+);
+
+extern void afbStippleAreaPPW(
+	DrawablePtr /*pDraw*/,
+	int /*nbox*/,
+	BoxPtr /*pbox*/,
+	PixmapPtr /*pstipple*/,
+	unsigned char * /*rrops*/
+);
+extern void afbStippleArea(
+	DrawablePtr /*pDraw*/,
+	int /*nbox*/,
+	BoxPtr /*pbox*/,
+	PixmapPtr /*pstipple*/,
+	int /*xOff*/,
+	int /*yOff*/,
+	unsigned char * /*rrops*/
+);
+/* afbplygblt.c */
+
+extern void afbPolyGlyphBlt(
+	DrawablePtr /*pDrawable*/,
+	GCPtr /*pGC*/,
+	int /*x*/,
+	int /*y*/,
+	unsigned int /*nglyph*/,
+	CharInfoPtr * /*ppci*/,
+	pointer /*pglyphBase*/
+);
+
+/* afbpixmap.c */
+
+extern PixmapPtr afbCreatePixmap(
+	ScreenPtr /*pScreen*/,
+	int /*width*/,
+	int /*height*/,
+	int /*depth*/,
+	unsigned /*usage_hint*/
+);
+
+extern Bool afbDestroyPixmap(
+	PixmapPtr /*pPixmap*/
+);
+
+extern void afbXRotatePixmap(
+	PixmapPtr /*pPix*/,
+	int /*rw*/
+);
+
+extern void afbYRotatePixmap(
+	PixmapPtr /*pPix*/,
+	int /*rh*/
+);
+
+extern void afbCopyRotatePixmap(
+	PixmapPtr /*psrcPix*/,
+	PixmapPtr * /*ppdstPix*/,
+	int /*xrot*/,
+	int /*yrot*/
+);
+/* afbpolypnt.c */
+
+extern void afbPolyPoint(
+	DrawablePtr /*pDrawable*/,
+	GCPtr /*pGC*/,
+	int /*mode*/,
+	int /*npt*/,
+	xPoint * /*pptInit*/
+);
+/* afbpushpxl.c */
+
+extern void afbPushPixels(
+	GCPtr /*pGC*/,
+	PixmapPtr /*pBitMap*/,
+	DrawablePtr /*pDrawable*/,
+	int /*dx*/,
+	int /*dy*/,
+	int /*xOrg*/,
+	int /*yOrg*/
+);
+
+/* afbscrinit.c */
+
+extern Bool afbScreenInit(
+	ScreenPtr /*pScreen*/,
+	pointer /*pbits*/,
+	int /*xsize*/,
+	int /*ysize*/,
+	int /*dpix*/,
+	int /*dpiy*/,
+	int /*width*/
+);
+
+/* afbseg.c */
+
+extern void afbSegmentSS(
+	DrawablePtr /*pDrawable*/,
+	GCPtr /*pGC*/,
+	int /*nseg*/,
+	xSegment * /*pSeg*/
+);
+
+extern void afbSegmentSD(
+	DrawablePtr /*pDrawable*/,
+	GCPtr /*pGC*/,
+	int /*nseg*/,
+	xSegment * /*pSeg*/
+);
+/* afbsetsp.c */
+
+extern void afbSetSpans(
+	DrawablePtr /*pDrawable*/,
+	GCPtr /*pGC*/,
+	char * /*psrc*/,
+	DDXPointPtr /*ppt*/,
+	int * /*pwidth*/,
+	int /*nspans*/,
+	int /*fSorted*/
+);
+/* afbtegblt.c */
+
+extern void afbTEGlyphBlt(
+	DrawablePtr /*pDrawable*/,
+	GCPtr/*pGC*/,
+	int /*x*/,
+	int /*y*/,
+	unsigned int /*nglyph*/,
+	CharInfoPtr * /*ppci*/,
+	pointer /*pglyphBase*/
+);
+/* afbtileC.c */
+
+extern void afbTileAreaPPWCopy(
+	DrawablePtr /*pDraw*/,
+	int /*nbox*/,
+	BoxPtr /*pbox*/,
+	int /*alu*/,
+	PixmapPtr /*ptile*/,
+	unsigned long /*planemask*/
+);
+/* afbtileG.c */
+
+extern void afbTileAreaPPWGeneral(
+	DrawablePtr /*pDraw*/,
+	int /*nbox*/,
+	BoxPtr /*pbox*/,
+	int /*alu*/,
+	PixmapPtr /*ptile*/,
+	unsigned long /*planemask*/
+);
+
+extern void afbTileAreaCopy(
+	DrawablePtr /*pDraw*/,
+	int /*nbox*/,
+	BoxPtr /*pbox*/,
+	int /*alu*/,
+	PixmapPtr /*ptile*/,
+	int /*xOff*/,
+	int /*yOff*/,
+	unsigned long /*planemask*/
+);
+/* afbtileG.c */
+
+extern void afbTileAreaGeneral(
+	DrawablePtr /*pDraw*/,
+	int /*nbox*/,
+	BoxPtr /*pbox*/,
+	int /*alu*/,
+	PixmapPtr /*ptile*/,
+	int /*xOff*/,
+	int /*yOff*/,
+	unsigned long /*planemask*/
+);
+
+extern void afbOpaqueStippleAreaPPWCopy(
+	DrawablePtr /*pDraw*/,
+	int /*nbox*/,
+	BoxPtr /*pbox*/,
+	int /*alu*/,
+	PixmapPtr /*ptile*/,
+	unsigned char */*rropsOS*/,
+	unsigned long /*planemask*/
+);
+/* afbtileG.c */
+
+extern void afbOpaqueStippleAreaPPWGeneral(
+	DrawablePtr /*pDraw*/,
+	int /*nbox*/,
+	BoxPtr /*pbox*/,
+	int /*alu*/,
+	PixmapPtr /*ptile*/,
+	unsigned char */*rropsOS*/,
+	unsigned long /*planemask*/
+);
+
+extern void afbOpaqueStippleAreaCopy(
+	DrawablePtr /*pDraw*/,
+	int /*nbox*/,
+	BoxPtr /*pbox*/,
+	int /*alu*/,
+	PixmapPtr /*ptile*/,
+	int /*xOff*/,
+	int /*yOff*/,
+	unsigned char */*rropsOS*/,
+	unsigned long /*planemask*/
+);
+/* afbtileG.c */
+
+extern void afbOpaqueStippleAreaGeneral(
+	DrawablePtr /*pDraw*/,
+	int /*nbox*/,
+	BoxPtr /*pbox*/,
+	int /*alu*/,
+	PixmapPtr /*ptile*/,
+	int /*xOff*/,
+	int /*yOff*/,
+	unsigned char */*rropsOS*/,
+	unsigned long /*planemask*/
+);
+
+/* afbwindow.c */
+
+extern Bool afbCreateWindow(
+	WindowPtr /*pWin*/
+);
+
+extern Bool afbDestroyWindow(
+	WindowPtr /*pWin*/
+);
+
+extern Bool afbMapWindow(
+	WindowPtr /*pWindow*/
+);
+
+extern Bool afbPositionWindow(
+	WindowPtr /*pWin*/,
+	int /*x*/,
+	int /*y*/
+);
+
+extern Bool afbUnmapWindow(
+	WindowPtr /*pWindow*/
+);
+
+extern void afbCopyWindow(
+	WindowPtr /*pWin*/,
+	DDXPointRec /*ptOldOrg*/,
+	RegionPtr /*prgnSrc*/
+);
+
+extern Bool afbChangeWindowAttributes(
+	WindowPtr /*pWin*/,
+	unsigned long /*mask*/
+);
+/* afbzerarc.c */
+
+extern void afbZeroPolyArcSS(
+	DrawablePtr /*pDraw*/,
+	GCPtr /*pGC*/,
+	int /*narcs*/,
+	xArc * /*parcs*/
+);
+
+/*
+	private field of pixmap
+	pixmap.devPrivate = (PixelType *)pointer_to_bits
+	pixmap.devKind = width_of_pixmap_in_bytes
+
+	private field of screen
+	a pixmap, for which we allocate storage.  devPrivate is a pointer to
+the bits in the hardware framebuffer.  note that devKind can be poked to
+make the code work for framebuffers that are wider than their
+displayable screen (e.g. the early vsII, which displayed 960 pixels
+across, but was 1024 in the hardware.)
+
+	private field of GC
+*/
+
+typedef struct {
+	unsigned char rrops[AFB_MAX_DEPTH];		/* reduction of rasterop to 1 of 3 */
+	unsigned char rropOS[AFB_MAX_DEPTH];	/* rop for opaque stipple */
+} afbPrivGC;
+typedef afbPrivGC *afbPrivGCPtr;
+
+extern DevPrivateKey afbScreenPrivateKey;
+extern DevPrivateKey afbGCPrivateKey;
+extern DevPrivateKey afbWindowPrivateKey;
+#ifdef PIXMAP_PER_WINDOW
+extern DevPrivateKey frameWindowPrivateKey;
+#endif
+
+#define afbGetGCPrivate(pGC) \
+    ((afbPrivGC *)dixLookupPrivate(&(pGC)->devPrivates, afbGCPrivateKey))
+
+/* Common macros for extracting drawing information */
+
+#define afbGetTypedWidth(pDrawable,wtype)( \
+	(((pDrawable)->type == DRAWABLE_WINDOW) ? \
+	 (int)(((PixmapPtr)dixLookupPrivate(&(pDrawable)->pScreen->devPrivates, afbScreenPrivateKey)->devKind) : \
+	 (int)(((PixmapPtr)pDrawable)->devKind)) / sizeof (wtype))
+
+#define afbGetByteWidth(pDrawable) afbGetTypedWidth(pDrawable, unsigned char)
+
+#define afbGetPixelWidth(pDrawable) afbGetTypedWidth(pDrawable, PixelType)
+
+#define afbGetTypedWidthAndPointer(pDrawable, width, pointer, wtype, ptype) {\
+	PixmapPtr   _pPix; \
+	if ((pDrawable)->type == DRAWABLE_WINDOW) \
+		_pPix = (PixmapPtr)dixLookupPrivate(&(pDrawable)->pScreen->devPrivates, afbScreenPrivateKey); \
+	else \
+		_pPix = (PixmapPtr)(pDrawable); \
+	(pointer) = (ptype *) _pPix->devPrivate.ptr; \
+	(width) = ((int) _pPix->devKind) / sizeof (wtype); \
+}
+
+#define afbGetPixelWidthSizeDepthAndPointer(pDrawable, width, size, dep, pointer) {\
+	PixmapPtr _pPix; \
+	if ((pDrawable)->type == DRAWABLE_WINDOW) \
+		_pPix = (PixmapPtr)dixLookupPrivate(&(pDrawable)->pScreen->devPrivates, afbScreenPrivateKey); \
+	else \
+		_pPix = (PixmapPtr)(pDrawable); \
+	(pointer) = (PixelType *)_pPix->devPrivate.ptr; \
+	(width) = ((int)_pPix->devKind) / sizeof (PixelType); \
+	(size) = (width) * _pPix->drawable.height; \
+	(dep) = _pPix->drawable.depth; (void)(dep); \
+}
+
+#define afbGetByteWidthAndPointer(pDrawable, width, pointer) \
+	afbGetTypedWidthAndPointer(pDrawable, width, pointer, unsigned char, unsigned char)
+
+#define afbGetPixelWidthAndPointer(pDrawable, width, pointer) \
+	afbGetTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType)
+
+#define afbGetWindowTypedWidthAndPointer(pWin, width, pointer, wtype, ptype) {\
+	PixmapPtr _pPix = (PixmapPtr)dixLookupPrivate(&(pWin)->drawable.pScreen->devPrivates, afbScreenPrivateKey); \
+	(pointer) = (ptype *) _pPix->devPrivate.ptr; \
+	(width) = ((int) _pPix->devKind) / sizeof (wtype); \
+}
+
+#define afbGetWindowPixelWidthAndPointer(pWin, width, pointer) \
+	afbGetWindowTypedWidthAndPointer(pWin, width, pointer, PixelType, PixelType)
+
+#define afbGetWindowByteWidthAndPointer(pWin, width, pointer) \
+	afbGetWindowTypedWidthAndPointer(pWin, width, pointer, char, char)
+
+/*  afb uses the following macros to calculate addresses in drawables.
+ *  To support banked framebuffers, the macros come in four flavors.
+ *  All four collapse into the same definition on unbanked devices.
+ *
+ *  afbScanlineFoo - calculate address and do bank switching
+ *  afbScanlineFooNoBankSwitch - calculate address, don't bank switch
+ *  afbScanlineFooSrc - calculate address, switch source bank
+ *  afbScanlineFooDst - calculate address, switch destination bank
+ */
+
+/* The NoBankSwitch versions are the same for banked and unbanked cases */
+
+#define afbScanlineIncNoBankSwitch(_ptr, _off) _ptr += (_off)
+#define afbScanlineOffsetNoBankSwitch(_ptr, _off) ((_ptr) + (_off))
+#define afbScanlineDeltaNoBankSwitch(_ptr, _y, _w) \
+	afbScanlineOffsetNoBankSwitch(_ptr, (_y) * (_w))
+#define afbScanlineNoBankSwitch(_ptr, _x, _y, _w) \
+	afbScanlineOffsetNoBankSwitch(_ptr, (_y) * (_w) + ((_x) >> MFB_PWSH))
+
+#ifdef MFB_LINE_BANK
+
+#include "afblinebank.h" /* get macro definitions from this file */
+
+#else /* !MFB_LINE_BANK - unbanked case */
+
+#define afbScanlineInc(_ptr, _off)				afbScanlineIncNoBankSwitch(_ptr, _off)
+#define afbScanlineIncSrc(_ptr, _off)			afbScanlineInc(_ptr, _off)
+#define afbScanlineIncDst(_ptr, _off)			afbScanlineInc(_ptr, _off)
+
+#define afbScanlineOffset(_ptr, _off)			afbScanlineOffsetNoBankSwitch(_ptr, _off)
+#define afbScanlineOffsetSrc(_ptr, _off)		afbScanlineOffset(_ptr, _off)
+#define afbScanlineOffsetDst(_ptr, _off)		afbScanlineOffset(_ptr, _off)
+
+#define afbScanlineSrc(_ptr, _x, _y, _w)		afbScanline(_ptr, _x, _y, _w)
+#define afbScanlineDst(_ptr, _x, _y, _w)		afbScanline(_ptr, _x, _y, _w)
+
+#define afbScanlineDeltaSrc(_ptr, _y, _w)	afbScanlineDelta(_ptr, _y, _w)
+#define afbScanlineDeltaDst(_ptr, _y, _w)	afbScanlineDelta(_ptr, _y, _w)
+
+#endif /* MFB_LINE_BANK */
+
+#define afbScanlineDelta(_ptr, _y, _w) \
+	afbScanlineOffset(_ptr, (_y) * (_w))
+
+#define afbScanline(_ptr, _x, _y, _w) \
+	afbScanlineOffset(_ptr, (_y) * (_w) + ((_x) >> MFB_PWSH))
+
+/* precomputed information about each glyph for GlyphBlt code.
+   this saves recalculating the per glyph information for each box.
+*/
+
+typedef struct _afbpos{
+	int xpos;					/* xposition of glyph's origin */
+	int xchar;					/* x position mod 32 */
+	int leftEdge;
+	int rightEdge;
+	int topEdge;
+	int bottomEdge;
+	PixelType *pdstBase;		/* longword with character origin */
+	int widthGlyph;			/* width in bytes of this glyph */
+} afbTEXTPOS;
+
+/* reduced raster ops for afb */
+#define RROP_BLACK	GXclear
+#define RROP_WHITE	GXset
+#define RROP_NOP		GXnoop
+#define RROP_INVERT	GXinvert
+#define RROP_COPY		GXcopy
+
+/* macros for afbbitblt.c, afbfillsp.c
+	these let the code do one switch on the rop per call, rather
+	than a switch on the rop per item (span or rectangle.)
+*/
+
+#define fnCLEAR(src, dst)				(0)
+#define fnAND(src, dst)					(src & dst)
+#define fnANDREVERSE(src, dst)		(src & ~dst)
+#define fnCOPY(src, dst)				(src)
+#define fnANDINVERTED(src, dst)		(~src & dst)
+#define fnNOOP(src, dst)				(dst)
+#define fnXOR(src, dst)					(src ^ dst)
+#define fnOR(src, dst)					(src | dst)
+#define fnNOR(src, dst)					(~(src | dst))
+#define fnEQUIV(src, dst)				(~src ^ dst)
+#define fnINVERT(src, dst)				(~dst)
+#define fnORREVERSE(src, dst)			(src | ~dst)
+#define fnCOPYINVERTED(src, dst)		(~src)
+#define fnORINVERTED(src, dst)		(~src | dst)
+#define fnNAND(src, dst)				(~(src & dst))
+#undef fnSET
+#define fnSET(src, dst)					(~0)
+
+/*  Using a "switch" statement is much faster in most cases
+ *  since the compiler can do a look-up table or multi-way branch
+ *  instruction, depending on the architecture.  The result on
+ *  A Sun 3/50 is at least 2.5 times faster, assuming a uniform
+ *  distribution of RasterOp operation types.
+ *
+ *  However, doing some profiling on a running system reveals
+ *  GXcopy is the operation over 99.5% of the time and
+ *  GXxor is the next most frequent (about .4%), so we make special
+ *  checks for those first.
+ *
+ *  Note that this requires a change to the "calling sequence"
+ *  since we can't engineer a "switch" statement to have an lvalue.
+ */
+#undef DoRop
+#define DoRop(result, alu, src, dst) \
+{ \
+	if (alu == GXcopy) \
+		result = fnCOPY (src, dst); \
+	else if (alu == GXxor) \
+		result = fnXOR (src, dst); \
+	else \
+		switch (alu) { \
+			case GXclear: \
+				result = fnCLEAR (src, dst); \
+				break; \
+			case GXand: \
+				result = fnAND (src, dst); \
+				break; \
+			case GXandReverse: \
+				result = fnANDREVERSE (src, dst); \
+				break; \
+			case GXandInverted: \
+				result = fnANDINVERTED (src, dst); \
+				break; \
+			default: \
+			case GXnoop: \
+				result = fnNOOP (src, dst); \
+				break; \
+			case GXor: \
+				result = fnOR (src, dst); \
+				break; \
+			case GXnor: \
+				result = fnNOR (src, dst); \
+				break; \
+			case GXequiv: \
+				result = fnEQUIV (src, dst); \
+				break; \
+			case GXinvert: \
+				result = fnINVERT (src, dst); \
+				break; \
+			case GXorReverse: \
+				result = fnORREVERSE (src, dst); \
+				break; \
+			case GXcopyInverted: \
+				result = fnCOPYINVERTED (src, dst); \
+				break; \
+			case GXorInverted: \
+				result = fnORINVERTED (src, dst); \
+				break; \
+			case GXnand: \
+				result = fnNAND (src, dst); \
+				break; \
+			case GXset: \
+				result = fnSET (src, dst); \
+				break; \
+	} \
+}
+
+
+/*  C expression fragments for various operations.  These get passed in
+ *  as -D's on the compile command line.  See afb/Imakefile.  This
+ *  fixes XBUG 6319.
+ *
+ *  This seems like a good place to point out that afb's use of the
+ *  words black and white is an unfortunate misnomer.  In afb code, black
+ *  means zero, and white means one.
+ */
+#define MFB_OPEQ_WHITE				|=
+#define MFB_OPEQ_BLACK				&=~
+#define MFB_OPEQ_INVERT				^=
+#define MFB_EQWHOLEWORD_WHITE		=~0
+#define MFB_EQWHOLEWORD_BLACK		=0
+#define MFB_EQWHOLEWORD_INVERT	^=~0
+#define MFB_OP_WHITE					/* nothing */
+#define MFB_OP_BLACK					~
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/bstore.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/bstore.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/bstore.h	(revision 9233)
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 1987 by the Regents of the University of California
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies.  The University of
+ * California makes no representations about the suitability of this software
+ * for any purpose.  It is provided "as is" without express or implied
+ * warranty.
+ */
+
+/*
+ * Moved here from mi to allow wrapping of lower level backing store functions.
+ * -- 1997.10.27  Marc Aurele La France (tsi@xfree86.org)
+ */
+
+#ifndef _BSTORE_H_
+#define _BSTORE_H_
+
+#include "bstorestr.h"
+
+#endif /* _BSTORE_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/bstorestr.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/bstorestr.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/bstorestr.h	(revision 9233)
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 1987 by the Regents of the University of California
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies.  The University of
+ * California makes no representations about the suitability of this software
+ * for any purpose.  It is provided "as is" without express or implied
+ * warranty.
+ */
+
+/*
+ * Moved here from mi to allow wrapping of lower level backing store functions.
+ * -- 1997.10.27  Marc Aurele La France (tsi@xfree86.org)
+ */
+
+#ifndef _BSTORESTR_H_
+#define _BSTORESTR_H_
+
+#include "gc.h"
+#include "pixmap.h"
+#include "region.h"
+#include "window.h"
+
+typedef    void (* BackingStoreSaveAreasProcPtr)(
+	PixmapPtr /*pBackingPixmap*/,
+	RegionPtr /*pObscured*/,
+	int /*x*/,
+	int /*y*/,
+	WindowPtr /*pWin*/);
+
+typedef    void (* BackingStoreRestoreAreasProcPtr)(
+	PixmapPtr /*pBackingPixmap*/,
+	RegionPtr /*pExposed*/,
+	int /*x*/,
+	int /*y*/,
+	WindowPtr /*pWin*/);
+
+typedef    void (* BackingStoreSetClipmaskRgnProcPtr)(
+	GCPtr /*pBackingGC*/,
+	RegionPtr /*pbackingCompositeClip*/);
+
+typedef    PixmapPtr (* BackingStoreGetImagePixmapProcPtr)(void);
+
+typedef    PixmapPtr (* BackingStoreGetSpansPixmapProcPtr)(void);
+
+typedef struct _BSFuncs {
+	BackingStoreSaveAreasProcPtr SaveAreas;
+	BackingStoreRestoreAreasProcPtr RestoreAreas;
+	BackingStoreSetClipmaskRgnProcPtr SetClipmaskRgn;
+	BackingStoreGetImagePixmapProcPtr GetImagePixmap;
+	BackingStoreGetSpansPixmapProcPtr GetSpansPixmap;
+} BSFuncRec, *BSFuncPtr;
+
+#endif /* _BSTORESTR_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/colormap.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/colormap.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/colormap.h	(revision 9233)
@@ -0,0 +1,182 @@
+/*
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+*/
+
+#ifndef CMAP_H
+#define CMAP_H 1
+
+#include <X11/Xproto.h>
+#include "screenint.h"
+#include "window.h"
+
+/* these follow X.h's AllocNone and AllocAll */
+#define CM_PSCREEN 2
+#define CM_PWIN	   3
+/* Passed internally in colormap.c */
+#define REDMAP 0
+#define GREENMAP 1
+#define BLUEMAP 2
+#define PSEUDOMAP 3
+#define AllocPrivate (-1)
+#define AllocTemporary (-2)
+#define DynamicClass  1
+
+/* Values for the flags field of a colormap. These should have 1 bit set
+ * and not overlap */
+#define IsDefault 1
+#define AllAllocated 2
+#define BeingCreated 4
+
+
+typedef CARD32 Pixel;
+typedef struct _CMEntry *EntryPtr;
+/* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
+typedef struct _colorResource *colorResourcePtr;
+
+extern int CreateColormap(
+    Colormap /*mid*/,
+    ScreenPtr /*pScreen*/,
+    VisualPtr /*pVisual*/,
+    ColormapPtr* /*ppcmap*/,
+    int /*alloc*/,
+    int /*client*/);
+
+extern int FreeColormap(
+    pointer /*pmap*/,
+    XID /*mid*/);
+
+extern int TellLostMap(
+    WindowPtr /*pwin*/,
+    pointer /* Colormap *pmid */);
+
+extern int TellGainedMap(
+    WindowPtr /*pwin*/,
+    pointer /* Colormap *pmid */);
+
+extern int CopyColormapAndFree(
+    Colormap /*mid*/,
+    ColormapPtr /*pSrc*/,
+    int /*client*/);
+
+extern int AllocColor(
+    ColormapPtr /*pmap*/,
+    unsigned short* /*pred*/,
+    unsigned short* /*pgreen*/,
+    unsigned short* /*pblue*/,
+    Pixel* /*pPix*/,
+    int /*client*/);
+
+extern void FakeAllocColor(
+    ColormapPtr /*pmap*/,
+    xColorItem * /*item*/);
+
+extern void FakeFreeColor(
+    ColormapPtr /*pmap*/,
+    Pixel /*pixel*/);
+
+typedef int (*ColorCompareProcPtr)(
+    EntryPtr /*pent*/,
+    xrgb * /*prgb*/);
+
+extern int FindColor(
+    ColormapPtr /*pmap*/,
+    EntryPtr /*pentFirst*/,
+    int /*size*/,
+    xrgb* /*prgb*/,
+    Pixel* /*pPixel*/,
+    int /*channel*/,
+    int /*client*/,
+    ColorCompareProcPtr /*comp*/);
+
+extern int QueryColors(
+    ColormapPtr /*pmap*/,
+    int /*count*/,
+    Pixel* /*ppixIn*/,
+    xrgb* /*prgbList*/);
+
+extern int FreeClientPixels(
+    pointer /*pcr*/,
+    XID /*fakeid*/);
+
+extern int AllocColorCells(
+    int /*client*/,
+    ColormapPtr /*pmap*/,
+    int /*colors*/,
+    int /*planes*/,
+    Bool /*contig*/,
+    Pixel* /*ppix*/,
+    Pixel* /*masks*/);
+
+extern int AllocColorPlanes(
+    int /*client*/,
+    ColormapPtr /*pmap*/,
+    int /*colors*/,
+    int /*r*/,
+    int /*g*/,
+    int /*b*/,
+    Bool /*contig*/,
+    Pixel* /*pixels*/,
+    Pixel* /*prmask*/,
+    Pixel* /*pgmask*/,
+    Pixel* /*pbmask*/);
+
+extern int FreeColors(
+    ColormapPtr /*pmap*/,
+    int /*client*/,
+    int /*count*/,
+    Pixel* /*pixels*/,
+    Pixel /*mask*/);
+
+extern int StoreColors(
+    ColormapPtr /*pmap*/,
+    int /*count*/,
+    xColorItem* /*defs*/);
+
+extern int IsMapInstalled(
+    Colormap /*map*/,
+    WindowPtr /*pWin*/);
+
+#endif /* CMAP_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/colormapst.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/colormapst.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/colormapst.h	(revision 9233)
@@ -0,0 +1,134 @@
+/*
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+*/
+
+#ifndef CMAPSTRUCT_H
+#define CMAPSTRUCT_H 1
+
+#include <X11/Xarch.h>
+
+#include "colormap.h"
+#include "screenint.h"
+#include "privates.h"
+
+/* Shared color -- the color is used by AllocColorPlanes */
+typedef struct
+{
+    unsigned short color;
+    short  refcnt;
+} SHAREDCOLOR;
+
+/* LOCO -- a local color for a PseudoColor cell. DirectColor maps always
+ * use the first value (called red) in the structure.  What channel they
+ * are really talking about depends on which map they are in. */
+typedef struct
+{
+    unsigned short	red, green, blue;
+} LOCO;
+
+/* SHCO -- a shared color for a PseudoColor cell. Used with AllocColorPlanes.
+ * DirectColor maps always use the first value (called red) in the structure.
+ * What channel they are really talking about depends on which map they
+ * are in. */
+typedef struct 
+{
+    SHAREDCOLOR *red, *green, *blue;
+} SHCO;
+
+
+/* color map entry */
+typedef struct _CMEntry
+{
+    union
+    {
+	LOCO	local;
+	SHCO	shco;
+    } co;
+    short	refcnt;
+    Bool	fShared;
+} Entry;
+
+/*
+ * COLORMAPs can be used for either Direct or Pseudo color.  PseudoColor
+ * only needs one cell table, we arbitrarily pick red.  We keep track
+ * of that table with freeRed, numPixelsRed, and clientPixelsRed
+ *
+ * The padN variables are unfortunate ABI BC. See fdo bug #6924.
+ */
+
+typedef struct _ColormapRec
+{
+    VisualPtr	pVisual;
+    short	class;		/* PseudoColor or DirectColor */
+#if defined(_XSERVER64)
+    short	pad0;
+    XID		pad1;
+#endif
+    XID		mid;		/* client's name for colormap */
+#if defined(_XSERVER64) && (X_BYTE_ORDER == X_LITTLE_ENDIAN)
+    XID		pad2;
+#endif
+    ScreenPtr	pScreen;	/* screen map is associated with */
+    short	flags;		/* 1 = IsDefault
+				 * 2 = AllAllocated */
+    int		freeRed;
+    int		freeGreen;
+    int		freeBlue;
+    int		*numPixelsRed;	
+    int		*numPixelsGreen;	
+    int		*numPixelsBlue;	
+    Pixel	**clientPixelsRed;
+    Pixel	**clientPixelsGreen;
+    Pixel	**clientPixelsBlue;
+    Entry	*red;
+    Entry 	*green;
+    Entry	*blue;
+    pointer	devPriv;
+    PrivateRec	*devPrivates;	/* dynamic devPrivates added after devPriv
+				   already existed - must keep devPriv */
+} ColormapRec;
+	      
+#endif /* COLORMAP_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/compiler.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/compiler.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/compiler.h	(revision 9233)
@@ -0,0 +1,1774 @@
+/*
+ * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Thomas Roell not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Thomas Roell makes no representations
+ * about the suitability of this software for any purpose.  It is provided
+ * "as is" without express or implied warranty.
+ *
+ * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * Copyright (c) 1994-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _COMPILER_H
+
+# define _COMPILER_H
+
+#if defined(__SUNPRO_C)
+# define DO_PROTOTYPES
+#endif
+
+/* Allow drivers to use the GCC-supported __inline__ and/or __inline. */
+# ifndef __inline__
+#  if defined(__GNUC__)
+    /* gcc has __inline__ */
+#  elif defined(__HIGHC__)
+#   define __inline__ _Inline
+#  else
+#   define __inline__ /**/
+#  endif
+# endif /* __inline__ */
+# ifndef __inline
+#  if defined(__GNUC__)
+    /* gcc has __inline */
+#  elif defined(__HIGHC__)
+#   define __inline _Inline
+#  else
+#   define __inline /**/
+#  endif
+# endif /* __inline */
+
+# if defined(IODEBUG) && defined(__GNUC__)
+#  define outb RealOutb
+#  define outw RealOutw
+#  define outl RealOutl
+#  define inb RealInb
+#  define inw RealInw
+#  define inl RealInl
+# endif
+
+# if defined(QNX4) /* Do this for now to keep Watcom happy */
+#  define outb outp
+#  define outw outpw
+#  define outl outpd 
+#  define inb inp
+#  define inw inpw
+#  define inl inpd
+
+/* Define the ffs function for inlining */
+extern int ffs(unsigned long);
+#  pragma aux ffs_ = \
+        "bsf edx, eax"          \
+        "jnz bits_set"          \
+        "xor eax, eax"          \
+        "jmp exit1"             \
+        "bits_set:"             \
+        "mov eax, edx"          \
+        "inc eax"               \
+        "exit1:"                \
+        __parm [eax]            \
+        __modify [eax edx]      \
+        __value [eax]           \
+        ;
+# endif
+
+# if defined(__SUNPRO_C)
+#  define DO_PROTOTYPES
+# endif
+
+# if defined(NO_INLINE) || defined(DO_PROTOTYPES)
+
+#  if !defined(__arm__)
+#   if !defined(__sparc__) && !defined(__sparc) && !defined(__arm32__) \
+      && !(defined(__alpha__) && defined(linux)) \
+      && !(defined(__ia64__) && defined(linux)) \
+
+extern void outb(unsigned short, unsigned char);
+extern void outw(unsigned short, unsigned short);
+extern void outl(unsigned short, unsigned int);
+extern unsigned int inb(unsigned short);
+extern unsigned int inw(unsigned short);
+extern unsigned int inl(unsigned short);
+
+#   else /* __sparc__,  __arm32__, __alpha__*/
+
+extern void outb(unsigned long, unsigned char);
+extern void outw(unsigned long, unsigned short);
+extern void outl(unsigned long, unsigned int);
+extern unsigned int inb(unsigned long);
+extern unsigned int inw(unsigned long);
+extern unsigned int inl(unsigned long);
+
+#   endif /* __sparc__,  __arm32__, __alpha__ */
+#  endif /* __arm__ */
+
+extern unsigned long ldq_u(unsigned long *);
+extern unsigned long ldl_u(unsigned int *);
+extern unsigned long ldw_u(unsigned short *);
+extern void stq_u(unsigned long, unsigned long *);
+extern void stl_u(unsigned long, unsigned int *);
+extern void stw_u(unsigned long, unsigned short *);
+extern void mem_barrier(void);
+extern void write_mem_barrier(void);
+extern void stl_brx(unsigned long, volatile unsigned char *, int);
+extern void stw_brx(unsigned short, volatile unsigned char *, int);
+extern unsigned long ldl_brx(volatile unsigned char *, int);
+extern unsigned short ldw_brx(volatile unsigned char *, int);
+
+# endif
+
+# ifndef NO_INLINE
+#  ifdef __GNUC__
+#   if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && (defined(__alpha__))
+
+#    ifdef linux
+/* for Linux on Alpha, we use the LIBC _inx/_outx routines */
+/* note that the appropriate setup via "ioperm" needs to be done */
+/*  *before* any inx/outx is done. */
+
+extern void (*_alpha_outb)(char val, unsigned long port);
+static __inline__ void
+outb(unsigned long port, unsigned char val)
+{
+    _alpha_outb(val, port);
+}
+
+extern void (*_alpha_outw)(short val, unsigned long port);
+static __inline__ void
+outw(unsigned long port, unsigned short val)
+{
+    _alpha_outw(val, port);
+}
+
+extern void (*_alpha_outl)(int val, unsigned long port);
+static __inline__ void
+outl(unsigned long port, unsigned int val)
+{
+    _alpha_outl(val, port);
+}
+
+extern unsigned int (*_alpha_inb)(unsigned long port);
+static __inline__ unsigned int
+inb(unsigned long port)
+{
+  return _alpha_inb(port);
+}
+
+extern unsigned int (*_alpha_inw)(unsigned long port);
+static __inline__ unsigned int
+inw(unsigned long port)
+{
+  return _alpha_inw(port);
+}
+
+extern unsigned int (*_alpha_inl)(unsigned long port);
+static __inline__ unsigned int
+inl(unsigned long port)
+{
+  return _alpha_inl(port);
+}
+
+#    endif /* linux */
+
+#    if (defined(__FreeBSD__) || defined(__OpenBSD__)) \
+      && !defined(DO_PROTOTYPES)
+
+/* for FreeBSD and OpenBSD on Alpha, we use the libio (resp. libalpha) */
+/*  inx/outx routines */
+/* note that the appropriate setup via "ioperm" needs to be done */
+/*  *before* any inx/outx is done. */
+
+extern void outb(unsigned int port, unsigned char val);
+extern void outw(unsigned int port, unsigned short val);
+extern void outl(unsigned int port, unsigned int val);
+extern unsigned char inb(unsigned int port);
+extern unsigned short inw(unsigned int port);
+extern unsigned int inl(unsigned int port);
+
+#    endif /* (__FreeBSD__ || __OpenBSD__ ) && !DO_PROTOTYPES */
+
+
+#if defined(__NetBSD__)
+#include <machine/pio.h>
+#endif /* __NetBSD__ */
+
+/*
+ * inline functions to do unaligned accesses
+ * from linux/include/asm-alpha/unaligned.h
+ */
+
+/*
+ * EGCS 1.1 knows about arbitrary unaligned loads.  Define some
+ * packed structures to talk about such things with.
+ */
+
+struct __una_u64 { unsigned long  x __attribute__((packed)); };
+struct __una_u32 { unsigned int   x __attribute__((packed)); };
+struct __una_u16 { unsigned short x __attribute__((packed)); };
+
+/*
+ * Elemental unaligned loads 
+ */
+/* let's try making these things static */
+
+static __inline__ unsigned long ldq_u(unsigned long * r11)
+{
+#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+	const struct __una_u64 *ptr = (const struct __una_u64 *) r11;
+	return ptr->x;
+#    else
+	unsigned long r1,r2;
+	__asm__("ldq_u %0,%3\n\t"
+		"ldq_u %1,%4\n\t"
+		"extql %0,%2,%0\n\t"
+		"extqh %1,%2,%1"
+		:"=&r" (r1), "=&r" (r2)
+		:"r" (r11),
+		 "m" (*r11),
+		 "m" (*(const unsigned long *)(7+(char *) r11)));
+	return r1 | r2;
+#    endif
+}
+
+static __inline__ unsigned long ldl_u(unsigned int * r11)
+{
+#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+	const struct __una_u32 *ptr = (const struct __una_u32 *) r11;
+	return ptr->x;
+#    else
+	unsigned long r1,r2;
+	__asm__("ldq_u %0,%3\n\t"
+		"ldq_u %1,%4\n\t"
+		"extll %0,%2,%0\n\t"
+		"extlh %1,%2,%1"
+		:"=&r" (r1), "=&r" (r2)
+		:"r" (r11),
+		 "m" (*r11),
+		 "m" (*(const unsigned long *)(3+(char *) r11)));
+	return r1 | r2;
+#    endif
+}
+
+static __inline__ unsigned long ldw_u(unsigned short * r11)
+{
+#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+	const struct __una_u16 *ptr = (const struct __una_u16 *) r11;
+	return ptr->x;
+#    else
+	unsigned long r1,r2;
+	__asm__("ldq_u %0,%3\n\t"
+		"ldq_u %1,%4\n\t"
+		"extwl %0,%2,%0\n\t"
+		"extwh %1,%2,%1"
+		:"=&r" (r1), "=&r" (r2)
+		:"r" (r11),
+		 "m" (*r11),
+		 "m" (*(const unsigned long *)(1+(char *) r11)));
+	return r1 | r2;
+#    endif
+}
+
+/*
+ * Elemental unaligned stores 
+ */
+
+static __inline__ void stq_u(unsigned long r5, unsigned long * r11)
+{
+#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+	struct __una_u64 *ptr = (struct __una_u64 *) r11;
+	ptr->x = r5;
+#    else
+	unsigned long r1,r2,r3,r4;
+
+	__asm__("ldq_u %3,%1\n\t"
+		"ldq_u %2,%0\n\t"
+		"insqh %6,%7,%5\n\t"
+		"insql %6,%7,%4\n\t"
+		"mskqh %3,%7,%3\n\t"
+		"mskql %2,%7,%2\n\t"
+		"bis %3,%5,%3\n\t"
+		"bis %2,%4,%2\n\t"
+		"stq_u %3,%1\n\t"
+		"stq_u %2,%0"
+		:"=m" (*r11),
+		 "=m" (*(unsigned long *)(7+(char *) r11)),
+		 "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4)
+		:"r" (r5), "r" (r11));
+#    endif
+}
+
+static __inline__ void stl_u(unsigned long r5, unsigned int * r11)
+{
+#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+	struct __una_u32 *ptr = (struct __una_u32 *) r11;
+	ptr->x = r5;
+#    else
+	unsigned long r1,r2,r3,r4;
+
+	__asm__("ldq_u %3,%1\n\t"
+		"ldq_u %2,%0\n\t"
+		"inslh %6,%7,%5\n\t"
+		"insll %6,%7,%4\n\t"
+		"msklh %3,%7,%3\n\t"
+		"mskll %2,%7,%2\n\t"
+		"bis %3,%5,%3\n\t"
+		"bis %2,%4,%2\n\t"
+		"stq_u %3,%1\n\t"
+		"stq_u %2,%0"
+		:"=m" (*r11),
+		 "=m" (*(unsigned long *)(3+(char *) r11)),
+		 "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4)
+		:"r" (r5), "r" (r11));
+#    endif
+}
+
+static __inline__ void stw_u(unsigned long r5, unsigned short * r11)
+{
+#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+	struct __una_u16 *ptr = (struct __una_u16 *) r11;
+	ptr->x = r5;
+#    else
+	unsigned long r1,r2,r3,r4;
+
+	__asm__("ldq_u %3,%1\n\t"
+		"ldq_u %2,%0\n\t"
+		"inswh %6,%7,%5\n\t"
+		"inswl %6,%7,%4\n\t"
+		"mskwh %3,%7,%3\n\t"
+		"mskwl %2,%7,%2\n\t"
+		"bis %3,%5,%3\n\t"
+		"bis %2,%4,%2\n\t"
+		"stq_u %3,%1\n\t"
+		"stq_u %2,%0"
+		:"=m" (*r11),
+		 "=m" (*(unsigned long *)(1+(char *) r11)),
+		 "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4)
+		:"r" (r5), "r" (r11));
+#    endif
+}
+
+/* to flush the I-cache before jumping to code which just got loaded */
+#    define PAL_imb 134
+#    define istream_mem_barrier() \
+	__asm__ __volatile__("call_pal %0 #imb" : : "i" (PAL_imb) : "memory")
+#    define mem_barrier()        __asm__ __volatile__("mb"  : : : "memory")
+#    ifdef __ELF__
+#     define write_mem_barrier()  __asm__ __volatile__("wmb" : : : "memory")
+#    else  /*  ECOFF gas 2.6 doesn't know "wmb" :-(  */
+#     define write_mem_barrier()  mem_barrier()
+#    endif
+
+
+#   elif defined(linux) && defined(__ia64__) 
+ 
+#    include <inttypes.h>
+
+#    include <sys/io.h>
+
+struct __una_u64 { uint64_t x __attribute__((packed)); };
+struct __una_u32 { uint32_t x __attribute__((packed)); };
+struct __una_u16 { uint16_t x __attribute__((packed)); };
+
+static __inline__ unsigned long
+__uldq (const unsigned long * r11)
+{
+	const struct __una_u64 *ptr = (const struct __una_u64 *) r11;
+	return ptr->x;
+}
+
+static __inline__ unsigned long
+__uldl (const unsigned int * r11)
+{
+	const struct __una_u32 *ptr = (const struct __una_u32 *) r11;
+	return ptr->x;
+}
+
+static __inline__ unsigned long
+__uldw (const unsigned short * r11)
+{
+	const struct __una_u16 *ptr = (const struct __una_u16 *) r11;
+	return ptr->x;
+}
+
+static __inline__ void
+__ustq (unsigned long r5, unsigned long * r11)
+{
+	struct __una_u64 *ptr = (struct __una_u64 *) r11;
+	ptr->x = r5;
+}
+
+static __inline__ void
+__ustl (unsigned long r5, unsigned int * r11)
+{
+	struct __una_u32 *ptr = (struct __una_u32 *) r11;
+	ptr->x = r5;
+}
+
+static __inline__ void
+__ustw (unsigned long r5, unsigned short * r11)
+{
+	struct __una_u16 *ptr = (struct __una_u16 *) r11;
+	ptr->x = r5;
+}
+
+#    define ldq_u(p)	__uldq(p)
+#    define ldl_u(p)	__uldl(p)
+#    define ldw_u(p)	__uldw(p) 
+#    define stq_u(v,p)	__ustq(v,p)
+#    define stl_u(v,p)	__ustl(v,p)
+#    define stw_u(v,p)	__ustw(v,p)
+
+#    ifndef __INTEL_COMPILER  
+#      define mem_barrier()        __asm__ __volatile__ ("mf" ::: "memory")
+#      define write_mem_barrier()  __asm__ __volatile__ ("mf" ::: "memory")
+#    else
+#      include "ia64intrin.h"
+#      define mem_barrier() __mf()
+#      define write_mem_barrier() __mf()
+#    endif
+
+/*
+ * This is overkill, but for different reasons depending on where it is used.
+ * This is thus general enough to be used everywhere cache flushes are needed.
+ * It doesn't handle memory access serialisation by other processors, though.
+ */
+#    ifndef __INTEL_COMPILER
+#       define ia64_flush_cache(Addr) \
+	__asm__ __volatile__ ( \
+		"fc.i %0;;;" \
+		"sync.i;;;" \
+		"mf;;;" \
+		"srlz.i;;;" \
+		:: "r"(Addr) : "memory")
+#    else
+#      define ia64_flush_cache(Addr) { \
+        __fc(Addr);\
+        __synci();\
+        __mf();\
+        __isrlz();\
+       }
+#    endif
+#    undef outb
+#    undef outw
+#    undef outl
+#    undef inb
+#    undef inw
+#    undef inl
+extern void outb(unsigned long port, unsigned char val);
+extern void outw(unsigned long port, unsigned short val);
+extern void outl(unsigned long port, unsigned int val);
+extern unsigned int inb(unsigned long port);
+extern unsigned int inw(unsigned long port);
+extern unsigned int inl(unsigned long port);
+ 
+#   elif defined(linux) && (defined(__amd64__) || defined(__x86_64__))
+ 
+#    include <inttypes.h>
+
+#    define ldq_u(p)	(*((unsigned long  *)(p)))
+#    define ldl_u(p)	(*((unsigned int   *)(p)))
+#    define ldw_u(p)	(*((unsigned short *)(p)))
+#    define stq_u(v,p)	(*(unsigned long  *)(p)) = (v)
+#    define stl_u(v,p)	(*(unsigned int   *)(p)) = (v)
+#    define stw_u(v,p)	(*(unsigned short *)(p)) = (v)
+  
+#    define mem_barrier() \
+       __asm__ __volatile__ ("lock; addl $0,0(%%rsp)": : :"memory")
+#    define write_mem_barrier() \
+       __asm__ __volatile__ ("": : :"memory")
+
+
+static __inline__ void
+outb(unsigned short port, unsigned char val)
+{
+   __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port));
+}
+
+
+static __inline__ void
+outw(unsigned short port, unsigned short val)
+{
+   __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port));
+}
+
+static __inline__ void
+outl(unsigned short port, unsigned int val)
+{
+   __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port));
+}
+
+static __inline__ unsigned int
+inb(unsigned short port)
+{
+   unsigned char ret;
+   __asm__ __volatile__("inb %1,%0" :
+       "=a" (ret) :
+       "d" (port));
+   return ret;
+}
+
+static __inline__ unsigned int
+inw(unsigned short port)
+{
+   unsigned short ret;
+   __asm__ __volatile__("inw %1,%0" :
+       "=a" (ret) :
+       "d" (port));
+   return ret;
+}
+
+static __inline__ unsigned int
+inl(unsigned short port)
+{
+   unsigned int ret;
+   __asm__ __volatile__("inl %1,%0" :
+       "=a" (ret) :
+       "d" (port));
+   return ret;
+}
+
+#   elif (defined(linux) || defined(Lynx) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc__)
+
+#    if !defined(Lynx)
+#     ifndef ASI_PL
+#      define ASI_PL 0x88
+#     endif
+
+#     define barrier() __asm__ __volatile__(".word 0x8143e00a": : :"memory")
+
+static __inline__ void
+outb(unsigned long port, unsigned char val)
+{
+	__asm__ __volatile__("stba %0, [%1] %2"
+			     : /* No outputs */
+			     : "r" (val), "r" (port), "i" (ASI_PL));
+	barrier();
+}
+
+static __inline__ void
+outw(unsigned long port, unsigned short val)
+{
+	__asm__ __volatile__("stha %0, [%1] %2"
+			     : /* No outputs */
+			     : "r" (val), "r" (port), "i" (ASI_PL));
+	barrier();
+}
+
+static __inline__ void
+outl(unsigned long port, unsigned int val)
+{
+	__asm__ __volatile__("sta %0, [%1] %2"
+			     : /* No outputs */
+			     : "r" (val), "r" (port), "i" (ASI_PL));
+	barrier();
+}
+
+static __inline__ unsigned int
+inb(unsigned long port)
+{
+	unsigned int ret;
+	__asm__ __volatile__("lduba [%1] %2, %0"
+			     : "=r" (ret)
+			     : "r" (port), "i" (ASI_PL));
+	return ret;
+}
+
+static __inline__ unsigned int
+inw(unsigned long port)
+{
+	unsigned int ret;
+	__asm__ __volatile__("lduha [%1] %2, %0"
+			     : "=r" (ret)
+			     : "r" (port), "i" (ASI_PL));
+	return ret;
+}
+
+static __inline__ unsigned int
+inl(unsigned long port)
+{
+	unsigned int ret;
+	__asm__ __volatile__("lda [%1] %2, %0"
+			     : "=r" (ret)
+			     : "r" (port), "i" (ASI_PL));
+	return ret;
+}
+
+static __inline__ unsigned char
+xf86ReadMmio8(__volatile__ void *base, const unsigned long offset)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+	unsigned char ret;
+
+	__asm__ __volatile__("lduba [%1] %2, %0"
+			     : "=r" (ret)
+			     : "r" (addr), "i" (ASI_PL));
+	return ret;
+}
+
+static __inline__ unsigned short
+xf86ReadMmio16Be(__volatile__ void *base, const unsigned long offset)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+	unsigned short ret;
+
+	__asm__ __volatile__("lduh [%1], %0"
+			     : "=r" (ret)
+			     : "r" (addr));
+	return ret;
+}
+
+static __inline__ unsigned short
+xf86ReadMmio16Le(__volatile__ void *base, const unsigned long offset)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+	unsigned short ret;
+
+	__asm__ __volatile__("lduha [%1] %2, %0"
+			     : "=r" (ret)
+			     : "r" (addr), "i" (ASI_PL));
+	return ret;
+}
+
+static __inline__ unsigned int
+xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+	unsigned int ret;
+
+	__asm__ __volatile__("ld [%1], %0"
+			     : "=r" (ret)
+			     : "r" (addr));
+	return ret;
+}
+
+static __inline__ unsigned int
+xf86ReadMmio32Le(__volatile__ void *base, const unsigned long offset)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+	unsigned int ret;
+
+	__asm__ __volatile__("lda [%1] %2, %0"
+			     : "=r" (ret)
+			     : "r" (addr), "i" (ASI_PL));
+	return ret;
+}
+
+static __inline__ void
+xf86WriteMmio8(__volatile__ void *base, const unsigned long offset,
+	       const unsigned int val)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+
+	__asm__ __volatile__("stba %0, [%1] %2"
+			     : /* No outputs */
+			     : "r" (val), "r" (addr), "i" (ASI_PL));
+	barrier();
+}
+
+static __inline__ void
+xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset,
+		  const unsigned int val)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+
+	__asm__ __volatile__("sth %0, [%1]"
+			     : /* No outputs */
+			     : "r" (val), "r" (addr));
+	barrier();
+}
+
+static __inline__ void
+xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset,
+		  const unsigned int val)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+
+	__asm__ __volatile__("stha %0, [%1] %2"
+			     : /* No outputs */
+			     : "r" (val), "r" (addr), "i" (ASI_PL));
+	barrier();
+}
+
+static __inline__ void
+xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
+		  const unsigned int val)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+
+	__asm__ __volatile__("st %0, [%1]"
+			     : /* No outputs */
+			     : "r" (val), "r" (addr));
+	barrier();
+}
+
+static __inline__ void
+xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
+		  const unsigned int val)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+
+	__asm__ __volatile__("sta %0, [%1] %2"
+			     : /* No outputs */
+			     : "r" (val), "r" (addr), "i" (ASI_PL));
+	barrier();
+}
+
+static __inline__ void
+xf86WriteMmio8NB(__volatile__ void *base, const unsigned long offset,
+		 const unsigned int val)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+
+	__asm__ __volatile__("stba %0, [%1] %2"
+			     : /* No outputs */
+			     : "r" (val), "r" (addr), "i" (ASI_PL));
+}
+
+static __inline__ void
+xf86WriteMmio16BeNB(__volatile__ void *base, const unsigned long offset,
+		    const unsigned int val)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+
+	__asm__ __volatile__("sth %0, [%1]"
+			     : /* No outputs */
+			     : "r" (val), "r" (addr));
+}
+
+static __inline__ void
+xf86WriteMmio16LeNB(__volatile__ void *base, const unsigned long offset,
+		    const unsigned int val)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+
+	__asm__ __volatile__("stha %0, [%1] %2"
+			     : /* No outputs */
+			     : "r" (val), "r" (addr), "i" (ASI_PL));
+}
+
+static __inline__ void
+xf86WriteMmio32BeNB(__volatile__ void *base, const unsigned long offset,
+		    const unsigned int val)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+
+	__asm__ __volatile__("st %0, [%1]"
+			     : /* No outputs */
+			     : "r" (val), "r" (addr));
+}
+
+static __inline__ void
+xf86WriteMmio32LeNB(__volatile__ void *base, const unsigned long offset,
+		    const unsigned int val)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+
+	__asm__ __volatile__("sta %0, [%1] %2"
+			     : /* No outputs */
+			     : "r" (val), "r" (addr), "i" (ASI_PL));
+}
+
+#    endif	/* !Lynx */
+
+/*
+ * EGCS 1.1 knows about arbitrary unaligned loads.  Define some
+ * packed structures to talk about such things with.
+ */
+
+#    if defined(__arch64__) || defined(__sparcv9)
+struct __una_u64 { unsigned long  x __attribute__((packed)); };
+#    endif
+struct __una_u32 { unsigned int   x __attribute__((packed)); };
+struct __una_u16 { unsigned short x __attribute__((packed)); };
+
+static __inline__ unsigned long ldq_u(unsigned long *p)
+{
+#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#     if defined(__arch64__) || defined(__sparcv9)
+	const struct __una_u64 *ptr = (const struct __una_u64 *) p;
+#     else
+	const struct __una_u32 *ptr = (const struct __una_u32 *) p;
+#     endif
+	return ptr->x;
+#    else
+	unsigned long ret;
+	memmove(&ret, p, sizeof(*p));
+	return ret;
+#    endif
+}
+
+static __inline__ unsigned long ldl_u(unsigned int *p)
+{
+#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+	const struct __una_u32 *ptr = (const struct __una_u32 *) p;
+	return ptr->x;
+#    else
+	unsigned int ret;
+	memmove(&ret, p, sizeof(*p));
+	return ret;
+#    endif
+}
+
+static __inline__ unsigned long ldw_u(unsigned short *p)
+{
+#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+	const struct __una_u16 *ptr = (const struct __una_u16 *) p;
+	return ptr->x;
+#    else
+	unsigned short ret;
+	memmove(&ret, p, sizeof(*p));
+	return ret;
+#    endif
+}
+
+static __inline__ void stq_u(unsigned long val, unsigned long *p)
+{
+#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+#     if defined(__arch64__) || defined(__sparcv9)
+	struct __una_u64 *ptr = (struct __una_u64 *) p;
+#     else
+	struct __una_u32 *ptr = (struct __una_u32 *) p;
+#     endif
+	ptr->x = val;
+#    else
+	unsigned long tmp = val;
+	memmove(p, &tmp, sizeof(*p));
+#    endif
+}
+
+static __inline__ void stl_u(unsigned long val, unsigned int *p)
+{
+#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+	struct __una_u32 *ptr = (struct __una_u32 *) p;
+	ptr->x = val;
+#    else
+	unsigned int tmp = val;
+	memmove(p, &tmp, sizeof(*p));
+#    endif
+}
+
+static __inline__ void stw_u(unsigned long val, unsigned short *p)
+{
+#    if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91))
+	struct __una_u16 *ptr = (struct __una_u16 *) p;
+	ptr->x = val;
+#    else
+	unsigned short tmp = val;
+	memmove(p, &tmp, sizeof(*p));
+#    endif
+}
+
+#    define mem_barrier()         /* XXX: nop for now */
+#    define write_mem_barrier()   /* XXX: nop for now */
+
+#   elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
+#    ifdef __arm32__
+#     define PORT_SIZE long
+#    else
+#     define PORT_SIZE short
+#    endif
+
+unsigned int IOPortBase;  /* Memory mapped I/O port area */
+
+static __inline__ void
+outb(unsigned PORT_SIZE port, unsigned char val)
+{
+	*(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
+}
+
+static __inline__ void
+outw(unsigned PORT_SIZE port, unsigned short val)
+{
+	*(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
+}
+
+static __inline__ void
+outl(unsigned PORT_SIZE port, unsigned int val)
+{
+	*(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
+}
+
+static __inline__ unsigned int
+inb(unsigned PORT_SIZE port)
+{
+	return *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase);
+}
+
+static __inline__ unsigned int
+inw(unsigned PORT_SIZE port)
+{
+	return *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+IOPortBase);
+}
+
+static __inline__ unsigned int
+inl(unsigned PORT_SIZE port)
+{
+	return *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+IOPortBase);
+}
+
+
+#    if defined(__mips__)
+static __inline__ unsigned long ldq_u(unsigned long * r11)
+{
+	unsigned long r1;
+	__asm__("lwr %0,%2\n\t"
+		"lwl %0,%3\n\t"
+		:"=&r" (r1)
+		:"r" (r11),
+		 "m" (*r11),
+		 "m" (*(unsigned long *)(3+(char *) r11)));
+	return r1;
+}
+
+static __inline__ unsigned long ldl_u(unsigned int * r11)
+{
+	unsigned long r1;
+	__asm__("lwr %0,%2\n\t"
+		"lwl %0,%3\n\t"
+		:"=&r" (r1)
+		:"r" (r11),
+		 "m" (*r11),
+		 "m" (*(unsigned long *)(3+(char *) r11)));
+	return r1;
+}
+
+static __inline__ unsigned long ldw_u(unsigned short * r11)
+{
+	unsigned long r1;
+	__asm__("lwr %0,%2\n\t"
+		"lwl %0,%3\n\t"
+		:"=&r" (r1)
+		:"r" (r11),
+		 "m" (*r11),
+		 "m" (*(unsigned long *)(1+(char *) r11)));
+	return r1;
+}
+
+#     ifdef linux	/* don't mess with other OSs */
+
+/*
+ * EGCS 1.1 knows about arbitrary unaligned loads (and we don't support older
+ * versions anyway. Define some packed structures to talk about such things
+ * with.
+ */
+
+struct __una_u32 { unsigned int   x __attribute__((packed)); };
+struct __una_u16 { unsigned short x __attribute__((packed)); };
+
+static __inline__ void stw_u(unsigned long val, unsigned short *p)
+{
+	struct __una_u16 *ptr = (struct __una_u16 *) p;
+	ptr->x = val;
+}
+
+static __inline__ void stl_u(unsigned long val, unsigned int *p)
+{
+	struct __una_u32 *ptr = (struct __una_u32 *) p;
+	ptr->x = val;
+}
+
+#       if X_BYTE_ORDER == X_BIG_ENDIAN
+static __inline__ unsigned int
+xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+	unsigned int ret;
+
+	__asm__ __volatile__("lw %0, 0(%1)"
+			     : "=r" (ret)
+			     : "r" (addr));
+	return ret;
+}
+
+static __inline__ void
+xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
+		  const unsigned int val)
+{
+	unsigned long addr = ((unsigned long)base) + offset;
+
+	__asm__ __volatile__("sw %0, 0(%1)"
+			     : /* No outputs */
+			     : "r" (val), "r" (addr));
+}
+#      endif
+
+#      define mem_barrier() \
+        __asm__ __volatile__(					\
+		"# prevent instructions being moved around\n\t"	\
+       		".set\tnoreorder\n\t"				\
+		"# 8 nops to fool the R4400 pipeline\n\t"	\
+		"nop;nop;nop;nop;nop;nop;nop;nop\n\t"		\
+		".set\treorder"					\
+		: /* no output */				\
+		: /* no input */				\
+		: "memory")
+#      define write_mem_barrier() mem_barrier()
+
+#     else  /* !linux */
+
+#      define stq_u(v,p)	stl_u(v,p)
+#      define stl_u(v,p)	(*(unsigned char *)(p)) = (v); \
+			(*(unsigned char *)(p)+1) = ((v) >> 8);  \
+			(*(unsigned char *)(p)+2) = ((v) >> 16); \
+			(*(unsigned char *)(p)+3) = ((v) >> 24)
+
+#      define stw_u(v,p)	(*(unsigned char *)(p)) = (v); \
+				(*(unsigned char *)(p)+1) = ((v) >> 8)
+
+#      define mem_barrier()   /* NOP */
+#     endif /* !linux */
+#    endif /* __mips__ */
+
+#    if defined(__arm32__)
+#     define ldq_u(p)	(*((unsigned long  *)(p)))
+#     define ldl_u(p)	(*((unsigned int   *)(p)))
+#     define ldw_u(p)	(*((unsigned short *)(p)))
+#     define stq_u(v,p)	(*(unsigned long  *)(p)) = (v)
+#     define stl_u(v,p)	(*(unsigned int   *)(p)) = (v)
+#     define stw_u(v,p)	(*(unsigned short *)(p)) = (v)
+#     define mem_barrier()	/* NOP */
+#     define write_mem_barrier()	/* NOP */
+#    endif /* __arm32__ */
+
+#   elif (defined(Lynx) || defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)) && defined(__powerpc__)
+
+#    ifndef MAP_FAILED
+#     define MAP_FAILED ((void *)-1)
+#    endif
+
+extern volatile unsigned char *ioBase;
+
+#if defined(linux) && defined(__powerpc64__)
+# include <linux/version.h>
+# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
+#  include <asm/memory.h>
+# endif
+#endif /* defined(linux) && defined(__powerpc64__) */
+#ifndef eieio /* We deal with arch-specific eieio() routines above... */
+# define eieio() __asm__ __volatile__ ("eieio" ::: "memory")
+#endif /* eieio */
+
+static __inline__ unsigned char
+xf86ReadMmio8(__volatile__ void *base, const unsigned long offset)
+{
+        register unsigned char val;
+        __asm__ __volatile__(
+                        "lbzx %0,%1,%2\n\t"
+                        "eieio"
+                        : "=r" (val)
+                        : "b" (base), "r" (offset),
+                        "m" (*((volatile unsigned char *)base+offset)));
+        return val;
+}
+
+static __inline__ unsigned short
+xf86ReadMmio16Be(__volatile__ void *base, const unsigned long offset)
+{
+        register unsigned short val;
+        __asm__ __volatile__(
+                        "lhzx %0,%1,%2\n\t"
+                        "eieio"
+                        : "=r" (val)
+                        : "b" (base), "r" (offset),
+                        "m" (*((volatile unsigned char *)base+offset)));
+        return val;
+}
+
+static __inline__ unsigned short
+xf86ReadMmio16Le(__volatile__ void *base, const unsigned long offset)
+{
+        register unsigned short val;
+        __asm__ __volatile__(
+                        "lhbrx %0,%1,%2\n\t"
+                        "eieio"
+                        : "=r" (val)
+                        : "b" (base), "r" (offset),
+                        "m" (*((volatile unsigned char *)base+offset)));
+        return val;
+}
+
+static __inline__ unsigned int
+xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
+{
+        register unsigned int val;
+        __asm__ __volatile__(
+                        "lwzx %0,%1,%2\n\t"
+                        "eieio"
+                        : "=r" (val)
+                        : "b" (base), "r" (offset),
+                        "m" (*((volatile unsigned char *)base+offset)));
+        return val;
+}
+
+static __inline__ unsigned int
+xf86ReadMmio32Le(__volatile__ void *base, const unsigned long offset)
+{
+        register unsigned int val;
+        __asm__ __volatile__(
+                        "lwbrx %0,%1,%2\n\t"
+                        "eieio"
+                        : "=r" (val)
+                        : "b" (base), "r" (offset),
+                        "m" (*((volatile unsigned char *)base+offset)));
+        return val;
+}
+
+static __inline__ void
+xf86WriteMmioNB8(__volatile__ void *base, const unsigned long offset,
+		 const unsigned char val)
+{
+        __asm__ __volatile__(
+                        "stbx %1,%2,%3\n\t"
+                        : "=m" (*((volatile unsigned char *)base+offset))
+                        : "r" (val), "b" (base), "r" (offset));
+}
+
+static __inline__ void
+xf86WriteMmioNB16Le(__volatile__ void *base, const unsigned long offset,
+		    const unsigned short val)
+{
+        __asm__ __volatile__(
+                        "sthbrx %1,%2,%3\n\t"
+                        : "=m" (*((volatile unsigned char *)base+offset))
+                        : "r" (val), "b" (base), "r" (offset));
+}
+
+static __inline__ void
+xf86WriteMmioNB16Be(__volatile__ void *base, const unsigned long offset,
+		    const unsigned short val)
+{
+        __asm__ __volatile__(
+                        "sthx %1,%2,%3\n\t"
+                        : "=m" (*((volatile unsigned char *)base+offset))
+                        : "r" (val), "b" (base), "r" (offset));
+}
+
+static __inline__ void
+xf86WriteMmioNB32Le(__volatile__ void *base, const unsigned long offset,
+		    const unsigned int val)
+{
+        __asm__ __volatile__(
+                        "stwbrx %1,%2,%3\n\t"
+                        : "=m" (*((volatile unsigned char *)base+offset))
+                        : "r" (val), "b" (base), "r" (offset));
+}
+
+static __inline__ void
+xf86WriteMmioNB32Be(__volatile__ void *base, const unsigned long offset,
+		    const unsigned int val)
+{
+        __asm__ __volatile__(
+                        "stwx %1,%2,%3\n\t"
+                        : "=m" (*((volatile unsigned char *)base+offset))
+                        : "r" (val), "b" (base), "r" (offset));
+}
+
+static __inline__ void
+xf86WriteMmio8(__volatile__ void *base, const unsigned long offset,
+               const unsigned char val)
+{
+        xf86WriteMmioNB8(base, offset, val);
+        eieio();
+}
+
+static __inline__ void
+xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset,
+                  const unsigned short val)
+{
+        xf86WriteMmioNB16Le(base, offset, val);
+        eieio();
+}
+
+static __inline__ void
+xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset,
+                  const unsigned short val)
+{
+        xf86WriteMmioNB16Be(base, offset, val);
+        eieio();
+}
+
+static __inline__ void
+xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
+                  const unsigned int val)
+{
+        xf86WriteMmioNB32Le(base, offset, val);
+        eieio();
+}
+
+static __inline__ void
+xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
+                  const unsigned int val)
+{
+        xf86WriteMmioNB32Be(base, offset, val);
+        eieio();
+}
+
+
+static __inline__ void
+outb(unsigned short port, unsigned char value)
+{
+        if(ioBase == MAP_FAILED) return;
+        xf86WriteMmio8((void *)ioBase, port, value);
+}
+
+static __inline__ void
+outw(unsigned short port, unsigned short value)
+{
+        if(ioBase == MAP_FAILED) return;
+        xf86WriteMmio16Le((void *)ioBase, port, value);
+}
+
+static __inline__ void
+outl(unsigned short port, unsigned int value)
+{
+        if(ioBase == MAP_FAILED) return;
+        xf86WriteMmio32Le((void *)ioBase, port, value);
+}
+
+static __inline__ unsigned int
+inb(unsigned short port)
+{
+        if(ioBase == MAP_FAILED) return 0;
+        return xf86ReadMmio8((void *)ioBase, port);
+}
+
+static __inline__ unsigned int
+inw(unsigned short port)
+{
+        if(ioBase == MAP_FAILED) return 0;
+        return xf86ReadMmio16Le((void *)ioBase, port);
+}
+
+static __inline__ unsigned int
+inl(unsigned short port)
+{
+        if(ioBase == MAP_FAILED) return 0;
+        return xf86ReadMmio32Le((void *)ioBase, port);
+}
+
+#    define ldq_u(p)	ldl_u(p)
+#    define ldl_u(p)	((*(unsigned char *)(p))	| \
+			(*((unsigned char *)(p)+1)<<8)	| \
+			(*((unsigned char *)(p)+2)<<16)	| \
+			(*((unsigned char *)(p)+3)<<24))
+#    define ldw_u(p)	((*(unsigned char *)(p)) | \
+			(*((unsigned char *)(p)+1)<<8))
+
+#    define stq_u(v,p)	stl_u(v,p)
+#    define stl_u(v,p)	(*(unsigned char *)(p)) = (v); \
+				(*((unsigned char *)(p)+1)) = ((v) >> 8);  \
+				(*((unsigned char *)(p)+2)) = ((v) >> 16); \
+				(*((unsigned char *)(p)+3)) = ((v) >> 24)
+#    define stw_u(v,p)	(*(unsigned char *)(p)) = (v); \
+				(*((unsigned char *)(p)+1)) = ((v) >> 8)
+
+#    define mem_barrier()	eieio()
+#    define write_mem_barrier()	eieio()
+
+#elif defined(__arm__) && defined(__linux__)
+
+#define ldq_u(p)	(*((unsigned long  *)(p)))
+#define ldl_u(p)	(*((unsigned int   *)(p)))
+#define ldw_u(p)	(*((unsigned short *)(p)))
+#define stq_u(v,p)	(*(unsigned long  *)(p)) = (v)
+#define stl_u(v,p)	(*(unsigned int   *)(p)) = (v)
+#define stw_u(v,p)	(*(unsigned short *)(p)) = (v)
+#define mem_barrier()   /* NOP */
+#define write_mem_barrier()   /* NOP */
+
+/* for Linux on ARM, we use the LIBC inx/outx routines */
+/* note that the appropriate setup via "ioperm" needs to be done */
+/*  *before* any inx/outx is done. */
+
+#include <sys/io.h>
+
+static __inline__ void
+xf_outb(unsigned short port, unsigned char val)
+{
+    outb(val, port);
+}
+
+static __inline__ void
+xf_outw(unsigned short port, unsigned short val)
+{
+    outw(val, port);
+}
+
+static __inline__ void
+xf_outl(unsigned short port, unsigned int val)
+{
+    outl(val, port);
+}
+
+#define outb xf_outb
+#define outw xf_outw
+#define outl xf_outl
+
+#define arm_flush_cache(addr)						\
+do {									\
+  register unsigned long _beg __asm ("a1") = (unsigned long) (addr);	\
+  register unsigned long _end __asm ("a2") = (unsigned long) (addr) + 4;\
+  register unsigned long _flg __asm ("a3") = 0;				\
+  __asm __volatile ("swi 0x9f0002		@ sys_cacheflush"	\
+    : "=r" (_beg)							\
+    : "0" (_beg), "r" (_end), "r" (_flg));				\
+} while (0)
+
+#   else /* ix86 */
+
+#    define ldq_u(p)	(*((unsigned long  *)(p)))
+#    define ldl_u(p)	(*((unsigned int   *)(p)))
+#    define ldw_u(p)	(*((unsigned short *)(p)))
+#    define stq_u(v,p)	(*(unsigned long  *)(p)) = (v)
+#    define stl_u(v,p)	(*(unsigned int   *)(p)) = (v)
+#    define stw_u(v,p)	(*(unsigned short *)(p)) = (v)
+#    define mem_barrier()   /* NOP */
+#    define write_mem_barrier()   /* NOP */
+
+#    if !defined(__SUNPRO_C)
+#    if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__)
+#     ifdef GCCUSESGAS
+
+/*
+ * If gcc uses gas rather than the native assembler, the syntax of these
+ * inlines has to be different.		DHD
+ */
+
+static __inline__ void
+outb(unsigned short port, unsigned char val)
+{
+   __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port));
+}
+
+
+static __inline__ void
+outw(unsigned short port, unsigned short val)
+{
+   __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port));
+}
+
+static __inline__ void
+outl(unsigned short port, unsigned int val)
+{
+   __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port));
+}
+
+static __inline__ unsigned int
+inb(unsigned short port)
+{
+   unsigned char ret;
+   __asm__ __volatile__("inb %1,%0" :
+       "=a" (ret) :
+       "d" (port));
+   return ret;
+}
+
+static __inline__ unsigned int
+inw(unsigned short port)
+{
+   unsigned short ret;
+   __asm__ __volatile__("inw %1,%0" :
+       "=a" (ret) :
+       "d" (port));
+   return ret;
+}
+
+static __inline__ unsigned int
+inl(unsigned short port)
+{
+   unsigned int ret;
+   __asm__ __volatile__("inl %1,%0" :
+       "=a" (ret) :
+       "d" (port));
+   return ret;
+}
+
+#     else	/* GCCUSESGAS */
+
+static __inline__ void
+outb(unsigned short port, unsigned char val)
+{
+  __asm__ __volatile__("out%B0 (%1)" : :"a" (val), "d" (port));
+}
+
+static __inline__ void
+outw(unsigned short port, unsigned short val)
+{
+  __asm__ __volatile__("out%W0 (%1)" : :"a" (val), "d" (port));
+}
+
+static __inline__ void
+outl(unsigned short port, unsigned int val)
+{
+  __asm__ __volatile__("out%L0 (%1)" : :"a" (val), "d" (port));
+}
+
+static __inline__ unsigned int
+inb(unsigned short port)
+{
+  unsigned char ret;
+  __asm__ __volatile__("in%B0 (%1)" :
+		   "=a" (ret) :
+		   "d" (port));
+  return ret;
+}
+
+static __inline__ unsigned int
+inw(unsigned short port)
+{
+  unsigned short ret;
+  __asm__ __volatile__("in%W0 (%1)" :
+		   "=a" (ret) :
+		   "d" (port));
+  return ret;
+}
+
+static __inline__ unsigned int
+inl(unsigned short port)
+{
+  unsigned int ret;
+  __asm__ __volatile__("in%L0 (%1)" :
+                   "=a" (ret) :
+                   "d" (port));
+  return ret;
+}
+
+#     endif /* GCCUSESGAS */
+
+#    else /* !defined(FAKEIT) && !defined(__mc68000__)  && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__)*/
+
+static __inline__ void
+outb(unsigned short port, unsigned char val)
+{
+}
+
+static __inline__ void
+outw(unsigned short port, unsigned short val)
+{
+}
+
+static __inline__ void
+outl(unsigned short port, unsigned int val)
+{
+}
+
+static __inline__ unsigned int
+inb(unsigned short port)
+{
+  return 0;
+}
+
+static __inline__ unsigned int
+inw(unsigned short port)
+{
+  return 0;
+}
+
+static __inline__ unsigned int
+inl(unsigned short port)
+{
+  return 0;
+}
+
+#    endif /* FAKEIT */
+#    endif /* __SUNPRO_C */
+
+#   endif /* ix86 */
+
+#  else /* !GNUC */
+#   if !defined(QNX4)
+#    if defined(__STDC__) && (__STDC__ == 1)
+#     ifndef asm
+#      define asm __asm
+#     endif
+#    endif
+#    ifndef SCO325
+#     if defined(__UNIXWARE__)
+#     /* avoid including <sys/types.h> for <sys/inline.h> on UnixWare */
+#      define ushort unsigned short
+#      define ushort_t unsigned short
+#      define ulong unsigned long
+#      define ulong_t unsigned long
+#      define uint_t unsigned int
+#      define uchar_t unsigned char
+#     endif /* __UNIXWARE__ */
+#     if !defined(sgi) && !defined(__SUNPRO_C)
+#      include <sys/inline.h>
+#     endif
+#    else
+#     include "scoasm.h"
+#    endif
+#    if (!defined(__HIGHC__) && !defined(sgi) && !defined(__SUNPRO_C)) || \
+	defined(__USLC__)
+#     pragma asm partial_optimization outl
+#     pragma asm partial_optimization outw
+#     pragma asm partial_optimization outb
+#     pragma asm partial_optimization inl
+#     pragma asm partial_optimization inw
+#     pragma asm partial_optimization inb
+#    endif
+#   endif
+#   define ldq_u(p)	(*((unsigned long  *)(p)))
+#   define ldl_u(p)	(*((unsigned int   *)(p)))
+#   define ldw_u(p)	(*((unsigned short *)(p)))
+#   define stq_u(v,p)	(*(unsigned long  *)(p)) = (v)
+#   define stl_u(v,p)	(*(unsigned int   *)(p)) = (v)
+#   define stw_u(v,p)	(*(unsigned short *)(p)) = (v)
+#   define mem_barrier()   /* NOP */
+#   define write_mem_barrier()   /* NOP */
+#  endif /* __GNUC__ */
+
+#  if defined(QNX4)
+#   include <sys/types.h>
+extern unsigned  inb(unsigned port);
+extern unsigned  inw(unsigned port);
+extern unsigned  inl(unsigned port);
+extern void outb(unsigned port, unsigned val);
+extern void outw(unsigned port, unsigned val);
+extern void outl(unsigned port, unsigned val);
+#  endif /* QNX4 */
+
+#  if defined(IODEBUG) && defined(__GNUC__)
+#   undef inb
+#   undef inw
+#   undef inl
+#   undef outb
+#   undef outw
+#   undef outl
+#   define inb(a) __extension__ ({unsigned char __c=RealInb(a); ErrorF("inb(0x%03x) = 0x%02x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;})
+#   define inw(a) __extension__ ({unsigned short __c=RealInw(a); ErrorF("inw(0x%03x) = 0x%04x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;})
+#   define inl(a) __extension__ ({unsigned int __c=RealInl(a); ErrorF("inl(0x%03x) = 0x%08x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;})
+
+#   define outb(a,b) (ErrorF("outb(0x%03x, 0x%02x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutb(a,b))
+#   define outw(a,b) (ErrorF("outw(0x%03x, 0x%04x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutw(a,b))
+#   define outl(a,b) (ErrorF("outl(0x%03x, 0x%08x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutl(a,b))
+#  endif
+
+# endif /* NO_INLINE */
+
+# ifdef __alpha__
+/* entry points for Mmio memory access routines */
+extern int (*xf86ReadMmio8)(void *, unsigned long);
+extern int (*xf86ReadMmio16)(void *, unsigned long);
+#  ifndef STANDALONE_MMIO
+extern int (*xf86ReadMmio32)(void *, unsigned long);
+#  else
+/* Some DRI 3D drivers need MMIO_IN32. */
+static __inline__ int
+xf86ReadMmio32(void *Base, unsigned long Offset)
+{
+	__asm__ __volatile__("mb"  : : : "memory");
+	return *(volatile unsigned int*)((unsigned long)Base+(Offset));
+}
+#  endif
+extern void (*xf86WriteMmio8)(int, void *, unsigned long);
+extern void (*xf86WriteMmio16)(int, void *, unsigned long);
+extern void (*xf86WriteMmio32)(int, void *, unsigned long);
+extern void (*xf86WriteMmioNB8)(int, void *, unsigned long);
+extern void (*xf86WriteMmioNB16)(int, void *, unsigned long);
+extern void (*xf86WriteMmioNB32)(int, void *, unsigned long);
+extern void xf86JensenMemToBus(char *, long, long, int);
+extern void xf86JensenBusToMem(char *, char *, unsigned long, int);
+extern void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int);
+extern void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int);
+
+/* Some macros to hide the system dependencies for MMIO accesses */
+/* Changed to kill noise generated by gcc's -Wcast-align */
+#  define MMIO_IN8(base, offset) (*xf86ReadMmio8)(base, offset)
+#  define MMIO_IN16(base, offset) (*xf86ReadMmio16)(base, offset)
+#  ifndef STANDALONE_MMIO
+#   define MMIO_IN32(base, offset) (*xf86ReadMmio32)(base, offset)
+#  else
+#   define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset)
+#  endif
+
+#  if defined (JENSEN_SUPPORT)
+#   define MMIO_OUT32(base, offset, val) \
+    (*xf86WriteMmio32)((CARD32)(val), base, offset)
+#   define MMIO_ONB32(base, offset, val) \
+    (*xf86WriteMmioNB32)((CARD32)(val), base, offset)
+#  else
+#   define MMIO_OUT32(base, offset, val) \
+    do { \
+	write_mem_barrier(); \
+	*(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val); \
+    } while (0)
+#   define MMIO_ONB32(base, offset, val) \
+	*(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
+#  endif
+
+#  define MMIO_OUT8(base, offset, val) \
+    (*xf86WriteMmio8)((CARD8)(val), base, offset)
+#  define MMIO_OUT16(base, offset, val) \
+    (*xf86WriteMmio16)((CARD16)(val), base, offset)
+#  define MMIO_ONB8(base, offset, val) \
+    (*xf86WriteMmioNB8)((CARD8)(val), base, offset)
+#  define MMIO_ONB16(base, offset, val) \
+    (*xf86WriteMmioNB16)((CARD16)(val), base, offset)
+#  define MMIO_MOVE32(base, offset, val) \
+    MMIO_OUT32(base, offset, val)
+
+# elif defined(__powerpc__)  
+ /* 
+  * we provide byteswapping and no byteswapping functions here
+  * with byteswapping as default, 
+  * drivers that don't need byteswapping should define PPC_MMIO_IS_BE 
+  */
+#  define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset)
+#  define MMIO_OUT8(base, offset, val) \
+    xf86WriteMmio8(base, offset, (CARD8)(val))
+#  define MMIO_ONB8(base, offset, val) \
+    xf86WriteMmioNB8(base, offset, (CARD8)(val))
+
+#  if defined(PPC_MMIO_IS_BE) /* No byteswapping */
+#   define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset)
+#   define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset)
+#   define MMIO_OUT16(base, offset, val) \
+    xf86WriteMmio16Be(base, offset, (CARD16)(val))
+#   define MMIO_OUT32(base, offset, val) \
+    xf86WriteMmio32Be(base, offset, (CARD32)(val))
+#   define MMIO_ONB16(base, offset, val) \
+    xf86WriteMmioNB16Be(base, offset, (CARD16)(val))
+#   define MMIO_ONB32(base, offset, val) \
+    xf86WriteMmioNB32Be(base, offset, (CARD32)(val))
+#  else /* byteswapping is the default */
+#   define MMIO_IN16(base, offset) xf86ReadMmio16Le(base, offset)
+#   define MMIO_IN32(base, offset) xf86ReadMmio32Le(base, offset)
+#   define MMIO_OUT16(base, offset, val) \
+     xf86WriteMmio16Le(base, offset, (CARD16)(val))
+#   define MMIO_OUT32(base, offset, val) \
+     xf86WriteMmio32Le(base, offset, (CARD32)(val))
+#   define MMIO_ONB16(base, offset, val) \
+     xf86WriteMmioNB16Le(base, offset, (CARD16)(val))
+#   define MMIO_ONB32(base, offset, val) \
+     xf86WriteMmioNB32Le(base, offset, (CARD32)(val))
+#  endif
+
+#  define MMIO_MOVE32(base, offset, val) \
+       xf86WriteMmio32Be(base, offset, (CARD32)(val))
+
+static __inline__ void ppc_flush_icache(char *addr)
+{
+	__asm__ volatile (
+		"dcbf 0,%0;" 
+		"sync;" 
+		"icbi 0,%0;" 
+		"sync;" 
+		"isync;" 
+		: : "r"(addr) : "memory");
+}
+
+# elif defined(__sparc__) || defined(sparc) || defined(__sparc)
+ /*
+  * Like powerpc, we provide byteswapping and no byteswapping functions
+  * here with byteswapping as default, drivers that don't need byteswapping
+  * should define SPARC_MMIO_IS_BE (perhaps create a generic macro so that we
+  * do not need to use PPC_MMIO_IS_BE and the sparc one in all the same places
+  * of drivers?).
+  */
+#  define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset)
+#  define MMIO_OUT8(base, offset, val) \
+    xf86WriteMmio8(base, offset, (CARD8)(val))
+#  define MMIO_ONB8(base, offset, val) \
+    xf86WriteMmio8NB(base, offset, (CARD8)(val))
+
+#  if defined(SPARC_MMIO_IS_BE) /* No byteswapping */
+#   define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset)
+#   define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset)
+#   define MMIO_OUT16(base, offset, val) \
+     xf86WriteMmio16Be(base, offset, (CARD16)(val))
+#   define MMIO_OUT32(base, offset, val) \
+     xf86WriteMmio32Be(base, offset, (CARD32)(val))
+#   define MMIO_ONB16(base, offset, val) \
+     xf86WriteMmio16BeNB(base, offset, (CARD16)(val))
+#   define MMIO_ONB32(base, offset, val) \
+     xf86WriteMmio32BeNB(base, offset, (CARD32)(val))
+#  else /* byteswapping is the default */
+#   define MMIO_IN16(base, offset) xf86ReadMmio16Le(base, offset)
+#   define MMIO_IN32(base, offset) xf86ReadMmio32Le(base, offset)
+#   define MMIO_OUT16(base, offset, val) \
+     xf86WriteMmio16Le(base, offset, (CARD16)(val))
+#   define MMIO_OUT32(base, offset, val) \
+     xf86WriteMmio32Le(base, offset, (CARD32)(val))
+#   define MMIO_ONB16(base, offset, val) \
+     xf86WriteMmio16LeNB(base, offset, (CARD16)(val))
+#   define MMIO_ONB32(base, offset, val) \
+     xf86WriteMmio32LeNB(base, offset, (CARD32)(val))
+#  endif
+
+#  define MMIO_MOVE32(base, offset, val) \
+       xf86WriteMmio32Be(base, offset, (CARD32)(val))
+
+# else /* !__alpha__ && !__powerpc__ && !__sparc__ */
+
+#  define MMIO_IN8(base, offset) \
+	*(volatile CARD8 *)(((CARD8*)(base)) + (offset))
+#  define MMIO_IN16(base, offset) \
+	*(volatile CARD16 *)(void *)(((CARD8*)(base)) + (offset))
+#  define MMIO_IN32(base, offset) \
+	*(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset))
+#  define MMIO_OUT8(base, offset, val) \
+	*(volatile CARD8 *)(((CARD8*)(base)) + (offset)) = (val)
+#  define MMIO_OUT16(base, offset, val) \
+	*(volatile CARD16 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
+#  define MMIO_OUT32(base, offset, val) \
+	*(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
+#  define MMIO_ONB8(base, offset, val) MMIO_OUT8(base, offset, val) 
+#  define MMIO_ONB16(base, offset, val) MMIO_OUT16(base, offset, val) 
+#  define MMIO_ONB32(base, offset, val) MMIO_OUT32(base, offset, val) 
+
+#  define MMIO_MOVE32(base, offset, val) MMIO_OUT32(base, offset, val)
+
+# endif /* __alpha__ */
+
+/*
+ * With Intel, the version in os-support/misc/SlowBcopy.s is used.
+ * This avoids port I/O during the copy (which causes problems with
+ * some hardware).
+ */
+# ifdef __alpha__
+#  define slowbcopy_tobus(src,dst,count) xf86SlowBCopyToBus(src,dst,count)
+#  define slowbcopy_frombus(src,dst,count) xf86SlowBCopyFromBus(src,dst,count)
+# else /* __alpha__ */
+#  define slowbcopy_tobus(src,dst,count) xf86SlowBcopy(src,dst,count)
+#  define slowbcopy_frombus(src,dst,count) xf86SlowBcopy(src,dst,count)
+# endif /* __alpha__ */
+
+#endif /* _COMPILER_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/cursor.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/cursor.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/cursor.h	(revision 9233)
@@ -0,0 +1,134 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef CURSOR_H
+#define CURSOR_H 
+
+#include "misc.h"
+#include "screenint.h"
+#include "window.h"
+
+#define NullCursor ((CursorPtr)NULL)
+
+/* Provide support for alpha composited cursors */
+#ifdef RENDER
+#define ARGB_CURSOR
+#endif
+
+typedef struct _Cursor *CursorPtr;
+typedef struct _CursorMetric *CursorMetricPtr;
+
+extern CursorPtr rootCursor;
+
+extern int FreeCursor(
+    pointer /*pCurs*/,
+    XID /*cid*/);
+
+extern int AllocARGBCursor(
+    unsigned char* /*psrcbits*/,
+    unsigned char* /*pmaskbits*/,
+    CARD32* /*argb*/,
+    CursorMetricPtr /*cm*/,
+    unsigned /*foreRed*/,
+    unsigned /*foreGreen*/,
+    unsigned /*foreBlue*/,
+    unsigned /*backRed*/,
+    unsigned /*backGreen*/,
+    unsigned /*backBlue*/,
+    CursorPtr* /*ppCurs*/,
+    ClientPtr /*client*/,
+    XID /*cid*/);
+
+extern int AllocGlyphCursor(
+    Font /*source*/,
+    unsigned int /*sourceChar*/,
+    Font /*mask*/,
+    unsigned int /*maskChar*/,
+    unsigned /*foreRed*/,
+    unsigned /*foreGreen*/,
+    unsigned /*foreBlue*/,
+    unsigned /*backRed*/,
+    unsigned /*backGreen*/,
+    unsigned /*backBlue*/,
+    CursorPtr* /*ppCurs*/,
+    ClientPtr /*client*/,
+    XID /*cid*/);
+
+extern CursorPtr CreateRootCursor(
+    char* /*pfilename*/,
+    unsigned int /*glyph*/);
+
+extern int ServerBitsFromGlyph(
+    FontPtr /*pfont*/,
+    unsigned int /*ch*/,
+    register CursorMetricPtr /*cm*/,
+    unsigned char ** /*ppbits*/);
+
+extern Bool CursorMetricsFromGlyph(
+    FontPtr /*pfont*/,
+    unsigned /*ch*/,
+    CursorMetricPtr /*cm*/);
+
+extern void CheckCursorConfinement(
+    WindowPtr /*pWin*/);
+
+extern void NewCurrentScreen(
+    ScreenPtr /*newScreen*/,
+    int /*x*/,
+    int /*y*/);
+
+extern Bool PointerConfinedToScreen(void);
+
+extern void GetSpritePosition(
+    int * /*px*/,
+    int * /*py*/);
+
+#ifdef PANORAMIX
+extern int XineramaGetCursorScreen(void);
+#endif /* PANORAMIX */
+
+#endif /* CURSOR_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/cursorstr.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/cursorstr.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/cursorstr.h	(revision 9233)
@@ -0,0 +1,98 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef CURSORSTRUCT_H
+#define CURSORSTRUCT_H 
+
+#include "cursor.h"
+#include "privates.h"
+/* 
+ * device-independent cursor storage
+ */
+
+/*
+ * source and mask point directly to the bits, which are in the server-defined
+ * bitmap format.
+ */
+typedef struct _CursorBits {
+    unsigned char *source;			/* points to bits */
+    unsigned char *mask;			/* points to bits */
+    Bool emptyMask;				/* all zeros mask */
+    unsigned short width, height, xhot, yhot;	/* metrics */
+    int refcnt;					/* can be shared */
+    PrivateRec *devPrivates;			/* set by pScr->RealizeCursor*/
+#ifdef ARGB_CURSOR
+    CARD32 *argb;				/* full-color alpha blended */
+#endif
+} CursorBits, *CursorBitsPtr;
+
+typedef struct _Cursor {
+    CursorBitsPtr bits;
+    unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */
+    unsigned short backRed, backGreen, backBlue; /* device-independent color */
+    int refcnt;
+    PrivateRec *devPrivates;			/* set by pScr->RealizeCursor*/
+    XID id;
+#ifdef XFIXES
+    CARD32 serialNumber;
+    Atom name;
+#endif
+} CursorRec;
+
+typedef struct _CursorMetric {
+    unsigned short width, height, xhot, yhot;
+} CursorMetricRec;
+
+typedef struct {
+    int                x, y;
+    ScreenPtr  pScreen;
+} HotSpot;
+
+#ifdef XEVIE
+extern HotSpot xeviehot;
+#endif
+#endif /* CURSORSTRUCT_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/damage.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/damage.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/damage.h	(revision 9233)
@@ -0,0 +1,88 @@
+/*
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Keith Packard makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _DAMAGE_H_
+#define _DAMAGE_H_
+
+typedef struct _damage	*DamagePtr;
+
+typedef enum _damageReportLevel {
+    DamageReportRawRegion,
+    DamageReportDeltaRegion,
+    DamageReportBoundingBox,
+    DamageReportNonEmpty,
+    DamageReportNone
+} DamageReportLevel;
+
+typedef void (*DamageReportFunc) (DamagePtr pDamage, RegionPtr pRegion, void *closure);
+typedef void (*DamageDestroyFunc) (DamagePtr pDamage, void *closure);
+
+Bool
+DamageSetup (ScreenPtr pScreen);
+    
+DamagePtr
+DamageCreate (DamageReportFunc  damageReport,
+	      DamageDestroyFunc	damageDestroy,
+	      DamageReportLevel damageLevel,
+	      Bool		isInternal,
+	      ScreenPtr		pScreen,
+	      void *		closure);
+
+void
+DamageDrawInternal (ScreenPtr pScreen, Bool enable);
+
+void
+DamageRegister (DrawablePtr	pDrawable,
+		DamagePtr	pDamage);
+
+void
+DamageUnregister (DrawablePtr	pDrawable,
+		  DamagePtr	pDamage);
+
+void
+DamageDestroy (DamagePtr pDamage);
+
+Bool
+DamageSubtract (DamagePtr	    pDamage,
+		const RegionPtr	    pRegion);
+
+void
+DamageEmpty (DamagePtr pDamage);
+
+RegionPtr
+DamageRegion (DamagePtr		    pDamage);
+
+RegionPtr
+DamagePendingRegion (DamagePtr	    pDamage);
+
+void
+DamageDamageRegion (DrawablePtr	    pDrawable,
+		    const RegionPtr pRegion);
+
+void
+DamageSetReportAfterOp (DamagePtr pDamage, Bool reportAfter);
+
+#endif /* _DAMAGE_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/damagestr.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/damagestr.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/damagestr.h	(revision 9233)
@@ -0,0 +1,109 @@
+/*
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Keith Packard makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _DAMAGESTR_H_
+#define _DAMAGESTR_H_
+
+#include "damage.h"
+#include "gcstruct.h"
+#include "privates.h"
+#ifdef RENDER
+# include "picturestr.h"
+#endif
+
+typedef struct _damage {
+    DamagePtr		pNext;
+    DamagePtr		pNextWin;
+    RegionRec		damage;
+    
+    DamageReportLevel	damageLevel;
+    Bool		isInternal;
+    void		*closure;
+    Bool		isWindow;
+    DrawablePtr		pDrawable;
+    
+    DamageReportFunc	damageReport;
+    DamageDestroyFunc	damageDestroy;
+
+    Bool		reportAfter;
+    RegionRec		pendingDamage;
+} DamageRec;
+
+typedef struct _damageScrPriv {
+    int				internalLevel;
+
+    /*
+     * For DDXen which don't provide GetScreenPixmap, this provides
+     * a place to hook damage for windows on the screen
+     */
+    DamagePtr			pScreenDamage;
+
+    CopyWindowProcPtr		CopyWindow;
+    CloseScreenProcPtr		CloseScreen;
+    CreateGCProcPtr		CreateGC;
+    DestroyPixmapProcPtr	DestroyPixmap;
+    SetWindowPixmapProcPtr	SetWindowPixmap;
+    DestroyWindowProcPtr	DestroyWindow;
+#ifdef RENDER
+    CompositeProcPtr		Composite;
+    GlyphsProcPtr		Glyphs;
+#endif
+} DamageScrPrivRec, *DamageScrPrivPtr;
+
+typedef struct _damageGCPriv {
+    GCOps   *ops;
+    GCFuncs *funcs;
+} DamageGCPrivRec, *DamageGCPrivPtr;
+
+/* XXX should move these into damage.c, damageScrPrivateIndex is static */
+#define damageGetScrPriv(pScr) ((DamageScrPrivPtr) \
+    dixLookupPrivate(&(pScr)->devPrivates, damageScrPrivateKey))
+
+#define damageScrPriv(pScr) \
+    DamageScrPrivPtr    pScrPriv = damageGetScrPriv(pScr)
+
+#define damageGetPixPriv(pPix) \
+    dixLookupPrivate(&(pPix)->devPrivates, damagePixPrivateKey)
+
+#define damgeSetPixPriv(pPix,v) \
+    dixSetPrivate(&(pPix)->devPrivates, damagePixPrivateKey, v)
+
+#define damagePixPriv(pPix) \
+    DamagePtr	    pDamage = damageGetPixPriv(pPix)
+
+#define damageGetGCPriv(pGC) \
+    dixLookupPrivate(&(pGC)->devPrivates, damageGCPrivateKey)
+
+#define damageGCPriv(pGC) \
+    DamageGCPrivPtr  pGCPriv = damageGetGCPriv(pGC)
+
+#define damageGetWinPriv(pWin) \
+    ((DamagePtr)dixLookupPrivate(&(pWin)->devPrivates, damageWinPrivateKey))
+
+#define damageSetWinPriv(pWin,d) \
+    dixSetPrivate(&(pWin)->devPrivates, damageWinPrivateKey, d)
+
+#endif /* _DAMAGESTR_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/dgaproc.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/dgaproc.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/dgaproc.h	(revision 9233)
@@ -0,0 +1,144 @@
+
+#ifndef __DGAPROC_H
+#define __DGAPROC_H
+
+#include <X11/Xproto.h>
+#include "pixmap.h"
+
+#define DGA_CONCURRENT_ACCESS	0x00000001
+#define DGA_FILL_RECT		0x00000002
+#define DGA_BLIT_RECT		0x00000004
+#define DGA_BLIT_RECT_TRANS	0x00000008
+#define DGA_PIXMAP_AVAILABLE	0x00000010
+
+#define DGA_INTERLACED		0x00010000
+#define DGA_DOUBLESCAN		0x00020000
+
+#define DGA_FLIP_IMMEDIATE	0x00000001
+#define DGA_FLIP_RETRACE	0x00000002
+
+#define DGA_COMPLETED		0x00000000
+#define DGA_PENDING		0x00000001
+
+#define DGA_NEED_ROOT		0x00000001
+
+typedef struct {
+   int num;		/* A unique identifier for the mode (num > 0) */
+   char *name;		/* name of mode given in the XF86Config */
+   int VSync_num;
+   int VSync_den;
+   int flags;		/* DGA_CONCURRENT_ACCESS, etc... */
+   int imageWidth;	/* linear accessible portion (pixels) */
+   int imageHeight;
+   int pixmapWidth;	/* Xlib accessible portion (pixels) */
+   int pixmapHeight;	/* both fields ignored if no concurrent access */
+   int bytesPerScanline; 
+   int byteOrder;	/* MSBFirst, LSBFirst */
+   int depth;		
+   int bitsPerPixel;
+   unsigned long red_mask;
+   unsigned long green_mask;
+   unsigned long blue_mask;
+   short visualClass;
+   int viewportWidth;
+   int viewportHeight;
+   int xViewportStep;	/* viewport position granularity */
+   int yViewportStep;
+   int maxViewportX;	/* max viewport origin */
+   int maxViewportY;
+   int viewportFlags;	/* types of page flipping possible */
+   int offset;
+   int reserved1;
+   int reserved2;
+} XDGAModeRec, *XDGAModePtr;
+
+/* DDX interface */
+
+int
+DGASetMode(
+   int Index,
+   int num,
+   XDGAModePtr mode,
+   PixmapPtr *pPix
+);
+
+void
+DGASetInputMode(
+   int Index,
+   Bool keyboard,
+   Bool mouse
+);
+
+void 
+DGASelectInput(
+   int Index,
+   ClientPtr client,
+   long mask
+);
+
+Bool DGAAvailable(int Index);
+Bool DGAActive(int Index);
+void DGAShutdown(void);
+void DGAInstallCmap(ColormapPtr cmap);
+int DGAGetViewportStatus(int Index); 
+int DGASync(int Index);
+
+int
+DGAFillRect(
+   int Index,
+   int x, int y, int w, int h,
+   unsigned long color
+);
+
+int
+DGABlitRect(
+   int Index,
+   int srcx, int srcy, 
+   int w, int h, 
+   int dstx, int dsty
+);
+
+int
+DGABlitTransRect(
+   int Index,
+   int srcx, int srcy, 
+   int w, int h, 
+   int dstx, int dsty,
+   unsigned long color
+);
+
+int
+DGASetViewport(
+   int Index,
+   int x, int y,
+   int mode
+); 
+
+int DGAGetModes(int Index);
+int DGAGetOldDGAMode(int Index);
+
+int DGAGetModeInfo(int Index, XDGAModePtr mode, int num);
+
+Bool DGAVTSwitch(void);
+Bool DGAStealButtonEvent(int Index, int button, int is_down);
+Bool DGAStealMotionEvent(int Index, int dx, int dy);
+Bool DGAStealKeyEvent(int Index, int key_code, int is_down);
+Bool DGAIsDgaEvent (xEvent *e);
+
+Bool DGADeliverEvent (ScreenPtr pScreen, xEvent *e);
+	    
+Bool DGAOpenFramebuffer(int Index, char **name, unsigned char **mem, 
+			int *size, int *offset, int *flags);
+void DGACloseFramebuffer(int Index);
+Bool DGAChangePixmapMode(int Index, int *x, int *y, int mode);
+int DGACreateColormap(int Index, ClientPtr client, int id, int mode, 
+			int alloc);
+
+extern unsigned char DGAReqCode;
+extern int DGAErrorBase;
+extern int DGAEventBase;
+extern int *XDGAEventBase;
+
+
+
+#endif /* __DGAPROC_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/dix.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/dix.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/dix.h	(revision 9233)
@@ -0,0 +1,594 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIX_H
+#define DIX_H
+
+#include "gc.h"
+#include "window.h"
+#include "input.h"
+
+#define EARLIER -1
+#define SAMETIME 0
+#define LATER 1
+
+#define NullClient ((ClientPtr) 0)
+#define REQUEST(type) \
+	register type *stuff = (type *)client->requestBuffer
+
+
+#define REQUEST_SIZE_MATCH(req)\
+    if ((sizeof(req) >> 2) != client->req_len)\
+         return(BadLength)
+
+#define REQUEST_AT_LEAST_SIZE(req) \
+    if ((sizeof(req) >> 2) > client->req_len )\
+         return(BadLength)
+
+#define REQUEST_FIXED_SIZE(req, n)\
+    if (((sizeof(req) >> 2) > client->req_len) || \
+        (((sizeof(req) + (n) + 3) >> 2) != client->req_len)) \
+         return(BadLength)
+
+#define LEGAL_NEW_RESOURCE(id,client)\
+    if (!LegalNewID(id,client)) \
+    {\
+	client->errorValue = id;\
+        return(BadIDChoice);\
+    }
+
+#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
+    {\
+	int rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
+	if (rc != Success)\
+	    return rc;\
+	rc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
+	if (rc != Success)\
+	    return rc;\
+	if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
+	    return (BadMatch);\
+    }\
+    if (pGC->serialNumber != pDraw->serialNumber)\
+	ValidateGC(pDraw, pGC);
+
+
+#define WriteReplyToClient(pClient, size, pReply) { \
+   if ((pClient)->swapped) \
+      (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
+           (pClient, (int)(size), pReply); \
+      else (void) WriteToClient(pClient, (int)(size), (char *)(pReply)); }
+
+#define WriteSwappedDataToClient(pClient, size, pbuf) \
+   if ((pClient)->swapped) \
+      (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
+   else (void) WriteToClient (pClient, (int)(size), (char *)(pbuf));
+
+typedef struct _TimeStamp *TimeStampPtr;
+
+#ifndef _XTYPEDEF_CLIENTPTR
+typedef struct _Client *ClientPtr; /* also in misc.h */
+#define _XTYPEDEF_CLIENTPTR
+#endif
+
+typedef struct _WorkQueue	*WorkQueuePtr;
+
+#ifdef XPRINT
+extern ClientPtr requestingClient;
+#endif
+extern ClientPtr *clients;
+extern ClientPtr serverClient;
+extern int currentMaxClients;
+extern char dispatchExceptionAtReset;
+
+typedef int HWEventQueueType;
+typedef HWEventQueueType* HWEventQueuePtr;
+
+extern HWEventQueuePtr checkForInput[2];
+
+typedef struct _TimeStamp {
+    CARD32 months;	/* really ~49.7 days */
+    CARD32 milliseconds;
+}           TimeStamp;
+
+/* dispatch.c */
+
+extern void SetInputCheck(
+    HWEventQueuePtr /*c0*/,
+    HWEventQueuePtr /*c1*/);
+
+extern void CloseDownClient(
+    ClientPtr /*client*/);
+
+extern void UpdateCurrentTime(void);
+
+extern void UpdateCurrentTimeIf(void);
+
+extern int dixDestroyPixmap(
+    pointer /*value*/,
+    XID /*pid*/);
+
+extern void InitClient(
+    ClientPtr /*client*/,
+    int /*i*/,
+    pointer /*ospriv*/);
+
+extern ClientPtr NextAvailableClient(
+    pointer /*ospriv*/);
+
+extern void SendErrorToClient(
+    ClientPtr /*client*/,
+    unsigned int /*majorCode*/,
+    unsigned int /*minorCode*/,
+    XID /*resId*/,
+    int /*errorCode*/);
+
+extern void MarkClientException(
+    ClientPtr /*client*/);
+
+#if defined(DDXBEFORERESET)
+extern void ddxBeforeReset (void);
+#endif
+
+/* dixutils.c */
+
+extern void CopyISOLatin1Lowered(
+    unsigned char * /*dest*/,
+    unsigned char * /*source*/,
+    int /*length*/);
+
+extern int CompareISOLatin1Lowered(
+    unsigned char * /*a*/,
+    int alen,
+    unsigned char * /*b*/,
+    int blen);
+
+extern int dixLookupWindow(
+    WindowPtr *result,
+    XID id,
+    ClientPtr client,
+    Mask access_mode);
+
+extern int dixLookupDrawable(
+    DrawablePtr *result,
+    XID id,
+    ClientPtr client,
+    Mask type_mask,
+    Mask access_mode);
+
+extern int dixLookupGC(
+    GCPtr *result,
+    XID id,
+    ClientPtr client,
+    Mask access_mode);
+
+extern int dixLookupClient(
+    ClientPtr *result,
+    XID id,
+    ClientPtr client,
+    Mask access_mode);
+
+extern void NoopDDA(void);
+
+extern int AlterSaveSetForClient(
+    ClientPtr /*client*/,
+    WindowPtr /*pWin*/,
+    unsigned /*mode*/,
+    Bool /*toRoot*/,
+    Bool /*remap*/);
+  
+extern void DeleteWindowFromAnySaveSet(
+    WindowPtr /*pWin*/);
+
+extern void BlockHandler(
+    pointer /*pTimeout*/,
+    pointer /*pReadmask*/);
+
+extern void WakeupHandler(
+    int /*result*/,
+    pointer /*pReadmask*/);
+
+typedef void (* WakeupHandlerProcPtr)(
+    pointer /* blockData */,
+    int /* result */,
+    pointer /* pReadmask */);
+
+extern Bool RegisterBlockAndWakeupHandlers(
+    BlockHandlerProcPtr /*blockHandler*/,
+    WakeupHandlerProcPtr /*wakeupHandler*/,
+    pointer /*blockData*/);
+
+extern void RemoveBlockAndWakeupHandlers(
+    BlockHandlerProcPtr /*blockHandler*/,
+    WakeupHandlerProcPtr /*wakeupHandler*/,
+    pointer /*blockData*/);
+
+extern void InitBlockAndWakeupHandlers(void);
+
+extern void ProcessWorkQueue(void);
+
+extern void ProcessWorkQueueZombies(void);
+
+extern Bool QueueWorkProc(
+    Bool (* /*function*/)(
+        ClientPtr /*clientUnused*/,
+        pointer /*closure*/),
+    ClientPtr /*client*/,
+    pointer /*closure*/
+);
+
+typedef Bool (* ClientSleepProcPtr)(
+    ClientPtr /*client*/,
+    pointer /*closure*/);
+
+extern Bool ClientSleep(
+    ClientPtr /*client*/,
+    ClientSleepProcPtr /* function */,
+    pointer /*closure*/);
+
+#ifndef ___CLIENTSIGNAL_DEFINED___
+#define ___CLIENTSIGNAL_DEFINED___
+extern Bool ClientSignal(
+    ClientPtr /*client*/);
+#endif /* ___CLIENTSIGNAL_DEFINED___ */
+
+extern void ClientWakeup(
+    ClientPtr /*client*/);
+
+extern Bool ClientIsAsleep(
+    ClientPtr /*client*/);
+
+/* atom.c */
+
+extern Atom MakeAtom(
+    char * /*string*/,
+    unsigned /*len*/,
+    Bool /*makeit*/);
+
+extern Bool ValidAtom(
+    Atom /*atom*/);
+
+extern char *NameForAtom(
+    Atom /*atom*/);
+
+extern void AtomError(void);
+
+extern void FreeAllAtoms(void);
+
+extern void InitAtoms(void);
+
+/* main.c */
+
+extern void SetVendorRelease(int release);
+
+extern void SetVendorString(char *string);
+
+/* events.c */
+
+extern void SetMaskForEvent(
+    Mask /* mask */,
+    int /* event */);
+
+
+extern Bool IsParent(
+    WindowPtr /* maybeparent */,
+    WindowPtr /* child */);
+
+extern WindowPtr GetCurrentRootWindow(void);
+
+extern WindowPtr GetSpriteWindow(void);
+
+
+extern void NoticeEventTime(xEventPtr /* xE */);
+
+extern void EnqueueEvent(
+    xEventPtr /* xE */,
+    DeviceIntPtr /* device */,
+    int	/* count */);
+
+extern void ActivatePointerGrab(
+    DeviceIntPtr /* mouse */,
+    GrabPtr /* grab */,
+    TimeStamp /* time */,
+    Bool /* autoGrab */);
+
+extern void DeactivatePointerGrab(
+    DeviceIntPtr /* mouse */);
+
+extern void ActivateKeyboardGrab(
+    DeviceIntPtr /* keybd */,
+    GrabPtr /* grab */,
+    TimeStamp /* time */,
+    Bool /* passive */);
+
+extern void DeactivateKeyboardGrab(
+    DeviceIntPtr /* keybd */);
+
+extern void AllowSome(
+    ClientPtr	/* client */,
+    TimeStamp /* time */,
+    DeviceIntPtr /* thisDev */,
+    int /* newState */);
+
+extern void ReleaseActiveGrabs(
+    ClientPtr client);
+
+extern int DeliverEventsToWindow(
+    WindowPtr /* pWin */,
+    xEventPtr /* pEvents */,
+    int /* count */,
+    Mask /* filter */,
+    GrabPtr /* grab */,
+    int /* mskidx */);
+
+extern int DeliverDeviceEvents(
+    WindowPtr /* pWin */,
+    xEventPtr /* xE */,
+    GrabPtr /* grab */,
+    WindowPtr /* stopAt */,
+    DeviceIntPtr /* dev */,
+    int /* count */);
+
+extern void DefineInitialRootWindow(
+    WindowPtr /* win */);
+
+extern void UpdateSpriteForScreen(
+     ScreenPtr /* pScreen */);
+
+extern void WindowHasNewCursor(
+    WindowPtr /* pWin */);
+
+extern Bool CheckDeviceGrabs(
+    DeviceIntPtr /* device */,
+    xEventPtr /* xE */,
+    int /* checkFirst */,
+    int /* count */);
+
+extern void DeliverFocusedEvent(
+    DeviceIntPtr /* keybd */,
+    xEventPtr /* xE */,
+    WindowPtr /* window */,
+    int /* count */);
+
+extern void DeliverGrabbedEvent(
+    xEventPtr /* xE */,
+    DeviceIntPtr /* thisDev */,
+    Bool /* deactivateGrab */,
+    int /* count */);
+
+#ifdef XKB
+extern void FixKeyState(
+    xEvent * /* xE */,
+    DeviceIntPtr /* keybd */);
+#endif /* XKB */
+
+extern void RecalculateDeliverableEvents(
+    WindowPtr /* pWin */);
+
+extern int OtherClientGone(
+    pointer /* value */,
+    XID /* id */);
+
+extern void DoFocusEvents(
+    DeviceIntPtr /* dev */,
+    WindowPtr /* fromWin */,
+    WindowPtr /* toWin */,
+    int /* mode */);
+
+extern int SetInputFocus(
+    ClientPtr /* client */,
+    DeviceIntPtr /* dev */,
+    Window /* focusID */,
+    CARD8 /* revertTo */,
+    Time /* ctime */,
+    Bool /* followOK */);
+
+extern int GrabDevice(
+    ClientPtr /* client */,
+    DeviceIntPtr /* dev */,
+    unsigned /* this_mode */,
+    unsigned /* other_mode */,
+    Window /* grabWindow */,
+    unsigned /* ownerEvents */,
+    Time /* ctime */,
+    Mask /* mask */,
+    CARD8 * /* status */);
+
+extern void InitEvents(void);
+
+extern void CloseDownEvents(void);
+
+extern void DeleteWindowFromAnyEvents(
+    WindowPtr	/* pWin */,
+    Bool /* freeResources */);
+
+
+extern Mask EventMaskForClient(
+    WindowPtr /* pWin */,
+    ClientPtr /* client */);
+
+
+
+extern int DeliverEvents(
+    WindowPtr /*pWin*/,
+    xEventPtr /*xE*/,
+    int /*count*/,
+    WindowPtr /*otherParent*/);
+
+
+extern void WriteEventsToClient(
+    ClientPtr /*pClient*/,
+    int	     /*count*/,
+    xEventPtr /*events*/);
+
+extern int TryClientEvents(
+    ClientPtr /*client*/,
+    xEventPtr /*pEvents*/,
+    int /*count*/,
+    Mask /*mask*/,
+    Mask /*filter*/,
+    GrabPtr /*grab*/);
+
+extern void WindowsRestructured(void);
+
+#ifdef PANORAMIX
+extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
+#endif
+
+#ifdef RANDR
+void
+ScreenRestructured (ScreenPtr pScreen);
+#endif
+
+extern int ffs(int i);
+
+/*
+ *  callback manager stuff
+ */
+
+#ifndef _XTYPEDEF_CALLBACKLISTPTR
+typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
+#define _XTYPEDEF_CALLBACKLISTPTR
+#endif
+
+typedef void (*CallbackProcPtr) (
+    CallbackListPtr *, pointer, pointer);
+
+extern Bool AddCallback(
+    CallbackListPtr * /*pcbl*/,
+    CallbackProcPtr /*callback*/,
+    pointer /*data*/);
+
+extern Bool DeleteCallback(
+    CallbackListPtr * /*pcbl*/,
+    CallbackProcPtr /*callback*/,
+    pointer /*data*/);
+
+extern void CallCallbacks(
+    CallbackListPtr * /*pcbl*/,
+    pointer /*call_data*/);
+
+extern void DeleteCallbackList(
+    CallbackListPtr * /*pcbl*/);
+
+extern void InitCallbackManager(void);
+
+/*
+ *  ServerGrabCallback stuff
+ */
+
+extern CallbackListPtr ServerGrabCallback;
+
+typedef enum {SERVER_GRABBED, SERVER_UNGRABBED,
+	      CLIENT_PERVIOUS, CLIENT_IMPERVIOUS } ServerGrabState;
+
+typedef struct {
+    ClientPtr client;
+    ServerGrabState grabstate;
+} ServerGrabInfoRec;
+
+/*
+ *  EventCallback stuff
+ */
+
+extern CallbackListPtr EventCallback;
+
+typedef struct {
+    ClientPtr client;
+    xEventPtr events;
+    int count;
+} EventInfoRec;
+
+/*
+ *  DeviceEventCallback stuff
+ */
+
+extern CallbackListPtr DeviceEventCallback;
+
+typedef struct {
+    xEventPtr events;
+    int count;
+} DeviceEventInfoRec;
+
+/* strcasecmp.c */
+#if NEED_STRCASECMP
+#define strcasecmp xstrcasecmp
+extern int xstrcasecmp(char *s1, char *s2);
+#endif
+
+/*
+ * These are deprecated compatibility functions and will be removed soon!
+ * Please use the noted replacements instead.
+ */
+
+/* replaced by dixLookupWindow */
+extern WindowPtr SecurityLookupWindow(
+    XID id,
+    ClientPtr client,
+    Mask access_mode);
+
+/* replaced by dixLookupWindow */
+extern WindowPtr LookupWindow(
+    XID id,
+    ClientPtr client);
+
+/* replaced by dixLookupDrawable */
+extern pointer SecurityLookupDrawable(
+    XID id,
+    ClientPtr client,
+    Mask access_mode);
+
+/* replaced by dixLookupDrawable */
+extern pointer LookupDrawable(
+    XID id,
+    ClientPtr client);
+
+/* replaced by dixLookupClient */
+extern ClientPtr LookupClient(
+    XID id,
+    ClientPtr client);
+
+#endif /* DIX_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/dixaccess.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/dixaccess.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/dixaccess.h	(revision 9233)
@@ -0,0 +1,53 @@
+/***********************************************************
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIX_ACCESS_H
+#define DIX_ACCESS_H
+
+/* These are the access modes that can be passed in the last parameter
+ * to several of the dix lookup functions.  They were originally part
+ * of the Security extension, now used by XACE.
+ *
+ * You can or these values together to indicate multiple modes
+ * simultaneously.
+ */
+
+#define DixUnknownAccess	0	/* don't know intentions */
+#define DixReadAccess		(1<<0)	/* inspecting the object */
+#define DixWriteAccess		(1<<1)	/* changing the object */
+#define DixDestroyAccess	(1<<2)	/* destroying the object */
+#define DixCreateAccess		(1<<3)	/* creating the object */
+#define DixGetAttrAccess	(1<<4)	/* get object attributes */
+#define DixSetAttrAccess	(1<<5)	/* set object attributes */
+#define DixListPropAccess	(1<<6)  /* list properties of object */
+#define DixGetPropAccess	(1<<7)	/* get properties of object */
+#define DixSetPropAccess	(1<<8)	/* set properties of object */
+#define DixGetFocusAccess	(1<<9)	/* get focus of object */
+#define DixSetFocusAccess	(1<<10)	/* set focus of object */
+#define DixListAccess		(1<<11)	/* list objects */
+#define DixAddAccess		(1<<12)	/* add object */
+#define DixRemoveAccess		(1<<13)	/* remove object */
+#define DixHideAccess		(1<<14)	/* hide object */
+#define DixShowAccess		(1<<15)	/* show object */
+#define DixBlendAccess		(1<<16)	/* mix contents of objects */
+#define DixGrabAccess		(1<<17)	/* exclusive access to object */
+#define DixFreezeAccess		(1<<18)	/* freeze status of object */
+#define DixForceAccess		(1<<19)	/* force status of object */
+#define DixInstallAccess	(1<<20)	/* install object */
+#define DixUninstallAccess	(1<<21)	/* uninstall object */
+#define DixSendAccess		(1<<22)	/* send to object */
+#define DixReceiveAccess	(1<<23)	/* receive from object */
+#define DixUseAccess		(1<<24)	/* use object */
+#define DixManageAccess		(1<<25)	/* manage object */
+#define DixDebugAccess		(1<<26)	/* debug object */
+#define DixBellAccess		(1<<27)	/* audible sound */
+
+#endif /* DIX_ACCESS_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/dixstruct.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/dixstruct.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/dixstruct.h	(revision 9233)
@@ -0,0 +1,208 @@
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIXSTRUCT_H
+#define DIXSTRUCT_H
+
+#include "dix.h"
+#include "resource.h"
+#include "cursor.h"
+#include "gc.h"
+#include "pixmap.h"
+#include "privates.h"
+#include <X11/Xmd.h>
+
+/*
+ * 	direct-mapped hash table, used by resource manager to store
+ *      translation from client ids to server addresses.
+ */
+
+#ifdef DEBUG
+#define MAX_REQUEST_LOG 100
+#endif
+
+extern CallbackListPtr ClientStateCallback;
+
+typedef struct {
+    ClientPtr 		client;
+    xConnSetupPrefix 	*prefix; 
+    xConnSetup  	*setup;
+} NewClientInfoRec;
+
+typedef void (*ReplySwapPtr) (
+		ClientPtr	/* pClient */,
+		int		/* size */,
+		void *		/* pbuf */);
+
+extern void ReplyNotSwappd (
+		ClientPtr	/* pClient */,
+		int		/* size */,
+		void *		/* pbuf */);
+
+typedef enum {ClientStateInitial,
+	      ClientStateAuthenticating,
+	      ClientStateRunning,
+	      ClientStateRetained,
+	      ClientStateGone,
+	      ClientStateCheckingSecurity,
+	      ClientStateCheckedSecurity} ClientState;
+
+#ifdef XFIXES
+typedef struct _saveSet {
+    struct _Window  *windowPtr;
+    Bool	    toRoot;
+    Bool	    remap;
+} SaveSetElt;
+#define SaveSetWindow(ss)   ((ss).windowPtr)
+#define SaveSetToRoot(ss)   ((ss).toRoot)
+#define SaveSetRemap(ss)    ((ss).remap)
+#define SaveSetAssignWindow(ss,w)   ((ss).windowPtr = (w))
+#define SaveSetAssignToRoot(ss,tr)  ((ss).toRoot = (tr))
+#define SaveSetAssignRemap(ss,rm)  ((ss).remap = (rm))
+#else
+typedef struct _Window *SaveSetElt;
+#define SaveSetWindow(ss)   (ss)
+#define SaveSetToRoot(ss)   FALSE
+#define SaveSetRemap(ss)    TRUE
+#define SaveSetAssignWindow(ss,w)   ((ss) = (w))
+#define SaveSetAssignToRoot(ss,tr)
+#define SaveSetAssignRemap(ss,rm)
+#endif
+
+typedef struct _Client {
+    int         index;
+    Mask        clientAsMask;
+    pointer     requestBuffer;
+    pointer     osPrivate;	/* for OS layer, including scheduler */
+    Bool        swapped;
+    ReplySwapPtr pSwapReplyFunc;
+    XID         errorValue;
+    int         sequence;
+    int         closeDownMode;
+    int         clientGone;
+    int         noClientException;	/* this client died or needs to be
+					 * killed */
+    SaveSetElt	*saveSet;
+    int         numSaved;
+    pointer     screenPrivate[MAXSCREENS];
+    int         (**requestVector) (
+		ClientPtr /* pClient */);
+    CARD32	req_len;		/* length of current request */
+    Bool	big_requests;		/* supports large requests */
+    int		priority;
+    ClientState clientState;
+    PrivateRec	*devPrivates;
+#ifdef XKB
+    unsigned short	xkbClientFlags;
+    unsigned short	mapNotifyMask;
+    unsigned short	newKeyboardNotifyMask;
+    unsigned short	vMajor,vMinor;
+    KeyCode		minKC,maxKC;
+#endif
+
+#ifdef DEBUG
+    unsigned char requestLog[MAX_REQUEST_LOG];
+    int         requestLogIndex;
+#endif
+    unsigned long replyBytesRemaining;
+#ifdef XAPPGROUP
+    struct _AppGroupRec*	appgroup;
+#endif
+    struct _FontResolution * (*fontResFunc) (    /* no need for font.h */
+		ClientPtr	/* pClient */,
+		int *		/* num */);
+#ifdef SMART_SCHEDULE
+    int	    smart_priority;
+    long    smart_start_tick;
+    long    smart_stop_tick;
+    long    smart_check_tick;
+#endif
+}           ClientRec;
+
+#ifdef SMART_SCHEDULE
+/*
+ * Scheduling interface
+ */
+extern long SmartScheduleTime;
+extern long SmartScheduleInterval;
+extern long SmartScheduleSlice;
+extern long SmartScheduleMaxSlice;
+extern Bool SmartScheduleDisable;
+extern void SmartScheduleStartTimer(void);
+extern void SmartScheduleStopTimer(void);
+#define SMART_MAX_PRIORITY  (20)
+#define SMART_MIN_PRIORITY  (-20)
+
+extern Bool SmartScheduleInit(void);
+
+#endif
+
+/* This prototype is used pervasively in Xext, dix */
+#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
+
+typedef struct _WorkQueue {
+    struct _WorkQueue *next;
+    Bool        (*function) (
+		ClientPtr	/* pClient */,
+		pointer		/* closure */
+);
+    ClientPtr   client;
+    pointer     closure;
+}           WorkQueueRec;
+
+extern TimeStamp currentTime;
+extern TimeStamp lastDeviceEventTime;
+
+extern int CompareTimeStamps(
+    TimeStamp /*a*/,
+    TimeStamp /*b*/);
+
+extern TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
+
+typedef struct _CallbackRec {
+  CallbackProcPtr proc;
+  pointer data;
+  Bool deleted;
+  struct _CallbackRec *next;
+} CallbackRec, *CallbackPtr;
+
+typedef struct _CallbackList {
+  int inCallback;
+  Bool deleted;
+  int numDeleted;
+  CallbackPtr list;
+} CallbackListRec;
+
+/* proc vectors */
+
+extern int (* InitialVector[3]) (ClientPtr /*client*/);
+
+extern int (* ProcVector[256]) (ClientPtr /*client*/);
+
+extern int (* SwappedProcVector[256]) (ClientPtr /*client*/);
+
+extern ReplySwapPtr ReplySwapVector[256];
+
+extern int ProcBadRequest(ClientPtr /*client*/);
+
+#endif				/* DIXSTRUCT_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/edid.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/edid.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/edid.h	(revision 9233)
@@ -0,0 +1,549 @@
+/*
+ * edid.h: defines to parse an EDID block 
+ *
+ * This file contains all information to interpret a standard EDIC block 
+ * transmitted by a display device via DDC (Display Data Channel). So far 
+ * there is no information to deal with optional EDID blocks.  
+ * DDC is a Trademark of VESA (Video Electronics Standard Association).
+ *
+ * Copyright 1998 by Egbert Eich <Egbert.Eich@Physik.TU-Darmstadt.DE>
+ */
+
+#ifndef _EDID_H_
+#define _EDID_H_ 
+
+/* read complete EDID record */
+#define EDID1_LEN 128
+#define BITS_PER_BYTE 9
+#define NUM BITS_PER_BYTE*EDID1_LEN
+#define HEADER 6
+
+#define STD_TIMINGS 8
+#define DET_TIMINGS 4
+
+#ifdef _PARSE_EDID_
+
+/* header: 0x00 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x00  */
+#define HEADER_SECTION 0
+#define HEADER_LENGTH 8
+
+/* vendor section */
+#define VENDOR_SECTION (HEADER_SECTION + HEADER_LENGTH)
+#define V_MANUFACTURER 0
+#define V_PROD_ID (V_MANUFACTURER + 2)
+#define V_SERIAL (V_PROD_ID + 2)
+#define V_WEEK (V_SERIAL + 4)
+#define V_YEAR (V_WEEK + 1)
+#define VENDOR_LENGTH (V_YEAR + 1)
+
+/* EDID version */
+#define VERSION_SECTION (VENDOR_SECTION + VENDOR_LENGTH)
+#define V_VERSION 0
+#define V_REVISION (V_VERSION + 1)
+#define VERSION_LENGTH (V_REVISION + 1)
+
+/* display information */
+#define DISPLAY_SECTION (VERSION_SECTION + VERSION_LENGTH)
+#define D_INPUT 0
+#define D_HSIZE (D_INPUT + 1)
+#define D_VSIZE (D_HSIZE + 1)
+#define D_GAMMA (D_VSIZE + 1)
+#define FEAT_S (D_GAMMA + 1)
+#define D_RG_LOW (FEAT_S + 1)
+#define D_BW_LOW (D_RG_LOW + 1)
+#define D_REDX (D_BW_LOW + 1)
+#define D_REDY (D_REDX + 1)
+#define D_GREENX (D_REDY + 1)
+#define D_GREENY (D_GREENX + 1)
+#define D_BLUEX (D_GREENY + 1)
+#define D_BLUEY (D_BLUEX + 1)
+#define D_WHITEX (D_BLUEY + 1)
+#define D_WHITEY (D_WHITEX + 1)
+#define DISPLAY_LENGTH (D_WHITEY + 1)
+
+/* supported VESA and other standard timings */
+#define ESTABLISHED_TIMING_SECTION (DISPLAY_SECTION + DISPLAY_LENGTH)
+#define E_T1 0
+#define E_T2 (E_T1 + 1)
+#define E_TMANU (E_T2 + 1)
+#define E_TIMING_LENGTH (E_TMANU + 1) 
+
+/* non predefined standard timings supported by display */
+#define STD_TIMING_SECTION (ESTABLISHED_TIMING_SECTION + E_TIMING_LENGTH)
+#define STD_TIMING_INFO_LEN 2
+#define STD_TIMING_INFO_NUM STD_TIMINGS
+#define STD_TIMING_LENGTH (STD_TIMING_INFO_LEN * STD_TIMING_INFO_NUM)
+
+/* detailed timing info of non standard timings */
+#define DET_TIMING_SECTION (STD_TIMING_SECTION + STD_TIMING_LENGTH)
+#define DET_TIMING_INFO_LEN 18
+#define MONITOR_DESC_LEN DET_TIMING_INFO_LEN
+#define DET_TIMING_INFO_NUM DET_TIMINGS
+#define DET_TIMING_LENGTH (DET_TIMING_INFO_LEN * DET_TIMING_INFO_NUM)
+
+/* number of EDID sections to follow */
+#define NO_EDID (DET_TIMING_SECTION + DET_TIMING_LENGTH)
+/* one byte checksum */
+#define CHECKSUM (NO_EDID + 1)  
+
+#if (CHECKSUM != (EDID1_LEN - 1))
+# error "EDID1 length != 128!" 
+#endif
+
+
+#define SECTION(x,y) (Uchar *)(x + y)
+#define GET_ARRAY(y) ((Uchar *)(c + y))
+#define GET(y) *(Uchar *)(c + y)
+
+/* extract information from vendor section */
+#define _PROD_ID(x) x[0] + (x[1] << 8);
+#define PROD_ID _PROD_ID(GET_ARRAY(V_PROD_ID))
+#define _SERIAL_NO(x) x[0] + (x[1] << 8) + (x[2] << 16) + (x[3] << 24)
+#define SERIAL_NO _SERIAL_NO(GET_ARRAY(V_SERIAL))
+#define _YEAR(x) (x & 0xFF) + 1990
+#define YEAR _YEAR(GET(V_YEAR))
+#define WEEK GET(V_WEEK) & 0xFF
+#define _L1(x) ((x[0] & 0x7C) >> 2) + '@'
+#define _L2(x) ((x[0] & 0x03) << 3) + ((x[1] & 0xE0) >> 5) + '@'
+#define _L3(x) (x[1] & 0x1F) + '@';
+#define L1 _L1(GET_ARRAY(V_MANUFACTURER))
+#define L2 _L2(GET_ARRAY(V_MANUFACTURER))
+#define L3 _L3(GET_ARRAY(V_MANUFACTURER))
+
+/* extract information from version section */
+#define VERSION GET(V_VERSION)
+#define REVISION GET(V_REVISION)
+
+/* extract information from display section */
+#define _INPUT_TYPE(x) ((x & 0x80) >> 7)
+#define INPUT_TYPE _INPUT_TYPE(GET(D_INPUT))
+#define _INPUT_VOLTAGE(x) ((x & 0x60) >> 5)
+#define INPUT_VOLTAGE _INPUT_VOLTAGE(GET(D_INPUT))
+#define _SETUP(x) ((x & 0x10) >> 4)
+#define SETUP _SETUP(GET(D_INPUT))
+#define _SYNC(x) (x  & 0x0F)
+#define SYNC _SYNC(GET(D_INPUT))
+#define _DFP(x) (x & 0x01)
+#define DFP _DFP(GET(D_INPUT))
+#define _BPC(x) ((x & 0x70) >> 4)
+#define BPC _BPC(GET(D_INPUT))
+#define _DIGITAL_INTERFACE(x) (x & 0x0F)
+#define DIGITAL_INTERFACE _DIGITAL_INTERFACE(GET(D_INPUT))
+#define _GAMMA(x) (x == 0xff ? 0.0 : ((x + 100.0)/100.0))
+#define GAMMA _GAMMA(GET(D_GAMMA))
+#define HSIZE_MAX GET(D_HSIZE)
+#define VSIZE_MAX GET(D_VSIZE)
+#define _DPMS(x) ((x & 0xE0) >> 5)
+#define DPMS _DPMS(GET(FEAT_S))
+#define _DISPLAY_TYPE(x) ((x & 0x18) >> 3)
+#define DISPLAY_TYPE _DISPLAY_TYPE(GET(FEAT_S))
+#define _MSC(x) (x & 0x7)
+#define MSC _MSC(GET(FEAT_S))
+
+
+/* color characteristics */
+#define CC_L(x,y) ((x & (0x03 << y)) >> y)
+#define CC_H(x) (x << 2)
+#define I_CC(x,y,z) CC_H(y) | CC_L(x,z)
+#define F_CC(x) ((x)/1024.0)
+#define REDX F_CC(I_CC((GET(D_RG_LOW)),(GET(D_REDX)),6))
+#define REDY F_CC(I_CC((GET(D_RG_LOW)),(GET(D_REDY)),4))
+#define GREENX F_CC(I_CC((GET(D_RG_LOW)),(GET(D_GREENX)),2))
+#define GREENY F_CC(I_CC((GET(D_RG_LOW)),(GET(D_GREENY)),0))
+#define BLUEX F_CC(I_CC((GET(D_BW_LOW)),(GET(D_BLUEX)),6))
+#define BLUEY F_CC(I_CC((GET(D_BW_LOW)),(GET(D_BLUEY)),4))
+#define WHITEX F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEX)),2))
+#define WHITEY F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEY)),0))
+
+/* extract information from standard timing section */
+#define T1 GET(E_T1)
+#define T2 GET(E_T2)
+#define T_MANU GET(E_TMANU)
+
+/* extract information from estabished timing section */
+#define _VALID_TIMING(x) !(((x[0] == 0x01) && (x[1] == 0x01)) \
+                        || ((x[0] == 0x00) && (x[1] == 0x00)) \
+                        || ((x[0] == 0x20) && (x[1] == 0x20)) )
+#define VALID_TIMING _VALID_TIMING(c)
+#define _HSIZE1(x) ((x[0] + 31) * 8)
+#define HSIZE1 _HSIZE1(c)
+#define RATIO(x) ((x[1] & 0xC0) >> 6)
+#define RATIO1_1 0
+/* EDID Ver. 1.3 redefined this */
+#define RATIO16_10 RATIO1_1
+#define RATIO4_3 1
+#define RATIO5_4 2
+#define RATIO16_9 3
+#define _VSIZE1(x,y,r) switch(RATIO(x)){ \
+  case RATIO1_1: y =  ((v->version > 1 || v->revision > 2) \
+		       ? (_HSIZE1(x) * 10) / 16 : _HSIZE1(x)); break; \
+  case RATIO4_3: y = _HSIZE1(x) * 3 / 4; break; \
+  case RATIO5_4: y = _HSIZE1(x) * 4 / 5; break; \
+  case RATIO16_9: y = _HSIZE1(x) * 9 / 16; break; \
+  }
+#define VSIZE1(x) _VSIZE1(c,x,v)
+#define _REFRESH_R(x) (x[1] & 0x3F) + 60
+#define REFRESH_R  _REFRESH_R(c)
+#define _ID_LOW(x) x[0]
+#define ID_LOW _ID_LOW(c)
+#define _ID_HIGH(x) (x[1] << 8)
+#define ID_HIGH _ID_HIGH(c)
+#define STD_TIMING_ID (ID_LOW | ID_HIGH)
+#define _NEXT_STD_TIMING(x)  (x = (x + STD_TIMING_INFO_LEN))
+#define NEXT_STD_TIMING _NEXT_STD_TIMING(c)
+
+
+/* EDID Ver. >= 1.2 */
+/**
+ * Returns true if the pointer is the start of a monitor descriptor block
+ * instead of a detailed timing descriptor.
+ *
+ * Checking the reserved pad fields for zeroes fails on some monitors with
+ * broken empty ASCII strings.  Only the first two bytes are reliable.
+ */
+#define _IS_MONITOR_DESC(x) (x[0] == 0 && x[1] == 0)
+#define IS_MONITOR_DESC _IS_MONITOR_DESC(c)
+#define _PIXEL_CLOCK(x) (x[0] + (x[1] << 8)) * 10000
+#define PIXEL_CLOCK _PIXEL_CLOCK(c)
+#define _H_ACTIVE(x) (x[2] + ((x[4] & 0xF0) << 4))
+#define H_ACTIVE _H_ACTIVE(c)
+#define _H_BLANK(x) (x[3] + ((x[4] & 0x0F) << 8))
+#define H_BLANK _H_BLANK(c)
+#define _V_ACTIVE(x) (x[5] + ((x[7] & 0xF0) << 4))
+#define V_ACTIVE _V_ACTIVE(c)
+#define _V_BLANK(x) (x[6] + ((x[7] & 0x0F) << 8))
+#define V_BLANK _V_BLANK(c)
+#define _H_SYNC_OFF(x) (x[8] + ((x[11] & 0xC0) << 2))
+#define H_SYNC_OFF _H_SYNC_OFF(c)
+#define _H_SYNC_WIDTH(x) (x[9] + ((x[11] & 0x30) << 4))
+#define H_SYNC_WIDTH _H_SYNC_WIDTH(c)
+#define _V_SYNC_OFF(x) ((x[10] >> 4) + ((x[11] & 0x0C) << 2))
+#define V_SYNC_OFF _V_SYNC_OFF(c)
+#define _V_SYNC_WIDTH(x) ((x[10] & 0x0F) + ((x[11] & 0x03) << 4))
+#define V_SYNC_WIDTH _V_SYNC_WIDTH(c)
+#define _H_SIZE(x) (x[12] + ((x[14] & 0xF0) << 4))
+#define H_SIZE _H_SIZE(c)
+#define _V_SIZE(x) (x[13] + ((x[14] & 0x0F) << 8))
+#define V_SIZE _V_SIZE(c)
+#define _H_BORDER(x) (x[15])
+#define H_BORDER _H_BORDER(c)
+#define _V_BORDER(x) (x[16])
+#define V_BORDER _V_BORDER(c)
+#define _INTERLACED(x) ((x[17] & 0x80) >> 7)
+#define INTERLACED _INTERLACED(c)
+#define _STEREO(x) ((x[17] & 0x60) >> 5)
+#define STEREO _STEREO(c)
+#define _STEREO1(x) (x[17] & 0x1)
+#define STEREO1 _STEREO(c)
+#define _SYNC_T(x) ((x[17] & 0x18) >> 3)
+#define SYNC_T _SYNC_T(c)
+#define _MISC(x) ((x[17] & 0x06) >> 1)
+#define MISC _MISC(c)
+
+#define _MONITOR_DESC_TYPE(x) x[3]
+#define MONITOR_DESC_TYPE _MONITOR_DESC_TYPE(c)
+#define SERIAL_NUMBER 0xFF
+#define ASCII_STR 0xFE
+#define MONITOR_RANGES 0xFD
+#define _MIN_V_OFFSET(x) ((!!(x[4] & 0x01)) * 255)
+#define _MAX_V_OFFSET(x) ((!!(x[4] & 0x02)) * 255)
+#define _MIN_H_OFFSET(x) ((!!(x[4] & 0x04)) * 255)
+#define _MAX_H_OFFSET(x) ((!!(x[4] & 0x08)) * 255)
+#define _MIN_V(x) x[5]
+#define MIN_V (_MIN_V(c) + _MIN_V_OFFSET(c))
+#define _MAX_V(x) x[6]
+#define MAX_V (_MAX_V(c) + _MAX_V_OFFSET(c))
+#define _MIN_H(x) x[7]
+#define MIN_H (_MIN_H(c) + _MIN_H_OFFSET(c))
+#define _MAX_H(x) x[8]
+#define MAX_H (_MAX_H(c) + _MAX_H_OFFSET(c))
+#define _MAX_CLOCK(x) x[9]
+#define MAX_CLOCK _MAX_CLOCK(c) 
+#define _HAVE_2ND_GTF(x) (x[10] == 0x02)
+#define HAVE_2ND_GTF _HAVE_2ND_GTF(c)
+#define _F_2ND_GTF(x) (x[12] * 2)
+#define F_2ND_GTF _F_2ND_GTF(c)
+#define _C_2ND_GTF(x) (x[13] / 2)
+#define C_2ND_GTF _C_2ND_GTF(c)
+#define _M_2ND_GTF(x) (x[14] + (x[15] << 8))
+#define M_2ND_GTF _M_2ND_GTF(c)
+#define _K_2ND_GTF(x) (x[16])
+#define K_2ND_GTF _K_2ND_GTF(c)
+#define _J_2ND_GTF(x) (x[17] / 2)
+#define J_2ND_GTF _J_2ND_GTF(c)
+#define _HAVE_CVT(x) (x[10] == 0x04)
+#define HAVE_CVT _HAVE_CVT(c)
+#define _MAX_CLOCK_KHZ(x) (x[12] >> 2)
+#define MAX_CLOCK_KHZ (MAX_CLOCK * 10000) - (_MAX_CLOCK_KHZ(c) * 250)
+#define _MAXWIDTH(x) ((x[13] == 0 ? 0 : x[13] + ((x[12] & 0x03) << 8)) * 8)
+#define MAXWIDTH _MAXWIDTH(c)
+#define _SUPPORTED_ASPECT(x) x[14]
+#define SUPPORTED_ASPECT _SUPPORTED_ASPECT(c)
+#define  SUPPORTED_ASPECT_4_3   0x80
+#define  SUPPORTED_ASPECT_16_9  0x40
+#define  SUPPORTED_ASPECT_16_10 0x20
+#define  SUPPORTED_ASPECT_5_4   0x10
+#define  SUPPORTED_ASPECT_15_9  0x08
+#define _PREFERRED_ASPECT(x) ((x[15] & 0xe0) >> 5)
+#define PREFERRED_ASPECT _PREFERRED_ASPECT(c)
+#define  PREFERRED_ASPECT_4_3   0
+#define  PREFERRED_ASPECT_16_9  1
+#define  PREFERRED_ASPECT_16_10 2
+#define  PREFERRED_ASPECT_5_4   3
+#define  PREFERRED_ASPECT_15_9  4
+#define _SUPPORTED_BLANKING(x) ((x[15] & 0x18) >> 3)
+#define SUPPORTED_BLANKING _SUPPORTED_BLANKING(c)
+#define  CVT_STANDARD 0x01
+#define  CVT_REDUCED  0x02
+#define _SUPPORTED_SCALING(x) ((x[16] & 0xf0) >> 4)
+#define SUPPORTED_SCALING _SUPPORTED_SCALING(c)
+#define  SCALING_HSHRINK  0x08
+#define  SCALING_HSTRETCH 0x04
+#define  SCALING_VSHRINK  0x02
+#define  SCALING_VSTRETCH 0x01
+#define _PREFERRED_REFRESH(x) x[17]
+#define PREFERRED_REFRESH _PREFERRED_REFRESH(c)
+
+#define MONITOR_NAME 0xFC
+#define ADD_COLOR_POINT 0xFB
+#define WHITEX F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEX)),2))
+#define WHITEY F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEY)),0))
+#define _WHITEX_ADD(x,y) F_CC(I_CC(((*(x + y))),(*(x + y + 1)),2))
+#define _WHITEY_ADD(x,y) F_CC(I_CC(((*(x + y))),(*(x + y + 2)),0))
+#define _WHITE_INDEX1(x) x[5]
+#define WHITE_INDEX1 _WHITE_INDEX1(c)
+#define _WHITE_INDEX2(x) x[10]
+#define WHITE_INDEX2 _WHITE_INDEX2(c)
+#define WHITEX1 _WHITEX_ADD(c,6)
+#define WHITEY1 _WHITEY_ADD(c,6)
+#define WHITEX2 _WHITEX_ADD(c,12)
+#define WHITEY2 _WHITEY_ADD(c,12)
+#define _WHITE_GAMMA1(x) _GAMMA(x[9])
+#define WHITE_GAMMA1 _WHITE_GAMMA1(c) 
+#define _WHITE_GAMMA2(x) _GAMMA(x[14])
+#define WHITE_GAMMA2 _WHITE_GAMMA2(c)
+#define ADD_STD_TIMINGS 0xFA
+#define COLOR_MANAGEMENT_DATA 0xF9
+#define CVT_3BYTE_DATA 0xF8
+#define ADD_EST_TIMINGS 0xF7
+#define ADD_DUMMY 0x10
+
+#define _NEXT_DT_MD_SECTION(x) (x = (x + DET_TIMING_INFO_LEN))
+#define NEXT_DT_MD_SECTION _NEXT_DT_MD_SECTION(c)
+
+#endif /* _PARSE_EDID_ */
+
+/* input type */
+#define DIGITAL(x) x
+
+/* DFP */
+#define DFP1(x) x
+
+/* input voltage level */
+#define V070 0  /* 0.700V/0.300V */
+#define V071 1  /* 0.714V/0.286V */
+#define V100 2  /* 1.000V/0.400V */
+#define V007 3 /* 0.700V/0.000V */
+
+/* Signal level setup */
+#define SIG_SETUP(x) (x)
+
+/* sync characteristics */
+#define SEP_SYNC(x) (x & 0x08)
+#define COMP_SYNC(x) (x & 0x04)
+#define SYNC_O_GREEN(x) (x & 0x02)
+#define SYNC_SERR(x) (x & 0x01)
+
+/* DPMS features */
+#define DPMS_STANDBY(x) (x & 0x04)
+#define DPMS_SUSPEND(x) (x & 0x02)
+#define DPMS_OFF(x) (x & 0x01)
+
+/* display type, analog */
+#define DISP_MONO 0
+#define DISP_RGB 1
+#define DISP_MULTCOLOR 2
+
+/* display color encodings, digital */
+#define DISP_YCRCB444 0x01
+#define DISP_YCRCB422 0x02
+
+/* Msc stuff EDID Ver > 1.1 */
+#define STD_COLOR_SPACE(x) (x & 0x4)
+#define PREFERRED_TIMING_MODE(x) (x & 0x2)
+#define GFT_SUPPORTED(x) (x & 0x1)
+#define GTF_SUPPORTED(x) (x & 0x1)
+#define CVT_SUPPORTED(x) (x & 0x1)
+
+/* detailed timing misc */
+#define IS_INTERLACED(x)  (x) 
+#define IS_STEREO(x)  (x) 
+#define IS_RIGHT_STEREO(x) (x & 0x01)
+#define IS_LEFT_STEREO(x) (x & 0x02)
+#define IS_4WAY_STEREO(x) (x & 0x03)
+#define IS_RIGHT_ON_SYNC(x) IS_RIGHT_STEREO(x)
+#define IS_LEFT_ON_SYNC(x) IS_LEFT_STEREO(x)
+
+
+typedef unsigned int Uint;
+typedef unsigned char Uchar;
+
+struct vendor {
+  char name[4];
+  int prod_id;
+  Uint serial;
+  int week;
+  int year;
+};
+
+struct edid_version {
+  int version;
+  int revision;
+};
+
+struct disp_features {
+  unsigned int input_type:1;
+  unsigned int input_voltage:2;
+  unsigned int input_setup:1;
+  unsigned int input_sync:5;
+  unsigned int input_dfp:1;
+  unsigned int input_bpc:3;
+  unsigned int input_interface:4;
+  /* 15 bit hole */
+  int hsize;
+  int vsize;
+  float gamma;
+  unsigned int dpms:3;
+  unsigned int display_type:2;
+  unsigned int msc:3;
+  float redx;
+  float redy;
+  float greenx;
+  float greeny;
+  float bluex;
+  float bluey;
+  float whitex;
+  float whitey;
+};
+
+struct established_timings {
+  Uchar t1;
+  Uchar t2;
+  Uchar t_manu;
+};
+
+struct std_timings {
+  int hsize;
+  int vsize;
+  int refresh;
+  CARD16 id;
+};
+
+struct detailed_timings {
+  int clock;
+  int h_active;
+  int h_blanking;
+  int v_active;
+  int v_blanking;
+  int h_sync_off;
+  int h_sync_width;
+  int v_sync_off;
+  int v_sync_width;
+  int h_size;
+  int v_size;
+  int h_border;
+  int v_border;
+  unsigned int interlaced:1;
+  unsigned int stereo:2;
+  unsigned int sync:2;
+  unsigned int misc:2;
+  unsigned int stereo_1:1;
+};
+
+#define DT 0
+#define DS_SERIAL 0xFF
+#define DS_ASCII_STR 0xFE
+#define DS_NAME 0xFC
+#define DS_RANGES 0xFD
+#define DS_WHITE_P 0xFB
+#define DS_STD_TIMINGS 0xFA
+#define DS_CMD 0xF9
+#define DS_CVT 0xF8
+#define DS_EST_III 0xF7
+#define DS_DUMMY 0x10
+#define DS_UNKOWN 0x100 /* type is an int */
+#define DS_VENDOR 0x101
+#define DS_VENDOR_MAX 0x110
+
+struct monitor_ranges {
+  int min_v;
+  int max_v;
+  int min_h;
+  int max_h;
+  int max_clock;    /* in mhz */
+  int gtf_2nd_f;
+  int gtf_2nd_c;
+  int gtf_2nd_m;
+  int gtf_2nd_k;
+  int gtf_2nd_j;
+  int max_clock_khz;
+  int maxwidth;	    /* in pixels */
+  char supported_aspect;
+  char preferred_aspect;
+  char supported_blanking;
+  char supported_scaling;
+  int preferred_refresh; /* in hz */
+};
+
+struct whitePoints{
+  int   index;
+  float white_x;
+  float white_y;
+  float white_gamma;
+};
+
+struct cvt_timings {
+    int width;
+    int height;
+    int rate;
+    int rates;
+};
+
+/*
+ * Be careful when adding new sections; this structure can't grow, it's
+ * embedded in the middle of xf86Monitor which is ABI.  Sizes below are
+ * in bytes, for ILP32 systems.  If all else fails just copy the section
+ * literally like serial and friends.
+ */
+struct detailed_monitor_section {
+  int type;
+  union {
+    struct detailed_timings d_timings;	/* 56 */
+    Uchar serial[13];
+    Uchar ascii_data[13];
+    Uchar name[13];
+    struct monitor_ranges ranges;	/* 56 */
+    struct std_timings std_t[5];	/* 80 */
+    struct whitePoints wp[2];		/* 32 */
+    /* color management data */
+    struct cvt_timings cvt[4];		/* 64 */
+    /* established timings III */
+  } section;				/* max: 80 */
+};
+
+typedef struct {
+  int scrnIndex;
+  struct vendor vendor;
+  struct edid_version ver;
+  struct disp_features features;
+  struct established_timings timings1;
+  struct std_timings timings2[8];
+  struct detailed_monitor_section det_mon[4];
+  void *vdif; /* unused */
+  int no_sections;
+  Uchar *rawData;
+} xf86Monitor, *xf86MonPtr;
+
+extern xf86MonPtr ConfiguredMonitor;
+
+#endif /* _EDID_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/extension.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/extension.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/extension.h	(revision 9233)
@@ -0,0 +1,69 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef EXTENSION_H
+#define EXTENSION_H 
+
+_XFUNCPROTOBEGIN
+
+extern unsigned short StandardMinorOpcode(ClientPtr /*client*/);
+
+extern unsigned short MinorOpcodeOfRequest(ClientPtr /*client*/);
+
+extern Bool EnableDisableExtension(char *name, Bool enable);
+
+extern void EnableDisableExtensionError(char *name, Bool enable);
+
+extern void InitExtensions(int argc, char **argv);
+
+extern void InitVisualWrap(void);
+
+extern void CloseDownExtensions(void);
+
+_XFUNCPROTOEND
+
+#endif /* EXTENSION_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/extnsionst.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/extnsionst.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/extnsionst.h	(revision 9233)
@@ -0,0 +1,112 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef EXTENSIONSTRUCT_H
+#define EXTENSIONSTRUCT_H 
+
+#include "dix.h"
+#include "misc.h"
+#include "screenint.h"
+#include "extension.h"
+#include "gc.h"
+#include "privates.h"
+
+typedef struct _ExtensionEntry {
+    int index;
+    void (* CloseDown)(	/* called at server shutdown */
+	struct _ExtensionEntry * /* extension */);
+    char *name;               /* extension name */
+    int base;                 /* base request number */
+    int eventBase;            
+    int eventLast;
+    int errorBase;
+    int errorLast;
+    int num_aliases;
+    char **aliases;
+    pointer extPrivate;
+    unsigned short (* MinorOpcode)(	/* called for errors */
+	ClientPtr /* client */);
+    PrivateRec *devPrivates;
+} ExtensionEntry;
+
+/* 
+ * The arguments may be different for extension event swapping functions.
+ * Deal with this by casting when initializing the event's EventSwapVector[]
+ * entries.
+ */
+typedef void (*EventSwapPtr) (xEvent *, xEvent *);
+
+extern EventSwapPtr EventSwapVector[128];
+
+extern void NotImplemented (	/* FIXME: this may move to another file... */
+	xEvent *,
+	xEvent *);
+
+#define    SetGCVector(pGC, VectorElement, NewRoutineAddress, Atom)    \
+    pGC->VectorElement = NewRoutineAddress;
+
+#define    GetGCValue(pGC, GCElement)    (pGC->GCElement)
+
+extern ExtensionEntry *AddExtension(
+    char* /*name*/,
+    int /*NumEvents*/,
+    int /*NumErrors*/,
+    int (* /*MainProc*/)(ClientPtr /*client*/),
+    int (* /*SwappedMainProc*/)(ClientPtr /*client*/),
+    void (* /*CloseDownProc*/)(ExtensionEntry * /*extension*/),
+    unsigned short (* /*MinorOpcodeProc*/)(ClientPtr /*client*/)
+);
+
+extern Bool AddExtensionAlias(
+    char* /*alias*/,
+    ExtensionEntry * /*extension*/);
+
+extern ExtensionEntry *CheckExtension(const char *extname);
+extern ExtensionEntry *GetExtensionEntry(int major);
+
+#endif /* EXTENSIONSTRUCT_H */
+
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/fb.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/fb.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/fb.h	(revision 9233)
@@ -0,0 +1,2095 @@
+/*
+ *
+ * Copyright © 1998 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Keith Packard makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+#ifndef _FB_H_
+#define _FB_H_
+
+#include <X11/X.h>
+#include <pixman.h>
+
+#include "scrnintstr.h"
+#include "pixmap.h"
+#include "pixmapstr.h"
+#include "region.h"
+#include "gcstruct.h"
+#include "colormap.h"
+#include "miscstruct.h"
+#include "servermd.h"
+#include "windowstr.h"
+#include "privates.h"
+#include "mi.h"
+#include "migc.h"
+#include "mibstore.h"
+#ifdef RENDER
+#include "picturestr.h"
+#else
+#include "picture.h"
+#endif
+
+#ifdef FB_ACCESS_WRAPPER
+
+#include "wfbrename.h"
+#define FBPREFIX(x) wfb##x
+#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr))))
+#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr))))
+
+#define MEMCPY_WRAPPED(dst, src, size) do {                       \
+    size_t _i;                                                    \
+    CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src);           \
+    for(_i = 0; _i < size; _i++) {                                \
+        WRITE(_dst +_i, READ(_src + _i));                         \
+    }                                                             \
+} while(0)
+
+#define MEMSET_WRAPPED(dst, val, size) do {                       \
+    size_t _i;                                                    \
+    CARD8 *_dst = (CARD8*)(dst);                                  \
+    for(_i = 0; _i < size; _i++) {                                \
+        WRITE(_dst +_i, (val));                                   \
+    }                                                             \
+} while(0)
+
+#else
+
+#define FBPREFIX(x) fb##x
+#define WRITE(ptr, val) (*(ptr) = (val))
+#define READ(ptr) (*(ptr))
+#define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size))
+#define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size))
+
+#endif
+
+/*
+ * This single define controls the basic size of data manipulated
+ * by this software; it must be log2(sizeof (FbBits) * 8)
+ */
+
+#ifndef FB_SHIFT
+#define FB_SHIFT    LOG2_BITMAP_PAD
+#endif
+
+#if FB_SHIFT < LOG2_BITMAP_PAD
+    error FB_SHIFT must be >= LOG2_BITMAP_PAD
+#endif
+    
+#define FB_UNIT	    (1 << FB_SHIFT)
+#define FB_HALFUNIT (1 << (FB_SHIFT-1))
+#define FB_MASK	    (FB_UNIT - 1)
+#define FB_ALLONES  ((FbBits) -1)
+    
+#if GLYPHPADBYTES != 4
+#error "GLYPHPADBYTES must be 4"
+#endif
+#if GETLEFTBITS_ALIGNMENT != 1
+#error "GETLEFTBITS_ALIGNMENT must be 1"
+#endif
+/* whether to bother to include 24bpp support */
+#ifndef FBNO24BIT
+#define FB_24BIT
+#endif
+
+/*
+ * Unless otherwise instructed, fb includes code to advertise 24bpp
+ * windows with 32bpp image format for application compatibility
+ */
+
+#ifdef FB_24BIT
+#ifndef FBNO24_32
+#define FB_24_32BIT
+#endif
+#endif
+
+#define FB_STIP_SHIFT	LOG2_BITMAP_PAD
+#define FB_STIP_UNIT	(1 << FB_STIP_SHIFT)
+#define FB_STIP_MASK	(FB_STIP_UNIT - 1)
+#define FB_STIP_ALLONES	((FbStip) -1)
+    
+#define FB_STIP_ODDSTRIDE(s)	(((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0)
+#define FB_STIP_ODDPTR(p)	((((long) (p)) & (FB_MASK >> 3)) != 0)
+    
+#define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT)))
+#define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT)))
+    
+#define FbFullMask(n)   ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
+    
+#if FB_SHIFT == 6
+# ifdef WIN32
+typedef unsigned __int64    FbBits;
+# else
+#  if defined(__alpha__) || defined(__alpha) || \
+      defined(ia64) || defined(__ia64__) || \
+      defined(__sparc64__) || defined(_LP64) || \
+      defined(__s390x__) || \
+      defined(amd64) || defined (__amd64__) || defined(__x86_64__) || \
+      defined (__powerpc64__) || \
+      (defined(sgi) && (_MIPS_SZLONG == 64))
+typedef unsigned long	    FbBits;
+#  else
+typedef unsigned long long  FbBits;
+#  endif
+# endif
+#endif
+
+#if FB_SHIFT == 5
+typedef CARD32		    FbBits;
+#endif
+
+#if FB_SHIFT == 4
+typedef CARD16		    FbBits;
+#endif
+
+#if LOG2_BITMAP_PAD == FB_SHIFT
+typedef FbBits		    FbStip;
+#else
+# if LOG2_BITMAP_PAD == 5
+typedef CARD32		    FbStip;
+# endif
+#endif
+
+typedef int		    FbStride;
+
+
+#ifdef FB_DEBUG
+extern void fbValidateDrawable(DrawablePtr d);
+extern void fbInitializeDrawable(DrawablePtr d);
+extern void fbSetBits (FbStip *bits, int stride, FbStip data);
+#define FB_HEAD_BITS   (FbStip) (0xbaadf00d)
+#define FB_TAIL_BITS   (FbStip) (0xbaddf0ad)
+#else
+#define fbValidateDrawable(d)
+#define fdInitializeDrawable(d)
+#endif
+
+#include "fbrop.h"
+
+#if BITMAP_BIT_ORDER == LSBFirst
+#define FbScrLeft(x,n)	((x) >> (n))
+#define FbScrRight(x,n)	((x) << (n))
+/* #define FbLeftBits(x,n)	((x) & ((((FbBits) 1) << (n)) - 1)) */
+#define FbLeftStipBits(x,n) ((x) & ((((FbStip) 1) << (n)) - 1))
+#define FbStipMoveLsb(x,s,n)	(FbStipRight (x,(s)-(n)))
+#define FbPatternOffsetBits	0
+#else
+#define FbScrLeft(x,n)	((x) << (n))
+#define FbScrRight(x,n)	((x) >> (n))
+/* #define FbLeftBits(x,n)	((x) >> (FB_UNIT - (n))) */
+#define FbLeftStipBits(x,n) ((x) >> (FB_STIP_UNIT - (n)))
+#define FbStipMoveLsb(x,s,n)	(x)
+#define FbPatternOffsetBits	(sizeof (FbBits) - 1)
+#endif
+
+#include "micoord.h"
+
+#define FbStipLeft(x,n)	FbScrLeft(x,n)
+#define FbStipRight(x,n) FbScrRight(x,n)
+
+#define FbRotLeft(x,n)	FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0)
+#define FbRotRight(x,n)	FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0)
+
+#define FbRotStipLeft(x,n)  FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0)
+#define FbRotStipRight(x,n)  FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0)
+
+#define FbLeftMask(x)	    ( ((x) & FB_MASK) ? \
+			     FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0)
+#define FbRightMask(x)	    ( ((FB_UNIT - (x)) & FB_MASK) ? \
+			     FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0)
+
+#define FbLeftStipMask(x)   ( ((x) & FB_STIP_MASK) ? \
+			     FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) : 0)
+#define FbRightStipMask(x)  ( ((FB_STIP_UNIT - (x)) & FB_STIP_MASK) ? \
+			     FbScrLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - (x)) & FB_STIP_MASK) : 0)
+
+#define FbBitsMask(x,w)	(FbScrRight(FB_ALLONES,(x) & FB_MASK) & \
+			 FbScrLeft(FB_ALLONES,(FB_UNIT - ((x) + (w))) & FB_MASK))
+
+#define FbStipMask(x,w)	(FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \
+			 FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK))
+
+
+#define FbMaskBits(x,w,l,n,r) { \
+    n = (w); \
+    r = FbRightMask((x)+n); \
+    l = FbLeftMask(x); \
+    if (l) { \
+	n -= FB_UNIT - ((x) & FB_MASK); \
+	if (n < 0) { \
+	    n = 0; \
+	    l &= r; \
+	    r = 0; \
+	} \
+    } \
+    n >>= FB_SHIFT; \
+}
+
+#ifdef FBNOPIXADDR
+#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) FbMaskBits(x,w,l,n,r)
+#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
+    *dst = FbDoMaskRRop(*dst,and,xor,l); \
+}
+#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
+    *dst = FbDoMaskRRop(*dst,and,xor,r); \
+}
+#else
+
+#define FbByteMaskInvalid   0x10
+
+#define FbPatternOffset(o,t)  ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1)))
+
+#define FbPtrOffset(p,o,t)		((t *) ((CARD8 *) (p) + (o)))
+#define FbSelectPatternPart(xor,o,t)	((xor) >> (FbPatternOffset (o,t) << 3))
+#define FbStorePart(dst,off,t,xor)	(WRITE(FbPtrOffset(dst,off,t), \
+					 FbSelectPart(xor,off,t)))
+#ifndef FbSelectPart
+#define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t)
+#endif
+
+#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) { \
+    n = (w); \
+    lb = 0; \
+    rb = 0; \
+    r = FbRightMask((x)+n); \
+    if (r) { \
+	/* compute right byte length */ \
+	if ((copy) && (((x) + n) & 7) == 0) { \
+	    rb = (((x) + n) & FB_MASK) >> 3; \
+	} else { \
+	    rb = FbByteMaskInvalid; \
+	} \
+    } \
+    l = FbLeftMask(x); \
+    if (l) { \
+	/* compute left byte length */ \
+	if ((copy) && ((x) & 7) == 0) { \
+	    lb = ((x) & FB_MASK) >> 3; \
+	} else { \
+	    lb = FbByteMaskInvalid; \
+	} \
+	/* subtract out the portion painted by leftMask */ \
+	n -= FB_UNIT - ((x) & FB_MASK); \
+	if (n < 0) { \
+	    if (lb != FbByteMaskInvalid) { \
+		if (rb == FbByteMaskInvalid) { \
+		    lb = FbByteMaskInvalid; \
+		} else if (rb) { \
+		    lb |= (rb - lb) << (FB_SHIFT - 3); \
+		    rb = 0; \
+		} \
+	    } \
+	    n = 0; \
+	    l &= r; \
+	    r = 0; \
+	}\
+    } \
+    n >>= FB_SHIFT; \
+}
+
+#if FB_SHIFT == 6
+#define FbDoLeftMaskByteRRop6Cases(dst,xor) \
+    case (sizeof (FbBits) - 7) | (1 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 7) | (2 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 7) | (3 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+	break; \
+    case (sizeof (FbBits) - 7) | (4 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 7) | (5 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+	break; \
+    case (sizeof (FbBits) - 7) | (6 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 7): \
+	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
+	break; \
+    case (sizeof (FbBits) - 6) | (1 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 6) | (2 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+	break; \
+    case (sizeof (FbBits) - 6) | (3 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 6) | (4 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+	break; \
+    case (sizeof (FbBits) - 6) | (5 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 6): \
+	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
+	break; \
+    case (sizeof (FbBits) - 5) | (1 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 5) | (2 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 5) | (3 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+	break; \
+    case (sizeof (FbBits) - 5) | (4 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 5): \
+	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
+	break; \
+    case (sizeof (FbBits) - 4) | (1 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 4) | (2 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+	break; \
+    case (sizeof (FbBits) - 4) | (3 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 4): \
+	FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
+	break;
+
+#define FbDoRightMaskByteRRop6Cases(dst,xor) \
+    case 4: \
+	FbStorePart(dst,0,CARD32,xor); \
+	break; \
+    case 5: \
+	FbStorePart(dst,0,CARD32,xor); \
+	FbStorePart(dst,4,CARD8,xor); \
+	break; \
+    case 6: \
+	FbStorePart(dst,0,CARD32,xor); \
+	FbStorePart(dst,4,CARD16,xor); \
+	break; \
+    case 7: \
+	FbStorePart(dst,0,CARD32,xor); \
+	FbStorePart(dst,4,CARD16,xor); \
+	FbStorePart(dst,6,CARD8,xor); \
+	break;
+#else
+#define FbDoLeftMaskByteRRop6Cases(dst,xor)
+#define FbDoRightMaskByteRRop6Cases(dst,xor)
+#endif
+
+#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
+    switch (lb) { \
+    FbDoLeftMaskByteRRop6Cases(dst,xor) \
+    case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 3) | (2 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+	break; \
+    case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \
+	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+	break; \
+    case sizeof (FbBits) - 3: \
+	FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
+    case sizeof (FbBits) - 2: \
+	FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \
+	break; \
+    case sizeof (FbBits) - 1: \
+	FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
+	break; \
+    default: \
+	WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \
+	break; \
+    } \
+}
+
+
+#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
+    switch (rb) { \
+    case 1: \
+	FbStorePart(dst,0,CARD8,xor); \
+	break; \
+    case 2: \
+	FbStorePart(dst,0,CARD16,xor); \
+	break; \
+    case 3: \
+	FbStorePart(dst,0,CARD16,xor); \
+	FbStorePart(dst,2,CARD8,xor); \
+	break; \
+    FbDoRightMaskByteRRop6Cases(dst,xor) \
+    default: \
+	WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
+    } \
+}
+#endif
+
+#define FbMaskStip(x,w,l,n,r) { \
+    n = (w); \
+    r = FbRightStipMask((x)+n); \
+    l = FbLeftStipMask(x); \
+    if (l) { \
+	n -= FB_STIP_UNIT - ((x) & FB_STIP_MASK); \
+	if (n < 0) { \
+	    n = 0; \
+	    l &= r; \
+	    r = 0; \
+	} \
+    } \
+    n >>= FB_STIP_SHIFT; \
+}
+
+/*
+ * These macros are used to transparently stipple
+ * in copy mode; the expected usage is with 'n' constant
+ * so all of the conditional parts collapse into a minimal
+ * sequence of partial word writes
+ *
+ * 'n' is the bytemask of which bytes to store, 'a' is the address
+ * of the FbBits base unit, 'o' is the offset within that unit
+ *
+ * The term "lane" comes from the hardware term "byte-lane" which
+ */
+
+#define FbLaneCase1(n,a,o)  ((n) == 0x01 ? (void) \
+			     WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), \
+			      fgxor) : (void) 0)
+#define FbLaneCase2(n,a,o)  ((n) == 0x03 ? (void) \
+			     WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), \
+			      fgxor) : \
+			     ((void)FbLaneCase1((n)&1,a,o), \
+				    FbLaneCase1((n)>>1,a,(o)+1)))
+#define FbLaneCase4(n,a,o)  ((n) == 0x0f ? (void) \
+			     WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), \
+			      fgxor) : \
+			     ((void)FbLaneCase2((n)&3,a,o), \
+				    FbLaneCase2((n)>>2,a,(o)+2)))
+#define FbLaneCase8(n,a,o)  ((n) == 0x0ff ? (void) (*(FbBits *) ((a)+(o)) = fgxor) : \
+			     ((void)FbLaneCase4((n)&15,a,o), \
+				    FbLaneCase4((n)>>4,a,(o)+4)))
+
+#if FB_SHIFT == 6
+#define FbLaneCase(n,a)   FbLaneCase8(n,(CARD8 *) (a),0)
+#endif
+
+#if FB_SHIFT == 5
+#define FbLaneCase(n,a)   FbLaneCase4(n,(CARD8 *) (a),0)
+#endif
+
+/* Rotate a filled pixel value to the specified alignement */
+#define FbRot24(p,b)	    (FbScrRight(p,b) | FbScrLeft(p,24-(b)))
+#define FbRot24Stip(p,b)    (FbStipRight(p,b) | FbStipLeft(p,24-(b)))
+
+/* step a filled pixel value to the next/previous FB_UNIT alignment */
+#define FbNext24Pix(p)	(FbRot24(p,(24-FB_UNIT%24)))
+#define FbPrev24Pix(p)	(FbRot24(p,FB_UNIT%24))
+#define FbNext24Stip(p)	(FbRot24(p,(24-FB_STIP_UNIT%24)))
+#define FbPrev24Stip(p)	(FbRot24(p,FB_STIP_UNIT%24))
+
+/* step a rotation value to the next/previous rotation value */
+#if FB_UNIT == 64
+#define FbNext24Rot(r)        ((r) == 16 ? 0 : (r) + 8)
+#define FbPrev24Rot(r)        ((r) == 0 ? 16 : (r) - 8)
+
+#if IMAGE_BYTE_ORDER == MSBFirst
+#define FbFirst24Rot(x)		(((x) + 8) % 24)
+#else
+#define FbFirst24Rot(x)		((x) % 24)
+#endif
+
+#endif
+
+#if FB_UNIT == 32
+#define FbNext24Rot(r)        ((r) == 0 ? 16 : (r) - 8)
+#define FbPrev24Rot(r)        ((r) == 16 ? 0 : (r) + 8)
+
+#if IMAGE_BYTE_ORDER == MSBFirst
+#define FbFirst24Rot(x)		(((x) + 16) % 24)
+#else
+#define FbFirst24Rot(x)		((x) % 24)
+#endif
+#endif
+
+#define FbNext24RotStip(r)        ((r) == 0 ? 16 : (r) - 8)
+#define FbPrev24RotStip(r)        ((r) == 16 ? 0 : (r) + 8)
+
+/* Whether 24-bit specific code is needed for this filled pixel value */
+#define FbCheck24Pix(p)	((p) == FbNext24Pix(p))
+
+/* Macros for dealing with dashing */
+
+#define FbDashDeclare	\
+    unsigned char	*__dash, *__firstDash, *__lastDash
+    
+#define FbDashInit(pGC,pPriv,dashOffset,dashlen,even) {	    \
+    (even) = TRUE;					    \
+    __firstDash = (pGC)->dash;				    \
+    __lastDash = __firstDash + (pGC)->numInDashList;	    \
+    (dashOffset) %= (pPriv)->dashLength;		    \
+							    \
+    __dash = __firstDash;				    \
+    while ((dashOffset) >= ((dashlen) = *__dash))	    \
+    {							    \
+	(dashOffset) -= (dashlen);			    \
+	(even) = 1-(even);				    \
+	if (++__dash == __lastDash)			    \
+	    __dash = __firstDash;			    \
+    }							    \
+    (dashlen) -= (dashOffset);				    \
+}
+
+#define FbDashNext(dashlen) {				    \
+    if (++__dash == __lastDash)				    \
+	__dash = __firstDash;				    \
+    (dashlen) = *__dash;				    \
+}
+
+/* as numInDashList is always even, this case can skip a test */
+
+#define FbDashNextEven(dashlen) {			    \
+    (dashlen) = *++__dash;				    \
+}
+
+#define FbDashNextOdd(dashlen)	FbDashNext(dashlen)
+
+#define FbDashStep(dashlen,even) {			    \
+    if (!--(dashlen)) {					    \
+	FbDashNext(dashlen);				    \
+	(even) = 1-(even);				    \
+    }							    \
+}
+
+extern DevPrivateKey fbGetGCPrivateKey(void);
+#ifndef FB_NO_WINDOW_PIXMAPS
+extern DevPrivateKey fbGetWinPrivateKey(void);
+#endif
+extern const GCOps	fbGCOps;
+extern const GCFuncs	fbGCFuncs;
+
+#ifdef FB_24_32BIT
+#define FB_SCREEN_PRIVATE
+#endif
+
+/* Framebuffer access wrapper */
+typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size);
+typedef void (*WriteMemoryProcPtr)(void *dst, FbBits value, int size);
+typedef void (*SetupWrapProcPtr)(ReadMemoryProcPtr  *pRead,
+                                 WriteMemoryProcPtr *pWrite,
+                                 DrawablePtr         pDraw);
+typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw);
+
+#ifdef FB_ACCESS_WRAPPER
+
+#define fbPrepareAccess(pDraw) \
+	fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \
+		&wfbReadMemory, \
+		&wfbWriteMemory, \
+		(pDraw))
+#define fbFinishAccess(pDraw) \
+	fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw)
+
+#else
+
+#define fbPrepareAccess(pPix)
+#define fbFinishAccess(pDraw)
+
+#endif
+
+
+#ifdef FB_SCREEN_PRIVATE
+extern DevPrivateKey fbGetScreenPrivateKey(void);
+
+/* private field of a screen */
+typedef struct {
+    unsigned char	win32bpp;	/* window bpp for 32-bpp images */
+    unsigned char	pix32bpp;	/* pixmap bpp for 32-bpp images */
+#ifdef FB_ACCESS_WRAPPER
+    SetupWrapProcPtr	setupWrap;	/* driver hook to set pixmap access wrapping */
+    FinishWrapProcPtr	finishWrap;	/* driver hook to clean up pixmap access wrapping */
+#endif
+} FbScreenPrivRec, *FbScreenPrivPtr;
+
+#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
+	dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey()))
+#endif
+
+/* private field of GC */
+typedef struct {
+    FbBits		and, xor;	/* reduced rop values */
+    FbBits		bgand, bgxor;	/* for stipples */
+    FbBits		fg, bg, pm;	/* expanded and filled */
+    unsigned int	dashLength;	/* total of all dash elements */
+    unsigned char    	oneRect;	/* clip list is single rectangle */
+    unsigned char    	evenStipple;	/* stipple is even */
+    unsigned char    	bpp;		/* current drawable bpp */
+} FbGCPrivRec, *FbGCPrivPtr;
+
+#define fbGetGCPrivate(pGC)	((FbGCPrivPtr)\
+	dixLookupPrivate(&(pGC)->devPrivates, fbGetGCPrivateKey()))
+
+#define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip)
+#define fbGetExpose(pGC)	((pGC)->fExpose)
+#define fbGetFreeCompClip(pGC)	((pGC)->freeCompClip)
+#define fbGetRotatedPixmap(pGC)	((pGC)->pRotatedPixmap)
+
+#define fbGetScreenPixmap(s)	((PixmapPtr) (s)->devPrivate)
+#ifdef FB_NO_WINDOW_PIXMAPS
+#define fbGetWindowPixmap(d)	fbGetScreenPixmap(((DrawablePtr) (d))->pScreen)
+#else
+#define fbGetWindowPixmap(pWin)	((PixmapPtr)\
+    dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey()))
+#endif
+
+#ifdef ROOTLESS
+#define __fbPixDrawableX(pPix)	((pPix)->drawable.x)
+#define __fbPixDrawableY(pPix)	((pPix)->drawable.y)
+#else
+#define __fbPixDrawableX(pPix)	0
+#define __fbPixDrawableY(pPix)	0
+#endif
+
+#ifdef COMPOSITE
+#define __fbPixOffXWin(pPix)	(__fbPixDrawableX(pPix) - (pPix)->screen_x)
+#define __fbPixOffYWin(pPix)	(__fbPixDrawableY(pPix) - (pPix)->screen_y)
+#else
+#define __fbPixOffXWin(pPix)	(__fbPixDrawableX(pPix))
+#define __fbPixOffYWin(pPix)	(__fbPixDrawableY(pPix))
+#endif
+#define __fbPixOffXPix(pPix)	(__fbPixDrawableX(pPix))
+#define __fbPixOffYPix(pPix)	(__fbPixDrawableY(pPix))
+
+#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
+    PixmapPtr   _pPix; \
+    if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
+	_pPix = fbGetWindowPixmap(pDrawable); \
+	(xoff) = __fbPixOffXWin(_pPix); \
+	(yoff) = __fbPixOffYWin(_pPix); \
+    } else { \
+	_pPix = (PixmapPtr) (pDrawable); \
+	(xoff) = __fbPixOffXPix(_pPix); \
+	(yoff) = __fbPixOffYPix(_pPix); \
+    } \
+    fbPrepareAccess(pDrawable); \
+    (pointer) = (FbBits *) _pPix->devPrivate.ptr; \
+    (stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \
+    (bpp) = _pPix->drawable.bitsPerPixel;  (void)(bpp); \
+}
+
+#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
+    PixmapPtr   _pPix; \
+    if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
+	_pPix = fbGetWindowPixmap(pDrawable); \
+	(xoff) = __fbPixOffXWin(_pPix); \
+	(yoff) = __fbPixOffYWin(_pPix); \
+    } else { \
+	_pPix = (PixmapPtr) (pDrawable); \
+	(xoff) = __fbPixOffXPix(_pPix); \
+	(yoff) = __fbPixOffYPix(_pPix); \
+    } \
+    fbPrepareAccess(pDrawable); \
+    (pointer) = (FbStip *) _pPix->devPrivate.ptr; \
+    (stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \
+    (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
+}
+
+/*
+ * XFree86 empties the root BorderClip when the VT is inactive,
+ * here's a macro which uses that to disable GetImage and GetSpans
+ */
+
+#define fbWindowEnabled(pWin) \
+    REGION_NOTEMPTY((pWin)->drawable.pScreen, \
+		    &WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip)
+
+#define fbDrawableEnabled(pDrawable) \
+    ((pDrawable)->type == DRAWABLE_PIXMAP ? \
+     TRUE : fbWindowEnabled((WindowPtr) pDrawable))
+
+#define FbPowerOfTwo(w)	    (((w) & ((w) - 1)) == 0)
+/*
+ * Accelerated tiles are power of 2 width <= FB_UNIT
+ */
+#define FbEvenTile(w)	    ((w) <= FB_UNIT && FbPowerOfTwo(w))
+/*
+ * Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp
+ * with dstBpp a power of 2 as well
+ */
+#define FbEvenStip(w,bpp)   ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp))
+
+/*
+ * fb24_32.c
+ */
+void
+fb24_32GetSpans(DrawablePtr	pDrawable, 
+		int		wMax, 
+		DDXPointPtr	ppt, 
+		int		*pwidth, 
+		int		nspans, 
+		char		*pchardstStart);
+
+void
+fb24_32SetSpans (DrawablePtr	    pDrawable,
+		 GCPtr		    pGC,
+		 char		    *src,
+		 DDXPointPtr	    ppt,
+		 int		    *pwidth,
+		 int		    nspans,
+		 int		    fSorted);
+
+void
+fb24_32PutZImage (DrawablePtr	pDrawable,
+		  RegionPtr	pClip,
+		  int		alu,
+		  FbBits	pm,
+		  int		x,
+		  int		y,
+		  int		width,
+		  int		height,
+		  CARD8		*src,
+		  FbStride	srcStride);
+    
+void
+fb24_32GetImage (DrawablePtr     pDrawable,
+		 int             x,
+		 int             y,
+		 int             w,
+		 int             h,
+		 unsigned int    format,
+		 unsigned long   planeMask,
+		 char            *d);
+
+void
+fb24_32CopyMtoN (DrawablePtr pSrcDrawable,
+		 DrawablePtr pDstDrawable,
+		 GCPtr       pGC,
+		 BoxPtr      pbox,
+		 int         nbox,
+		 int         dx,
+		 int         dy,
+		 Bool        reverse,
+		 Bool        upsidedown,
+		 Pixel       bitplane,
+		 void        *closure);
+
+PixmapPtr
+fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel);
+    
+Bool
+fb24_32CreateScreenResources(ScreenPtr pScreen);
+
+Bool
+fb24_32ModifyPixmapHeader (PixmapPtr   pPixmap,
+			   int         width,
+			   int         height,
+			   int         depth,
+			   int         bitsPerPixel,
+			   int         devKind,
+			   pointer     pPixData);
+
+/*
+ * fballpriv.c
+ */
+Bool
+fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCIndex);
+    
+/*
+ * fbarc.c
+ */
+
+void
+fbPolyArc (DrawablePtr	pDrawable,
+	   GCPtr	pGC,
+	   int		narcs,
+	   xArc		*parcs);
+
+/*
+ * fbbits.c
+ */
+
+void	
+fbBresSolid8(DrawablePtr    pDrawable,
+	     GCPtr	    pGC,
+	     int	    dashOffset,
+	     int	    signdx,
+	     int	    signdy,
+	     int	    axis,
+	     int	    x,
+	     int	    y,
+	     int	    e,
+	     int	    e1,
+	     int	    e3,
+	     int	    len);
+
+void	
+fbBresDash8 (DrawablePtr    pDrawable,
+	     GCPtr	    pGC,
+	     int	    dashOffset,
+	     int	    signdx,
+	     int	    signdy,
+	     int	    axis,
+	     int	    x,
+	     int	    y,
+	     int	    e,
+	     int	    e1,
+	     int	    e3,
+	     int	    len);
+
+void	
+fbDots8 (FbBits	    *dst,
+	 FbStride   dstStride,
+	 int	    dstBpp,
+	 BoxPtr	    pBox,
+	 xPoint	    *pts,
+	 int	    npt,
+	 int	    xorg,
+	 int	    yorg,
+	 int	    xoff,
+	 int	    yoff,
+	 FbBits	    and,
+	 FbBits	    xor);
+
+void	
+fbArc8 (FbBits	    *dst,
+	FbStride    dstStride,
+	int	    dstBpp,
+	xArc	    *arc,
+	int	    dx,
+	int	    dy,
+	FbBits	    and,
+	FbBits	    xor);
+
+void
+fbGlyph8 (FbBits    *dstLine,
+	  FbStride  dstStride,
+	  int	    dstBpp,
+	  FbStip    *stipple,
+	  FbBits    fg,
+	  int	    height,
+	  int	    shift);
+
+void
+fbPolyline8 (DrawablePtr    pDrawable,
+	     GCPtr	    pGC,
+	     int	    mode,
+	     int	    npt,
+	     DDXPointPtr    ptsOrig);
+
+void
+fbPolySegment8 (DrawablePtr pDrawable,
+		GCPtr	    pGC,
+		int	    nseg,
+		xSegment    *pseg);
+
+void	
+fbBresSolid16(DrawablePtr   pDrawable,
+	      GCPtr	    pGC,
+	      int	    dashOffset,
+	      int	    signdx,
+	      int	    signdy,
+	      int	    axis,
+	      int	    x,
+	      int	    y,
+	      int	    e,
+	      int	    e1,
+	      int	    e3,
+	      int	    len);
+
+void	
+fbBresDash16(DrawablePtr    pDrawable,
+	     GCPtr	    pGC,
+	     int	    dashOffset,
+	     int	    signdx,
+	     int	    signdy,
+	     int	    axis,
+	     int	    x,
+	     int	    y,
+	     int	    e,
+	     int	    e1,
+	     int	    e3,
+	     int	    len);
+
+void	
+fbDots16(FbBits	    *dst,
+	 FbStride   dstStride,
+	 int	    dstBpp,
+	 BoxPtr	    pBox,
+	 xPoint	    *pts,
+	 int	    npt,
+	 int	    xorg,
+	 int	    yorg,
+	 int	    xoff,
+	 int	    yoff,
+	 FbBits	    and,
+	 FbBits	    xor);
+
+void	
+fbArc16(FbBits	    *dst,
+	FbStride    dstStride,
+	int	    dstBpp,
+	xArc	    *arc,
+	int	    dx,
+	int	    dy,
+	FbBits	    and,
+	FbBits	    xor);
+
+void
+fbGlyph16(FbBits    *dstLine,
+	  FbStride  dstStride,
+	  int	    dstBpp,
+	  FbStip    *stipple,
+	  FbBits    fg,
+	  int	    height,
+	  int	    shift);
+
+void
+fbPolyline16 (DrawablePtr   pDrawable,
+	      GCPtr	    pGC,
+	      int	    mode,
+	      int	    npt,
+	      DDXPointPtr   ptsOrig);
+
+void
+fbPolySegment16 (DrawablePtr	pDrawable,
+		 GCPtr		pGC,
+		 int		nseg,
+		 xSegment	*pseg);
+
+
+void	
+fbBresSolid24(DrawablePtr   pDrawable,
+	      GCPtr	    pGC,
+	      int	    dashOffset,
+	      int	    signdx,
+	      int	    signdy,
+	      int	    axis,
+	      int	    x,
+	      int	    y,
+	      int	    e,
+	      int	    e1,
+	      int	    e3,
+	      int	    len);
+
+void	
+fbBresDash24(DrawablePtr    pDrawable,
+	     GCPtr	    pGC,
+	     int	    dashOffset,
+	     int	    signdx,
+	     int	    signdy,
+	     int	    axis,
+	     int	    x,
+	     int	    y,
+	     int	    e,
+	     int	    e1,
+	     int	    e3,
+	     int	    len);
+
+void	
+fbDots24(FbBits	    *dst,
+	 FbStride   dstStride,
+	 int	    dstBpp,
+	 BoxPtr	    pBox,
+	 xPoint	    *pts,
+	 int	    npt,
+	 int	    xorg,
+	 int	    yorg,
+	 int	    xoff,
+	 int	    yoff,
+	 FbBits	    and,
+	 FbBits	    xor);
+
+void	
+fbArc24(FbBits	    *dst,
+	FbStride    dstStride,
+	int	    dstBpp,
+	xArc	    *arc,
+	int	    dx,
+	int	    dy,
+	FbBits	    and,
+	FbBits	    xor);
+
+void
+fbGlyph24(FbBits    *dstLine,
+	  FbStride  dstStride,
+	  int	    dstBpp,
+	  FbStip    *stipple,
+	  FbBits    fg,
+	  int	    height,
+	  int	    shift);
+
+void
+fbPolyline24 (DrawablePtr   pDrawable,
+	      GCPtr	    pGC,
+	      int	    mode,
+	      int	    npt,
+	      DDXPointPtr   ptsOrig);
+
+void
+fbPolySegment24 (DrawablePtr	pDrawable,
+		 GCPtr		pGC,
+		 int		nseg,
+		 xSegment	*pseg);
+
+
+void	
+fbBresSolid32(DrawablePtr   pDrawable,
+	      GCPtr	    pGC,
+	      int	    dashOffset,
+	      int	    signdx,
+	      int	    signdy,
+	      int	    axis,
+	      int	    x,
+	      int	    y,
+	      int	    e,
+	      int	    e1,
+	      int	    e3,
+	      int	    len);
+
+void	
+fbBresDash32(DrawablePtr    pDrawable,
+	     GCPtr	    pGC,
+	     int	    dashOffset,
+	     int	    signdx,
+	     int	    signdy,
+	     int	    axis,
+	     int	    x,
+	     int	    y,
+	     int	    e,
+	     int	    e1,
+	     int	    e3,
+	     int	    len);
+
+void	
+fbDots32(FbBits	    *dst,
+	 FbStride   dstStride,
+	 int	    dstBpp,
+	 BoxPtr	    pBox,
+	 xPoint	    *pts,
+	 int	    npt,
+	 int	    xorg,
+	 int	    yorg,
+	 int	    xoff,
+	 int	    yoff,
+	 FbBits	    and,
+	 FbBits	    xor);
+
+void	
+fbArc32(FbBits	    *dst,
+	FbStride    dstStride,
+	int	    dstBpp,
+	xArc	    *arc,
+	int	    dx,
+	int	    dy,
+	FbBits	    and,
+	FbBits	    xor);
+
+void
+fbGlyph32(FbBits    *dstLine,
+	  FbStride  dstStride,
+	  int	    dstBpp,
+	  FbStip    *stipple,
+	  FbBits    fg,
+	  int	    height,
+	  int	    shift);
+void
+fbPolyline32 (DrawablePtr   pDrawable,
+	      GCPtr	    pGC,
+	      int	    mode,
+	      int	    npt,
+	      DDXPointPtr   ptsOrig);
+
+void
+fbPolySegment32 (DrawablePtr	pDrawable,
+		 GCPtr		pGC,
+		 int		nseg,
+		 xSegment	*pseg);
+
+/*
+ * fbblt.c
+ */
+void
+fbBlt (FbBits   *src, 
+       FbStride	srcStride,
+       int	srcX,
+       
+       FbBits   *dst,
+       FbStride dstStride,
+       int	dstX,
+       
+       int	width, 
+       int	height,
+       
+       int	alu,
+       FbBits	pm,
+       int	bpp,
+       
+       Bool	reverse,
+       Bool	upsidedown);
+
+void
+fbBlt24 (FbBits	    *srcLine,
+	 FbStride   srcStride,
+	 int	    srcX,
+
+	 FbBits	    *dstLine,
+	 FbStride   dstStride,
+	 int	    dstX,
+
+	 int	    width, 
+	 int	    height,
+
+	 int	    alu,
+	 FbBits	    pm,
+
+	 Bool	    reverse,
+	 Bool	    upsidedown);
+    
+void
+fbBltStip (FbStip   *src,
+	   FbStride srcStride,	    /* in FbStip units, not FbBits units */
+	   int	    srcX,
+	   
+	   FbStip   *dst,
+	   FbStride dstStride,	    /* in FbStip units, not FbBits units */
+	   int	    dstX,
+
+	   int	    width, 
+	   int	    height,
+
+	   int	    alu,
+	   FbBits   pm,
+	   int	    bpp);
+    
+/*
+ * fbbltone.c
+ */
+void
+fbBltOne (FbStip   *src,
+	  FbStride srcStride,
+	  int	   srcX,
+	  FbBits   *dst,
+	  FbStride dstStride,
+	  int	   dstX,
+	  int	   dstBpp,
+
+	  int	   width,
+	  int	   height,
+
+	  FbBits   fgand,
+	  FbBits   fbxor,
+	  FbBits   bgand,
+	  FbBits   bgxor);
+ 
+#ifdef FB_24BIT
+void
+fbBltOne24 (FbStip    *src,
+	  FbStride  srcStride,	    /* FbStip units per scanline */
+	  int	    srcX,	    /* bit position of source */
+	  FbBits    *dst,
+	  FbStride  dstStride,	    /* FbBits units per scanline */
+	  int	    dstX,	    /* bit position of dest */
+	  int	    dstBpp,	    /* bits per destination unit */
+
+	  int	    width,	    /* width in bits of destination */
+	  int	    height,	    /* height in scanlines */
+
+	  FbBits    fgand,	    /* rrop values */
+	  FbBits    fgxor,
+	  FbBits    bgand,
+	  FbBits    bgxor);
+#endif
+
+void
+fbBltPlane (FbBits	    *src,
+	    FbStride	    srcStride,
+	    int		    srcX,
+	    int		    srcBpp,
+
+	    FbStip	    *dst,
+	    FbStride	    dstStride,
+	    int		    dstX,
+	    
+	    int		    width,
+	    int		    height,
+	    
+	    FbStip	    fgand,
+	    FbStip	    fgxor,
+	    FbStip	    bgand,
+	    FbStip	    bgxor,
+	    Pixel	    planeMask);
+
+/*
+ * fbcmap.c
+ */
+int
+fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps);
+
+void
+fbInstallColormap(ColormapPtr pmap);
+
+void
+fbUninstallColormap(ColormapPtr pmap);
+
+void
+fbResolveColor(unsigned short	*pred, 
+	       unsigned short	*pgreen, 
+	       unsigned short	*pblue,
+	       VisualPtr	pVisual);
+
+Bool
+fbInitializeColormap(ColormapPtr pmap);
+
+int
+fbExpandDirectColors (ColormapPtr   pmap, 
+		      int	    ndef,
+		      xColorItem    *indefs,
+		      xColorItem    *outdefs);
+
+Bool
+fbCreateDefColormap(ScreenPtr pScreen);
+
+void
+fbClearVisualTypes(void);
+
+Bool
+fbHasVisualTypes (int depth);
+
+Bool
+fbSetVisualTypes (int depth, int visuals, int bitsPerRGB);
+
+Bool
+fbSetVisualTypesAndMasks (int depth, int visuals, int bitsPerRGB,
+			  Pixel redMask, Pixel greenMask, Pixel blueMask);
+
+Bool
+fbInitVisuals (VisualPtr    *visualp, 
+	       DepthPtr	    *depthp,
+	       int	    *nvisualp,
+	       int	    *ndepthp,
+	       int	    *rootDepthp,
+	       VisualID	    *defaultVisp,
+	       unsigned long	sizes,
+	       int	    bitsPerRGB);
+
+/*
+ * fbcopy.c
+ */
+
+typedef void	(*fbCopyProc) (DrawablePtr  pSrcDrawable,
+			       DrawablePtr  pDstDrawable,
+			       GCPtr	    pGC,
+			       BoxPtr	    pDstBox,
+			       int	    nbox,
+			       int	    dx,
+			       int	    dy,
+			       Bool	    reverse,
+			       Bool	    upsidedown,
+			       Pixel	    bitplane,
+			       void	    *closure);
+
+void
+fbCopyNtoN (DrawablePtr	pSrcDrawable,
+	    DrawablePtr	pDstDrawable,
+	    GCPtr	pGC,
+	    BoxPtr	pbox,
+	    int		nbox,
+	    int		dx,
+	    int		dy,
+	    Bool	reverse,
+	    Bool	upsidedown,
+	    Pixel	bitplane,
+	    void	*closure);
+
+void
+fbCopy1toN (DrawablePtr	pSrcDrawable,
+	    DrawablePtr	pDstDrawable,
+	    GCPtr	pGC,
+	    BoxPtr	pbox,
+	    int		nbox,
+	    int		dx,
+	    int		dy,
+	    Bool	reverse,
+	    Bool	upsidedown,
+	    Pixel	bitplane,
+	    void	*closure);
+
+void
+fbCopyNto1 (DrawablePtr	pSrcDrawable,
+	    DrawablePtr	pDstDrawable,
+	    GCPtr	pGC,
+	    BoxPtr	pbox,
+	    int		nbox,
+	    int		dx,
+	    int		dy,
+	    Bool	reverse,
+	    Bool	upsidedown,
+	    Pixel	bitplane,
+	    void	*closure);
+
+void
+fbCopyRegion (DrawablePtr   pSrcDrawable,
+	      DrawablePtr   pDstDrawable,
+	      GCPtr	    pGC,
+	      RegionPtr	    pDstRegion,
+	      int	    dx,
+	      int	    dy,
+	      fbCopyProc    copyProc,
+	      Pixel	    bitPlane,
+	      void	    *closure);
+
+RegionPtr
+fbDoCopy (DrawablePtr	pSrcDrawable,
+	  DrawablePtr	pDstDrawable,
+	  GCPtr		pGC,
+	  int		xIn, 
+	  int		yIn,
+	  int		widthSrc, 
+	  int		heightSrc,
+	  int		xOut, 
+	  int		yOut,
+	  fbCopyProc	copyProc,
+	  Pixel		bitplane,
+	  void		*closure);
+	  
+RegionPtr
+fbCopyArea (DrawablePtr	pSrcDrawable,
+	    DrawablePtr	pDstDrawable,
+	    GCPtr	pGC,
+	    int		xIn, 
+	    int		yIn,
+	    int		widthSrc, 
+	    int		heightSrc,
+	    int		xOut, 
+	    int		yOut);
+
+RegionPtr
+fbCopyPlane (DrawablePtr    pSrcDrawable,
+	     DrawablePtr    pDstDrawable,
+	     GCPtr	    pGC,
+	     int	    xIn, 
+	     int	    yIn,
+	     int	    widthSrc, 
+	     int	    heightSrc,
+	     int	    xOut, 
+	     int	    yOut,
+	     unsigned long  bitplane);
+
+/*
+ * fbfill.c
+ */
+void
+fbFill (DrawablePtr pDrawable,
+	GCPtr	    pGC,
+	int	    x,
+	int	    y,
+	int	    width,
+	int	    height);
+
+void
+fbSolidBoxClipped (DrawablePtr	pDrawable,
+		   RegionPtr	pClip,
+		   int		xa,
+		   int		ya,
+		   int		xb,
+		   int		yb,
+		   FbBits	and,
+		   FbBits	xor);
+
+/*
+ * fbfillrect.c
+ */
+void
+fbPolyFillRect(DrawablePtr  pDrawable, 
+	       GCPtr	    pGC, 
+	       int	    nrectInit,
+	       xRectangle   *prectInit);
+
+#define fbPolyFillArc miPolyFillArc
+
+#define fbFillPolygon miFillPolygon
+
+/*
+ * fbfillsp.c
+ */
+void
+fbFillSpans (DrawablePtr    pDrawable,
+	     GCPtr	    pGC,
+	     int	    nInit,
+	     DDXPointPtr    pptInit,
+	     int	    *pwidthInit,
+	     int	    fSorted);
+
+
+/*
+ * fbgc.c
+ */
+
+Bool
+fbCreateGC(GCPtr pGC);
+
+void
+fbPadPixmap (PixmapPtr pPixmap);
+    
+void
+fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable);
+
+/*
+ * fbgetsp.c
+ */
+void
+fbGetSpans(DrawablePtr	pDrawable, 
+	   int		wMax, 
+	   DDXPointPtr	ppt, 
+	   int		*pwidth, 
+	   int		nspans, 
+	   char		*pchardstStart);
+
+/*
+ * fbglyph.c
+ */
+
+Bool
+fbGlyphIn (RegionPtr	pRegion,
+	   int		x,
+	   int		y,
+	   int		width,
+	   int		height);
+    
+void
+fbPolyGlyphBlt (DrawablePtr	pDrawable,
+		GCPtr		pGC,
+		int		x, 
+		int		y,
+		unsigned int	nglyph,
+		CharInfoPtr	*ppci,
+		pointer		pglyphBase);
+
+void
+fbImageGlyphBlt (DrawablePtr	pDrawable,
+		 GCPtr		pGC,
+		 int		x,
+		 int		y,
+		 unsigned int	nglyph,
+		 CharInfoPtr	*ppci,
+		 pointer	pglyphBase);
+
+/*
+ * fbimage.c
+ */
+
+void
+fbPutImage (DrawablePtr	pDrawable,
+	    GCPtr	pGC,
+	    int		depth,
+	    int		x,
+	    int		y,
+	    int		w,
+	    int		h,
+	    int		leftPad,
+	    int		format,
+	    char	*pImage);
+
+void
+fbPutZImage (DrawablePtr	pDrawable,
+	     RegionPtr		pClip,
+	     int		alu,
+	     FbBits		pm,
+	     int		x,
+	     int		y,
+	     int		width,
+	     int		height,
+	     FbStip		*src,
+	     FbStride		srcStride);
+
+void
+fbPutXYImage (DrawablePtr	pDrawable,
+	      RegionPtr		pClip,
+	      FbBits		fg,
+	      FbBits		bg,
+	      FbBits		pm,
+	      int		alu,
+	      Bool		opaque,
+	      
+	      int		x,
+	      int		y,
+	      int		width,
+	      int		height,
+
+	      FbStip		*src,
+	      FbStride		srcStride,
+	      int		srcX);
+
+void
+fbGetImage (DrawablePtr	    pDrawable,
+	    int		    x,
+	    int		    y,
+	    int		    w,
+	    int		    h,
+	    unsigned int    format,
+	    unsigned long   planeMask,
+	    char	    *d);
+/*
+ * fbline.c
+ */
+
+void
+fbZeroLine (DrawablePtr	pDrawable,
+	    GCPtr	pGC,
+	    int		mode,
+	    int		npt,
+	    DDXPointPtr	ppt);
+
+void
+fbZeroSegment (DrawablePtr  pDrawable,
+	       GCPtr	    pGC,
+	       int	    nseg,
+	       xSegment	    *pSegs);
+
+void
+fbPolyLine (DrawablePtr	pDrawable,
+	    GCPtr	pGC,
+	    int		mode,
+	    int		npt,
+	    DDXPointPtr	ppt);
+
+void
+fbFixCoordModePrevious (int npt,
+			DDXPointPtr ppt);
+
+void
+fbPolySegment (DrawablePtr  pDrawable,
+	       GCPtr	    pGC,
+	       int	    nseg,
+	       xSegment	    *pseg);
+
+#define fbPolyRectangle	miPolyRectangle
+
+/*
+ * fbpict.c
+ */
+
+Bool
+fbPictureInit (ScreenPtr pScreen,
+	       PictFormatPtr formats,
+	       int nformats);
+
+/*
+ * fbpixmap.c
+ */
+
+PixmapPtr
+fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
+		   unsigned usage_hint);
+
+PixmapPtr
+fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
+		unsigned usage_hint);
+
+Bool
+fbDestroyPixmap (PixmapPtr pPixmap);
+
+RegionPtr
+fbPixmapToRegion(PixmapPtr pPix);
+
+/*
+ * fbpoint.c
+ */
+
+void
+fbDots (FbBits	    *dstOrig,
+	FbStride    dstStride,
+	int	    dstBpp,
+	BoxPtr	    pBox,
+	xPoint	    *pts,
+	int	    npt,
+	int	    xorg,
+	int	    yorg,
+	int	    xoff,
+	int	    yoff,
+	FbBits	    andOrig,
+	FbBits	    xorOrig);
+
+void
+fbPolyPoint (DrawablePtr    pDrawable,
+	     GCPtr	    pGC,
+	     int	    mode,
+	     int	    npt,
+	     xPoint	    *pptInit);
+
+/*
+ * fbpush.c
+ */
+void
+fbPushPattern (DrawablePtr  pDrawable,
+	       GCPtr	    pGC,
+	       
+	       FbStip	    *src,
+	       FbStride	    srcStride,
+	       int	    srcX,
+
+	       int	    x,
+	       int	    y,
+
+	       int	    width,
+	       int	    height);
+
+void
+fbPushFill (DrawablePtr	pDrawable,
+	    GCPtr	pGC,
+
+	    FbStip	*src,
+	    FbStride	srcStride,
+	    int		srcX,
+	    
+	    int		x,
+	    int		y,
+	    int		width,
+	    int		height);
+
+void
+fbPush1toN (DrawablePtr	pSrcDrawable,
+	    DrawablePtr	pDstDrawable,
+	    GCPtr	pGC,
+	    BoxPtr	pbox,
+	    int		nbox,
+	    int		dx,
+	    int		dy,
+	    Bool	reverse,
+	    Bool	upsidedown,
+	    Pixel	bitplane,
+	    void	*closure);
+
+void
+fbPushImage (DrawablePtr    pDrawable,
+	     GCPtr	    pGC,
+	     
+	     FbStip	    *src,
+	     FbStride	    srcStride,
+	     int	    srcX,
+
+	     int	    x,
+	     int	    y,
+	     int	    width,
+	     int	    height);
+
+void
+fbPushPixels (GCPtr	    pGC,
+	      PixmapPtr	    pBitmap,
+	      DrawablePtr   pDrawable,
+	      int	    dx,
+	      int	    dy,
+	      int	    xOrg,
+	      int	    yOrg);
+
+
+/*
+ * fbscreen.c
+ */
+
+Bool
+fbCloseScreen (int indx, ScreenPtr pScreen);
+
+Bool
+fbRealizeFont(ScreenPtr pScreen, FontPtr pFont);
+
+Bool
+fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
+
+void
+fbQueryBestSize (int class, 
+		 unsigned short *width, unsigned short *height,
+		 ScreenPtr pScreen);
+
+PixmapPtr
+_fbGetWindowPixmap (WindowPtr pWindow);
+
+void
+_fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap);
+
+Bool
+fbSetupScreen(ScreenPtr	pScreen, 
+	      pointer	pbits,		/* pointer to screen bitmap */
+	      int	xsize, 		/* in pixels */
+	      int	ysize,
+	      int	dpix,		/* dots per inch */
+	      int	dpiy,
+	      int	width,		/* pixel width of frame buffer */
+	      int	bpp);		/* bits per pixel of frame buffer */
+
+Bool
+wfbFinishScreenInit(ScreenPtr	pScreen,
+		    pointer	pbits,
+		    int		xsize,
+		    int		ysize,
+		    int		dpix,
+		    int		dpiy,
+		    int		width,
+		    int		bpp,
+		    SetupWrapProcPtr setupWrap,
+		    FinishWrapProcPtr finishWrap);
+
+Bool
+wfbScreenInit(ScreenPtr	pScreen,
+	      pointer	pbits,
+	      int	xsize,
+	      int	ysize,
+	      int	dpix,
+	      int	dpiy,
+	      int	width,
+	      int	bpp,
+	      SetupWrapProcPtr setupWrap,
+	      FinishWrapProcPtr finishWrap);
+
+Bool
+fbFinishScreenInit(ScreenPtr	pScreen,
+		   pointer	pbits,
+		   int		xsize,
+		   int		ysize,
+		   int		dpix,
+		   int		dpiy,
+		   int		width,
+		   int		bpp);
+
+Bool
+fbScreenInit(ScreenPtr	pScreen,
+	     pointer	pbits,
+	     int	xsize,
+	     int	ysize,
+	     int	dpix,
+	     int	dpiy,
+	     int	width,
+	     int	bpp);
+
+void
+fbInitializeBackingStore (ScreenPtr pScreen);
+    
+/*
+ * fbseg.c
+ */
+typedef void	FbBres (DrawablePtr	pDrawable,
+			GCPtr		pGC,
+			int		dashOffset,
+			int		signdx,
+			int		signdy,
+			int		axis,
+			int		x,
+			int		y,
+			int		e,
+			int		e1,
+			int		e3,
+			int		len);
+
+FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash;
+/*
+ * fbsetsp.c
+ */
+
+void
+fbSetSpans (DrawablePtr	    pDrawable,
+	    GCPtr	    pGC,
+	    char	    *src,
+	    DDXPointPtr	    ppt,
+	    int		    *pwidth,
+	    int		    nspans,
+	    int		    fSorted);
+
+FbBres *
+fbSelectBres (DrawablePtr   pDrawable,
+	      GCPtr	    pGC);
+
+void
+fbBres (DrawablePtr	pDrawable,
+	GCPtr		pGC,
+	int		dashOffset,
+	int		signdx,
+	int		signdy,
+	int		axis,
+	int		x,
+	int		y,
+	int		e,
+	int		e1,
+	int		e3,
+	int		len);
+
+void
+fbSegment (DrawablePtr	pDrawable,
+	   GCPtr	pGC,
+	   int		xa,
+	   int		ya,
+	   int		xb,
+	   int		yb,
+	   Bool		drawLast,
+	   int		*dashOffset);
+
+
+/*
+ * fbsolid.c
+ */
+
+void
+fbSolid (FbBits	    *dst,
+	 FbStride   dstStride,
+	 int	    dstX,
+	 int	    bpp,
+
+	 int	    width,
+	 int	    height,
+
+	 FbBits	    and,
+	 FbBits	    xor);
+
+#ifdef FB_24BIT
+void
+fbSolid24 (FbBits   *dst,
+	   FbStride dstStride,
+	   int	    dstX,
+
+	   int	    width,
+	   int	    height,
+
+	   FbBits   and,
+	   FbBits   xor);
+#endif
+
+/*
+ * fbstipple.c
+ */
+
+void
+fbTransparentSpan (FbBits   *dst,
+		   FbBits   stip,
+		   FbBits   fgxor,
+		   int	    n);
+
+void
+fbEvenStipple (FbBits   *dst,
+	       FbStride dstStride,
+	       int	dstX,
+	       int	dstBpp,
+
+	       int	width,
+	       int	height,
+
+	       FbStip   *stip,
+	       FbStride	stipStride,
+	       int	stipHeight,
+
+	       FbBits   fgand,
+	       FbBits   fgxor,
+	       FbBits   bgand,
+	       FbBits   bgxor,
+
+	       int	xRot,
+	       int	yRot);
+
+void
+fbOddStipple (FbBits	*dst,
+	      FbStride	dstStride,
+	      int	dstX,
+	      int	dstBpp,
+
+	      int	width,
+	      int	height,
+
+	      FbStip	*stip,
+	      FbStride	stipStride,
+	      int	stipWidth,
+	      int	stipHeight,
+
+	      FbBits	fgand,
+	      FbBits	fgxor,
+	      FbBits	bgand,
+	      FbBits	bgxor,
+
+	      int	xRot,
+	      int	yRot);
+
+void
+fbStipple (FbBits   *dst,
+	   FbStride dstStride,
+	   int	    dstX,
+	   int	    dstBpp,
+
+	   int	    width,
+	   int	    height,
+
+	   FbStip   *stip,
+	   FbStride stipStride,
+	   int	    stipWidth,
+	   int	    stipHeight,
+	   Bool	    even,
+
+	   FbBits   fgand,
+	   FbBits   fgxor,
+	   FbBits   bgand,
+	   FbBits   bgxor,
+
+	   int	    xRot,
+	   int	    yRot);
+
+/*
+ * fbtile.c
+ */
+
+void
+fbEvenTile (FbBits	*dst,
+	    FbStride	dstStride,
+	    int		dstX,
+
+	    int		width,
+	    int		height,
+
+	    FbBits	*tile,
+	    FbStride	tileStride,
+	    int		tileHeight,
+
+	    int		alu,
+	    FbBits	pm,
+	    int		xRot,
+	    int		yRot);
+
+void
+fbOddTile (FbBits	*dst,
+	   FbStride	dstStride,
+	   int		dstX,
+
+	   int		width,
+	   int		height,
+
+	   FbBits	*tile,
+	   FbStride	tileStride,
+	   int		tileWidth,
+	   int		tileHeight,
+
+	   int		alu,
+	   FbBits	pm,
+	   int		bpp,
+	   
+	   int		xRot,
+	   int		yRot);
+
+void
+fbTile (FbBits	    *dst,
+	FbStride    dstStride,
+	int	    dstX,
+
+	int	    width,
+	int	    height,
+
+	FbBits	    *tile,
+	FbStride    tileStride,
+	int	    tileWidth,
+	int	    tileHeight,
+	
+	int	    alu,
+	FbBits	    pm,
+	int	    bpp,
+	
+	int	    xRot,
+	int	    yRot);
+
+/*
+ * fbutil.c
+ */
+FbBits
+fbReplicatePixel (Pixel p, int bpp);
+
+void
+fbReduceRasterOp (int rop, FbBits fg, FbBits pm, FbBits *andp, FbBits *xorp);
+
+#ifdef FB_ACCESS_WRAPPER
+extern ReadMemoryProcPtr wfbReadMemory;
+extern WriteMemoryProcPtr wfbWriteMemory;
+#endif
+
+/*
+ * fbwindow.c
+ */
+
+Bool
+fbCreateWindow(WindowPtr pWin);
+
+Bool
+fbDestroyWindow(WindowPtr pWin);
+
+Bool
+fbMapWindow(WindowPtr pWindow);
+
+Bool
+fbPositionWindow(WindowPtr pWin, int x, int y);
+
+Bool 
+fbUnmapWindow(WindowPtr pWindow);
+    
+void
+fbCopyWindowProc (DrawablePtr	pSrcDrawable,
+		  DrawablePtr	pDstDrawable,
+		  GCPtr		pGC,
+		  BoxPtr	pbox,
+		  int		nbox,
+		  int		dx,
+		  int		dy,
+		  Bool		reverse,
+		  Bool		upsidedown,
+		  Pixel		bitplane,
+		  void		*closure);
+
+void 
+fbCopyWindow(WindowPtr	    pWin, 
+	     DDXPointRec    ptOldOrg, 
+	     RegionPtr	    prgnSrc);
+
+Bool
+fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
+
+void
+fbFillRegionSolid (DrawablePtr	pDrawable,
+		   RegionPtr	pRegion,
+		   FbBits	and,
+		   FbBits	xor);
+
+pixman_image_t *image_from_pict (PicturePtr pict,
+				 Bool       has_clip);
+void free_pixman_pict (PicturePtr, pixman_image_t *);
+
+#endif /* _FB_H_ */
+
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/fbrop.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/fbrop.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/fbrop.h	(revision 9233)
@@ -0,0 +1,136 @@
+/*
+ * Copyright © 1998 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Keith Packard makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _FBROP_H_
+#define _FBROP_H_
+
+typedef struct _mergeRopBits {
+    FbBits   ca1, cx1, ca2, cx2;
+} FbMergeRopRec, *FbMergeRopPtr;
+
+extern const FbMergeRopRec	FbMergeRopBits[16];
+
+#define FbDeclareMergeRop() FbBits   _ca1, _cx1, _ca2, _cx2;
+#define FbDeclarePrebuiltMergeRop()	FbBits	_cca, _ccx;
+
+#define FbInitializeMergeRop(alu,pm) {\
+    const FbMergeRopRec  *_bits; \
+    _bits = &FbMergeRopBits[alu]; \
+    _ca1 = _bits->ca1 &  pm; \
+    _cx1 = _bits->cx1 | ~pm; \
+    _ca2 = _bits->ca2 &  pm; \
+    _cx2 = _bits->cx2 &  pm; \
+}
+
+#define FbDestInvarientRop(alu,pm)  ((pm) == FB_ALLONES && \
+				     (((alu) >> 1 & 5) == ((alu) & 5)))
+
+#define FbDestInvarientMergeRop()   (_ca1 == 0 && _cx1 == 0)
+
+/* AND has higher precedence than XOR */
+
+#define FbDoMergeRop(src, dst) \
+    (((dst) & (((src) & _ca1) ^ _cx1)) ^ (((src) & _ca2) ^ _cx2))
+
+#define FbDoDestInvarientMergeRop(src)	(((src) & _ca2) ^ _cx2)
+
+#define FbDoMaskMergeRop(src, dst, mask) \
+    (((dst) & ((((src) & _ca1) ^ _cx1) | ~(mask))) ^ ((((src) & _ca2) ^ _cx2) & (mask)))
+
+#define FbDoLeftMaskByteMergeRop(dst, src, lb, l) { \
+    FbBits  __xor = ((src) & _ca2) ^ _cx2; \
+    FbDoLeftMaskByteRRop(dst,lb,l,((src) & _ca1) ^ _cx1,__xor); \
+}
+
+#define FbDoRightMaskByteMergeRop(dst, src, rb, r) { \
+    FbBits  __xor = ((src) & _ca2) ^ _cx2; \
+    FbDoRightMaskByteRRop(dst,rb,r,((src) & _ca1) ^ _cx1,__xor); \
+}
+
+#define FbDoRRop(dst, and, xor)	(((dst) & (and)) ^ (xor))
+
+#define FbDoMaskRRop(dst, and, xor, mask) \
+    (((dst) & ((and) | ~(mask))) ^ (xor & mask))
+
+/*
+ * Take a single bit (0 or 1) and generate a full mask
+ */
+#define fbFillFromBit(b,t)	(~((t) ((b) & 1)-1))
+
+#define fbXorT(rop,fg,pm,t) ((((fg) & fbFillFromBit((rop) >> 1,t)) | \
+			      (~(fg) & fbFillFromBit((rop) >> 3,t))) & (pm))
+
+#define fbAndT(rop,fg,pm,t) ((((fg) & fbFillFromBit (rop ^ (rop>>1),t)) | \
+			      (~(fg) & fbFillFromBit((rop>>2) ^ (rop>>3),t))) | \
+			     ~(pm))
+
+#define fbXor(rop,fg,pm)	fbXorT(rop,fg,pm,FbBits)
+
+#define fbAnd(rop,fg,pm)	fbAndT(rop,fg,pm,FbBits)
+
+#define fbXorStip(rop,fg,pm)    fbXorT(rop,fg,pm,FbStip)
+
+#define fbAndStip(rop,fg,pm)	fbAndT(rop,fg,pm,FbStip)
+
+/*
+ * Stippling operations; 
+ */
+
+extern const FbBits	fbStipple16Bits[256];	/* half of table */
+#define FbStipple16Bits(b) \
+    (fbStipple16Bits[(b)&0xff] | fbStipple16Bits[(b) >> 8] << FB_HALFUNIT)
+extern const FbBits	fbStipple8Bits[256];
+extern const FbBits	fbStipple4Bits[16];
+extern const FbBits	fbStipple2Bits[4];
+extern const FbBits	fbStipple1Bits[2];
+extern const FbBits	*const fbStippleTable[];
+
+#define FbStippleRRop(dst, b, fa, fx, ba, bx) \
+    (FbDoRRop(dst, fa, fx) & b) | (FbDoRRop(dst, ba, bx) & ~b)
+
+#define FbStippleRRopMask(dst, b, fa, fx, ba, bx, m) \
+    (FbDoMaskRRop(dst, fa, fx, m) & (b)) | (FbDoMaskRRop(dst, ba, bx, m) & ~(b))
+						       
+#define FbDoLeftMaskByteStippleRRop(dst, b, fa, fx, ba, bx, lb, l) { \
+    FbBits  __xor = ((fx) & (b)) | ((bx) & ~(b)); \
+    FbDoLeftMaskByteRRop(dst, lb, l, ((fa) & (b)) | ((ba) & ~(b)), __xor); \
+}
+
+#define FbDoRightMaskByteStippleRRop(dst, b, fa, fx, ba, bx, rb, r) { \
+    FbBits  __xor = ((fx) & (b)) | ((bx) & ~(b)); \
+    FbDoRightMaskByteRRop(dst, rb, r, ((fa) & (b)) | ((ba) & ~(b)), __xor); \
+}
+
+#define FbOpaqueStipple(b, fg, bg) (((fg) & (b)) | ((bg) & ~(b)))
+    
+/*
+ * Compute rop for using tile code for 1-bit dest stipples; modifies
+ * existing rop to flip depending on pixel values
+ */
+#define FbStipple1RopPick(alu,b)    (((alu) >> (2 - (((b) & 1) << 1))) & 3)
+
+#define FbOpaqueStipple1Rop(alu,fg,bg)    (FbStipple1RopPick(alu,fg) | \
+					   (FbStipple1RopPick(alu,bg) << 2))
+
+#define FbStipple1Rop(alu,fg)	    (FbStipple1RopPick(alu,fg) | 4)
+
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/gc.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/gc.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/gc.h	(revision 9233)
@@ -0,0 +1,173 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef GC_H
+#define GC_H 
+
+#include <X11/X.h>	/* for GContext, Mask */
+#include <X11/Xdefs.h>	/* for Bool */
+#include <X11/Xproto.h>
+#include "screenint.h"	/* for ScreenPtr */
+#include "pixmap.h"	/* for DrawablePtr */
+
+/* clientClipType field in GC */
+#define CT_NONE			0
+#define CT_PIXMAP		1
+#define CT_REGION		2
+#define CT_UNSORTED		6
+#define CT_YSORTED		10
+#define CT_YXSORTED		14
+#define CT_YXBANDED		18
+
+#define GCQREASON_VALIDATE	1
+#define GCQREASON_CHANGE	2
+#define GCQREASON_COPY_SRC	3
+#define GCQREASON_COPY_DST	4
+#define GCQREASON_DESTROY	5
+
+#define GC_CHANGE_SERIAL_BIT        (((unsigned long)1)<<31)
+#define GC_CALL_VALIDATE_BIT        (1L<<30)
+#define GCExtensionInterest   (1L<<29)
+
+#define DRAWABLE_SERIAL_BITS        (~(GC_CHANGE_SERIAL_BIT))
+
+#define MAX_SERIAL_NUM     (1L<<28)
+
+#define NEXT_SERIAL_NUMBER ((++globalSerialNumber) > MAX_SERIAL_NUM ? \
+	    (globalSerialNumber  = 1): globalSerialNumber)
+
+typedef struct _GCInterest *GCInterestPtr;
+typedef struct _GC    *GCPtr;
+typedef struct _GCOps *GCOpsPtr;
+
+extern void ValidateGC(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/);
+
+extern int ChangeGC(
+    GCPtr/*pGC*/,
+    BITS32 /*mask*/,
+    XID* /*pval*/);
+
+extern int DoChangeGC(
+    GCPtr/*pGC*/,
+    BITS32 /*mask*/,
+    XID* /*pval*/,
+    int /*fPointer*/);
+
+typedef union {
+    CARD32 val;
+    pointer ptr;
+} ChangeGCVal, *ChangeGCValPtr;
+
+extern int dixChangeGC(
+    ClientPtr /*client*/,
+    GCPtr /*pGC*/,
+    BITS32 /*mask*/,
+    CARD32 * /*pval*/,
+    ChangeGCValPtr /*pCGCV*/);
+
+extern GCPtr CreateGC(
+    DrawablePtr /*pDrawable*/,
+    BITS32 /*mask*/,
+    XID* /*pval*/,
+    int* /*pStatus*/,
+    XID /*gcid*/,
+    ClientPtr /*client*/);
+
+extern int CopyGC(
+    GCPtr/*pgcSrc*/,
+    GCPtr/*pgcDst*/,
+    BITS32 /*mask*/);
+
+extern int FreeGC(
+    pointer /*pGC*/,
+    XID /*gid*/);
+
+extern GCPtr CreateScratchGC(
+    ScreenPtr /*pScreen*/,
+    unsigned /*depth*/);
+
+extern void FreeGCperDepth(
+    int /*screenNum*/);
+
+extern Bool CreateGCperDepth(
+    int /*screenNum*/);
+
+extern Bool CreateDefaultStipple(
+    int /*screenNum*/);
+
+extern void FreeDefaultStipple(
+    int /*screenNum*/);
+
+extern int SetDashes(
+    GCPtr /*pGC*/,
+    unsigned /*offset*/,
+    unsigned /*ndash*/,
+    unsigned char* /*pdash*/);
+
+extern int VerifyRectOrder(
+    int /*nrects*/,
+    xRectangle* /*prects*/,
+    int /*ordering*/);
+
+extern int SetClipRects(
+    GCPtr /*pGC*/,
+    int /*xOrigin*/,
+    int /*yOrigin*/,
+    int /*nrects*/,
+    xRectangle* /*prects*/,
+    int /*ordering*/);
+
+extern GCPtr GetScratchGC(
+    unsigned /*depth*/,
+    ScreenPtr /*pScreen*/);
+
+extern void FreeScratchGC(
+    GCPtr /*pGC*/);
+
+#endif /* GC_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/gcstruct.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/gcstruct.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/gcstruct.h	(revision 9233)
@@ -0,0 +1,323 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+
+
+#ifndef GCSTRUCT_H
+#define GCSTRUCT_H
+
+#include "gc.h"
+
+#include "regionstr.h"
+#include "region.h"
+#include "pixmap.h"
+#include "screenint.h"
+#include "privates.h"
+#include <X11/Xprotostr.h>
+
+/*
+ * functions which modify the state of the GC
+ */
+
+typedef struct _GCFuncs {
+    void	(* ValidateGC)(
+		GCPtr /*pGC*/,
+		unsigned long /*stateChanges*/,
+		DrawablePtr /*pDrawable*/);
+
+    void	(* ChangeGC)(
+		GCPtr /*pGC*/,
+		unsigned long /*mask*/);
+
+    void	(* CopyGC)(
+		GCPtr /*pGCSrc*/,
+		unsigned long /*mask*/,
+		GCPtr /*pGCDst*/);
+
+    void	(* DestroyGC)(
+		GCPtr /*pGC*/);
+
+    void	(* ChangeClip)(
+		GCPtr /*pGC*/,
+		int /*type*/,
+		pointer /*pvalue*/,
+		int /*nrects*/);
+
+    void	(* DestroyClip)(
+		GCPtr /*pGC*/);
+
+    void	(* CopyClip)(
+		GCPtr /*pgcDst*/,
+		GCPtr /*pgcSrc*/);
+    DevUnion	devPrivate;
+} GCFuncs;
+
+/*
+ * graphics operations invoked through a GC
+ */
+
+typedef struct _GCOps {
+    void	(* FillSpans)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*nInit*/,
+		DDXPointPtr /*pptInit*/,
+		int * /*pwidthInit*/,
+		int /*fSorted*/);
+
+    void	(* SetSpans)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		char * /*psrc*/,
+		DDXPointPtr /*ppt*/,
+		int * /*pwidth*/,
+		int /*nspans*/,
+		int /*fSorted*/);
+
+    void	(* PutImage)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*depth*/,
+		int /*x*/,
+		int /*y*/,
+		int /*w*/,
+		int /*h*/,
+		int /*leftPad*/,
+		int /*format*/,
+		char * /*pBits*/);
+
+    RegionPtr	(* CopyArea)(
+		DrawablePtr /*pSrc*/,
+		DrawablePtr /*pDst*/,
+		GCPtr /*pGC*/,
+		int /*srcx*/,
+		int /*srcy*/,
+		int /*w*/,
+		int /*h*/,
+		int /*dstx*/,
+		int /*dsty*/);
+
+    RegionPtr	(* CopyPlane)(
+		DrawablePtr /*pSrcDrawable*/,
+		DrawablePtr /*pDstDrawable*/,
+		GCPtr /*pGC*/,
+		int /*srcx*/,
+		int /*srcy*/,
+		int /*width*/,
+		int /*height*/,
+		int /*dstx*/,
+		int /*dsty*/,
+		unsigned long /*bitPlane*/);
+    void	(* PolyPoint)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*mode*/,
+		int /*npt*/,
+		DDXPointPtr /*pptInit*/);
+
+    void	(* Polylines)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*mode*/,
+		int /*npt*/,
+		DDXPointPtr /*pptInit*/);
+
+    void	(* PolySegment)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*nseg*/,
+		xSegment * /*pSegs*/);
+
+    void	(* PolyRectangle)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*nrects*/,
+		xRectangle * /*pRects*/);
+
+    void	(* PolyArc)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*narcs*/,
+		xArc * /*parcs*/);
+
+    void	(* FillPolygon)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*shape*/,
+		int /*mode*/,
+		int /*count*/,
+		DDXPointPtr /*pPts*/);
+
+    void	(* PolyFillRect)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*nrectFill*/,
+		xRectangle * /*prectInit*/);
+
+    void	(* PolyFillArc)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*narcs*/,
+		xArc * /*parcs*/);
+
+    int		(* PolyText8)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*x*/,
+		int /*y*/,
+		int /*count*/,
+		char * /*chars*/);
+
+    int		(* PolyText16)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*x*/,
+		int /*y*/,
+		int /*count*/,
+		unsigned short * /*chars*/);
+
+    void	(* ImageText8)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*x*/,
+		int /*y*/,
+		int /*count*/,
+		char * /*chars*/);
+
+    void	(* ImageText16)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*x*/,
+		int /*y*/,
+		int /*count*/,
+		unsigned short * /*chars*/);
+
+    void	(* ImageGlyphBlt)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*x*/,
+		int /*y*/,
+		unsigned int /*nglyph*/,
+		CharInfoPtr * /*ppci*/,
+		pointer /*pglyphBase*/);
+
+    void	(* PolyGlyphBlt)(
+		DrawablePtr /*pDrawable*/,
+		GCPtr /*pGC*/,
+		int /*x*/,
+		int /*y*/,
+		unsigned int /*nglyph*/,
+		CharInfoPtr * /*ppci*/,
+		pointer /*pglyphBase*/);
+
+    void	(* PushPixels)(
+		GCPtr /*pGC*/,
+		PixmapPtr /*pBitMap*/,
+		DrawablePtr /*pDst*/,
+		int /*w*/,
+		int /*h*/,
+		int /*x*/,
+		int /*y*/);
+
+    DevUnion	devPrivate;
+} GCOps;
+
+/* there is padding in the bit fields because the Sun compiler doesn't
+ * force alignment to 32-bit boundaries.  losers.
+ */
+typedef struct _GC {
+    ScreenPtr		pScreen;		
+    unsigned char	depth;    
+    unsigned char	alu;
+    unsigned short	lineWidth;          
+    unsigned short	dashOffset;
+    unsigned short	numInDashList;
+    unsigned char	*dash;
+    unsigned int	lineStyle : 2;
+    unsigned int	capStyle : 2;
+    unsigned int	joinStyle : 2;
+    unsigned int	fillStyle : 2;
+    unsigned int	fillRule : 1;
+    unsigned int 	arcMode : 1;
+    unsigned int	subWindowMode : 1;
+    unsigned int	graphicsExposures : 1;
+    unsigned int	clientClipType : 2; /* CT_<kind> */
+    unsigned int	miTranslate:1; /* should mi things translate? */
+    unsigned int	tileIsPixel:1; /* tile is solid pixel */
+    unsigned int	fExpose:1;     /* Call exposure handling */
+    unsigned int	freeCompClip:1;  /* Free composite clip */
+    unsigned int	unused:14; /* see comment above */
+    unsigned long	planemask;
+    unsigned long	fgPixel;
+    unsigned long	bgPixel;
+    /*
+     * alas -- both tile and stipple must be here as they
+     * are independently specifiable
+     */
+    PixUnion		tile;
+    PixmapPtr		stipple;
+    DDXPointRec		patOrg;		/* origin for (tile, stipple) */
+    struct _Font	*font;
+    DDXPointRec		clipOrg;
+    DDXPointRec		lastWinOrg;	/* position of window last validated */
+    pointer		clientClip;
+    unsigned long	stateChanges;	/* masked with GC_<kind> */
+    unsigned long       serialNumber;
+    GCFuncs		*funcs;
+    GCOps		*ops;
+    PrivateRec		*devPrivates;
+    /*
+     * The following were moved here from private storage to allow device-
+     * independent access to them from screen wrappers.
+     * --- 1997.11.03  Marc Aurele La France (tsi@xfree86.org)
+     */
+    PixmapPtr		pRotatedPixmap; /* tile/stipple rotated for alignment */
+    RegionPtr		pCompositeClip;
+    /* fExpose & freeCompClip defined above */
+} GC;
+
+#endif /* GCSTRUCT_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/globals.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/globals.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/globals.h	(revision 9233)
@@ -0,0 +1,192 @@
+
+#ifndef _XSERV_GLOBAL_H_
+#define _XSERV_GLOBAL_H_
+
+#include "window.h"	/* for WindowPtr */
+
+/* Global X server variables that are visible to mi, dix, os, and ddx */
+
+extern CARD32 defaultScreenSaverTime;
+extern CARD32 defaultScreenSaverInterval;
+extern CARD32 ScreenSaverTime;
+extern CARD32 ScreenSaverInterval;
+
+#ifdef SCREENSAVER
+extern Bool screenSaverSuspended;
+#endif
+
+extern char *defaultFontPath;
+extern int monitorResolution;
+extern Bool loadableFonts;
+extern int defaultColorVisualClass;
+
+extern Bool Must_have_memory;
+extern WindowPtr *WindowTable;
+extern int GrabInProgress;
+extern Bool noTestExtensions;
+
+extern DDXPointRec dixScreenOrigins[MAXSCREENS];
+
+#ifdef DPMSExtension
+extern CARD32 defaultDPMSStandbyTime;
+extern CARD32 defaultDPMSSuspendTime;
+extern CARD32 defaultDPMSOffTime;
+extern CARD32 DPMSStandbyTime;
+extern CARD32 DPMSSuspendTime;
+extern CARD32 DPMSOffTime;
+extern CARD16 DPMSPowerLevel;
+extern Bool defaultDPMSEnabled;
+extern Bool DPMSEnabled;
+extern Bool DPMSEnabledSwitch;
+extern Bool DPMSDisabledSwitch;
+extern Bool DPMSCapableFlag;
+#endif
+
+#ifdef PANORAMIX
+extern Bool PanoramiXExtensionDisabledHack;
+#endif
+
+#ifdef BIGREQS
+extern Bool noBigReqExtension;
+#endif
+
+#ifdef COMPOSITE
+extern Bool noCompositeExtension;
+#endif
+
+#ifdef DAMAGE
+extern Bool noDamageExtension;
+#endif
+
+#ifdef DBE
+extern Bool noDbeExtension;
+#endif
+
+#ifdef DPMSExtension
+extern Bool noDPMSExtension;
+#endif
+
+#ifdef EVI
+extern Bool noEVIExtension;
+#endif
+
+#ifdef FONTCACHE
+extern Bool noFontCacheExtension;
+#endif
+
+#ifdef GLXEXT
+extern Bool noGlxExtension;
+#endif
+
+#ifdef SCREENSAVER
+extern Bool noScreenSaverExtension;
+#endif
+
+#ifdef MITSHM
+extern Bool noMITShmExtension;
+#endif
+
+#ifdef MITMISC
+extern Bool noMITMiscExtension;
+#endif
+
+#ifdef MULTIBUFFER
+extern Bool noMultibufferExtension;
+#endif
+
+#ifdef RANDR
+extern Bool noRRExtension;
+#endif
+
+#ifdef RENDER
+extern Bool noRenderExtension;
+#endif
+
+#ifdef SHAPE
+extern Bool noShapeExtension;
+#endif
+
+#ifdef XCSECURITY
+extern Bool noSecurityExtension;
+#endif
+
+#ifdef XSYNC
+extern Bool noSyncExtension;
+#endif
+
+#ifdef TOGCUP
+extern Bool noXcupExtension;
+#endif
+
+#ifdef RES
+extern Bool noResExtension;
+#endif
+
+#ifdef XAPPGROUP
+extern Bool noXagExtension;
+#endif
+
+#ifdef XCMISC
+extern Bool noXCMiscExtension;
+#endif
+
+#ifdef XEVIE
+extern Bool noXevieExtension;
+#endif
+
+#ifdef XF86BIGFONT
+extern Bool noXFree86BigfontExtension;
+#endif
+
+#ifdef XFreeXDGA
+extern Bool noXFree86DGAExtension;
+#endif
+
+#ifdef XF86DRI
+extern Bool noXFree86DRIExtension;
+#endif
+
+#ifdef XF86MISC
+extern Bool noXFree86MiscExtension;
+#endif
+
+#ifdef XF86VIDMODE
+extern Bool noXFree86VidModeExtension;
+#endif
+
+#ifdef XFIXES
+extern Bool noXFixesExtension;
+#endif
+
+#ifdef XKB
+/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */
+extern Bool noXkbExtension;
+#endif
+
+#ifdef PANORAMIX
+extern Bool noPanoramiXExtension;
+#endif
+
+#ifdef XINPUT
+extern Bool noXInputExtension;
+#endif
+
+#ifdef XIDLE
+extern Bool noXIdleExtension;
+#endif
+
+#ifdef XSELINUX
+extern Bool noSELinuxExtension;
+
+#define SELINUX_MODE_DEFAULT    0
+#define SELINUX_MODE_DISABLED   1
+#define SELINUX_MODE_PERMISSIVE 2
+#define SELINUX_MODE_ENFORCING  3
+extern int selinuxEnforcingState;
+#endif
+
+#ifdef XV
+extern Bool noXvExtension;
+#endif
+
+#endif /* !_XSERV_GLOBAL_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/glyphstr.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/glyphstr.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/glyphstr.h	(revision 9233)
@@ -0,0 +1,151 @@
+/*
+ *
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  SuSE makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author:  Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _GLYPHSTR_H_
+#define _GLYPHSTR_H_
+
+#include <X11/extensions/renderproto.h>
+#include "picture.h"
+#include "screenint.h"
+#include "regionstr.h"
+#include "miscstruct.h"
+#include "privates.h"
+
+#define GlyphFormat1	0
+#define GlyphFormat4	1
+#define GlyphFormat8	2
+#define GlyphFormat16	3
+#define GlyphFormat32	4
+#define GlyphFormatNum	5
+
+typedef struct _Glyph {
+    CARD32	    refcnt;
+    PrivateRec	*devPrivates;
+    unsigned char   sha1[20];
+    CARD32	    size; /* info + bitmap */
+    xGlyphInfo	    info;
+    /* per-screen pixmaps follow */
+} GlyphRec, *GlyphPtr;
+
+#define GlyphPicture(glyph) ((PicturePtr *) ((glyph) + 1))
+
+typedef struct _GlyphRef {
+    CARD32	signature;
+    GlyphPtr	glyph;
+} GlyphRefRec, *GlyphRefPtr;
+
+#define DeletedGlyph	((GlyphPtr) 1)
+
+typedef struct _GlyphHashSet {
+    CARD32	entries;
+    CARD32	size;
+    CARD32	rehash;
+} GlyphHashSetRec, *GlyphHashSetPtr;
+
+typedef struct _GlyphHash {
+    GlyphRefPtr	    table;
+    GlyphHashSetPtr hashSet;
+    CARD32	    tableEntries;
+} GlyphHashRec, *GlyphHashPtr;
+
+typedef struct _GlyphSet {
+    CARD32	    refcnt;
+    PictFormatPtr   format;
+    int		    fdepth;
+    GlyphHashRec    hash;
+    int             maxPrivate;
+    PrivateRec      *devPrivates;
+} GlyphSetRec, *GlyphSetPtr;
+
+#define GlyphSetGetPrivate(pGlyphSet,k)					\
+    dixLookupPrivate(&(pGlyphSet)->devPrivates, k)
+
+#define GlyphSetSetPrivate(pGlyphSet,k,ptr)				\
+    dixSetPrivate(&(pGlyphSet)->devPrivates, k, ptr)
+
+typedef struct _GlyphList {
+    INT16	    xOff;
+    INT16	    yOff;
+    CARD8	    len;
+    PictFormatPtr   format;
+} GlyphListRec, *GlyphListPtr;
+
+GlyphHashSetPtr
+FindGlyphHashSet (CARD32 filled);
+
+void
+GlyphUninit (ScreenPtr pScreen);
+
+GlyphHashSetPtr
+FindGlyphHashSet (CARD32 filled);
+
+GlyphRefPtr
+FindGlyphRef (GlyphHashPtr	hash,
+	      CARD32		signature,
+	      Bool		match,
+	      unsigned char	sha1[20]);
+
+GlyphPtr
+FindGlyphByHash (unsigned char sha1[20], int format);
+
+int
+HashGlyph (xGlyphInfo    *gi,
+	   CARD8	 *bits,
+	   unsigned long size,
+	   unsigned char sha1[20]);
+
+void
+FreeGlyph (GlyphPtr glyph, int format);
+
+void
+AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id);
+
+Bool
+DeleteGlyph (GlyphSetPtr glyphSet, Glyph id);
+
+GlyphPtr
+FindGlyph (GlyphSetPtr glyphSet, Glyph id);
+
+GlyphPtr
+AllocateGlyph (xGlyphInfo *gi, int format);
+
+Bool
+AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet);
+
+Bool
+ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global);
+
+Bool
+ResizeGlyphSet (GlyphSetPtr glyphSet, CARD32 change);
+
+GlyphSetPtr
+AllocateGlyphSet (int fdepth, PictFormatPtr format);
+
+int
+FreeGlyphSet (pointer   value,
+	      XID       gid);
+
+
+
+#endif /* _GLYPHSTR_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/input.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/input.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/input.h	(revision 9233)
@@ -0,0 +1,450 @@
+/************************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+#ifndef INPUT_H
+#define INPUT_H
+
+#include "misc.h"
+#include "screenint.h"
+#include <X11/Xmd.h>
+#include <X11/Xproto.h>
+#include "window.h"     /* for WindowPtr */
+
+#define DEVICE_INIT	0
+#define DEVICE_ON	1
+#define DEVICE_OFF	2
+#define DEVICE_CLOSE	3
+
+#define POINTER_RELATIVE (1 << 1)
+#define POINTER_ABSOLUTE (1 << 2)
+#define POINTER_ACCELERATE (1 << 3)
+
+#define MAP_LENGTH	256
+#define DOWN_LENGTH	32	/* 256/8 => number of bytes to hold 256 bits */
+#define NullGrab ((GrabPtr)NULL)
+#define PointerRootWin ((WindowPtr)PointerRoot)
+#define NoneWin ((WindowPtr)None)
+#define NullDevice ((DevicePtr)NULL)
+
+#ifndef FollowKeyboard
+#define FollowKeyboard 		3
+#endif
+#ifndef FollowKeyboardWin
+#define FollowKeyboardWin  ((WindowPtr) FollowKeyboard)
+#endif
+#ifndef RevertToFollowKeyboard
+#define RevertToFollowKeyboard	3
+#endif
+
+typedef unsigned long Leds;
+typedef struct _OtherClients *OtherClientsPtr;
+typedef struct _InputClients *InputClientsPtr;
+typedef struct _DeviceIntRec *DeviceIntPtr;
+
+typedef int (*DeviceProc)(
+    DeviceIntPtr /*device*/,
+    int /*what*/);
+
+typedef void (*ProcessInputProc)(
+    xEventPtr /*events*/,
+    DeviceIntPtr /*device*/,
+    int /*count*/);
+
+typedef Bool (*DeviceHandleProc)(
+    DeviceIntPtr /*device*/,
+    void* /*data*/
+    );
+
+typedef void (*DeviceUnwrapProc)(
+    DeviceIntPtr /*device*/,
+    DeviceHandleProc /*proc*/,
+    void* /*data*/
+    );
+
+typedef struct _DeviceRec {
+    pointer	devicePrivate;
+    ProcessInputProc processInputProc;	/* current */
+    ProcessInputProc realInputProc;	/* deliver */
+    ProcessInputProc enqueueInputProc;	/* enqueue */
+    Bool	on;			/* used by DDX to keep state */
+} DeviceRec, *DevicePtr;
+
+typedef struct {
+    int			click, bell, bell_pitch, bell_duration;
+    Bool		autoRepeat;
+    unsigned char	autoRepeats[32];
+    Leds		leds;
+    unsigned char	id;
+} KeybdCtrl;
+
+typedef struct {
+    KeySym  *map;
+    KeyCode minKeyCode,
+	    maxKeyCode;
+    int     mapWidth;
+} KeySymsRec, *KeySymsPtr;
+
+typedef struct {
+    int		num, den, threshold;
+    unsigned char id;
+} PtrCtrl;
+
+typedef struct {
+    int         resolution, min_value, max_value;
+    int         integer_displayed;
+    unsigned char id;
+} IntegerCtrl;
+
+typedef struct {
+    int         max_symbols, num_symbols_supported;
+    int         num_symbols_displayed;
+    KeySym      *symbols_supported;
+    KeySym      *symbols_displayed;
+    unsigned char id;
+} StringCtrl;
+
+typedef struct {
+    int         percent, pitch, duration;
+    unsigned char id;
+} BellCtrl;
+
+typedef struct {
+    Leds        led_values;
+    Mask        led_mask;
+    unsigned char id;
+} LedCtrl;
+
+extern KeybdCtrl	defaultKeyboardControl;
+extern PtrCtrl		defaultPointerControl;
+
+typedef struct _InputOption {
+    char                *key;
+    char                *value;
+    struct _InputOption *next;
+} InputOption;
+
+extern void InitCoreDevices(void);
+
+extern DeviceIntPtr AddInputDevice(
+    DeviceProc /*deviceProc*/,
+    Bool /*autoStart*/);
+
+extern Bool EnableDevice(
+    DeviceIntPtr /*device*/);
+
+extern Bool ActivateDevice(
+    DeviceIntPtr /*device*/);
+
+extern Bool DisableDevice(
+    DeviceIntPtr /*device*/);
+
+extern int InitAndStartDevices(void);
+
+extern void CloseDownDevices(void);
+
+extern int RemoveDevice(
+    DeviceIntPtr /*dev*/);
+
+extern int NumMotionEvents(void);
+
+extern void RegisterPointerDevice(
+    DeviceIntPtr /*device*/);
+
+extern void RegisterKeyboardDevice(
+    DeviceIntPtr /*device*/);
+
+extern int dixLookupDevice(
+    DeviceIntPtr *         /* dev */,
+    int                    /* id */,
+    ClientPtr              /* client */,
+    Mask                   /* access_mode */);
+
+extern void QueryMinMaxKeyCodes(
+    KeyCode* /*minCode*/,
+    KeyCode* /*maxCode*/);
+
+extern Bool SetKeySymsMap(
+    KeySymsPtr /*dst*/,
+    KeySymsPtr /*src*/);
+
+extern Bool InitKeyClassDeviceStruct(
+    DeviceIntPtr /*device*/,
+    KeySymsPtr /*pKeySyms*/,
+    CARD8 /*pModifiers*/[]);
+
+extern Bool InitButtonClassDeviceStruct(
+    DeviceIntPtr /*device*/,
+    int /*numButtons*/,
+    CARD8* /*map*/);
+
+typedef int (*ValuatorMotionProcPtr)(
+		DeviceIntPtr /*pdevice*/,
+		xTimecoord * /*coords*/,
+		unsigned long /*start*/,
+		unsigned long /*stop*/,
+		ScreenPtr /*pScreen*/);
+
+extern Bool InitValuatorClassDeviceStruct(
+    DeviceIntPtr /*device*/,
+    int /*numAxes*/,
+    ValuatorMotionProcPtr /* motionProc */,
+    int /*numMotionEvents*/,
+    int /*mode*/);
+
+extern Bool InitAbsoluteClassDeviceStruct(
+    DeviceIntPtr /*device*/);
+
+extern Bool InitFocusClassDeviceStruct(
+    DeviceIntPtr /*device*/);
+
+typedef void (*BellProcPtr)(
+    int /*percent*/,
+    DeviceIntPtr /*device*/,
+    pointer /*ctrl*/,
+    int);
+
+typedef void (*KbdCtrlProcPtr)(
+    DeviceIntPtr /*device*/,
+    KeybdCtrl * /*ctrl*/);
+
+extern Bool InitKbdFeedbackClassDeviceStruct(
+    DeviceIntPtr /*device*/,
+    BellProcPtr /*bellProc*/,
+    KbdCtrlProcPtr /*controlProc*/);
+
+typedef void (*PtrCtrlProcPtr)(
+    DeviceIntPtr /*device*/,
+    PtrCtrl * /*ctrl*/);
+
+extern Bool InitPtrFeedbackClassDeviceStruct(
+    DeviceIntPtr /*device*/,
+    PtrCtrlProcPtr /*controlProc*/);
+
+typedef void (*StringCtrlProcPtr)(
+    DeviceIntPtr /*device*/,
+    StringCtrl * /*ctrl*/);
+
+extern Bool InitStringFeedbackClassDeviceStruct(
+    DeviceIntPtr /*device*/,
+    StringCtrlProcPtr /*controlProc*/,
+    int /*max_symbols*/,
+    int /*num_symbols_supported*/,
+    KeySym* /*symbols*/);
+
+typedef void (*BellCtrlProcPtr)(
+    DeviceIntPtr /*device*/,
+    BellCtrl * /*ctrl*/);
+
+extern Bool InitBellFeedbackClassDeviceStruct(
+    DeviceIntPtr /*device*/,
+    BellProcPtr /*bellProc*/,
+    BellCtrlProcPtr /*controlProc*/);
+
+typedef void (*LedCtrlProcPtr)(
+    DeviceIntPtr /*device*/,
+    LedCtrl * /*ctrl*/);
+
+extern Bool InitLedFeedbackClassDeviceStruct(
+    DeviceIntPtr /*device*/,
+    LedCtrlProcPtr /*controlProc*/);
+
+typedef void (*IntegerCtrlProcPtr)(
+    DeviceIntPtr /*device*/,
+    IntegerCtrl * /*ctrl*/);
+
+
+extern Bool InitIntegerFeedbackClassDeviceStruct(
+    DeviceIntPtr /*device*/,
+    IntegerCtrlProcPtr /*controlProc*/);
+
+extern Bool InitPointerDeviceStruct(
+    DevicePtr /*device*/,
+    CARD8* /*map*/,
+    int /*numButtons*/,
+    ValuatorMotionProcPtr /*motionProc*/,
+    PtrCtrlProcPtr /*controlProc*/,
+    int /*numMotionEvents*/,
+    int /*numAxes*/);
+
+extern Bool InitKeyboardDeviceStruct(
+    DevicePtr /*device*/,
+    KeySymsPtr /*pKeySyms*/,
+    CARD8 /*pModifiers*/[],
+    BellProcPtr /*bellProc*/,
+    KbdCtrlProcPtr /*controlProc*/);
+
+extern void SendMappingNotify(
+    unsigned int /*request*/,
+    unsigned int /*firstKeyCode*/,
+    unsigned int /*count*/,
+    ClientPtr	/* client */);
+
+extern Bool BadDeviceMap(
+    BYTE* /*buff*/,
+    int /*length*/,
+    unsigned /*low*/,
+    unsigned /*high*/,
+    XID* /*errval*/);
+
+extern Bool AllModifierKeysAreUp(
+    DeviceIntPtr /*device*/,
+    CARD8* /*map1*/,
+    int /*per1*/,
+    CARD8* /*map2*/,
+    int /*per2*/);
+
+extern void NoteLedState(
+    DeviceIntPtr /*keybd*/,
+    int /*led*/,
+    Bool /*on*/);
+
+extern void MaybeStopHint(
+    DeviceIntPtr /*device*/,
+    ClientPtr /*client*/);
+
+extern void ProcessPointerEvent(
+    xEventPtr /*xE*/,
+    DeviceIntPtr /*mouse*/,
+    int /*count*/);
+
+extern void ProcessKeyboardEvent(
+    xEventPtr /*xE*/,
+    DeviceIntPtr /*keybd*/,
+    int /*count*/);
+
+#ifdef XKB
+extern void CoreProcessPointerEvent(
+    xEventPtr /*xE*/,
+    DeviceIntPtr /*mouse*/,
+    int /*count*/);
+
+extern void CoreProcessKeyboardEvent(
+    xEventPtr /*xE*/,
+    DeviceIntPtr /*keybd*/,
+    int /*count*/);
+#endif
+
+extern Bool LegalModifier(
+    unsigned int /*key*/, 
+    DeviceIntPtr /*pDev*/);
+
+extern void ProcessInputEvents(void);
+
+extern void InitInput(
+    int  /*argc*/,
+    char ** /*argv*/);
+
+extern int GetMaximumEventsNum(void);
+
+extern int GetPointerEvents(
+    xEvent *events,
+    DeviceIntPtr pDev,
+    int type,
+    int buttons,
+    int flags,
+    int first_valuator,
+    int num_valuators,
+    int *valuators);
+
+extern int GetKeyboardEvents(
+    xEvent *events,
+    DeviceIntPtr pDev,
+    int type,
+    int key_code);
+
+extern int GetKeyboardValuatorEvents(
+    xEvent *events,
+    DeviceIntPtr pDev,
+    int type,
+    int key_code,
+    int first_valuator,
+    int num_valuator,
+    int *valuators);
+
+extern int GetProximityEvents(
+    xEvent *events,
+    DeviceIntPtr pDev,
+    int type,
+    int first_valuator,
+    int num_valuators,
+    int *valuators);
+
+extern void PostSyntheticMotion(
+    int x,
+    int y,
+    int screen,
+    unsigned long time);
+
+extern int GetMotionHistorySize(
+    void);
+
+extern void AllocateMotionHistory(
+    DeviceIntPtr pDev);
+
+extern int GetMotionHistory(
+    DeviceIntPtr pDev,
+    xTimecoord *buff,
+    unsigned long start,
+    unsigned long stop,
+    ScreenPtr pScreen);
+
+extern void SwitchCoreKeyboard(DeviceIntPtr pDev);
+extern void SwitchCorePointer(DeviceIntPtr pDev);
+
+/* Implemented by the DDX. */
+extern int NewInputDeviceRequest(
+    InputOption *options,
+    DeviceIntPtr *dev);
+extern void DeleteInputDeviceRequest(
+    DeviceIntPtr dev);
+
+extern void DDXRingBell(
+    int volume,
+    int pitch,
+    int duration);
+
+#endif /* INPUT_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mfb.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mfb.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mfb.h	(revision 9233)
@@ -0,0 +1,1112 @@
+/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#if !defined(_MFB_H_) || defined(MFB_PROTOTYPES_ONLY)
+#ifndef MFB_PROTOTYPES_ONLY
+#define _MFB_H_
+#endif
+
+/* Monochrome Frame Buffer definitions 
+   written by drewry, september 1986
+*/
+#include "pixmap.h"
+#include "region.h"
+#include "gc.h"
+#include "colormap.h"
+#include "privates.h"
+#include "miscstruct.h"
+#include "mibstore.h"
+
+extern int InverseAlu[];
+extern int mfbGetInverseAlu(int i);
+
+/* warning: PixelType definition duplicated in maskbits.h */
+#ifndef PixelType
+#define PixelType CARD32
+#endif /* PixelType */
+#ifndef MfbBits
+#define MfbBits CARD32
+#endif
+
+/* mfbbitblt.c */
+
+extern void mfbDoBitblt(
+    DrawablePtr /*pSrc*/,
+    DrawablePtr /*pDst*/,
+    int /*alu*/,
+    RegionPtr /*prgnDst*/,
+    DDXPointPtr /*pptSrc*/
+);
+
+extern RegionPtr mfbCopyArea(
+    DrawablePtr /*pSrcDrawable*/,
+    DrawablePtr /*pDstDrawable*/,
+    GCPtr/*pGC*/,
+    int /*srcx*/,
+    int /*srcy*/,
+    int /*width*/,
+    int /*height*/,
+    int /*dstx*/,
+    int /*dsty*/
+);
+
+extern Bool mfbRegisterCopyPlaneProc(
+    ScreenPtr /*pScreen*/,
+    RegionPtr (* /*proc*/)(
+	DrawablePtr         /* pSrcDrawable */,
+	DrawablePtr         /* pDstDrawable */,
+	GCPtr               /* pGC */,
+	int                 /* srcx */,
+	int                 /* srcy */,
+	int                 /* width */,
+	int                 /* height */,
+	int                 /* dstx */,
+	int                 /* dsty */,
+	unsigned long	    /* bitPlane */
+	)
+);
+
+extern RegionPtr mfbCopyPlane(
+    DrawablePtr /*pSrcDrawable*/,
+    DrawablePtr /*pDstDrawable*/,
+    GCPtr/*pGC*/,
+    int /*srcx*/,
+    int /*srcy*/,
+    int /*width*/,
+    int /*height*/,
+    int /*dstx*/,
+    int /*dsty*/,
+    unsigned long /*plane*/
+);
+/* mfbbltC.c */
+
+extern void mfbDoBitbltCopy(
+    DrawablePtr /*pSrc*/,
+    DrawablePtr /*pDst*/,
+    int /*alu*/,
+    RegionPtr /*prgnDst*/,
+    DDXPointPtr /*pptSrc*/
+);
+/* mfbbltCI.c */
+
+extern void mfbDoBitbltCopyInverted(
+    DrawablePtr /*pSrc*/,
+    DrawablePtr /*pDst*/,
+    int /*alu*/,
+    RegionPtr /*prgnDst*/,
+    DDXPointPtr /*pptSrc*/
+);
+/* mfbbltG.c */
+
+extern void mfbDoBitbltGeneral(
+    DrawablePtr /*pSrc*/,
+    DrawablePtr /*pDst*/,
+    int /*alu*/,
+    RegionPtr /*prgnDst*/,
+    DDXPointPtr /*pptSrc*/
+);
+/* mfbbltO.c */
+
+extern void mfbDoBitbltOr(
+    DrawablePtr /*pSrc*/,
+    DrawablePtr /*pDst*/,
+    int /*alu*/,
+    RegionPtr /*prgnDst*/,
+    DDXPointPtr /*pptSrc*/
+);
+/* mfbbltX.c */
+
+extern void mfbDoBitbltXor(
+    DrawablePtr /*pSrc*/,
+    DrawablePtr /*pDst*/,
+    int /*alu*/,
+    RegionPtr /*prgnDst*/,
+    DDXPointPtr /*pptSrc*/
+);
+/* mfbbres.c */
+
+extern void mfbBresS(
+    int /*rop*/,
+    PixelType * /*addrl*/,
+    int /*nlwidth*/,
+    int /*signdx*/,
+    int /*signdy*/,
+    int /*axis*/,
+    int /*x1*/,
+    int /*y1*/,
+    int /*e*/,
+    int /*e1*/,
+    int /*e2*/,
+    int /*len*/
+);
+/* mfbbresd.c */
+
+extern void mfbBresD(
+    int /*fgrop*/,
+    int /*bgrop*/,
+    int * /*pdashIndex*/,
+    unsigned char * /*pDash*/,
+    int /*numInDashList*/,
+    int * /*pdashOffset*/,
+    int /*isDoubleDash*/,
+    PixelType * /*addrl*/,
+    int /*nlwidth*/,
+    int /*signdx*/,
+    int /*signdy*/,
+    int /*axis*/,
+    int /*x1*/,
+    int /*y1*/,
+    int /*e*/,
+    int /*e1*/,
+    int /*e2*/,
+    int /*len*/
+);
+
+/* mfbclip.c */
+
+extern RegionPtr mfbPixmapToRegion(
+    PixmapPtr /*pPix*/
+);
+
+#ifndef MFB_PROTOTYPES_ONLY
+typedef RegionPtr (*mfbPixmapToRegionProc)(PixmapPtr);
+
+extern mfbPixmapToRegionProc *mfbPixmapToRegionWeak(void);
+#endif
+
+/* mfbcmap.c */
+
+extern int mfbListInstalledColormaps(
+    ScreenPtr /*pScreen*/,
+    Colormap * /*pmaps*/
+);
+
+extern void mfbInstallColormap(
+    ColormapPtr /*pmap*/
+);
+
+extern void mfbUninstallColormap(
+    ColormapPtr /*pmap*/
+);
+
+extern void mfbResolveColor(
+    unsigned short * /*pred*/,
+    unsigned short * /*pgreen*/,
+    unsigned short * /*pblue*/,
+    VisualPtr /*pVisual*/
+);
+
+extern Bool mfbCreateColormap(
+    ColormapPtr /*pMap*/
+);
+
+extern void mfbDestroyColormap(
+    ColormapPtr /*pMap*/
+);
+
+extern Bool mfbCreateDefColormap(
+    ScreenPtr /*pScreen*/
+);
+/* mfbfillarc.c */
+
+extern void mfbPolyFillArcSolid(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/,
+    int /*narcs*/,
+    xArc * /*parcs*/
+);
+/* mfbfillrct.c */
+
+extern void mfbPolyFillRect(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*nrectFill*/,
+    xRectangle * /*prectInit*/
+);
+/* mfbfillsp.c */
+
+extern void mfbBlackSolidFS(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*nInit*/,
+    DDXPointPtr /*pptInit*/,
+    int * /*pwidthInit*/,
+    int /*fSorted*/
+);
+
+extern void mfbWhiteSolidFS(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*nInit*/,
+    DDXPointPtr /*pptInit*/,
+    int * /*pwidthInit*/,
+    int /*fSorted*/
+);
+
+extern void mfbInvertSolidFS(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*nInit*/,
+    DDXPointPtr /*pptInit*/,
+    int * /*pwidthInit*/,
+    int /*fSorted*/
+);
+
+extern void mfbWhiteStippleFS(
+    DrawablePtr /*pDrawable*/,
+    GCPtr/*pGC*/,
+    int /*nInit*/,
+    DDXPointPtr /*pptInit*/,
+    int * /*pwidthInit*/,
+    int /*fSorted*/
+);
+
+extern void mfbBlackStippleFS(
+    DrawablePtr /*pDrawable*/,
+    GCPtr/*pGC*/,
+    int /*nInit*/,
+    DDXPointPtr /*pptInit*/,
+    int * /*pwidthInit*/,
+    int /*fSorted*/
+);
+
+extern void mfbInvertStippleFS(
+    DrawablePtr /*pDrawable*/,
+    GCPtr/*pGC*/,
+    int /*nInit*/,
+    DDXPointPtr /*pptInit*/,
+    int * /*pwidthInit*/,
+    int /*fSorted*/
+);
+
+extern void mfbTileFS(
+    DrawablePtr /*pDrawable*/,
+    GCPtr/*pGC*/,
+    int /*nInit*/,
+    DDXPointPtr /*pptInit*/,
+    int * /*pwidthInit*/,
+    int /*fSorted*/
+);
+
+extern void mfbUnnaturalTileFS(
+    DrawablePtr /*pDrawable*/,
+    GCPtr/*pGC*/,
+    int /*nInit*/,
+    DDXPointPtr /*pptInit*/,
+    int * /*pwidthInit*/,
+    int /*fSorted*/
+);
+
+extern void mfbUnnaturalStippleFS(
+    DrawablePtr /*pDrawable*/,
+    GCPtr/*pGC*/,
+    int /*nInit*/,
+    DDXPointPtr /*pptInit*/,
+    int * /*pwidthInit*/,
+    int /*fSorted*/
+);
+/* mfbfont.c */
+
+extern Bool mfbRealizeFont(
+    ScreenPtr /*pscr*/,
+    FontPtr /*pFont*/
+);
+
+extern Bool mfbUnrealizeFont(
+    ScreenPtr /*pscr*/,
+    FontPtr /*pFont*/
+);
+
+#ifndef MFB_PROTOTYPES_ONLY
+typedef void (*mfbRealizeFontProc)(ScreenPtr, FontPtr);
+typedef void (*mfbUnrealizeFontProc)(ScreenPtr, FontPtr);
+
+extern mfbRealizeFontProc *mfbRealizeFontWeak(void);
+extern mfbUnrealizeFontProc *mfbUnrealizeFontWeak(void);
+#endif
+
+/* mfbgc.c */
+
+extern Bool mfbCreateGC(
+    GCPtr /*pGC*/
+);
+
+extern void mfbValidateGC(
+    GCPtr /*pGC*/,
+    unsigned long /*changes*/,
+    DrawablePtr /*pDrawable*/
+);
+
+extern int mfbReduceRop(
+    int /*alu*/,
+    Pixel /*src*/
+);
+
+/* mfbgetsp.c */
+
+extern void mfbGetSpans(
+    DrawablePtr /*pDrawable*/,
+    int /*wMax*/,
+    DDXPointPtr /*ppt*/,
+    int * /*pwidth*/,
+    int /*nspans*/,
+    char * /*pdstStart*/
+);
+/* mfbhrzvert.c */
+
+extern void mfbHorzS(
+    int /*rop*/,
+    PixelType * /*addrl*/,
+    int /*nlwidth*/,
+    int /*x1*/,
+    int /*y1*/,
+    int /*len*/
+);
+
+extern void mfbVertS(
+    int /*rop*/,
+    PixelType * /*addrl*/,
+    int /*nlwidth*/,
+    int /*x1*/,
+    int /*y1*/,
+    int /*len*/
+);
+/* mfbigbblak.c */
+
+extern void mfbImageGlyphBltBlack(
+    DrawablePtr /*pDrawable*/,
+    GCPtr/*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    unsigned int /*nglyph*/,
+    CharInfoPtr * /*ppci*/,
+    pointer /*pglyphBase*/
+);
+/* mfbigbwht.c */
+
+extern void mfbImageGlyphBltWhite(
+    DrawablePtr /*pDrawable*/,
+    GCPtr/*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    unsigned int /*nglyph*/,
+    CharInfoPtr * /*ppci*/,
+    pointer /*pglyphBase*/
+);
+/* mfbimage.c */
+
+extern void mfbPutImage(
+    DrawablePtr /*dst*/,
+    GCPtr /*pGC*/,
+    int /*depth*/,
+    int /*x*/,
+    int /*y*/,
+    int /*w*/,
+    int /*h*/,
+    int /*leftPad*/,
+    int /*format*/,
+    char * /*pImage*/
+);
+
+extern void mfbGetImage(
+    DrawablePtr /*pDrawable*/,
+    int /*sx*/,
+    int /*sy*/,
+    int /*w*/,
+    int /*h*/,
+    unsigned int /*format*/,
+    unsigned long /*planeMask*/,
+    char * /*pdstLine*/
+);
+/* mfbline.c */
+
+extern void mfbLineSS(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*mode*/,
+    int /*npt*/,
+    DDXPointPtr /*pptInit*/
+);
+
+extern void mfbLineSD(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*mode*/,
+    int /*npt*/,
+    DDXPointPtr /*pptInit*/
+);
+
+/* mfbmisc.c */
+
+extern void mfbQueryBestSize(
+    int /*class*/,
+    unsigned short * /*pwidth*/,
+    unsigned short * /*pheight*/,
+    ScreenPtr /*pScreen*/
+);
+
+#ifndef MFB_PROTOTYPES_ONLY
+typedef void (*mfbQueryBestSizeProc)(int, unsigned short *, unsigned short *,
+                                     ScreenPtr);
+
+extern mfbQueryBestSizeProc *mfbQueryBestSizeWeak(void);
+#endif
+
+/* mfbpablack.c */
+
+extern void mfbSolidBlackArea(
+    DrawablePtr /*pDraw*/,
+    int /*nbox*/,
+    BoxPtr /*pbox*/,
+    int /*alu*/,
+    PixmapPtr /*nop*/
+);
+
+extern void mfbStippleBlackArea(
+    DrawablePtr /*pDraw*/,
+    int /*nbox*/,
+    BoxPtr /*pbox*/,
+    int /*alu*/,
+    PixmapPtr /*pstipple*/
+);
+/* mfbpainv.c */
+
+extern void mfbSolidInvertArea(
+    DrawablePtr /*pDraw*/,
+    int /*nbox*/,
+    BoxPtr /*pbox*/,
+    int /*alu*/,
+    PixmapPtr /*nop*/
+);
+
+extern void mfbStippleInvertArea(
+    DrawablePtr /*pDraw*/,
+    int /*nbox*/,
+    BoxPtr /*pbox*/,
+    int /*alu*/,
+    PixmapPtr /*pstipple*/
+);
+/* mfbpawhite.c */
+
+extern void mfbSolidWhiteArea(
+    DrawablePtr /*pDraw*/,
+    int /*nbox*/,
+    BoxPtr /*pbox*/,
+    int /*alu*/,
+    PixmapPtr /*nop*/
+);
+
+extern void mfbStippleWhiteArea(
+    DrawablePtr /*pDraw*/,
+    int /*nbox*/,
+    BoxPtr /*pbox*/,
+    int /*alu*/,
+    PixmapPtr /*pstipple*/
+);
+
+/* mfbpgbinv.c */
+
+extern void mfbPolyGlyphBltBlack(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    unsigned int /*nglyph*/,
+    CharInfoPtr * /*ppci*/,
+    pointer /*pglyphBase*/
+);
+/* mfbpgbinv.c */
+
+extern void mfbPolyGlyphBltInvert(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    unsigned int /*nglyph*/,
+    CharInfoPtr * /*ppci*/,
+    pointer /*pglyphBase*/
+);
+/* mfbpgbwht.c */
+
+extern void mfbPolyGlyphBltWhite(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    unsigned int /*nglyph*/,
+    CharInfoPtr * /*ppci*/,
+    pointer /*pglyphBase*/
+);
+/* mfbpixmap.c */
+
+extern PixmapPtr mfbCreatePixmap(
+    ScreenPtr /*pScreen*/,
+    int /*width*/,
+    int /*height*/,
+    int /*depth*/,
+    unsigned /*usage_hint*/
+);
+
+extern Bool mfbDestroyPixmap(
+    PixmapPtr /*pPixmap*/
+);
+
+extern PixmapPtr mfbCopyPixmap(
+    PixmapPtr /*pSrc*/
+);
+
+extern void mfbPadPixmap(
+    PixmapPtr /*pPixmap*/
+);
+
+extern void mfbXRotatePixmap(
+    PixmapPtr /*pPix*/,
+    int /*rw*/
+);
+
+extern void mfbYRotatePixmap(
+    PixmapPtr /*pPix*/,
+    int /*rh*/
+);
+
+extern void mfbCopyRotatePixmap(
+    PixmapPtr /*psrcPix*/,
+    PixmapPtr * /*ppdstPix*/,
+    int /*xrot*/,
+    int /*yrot*/
+);
+/* mfbplyblack.c */
+
+extern void mfbFillPolyBlack(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*shape*/,
+    int /*mode*/,
+    int /*count*/,
+    DDXPointPtr /*ptsIn*/
+);
+/* mfbplyinv.c */
+
+extern void mfbFillPolyInvert(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*shape*/,
+    int /*mode*/,
+    int /*count*/,
+    DDXPointPtr /*ptsIn*/
+);
+
+/* mfbpntwin.c */
+
+extern void mfbFillPolyWhite(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*shape*/,
+    int /*mode*/,
+    int /*count*/,
+    DDXPointPtr /*ptsIn*/
+);
+/* mfbpolypnt.c */
+
+extern void mfbPolyPoint(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*mode*/,
+    int /*npt*/,
+    xPoint * /*pptInit*/
+);
+/* mfbpushpxl.c */
+
+extern void mfbSolidPP(
+    GCPtr /*pGC*/,
+    PixmapPtr /*pBitMap*/,
+    DrawablePtr /*pDrawable*/,
+    int /*dx*/,
+    int /*dy*/,
+    int /*xOrg*/,
+    int /*yOrg*/
+);
+
+extern void mfbPushPixels(
+    GCPtr /*pGC*/,
+    PixmapPtr /*pBitMap*/,
+    DrawablePtr /*pDrawable*/,
+    int /*dx*/,
+    int /*dy*/,
+    int /*xOrg*/,
+    int /*yOrg*/
+);
+
+#ifndef MFB_PROTOTYPES_ONLY
+typedef void (*mfbPushPixelsProc)(GCPtr, PixmapPtr, DrawablePtr, int, int,
+                                  int, int);
+
+extern mfbPushPixelsProc *mfbPushPixelsWeak(void);
+#endif
+
+/* mfbscrclse.c */
+
+extern Bool mfbCloseScreen(
+    int /*index*/,
+    ScreenPtr /*pScreen*/
+);
+/* mfbscrinit.c */
+
+extern Bool mfbAllocatePrivates(
+    ScreenPtr /*pScreen*/,
+    DevPrivateKey * /*pGCKey*/
+);
+
+extern Bool mfbScreenInit(
+    ScreenPtr /*pScreen*/,
+    pointer /*pbits*/,
+    int /*xsize*/,
+    int /*ysize*/,
+    int /*dpix*/,
+    int /*dpiy*/,
+    int /*width*/
+);
+
+extern PixmapPtr mfbGetWindowPixmap(
+    WindowPtr /*pWin*/
+);
+
+extern void mfbSetWindowPixmap(
+    WindowPtr /*pWin*/,
+    PixmapPtr /*pPix*/
+);
+
+extern void mfbFillInScreen(ScreenPtr pScreen);
+
+/* mfbseg.c */
+
+extern void mfbSegmentSS(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*nseg*/,
+    xSegment * /*pSeg*/
+);
+
+extern void mfbSegmentSD(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*nseg*/,
+    xSegment * /*pSeg*/
+);
+/* mfbsetsp.c */
+
+extern void mfbSetScanline(
+    int /*y*/,
+    int /*xOrigin*/,
+    int /*xStart*/,
+    int /*xEnd*/,
+    PixelType * /*psrc*/,
+    int /*alu*/,
+    PixelType * /*pdstBase*/,
+    int /*widthDst*/
+);
+
+extern void mfbSetSpans(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    char * /*psrc*/,
+    DDXPointPtr /*ppt*/,
+    int * /*pwidth*/,
+    int /*nspans*/,
+    int /*fSorted*/
+);
+/* mfbteblack.c */
+
+extern void mfbTEGlyphBltBlack(
+    DrawablePtr /*pDrawable*/,
+    GCPtr/*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    unsigned int /*nglyph*/,
+    CharInfoPtr * /*ppci*/,
+    pointer /*pglyphBase*/
+);
+/* mfbtewhite.c */
+
+extern void mfbTEGlyphBltWhite(
+    DrawablePtr /*pDrawable*/,
+    GCPtr/*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    unsigned int /*nglyph*/,
+    CharInfoPtr * /*ppci*/,
+    pointer /*pglyphBase*/
+);
+/* mfbtileC.c */
+
+extern void mfbTileAreaPPWCopy(
+    DrawablePtr /*pDraw*/,
+    int /*nbox*/,
+    BoxPtr /*pbox*/,
+    int /*alu*/,
+    PixmapPtr /*ptile*/
+);
+/* mfbtileG.c */
+
+extern void mfbTileAreaPPWGeneral(
+    DrawablePtr /*pDraw*/,
+    int /*nbox*/,
+    BoxPtr /*pbox*/,
+    int /*alu*/,
+    PixmapPtr /*ptile*/
+);
+
+extern void mfbTileAreaPPW(
+    DrawablePtr /*pDraw*/,
+    int /*nbox*/,
+    BoxPtr /*pbox*/,
+    int /*alu*/,
+    PixmapPtr /*ptile*/
+);
+/* mfbwindow.c */
+
+extern Bool mfbCreateWindow(
+    WindowPtr /*pWin*/
+);
+
+extern Bool mfbDestroyWindow(
+    WindowPtr /*pWin*/
+);
+
+extern Bool mfbMapWindow(
+    WindowPtr /*pWindow*/
+);
+
+extern Bool mfbPositionWindow(
+    WindowPtr /*pWin*/,
+    int /*x*/,
+    int /*y*/
+);
+
+extern Bool mfbUnmapWindow(
+    WindowPtr /*pWindow*/
+);
+
+extern void mfbCopyWindow(
+    WindowPtr /*pWin*/,
+    DDXPointRec /*ptOldOrg*/,
+    RegionPtr /*prgnSrc*/
+);
+
+extern Bool mfbChangeWindowAttributes(
+    WindowPtr /*pWin*/,
+    unsigned long /*mask*/
+);
+/* mfbzerarc.c */
+
+extern void mfbZeroPolyArcSS(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/,
+    int /*narcs*/,
+    xArc * /*parcs*/
+);
+
+#ifndef MFB_PROTOTYPES_ONLY
+/*
+   private filed of pixmap
+   pixmap.devPrivate = (PixelType *)pointer_to_bits
+   pixmap.devKind = width_of_pixmap_in_bytes
+
+   private field of screen
+   a pixmap, for which we allocate storage.  devPrivate is a pointer to
+the bits in the hardware framebuffer.  note that devKind can be poked to
+make the code work for framebuffers that are wider than their
+displayable screen (e.g. the early vsII, which displayed 960 pixels
+across, but was 1024 in the hardware.)
+
+   private field of GC 
+*/
+typedef void (*mfbFillAreaProcPtr)(
+	      DrawablePtr /*pDraw*/,
+	      int /*nbox*/,
+	      BoxPtr /*pbox*/,
+	      int /*alu*/,
+	      PixmapPtr /*nop*/
+	      );
+
+typedef struct {
+    unsigned char	rop;		/* reduction of rasterop to 1 of 3 */
+    unsigned char	ropOpStip;	/* rop for opaque stipple */
+    unsigned char	ropFillArea;	/*  == alu, rop, or ropOpStip */
+    unsigned char	unused1[sizeof(long) - 3];	/* Alignment */
+    mfbFillAreaProcPtr 	FillArea;	/* fills regions; look at the code */
+    } mfbPrivGC;
+typedef mfbPrivGC	*mfbPrivGCPtr;
+#endif
+
+extern DevPrivateKey mfbGetGCPrivateKey(void);
+#ifdef PIXMAP_PER_WINDOW
+extern DevPrivateKey frameGetWindowPrivateKey(void);
+#endif
+
+#ifndef MFB_PROTOTYPES_ONLY
+/* Common macros for extracting drawing information */
+
+#define mfbGetTypedWidth(pDrawable,wtype) (\
+    (((pDrawable)->type == DRAWABLE_WINDOW) ? \
+     (int) (((PixmapPtr)((pDrawable)->pScreen->devPrivate))->devKind) : \
+     (int)(((PixmapPtr)pDrawable)->devKind)) / sizeof (wtype))
+
+#define mfbGetByteWidth(pDrawable) mfbGetTypedWidth(pDrawable, unsigned char)
+
+#define mfbGetPixelWidth(pDrawable) mfbGetTypedWidth(pDrawable, PixelType)
+    
+#define mfbGetTypedWidthAndPointer(pDrawable, width, pointer, wtype, ptype) {\
+    PixmapPtr   _pPix; \
+    if ((pDrawable)->type == DRAWABLE_WINDOW) \
+	_pPix = (PixmapPtr) (pDrawable)->pScreen->devPrivate; \
+    else \
+	_pPix = (PixmapPtr) (pDrawable); \
+    (pointer) = (ptype *) _pPix->devPrivate.ptr; \
+    (width) = ((int) _pPix->devKind) / sizeof (wtype); \
+}
+
+#define mfbGetByteWidthAndPointer(pDrawable, width, pointer) \
+    mfbGetTypedWidthAndPointer(pDrawable, width, pointer, unsigned char, unsigned char)
+
+#define mfbGetPixelWidthAndPointer(pDrawable, width, pointer) \
+    mfbGetTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType)
+
+#define mfbGetWindowTypedWidthAndPointer(pWin, width, pointer, wtype, ptype) {\
+    PixmapPtr	_pPix = (PixmapPtr) (pWin)->drawable.pScreen->devPrivate; \
+    (pointer) = (ptype *) _pPix->devPrivate.ptr; \
+    (width) = ((int) _pPix->devKind) / sizeof (wtype); \
+}
+
+#define mfbGetWindowPixelWidthAndPointer(pWin, width, pointer) \
+    mfbGetWindowTypedWidthAndPointer(pWin, width, pointer, PixelType, PixelType)
+
+#define mfbGetWindowByteWidthAndPointer(pWin, width, pointer) \
+    mfbGetWindowTypedWidthAndPointer(pWin, width, pointer, char, char)
+
+/*  mfb uses the following macros to calculate addresses in drawables.
+ *  To support banked framebuffers, the macros come in four flavors.
+ *  All four collapse into the same definition on unbanked devices.
+ *  
+ *  mfbScanlineFoo - calculate address and do bank switching
+ *  mfbScanlineFooNoBankSwitch - calculate address, don't bank switch
+ *  mfbScanlineFooSrc - calculate address, switch source bank
+ *  mfbScanlineFooDst - calculate address, switch destination bank
+ */
+
+/* The NoBankSwitch versions are the same for banked and unbanked cases */
+
+#define mfbScanlineIncNoBankSwitch(_ptr, _off) _ptr += (_off)
+#define mfbScanlineOffsetNoBankSwitch(_ptr, _off) ((_ptr) + (_off))
+#define mfbScanlineDeltaNoBankSwitch(_ptr, _y, _w) \
+    mfbScanlineOffsetNoBankSwitch(_ptr, (_y) * (_w))
+#define mfbScanlineNoBankSwitch(_ptr, _x, _y, _w) \
+    mfbScanlineOffsetNoBankSwitch(_ptr, (_y) * (_w) + ((_x) >> MFB_PWSH))
+
+#ifdef MFB_LINE_BANK
+
+#include "mfblinebank.h" /* get macro definitions from this file */
+
+#else /* !MFB_LINE_BANK - unbanked case */
+
+#define mfbScanlineInc(_ptr, _off)       mfbScanlineIncNoBankSwitch(_ptr, _off)
+#define mfbScanlineIncSrc(_ptr, _off)     mfbScanlineInc(_ptr, _off)
+#define mfbScanlineIncDst(_ptr, _off)     mfbScanlineInc(_ptr, _off)
+
+#define mfbScanlineOffset(_ptr, _off) mfbScanlineOffsetNoBankSwitch(_ptr, _off)
+#define mfbScanlineOffsetSrc(_ptr, _off)  mfbScanlineOffset(_ptr, _off)
+#define mfbScanlineOffsetDst(_ptr, _off)  mfbScanlineOffset(_ptr, _off)
+
+#define mfbScanlineSrc(_ptr, _x, _y, _w)  mfbScanline(_ptr, _x, _y, _w)
+#define mfbScanlineDst(_ptr, _x, _y, _w)  mfbScanline(_ptr, _x, _y, _w)
+
+#define mfbScanlineDeltaSrc(_ptr, _y, _w) mfbScanlineDelta(_ptr, _y, _w)
+#define mfbScanlineDeltaDst(_ptr, _y, _w) mfbScanlineDelta(_ptr, _y, _w)
+
+#endif /* MFB_LINE_BANK */
+
+#define mfbScanlineDelta(_ptr, _y, _w) \
+    mfbScanlineOffset(_ptr, (_y) * (_w))
+
+#define mfbScanline(_ptr, _x, _y, _w) \
+    mfbScanlineOffset(_ptr, (_y) * (_w) + ((_x) >> MFB_PWSH))
+
+
+/* precomputed information about each glyph for GlyphBlt code.
+   this saves recalculating the per glyph information for each box.
+*/
+typedef struct _pos{
+    int xpos;		/* xposition of glyph's origin */
+    int xchar;		/* x position mod 32 */
+    int leftEdge;
+    int rightEdge;
+    int topEdge;
+    int bottomEdge;
+    PixelType *pdstBase;	/* longword with character origin */
+    int widthGlyph;	/* width in bytes of this glyph */
+} TEXTPOS;
+
+/* reduced raster ops for mfb */
+#define RROP_BLACK	GXclear
+#define RROP_WHITE	GXset
+#define RROP_NOP	GXnoop
+#define RROP_INVERT	GXinvert
+
+/* macros for mfbbitblt.c, mfbfillsp.c
+   these let the code do one switch on the rop per call, rather
+than a switch on the rop per item (span or rectangle.)
+*/
+
+#define fnCLEAR(src, dst)	(0)
+#define fnAND(src, dst) 	(src & dst)
+#define fnANDREVERSE(src, dst)	(src & ~dst)
+#define fnCOPY(src, dst)	(src)
+#define fnANDINVERTED(src, dst)	(~src & dst)
+#define fnNOOP(src, dst)	(dst)
+#define fnXOR(src, dst)		(src ^ dst)
+#define fnOR(src, dst)		(src | dst)
+#define fnNOR(src, dst)		(~(src | dst))
+#define fnEQUIV(src, dst)	(~src ^ dst)
+#define fnINVERT(src, dst)	(~dst)
+#define fnORREVERSE(src, dst)	(src | ~dst)
+#define fnCOPYINVERTED(src, dst)(~src)
+#define fnORINVERTED(src, dst)	(~src | dst)
+#define fnNAND(src, dst)	(~(src & dst))
+#undef fnSET
+#define fnSET(src, dst)		(MfbBits)(~0)
+
+/*  Using a "switch" statement is much faster in most cases
+ *  since the compiler can do a look-up table or multi-way branch
+ *  instruction, depending on the architecture.  The result on
+ *  A Sun 3/50 is at least 2.5 times faster, assuming a uniform
+ *  distribution of RasterOp operation types.
+ *
+ *  However, doing some profiling on a running system reveals
+ *  GXcopy is the operation over 99.5% of the time and
+ *  GXxor is the next most frequent (about .4%), so we make special
+ *  checks for those first.
+ *
+ *  Note that this requires a change to the "calling sequence"
+ *  since we can't engineer a "switch" statement to have an lvalue.
+ */
+#undef DoRop
+#define DoRop(result, alu, src, dst) \
+{ \
+    if (alu == GXcopy) \
+	result = fnCOPY (src, dst); \
+    else if (alu == GXxor) \
+        result = fnXOR (src, dst); \
+    else \
+	switch (alu) \
+	{ \
+	  case GXclear: \
+	    result = fnCLEAR (src, dst); \
+	    break; \
+	  case GXand: \
+	    result = fnAND (src, dst); \
+	    break; \
+	  case GXandReverse: \
+	    result = fnANDREVERSE (src, dst); \
+	    break; \
+	  case GXandInverted: \
+	    result = fnANDINVERTED (src, dst); \
+	    break; \
+	  default: \
+	  case GXnoop: \
+	    result = fnNOOP (src, dst); \
+	    break; \
+	  case GXor: \
+	    result = fnOR (src, dst); \
+	    break; \
+	  case GXnor: \
+	    result = fnNOR (src, dst); \
+	    break; \
+	  case GXequiv: \
+	    result = fnEQUIV (src, dst); \
+	    break; \
+	  case GXinvert: \
+	    result = fnINVERT (src, dst); \
+	    break; \
+	  case GXorReverse: \
+	    result = fnORREVERSE (src, dst); \
+	    break; \
+	  case GXcopyInverted: \
+	    result = fnCOPYINVERTED (src, dst); \
+	    break; \
+	  case GXorInverted: \
+	    result = fnORINVERTED (src, dst); \
+	    break; \
+	  case GXnand: \
+	    result = fnNAND (src, dst); \
+	    break; \
+	  case GXset: \
+	    result = fnSET (src, dst); \
+	    break; \
+	} \
+}
+
+
+/*  C expression fragments for various operations.  These get passed in
+ *  as -D's on the compile command line.  See mfb/Imakefile.  This
+ *  fixes XBUG 6319.
+ *
+ *  This seems like a good place to point out that mfb's use of the
+ *  words black and white is an unfortunate misnomer.  In mfb code, black
+ *  means zero, and white means one.
+ */
+#define MFB_OPEQ_WHITE  |=
+#define MFB_OPEQ_BLACK  &=~
+#define MFB_OPEQ_INVERT ^=
+#define MFB_EQWHOLEWORD_WHITE   =~0
+#define MFB_EQWHOLEWORD_BLACK   =0
+#define MFB_EQWHOLEWORD_INVERT  ^=~0
+#define MFB_OP_WHITE    /* nothing */
+#define MFB_OP_BLACK    ~
+
+#endif /* MFB_PROTOTYPES_ONLY */
+#endif /* _MFB_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mfbmap.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mfbmap.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mfbmap.h	(revision 9233)
@@ -0,0 +1,122 @@
+
+#ifndef _MFBMAP_H
+#define _MFBMAP_H
+
+#define InverseAlu  xf1bppInverseAlu
+#define endtab  xf1bppendtab
+#define mask  xf1bppmask
+#define mergeRopBits  xf1bppmergeRopBits
+#define mergeGetRopBits  xf1bppmergeGetRopBits
+#define mfbAllocatePrivates  xf1bppAllocatePrivates
+#define mfbBSFuncRec  xf1bppBSFuncRec
+#define mfbBlackSolidFS  xf1bppBlackSolidFS
+#define mfbBlackStippleFS  xf1bppBlackStippleFS
+#define mfbBresD  xf1bppBresD
+#define mfbBresS  xf1bppBresS
+#define mfbChangeWindowAttributes  xf1bppChangeWindowAttributes
+#define mfbCloseScreen  xf1bppCloseScreen
+#define mfbCopyArea  xf1bppCopyArea
+#define mfbCopyPixmap  xf1bppCopyPixmap
+#define mfbCopyPlane  xf1bppCopyPlane
+#define mfbCopyRotatePixmap  xf1bppCopyRotatePixmap
+#define mfbCopyWindow  xf1bppCopyWindow
+#define mfbCreateColormap  xf1bppCreateColormap
+#define mfbCreateDefColormap  xf1bppCreateDefColormap
+#define mfbCreateGC  xf1bppCreateGC
+#define mfbCreatePixmap  xf1bppCreatePixmap
+#define mfbCreateWindow  xf1bppCreateWindow
+#define mfbDestroyColormap  xf1bppDestroyColormap
+#define mfbDestroyPixmap  xf1bppDestroyPixmap
+#define mfbDestroyWindow  xf1bppDestroyWindow
+#define mfbDoBitblt  xf1bppDoBitblt
+#define mfbDoBitbltCopy  xf1bppDoBitbltCopy
+#define mfbDoBitbltCopyInverted  xf1bppDoBitbltCopyInverted
+#define mfbDoBitbltGeneral  xf1bppDoBitbltGeneral
+#define mfbDoBitbltOr  xf1bppDoBitbltOr
+#define mfbDoBitbltXor  xf1bppDoBitbltXor
+#define mfbFillInScreen  xf1bppFillInScreen
+#define mfbFillPolyBlack  xf1bppFillPolyBlack
+#define mfbFillPolyInvert  xf1bppFillPolyInvert
+#define mfbFillPolyWhite  xf1bppFillPolyWhite
+#define mfbGCPrivateIndex  xf1bppGCPrivateIndex
+#define mfbGetGCPrivateIndex  xf1bppGetGCPrivateIndex
+#define mfbGetImage  xf1bppGetImage
+#define mfbGetInverseAlu xf1bppGetInverseAlu
+#define mfbGetSpans  xf1bppGetSpans
+#define mfbGetWindowPixmap  xf1bppGetWindowPixmap
+#define mfbGetWindowPrivateIndex  xf1bppGetWindowPrivateIndex
+#define mfbGetmask  xf1bppGetmask
+#define mfbGetpartmasks xf1bppGetpartmasks
+#define mfbGetrmask  xf1bppGetrmask
+#define mfbGetstarttab  xf1bppGetstarttab
+#define mfbGetendtab  xf1bppGetendtab
+#define mfbHorzS  xf1bppHorzS
+#define mfbImageGlyphBltBlack  xf1bppImageGlyphBltBlack
+#define mfbImageGlyphBltWhite  xf1bppImageGlyphBltWhite
+#define mfbInstallColormap  xf1bppInstallColormap
+#define mfbInvertSolidFS  xf1bppInvertSolidFS
+#define mfbInvertStippleFS  xf1bppInvertStippleFS
+#define mfbLineSD  xf1bppLineSD
+#define mfbLineSS  xf1bppLineSS
+#define mfbListInstalledColormaps  xf1bppListInstalledColormaps
+#define mfbMapWindow  xf1bppMapWindow
+#define mfbPadPixmap  xf1bppPadPixmap
+#define mfbPixmapToRegion  xf1bppPixmapToRegion
+#define mfbPixmapToRegionWeak xf1bppPixmapToRegionWeak
+#define mfbPolyFillArcSolid  xf1bppPolyFillArcSolid
+#define mfbPolyFillRect  xf1bppPolyFillRect
+#define mfbPolyGlyphBltBlack  xf1bppPolyGlyphBltBlack
+#define mfbPolyGlyphBltInvert  xf1bppPolyGlyphBltInvert
+#define mfbPolyGlyphBltWhite  xf1bppPolyGlyphBltWhite
+#define mfbPolyPoint  xf1bppPolyPoint
+#define mfbPositionWindow  xf1bppPositionWindow
+#define mfbPushPixels  xf1bppPushPixels
+#define mfbPushPixelsWeak  xf1bppPushPixelsWeak
+#define mfbPutImage  xf1bppPutImage
+#define mfbQueryBestSize  xf1bppQueryBestSize
+#define mfbQueryBestSizeWeak  xf1bppQueryBestSizeWeak
+#define mfbRealizeFont  xf1bppRealizeFont
+#define mfbRealizeFontWeak  xf1bppRealizeFontWeak
+#define mfbReduceRop  xf1bppReduceRop
+#define mfbRegisterCopyPlaneProc  xf1bppRegisterCopyPlaneProc
+#define mfbResolveColor  xf1bppResolveColor
+#define mfbRestoreAreas  xf1bppRestoreAreas
+#define mfbSaveAreas  xf1bppSaveAreas
+#define mfbScreenInit  xf1bppScreenInit
+#define mfbSegmentSD  xf1bppSegmentSD
+#define mfbSegmentSS  xf1bppSegmentSS
+#define mfbSetScanline  xf1bppSetScanline
+#define mfbSetSpans  xf1bppSetSpans
+#define mfbSetWindowPixmap  xf1bppSetWindowPixmap
+#define mfbSolidBlackArea  xf1bppSolidBlackArea
+#define mfbSolidInvertArea  xf1bppSolidInvertArea
+#define mfbSolidPP  xf1bppSolidPP
+#define mfbSolidWhiteArea  xf1bppSolidWhiteArea
+#define mfbStippleBlackArea  xf1bppStippleBlackArea
+#define mfbStippleInvertArea  xf1bppStippleInvertArea
+#define mfbStippleWhiteArea  xf1bppStippleWhiteArea
+#define mfbTEGlyphBltBlack  xf1bppTEGlyphBltBlack
+#define mfbTEGlyphBltWhite  xf1bppTEGlyphBltWhite
+#define mfbTileAreaPPW  xf1bppTileAreaPPW
+#define mfbTileAreaPPWCopy  xf1bppTileAreaPPWCopy
+#define mfbTileAreaPPWGeneral  xf1bppTileAreaPPWGeneral
+#define mfbTileFS  xf1bppTileFS
+#define mfbUninstallColormap  xf1bppUninstallColormap
+#define mfbUnmapWindow  xf1bppUnmapWindow
+#define mfbUnnaturalStippleFS  xf1bppUnnaturalStippleFS
+#define mfbUnnaturalTileFS  xf1bppUnnaturalTileFS
+#define mfbUnrealizeFont  xf1bppUnrealizeFont
+#define mfbUnrealizeFontWeak  xf1bppUnrealizeFontWeak
+#define mfbValidateGC  xf1bppValidateGC
+#define mfbVertS  xf1bppVertS
+#define mfbWhiteSolidFS  xf1bppWhiteSolidFS
+#define mfbWhiteStippleFS  xf1bppWhiteStippleFS
+#define mfbWindowPrivateIndex  xf1bppWindowPrivateIndex
+#define mfbXRotatePixmap  xf1bppXRotatePixmap
+#define mfbYRotatePixmap  xf1bppYRotatePixmap
+#define mfbZeroPolyArcSS  xf1bppZeroPolyArcSS
+#define partmasks  xf1bpppartmasks
+#define rmask  xf1bpprmask
+#define starttab  xf1bppstarttab
+
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mfbunmap.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mfbunmap.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mfbunmap.h	(revision 9233)
@@ -0,0 +1,114 @@
+
+#ifdef _MFBMAP_H
+#undef _MFBMAP_H
+
+#undef InverseAlu
+#undef endtab
+#undef mask
+#undef mergeRopBits
+#undef mergeGetRopBits
+#undef mfbAllocatePrivates
+#undef mfbBSFuncRec
+#undef mfbBlackSolidFS
+#undef mfbBlackStippleFS
+#undef mfbBresD
+#undef mfbBresS
+#undef mfbChangeWindowAttributes
+#undef mfbCloseScreen
+#undef mfbCopyArea
+#undef mfbCopyPixmap
+#undef mfbCopyPlane
+#undef mfbCopyRotatePixmap
+#undef mfbCopyWindow
+#undef mfbCreateColormap
+#undef mfbCreateDefColormap
+#undef mfbCreateGC
+#undef mfbCreatePixmap
+#undef mfbCreateWindow
+#undef mfbDestroyColormap
+#undef mfbDestroyPixmap
+#undef mfbDestroyWindow
+#undef mfbDoBitblt
+#undef mfbDoBitbltCopy
+#undef mfbDoBitbltCopyInverted
+#undef mfbDoBitbltGeneral
+#undef mfbDoBitbltOr
+#undef mfbDoBitbltXor
+#undef mfbFillPolyBlack
+#undef mfbFillPolyInvert
+#undef mfbFillPolyWhite
+#undef mfbGCPrivateIndex
+#undef mfbGetImage
+#undef mfbGetInverseAlu
+#undef mfbGetSpans
+#undef mfbGetWindowPixmap
+#undef mfbHorzS
+#undef mfbImageGlyphBltBlack
+#undef mfbImageGlyphBltWhite
+#undef mfbInstallColormap
+#undef mfbInvertSolidFS
+#undef mfbInvertStippleFS
+#undef mfbLineSD
+#undef mfbLineSS
+#undef mfbListInstalledColormaps
+#undef mfbMapWindow
+#undef mfbPadPixmap
+#undef mfbPixmapToRegion
+#undef mfbPixmapToRegionWeak
+#undef mfbPolyFillArcSolid
+#undef mfbPolyFillRect
+#undef mfbPolyGlyphBltBlack
+#undef mfbPolyGlyphBltInvert
+#undef mfbPolyGlyphBltWhite
+#undef mfbPolyPoint
+#undef mfbPositionWindow
+#undef mfbPushPixels
+#undef mfbPushPixelsWeak
+#undef mfbPutImage
+#undef mfbQueryBestSize
+#undef mfbQueryBestSizeWeak
+#undef mfbRealizeFont
+#undef mfbRealizeFontWeak
+#undef mfbReduceRop
+#undef mfbRegisterCopyPlaneProc
+#undef mfbResolveColor
+#undef mfbRestoreAreas
+#undef mfbSaveAreas
+#undef mfbScreenInit
+#undef mfbSegmentSD
+#undef mfbSegmentSS
+#undef mfbSetScanline
+#undef mfbSetSpans
+#undef mfbSetWindowPixmap
+#undef mfbSolidBlackArea
+#undef mfbSolidInvertArea
+#undef mfbSolidPP
+#undef mfbSolidWhiteArea
+#undef mfbStippleBlackArea
+#undef mfbStippleInvertArea
+#undef mfbStippleWhiteArea
+#undef mfbTEGlyphBltBlack
+#undef mfbTEGlyphBltWhite
+#undef mfbTileAreaPPW
+#undef mfbTileAreaPPWCopy
+#undef mfbTileAreaPPWGeneral
+#undef mfbTileFS
+#undef mfbUninstallColormap
+#undef mfbUnmapWindow
+#undef mfbUnnaturalStippleFS
+#undef mfbUnnaturalTileFS
+#undef mfbUnrealizeFont
+#undef mfbUnrealizeFontWeak
+#undef mfbValidateGC
+#undef mfbVertS
+#undef mfbWhiteSolidFS
+#undef mfbWhiteStippleFS
+#undef mfbWindowPrivateIndex
+#undef mfbXRotatePixmap
+#undef mfbYRotatePixmap
+#undef mfbZeroPolyArcSS
+#undef partmasks
+#undef rmask
+#undef starttab
+
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mi.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mi.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mi.h	(revision 9233)
@@ -0,0 +1,578 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef MI_H
+#define MI_H
+#include <X11/X.h>
+#include "region.h"
+#include "validate.h"
+#include "window.h"
+#include "gc.h"
+#include <X11/fonts/font.h>
+#include "input.h"
+#include "cursor.h"
+#include "privates.h"
+
+#define MiBits	CARD32
+
+typedef struct _miDash *miDashPtr;
+#define EVEN_DASH	0
+#define ODD_DASH	~0
+
+/* miarc.c */
+
+extern void miPolyArc(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/,
+    int /*narcs*/,
+    xArc * /*parcs*/
+);
+
+/* mibitblt.c */
+
+extern RegionPtr miCopyArea(
+    DrawablePtr /*pSrcDrawable*/,
+    DrawablePtr /*pDstDrawable*/,
+    GCPtr /*pGC*/,
+    int /*xIn*/,
+    int /*yIn*/,
+    int /*widthSrc*/,
+    int /*heightSrc*/,
+    int /*xOut*/,
+    int /*yOut*/
+);
+
+extern RegionPtr miCopyPlane(
+    DrawablePtr /*pSrcDrawable*/,
+    DrawablePtr /*pDstDrawable*/,
+    GCPtr /*pGC*/,
+    int /*srcx*/,
+    int /*srcy*/,
+    int /*width*/,
+    int /*height*/,
+    int /*dstx*/,
+    int /*dsty*/,
+    unsigned long /*bitPlane*/
+);
+
+extern void miGetImage(
+    DrawablePtr /*pDraw*/,
+    int /*sx*/,
+    int /*sy*/,
+    int /*w*/,
+    int /*h*/,
+    unsigned int /*format*/,
+    unsigned long /*planeMask*/,
+    char * /*pdstLine*/
+);
+
+extern void miPutImage(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/,
+    int /*depth*/,
+    int /*x*/,
+    int /*y*/,
+    int /*w*/,
+    int /*h*/,
+    int /*leftPad*/,
+    int /*format*/,
+    char * /*pImage*/
+);
+
+/* micursor.c */
+
+extern void miRecolorCursor(
+    ScreenPtr /*pScr*/,
+    CursorPtr /*pCurs*/,
+    Bool /*displayed*/
+);
+
+/* midash.c */
+
+extern void miStepDash(
+    int /*dist*/,
+    int * /*pDashIndex*/,
+    unsigned char * /*pDash*/,
+    int /*numInDashList*/,
+    int * /*pDashOffset*/
+);
+
+/* mieq.c */
+
+
+#ifndef INPUT_H
+typedef struct _DeviceRec *DevicePtr;
+#endif
+
+extern Bool mieqInit(
+    void
+);
+
+extern void mieqEnqueue(
+    DeviceIntPtr /*pDev*/,
+    xEventPtr /*e*/
+);
+
+extern void mieqSwitchScreen(
+    ScreenPtr /*pScreen*/,
+    Bool /*fromDIX*/
+);
+
+extern void mieqProcessInputEvents(
+    void
+);
+
+typedef void (*mieqHandler)(int, xEventPtr, DeviceIntPtr, int);
+void mieqSetHandler(int event, mieqHandler handler);
+
+/* miexpose.c */
+
+extern RegionPtr miHandleExposures(
+    DrawablePtr /*pSrcDrawable*/,
+    DrawablePtr /*pDstDrawable*/,
+    GCPtr /*pGC*/,
+    int /*srcx*/,
+    int /*srcy*/,
+    int /*width*/,
+    int /*height*/,
+    int /*dstx*/,
+    int /*dsty*/,
+    unsigned long /*plane*/
+);
+
+extern void miSendGraphicsExpose(
+    ClientPtr /*client*/,
+    RegionPtr /*pRgn*/,
+    XID /*drawable*/,
+    int /*major*/,
+    int /*minor*/
+);
+
+extern void miSendExposures(
+    WindowPtr /*pWin*/,
+    RegionPtr /*pRgn*/,
+    int /*dx*/,
+    int /*dy*/
+);
+
+extern void miWindowExposures(
+    WindowPtr /*pWin*/,
+    RegionPtr /*prgn*/,
+    RegionPtr /*other_exposed*/
+);
+
+extern void miPaintWindow(
+    WindowPtr /*pWin*/,
+    RegionPtr /*prgn*/,
+    int /*what*/
+);
+
+extern void miClearDrawable(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/
+);
+
+/* mifillrct.c */
+
+extern void miPolyFillRect(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*nrectFill*/,
+    xRectangle * /*prectInit*/
+);
+
+/* miglblt.c */
+
+extern void miPolyGlyphBlt(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    unsigned int /*nglyph*/,
+    CharInfoPtr * /*ppci*/,
+    pointer /*pglyphBase*/
+);
+
+extern void miImageGlyphBlt(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    unsigned int /*nglyph*/,
+    CharInfoPtr * /*ppci*/,
+    pointer /*pglyphBase*/
+);
+
+/* mipoly.c */
+
+extern void miFillPolygon(
+    DrawablePtr /*dst*/,
+    GCPtr /*pgc*/,
+    int /*shape*/,
+    int /*mode*/,
+    int /*count*/,
+    DDXPointPtr /*pPts*/
+);
+
+/* mipolycon.c */
+
+extern Bool miFillConvexPoly(
+    DrawablePtr /*dst*/,
+    GCPtr /*pgc*/,
+    int /*count*/,
+    DDXPointPtr /*ptsIn*/
+);
+
+/* mipolygen.c */
+
+extern Bool miFillGeneralPoly(
+    DrawablePtr /*dst*/,
+    GCPtr /*pgc*/,
+    int /*count*/,
+    DDXPointPtr /*ptsIn*/
+);
+
+/* mipolypnt.c */
+
+extern void miPolyPoint(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*mode*/,
+    int /*npt*/,
+    xPoint * /*pptInit*/
+);
+
+/* mipolyrect.c */
+
+extern void miPolyRectangle(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/,
+    int /*nrects*/,
+    xRectangle * /*pRects*/
+);
+
+/* mipolyseg.c */
+
+extern void miPolySegment(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/,
+    int /*nseg*/,
+    xSegment * /*pSegs*/
+);
+
+/* mipolytext.c */
+
+extern int miPolyText8(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    int /*count*/,
+    char * /*chars*/
+);
+
+extern int miPolyText16(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    int /*count*/,
+    unsigned short * /*chars*/
+);
+
+extern void miImageText8(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    int /*count*/,
+    char * /*chars*/
+);
+
+extern void miImageText16(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/,
+    int /*x*/,
+    int /*y*/,
+    int /*count*/,
+    unsigned short * /*chars*/
+);
+
+/* mipushpxl.c */
+
+extern void miPushPixels(
+    GCPtr /*pGC*/,
+    PixmapPtr /*pBitMap*/,
+    DrawablePtr /*pDrawable*/,
+    int /*dx*/,
+    int /*dy*/,
+    int /*xOrg*/,
+    int /*yOrg*/
+);
+
+/* miregion.c */
+
+/* see also region.h */
+
+extern Bool miRectAlloc(
+    RegionPtr /*pRgn*/,
+    int /*n*/
+);
+
+extern int miFindMaxBand(
+    RegionPtr /*prgn*/
+);
+
+#ifdef DEBUG
+extern Bool miValidRegion(
+    RegionPtr /*prgn*/
+);
+#endif
+
+extern Bool miRegionBroken(RegionPtr pReg);
+
+/* miscrinit.c */
+
+extern Bool miModifyPixmapHeader(
+    PixmapPtr /*pPixmap*/,
+    int /*width*/,
+    int /*height*/,
+    int /*depth*/,
+    int /*bitsPerPixel*/,
+    int /*devKind*/,
+    pointer /*pPixData*/
+);
+
+extern Bool miCreateScreenResources(
+    ScreenPtr /*pScreen*/
+);
+
+extern Bool miScreenDevPrivateInit(
+    ScreenPtr /*pScreen*/,
+    int /*width*/,
+    pointer /*pbits*/
+);
+
+extern Bool miScreenInit(
+    ScreenPtr /*pScreen*/,
+    pointer /*pbits*/,
+    int /*xsize*/,
+    int /*ysize*/,
+    int /*dpix*/,
+    int /*dpiy*/,
+    int /*width*/,
+    int /*rootDepth*/,
+    int /*numDepths*/,
+    DepthPtr /*depths*/,
+    VisualID /*rootVisual*/,
+    int /*numVisuals*/,
+    VisualPtr /*visuals*/
+);
+
+extern DevPrivateKey miAllocateGCPrivateIndex(
+    void
+);
+
+extern PixmapPtr miGetScreenPixmap(
+    ScreenPtr pScreen
+);
+
+extern void miSetScreenPixmap(
+    PixmapPtr pPix
+);
+
+/* mivaltree.c */
+
+extern int miShapedWindowIn(
+    ScreenPtr /*pScreen*/,
+    RegionPtr /*universe*/,
+    RegionPtr /*bounding*/,
+    BoxPtr /*rect*/,
+    int /*x*/,
+    int /*y*/
+);
+
+typedef void 
+(*SetRedirectBorderClipProcPtr) (WindowPtr pWindow, RegionPtr pRegion);
+
+typedef RegionPtr
+(*GetRedirectBorderClipProcPtr) (WindowPtr pWindow);
+
+void
+miRegisterRedirectBorderClipProc (SetRedirectBorderClipProcPtr setBorderClip,
+				  GetRedirectBorderClipProcPtr getBorderClip);
+
+extern int miValidateTree(
+    WindowPtr /*pParent*/,
+    WindowPtr /*pChild*/,
+    VTKind /*kind*/
+);
+
+extern void miWideLine(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*mode*/,
+    int /*npt*/,
+    DDXPointPtr /*pPts*/
+);
+
+extern void miWideDash(
+    DrawablePtr /*pDrawable*/,
+    GCPtr /*pGC*/,
+    int /*mode*/,
+    int /*npt*/,
+    DDXPointPtr /*pPts*/
+);
+
+/* miwindow.c */
+
+extern void miClearToBackground(
+    WindowPtr /*pWin*/,
+    int /*x*/,
+    int /*y*/,
+    int /*w*/,
+    int /*h*/,
+    Bool /*generateExposures*/
+);
+
+extern Bool miChangeSaveUnder(
+    WindowPtr /*pWin*/,
+    WindowPtr /*first*/
+);
+
+extern void miPostChangeSaveUnder(
+    WindowPtr /*pWin*/,
+    WindowPtr /*pFirst*/
+);
+
+extern void miMarkWindow(
+    WindowPtr /*pWin*/
+);
+
+extern Bool miMarkOverlappedWindows(
+    WindowPtr /*pWin*/,
+    WindowPtr /*pFirst*/,
+    WindowPtr * /*ppLayerWin*/
+);
+
+extern void miHandleValidateExposures(
+    WindowPtr /*pWin*/
+);
+
+extern void miMoveWindow(
+    WindowPtr /*pWin*/,
+    int /*x*/,
+    int /*y*/,
+    WindowPtr /*pNextSib*/,
+    VTKind /*kind*/
+);
+
+extern void miSlideAndSizeWindow(
+    WindowPtr /*pWin*/,
+    int /*x*/,
+    int /*y*/,
+    unsigned int /*w*/,
+    unsigned int /*h*/,
+    WindowPtr /*pSib*/
+);
+
+extern WindowPtr miGetLayerWindow(
+    WindowPtr /*pWin*/
+);
+
+extern void miSetShape(
+    WindowPtr /*pWin*/
+);
+
+extern void miChangeBorderWidth(
+    WindowPtr /*pWin*/,
+    unsigned int /*width*/
+);
+
+extern void miMarkUnrealizedWindow(
+    WindowPtr /*pChild*/,
+    WindowPtr /*pWin*/,
+    Bool /*fromConfigure*/
+);
+
+extern void miSegregateChildren(WindowPtr pWin, RegionPtr pReg, int depth);
+
+/* mizerarc.c */
+
+extern void miZeroPolyArc(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/,
+    int /*narcs*/,
+    xArc * /*parcs*/
+);
+
+/* mizerline.c */
+
+extern void miZeroLine(
+    DrawablePtr /*dst*/,
+    GCPtr /*pgc*/,
+    int /*mode*/,
+    int /*nptInit*/,
+    DDXPointRec * /*pptInit*/
+);
+
+extern void miZeroDashLine(
+    DrawablePtr /*dst*/,
+    GCPtr /*pgc*/,
+    int /*mode*/,
+    int /*nptInit*/,
+    DDXPointRec * /*pptInit*/
+);
+
+extern void miPolyFillArc(
+    DrawablePtr /*pDraw*/,
+    GCPtr /*pGC*/,
+    int /*narcs*/,
+    xArc * /*parcs*/
+);
+
+#endif /* MI_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mibank.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mibank.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mibank.h	(revision 9233)
@@ -0,0 +1,118 @@
+/*
+ * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of Marc Aurele La France not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  Marc Aurele La France makes no representations
+ * about the suitability of this software for any purpose.  It is provided
+ * "as-is" without express or implied warranty.
+ *
+ * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO
+ * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+#ifndef __MIBANK_H__
+#define __MIBANK_H__ 1
+
+#include "scrnintstr.h"
+
+/*
+ * Banking external interface.
+ */
+
+/*
+ * This is the banking function type.  The return value is normally zero.
+ * Non-zero returns can be used to implement the likes of scanline interleave,
+ * etc.
+ */
+typedef int miBankProc(
+    ScreenPtr /*pScreen*/,
+    unsigned int /*iBank*/
+);
+
+typedef miBankProc *miBankProcPtr;
+
+typedef struct _miBankInfo
+{
+    /*
+     * Banking refers to the use of one or more apertures (in the server's
+     * address space) to access various parts of a potentially larger hardware
+     * frame buffer.
+     *
+     * Three different banking schemes are supported:
+     *
+     * Single banking is indicated when pBankA and pBankB are equal and all
+     * three miBankProcPtr's point to the same function.  Here, both reads and
+     * writes through the aperture access the same hardware location.
+     *
+     * Shared banking is indicated when pBankA and pBankB are equal but the
+     * source and destination functions differ.  Here reads through the
+     * aperture do not necessarily access the same hardware location as writes.
+     *
+     * Double banking is indicated when pBankA and pBankB differ.  Here two
+     * independent apertures are used to provide read/write access to
+     * potentially different hardware locations.
+     *
+     * Any other combination will result in no banking.
+     */
+    miBankProcPtr SetSourceBank;                /* Set pBankA bank number */
+    miBankProcPtr SetDestinationBank;           /* Set pBankB bank number */
+    miBankProcPtr SetSourceAndDestinationBanks; /* Set both bank numbers */
+
+    pointer pBankA;     /* First aperture location */
+    pointer pBankB;     /* First or second aperture location */
+
+    /*
+     * BankSize is in units of sizeof(char) and is the size of each bank.
+     */
+    unsigned long BankSize;
+
+    /*
+     * nBankDepth is the colour depth associated with the maximum number of a
+     * pixel's bits that are simultaneously accessible through the frame buffer
+     * aperture.
+     */
+    unsigned int nBankDepth;
+} miBankInfoRec, *miBankInfoPtr;
+
+Bool
+miInitializeBanking(
+    ScreenPtr /*pScreen*/,
+    unsigned int /*xsize*/,
+    unsigned int /*ysize*/,
+    unsigned int /*width*/,
+    miBankInfoPtr /*pBankInfo*/
+);
+
+Bool
+miModifyBanking(
+    ScreenPtr /*pScreen*/,
+    miBankInfoPtr /*pBankInfo*/
+);
+
+/*
+ * This function determines the minimum screen width, given a initial estimate
+ * and various screen attributes.  DDX needs to determine this width before
+ * initializing the screen.
+ */
+int
+miScanLineWidth(
+    unsigned int /*xsize*/,
+    unsigned int /*ysize*/,
+    unsigned int /*width*/,
+    unsigned long /*BankSize*/,
+    PixmapFormatRec * /*pBankFormat*/,
+    unsigned int /*nWidthUnit*/
+);
+
+#endif /* __MIBANK_H__ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mibstore.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mibstore.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mibstore.h	(revision 9233)
@@ -0,0 +1,25 @@
+/*-
+ * mibstore.h --
+ *	Header file for users of the MI backing-store scheme.
+ *
+ * Copyright (c) 1987 by the Regents of the University of California
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies.  The University of California
+ * makes no representations about the suitability of this
+ * software for any purpose.  It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#ifndef _MIBSTORE_H
+#define _MIBSTORE_H
+
+#include "screenint.h"
+
+extern void miInitializeBackingStore(
+    ScreenPtr /*pScreen*/
+);
+
+#endif /* _MIBSTORE_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/micmap.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/micmap.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/micmap.h	(revision 9233)
@@ -0,0 +1,64 @@
+
+#include "colormapst.h"
+
+#ifndef _MICMAP_H_
+#define _MICMAP_H_
+
+extern ColormapPtr miInstalledMaps[MAXSCREENS];
+
+typedef Bool (* miInitVisualsProcPtr)(VisualPtr *, DepthPtr *, int *, int *,
+					int *, VisualID *, unsigned long, int,
+					int);
+
+extern miInitVisualsProcPtr miInitVisualsProc;
+					
+int miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps);
+void miInstallColormap(ColormapPtr pmap);
+void miUninstallColormap(ColormapPtr pmap);
+
+void miResolveColor(unsigned short *, unsigned short *, unsigned short *,
+			VisualPtr);
+Bool miInitializeColormap(ColormapPtr);
+int miExpandDirectColors(ColormapPtr, int, xColorItem *, xColorItem *);
+Bool miCreateDefColormap(ScreenPtr);
+void miClearVisualTypes(void);
+Bool miSetVisualTypes(int, int, int, int);
+Bool miSetPixmapDepths(void);
+Bool miSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, 
+			      int preferredCVC,
+			      Pixel redMask, Pixel greenMask, Pixel blueMask);
+int miGetDefaultVisualMask(int);
+Bool miInitVisuals(VisualPtr *, DepthPtr *, int *, int *, int *, VisualID *,
+			unsigned long, int, int);
+void miResetInitVisuals(void);
+
+void miHookInitVisuals(void (**old)(miInitVisualsProcPtr *),
+		       void (*new)(miInitVisualsProcPtr *));
+
+
+#define MAX_PSEUDO_DEPTH	10
+#define MIN_TRUE_DEPTH		6
+
+#define StaticGrayMask	(1 << StaticGray)
+#define GrayScaleMask	(1 << GrayScale)
+#define StaticColorMask	(1 << StaticColor)
+#define PseudoColorMask	(1 << PseudoColor)
+#define TrueColorMask	(1 << TrueColor)
+#define DirectColorMask	(1 << DirectColor)
+                
+#define ALL_VISUALS	(StaticGrayMask|\
+			 GrayScaleMask|\
+			 StaticColorMask|\
+			 PseudoColorMask|\
+			 TrueColorMask|\
+			 DirectColorMask)
+
+#define LARGE_VISUALS	(TrueColorMask|\
+			 DirectColorMask)
+
+#define SMALL_VISUALS	(StaticGrayMask|\
+			 GrayScaleMask|\
+			 StaticColorMask|\
+			 PseudoColorMask)
+
+#endif /* _MICMAP_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/micoord.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/micoord.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/micoord.h	(revision 9233)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2000 The XFree86 Project, Inc.  All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the XFree86 Project shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in this Software without prior written authorization from the
+ * XFree86 Project.
+ *
+ */
+
+#ifndef _MICOORD_H_
+#define _MICOORD_H_ 1
+
+#include "servermd.h"
+
+/* Macros which handle a coordinate in a single register */
+
+/*
+ * Most compilers will convert divisions by 65536 into shifts, if signed
+ * shifts exist.  If your machine does arithmetic shifts and your compiler
+ * can't get it right, add to this line.
+ */
+
+/*
+ * mips compiler - what a joke - it CSEs the 65536 constant into a reg
+ * forcing as to use div instead of shift.  Let's be explicit.
+ */
+
+#if defined(mips) || defined(sgi) || \
+    defined(sparc) || defined(__sparc64__) || \
+    defined(__alpha) || defined(__alpha__) || \
+    defined(__i386__) || defined(__i386) || defined(__ia64__) || \
+    defined(__s390x__) || defined(__s390__) || \
+    defined(__amd64__) || defined(amd64) || defined(__amd64) || defined(__x86_64__)
+#define GetHighWord(x) (((int) (x)) >> 16)
+#else
+#define GetHighWord(x) (((int) (x)) / 65536)
+#endif
+
+#if IMAGE_BYTE_ORDER == MSBFirst
+#define intToCoord(i,x,y)   (((x) = GetHighWord(i)), ((y) = (int) ((short) (i))))
+#define coordToInt(x,y)	(((x) << 16) | ((y) & 0xffff))
+#define intToX(i)	(GetHighWord(i))
+#define intToY(i)	((int) ((short) i))
+#else
+#define intToCoord(i,x,y)   (((x) = (int) ((short) (i))), ((y) = GetHighWord(i)))
+#define coordToInt(x,y)	(((y) << 16) | ((x) & 0xffff))
+#define intToX(i)	((int) ((short) (i)))
+#define intToY(i)	(GetHighWord(i))
+#endif
+
+#endif /* _MICOORD_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/migc.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/migc.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/migc.h	(revision 9233)
@@ -0,0 +1,72 @@
+/*
+
+Copyright 1993, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+
+extern void miChangeGC(
+    GCPtr  /*pGC*/,
+    unsigned long /*mask*/
+);
+
+extern void miDestroyGC(
+    GCPtr  /*pGC*/
+);
+
+extern GCOpsPtr miCreateGCOps(
+    GCOpsPtr /*prototype*/
+);
+
+extern void miDestroyGCOps(
+    GCOpsPtr /*ops*/
+);
+
+extern void miDestroyClip(
+    GCPtr /*pGC*/
+);
+
+extern void miChangeClip(
+    GCPtr   /*pGC*/,
+    int     /*type*/,
+    pointer /*pvalue*/,
+    int     /*nrects*/
+);
+
+extern void miCopyClip(
+    GCPtr /*pgcDst*/,
+    GCPtr /*pgcSrc*/
+);
+
+extern void miCopyGC(
+    GCPtr /*pGCSrc*/,
+    unsigned long /*changes*/,
+    GCPtr /*pGCDst*/
+);
+
+extern void miComputeCompositeClip(
+    GCPtr       /*pGC*/,
+    DrawablePtr /*pDrawable*/
+);
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mipointer.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mipointer.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/mipointer.h	(revision 9233)
@@ -0,0 +1,172 @@
+/*
+
+Copyright 1989, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+*/
+
+#ifndef MIPOINTER_H
+#define MIPOINTER_H
+
+#include "cursor.h"
+#include "input.h"
+#include "privates.h"
+
+typedef struct _miPointerSpriteFuncRec {
+    Bool	(*RealizeCursor)(
+                    ScreenPtr /* pScr */,
+                    CursorPtr /* pCurs */
+                    );
+    Bool	(*UnrealizeCursor)(
+                    ScreenPtr /* pScr */,
+                    CursorPtr /* pCurs */
+                    );
+    void	(*SetCursor)(
+                    ScreenPtr /* pScr */,
+                    CursorPtr /* pCurs */,
+                    int  /* x */,
+                    int  /* y */
+                    );
+    void	(*MoveCursor)(
+                    ScreenPtr /* pScr */,
+                    int  /* x */,
+                    int  /* y */
+                    );
+} miPointerSpriteFuncRec, *miPointerSpriteFuncPtr;
+
+typedef struct _miPointerScreenFuncRec {
+    Bool	(*CursorOffScreen)(
+                    ScreenPtr* /* ppScr */,
+                    int*  /* px */,
+                    int*  /* py */
+                    );
+    void	(*CrossScreen)(
+                    ScreenPtr /* pScr */,
+                    int  /* entering */
+                    );
+    void	(*WarpCursor)(
+                    ScreenPtr /* pScr */,
+                    int  /* x */,
+                    int  /* y */
+                    );
+    void	(*EnqueueEvent)(
+                    DeviceIntPtr /* pDev */,
+                    xEventPtr /* event */
+                    );
+    void	(*NewEventScreen)(
+                    ScreenPtr /* pScr */,
+		    Bool /* fromDIX */
+                    );
+} miPointerScreenFuncRec, *miPointerScreenFuncPtr;
+
+extern Bool miDCInitialize(
+    ScreenPtr /*pScreen*/,
+    miPointerScreenFuncPtr /*screenFuncs*/
+);
+
+extern Bool miPointerInitialize(
+    ScreenPtr /*pScreen*/,
+    miPointerSpriteFuncPtr /*spriteFuncs*/,
+    miPointerScreenFuncPtr /*screenFuncs*/,
+    Bool /*waitForUpdate*/
+);
+
+extern void miPointerWarpCursor(
+    ScreenPtr /*pScreen*/,
+    int /*x*/,
+    int /*y*/
+) _X_DEPRECATED;
+
+extern int miPointerGetMotionBufferSize(
+    void
+) _X_DEPRECATED;
+
+extern int miPointerGetMotionEvents(
+    DeviceIntPtr /*pPtr*/,
+    xTimecoord * /*coords*/,
+    unsigned long /*start*/,
+    unsigned long /*stop*/,
+    ScreenPtr /*pScreen*/
+);
+
+/* Deprecated in favour of miPointerUpdateSprite. */
+extern void miPointerUpdate(
+    void
+) _X_DEPRECATED;
+
+/* Deprecated in favour of miSetPointerPosition. */
+extern void miPointerDeltaCursor(
+    int /*dx*/,
+    int /*dy*/,
+    unsigned long /*time*/
+) _X_DEPRECATED;
+extern void miPointerAbsoluteCursor(
+    int /*x*/,
+    int /*y*/,
+    unsigned long /*time*/
+) _X_DEPRECATED;
+
+/* Deprecated in favour of miGetPointerPosition. */
+extern void miPointerPosition(
+    int * /*x*/,
+    int * /*y*/
+) _X_DEPRECATED;
+
+/* Deprecated in favour of miPointerSetScreen. */
+extern void miPointerSetNewScreen(
+    int, /*screen_no*/
+    int, /*x*/
+    int /*y*/
+) _X_DEPRECATED;
+
+/* Deprecated in favour of miPointerGetScreen. */
+extern ScreenPtr miPointerCurrentScreen(
+    void
+) _X_DEPRECATED;
+
+extern ScreenPtr miPointerGetScreen(
+    DeviceIntPtr pDev);
+extern void miPointerSetScreen(
+    DeviceIntPtr pDev,
+    int screen_num,
+    int x,
+    int y);
+
+/* Returns the current cursor position. */
+extern void miPointerGetPosition(
+    DeviceIntPtr pDev,
+    int *x,
+    int *y);
+
+/* Moves the cursor to the specified position.  May clip the co-ordinates:
+ * x and y are modified in-place. */
+extern void miPointerSetPosition(
+    DeviceIntPtr pDev,
+    int *x,
+    int *y,
+    unsigned long time);
+
+extern void miPointerUpdateSprite(
+    DeviceIntPtr pDev);
+
+extern DevPrivateKey miPointerScreenKey;
+
+#endif /* MIPOINTER_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/misc.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/misc.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/misc.h	(revision 9233)
@@ -0,0 +1,254 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+Copyright 1992, 1993 Data General Corporation;
+Copyright 1992, 1993 OMRON Corporation  
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that the
+above copyright notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting documentation, and that
+neither the name OMRON or DATA GENERAL be used in advertising or publicity
+pertaining to distribution of the software without specific, written prior
+permission of the party whose name is to be used.  Neither OMRON or 
+DATA GENERAL make any representation about the suitability of this software
+for any purpose.  It is provided "as is" without express or implied warranty.  
+
+OMRON AND DATA GENERAL EACH DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+IN NO EVENT SHALL OMRON OR DATA GENERAL BE LIABLE FOR ANY SPECIAL, INDIRECT
+OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+OF THIS SOFTWARE.
+
+******************************************************************/
+#ifndef MISC_H
+#define MISC_H 1
+/*
+ *  X internal definitions 
+ *
+ */
+
+extern unsigned long globalSerialNumber;
+extern unsigned long serverGeneration;
+
+#include <X11/Xosdefs.h>
+#include <X11/Xfuncproto.h>
+#include <X11/Xmd.h>
+#include <X11/X.h>
+#include <X11/Xdefs.h>
+
+#include <stddef.h>
+
+#ifndef MAXSCREENS
+#define MAXSCREENS	16
+#endif
+#define MAXCLIENTS	256
+#define MAXFORMATS	8
+
+typedef unsigned long PIXEL;
+typedef unsigned long ATOM;
+
+
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+
+#ifndef _XTYPEDEF_CALLBACKLISTPTR
+typedef struct _CallbackList *CallbackListPtr; /* also in dix.h */
+#define _XTYPEDEF_CALLBACKLISTPTR
+#endif
+
+typedef struct _xReq *xReqPtr;
+
+#include "os.h" 	/* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */
+#include <X11/Xfuncs.h> /* for bcopy, bzero, and bcmp */
+
+#define NullBox ((BoxPtr)0)
+#define MILLI_PER_MIN (1000 * 60)
+#define MILLI_PER_SECOND (1000)
+
+    /* this next is used with None and ParentRelative to tell
+       PaintWin() what to use to paint the background. Also used
+       in the macro IS_VALID_PIXMAP */
+
+#define USE_BACKGROUND_PIXEL 3
+#define USE_BORDER_PIXEL 3
+
+
+/* byte swap a 32-bit literal */
+#define lswapl(x) ((((x) & 0xff) << 24) |\
+		   (((x) & 0xff00) << 8) |\
+		   (((x) & 0xff0000) >> 8) |\
+		   (((x) >> 24) & 0xff))
+
+/* byte swap a short literal */
+#define lswaps(x) ((((x) & 0xff) << 8) | (((x) >> 8) & 0xff))
+
+#undef min
+#undef max
+
+#define min(a, b) (((a) < (b)) ? (a) : (b))
+#define max(a, b) (((a) > (b)) ? (a) : (b))
+/* abs() is a function, not a macro; include the file declaring
+ * it in case we haven't done that yet.
+ */
+#include <stdlib.h>
+#ifndef Fabs
+#define Fabs(a) ((a) > 0.0 ? (a) : -(a))	/* floating absolute value */
+#endif
+#define sign(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0))
+/* this assumes b > 0 */
+#define modulus(a, b, d)    if (((d) = (a) % (b)) < 0) (d) += (b)
+/*
+ * return the least significant bit in x which is set
+ *
+ * This works on 1's complement and 2's complement machines.
+ * If you care about the extra instruction on 2's complement
+ * machines, change to ((x) & (-(x)))
+ */
+#define lowbit(x) ((x) & (~(x) + 1))
+
+/* XXX Not for modules */
+#include <limits.h>
+#if !defined(MAXSHORT) || !defined(MINSHORT) || \
+    !defined(MAXINT) || !defined(MININT)
+/*
+ * Some implementations #define these through <math.h>, so preclude
+ * #include'ing it later.
+ */
+
+#include <math.h>
+#undef MAXSHORT
+#define MAXSHORT SHRT_MAX
+#undef MINSHORT
+#define MINSHORT SHRT_MIN
+#undef MAXINT
+#define MAXINT INT_MAX
+#undef MININT
+#define MININT INT_MIN
+
+#include <assert.h>
+#include <ctype.h>
+#include <stdio.h>     /* for fopen, etc... */
+
+#endif
+
+/* some macros to help swap requests, replies, and events */
+
+#define LengthRestB(stuff) \
+    ((client->req_len << 2) - sizeof(*stuff))
+
+#define LengthRestS(stuff) \
+    ((client->req_len << 1) - (sizeof(*stuff) >> 1))
+
+#define LengthRestL(stuff) \
+    (client->req_len - (sizeof(*stuff) >> 2))
+
+#define SwapRestS(stuff) \
+    SwapShorts((short *)(stuff + 1), LengthRestS(stuff))
+
+#define SwapRestL(stuff) \
+    SwapLongs((CARD32 *)(stuff + 1), LengthRestL(stuff))
+
+/* byte swap a 32-bit value */
+#define swapl(x, n) { \
+		 n = ((char *) (x))[0];\
+		 ((char *) (x))[0] = ((char *) (x))[3];\
+		 ((char *) (x))[3] = n;\
+		 n = ((char *) (x))[1];\
+		 ((char *) (x))[1] = ((char *) (x))[2];\
+		 ((char *) (x))[2] = n; }
+
+/* byte swap a short */
+#define swaps(x, n) { \
+		 n = ((char *) (x))[0];\
+		 ((char *) (x))[0] = ((char *) (x))[1];\
+		 ((char *) (x))[1] = n; }
+
+/* copy 32-bit value from src to dst byteswapping on the way */
+#define cpswapl(src, dst) { \
+                 ((char *)&(dst))[0] = ((char *) &(src))[3];\
+                 ((char *)&(dst))[1] = ((char *) &(src))[2];\
+                 ((char *)&(dst))[2] = ((char *) &(src))[1];\
+                 ((char *)&(dst))[3] = ((char *) &(src))[0]; }
+
+/* copy short from src to dst byteswapping on the way */
+#define cpswaps(src, dst) { \
+		 ((char *) &(dst))[0] = ((char *) &(src))[1];\
+		 ((char *) &(dst))[1] = ((char *) &(src))[0]; }
+
+extern void SwapLongs(
+    CARD32 *list,
+    unsigned long count);
+
+extern void SwapShorts(
+    short *list,
+    unsigned long count);
+
+extern void MakePredeclaredAtoms(void);
+
+extern int Ones(
+    unsigned long /*mask*/);
+
+typedef struct _xPoint *DDXPointPtr;
+typedef struct pixman_box16 *BoxPtr;
+typedef struct _xEvent *xEventPtr;
+typedef struct _xRectangle *xRectanglePtr;
+typedef struct _GrabRec *GrabPtr;
+
+/*  typedefs from other places - duplicated here to minimize the amount
+ *  of unnecessary junk that one would normally have to include to get
+ *  these symbols defined
+ */
+
+#ifndef _XTYPEDEF_CHARINFOPTR
+typedef struct _CharInfo *CharInfoPtr; /* also in fonts/include/font.h */
+#define _XTYPEDEF_CHARINFOPTR
+#endif
+
+#endif /* MISC_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/miscstruct.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/miscstruct.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/miscstruct.h	(revision 9233)
@@ -0,0 +1,66 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef MISCSTRUCT_H
+#define MISCSTRUCT_H 1
+
+#include "misc.h"
+#include <X11/Xprotostr.h>
+#include <pixman.h>
+
+typedef xPoint DDXPointRec;
+
+typedef struct pixman_box16 BoxRec;
+
+typedef union _DevUnion {
+    pointer		ptr;
+    long		val;
+    unsigned long	uval;
+    pointer		(*fptr)(void);
+} DevUnion;
+
+#endif /* MISCSTRUCT_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/opaque.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/opaque.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/opaque.h	(revision 9233)
@@ -0,0 +1,81 @@
+/*
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#ifndef OPAQUE_H
+#define OPAQUE_H
+
+#include <X11/Xmd.h>
+
+#include "globals.h"
+
+extern char *defaultTextFont;
+extern char *defaultCursorFont;
+extern int MaxClients;
+extern volatile char isItTimeToYield;
+extern volatile char dispatchException;
+
+/* bit values for dispatchException */
+#define DE_RESET     1
+#define DE_TERMINATE 2
+#define DE_PRIORITYCHANGE 4  /* set when a client's priority changes */
+
+extern CARD32 TimeOutValue;
+extern int ScreenSaverBlanking;
+extern int ScreenSaverAllowExposures;
+extern int defaultScreenSaverBlanking;
+extern int defaultScreenSaverAllowExposures;
+extern int argcGlobal;
+extern char **argvGlobal;
+extern char *display;
+
+extern int defaultBackingStore;
+extern Bool disableBackingStore;
+extern Bool enableBackingStore;
+extern Bool disableSaveUnders;
+extern Bool PartialNetwork;
+#ifndef NOLOGOHACK
+extern int logoScreenSaver;
+#endif
+#ifdef RLIMIT_DATA
+extern int limitDataSpace;
+#endif
+#ifdef RLIMIT_STACK
+extern int limitStackSpace;
+#endif
+#ifdef RLIMIT_NOFILE
+extern int limitNoFile;
+#endif
+extern Bool defeatAccessControl;
+extern long maxBigRequestSize;
+extern Bool blackRoot;
+extern Bool whiteRoot;
+
+extern Bool CoreDump;
+
+
+#endif /* OPAQUE_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/os.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/os.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/os.h	(revision 9233)
@@ -0,0 +1,527 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+
+#ifndef OS_H
+#define OS_H
+
+#include "misc.h"
+#include <stdarg.h>
+
+#define NullFID ((FID) 0)
+
+#define SCREEN_SAVER_ON   0
+#define SCREEN_SAVER_OFF  1
+#define SCREEN_SAVER_FORCER 2
+#define SCREEN_SAVER_CYCLE  3
+
+#ifndef MAX_REQUEST_SIZE
+#define MAX_REQUEST_SIZE 65535
+#endif
+#ifndef MAX_BIG_REQUEST_SIZE
+#define MAX_BIG_REQUEST_SIZE 4194303
+#endif
+
+typedef pointer	FID;
+typedef struct _FontPathRec *FontPathPtr;
+typedef struct _NewClientRec *NewClientPtr;
+
+#ifndef xalloc
+#define xnfalloc(size) XNFalloc((unsigned long)(size))
+#define xnfcalloc(_num, _size) XNFcalloc((unsigned long)(_num)*(unsigned long)(_size))
+#define xnfrealloc(ptr, size) XNFrealloc((pointer)(ptr), (unsigned long)(size))
+
+#define xalloc(size) Xalloc((unsigned long)(size))
+#define xcalloc(_num, _size) Xcalloc((unsigned long)(_num)*(unsigned long)(_size))
+#define xrealloc(ptr, size) Xrealloc((pointer)(ptr), (unsigned long)(size))
+#define xfree(ptr) Xfree((pointer)(ptr))
+#define xstrdup(s) Xstrdup(s)
+#define xnfstrdup(s) XNFstrdup(s)
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+
+/* have to put $(SIGNAL_DEFINES) in DEFINES in Imakefile to get this right */
+#ifdef SIGNALRETURNSINT
+#define SIGVAL int
+#else
+#define SIGVAL void
+#endif
+
+extern Bool OsDelayInitColors;
+extern void (*OsVendorVErrorFProc)(const char *, va_list args);
+
+extern int WaitForSomething(
+    int* /*pClientsReady*/
+);
+
+extern int ReadRequestFromClient(ClientPtr /*client*/);
+
+extern Bool InsertFakeRequest(
+    ClientPtr /*client*/, 
+    char* /*data*/, 
+    int /*count*/);
+
+extern void ResetCurrentRequest(ClientPtr /*client*/);
+
+extern void FlushAllOutput(void);
+
+extern void FlushIfCriticalOutputPending(void);
+
+extern void SetCriticalOutputPending(void);
+
+extern int WriteToClient(ClientPtr /*who*/, int /*count*/, char* /*buf*/);
+
+extern void ResetOsBuffers(void);
+
+extern void InitConnectionLimits(void);
+
+extern void NotifyParentProcess(void);
+
+extern void CreateWellKnownSockets(void);
+
+extern void ResetWellKnownSockets(void);
+
+extern void CloseWellKnownConnections(void);
+
+extern XID AuthorizationIDOfClient(ClientPtr /*client*/);
+
+extern char *ClientAuthorized(
+    ClientPtr /*client*/,
+    unsigned int /*proto_n*/,
+    char* /*auth_proto*/,
+    unsigned int /*string_n*/,
+    char* /*auth_string*/);
+
+extern Bool EstablishNewConnections(
+    ClientPtr /*clientUnused*/,
+    pointer /*closure*/);
+
+extern void CheckConnections(void);
+
+extern void CloseDownConnection(ClientPtr /*client*/);
+
+extern void AddGeneralSocket(int /*fd*/);
+
+extern void RemoveGeneralSocket(int /*fd*/);
+
+extern void AddEnabledDevice(int /*fd*/);
+
+extern void RemoveEnabledDevice(int /*fd*/);
+
+extern int OnlyListenToOneClient(ClientPtr /*client*/);
+
+extern void ListenToAllClients(void);
+
+extern void IgnoreClient(ClientPtr /*client*/);
+
+extern void AttendClient(ClientPtr /*client*/);
+
+extern void MakeClientGrabImpervious(ClientPtr /*client*/);
+
+extern void MakeClientGrabPervious(ClientPtr /*client*/);
+
+extern void AvailableClientInput(ClientPtr /* client */);
+
+extern CARD32 GetTimeInMillis(void);
+
+extern void AdjustWaitForDelay(
+    pointer /*waitTime*/,
+    unsigned long /*newdelay*/);
+
+typedef	struct _OsTimerRec *OsTimerPtr;
+
+typedef CARD32 (*OsTimerCallback)(
+    OsTimerPtr /* timer */,
+    CARD32 /* time */,
+    pointer /* arg */);
+
+extern void TimerInit(void);
+
+extern Bool TimerForce(OsTimerPtr /* timer */);
+
+#define TimerAbsolute (1<<0)
+#define TimerForceOld (1<<1)
+
+extern OsTimerPtr TimerSet(
+    OsTimerPtr /* timer */,
+    int /* flags */,
+    CARD32 /* millis */,
+    OsTimerCallback /* func */,
+    pointer /* arg */);
+
+extern void TimerCheck(void);
+extern void TimerCancel(OsTimerPtr /* pTimer */);
+extern void TimerFree(OsTimerPtr /* pTimer */);
+
+extern void SetScreenSaverTimer(void);
+extern void FreeScreenSaverTimer(void);
+
+extern SIGVAL AutoResetServer(int /*sig*/);
+
+extern SIGVAL GiveUp(int /*sig*/);
+
+extern void UseMsg(void);
+
+extern void InitGlobals(void);
+
+extern void ProcessCommandLine(int /*argc*/, char* /*argv*/[]);
+
+extern int set_font_authorizations(
+    char ** /* authorizations */, 
+    int * /*authlen */, 
+    pointer /* client */);
+
+#ifndef _HAVE_XALLOC_DECLS
+#define _HAVE_XALLOC_DECLS
+extern pointer Xalloc(unsigned long /*amount*/);
+extern pointer Xcalloc(unsigned long /*amount*/);
+extern pointer Xrealloc(pointer /*ptr*/, unsigned long /*amount*/);
+extern void Xfree(pointer /*ptr*/);
+#endif
+
+extern pointer XNFalloc(unsigned long /*amount*/);
+extern pointer XNFcalloc(unsigned long /*amount*/);
+extern pointer XNFrealloc(pointer /*ptr*/, unsigned long /*amount*/);
+
+extern void OsInitAllocator(void);
+
+extern char *Xstrdup(const char *s);
+extern char *XNFstrdup(const char *s);
+extern char *Xprintf(const char *fmt, ...);
+extern char *Xvprintf(const char *fmt, va_list va);
+extern char *XNFprintf(const char *fmt, ...);
+extern char *XNFvprintf(const char *fmt, va_list va);
+
+typedef SIGVAL (*OsSigHandlerPtr)(int /* sig */);
+
+extern OsSigHandlerPtr OsSignal(int /* sig */, OsSigHandlerPtr /* handler */);
+
+extern int auditTrailLevel;
+
+#ifdef SERVER_LOCK
+extern void LockServer(void);
+extern void UnlockServer(void);
+#endif
+
+extern int OsLookupColor(
+    int	/*screen*/,
+    char * /*name*/,
+    unsigned /*len*/,
+    unsigned short * /*pred*/,
+    unsigned short * /*pgreen*/,
+    unsigned short * /*pblue*/);
+
+extern void OsInit(void);
+
+extern void OsCleanup(Bool);
+
+extern void OsVendorFatalError(void);
+
+extern void OsVendorInit(void);
+
+extern int OsInitColors(void);
+
+void OsBlockSignals (void);
+
+void OsReleaseSignals (void);
+
+#if !defined(WIN32)
+extern int System(char *);
+extern pointer Popen(char *, char *);
+extern int Pclose(pointer);
+extern pointer Fopen(char *, char *);
+extern int Fclose(pointer);
+#else
+#define System(a) system(a)
+#define Popen(a,b) popen(a,b)
+#define Pclose(a) pclose(a)
+#define Fopen(a,b) fopen(a,b)
+#define Fclose(a) fclose(a)
+#endif
+
+extern void CheckUserParameters(int argc, char **argv, char **envp);
+extern void CheckUserAuthorization(void);
+
+extern int AddHost(
+    ClientPtr	/*client*/,
+    int         /*family*/,
+    unsigned    /*length*/,
+    pointer     /*pAddr*/);
+
+extern Bool ForEachHostInFamily (
+    int	    /*family*/,
+    Bool    (* /*func*/ )(
+            unsigned char * /* addr */,
+            short           /* len */,
+            pointer         /* closure */),
+    pointer /*closure*/);
+
+extern int RemoveHost(
+    ClientPtr	/*client*/,
+    int         /*family*/,
+    unsigned    /*length*/,
+    pointer     /*pAddr*/);
+
+extern int GetHosts(
+    pointer * /*data*/,
+    int	    * /*pnHosts*/,
+    int	    * /*pLen*/,
+    BOOL    * /*pEnabled*/);
+
+typedef struct sockaddr * sockaddrPtr;
+
+extern int InvalidHost(sockaddrPtr /*saddr*/, int /*len*/, ClientPtr client);
+
+extern int LocalClient(ClientPtr /* client */);
+
+extern int LocalClientCred(ClientPtr, int *, int *);
+
+#define LCC_UID_SET	(1 << 0)
+#define LCC_GID_SET	(1 << 1)
+#define LCC_PID_SET	(1 << 2)
+#define LCC_ZID_SET	(1 << 3)
+
+typedef struct {
+    int fieldsSet;	/* Bit mask of fields set */
+    int	euid;		/* Effective uid */
+    int egid;		/* Primary effective group id */
+    int nSuppGids;	/* Number of supplementary group ids */
+    int *pSuppGids;	/* Array of supplementary group ids */
+    int pid;		/* Process id */
+    int zoneid;		/* Only set on Solaris 10 & later */
+} LocalClientCredRec;
+
+extern int GetLocalClientCreds(ClientPtr, LocalClientCredRec **);
+extern void FreeLocalClientCreds(LocalClientCredRec *); 
+
+extern int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/);
+
+extern int GetAccessControl(void);
+
+
+extern void AddLocalHosts(void);
+
+extern void ResetHosts(char *display);
+
+extern void EnableLocalHost(void);
+
+extern void DisableLocalHost(void);
+
+extern void AccessUsingXdmcp(void);
+
+extern void DefineSelf(int /*fd*/);
+
+extern void AugmentSelf(pointer /*from*/, int /*len*/);
+
+extern void InitAuthorization(char * /*filename*/);
+
+/* extern int LoadAuthorization(void); */
+
+extern void RegisterAuthorizations(void);
+
+extern int AuthorizationFromID (
+	XID 		id,
+	unsigned short	*name_lenp,
+	char		**namep,
+	unsigned short	*data_lenp,
+	char		**datap);
+
+extern XID CheckAuthorization(
+    unsigned int /*namelength*/,
+    char * /*name*/,
+    unsigned int /*datalength*/,
+    char * /*data*/,
+    ClientPtr /*client*/,
+    char ** /*reason*/
+);
+
+extern void ResetAuthorization(void);
+
+extern int RemoveAuthorization (
+    unsigned short	name_length,
+    char		*name,
+    unsigned short	data_length,
+    char		*data);
+
+extern int AddAuthorization(
+    unsigned int	/*name_length*/,
+    char *		/*name*/,
+    unsigned int	/*data_length*/,
+    char *		/*data*/);
+
+extern XID GenerateAuthorization(
+    unsigned int   /* name_length */,
+    char	*  /* name */,
+    unsigned int   /* data_length */,
+    char	*  /* data */,
+    unsigned int * /* data_length_return */,
+    char	** /* data_return */);
+
+#ifdef COMMANDLINE_CHALLENGED_OPERATING_SYSTEMS
+extern void ExpandCommandLine(int * /*pargc*/, char *** /*pargv*/);
+#endif
+
+extern void ddxInitGlobals(void);
+
+extern int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
+
+extern void ddxUseMsg(void);
+
+/* int ReqLen(xReq *req, ClientPtr client)
+ * Given a pointer to a *complete* request, return its length in bytes.
+ * Note that if the request is a big request (as defined in the Big
+ * Requests extension), the macro lies by returning 4 less than the
+ * length that it actually occupies in the request buffer.  This is so you
+ * can blindly compare the length with the various sz_<request> constants
+ * in Xproto.h without having to know/care about big requests.
+ */
+#define ReqLen(_pxReq, _client) \
+ ((_pxReq->length ? \
+     (_client->swapped ? lswaps(_pxReq->length) : _pxReq->length) \
+  : ((_client->swapped ? \
+	lswapl(((CARD32*)_pxReq)[1]) : ((CARD32*)_pxReq)[1])-1) \
+  ) << 2)
+
+/* otherReqTypePtr CastxReq(xReq *req, otherReqTypePtr)
+ * Cast the given request to one of type otherReqTypePtr to access
+ * fields beyond the length field.
+ */
+#define CastxReq(_pxReq, otherReqTypePtr) \
+    (_pxReq->length ? (otherReqTypePtr)_pxReq \
+		    : (otherReqTypePtr)(((CARD32*)_pxReq)+1))
+
+/* stuff for SkippedRequestsCallback */
+extern CallbackListPtr SkippedRequestsCallback;
+typedef struct {
+    xReqPtr req;
+    ClientPtr client;
+    int numskipped;
+} SkippedRequestInfoRec;
+
+/* stuff for ReplyCallback */
+extern CallbackListPtr ReplyCallback;
+typedef struct {
+    ClientPtr client;
+    pointer replyData;
+    unsigned long dataLenBytes;
+    unsigned long bytesRemaining;
+    Bool startOfReply;
+} ReplyInfoRec;
+
+/* stuff for FlushCallback */
+extern CallbackListPtr FlushCallback;
+
+extern void AbortDDX(void);
+extern void ddxGiveUp(void);
+extern int TimeSinceLastInputEvent(void);
+
+/* Logging. */
+typedef enum _LogParameter {
+    XLOG_FLUSH,
+    XLOG_SYNC,
+    XLOG_VERBOSITY,
+    XLOG_FILE_VERBOSITY
+} LogParameter;
+
+/* Flags for log messages. */
+typedef enum {
+    X_PROBED,			/* Value was probed */
+    X_CONFIG,			/* Value was given in the config file */
+    X_DEFAULT,			/* Value is a default */
+    X_CMDLINE,			/* Value was given on the command line */
+    X_NOTICE,			/* Notice */
+    X_ERROR,			/* Error message */
+    X_WARNING,			/* Warning message */
+    X_INFO,			/* Informational message */
+    X_NONE,			/* No prefix */
+    X_NOT_IMPLEMENTED,		/* Not implemented */
+    X_UNKNOWN = -1		/* unknown -- this must always be last */
+} MessageType;
+
+/* XXX Need to check which GCC versions have the format(printf) attribute. */
+#if defined(__GNUC__) && \
+    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
+#define _printf_attribute(a,b) __attribute((format(__printf__,a,b)))
+#else
+#define _printf_attribute(a,b) /**/
+#endif
+
+extern const char *LogInit(const char *fname, const char *backup);
+extern void LogClose(void);
+extern Bool LogSetParameter(LogParameter param, int value);
+extern void LogVWrite(int verb, const char *f, va_list args);
+extern void LogWrite(int verb, const char *f, ...) _printf_attribute(2,3);
+extern void LogVMessageVerb(MessageType type, int verb, const char *format,
+			    va_list args);
+extern void LogMessageVerb(MessageType type, int verb, const char *format,
+			   ...) _printf_attribute(3,4);
+extern void LogMessage(MessageType type, const char *format, ...)
+			_printf_attribute(2,3);
+extern void FreeAuditTimer(void);
+extern void AuditF(const char *f, ...) _printf_attribute(1,2);
+extern void VAuditF(const char *f, va_list args);
+extern void FatalError(const char *f, ...) _printf_attribute(1,2)
+#if defined(__GNUC__) && \
+    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
+__attribute((noreturn))
+#endif
+;
+
+#ifdef DEBUG
+#define DebugF ErrorF
+#else
+#define DebugF(...) /* */
+#endif
+
+extern void VErrorF(const char *f, va_list args);
+extern void ErrorF(const char *f, ...) _printf_attribute(1,2);
+extern void Error(char *str);
+extern void LogPrintMarkers(void);
+
+#endif /* OS_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/picture.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/picture.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/picture.h	(revision 9233)
@@ -0,0 +1,222 @@
+/*
+ *
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  SuSE makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author:  Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _PICTURE_H_
+#define _PICTURE_H_
+
+#include <pixman.h>
+
+typedef struct _DirectFormat	*DirectFormatPtr;
+typedef struct _PictFormat	*PictFormatPtr;
+typedef struct _Picture		*PicturePtr;
+
+/*
+ * While the protocol is generous in format support, the
+ * sample implementation allows only packed RGB and GBR
+ * representations for data to simplify software rendering,
+ */
+#define PICT_FORMAT(bpp,type,a,r,g,b)	PIXMAN_FORMAT(bpp, type, a, r, g, b)
+
+/*
+ * gray/color formats use a visual index instead of argb
+ */
+#define PICT_VISFORMAT(bpp,type,vi)	(((bpp) << 24) |  \
+					 ((type) << 16) | \
+					 ((vi)))
+
+#define PICT_FORMAT_BPP(f)	PIXMAN_FORMAT_BPP(f)
+#define PICT_FORMAT_TYPE(f)	PIXMAN_FORMAT_TYPE(f)
+#define PICT_FORMAT_A(f)	PIXMAN_FORMAT_A(f)
+#define PICT_FORMAT_R(f)	PIXMAN_FORMAT_R(f)
+#define PICT_FORMAT_G(f)	PIXMAN_FORMAT_G(f)
+#define PICT_FORMAT_B(f)	PIXMAN_FORMAT_B(f)
+#define PICT_FORMAT_RGB(f)	PIXMAN_FORMAT_RGB(f)
+#define PICT_FORMAT_VIS(f)	PIXMAN_FORMAT_VIS(f)
+
+#define PICT_TYPE_OTHER		PIXMAN_TYPE_OTHER
+#define PICT_TYPE_A		PIXMAN_TYPE_A
+#define PICT_TYPE_ARGB		PIXMAN_TYPE_ARGB
+#define PICT_TYPE_ABGR		PIXMAN_TYPE_ABGR
+#define PICT_TYPE_COLOR		PIXMAN_TYPE_COLOR
+#define PICT_TYPE_GRAY		PIXMAN_TYPE_GRAY
+
+#define PICT_FORMAT_COLOR(f)	PIXMAN_FORMAT_COLOR(f)
+
+/* 32bpp formats */
+typedef enum _PictFormatShort {
+    PICT_a8r8g8b8 =	PIXMAN_a8r8g8b8,
+    PICT_x8r8g8b8 =	PIXMAN_x8r8g8b8,
+    PICT_a8b8g8r8 =	PIXMAN_a8b8g8r8,
+    PICT_x8b8g8r8 =	PIXMAN_x8b8g8r8,
+
+/* 24bpp formats */
+    PICT_r8g8b8 =	PIXMAN_r8g8b8,
+    PICT_b8g8r8 =	PIXMAN_b8g8r8,
+
+/* 16bpp formats */
+    PICT_r5g6b5 =	PIXMAN_r5g6b5,
+    PICT_b5g6r5 =	PIXMAN_b5g6r5,
+
+    PICT_a1r5g5b5 =	PIXMAN_a1r5g5b5,
+    PICT_x1r5g5b5 =	PIXMAN_x1r5g5b5,
+    PICT_a1b5g5r5 =	PIXMAN_a1b5g5r5,
+    PICT_x1b5g5r5 =	PIXMAN_x1b5g5r5,
+    PICT_a4r4g4b4 =	PIXMAN_a4r4g4b4,
+    PICT_x4r4g4b4 =	PIXMAN_x4r4g4b4,
+    PICT_a4b4g4r4 =	PIXMAN_a4b4g4r4,
+    PICT_x4b4g4r4 =	PIXMAN_x4b4g4r4,
+
+/* 8bpp formats */
+    PICT_a8 =		PIXMAN_a8,
+    PICT_r3g3b2 =	PIXMAN_r3g3b2,
+    PICT_b2g3r3 =	PIXMAN_b2g3r3,
+    PICT_a2r2g2b2 =	PIXMAN_a2r2g2b2,
+    PICT_a2b2g2r2 =	PIXMAN_a2b2g2r2,
+
+    PICT_c8 =		PIXMAN_c8,
+    PICT_g8 =		PIXMAN_g8,
+
+    PICT_x4a4 =		PIXMAN_x4a4,
+				    
+    PICT_x4c4 =		PIXMAN_x4c4,
+    PICT_x4g4 =		PIXMAN_x4g4,
+
+/* 4bpp formats */
+    PICT_a4 =		PIXMAN_a4,
+    PICT_r1g2b1 =	PIXMAN_r1g2b1,
+    PICT_b1g2r1 =	PIXMAN_b1g2r1,
+    PICT_a1r1g1b1 =	PIXMAN_a1r1g1b1,
+    PICT_a1b1g1r1 =	PIXMAN_a1b1g1r1,
+				    
+    PICT_c4 =		PIXMAN_c4,
+    PICT_g4 =		PIXMAN_g4,
+
+/* 1bpp formats */
+    PICT_a1 =		PIXMAN_a1,
+
+    PICT_g1 =		PIXMAN_g1
+} PictFormatShort;
+
+/*
+ * For dynamic indexed visuals (GrayScale and PseudoColor), these control the 
+ * selection of colors allocated for drawing to Pictures.  The default
+ * policy depends on the size of the colormap:
+ *
+ * Size		Default Policy
+ * ----------------------------
+ *  < 64	PolicyMono
+ *  < 256	PolicyGray
+ *  256		PolicyColor (only on PseudoColor)
+ *
+ * The actual allocation code lives in miindex.c, and so is
+ * austensibly server dependent, but that code does:
+ *
+ * PolicyMono	    Allocate no additional colors, use black and white
+ * PolicyGray	    Allocate 13 gray levels (11 cells used)
+ * PolicyColor	    Allocate a 4x4x4 cube and 13 gray levels (71 cells used)
+ * PolicyAll	    Allocate as big a cube as possible, fill with gray (all)
+ *
+ * Here's a picture to help understand how many colors are
+ * actually allocated (this is just the gray ramp):
+ *
+ *                 gray level
+ * all   0000 1555 2aaa 4000 5555 6aaa 8000 9555 aaaa bfff d555 eaaa ffff
+ * b/w   0000                                                        ffff
+ * 4x4x4                     5555                aaaa
+ * extra      1555 2aaa 4000      6aaa 8000 9555      bfff d555 eaaa
+ *
+ * The default colormap supplies two gray levels (black/white), the
+ * 4x4x4 cube allocates another two and nine more are allocated to fill
+ * in the 13 levels.  When the 4x4x4 cube is not allocated, a total of
+ * 11 cells are allocated.
+ */   
+
+#define PictureCmapPolicyInvalid    -1
+#define PictureCmapPolicyDefault    0
+#define PictureCmapPolicyMono	    1
+#define PictureCmapPolicyGray	    2
+#define PictureCmapPolicyColor	    3
+#define PictureCmapPolicyAll	    4
+
+extern int  PictureCmapPolicy;
+
+int	PictureParseCmapPolicy (const char *name);
+
+extern int RenderErrBase;
+extern DevPrivateKey RenderClientPrivateKey;
+
+/* Fixed point updates from Carl Worth, USC, Information Sciences Institute */
+
+typedef pixman_fixed_32_32_t	xFixed_32_32;
+
+typedef pixman_fixed_48_16_t	xFixed_48_16;
+
+#define MAX_FIXED_48_16		pixman_max_fixed_48_16
+#define MIN_FIXED_48_16		pixman_min_fixed_48_16
+
+typedef pixman_fixed_1_31_t	xFixed_1_31;
+typedef pixman_fixed_1_16_t	xFixed_1_16;
+typedef pixman_fixed_16_16_t	xFixed_16_16;
+
+/*
+ * An unadorned "xFixed" is the same as xFixed_16_16, 
+ * (since it's quite common in the code) 
+ */
+typedef	pixman_fixed_t	xFixed;
+#define XFIXED_BITS	16
+
+#define xFixedToInt(f)	pixman_fixed_to_int(f)
+#define IntToxFixed(i)	pixman_int_to_fixed(i)
+#define xFixedE		pixman_fixed_e
+#define xFixed1		pixman_fixed_1
+#define xFixed1MinusE	pixman_fixed_1_minus_e
+#define xFixedFrac(f)	pixman_fixed_frac(f)
+#define xFixedFloor(f)	pixman_fixed_floor(f)
+#define xFixedCeil(f)	pixman_fixed_ceil(f)
+
+#define xFixedFraction(f)	pixman_fixed_fraction(f)
+#define xFixedMod2(f)		pixman_fixed_mod2(f)
+
+/* whether 't' is a well defined not obviously empty trapezoid */
+#define xTrapezoidValid(t)  ((t)->left.p1.y != (t)->left.p2.y && \
+			     (t)->right.p1.y != (t)->right.p2.y && \
+			     (int) ((t)->bottom - (t)->top) > 0)
+
+/*
+ * Standard NTSC luminance conversions:
+ *
+ *  y = r * 0.299 + g * 0.587 + b * 0.114
+ *
+ * Approximate this for a bit more speed:
+ *
+ *  y = (r * 153 + g * 301 + b * 58) / 512
+ *
+ * This gives 17 bits of luminance; to get 15 bits, lop the low two
+ */
+
+#define CvtR8G8B8toY15(s)	(((((s) >> 16) & 0xff) * 153 + \
+				  (((s) >>  8) & 0xff) * 301 + \
+				  (((s)      ) & 0xff) * 58) >> 2)
+
+#endif /* _PICTURE_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/picturestr.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/picturestr.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/picturestr.h	(revision 9233)
@@ -0,0 +1,679 @@
+/*
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  SuSE makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author:  Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _PICTURESTR_H_
+#define _PICTURESTR_H_
+
+#include "scrnintstr.h"
+#include "glyphstr.h"
+#include "resource.h"
+#include "privates.h"
+
+typedef struct _DirectFormat {
+    CARD16	    red, redMask;
+    CARD16	    green, greenMask;
+    CARD16	    blue, blueMask;
+    CARD16	    alpha, alphaMask;
+} DirectFormatRec;
+
+typedef struct _IndexFormat {
+    VisualID	    vid;
+    ColormapPtr	    pColormap;
+    int		    nvalues;
+    xIndexValue	    *pValues;
+    void	    *devPrivate;
+} IndexFormatRec;
+
+typedef struct _PictFormat {
+    CARD32	    id;
+    CARD32	    format;	    /* except bpp */
+    unsigned char   type;
+    unsigned char   depth;
+    DirectFormatRec direct;
+    IndexFormatRec  index;
+} PictFormatRec;
+
+typedef struct pixman_vector PictVector, *PictVectorPtr;
+typedef struct pixman_transform PictTransform, *PictTransformPtr;
+
+#define PICT_GRADIENT_STOPTABLE_SIZE 1024
+#define SourcePictTypeSolidFill 0
+#define SourcePictTypeLinear 1
+#define SourcePictTypeRadial 2
+#define SourcePictTypeConical 3
+
+#define SourcePictClassUnknown    0
+#define SourcePictClassHorizontal 1
+#define SourcePictClassVertical   2
+
+typedef struct _PictSolidFill {
+    unsigned int type;
+    unsigned int class;
+    CARD32 color;
+} PictSolidFill, *PictSolidFillPtr;
+
+typedef struct _PictGradientStop {
+    xFixed x;
+    xRenderColor color;
+} PictGradientStop, *PictGradientStopPtr;
+
+typedef struct _PictGradient {
+    unsigned int type;
+    unsigned int class;
+    int nstops;
+    PictGradientStopPtr stops;
+    int stopRange;
+    CARD32 *colorTable;
+    int colorTableSize;
+} PictGradient, *PictGradientPtr;
+
+typedef struct _PictLinearGradient {
+    unsigned int type;
+    unsigned int class;
+    int nstops;
+    PictGradientStopPtr stops;
+    int stopRange;
+    CARD32 *colorTable;
+    int colorTableSize;
+    xPointFixed p1;
+    xPointFixed p2;
+} PictLinearGradient, *PictLinearGradientPtr;
+
+typedef struct _PictCircle {
+    xFixed x;
+    xFixed y;
+    xFixed radius;
+} PictCircle, *PictCirclePtr;
+
+typedef struct _PictRadialGradient {
+    unsigned int type;
+    unsigned int class;
+    int nstops;
+    PictGradientStopPtr stops;
+    int stopRange;
+    CARD32 *colorTable;
+    int colorTableSize;
+    PictCircle c1;
+    PictCircle c2;
+    double cdx;
+    double cdy;
+    double dr;
+    double A;
+} PictRadialGradient, *PictRadialGradientPtr;
+
+typedef struct _PictConicalGradient {
+    unsigned int type;
+    unsigned int class;
+    int nstops;
+    PictGradientStopPtr stops;
+    int stopRange;
+    CARD32 *colorTable;
+    int colorTableSize;
+    xPointFixed center;
+    xFixed angle;
+} PictConicalGradient, *PictConicalGradientPtr;
+
+typedef union _SourcePict {
+    unsigned int type;
+    PictSolidFill solidFill;
+    PictGradient gradient;
+    PictLinearGradient linear;
+    PictRadialGradient radial;
+    PictConicalGradient conical;
+} SourcePict, *SourcePictPtr;
+
+typedef struct _Picture {
+    DrawablePtr	    pDrawable;
+    PictFormatPtr   pFormat;
+    PictFormatShort format;	    /* PICT_FORMAT */
+    int		    refcnt;
+    CARD32	    id;
+    PicturePtr	    pNext;	    /* chain on same drawable */
+
+    unsigned int    repeat : 1;
+    unsigned int    graphicsExposures : 1;
+    unsigned int    subWindowMode : 1;
+    unsigned int    polyEdge : 1;
+    unsigned int    polyMode : 1;
+    unsigned int    freeCompClip : 1;
+    unsigned int    clientClipType : 2;
+    unsigned int    componentAlpha : 1;
+    unsigned int    repeatType : 2;
+    unsigned int    unused : 21;
+
+    PicturePtr	    alphaMap;
+    DDXPointRec	    alphaOrigin;
+
+    DDXPointRec	    clipOrigin;
+    pointer	    clientClip;
+
+    Atom	    dither;
+
+    unsigned long   stateChanges;
+    unsigned long   serialNumber;
+
+    RegionPtr	    pCompositeClip;
+
+    PrivateRec	    *devPrivates;
+
+    PictTransform   *transform;
+
+    int		    filter;
+    xFixed	    *filter_params;
+    int		    filter_nparams;
+    SourcePictPtr   pSourcePict;
+} PictureRec;
+
+typedef Bool (*PictFilterValidateParamsProcPtr) (PicturePtr pPicture, int id,
+						 xFixed *params, int nparams);
+typedef struct {
+    char			    *name;
+    int				    id;
+    PictFilterValidateParamsProcPtr ValidateParams;
+} PictFilterRec, *PictFilterPtr;
+
+#define PictFilterNearest	0
+#define PictFilterBilinear	1
+
+#define PictFilterFast		2
+#define PictFilterGood		3
+#define PictFilterBest		4
+
+#define PictFilterConvolution	5
+
+typedef struct {
+    char	    *alias;
+    int		    alias_id;
+    int		    filter_id;
+} PictFilterAliasRec, *PictFilterAliasPtr;
+
+typedef int	(*CreatePictureProcPtr)	    (PicturePtr pPicture);
+typedef void	(*DestroyPictureProcPtr)    (PicturePtr pPicture);
+typedef int	(*ChangePictureClipProcPtr) (PicturePtr	pPicture,
+					     int	clipType,
+					     pointer    value,
+					     int	n);
+typedef void	(*DestroyPictureClipProcPtr)(PicturePtr	pPicture);
+
+typedef int	(*ChangePictureTransformProcPtr)    (PicturePtr	    pPicture,
+						     PictTransform  *transform);
+
+typedef int	(*ChangePictureFilterProcPtr)	(PicturePtr	pPicture,
+						 int		filter,
+						 xFixed		*params,
+						 int		nparams);
+
+typedef void	(*DestroyPictureFilterProcPtr)	(PicturePtr pPicture);
+
+typedef void	(*ChangePictureProcPtr)	    (PicturePtr pPicture,
+					     Mask	mask);
+typedef void	(*ValidatePictureProcPtr)    (PicturePtr pPicture,
+					     Mask       mask);
+typedef void	(*CompositeProcPtr)	    (CARD8	op,
+					     PicturePtr pSrc,
+					     PicturePtr pMask,
+					     PicturePtr pDst,
+					     INT16	xSrc,
+					     INT16	ySrc,
+					     INT16	xMask,
+					     INT16	yMask,
+					     INT16	xDst,
+					     INT16	yDst,
+					     CARD16	width,
+					     CARD16	height);
+
+typedef void	(*GlyphsProcPtr)	    (CARD8      op,
+					     PicturePtr pSrc,
+					     PicturePtr pDst,
+					     PictFormatPtr  maskFormat,
+					     INT16      xSrc,
+					     INT16      ySrc,
+					     int	nlists,
+					     GlyphListPtr   lists,
+					     GlyphPtr	*glyphs);
+
+typedef void	(*CompositeRectsProcPtr)    (CARD8	    op,
+					     PicturePtr	    pDst,
+					     xRenderColor   *color,
+					     int	    nRect,
+					     xRectangle	    *rects);
+
+typedef void	(*RasterizeTrapezoidProcPtr)(PicturePtr	    pMask,
+					     xTrapezoid	    *trap,
+					     int	    x_off,
+					     int	    y_off);
+
+typedef void	(*TrapezoidsProcPtr)	    (CARD8	    op,
+					     PicturePtr	    pSrc,
+					     PicturePtr	    pDst,
+					     PictFormatPtr  maskFormat,
+					     INT16	    xSrc,
+					     INT16	    ySrc,
+					     int	    ntrap,
+					     xTrapezoid	    *traps);
+
+typedef void	(*TrianglesProcPtr)	    (CARD8	    op,
+					     PicturePtr	    pSrc,
+					     PicturePtr	    pDst,
+					     PictFormatPtr  maskFormat,
+					     INT16	    xSrc,
+					     INT16	    ySrc,
+					     int	    ntri,
+					     xTriangle	    *tris);
+
+typedef void	(*TriStripProcPtr)	    (CARD8	    op,
+					     PicturePtr	    pSrc,
+					     PicturePtr	    pDst,
+					     PictFormatPtr  maskFormat,
+					     INT16	    xSrc,
+					     INT16	    ySrc,
+					     int	    npoint,
+					     xPointFixed    *points);
+
+typedef void	(*TriFanProcPtr)	    (CARD8	    op,
+					     PicturePtr	    pSrc,
+					     PicturePtr	    pDst,
+					     PictFormatPtr  maskFormat,
+					     INT16	    xSrc,
+					     INT16	    ySrc,
+					     int	    npoint,
+					     xPointFixed    *points);
+
+typedef Bool	(*InitIndexedProcPtr)	    (ScreenPtr	    pScreen,
+					     PictFormatPtr  pFormat);
+
+typedef void	(*CloseIndexedProcPtr)	    (ScreenPtr	    pScreen,
+					     PictFormatPtr  pFormat);
+
+typedef void	(*UpdateIndexedProcPtr)	    (ScreenPtr	    pScreen,
+					     PictFormatPtr  pFormat,
+					     int	    ndef,
+					     xColorItem	    *pdef);
+
+typedef void	(*AddTrapsProcPtr)	    (PicturePtr	    pPicture,
+					     INT16	    xOff,
+					     INT16	    yOff,
+					     int	    ntrap,
+					     xTrap	    *traps);
+
+typedef void	(*AddTrianglesProcPtr)	    (PicturePtr	    pPicture,
+					     INT16	    xOff,
+					     INT16	    yOff,
+					     int	    ntri,
+					     xTriangle	    *tris);
+
+typedef Bool	(*RealizeGlyphProcPtr)	    (ScreenPtr	    pScreen,
+					     GlyphPtr	    glyph);
+
+typedef void	(*UnrealizeGlyphProcPtr)    (ScreenPtr	    pScreen,
+					     GlyphPtr	    glyph);
+
+typedef struct _PictureScreen {
+    PictFormatPtr		formats;
+    PictFormatPtr		fallback;
+    int				nformats;
+
+    CreatePictureProcPtr	CreatePicture;
+    DestroyPictureProcPtr	DestroyPicture;
+    ChangePictureClipProcPtr	ChangePictureClip;
+    DestroyPictureClipProcPtr	DestroyPictureClip;
+
+    ChangePictureProcPtr	ChangePicture;
+    ValidatePictureProcPtr	ValidatePicture;
+
+    CompositeProcPtr		Composite;
+    GlyphsProcPtr		Glyphs; /* unused */
+    CompositeRectsProcPtr	CompositeRects;
+
+    DestroyWindowProcPtr	DestroyWindow;
+    CloseScreenProcPtr		CloseScreen;
+
+    StoreColorsProcPtr		StoreColors;
+
+    InitIndexedProcPtr		InitIndexed;
+    CloseIndexedProcPtr		CloseIndexed;
+    UpdateIndexedProcPtr	UpdateIndexed;
+
+    int				subpixel;
+
+    PictFilterPtr		filters;
+    int				nfilters;
+    PictFilterAliasPtr		filterAliases;
+    int				nfilterAliases;
+
+    /**
+     * Called immediately after a picture's transform is changed through the
+     * SetPictureTransform request.  Not called for source-only pictures.
+     */
+    ChangePictureTransformProcPtr   ChangePictureTransform;
+
+    /**
+     * Called immediately after a picture's transform is changed through the
+     * SetPictureFilter request.  Not called for source-only pictures.
+     */
+    ChangePictureFilterProcPtr	ChangePictureFilter;
+
+    DestroyPictureFilterProcPtr	DestroyPictureFilter;
+
+    TrapezoidsProcPtr		Trapezoids;
+    TrianglesProcPtr		Triangles;
+    TriStripProcPtr		TriStrip;
+    TriFanProcPtr		TriFan;
+
+    RasterizeTrapezoidProcPtr	RasterizeTrapezoid;
+
+    AddTrianglesProcPtr		AddTriangles;
+
+    AddTrapsProcPtr		AddTraps;
+
+    RealizeGlyphProcPtr   	RealizeGlyph;
+    UnrealizeGlyphProcPtr 	UnrealizeGlyph;
+
+} PictureScreenRec, *PictureScreenPtr;
+
+extern DevPrivateKey	PictureScreenPrivateKey;
+extern DevPrivateKey	PictureWindowPrivateKey;
+extern RESTYPE		PictureType;
+extern RESTYPE		PictFormatType;
+extern RESTYPE		GlyphSetType;
+
+#define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey))
+#define GetPictureScreenIfSet(s) GetPictureScreen(s)
+#define SetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, PictureScreenPrivateKey, p)
+#define GetPictureWindow(w) ((PicturePtr)dixLookupPrivate(&(w)->devPrivates, PictureWindowPrivateKey))
+#define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p)
+
+#define GetGlyphPrivatesForScreen(glyph, s) \
+    ((PrivateRec **)dixLookupPrivateAddr(&(glyph)->devPrivates, s))
+
+#define VERIFY_PICTURE(pPicture, pid, client, mode, err) {\
+    pPicture = SecurityLookupIDByType(client, pid, PictureType, mode);\
+    if (!pPicture) { \
+	client->errorValue = pid; \
+	return err; \
+    } \
+}
+
+#define VERIFY_ALPHA(pPicture, pid, client, mode, err) {\
+    if (pid == None) \
+	pPicture = 0; \
+    else { \
+	VERIFY_PICTURE(pPicture, pid, client, mode, err); \
+    } \
+} \
+
+Bool
+PictureDestroyWindow (WindowPtr pWindow);
+
+Bool
+PictureCloseScreen (int Index, ScreenPtr pScreen);
+
+void
+PictureStoreColors (ColormapPtr pColormap, int ndef, xColorItem *pdef);
+
+Bool
+PictureInitIndexedFormat (ScreenPtr pScreen, PictFormatPtr format);
+
+Bool
+PictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel);
+
+int
+PictureGetSubpixelOrder (ScreenPtr pScreen);
+
+PictFormatPtr
+PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp);
+
+PictFormatPtr
+PictureMatchVisual (ScreenPtr pScreen, int depth, VisualPtr pVisual);
+
+PictFormatPtr
+PictureMatchFormat (ScreenPtr pScreen, int depth, CARD32 format);
+
+Bool
+PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
+
+int
+PictureGetFilterId (char *filter, int len, Bool makeit);
+
+char *
+PictureGetFilterName (int id);
+
+int
+PictureAddFilter (ScreenPtr			    pScreen,
+		  char				    *filter,
+		  PictFilterValidateParamsProcPtr   ValidateParams);
+
+Bool
+PictureSetFilterAlias (ScreenPtr pScreen, char *filter, char *alias);
+
+Bool
+PictureSetDefaultFilters (ScreenPtr pScreen);
+
+void
+PictureResetFilters (ScreenPtr pScreen);
+
+PictFilterPtr
+PictureFindFilter (ScreenPtr pScreen, char *name, int len);
+
+int
+SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int nparams);
+
+Bool
+PictureFinishInit (void);
+
+void
+SetPictureToDefaults (PicturePtr pPicture);
+
+PicturePtr
+CreatePicture (Picture		pid,
+	       DrawablePtr	pDrawable,
+	       PictFormatPtr	pFormat,
+	       Mask		mask,
+	       XID		*list,
+	       ClientPtr	client,
+	       int		*error);
+
+int
+ChangePicture (PicturePtr	pPicture,
+	       Mask		vmask,
+	       XID		*vlist,
+	       DevUnion		*ulist,
+	       ClientPtr	client);
+
+int
+SetPictureClipRects (PicturePtr	pPicture,
+		     int	xOrigin,
+		     int	yOrigin,
+		     int	nRect,
+		     xRectangle	*rects);
+
+int
+SetPictureClipRegion (PicturePtr    pPicture,
+		      int	    xOrigin,
+		      int	    yOrigin,
+		      RegionPtr	    pRegion);
+
+int
+SetPictureTransform (PicturePtr	    pPicture,
+		     PictTransform  *transform);
+
+void
+CopyPicture (PicturePtr	pSrc,
+	     Mask	mask,
+	     PicturePtr	pDst);
+
+void
+ValidatePicture(PicturePtr pPicture);
+
+int
+FreePicture (pointer	pPicture,
+	     XID	pid);
+
+int
+FreePictFormat (pointer	pPictFormat,
+		XID     pid);
+
+void
+CompositePicture (CARD8		op,
+		  PicturePtr	pSrc,
+		  PicturePtr	pMask,
+		  PicturePtr	pDst,
+		  INT16		xSrc,
+		  INT16		ySrc,
+		  INT16		xMask,
+		  INT16		yMask,
+		  INT16		xDst,
+		  INT16		yDst,
+		  CARD16	width,
+		  CARD16	height);
+
+void
+CompositeGlyphs (CARD8		op,
+		 PicturePtr	pSrc,
+		 PicturePtr	pDst,
+		 PictFormatPtr	maskFormat,
+		 INT16		xSrc,
+		 INT16		ySrc,
+		 int		nlist,
+		 GlyphListPtr	lists,
+		 GlyphPtr	*glyphs);
+
+void
+CompositeRects (CARD8		op,
+		PicturePtr	pDst,
+		xRenderColor	*color,
+		int		nRect,
+		xRectangle      *rects);
+
+void
+CompositeTrapezoids (CARD8	    op,
+		     PicturePtr	    pSrc,
+		     PicturePtr	    pDst,
+		     PictFormatPtr  maskFormat,
+		     INT16	    xSrc,
+		     INT16	    ySrc,
+		     int	    ntrap,
+		     xTrapezoid	    *traps);
+
+void
+CompositeTriangles (CARD8	    op,
+		    PicturePtr	    pSrc,
+		    PicturePtr	    pDst,
+		    PictFormatPtr   maskFormat,
+		    INT16	    xSrc,
+		    INT16	    ySrc,
+		    int		    ntriangles,
+		    xTriangle	    *triangles);
+
+void
+CompositeTriStrip (CARD8	    op,
+		   PicturePtr	    pSrc,
+		   PicturePtr	    pDst,
+		   PictFormatPtr    maskFormat,
+		   INT16	    xSrc,
+		   INT16	    ySrc,
+		   int		    npoints,
+		   xPointFixed	    *points);
+
+void
+CompositeTriFan (CARD8		op,
+		 PicturePtr	pSrc,
+		 PicturePtr	pDst,
+		 PictFormatPtr	maskFormat,
+		 INT16		xSrc,
+		 INT16		ySrc,
+		 int		npoints,
+		 xPointFixed	*points);
+
+Bool
+PictureTransformPoint (PictTransformPtr transform,
+		       PictVectorPtr	vector);
+
+Bool
+PictureTransformPoint3d (PictTransformPtr transform,
+                         PictVectorPtr	vector);
+
+CARD32
+PictureGradientColor (PictGradientStopPtr stop1,
+		      PictGradientStopPtr stop2,
+		      CARD32	          x);
+
+void RenderExtensionInit (void);
+
+Bool
+AnimCurInit (ScreenPtr pScreen);
+
+int
+AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor, ClientPtr client, XID cid);
+
+void
+AddTraps (PicturePtr	pPicture,
+	  INT16		xOff,
+	  INT16		yOff,
+	  int		ntraps,
+	  xTrap		*traps);
+
+pixman_image_t *
+PixmanImageFromPicture (PicturePtr pPict,
+			Bool hasClip);
+
+PicturePtr
+CreateSolidPicture (Picture pid,
+                    xRenderColor *color,
+                    int *error);
+
+PicturePtr
+CreateLinearGradientPicture (Picture pid,
+                             xPointFixed *p1,
+                             xPointFixed *p2,
+                             int nStops,
+                             xFixed *stops,
+                             xRenderColor *colors,
+                             int *error);
+
+PicturePtr
+CreateRadialGradientPicture (Picture pid,
+                             xPointFixed *inner,
+                             xPointFixed *outer,
+                             xFixed innerRadius,
+                             xFixed outerRadius,
+                             int nStops,
+                             xFixed *stops,
+                             xRenderColor *colors,
+                             int *error);
+
+PicturePtr
+CreateConicalGradientPicture (Picture pid,
+                              xPointFixed *center,
+                              xFixed angle,
+                              int nStops,
+                              xFixed *stops,
+                              xRenderColor *colors,
+                              int *error);
+
+#ifdef PANORAMIX
+void PanoramiXRenderInit (void);
+void PanoramiXRenderReset (void);
+#endif
+
+#endif /* _PICTURESTR_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/pixmap.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/pixmap.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/pixmap.h	(revision 9233)
@@ -0,0 +1,118 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef PIXMAP_H
+#define PIXMAP_H
+
+#include "misc.h"
+#include "screenint.h"
+
+/* types for Drawable */
+#define DRAWABLE_WINDOW 0
+#define DRAWABLE_PIXMAP 1
+#define UNDRAWABLE_WINDOW 2
+#define DRAWABLE_BUFFER 3
+
+/* corresponding type masks for dixLookupDrawable() */
+#define M_DRAWABLE_WINDOW	(1<<0)
+#define M_DRAWABLE_PIXMAP	(1<<1)
+#define M_UNDRAWABLE_WINDOW	(1<<2)
+#define M_DRAWABLE_BUFFER	(1<<3)
+#define M_ANY			(-1)
+#define M_WINDOW	(M_DRAWABLE_WINDOW|M_UNDRAWABLE_WINDOW)
+#define M_DRAWABLE	(M_DRAWABLE_WINDOW|M_DRAWABLE_PIXMAP|M_DRAWABLE_BUFFER)
+#define M_UNDRAWABLE	(M_UNDRAWABLE_WINDOW)
+
+/* flags to PaintWindow() */
+#define PW_BACKGROUND 0
+#define PW_BORDER 1
+
+#define NullPixmap ((PixmapPtr)0)
+
+typedef struct _Drawable *DrawablePtr;	
+typedef struct _Pixmap *PixmapPtr;
+
+typedef union _PixUnion {
+    PixmapPtr		pixmap;
+    unsigned long	pixel;
+} PixUnion;
+
+#define SamePixUnion(a,b,isPixel)\
+    ((isPixel) ? (a).pixel == (b).pixel : (a).pixmap == (b).pixmap)
+
+#define EqualPixUnion(as, a, bs, b)				\
+    ((as) == (bs) && (SamePixUnion (a, b, as)))
+
+#define OnScreenDrawable(type) \
+	((type == DRAWABLE_WINDOW) || (type == DRAWABLE_BUFFER))
+
+#define WindowDrawable(type) \
+	((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW))
+
+extern PixmapPtr GetScratchPixmapHeader(
+    ScreenPtr /*pScreen*/,
+    int /*width*/,
+    int /*height*/,
+    int /*depth*/,
+    int /*bitsPerPixel*/,
+    int /*devKind*/,
+    pointer /*pPixData*/);
+
+extern void FreeScratchPixmapHeader(
+    PixmapPtr /*pPixmap*/);
+
+extern Bool CreateScratchPixmapsForScreen(
+    int /*scrnum*/);
+
+extern void FreeScratchPixmapsForScreen(
+    int /*scrnum*/);
+
+extern PixmapPtr AllocatePixmap(
+    ScreenPtr /*pScreen*/,
+    int /*pixDataSize*/);
+
+#endif /* PIXMAP_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/pixmapstr.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/pixmapstr.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/pixmapstr.h	(revision 9233)
@@ -0,0 +1,86 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef PIXMAPSTRUCT_H
+#define PIXMAPSTRUCT_H
+#include "pixmap.h"
+#include "screenint.h"
+#include "regionstr.h"
+#include "privates.h"
+
+typedef struct _Drawable {
+    unsigned char	type;	/* DRAWABLE_<type> */
+    unsigned char	class;	/* specific to type */
+    unsigned char	depth;
+    unsigned char	bitsPerPixel;
+    XID			id;	/* resource id */
+    short		x;	/* window: screen absolute, pixmap: 0 */
+    short		y;	/* window: screen absolute, pixmap: 0 */
+    unsigned short	width;
+    unsigned short	height;
+    ScreenPtr		pScreen;
+    unsigned long	serialNumber;
+} DrawableRec;
+
+/*
+ * PIXMAP -- device dependent 
+ */
+
+typedef struct _Pixmap {
+    DrawableRec		drawable;
+    PrivateRec		*devPrivates;
+    int			refcnt;
+    int			devKind;
+    DevUnion		devPrivate;
+#ifdef COMPOSITE
+    short		screen_x;
+    short		screen_y;
+#endif
+    unsigned		usage_hint; /* see CREATE_PIXMAP_USAGE_* */
+} PixmapRec;
+
+#endif /* PIXMAPSTRUCT_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/privates.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/privates.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/privates.h	(revision 9233)
@@ -0,0 +1,157 @@
+/***********************************************************
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#ifndef PRIVATES_H
+#define PRIVATES_H 1
+
+#include "dix.h"
+#include "resource.h"
+
+/*****************************************************************
+ * STUFF FOR PRIVATES
+ *****************************************************************/
+
+typedef void *DevPrivateKey;
+
+typedef struct _Private {
+    DevPrivateKey	key;
+    pointer		value;
+    struct _Private	*next;
+} PrivateRec;
+
+/*
+ * Request pre-allocated private space for your driver/module.
+ * Calling this is not necessary if only a pointer by itself is needed.
+ */
+extern int
+dixRequestPrivate(const DevPrivateKey key, unsigned size);
+
+/*
+ * Allocates a new private and attaches it to an existing object.
+ */
+extern pointer *
+dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key);
+
+/*
+ * Look up a private pointer.
+ */
+static _X_INLINE pointer
+dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key)
+{
+    PrivateRec *rec = *privates;
+    pointer *ptr;
+
+    while (rec) {
+	if (rec->key == key)
+	    return rec->value;
+	rec = rec->next;
+    }
+
+    ptr = dixAllocatePrivate(privates, key);
+    return ptr ? *ptr : NULL;
+}
+
+/*
+ * Look up the address of a private pointer.
+ */
+static _X_INLINE pointer *
+dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key)
+{
+    PrivateRec *rec = *privates;
+
+    while (rec) {
+	if (rec->key == key)
+	    return &rec->value;
+	rec = rec->next;
+    }
+
+    return dixAllocatePrivate(privates, key);
+}
+
+/*
+ * Set a private pointer.
+ */
+static _X_INLINE int
+dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val)
+{
+    PrivateRec *rec;
+
+ top:
+    rec = *privates;
+    while (rec) {
+	if (rec->key == key) {
+	    rec->value = val;
+	    return TRUE;
+	}
+	rec = rec->next;
+    }
+
+    if (!dixAllocatePrivate(privates, key))
+	return FALSE;
+    goto top;
+}
+
+/*
+ * Register callbacks to be called on private allocation/freeing.
+ * The calldata argument to the callbacks is a PrivateCallbackPtr.
+ */
+typedef struct _PrivateCallback {
+    DevPrivateKey key;	/* private registration key */
+    pointer *value;	/* address of private pointer */
+} PrivateCallbackRec;
+
+extern int
+dixRegisterPrivateInitFunc(const DevPrivateKey key, 
+			   CallbackProcPtr callback, pointer userdata);
+
+extern int
+dixRegisterPrivateDeleteFunc(const DevPrivateKey key,
+			     CallbackProcPtr callback, pointer userdata);
+
+/*
+ * Frees private data.
+ */
+extern void
+dixFreePrivates(PrivateRec *privates);
+
+/*
+ * Resets the subsystem, called from the main loop.
+ */
+extern int
+dixResetPrivates(void);
+
+/*
+ * These next two functions are necessary because the position of
+ * the devPrivates field varies by structure and calling code might
+ * only know the resource type, not the structure definition.
+ */
+
+/*
+ * Looks up the offset where the devPrivates field is located.
+ * Returns -1 if no offset has been registered for the resource type.
+ */
+extern int
+dixLookupPrivateOffset(RESTYPE type);
+
+/*
+ * Specifies the offset where the devPrivates field is located.
+ * A negative value indicates no devPrivates field is available.
+ */
+extern int
+dixRegisterPrivateOffset(RESTYPE type, int offset);
+
+/*
+ * Convenience macro for adding an offset to an object pointer
+ * when making a call to one of the devPrivates functions
+ */
+#define DEVPRIV_AT(ptr, offset) ((PrivateRec **)((char *)ptr + offset))
+
+#endif /* PRIVATES_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/property.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/property.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/property.h	(revision 9233)
@@ -0,0 +1,91 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef PROPERTY_H
+#define PROPERTY_H 
+
+#include "window.h"
+
+typedef struct _Property *PropertyPtr;
+
+extern int dixLookupProperty(
+    PropertyPtr * /*result*/,
+    WindowPtr /*pWin*/,
+    Atom /*proprty*/,
+    ClientPtr /*pClient*/,
+    Mask /*access_mode*/);
+
+extern int dixChangeWindowProperty(
+    ClientPtr /*pClient*/,
+    WindowPtr /*pWin*/,
+    Atom /*property*/,
+    Atom /*type*/,
+    int /*format*/,
+    int /*mode*/,
+    unsigned long /*len*/,
+    pointer /*value*/,
+    Bool /*sendevent*/);
+
+extern int ChangeWindowProperty(
+    WindowPtr /*pWin*/,
+    Atom /*property*/,
+    Atom /*type*/,
+    int /*format*/,
+    int /*mode*/,
+    unsigned long /*len*/,
+    pointer /*value*/,
+    Bool /*sendevent*/);
+
+extern int DeleteProperty(
+    ClientPtr /*client*/,
+    WindowPtr /*pWin*/,
+    Atom /*propName*/);
+
+extern void DeleteAllWindowProperties(
+    WindowPtr /*pWin*/);
+
+#endif  /* PROPERTY_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/propertyst.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/propertyst.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/propertyst.h	(revision 9233)
@@ -0,0 +1,68 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef PROPERTYSTRUCT_H
+#define PROPERTYSTRUCT_H 
+#include "misc.h"
+#include "property.h"
+#include "privates.h"
+/* 
+ *   PROPERTY -- property element
+ */
+
+typedef struct _Property {
+        struct _Property       *next;
+	ATOM 		propertyName;
+	ATOM		type;       /* ignored by server */
+	short		format;     /* format of data for swapping - 8,16,32 */
+	long		size;       /* size of data in (format/8) bytes */
+	pointer         data;       /* private to client */
+	PrivateRec	*devPrivates;
+} PropertyRec;
+
+#endif /* PROPERTYSTRUCT_H */
+
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/randrstr.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/randrstr.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/randrstr.h	(revision 9233)
@@ -0,0 +1,852 @@
+/*
+ * Copyright © 2000 Compaq Computer Corporation
+ * Copyright © 2002 Hewlett-Packard Company
+ * Copyright © 2006 Intel Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no representations
+ * about the suitability of this software for any purpose.  It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * Author:  Jim Gettys, Hewlett-Packard Company, Inc.
+ *	    Keith Packard, Intel Corporation
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _RANDRSTR_H_
+#define _RANDRSTR_H_
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "os.h"
+#include "dixstruct.h"
+#include "resource.h"
+#include "scrnintstr.h"
+#include "windowstr.h"
+#include "pixmapstr.h"
+#include "extnsionst.h"
+#include "servermd.h"
+#include <X11/extensions/randr.h>
+#include <X11/extensions/randrproto.h>
+#ifdef RENDER
+#include <X11/extensions/render.h> 	/* we share subpixel order information */
+#include "picturestr.h"
+#endif
+#include <X11/Xfuncproto.h>
+
+/* required for ABI compatibility for now */
+#define RANDR_10_INTERFACE 1
+#define RANDR_12_INTERFACE 1
+
+typedef XID	RRMode;
+typedef XID	RROutput;
+typedef XID	RRCrtc;
+
+extern int	RREventBase, RRErrorBase;
+
+extern int (*ProcRandrVector[RRNumberRequests])(ClientPtr);
+extern int (*SProcRandrVector[RRNumberRequests])(ClientPtr);
+    
+/*
+ * Modeline for a monitor. Name follows directly after this struct
+ */
+
+#define RRModeName(pMode) ((char *) (pMode + 1))
+typedef struct _rrMode		RRModeRec, *RRModePtr;
+typedef struct _rrPropertyValue	RRPropertyValueRec, *RRPropertyValuePtr;
+typedef struct _rrProperty	RRPropertyRec, *RRPropertyPtr;
+typedef struct _rrCrtc		RRCrtcRec, *RRCrtcPtr;
+typedef struct _rrOutput	RROutputRec, *RROutputPtr;
+
+struct _rrMode {
+    int		    refcnt;
+    xRRModeInfo	    mode;
+    char	    *name;
+    ScreenPtr	    userScreen;
+};
+
+struct _rrPropertyValue {
+    Atom	    type;       /* ignored by server */
+    short	    format;     /* format of data for swapping - 8,16,32 */
+    long	    size;	/* size of data in (format/8) bytes */
+    pointer         data;	/* private to client */
+};
+
+struct _rrProperty {
+    RRPropertyPtr   next;
+    ATOM 	    propertyName;
+    Bool	    is_pending;
+    Bool	    range;
+    Bool	    immutable;
+    int		    num_valid;
+    INT32	    *valid_values;
+    RRPropertyValueRec	current, pending;
+};
+
+struct _rrCrtc {
+    RRCrtc	    id;
+    ScreenPtr	    pScreen;
+    RRModePtr	    mode;
+    int		    x, y;
+    Rotation	    rotation;
+    Rotation	    rotations;
+    Bool	    changed;
+    int		    numOutputs;
+    RROutputPtr	    *outputs;
+    int		    gammaSize;
+    CARD16	    *gammaRed;
+    CARD16	    *gammaBlue;
+    CARD16	    *gammaGreen;
+    void	    *devPrivate;
+};
+
+struct _rrOutput {
+    RROutput	    id;
+    ScreenPtr	    pScreen;
+    char	    *name;
+    int		    nameLength;
+    CARD8	    connection;
+    CARD8	    subpixelOrder;
+    int		    mmWidth;
+    int		    mmHeight;
+    RRCrtcPtr	    crtc;
+    int		    numCrtcs;
+    RRCrtcPtr	    *crtcs;
+    int		    numClones;
+    RROutputPtr	    *clones;
+    int		    numModes;
+    int		    numPreferred;
+    RRModePtr	    *modes;
+    int		    numUserModes;
+    RRModePtr	    *userModes;
+    Bool	    changed;
+    RRPropertyPtr   properties;
+    Bool	    pendingProperties;
+    void	    *devPrivate;
+};
+
+#if RANDR_12_INTERFACE
+typedef Bool (*RRScreenSetSizeProcPtr) (ScreenPtr	pScreen,
+					CARD16		width,
+					CARD16		height,
+					CARD32		mmWidth,
+					CARD32		mmHeight);
+					
+typedef Bool (*RRCrtcSetProcPtr) (ScreenPtr		pScreen,
+				  RRCrtcPtr		crtc,
+				  RRModePtr		mode,
+				  int			x,
+				  int			y,
+				  Rotation		rotation,
+				  int			numOutputs,
+				  RROutputPtr		*outputs);
+
+typedef Bool (*RRCrtcSetGammaProcPtr) (ScreenPtr	pScreen,
+				       RRCrtcPtr	crtc);
+
+typedef Bool (*RROutputSetPropertyProcPtr) (ScreenPtr		pScreen,
+					    RROutputPtr		output,
+					    Atom		property,
+					    RRPropertyValuePtr	value);
+
+typedef Bool (*RROutputValidateModeProcPtr) (ScreenPtr		pScreen,
+					     RROutputPtr	output,
+					     RRModePtr		mode);
+
+typedef void (*RRModeDestroyProcPtr) (ScreenPtr	    pScreen,
+				      RRModePtr	    mode);
+
+#endif
+
+typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation *rotations);
+typedef Bool (*RRCloseScreenProcPtr) ( int i, ScreenPtr pscreen);
+
+/* These are for 1.0 compatibility */
+ 
+typedef struct _rrRefresh {
+    CARD16	    rate;
+    RRModePtr	    mode;
+} RRScreenRate, *RRScreenRatePtr;
+
+typedef struct _rrScreenSize {
+    int		    id;
+    short	    width, height;
+    short	    mmWidth, mmHeight;
+    int		    nRates;
+    RRScreenRatePtr pRates;
+} RRScreenSize, *RRScreenSizePtr;
+
+#ifdef RANDR_10_INTERFACE
+
+typedef Bool (*RRSetConfigProcPtr) (ScreenPtr		pScreen,
+				    Rotation		rotation,
+				    int			rate,
+				    RRScreenSizePtr	pSize);
+
+#endif
+	
+
+typedef struct _rrScrPriv {
+    /*
+     * 'public' part of the structure; DDXen fill this in
+     * as they initialize
+     */
+#if RANDR_10_INTERFACE
+    RRSetConfigProcPtr	    rrSetConfig;
+#endif
+    RRGetInfoProcPtr	    rrGetInfo;
+#if RANDR_12_INTERFACE
+    RRScreenSetSizeProcPtr  rrScreenSetSize;
+    RRCrtcSetProcPtr	    rrCrtcSet;
+    RRCrtcSetGammaProcPtr   rrCrtcSetGamma;
+    RROutputSetPropertyProcPtr	rrOutputSetProperty;
+    RROutputValidateModeProcPtr	rrOutputValidateMode;
+    RRModeDestroyProcPtr	rrModeDestroy;
+#endif
+    
+    /*
+     * Private part of the structure; not considered part of the ABI
+     */
+    TimeStamp		    lastSetTime;	/* last changed by client */
+    TimeStamp		    lastConfigTime;	/* possible configs changed */
+    RRCloseScreenProcPtr    CloseScreen;
+
+    Bool		    changed;		/* some config changed */
+    Bool		    configChanged;	/* configuration changed */
+    Bool		    layoutChanged;	/* screen layout changed */
+
+    CARD16		    minWidth, minHeight;
+    CARD16		    maxWidth, maxHeight;
+    CARD16		    width, height;	/* last known screen size */
+    CARD16		    mmWidth, mmHeight;	/* last known screen size */
+
+    int			    numOutputs;
+    RROutputPtr		    *outputs;
+
+    int			    numCrtcs;
+    RRCrtcPtr		    *crtcs;
+
+    /* Last known pointer position */
+    RRCrtcPtr		    pointerCrtc;
+
+#ifdef RANDR_10_INTERFACE
+    /*
+     * Configuration information
+     */
+    Rotation		    rotations;
+    CARD16		    reqWidth, reqHeight;
+    
+    int			    nSizes;
+    RRScreenSizePtr	    pSizes;
+    
+    Rotation		    rotation;
+    int			    rate;
+    int			    size;
+#endif
+} rrScrPrivRec, *rrScrPrivPtr;
+
+extern DevPrivateKey rrPrivKey;
+
+#define rrGetScrPriv(pScr)  ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey))
+#define rrScrPriv(pScr)	rrScrPrivPtr    pScrPriv = rrGetScrPriv(pScr)
+#define SetRRScreen(s,p) dixSetPrivate(&(s)->devPrivates, rrPrivKey, p)
+
+/*
+ * each window has a list of clients requesting
+ * RRNotify events.  Each client has a resource
+ * for each window it selects RRNotify input for,
+ * this resource is used to delete the RRNotifyRec
+ * entry from the per-window queue.
+ */
+
+typedef struct _RREvent *RREventPtr;
+
+typedef struct _RREvent {
+    RREventPtr  next;
+    ClientPtr	client;
+    WindowPtr	window;
+    XID		clientResource;
+    int		mask;
+} RREventRec;
+
+typedef struct _RRTimes {
+    TimeStamp	setTime;
+    TimeStamp	configTime;
+} RRTimesRec, *RRTimesPtr;
+
+typedef struct _RRClient {
+    int		major_version;
+    int		minor_version;
+/*  RRTimesRec	times[0]; */
+} RRClientRec, *RRClientPtr;
+
+extern RESTYPE	RRClientType, RREventType; /* resource types for event masks */
+extern DevPrivateKey RRClientPrivateKey;
+extern RESTYPE	RRCrtcType, RRModeType, RROutputType;
+
+#define LookupOutput(client,id,a) ((RROutputPtr) \
+				   (SecurityLookupIDByType (client, id, \
+							    RROutputType, a)))
+#define LookupCrtc(client,id,a) ((RRCrtcPtr) \
+				 (SecurityLookupIDByType (client, id, \
+							  RRCrtcType, a)))
+#define LookupMode(client,id,a) ((RRModePtr) \
+				 (SecurityLookupIDByType (client, id, \
+							  RRModeType, a)))
+
+#define GetRRClient(pClient)    ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey))
+#define rrClientPriv(pClient)	RRClientPtr pRRClient = GetRRClient(pClient)
+
+/* Initialize the extension */
+void
+RRExtensionInit (void);
+
+#ifdef RANDR_12_INTERFACE
+/*
+ * Set the range of sizes for the screen
+ */
+void
+RRScreenSetSizeRange (ScreenPtr	pScreen,
+		      CARD16	minWidth,
+		      CARD16	minHeight,
+		      CARD16	maxWidth,
+		      CARD16	maxHeight);
+#endif
+
+/* rrscreen.c */
+/*
+ * Notify the extension that the screen size has been changed.
+ * The driver is responsible for calling this whenever it has changed
+ * the size of the screen
+ */
+void
+RRScreenSizeNotify (ScreenPtr	pScreen);
+
+/*
+ * Request that the screen be resized
+ */
+Bool
+RRScreenSizeSet (ScreenPtr  pScreen,
+		 CARD16	    width,
+		 CARD16	    height,
+		 CARD32	    mmWidth,
+		 CARD32	    mmHeight);
+
+/*
+ * Send ConfigureNotify event to root window when 'something' happens
+ */
+void
+RRSendConfigNotify (ScreenPtr pScreen);
+    
+/*
+ * screen dispatch
+ */
+int 
+ProcRRGetScreenSizeRange (ClientPtr client);
+
+int
+ProcRRSetScreenSize (ClientPtr client);
+
+int
+ProcRRGetScreenResources (ClientPtr client);
+
+int
+ProcRRSetScreenConfig (ClientPtr client);
+
+int
+ProcRRGetScreenInfo (ClientPtr client);
+
+/*
+ * Deliver a ScreenNotify event
+ */
+void
+RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
+    
+/* mirandr.c */
+Bool
+miRandRInit (ScreenPtr pScreen);
+
+Bool
+miRRGetInfo (ScreenPtr pScreen, Rotation *rotations);
+
+Bool
+miRRGetScreenInfo (ScreenPtr pScreen);
+
+Bool
+miRRCrtcSet (ScreenPtr	pScreen,
+	     RRCrtcPtr	crtc,
+	     RRModePtr	mode,
+	     int	x,
+	     int	y,
+	     Rotation	rotation,
+	     int	numOutput,
+	     RROutputPtr *outputs);
+
+Bool
+miRROutputSetProperty (ScreenPtr	    pScreen,
+		       RROutputPtr	    output,
+		       Atom		    property,
+		       RRPropertyValuePtr   value);
+
+Bool
+miRROutputValidateMode (ScreenPtr	    pScreen,
+			RROutputPtr	    output,
+			RRModePtr	    mode);
+
+void
+miRRModeDestroy (ScreenPtr  pScreen,
+		 RRModePtr  mode);
+
+/* randr.c */
+/*
+ * Send all pending events
+ */
+void
+RRTellChanged (ScreenPtr pScreen);
+
+/*
+ * Poll the driver for changed information
+ */
+Bool
+RRGetInfo (ScreenPtr pScreen);
+
+Bool RRInit (void);
+
+Bool RRScreenInit(ScreenPtr pScreen);
+
+RROutputPtr
+RRFirstOutput (ScreenPtr pScreen);
+
+Rotation
+RRGetRotation (ScreenPtr pScreen);
+
+CARD16
+RRVerticalRefresh (xRRModeInfo *mode);
+
+#ifdef RANDR_10_INTERFACE					
+/*
+ * This is the old interface, deprecated but left
+ * around for compatibility
+ */
+
+/*
+ * Then, register the specific size with the screen
+ */
+
+RRScreenSizePtr
+RRRegisterSize (ScreenPtr		pScreen,
+		short			width, 
+		short			height,
+		short			mmWidth,
+		short			mmHeight);
+
+Bool RRRegisterRate (ScreenPtr		pScreen,
+		     RRScreenSizePtr	pSize,
+		     int		rate);
+
+/*
+ * Finally, set the current configuration of the screen
+ */
+
+void
+RRSetCurrentConfig (ScreenPtr		pScreen,
+		    Rotation		rotation,
+		    int			rate,
+		    RRScreenSizePtr	pSize);
+
+Bool RRScreenInit (ScreenPtr pScreen);
+
+Rotation
+RRGetRotation (ScreenPtr pScreen);
+
+int
+RRSetScreenConfig (ScreenPtr		pScreen,
+		   Rotation		rotation,
+		   int			rate,
+		   RRScreenSizePtr	pSize);
+
+#endif					
+
+/* rrcrtc.c */
+
+/*
+ * Notify the CRTC of some change; layoutChanged indicates that
+ * some position or size element changed
+ */
+void
+RRCrtcChanged (RRCrtcPtr crtc, Bool layoutChanged);
+
+/*
+ * Create a CRTC
+ */
+RRCrtcPtr
+RRCrtcCreate (ScreenPtr pScreen, void	*devPrivate);
+
+/*
+ * Set the allowed rotations on a CRTC
+ */
+void
+RRCrtcSetRotations (RRCrtcPtr crtc, Rotation rotations);
+
+/*
+ * Notify the extension that the Crtc has been reconfigured,
+ * the driver calls this whenever it has updated the mode
+ */
+Bool
+RRCrtcNotify (RRCrtcPtr	    crtc,
+	      RRModePtr	    mode,
+	      int	    x,
+	      int	    y,
+	      Rotation	    rotation,
+	      int	    numOutputs,
+	      RROutputPtr   *outputs);
+
+void
+RRDeliverCrtcEvent (ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc);
+    
+/*
+ * Request that the Crtc be reconfigured
+ */
+Bool
+RRCrtcSet (RRCrtcPtr    crtc,
+	   RRModePtr	mode,
+	   int		x,
+	   int		y,
+	   Rotation	rotation,
+	   int		numOutput,
+	   RROutputPtr  *outputs);
+
+/*
+ * Request that the Crtc gamma be changed
+ */
+
+Bool
+RRCrtcGammaSet (RRCrtcPtr   crtc,
+		CARD16	    *red,
+		CARD16	    *green,
+		CARD16	    *blue);
+
+/*
+ * Notify the extension that the Crtc gamma has been changed
+ * The driver calls this whenever it has changed the gamma values
+ * in the RRCrtcRec
+ */
+
+Bool
+RRCrtcGammaNotify (RRCrtcPtr	crtc);
+
+/*
+ * Set the size of the gamma table at server startup time
+ */
+
+Bool
+RRCrtcGammaSetSize (RRCrtcPtr	crtc,
+		    int		size);
+
+/*
+ * Return the area of the frame buffer scanned out by the crtc,
+ * taking into account the current mode and rotation
+ */
+
+void
+RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
+
+/*
+ * Destroy a Crtc at shutdown
+ */
+void
+RRCrtcDestroy (RRCrtcPtr crtc);
+
+/*
+ * Initialize crtc type
+ */
+Bool
+RRCrtcInit (void);
+
+/*
+ * Crtc dispatch
+ */
+
+int
+ProcRRGetCrtcInfo (ClientPtr client);
+
+int
+ProcRRSetCrtcConfig (ClientPtr client);
+
+int
+ProcRRGetCrtcGammaSize (ClientPtr client);
+
+int
+ProcRRGetCrtcGamma (ClientPtr client);
+
+int
+ProcRRSetCrtcGamma (ClientPtr client);
+
+/* rrdispatch.c */
+Bool
+RRClientKnowsRates (ClientPtr	pClient);
+
+/* rrmode.c */
+/*
+ * Find, and if necessary, create a mode
+ */
+
+RRModePtr
+RRModeGet (xRRModeInfo	*modeInfo,
+	   const char	*name);
+
+void
+RRModePruneUnused (ScreenPtr pScreen);
+
+/*
+ * Destroy a mode.
+ */
+
+void
+RRModeDestroy (RRModePtr mode);
+
+/*
+ * Return a list of modes that are valid for some output in pScreen
+ */
+RRModePtr *
+RRModesForScreen (ScreenPtr pScreen, int *num_ret);
+    
+/*
+ * Initialize mode type
+ */
+Bool
+RRModeInit (void);
+    
+int
+ProcRRCreateMode (ClientPtr client);
+
+int
+ProcRRDestroyMode (ClientPtr client);
+
+int
+ProcRRAddOutputMode (ClientPtr client);
+
+int
+ProcRRDeleteOutputMode (ClientPtr client);
+
+/* rroutput.c */
+
+/*
+ * Notify the output of some change. configChanged indicates whether
+ * any external configuration (mode list, clones, connected status)
+ * has changed, or whether the change was strictly internal
+ * (which crtc is in use)
+ */
+void
+RROutputChanged (RROutputPtr output, Bool configChanged);
+
+/*
+ * Create an output
+ */
+
+RROutputPtr
+RROutputCreate (ScreenPtr   pScreen,
+		const char  *name,
+		int	    nameLength,
+		void	    *devPrivate);
+
+/*
+ * Notify extension that output parameters have been changed
+ */
+Bool
+RROutputSetClones (RROutputPtr  output,
+		   RROutputPtr  *clones,
+		   int		numClones);
+
+Bool
+RROutputSetModes (RROutputPtr	output,
+		  RRModePtr	*modes,
+		  int		numModes,
+		  int		numPreferred);
+
+int
+RROutputAddUserMode (RROutputPtr    output,
+		     RRModePtr	    mode);
+
+int
+RROutputDeleteUserMode (RROutputPtr output,
+			RRModePtr   mode);
+
+Bool
+RROutputSetCrtcs (RROutputPtr	output,
+		  RRCrtcPtr	*crtcs,
+		  int		numCrtcs);
+
+Bool
+RROutputSetConnection (RROutputPtr  output,
+		       CARD8	    connection);
+
+Bool
+RROutputSetSubpixelOrder (RROutputPtr output,
+			  int	      subpixelOrder);
+
+Bool
+RROutputSetPhysicalSize (RROutputPtr	output,
+			 int		mmWidth,
+			 int		mmHeight);
+
+void
+RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output);
+
+void
+RROutputDestroy (RROutputPtr	output);
+
+int
+ProcRRGetOutputInfo (ClientPtr client);
+
+/*
+ * Initialize output type
+ */
+Bool
+RROutputInit (void);
+    
+/* rrpointer.c */
+void
+RRPointerMoved (ScreenPtr pScreen, int x, int y);
+
+void
+RRPointerScreenConfigured (ScreenPtr pScreen);
+
+/* rrproperty.c */
+
+void
+RRDeleteAllOutputProperties (RROutputPtr output);
+
+RRPropertyValuePtr
+RRGetOutputProperty (RROutputPtr output, Atom property, Bool pending);
+
+RRPropertyPtr
+RRQueryOutputProperty (RROutputPtr output, Atom property);
+		       
+void
+RRDeleteOutputProperty (RROutputPtr output, Atom property);
+
+Bool
+RRPostPendingProperties (RROutputPtr output);
+    
+int
+RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
+			int format, int mode, unsigned long len,
+			pointer value, Bool sendevent, Bool pending);
+
+int
+RRConfigureOutputProperty (RROutputPtr output, Atom property,
+			   Bool pending, Bool range, Bool immutable,
+			   int num_values, INT32 *values);
+int
+ProcRRChangeOutputProperty (ClientPtr client);
+
+int
+ProcRRGetOutputProperty (ClientPtr client);
+
+int
+ProcRRListOutputProperties (ClientPtr client);
+
+int
+ProcRRQueryOutputProperty (ClientPtr client);
+
+int
+ProcRRConfigureOutputProperty (ClientPtr client);
+
+int
+ProcRRDeleteOutputProperty (ClientPtr client);
+
+/* rrxinerama.c */
+void
+RRXineramaExtensionInit(void);
+
+#endif /* _RANDRSTR_H_ */
+
+/*
+ 
+randr extension implementation structure
+
+Query state:
+    ProcRRGetScreenInfo/ProcRRGetScreenResources
+	RRGetInfo
+ 
+	    • Request configuration from driver, either 1.0 or 1.2 style
+	    • These functions only record state changes, all
+	      other actions are pended until RRTellChanged is called
+ 
+	    ->rrGetInfo
+	    1.0:
+		RRRegisterSize
+		RRRegisterRate
+		RRSetCurrentConfig
+	    1.2:
+		RRScreenSetSizeRange
+		RROutputSetCrtcs
+		RRModeGet
+		RROutputSetModes
+		RROutputSetConnection
+		RROutputSetSubpixelOrder
+		RROutputSetClones
+		RRCrtcNotify
+ 
+	• Must delay scanning configuration until after ->rrGetInfo returns
+	  because some drivers will call SetCurrentConfig in the middle
+	  of the ->rrGetInfo operation.
+ 
+	1.0:
+
+	    • Scan old configuration, mirror to new structures
+ 
+	    RRScanOldConfig
+		RRCrtcCreate
+		RROutputCreate
+		RROutputSetCrtcs
+		RROutputSetConnection
+		RROutputSetSubpixelOrder
+		RROldModeAdd	• This adds modes one-at-a-time
+		    RRModeGet
+		RRCrtcNotify
+ 
+	• send events, reset pointer if necessary
+ 
+	RRTellChanged
+	    WalkTree (sending events)
+ 
+	    • when layout has changed:
+		RRPointerScreenConfigured
+		RRSendConfigNotify
+ 
+Asynchronous state setting (1.2 only)
+    When setting state asynchronously, the driver invokes the
+    ->rrGetInfo function and then calls RRTellChanged to flush
+    the changes to the clients and reset pointer if necessary
+
+Set state
+
+    ProcRRSetScreenConfig
+	RRCrtcSet
+	    1.2:
+		->rrCrtcSet
+		    RRCrtcNotify
+	    1.0:
+		->rrSetConfig
+		RRCrtcNotify
+	    RRTellChanged
+ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/region.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/region.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/region.h	(revision 9233)
@@ -0,0 +1,53 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef REGION_H
+#define REGION_H
+
+#include "regionstr.h"
+
+#endif /* REGION_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/regionstr.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/regionstr.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/regionstr.h	(revision 9233)
@@ -0,0 +1,320 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef REGIONSTRUCT_H
+#define REGIONSTRUCT_H
+
+typedef struct pixman_region16 RegionRec, *RegionPtr;
+
+#include "miscstruct.h"
+
+/* Return values from RectIn() */
+
+#define rgnOUT 0
+#define rgnIN  1
+#define rgnPART 2
+
+#define NullRegion ((RegionPtr)0)
+
+/*
+ *   clip region
+ */
+
+typedef struct pixman_region16_data RegDataRec, *RegDataPtr;
+
+extern BoxRec miEmptyBox;
+extern RegDataRec miEmptyData;
+extern RegDataRec miBrokenData;
+
+#define REGION_NIL(reg) ((reg)->data && !(reg)->data->numRects)
+/* not a region */
+#define REGION_NAR(reg)	((reg)->data == &miBrokenData)
+#define REGION_NUM_RECTS(reg) ((reg)->data ? (reg)->data->numRects : 1)
+#define REGION_SIZE(reg) ((reg)->data ? (reg)->data->size : 0)
+#define REGION_RECTS(reg) ((reg)->data ? (BoxPtr)((reg)->data + 1) \
+			               : &(reg)->extents)
+#define REGION_BOXPTR(reg) ((BoxPtr)((reg)->data + 1))
+#define REGION_BOX(reg,i) (&REGION_BOXPTR(reg)[i])
+#define REGION_TOP(reg) REGION_BOX(reg, (reg)->data->numRects)
+#define REGION_END(reg) REGION_BOX(reg, (reg)->data->numRects - 1)
+#define REGION_SZOF(n) (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)))
+
+#define REGION_CREATE(_pScreen, _rect, _size) \
+    miRegionCreate(_rect, _size)
+
+#define REGION_COPY(_pScreen, dst, src) \
+    miRegionCopy(dst, src)
+
+#define REGION_DESTROY(_pScreen, _pReg) \
+    miRegionDestroy(_pReg)
+
+#define REGION_INTERSECT(_pScreen, newReg, reg1, reg2) \
+    miIntersect(newReg, reg1, reg2)
+
+#define REGION_UNION(_pScreen, newReg, reg1, reg2) \
+    miUnion(newReg, reg1, reg2)
+
+#define REGION_SUBTRACT(_pScreen, newReg, reg1, reg2) \
+    miSubtract(newReg, reg1, reg2)
+
+#define REGION_INVERSE(_pScreen, newReg, reg1, invRect) \
+    miInverse(newReg, reg1, invRect)
+
+#define REGION_TRANSLATE(_pScreen, _pReg, _x, _y) \
+    miTranslateRegion(_pReg, _x, _y)
+
+#define RECT_IN_REGION(_pScreen, _pReg, prect) \
+    miRectIn(_pReg, prect)
+
+#define POINT_IN_REGION(_pScreen, _pReg, _x, _y, prect) \
+    miPointInRegion(_pReg, _x, _y, prect)
+
+#define REGION_APPEND(_pScreen, dstrgn, rgn) \
+    miRegionAppend(dstrgn, rgn)
+
+#define REGION_VALIDATE(_pScreen, badreg, pOverlap) \
+    miRegionValidate(badreg, pOverlap)
+
+#define BITMAP_TO_REGION(_pScreen, pPix) \
+    (*(_pScreen)->BitmapToRegion)(pPix) /* no mi version?! */
+
+#define RECTS_TO_REGION(_pScreen, nrects, prect, ctype) \
+    miRectsToRegion(nrects, prect, ctype)
+
+#define REGION_EQUAL(_pScreen, _pReg1, _pReg2) \
+    miRegionEqual(_pReg1, _pReg2)
+
+#define REGION_BREAK(_pScreen, _pReg) \
+    miRegionBreak(_pReg)
+
+#ifdef DONT_INLINE_REGION_OPS
+
+#define REGION_INIT(_pScreen, _pReg, _rect, _size) \
+    miRegionInit(_pReg, _rect, _size)
+
+#define REGION_UNINIT(_pScreen, _pReg) \
+    miRegionUninit(_pReg)
+
+#define REGION_RESET(_pScreen, _pReg, _pBox) \
+    miRegionReset(_pReg, _pBox)
+
+#define REGION_NOTEMPTY(_pScreen, _pReg) \
+    miRegionNotEmpty(_pReg)
+
+#define REGION_BROKEN(_pScreen, _pReg) \
+    miRegionBroken(_pReg)
+
+#define REGION_EMPTY(_pScreen, _pReg) \
+    miRegionEmpty(_pReg)
+
+#define REGION_EXTENTS(_pScreen, _pReg) \
+    miRegionExtents(_pReg)
+
+#else /* inline certain simple region ops for performance */
+
+#define REGION_INIT(_pScreen, _pReg, _rect, _size) \
+{ \
+    if (_rect) \
+    { \
+        (_pReg)->extents = *(_rect); \
+        (_pReg)->data = (RegDataPtr)NULL; \
+    } \
+    else \
+    { \
+        (_pReg)->extents = miEmptyBox; \
+        if (((_size) > 1) && ((_pReg)->data = \
+                             (RegDataPtr)xalloc(REGION_SZOF(_size)))) \
+        { \
+            (_pReg)->data->size = (_size); \
+            (_pReg)->data->numRects = 0; \
+        } \
+        else \
+            (_pReg)->data = &miEmptyData; \
+    } \
+ }
+
+
+#define REGION_UNINIT(_pScreen, _pReg) \
+{ \
+    if ((_pReg)->data && (_pReg)->data->size) { \
+	xfree((_pReg)->data); \
+	(_pReg)->data = NULL; \
+    } \
+}
+
+#define REGION_RESET(_pScreen, _pReg, _pBox) \
+{ \
+    (_pReg)->extents = *(_pBox); \
+    REGION_UNINIT(_pScreen, _pReg); \
+    (_pReg)->data = (RegDataPtr)NULL; \
+}
+
+#define REGION_NOTEMPTY(_pScreen, _pReg) \
+    !REGION_NIL(_pReg)
+
+#define REGION_BROKEN(_pScreen, _pReg) \
+    REGION_NAR(_pReg)
+
+#define REGION_EMPTY(_pScreen, _pReg) \
+{ \
+    REGION_UNINIT(_pScreen, _pReg); \
+    (_pReg)->extents.x2 = (_pReg)->extents.x1; \
+    (_pReg)->extents.y2 = (_pReg)->extents.y1; \
+    (_pReg)->data = &miEmptyData; \
+}
+
+#define REGION_EXTENTS(_pScreen, _pReg) \
+    (&(_pReg)->extents)
+
+#define REGION_NULL(_pScreen, _pReg) \
+{ \
+    (_pReg)->extents = miEmptyBox; \
+    (_pReg)->data = &miEmptyData; \
+}
+
+#endif /* DONT_INLINE_REGION_OPS */
+
+#ifndef REGION_NULL
+#define REGION_NULL(_pScreen, _pReg) \
+    REGION_INIT(_pScreen, _pReg, NullBox, 1)
+#endif
+
+/* moved from mi.h */
+
+extern void InitRegions (void);
+
+extern RegionPtr miRegionCreate(
+    BoxPtr /*rect*/,
+    int /*size*/);
+
+extern void miRegionInit(
+    RegionPtr /*pReg*/,
+    BoxPtr /*rect*/,
+    int /*size*/);
+
+extern void miRegionDestroy(
+    RegionPtr /*pReg*/);
+
+extern void miRegionUninit(
+    RegionPtr /*pReg*/);
+
+extern Bool miRegionCopy(
+    RegionPtr /*dst*/,
+    RegionPtr /*src*/);
+
+extern Bool miIntersect(
+    RegionPtr /*newReg*/,
+    RegionPtr /*reg1*/,
+    RegionPtr /*reg2*/);
+
+extern Bool miUnion(
+    RegionPtr /*newReg*/,
+    RegionPtr /*reg1*/,
+    RegionPtr /*reg2*/);
+
+extern Bool miRegionAppend(
+    RegionPtr /*dstrgn*/,
+    RegionPtr /*rgn*/);
+
+extern Bool miRegionValidate(
+    RegionPtr /*badreg*/,
+    Bool * /*pOverlap*/);
+
+extern RegionPtr miRectsToRegion(
+    int /*nrects*/,
+    xRectanglePtr /*prect*/,
+    int /*ctype*/);
+
+extern Bool miSubtract(
+    RegionPtr /*regD*/,
+    RegionPtr /*regM*/,
+    RegionPtr /*regS*/);
+
+extern Bool miInverse(
+    RegionPtr /*newReg*/,
+    RegionPtr /*reg1*/,
+    BoxPtr /*invRect*/);
+
+extern int miRectIn(
+    RegionPtr /*region*/,
+    BoxPtr /*prect*/);
+
+extern void miTranslateRegion(
+    RegionPtr /*pReg*/,
+    int /*x*/,
+    int /*y*/);
+
+extern void miRegionReset(
+    RegionPtr /*pReg*/,
+    BoxPtr /*pBox*/);
+
+extern Bool miRegionBreak(
+    RegionPtr /*pReg*/);
+
+extern Bool miPointInRegion(
+    RegionPtr /*pReg*/,
+    int /*x*/,
+    int /*y*/,
+    BoxPtr /*box*/);
+
+extern Bool miRegionEqual(
+    RegionPtr /*pReg1*/,
+    RegionPtr /*pReg2*/);
+
+extern Bool miRegionNotEmpty(
+    RegionPtr /*pReg*/);
+
+extern void miRegionEmpty(
+    RegionPtr /*pReg*/);
+
+extern BoxPtr miRegionExtents(
+    RegionPtr /*pReg*/);
+
+extern void miPrintRegion(
+    RegionPtr /*pReg*/);
+
+#endif /* REGIONSTRUCT_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/resource.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/resource.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/resource.h	(revision 9233)
@@ -0,0 +1,272 @@
+/***********************************************************
+
+Copyright 1987, 1989, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef RESOURCE_H
+#define RESOURCE_H 1
+#include "misc.h"
+#include "dixaccess.h"
+
+/*****************************************************************
+ * STUFF FOR RESOURCES 
+ *****************************************************************/
+
+/* classes for Resource routines */
+
+typedef unsigned long RESTYPE;
+
+#define RC_VANILLA	((RESTYPE)0)
+#define RC_CACHED	((RESTYPE)1<<31)
+#define RC_DRAWABLE	((RESTYPE)1<<30)
+/*  Use class RC_NEVERRETAIN for resources that should not be retained
+ *  regardless of the close down mode when the client dies.  (A client's
+ *  event selections on objects that it doesn't own are good candidates.)
+ *  Extensions can use this too!
+ */
+#define RC_NEVERRETAIN	((RESTYPE)1<<29)
+#define RC_LASTPREDEF	RC_NEVERRETAIN
+#define RC_ANY		(~(RESTYPE)0)
+
+/* types for Resource routines */
+
+#define RT_WINDOW	((RESTYPE)1|RC_DRAWABLE)
+#define RT_PIXMAP	((RESTYPE)2|RC_DRAWABLE)
+#define RT_GC		((RESTYPE)3)
+#undef RT_FONT
+#undef RT_CURSOR
+#define RT_FONT		((RESTYPE)4)
+#define RT_CURSOR	((RESTYPE)5)
+#define RT_COLORMAP	((RESTYPE)6)
+#define RT_CMAPENTRY	((RESTYPE)7)
+#define RT_OTHERCLIENT	((RESTYPE)8|RC_NEVERRETAIN)
+#define RT_PASSIVEGRAB	((RESTYPE)9|RC_NEVERRETAIN)
+#define RT_LASTPREDEF	((RESTYPE)9)
+#define RT_NONE		((RESTYPE)0)
+
+/* bits and fields within a resource id */
+#define RESOURCE_AND_CLIENT_COUNT   29			/* 29 bits for XIDs */
+#if MAXCLIENTS == 64
+#define RESOURCE_CLIENT_BITS	6
+#endif
+#if MAXCLIENTS == 128
+#define RESOURCE_CLIENT_BITS	7
+#endif
+#if MAXCLIENTS == 256
+#define RESOURCE_CLIENT_BITS	8
+#endif
+#if MAXCLIENTS == 512
+#define RESOURCE_CLIENT_BITS	9
+#endif
+/* client field offset */
+#define CLIENTOFFSET	    (RESOURCE_AND_CLIENT_COUNT - RESOURCE_CLIENT_BITS)
+/* resource field */
+#define RESOURCE_ID_MASK	((1 << CLIENTOFFSET) - 1)
+/* client field */
+#define RESOURCE_CLIENT_MASK	(((1 << RESOURCE_CLIENT_BITS) - 1) << CLIENTOFFSET)
+/* extract the client mask from an XID */
+#define CLIENT_BITS(id) ((id) & RESOURCE_CLIENT_MASK)
+/* extract the client id from an XID */
+#define CLIENT_ID(id) ((int)(CLIENT_BITS(id) >> CLIENTOFFSET))
+#define SERVER_BIT		(Mask)0x40000000	/* use illegal bit */
+
+#ifdef INVALID
+#undef INVALID	/* needed on HP/UX */
+#endif
+
+/* Invalid resource id */
+#define INVALID	(0)
+
+#define BAD_RESOURCE 0xe0000000
+
+/* Resource state callback */
+extern CallbackListPtr ResourceStateCallback;
+
+typedef enum {ResourceStateAdding,
+	      ResourceStateFreeing} ResourceState;
+
+typedef struct {
+    ResourceState state;
+    XID id;
+    RESTYPE type;
+    pointer value;
+} ResourceStateInfoRec;
+
+typedef int (*DeleteType)(
+    pointer /*value*/,
+    XID /*id*/);
+
+typedef void (*FindResType)(
+    pointer /*value*/,
+    XID /*id*/,
+    pointer /*cdata*/);
+
+typedef void (*FindAllRes)(
+    pointer /*value*/,
+    XID /*id*/,
+    RESTYPE /*type*/,
+    pointer /*cdata*/);
+
+typedef Bool (*FindComplexResType)(
+    pointer /*value*/,
+    XID /*id*/,
+    pointer /*cdata*/);
+
+extern RESTYPE CreateNewResourceType(
+    DeleteType /*deleteFunc*/);
+
+extern RESTYPE CreateNewResourceClass(void);
+
+extern Bool InitClientResources(
+    ClientPtr /*client*/);
+
+extern XID FakeClientID(
+    int /*client*/);
+
+/* Quartz support on Mac OS X uses the CarbonCore
+   framework whose AddResource function conflicts here. */
+#ifdef __APPLE__
+#define AddResource Darwin_X_AddResource
+#endif
+extern Bool AddResource(
+    XID /*id*/,
+    RESTYPE /*type*/,
+    pointer /*value*/);
+
+extern void FreeResource(
+    XID /*id*/,
+    RESTYPE /*skipDeleteFuncType*/);
+
+extern void FreeResourceByType(
+    XID /*id*/,
+    RESTYPE /*type*/,
+    Bool /*skipFree*/);
+
+extern Bool ChangeResourceValue(
+    XID /*id*/,
+    RESTYPE /*rtype*/,
+    pointer /*value*/);
+
+extern void FindClientResourcesByType(
+    ClientPtr /*client*/,
+    RESTYPE /*type*/,
+    FindResType /*func*/,
+    pointer /*cdata*/);
+
+extern void FindAllClientResources(
+    ClientPtr /*client*/,
+    FindAllRes /*func*/,
+    pointer /*cdata*/);
+
+extern void FreeClientNeverRetainResources(
+    ClientPtr /*client*/);
+
+extern void FreeClientResources(
+    ClientPtr /*client*/);
+
+extern void FreeAllResources(void);
+
+extern Bool LegalNewID(
+    XID /*id*/,
+    ClientPtr /*client*/);
+
+extern pointer LookupClientResourceComplex(
+    ClientPtr client,
+    RESTYPE type,
+    FindComplexResType func,
+    pointer cdata);
+
+extern int dixLookupResource(
+    pointer *result,
+    XID id,
+    RESTYPE rtype,
+    ClientPtr client,
+    Mask access_mode);
+
+extern void GetXIDRange(
+    int /*client*/,
+    Bool /*server*/,
+    XID * /*minp*/,
+    XID * /*maxp*/);
+
+extern unsigned int GetXIDList(
+    ClientPtr /*client*/,
+    unsigned int /*count*/,
+    XID * /*pids*/);
+
+extern RESTYPE lastResourceType;
+extern RESTYPE TypeMask;
+
+/*
+ * These are deprecated compatibility functions and will be removed soon!
+ * Please use the noted replacements instead.
+ */
+
+/* replaced by dixLookupResource */
+extern pointer SecurityLookupIDByType(
+    ClientPtr client,
+    XID id,
+    RESTYPE rtype,
+    Mask access_mode);
+
+/* replaced by dixLookupResource */
+extern pointer SecurityLookupIDByClass(
+    ClientPtr client,
+    XID id,
+    RESTYPE classes,
+    Mask access_mode);
+
+/* replaced by dixLookupResource */
+extern pointer LookupIDByType(
+    XID id,
+    RESTYPE rtype);
+
+/* replaced by dixLookupResource */
+extern pointer LookupIDByClass(
+    XID id,
+    RESTYPE classes);
+
+#endif /* RESOURCE_H */
+
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/screenint.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/screenint.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/screenint.h	(revision 9233)
@@ -0,0 +1,69 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef SCREENINT_H
+#define SCREENINT_H
+
+#include "misc.h"
+
+typedef struct _PixmapFormat *PixmapFormatPtr;
+typedef struct _Visual *VisualPtr;
+typedef struct _Depth  *DepthPtr;
+typedef struct _Screen *ScreenPtr;
+
+extern int AddScreen(
+    Bool (* /*pfnInit*/)(
+	int /*index*/,
+	ScreenPtr /*pScreen*/,
+	int /*argc*/,
+	char ** /*argv*/),
+    int /*argc*/,
+    char** /*argv*/);
+
+typedef struct _ColormapRec *ColormapPtr;
+
+#endif /* SCREENINT_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/scrnintstr.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/scrnintstr.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/scrnintstr.h	(revision 9233)
@@ -0,0 +1,606 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef SCREENINTSTRUCT_H
+#define SCREENINTSTRUCT_H
+
+#include "screenint.h"
+#include "regionstr.h"
+#include "bstore.h"
+#include "colormap.h"
+#include "cursor.h"
+#include "validate.h"
+#include <X11/Xproto.h>
+#include "dix.h"
+#include "privates.h"
+
+typedef struct _PixmapFormat {
+    unsigned char	depth;
+    unsigned char	bitsPerPixel;
+    unsigned char	scanlinePad;
+    } PixmapFormatRec;
+    
+typedef struct _Visual {
+    VisualID		vid;
+    short		class;
+    short		bitsPerRGBValue;
+    short		ColormapEntries;
+    short		nplanes;/* = log2 (ColormapEntries). This does not
+				 * imply that the screen has this many planes.
+				 * it may have more or fewer */
+    unsigned long	redMask, greenMask, blueMask;
+    int			offsetRed, offsetGreen, offsetBlue;
+  } VisualRec;
+
+typedef struct _Depth {
+    unsigned char	depth;
+    short		numVids;
+    VisualID		*vids;    /* block of visual ids for this depth */
+  } DepthRec;
+
+
+/*
+ *  There is a typedef for each screen function pointer so that code that
+ *  needs to declare a screen function pointer (e.g. in a screen private
+ *  or as a local variable) can easily do so and retain full type checking.
+ */
+
+typedef    Bool (* CloseScreenProcPtr)(
+	int /*index*/,
+	ScreenPtr /*pScreen*/);
+
+typedef    void (* QueryBestSizeProcPtr)(
+	int /*class*/,
+	unsigned short * /*pwidth*/,
+	unsigned short * /*pheight*/,
+	ScreenPtr /*pScreen*/);
+
+typedef    Bool (* SaveScreenProcPtr)(
+	 ScreenPtr /*pScreen*/,
+	 int /*on*/);
+
+typedef    void (* GetImageProcPtr)(
+	DrawablePtr /*pDrawable*/,
+	int /*sx*/,
+	int /*sy*/,
+	int /*w*/,
+	int /*h*/,
+	unsigned int /*format*/,
+	unsigned long /*planeMask*/,
+	char * /*pdstLine*/);
+
+typedef    void (* GetSpansProcPtr)(
+	DrawablePtr /*pDrawable*/,
+	int /*wMax*/,
+	DDXPointPtr /*ppt*/,
+	int* /*pwidth*/,
+	int /*nspans*/,
+	char * /*pdstStart*/);
+
+typedef    void (* PointerNonInterestBoxProcPtr)(
+	ScreenPtr /*pScreen*/,
+	BoxPtr /*pBox*/);
+
+typedef    void (* SourceValidateProcPtr)(
+	DrawablePtr /*pDrawable*/,
+	int /*x*/,
+	int /*y*/,
+	int /*width*/,
+	int /*height*/);
+
+typedef    Bool (* CreateWindowProcPtr)(
+	WindowPtr /*pWindow*/);
+
+typedef    Bool (* DestroyWindowProcPtr)(
+	WindowPtr /*pWindow*/);
+
+typedef    Bool (* PositionWindowProcPtr)(
+	WindowPtr /*pWindow*/,
+	int /*x*/,
+	int /*y*/);
+
+typedef    Bool (* ChangeWindowAttributesProcPtr)(
+	WindowPtr /*pWindow*/,
+	unsigned long /*mask*/);
+
+typedef    Bool (* RealizeWindowProcPtr)(
+	WindowPtr /*pWindow*/);
+
+typedef    Bool (* UnrealizeWindowProcPtr)(
+	WindowPtr /*pWindow*/);
+
+typedef    void (* RestackWindowProcPtr)(
+	WindowPtr /*pWindow*/,
+	WindowPtr /*pOldNextSib*/);
+
+typedef    int  (* ValidateTreeProcPtr)(
+	WindowPtr /*pParent*/,
+	WindowPtr /*pChild*/,
+	VTKind /*kind*/);
+
+typedef    void (* PostValidateTreeProcPtr)(
+	WindowPtr /*pParent*/,
+	WindowPtr /*pChild*/,
+	VTKind /*kind*/);
+
+typedef    void (* WindowExposuresProcPtr)(
+	WindowPtr /*pWindow*/,
+	RegionPtr /*prgn*/,
+	RegionPtr /*other_exposed*/);
+
+typedef    void (* PaintWindowProcPtr)(
+	WindowPtr /*pWindow*/,
+	RegionPtr /*pRegion*/,
+	int /*what*/);
+
+typedef PaintWindowProcPtr PaintWindowBackgroundProcPtr;
+typedef PaintWindowProcPtr PaintWindowBorderProcPtr;
+
+typedef    void (* CopyWindowProcPtr)(
+	WindowPtr /*pWindow*/,
+	DDXPointRec /*ptOldOrg*/,
+	RegionPtr /*prgnSrc*/);
+
+typedef    void (* ClearToBackgroundProcPtr)(
+	WindowPtr /*pWindow*/,
+	int /*x*/,
+	int /*y*/,
+	int /*w*/,
+	int /*h*/,
+	Bool /*generateExposures*/);
+
+typedef    void (* ClipNotifyProcPtr)(
+	WindowPtr /*pWindow*/,
+	int /*dx*/,
+	int /*dy*/);
+
+/* pixmap will exist only for the duration of the current rendering operation */
+#define CREATE_PIXMAP_USAGE_SCRATCH                     1
+/* pixmap will be the backing pixmap for a redirected window */
+#define CREATE_PIXMAP_USAGE_BACKING_PIXMAP              2
+/* pixmap will contain a glyph */
+#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE               3
+
+typedef    PixmapPtr (* CreatePixmapProcPtr)(
+	ScreenPtr /*pScreen*/,
+	int /*width*/,
+	int /*height*/,
+	int /*depth*/,
+	unsigned /*usage_hint*/);
+
+typedef    Bool (* DestroyPixmapProcPtr)(
+	PixmapPtr /*pPixmap*/);
+
+typedef    void (* SaveDoomedAreasProcPtr)(
+	WindowPtr /*pWindow*/,
+	RegionPtr /*prgnSave*/,
+	int /*xorg*/,
+	int /*yorg*/);
+
+typedef    RegionPtr (* RestoreAreasProcPtr)(
+	WindowPtr /*pWindow*/,
+	RegionPtr /*prgnRestore*/);
+
+typedef    void (* ExposeCopyProcPtr)(
+	WindowPtr /*pSrc*/,
+	DrawablePtr /*pDst*/,
+	GCPtr /*pGC*/,
+	RegionPtr /*prgnExposed*/,
+	int /*srcx*/,
+	int /*srcy*/,
+	int /*dstx*/,
+	int /*dsty*/,
+	unsigned long /*plane*/);
+
+typedef    RegionPtr (* TranslateBackingStoreProcPtr)(
+	WindowPtr /*pWindow*/,
+	int /*windx*/,
+	int /*windy*/,
+	RegionPtr /*oldClip*/,
+	int /*oldx*/,
+	int /*oldy*/);
+
+typedef    RegionPtr (* ClearBackingStoreProcPtr)(
+	WindowPtr /*pWindow*/,
+	int /*x*/,
+	int /*y*/,
+	int /*w*/,
+	int /*h*/,
+	Bool /*generateExposures*/);
+
+typedef    void (* DrawGuaranteeProcPtr)(
+	WindowPtr /*pWindow*/,
+	GCPtr /*pGC*/,
+	int /*guarantee*/);
+    
+typedef    Bool (* RealizeFontProcPtr)(
+	ScreenPtr /*pScreen*/,
+	FontPtr /*pFont*/);
+
+typedef    Bool (* UnrealizeFontProcPtr)(
+	ScreenPtr /*pScreen*/,
+	FontPtr /*pFont*/);
+
+typedef    void (* ConstrainCursorProcPtr)(
+	ScreenPtr /*pScreen*/,
+	BoxPtr /*pBox*/);
+
+typedef    void (* CursorLimitsProcPtr)(
+	ScreenPtr /*pScreen*/,
+	CursorPtr /*pCursor*/,
+	BoxPtr /*pHotBox*/,
+	BoxPtr /*pTopLeftBox*/);
+
+typedef    Bool (* DisplayCursorProcPtr)(
+	ScreenPtr /*pScreen*/,
+	CursorPtr /*pCursor*/);
+
+typedef    Bool (* RealizeCursorProcPtr)(
+	ScreenPtr /*pScreen*/,
+	CursorPtr /*pCursor*/);
+
+typedef    Bool (* UnrealizeCursorProcPtr)(
+	ScreenPtr /*pScreen*/,
+	CursorPtr /*pCursor*/);
+
+typedef    void (* RecolorCursorProcPtr)(
+	ScreenPtr /*pScreen*/,
+	CursorPtr /*pCursor*/,
+	Bool /*displayed*/);
+
+typedef    Bool (* SetCursorPositionProcPtr)(
+	ScreenPtr /*pScreen*/,
+	int /*x*/,
+	int /*y*/,
+	Bool /*generateEvent*/);
+
+typedef    Bool (* CreateGCProcPtr)(
+	GCPtr /*pGC*/);
+
+typedef    Bool (* CreateColormapProcPtr)(
+	ColormapPtr /*pColormap*/);
+
+typedef    void (* DestroyColormapProcPtr)(
+	ColormapPtr /*pColormap*/);
+
+typedef    void (* InstallColormapProcPtr)(
+	ColormapPtr /*pColormap*/);
+
+typedef    void (* UninstallColormapProcPtr)(
+	ColormapPtr /*pColormap*/);
+
+typedef    int (* ListInstalledColormapsProcPtr) (
+	ScreenPtr /*pScreen*/,
+	XID* /*pmaps */);
+
+typedef    void (* StoreColorsProcPtr)(
+	ColormapPtr /*pColormap*/,
+	int /*ndef*/,
+	xColorItem * /*pdef*/);
+
+typedef    void (* ResolveColorProcPtr)(
+	unsigned short* /*pred*/,
+	unsigned short* /*pgreen*/,
+	unsigned short* /*pblue*/,
+	VisualPtr /*pVisual*/);
+
+typedef    RegionPtr (* BitmapToRegionProcPtr)(
+	PixmapPtr /*pPix*/);
+
+typedef    void (* SendGraphicsExposeProcPtr)(
+	ClientPtr /*client*/,
+	RegionPtr /*pRgn*/,
+	XID /*drawable*/,
+	int /*major*/,
+	int /*minor*/);
+
+typedef    void (* ScreenBlockHandlerProcPtr)(
+	int /*screenNum*/,
+	pointer /*blockData*/,
+	pointer /*pTimeout*/,
+	pointer /*pReadmask*/);
+
+typedef    void (* ScreenWakeupHandlerProcPtr)(
+	 int /*screenNum*/,
+	 pointer /*wakeupData*/,
+	 unsigned long /*result*/,
+	 pointer /*pReadMask*/);
+
+typedef    Bool (* CreateScreenResourcesProcPtr)(
+	ScreenPtr /*pScreen*/);
+
+typedef    Bool (* ModifyPixmapHeaderProcPtr)(
+	PixmapPtr /*pPixmap*/,
+	int /*width*/,
+	int /*height*/,
+	int /*depth*/,
+	int /*bitsPerPixel*/,
+	int /*devKind*/,
+	pointer /*pPixData*/);
+
+typedef    PixmapPtr (* GetWindowPixmapProcPtr)(
+	WindowPtr /*pWin*/);
+
+typedef    void (* SetWindowPixmapProcPtr)(
+	WindowPtr /*pWin*/,
+	PixmapPtr /*pPix*/);
+
+typedef    PixmapPtr (* GetScreenPixmapProcPtr)(
+	ScreenPtr /*pScreen*/);
+
+typedef    void (* SetScreenPixmapProcPtr)(
+	PixmapPtr /*pPix*/);
+
+typedef    void (* MarkWindowProcPtr)(
+	WindowPtr /*pWin*/);
+
+typedef    Bool (* MarkOverlappedWindowsProcPtr)(
+	WindowPtr /*parent*/,
+	WindowPtr /*firstChild*/,
+	WindowPtr * /*pLayerWin*/);
+
+typedef    Bool (* ChangeSaveUnderProcPtr)(
+	WindowPtr /*pLayerWin*/,
+	WindowPtr /*firstChild*/);
+
+typedef    void (* PostChangeSaveUnderProcPtr)(
+	WindowPtr /*pLayerWin*/,
+	WindowPtr /*firstChild*/);
+
+typedef    void (* MoveWindowProcPtr)(
+	WindowPtr /*pWin*/,
+	int /*x*/,
+	int /*y*/,
+	WindowPtr /*pSib*/,
+	VTKind /*kind*/);
+
+typedef    void (* ResizeWindowProcPtr)(
+    WindowPtr /*pWin*/,
+    int /*x*/,
+    int /*y*/, 
+    unsigned int /*w*/,
+    unsigned int /*h*/,
+    WindowPtr /*pSib*/
+);
+
+typedef    WindowPtr (* GetLayerWindowProcPtr)(
+    WindowPtr /*pWin*/
+);
+
+typedef    void (* HandleExposuresProcPtr)(
+    WindowPtr /*pWin*/);
+
+typedef    void (* ReparentWindowProcPtr)(
+    WindowPtr /*pWin*/,
+    WindowPtr /*pPriorParent*/);
+
+#ifdef SHAPE
+typedef    void (* SetShapeProcPtr)(
+	WindowPtr /*pWin*/);
+#endif /* SHAPE */
+
+typedef    void (* ChangeBorderWidthProcPtr)(
+	WindowPtr /*pWin*/,
+	unsigned int /*width*/);
+
+typedef    void (* MarkUnrealizedWindowProcPtr)(
+	WindowPtr /*pChild*/,
+	WindowPtr /*pWin*/,
+	Bool /*fromConfigure*/);
+
+typedef struct _Screen {
+    int			myNum;	/* index of this instance in Screens[] */
+    ATOM		id;
+    short		width, height;
+    short		mmWidth, mmHeight;
+    short		numDepths;
+    unsigned char      	rootDepth;
+    DepthPtr       	allowedDepths;
+    unsigned long      	rootVisual;
+    unsigned long	defColormap;
+    short		minInstalledCmaps, maxInstalledCmaps;
+    char                backingStoreSupport, saveUnderSupport;
+    unsigned long	whitePixel, blackPixel;
+    unsigned long	rgf;	/* array of flags; she's -- HUNGARIAN */
+    GCPtr		GCperDepth[MAXFORMATS+1];
+			/* next field is a stipple to use as default in
+			   a GC.  we don't build default tiles of all depths
+			   because they are likely to be of a color
+			   different from the default fg pixel, so
+			   we don't win anything by building
+			   a standard one.
+			*/
+    PixmapPtr		PixmapPerDepth[1];
+    pointer		devPrivate;
+    short       	numVisuals;
+    VisualPtr		visuals;
+
+    /* Random screen procedures */
+
+    CloseScreenProcPtr		CloseScreen;
+    QueryBestSizeProcPtr	QueryBestSize;
+    SaveScreenProcPtr		SaveScreen;
+    GetImageProcPtr		GetImage;
+    GetSpansProcPtr		GetSpans;
+    PointerNonInterestBoxProcPtr PointerNonInterestBox;
+    SourceValidateProcPtr	SourceValidate;
+
+    /* Window Procedures */
+
+    CreateWindowProcPtr		CreateWindow;
+    DestroyWindowProcPtr	DestroyWindow;
+    PositionWindowProcPtr	PositionWindow;
+    ChangeWindowAttributesProcPtr ChangeWindowAttributes;
+    RealizeWindowProcPtr	RealizeWindow;
+    UnrealizeWindowProcPtr	UnrealizeWindow;
+    ValidateTreeProcPtr		ValidateTree;
+    PostValidateTreeProcPtr	PostValidateTree;
+    WindowExposuresProcPtr	WindowExposures;
+    PaintWindowBackgroundProcPtr PaintWindowBackground; /** unused */
+    PaintWindowBorderProcPtr	PaintWindowBorder; /** unused */
+    CopyWindowProcPtr		CopyWindow;
+    ClearToBackgroundProcPtr	ClearToBackground;
+    ClipNotifyProcPtr		ClipNotify;
+    RestackWindowProcPtr	RestackWindow;
+
+    /* Pixmap procedures */
+
+    CreatePixmapProcPtr		CreatePixmap;
+    DestroyPixmapProcPtr	DestroyPixmap;
+
+    /* Backing store procedures */
+
+    SaveDoomedAreasProcPtr	SaveDoomedAreas;
+    RestoreAreasProcPtr		RestoreAreas;
+    ExposeCopyProcPtr		ExposeCopy;
+    TranslateBackingStoreProcPtr TranslateBackingStore;
+    ClearBackingStoreProcPtr	ClearBackingStore;
+    DrawGuaranteeProcPtr	DrawGuarantee;
+    /*
+     * A read/write copy of the lower level backing store vector is needed now
+     * that the functions can be wrapped.
+     */
+    BSFuncRec			BackingStoreFuncs;
+    
+    /* Font procedures */
+
+    RealizeFontProcPtr		RealizeFont;
+    UnrealizeFontProcPtr	UnrealizeFont;
+
+    /* Cursor Procedures */
+
+    ConstrainCursorProcPtr	ConstrainCursor;
+    CursorLimitsProcPtr		CursorLimits;
+    DisplayCursorProcPtr	DisplayCursor;
+    RealizeCursorProcPtr	RealizeCursor;
+    UnrealizeCursorProcPtr	UnrealizeCursor;
+    RecolorCursorProcPtr	RecolorCursor;
+    SetCursorPositionProcPtr	SetCursorPosition;
+
+    /* GC procedures */
+
+    CreateGCProcPtr		CreateGC;
+
+    /* Colormap procedures */
+
+    CreateColormapProcPtr	CreateColormap;
+    DestroyColormapProcPtr	DestroyColormap;
+    InstallColormapProcPtr	InstallColormap;
+    UninstallColormapProcPtr	UninstallColormap;
+    ListInstalledColormapsProcPtr ListInstalledColormaps;
+    StoreColorsProcPtr		StoreColors;
+    ResolveColorProcPtr		ResolveColor;
+
+    /* Region procedures */
+
+    BitmapToRegionProcPtr	BitmapToRegion;
+    SendGraphicsExposeProcPtr	SendGraphicsExpose;
+
+    /* os layer procedures */
+
+    ScreenBlockHandlerProcPtr	BlockHandler;
+    ScreenWakeupHandlerProcPtr	WakeupHandler;
+
+    pointer blockData;
+    pointer wakeupData;
+
+    /* anybody can get a piece of this array */
+    PrivateRec	*devPrivates;
+
+    CreateScreenResourcesProcPtr CreateScreenResources;
+    ModifyPixmapHeaderProcPtr	ModifyPixmapHeader;
+
+    GetWindowPixmapProcPtr	GetWindowPixmap;
+    SetWindowPixmapProcPtr	SetWindowPixmap;
+    GetScreenPixmapProcPtr	GetScreenPixmap;
+    SetScreenPixmapProcPtr	SetScreenPixmap;
+
+    PixmapPtr pScratchPixmap;		/* scratch pixmap "pool" */
+
+    unsigned int		totalPixmapSize;
+
+    MarkWindowProcPtr		MarkWindow;
+    MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
+    ChangeSaveUnderProcPtr	ChangeSaveUnder;
+    PostChangeSaveUnderProcPtr	PostChangeSaveUnder;
+    MoveWindowProcPtr		MoveWindow;
+    ResizeWindowProcPtr		ResizeWindow;
+    GetLayerWindowProcPtr	GetLayerWindow;
+    HandleExposuresProcPtr	HandleExposures;
+    ReparentWindowProcPtr	ReparentWindow;
+
+#ifdef SHAPE
+    SetShapeProcPtr		SetShape;
+#endif /* SHAPE */
+
+    ChangeBorderWidthProcPtr	ChangeBorderWidth;
+    MarkUnrealizedWindowProcPtr	MarkUnrealizedWindow;
+
+} ScreenRec;
+
+typedef struct _ScreenInfo {
+    int		imageByteOrder;
+    int		bitmapScanlineUnit;
+    int		bitmapScanlinePad;
+    int		bitmapBitOrder;
+    int		numPixmapFormats;
+    PixmapFormatRec
+		formats[MAXFORMATS];
+    int		arraySize;
+    int		numScreens;
+    ScreenPtr	screens[MAXSCREENS];
+    int		numVideoScreens;
+} ScreenInfo;
+
+extern ScreenInfo screenInfo;
+
+extern void InitOutput(
+    ScreenInfo 	* /*pScreenInfo*/,
+    int     	/*argc*/,
+    char    	** /*argv*/);
+
+#endif /* SCREENINTSTRUCT_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/servermd.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/servermd.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/servermd.h	(revision 9233)
@@ -0,0 +1,585 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef SERVERMD_H
+#define SERVERMD_H 1
+
+/*
+ * Machine dependent values:
+ * GLYPHPADBYTES should be chosen with consideration for the space-time
+ * trade-off.  Padding to 0 bytes means that there is no wasted space
+ * in the font bitmaps (both on disk and in memory), but that access of
+ * the bitmaps will cause odd-address memory references.  Padding to
+ * 2 bytes would ensure even address memory references and would
+ * be suitable for a 68010-class machine, but at the expense of wasted
+ * space in the font bitmaps.  Padding to 4 bytes would be good
+ * for real 32 bit machines, etc.  Be sure that you tell the font
+ * compiler what kind of padding you want because its defines are
+ * kept separate from this.  See server/include/font.h for how
+ * GLYPHPADBYTES is used.
+ *
+ * Along with this, you should choose an appropriate value for
+ * GETLEFTBITS_ALIGNMENT, which is used in ddx/mfb/maskbits.h.  This
+ * constant choses what kind of memory references are guarenteed during
+ * font access; either 1, 2 or 4, for byte, word or longword access,
+ * respectively.  For instance, if you have decided to to have
+ * GLYPHPADBYTES == 4, then it is pointless for you to have a
+ * GETLEFTBITS_ALIGNMENT > 1, because the padding of the fonts has already
+ * guarenteed you that your fonts are longword aligned.  On the other
+ * hand, even if you have chosen GLYPHPADBYTES == 1 to save space, you may
+ * also decide that the computing involved in aligning the pointer is more
+ * costly than an odd-address access; you choose GETLEFTBITS_ALIGNMENT == 1.
+ *
+ * Next, choose the tuning parameters which are appropriate for your
+ * hardware; these modify the behaviour of the raw frame buffer code
+ * in ddx/mfb and ddx/cfb.  Defining these incorrectly will not cause
+ * the server to run incorrectly, but defining these correctly will
+ * cause some noticeable speed improvements:
+ *
+ *  AVOID_MEMORY_READ - (8-bit cfb only)
+ *	When stippling pixels on the screen (polytext and pushpixels),
+ *	don't read long words from the display and mask in the
+ *	appropriate values.  Rather, perform multiple byte/short/long
+ *	writes as appropriate.  This option uses many more instructions
+ *	but runs much faster when the destination is much slower than
+ *	the CPU and at least 1 level of write buffer is availible (2
+ *	is much better).  Defined currently for SPARC and MIPS.
+ *
+ *  FAST_CONSTANT_OFFSET_MODE - (cfb and mfb)
+ *	This define is used on machines which have no auto-increment
+ *	addressing mode, but do have an effectively free constant-offset
+ *	addressing mode.  Currently defined for MIPS and SPARC, even though
+ *	I remember the cg6 as performing better without it (cg3 definitely
+ *	performs better with it).
+ *	
+ *  LARGE_INSTRUCTION_CACHE -
+ *	This define increases the number of times some loops are
+ *	unrolled.  On 68020 machines (with 256 bytes of i-cache),
+ *	this define will slow execution down as instructions miss
+ *	the cache frequently.  On machines with real i-caches, this
+ *	reduces loop overhead, causing a slight performance improvement.
+ *	Currently defined for MIPS and SPARC
+ *
+ *  FAST_UNALIGNED_READS -
+ *	For machines with more memory bandwidth than CPU, this
+ *	define uses unaligned reads for 8-bit BitBLT instead of doing
+ *	aligned reads and combining the results with shifts and
+ *	logical-ors.  Currently defined for 68020 and vax.
+ *  PLENTIFUL_REGISTERS -
+ *	For machines with > 20 registers.  Currently used for
+ *	unrolling the text painting code a bit more.  Currently
+ *	defined for MIPS.
+ *  SHARED_IDCACHE -
+ *	For non-Harvard RISC machines, those which share the same
+ *	CPU memory bus for instructions and data.  This unrolls some
+ *	solid fill loops which are otherwise best left rolled up.
+ *	Currently defined for SPARC.
+ */
+
+#ifdef vax
+
+#define IMAGE_BYTE_ORDER	LSBFirst        /* Values for the VAX only */
+#define BITMAP_BIT_ORDER	LSBFirst
+#define	GLYPHPADBYTES		1
+#define GETLEFTBITS_ALIGNMENT	4
+#define FAST_UNALIGNED_READS
+
+#endif /* vax */
+
+#ifdef __arm32__
+
+#define IMAGE_BYTE_ORDER        LSBFirst
+
+# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
+#  define BITMAP_BIT_ORDER      MSBFirst
+# else
+#  define BITMAP_BIT_ORDER      LSBFirst
+# endif
+
+# if defined(XF86MONOVGA) || defined(XF86VGA16)
+#  define BITMAP_SCANLINE_UNIT  8
+# endif
+
+#define GLYPHPADBYTES           4
+#define GETLEFTBITS_ALIGNMENT   1
+#define LARGE_INSTRUCTION_CACHE
+#define AVOID_MEMORY_READ
+
+#endif /* __arm32__ */
+
+#if defined (hpux) || defined __hppa__
+
+#define IMAGE_BYTE_ORDER	MSBFirst
+#define BITMAP_BIT_ORDER	MSBFirst
+#define GLYPHPADBYTES		4	/* to make fb work */
+#define GETLEFTBITS_ALIGNMENT	1	/* PA forces longs to 4 */
+					/* byte boundries */
+#define AVOID_MEMORY_READ
+#define FAST_CONSTANT_OFFSET_MODE
+#define LARGE_INSTRUCTION_CACHE
+#define PLENTIFUL_REGISTERS
+
+#endif /* hpux || __hppa__ */
+
+#if defined(__powerpc__) || defined(__ppc__)
+
+#define IMAGE_BYTE_ORDER        MSBFirst
+#define BITMAP_BIT_ORDER        MSBFirst
+#define GLYPHPADBYTES           4
+#define GETLEFTBITS_ALIGNMENT   1
+
+/* XXX Should this be for Lynx only? */
+#ifdef Lynx
+#define BITMAP_SCANLINE_UNIT	8
+#endif
+
+#define LARGE_INSTRUCTION_CACHE
+#define FAST_CONSTANT_OFFSET_MODE
+#define PLENTIFUL_REGISTERS
+#define AVOID_MEMORY_READ
+
+#define FAST_MEMCPY
+
+#endif /* PowerPC */
+
+#if defined(__sh__)
+
+#if defined(__BIG_ENDIAN__)
+# define IMAGE_BYTE_ORDER	MSBFirst
+# define BITMAP_BIT_ORDER	MSBFirst
+# define GLYPHPADBYTES		4
+# define GETLEFTBITS_ALIGNMENT	1
+#else
+# define IMAGE_BYTE_ORDER	LSBFirst
+# define BITMAP_BIT_ORDER	LSBFirst
+# define GLYPHPADBYTES		4
+# define GETLEFTBITS_ALIGNMENT	1
+#endif
+
+#define AVOID_MEMORY_READ
+#define FAST_CONSTANT_OFFSET_MODE
+#define LARGE_INSTRUCTION_CACHE
+#define PLENTIFUL_REGISTERS
+
+#endif /* SuperH */
+
+
+#if (defined(sun) && (defined(__sparc) || defined(sparc))) || \
+    (defined(__uxp__) && (defined(sparc) || defined(mc68000))) || \
+    defined(__sparc__) || defined(__mc68000__)
+
+#if defined(__sparc) || defined(__sparc__)
+# if !defined(sparc)
+#  define sparc 1
+# endif
+#endif
+
+#if defined(sun386) || defined(sun5)
+# define IMAGE_BYTE_ORDER	LSBFirst        /* Values for the SUN only */
+# define BITMAP_BIT_ORDER	LSBFirst
+#else
+# define IMAGE_BYTE_ORDER	MSBFirst        /* Values for the SUN only */
+# define BITMAP_BIT_ORDER	MSBFirst
+#endif
+
+#ifdef sparc
+# define AVOID_MEMORY_READ
+# define LARGE_INSTRUCTION_CACHE
+# define FAST_CONSTANT_OFFSET_MODE
+# define SHARED_IDCACHE
+#endif
+
+#ifdef mc68020
+#define FAST_UNALIGNED_READS
+#endif
+
+#define	GLYPHPADBYTES		4
+#define GETLEFTBITS_ALIGNMENT	1
+
+#endif /* sun && !(i386 && SVR4) */
+
+
+#if defined(AIXV3)
+
+#define IMAGE_BYTE_ORDER        MSBFirst        /* Values for the RISC/6000 */
+#define BITMAP_BIT_ORDER        MSBFirst
+#define GLYPHPADBYTES           4
+#define GETLEFTBITS_ALIGNMENT   1
+
+#define LARGE_INSTRUCTION_CACHE
+#define FAST_CONSTANT_OFFSET_MODE
+#define PLENTIFUL_REGISTERS
+#define AVOID_MEMORY_READ
+
+#define FAST_MEMCPY
+#endif /* AIXV3 */
+
+#if defined(ibm032) || defined (ibm)
+
+#ifdef __i386__
+# define IMAGE_BYTE_ORDER	LSBFirst	/* Value for PS/2 only */
+#else
+# define IMAGE_BYTE_ORDER	MSBFirst        /* Values for the RT only*/
+#endif
+#define BITMAP_BIT_ORDER	MSBFirst
+#define	GLYPHPADBYTES		1
+#define GETLEFTBITS_ALIGNMENT	4
+/* ibm pcc doesn't understand pragmas. */
+
+#ifdef __i386__
+#define BITMAP_SCANLINE_UNIT	8
+#endif
+
+#endif /* ibm */
+
+#if defined (M4310) || defined(M4315) || defined(M4317) || defined(M4319) || defined(M4330)
+
+#define IMAGE_BYTE_ORDER	MSBFirst        /* Values for Pegasus only */
+#define BITMAP_BIT_ORDER	MSBFirst
+#define GLYPHPADBYTES		4
+#define GETLEFTBITS_ALIGNMENT	1
+
+#define FAST_UNALIGNED_READS
+
+#endif /* tektronix */
+
+#ifdef macII
+
+#define IMAGE_BYTE_ORDER      	MSBFirst        /* Values for the MacII only */
+#define BITMAP_BIT_ORDER      	MSBFirst
+#define GLYPHPADBYTES         	4
+#define GETLEFTBITS_ALIGNMENT 	1
+
+/* might want FAST_UNALIGNED_READS for frame buffers with < 1us latency */
+
+#endif /* macII */
+
+#if (defined(mips) || defined(__mips)) && !defined(sgi)
+
+#if defined(MIPSEL) || defined(__MIPSEL__)
+# define IMAGE_BYTE_ORDER	LSBFirst        /* Values for the PMAX only */
+# define BITMAP_BIT_ORDER	LSBFirst
+# define GLYPHPADBYTES		4
+# define GETLEFTBITS_ALIGNMENT	1
+#else
+# define IMAGE_BYTE_ORDER	MSBFirst        /* Values for the MIPS only */
+# define BITMAP_BIT_ORDER	MSBFirst
+# define GLYPHPADBYTES		4
+# define GETLEFTBITS_ALIGNMENT	1
+#endif
+
+#define AVOID_MEMORY_READ
+#define FAST_CONSTANT_OFFSET_MODE
+#define LARGE_INSTRUCTION_CACHE
+#define PLENTIFUL_REGISTERS
+
+#endif /* mips */
+
+#if defined(__alpha) || defined(__alpha__) || defined(__alphaCross)
+# define IMAGE_BYTE_ORDER	LSBFirst	/* Values for the Alpha only */
+
+# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
+#  define BITMAP_BIT_ORDER      MSBFirst
+# else
+#  define BITMAP_BIT_ORDER      LSBFirst
+# endif
+
+# if defined(XF86MONOVGA) || defined(XF86VGA16)
+#  define BITMAP_SCANLINE_UNIT  8
+# endif
+
+# define GLYPHPADBYTES		4
+# define GETLEFTBITS_ALIGNMENT	1
+# define FAST_CONSTANT_OFFSET_MODE
+# define LARGE_INSTRUCTION_CACHE
+# define PLENTIFUL_REGISTERS
+
+#endif /* alpha */
+
+#if defined (linux) && defined (__s390__)
+
+#define IMAGE_BYTE_ORDER      	MSBFirst
+#define BITMAP_BIT_ORDER      	MSBFirst
+#define GLYPHPADBYTES         	4
+#define GETLEFTBITS_ALIGNMENT  1	
+
+#define BITMAP_SCANLINE_UNIT	8
+#define LARGE_INSTRUCTION_CACHE
+#define FAST_CONSTANT_OFFSET_MODE
+#define FAST_UNALIGNED_READ
+
+#define FAST_MEMCPY
+
+#endif /* linux/s390 */
+
+#if defined (linux) && defined (__s390x__)
+
+#define IMAGE_BYTE_ORDER       MSBFirst
+#define BITMAP_BIT_ORDER       MSBFirst
+#define GLYPHPADBYTES          4
+#define GETLEFTBITS_ALIGNMENT  1
+
+#define BITMAP_SCANLINE_UNIT	8
+#define LARGE_INSTRUCTION_CACHE
+#define FAST_CONSTANT_OFFSET_MODE
+#define FAST_UNALIGNED_READ
+
+#define FAST_MEMCPY
+#endif /* linux/s390x */
+
+
+#if defined(__ia64__) || defined(ia64)
+# define IMAGE_BYTE_ORDER	LSBFirst
+
+# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
+#  define BITMAP_BIT_ORDER      MSBFirst
+# else
+#  define BITMAP_BIT_ORDER      LSBFirst
+# endif
+
+# if defined(XF86MONOVGA) || defined(XF86VGA16)
+#  define BITMAP_SCANLINE_UNIT  8
+# endif
+
+# define GLYPHPADBYTES		4
+# define GETLEFTBITS_ALIGNMENT	1
+# define FAST_CONSTANT_OFFSET_MODE
+# define LARGE_INSTRUCTION_CACHE
+# define PLENTIFUL_REGISTERS
+
+#endif /* ia64 */
+
+#if defined(__amd64__) || defined(amd64) || defined(__amd64) || defined(__x86_64__)
+# define IMAGE_BYTE_ORDER	LSBFirst
+
+# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
+#  define BITMAP_BIT_ORDER      MSBFirst
+# else
+#  define BITMAP_BIT_ORDER      LSBFirst
+# endif
+
+# if defined(XF86MONOVGA) || defined(XF86VGA16)
+#  define BITMAP_SCANLINE_UNIT  8
+# endif
+
+# define GLYPHPADBYTES		4
+# define GETLEFTBITS_ALIGNMENT	1
+# define LARGE_INSTRUCTION_CACHE
+# define FAST_CONSTANT_OFFSET_MODE
+/* ???? */
+# define FAST_UNALIGNED_READS
+#endif /* AMD64 */
+
+#ifdef stellar
+
+#define IMAGE_BYTE_ORDER	MSBFirst       /* Values for the stellar only*/
+#define BITMAP_BIT_ORDER	MSBFirst
+#define	GLYPHPADBYTES		4
+#define GETLEFTBITS_ALIGNMENT	4
+#define IMAGE_BUFSIZE		(64*1024)
+/*
+ * Use SysV random number generator.
+ */
+#define random rand
+
+#endif /* stellar */
+
+#ifdef luna
+
+#define IMAGE_BYTE_ORDER        MSBFirst   	/* Values for the OMRON only*/
+#define BITMAP_BIT_ORDER	MSBFirst
+#define	GLYPHPADBYTES		4
+#define GETLEFTBITS_ALIGNMENT	1
+
+#ifndef mc68000
+#define FAST_CONSTANT_OFFSET_MODE
+#define AVOID_MEMORY_READ
+#define LARGE_INSTRUCTION_CACHE
+#define PLENTIFUL_REGISTERS
+#endif
+
+#endif /* luna */
+
+#if	(defined(SVR4) && (defined(__i386__) || (defined(__i386)))) ||	\
+	defined(__alpha__) || defined(__alpha) || \
+	defined(__i386__) || defined(__QNX__) || \
+	defined(__s390x__) || defined(__s390__)
+  
+#ifndef IMAGE_BYTE_ORDER
+#define IMAGE_BYTE_ORDER	LSBFirst
+#endif
+
+#ifndef BITMAP_BIT_ORDER
+# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
+#  define BITMAP_BIT_ORDER      MSBFirst
+# else
+#  define BITMAP_BIT_ORDER      LSBFirst
+# endif
+#endif
+
+#ifndef BITMAP_SCANLINE_UNIT
+# if defined(XF86MONOVGA) || defined(XF86VGA16)
+#  define BITMAP_SCANLINE_UNIT  8
+# endif
+#endif
+
+#ifndef GLYPHPADBYTES
+#define GLYPHPADBYTES           4
+#endif
+
+#define GETLEFTBITS_ALIGNMENT	1
+#define AVOID_MEMORY_READ
+#ifdef XSVGA
+#define AVOID_GLYPHBLT
+#define FAST_CONSTANT_OFFSET_MODE
+#define FAST_MEMCPY
+#define NO_ONE_RECT
+#endif
+
+#endif /* SVR4 / BSD / i386 */
+
+#if defined (linux) && defined (__mc68000__)
+
+#define IMAGE_BYTE_ORDER       MSBFirst
+#define BITMAP_BIT_ORDER       MSBFirst
+#define FAST_UNALIGNED_READS
+#define GLYPHPADBYTES          4
+#define GETLEFTBITS_ALIGNMENT  1
+
+#endif /* linux/m68k */
+
+#ifdef sgi
+
+#define IMAGE_BYTE_ORDER	MSBFirst
+#define BITMAP_BIT_ORDER	MSBFirst
+#define GLYPHPADBYTES		4
+#define GETLEFTBITS_ALIGNMENT	1
+#define AVOID_MEMORY_READ
+#define FAST_CONSTANT_OFFSET_MODE
+#define LARGE_INSTRUCTION_CACHE
+#define PLENTIFUL_REGISTERS
+
+#endif
+
+/* linux on the Compaq Itsy */
+#if defined(linux) && defined(__arm__)
+#define IMAGE_BYTE_ORDER	LSBFirst
+#define BITMAP_BIT_ORDER	LSBFirst
+#define GLYPHPADBYTES		4
+#define GETLEFTBITS_ALIGNMENT	1
+#endif
+
+/* linux on IBM S/390 */
+#if defined (linux) && defined (__s390__)
+#define IMAGE_BYTE_ORDER	MSBFirst
+#define BITMAP_BIT_ORDER	MSBFirst
+#define GLYPHPADBYTES		4
+#define GETLEFTBITS_ALIGNMENT	1
+#endif /* linux/s390 */ 
+
+/* size of buffer to use with GetImage, measured in bytes. There's obviously
+ * a trade-off between the amount of stack (or whatever ALLOCATE_LOCAL gives
+ * you) used and the number of times the ddx routine has to be called.
+ */
+#ifndef IMAGE_BUFSIZE
+#define IMAGE_BUFSIZE		(64*1024)
+#endif
+
+/* pad scanline to a longword */
+#ifndef BITMAP_SCANLINE_UNIT
+#define BITMAP_SCANLINE_UNIT	32
+#endif
+
+#ifndef BITMAP_SCANLINE_PAD
+#define BITMAP_SCANLINE_PAD  32
+#define LOG2_BITMAP_PAD		5
+#define LOG2_BYTES_PER_SCANLINE_PAD	2
+#endif
+
+/* 
+ *   This returns the number of padding units, for depth d and width w.
+ * For bitmaps this can be calculated with the macros above.
+ * Other depths require either grovelling over the formats field of the
+ * screenInfo or hardwired constants.
+ */
+
+typedef struct _PaddingInfo {
+	int     padRoundUp;	/* pixels per pad unit - 1 */
+	int	padPixelsLog2;	/* log 2 (pixels per pad unit) */
+	int     padBytesLog2;	/* log 2 (bytes per pad unit) */
+	int	notPower2;	/* bitsPerPixel not a power of 2 */
+	int	bytesPerPixel;	/* only set when notPower2 is TRUE */
+	int	bitsPerPixel;	/* bits per pixel */
+} PaddingInfo;
+extern PaddingInfo PixmapWidthPaddingInfo[];
+
+/* The only portable way to get the bpp from the depth is to look it up */
+#define BitsPerPixel(d) (PixmapWidthPaddingInfo[d].bitsPerPixel)
+
+#define PixmapWidthInPadUnits(w, d) \
+    (PixmapWidthPaddingInfo[d].notPower2 ? \
+    (((int)(w) * PixmapWidthPaddingInfo[d].bytesPerPixel +  \
+	         PixmapWidthPaddingInfo[d].bytesPerPixel) >> \
+	PixmapWidthPaddingInfo[d].padBytesLog2) : \
+    ((int)((w) + PixmapWidthPaddingInfo[d].padRoundUp) >> \
+	PixmapWidthPaddingInfo[d].padPixelsLog2))
+
+/*
+ *	Return the number of bytes to which a scanline of the given
+ * depth and width will be padded.
+ */
+#define PixmapBytePad(w, d) \
+    (PixmapWidthInPadUnits(w, d) << PixmapWidthPaddingInfo[d].padBytesLog2)
+
+#define BitmapBytePad(w) \
+    (((int)((w) + BITMAP_SCANLINE_PAD - 1) >> LOG2_BITMAP_PAD) << LOG2_BYTES_PER_SCANLINE_PAD)
+
+#define PixmapWidthInPadUnitsProto(w, d) PixmapWidthInPadUnits(w, d)
+#define PixmapBytePadProto(w, d) PixmapBytePad(w, d)
+#define BitmapBytePadProto(w) BitmapBytePad(w)
+
+#endif /* SERVERMD_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/shadow.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/shadow.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/shadow.h	(revision 9233)
@@ -0,0 +1,186 @@
+/*
+ *
+ * Copyright © 2000 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Keith Packard makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _SHADOW_H_
+#define _SHADOW_H_
+
+#include "scrnintstr.h"
+
+#ifdef RENDER
+#include "picturestr.h"
+#endif
+
+#include "damage.h"
+#include "damagestr.h"
+typedef struct _shadowBuf   *shadowBufPtr;
+
+typedef void (*ShadowUpdateProc) (ScreenPtr pScreen,
+				  shadowBufPtr pBuf);
+
+#define SHADOW_WINDOW_RELOCATE 1
+#define SHADOW_WINDOW_READ 2
+#define SHADOW_WINDOW_WRITE 4
+
+typedef void *(*ShadowWindowProc) (ScreenPtr	pScreen,
+				   CARD32	row,
+				   CARD32	offset,
+				   int		mode,
+				   CARD32	*size,
+				   void		*closure);
+
+/* BC hack: do not move the damage member.  see shadow.c for explanation. */
+typedef struct _shadowBuf {
+    DamagePtr           pDamage;
+    ShadowUpdateProc	update;
+    ShadowWindowProc	window;
+    RegionRec		damage;
+    PixmapPtr		pPixmap;
+    void		*closure;
+    int			randr;
+
+    /* screen wrappers */
+    GetImageProcPtr     GetImage;
+    CloseScreenProcPtr  CloseScreen;
+} shadowBufRec;
+
+/* Match defines from randr extension */
+#define SHADOW_ROTATE_0	    1
+#define SHADOW_ROTATE_90    2
+#define SHADOW_ROTATE_180   4
+#define SHADOW_ROTATE_270   8
+#define SHADOW_ROTATE_ALL   (SHADOW_ROTATE_0|SHADOW_ROTATE_90|\
+			     SHADOW_ROTATE_180|SHADOW_ROTATE_270)
+#define SHADOW_REFLECT_X    16
+#define SHADOW_REFLECT_Y    32
+#define SHADOW_REFLECT_ALL  (SHADOW_REFLECT_X|SHADOW_REFLECT_Y)
+
+extern DevPrivateKey shadowScrPrivateKey;
+
+#define shadowGetBuf(pScr) ((shadowBufPtr) \
+    dixLookupPrivate(&(pScr)->devPrivates, shadowScrPrivateKey))
+#define shadowBuf(pScr)            shadowBufPtr pBuf = shadowGetBuf(pScr)
+#define shadowDamage(pBuf)  DamageRegion(pBuf->pDamage)    
+
+Bool
+shadowSetup (ScreenPtr pScreen);
+
+Bool
+shadowAdd (ScreenPtr	    pScreen,
+	   PixmapPtr	    pPixmap,
+	   ShadowUpdateProc update,
+	   ShadowWindowProc window,
+	   int		    randr,
+	   void		    *closure);
+
+void
+shadowRemove (ScreenPtr pScreen, PixmapPtr pPixmap);
+
+shadowBufPtr
+shadowFindBuf (WindowPtr pWindow);
+
+Bool
+shadowInit (ScreenPtr pScreen, ShadowUpdateProc update, ShadowWindowProc window);
+
+void *
+shadowAlloc (int width, int height, int bpp);
+
+void
+shadowUpdatePacked (ScreenPtr	    pScreen,
+		    shadowBufPtr    pBuf);
+
+void
+shadowUpdatePlanar4 (ScreenPtr	    pScreen,
+		     shadowBufPtr   pBuf);
+
+void
+shadowUpdatePlanar4x8 (ScreenPtr    pScreen,
+		       shadowBufPtr pBuf);
+
+void
+shadowUpdateRotatePacked (ScreenPtr    pScreen,
+			  shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate8_90 (ScreenPtr    pScreen,
+			shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate16_90 (ScreenPtr    pScreen,
+			 shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate16_90YX (ScreenPtr    pScreen,
+			   shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate32_90 (ScreenPtr    pScreen,
+			 shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate8_180 (ScreenPtr    pScreen,
+			 shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate16_180 (ScreenPtr    pScreen,
+			  shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate32_180 (ScreenPtr    pScreen,
+			  shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate8_270 (ScreenPtr    pScreen,
+			 shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate16_270 (ScreenPtr    pScreen,
+			  shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate16_270YX (ScreenPtr    pScreen,
+			    shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate32_270 (ScreenPtr    pScreen,
+			  shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate8 (ScreenPtr    pScreen,
+		     shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate16 (ScreenPtr    pScreen,
+		      shadowBufPtr pBuf);
+
+void
+shadowUpdateRotate32 (ScreenPtr    pScreen,
+		      shadowBufPtr pBuf);
+
+typedef void (* shadowUpdateProc)(ScreenPtr, shadowBufPtr);
+
+shadowUpdateProc shadowUpdatePackedWeak(void);
+shadowUpdateProc shadowUpdatePlanar4Weak(void);
+shadowUpdateProc shadowUpdatePlanar4x8Weak(void);
+shadowUpdateProc shadowUpdateRotatePackedWeak(void);
+
+#endif /* _SHADOW_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/shadowfb.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/shadowfb.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/shadowfb.h	(revision 9233)
@@ -0,0 +1,43 @@
+
+#ifndef _SHADOWFB_H
+#define _SHADOWFB_H
+
+#include "xf86str.h"
+
+/*
+ * User defined callback function.  Passed a pointer to the ScrnInfo struct,
+ * the number of dirty rectangles, and a pointer to the first dirty rectangle
+ * in the array.
+ */
+typedef void (*RefreshAreaFuncPtr)(ScrnInfoPtr, int, BoxPtr);
+
+/*
+ * ShadowFBInit initializes the shadowfb subsystem.  refreshArea is a pointer
+ * to a user supplied callback function.  This function will be called after
+ * any operation that modifies the framebuffer.  The newly dirtied rectangles
+ * are passed to the callback.
+ *
+ * Returns FALSE in the event of an error.
+ */
+Bool
+ShadowFBInit (
+    ScreenPtr		pScreen,
+    RefreshAreaFuncPtr  refreshArea
+);
+
+/*
+ * ShadowFBInit2 is a more featureful refinement of the original shadowfb.
+ * ShadowFBInit2 allows you to specify two callbacks, one to be called
+ * immediately before an operation that modifies the framebuffer, and another
+ * to be called immediately after.  
+ *
+ * Returns FALSE in the event of an error
+ */
+Bool
+ShadowFBInit2 (
+    ScreenPtr		pScreen,
+    RefreshAreaFuncPtr  preRefreshArea,
+    RefreshAreaFuncPtr  postRefreshArea
+);
+
+#endif /* _SHADOWFB_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/validate.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/validate.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/validate.h	(revision 9233)
@@ -0,0 +1,40 @@
+
+/*
+
+Copyright 1989, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+*/
+
+#ifndef VALIDATE_H
+#define VALIDATE_H
+
+#include "miscstruct.h"
+#include "regionstr.h"
+
+typedef enum { VTOther, VTStack, VTMove, VTUnmap, VTMap, VTBroken } VTKind;
+
+/* union _Validate is now device dependent; see mivalidate.h for an example */
+typedef union _Validate *ValidatePtr;
+
+#define UnmapValData ((ValidatePtr)1)
+
+#endif /* VALIDATE_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/vbe.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/vbe.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/vbe.h	(revision 9233)
@@ -0,0 +1,347 @@
+
+/*
+ *                   XFree86 vbe module
+ *               Copyright 2000 Egbert Eich
+ *
+ * The mode query/save/set/restore functions from the vesa driver 
+ * have been moved here.
+ * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com)
+ * Authors: Paulo César Pereira de Andrade <pcpa@conectiva.com.br> 
+ */
+
+#ifndef _VBE_H
+#define _VBE_H
+#include "xf86int10.h"
+#include "xf86DDC.h"
+
+typedef enum {
+    DDC_UNCHECKED,
+    DDC_NONE,
+    DDC_1,
+    DDC_2,
+    DDC_1_2
+}
+ddc_lvl;
+
+typedef struct {
+    xf86Int10InfoPtr pInt10;
+    int version;
+    pointer memory;
+    int real_mode_base;
+    int num_pages;
+    Bool init_int10;
+    ddc_lvl ddc;
+    Bool ddc_blank;
+} vbeInfoRec, *vbeInfoPtr;
+
+#define VBE_VERSION_MAJOR(x) *((CARD8*)(&x) + 1)
+#define VBE_VERSION_MINOR(x) (CARD8)(x)
+
+vbeInfoPtr VBEInit(xf86Int10InfoPtr pInt, int entityIndex);
+vbeInfoPtr VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags);
+void vbeFree(vbeInfoPtr pVbe);
+xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule);
+
+#pragma pack(1)
+
+typedef struct vbeControllerInfoBlock {
+    CARD8 VbeSignature[4];
+    CARD16 VbeVersion;
+    CARD32 OemStringPtr;
+    CARD8 Capabilities[4];
+    CARD32 VideoModePtr;
+    CARD16 TotalMem;
+    CARD16 OemSoftwareRev;
+    CARD32 OemVendorNamePtr;
+    CARD32 OemProductNamePtr;
+    CARD32 OemProductRevPtr;
+    CARD8  Scratch[222];
+    CARD8  OemData[256];
+} vbeControllerInfoRec, *vbeControllerInfoPtr;
+
+#if defined(__GNUC__) || defined(__USLC__) || defined(__SUNPRO_C)
+#pragma pack()	/* All GCC versions recognise this syntax */
+#else
+#pragma pack(0)
+#endif
+
+#ifndef __GNUC__
+#define __attribute__(a)
+#endif
+
+typedef struct _VbeInfoBlock VbeInfoBlock;
+typedef struct _VbeModeInfoBlock VbeModeInfoBlock;
+typedef struct _VbeCRTCInfoBlock VbeCRTCInfoBlock;
+
+/*
+ * INT 0
+ */
+
+struct _VbeInfoBlock {
+    /* VESA 1.2 fields */
+    CARD8 VESASignature[4];		/* VESA */
+    CARD16 VESAVersion;			/* Higher byte major, lower byte minor */
+    /*CARD32*/char *OEMStringPtr;	/* Pointer to OEM string */
+    CARD8 Capabilities[4];		/* Capabilities of the video environment */
+
+    /*CARD32*/CARD16 *VideoModePtr;	/* pointer to supported Super VGA modes */
+
+    CARD16 TotalMemory;			/* Number of 64kb memory blocks on board */
+    /* if not VESA 2, 236 scratch bytes follow (256 bytes total size) */
+
+    /* VESA 2 fields */
+    CARD16 OemSoftwareRev;		/* VBE implementation Software revision */
+    /*CARD32*/char *OemVendorNamePtr;	/* Pointer to Vendor Name String */
+    /*CARD32*/char *OemProductNamePtr;	/* Pointer to Product Name String */
+    /*CARD32*/char *OemProductRevPtr;	/* Pointer to Product Revision String */
+    CARD8 Reserved[222];		/* Reserved for VBE implementation */
+    CARD8 OemData[256];			/* Data Area for OEM Strings */
+} __attribute__((packed));
+
+/* Return Super VGA Information */
+VbeInfoBlock *VBEGetVBEInfo(vbeInfoPtr pVbe);
+void VBEFreeVBEInfo(VbeInfoBlock *block);
+
+/*
+ * INT 1
+ */
+
+struct _VbeModeInfoBlock {
+    CARD16 ModeAttributes;		/* mode attributes */
+    CARD8 WinAAttributes;		/* window A attributes */
+    CARD8 WinBAttributes;		/* window B attributes */
+    CARD16 WinGranularity;		/* window granularity */
+    CARD16 WinSize;			/* window size */
+    CARD16 WinASegment;			/* window A start segment */
+    CARD16 WinBSegment;			/* window B start segment */
+    CARD32 WinFuncPtr;			/* real mode pointer to window function */
+    CARD16 BytesPerScanline;		/* bytes per scanline */
+
+    /* Mandatory information for VBE 1.2 and above */
+    CARD16 XResolution;			/* horizontal resolution in pixels or characters */
+    CARD16 YResolution;			/* vertical resolution in pixels or characters */
+    CARD8 XCharSize;			/* character cell width in pixels */
+    CARD8 YCharSize;			/* character cell height in pixels */
+    CARD8 NumberOfPlanes;		/* number of memory planes */
+    CARD8 BitsPerPixel;			/* bits per pixel */
+    CARD8 NumberOfBanks;		/* number of banks */
+    CARD8 MemoryModel;			/* memory model type */
+    CARD8 BankSize;			/* bank size in KB */
+    CARD8 NumberOfImages;		/* number of images */
+    CARD8 Reserved;	/* 1 */		/* reserved for page function */
+
+    /* Direct color fields (required for direct/6 and YUV/7 memory models) */
+    CARD8 RedMaskSize;			/* size of direct color red mask in bits */
+    CARD8 RedFieldPosition;		/* bit position of lsb of red mask */
+    CARD8 GreenMaskSize;		/* size of direct color green mask in bits */
+    CARD8 GreenFieldPosition;		/* bit position of lsb of green mask */
+    CARD8 BlueMaskSize;			/* size of direct color blue mask in bits */
+    CARD8 BlueFieldPosition;		/* bit position of lsb of blue mask */
+    CARD8 RsvdMaskSize;			/* size of direct color reserved mask in bits */
+    CARD8 RsvdFieldPosition;		/* bit position of lsb of reserved mask */
+    CARD8 DirectColorModeInfo;		/* direct color mode attributes */
+
+    /* Mandatory information for VBE 2.0 and above */
+    CARD32 PhysBasePtr;			/* physical address for flat memory frame buffer */
+    CARD32 Reserved32;	/* 0 */		/* Reserved - always set to 0 */
+    CARD16 Reserved16;	/* 0 */		/* Reserved - always set to 0 */
+
+    /* Mandatory information for VBE 3.0 and above */
+    CARD16 LinBytesPerScanLine;		/* bytes per scan line for linear modes */
+    CARD8 BnkNumberOfImagePages;	/* number of images for banked modes */
+    CARD8 LinNumberOfImagePages;	/* number of images for linear modes */
+    CARD8 LinRedMaskSize;		/* size of direct color red mask (linear modes) */
+    CARD8 LinRedFieldPosition;		/* bit position of lsb of red mask (linear modes) */
+    CARD8 LinGreenMaskSize;		/* size of direct color green mask (linear modes) */
+    CARD8 LinGreenFieldPosition;	/* bit position of lsb of green mask (linear modes) */
+    CARD8 LinBlueMaskSize;		/* size of direct color blue mask (linear modes) */
+    CARD8 LinBlueFieldPosition;		/* bit position of lsb of blue mask (linear modes) */
+    CARD8 LinRsvdMaskSize;		/* size of direct color reserved mask (linear modes) */
+    CARD8 LinRsvdFieldPosition;		/* bit position of lsb of reserved mask (linear modes) */
+    CARD32 MaxPixelClock;		/* maximum pixel clock (in Hz) for graphics mode */
+    CARD8 Reserved2[189];		/* remainder of VbeModeInfoBlock */
+} __attribute__((packed));
+
+/* Return VBE Mode Information */
+VbeModeInfoBlock *VBEGetModeInfo(vbeInfoPtr pVbe, int mode);
+void VBEFreeModeInfo(VbeModeInfoBlock *block);
+
+/*
+ * INT2
+ */
+
+#define CRTC_DBLSCAN	(1<<0)
+#define CRTC_INTERLACE	(1<<1)
+#define CRTC_NHSYNC	(1<<2)
+#define CRTC_NVSYNC	(1<<3)
+
+struct _VbeCRTCInfoBlock {
+    CARD16 HorizontalTotal;		/* Horizontal total in pixels */
+    CARD16 HorizontalSyncStart;		/* Horizontal sync start in pixels */
+    CARD16 HorizontalSyncEnd;		/* Horizontal sync end in pixels */
+    CARD16 VerticalTotal;		/* Vertical total in lines */
+    CARD16 VerticalSyncStart;		/* Vertical sync start in lines */
+    CARD16 VerticalSyncEnd;		/* Vertical sync end in lines */
+    CARD8 Flags;			/* Flags (Interlaced, Double Scan etc) */
+    CARD32 PixelClock;			/* Pixel clock in units of Hz */
+    CARD16 RefreshRate;			/* Refresh rate in units of 0.01 Hz */
+    CARD8 Reserved[40];			/* remainder of ModeInfoBlock */
+} __attribute__((packed));
+/* VbeCRTCInfoBlock is in the VESA 3.0 specs */
+
+Bool VBESetVBEMode(vbeInfoPtr pVbe, int mode, VbeCRTCInfoBlock *crtc);
+
+/*
+ * INT 3
+ */
+
+Bool VBEGetVBEMode(vbeInfoPtr pVbe, int *mode);
+
+/*
+ * INT 4
+ */
+
+/* Save/Restore Super VGA video state */
+/* function values are (values stored in VESAPtr):
+ *	0 := query & allocate amount of memory to save state
+ *	1 := save state
+ *	2 := restore state
+ *
+ *	function 0 called automatically if function 1 called without
+ *	a previous call to function 0.
+ */
+
+typedef enum {
+  MODE_QUERY,
+  MODE_SAVE,
+  MODE_RESTORE
+} vbeSaveRestoreFunction;
+
+Bool
+VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction fuction, 
+	       pointer *memory, int *size, int *real_mode_pages);
+
+/*
+ * INT 5
+ */
+
+Bool
+VBEBankSwitch(vbeInfoPtr pVbe, unsigned int iBank, int window);
+
+/*
+ * INT 6
+ */
+
+typedef enum {
+  SCANWID_SET,
+  SCANWID_GET,
+  SCANWID_SET_BYTES,
+  SCANWID_GET_MAX
+} vbeScanwidthCommand;
+
+#define VBESetLogicalScanline(pVbe, width)	\
+	VBESetGetLogicalScanlineLength(pVbe, SCANWID_SET, width, \
+					NULL, NULL, NULL)
+#define VBESetLogicalScanlineBytes(pVbe, width)	\
+	VBESetGetLogicalScanlineLength(pVbe, SCANWID_SET_BYTES, width, \
+					NULL, NULL, NULL)
+#define VBEGetLogicalScanline(pVbe, pixels, bytes, max)	\
+	VBESetGetLogicalScanlineLength(pVbe, SCANWID_GET, 0, \
+					pixels, bytes, max)
+#define VBEGetMaxLogicalScanline(pVbe, pixels, bytes, max)	\
+	VBESetGetLogicalScanlineLength(pVbe, SCANWID_GET_MAX, 0, \
+					pixels, bytes, max)
+Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, 
+				    vbeScanwidthCommand command, int width,
+				     int *pixels, int *bytes, int *max);
+
+/*
+ * INT 7
+ */
+
+/* 16 bit code */
+Bool VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace);
+Bool VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y);
+
+/*
+ * INT 8
+ */
+
+/* if bits is 0, then it is a GET */
+int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits);
+
+/*
+ * INT 9
+ */
+
+/*
+ *  If getting a palette, the data argument is not used. It will return
+ * the data.
+ *  If setting a palette, it will return the pointer received on success,
+ * NULL on failure.
+ */
+CARD32 *VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num,
+			     CARD32 *data, Bool secondary, Bool wait_retrace);
+#define VBEFreePaletteData(data)	xfree(data)
+
+/*
+ * INT A
+ */
+
+typedef struct _VBEpmi {
+    int seg_tbl;
+    int tbl_off;
+    int tbl_len;
+} VBEpmi;
+
+VBEpmi *VBEGetVBEpmi(vbeInfoPtr pVbe);
+#define VESAFreeVBEpmi(pmi)	xfree(pmi)
+
+/* high level helper functions */
+
+typedef struct _vbeModeInfoRec {
+    int width;
+    int height;
+    int bpp;
+    int n;
+    struct _vbeModeInfoRec *next;
+} vbeModeInfoRec, *vbeModeInfoPtr;
+
+vbeModeInfoPtr    VBEBuildVbeModeList(vbeInfoPtr pVbe, 
+			    VbeInfoBlock *vbe);
+
+unsigned short VBECalcVbeModeIndex(vbeModeInfoPtr m, 
+				   DisplayModePtr mode, int bpp);
+
+typedef struct {
+    CARD8 *state;
+    CARD8 *pstate;
+    int statePage;
+    int stateSize;
+    int stateMode;
+} vbeSaveRestoreRec, *vbeSaveRestorePtr;
+
+void
+VBEVesaSaveRestore(vbeInfoPtr pVbe, vbeSaveRestorePtr vbe_sr,
+		   vbeSaveRestoreFunction function);
+
+int VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int Clock);
+Bool VBEDPMSSet(vbeInfoPtr pVbe, int mode);
+
+struct vbePanelID {
+    short hsize;
+    short vsize;
+    short fptype;
+    char redbpp;
+    char greenbpp;
+    char bluebpp;
+    char reservedbpp;
+    int reserved_offscreen_mem_size;
+    int reserved_offscreen_mem_pointer;
+    char reserved[14];
+};
+
+void VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data);
+struct vbePanelID *VBEReadPanelID(vbeInfoPtr pVbe);
+
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/vbeModes.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/vbeModes.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/vbeModes.h	(revision 9233)
@@ -0,0 +1,90 @@
+/*
+ * Copyright © 2002 David Dawes
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the author(s) shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in this Software without prior written authorization from
+ * the author(s).
+ *
+ * Authors: David Dawes <dawes@xfree86.org>
+ *
+ */
+
+#ifndef _VBE_MODES_H
+
+/*
+ * This is intended to be stored in the DisplayModeRec's private area.
+ * It includes all the information necessary to VBE information.
+ */
+typedef struct _VbeModeInfoData {
+    int mode;
+    VbeModeInfoBlock *data;
+    VbeCRTCInfoBlock *block;
+} VbeModeInfoData;
+
+#define V_DEPTH_1	0x001
+#define V_DEPTH_4	0x002
+#define V_DEPTH_8	0x004
+#define V_DEPTH_15	0x008
+#define V_DEPTH_16	0x010
+#define V_DEPTH_24_24	0x020
+#define V_DEPTH_24_32	0x040
+#define V_DEPTH_24	(V_DEPTH_24_24 | V_DEPTH_24_32)
+#define V_DEPTH_30	0x080
+#define V_DEPTH_32	0x100
+
+#define VBE_MODE_SUPPORTED(m)	(((m)->ModeAttributes & 0x01) != 0)
+#define VBE_MODE_COLOR(m)	(((m)->ModeAttributes & 0x08) != 0)
+#define VBE_MODE_GRAPHICS(m)	(((m)->ModeAttributes & 0x10) != 0)
+#define VBE_MODE_VGA(m)		(((m)->ModeAttributes & 0x40) == 0)
+#define VBE_MODE_LINEAR(m)	(((m)->ModeAttributes & 0x80) != 0 && \
+				 ((m)->PhysBasePtr != 0))
+
+#define VBE_MODE_USABLE(m, f)	(VBE_MODE_SUPPORTED(m) || \
+				 (f & V_MODETYPE_BAD)) && \
+				VBE_MODE_GRAPHICS(m) && \
+				(VBE_MODE_VGA(m) || VBE_MODE_LINEAR(m))
+				
+#define V_MODETYPE_VBE		0x01
+#define V_MODETYPE_VGA		0x02
+#define V_MODETYPE_BAD		0x04
+
+extern int VBEFindSupportedDepths(vbeInfoPtr pVbe, VbeInfoBlock *vbe,
+				  int *flags24, int modeTypes);
+extern DisplayModePtr VBEGetModePool(ScrnInfoPtr pScrn, vbeInfoPtr pVbe,
+					VbeInfoBlock *vbe, int modeTypes);
+extern void VBESetModeNames(DisplayModePtr pMode);
+extern void VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe);
+
+
+/*
+ * Note: These are alternatives to the standard helpers.  They should
+ * usually just wrap the standard helpers.
+ */
+extern int VBEValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
+			    char **modeNames, ClockRangePtr clockRanges,
+			    int *linePitches, int minPitch, int maxPitch,
+			    int pitchInc, int minHeight, int maxHeight,
+			    int virtualX, int virtualY, int apertureSize,
+			    LookupModeFlags strategy);
+extern void VBEPrintModes(ScrnInfoPtr scrp);
+
+#endif /* VBE_MODES_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/vgaHW.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/vgaHW.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/vgaHW.h	(revision 9233)
@@ -0,0 +1,236 @@
+
+
+/*
+ * Copyright (c) 1997,1998 The XFree86 Project, Inc.
+ *
+ * Loosely based on code bearing the following copyright:
+ *
+ *   Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
+ *
+ * Author: Dirk Hohndel
+ */
+
+#ifndef _VGAHW_H
+#define _VGAHW_H
+
+#include <X11/X.h>
+#include "misc.h"
+#include "input.h"
+#include "scrnintstr.h"
+#include "colormapst.h"
+
+#include "xf86str.h"
+#include "xf86Pci.h"
+
+#include "xf86DDC.h"
+
+#include "globals.h"
+#define DPMS_SERVER
+#include <X11/extensions/dpms.h>
+
+extern int vgaHWGetIndex(void);
+
+/*
+ * access macro
+ */
+#define VGAHWPTR(p) ((vgaHWPtr)((p)->privates[vgaHWGetIndex()].ptr))
+
+/* Standard VGA registers */
+#define VGA_ATTR_INDEX		0x3C0
+#define VGA_ATTR_DATA_W		0x3C0
+#define VGA_ATTR_DATA_R		0x3C1
+#define VGA_IN_STAT_0		0x3C2		/* read */
+#define VGA_MISC_OUT_W		0x3C2		/* write */
+#define VGA_ENABLE		0x3C3
+#define VGA_SEQ_INDEX		0x3C4
+#define VGA_SEQ_DATA		0x3C5
+#define VGA_DAC_MASK		0x3C6
+#define VGA_DAC_READ_ADDR	0x3C7
+#define VGA_DAC_WRITE_ADDR	0x3C8
+#define VGA_DAC_DATA		0x3C9
+#define VGA_FEATURE_R		0x3CA		/* read */
+#define VGA_MISC_OUT_R		0x3CC		/* read */
+#define VGA_GRAPH_INDEX		0x3CE
+#define VGA_GRAPH_DATA		0x3CF
+
+#define VGA_IOBASE_MONO		0x3B0
+#define VGA_IOBASE_COLOR	0x3D0
+
+#define VGA_CRTC_INDEX_OFFSET	0x04
+#define VGA_CRTC_DATA_OFFSET	0x05
+#define VGA_IN_STAT_1_OFFSET	0x0A		/* read */
+#define VGA_FEATURE_W_OFFSET	0x0A		/* write */
+
+/* default number of VGA registers stored internally */
+#define VGA_NUM_CRTC 25
+#define VGA_NUM_SEQ 5
+#define VGA_NUM_GFX 9
+#define VGA_NUM_ATTR 21
+
+/* Flags for vgaHWSave() and vgaHWRestore() */
+#define VGA_SR_MODE		0x01
+#define VGA_SR_FONTS		0x02
+#define VGA_SR_CMAP		0x04
+#define VGA_SR_ALL		(VGA_SR_MODE | VGA_SR_FONTS | VGA_SR_CMAP)
+
+/* Defaults for the VGA memory window */
+#define VGA_DEFAULT_PHYS_ADDR	0xA0000
+#define VGA_DEFAULT_MEM_SIZE	(64 * 1024)
+
+/*
+ * vgaRegRec contains settings of standard VGA registers.
+ */
+typedef struct {
+    unsigned char MiscOutReg;     /* */
+    unsigned char *CRTC;       /* Crtc Controller */
+    unsigned char *Sequencer;   /* Video Sequencer */
+    unsigned char *Graphics;    /* Video Graphics */
+    unsigned char *Attribute;  /* Video Atribute */
+    unsigned char DAC[768];       /* Internal Colorlookuptable */
+    unsigned char numCRTC;	/* number of CRTC registers, def=VGA_NUM_CRTC */
+    unsigned char numSequencer;	/* number of seq registers, def=VGA_NUM_SEQ */
+    unsigned char numGraphics;	/* number of gfx registers, def=VGA_NUM_GFX */
+    unsigned char numAttribute;	/* number of attr registers, def=VGA_NUM_ATTR */
+} vgaRegRec, *vgaRegPtr;
+
+typedef struct _vgaHWRec *vgaHWPtr;
+
+typedef void (*vgaHWWriteIndexProcPtr)(vgaHWPtr hwp, CARD8 indx, CARD8 value);
+typedef CARD8 (*vgaHWReadIndexProcPtr)(vgaHWPtr hwp, CARD8 indx);
+typedef void (*vgaHWWriteProcPtr)(vgaHWPtr hwp, CARD8 value);
+typedef CARD8 (*vgaHWReadProcPtr)(vgaHWPtr hwp);
+typedef void (*vgaHWMiscProcPtr)(vgaHWPtr hwp);
+
+
+/*
+ * vgaHWRec contains per-screen information required by the vgahw module.
+ *
+ * Note, the palette referred to by the paletteEnabled, enablePalette and
+ * disablePalette is the 16-entry (+overscan) EGA-compatible palette accessed
+ * via the first 17 attribute registers and not the main 8-bit palette.
+ */
+typedef struct _vgaHWRec {
+    pointer			Base;		/* Address of "VGA" memory */
+    int				MapSize;	/* Size of "VGA" memory */
+    unsigned long		MapPhys;	/* phys location of VGA mem */
+    int				IOBase;		/* I/O Base address */
+    CARD8 * 			MMIOBase;	/* Pointer to MMIO start */
+    int				MMIOOffset;	/* base + offset + vgareg
+						   = mmioreg */
+    pointer			FontInfo1;	/* save area for fonts in
+							plane 2 */ 
+    pointer			FontInfo2;	/* save area for fonts in	
+							plane 3 */ 
+    pointer			TextInfo;	/* save area for text */ 
+    vgaRegRec			SavedReg;	/* saved registers */
+    vgaRegRec			ModeReg;	/* register settings for
+							current mode */
+    Bool			ShowOverscan;
+    Bool			paletteEnabled;
+    Bool			cmapSaved;
+    ScrnInfoPtr			pScrn;
+    vgaHWWriteIndexProcPtr	writeCrtc;
+    vgaHWReadIndexProcPtr	readCrtc;
+    vgaHWWriteIndexProcPtr	writeGr;
+    vgaHWReadIndexProcPtr	readGr;
+    vgaHWReadProcPtr            readST00;
+    vgaHWReadProcPtr            readST01;
+    vgaHWReadProcPtr            readFCR;
+    vgaHWWriteProcPtr           writeFCR;
+    vgaHWWriteIndexProcPtr	writeAttr;
+    vgaHWReadIndexProcPtr	readAttr;
+    vgaHWWriteIndexProcPtr	writeSeq;
+    vgaHWReadIndexProcPtr	readSeq;
+    vgaHWWriteProcPtr		writeMiscOut;
+    vgaHWReadProcPtr		readMiscOut;
+    vgaHWMiscProcPtr		enablePalette;
+    vgaHWMiscProcPtr		disablePalette;
+    vgaHWWriteProcPtr		writeDacMask;
+    vgaHWReadProcPtr		readDacMask;
+    vgaHWWriteProcPtr		writeDacWriteAddr;
+    vgaHWWriteProcPtr		writeDacReadAddr;
+    vgaHWWriteProcPtr		writeDacData;
+    vgaHWReadProcPtr		readDacData;
+    pointer                     ddc;
+    IOADDRESS			PIOOffset;	/* offset + vgareg
+						   = pioreg */
+    vgaHWReadProcPtr		readEnable;
+    vgaHWWriteProcPtr		writeEnable;
+    struct pci_device          *dev;
+} vgaHWRec;
+
+/* Some macros that VGA drivers can use in their ChipProbe() function */
+#define VGAHW_GET_IOBASE()	((inb(VGA_MISC_OUT_R) & 0x01) ?		      \
+					 VGA_IOBASE_COLOR : VGA_IOBASE_MONO)
+
+#define OVERSCAN 0x11		/* Index of OverScan register */
+
+/* Flags that define how overscan correction should take place */
+#define KGA_FIX_OVERSCAN  1   /* overcan correction required */
+#define KGA_ENABLE_ON_ZERO 2  /* if possible enable display at beginning */
+                              /* of next scanline/frame                  */
+#define KGA_BE_TOT_DEC 4      /* always fix problem by setting blank end */
+			      /* to total - 1                            */
+#define BIT_PLANE 3		/* Which plane we write to in mono mode */
+#define BITS_PER_GUN 6
+#define COLORMAP_SIZE 256
+
+#if defined(__powerpc__) || defined(__arm__) || defined(__s390__)
+#define DACDelay(hw) /* No legacy VGA support */
+#else
+#define DACDelay(hw)							      \
+	do {								      \
+	    (void)inb((hw)->PIOOffset + (hw)->IOBase + VGA_IN_STAT_1_OFFSET); \
+	    (void)inb((hw)->PIOOffset + (hw)->IOBase + VGA_IN_STAT_1_OFFSET); \
+	} while (0)
+#endif
+
+/* Function Prototypes */
+
+/* vgaHW.c */
+
+typedef void vgaHWProtectProc(ScrnInfoPtr, Bool);
+typedef void vgaHWBlankScreenProc(ScrnInfoPtr, Bool);
+
+void vgaHWSetStdFuncs(vgaHWPtr hwp);
+void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset);
+void vgaHWProtect(ScrnInfoPtr pScrn, Bool on);
+vgaHWProtectProc *vgaHWProtectWeak(void);
+Bool vgaHWSaveScreen(ScreenPtr pScreen, int mode);
+void vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on);
+vgaHWBlankScreenProc *vgaHWBlankScreenWeak(void);
+void vgaHWSeqReset(vgaHWPtr hwp, Bool start);
+void vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore);
+void vgaHWRestoreMode(ScrnInfoPtr scrninfp, vgaRegPtr restore);
+void vgaHWRestoreColormap(ScrnInfoPtr scrninfp, vgaRegPtr restore);
+void vgaHWRestore(ScrnInfoPtr scrninfp, vgaRegPtr restore, int flags);
+void vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save);
+void vgaHWSaveMode(ScrnInfoPtr scrninfp, vgaRegPtr save);
+void vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save);
+void vgaHWSave(ScrnInfoPtr scrninfp, vgaRegPtr save, int flags);
+Bool vgaHWInit(ScrnInfoPtr scrnp, DisplayModePtr mode);
+Bool vgaHWSetRegCounts(ScrnInfoPtr scrp, int numCRTC, int numSequencer,
+                  	int numGraphics, int numAttribute);
+Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src);
+Bool vgaHWGetHWRec(ScrnInfoPtr scrp);
+void vgaHWFreeHWRec(ScrnInfoPtr scrp);
+Bool vgaHWMapMem(ScrnInfoPtr scrp);
+void vgaHWUnmapMem(ScrnInfoPtr scrp);
+void vgaHWGetIOBase(vgaHWPtr hwp);
+void vgaHWLock(vgaHWPtr hwp);
+void vgaHWUnlock(vgaHWPtr hwp);
+void vgaHWEnable(vgaHWPtr hwp);
+void vgaHWDisable(vgaHWPtr hwp);
+void vgaHWDPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags);
+Bool vgaHWHandleColormaps(ScreenPtr pScreen);
+void vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed);
+CARD32 vgaHWHBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, 
+	       unsigned int Flags);
+CARD32 vgaHWVBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, 
+	       unsigned int Flags);
+Bool vgaHWAllocDefaultRegs(vgaRegPtr regp);
+
+DDC1SetSpeedProc vgaHWddc1SetSpeedWeak(void);
+SaveScreenProcPtr vgaHWSaveScreenWeak(void);
+
+#endif /* _VGAHW_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/window.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/window.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/window.h	(revision 9233)
@@ -0,0 +1,259 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include "misc.h"
+#include "region.h"
+#include "screenint.h"
+#include <X11/Xproto.h>
+
+#define TOTALLY_OBSCURED 0
+#define UNOBSCURED 1
+#define OBSCURED 2
+
+#define VisibilityNotViewable	3
+
+/* return values for tree-walking callback procedures */
+#define WT_STOPWALKING		0
+#define WT_WALKCHILDREN		1
+#define WT_DONTWALKCHILDREN	2
+#define WT_NOMATCH 3
+#define NullWindow ((WindowPtr) 0)
+
+typedef struct _BackingStore *BackingStorePtr;
+typedef struct _Window *WindowPtr;
+
+typedef int (*VisitWindowProcPtr)(
+    WindowPtr /*pWin*/,
+    pointer /*data*/);
+
+extern int TraverseTree(
+    WindowPtr /*pWin*/,
+    VisitWindowProcPtr /*func*/,
+    pointer /*data*/);
+
+extern int WalkTree(
+    ScreenPtr /*pScreen*/,
+    VisitWindowProcPtr /*func*/,
+    pointer /*data*/);
+
+extern Bool CreateRootWindow(
+    ScreenPtr /*pScreen*/);
+
+extern void InitRootWindow(
+    WindowPtr /*pWin*/);
+
+typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
+
+void RegisterRealChildHeadProc (RealChildHeadProc proc);
+
+extern WindowPtr RealChildHead(
+    WindowPtr /*pWin*/);
+
+extern WindowPtr CreateWindow(
+    Window /*wid*/,
+    WindowPtr /*pParent*/,
+    int /*x*/,
+    int /*y*/,
+    unsigned int /*w*/,
+    unsigned int /*h*/,
+    unsigned int /*bw*/,
+    unsigned int /*class*/,
+    Mask /*vmask*/,
+    XID* /*vlist*/,
+    int /*depth*/,
+    ClientPtr /*client*/,
+    VisualID /*visual*/,
+    int* /*error*/);
+
+extern int DeleteWindow(
+    pointer /*pWin*/,
+    XID /*wid*/);
+
+extern int DestroySubwindows(
+    WindowPtr /*pWin*/,
+    ClientPtr /*client*/);
+
+/* Quartz support on Mac OS X uses the HIToolbox
+   framework whose ChangeWindowAttributes function conflicts here. */
+#ifdef __APPLE__
+#define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
+#endif
+extern int ChangeWindowAttributes(
+    WindowPtr /*pWin*/,
+    Mask /*vmask*/,
+    XID* /*vlist*/,
+    ClientPtr /*client*/);
+
+/* Quartz support on Mac OS X uses the HIToolbox
+   framework whose GetWindowAttributes function conflicts here. */
+#ifdef __APPLE__
+#define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
+extern void Darwin_X_GetWindowAttributes(
+#else
+extern void GetWindowAttributes(
+#endif
+    WindowPtr /*pWin*/,
+    ClientPtr /*client*/,
+    xGetWindowAttributesReply* /* wa */);
+
+extern RegionPtr CreateUnclippedWinSize(
+    WindowPtr /*pWin*/);
+
+extern void GravityTranslate(
+    int /*x*/,
+    int /*y*/,
+    int /*oldx*/,
+    int /*oldy*/,
+    int /*dw*/,
+    int /*dh*/,
+    unsigned /*gravity*/,
+    int* /*destx*/,
+    int* /*desty*/);
+
+extern int ConfigureWindow(
+    WindowPtr /*pWin*/,
+    Mask /*mask*/,
+    XID* /*vlist*/,
+    ClientPtr /*client*/);
+
+extern int CirculateWindow(
+    WindowPtr /*pParent*/,
+    int /*direction*/,
+    ClientPtr /*client*/);
+
+extern int ReparentWindow(
+    WindowPtr /*pWin*/,
+    WindowPtr /*pParent*/,
+    int /*x*/,
+    int /*y*/,
+    ClientPtr /*client*/);
+
+extern int MapWindow(
+    WindowPtr /*pWin*/,
+    ClientPtr /*client*/);
+
+extern void MapSubwindows(
+    WindowPtr /*pParent*/,
+    ClientPtr /*client*/);
+
+extern int UnmapWindow(
+    WindowPtr /*pWin*/,
+    Bool /*fromConfigure*/);
+
+extern void UnmapSubwindows(
+    WindowPtr /*pWin*/);
+
+extern void HandleSaveSet(
+    ClientPtr /*client*/);
+
+extern Bool PointInWindowIsVisible(
+    WindowPtr /*pWin*/,
+    int /*x*/,
+    int /*y*/);
+
+extern RegionPtr NotClippedByChildren(
+    WindowPtr /*pWin*/);
+
+extern void SendVisibilityNotify(
+    WindowPtr /*pWin*/);
+
+extern int dixSaveScreens(
+    ClientPtr client,
+    int on,
+    int mode);
+
+extern int SaveScreens(
+    int on,
+    int mode);
+
+extern WindowPtr FindWindowWithOptional(
+    WindowPtr /*w*/);
+
+extern void CheckWindowOptionalNeed(
+    WindowPtr /*w*/);
+
+extern Bool MakeWindowOptional(
+    WindowPtr /*pWin*/);
+
+extern WindowPtr MoveWindowInStack(
+    WindowPtr /*pWin*/,
+    WindowPtr /*pNextSib*/);
+
+void SetWinSize(
+    WindowPtr /*pWin*/);
+
+void SetBorderSize(
+    WindowPtr /*pWin*/);
+
+void ResizeChildrenWinSize(
+    WindowPtr /*pWin*/,
+    int /*dx*/,
+    int /*dy*/,
+    int /*dw*/,
+    int /*dh*/);
+
+extern void ShapeExtensionInit(void);
+
+extern void SendShapeNotify(
+    WindowPtr /* pWin */,
+    int /* which */ );
+
+extern RegionPtr CreateBoundingShape(
+    WindowPtr /* pWin */ );
+
+extern RegionPtr CreateClipShape(
+    WindowPtr /* pWin */ );
+
+extern void DisableMapUnmapEvents(
+    WindowPtr /* pWin */ );
+extern void EnableMapUnmapEvents(
+    WindowPtr /* pWin */ );
+
+#endif /* WINDOW_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/windowstr.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/windowstr.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/windowstr.h	(revision 9233)
@@ -0,0 +1,253 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef WINDOWSTRUCT_H
+#define WINDOWSTRUCT_H
+
+#include "window.h"
+#include "pixmapstr.h"
+#include "regionstr.h"
+#include "cursor.h"
+#include "property.h"
+#include "resource.h"	/* for ROOT_WINDOW_ID_BASE */
+#include "dix.h"
+#include "privates.h"
+#include "miscstruct.h"
+#include <X11/Xprotostr.h>
+#include "opaque.h"
+
+#define GuaranteeNothing	0
+#define GuaranteeVisBack	1
+
+#define SameBackground(as, a, bs, b)				\
+    ((as) == (bs) && ((as) == None ||				\
+		      (as) == ParentRelative ||			\
+ 		      SamePixUnion(a,b,as == BackgroundPixel)))
+
+#define SameBorder(as, a, bs, b)				\
+    EqualPixUnion(as, a, bs, b)
+
+typedef struct _WindowOpt {
+    VisualID		visual;		   /* default: same as parent */
+    CursorPtr		cursor;		   /* default: window.cursorNone */
+    Colormap		colormap;	   /* default: same as parent */
+    Mask		dontPropagateMask; /* default: window.dontPropagate */
+    Mask		otherEventMasks;   /* default: 0 */
+    struct _OtherClients *otherClients;	   /* default: NULL */
+    struct _GrabRec	*passiveGrabs;	   /* default: NULL */
+    PropertyPtr		userProps;	   /* default: NULL */
+    unsigned long	backingBitPlanes;  /* default: ~0L */
+    unsigned long	backingPixel;	   /* default: 0 */
+#ifdef SHAPE
+    RegionPtr		boundingShape;	   /* default: NULL */
+    RegionPtr		clipShape;	   /* default: NULL */
+    RegionPtr		inputShape;	   /* default: NULL */
+#endif
+#ifdef XINPUT
+    struct _OtherInputMasks *inputMasks;   /* default: NULL */
+#endif
+} WindowOptRec, *WindowOptPtr;
+
+#define BackgroundPixel	    2L
+#define BackgroundPixmap    3L
+
+/*
+ * The redirectDraw field can have one of three values:
+ *
+ *  RedirectDrawNone
+ *	A normal window; painted into the same pixmap as the parent
+ *	and clipping parent and siblings to its geometry. These
+ *	windows get a clip list equal to the intersection of their
+ *	geometry with the parent geometry, minus the geometry
+ *	of overlapping None and Clipped siblings.
+ *  RedirectDrawAutomatic
+ *	A redirected window which clips parent and sibling drawing.
+ *	Contents for these windows are manage inside the server.
+ *	These windows get an internal clip list equal to their
+ *	geometry.
+ *  RedirectDrawManual
+ *	A redirected window which does not clip parent and sibling
+ *	drawing; the window must be represented within the parent
+ *	geometry by the client performing the redirection management.
+ *	Contents for these windows are managed outside the server.
+ *	These windows get an internal clip list equal to their
+ *	geometry.
+ */
+
+#define RedirectDrawNone	0
+#define RedirectDrawAutomatic	1
+#define RedirectDrawManual	2
+
+typedef struct _Window {
+    DrawableRec		drawable;
+    PrivateRec		*devPrivates;
+    WindowPtr		parent;		/* ancestor chain */
+    WindowPtr		nextSib;	/* next lower sibling */
+    WindowPtr		prevSib;	/* next higher sibling */
+    WindowPtr		firstChild;	/* top-most child */
+    WindowPtr		lastChild;	/* bottom-most child */
+    RegionRec		clipList;	/* clipping rectangle for output */
+    RegionRec		borderClip;	/* NotClippedByChildren + border */
+    union _Validate	*valdata;
+    RegionRec		winSize;
+    RegionRec		borderSize;
+    DDXPointRec		origin;		/* position relative to parent */
+    unsigned short	borderWidth;
+    unsigned short	deliverableEvents;
+    Mask		eventMask;
+    PixUnion		background;
+    PixUnion		border;
+    pointer		backStorage;	/* null when BS disabled */
+    WindowOptPtr	optional;
+    unsigned		backgroundState:2; /* None, Relative, Pixel, Pixmap */
+    unsigned		borderIsPixel:1;
+    unsigned		cursorIsNone:1;	/* else real cursor (might inherit) */
+    unsigned		backingStore:2;
+    unsigned		saveUnder:1;
+    unsigned		DIXsaveUnder:1;
+    unsigned		bitGravity:4;
+    unsigned		winGravity:4;
+    unsigned		overrideRedirect:1;
+    unsigned		visibility:2;
+    unsigned		mapped:1;
+    unsigned		realized:1;	/* ancestors are all mapped */
+    unsigned		viewable:1;	/* realized && InputOutput */
+    unsigned		dontPropagate:3;/* index into DontPropagateMasks */
+    unsigned		forcedBS:1;	/* system-supplied backingStore */
+    unsigned		redirectDraw:2;	/* COMPOSITE rendering redirect */
+    unsigned		forcedBG:1;	/* must have an opaque background */
+} WindowRec;
+
+/*
+ * Ok, a bunch of macros for accessing the optional record
+ * fields (or filling the appropriate default value)
+ */
+
+extern Mask	    DontPropagateMasks[];
+
+#define wTrackParent(w,field)	((w)->optional ? \
+				    (w)->optional->field \
+ 				 : FindWindowWithOptional(w)->optional->field)
+#define wUseDefault(w,field,def)	((w)->optional ? \
+				    (w)->optional->field \
+				 : def)
+
+#define wVisual(w)		wTrackParent(w, visual)
+#define wCursor(w)		((w)->cursorIsNone ? None : wTrackParent(w, cursor))
+#define wColormap(w)		((w)->drawable.class == InputOnly ? None : wTrackParent(w, colormap))
+#define wDontPropagateMask(w)	wUseDefault(w, dontPropagateMask, DontPropagateMasks[(w)->dontPropagate])
+#define wOtherEventMasks(w)	wUseDefault(w, otherEventMasks, 0)
+#define wOtherClients(w)	wUseDefault(w, otherClients, NULL)
+#ifdef XINPUT
+#define wOtherInputMasks(w)	wUseDefault(w, inputMasks, NULL)
+#else
+#define wOtherInputMasks(w)	NULL
+#endif
+#define wPassiveGrabs(w)	wUseDefault(w, passiveGrabs, NULL)
+#define wUserProps(w)		wUseDefault(w, userProps, NULL)
+#define wBackingBitPlanes(w)	wUseDefault(w, backingBitPlanes, ~0L)
+#define wBackingPixel(w)	wUseDefault(w, backingPixel, 0)
+#ifdef SHAPE
+#define wBoundingShape(w)	wUseDefault(w, boundingShape, NULL)
+#define wClipShape(w)		wUseDefault(w, clipShape, NULL)
+#define wInputShape(w)          wUseDefault(w, inputShape, NULL)
+#endif
+#define wClient(w)		(clients[CLIENT_ID((w)->drawable.id)])
+#define wBorderWidth(w)		((int) (w)->borderWidth)
+
+/* true when w needs a border drawn. */
+
+#ifdef SHAPE
+#define HasBorder(w)	((w)->borderWidth || wClipShape(w))
+#else
+#define HasBorder(w)	((w)->borderWidth)
+#endif
+
+typedef struct _ScreenSaverStuff {
+    WindowPtr pWindow;
+    XID       wid;
+    char      blanked;
+    Bool      (*ExternalScreenSaver)(
+	ScreenPtr	/*pScreen*/,
+	int		/*xstate*/,
+	Bool		/*force*/);
+} ScreenSaverStuffRec, *ScreenSaverStuffPtr;
+
+#define SCREEN_IS_BLANKED   0
+#define SCREEN_ISNT_SAVED   1
+#define SCREEN_IS_TILED     2
+#define SCREEN_IS_BLACK	    3
+
+#define HasSaverWindow(i)   (savedScreenInfo[i].pWindow != NullWindow)
+
+extern int screenIsSaved;
+extern ScreenSaverStuffRec savedScreenInfo[MAXSCREENS];
+
+/*
+ * this is the configuration parameter "NO_BACK_SAVE"
+ * it means that any existant backing store should not 
+ * be used to implement save unders.
+ */
+
+#ifndef NO_BACK_SAVE
+#define DO_SAVE_UNDERS(pWin)	((pWin)->drawable.pScreen->saveUnderSupport ==\
+				 USE_DIX_SAVE_UNDERS)
+/*
+ * saveUnderSupport is set to this magic value when using DIXsaveUnders
+ */
+
+#define USE_DIX_SAVE_UNDERS	0x40
+#endif
+
+extern int numSaveUndersViewable;
+extern int deltaSaveUndersViewable;
+
+#ifdef XEVIE
+extern WindowPtr xeviewin;
+#endif
+
+#endif /* WINDOWSTRUCT_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf1bpp.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf1bpp.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf1bpp.h	(revision 9233)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 1994-1998 The XFree86 Project, Inc.  All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the XFree86 Project shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in this Software without prior written authorization from the
+ * XFree86 Project.
+ */
+
+#ifndef __XF1BPP_H__
+#define __XF1BPP_H__
+
+#define MFB_PROTOTYPES_ONLY
+#include "mfbmap.h"
+#include "mfb.h"
+#include "mfbunmap.h"
+#undef MFB_PROTOTYPES_ONLY
+
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf4bpp.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf4bpp.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf4bpp.h	(revision 9233)
@@ -0,0 +1,622 @@
+
+#ifndef __XF4BPP_H__
+#define __XF4BPP_H__
+
+
+#include "windowstr.h"
+#include "gcstruct.h"
+#include "colormapst.h"
+#include <X11/fonts/fontstruct.h>
+#ifndef PixelType
+#define PixelType CARD32
+#endif
+
+/* ppcArea.c */
+void xf4bppFillArea(
+    WindowPtr,
+    int,
+    BoxPtr,
+    GCPtr
+);
+
+/* ppcClip.c */
+void xf4bppDestroyClip(
+    GCPtr
+);
+void xf4bppChangeClip(
+    GCPtr,
+    int,
+    pointer,
+    int
+);
+void xf4bppCopyClip(
+    GCPtr,
+    GCPtr
+);
+
+/* ppcCpArea.c */
+RegionPtr xf4bppCopyArea(
+    DrawablePtr,
+    DrawablePtr,
+    GCPtr,
+    int,
+    int,
+    int,
+    int,
+    int,
+    int
+);
+
+/* ppcDepth.c */
+Bool xf4bppDepthOK(
+    DrawablePtr,
+    int
+);
+
+/* ppcFillRct.c */
+void xf4bppPolyFillRect(
+    DrawablePtr,
+    GCPtr,
+    int,
+    xRectangle *
+);
+
+/* ppcWindowFS.c */
+void xf4bppSolidWindowFS(
+    DrawablePtr,
+    GCPtr,
+    int,
+    DDXPointPtr,
+    int *,
+    int
+);
+void xf4bppStippleWindowFS(
+    DrawablePtr,
+    GCPtr,
+    int,
+    DDXPointPtr,
+    int *,
+    int
+);
+void xf4bppOpStippleWindowFS(
+    DrawablePtr,
+    GCPtr,
+    int,
+    DDXPointPtr,
+    int *,
+    int
+);
+void xf4bppTileWindowFS(
+    DrawablePtr,
+    GCPtr,
+    int,
+    DDXPointPtr,
+    int *,
+    int
+);
+
+/* xf4bppPixmapFS.c */
+void xf4bppSolidPixmapFS(
+    DrawablePtr,
+    GCPtr,
+    int,
+    DDXPointPtr,
+    int *,
+    int
+);
+void xf4bppStipplePixmapFS(
+    DrawablePtr,
+    GCPtr,
+    int,
+    DDXPointPtr,
+    int *,
+    int
+);
+void xf4bppOpStipplePixmapFS(
+    DrawablePtr,
+    GCPtr,
+    int,
+    DDXPointPtr,
+    int *,
+    int
+);
+void xf4bppTilePixmapFS(
+    DrawablePtr,
+    GCPtr,
+    int,
+    DDXPointPtr,
+    int *,
+    int
+);
+
+/* ppcGC.c */
+Bool xf4bppCreateGC(
+    GCPtr
+);
+
+/* ppcGetSp.c */
+void xf4bppGetSpans(
+    DrawablePtr,
+    int,
+    DDXPointPtr,
+    int *,
+    int,
+    char *
+);
+
+/* ppcImg.c */
+void xf4bppGetImage(
+    DrawablePtr,
+    int,
+    int,
+    int,
+    int,
+    unsigned int,
+    unsigned long,
+    char *
+);
+
+/* ppcLine.c */
+void xf4bppScrnZeroLine(
+    DrawablePtr,
+    GCPtr,
+    int,
+    int,
+    DDXPointPtr
+);
+void xf4bppScrnZeroDash(
+    DrawablePtr,
+    GCPtr,
+    int,
+    int,
+    DDXPointPtr
+);
+void xf4bppScrnZeroSegs(
+    DrawablePtr,
+    GCPtr,
+    int,
+    xSegment *
+);
+
+/* ppcPixmap.c */
+PixmapPtr xf4bppCreatePixmap(
+    ScreenPtr,
+    int,
+    int,
+    int,
+    unsigned
+);
+PixmapPtr xf4bppCopyPixmap(
+    PixmapPtr
+);
+
+/* ppcPolyPnt.c */
+void xf4bppPolyPoint(
+    DrawablePtr,
+    GCPtr,
+    int,
+    int,
+    xPoint *
+);
+
+/* ppcPolyRec.c */
+void xf4bppPolyRectangle(
+    DrawablePtr,
+    GCPtr,
+    int,
+    xRectangle *
+);
+
+/* ppcQuery.c */
+void xf4bppQueryBestSize(
+    int,
+    unsigned short *,
+    unsigned short *,
+    ScreenPtr
+);
+
+/* ppcRslvC.c */
+void xf4bppResolveColor(
+    unsigned short *,
+    unsigned short *,
+    unsigned short *,
+    VisualPtr
+);
+Bool xf4bppInitializeColormap(
+    ColormapPtr
+);
+
+/* ppcSetSp.c */
+void xf4bppSetSpans(
+    DrawablePtr,
+    GCPtr,
+    char *,
+    DDXPointPtr,
+    int *,
+    int,
+    int
+);
+
+/* ppcWindow.c */
+void xf4bppCopyWindow(
+    WindowPtr,
+    DDXPointRec,
+    RegionPtr
+);
+Bool xf4bppPositionWindow(
+    WindowPtr,
+    int,
+    int
+);
+Bool xf4bppUnrealizeWindow(
+    WindowPtr,
+    int,
+    int
+);
+Bool xf4bppDestroyWindow(
+    WindowPtr
+);
+Bool xf4bppCreateWindowForXYhardware(
+    WindowPtr
+);
+
+/* emulOpStip.c */
+void xf4bppOpaqueStipple(
+    WindowPtr,
+    PixmapPtr,
+    unsigned long int,
+    unsigned long int,
+    int,
+    unsigned long int,
+    int,
+    int,
+    int,
+    int,
+    int,
+    int
+);
+
+/* emulRepAre.c */
+void xf4bppReplicateArea(
+    WindowPtr,
+    int,
+    int,
+    int,
+    int,
+    int,
+    int,
+    int
+);
+
+/* emulTile.c */
+void xf4bppTileRect(
+    WindowPtr,
+    PixmapPtr,
+    const int,
+    const unsigned long int,
+    int,
+    int,
+    int,
+    int,
+    int,
+    int
+);
+
+/* vgaGC.c */
+Mask xf4bppChangeWindowGC(
+    GCPtr,
+    Mask
+);
+
+/* vgaBitBlt.c */
+void xf4bppBitBlt(
+    WindowPtr,
+    int,
+    int,
+    int,
+    int,
+    int,
+    int,
+    int,
+    int
+);
+
+/* vgaImages.c */
+void xf4bppDrawColorImage(
+    WindowPtr,
+    int,
+    int,
+    int,
+    int,
+    unsigned char *,
+    int,
+    const int,
+    const unsigned long int
+);
+void xf4bppReadColorImage(
+    WindowPtr,
+    int,
+    int,
+    int,
+    int,
+    unsigned char *,
+    int
+);
+
+/* vgaLine.c */
+void xf4bppHorzLine(
+    WindowPtr,
+    unsigned long int,
+    int,
+    unsigned long int,
+    int,
+    int,
+    int
+);
+void xf4bppVertLine(
+    WindowPtr,
+    unsigned long int,
+    int,
+    unsigned long int,
+    int,
+    int,
+    int
+);
+void xf4bppBresLine(
+    WindowPtr,
+    unsigned long int,
+    int,
+    unsigned long int,
+    int,
+    int,
+    int,
+    int,
+    int,
+    int,
+    int,
+    int,
+    unsigned long int
+);
+
+/* vgaStipple.c */
+void xf4bppFillStipple(
+    WindowPtr,
+    const PixmapPtr,
+    unsigned long int,
+    const int,
+    unsigned long int,
+    int,
+    int,
+    int,
+    int,
+    const int,
+    const int
+);
+
+/* vgaSolid.c */
+void xf4bppFillSolid(
+    WindowPtr,
+    unsigned long int,
+    const int,
+    unsigned long int,
+    int,
+    const int,
+    int,
+    const int
+);
+
+/* offscreen.c */
+void xf4bppOffBitBlt(
+    WindowPtr,
+    const int,
+    const int,
+    int,
+    int,
+    int,
+    int,
+    int,
+    int
+);
+void xf4bppOffDrawColorImage(
+    WindowPtr,
+    int,
+    int,
+    int,
+    int,
+    unsigned char *,
+    int,
+    const int,
+    const unsigned long int
+);
+void xf4bppOffReadColorImage(
+    WindowPtr,
+    int,
+    int,
+    int,
+    int,
+    unsigned char *,
+    int
+);
+void xf4bppOffFillSolid(
+    WindowPtr,
+    unsigned long int,
+    const int,
+    unsigned long int,
+    int,
+    const int,
+    int,
+    const int
+);
+void xf4bppOffDrawMonoImage(
+    WindowPtr,
+    unsigned char *,
+    int,
+    int,
+    int,
+    int,
+    unsigned long int,
+    int,
+    unsigned long int
+);
+void xf4bppOffFillStipple(
+    WindowPtr,
+    const PixmapPtr,
+    unsigned long int,
+    const int,
+    unsigned long int,
+    int,
+    int,
+    int,
+    int,
+    const int,
+    const int
+);
+
+/* mfbimggblt.c */
+void xf4bppImageGlyphBlt(
+    DrawablePtr,
+    GCPtr,
+    int,
+    int,
+    unsigned int,
+    CharInfoPtr *,
+    pointer
+);
+
+/* wm3.c */
+int wm3_set_regs(
+    GC *
+);
+
+/* ppcIO.c */
+void xf4bppNeverCalled(
+    void
+);
+Bool xf4bppScreenInit(
+    ScreenPtr,
+    pointer,
+    int,
+    int,
+    int,
+    int,
+    int
+);
+
+/* mfbfillarc.c */
+void xf4bppPolyFillArc(
+    DrawablePtr,
+    GCPtr,
+    int,
+    xArc *
+);
+
+/* mfbzerarc.c */
+void xf4bppZeroPolyArc(
+    DrawablePtr,
+    GCPtr,
+    int,
+    xArc *
+);
+
+/* mfbline.c */
+void xf4bppSegmentSS (
+    DrawablePtr,
+    GCPtr,
+    int,
+    xSegment *
+);
+void xf4bppLineSS (
+    DrawablePtr,
+    GCPtr,
+    int,
+    int,
+    DDXPointPtr
+);
+void xf4bppSegmentSD (
+    DrawablePtr,
+    GCPtr,
+    int,
+    xSegment *
+);
+void xf4bppLineSD (
+    DrawablePtr,
+    GCPtr,
+    int,
+    int,
+    DDXPointPtr
+);
+
+/* mfbbres.c */
+void xf4bppBresS(
+	PixelType *,
+	int,
+	int,
+	int,
+	int,
+	int,
+	int,
+	int,
+	int,
+	int,
+	int
+);
+
+/* mfbbresd.c */
+void xf4bppBresD(
+	DrawablePtr,
+	int, int,
+	int *,
+	unsigned char *,
+	int,
+	int *,
+	int,
+	PixelType *,
+	int, int, int, int, int, int,
+	int, int,
+	int, int
+);
+
+/* mfbhrzvert.c */
+void xf4bppHorzS(
+	PixelType *,
+	int,
+	int,
+	int,
+	int
+);
+void xf4bppVertS(
+	PixelType *,
+	int,
+	int,
+	int,
+	int
+);
+
+#ifdef PC98_EGC
+
+/* egc_asm.s */
+unsigned char getbits_x(
+	int,
+	unsigned int,
+	pointer,
+	unsigned int
+);
+void wcopyr(
+	pointer,
+	pointer,
+	int,
+	pointer
+);
+void wcopyl(
+	pointer,
+	pointer,
+	int,
+	pointer
+);
+unsigned long int read8Z(
+	pointer
+);
+
+#endif /* PC98_EGC */
+
+#endif /* __XF4BPP_H__ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86.h	(revision 9233)
@@ -0,0 +1,429 @@
+
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains declarations for public XFree86 functions and variables,
+ * and definitions of public macros.
+ *
+ * "public" means available to video drivers.
+ */
+
+#ifndef _XF86_H
+#define _XF86_H
+
+#if HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#elif HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <pciaccess.h>
+
+#include "xf86str.h"
+#include "xf86Opt.h"
+#include <X11/Xfuncproto.h>
+#include <stdarg.h>
+#ifdef RANDR
+#include <X11/extensions/randr.h>
+#endif
+
+#include "propertyst.h"
+
+/* General parameters */
+extern int xf86DoConfigure;
+extern Bool xf86DoConfigurePass1;
+extern DevPrivateKey xf86ScreenKey;
+extern DevPrivateKey xf86CreateRootWindowKey;
+extern DevPrivateKey xf86PixmapKey;
+extern ScrnInfoPtr *xf86Screens;	/* List of pointers to ScrnInfoRecs */
+extern const unsigned char byte_reversed[256];
+extern ScrnInfoPtr xf86CurrentScreen;
+extern Bool pciSlotClaimed;
+extern Bool isaSlotClaimed;
+extern Bool fbSlotClaimed;
+#if defined(__sparc__) || defined(__sparc)
+extern Bool sbusSlotClaimed;
+#endif
+extern confDRIRec xf86ConfigDRI;
+extern Bool xf86inSuspend;
+extern Bool xf86DRI2Enabled(void);
+
+#define XF86SCRNINFO(p) ((ScrnInfoPtr)dixLookupPrivate(&(p)->devPrivates, \
+						       xf86ScreenKey))
+#define XF86FLIP_PIXELS() \
+	do { \
+	    if (xf86GetFlipPixels()) { \
+		pScreen->whitePixel = (pScreen->whitePixel) ? 0 : 1; \
+		pScreen->blackPixel = (pScreen->blackPixel) ? 0 : 1; \
+	   } \
+	while (0)
+
+#define BOOLTOSTRING(b) ((b) ? "TRUE" : "FALSE")
+
+#define PIX24TOBPP(p) (((p) == Pix24Use24) ? 24 : \
+			(((p) == Pix24Use32) ? 32 : 0))
+
+/* Function Prototypes */
+#ifndef _NO_XF86_PROTOTYPES
+
+/* xf86Bus.c */
+
+Bool xf86CheckPciSlot( const struct pci_device * );
+int xf86ClaimPciSlot( struct pci_device *, DriverPtr drvp,
+		     int chipset, GDevPtr dev, Bool active);
+Bool xf86ParsePciBusString(const char *busID, int *bus, int *device,
+			   int *func);
+Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func);
+void xf86FormatPciBusNumber(int busnum, char *buffer);
+void xf86PrintResList(int verb, resPtr list);
+resPtr xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex);
+int xf86ClaimIsaSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active);
+int xf86GetIsaInfoForScreen(int scrnIndex);
+int  xf86GetFbInfoForScreen(int scrnIndex);
+Bool xf86ParseIsaBusString(const char *busID);
+int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active);
+int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active);
+void xf86EnableAccess(ScrnInfoPtr pScrn);
+void xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn);
+Bool xf86IsPrimaryPci(struct pci_device * pPci);
+Bool xf86IsPrimaryIsa(void);
+/* new RAC */
+resPtr xf86AddResToList(resPtr rlist, resRange *Range, int entityIndex);
+resPtr xf86JoinResLists(resPtr rlist1, resPtr rlist2);
+resPtr xf86DupResList(const resPtr rlist);
+void xf86FreeResList(resPtr rlist);
+void xf86ClaimFixedResources(resList list, int entityIndex);
+Bool xf86DriverHasEntities(DriverPtr drvp);
+void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex);
+void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex,
+				    int instance);
+int xf86GetNumEntityInstances(int entityIndex);
+GDevPtr xf86GetDevFromEntity(int entityIndex, int instance);
+void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex);
+EntityInfoPtr xf86GetEntityInfo(int entityIndex);
+struct pci_device * xf86GetPciInfoForEntity(int entityIndex);
+Bool xf86SetEntityFuncs(int entityIndex, EntityProc init,
+			EntityProc enter, EntityProc leave, pointer);
+void xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type);
+resPtr xf86RegisterResources(int entityIndex, resList list,
+			     unsigned long Access);
+Bool xf86CheckPciMemBase(struct pci_device * pPci, memType base);
+void xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs,
+			xf86SetAccessFuncPtr oldFuncs);
+Bool xf86IsEntityPrimary(int entityIndex);
+resPtr xf86ReallocatePciResources(int entityIndex, resPtr pRes);
+resPtr xf86SetOperatingState(resList list, int entityIndex, int mask);
+void xf86EnterServerState(xf86State state);
+memType xf86ChkConflict(resRange *rgp, int entityIndex);
+ScrnInfoPtr xf86FindScreenForEntity(int entityIndex);
+Bool xf86NoSharedResources(int screenIndex, resType res);
+resPtr xf86FindIntersectOfLists(resPtr l1, resPtr l2);
+void xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg);
+Bool xf86DeregisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func);
+
+int xf86GetLastScrnFlag(int entityIndex);
+void xf86SetLastScrnFlag(int entityIndex, int scrnIndex);
+Bool xf86IsEntityShared(int entityIndex);
+void xf86SetEntityShared(int entityIndex);
+Bool xf86IsEntitySharable(int entityIndex);
+void xf86SetEntitySharable(int entityIndex);
+Bool xf86IsPrimInitDone(int entityIndex);
+void xf86SetPrimInitDone(int entityIndex);
+void xf86ClearPrimInitDone(int entityIndex);
+int xf86AllocateEntityPrivateIndex(void);
+DevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex);
+
+/* xf86Configure.c */
+GDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus,
+				    void *busData, int chipset);
+GDevPtr xf86AddDeviceToConfigure( const char *driver,
+    struct pci_device * pVideo, int chipset );
+
+/* xf86Cursor.c */
+
+void xf86LockZoom(ScreenPtr pScreen, int lock);
+void xf86InitViewport(ScrnInfoPtr pScr);
+void xf86SetViewport(ScreenPtr pScreen, int x, int y);
+void xf86ZoomViewport(ScreenPtr pScreen, int zoom);
+Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode);
+void *xf86GetPointerScreenFuncs(void);
+void xf86InitOrigins(void);
+void xf86ReconfigureLayout(void);
+
+/* xf86cvt.c */
+DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh,
+                           Bool Reduced, Bool Interlaced);
+
+/* xf86DPMS.c */
+
+Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags);
+
+/* xf86DGA.c */
+
+Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes,
+			int num);
+Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes, int num);
+xf86SetDGAModeProc xf86SetDGAMode;
+
+/* xf86Events.c */
+
+void SetTimeSinceLastInputEvent(void);
+pointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data);
+int xf86RemoveInputHandler(pointer handler);
+void xf86DisableInputHandler(pointer handler);
+void xf86EnableInputHandler(pointer handler);
+pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data);
+int xf86RemoveGeneralHandler(pointer handler);
+void xf86DisableGeneralHandler(pointer handler);
+void xf86EnableGeneralHandler(pointer handler);
+void xf86InterceptSignals(int *signo);
+void xf86InterceptSigIll(void (*sigillhandler)(void));
+Bool xf86EnableVTSwitch(Bool new);
+Bool xf86CommonSpecialKey(int key, Bool down, int modifiers);
+void xf86ProcessActionEvent(ActionEvent action, void *arg);
+
+/* xf86Helper.c */
+
+void xf86AddDriver(DriverPtr driver, pointer module, int flags);
+void xf86DeleteDriver(int drvIndex);
+ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags);
+void xf86DeleteScreen(int scrnIndex, int flags);
+int xf86AllocateScrnInfoPrivateIndex(void);
+Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad);
+Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp, int fbbpp,
+		     int depth24flags);
+void xf86PrintDepthBpp(ScrnInfoPtr scrp);
+Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask);
+Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual);
+Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma);
+void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y);
+void xf86SetBlackWhitePixels(ScreenPtr pScreen);
+void xf86EnableDisableFBAccess(int scrnIndex, Bool enable);
+void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb,
+		     const char *format, va_list args);
+void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb,
+		    const char *format, ...) _printf_attribute(4,5);
+void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...)
+		_printf_attribute(3,4);
+void xf86MsgVerb(MessageType type, int verb, const char *format, ...)
+		_printf_attribute(3,4);
+void xf86Msg(MessageType type, const char *format, ...) _printf_attribute(2,3);
+void xf86ErrorFVerb(int verb, const char *format, ...) _printf_attribute(2,3);
+void xf86ErrorF(const char *format, ...) _printf_attribute(1,2);
+const char *xf86TokenToString(SymTabPtr table, int token);
+int xf86StringToToken(SymTabPtr table, const char *string);
+void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from);
+void xf86PrintChipsets(const char *drvname, const char *drvmsg,
+		       SymTabPtr chips);
+int xf86MatchDevice(const char *drivername, GDevPtr **driversectlist);
+int xf86MatchPciInstances(const char *driverName, int vendorID,
+		      SymTabPtr chipsets, PciChipsets *PCIchipsets,
+		      GDevPtr *devList, int numDevs, DriverPtr drvp,
+		      int **foundEntities);
+int xf86MatchIsaInstances(const char *driverName, SymTabPtr chipsets,
+			  IsaChipsets *ISAchipsets, DriverPtr drvp,
+			  FindIsaDevProc FindIsaDevice, GDevPtr *devList,
+			  int numDevs, int **foundEntities);
+void xf86GetClocks(ScrnInfoPtr pScrn, int num,
+		   Bool (*ClockFunc)(ScrnInfoPtr, int),
+		   void (*ProtectRegs)(ScrnInfoPtr, Bool),
+		   void (*BlankScreen)(ScrnInfoPtr, Bool),
+		   IOADDRESS vertsyncreg, int maskval,
+		   int knownclkindex, int knownclkvalue);
+void xf86SetPriority(Bool up);
+const char *xf86GetVisualName(int visual);
+int xf86GetVerbosity(void);
+Pix24Flags xf86GetPix24(void);
+int xf86GetDepth(void);
+rgb xf86GetWeight(void);
+Gamma xf86GetGamma(void);
+Bool xf86GetFlipPixels(void);
+const char *xf86GetServerName(void);
+Bool xf86ServerIsExiting(void);
+Bool xf86ServerIsResetting(void);
+Bool xf86ServerIsInitialising(void);
+Bool xf86ServerIsOnlyDetecting(void);
+Bool xf86ServerIsOnlyProbing(void);
+Bool xf86CaughtSignal(void);
+Bool xf86GetVidModeAllowNonLocal(void);
+Bool xf86GetVidModeEnabled(void);
+Bool xf86GetModInDevAllowNonLocal(void);
+Bool xf86GetModInDevEnabled(void);
+Bool xf86GetAllowMouseOpenFail(void);
+Bool xf86IsPc98(void);
+void xf86DisableRandR(void);
+CARD32 xf86GetVersion(void);
+CARD32 xorgGetVersion(void);
+CARD32 xf86GetModuleVersion(pointer module);
+pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name);
+pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name);
+pointer xf86LoadOneModule(char *name, pointer optlist);
+void xf86UnloadSubModule(pointer mod);
+Bool xf86LoaderCheckSymbol(const char *name);
+void xf86LoaderReqSymLists(const char **, ...);
+void xf86LoaderReqSymbols(const char *, ...);
+void xf86LoaderRefSymLists(const char **, ...);
+void xf86LoaderRefSymbols(const char *, ...);
+void xf86SetBackingStore(ScreenPtr pScreen);
+void xf86SetSilkenMouse(ScreenPtr pScreen);
+int xf86NewSerialNumber(WindowPtr p, pointer unused);
+pointer xf86FindXvOptions(int scrnIndex, int adapt_index, char *port_name,
+			  char **adaptor_name, pointer *adaptor_options);
+void xf86GetOS(const char **name, int *major, int *minor, int *teeny);
+ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag,
+				int entityIndex,PciChipsets *p_chip,
+				resList res, EntityProc init,
+				EntityProc enter, EntityProc leave,
+				pointer private);
+ScrnInfoPtr xf86ConfigIsaEntity(ScrnInfoPtr pScrn, int scrnFlag,
+				int entityIndex, IsaChipsets *i_chip,
+				resList res, EntityProc init,
+				EntityProc enter, EntityProc leave,
+				pointer private);
+ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag,
+			       int entityIndex, EntityProc init,
+			       EntityProc enter, EntityProc leave,
+			       pointer private);
+/* Obsolete! don't use */
+Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn,
+				int entityIndex,PciChipsets *p_chip,
+				resList res, EntityProc init,
+				EntityProc enter, EntityProc leave,
+				pointer private);
+/* Obsolete! don't use */
+Bool xf86ConfigActiveIsaEntity(ScrnInfoPtr pScrn,
+				int entityIndex, IsaChipsets *i_chip,
+				resList res, EntityProc init,
+				EntityProc enter, EntityProc leave,
+				pointer private);
+void xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip,
+				 resList res, EntityProc init,
+				 EntityProc enter, EntityProc leave,
+				 pointer private);
+void xf86ConfigIsaEntityInactive(EntityInfoPtr pEnt, IsaChipsets *i_chip,
+				 resList res, EntityProc init,
+				 EntityProc enter, EntityProc leave,
+				 pointer private);
+void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init,
+				EntityProc enter, EntityProc leave,
+				pointer private);
+Bool xf86IsScreenPrimary(int scrnIndex);
+int  xf86RegisterRootWindowProperty(int ScrnIndex, Atom	property, Atom type,
+				    int format, unsigned long len,
+				    pointer value);
+Bool xf86IsUnblank(int mode);
+
+_X_DEPRECATED void xf86AddModuleInfo(pointer info, pointer module);
+_X_DEPRECATED void xf86DeleteModuleInfo(int idx);
+void xf86getsecs(long *, long *);
+
+/* xf86Debug.c */
+#ifdef BUILDDEBUG
+CARD8  xf86PeekFb8(CARD8  *p);
+CARD16 xf86PeekFb16(CARD16 *p);
+CARD32 xf86PeekFb32(CARD32 *p);
+void xf86PokeFb8(CARD8  *p, CARD8  v);
+void xf86PokeFb16(CARD16 *p, CARD16 v);
+void xf86PokeFb32(CARD16 *p, CARD32 v);
+CARD8  xf86PeekMmio8(pointer Base, unsigned long Offset);
+CARD16 xf86PeekMmio16(pointer Base, unsigned long Offset);
+CARD32 xf86PeekMmio32(pointer Base, unsigned long Offset);
+void xf86PokeMmio8(pointer Base, unsigned long Offset, CARD8  v);
+void xf86PokeMmio16(pointer Base, unsigned long Offset, CARD16 v);
+void xf86PokeMmio32(pointer Base, unsigned long Offset, CARD32 v);
+#endif
+
+/* xf86Init.c */
+
+PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth);
+int xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth);
+
+/* xf86Mode.c */
+
+int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2,
+			int DivFactor, int MulFactor, int *divider);
+const char *xf86ModeStatusToString(ModeStatus status);
+ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep,
+			  ClockRangePtr clockRanges, LookupModeFlags strategy);
+ModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor);
+ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode,
+					 ClockRangePtr clockRanges,
+					 LookupModeFlags strategy,
+					 int maxPitch, int virtualX,
+					 int virtualY);
+ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode,
+				  int flags);
+int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
+		      char **modeNames, ClockRangePtr clockRanges,
+		      int *linePitches, int minPitch, int maxPitch,
+		      int minHeight, int maxHeight, int pitchInc,
+		      int virtualX, int virtualY, int apertureSize,
+		      LookupModeFlags strategy);
+void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode);
+void xf86PruneDriverModes(ScrnInfoPtr scrp);
+void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags);
+void xf86PrintModes(ScrnInfoPtr scrp);
+void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges);
+double xf86ModeHSync(DisplayModePtr mode);
+double xf86ModeVRefresh(DisplayModePtr mode);
+void xf86SetModeDefaultName(DisplayModePtr mode);
+void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags);
+DisplayModePtr xf86DuplicateMode(DisplayModePtr pMode);
+DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList);
+Bool xf86ModesEqual(DisplayModePtr pMode1, DisplayModePtr pMode2);
+void xf86PrintModeline(int scrnIndex,DisplayModePtr mode);
+DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new);
+
+/* xf86Option.c */
+
+void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts);
+
+
+/* xf86RandR.c */
+#ifdef RANDR
+Bool xf86RandRInit (ScreenPtr    pScreen);
+void xf86RandRSetInitialMode (ScreenPtr pScreen);
+Rotation xf86GetRotation(ScreenPtr pScreen);
+Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen,
+			int newvirtX, int newvirtY,
+			int newmmWidth, int newmmHeight, Bool resetMode);
+#endif
+
+/* xf86VidModeExtentionInit.c */
+
+Bool VidModeExtensionInit(ScreenPtr pScreen);
+
+/* xf86Versions.c */
+CARD32 xf86GetBuiltinInterfaceVersion(BuiltinInterface iface, int flag);
+Bool xf86RegisterBuiltinInterfaceVersion(BuiltinInterface iface,
+					 CARD32 version, int flags);
+
+
+#endif /* _NO_XF86_PROTOTYPES */
+
+#endif /* _XF86_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Crtc.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Crtc.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Crtc.h	(revision 9233)
@@ -0,0 +1,801 @@
+/*
+ * Copyright © 2006 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no representations
+ * about the suitability of this software for any purpose.  It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+#ifndef _XF86CRTC_H_
+#define _XF86CRTC_H_
+
+#include <edid.h>
+#include "randrstr.h"
+#if XF86_MODES_RENAME
+#include "xf86Rename.h"
+#endif
+#include "xf86Modes.h"
+#include "xf86Cursor.h"
+#include "xf86i2c.h"
+#include "damage.h"
+#include "picturestr.h"
+
+/* Compat definitions for older X Servers. */
+#ifndef M_T_PREFERRED
+#define M_T_PREFERRED	0x08
+#endif
+#ifndef M_T_DRIVER
+#define M_T_DRIVER	0x40
+#endif
+#ifndef M_T_USERPREF
+#define M_T_USERPREF	0x80
+#endif
+#ifndef HARDWARE_CURSOR_ARGB
+#define HARDWARE_CURSOR_ARGB				0x00004000
+#endif
+
+typedef struct _xf86Crtc xf86CrtcRec, *xf86CrtcPtr;
+typedef struct _xf86Output xf86OutputRec, *xf86OutputPtr;
+
+/* define a standard for connector types */
+typedef enum _xf86ConnectorType {
+   XF86ConnectorNone,
+   XF86ConnectorVGA,
+   XF86ConnectorDVI_I,
+   XF86ConnectorDVI_D,
+   XF86ConnectorDVI_A,
+   XF86ConnectorComposite,
+   XF86ConnectorSvideo,
+   XF86ConnectorComponent,
+   XF86ConnectorLFP,
+   XF86ConnectorProprietary,
+   XF86ConnectorHDMI,
+   XF86ConnectorDisplayPort,
+} xf86ConnectorType;
+
+typedef enum _xf86OutputStatus {
+   XF86OutputStatusConnected,
+   XF86OutputStatusDisconnected,
+   XF86OutputStatusUnknown
+} xf86OutputStatus;
+
+typedef struct _xf86CrtcFuncs {
+   /**
+    * Turns the crtc on/off, or sets intermediate power levels if available.
+    *
+    * Unsupported intermediate modes drop to the lower power setting.  If the
+    * mode is DPMSModeOff, the crtc must be disabled sufficiently for it to
+    * be safe to call mode_set.
+    */
+   void
+    (*dpms)(xf86CrtcPtr		crtc,
+	    int		    	mode);
+
+   /**
+    * Saves the crtc's state for restoration on VT switch.
+    */
+   void
+    (*save)(xf86CrtcPtr		crtc);
+
+   /**
+    * Restore's the crtc's state at VT switch.
+    */
+   void
+    (*restore)(xf86CrtcPtr	crtc);
+
+    /**
+     * Lock CRTC prior to mode setting, mostly for DRI.
+     * Returns whether unlock is needed
+     */
+    Bool
+    (*lock) (xf86CrtcPtr crtc);
+    
+    /**
+     * Unlock CRTC after mode setting, mostly for DRI
+     */
+    void
+    (*unlock) (xf86CrtcPtr crtc);
+    
+    /**
+     * Callback to adjust the mode to be set in the CRTC.
+     *
+     * This allows a CRTC to adjust the clock or even the entire set of
+     * timings, which is used for panels with fixed timings or for
+     * buses with clock limitations.
+     */
+    Bool
+    (*mode_fixup)(xf86CrtcPtr crtc,
+		  DisplayModePtr mode,
+		  DisplayModePtr adjusted_mode);
+
+    /**
+     * Prepare CRTC for an upcoming mode set.
+     */
+    void
+    (*prepare)(xf86CrtcPtr crtc);
+
+    /**
+     * Callback for setting up a video mode after fixups have been made.
+     */
+    void
+    (*mode_set)(xf86CrtcPtr crtc,
+		DisplayModePtr mode,
+		DisplayModePtr adjusted_mode,
+		int x, int y);
+
+    /**
+     * Commit mode changes to a CRTC
+     */
+    void
+    (*commit)(xf86CrtcPtr crtc);
+
+    /* Set the color ramps for the CRTC to the given values. */
+    void
+    (*gamma_set)(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
+		 int size);
+
+    /**
+     * Allocate the shadow area, delay the pixmap creation until needed
+     */
+    void *
+    (*shadow_allocate) (xf86CrtcPtr crtc, int width, int height);
+    
+    /**
+     * Create shadow pixmap for rotation support
+     */
+    PixmapPtr
+    (*shadow_create) (xf86CrtcPtr crtc, void *data, int width, int height);
+    
+    /**
+     * Destroy shadow pixmap
+     */
+    void
+    (*shadow_destroy) (xf86CrtcPtr crtc, PixmapPtr pPixmap, void *data);
+
+    /**
+     * Set cursor colors
+     */
+    void
+    (*set_cursor_colors) (xf86CrtcPtr crtc, int bg, int fg);
+
+    /**
+     * Set cursor position
+     */
+    void
+    (*set_cursor_position) (xf86CrtcPtr crtc, int x, int y);
+
+    /**
+     * Show cursor
+     */
+    void
+    (*show_cursor) (xf86CrtcPtr crtc);
+
+    /**
+     * Hide cursor
+     */
+    void
+    (*hide_cursor) (xf86CrtcPtr crtc);
+
+    /**
+     * Load monochrome image
+     */
+    void
+    (*load_cursor_image) (xf86CrtcPtr crtc, CARD8 *image);
+
+    /**
+     * Load ARGB image
+     */
+     void
+     (*load_cursor_argb) (xf86CrtcPtr crtc, CARD32 *image);
+     
+    /**
+     * Clean up driver-specific bits of the crtc
+     */
+    void
+    (*destroy) (xf86CrtcPtr	crtc);
+
+    /**
+     * Less fine-grained mode setting entry point for kernel modesetting
+     */
+    Bool
+    (*set_mode_major)(xf86CrtcPtr crtc, DisplayModePtr mode,
+		      Rotation rotation, int x, int y);
+} xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
+
+struct _xf86Crtc {
+    /**
+     * Associated ScrnInfo
+     */
+    ScrnInfoPtr	    scrn;
+    
+    /**
+     * Active state of this CRTC
+     *
+     * Set when this CRTC is driving one or more outputs 
+     */
+    Bool	    enabled;
+    
+    /**
+     * Active mode
+     *
+     * This reflects the mode as set in the CRTC currently
+     * It will be cleared when the VT is not active or
+     * during server startup
+     */
+    DisplayModeRec  mode;
+    Rotation	    rotation;
+    PixmapPtr	    rotatedPixmap;
+    void	    *rotatedData;
+    
+    /**
+     * Position on screen
+     *
+     * Locates this CRTC within the frame buffer
+     */
+    int		    x, y;
+    
+    /**
+     * Desired mode
+     *
+     * This is set to the requested mode, independent of
+     * whether the VT is active. In particular, it receives
+     * the startup configured mode and saves the active mode
+     * on VT switch.
+     */
+    DisplayModeRec  desiredMode;
+    Rotation	    desiredRotation;
+    int		    desiredX, desiredY;
+    
+    /** crtc-specific functions */
+    const xf86CrtcFuncsRec *funcs;
+
+    /**
+     * Driver private
+     *
+     * Holds driver-private information
+     */
+    void	    *driver_private;
+
+#ifdef RANDR_12_INTERFACE
+    /**
+     * RandR crtc
+     *
+     * When RandR 1.2 is available, this
+     * points at the associated crtc object
+     */
+    RRCrtcPtr	    randr_crtc;
+#else
+    void	    *randr_crtc;
+#endif
+
+    /**
+     * Current cursor is ARGB
+     */
+    Bool	    cursor_argb;
+    /**
+     * Track whether cursor is within CRTC range 
+     */
+    Bool	    cursor_in_range;
+    /**
+     * Track state of cursor associated with this CRTC
+     */
+    Bool	    cursor_shown;
+
+    /**
+     * Current transformation matrix
+     */
+    PictTransform   crtc_to_framebuffer;
+    PictTransform   framebuffer_to_crtc;
+    Bool	    transform_in_use;
+    /**
+     * Bounding box in screen space
+     */
+    BoxRec	    bounds;
+};
+
+typedef struct _xf86OutputFuncs {
+    /**
+     * Called to allow the output a chance to create properties after the
+     * RandR objects have been created.
+     */
+    void
+    (*create_resources)(xf86OutputPtr output);
+
+    /**
+     * Turns the output on/off, or sets intermediate power levels if available.
+     *
+     * Unsupported intermediate modes drop to the lower power setting.  If the
+     * mode is DPMSModeOff, the output must be disabled, as the DPLL may be
+     * disabled afterwards.
+     */
+    void
+    (*dpms)(xf86OutputPtr	output,
+	    int			mode);
+
+    /**
+     * Saves the output's state for restoration on VT switch.
+     */
+    void
+    (*save)(xf86OutputPtr	output);
+
+    /**
+     * Restore's the output's state at VT switch.
+     */
+    void
+    (*restore)(xf86OutputPtr	output);
+
+    /**
+     * Callback for testing a video mode for a given output.
+     *
+     * This function should only check for cases where a mode can't be supported
+     * on the output specifically, and not represent generic CRTC limitations.
+     *
+     * \return MODE_OK if the mode is valid, or another MODE_* otherwise.
+     */
+    int
+    (*mode_valid)(xf86OutputPtr	    output,
+		  DisplayModePtr    pMode);
+
+    /**
+     * Callback to adjust the mode to be set in the CRTC.
+     *
+     * This allows an output to adjust the clock or even the entire set of
+     * timings, which is used for panels with fixed timings or for
+     * buses with clock limitations.
+     */
+    Bool
+    (*mode_fixup)(xf86OutputPtr output,
+		  DisplayModePtr mode,
+		  DisplayModePtr adjusted_mode);
+
+    /**
+     * Callback for preparing mode changes on an output
+     */
+    void
+    (*prepare)(xf86OutputPtr output);
+
+    /**
+     * Callback for committing mode changes on an output
+     */
+    void
+    (*commit)(xf86OutputPtr output);
+
+    /**
+     * Callback for setting up a video mode after fixups have been made.
+     *
+     * This is only called while the output is disabled.  The dpms callback
+     * must be all that's necessary for the output, to turn the output on
+     * after this function is called.
+     */
+    void
+    (*mode_set)(xf86OutputPtr  output,
+		DisplayModePtr mode,
+		DisplayModePtr adjusted_mode);
+
+    /**
+     * Probe for a connected output, and return detect_status.
+     */
+    xf86OutputStatus
+    (*detect)(xf86OutputPtr	    output);
+
+    /**
+     * Query the device for the modes it provides.
+     *
+     * This function may also update MonInfo, mm_width, and mm_height.
+     *
+     * \return singly-linked list of modes or NULL if no modes found.
+     */
+    DisplayModePtr
+    (*get_modes)(xf86OutputPtr	    output);
+
+#ifdef RANDR_12_INTERFACE
+    /**
+     * Callback when an output's property has changed.
+     */
+    Bool
+    (*set_property)(xf86OutputPtr output,
+		    Atom property,
+		    RRPropertyValuePtr value);
+#endif
+    /**
+     * Clean up driver-specific bits of the output
+     */
+    void
+    (*destroy) (xf86OutputPtr	    output);
+} xf86OutputFuncsRec, *xf86OutputFuncsPtr;
+
+struct _xf86Output {
+    /**
+     * Associated ScrnInfo
+     */
+    ScrnInfoPtr		scrn;
+
+    /**
+     * Currently connected crtc (if any)
+     *
+     * If this output is not in use, this field will be NULL.
+     */
+    xf86CrtcPtr		crtc;
+
+    /**
+     * Possible CRTCs for this output as a mask of crtc indices
+     */
+    CARD32		possible_crtcs;
+
+    /**
+     * Possible outputs to share the same CRTC as a mask of output indices
+     */
+    CARD32		possible_clones;
+    
+    /**
+     * Whether this output can support interlaced modes
+     */
+    Bool		interlaceAllowed;
+
+    /**
+     * Whether this output can support double scan modes
+     */
+    Bool		doubleScanAllowed;
+
+    /**
+     * List of available modes on this output.
+     *
+     * This should be the list from get_modes(), plus perhaps additional
+     * compatible modes added later.
+     */
+    DisplayModePtr	probed_modes;
+
+    /**
+     * Options parsed from the related monitor section
+     */
+    OptionInfoPtr	options;
+    
+    /**
+     * Configured monitor section
+     */
+    XF86ConfMonitorPtr  conf_monitor;
+    
+    /**
+     * Desired initial position
+     */
+    int			initial_x, initial_y;
+
+    /**
+     * Desired initial rotation
+     */
+    Rotation		initial_rotation;
+
+    /**
+     * Current connection status
+     *
+     * This indicates whether a monitor is known to be connected
+     * to this output or not, or whether there is no way to tell
+     */
+    xf86OutputStatus	status;
+
+    /** EDID monitor information */
+    xf86MonPtr		MonInfo;
+
+    /** subpixel order */
+    int			subpixel_order;
+
+    /** Physical size of the currently attached output device. */
+    int			mm_width, mm_height;
+
+    /** Output name */
+    char		*name;
+
+    /** output-specific functions */
+    const xf86OutputFuncsRec *funcs;
+
+    /** driver private information */
+    void		*driver_private;
+    
+    /** Whether to use the old per-screen Monitor config section */
+    Bool		use_screen_monitor;
+
+#ifdef RANDR_12_INTERFACE
+    /**
+     * RandR 1.2 output structure.
+     *
+     * When RandR 1.2 is available, this points at the associated
+     * RandR output structure and is created when this output is created
+     */
+    RROutputPtr		randr_output;
+#else
+    void		*randr_output;
+#endif
+};
+
+typedef struct _xf86CrtcConfigFuncs {
+    /**
+     * Requests that the driver resize the screen.
+     *
+     * The driver is responsible for updating scrn->virtualX and scrn->virtualY.
+     * If the requested size cannot be set, the driver should leave those values
+     * alone and return FALSE.
+     *
+     * A naive driver that cannot reallocate the screen may simply change
+     * virtual[XY].  A more advanced driver will want to also change the
+     * devPrivate.ptr and devKind of the screen pixmap, update any offscreen
+     * pixmaps it may have moved, and change pScrn->displayWidth.
+     */
+    Bool
+    (*resize)(ScrnInfoPtr	scrn,
+	      int		width,
+	      int		height);
+} xf86CrtcConfigFuncsRec, *xf86CrtcConfigFuncsPtr;
+
+typedef struct _xf86CrtcConfig {
+    int			num_output;
+    xf86OutputPtr	*output;
+    /**
+     * compat_output is used whenever we deal
+     * with legacy code that only understands a single
+     * output. pScrn->modes will be loaded from this output,
+     * adjust frame will whack this output, etc.
+     */
+    int			compat_output;
+
+    int			num_crtc;
+    xf86CrtcPtr		*crtc;
+
+    int			minWidth, minHeight;
+    int			maxWidth, maxHeight;
+    
+    /* For crtc-based rotation */
+    DamagePtr		rotation_damage;
+    Bool		rotation_damage_registered;
+
+    /* DGA */
+    unsigned int	dga_flags;
+    unsigned long	dga_address;
+    DGAModePtr		dga_modes;
+    int			dga_nmode;
+    int			dga_width, dga_height, dga_stride;
+    DisplayModePtr	dga_save_mode;
+
+    const xf86CrtcConfigFuncsRec *funcs;
+
+    CreateScreenResourcesProcPtr    CreateScreenResources;
+
+    CloseScreenProcPtr		    CloseScreen;
+
+    /* Cursor information */
+    xf86CursorInfoPtr	cursor_info;
+    CursorPtr		cursor;
+    CARD8		*cursor_image;
+    Bool		cursor_on;
+    CARD32		cursor_fg, cursor_bg;
+
+    /**
+     * Options parsed from the related device section
+     */
+    OptionInfoPtr	options;
+
+    Bool		debug_modes;
+
+    /* wrap screen BlockHandler for rotation */
+    ScreenBlockHandlerProcPtr	BlockHandler;
+
+} xf86CrtcConfigRec, *xf86CrtcConfigPtr;
+
+extern int xf86CrtcConfigPrivateIndex;
+
+#define XF86_CRTC_CONFIG_PTR(p)	((xf86CrtcConfigPtr) ((p)->privates[xf86CrtcConfigPrivateIndex].ptr))
+
+/*
+ * Initialize xf86CrtcConfig structure
+ */
+
+void
+xf86CrtcConfigInit (ScrnInfoPtr				scrn,
+		    const xf86CrtcConfigFuncsRec	*funcs);
+
+void
+xf86CrtcSetSizeRange (ScrnInfoPtr scrn,
+		      int minWidth, int minHeight,
+		      int maxWidth, int maxHeight);
+
+/*
+ * Crtc functions
+ */
+xf86CrtcPtr
+xf86CrtcCreate (ScrnInfoPtr		scrn,
+		const xf86CrtcFuncsRec	*funcs);
+
+void
+xf86CrtcDestroy (xf86CrtcPtr		crtc);
+
+
+/**
+ * Sets the given video mode on the given crtc
+ */
+Bool
+xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
+		 int x, int y);
+
+/*
+ * Assign crtc rotation during mode set
+ */
+Bool
+xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation);
+
+/*
+ * Clean up rotation during CloseScreen
+ */
+void
+xf86RotateCloseScreen (ScreenPtr pScreen);
+
+/**
+ * Return whether any output is assigned to the crtc
+ */
+Bool
+xf86CrtcInUse (xf86CrtcPtr crtc);
+
+/*
+ * Output functions
+ */
+xf86OutputPtr
+xf86OutputCreate (ScrnInfoPtr		    scrn,
+		  const xf86OutputFuncsRec  *funcs,
+		  const char		    *name);
+
+void
+xf86OutputUseScreenMonitor (xf86OutputPtr output, Bool use_screen_monitor);
+
+Bool
+xf86OutputRename (xf86OutputPtr output, const char *name);
+
+void
+xf86OutputDestroy (xf86OutputPtr	output);
+
+void
+xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY);
+
+void
+xf86SetScrnInfoModes (ScrnInfoPtr pScrn);
+
+Bool
+xf86CrtcScreenInit (ScreenPtr pScreen);
+
+Bool
+xf86InitialConfiguration (ScrnInfoPtr pScrn, Bool canGrow);
+
+void
+xf86DPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags);
+    
+Bool
+xf86SaveScreen(ScreenPtr pScreen, int mode);
+
+void
+xf86DisableUnusedFunctions(ScrnInfoPtr pScrn);
+
+DisplayModePtr
+xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired);
+    
+Bool
+xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation);
+
+/**
+ * Set the EDID information for the specified output
+ */
+void
+xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon);
+
+/**
+ * Return the list of modes supported by the EDID information
+ * stored in 'output'
+ */
+DisplayModePtr
+xf86OutputGetEDIDModes (xf86OutputPtr output);
+
+xf86MonPtr
+xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus);
+
+/**
+ * Initialize dga for this screen
+ */
+
+Bool
+xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address);
+
+/**
+ * Re-initialize dga for this screen (as when the set of modes changes)
+ */
+
+Bool
+xf86DiDGAReInit (ScreenPtr pScreen);
+
+/*
+ * Set the subpixel order reported for the screen using
+ * the information from the outputs
+ */
+
+void
+xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen);
+
+/*
+ * Get a standard string name for a connector type 
+ */
+char *
+xf86ConnectorGetName(xf86ConnectorType connector);
+
+/*
+ * Using the desired mode information in each crtc, set
+ * modes (used in EnterVT functions, or at server startup)
+ */
+
+Bool
+xf86SetDesiredModes (ScrnInfoPtr pScrn);
+
+/**
+ * Initialize the CRTC-based cursor code. CRTC function vectors must
+ * contain relevant cursor setting functions.
+ *
+ * Driver should call this from ScreenInit function
+ */
+Bool
+xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags);
+
+/**
+ * Called when anything on the screen is reconfigured.
+ *
+ * Reloads cursor images as needed, then adjusts cursor positions.
+ * 
+ * Driver should call this from crtc commit function.
+ */
+void
+xf86_reload_cursors (ScreenPtr screen);
+
+/**
+ * Called from EnterVT to turn the cursors back on
+ */
+void
+xf86_show_cursors (ScrnInfoPtr scrn);
+
+/**
+ * Called by the driver to turn cursors off
+ */
+void
+xf86_hide_cursors (ScrnInfoPtr scrn);
+
+/**
+ * Clean up CRTC-based cursor code. Driver must call this at CloseScreen time.
+ */
+void
+xf86_cursors_fini (ScreenPtr screen);
+
+/*
+ * For overlay video, compute the relevant CRTC and
+ * clip video to that.
+ * wraps xf86XVClipVideoHelper()
+ */
+
+Bool
+xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn,
+			    xf86CrtcPtr *crtc_ret,
+			    xf86CrtcPtr desired_crtc,
+			    BoxPtr      dst,
+			    INT32	*xa,
+			    INT32	*xb,
+			    INT32	*ya,
+			    INT32	*yb,
+			    RegionPtr   reg,
+			    INT32	width,
+			    INT32	height);
+    
+#endif /* _XF86CRTC_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Cursor.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Cursor.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Cursor.h	(revision 9233)
@@ -0,0 +1,51 @@
+
+#ifndef _XF86CURSOR_H
+#define _XF86CURSOR_H
+
+#include "xf86str.h"
+#include "mipointer.h"
+
+typedef struct _xf86CursorInfoRec {
+    ScrnInfoPtr pScrn;
+    int Flags;
+    int MaxWidth;
+    int MaxHeight;
+    void (*SetCursorColors)(ScrnInfoPtr pScrn, int bg, int fg);
+    void (*SetCursorPosition)(ScrnInfoPtr pScrn, int x, int y);
+    void (*LoadCursorImage)(ScrnInfoPtr pScrn, unsigned char *bits);
+    void (*HideCursor)(ScrnInfoPtr pScrn);
+    void (*ShowCursor)(ScrnInfoPtr pScrn);
+    unsigned char* (*RealizeCursor)(struct _xf86CursorInfoRec *, CursorPtr);
+    Bool (*UseHWCursor)(ScreenPtr, CursorPtr);
+
+#ifdef ARGB_CURSOR
+    Bool (*UseHWCursorARGB) (ScreenPtr, CursorPtr);
+    void (*LoadCursorARGB) (ScrnInfoPtr, CursorPtr);
+#endif
+
+} xf86CursorInfoRec, *xf86CursorInfoPtr;
+
+Bool xf86InitCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr);
+xf86CursorInfoPtr xf86CreateCursorInfoRec(void);
+void xf86DestroyCursorInfoRec(xf86CursorInfoPtr);
+void xf86ForceHWCursor (ScreenPtr pScreen, Bool on);
+
+#define HARDWARE_CURSOR_INVERT_MASK 			0x00000001
+#define HARDWARE_CURSOR_AND_SOURCE_WITH_MASK		0x00000002
+#define HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK		0x00000004
+#define HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED	0x00000008
+#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1	0x00000010
+#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8	0x00000020
+#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16	0x00000040
+#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32	0x00000080
+#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64	0x00000100
+#define HARDWARE_CURSOR_TRUECOLOR_AT_8BPP		0x00000200
+#define HARDWARE_CURSOR_BIT_ORDER_MSBFIRST		0x00000400
+#define HARDWARE_CURSOR_NIBBLE_SWAPPED			0x00000800
+#define HARDWARE_CURSOR_SHOW_TRANSPARENT		0x00001000
+#define HARDWARE_CURSOR_UPDATE_UNHIDDEN			0x00002000
+#ifdef ARGB_CURSOR
+#define HARDWARE_CURSOR_ARGB				0x00004000
+#endif
+
+#endif /* _XF86CURSOR_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86DDC.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86DDC.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86DDC.h	(revision 9233)
@@ -0,0 +1,58 @@
+
+/* xf86DDC.h
+ *
+ * This file contains all information to interpret a standard EDIC block 
+ * transmitted by a display device via DDC (Display Data Channel). So far 
+ * there is no information to deal with optional EDID blocks.  
+ * DDC is a Trademark of VESA (Video Electronics Standard Association).
+ *
+ * Copyright 1998 by Egbert Eich <Egbert.Eich@Physik.TU-Darmstadt.DE>
+ */
+
+#ifndef XF86_DDC_H
+# define XF86_DDC_H
+
+#include "edid.h"
+#include "xf86i2c.h"
+#include "xf86str.h"
+
+/* speed up / slow down */
+typedef enum {
+  DDC_SLOW,
+  DDC_FAST
+} xf86ddcSpeed;
+
+typedef void (* DDC1SetSpeedProc)(ScrnInfoPtr, xf86ddcSpeed);
+
+extern xf86MonPtr xf86DoEDID_DDC1(
+    int scrnIndex, 
+    DDC1SetSpeedProc DDC1SetSpeed,
+    unsigned int (*DDC1Read)(ScrnInfoPtr)
+);
+
+extern xf86MonPtr xf86DoEDID_DDC2(
+   int scrnIndex,
+   I2CBusPtr pBus
+);
+
+extern xf86MonPtr xf86PrintEDID(
+    xf86MonPtr monPtr
+);
+
+extern xf86MonPtr xf86InterpretEDID(
+    int screenIndex, Uchar *block
+);
+
+extern void 
+xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC);
+
+extern Bool xf86SetDDCproperties(
+    ScrnInfoPtr pScreen,
+    xf86MonPtr DDC
+);
+
+DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
+
+#endif
+
+
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Modes.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Modes.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Modes.h	(revision 9233)
@@ -0,0 +1,110 @@
+/*
+ * Copyright © 2006 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Authors:
+ *    Eric Anholt <eric@anholt.net>
+ *
+ */
+
+#ifndef _XF86MODES_H_
+#define _XF86MODES_H_
+
+#include <stddef.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "xf86.h"
+#include "xorgVersion.h"
+#include "edid.h"
+#include "xf86Parser.h"
+#if XF86_MODES_RENAME
+#include "xf86Rename.h"
+#endif
+
+double xf86ModeHSync(DisplayModePtr mode);
+double xf86ModeVRefresh(DisplayModePtr mode);
+unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth);
+
+int
+xf86ModeWidth (DisplayModePtr mode, Rotation rotation);
+    
+int
+xf86ModeHeight (DisplayModePtr mode, Rotation rotation);
+
+DisplayModePtr xf86DuplicateMode(DisplayModePtr pMode);
+DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn,
+				       DisplayModePtr modeList);
+void xf86SetModeDefaultName(DisplayModePtr mode);
+void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags);
+Bool xf86ModesEqual(DisplayModePtr pMode1, DisplayModePtr pMode2);
+void xf86PrintModeline(int scrnIndex,DisplayModePtr mode);
+DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new);
+
+DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
+DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh,
+			   Bool Reduced, Bool Interlaced);
+DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins);
+
+void
+xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+		       int flags);
+
+void
+xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+			int *min, int *max, int n_ranges);
+
+void
+xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+		      int maxX, int maxY, int maxPitch);
+
+void
+xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+		      MonPtr mon);
+
+void
+xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+			   unsigned int bandwidth, int depth);
+
+void
+xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList);
+
+void
+xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList,
+		      Bool verbose);
+
+void
+xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+		       int flags);
+
+void
+xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList);
+
+DisplayModePtr
+xf86GetMonitorModes (ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor);
+
+DisplayModePtr
+xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed);
+
+void
+xf86DDCApplyQuirks(int scrnIndex, xf86MonPtr DDC);
+
+#endif /* _XF86MODES_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Module.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Module.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Module.h	(revision 9233)
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains the parts of the loader interface that are visible
+ * to modules.  This is the only loader-related header that modules should
+ * include.
+ *
+ * It should include a bare minimum of other headers.
+ *
+ * Longer term, the module/loader code should probably live directly under
+ * Xserver/.
+ *
+ * XXX This file arguably belongs in xfree86/loader/.
+ */
+
+#ifndef _XF86MODULE_H
+#define _XF86MODULE_H
+
+#include "misc.h"
+#include "xf86Version.h"
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
+
+typedef enum {
+    LD_RESOLV_IFDONE		= 0,	/* only check if no more
+					   delays pending */
+    LD_RESOLV_NOW		= 1,	/* finish one delay step */
+    LD_RESOLV_FORCE		= 2	/* force checking... */
+} LoaderResolveOptions;
+
+#define DEFAULT_LIST ((char *)-1)
+
+/* This indicates a special module that doesn't have the usual entry point */
+#define EXTERN_MODULE ((pointer)-1)
+
+/* Built-in ABI classes.  These definitions must not be changed. */
+#define ABI_CLASS_NONE		NULL
+#define ABI_CLASS_ANSIC		"X.Org ANSI C Emulation"
+#define ABI_CLASS_VIDEODRV	"X.Org Video Driver"
+#define ABI_CLASS_XINPUT	"X.Org XInput driver"
+#define ABI_CLASS_EXTENSION	"X.Org Server Extension"
+#define ABI_CLASS_FONT		"X.Org Font Renderer"
+
+#define ABI_MINOR_MASK		0x0000FFFF
+#define ABI_MAJOR_MASK		0xFFFF0000
+#define GET_ABI_MINOR(v)	((v) & ABI_MINOR_MASK)
+#define GET_ABI_MAJOR(v)	(((v) & ABI_MAJOR_MASK) >> 16)
+#define SET_ABI_VERSION(maj, min) \
+		((((maj) << 16) & ABI_MAJOR_MASK) | ((min) & ABI_MINOR_MASK))
+
+/*
+ * ABI versions.  Each version has a major and minor revision.  Modules
+ * using lower minor revisions must work with servers of a higher minor
+ * revision.  There is no compatibility between different major revisions.
+ * Whenever the ABI_ANSIC_VERSION is changed, the others must also be
+ * changed.  The minor revision mask is 0x0000FFFF and the major revision
+ * mask is 0xFFFF0000.
+ */
+#define ABI_ANSIC_VERSION	SET_ABI_VERSION(0, 3)
+#define ABI_VIDEODRV_VERSION	SET_ABI_VERSION(4, 0)
+#define ABI_XINPUT_VERSION	SET_ABI_VERSION(2, 0)
+#define ABI_EXTENSION_VERSION	SET_ABI_VERSION(1, 0)
+#define ABI_FONT_VERSION	SET_ABI_VERSION(0, 5)
+
+#define MODINFOSTRING1	0xef23fdc5
+#define MODINFOSTRING2	0x10dc023a
+
+#ifndef MODULEVENDORSTRING
+#define MODULEVENDORSTRING	"X.Org Foundation"
+#endif
+
+/* Error return codes for errmaj.  New codes must only be added at the end. */
+typedef enum {
+    LDR_NOERROR = 0,
+    LDR_NOMEM,		/* memory allocation failed */
+    LDR_NOENT,		/* Module file does not exist */
+    LDR_NOSUBENT,	/* pre-requsite file to be sub-loaded does not exist */
+    LDR_NOSPACE,	/* internal module array full */
+    LDR_NOMODOPEN,	/* module file could not be opened (check errmin) */
+    LDR_UNKTYPE,	/* file is not a recognized module type */
+    LDR_NOLOAD,		/* type specific loader failed */
+    LDR_ONCEONLY,	/* Module should only be loaded once (not an error) */
+    LDR_NOPORTOPEN,	/* could not open port (check errmin) */
+    LDR_NOHARDWARE,	/* could not query/initialize the hardware device */
+    LDR_MISMATCH,	/* the module didn't match the spec'd requirments */
+    LDR_BADUSAGE,	/* LoadModule is called with bad arguments */
+    LDR_INVALID,	/* The module doesn't have a valid ModuleData object */
+    LDR_BADOS,		/* The module doesn't support the OS */
+    LDR_MODSPECIFIC	/* A module-specific error in the SetupProc */
+} LoaderErrorCode;
+
+/*
+ * Some common module classes.  The moduleclass can be used to identify
+ * that modules loaded are of the correct type.  This is a finer
+ * classification than the ABI classes even though the default set of
+ * classes have the same names.  For example, not all modules that require
+ * the video driver ABI are themselves video drivers.
+ */
+#define MOD_CLASS_NONE		NULL
+#define MOD_CLASS_VIDEODRV	"X.Org Video Driver"
+#define MOD_CLASS_XINPUT	"X.Org XInput Driver"
+#define MOD_CLASS_FONT		"X.Org Font Renderer"
+#define MOD_CLASS_EXTENSION	"X.Org Server Extension"
+
+/* This structure is expected to be returned by the initfunc */
+typedef struct {
+    const char * modname;	/* name of module, e.g. "foo" */
+    const char * vendor;	/* vendor specific string */
+    CARD32	 _modinfo1_;	/* constant MODINFOSTRING1/2 to find */
+    CARD32	 _modinfo2_;	/* infoarea with a binary editor or sign tool */
+    CARD32	 xf86version;	/* contains XF86_VERSION_CURRENT */
+    CARD8	 majorversion;	/* module-specific major version */
+    CARD8	 minorversion;	/* module-specific minor version */
+    CARD16	 patchlevel;	/* module-specific patch level */
+    const char * abiclass;	/* ABI class that the module uses */
+    CARD32	 abiversion;	/* ABI version */
+    const char * moduleclass;	/* module class description */
+    CARD32	 checksum[4];	/* contains a digital signature of the */
+				/* version info structure */
+} XF86ModuleVersionInfo;
+
+/*
+ * This structure can be used to callers of LoadModule and LoadSubModule to
+ * specify version and/or ABI requirements.
+ */
+typedef struct {
+    CARD8	 majorversion;	/* module-specific major version */
+    CARD8	 minorversion;	/* moudle-specific minor version */
+    CARD16	 patchlevel;	/* module-specific patch level */
+    const char * abiclass;	/* ABI class that the module uses */
+    CARD32	 abiversion;	/* ABI version */
+    const char * moduleclass;	/* module class */
+} XF86ModReqInfo;
+
+/* values to indicate unspecified fields in XF86ModReqInfo. */
+#define MAJOR_UNSPEC		0xFF
+#define MINOR_UNSPEC		0xFF
+#define PATCH_UNSPEC		0xFFFF
+#define ABI_VERS_UNSPEC		0xFFFFFFFF
+
+#define MODULE_VERSION_NUMERIC(maj, min, patch) \
+	((((maj) & 0xFF) << 24) | (((min) & 0xFF) << 16) | (patch & 0xFFFF))
+#define GET_MODULE_MAJOR_VERSION(vers)	(((vers) >> 24) & 0xFF)
+#define GET_MODULE_MINOR_VERSION(vers)	(((vers) >> 16) & 0xFF)
+#define GET_MODULE_PATCHLEVEL(vers)	((vers) & 0xFFFF)
+
+#define INITARGS void
+
+typedef void (*InitExtension)(INITARGS);
+
+typedef struct {
+    InitExtension	initFunc;
+    const char *	name;
+    Bool		*disablePtr;
+    InitExtension	setupFunc;	
+    const char **	initDependencies;
+} ExtensionModule;
+
+extern ExtensionModule *ExtensionModuleList;
+
+/* Prototypes for Loader functions that are exported to modules */
+#ifndef IN_LOADER
+/* Prototypes with opaque pointers for use by modules */
+pointer LoadSubModule(pointer, const char *, const char **,
+		      const char **, pointer, const XF86ModReqInfo *,
+		      int *, int *);
+pointer LoadSubModuleLocal(pointer, const char *, const char **,
+			   const char **, pointer, const XF86ModReqInfo *,
+			   int *, int *);
+void UnloadSubModule(pointer);
+void LoadFont(pointer);
+void UnloadModule (pointer);
+#endif
+pointer LoaderSymbol(const char *);
+pointer LoaderSymbolLocal(pointer module, const char *);
+char **LoaderListDirs(const char **, const char **);
+void LoaderFreeDirList(char **);
+void LoaderErrorMsg(const char *, const char *, int, int);
+void LoadExtension(ExtensionModule *, Bool);
+void LoaderRefSymLists(const char **, ...);
+void LoaderRefSymbols(const char *, ...);
+void LoaderReqSymLists(const char **, ...);
+void LoaderReqSymbols(const char *, ...);
+int LoaderCheckUnresolved(int);
+void LoaderGetOS(const char **name, int *major, int *minor, int *teeny);
+int LoaderGetABIVersion(const char *abiclass);
+
+typedef pointer (*ModuleSetupProc)(pointer, pointer, int *, int *);
+typedef void (*ModuleTearDownProc)(pointer);
+#define MODULESETUPPROTO(func) pointer func(pointer, pointer, int*, int*)
+#define MODULETEARDOWNPROTO(func) void func(pointer)
+
+typedef struct {
+    XF86ModuleVersionInfo *	vers;
+    ModuleSetupProc		setup;
+    ModuleTearDownProc		teardown;
+} XF86ModuleData;
+
+#endif /* _XF86STR_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Opt.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Opt.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Opt.h	(revision 9233)
@@ -0,0 +1,113 @@
+
+/*
+ * Copyright (c) 1998-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/* Option handling things that ModuleSetup procs can use */
+
+#ifndef _XF86_OPT_H_
+#define _XF86_OPT_H_
+
+typedef struct {
+    double freq;
+    int units;
+} OptFrequency;
+
+typedef union {
+    unsigned long       num;
+    char *              str;
+    double              realnum;
+    Bool		bool;
+    OptFrequency	freq;
+} ValueUnion;
+    
+typedef enum {
+    OPTV_NONE = 0,
+    OPTV_INTEGER,
+    OPTV_STRING,                /* a non-empty string */
+    OPTV_ANYSTR,                /* Any string, including an empty one */
+    OPTV_REAL,
+    OPTV_BOOLEAN,
+    OPTV_FREQ
+} OptionValueType;
+
+typedef enum {
+    OPTUNITS_HZ = 1,
+    OPTUNITS_KHZ,
+    OPTUNITS_MHZ
+} OptFreqUnits;
+
+typedef struct {
+    int                 token;
+    const char*         name;
+    OptionValueType     type;
+    ValueUnion          value;
+    Bool                found;
+} OptionInfoRec, *OptionInfoPtr;
+
+int xf86SetIntOption(pointer optlist, const char *name, int deflt);
+double xf86SetRealOption(pointer optlist, const char *name, double deflt);
+char *xf86SetStrOption(pointer optlist, const char *name, char *deflt);
+int xf86SetBoolOption(pointer list, const char *name, int deflt );
+int xf86CheckIntOption(pointer optlist, const char *name, int deflt);
+double xf86CheckRealOption(pointer optlist, const char *name, double deflt);
+char *xf86CheckStrOption(pointer optlist, const char *name, char *deflt);
+int xf86CheckBoolOption(pointer list, const char *name, int deflt );
+pointer xf86AddNewOption(pointer head, const char *name, const char *val );
+pointer xf86NewOption(char *name, char *value );
+pointer xf86NextOption(pointer list );
+pointer xf86OptionListCreate(const char **options, int count, int used);
+pointer xf86OptionListMerge(pointer head, pointer tail);
+void xf86OptionListFree(pointer opt);
+char *xf86OptionName(pointer opt);
+char *xf86OptionValue(pointer opt);
+void xf86OptionListReport(pointer parm);
+pointer xf86FindOption(pointer options, const char *name);
+char *xf86FindOptionValue(pointer options, const char *name);
+void xf86MarkOptionUsed(pointer option);
+void xf86MarkOptionUsedByName(pointer options, const char *name);
+Bool xf86CheckIfOptionUsed(pointer option);
+Bool xf86CheckIfOptionUsedByName(pointer options, const char *name);
+void xf86ShowUnusedOptions(int scrnIndex, pointer options);
+void xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo);
+OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, int token);
+const char *xf86TokenToOptName(const OptionInfoRec *table, int token);
+Bool xf86IsOptionSet(const OptionInfoRec *table, int token);
+char *xf86GetOptValString(const OptionInfoRec *table, int token);
+Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value);
+Bool xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value);
+Bool xf86GetOptValReal(const OptionInfoRec *table, int token, double *value);
+Bool xf86GetOptValFreq(const OptionInfoRec *table, int token,
+			OptFreqUnits expectedUnits, double *value);
+Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value);
+Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def);
+int xf86NameCmp(const char *s1, const char *s2);
+char *xf86NormalizeName(const char *s);
+pointer xf86ReplaceIntOption(pointer optlist,  const char *name, const int val);
+pointer xf86ReplaceRealOption(pointer optlist,  const char *name, const double val);
+pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val);
+pointer xf86ReplaceStrOption(pointer optlist,  const char *name, const char* val);        
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Optrec.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Optrec.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Optrec.h	(revision 9233)
@@ -0,0 +1,112 @@
+/* 
+ * 
+ * Copyright (c) 1997  Metro Link Incorporated
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"), 
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ * 
+ * Except as contained in this notice, the name of the Metro Link shall not be
+ * used in advertising or otherwise to promote the sale, use or other dealings
+ * in this Software without prior written authorization from Metro Link.
+ * 
+ */
+/*
+ * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+
+/* 
+ * This file contains the Option Record that is passed between the Parser,
+ * and Module setup procs.
+ */
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _xf86Optrec_h_
+#define _xf86Optrec_h_
+#include <stdio.h>
+
+/* 
+ * all records that need to be linked lists should contain a GenericList as
+ * their first field.
+ */
+typedef struct generic_list_rec
+{
+	void *next;
+}
+GenericListRec, *GenericListPtr, *glp;
+
+/*
+ * All options are stored using this data type.
+ */
+typedef struct
+{
+	GenericListRec list;
+	char *opt_name;
+	char *opt_val;
+	int opt_used;
+	char *opt_comment;
+}
+XF86OptionRec, *XF86OptionPtr;
+
+
+XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name, char *val);
+XF86OptionPtr xf86optionListDup(XF86OptionPtr opt);
+void xf86optionListFree(XF86OptionPtr opt);
+char *xf86optionName(XF86OptionPtr opt);
+char *xf86optionValue(XF86OptionPtr opt);
+XF86OptionPtr xf86newOption(char *name, char *value);
+XF86OptionPtr xf86nextOption(XF86OptionPtr list);
+XF86OptionPtr xf86findOption(XF86OptionPtr list, const char *name);
+char *xf86findOptionValue(XF86OptionPtr list, const char *name);
+int xf86findOptionBoolean (XF86OptionPtr, const char *, int);
+XF86OptionPtr xf86optionListCreate(const char **options, int count, int used);
+XF86OptionPtr xf86optionListMerge(XF86OptionPtr head, XF86OptionPtr tail);
+char *xf86configStrdup (const char *s);
+int xf86nameCompare (const char *s1, const char *s2);
+char *xf86uLongToString(unsigned long i);
+void xf86debugListOptions(XF86OptionPtr);
+XF86OptionPtr xf86parseOption(XF86OptionPtr head);
+void xf86printOptionList(FILE *fp, XF86OptionPtr list, int tabs);
+
+
+#endif /* _xf86Optrec_h_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Parser.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Parser.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Parser.h	(revision 9233)
@@ -0,0 +1,484 @@
+/* 
+ * 
+ * Copyright (c) 1997  Metro Link Incorporated
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"), 
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ * 
+ * Except as contained in this notice, the name of the Metro Link shall not be
+ * used in advertising or otherwise to promote the sale, use or other dealings
+ * in this Software without prior written authorization from Metro Link.
+ * 
+ */
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+
+/* 
+ * This file contains the external interfaces for the XFree86 configuration
+ * file parser.
+ */
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _xf86Parser_h_
+#define _xf86Parser_h_
+
+#include "xf86Optrec.h"
+
+#define HAVE_PARSER_DECLS
+
+typedef struct
+{
+	char *file_logfile;
+	char *file_modulepath;
+	char *file_inputdevs;
+	char *file_fontpath;
+	char *file_comment;
+}
+XF86ConfFilesRec, *XF86ConfFilesPtr;
+
+/* Values for load_type */
+#define XF86_LOAD_MODULE	0
+#define XF86_LOAD_DRIVER	1
+#define XF86_DISABLE_MODULE	2
+
+typedef struct
+{
+	GenericListRec list;
+	int load_type;
+	char *load_name;
+	XF86OptionPtr load_opt;
+	char *load_comment;
+        int ignore;
+}
+XF86LoadRec, *XF86LoadPtr;
+
+typedef struct
+{
+	XF86LoadPtr mod_load_lst;
+    XF86LoadPtr mod_disable_lst;
+	char *mod_comment;
+}
+XF86ConfModuleRec, *XF86ConfModulePtr;
+
+#define CONF_IMPLICIT_KEYBOARD	"Implicit Core Keyboard"
+
+#define CONF_IMPLICIT_POINTER	"Implicit Core Pointer"
+
+#define XF86CONF_PHSYNC    0x0001
+#define XF86CONF_NHSYNC    0x0002
+#define XF86CONF_PVSYNC    0x0004
+#define XF86CONF_NVSYNC    0x0008
+#define XF86CONF_INTERLACE 0x0010
+#define XF86CONF_DBLSCAN   0x0020
+#define XF86CONF_CSYNC     0x0040
+#define XF86CONF_PCSYNC    0x0080
+#define XF86CONF_NCSYNC    0x0100
+#define XF86CONF_HSKEW     0x0200	/* hskew provided */
+#define XF86CONF_BCAST     0x0400
+#define XF86CONF_CUSTOM    0x0800	/* timing numbers customized by editor */
+#define XF86CONF_VSCAN     0x1000
+
+typedef struct
+{
+	GenericListRec list;
+	char *ml_identifier;
+	int ml_clock;
+	int ml_hdisplay;
+	int ml_hsyncstart;
+	int ml_hsyncend;
+	int ml_htotal;
+	int ml_vdisplay;
+	int ml_vsyncstart;
+	int ml_vsyncend;
+	int ml_vtotal;
+	int ml_vscan;
+	int ml_flags;
+	int ml_hskew;
+	char *ml_comment;
+}
+XF86ConfModeLineRec, *XF86ConfModeLinePtr;
+
+typedef struct
+{
+	GenericListRec list;
+	char *vp_identifier;
+	XF86OptionPtr vp_option_lst;
+	char *vp_comment;
+}
+XF86ConfVideoPortRec, *XF86ConfVideoPortPtr;
+
+typedef struct
+{
+	GenericListRec list;
+	char *va_identifier;
+	char *va_vendor;
+	char *va_board;
+	char *va_busid;
+	char *va_driver;
+	XF86OptionPtr va_option_lst;
+	XF86ConfVideoPortPtr va_port_lst;
+	char *va_fwdref;
+	char *va_comment;
+}
+XF86ConfVideoAdaptorRec, *XF86ConfVideoAdaptorPtr;
+
+#define CONF_MAX_HSYNC 8
+#define CONF_MAX_VREFRESH 8
+
+typedef struct
+{
+	float hi, lo;
+}
+parser_range;
+
+typedef struct
+{
+	int red, green, blue;
+}
+parser_rgb;
+
+typedef struct
+{
+	GenericListRec list;
+	char *modes_identifier;
+	XF86ConfModeLinePtr mon_modeline_lst;
+	char *modes_comment;
+}
+XF86ConfModesRec, *XF86ConfModesPtr;
+
+typedef struct
+{
+	GenericListRec list;
+	char *ml_modes_str;
+	XF86ConfModesPtr ml_modes;
+}
+XF86ConfModesLinkRec, *XF86ConfModesLinkPtr;
+
+typedef struct
+{
+	GenericListRec list;
+	char *mon_identifier;
+	char *mon_vendor;
+	char *mon_modelname;
+	int mon_width;				/* in mm */
+	int mon_height;				/* in mm */
+	XF86ConfModeLinePtr mon_modeline_lst;
+	int mon_n_hsync;
+	parser_range mon_hsync[CONF_MAX_HSYNC];
+	int mon_n_vrefresh;
+	parser_range mon_vrefresh[CONF_MAX_VREFRESH];
+	float mon_gamma_red;
+	float mon_gamma_green;
+	float mon_gamma_blue;
+	XF86OptionPtr mon_option_lst;
+	XF86ConfModesLinkPtr mon_modes_sect_lst;
+	char *mon_comment;
+}
+XF86ConfMonitorRec, *XF86ConfMonitorPtr;
+
+#define CONF_MAXDACSPEEDS 4
+#define CONF_MAXCLOCKS    128
+
+typedef struct
+{
+	GenericListRec list;
+	char *dev_identifier;
+	char *dev_vendor;
+	char *dev_board;
+	char *dev_chipset;
+	char *dev_busid;
+	char *dev_card;
+	char *dev_driver;
+	char *dev_ramdac;
+	int dev_dacSpeeds[CONF_MAXDACSPEEDS];
+	int dev_videoram;
+	int dev_textclockfreq;
+	unsigned long dev_bios_base;
+	unsigned long dev_mem_base;
+	unsigned long dev_io_base;
+	char *dev_clockchip;
+	int dev_clocks;
+	int dev_clock[CONF_MAXCLOCKS];
+	int dev_chipid;
+	int dev_chiprev;
+	int dev_irq;
+	int dev_screen;
+	XF86OptionPtr dev_option_lst;
+	char *dev_comment;
+}
+XF86ConfDeviceRec, *XF86ConfDevicePtr;
+
+typedef struct
+{
+	GenericListRec list;
+	char *mode_name;
+}
+XF86ModeRec, *XF86ModePtr;
+
+typedef struct
+{
+	GenericListRec list;
+	int disp_frameX0;
+	int disp_frameY0;
+	int disp_virtualX;
+	int disp_virtualY;
+	int disp_depth;
+	int disp_bpp;
+	char *disp_visual;
+	parser_rgb disp_weight;
+	parser_rgb disp_black;
+	parser_rgb disp_white;
+	XF86ModePtr disp_mode_lst;
+	XF86OptionPtr disp_option_lst;
+	char *disp_comment;
+}
+XF86ConfDisplayRec, *XF86ConfDisplayPtr;
+
+typedef struct
+{
+	XF86OptionPtr flg_option_lst;
+	char *flg_comment;
+}
+XF86ConfFlagsRec, *XF86ConfFlagsPtr;
+
+typedef struct
+{
+	GenericListRec list;
+	char *al_adaptor_str;
+	XF86ConfVideoAdaptorPtr al_adaptor;
+}
+XF86ConfAdaptorLinkRec, *XF86ConfAdaptorLinkPtr;
+
+typedef struct
+{
+	GenericListRec list;
+	char *scrn_identifier;
+	char *scrn_obso_driver;
+	int scrn_defaultdepth;
+	int scrn_defaultbpp;
+	int scrn_defaultfbbpp;
+	char *scrn_monitor_str;
+	XF86ConfMonitorPtr scrn_monitor;
+	char *scrn_device_str;
+	XF86ConfDevicePtr scrn_device;
+	XF86ConfAdaptorLinkPtr scrn_adaptor_lst;
+	XF86ConfDisplayPtr scrn_display_lst;
+	XF86OptionPtr scrn_option_lst;
+	char *scrn_comment;
+	int scrn_virtualX, scrn_virtualY;
+}
+XF86ConfScreenRec, *XF86ConfScreenPtr;
+
+typedef struct
+{
+	GenericListRec list;
+	char *inp_identifier;
+	char *inp_driver;
+	XF86OptionPtr inp_option_lst;
+	char *inp_comment;
+}
+XF86ConfInputRec, *XF86ConfInputPtr;
+
+typedef struct
+{
+	GenericListRec list;
+	XF86ConfInputPtr iref_inputdev;
+	char *iref_inputdev_str;
+	XF86OptionPtr iref_option_lst;
+}
+XF86ConfInputrefRec, *XF86ConfInputrefPtr;
+
+/* Values for adj_where */
+#define CONF_ADJ_OBSOLETE	-1
+#define CONF_ADJ_ABSOLUTE	0
+#define CONF_ADJ_RIGHTOF	1
+#define CONF_ADJ_LEFTOF		2
+#define CONF_ADJ_ABOVE		3
+#define CONF_ADJ_BELOW		4
+#define CONF_ADJ_RELATIVE	5
+
+typedef struct
+{
+	GenericListRec list;
+	int adj_scrnum;
+	XF86ConfScreenPtr adj_screen;
+	char *adj_screen_str;
+	XF86ConfScreenPtr adj_top;
+	char *adj_top_str;
+	XF86ConfScreenPtr adj_bottom;
+	char *adj_bottom_str;
+	XF86ConfScreenPtr adj_left;
+	char *adj_left_str;
+	XF86ConfScreenPtr adj_right;
+	char *adj_right_str;
+	int adj_where;
+	int adj_x;
+	int adj_y;
+	char *adj_refscreen;
+}
+XF86ConfAdjacencyRec, *XF86ConfAdjacencyPtr;
+
+typedef struct
+{
+	GenericListRec list;
+	char *inactive_device_str;
+	XF86ConfDevicePtr inactive_device;
+}
+XF86ConfInactiveRec, *XF86ConfInactivePtr;
+
+typedef struct
+{
+	GenericListRec list;
+	char *lay_identifier;
+	XF86ConfAdjacencyPtr lay_adjacency_lst;
+	XF86ConfInactivePtr lay_inactive_lst;
+	XF86ConfInputrefPtr lay_input_lst;
+	XF86OptionPtr lay_option_lst;
+	char *lay_comment;
+}
+XF86ConfLayoutRec, *XF86ConfLayoutPtr;
+
+typedef struct 
+{ 
+	GenericListRec list; 
+	char *vs_name;
+	char *vs_identifier;
+	XF86OptionPtr vs_option_lst;
+	char *vs_comment;
+}
+XF86ConfVendSubRec, *XF86ConfVendSubPtr;
+
+typedef struct
+{
+	GenericListRec list;
+	char *vnd_identifier;
+	XF86OptionPtr vnd_option_lst;
+	XF86ConfVendSubPtr vnd_sub_lst;
+	char *vnd_comment;
+}
+XF86ConfVendorRec, *XF86ConfVendorPtr;
+
+typedef struct
+{
+	GenericListRec list;
+	int buf_count;
+	int buf_size;
+	char *buf_flags;
+	char *buf_comment;
+}
+XF86ConfBuffersRec, *XF86ConfBuffersPtr;
+
+typedef struct
+{
+	char *dri_group_name;
+	int dri_group;
+	int dri_mode;
+	XF86ConfBuffersPtr dri_buffers_lst;
+	char *dri_comment;
+}
+XF86ConfDRIRec, *XF86ConfDRIPtr;
+
+typedef struct
+{
+	XF86OptionPtr ext_option_lst;
+	char *extensions_comment;
+}
+XF86ConfExtensionsRec, *XF86ConfExtensionsPtr;
+
+typedef struct
+{
+	XF86ConfFilesPtr conf_files;
+	XF86ConfModulePtr conf_modules;
+	XF86ConfFlagsPtr conf_flags;
+	XF86ConfVideoAdaptorPtr conf_videoadaptor_lst;
+	XF86ConfModesPtr conf_modes_lst;
+	XF86ConfMonitorPtr conf_monitor_lst;
+	XF86ConfDevicePtr conf_device_lst;
+	XF86ConfScreenPtr conf_screen_lst;
+	XF86ConfInputPtr conf_input_lst;
+	XF86ConfLayoutPtr conf_layout_lst;
+	XF86ConfVendorPtr conf_vendor_lst;
+	XF86ConfDRIPtr conf_dri;
+	XF86ConfExtensionsPtr conf_extensions;
+	char *conf_comment;
+}
+XF86ConfigRec, *XF86ConfigPtr;
+
+typedef struct
+{
+	int token;			/* id of the token */
+	char *name;			/* pointer to the LOWERCASED name */
+}
+xf86ConfigSymTabRec, *xf86ConfigSymTabPtr;
+
+/*
+ * prototypes for public functions
+ */
+extern const char *xf86openConfigFile (const char *, const char *,
+					const char *);
+extern void xf86setBuiltinConfig(const char *config[]);
+extern XF86ConfigPtr xf86readConfigFile (void);
+extern void xf86closeConfigFile (void);
+extern void xf86freeConfig (XF86ConfigPtr p);
+extern int xf86writeConfigFile (const char *, XF86ConfigPtr);
+XF86ConfDevicePtr xf86findDevice(const char *ident, XF86ConfDevicePtr p);
+XF86ConfLayoutPtr xf86findLayout(const char *name, XF86ConfLayoutPtr list);
+XF86ConfMonitorPtr xf86findMonitor(const char *ident, XF86ConfMonitorPtr p);
+XF86ConfModesPtr xf86findModes(const char *ident, XF86ConfModesPtr p);
+XF86ConfModeLinePtr xf86findModeLine(const char *ident, XF86ConfModeLinePtr p);
+XF86ConfScreenPtr xf86findScreen(const char *ident, XF86ConfScreenPtr p);
+XF86ConfInputPtr xf86findInput(const char *ident, XF86ConfInputPtr p);
+XF86ConfInputPtr xf86findInputByDriver(const char *driver, XF86ConfInputPtr p);
+XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident,
+						XF86ConfVideoAdaptorPtr p);
+
+GenericListPtr xf86addListItem(GenericListPtr head, GenericListPtr c_new);
+int xf86itemNotSublist(GenericListPtr list_1, GenericListPtr list_2);
+
+int xf86pathIsAbsolute(const char *path);
+int xf86pathIsSafe(const char *path);
+char *xf86addComment(char *cur, char *add);
+
+#endif /* _xf86Parser_h_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Pci.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Pci.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Pci.h	(revision 9233)
@@ -0,0 +1,265 @@
+/*
+ * Copyright 1998 by Concurrent Computer Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Concurrent Computer
+ * Corporation not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior
+ * permission.  Concurrent Computer Corporation makes no representations
+ * about the suitability of this software for any purpose.  It is
+ * provided "as is" without express or implied warranty.
+ *
+ * CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * Copyright 1998 by Metro Link Incorporated
+ *
+ * Permission to use, copy, modify, distribute, and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Metro Link
+ * Incorporated not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior
+ * permission.  Metro Link Incorporated makes no representations
+ * about the suitability of this software for any purpose.  It is
+ * provided "as is" without express or implied warranty.
+ *
+ * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * This file is derived in part from the original xf86_PCI.h that included
+ * following copyright message:
+ *
+ * Copyright 1995 by Robin Cutshaw <robin@XFree86.Org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the above listed copyright holder(s)
+ * not be used in advertising or publicity pertaining to distribution of
+ * the software without specific, written prior permission.  The above listed
+ * copyright holder(s) make(s) no representations about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or
+ * implied warranty.
+ *
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+
+/*
+ * This file contains just the public interface to the PCI code.
+ * Drivers should use this file rather than Pci.h.
+ */
+
+#ifndef _XF86PCI_H
+#define _XF86PCI_H 1
+#include <X11/Xarch.h>
+#include <X11/Xfuncproto.h>
+#include "misc.h"
+#include <pciaccess.h>
+
+/*
+ * PCI cfg space definitions (e.g. stuff right out of the PCI spec)
+ */
+
+/* Device identification register */
+#define PCI_ID_REG			0x00
+
+/* Command and status register */
+#define PCI_CMD_STAT_REG		0x04
+#define PCI_CMD_BASE_REG		0x10
+#define PCI_CMD_BIOS_REG		0x30
+#define PCI_CMD_MASK			0xffff
+#define PCI_CMD_IO_ENABLE		0x01
+#define PCI_CMD_MEM_ENABLE		0x02
+#define PCI_CMD_MASTER_ENABLE		0x04
+#define PCI_CMD_SPECIAL_ENABLE		0x08
+#define PCI_CMD_INVALIDATE_ENABLE	0x10
+#define PCI_CMD_PALETTE_ENABLE		0x20
+#define PCI_CMD_PARITY_ENABLE		0x40
+#define PCI_CMD_STEPPING_ENABLE		0x80
+#define PCI_CMD_SERR_ENABLE		0x100
+#define PCI_CMD_BACKTOBACK_ENABLE	0x200
+#define PCI_CMD_BIOS_ENABLE		0x01
+
+/* base class */
+#define PCI_CLASS_REG		0x08
+#define PCI_CLASS_MASK		0xff000000
+#define PCI_CLASS_SHIFT		24
+#define PCI_CLASS_EXTRACT(x)	\
+	(((x) & PCI_CLASS_MASK) >> PCI_CLASS_SHIFT)
+
+/* base class values */
+#define PCI_CLASS_PREHISTORIC		0x00
+#define PCI_CLASS_MASS_STORAGE		0x01
+#define PCI_CLASS_NETWORK		0x02
+#define PCI_CLASS_DISPLAY		0x03
+#define PCI_CLASS_MULTIMEDIA		0x04
+#define PCI_CLASS_MEMORY		0x05
+#define PCI_CLASS_BRIDGE		0x06
+#define PCI_CLASS_COMMUNICATIONS	0x07
+#define PCI_CLASS_SYSPERIPH		0x08
+#define PCI_CLASS_INPUT			0x09
+#define PCI_CLASS_DOCKING		0x0a
+#define PCI_CLASS_PROCESSOR		0x0b
+#define PCI_CLASS_SERIALBUS		0x0c
+#define PCI_CLASS_WIRELESS		0x0d
+#define PCI_CLASS_I2O			0x0e
+#define PCI_CLASS_SATELLITE		0x0f
+#define PCI_CLASS_CRYPT			0x10
+#define PCI_CLASS_DATA_ACQUISTION	0x11
+#define PCI_CLASS_UNDEFINED		0xff
+
+/* sub class */
+#define PCI_SUBCLASS_MASK	0x00ff0000
+#define PCI_SUBCLASS_SHIFT	16
+#define PCI_SUBCLASS_EXTRACT(x)	\
+	(((x) & PCI_SUBCLASS_MASK) >> PCI_SUBCLASS_SHIFT)
+
+/* Sub class values */
+/* 0x00 prehistoric subclasses */
+#define PCI_SUBCLASS_PREHISTORIC_MISC	0x00
+#define PCI_SUBCLASS_PREHISTORIC_VGA	0x01
+
+/* 0x03 display subclasses */
+#define PCI_SUBCLASS_DISPLAY_VGA	0x00
+#define PCI_SUBCLASS_DISPLAY_XGA	0x01
+#define PCI_SUBCLASS_DISPLAY_MISC	0x80
+
+/* 0x04 multimedia subclasses */
+#define PCI_SUBCLASS_MULTIMEDIA_VIDEO	0x00
+#define PCI_SUBCLASS_MULTIMEDIA_AUDIO	0x01
+#define PCI_SUBCLASS_MULTIMEDIA_MISC	0x80
+
+/* 0x06 bridge subclasses */
+#define PCI_SUBCLASS_BRIDGE_HOST	0x00
+#define PCI_SUBCLASS_BRIDGE_ISA		0x01
+#define PCI_SUBCLASS_BRIDGE_EISA	0x02
+#define PCI_SUBCLASS_BRIDGE_MC		0x03
+#define PCI_SUBCLASS_BRIDGE_PCI		0x04
+#define PCI_SUBCLASS_BRIDGE_PCMCIA	0x05
+#define PCI_SUBCLASS_BRIDGE_NUBUS	0x06
+#define PCI_SUBCLASS_BRIDGE_CARDBUS	0x07
+#define PCI_SUBCLASS_BRIDGE_RACEWAY	0x08
+#define PCI_SUBCLASS_BRIDGE_MISC	0x80
+#define PCI_IF_BRIDGE_PCI_SUBTRACTIVE	0x01
+
+/* 0x0b processor subclasses */
+#define PCI_SUBCLASS_PROCESSOR_386	0x00
+#define PCI_SUBCLASS_PROCESSOR_486	0x01
+#define PCI_SUBCLASS_PROCESSOR_PENTIUM	0x02
+#define PCI_SUBCLASS_PROCESSOR_ALPHA	0x10
+#define PCI_SUBCLASS_PROCESSOR_POWERPC	0x20
+#define PCI_SUBCLASS_PROCESSOR_MIPS	0x30
+#define PCI_SUBCLASS_PROCESSOR_COPROC	0x40
+
+/* PCI-PCI bridge mapping registers */
+#define PCI_PCI_BRIDGE_BUS_REG		0x18
+#define PCI_SUBORDINATE_BUS_MASK	0x00ff0000
+#define PCI_SECONDARY_BUS_MASK		0x0000ff00
+#define PCI_PRIMARY_BUS_MASK		0x000000ff
+
+#define PCI_PCI_BRIDGE_IO_REG		0x1c
+#define PCI_PCI_BRIDGE_MEM_REG		0x20
+#define PCI_PCI_BRIDGE_PMEM_REG		0x24
+
+#define PCI_PCI_BRIDGE_CONTROL_REG	0x3E
+#define PCI_PCI_BRIDGE_PARITY_EN	0x01
+#define PCI_PCI_BRIDGE_SERR_EN		0x02
+#define PCI_PCI_BRIDGE_ISA_EN		0x04
+#define PCI_PCI_BRIDGE_VGA_EN		0x08
+#define PCI_PCI_BRIDGE_MASTER_ABORT_EN	0x20
+#define PCI_PCI_BRIDGE_SECONDARY_RESET	0x40
+#define PCI_PCI_BRIDGE_FAST_B2B_EN	0x80
+
+/* Subsystem identification register */
+#define PCI_SUBSYSTEM_ID_REG		0x2c
+
+/* User defined cfg space regs */
+#define PCI_REG_USERCONFIG		0x40
+#define PCI_OPTION_REG			0x40
+
+/*
+ * Typedefs, etc...
+ */
+
+/* Primitive Types */
+typedef unsigned long ADDRESS;		/* Memory/PCI address */
+typedef unsigned long IOADDRESS;	/* Must be large enough for a pointer */
+typedef unsigned long PCITAG;
+
+typedef enum {
+    PCI_MEM,
+    PCI_MEM_SIZE,
+    PCI_MEM_SPARSE_BASE,
+    PCI_MEM_SPARSE_MASK,
+    PCI_IO,
+    PCI_IO_SIZE,
+    PCI_IO_SPARSE_BASE,
+    PCI_IO_SPARSE_MASK
+} PciAddrType;
+
+
+/* Public PCI access functions */
+ADDRESS	      pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr);
+PCITAG	      pciTag(int busnum, int devnum, int funcnum);
+Bool xf86scanpci(void);
+
+extern int pciNumBuses;
+
+/* Domain access functions.  Some of these probably shouldn't be public */
+pointer xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev,
+    ADDRESS Base, unsigned long Size);
+IOADDRESS xf86MapLegacyIO(struct pci_device *dev);
+
+#endif /* _XF86PCI_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86RAC.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86RAC.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86RAC.h	(revision 9233)
@@ -0,0 +1,17 @@
+
+#ifndef __XF86RAC_H
+#define __XF86RAC_H 1
+
+#include "screenint.h"
+#include "misc.h"
+#include "xf86.h"
+
+Bool xf86RACInit(ScreenPtr pScreen, unsigned int flag);
+
+/* flags */
+#define RAC_FB       0x01
+#define RAC_CURSOR   0x02
+#define RAC_COLORMAP 0x04
+#define RAC_VIEWPORT 0x08
+
+#endif /* __XF86RAC_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Resources.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Resources.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Resources.h	(revision 9233)
@@ -0,0 +1,137 @@
+
+/*
+ * Copyright (c) 1999-2002 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _XF86_RESOURCES_H
+
+#define _XF86_RESOURCES_H
+
+#include "xf86str.h"
+
+#define _END {ResEnd,0,0}
+
+#define _VGA_EXCLUSIVE \
+		{ResExcMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
+		{ResExcMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
+		{ResExcMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
+		{ResExcIoBlock  | ResBios | ResBus,     0x03B0,     0x03BB},\
+		{ResExcIoBlock  | ResBios | ResBus,     0x03C0,     0x03DF}
+
+#define _VGA_SHARED \
+		{ResShrMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
+		{ResShrMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
+		{ResShrMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
+		{ResShrIoBlock  | ResBios | ResBus,     0x03B0,     0x03BB},\
+		{ResShrIoBlock  | ResBios | ResBus,     0x03C0,     0x03DF}
+
+#define _VGA_SHARED_MEM \
+		{ResShrMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
+		{ResShrMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
+ 		{ResShrMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF}
+
+#define _VGA_SHARED_IO \
+		{ResShrIoBlock  | ResBios | ResBus,     0x03B0,     0x03BB},\
+		{ResShrIoBlock  | ResBios | ResBus,     0x03C0,     0x03DF}
+
+/*
+ * Exclusive unused VGA:  resources unneeded but cannot be disabled.
+ * Like old Millennium.
+ */
+#define _VGA_EXCLUSIVE_UNUSED \
+	{ResExcUusdMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
+	{ResExcUusdMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
+	{ResExcUusdMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
+	{ResExcUusdIoBlock  | ResBios | ResBus,     0x03B0,     0x03BB},\
+	{ResExcUusdIoBlock  | ResBios | ResBus,     0x03C0,     0x03DF}
+
+/*
+ * Shared unused VGA:  resources unneeded but cannot be disabled
+ * independently.  This is used to determine if a device needs RAC.
+ */
+#define _VGA_SHARED_UNUSED \
+	{ResShrUusdMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
+	{ResShrUusdMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
+	{ResShrUusdMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
+	{ResShrUusdIoBlock  | ResBios | ResBus,     0x03B0,     0x03BB},\
+	{ResShrUusdIoBlock  | ResBios | ResBus,     0x03C0,     0x03DF}
+
+/*
+ * Sparse versions of the above for those adapters that respond to all ISA
+ * aliases of VGA ports.
+ */
+#define _VGA_EXCLUSIVE_SPARSE \
+	{ResExcMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
+	{ResExcMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
+	{ResExcMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
+	{ResExcIoSparse | ResBios | ResBus,     0x03B0,     0x03F8},\
+	{ResExcIoSparse | ResBios | ResBus,     0x03B8,     0x03FC},\
+	{ResExcIoSparse | ResBios | ResBus,     0x03C0,     0x03E0}
+
+#define _VGA_SHARED_SPARSE \
+	{ResShrMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
+	{ResShrMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
+	{ResShrMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
+	{ResShrIoSparse | ResBios | ResBus,     0x03B0,     0x03F8},\
+	{ResShrIoSparse | ResBios | ResBus,     0x03B8,     0x03FC},\
+	{ResShrIoSparse | ResBios | ResBus,     0x03C0,     0x03E0}
+
+#define _8514_EXCLUSIVE \
+	{ResExcIoSparse | ResBios | ResBus, 0x02E8, 0x03F8}
+
+#define _8514_SHARED \
+	{ResShrIoSparse | ResBios | ResBus, 0x02E8, 0x03F8}
+
+/* Predefined resources */
+extern resRange resVgaExclusive[];
+extern resRange resVgaShared[];
+extern resRange resVgaIoShared[];
+extern resRange resVgaMemShared[];
+extern resRange resVgaUnusedExclusive[];
+extern resRange resVgaUnusedShared[];
+extern resRange resVgaSparseExclusive[];
+extern resRange resVgaSparseShared[];
+extern resRange res8514Exclusive[];
+extern resRange res8514Shared[];
+
+/* Less misleading aliases for xf86SetOperatingState() */
+#define resVgaMem resVgaMemShared
+#define resVgaIo  resVgaIoShared
+#define resVga    resVgaShared
+
+/* Old style names */
+#define RES_EXCLUSIVE_VGA   resVgaExclusive
+#define RES_SHARED_VGA      resVgaShared
+#define RES_EXCLUSIVE_8514  res8514Exclusive
+#define RES_SHARED_8514     res8514Shared
+
+#define _PCI_AVOID_PC_STYLE \
+	{ResExcIoSparse | ResBus, 0x0100, 0x0300},\
+	{ResExcIoSparse | ResBus, 0x0200, 0x0200},\
+        {ResExcMemBlock | ResBus, 0xA0000,0xFFFFF}
+
+#define RES_UNDEFINED NULL
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Version.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Version.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86Version.h	(revision 9233)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 1994-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef XF86_VERSION_CURRENT
+
+#define XF86_VERSION_MAJOR	4
+#define XF86_VERSION_MINOR	3
+#define XF86_VERSION_PATCH	99
+#define XF86_VERSION_SNAP	902
+
+/* This has five arguments for compatibilty reasons */
+#define XF86_VERSION_NUMERIC(major,minor,patch,snap,dummy) \
+	(((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap)
+
+#define XF86_GET_MAJOR_VERSION(vers)	((vers) / 10000000)
+#define XF86_GET_MINOR_VERSION(vers)	(((vers) % 10000000) / 100000)
+#define XF86_GET_PATCH_VERSION(vers)	(((vers) % 100000) / 1000)
+#define XF86_GET_SNAP_VERSION(vers)	((vers) % 1000)
+
+/* Define these for compatibility.  They'll be removed at some point. */
+#define XF86_VERSION_SUBMINOR	XF86_VERSION_PATCH
+#define XF86_VERSION_BETA	0
+#define XF86_VERSION_ALPHA	XF86_VERSION_SNAP
+
+#define XF86_VERSION_CURRENT					\
+   XF86_VERSION_NUMERIC(XF86_VERSION_MAJOR,			\
+			XF86_VERSION_MINOR,			\
+			XF86_VERSION_PATCH,			\
+			XF86_VERSION_SNAP,			\
+			0)
+
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86_OSproc.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86_OSproc.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86_OSproc.h	(revision 9233)
@@ -0,0 +1,248 @@
+/*
+ * Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany
+ * Copyright 1992 by David Dawes <dawes@XFree86.org>
+ * Copyright 1992 by Jim Tsillas <jtsilla@damon.ccs.northeastern.edu>
+ * Copyright 1992 by Rich Murphey <Rich@Rice.edu>
+ * Copyright 1992 by Robert Baron <Robert.Baron@ernst.mach.cs.cmu.edu>
+ * Copyright 1992 by Orest Zborowski <obz@eskimo.com>
+ * Copyright 1993 by Vrije Universiteit, The Netherlands
+ * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
+ * Copyright 1994, 1996 by Holger Veit <Holger.Veit@gmd.de>
+ * Copyright 1994-2003 by The XFree86 Project, Inc
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the above listed copyright holders 
+ * not be used in advertising or publicity pertaining to distribution of 
+ * the software without specific, written prior permission.  The above listed
+ * copyright holders make no representations about the suitability of this 
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ *
+ * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD 
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
+ * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS BE 
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/*
+ * The ARM32 code here carries the following copyright:
+ *
+ * Copyright 1997
+ * Digital Equipment Corporation. All rights reserved.
+ * This software is furnished under license and may be used and copied only in 
+ * accordance with the following terms and conditions.  Subject to these
+ * conditions, you may download, copy, install, use, modify and distribute
+ * this software in source and/or binary form. No title or ownership is
+ * transferred hereby.
+ *
+ * 1) Any source code used, modified or distributed must reproduce and retain
+ *    this copyright notice and list of conditions as they appear in the
+ *    source file.
+ *
+ * 2) No right is granted to use any trade name, trademark, or logo of Digital 
+ *    Equipment Corporation. Neither the "Digital Equipment Corporation"
+ *    name nor any trademark or logo of Digital Equipment Corporation may be
+ *    used to endorse or promote products derived from this software without
+ *    the prior written permission of Digital Equipment Corporation.
+ *
+ * 3) This software is provided "AS-IS" and any express or implied warranties,
+ *    including but not limited to, any implied warranties of merchantability,
+ *    fitness for a particular purpose, or non-infringement are disclaimed.
+ *    In no event shall DIGITAL be liable for any damages whatsoever, and in
+ *    particular, DIGITAL shall not be liable for special, indirect,
+ *    consequential, or incidental damages or damages for lost profits, loss
+ *    of revenue or loss of use, whether such damages arise in contract, 
+ *    negligence, tort, under statute, in equity, at law or otherwise, even
+ *    if advised of the possibility of such damage. 
+ *
+ */
+
+
+#ifndef _XF86_OSPROC_H
+#define _XF86_OSPROC_H
+
+#ifdef XF86_OS_PRIVS
+#include "xf86Pci.h"
+#endif
+
+/*
+ * The actual prototypes have been pulled into this seperate file so
+ * that they can can be used without pulling in all of the OS specific
+ * stuff like sys/stat.h, etc. This casues problem for loadable modules.
+ */ 
+
+/*
+ * Flags for xf86MapVidMem().  Multiple flags can be or'd together.  The
+ * flags may be used as hints.  For example it would be permissible to
+ * enable write combining for memory marked only for framebuffer use.
+ */
+
+#define VIDMEM_FRAMEBUFFER	0x01	/* memory for framebuffer use */
+#define VIDMEM_MMIO		0x02	/* memory for I/O use */
+#define VIDMEM_MMIO_32BIT	0x04	/* memory accesses >= 32bit */
+#define VIDMEM_READSIDEEFFECT	0x08	/* reads can have side-effects */
+#define VIDMEM_SPARSE		0x10	/* sparse mapping required
+					 * assumed when VIDMEM_MMIO is
+					 * set. May be used with
+					 * VIDMEM_FRAMEBUFFER) */
+#define VIDMEM_READONLY		0x20	/* read-only mapping
+					 * used when reading BIOS images
+					 * through xf86MapVidMem() */
+
+/*
+ * OS-independent modem state flags for xf86SetSerialModemState() and
+ * xf86GetSerialModemState().
+ */
+#define XF86_M_LE		0x001	/* line enable */
+#define XF86_M_DTR		0x002	/* data terminal ready */
+#define XF86_M_RTS		0x004	/* request to send */
+#define XF86_M_ST		0x008	/* secondary transmit */
+#define XF86_M_SR		0x010	/* secondary receive */
+#define XF86_M_CTS		0x020	/* clear to send */
+#define XF86_M_CAR		0x040	/* carrier detect */
+#define XF86_M_RNG		0x080	/* ring */
+#define XF86_M_DSR		0x100	/* data set ready */
+
+#ifdef XF86_OS_PRIVS
+extern void xf86WrapperInit(void);
+#endif
+
+#ifndef NO_OSLIB_PROTOTYPES
+/*
+ * This is to prevent re-entrancy to FatalError() when aborting.
+ * Anything that can be called as a result of AbortDDX() should use this
+ * instead of FatalError().
+ */
+
+#define xf86FatalError(a, b) \
+	if (dispatchException & DE_TERMINATE) { \
+		ErrorF(a, b); \
+		ErrorF("\n"); \
+		return; \
+	} else FatalError(a, b)
+
+/***************************************************************************/
+/* Prototypes                                                              */
+/***************************************************************************/
+
+#include <X11/Xfuncproto.h>
+#include "opaque.h"
+
+_XFUNCPROTOBEGIN
+
+/* public functions */
+extern Bool xf86LinearVidMem(void);
+extern Bool xf86CheckMTRR(int); 
+extern pointer xf86MapVidMem(int, int, unsigned long, unsigned long);
+extern void xf86UnMapVidMem(int, pointer, unsigned long);
+extern void xf86MapReadSideEffects(int, int, pointer, unsigned long);
+extern int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *, int);
+extern Bool xf86EnableIO(void);
+extern void xf86DisableIO(void);
+extern Bool xf86DisableInterrupts(void);
+extern void xf86EnableInterrupts(void);
+extern void xf86SetTVOut(int);
+extern void xf86SetRGBOut(void);
+extern void xf86OSRingBell(int, int, int);
+#if defined(QNX4)
+#pragma aux xf86BusToMem modify [eax ebx ecx edx esi edi];
+#pragma aux xf86MemToBus modify [eax ebx ecx edx esi edi];
+#endif
+extern void xf86BusToMem(unsigned char *, unsigned char *, int);
+extern void xf86MemToBus(unsigned char *, unsigned char *, int);
+extern void xf86IODelay(void);
+extern void xf86UDelay(long usec);
+extern void xf86SetReallySlowBcopy(void);
+extern void xf86SlowBcopy(unsigned char *, unsigned char *, int);
+extern int xf86OpenSerial(pointer options);
+extern int xf86SetSerial(int fd, pointer options);
+extern int xf86SetSerialSpeed(int fd, int speed);
+extern int xf86ReadSerial(int fd, void *buf, int count);
+extern int xf86WriteSerial(int fd, const void *buf, int count);
+extern int xf86CloseSerial(int fd);
+extern int xf86FlushInput(int fd);
+extern int xf86WaitForInput(int fd, int timeout);
+extern int xf86SerialSendBreak(int fd, int duration);
+extern int xf86SetSerialModemState(int fd, int state);
+extern int xf86GetSerialModemState(int fd);
+extern int xf86SerialModemSetBits(int fd, int bits);
+extern int xf86SerialModemClearBits(int fd, int bits);
+extern int xf86LoadKernelModule(const char *pathname);
+extern void xf86RingBell(int volume, int pitch, int duration);
+
+/* AGP GART interface */
+
+typedef struct _AgpInfo {
+	CARD32		bridgeId;
+	CARD32		agpMode;
+	unsigned long	base;
+	unsigned long	size;
+	unsigned long	totalPages;
+	unsigned long	systemPages;
+	unsigned long	usedPages;
+} AgpInfo, *AgpInfoPtr;
+
+extern Bool xf86AgpGARTSupported(void);
+extern AgpInfoPtr xf86GetAGPInfo(int screenNum);
+extern Bool xf86AcquireGART(int screenNum);
+extern Bool xf86ReleaseGART(int screenNum);
+extern int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type,
+				  unsigned long *physical);
+extern Bool xf86DeallocateGARTMemory(int screenNum, int key);
+extern Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset);
+extern Bool xf86UnbindGARTMemory(int screenNum, int key);
+extern Bool xf86EnableAGP(int screenNum, CARD32 mode);
+extern Bool xf86GARTCloseScreen(int screenNum);
+
+/* These routines are in shared/sigio.c and are not loaded as part of the
+   module.  These routines are small, and the code if very POSIX-signal (or
+   OS-signal) specific, so it seemed better to provide more complex
+   wrappers than to wrap each individual function called. */
+extern int xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *);
+extern int xf86RemoveSIGIOHandler(int fd);
+extern int xf86BlockSIGIO (void);
+extern void xf86UnblockSIGIO (int);
+extern void xf86AssertBlockedSIGIO (char *);
+extern Bool xf86SIGIOSupported (void);
+
+#ifdef XF86_OS_PRIVS
+typedef void (*PMClose)(void);
+extern void xf86OpenConsole(void);
+extern void xf86CloseConsole(void);
+extern Bool xf86VTSwitchPending(void);
+extern Bool xf86VTSwitchAway(void);
+extern Bool xf86VTSwitchTo(void);
+extern void xf86VTRequest(int sig);
+extern int xf86ProcessArgument(int, char **, int);
+extern void xf86UseMsg(void);
+extern void xf86ReloadInputDevs(int sig);
+extern PMClose xf86OSPMOpen(void);
+
+#ifdef NEED_OS_RAC_PROTOS
+/* RAC-related privs */
+/* internal to os-support layer */
+resPtr xf86StdAccResFromOS(resPtr ret);
+
+/* available to the common layer */
+resPtr xf86AccResFromOS(resPtr ret);
+#endif /* NEED_OS_RAC_PROTOS */
+
+extern unsigned long xf86GetOSOffsetFromPCI(PCITAG tag, int space, unsigned long base);
+
+extern void xf86MakeNewMapping(int, int, unsigned long, unsigned long, pointer);
+extern void xf86InitVidMem(void);
+
+#endif /* XF86_OS_PRIVS */
+
+
+_XFUNCPROTOEND
+#endif /* NO_OSLIB_PROTOTYPES */
+
+#endif /* _XF86_OSPROC_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86cmap.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86cmap.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86cmap.h	(revision 9233)
@@ -0,0 +1,75 @@
+
+/*
+ * Copyright (c) 1998-2001 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _XF86CMAP_H
+#define _XF86CMAP_H
+
+#include "xf86str.h"
+#include "colormapst.h"
+
+#define CMAP_PALETTED_TRUECOLOR		0x0000001
+#define CMAP_RELOAD_ON_MODE_SWITCH	0x0000002
+#define CMAP_LOAD_EVEN_IF_OFFSCREEN	0x0000004
+
+Bool xf86HandleColormaps(
+    ScreenPtr pScreen,
+    int maxCol,
+    int sigRGBbits,
+    xf86LoadPaletteProc *loadPalette,
+    xf86SetOverscanProc *setOverscan,
+    unsigned int flags
+);
+
+int
+xf86ChangeGamma(
+   ScreenPtr pScreen,
+   Gamma newGamma
+);
+
+int
+xf86ChangeGammaRamp(
+   ScreenPtr pScreen,
+   int size,
+   unsigned short *red,
+   unsigned short *green,
+   unsigned short *blue
+);
+
+int xf86GetGammaRampSize(ScreenPtr pScreen);
+
+int
+xf86GetGammaRamp(
+   ScreenPtr pScreen,
+   int size,
+   unsigned short *red,
+   unsigned short *green,
+   unsigned short *blue
+);
+
+#endif /* _XF86CMAP_H */
+
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86i2c.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86i2c.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86i2c.h	(revision 9233)
@@ -0,0 +1,96 @@
+/* 
+ *  Copyright (C) 1998 Itai Nahshon, Michael Schimek
+ */
+
+
+#ifndef _XF86I2C_H
+#define _XF86I2C_H
+
+#include "regionstr.h"
+
+typedef unsigned char  I2CByte;
+typedef unsigned short I2CSlaveAddr;
+
+typedef struct _I2CBusRec *I2CBusPtr;
+typedef struct _I2CDevRec *I2CDevPtr;
+
+/* I2C masters have to register themselves */
+
+typedef struct _I2CBusRec {
+    char *		BusName;
+    int			scrnIndex;
+    
+    void		(*I2CUDelay) (I2CBusPtr b, int usec);
+    
+    void		(*I2CPutBits)(I2CBusPtr b, int  scl, int  sda);
+    void		(*I2CGetBits)(I2CBusPtr b, int *scl, int *sda);
+
+    /* Look at the generic routines to see how these functions should behave. */
+
+    Bool        	(*I2CStart)  (I2CBusPtr b, int timeout);
+    Bool        	(*I2CAddress)(I2CDevPtr d, I2CSlaveAddr);
+    void        	(*I2CStop)   (I2CDevPtr d);
+    Bool		(*I2CPutByte)(I2CDevPtr d, I2CByte data);
+    Bool		(*I2CGetByte)(I2CDevPtr d, I2CByte *data, Bool);
+
+    DevUnion		DriverPrivate;
+
+    int         	HoldTime; 	/* 1 / bus clock frequency, 5 or 2 usec */
+
+    int			BitTimeout;	/* usec */
+    int 		ByteTimeout;	/* usec */
+    int			AcknTimeout;    /* usec */
+    int 		StartTimeout;	/* usec */
+    int                 RiseFallTime;   /* usec */
+
+    I2CDevPtr		FirstDev;
+    I2CBusPtr		NextBus;
+    Bool 		(*I2CWriteRead)(I2CDevPtr d, I2CByte *WriteBuffer, int nWrite,
+		                   I2CByte *ReadBuffer,  int nRead);
+} I2CBusRec;
+
+I2CBusPtr 	xf86CreateI2CBusRec(void);
+void      	xf86DestroyI2CBusRec(I2CBusPtr pI2CBus, Bool unalloc, Bool devs_too);
+Bool      	xf86I2CBusInit(I2CBusPtr pI2CBus);
+I2CBusPtr 	xf86I2CFindBus(int scrnIndex, char *name);
+int		xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr **pppI2CBus);
+
+
+/* I2C slave devices */
+
+typedef struct _I2CDevRec {
+    char *		DevName;
+
+    int			BitTimeout;	/* usec */
+    int 		ByteTimeout;	/* usec */
+    int			AcknTimeout;    /* usec */
+    int 		StartTimeout;	/* usec */
+
+    I2CSlaveAddr	SlaveAddr;
+    I2CBusPtr		pI2CBus;
+    I2CDevPtr		NextDev;
+    DevUnion		DriverPrivate;
+} I2CDevRec;
+
+I2CDevPtr 	xf86CreateI2CDevRec(void);
+void      	xf86DestroyI2CDevRec(I2CDevPtr pI2CDev, Bool unalloc);
+Bool      	xf86I2CDevInit(I2CDevPtr pI2CDev);
+I2CDevPtr 	xf86I2CFindDev(I2CBusPtr, I2CSlaveAddr);
+
+/* See descriptions of these functions in xf86i2c.c */
+
+Bool	  	xf86I2CProbeAddress(I2CBusPtr pI2CBus, I2CSlaveAddr);
+Bool 		xf86I2CWriteRead(I2CDevPtr d, I2CByte *WriteBuffer, int nWrite,
+		                   I2CByte *ReadBuffer,  int nRead);
+#define 	xf86I2CRead(d, rb, nr) xf86I2CWriteRead(d, NULL, 0, rb, nr)
+Bool 		xf86I2CReadStatus(I2CDevPtr d, I2CByte *pbyte);
+Bool 		xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte);
+Bool 		xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte, int n);
+Bool 		xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword);
+#define 	xf86I2CWrite(d, wb, nw) xf86I2CWriteRead(d, wb, nw, NULL, 0)
+Bool 		xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte);
+Bool 		xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *WriteBuffer, int nWrite);
+Bool 		xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word);
+Bool 		xf86I2CWriteVec(I2CDevPtr d, I2CByte *vec, int nValues);
+
+#endif /*_XF86I2C_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86int10.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86int10.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86int10.h	(revision 9233)
@@ -0,0 +1,183 @@
+
+/*
+ *                   XFree86 int10 module
+ *   execute BIOS int 10h calls in x86 real mode environment
+ *                 Copyright 1999 Egbert Eich
+ */
+
+#ifndef _XF86INT10_H
+#define _XF86INT10_H
+
+#include <X11/Xmd.h>
+#include <X11/Xdefs.h>
+#include "xf86Pci.h"
+
+#define SEG_ADDR(x) (((x) >> 4) & 0x00F000)
+#define SEG_OFF(x) ((x) & 0x0FFFF)
+
+#define SET_BIOS_SCRATCH     0x1
+#define RESTORE_BIOS_SCRATCH 0x2
+
+/* int10 info structure */
+typedef struct {
+    int entityIndex;
+    int scrnIndex;
+    pointer cpuRegs;
+    CARD16  BIOSseg;
+    CARD16  inb40time;
+    char * BIOSScratch;
+    int Flags;
+    pointer private;
+    struct _int10Mem* mem;
+    int num;
+    int ax;
+    int bx;
+    int cx;
+    int dx;
+    int si;
+    int di;
+    int es;
+    int bp;
+    int flags;
+    int stackseg;
+    struct pci_device *dev;
+    IOADDRESS ioBase;
+} xf86Int10InfoRec, *xf86Int10InfoPtr;
+
+typedef struct _int10Mem {
+    CARD8(*rb)(xf86Int10InfoPtr, int);
+    CARD16(*rw)(xf86Int10InfoPtr, int);
+    CARD32(*rl)(xf86Int10InfoPtr, int);
+    void(*wb)(xf86Int10InfoPtr, int, CARD8);
+    void(*ww)(xf86Int10InfoPtr, int, CARD16);
+    void(*wl)(xf86Int10InfoPtr, int, CARD32);
+} int10MemRec, *int10MemPtr;
+
+typedef struct {
+    CARD8 save_msr;
+    CARD8 save_pos102;
+    CARD8 save_vse;
+    CARD8 save_46e8;
+} legacyVGARec, *legacyVGAPtr;
+    
+/* OS dependent functions */
+xf86Int10InfoPtr xf86InitInt10(int entityIndex);
+xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex, int Flags);
+void xf86FreeInt10(xf86Int10InfoPtr pInt);
+void *xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off);
+void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num);
+pointer xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr);
+
+/* x86 executor related functions */
+void xf86ExecX86int10(xf86Int10InfoPtr pInt);
+
+#ifdef _INT10_PRIVATE
+
+#define I_S_DEFAULT_INT_VECT 0xFF065
+#define SYS_SIZE 0x100000
+#define SYS_BIOS 0xF0000
+#if 1
+#define BIOS_SIZE 0x10000
+#else /* a bug in DGUX requires this - let's try it */
+#define BIOS_SIZE (0x10000 - 1)
+#endif
+#define LOW_PAGE_SIZE 0x600
+#define V_RAM 0xA0000
+#define VRAM_SIZE 0x20000
+#define V_BIOS_SIZE 0x10000
+#define V_BIOS 0xC0000
+#define BIOS_SCRATCH_OFF 0x449
+#define BIOS_SCRATCH_END 0x466
+#define BIOS_SCRATCH_LEN (BIOS_SCRATCH_END - BIOS_SCRATCH_OFF + 1)
+#define HIGH_MEM V_BIOS
+#define HIGH_MEM_SIZE (SYS_BIOS - HIGH_MEM)
+#define SEG_ADR(type, seg, reg)  type((seg << 4) + (X86_##reg))
+#define SEG_EADR(type, seg, reg) type((seg << 4) + (X86_E##reg))
+
+#define X86_TF_MASK		0x00000100
+#define X86_IF_MASK		0x00000200
+#define X86_IOPL_MASK		0x00003000
+#define X86_NT_MASK		0x00004000
+#define X86_VM_MASK		0x00020000
+#define X86_AC_MASK		0x00040000
+#define X86_VIF_MASK		0x00080000	/* virtual interrupt flag */
+#define X86_VIP_MASK		0x00100000	/* virtual interrupt pending */
+#define X86_ID_MASK		0x00200000
+
+#define MEM_RB(name, addr)      (*name->mem->rb)(name, addr)
+#define MEM_RW(name, addr)      (*name->mem->rw)(name, addr)
+#define MEM_RL(name, addr)      (*name->mem->rl)(name, addr)
+#define MEM_WB(name, addr, val) (*name->mem->wb)(name, addr, val)
+#define MEM_WW(name, addr, val) (*name->mem->ww)(name, addr, val)
+#define MEM_WL(name, addr, val) (*name->mem->wl)(name, addr, val)
+
+/* OS dependent functions */
+Bool MapCurrentInt10(xf86Int10InfoPtr pInt);
+/* x86 executor related functions */
+Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt);
+
+/* int.c */
+extern xf86Int10InfoPtr Int10Current;
+int int_handler(xf86Int10InfoPtr pInt);
+
+/* helper_exec.c */
+int setup_int(xf86Int10InfoPtr pInt);
+void finish_int(xf86Int10InfoPtr, int sig);
+CARD32 getIntVect(xf86Int10InfoPtr pInt, int num);
+void pushw(xf86Int10InfoPtr pInt, CARD16 val);
+int run_bios_int(int num, xf86Int10InfoPtr pInt);
+void dump_code(xf86Int10InfoPtr pInt);
+void dump_registers(xf86Int10InfoPtr pInt);
+void stack_trace(xf86Int10InfoPtr pInt);
+xf86Int10InfoPtr getInt10Rec(int entityIndex);
+CARD8 bios_checksum(const CARD8 *start, int size);
+void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
+void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
+#if defined (_PC)
+void xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt, Bool save);
+#endif
+int port_rep_inb(xf86Int10InfoPtr pInt,
+		 CARD16 port, CARD32 base, int d_f, CARD32 count);
+int port_rep_inw(xf86Int10InfoPtr pInt,
+		 CARD16 port, CARD32 base, int d_f, CARD32 count);
+int port_rep_inl(xf86Int10InfoPtr pInt,
+		 CARD16 port, CARD32 base, int d_f, CARD32 count);
+int port_rep_outb(xf86Int10InfoPtr pInt,
+		  CARD16 port, CARD32 base, int d_f, CARD32 count);
+int port_rep_outw(xf86Int10InfoPtr pInt,
+		  CARD16 port, CARD32 base, int d_f, CARD32 count);
+int port_rep_outl(xf86Int10InfoPtr pInt,
+		  CARD16 port, CARD32 base, int d_f, CARD32 count);
+
+CARD8 x_inb(CARD16 port);
+CARD16 x_inw(CARD16 port);
+void x_outb(CARD16 port, CARD8 val);
+void x_outw(CARD16 port, CARD16 val);
+CARD32 x_inl(CARD16 port);
+void x_outl(CARD16 port, CARD32 val);
+
+CARD8 Mem_rb(CARD32 addr);
+CARD16 Mem_rw(CARD32 addr);
+CARD32 Mem_rl(CARD32 addr);
+void Mem_wb(CARD32 addr, CARD8 val);
+void Mem_ww(CARD32 addr, CARD16 val);
+void Mem_wl(CARD32 addr, CARD32 val);
+
+/* helper_mem.c */
+void setup_int_vect(xf86Int10InfoPtr pInt);
+int setup_system_bios(void *base_addr);
+void reset_int_vect(xf86Int10InfoPtr pInt);
+void set_return_trap(xf86Int10InfoPtr pInt);
+void * xf86HandleInt10Options(ScrnInfoPtr pScrn, int entityIndex);
+Bool int10skip(const void* options);
+Bool int10_check_bios(int scrnIndex, int codeSeg,
+    const unsigned char* vbiosMem);
+Bool initPrimary(const void* options);
+BusType xf86int10GetBiosLocationType(const xf86Int10InfoPtr pInt);
+Bool xf86int10GetBiosSegment(xf86Int10InfoPtr pInt, void *base);
+#ifdef DEBUG
+void dprint(unsigned long start, unsigned long size);
+#endif
+
+#endif /* _INT10_PRIVATE */
+#endif /* _XF86INT10_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86str.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86str.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xf86str.h	(revision 9233)
@@ -0,0 +1,1162 @@
+
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains definitions of the public XFree86 data structures/types.
+ * Any data structures that video drivers need to access should go here.
+ */
+
+#ifndef _XF86STR_H
+#define _XF86STR_H
+
+#include "misc.h"
+#include "input.h"
+#include "scrnintstr.h"
+#include "pixmapstr.h"
+#include "colormapst.h"
+#include "xf86Module.h"
+#include "xf86Opt.h"
+#include "xf86Pci.h"
+
+#include <pciaccess.h>
+
+/**
+ * Integer type that is of the size of the addressable memory (machine size).
+ * On most platforms \c uintptr_t will suffice.  However, on some mixed
+ * 32-bit / 64-bit platforms, such as 32-bit binaries on 64-bit PowerPC, this
+ * must be 64-bits.
+ */
+#include <inttypes.h>
+#if defined(__powerpc__)
+typedef uint64_t memType;
+#else
+typedef uintptr_t memType;
+#endif
+
+
+/* Video mode flags */
+
+typedef enum {
+    V_PHSYNC	= 0x0001,
+    V_NHSYNC	= 0x0002,
+    V_PVSYNC	= 0x0004,
+    V_NVSYNC	= 0x0008,
+    V_INTERLACE	= 0x0010,
+    V_DBLSCAN	= 0x0020,
+    V_CSYNC	= 0x0040,
+    V_PCSYNC	= 0x0080,
+    V_NCSYNC	= 0x0100,
+    V_HSKEW	= 0x0200,	/* hskew provided */
+    V_BCAST	= 0x0400,
+    V_PIXMUX	= 0x1000,
+    V_DBLCLK	= 0x2000,
+    V_CLKDIV2	= 0x4000
+} ModeFlags;
+
+typedef enum {
+    INTERLACE_HALVE_V	= 0x0001	/* Halve V values for interlacing */
+} CrtcAdjustFlags;
+
+/* Flags passed to ChipValidMode() */
+typedef enum {
+    MODECHECK_INITIAL = 0,
+    MODECHECK_FINAL   = 1
+} ModeCheckFlags;
+
+/* These are possible return values for xf86CheckMode() and ValidMode() */
+typedef enum {
+    MODE_OK	= 0,	/* Mode OK */
+    MODE_HSYNC,		/* hsync out of range */
+    MODE_VSYNC,		/* vsync out of range */
+    MODE_H_ILLEGAL,	/* mode has illegal horizontal timings */
+    MODE_V_ILLEGAL,	/* mode has illegal horizontal timings */
+    MODE_BAD_WIDTH,	/* requires an unsupported linepitch */
+    MODE_NOMODE,	/* no mode with a maching name */
+    MODE_NO_INTERLACE,	/* interlaced mode not supported */
+    MODE_NO_DBLESCAN,	/* doublescan mode not supported */
+    MODE_NO_VSCAN,	/* multiscan mode not supported */
+    MODE_MEM,		/* insufficient video memory */
+    MODE_VIRTUAL_X,	/* mode width too large for specified virtual size */
+    MODE_VIRTUAL_Y,	/* mode height too large for specified virtual size */
+    MODE_MEM_VIRT,	/* insufficient video memory given virtual size */
+    MODE_NOCLOCK,	/* no fixed clock available */
+    MODE_CLOCK_HIGH,	/* clock required is too high */
+    MODE_CLOCK_LOW,	/* clock required is too low */
+    MODE_CLOCK_RANGE,	/* clock/mode isn't in a ClockRange */
+    MODE_BAD_HVALUE,	/* horizontal timing was out of range */
+    MODE_BAD_VVALUE,	/* vertical timing was out of range */
+    MODE_BAD_VSCAN,	/* VScan value out of range */
+    MODE_HSYNC_NARROW,	/* horizontal sync too narrow */
+    MODE_HSYNC_WIDE,	/* horizontal sync too wide */
+    MODE_HBLANK_NARROW,	/* horizontal blanking too narrow */
+    MODE_HBLANK_WIDE,	/* horizontal blanking too wide */
+    MODE_VSYNC_NARROW,	/* vertical sync too narrow */
+    MODE_VSYNC_WIDE,	/* vertical sync too wide */
+    MODE_VBLANK_NARROW,	/* vertical blanking too narrow */
+    MODE_VBLANK_WIDE,	/* vertical blanking too wide */
+    MODE_PANEL,         /* exceeds panel dimensions */
+    MODE_INTERLACE_WIDTH, /* width too large for interlaced mode */
+    MODE_ONE_WIDTH,     /* only one width is supported */
+    MODE_ONE_HEIGHT,    /* only one height is supported */
+    MODE_ONE_SIZE,      /* only one resolution is supported */
+    MODE_NO_REDUCED,    /* monitor doesn't accept reduced blanking */
+    MODE_BANDWIDTH,	/* mode requires too much memory bandwidth */
+    MODE_BAD = -2,	/* unspecified reason */
+    MODE_ERROR	= -1	/* error condition */
+} ModeStatus;
+
+/*
+ * The mode sets are, from best to worst: USERDEF, DRIVER, and DEFAULT/BUILTIN.
+ * Preferred will bubble a mode to the top within a set.
+ */
+# define M_T_BUILTIN 0x01        /* built-in mode */
+# define M_T_CLOCK_C (0x02 | M_T_BUILTIN) /* built-in mode - configure clock */
+# define M_T_CRTC_C  (0x04 | M_T_BUILTIN) /* built-in mode - configure CRTC  */
+# define M_T_CLOCK_CRTC_C  (M_T_CLOCK_C | M_T_CRTC_C)
+                               /* built-in mode - configure CRTC and clock */
+# define M_T_PREFERRED 0x08	/* preferred mode within a set */
+# define M_T_DEFAULT 0x10	/* (VESA) default modes */
+# define M_T_USERDEF 0x20	/* One of the modes from the config file */
+# define M_T_DRIVER  0x40	/* Supplied by the driver (EDID, etc) */
+# define M_T_USERPREF 0x80	/* mode preferred by the user config */
+
+/* Video mode */
+typedef struct _DisplayModeRec {
+    struct _DisplayModeRec *	prev;
+    struct _DisplayModeRec *	next;
+    char *			name;		/* identifier for the mode */
+    ModeStatus			status;
+    int				type;
+
+    /* These are the values that the user sees/provides */
+    int				Clock;		/* pixel clock freq (kHz) */
+    int				HDisplay;	/* horizontal timing */
+    int				HSyncStart;
+    int				HSyncEnd;
+    int				HTotal;
+    int				HSkew;
+    int				VDisplay;	/* vertical timing */
+    int				VSyncStart;
+    int				VSyncEnd;
+    int				VTotal;
+    int				VScan;
+    int				Flags;
+
+  /* These are the values the hardware uses */
+    int				ClockIndex;
+    int				SynthClock;	/* Actual clock freq to
+					  	 * be programmed  (kHz) */
+    int				CrtcHDisplay;
+    int				CrtcHBlankStart;
+    int				CrtcHSyncStart;
+    int				CrtcHSyncEnd;
+    int				CrtcHBlankEnd;
+    int				CrtcHTotal;
+    int				CrtcHSkew;
+    int				CrtcVDisplay;
+    int				CrtcVBlankStart;
+    int				CrtcVSyncStart;
+    int				CrtcVSyncEnd;
+    int				CrtcVBlankEnd;
+    int				CrtcVTotal;
+    Bool			CrtcHAdjusted;
+    Bool			CrtcVAdjusted;
+    int				PrivSize;
+    INT32 *			Private;
+    int				PrivFlags;
+
+    float			HSync, VRefresh;
+} DisplayModeRec, *DisplayModePtr;
+
+/* The monitor description */
+
+#define MAX_HSYNC 8
+#define MAX_VREFRESH 8
+
+typedef struct { float hi, lo; } range;
+
+typedef struct { CARD32 red, green, blue; } rgb;
+
+typedef struct { float red, green, blue; } Gamma;
+
+/* The permitted gamma range is 1 / GAMMA_MAX <= g <= GAMMA_MAX */
+#define GAMMA_MAX	10.0
+#define GAMMA_MIN	(1.0 / GAMMA_MAX)
+#define GAMMA_ZERO	(GAMMA_MIN / 100.0)
+
+typedef struct {
+    char *		id;
+    char *		vendor;
+    char *		model;
+    int			nHsync;
+    range		hsync[MAX_HSYNC];
+    int			nVrefresh;
+    range		vrefresh[MAX_VREFRESH];
+    DisplayModePtr	Modes;		/* Start of the monitor's mode list */
+    DisplayModePtr	Last;		/* End of the monitor's mode list */
+    Gamma		gamma;		/* Gamma of the monitor */
+    int			widthmm;
+    int			heightmm;
+    pointer		options;
+    pointer		DDC;
+    Bool                reducedblanking; /* Allow CVT reduced blanking modes? */
+    int			maxPixClock;	 /* in kHz, like mode->Clock */
+} MonRec, *MonPtr;
+
+/* the list of clock ranges */
+typedef struct x_ClockRange {
+    struct x_ClockRange *next;
+    int			minClock;	/* (kHz) */
+    int			maxClock;	/* (kHz) */
+    int			clockIndex;	/* -1 for programmable clocks */
+    Bool		interlaceAllowed;
+    Bool		doubleScanAllowed;
+    int			ClockMulFactor;
+    int			ClockDivFactor;
+    int			PrivFlags;
+} ClockRange, *ClockRangePtr;
+
+/* Need to store the strategy with clockRange for VidMode extension */
+typedef struct x_ClockRanges {
+    struct x_ClockRanges *next;
+    int			minClock;
+    int			maxClock;
+    int			clockIndex;	/* -1 for programmable clocks */
+    Bool		interlaceAllowed;
+    Bool		doubleScanAllowed;
+    int			ClockMulFactor;
+    int			ClockDivFactor;
+    int			PrivFlags;
+    int			strategy;
+} ClockRanges, *ClockRangesPtr;
+
+/*
+ * The driverFunc. xorgDriverFuncOp specifies the action driver should
+ * perform. If requested option is not supported function should return
+ * FALSE. pointer can be used to pass arguments to the function or
+ * to return data to the caller.
+ */
+typedef struct _ScrnInfoRec *ScrnInfoPtr;
+
+/* do not change order */
+typedef enum {
+    RR_GET_INFO,
+    RR_SET_CONFIG,
+    RR_GET_MODE_MM,
+    GET_REQUIRED_HW_INTERFACES = 10
+} xorgDriverFuncOp;
+
+typedef Bool xorgDriverFuncProc		  (ScrnInfoPtr, xorgDriverFuncOp,
+					   pointer);
+
+/* RR_GET_INFO, RR_SET_CONFIG */
+typedef struct {
+    int rotation;
+    int rate;
+    int width;
+    int height;
+} xorgRRConfig;
+
+typedef union {
+    short RRRotations;
+    xorgRRConfig RRConfig;
+} xorgRRRotation, *xorgRRRotationPtr;
+
+/* RR_GET_MODE_MM */
+typedef struct {
+    DisplayModePtr mode;
+    int virtX;
+    int virtY;
+    int mmWidth;
+    int mmHeight;
+} xorgRRModeMM, *xorgRRModeMMPtr;
+
+/* GET_REQUIRED_HW_INTERFACES */
+#define HW_IO 1
+#define HW_MMIO 2
+#define NEED_IO_ENABLED(x) (x & HW_IO)
+
+typedef CARD32 xorgHWFlags;
+
+/*
+ * The driver list struct.  This contains the information required for each
+ * driver before a ScrnInfoRec has been allocated.
+ */
+struct _DriverRec;
+
+typedef struct {
+    int			driverVersion;
+    char *		driverName;
+    void		(*Identify)(int flags);
+    Bool		(*Probe)(struct _DriverRec *drv, int flags);
+    const OptionInfoRec * (*AvailableOptions)(int chipid, int bustype);
+    pointer		module;
+    int			refCount;
+} DriverRec1;
+
+struct _SymTabRec;
+struct _PciChipsets;
+
+typedef struct _DriverRec {
+    int			driverVersion;
+    char *		driverName;
+    void		(*Identify)(int flags);
+    Bool		(*Probe)(struct _DriverRec *drv, int flags);
+    const OptionInfoRec * (*AvailableOptions)(int chipid, int bustype);
+    pointer		module;
+    int			refCount;
+    xorgDriverFuncProc  *driverFunc;
+
+    const struct pci_id_match * supported_devices;
+    Bool (*PciProbe)( struct _DriverRec * drv, int entity_num,
+        struct pci_device * dev, intptr_t match_data );
+} DriverRec, *DriverPtr;
+
+/*
+ *  AddDriver flags
+ */
+#define HaveDriverFuncs 1
+
+
+/*
+ * The optional module list struct. This allows modules exporting helping
+ * functions to configuration tools, the Xserver, or any other
+ * application/module interested in such information.
+ */
+_X_DEPRECATED typedef struct _ModuleInfoRec {
+    int			moduleVersion;
+    char *		moduleName;
+    pointer		module;
+    int			refCount;
+    const OptionInfoRec * (*AvailableOptions)(void *unused);
+    pointer		unused[8];	/* leave some space for more fields */
+} ModuleInfoRec, *ModuleInfoPtr;
+
+/*
+ * These are the private bus types.  New types can be added here.  Types
+ * required for the public interface should be added to xf86str.h, with
+ * function prototypes added to xf86.h.
+ */
+
+/* Tolerate prior #include <linux/input.h> */
+#if defined(linux) && defined(_INPUT_H)
+#undef BUS_NONE
+#undef BUS_ISA
+#undef BUS_PCI
+#undef BUS_SBUS
+#undef BUS_last
+#endif
+
+typedef enum {
+    BUS_NONE,
+    BUS_ISA,
+    BUS_PCI,
+    BUS_SBUS,
+    BUS_last    /* Keep last */
+} BusType;
+
+struct pci_device;
+
+typedef struct {
+    unsigned int dummy;
+} IsaBusId;
+
+typedef struct {
+    int		fbNum;
+} SbusBusId;
+
+typedef struct _bus {
+    BusType type;
+    union {
+	IsaBusId isa;
+	struct pci_device *pci;
+	SbusBusId sbus;
+    } id;
+} BusRec, *BusPtr;
+
+#define MAXCLOCKS   128
+typedef enum {
+    DAC_BPP8 = 0,
+    DAC_BPP16,
+    DAC_BPP24,
+    DAC_BPP32,
+    MAXDACSPEEDS
+} DacSpeedIndex;
+
+typedef struct {
+   char *			identifier;
+   char *			vendor;
+   char *			board;
+   char *			chipset;
+   char *			ramdac;
+   char *			driver;
+   struct _confscreenrec *	myScreenSection;
+   Bool				claimed;
+   int				dacSpeeds[MAXDACSPEEDS];
+   int				numclocks;
+   int				clock[MAXCLOCKS];
+   char *			clockchip;
+   char *			busID;
+   Bool				active;
+   Bool				inUse;
+   int				videoRam;
+   int				textClockFreq;
+   unsigned long		BiosBase;	/* Base address of video BIOS */
+   unsigned long		MemBase;	/* Frame buffer base address */
+   unsigned long		IOBase;
+   int				chipID;
+   int				chipRev;
+   pointer			options;
+   int                          irq;
+   int                          screen;         /* For multi-CRTC cards */
+} GDevRec, *GDevPtr;
+
+typedef int (*FindIsaDevProc)(GDevPtr dev);
+
+typedef struct {
+   char *			identifier;
+   char *			driver;
+   pointer		 	commonOptions;
+   pointer			extraOptions;
+} IDevRec, *IDevPtr;
+
+typedef struct {
+    int			frameX0;
+    int			frameY0;
+    int			virtualX;
+    int			virtualY;
+    int			depth;
+    int			fbbpp;
+    rgb			weight;
+    rgb			blackColour;
+    rgb			whiteColour;
+    int			defaultVisual;
+    char **		modes;
+    pointer		options;
+} DispRec, *DispPtr;
+
+typedef struct _confxvportrec {
+    char *		identifier;
+    pointer		options;
+} confXvPortRec, *confXvPortPtr;
+
+typedef struct _confxvadaptrec {
+    char *		identifier;
+    int			numports;
+    confXvPortPtr	ports;
+    pointer		options;
+} confXvAdaptorRec, *confXvAdaptorPtr;
+
+typedef struct _confscreenrec {
+    char *		id;
+    int			screennum;
+    int			defaultdepth;
+    int			defaultbpp;
+    int			defaultfbbpp;
+    MonPtr		monitor;
+    GDevPtr		device;
+    int			numdisplays;
+    DispPtr		displays;
+    int			numxvadaptors;
+    confXvAdaptorPtr	xvadaptors;
+    pointer		options;
+} confScreenRec, *confScreenPtr;
+
+typedef enum {
+    PosObsolete = -1,
+    PosAbsolute = 0,
+    PosRightOf,
+    PosLeftOf,
+    PosAbove,
+    PosBelow,
+    PosRelative
+} PositionType;
+
+typedef struct _screenlayoutrec {
+    confScreenPtr	screen;
+    char *		topname;
+    confScreenPtr	top;
+    char *		bottomname;
+    confScreenPtr	bottom;
+    char *		leftname;
+    confScreenPtr	left;
+    char *		rightname;
+    confScreenPtr	right;
+    PositionType	where;
+    int			x;
+    int			y;
+    char *		refname;
+    confScreenPtr	refscreen;
+} screenLayoutRec, *screenLayoutPtr;
+
+typedef struct _serverlayoutrec {
+    char *		id;
+    screenLayoutPtr	screens;
+    GDevPtr		inactives;
+    IDevPtr*            inputs; /* NULL terminated */
+    pointer		options;
+} serverLayoutRec, *serverLayoutPtr;
+
+typedef struct _confdribufferrec {
+    int                 count;
+    int                 size;
+    enum {
+	XF86DRI_WC_HINT = 0x0001 /* Placeholder: not implemented */
+    }                   flags;
+} confDRIBufferRec, *confDRIBufferPtr;
+
+typedef struct _confdrirec {
+    int                 group;
+    int                 mode;
+    int                 bufs_count;
+    confDRIBufferRec    *bufs;
+} confDRIRec, *confDRIPtr;
+
+/* These values should be adjusted when new fields are added to ScrnInfoRec */
+#define NUM_RESERVED_INTS		16
+#define NUM_RESERVED_POINTERS		15
+#define NUM_RESERVED_FUNCS		11
+
+typedef pointer (*funcPointer)(void);
+
+/* flags for depth 24 pixmap options */
+typedef enum {
+    Pix24DontCare = 0,
+    Pix24Use24,
+    Pix24Use32
+} Pix24Flags;
+
+/* Power management events: so far we only support APM */
+
+typedef enum {
+    XF86_APM_UNKNOWN = -1,
+    XF86_APM_SYS_STANDBY,
+    XF86_APM_SYS_SUSPEND,
+    XF86_APM_CRITICAL_SUSPEND,
+    XF86_APM_USER_STANDBY,
+    XF86_APM_USER_SUSPEND,
+    XF86_APM_STANDBY_RESUME,
+    XF86_APM_NORMAL_RESUME,
+    XF86_APM_CRITICAL_RESUME,
+    XF86_APM_LOW_BATTERY,
+    XF86_APM_POWER_STATUS_CHANGE,
+    XF86_APM_UPDATE_TIME,
+    XF86_APM_CAPABILITY_CHANGED,
+    XF86_APM_STANDBY_FAILED,
+    XF86_APM_SUSPEND_FAILED
+} pmEvent;
+
+typedef enum {
+    PM_WAIT,
+    PM_CONTINUE,
+    PM_FAILED,
+    PM_NONE
+} pmWait;
+
+/*
+ * The IO access enabler struct. This contains the address for
+ * the IOEnable/IODisable funcs for their specific bus along
+ * with a pointer to data needed by them
+ */
+typedef struct _AccessRec {
+    void (*AccessDisable)(void *arg);
+    void (*AccessEnable)(void *arg);
+    void *arg;
+} xf86AccessRec, *xf86AccessPtr;
+
+typedef struct {
+    xf86AccessPtr mem;
+    xf86AccessPtr io;
+    xf86AccessPtr io_mem;
+} xf86SetAccessFuncRec, *xf86SetAccessFuncPtr;
+
+/*  bus-access-related types */
+typedef enum {
+    NONE,
+    IO,
+    MEM_IO,
+    MEM
+} resType;
+
+typedef struct _EntityAccessRec {
+    xf86AccessPtr fallback;
+    xf86AccessPtr pAccess;
+    resType rt;
+    pointer  busAcc;
+    struct _EntityAccessRec *next;
+} EntityAccessRec, *EntityAccessPtr;
+
+typedef struct _CurrAccRec {
+    EntityAccessPtr pMemAccess;
+    EntityAccessPtr pIoAccess;
+} xf86CurrentAccessRec, *xf86CurrentAccessPtr;
+
+/* new RAC */
+
+/* Resource Type values */
+#define ResNone		((unsigned long)(-1))
+
+#define ResMem		0x0001
+#define ResIo		0x0002
+#define ResIrq		0x0003
+#define ResDma		0x0004
+#define ResPciCfg	0x000e	/* PCI Configuration space */
+#define ResPhysMask	0x000F
+
+#define ResExclusive	0x0010
+#define ResShared	0x0020
+#define ResAny		0x0040
+#define ResAccMask	0x0070
+#define ResUnused	0x0080
+
+#define ResUnusedOpr	0x0100
+#define ResDisableOpr	0x0200
+#define ResOprMask	0x0300
+
+#define ResBlock	0x0400
+#define ResSparse	0x0800
+#define ResExtMask	0x0C00
+
+#define ResEstimated	0x001000
+#define ResInit 	0x002000
+#define ResBios		0x004000
+#define ResMiscMask	0x00F000
+
+#define ResBus		0x010000
+#define ResOverlap	0x020000
+
+#if defined(__alpha__) && defined(linux)
+# define ResDomain	0x1ff000000ul
+#else
+# define ResDomain	0xff000000ul
+#endif
+#define ResTypeMask	(ResPhysMask | ResDomain)	/* For conflict check */
+
+#define ResEnd		ResNone
+
+#define ResExcMemBlock		(ResMem | ResExclusive | ResBlock)
+#define ResExcIoBlock		(ResIo | ResExclusive | ResBlock)
+#define ResShrMemBlock		(ResMem | ResShared | ResBlock)
+#define ResShrIoBlock		(ResIo | ResShared | ResBlock)
+#define ResExcUusdMemBlock	(ResMem | ResExclusive | ResUnused | ResBlock)
+#define ResExcUusdIoBlock	(ResIo | ResExclusive | ResUnused | ResBlock)
+#define ResShrUusdMemBlock	(ResMem | ResShared | ResUnused | ResBlock)
+#define ResShrUusdIoBlock	(ResIo | ResShared | ResUnused | ResBlock)
+#define ResExcUusdMemSparse	(ResMem | ResExclusive | ResUnused | ResSparse)
+#define ResExcUusdIoSparse	(ResIo | ResExclusive | ResUnused | ResSparse)
+#define ResShrUusdMemSparse	(ResMem | ResShared | ResUnused | ResSparse)
+#define ResShrUusdIoSparse	(ResIo | ResShared | ResUnused | ResSparse)
+
+#define ResExcMemSparse		(ResMem | ResExclusive | ResSparse)
+#define ResExcIoSparse		(ResIo | ResExclusive | ResSparse)
+#define ResShrMemSparse		(ResMem | ResShared | ResSparse)
+#define ResShrIoSparse		(ResIo | ResShared | ResSparse)
+#define ResUusdMemSparse	(ResMem | ResUnused | ResSparse)
+#define ResUusdIoSparse		(ResIo | ResUnused | ResSparse)
+
+#define ResIsMem(r)		(((r)->type & ResPhysMask) == ResMem)
+#define ResIsIo(r)		(((r)->type & ResPhysMask) == ResIo)
+#define ResIsExclusive(r)	(((r)->type & ResAccMask) == ResExclusive)
+#define ResIsShared(r)		(((r)->type & ResAccMask) == ResShared)
+#define ResIsUnused(r)		(((r)->type & ResAccMask) == ResUnused)
+#define ResIsBlock(r)		(((r)->type & ResExtMask) == ResBlock)
+#define ResIsSparse(r)		(((r)->type & ResExtMask) == ResSparse)
+#define ResIsEstimated(r)	(((r)->type & ResMiscMask) == ResEstimated)
+#define ResCanOverlap(r)	(ResIsEstimated(r) || ((r)->type & ResOverlap))
+
+typedef struct {
+    unsigned long type;     /* shared, exclusive, unused etc. */
+    memType a;
+    memType b;
+} resRange, *resList;
+
+#define RANGE_TYPE(type, domain) \
+               (((unsigned long)(domain) << 24) | ((type) & ~ResBus))
+#define RANGE(r,u,v,t) {\
+                       (r).a = (u);\
+                       (r).b = (v);\
+                       (r).type = (t);\
+                       }
+
+#define rBase a
+#define rMask b
+#define rBegin a
+#define rEnd b
+
+/* resource record */
+typedef struct _resRec *resPtr;
+typedef struct _resRec {
+    resRange    val;
+    int		entityIndex;	/* who owns the resource */
+    resPtr	next;
+} resRec;
+
+#define sparse_base	val.rBase
+#define sparse_mask	val.rMask
+#define block_begin	val.rBegin
+#define block_end	val.rEnd
+#define res_type	val.type
+
+typedef struct {
+    int numChipset;
+    resRange *resList;
+} IsaChipsets;
+
+typedef struct _PciChipsets {
+    /**
+     * Key used to match this device with its name in an array of
+     * \c SymTabRec.
+     */
+    int numChipset;
+
+    /**
+     * This value is quirky.  Depending on the driver, it can take on one of
+     * three meanings.  In drivers that have exactly one vendor ID (e.g.,
+     * radeon, mga, i810) the low 16-bits are the device ID.
+     *
+     * In drivers that can have multiple vendor IDs (e.g., the glint driver
+     * can have either 3dlabs' ID or TI's ID, the i740 driver can have either
+     * Intel's ID or Real3D's ID, etc.) the low 16-bits are the device ID and
+     * the high 16-bits are the vendor ID.
+     *
+     * In drivers that don't have a specific vendor (e.g., vga) contains the
+     * device ID for either the generic VGA or generic 8514 devices.  This
+     * turns out to be the same as the subclass and programming interface
+     * value (e.g., the full 24-bit class for the VGA device is 0x030000 (or 
+     * 0x000101) and for 8514 is 0x030001).
+     */
+    int PCIid;
+
+    /**
+     * Resources associated with this type of device.
+     */
+    resRange *resList;
+} PciChipsets;
+
+/* Entity properties */
+typedef void (*EntityProc)(int entityIndex,pointer private);
+
+typedef struct _entityInfo {
+    int index;
+    BusRec location;
+    int chipset;
+    Bool active;
+    resPtr resources;
+    GDevPtr device;
+    DriverPtr driver;
+} EntityInfoRec, *EntityInfoPtr;
+
+/* server states */
+
+typedef enum {
+    SETUP,
+    OPERATING
+} xf86State;
+
+typedef enum {
+    NOTIFY_SETUP_TRANSITION,
+    NOTIFY_SETUP,
+    NOTIFY_OPERATING,
+    NOTIFY_OPERATING_TRANSITION,
+    NOTIFY_ENABLE,
+    NOTIFY_ENTER,
+    NOTIFY_LEAVE
+} xf86NotifyState;
+
+typedef void (*xf86StateChangeNotificationCallbackFunc)(xf86NotifyState state,pointer);
+
+/* DGA */
+
+typedef struct {
+   int num;		/* A unique identifier for the mode (num > 0) */
+   DisplayModePtr mode;
+   int flags;		/* DGA_CONCURRENT_ACCESS, etc... */
+   int imageWidth;	/* linear accessible portion (pixels) */
+   int imageHeight;
+   int pixmapWidth;	/* Xlib accessible portion (pixels) */
+   int pixmapHeight;	/* both fields ignored if no concurrent access */
+   int bytesPerScanline;
+   int byteOrder;	/* MSBFirst, LSBFirst */
+   int depth;
+   int bitsPerPixel;
+   unsigned long red_mask;
+   unsigned long green_mask;
+   unsigned long blue_mask;
+   short visualClass;
+   int viewportWidth;
+   int viewportHeight;
+   int xViewportStep;	/* viewport position granularity */
+   int yViewportStep;
+   int maxViewportX;	/* max viewport origin */
+   int maxViewportY;
+   int viewportFlags;	/* types of page flipping possible */
+   int offset;		/* offset into physical memory */
+   unsigned char *address;	/* server's mapped framebuffer */
+   int reserved1;
+   int reserved2;
+} DGAModeRec, *DGAModePtr;
+
+typedef struct {
+   DGAModePtr mode;
+   PixmapPtr pPix;
+} DGADeviceRec, *DGADevicePtr;
+
+/*
+ * Flags for driver Probe() functions.
+ */
+#define PROBE_DEFAULT	  0x00
+#define PROBE_DETECT	  0x01
+#define PROBE_TRYHARD	  0x02
+
+/*
+ * Driver entry point types
+ */
+
+typedef Bool xf86ProbeProc                (DriverPtr, int);
+typedef Bool xf86PreInitProc              (ScrnInfoPtr, int);
+typedef Bool xf86ScreenInitProc           (int, ScreenPtr, int, char**);
+typedef Bool xf86SwitchModeProc           (int, DisplayModePtr, int);
+typedef void xf86AdjustFrameProc          (int, int, int, int);
+typedef Bool xf86EnterVTProc              (int, int);
+typedef void xf86LeaveVTProc              (int, int);
+typedef void xf86FreeScreenProc           (int, int);
+typedef ModeStatus xf86ValidModeProc      (int, DisplayModePtr, Bool, int);
+typedef void xf86EnableDisableFBAccessProc(int, Bool);
+typedef int  xf86SetDGAModeProc           (int, int, DGADevicePtr);
+typedef int  xf86ChangeGammaProc          (int, Gamma);
+typedef void xf86PointerMovedProc         (int, int, int);
+typedef Bool xf86PMEventProc              (int, pmEvent, Bool);
+typedef int  xf86HandleMessageProc     (int, const char*, const char*, char**);
+typedef void xf86DPMSSetProc		  (ScrnInfoPtr, int, int);
+typedef void xf86LoadPaletteProc   (ScrnInfoPtr, int, int *, LOCO *, VisualPtr);
+typedef void xf86SetOverscanProc          (ScrnInfoPtr, int);
+
+
+/*
+ * ScrnInfoRec
+ *
+ * There is one of these for each screen, and it holds all the screen-specific
+ * information.
+ *
+ * Note: the size and layout must be kept the same across versions.  New
+ * fields are to be added in place of the "reserved*" fields.  No fields
+ * are to be dependent on compile-time defines.
+ */
+
+
+typedef struct _ScrnInfoRec {
+    int			driverVersion;
+    char *		driverName;		/* canonical name used in */
+						/* the config file */
+    ScreenPtr		pScreen;		/* Pointer to the ScreenRec */
+    int			scrnIndex;		/* Number of this screen */
+    Bool		configured;		/* Is this screen valid */
+    int			origIndex;		/* initial number assigned to
+						 * this screen before
+						 * finalising the number of
+						 * available screens */
+
+    /* Display-wide screenInfo values needed by this screen */
+    int			imageByteOrder;
+    int			bitmapScanlineUnit;
+    int			bitmapScanlinePad;
+    int			bitmapBitOrder;
+    int			numFormats;
+    PixmapFormatRec	formats[MAXFORMATS];
+    PixmapFormatRec	fbFormat;
+
+    int			bitsPerPixel;		/* fb bpp */
+    Pix24Flags		pixmap24;		/* pixmap pref for depth 24 */
+    int			depth;			/* depth of default visual */
+    MessageType		depthFrom;		/* set from config? */
+    MessageType		bitsPerPixelFrom;	/* set from config? */
+    rgb			weight;			/* r/g/b weights */
+    rgb			mask;			/* rgb masks */
+    rgb			offset;			/* rgb offsets */
+    int			rgbBits;		/* Number of bits in r/g/b */
+    Gamma		gamma;			/* Gamma of the monitor */
+    int			defaultVisual;		/* default visual class */
+    int			maxHValue;		/* max horizontal timing */
+    int			maxVValue;		/* max vertical timing value */
+    int			virtualX;		/* Virtual width */
+    int			virtualY; 		/* Virtual height */
+    int			xInc;			/* Horizontal timing increment */
+    MessageType		virtualFrom;		/* set from config? */
+    int			displayWidth;		/* memory pitch */
+    int			frameX0;		/* viewport position */
+    int			frameY0;
+    int			frameX1;
+    int			frameY1;
+    int			zoomLocked;		/* Disallow mode changes */
+    DisplayModePtr	modePool;		/* list of compatible modes */
+    DisplayModePtr	modes;			/* list of actual modes */
+    DisplayModePtr	currentMode;		/* current mode
+						 * This was previously
+						 * overloaded with the modes
+						 * field, which is a pointer
+						 * into a circular list */
+    confScreenPtr	confScreen;		/* Screen config info */
+    MonPtr		monitor;		/* Monitor information */
+    DispPtr		display;		/* Display information */
+    int *		entityList;		/* List of device entities */
+    int			numEntities;
+    int			widthmm;		/* physical display dimensions
+						 * in mm */
+    int			heightmm;
+    int			xDpi;			/* width DPI */
+    int			yDpi;			/* height DPI */
+    char *		name;			/* Name to prefix messages */
+    pointer		driverPrivate;		/* Driver private area */
+    DevUnion *		privates;		/* Other privates can hook in
+						 * here */
+    DriverPtr		drv;			/* xf86DriverList[] entry */
+    pointer		module;			/* Pointer to module head */
+    int			colorKey;
+    int			overlayFlags;
+
+    /* Some of these may be moved out of here into the driver private area */
+
+    char *		chipset;		/* chipset name */
+    char *		ramdac;			/* ramdac name */
+    char *		clockchip;		/* clock name */
+    Bool		progClock;		/* clock is programmable */
+    int			numClocks;		/* number of clocks */
+    int			clock[MAXCLOCKS];	/* list of clock frequencies */
+    int			videoRam;		/* amount of video ram (kb) */
+    unsigned long	biosBase;		/* Base address of video BIOS */
+    unsigned long	memPhysBase;		/* Physical address of FB */
+    unsigned long 	fbOffset;		/* Offset of FB in the above */
+    IOADDRESS    	domainIOBase;		/* Domain I/O base address */
+    int			memClk;			/* memory clock */
+    int			textClockFreq;		/* clock of text mode */
+    Bool		flipPixels;		/* swap default black/white */
+    pointer		options;
+
+    int			chipID;
+    int			chipRev;
+    int			racMemFlags;
+    int			racIoFlags;
+    pointer		access;
+    xf86CurrentAccessPtr CurrentAccess;
+    resType		resourceType;
+    pointer		busAccess;
+
+    /* Allow screens to be enabled/disabled individually */
+    Bool		vtSema;
+    DevUnion		pixmapPrivate;		/* saved devPrivate from pixmap */
+
+    /* hw cursor moves at SIGIO time */
+    Bool		silkenMouse;
+
+    /* Storage for clockRanges and adjustFlags for use with the VidMode ext */
+    ClockRangesPtr	clockRanges;
+    int			adjustFlags;
+
+    /*
+     * These can be used when the minor ABI version is incremented.
+     * The NUM_* parameters must be reduced appropriately to keep the
+     * structure size and alignment unchanged.
+     */
+    int			reservedInt[NUM_RESERVED_INTS];
+
+    int *		entityInstanceList;
+    pointer		reservedPtr[NUM_RESERVED_POINTERS];
+
+    /*
+     * Driver entry points.
+     *
+     */
+
+    xf86ProbeProc			*Probe;
+    xf86PreInitProc			*PreInit;
+    xf86ScreenInitProc			*ScreenInit;
+    xf86SwitchModeProc			*SwitchMode;
+    xf86AdjustFrameProc			*AdjustFrame;
+    xf86EnterVTProc			*EnterVT;
+    xf86LeaveVTProc			*LeaveVT;
+    xf86FreeScreenProc			*FreeScreen;
+    xf86ValidModeProc			*ValidMode;
+    xf86EnableDisableFBAccessProc	*EnableDisableFBAccess;
+    xf86SetDGAModeProc			*SetDGAMode;
+    xf86ChangeGammaProc			*ChangeGamma;
+    xf86PointerMovedProc		*PointerMoved;
+    xf86PMEventProc			*PMEvent;
+    xf86HandleMessageProc		*HandleMessage;
+    xf86DPMSSetProc			*DPMSSet;
+    xf86LoadPaletteProc			*LoadPalette;
+    xf86SetOverscanProc			*SetOverscan;
+    xorgDriverFuncProc			*DriverFunc;
+
+    /*
+     * This can be used when the minor ABI version is incremented.
+     * The NUM_* parameter must be reduced appropriately to keep the
+     * structure size and alignment unchanged.
+     */
+    funcPointer		reservedFuncs[NUM_RESERVED_FUNCS];
+
+} ScrnInfoRec;
+
+
+typedef struct {
+   Bool (*OpenFramebuffer)(
+	ScrnInfoPtr pScrn,
+	char **name,
+	unsigned char **mem,
+	int *size,
+	int *offset,
+        int *extra
+   );
+   void	(*CloseFramebuffer)(ScrnInfoPtr pScrn);
+   Bool (*SetMode)(ScrnInfoPtr pScrn, DGAModePtr pMode);
+   void (*SetViewport)(ScrnInfoPtr pScrn, int x, int y, int flags);
+   int  (*GetViewport)(ScrnInfoPtr pScrn);
+   void (*Sync)(ScrnInfoPtr);
+   void (*FillRect)(
+	ScrnInfoPtr pScrn,
+	int x, int y, int w, int h,
+	unsigned long color
+   );
+   void (*BlitRect)(
+	ScrnInfoPtr pScrn,
+	int srcx, int srcy,
+	int w, int h,
+	int dstx, int dsty
+   );
+   void (*BlitTransRect)(
+	ScrnInfoPtr pScrn,
+	int srcx, int srcy,
+	int w, int h,
+	int dstx, int dsty,
+	unsigned long color
+   );
+} DGAFunctionRec, *DGAFunctionPtr;
+
+typedef struct _SymTabRec {
+    int			token;		/* id of the token */
+    const char *	name;		/* token name */
+} SymTabRec, *SymTabPtr;
+
+/* flags for xf86LookupMode */
+typedef enum {
+    LOOKUP_DEFAULT		= 0,	/* Use default mode lookup method */
+    LOOKUP_BEST_REFRESH,		/* Pick modes with best refresh */
+    LOOKUP_CLOSEST_CLOCK,		/* Pick modes with the closest clock */
+    LOOKUP_LIST_ORDER,			/* Pick first useful mode in list */
+    LOOKUP_CLKDIV2		= 0x0100, /* Allow half clocks */
+    LOOKUP_OPTIONAL_TOLERANCES	= 0x0200  /* Allow missing hsync/vrefresh */
+} LookupModeFlags;
+
+#define NoDepth24Support	0x00
+#define Support24bppFb		0x01	/* 24bpp framebuffer supported */
+#define Support32bppFb		0x02	/* 32bpp framebuffer supported */
+#define SupportConvert24to32	0x04	/* Can convert 24bpp pixmap to 32bpp */
+#define SupportConvert32to24	0x08	/* Can convert 32bpp pixmap to 24bpp */
+#define PreferConvert24to32	0x10	/* prefer 24bpp pixmap to 32bpp conv */
+#define PreferConvert32to24	0x20	/* prefer 32bpp pixmap to 24bpp conv */
+
+
+/* For DPMS */
+typedef void (*DPMSSetProcPtr)(ScrnInfoPtr, int, int);
+
+/* Input handler proc */
+typedef void (*InputHandlerProc)(int fd, pointer data);
+
+/* These are used by xf86GetClocks */
+#define CLK_REG_SAVE		-1
+#define CLK_REG_RESTORE		-2
+
+/* xf86Debug.c */
+#ifdef BUILDDEBUG
+typedef struct {
+    long sec;
+    long usec;
+} xf86TsRec, *xf86TsPtr;
+#endif
+
+/*
+ * misc constants
+ */
+#define INTERLACE_REFRESH_WEIGHT	1.5
+#define SYNC_TOLERANCE		0.01	/* 1 percent */
+#define CLOCK_TOLERANCE		2000	/* Clock matching tolerance (2MHz) */
+
+
+#define OVERLAY_8_32_DUALFB	0x00000001
+#define OVERLAY_8_24_DUALFB	0x00000002
+#define OVERLAY_8_16_DUALFB	0x00000004
+#define OVERLAY_8_32_PLANAR	0x00000008
+
+#if 0
+#define LD_RESOLV_IFDONE		0	/* only check if no more
+						   delays pending */
+#define LD_RESOLV_NOW			1	/* finish one delay step */
+#define LD_RESOLV_FORCE			2	/* force checking... */
+#endif
+
+/* Values of xf86Info.mouseFlags */
+#define MF_CLEAR_DTR       1
+#define MF_CLEAR_RTS       2
+
+/* Action Events */
+typedef enum {
+    ACTION_TERMINATE		= 0,	/* Terminate Server */
+    ACTION_NEXT_MODE		= 10,	/* Switch to next video mode */
+    ACTION_PREV_MODE,
+    ACTION_DISABLEGRAB		= 20,	/* Cancel server/pointer/kbd grabs */
+    ACTION_CLOSECLIENT,			/* Kill client holding grab */
+    ACTION_SWITCHSCREEN		= 100,	/* VT switch */
+    ACTION_SWITCHSCREEN_NEXT,
+    ACTION_SWITCHSCREEN_PREV,
+    ACTION_MESSAGE		= 9999  /* Generic message passing */
+} ActionEvent;
+
+/* xf86Versions.c */
+/*
+ * Never change existing values, and always assign values explicitly.
+ * NUM_BUILTIN_IFS must always be the last entry.
+ */
+typedef enum {
+    BUILTIN_IF_OSMOUSE = 0,
+    BUILTIN_IF_OSKBD = 1,
+    NUM_BUILTIN_IFS
+} BuiltinInterface;
+
+/*
+ * These are intentionally the same as the module version macros.
+ * It is possible to register a module as providing a specific interface,
+ * in which case the module's version is used.  This feature isn't
+ * really ready for use yet though.
+ */
+
+#define BUILTIN_INTERFACE_VERSION_NUMERIC(maj, min, patch) \
+	((((maj) & 0xFF) << 24) | (((min) & 0xFF) << 16) | (patch & 0xFFFF))
+#define GET_BUILTIN_INTERFACE_MAJOR_VERSION(vers)	(((vers) >> 24) & 0xFF)
+#define GET_BUILTIN_INTERFACE_MINOR_VERSION(vers)	(((vers) >> 16) & 0xFF)
+#define GET_BUILTIN_INTERFACE_PATCH_VERSION(vers)	((vers) & 0xFFFF)
+
+#endif /* _XF86STR_H */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xorg-server.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xorg-server.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xorg-server.h	(revision 9233)
@@ -0,0 +1,246 @@
+/* include/xorg-server.h.  Generated from xorg-server.h.in by configure.  */
+/* xorg-server.h.in						-*- c -*-
+ *
+ * This file is the template file for the xorg-server.h file which gets
+ * installed as part of the SDK.  The #defines in this file overlap
+ * with those from config.h, but only for those options that we want
+ * to export to external modules.  Boilerplate autotool #defines such
+ * as HAVE_STUFF and PACKAGE_NAME is kept in config.h
+ *
+ * It is still possible to update config.h.in using autoheader, since
+ * autoheader only creates a .h.in file for the first
+ * AM_CONFIG_HEADER() line, and thus does not overwrite this file.
+ *
+ * However, it should be kept in sync with this file.
+ */
+
+#ifndef _XORG_SERVER_H_
+#define _XORG_SERVER_H_
+
+/* Support BigRequests extension */
+#define BIGREQS 1
+
+/* Default font path */
+#define COMPILEDDEFAULTFONTPATH "/usr/local/lib/X11/fonts/misc/,/usr/local/lib/X11/fonts/TTF/,/usr/local/lib/X11/fonts/OTF,/usr/local/lib/X11/fonts/Type1/,/usr/local/lib/X11/fonts/100dpi/,/usr/local/lib/X11/fonts/75dpi/"
+
+/* Support Composite Extension */
+#define COMPOSITE 1
+
+/* Use OsVendorInit */
+#define DDXOSINIT 1
+
+/* Build DPMS extension */
+#define DPMSExtension 1
+
+/* Build GLX extension */
+/* #undef GLXEXT */
+
+/* Include handhelds.org h3600 touchscreen driver */
+/* #undef H3600_TS */
+
+/* Support XDM-AUTH*-1 */
+#define HASXDMAUTH 1
+
+/* Support SHM */
+#define HAS_SHM 1
+
+/* Support IPv6 for TCP connections */
+#define IPv6 1
+
+/* Support MIT Misc extension */
+#define MITMISC 1
+
+/* Support MIT-SHM Extension */
+#define MITSHM 1
+
+/* Disable some debugging code */
+#define NDEBUG 1
+
+/* Need XFree86 helper functions */
+#define NEED_XF86_PROTOTYPES 1
+
+/* Need XFree86 typedefs */
+#define NEED_XF86_TYPES 1
+
+/* Internal define for Xinerama */
+#define PANORAMIX 1
+
+/* Support RANDR extension */
+#define RANDR 1
+
+/* Support RENDER extension */
+#define RENDER 1
+
+/* Support X resource extension */
+#define RES 1
+
+/* Support MIT-SCREEN-SAVER extension */
+#define SCREENSAVER 1
+
+/* Use a lock to prevent multiple servers on a display */
+#define SERVER_LOCK 1
+
+/* Support SHAPE extension */
+#define SHAPE 1
+
+/* Include time-based scheduler */
+#define SMART_SCHEDULE 1
+
+/* Define to 1 on systems derived from System V Release 4 */
+/* #undef SVR4 */
+
+/* Support TCP socket connections */
+#define TCPCONN 1
+
+/* Enable touchscreen support */
+/* #undef TOUCHSCREEN */
+
+/* Support tslib touchscreen abstraction library */
+/* #undef TSLIB */
+
+/* Support UNIX socket connections */
+#define UNIXCONN 1
+
+/* unaligned word accesses behave as expected */
+/* #undef WORKING_UNALIGNED_INT */
+
+/* Support XCMisc extension */
+#define XCMISC 1
+
+/* Support Xdmcp */
+#define XDMCP 1
+
+/* Build XFree86 BigFont extension */
+/* #undef XF86BIGFONT */
+
+/* Support XFree86 miscellaneous extensions */
+#define XF86MISC 1
+
+/* Support XFree86 Video Mode extension */
+#define XF86VIDMODE 1
+
+/* Build XDGA support */
+#define XFreeXDGA 1
+
+/* Support Xinerama extension */
+#define XINERAMA 1
+
+/* Support X Input extension */
+#define XINPUT 1
+
+/* Build XKB */
+#define XKB 1
+
+/* Enable XKB per default */
+#define XKB_DFLT_DISABLED 0
+
+/* Build XKB server */
+#define XKB_IN_SERVER 1
+
+/* Support loadable input and output drivers */
+/* #undef XLOADABLE */
+
+/* Build DRI extension */
+#define XF86DRI 1
+
+/* Build DRI2 extension */
+#define DRI2 1
+
+/* Build Xorg server */
+#define XORGSERVER 1
+
+/* Vendor release */
+/* #undef XORG_RELEASE */
+
+/* Current Xorg version */
+#define XORG_VERSION_CURRENT (((1) * 10000000) + ((4) * 100000) + ((99) * 1000) + 902)
+
+/* Build Xv Extension */
+#define XvExtension 1
+
+/* Build XvMC Extension */
+#define XvMCExtension 1
+
+/* Build XRes extension */
+#define XResExtension 1
+
+/* Support XSync extension */
+#define XSYNC 1
+
+/* Support XTest extension */
+#define XTEST 1
+
+/* Support XTrap extension */
+#define XTRAP 1
+
+/* Support Xv Extension */
+#define XV 1
+
+/* Vendor name */
+#define XVENDORNAME "The X.Org Foundation"
+
+/* Endian order */
+#define _X_BYTE_ORDER X_LITTLE_ENDIAN
+/* Deal with multiple architecture compiles on Mac OS X */
+#ifndef __APPLE_CC__
+#define X_BYTE_ORDER _X_BYTE_ORDER
+#else
+#ifdef __BIG_ENDIAN__
+#define X_BYTE_ORDER X_BIG_ENDIAN
+#else
+#define X_BYTE_ORDER X_LITTLE_ENDIAN
+#endif
+#endif
+
+/* BSD-compliant source */
+/* #undef _BSD_SOURCE */
+
+/* POSIX-compliant source */
+/* #undef _POSIX_SOURCE */
+
+/* X/Open-compliant source */
+/* #undef _XOPEN_SOURCE */
+
+/* Vendor web address for support */
+#define __VENDORDWEBSUPPORT__ "http://wiki.x.org"
+
+/* Location of configuration file */
+#define __XCONFIGFILE__ "xorg.conf"
+
+/* XKB default rules */
+#define __XKBDEFRULES__ "xorg"
+
+/* Name of X server */
+#define __XSERVERNAME__ "Xorg"
+
+/* Define to 1 if unsigned long is 64 bits. */
+/* #undef _XSERVER64 */
+
+/* Building vgahw module */
+#define WITH_VGAHW 1
+
+/* System is BSD-like */
+/* #undef CSRG_BASED */
+
+/* Solaris 8 or later? */
+/* #undef __SOL8__ */
+
+/* System has PC console */
+/* #undef PCCONS_SUPPORT */
+
+/* System has PCVT console */
+/* #undef PCVT_SUPPORT */
+
+/* System has syscons console */
+/* #undef SYSCONS_SUPPORT */
+
+/* System has wscons console */
+/* #undef WSCONS_SUPPORT */
+
+/* Loadable XFree86 server awesomeness */
+#define XFree86LOADER 1
+
+/* Use libpciaccess */
+#define XSERVER_LIBPCIACCESS 1
+
+#endif /* _XORG_SERVER_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xorgVersion.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xorgVersion.h	(revision 9233)
+++ /trunk/src/VBox/Additions/x11/x11include/1.5/xorg/xorgVersion.h	(revision 9233)
@@ -0,0 +1,49 @@
+
+/*
+ * Copyright (c) 2004, X.Org Foundation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef XORG_VERSION_H
+# define XORG_VERSION_H
+
+# ifndef XORG_VERSION_CURRENT
+#  error
+# endif
+
+# define XORG_VERSION_NUMERIC(major,minor,patch,snap,dummy) \
+	(((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap)
+
+# define XORG_GET_MAJOR_VERSION(vers)	((vers) / 10000000)
+# define XORG_GET_MINOR_VERSION(vers)	(((vers) % 10000000) / 100000)
+# define XORG_GET_PATCH_VERSION(vers)	(((vers) % 100000) / 1000)
+# define XORG_GET_SNAP_VERSION(vers)	((vers) % 1000)
+
+# define XORG_VERSION_MAJOR	XORG_GET_MAJOR_VERSION(XORG_VERSION_CURRENT)
+# define XORG_VERSION_MINOR	XORG_GET_MINOR_VERSION(XORG_VERSION_CURRENT)
+# define XORG_VERSION_PATCH	XORG_GET_PATCH_VERSION(XORG_VERSION_CURRENT)
+# define XORG_VERSION_SNAP	XORG_GET_SNAP_VERSION(XORG_VERSION_CURRENT)
+
+#endif
