Index: /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-accessor.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-accessor.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-accessor.h	(revision 22660)
@@ -0,0 +1,40 @@
+#ifdef PIXMAN_FB_ACCESSORS
+
+#define ACCESS(sym) sym##_accessors
+
+#define READ(img, ptr)							\
+    (((bits_image_t *)(img))->read_func ((ptr), sizeof(*(ptr))))
+#define WRITE(img, ptr,val)						\
+    (((bits_image_t *)(img))->write_func ((ptr), (val), sizeof (*(ptr))))
+
+#define MEMCPY_WRAPPED(img, dst, src, size)				\
+    do {								\
+	size_t _i;							\
+	uint8_t *_dst = (uint8_t*)(dst), *_src = (uint8_t*)(src);	\
+	for(_i = 0; _i < size; _i++) {					\
+	    WRITE((img), _dst +_i, READ((img), _src + _i));		\
+	}								\
+    } while (0)
+
+#define MEMSET_WRAPPED(img, dst, val, size)				\
+    do {								\
+	size_t _i;							\
+	uint8_t *_dst = (uint8_t*)(dst);				\
+	for(_i = 0; _i < (size_t) size; _i++) {				\
+	    WRITE((img), _dst +_i, (val));				\
+	}								\
+    } while (0)
+
+#else
+
+#define ACCESS(sym) sym
+
+#define READ(img, ptr)		(*(ptr))
+#define WRITE(img, ptr, val)	(*(ptr) = (val))
+#define MEMCPY_WRAPPED(img, dst, src, size)				\
+    memcpy(dst, src, size)
+#define MEMSET_WRAPPED(img, dst, val, size)				\
+    memset(dst, val, size)
+
+#endif
+
Index: /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-combine32.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-combine32.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-combine32.h	(revision 22660)
@@ -0,0 +1,230 @@
+/* WARNING: This file is generated by combine.pl from combine.inc.
+   Please edit one of those files rather than this one. */
+
+#line 1 "pixman-combine.c.template"
+
+#define COMPONENT_SIZE 8
+#define MASK 0xff
+#define ONE_HALF 0x80
+
+#define A_SHIFT 8 * 3
+#define R_SHIFT 8 * 2
+#define G_SHIFT 8
+#define A_MASK 0xff000000
+#define R_MASK 0xff0000
+#define G_MASK 0xff00
+
+#define RB_MASK 0xff00ff
+#define AG_MASK 0xff00ff00
+#define RB_ONE_HALF 0x800080
+#define RB_MASK_PLUS_ONE 0x10000100
+
+#define ALPHA_8(x) ((x) >> A_SHIFT)
+#define RED_8(x) (((x) >> R_SHIFT) & MASK)
+#define GREEN_8(x) (((x) >> G_SHIFT) & MASK)
+#define BLUE_8(x) ((x) & MASK)
+
+/*
+ * Helper macros.
+ */
+
+#define MUL_UN8(a, b, t)						\
+    ((t) = (a) * (b) + ONE_HALF, ((((t) >> G_SHIFT ) + (t) ) >> G_SHIFT ))
+
+#define DIV_UN8(a, b)							\
+    (((uint16_t) (a) * MASK) / (b))
+
+#define ADD_UN8(x, y, t)				     \
+    ((t) = x + y,					     \
+     (uint32_t) (uint8_t) ((t) | (0 - ((t) >> G_SHIFT))))
+
+#define DIV_ONE_UN8(x)							\
+    (((x) + ONE_HALF + (((x) + ONE_HALF) >> G_SHIFT)) >> G_SHIFT)
+
+/*
+ * The methods below use some tricks to be able to do two color
+ * components at the same time.
+ */
+
+/*
+ * x_rb = (x_rb * a) / 255
+ */
+#define UN8_rb_MUL_UN8(x, a, t)						\
+    do									\
+    {									\
+	t  = ((x) & RB_MASK) * (a);					\
+	t += RB_ONE_HALF;						\
+	x = (t + ((t >> G_SHIFT) & RB_MASK)) >> G_SHIFT;		\
+	x &= RB_MASK;							\
+    } while (0)
+
+/*
+ * x_rb = min (x_rb + y_rb, 255)
+ */
+#define UN8_rb_ADD_UN8_rb(x, y, t)					\
+    do									\
+    {									\
+	t = ((x) + (y));						\
+	t |= RB_MASK_PLUS_ONE - ((t >> G_SHIFT) & RB_MASK);		\
+	x = (t & RB_MASK);						\
+    } while (0)
+
+/*
+ * x_rb = (x_rb * a_rb) / 255
+ */
+#define UN8_rb_MUL_UN8_rb(x, a, t)					\
+    do									\
+    {									\
+	t  = (x & MASK) * (a & MASK);					\
+	t |= (x & R_MASK) * ((a >> R_SHIFT) & MASK);			\
+	t += RB_ONE_HALF;						\
+	t = (t + ((t >> G_SHIFT) & RB_MASK)) >> G_SHIFT;		\
+	x = t & RB_MASK;						\
+    } while (0)
+
+/*
+ * x_c = (x_c * a) / 255
+ */
+#define UN8x4_MUL_UN8(x, a)						\
+    do									\
+    {									\
+	uint32_t r1, r2, t;						\
+									\
+	r1 = (x);							\
+	UN8_rb_MUL_UN8 (r1, a, t);					\
+									\
+	r2 = (x) >> G_SHIFT;						\
+	UN8_rb_MUL_UN8 (r2, a, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
+
+/*
+ * x_c = (x_c * a) / 255 + y_c
+ */
+#define UN8x4_MUL_UN8_ADD_UN8x4(x, a, y)				\
+    do									\
+    {									\
+	uint32_t r1, r2, r3, t;						\
+									\
+	r1 = (x);							\
+	r2 = (y) & RB_MASK;						\
+	UN8_rb_MUL_UN8 (r1, a, t);					\
+	UN8_rb_ADD_UN8_rb (r1, r2, t);					\
+									\
+	r2 = (x) >> G_SHIFT;						\
+	r3 = ((y) >> G_SHIFT) & RB_MASK;				\
+	UN8_rb_MUL_UN8 (r2, a, t);					\
+	UN8_rb_ADD_UN8_rb (r2, r3, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
+
+/*
+ * x_c = (x_c * a + y_c * b) / 255
+ */
+#define UN8x4_MUL_UN8_ADD_UN8x4_MUL_UN8(x, a, y, b)			\
+    do									\
+    {									\
+	uint32_t r1, r2, r3, t;						\
+									\
+	r1 = x;								\
+	r2 = y;								\
+	UN8_rb_MUL_UN8 (r1, a, t);					\
+	UN8_rb_MUL_UN8 (r2, b, t);					\
+	UN8_rb_ADD_UN8_rb (r1, r2, t);					\
+									\
+	r2 = (x >> G_SHIFT);						\
+	r3 = (y >> G_SHIFT);						\
+	UN8_rb_MUL_UN8 (r2, a, t);					\
+	UN8_rb_MUL_UN8 (r3, b, t);					\
+	UN8_rb_ADD_UN8_rb (r2, r3, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
+
+/*
+ * x_c = (x_c * a_c) / 255
+ */
+#define UN8x4_MUL_UN8x4(x, a)						\
+    do									\
+    {									\
+	uint32_t r1, r2, r3, t;						\
+									\
+	r1 = x;								\
+	r2 = a;								\
+	UN8_rb_MUL_UN8_rb (r1, r2, t);					\
+									\
+	r2 = x >> G_SHIFT;						\
+	r3 = a >> G_SHIFT;						\
+	UN8_rb_MUL_UN8_rb (r2, r3, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
+
+/*
+ * x_c = (x_c * a_c) / 255 + y_c
+ */
+#define UN8x4_MUL_UN8x4_ADD_UN8x4(x, a, y)				\
+    do									\
+    {									\
+	uint32_t r1, r2, r3, t;						\
+									\
+	r1 = x;								\
+	r2 = a;								\
+	UN8_rb_MUL_UN8_rb (r1, r2, t);					\
+	r2 = y & RB_MASK;						\
+	UN8_rb_ADD_UN8_rb (r1, r2, t);					\
+									\
+	r2 = (x >> G_SHIFT);						\
+	r3 = (a >> G_SHIFT);						\
+	UN8_rb_MUL_UN8_rb (r2, r3, t);					\
+	r3 = (y >> G_SHIFT) & RB_MASK;					\
+	UN8_rb_ADD_UN8_rb (r2, r3, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
+
+/*
+ * x_c = (x_c * a_c + y_c * b) / 255
+ */
+#define UN8x4_MUL_UN8x4_ADD_UN8x4_MUL_UN8(x, a, y, b)			\
+    do									\
+    {									\
+	uint32_t r1, r2, r3, t;						\
+									\
+	r1 = x;								\
+	r2 = a;								\
+	UN8_rb_MUL_UN8_rb (r1, r2, t);					\
+	r2 = y;								\
+	UN8_rb_MUL_UN8 (r2, b, t);					\
+	UN8_rb_ADD_UN8_rb (r1, r2, t);					\
+									\
+	r2 = x >> G_SHIFT;						\
+	r3 = a >> G_SHIFT;						\
+	UN8_rb_MUL_UN8_rb (r2, r3, t);					\
+	r3 = y >> G_SHIFT;						\
+	UN8_rb_MUL_UN8 (r3, b, t);					\
+	UN8_rb_ADD_UN8_rb (r2, r3, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
+
+/*
+   x_c = min(x_c + y_c, 255)
+ */
+#define UN8x4_ADD_UN8x4(x, y)						\
+    do									\
+    {									\
+	uint32_t r1, r2, r3, t;						\
+									\
+	r1 = x & RB_MASK;						\
+	r2 = y & RB_MASK;						\
+	UN8_rb_ADD_UN8_rb (r1, r2, t);					\
+									\
+	r2 = (x >> G_SHIFT) & RB_MASK;					\
+	r3 = (y >> G_SHIFT) & RB_MASK;					\
+	UN8_rb_ADD_UN8_rb (r2, r3, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
Index: /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-combine64.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-combine64.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-combine64.h	(revision 22660)
@@ -0,0 +1,230 @@
+/* WARNING: This file is generated by combine.pl from combine.inc.
+   Please edit one of those files rather than this one. */
+
+#line 1 "pixman-combine.c.template"
+
+#define COMPONENT_SIZE 16
+#define MASK 0xffffULL
+#define ONE_HALF 0x8000ULL
+
+#define A_SHIFT 16 * 3
+#define R_SHIFT 16 * 2
+#define G_SHIFT 16
+#define A_MASK 0xffff000000000000ULL
+#define R_MASK 0xffff00000000ULL
+#define G_MASK 0xffff0000ULL
+
+#define RB_MASK 0xffff0000ffffULL
+#define AG_MASK 0xffff0000ffff0000ULL
+#define RB_ONE_HALF 0x800000008000ULL
+#define RB_MASK_PLUS_ONE 0x10000000010000ULL
+
+#define ALPHA_16(x) ((x) >> A_SHIFT)
+#define RED_16(x) (((x) >> R_SHIFT) & MASK)
+#define GREEN_16(x) (((x) >> G_SHIFT) & MASK)
+#define BLUE_16(x) ((x) & MASK)
+
+/*
+ * Helper macros.
+ */
+
+#define MUL_UN16(a, b, t)						\
+    ((t) = (a) * (b) + ONE_HALF, ((((t) >> G_SHIFT ) + (t) ) >> G_SHIFT ))
+
+#define DIV_UN16(a, b)							\
+    (((uint32_t) (a) * MASK) / (b))
+
+#define ADD_UN16(x, y, t)				     \
+    ((t) = x + y,					     \
+     (uint64_t) (uint16_t) ((t) | (0 - ((t) >> G_SHIFT))))
+
+#define DIV_ONE_UN16(x)							\
+    (((x) + ONE_HALF + (((x) + ONE_HALF) >> G_SHIFT)) >> G_SHIFT)
+
+/*
+ * The methods below use some tricks to be able to do two color
+ * components at the same time.
+ */
+
+/*
+ * x_rb = (x_rb * a) / 255
+ */
+#define UN16_rb_MUL_UN16(x, a, t)						\
+    do									\
+    {									\
+	t  = ((x) & RB_MASK) * (a);					\
+	t += RB_ONE_HALF;						\
+	x = (t + ((t >> G_SHIFT) & RB_MASK)) >> G_SHIFT;		\
+	x &= RB_MASK;							\
+    } while (0)
+
+/*
+ * x_rb = min (x_rb + y_rb, 255)
+ */
+#define UN16_rb_ADD_UN16_rb(x, y, t)					\
+    do									\
+    {									\
+	t = ((x) + (y));						\
+	t |= RB_MASK_PLUS_ONE - ((t >> G_SHIFT) & RB_MASK);		\
+	x = (t & RB_MASK);						\
+    } while (0)
+
+/*
+ * x_rb = (x_rb * a_rb) / 255
+ */
+#define UN16_rb_MUL_UN16_rb(x, a, t)					\
+    do									\
+    {									\
+	t  = (x & MASK) * (a & MASK);					\
+	t |= (x & R_MASK) * ((a >> R_SHIFT) & MASK);			\
+	t += RB_ONE_HALF;						\
+	t = (t + ((t >> G_SHIFT) & RB_MASK)) >> G_SHIFT;		\
+	x = t & RB_MASK;						\
+    } while (0)
+
+/*
+ * x_c = (x_c * a) / 255
+ */
+#define UN16x4_MUL_UN16(x, a)						\
+    do									\
+    {									\
+	uint64_t r1, r2, t;						\
+									\
+	r1 = (x);							\
+	UN16_rb_MUL_UN16 (r1, a, t);					\
+									\
+	r2 = (x) >> G_SHIFT;						\
+	UN16_rb_MUL_UN16 (r2, a, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
+
+/*
+ * x_c = (x_c * a) / 255 + y_c
+ */
+#define UN16x4_MUL_UN16_ADD_UN16x4(x, a, y)				\
+    do									\
+    {									\
+	uint64_t r1, r2, r3, t;						\
+									\
+	r1 = (x);							\
+	r2 = (y) & RB_MASK;						\
+	UN16_rb_MUL_UN16 (r1, a, t);					\
+	UN16_rb_ADD_UN16_rb (r1, r2, t);					\
+									\
+	r2 = (x) >> G_SHIFT;						\
+	r3 = ((y) >> G_SHIFT) & RB_MASK;				\
+	UN16_rb_MUL_UN16 (r2, a, t);					\
+	UN16_rb_ADD_UN16_rb (r2, r3, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
+
+/*
+ * x_c = (x_c * a + y_c * b) / 255
+ */
+#define UN16x4_MUL_UN16_ADD_UN16x4_MUL_UN16(x, a, y, b)			\
+    do									\
+    {									\
+	uint64_t r1, r2, r3, t;						\
+									\
+	r1 = x;								\
+	r2 = y;								\
+	UN16_rb_MUL_UN16 (r1, a, t);					\
+	UN16_rb_MUL_UN16 (r2, b, t);					\
+	UN16_rb_ADD_UN16_rb (r1, r2, t);					\
+									\
+	r2 = (x >> G_SHIFT);						\
+	r3 = (y >> G_SHIFT);						\
+	UN16_rb_MUL_UN16 (r2, a, t);					\
+	UN16_rb_MUL_UN16 (r3, b, t);					\
+	UN16_rb_ADD_UN16_rb (r2, r3, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
+
+/*
+ * x_c = (x_c * a_c) / 255
+ */
+#define UN16x4_MUL_UN16x4(x, a)						\
+    do									\
+    {									\
+	uint64_t r1, r2, r3, t;						\
+									\
+	r1 = x;								\
+	r2 = a;								\
+	UN16_rb_MUL_UN16_rb (r1, r2, t);					\
+									\
+	r2 = x >> G_SHIFT;						\
+	r3 = a >> G_SHIFT;						\
+	UN16_rb_MUL_UN16_rb (r2, r3, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
+
+/*
+ * x_c = (x_c * a_c) / 255 + y_c
+ */
+#define UN16x4_MUL_UN16x4_ADD_UN16x4(x, a, y)				\
+    do									\
+    {									\
+	uint64_t r1, r2, r3, t;						\
+									\
+	r1 = x;								\
+	r2 = a;								\
+	UN16_rb_MUL_UN16_rb (r1, r2, t);					\
+	r2 = y & RB_MASK;						\
+	UN16_rb_ADD_UN16_rb (r1, r2, t);					\
+									\
+	r2 = (x >> G_SHIFT);						\
+	r3 = (a >> G_SHIFT);						\
+	UN16_rb_MUL_UN16_rb (r2, r3, t);					\
+	r3 = (y >> G_SHIFT) & RB_MASK;					\
+	UN16_rb_ADD_UN16_rb (r2, r3, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
+
+/*
+ * x_c = (x_c * a_c + y_c * b) / 255
+ */
+#define UN16x4_MUL_UN16x4_ADD_UN16x4_MUL_UN16(x, a, y, b)			\
+    do									\
+    {									\
+	uint64_t r1, r2, r3, t;						\
+									\
+	r1 = x;								\
+	r2 = a;								\
+	UN16_rb_MUL_UN16_rb (r1, r2, t);					\
+	r2 = y;								\
+	UN16_rb_MUL_UN16 (r2, b, t);					\
+	UN16_rb_ADD_UN16_rb (r1, r2, t);					\
+									\
+	r2 = x >> G_SHIFT;						\
+	r3 = a >> G_SHIFT;						\
+	UN16_rb_MUL_UN16_rb (r2, r3, t);					\
+	r3 = y >> G_SHIFT;						\
+	UN16_rb_MUL_UN16 (r3, b, t);					\
+	UN16_rb_ADD_UN16_rb (r2, r3, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
+
+/*
+   x_c = min(x_c + y_c, 255)
+ */
+#define UN16x4_ADD_UN16x4(x, y)						\
+    do									\
+    {									\
+	uint64_t r1, r2, r3, t;						\
+									\
+	r1 = x & RB_MASK;						\
+	r2 = y & RB_MASK;						\
+	UN16_rb_ADD_UN16_rb (r1, r2, t);					\
+									\
+	r2 = (x >> G_SHIFT) & RB_MASK;					\
+	r3 = (y >> G_SHIFT) & RB_MASK;					\
+	UN16_rb_ADD_UN16_rb (r2, r3, t);					\
+									\
+	x = r1 | (r2 << G_SHIFT);					\
+    } while (0)
Index: /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-compiler.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-compiler.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-compiler.h	(revision 22660)
@@ -0,0 +1,71 @@
+/* Pixman uses some non-standard compiler features. This file ensures
+ * they exist
+ *
+ * The features are:
+ *
+ *    FUNC	     must be defined to expand to the current function
+ *    PIXMAN_EXPORT  should be defined to whatever is required to
+ *                   export functions from a shared library
+ *    limits	     limits for various types must be defined
+ *    inline         must be defined
+ *    force_inline   must be defined
+ */
+#if defined (__GNUC__)
+#  define FUNC     ((const char*) (__PRETTY_FUNCTION__))
+#elif defined (__sun) || (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+#  define FUNC     ((const char*) (__func__))
+#else
+#  define FUNC     ((const char*) ("???"))
+#endif
+
+#ifndef INT16_MIN
+# define INT16_MIN              (-32767-1)
+#endif
+
+#ifndef INT16_MAX
+# define INT16_MAX              (32767)
+#endif
+
+#ifndef INT32_MIN
+# define INT32_MIN              (-2147483647-1)
+#endif
+
+#ifndef INT32_MAX
+# define INT32_MAX              (2147483647)
+#endif
+
+#ifndef UINT32_MIN
+# define UINT32_MIN             (0)
+#endif
+
+#ifndef UINT32_MAX
+# define UINT32_MAX             (4294967295U)
+#endif
+
+#ifndef M_PI
+# define M_PI			3.14159265358979323846
+#endif
+
+#ifdef _MSC_VER
+/* 'inline' is available only in C++ in MSVC */
+#   define inline __inline
+#   define force_inline __forceinline
+#elif defined __GNUC__ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+#   define inline __inline__
+#   define force_inline __inline__ __attribute__ ((__always_inline__))
+#else
+#   ifndef force_inline
+#      define force_inline inline
+#   endif
+#endif
+
+/* GCC visibility */
+#if defined(__GNUC__) && __GNUC__ >= 4
+#   define PIXMAN_EXPORT __attribute__ ((visibility("default")))
+/* Sun Studio 8 visibility */
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#   define PIXMAN_EXPORT __global
+#else
+#   define PIXMAN_EXPORT
+#endif
+
Index: /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-edge-imp.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-edge-imp.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-edge-imp.h	(revision 22660)
@@ -0,0 +1,186 @@
+/*
+ * Copyright © 2004 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 rasterize_span
+#endif
+
+static void
+RASTERIZE_EDGES (pixman_image_t  *image,
+		pixman_edge_t	*l,
+		pixman_edge_t	*r,
+		pixman_fixed_t		t,
+		pixman_fixed_t		b)
+{
+    pixman_fixed_t  y = t;
+    uint32_t  *line;
+    uint32_t *buf = (image)->bits.bits;
+    int stride = (image)->bits.rowstride;
+    int width = (image)->bits.width;
+
+    line = buf + pixman_fixed_to_int (y) * stride;
+
+    for (;;)
+    {
+	pixman_fixed_t	lx;
+	pixman_fixed_t      rx;
+	int	lxi;
+	int rxi;
+
+	lx = l->x;
+	rx = r->x;
+#if N_BITS == 1
+	/* For the non-antialiased case, round the coordinates up, in effect
+	 * sampling the center of the pixel. (The AA case does a similar 
+	 * adjustment in RENDER_SAMPLES_X) */
+	lx += X_FRAC_FIRST(1);
+	rx += X_FRAC_FIRST(1);
+#endif
+	/* clip X */
+	if (lx < 0)
+	    lx = 0;
+	if (pixman_fixed_to_int (rx) >= width)
+#if N_BITS == 1
+	    rx = pixman_int_to_fixed (width);
+#else
+	    /* Use the last pixel of the scanline, covered 100%.
+	     * We can't use the first pixel following the scanline,
+	     * because accessing it could result in a buffer overrun.
+	     */
+	    rx = pixman_int_to_fixed (width) - 1;
+#endif
+
+	/* Skip empty (or backwards) sections */
+	if (rx > lx)
+	{
+
+	    /* Find pixel bounds for span */
+	    lxi = pixman_fixed_to_int (lx);
+	    rxi = pixman_fixed_to_int (rx);
+
+#if N_BITS == 1
+	    {
+
+#ifdef WORDS_BIGENDIAN
+#   define SCREEN_SHIFT_LEFT(x,n)	((x) << (n))
+#   define SCREEN_SHIFT_RIGHT(x,n)	((x) >> (n))
+#else
+#   define SCREEN_SHIFT_LEFT(x,n)	((x) >> (n))
+#   define SCREEN_SHIFT_RIGHT(x,n)	((x) << (n))
+#endif
+
+#define LEFT_MASK(x)							\
+		(((x) & 0x1f) ?						\
+		 SCREEN_SHIFT_RIGHT (0xffffffff, (x) & 0x1f) : 0)
+#define RIGHT_MASK(x)							\
+		(((32 - (x)) & 0x1f) ?					\
+		 SCREEN_SHIFT_LEFT (0xffffffff, (32 - (x)) & 0x1f) : 0)
+		
+#define MASK_BITS(x,w,l,n,r) {						\
+		    n = (w);						\
+		    r = RIGHT_MASK ((x) + n);				\
+		    l = LEFT_MASK (x);					\
+		    if (l) {						\
+			n -= 32 - ((x) & 0x1f);				\
+			if (n < 0) {					\
+			    n = 0;					\
+			    l &= r;					\
+			    r = 0;					\
+			}						\
+		    }							\
+		    n >>= 5;						\
+		}
+		
+		uint32_t  *a = line;
+		uint32_t  startmask;
+		uint32_t  endmask;
+		int	    nmiddle;
+		int	    width = rxi - lxi;
+		int	    x = lxi;
+		
+		a += x >> 5;
+		x &= 0x1f;
+		
+		MASK_BITS (x, width, startmask, nmiddle, endmask);
+
+		if (startmask) {
+		    WRITE(image, a, READ(image, a) | startmask);
+		    a++;
+		}
+		while (nmiddle--)
+		    WRITE(image, a++, 0xffffffff);
+		if (endmask)
+		    WRITE(image, a, READ(image, a) | endmask);
+	    }
+#else
+	    {
+		DEFINE_ALPHA(line,lxi);
+		int	    lxs;
+		int     rxs;
+
+		/* Sample coverage for edge pixels */
+		lxs = RENDER_SAMPLES_X (lx, N_BITS);
+		rxs = RENDER_SAMPLES_X (rx, N_BITS);
+
+		/* Add coverage across row */
+		if (lxi == rxi)
+		{
+		    ADD_ALPHA (rxs - lxs);
+		}
+		else
+		{
+		    int	xi;
+
+		    ADD_ALPHA (N_X_FRAC(N_BITS) - lxs);
+		    STEP_ALPHA;
+		    for (xi = lxi + 1; xi < rxi; xi++)
+		    {
+			ADD_ALPHA (N_X_FRAC(N_BITS));
+			STEP_ALPHA;
+		    }
+		    ADD_ALPHA (rxs);
+		}
+	    }
+#endif
+	}
+
+	if (y == b)
+	    break;
+
+#if N_BITS > 1
+	if (pixman_fixed_frac (y) != Y_FRAC_LAST(N_BITS))
+	{
+	    RENDER_EDGE_STEP_SMALL (l);
+	    RENDER_EDGE_STEP_SMALL (r);
+	    y += STEP_Y_SMALL(N_BITS);
+	}
+	else
+#endif
+	{
+	    RENDER_EDGE_STEP_BIG (l);
+	    RENDER_EDGE_STEP_BIG (r);
+	    y += STEP_Y_BIG(N_BITS);
+	    line += stride;
+	}
+    }
+}
+
+#undef rasterize_span
Index: /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-private.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-private.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-private.h	(revision 22660)
@@ -0,0 +1,797 @@
+#ifndef PACKAGE
+#  error config.h must be included before pixman-private.h
+#endif
+
+#ifndef PIXMAN_PRIVATE_H
+#define PIXMAN_PRIVATE_H
+
+#include "pixman.h"
+#include <time.h>
+#include <assert.h>
+
+#include "pixman-compiler.h"
+
+/*
+ * Images
+ */
+typedef struct image_common image_common_t;
+typedef struct source_image source_image_t;
+typedef struct solid_fill solid_fill_t;
+typedef struct gradient gradient_t;
+typedef struct linear_gradient linear_gradient_t;
+typedef struct horizontal_gradient horizontal_gradient_t;
+typedef struct vertical_gradient vertical_gradient_t;
+typedef struct conical_gradient conical_gradient_t;
+typedef struct radial_gradient radial_gradient_t;
+typedef struct bits_image bits_image_t;
+typedef struct circle circle_t;
+
+typedef void (*fetch_scanline_t) (pixman_image_t *image,
+				  int             x,
+				  int             y,
+				  int             width,
+				  uint32_t       *buffer,
+				  const uint32_t *mask,
+				  uint32_t        mask_bits);
+
+typedef uint32_t (*fetch_pixel_32_t) (bits_image_t *image,
+				      int           x,
+				      int           y);
+
+typedef uint64_t (*fetch_pixel_64_t) (bits_image_t *image,
+				      int           x,
+				      int           y);
+
+typedef void (*store_scanline_t) (bits_image_t *  image,
+				  int             x,
+				  int             y,
+				  int             width,
+				  const uint32_t *values);
+
+typedef enum
+{
+    BITS,
+    LINEAR,
+    CONICAL,
+    RADIAL,
+    SOLID
+} image_type_t;
+
+typedef enum
+{
+    SOURCE_IMAGE_CLASS_UNKNOWN,
+    SOURCE_IMAGE_CLASS_HORIZONTAL,
+    SOURCE_IMAGE_CLASS_VERTICAL,
+} source_image_class_t;
+
+typedef source_image_class_t (*classify_func_t) (pixman_image_t *image,
+						int             x,
+						int             y,
+						int             width,
+						int             height);
+typedef void (*property_changed_func_t) (pixman_image_t *image);
+
+struct image_common
+{
+    image_type_t                type;
+    int32_t                     ref_count;
+    pixman_region32_t           clip_region;
+    pixman_bool_t               have_clip_region;   /* FALSE if there is no clip */
+    pixman_bool_t               client_clip;        /* Whether the source clip was
+						       set by a client */
+    pixman_bool_t               clip_sources;       /* Whether the clip applies when
+						     * the image is used as a source
+						     */
+    pixman_bool_t		dirty;
+    pixman_bool_t               need_workaround;
+    pixman_transform_t *        transform;
+    pixman_repeat_t             repeat;
+    pixman_filter_t             filter;
+    pixman_fixed_t *            filter_params;
+    int                         n_filter_params;
+    bits_image_t *              alpha_map;
+    int                         alpha_origin_x;
+    int                         alpha_origin_y;
+    pixman_bool_t               component_alpha;
+    classify_func_t             classify;
+    property_changed_func_t     property_changed;
+    fetch_scanline_t            get_scanline_32;
+    fetch_scanline_t            get_scanline_64;
+
+    pixman_image_destroy_func_t destroy_func;
+    void *                      destroy_data;
+};
+
+struct source_image
+{
+    image_common_t common;
+    source_image_class_t class;
+};
+
+struct solid_fill
+{
+    source_image_t common;
+    uint32_t       color;    /* FIXME: shouldn't this be a pixman_color_t? */
+};
+
+struct gradient
+{
+    source_image_t          common;
+    int                     n_stops;
+    pixman_gradient_stop_t *stops;
+    int                     stop_range;
+    uint32_t *              color_table;
+    int                     color_table_size;
+};
+
+struct linear_gradient
+{
+    gradient_t           common;
+    pixman_point_fixed_t p1;
+    pixman_point_fixed_t p2;
+};
+
+struct circle
+{
+    pixman_fixed_t x;
+    pixman_fixed_t y;
+    pixman_fixed_t radius;
+};
+
+struct radial_gradient
+{
+    gradient_t common;
+
+    circle_t   c1;
+    circle_t   c2;
+    double     cdx;
+    double     cdy;
+    double     dr;
+    double     A;
+};
+
+struct conical_gradient
+{
+    gradient_t           common;
+    pixman_point_fixed_t center;
+    pixman_fixed_t       angle;
+};
+
+struct bits_image
+{
+    image_common_t             common;
+    pixman_format_code_t       format;
+    const pixman_indexed_t *   indexed;
+    int                        width;
+    int                        height;
+    uint32_t *                 bits;
+    uint32_t *                 free_me;
+    int                        rowstride;  /* in number of uint32_t's */
+
+    /* Fetch a pixel, disregarding alpha maps, transformations etc. */
+    fetch_pixel_32_t	       fetch_pixel_raw_32;
+    fetch_pixel_64_t	       fetch_pixel_raw_64;
+
+    /* Fetch a pixel, taking alpha maps into account */
+    fetch_pixel_32_t	       fetch_pixel_32;
+    fetch_pixel_64_t	       fetch_pixel_64;
+
+    /* Fetch raw scanlines, with no regard for transformations, alpha maps etc. */
+    fetch_scanline_t           fetch_scanline_raw_32;
+    fetch_scanline_t           fetch_scanline_raw_64;
+
+    /* Store scanlines with no regard for alpha maps */
+    store_scanline_t           store_scanline_raw_32;
+    store_scanline_t           store_scanline_raw_64;
+
+    /* Store a scanline, taking alpha maps into account */
+    store_scanline_t           store_scanline_32;
+    store_scanline_t           store_scanline_64;
+
+    /* Used for indirect access to the bits */
+    pixman_read_memory_func_t  read_func;
+    pixman_write_memory_func_t write_func;
+};
+
+union pixman_image
+{
+    image_type_t       type;
+    image_common_t     common;
+    bits_image_t       bits;
+    source_image_t     source;
+    gradient_t         gradient;
+    linear_gradient_t  linear;
+    conical_gradient_t conical;
+    radial_gradient_t  radial;
+    solid_fill_t       solid;
+};
+
+
+void
+_pixman_bits_image_setup_raw_accessors (bits_image_t *image);
+
+void
+_pixman_image_get_scanline_generic_64  (pixman_image_t *image,
+                                        int             x,
+                                        int             y,
+                                        int             width,
+                                        uint32_t *      buffer,
+                                        const uint32_t *mask,
+                                        uint32_t        mask_bits);
+
+source_image_class_t
+_pixman_image_classify (pixman_image_t *image,
+                        int             x,
+                        int             y,
+                        int             width,
+                        int             height);
+
+void
+_pixman_image_get_scanline_32 (pixman_image_t *image,
+                               int             x,
+                               int             y,
+                               int             width,
+                               uint32_t *      buffer,
+                               const uint32_t *mask,
+                               uint32_t        mask_bits);
+
+/* Even thought the type of buffer is uint32_t *, the function actually expects
+ * a uint64_t *buffer.
+ */
+void
+_pixman_image_get_scanline_64 (pixman_image_t *image,
+                               int             x,
+                               int             y,
+                               int             width,
+                               uint32_t *      buffer,
+                               const uint32_t *unused,
+                               uint32_t        unused2);
+
+void
+_pixman_image_store_scanline_32 (bits_image_t *  image,
+                                 int             x,
+                                 int             y,
+                                 int             width,
+                                 const uint32_t *buffer);
+void
+_pixman_image_fetch_pixels (bits_image_t *image,
+                            uint32_t *    buffer,
+                            int           n_pixels);
+
+/* Even though the type of buffer is uint32_t *, the function
+ * actually expects a uint64_t *buffer.
+ */
+void
+_pixman_image_store_scanline_64 (bits_image_t *  image,
+                                 int             x,
+                                 int             y,
+                                 int             width,
+                                 const uint32_t *buffer);
+
+pixman_image_t *
+_pixman_image_allocate (void);
+
+pixman_bool_t
+_pixman_init_gradient (gradient_t *                  gradient,
+                       const pixman_gradient_stop_t *stops,
+                       int                           n_stops);
+void
+_pixman_image_reset_clip_region (pixman_image_t *image);
+
+void
+_pixman_image_validate (pixman_image_t *image);
+
+pixman_bool_t
+_pixman_image_is_opaque (pixman_image_t *image);
+
+pixman_bool_t
+_pixman_image_is_solid (pixman_image_t *image);
+
+uint32_t
+_pixman_image_get_solid (pixman_image_t *     image,
+                         pixman_format_code_t format);
+
+#define PIXMAN_IMAGE_GET_LINE(image, x, y, type, out_stride, line, mul)	\
+    do									\
+    {									\
+	uint32_t *__bits__;						\
+	int       __stride__;						\
+        								\
+	__bits__ = image->bits.bits;					\
+	__stride__ = image->bits.rowstride;				\
+	(out_stride) =							\
+	    __stride__ * (int) sizeof (uint32_t) / (int) sizeof (type);	\
+	(line) =							\
+	    ((type *) __bits__) + (out_stride) * (y) + (mul) * (x);	\
+    } while (0)
+
+/*
+ * Gradient walker
+ */
+typedef struct
+{
+    uint32_t                left_ag;
+    uint32_t                left_rb;
+    uint32_t                right_ag;
+    uint32_t                right_rb;
+    int32_t                 left_x;
+    int32_t                 right_x;
+    int32_t                 stepper;
+
+    pixman_gradient_stop_t *stops;
+    int                     num_stops;
+    unsigned int            spread;
+
+    int                     need_reset;
+} pixman_gradient_walker_t;
+
+void
+_pixman_gradient_walker_init (pixman_gradient_walker_t *walker,
+                              gradient_t *              gradient,
+                              unsigned int              spread);
+
+void
+_pixman_gradient_walker_reset (pixman_gradient_walker_t *walker,
+                               pixman_fixed_32_32_t      pos);
+
+uint32_t
+_pixman_gradient_walker_pixel (pixman_gradient_walker_t *walker,
+                               pixman_fixed_32_32_t      x);
+
+/*
+ * Edges
+ */
+
+#define MAX_ALPHA(n)    ((1 << (n)) - 1)
+#define N_Y_FRAC(n)     ((n) == 1 ? 1 : (1 << ((n) / 2)) - 1)
+#define N_X_FRAC(n)     ((n) == 1 ? 1 : (1 << ((n) / 2)) + 1)
+
+#define STEP_Y_SMALL(n) (pixman_fixed_1 / N_Y_FRAC (n))
+#define STEP_Y_BIG(n)   (pixman_fixed_1 - (N_Y_FRAC (n) - 1) * STEP_Y_SMALL (n))
+
+#define Y_FRAC_FIRST(n) (STEP_Y_SMALL (n) / 2)
+#define Y_FRAC_LAST(n)  (Y_FRAC_FIRST (n) + (N_Y_FRAC (n) - 1) * STEP_Y_SMALL (n))
+
+#define STEP_X_SMALL(n) (pixman_fixed_1 / N_X_FRAC (n))
+#define STEP_X_BIG(n)   (pixman_fixed_1 - (N_X_FRAC (n) - 1) * STEP_X_SMALL (n))
+
+#define X_FRAC_FIRST(n) (STEP_X_SMALL (n) / 2)
+#define X_FRAC_LAST(n)  (X_FRAC_FIRST (n) + (N_X_FRAC (n) - 1) * STEP_X_SMALL (n))
+
+#define RENDER_SAMPLES_X(x, n)						\
+    ((n) == 1? 0 : (pixman_fixed_frac (x) +				\
+		    X_FRAC_FIRST (n)) / STEP_X_SMALL (n))
+
+void
+pixman_rasterize_edges_accessors (pixman_image_t *image,
+                                  pixman_edge_t * l,
+                                  pixman_edge_t * r,
+                                  pixman_fixed_t  t,
+                                  pixman_fixed_t  b);
+
+/*
+ * Implementations
+ */
+
+typedef struct pixman_implementation_t pixman_implementation_t;
+
+typedef void (*pixman_combine_32_func_t) (pixman_implementation_t *imp,
+					  pixman_op_t              op,
+					  uint32_t *               dest,
+					  const uint32_t *         src,
+					  const uint32_t *         mask,
+					  int                      width);
+
+typedef void (*pixman_combine_64_func_t) (pixman_implementation_t *imp,
+					  pixman_op_t              op,
+					  uint64_t *               dest,
+					  const uint64_t *         src,
+					  const uint64_t *         mask,
+					  int                      width);
+
+typedef void (*pixman_composite_func_t) (pixman_implementation_t *imp,
+					 pixman_op_t              op,
+					 pixman_image_t *         src,
+					 pixman_image_t *         mask,
+					 pixman_image_t *         dest,
+					 int32_t                  src_x,
+					 int32_t                  src_y,
+					 int32_t                  mask_x,
+					 int32_t                  mask_y,
+					 int32_t                  dest_x,
+					 int32_t                  dest_y,
+					 int32_t                  width,
+					 int32_t                  height);
+typedef pixman_bool_t (*pixman_blt_func_t) (pixman_implementation_t *imp,
+					    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);
+typedef pixman_bool_t (*pixman_fill_func_t) (pixman_implementation_t *imp,
+					     uint32_t *               bits,
+					     int                      stride,
+					     int                      bpp,
+					     int                      x,
+					     int                      y,
+					     int                      width,
+					     int                      height,
+					     uint32_t                 xor);
+
+void _pixman_setup_combiner_functions_32 (pixman_implementation_t *imp);
+void _pixman_setup_combiner_functions_64 (pixman_implementation_t *imp);
+
+struct pixman_implementation_t
+{
+    pixman_implementation_t *toplevel;
+    pixman_implementation_t *delegate;
+
+    pixman_composite_func_t  composite;
+    pixman_blt_func_t        blt;
+    pixman_fill_func_t       fill;
+
+    pixman_combine_32_func_t combine_32[PIXMAN_OP_LAST];
+    pixman_combine_32_func_t combine_32_ca[PIXMAN_OP_LAST];
+    pixman_combine_64_func_t combine_64[PIXMAN_OP_LAST];
+    pixman_combine_64_func_t combine_64_ca[PIXMAN_OP_LAST];
+};
+
+pixman_implementation_t *
+_pixman_implementation_create (pixman_implementation_t *delegate);
+
+void
+_pixman_implementation_combine_32 (pixman_implementation_t *imp,
+                                   pixman_op_t              op,
+                                   uint32_t *               dest,
+                                   const uint32_t *         src,
+                                   const uint32_t *         mask,
+                                   int                      width);
+void
+_pixman_implementation_combine_64 (pixman_implementation_t *imp,
+                                   pixman_op_t              op,
+                                   uint64_t *               dest,
+                                   const uint64_t *         src,
+                                   const uint64_t *         mask,
+                                   int                      width);
+void
+_pixman_implementation_combine_32_ca (pixman_implementation_t *imp,
+                                      pixman_op_t              op,
+                                      uint32_t *               dest,
+                                      const uint32_t *         src,
+                                      const uint32_t *         mask,
+                                      int                      width);
+void
+_pixman_implementation_combine_64_ca (pixman_implementation_t *imp,
+                                      pixman_op_t              op,
+                                      uint64_t *               dest,
+                                      const uint64_t *         src,
+                                      const uint64_t *         mask,
+                                      int                      width);
+void
+_pixman_implementation_composite (pixman_implementation_t *imp,
+                                  pixman_op_t              op,
+                                  pixman_image_t *         src,
+                                  pixman_image_t *         mask,
+                                  pixman_image_t *         dest,
+                                  int32_t                  src_x,
+                                  int32_t                  src_y,
+                                  int32_t                  mask_x,
+                                  int32_t                  mask_y,
+                                  int32_t                  dest_x,
+                                  int32_t                  dest_y,
+                                  int32_t                  width,
+                                  int32_t                  height);
+
+pixman_bool_t
+_pixman_implementation_blt (pixman_implementation_t *imp,
+                            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_bool_t
+_pixman_implementation_fill (pixman_implementation_t *imp,
+                             uint32_t *               bits,
+                             int                      stride,
+                             int                      bpp,
+                             int                      x,
+                             int                      y,
+                             int                      width,
+                             int                      height,
+                             uint32_t                 xor);
+
+/* Specific implementations */
+pixman_implementation_t *
+_pixman_implementation_create_general (void);
+
+pixman_implementation_t *
+_pixman_implementation_create_fast_path (void);
+
+#ifdef USE_MMX
+pixman_implementation_t *
+_pixman_implementation_create_mmx (void);
+#endif
+
+#ifdef USE_SSE2
+pixman_implementation_t *
+_pixman_implementation_create_sse2 (void);
+#endif
+
+#ifdef USE_ARM_SIMD
+pixman_implementation_t *
+_pixman_implementation_create_arm_simd (void);
+#endif
+
+#ifdef USE_ARM_NEON
+pixman_implementation_t *
+_pixman_implementation_create_arm_neon (void);
+#endif
+
+#ifdef USE_VMX
+pixman_implementation_t *
+_pixman_implementation_create_vmx (void);
+#endif
+
+pixman_implementation_t *
+_pixman_choose_implementation (void);
+
+
+
+/*
+ * Utilities
+ */
+
+/* These "formats" both have depth 0, so they
+ * will never clash with any real ones
+ */
+#define PIXMAN_null             PIXMAN_FORMAT (0, 0, 0, 0, 0, 0)
+#define PIXMAN_solid            PIXMAN_FORMAT (0, 1, 0, 0, 0, 0)
+
+#define NEED_COMPONENT_ALPHA            (1 << 0)
+#define NEED_PIXBUF                     (1 << 1)
+#define NEED_SOLID_MASK                 (1 << 2)
+
+typedef struct
+{
+    pixman_op_t             op;
+    pixman_format_code_t    src_format;
+    pixman_format_code_t    mask_format;
+    pixman_format_code_t    dest_format;
+    pixman_composite_func_t func;
+    uint32_t                flags;
+} pixman_fast_path_t;
+
+/* Memory allocation helpers */
+void *
+pixman_malloc_ab (unsigned int n, unsigned int b);
+
+void *
+pixman_malloc_abc (unsigned int a, unsigned int b, unsigned int c);
+
+pixman_bool_t
+pixman_multiply_overflows_int (unsigned int a, unsigned int b);
+
+pixman_bool_t
+pixman_addition_overflows_int (unsigned int a, unsigned int b);
+
+/* Compositing utilities */
+pixman_bool_t
+_pixman_run_fast_path (const pixman_fast_path_t *paths,
+                       pixman_implementation_t * imp,
+                       pixman_op_t               op,
+                       pixman_image_t *          src,
+                       pixman_image_t *          mask,
+                       pixman_image_t *          dest,
+                       int32_t                   src_x,
+                       int32_t                   src_y,
+                       int32_t                   mask_x,
+                       int32_t                   mask_y,
+                       int32_t                   dest_x,
+                       int32_t                   dest_y,
+                       int32_t                   width,
+                       int32_t                   height);
+
+void
+_pixman_walk_composite_region (pixman_implementation_t *imp,
+                               pixman_op_t              op,
+                               pixman_image_t *         src_image,
+                               pixman_image_t *         mask_image,
+                               pixman_image_t *         dst_image,
+                               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,
+                               pixman_composite_func_t  composite_rect);
+
+void
+pixman_expand (uint64_t *           dst,
+               const uint32_t *     src,
+               pixman_format_code_t format,
+               int                  width);
+
+void
+pixman_contract (uint32_t *      dst,
+                 const uint64_t *src,
+                 int             width);
+
+
+/* Region Helpers */
+pixman_bool_t
+pixman_region32_copy_from_region16 (pixman_region32_t *dst,
+                                    pixman_region16_t *src);
+
+pixman_bool_t
+pixman_region16_copy_from_region32 (pixman_region16_t *dst,
+                                    pixman_region32_t *src);
+
+
+/* Misc macros */
+
+#ifndef FALSE
+#   define FALSE 0
+#endif
+
+#ifndef TRUE
+#   define TRUE 1
+#endif
+
+#ifndef MIN
+#  define MIN(a, b) ((a < b) ? a : b)
+#endif
+
+#ifndef MAX
+#  define MAX(a, b) ((a > b) ? a : b)
+#endif
+
+/* Integer division that rounds towards -infinity */
+#define DIV(a, b)					   \
+    ((((a) < 0) == ((b) < 0)) ? (a) / (b) :                \
+     ((a) - (b) + 1 - (((b) < 0) << 1)) / (b))
+
+/* Modulus that produces the remainder wrt. DIV */
+#define MOD(a, b) ((a) < 0 ? ((b) - ((-(a) - 1) % (b))) - 1 : (a) % (b))
+
+#define CLIP(v, low, high) ((v) < (low) ? (low) : ((v) > (high) ? (high) : (v)))
+
+/* Conversion between 8888 and 0565 */
+
+#define CONVERT_8888_TO_0565(s)						\
+    ((((s) >> 3) & 0x001f) |						\
+     (((s) >> 5) & 0x07e0) |						\
+     (((s) >> 8) & 0xf800))
+
+#define CONVERT_0565_TO_0888(s)						\
+    (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) |			\
+     ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) |			\
+     ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))
+
+#define PIXMAN_FORMAT_IS_WIDE(f)					\
+    (PIXMAN_FORMAT_A (f) > 8 ||						\
+     PIXMAN_FORMAT_R (f) > 8 ||						\
+     PIXMAN_FORMAT_G (f) > 8 ||						\
+     PIXMAN_FORMAT_B (f) > 8)
+
+/*
+ * Various debugging code
+ */
+
+#undef DEBUG
+#define DEBUG 0
+
+#if DEBUG
+
+#define return_if_fail(expr)                                            \
+    do                                                                  \
+    {                                                                   \
+	if (!(expr))                                                    \
+	{                                                               \
+	    fprintf (stderr, "In %s: %s failed\n", FUNC, # expr);	\
+	    return;                                                     \
+	}                                                               \
+    }                                                                   \
+    while (0)
+
+#define return_val_if_fail(expr, retval)                                \
+    do                                                                  \
+    {                                                                   \
+	if (!(expr))                                                    \
+	{                                                               \
+	    fprintf (stderr, "In %s: %s failed\n", FUNC, # expr);	\
+	    return (retval);                                            \
+	}                                                               \
+    }                                                                   \
+    while (0)
+
+#else
+
+#define return_if_fail(expr)                                            \
+    do                                                                  \
+    {                                                                   \
+	if (!(expr))							\
+	    return;							\
+    }                                                                   \
+    while (0)
+
+#define return_val_if_fail(expr, retval)                                \
+    do                                                                  \
+    {                                                                   \
+	if (!(expr))							\
+	    return (retval);						\
+    }                                                                   \
+    while (0)
+
+#endif
+
+/*
+ * Timers
+ */
+
+#ifdef PIXMAN_TIMERS
+
+static inline uint64_t
+oil_profile_stamp_rdtsc (void)
+{
+    uint64_t ts;
+
+    __asm__ __volatile__ ("rdtsc\n" : "=A" (ts));
+    return ts;
+}
+
+#define OIL_STAMP oil_profile_stamp_rdtsc
+
+typedef struct pixman_timer_t pixman_timer_t;
+
+struct pixman_timer_t
+{
+    int             initialized;
+    const char *    name;
+    uint64_t        n_times;
+    uint64_t        total;
+    pixman_timer_t *next;
+};
+
+extern int timer_defined;
+
+void pixman_timer_register (pixman_timer_t *timer);
+
+#define TIMER_BEGIN(tname)                                              \
+    {                                                                   \
+	static pixman_timer_t timer ## tname;                           \
+	uint64_t              begin ## tname;                           \
+        								\
+	if (!timer ## tname.initialized)				\
+	{                                                               \
+	    timer ## tname.initialized = 1;				\
+	    timer ## tname.name = # tname;				\
+	    pixman_timer_register (&timer ## tname);			\
+	}                                                               \
+									\
+	timer ## tname.n_times++;					\
+	begin ## tname = OIL_STAMP ();
+
+#define TIMER_END(tname)                                                \
+    timer ## tname.total += OIL_STAMP () - begin ## tname;		\
+    }
+
+#endif /* PIXMAN_TIMERS */
+
+#endif /* PIXMAN_PRIVATE_H */
Index: /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-version.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-version.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-version.h	(revision 22660)
@@ -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 16
+#define PIXMAN_VERSION_MICRO 0
+
+#define PIXMAN_VERSION_STRING "0.16.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/pixman-0.16.0/pixman-x64-mmx-emulation.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-x64-mmx-emulation.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-x64-mmx-emulation.h	(revision 22660)
@@ -0,0 +1,263 @@
+#ifndef MMX_X64_H_INCLUDED
+#define MMX_X64_H_INCLUDED
+
+/* Implementation of x64 MMX substitition functions, before
+ * pixman is reimplemented not to use __m64 type on Visual C++
+ *
+ * Copyright (C)2009 by George Yohng
+ * Released in public domain.
+ */
+
+#include <intrin.h>
+
+#define M64C(a) (*(const __m64 *)(&a))
+#define M64U(a) (*(const unsigned long long *)(&a))
+
+__inline __m64
+_m_from_int (int a)
+{
+    long long i64 = a;
+
+    return M64C (i64);
+}
+
+__inline __m64
+_mm_setzero_si64 ()
+{
+    long long i64 = 0;
+
+    return M64C (i64);
+}
+
+__inline __m64
+_mm_set_pi32 (int i1,   int i0)
+{
+    unsigned long long i64 = ((unsigned)i0) + (((unsigned long long)(unsigned)i1) << 32);
+
+    return M64C (i64);
+}
+
+__inline void
+_m_empty ()
+{
+}
+
+__inline __m64
+_mm_set1_pi16 (short w)
+{
+    unsigned long long i64 = ((unsigned long long)(unsigned short)(w)) * 0x0001000100010001ULL;
+
+    return M64C (i64);
+}
+
+__inline int
+_m_to_int (__m64 m)
+{
+    return m.m64_i32[0];
+}
+
+__inline __m64
+_mm_movepi64_pi64 (__m128i a)
+{
+    return M64C (a.m128i_i64[0]);
+}
+
+__inline __m64
+_m_pand (__m64 a, __m64 b)
+{
+    unsigned long long i64 = M64U (a) & M64U (b);
+
+    return M64C (i64);
+}
+
+__inline __m64
+_m_por (__m64 a, __m64 b)
+{
+    unsigned long long i64 = M64U (a) | M64U (b);
+
+    return M64C (i64);
+}
+
+__inline __m64
+_m_pxor (__m64 a, __m64 b)
+{
+    unsigned long long i64 = M64U (a) ^ M64U (b);
+
+    return M64C (i64);
+}
+
+__inline __m64
+_m_pmulhuw (__m64 a, __m64 b)        /* unoptimized */
+{
+    unsigned short d[4] =
+    {
+	(unsigned short)((((unsigned)a.m64_u16[0]) * b.m64_u16[0]) >> 16),
+	(unsigned short)((((unsigned)a.m64_u16[1]) * b.m64_u16[1]) >> 16),
+	(unsigned short)((((unsigned)a.m64_u16[2]) * b.m64_u16[2]) >> 16),
+	(unsigned short)((((unsigned)a.m64_u16[3]) * b.m64_u16[3]) >> 16)
+    };
+
+    return M64C (d[0]);
+}
+
+__inline __m64
+_m_pmullw2 (__m64 a, __m64 b)        /* unoptimized */
+{
+    unsigned short d[4] =
+    {
+	(unsigned short)((((unsigned)a.m64_u16[0]) * b.m64_u16[0])),
+	(unsigned short)((((unsigned)a.m64_u16[1]) * b.m64_u16[1])),
+	(unsigned short)((((unsigned)a.m64_u16[2]) * b.m64_u16[2])),
+	(unsigned short)((((unsigned)a.m64_u16[3]) * b.m64_u16[3]))
+    };
+
+    return M64C (d[0]);
+}
+
+__inline __m64
+_m_pmullw (__m64 a, __m64 b)        /* unoptimized */
+{
+    unsigned long long x =
+	((unsigned long long)(unsigned short)((((unsigned)a.m64_u16[0]) * b.m64_u16[0])))  +
+	(((unsigned long long)(unsigned short)((((unsigned)a.m64_u16[1]) * b.m64_u16[1]))) << 16)  +
+	(((unsigned long long)(unsigned short)((((unsigned)a.m64_u16[2]) * b.m64_u16[2]))) << 32)  +
+	(((unsigned long long)(unsigned short)((((unsigned)a.m64_u16[3]) * b.m64_u16[3]))) << 48);
+
+    return M64C (x);
+}
+
+__inline __m64
+_m_paddusb (__m64 a, __m64 b)        /* unoptimized */
+{
+    unsigned long long x = (M64U (a) & 0x00FF00FF00FF00FFULL) +
+                           (M64U (b) & 0x00FF00FF00FF00FFULL);
+
+    unsigned long long y = ((M64U (a) >> 8) & 0x00FF00FF00FF00FFULL) +
+                           ((M64U (b) >> 8) & 0x00FF00FF00FF00FFULL);
+
+    x |= ((x & 0xFF00FF00FF00FF00ULL) >> 8) * 0xFF;
+    y |= ((y & 0xFF00FF00FF00FF00ULL) >> 8) * 0xFF;
+
+    x = (x & 0x00FF00FF00FF00FFULL) | ((y & 0x00FF00FF00FF00FFULL) << 8);
+
+    return M64C (x);
+}
+
+__inline __m64
+_m_paddusw (__m64 a, __m64 b)        /* unoptimized */
+{
+    unsigned long long x = (M64U (a) & 0x0000FFFF0000FFFFULL) +
+                           (M64U (b) & 0x0000FFFF0000FFFFULL);
+
+    unsigned long long y = ((M64U (a) >> 16) & 0x0000FFFF0000FFFFULL) +
+                           ((M64U (b) >> 16) & 0x0000FFFF0000FFFFULL);
+
+    x |= ((x & 0xFFFF0000FFFF0000) >> 16) * 0xFFFF;
+    y |= ((y & 0xFFFF0000FFFF0000) >> 16) * 0xFFFF;
+
+    x = (x & 0x0000FFFF0000FFFFULL) | ((y & 0x0000FFFF0000FFFFULL) << 16);
+
+    return M64C (x);
+}
+
+__inline __m64
+_m_pshufw (__m64 a, int n)         /* unoptimized */
+{
+    unsigned short d[4] =
+    {
+	a.m64_u16[n & 3],
+	a.m64_u16[(n >> 2) & 3],
+	a.m64_u16[(n >> 4) & 3],
+	a.m64_u16[(n >> 6) & 3]
+    };
+
+    return M64C (d[0]);
+}
+
+__inline unsigned char
+sat16 (unsigned short d)
+{
+    if (d > 0xFF) return 0xFF;
+    else return d & 0xFF;
+}
+
+__inline __m64
+_m_packuswb (__m64 m1, __m64 m2)          /* unoptimized */
+{
+    unsigned char d[8] =
+    {
+	sat16 (m1.m64_u16[0]),
+	sat16 (m1.m64_u16[1]),
+	sat16 (m1.m64_u16[2]),
+	sat16 (m1.m64_u16[3]),
+	sat16 (m2.m64_u16[0]),
+	sat16 (m2.m64_u16[1]),
+	sat16 (m2.m64_u16[2]),
+	sat16 (m2.m64_u16[3])
+    };
+
+    return M64C (d[0]);
+}
+
+__inline __m64 _m_punpcklbw (__m64 m1, __m64 m2)          /* unoptimized */
+{
+    unsigned char d[8] =
+    {
+	m1.m64_u8[0],
+	m2.m64_u8[0],
+	m1.m64_u8[1],
+	m2.m64_u8[1],
+	m1.m64_u8[2],
+	m2.m64_u8[2],
+	m1.m64_u8[3],
+	m2.m64_u8[3],
+    };
+
+    return M64C (d[0]);
+}
+
+__inline __m64 _m_punpckhbw (__m64 m1, __m64 m2)          /* unoptimized */
+{
+    unsigned char d[8] =
+    {
+	m1.m64_u8[4],
+	m2.m64_u8[4],
+	m1.m64_u8[5],
+	m2.m64_u8[5],
+	m1.m64_u8[6],
+	m2.m64_u8[6],
+	m1.m64_u8[7],
+	m2.m64_u8[7],
+    };
+
+    return M64C (d[0]);
+}
+
+__inline __m64 _m_psrlwi (__m64 a, int n)       /* unoptimized */
+{
+    unsigned short d[4] =
+    {
+	a.m64_u16[0] >> n,
+	a.m64_u16[1] >> n,
+	a.m64_u16[2] >> n,
+	a.m64_u16[3] >> n
+    };
+
+    return M64C (d[0]);
+}
+
+__inline __m64 _m_psrlqi (__m64 m, int n)
+{
+    unsigned long long x = M64U (m) >> n;
+
+    return M64C (x);
+}
+
+__inline __m64 _m_psllqi (__m64 m, int n)
+{
+    unsigned long long x = M64U (m) << n;
+
+    return M64C (x);
+}
+
+#endif /* MMX_X64_H_INCLUDED */
Index: /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman.h	(revision 22660)
@@ -0,0 +1,894 @@
+/***********************************************************
+
+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 (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__)
+#  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;
+#elif defined (_AIX)
+#  include <sys/inttypes.h>
+#else
+#  include <stdint.h>
+#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;
+};
+
+/*
+ * Fixed point matrices
+ */
+
+struct pixman_vector
+{
+    pixman_fixed_t	vector[3];
+};
+
+struct pixman_transform
+{
+    pixman_fixed_t	matrix[3][3];
+};
+
+/* forward declaration (sorry) */
+struct pixman_box16;
+
+void          pixman_transform_init_identity    (struct pixman_transform       *matrix);
+pixman_bool_t pixman_transform_point_3d         (const struct pixman_transform *transform,
+						 struct pixman_vector          *vector);
+pixman_bool_t pixman_transform_point            (const struct pixman_transform *transform,
+						 struct pixman_vector          *vector);
+pixman_bool_t pixman_transform_multiply         (struct pixman_transform       *dst,
+						 const struct pixman_transform *l,
+						 const struct pixman_transform *r);
+void          pixman_transform_init_scale       (struct pixman_transform       *t,
+						 pixman_fixed_t                 sx,
+						 pixman_fixed_t                 sy);
+pixman_bool_t pixman_transform_scale            (struct pixman_transform       *forward,
+						 struct pixman_transform       *reverse,
+						 pixman_fixed_t                 sx,
+						 pixman_fixed_t                 sy);
+void          pixman_transform_init_rotate      (struct pixman_transform       *t,
+						 pixman_fixed_t                 cos,
+						 pixman_fixed_t                 sin);
+pixman_bool_t pixman_transform_rotate           (struct pixman_transform       *forward,
+						 struct pixman_transform       *reverse,
+						 pixman_fixed_t                 c,
+						 pixman_fixed_t                 s);
+void          pixman_transform_init_translate   (struct pixman_transform       *t,
+						 pixman_fixed_t                 tx,
+						 pixman_fixed_t                 ty);
+pixman_bool_t pixman_transform_translate        (struct pixman_transform       *forward,
+						 struct pixman_transform       *reverse,
+						 pixman_fixed_t                 tx,
+						 pixman_fixed_t                 ty);
+pixman_bool_t pixman_transform_bounds           (const struct pixman_transform *matrix,
+						 struct pixman_box16           *b);
+pixman_bool_t pixman_transform_invert           (struct pixman_transform       *dst,
+						 const struct pixman_transform *src);
+pixman_bool_t pixman_transform_is_identity      (const struct pixman_transform *t);
+pixman_bool_t pixman_transform_is_scale         (const struct pixman_transform *t);
+pixman_bool_t pixman_transform_is_int_translate (const struct pixman_transform *t);
+pixman_bool_t pixman_transform_is_inverse       (const struct pixman_transform *a,
+						 const struct pixman_transform *b);
+
+/*
+ * Floating point matrices
+ */
+struct pixman_f_vector
+{
+    double  v[3];
+};
+
+struct pixman_f_transform
+{
+    double  m[3][3];
+};
+
+pixman_bool_t pixman_transform_from_pixman_f_transform (struct pixman_transform         *t,
+							const struct pixman_f_transform *ft);
+void          pixman_f_transform_from_pixman_transform (struct pixman_f_transform       *ft,
+							const struct pixman_transform   *t);
+pixman_bool_t pixman_transform_from_pixman_f_transform (struct pixman_transform         *t,
+							const struct pixman_f_transform *ft);
+pixman_bool_t pixman_f_transform_invert                (struct pixman_f_transform       *dst,
+							const struct pixman_f_transform *src);
+pixman_bool_t pixman_f_transform_point                 (const struct pixman_f_transform *t,
+							struct pixman_f_vector          *v);
+void          pixman_f_transform_point_3d              (const struct pixman_f_transform *t,
+							struct pixman_f_vector          *v);
+void          pixman_f_transform_multiply              (struct pixman_f_transform       *dst,
+							const struct pixman_f_transform *l,
+							const struct pixman_f_transform *r);
+void          pixman_f_transform_init_scale            (struct pixman_f_transform       *t,
+							double                           sx,
+							double                           sy);
+pixman_bool_t pixman_f_transform_scale                 (struct pixman_f_transform       *forward,
+							struct pixman_f_transform       *reverse,
+							double                           sx,
+							double                           sy);
+void          pixman_f_transform_init_rotate           (struct pixman_f_transform       *t,
+							double                           cos,
+							double                           sin);
+pixman_bool_t pixman_f_transform_rotate                (struct pixman_f_transform       *forward,
+							struct pixman_f_transform       *reverse,
+							double                           c,
+							double                           s);
+void          pixman_f_transform_init_translate        (struct pixman_f_transform       *t,
+							double                           tx,
+							double                           ty);
+pixman_bool_t pixman_f_transform_translate             (struct pixman_f_transform       *forward,
+							struct pixman_f_transform       *reverse,
+							double                           tx,
+							double                           ty);
+pixman_bool_t pixman_f_transform_bounds                (const struct pixman_f_transform *t,
+							struct pixman_box16             *b);
+void          pixman_f_transform_init_identity         (struct pixman_f_transform       *t);
+
+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_MULTIPLY                  = 0x30,
+    PIXMAN_OP_SCREEN                    = 0x31,
+    PIXMAN_OP_OVERLAY                   = 0x32,
+    PIXMAN_OP_DARKEN                    = 0x33,
+    PIXMAN_OP_LIGHTEN                   = 0x34,
+    PIXMAN_OP_COLOR_DODGE               = 0x35,
+    PIXMAN_OP_COLOR_BURN                = 0x36,
+    PIXMAN_OP_HARD_LIGHT                = 0x37,
+    PIXMAN_OP_SOFT_LIGHT                = 0x38,
+    PIXMAN_OP_DIFFERENCE                = 0x39,
+    PIXMAN_OP_EXCLUSION                 = 0x3a,
+    PIXMAN_OP_HSL_HUE			= 0x3b,
+    PIXMAN_OP_HSL_SATURATION		= 0x3c,
+    PIXMAN_OP_HSL_COLOR			= 0x3d,
+    PIXMAN_OP_HSL_LUMINOSITY		= 0x3e,
+
+    PIXMAN_OP_NONE,
+    PIXMAN_OP_LAST = 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;
+
+/* This function exists only to make it possible to preserve
+ * the X ABI - it should go away at first opportunity.
+ */
+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 */
+void                    pixman_region_init               (pixman_region16_t *region);
+void                    pixman_region_init_rect          (pixman_region16_t *region,
+							  int                x,
+							  int                y,
+							  unsigned int       width,
+							  unsigned int       height);
+pixman_bool_t           pixman_region_init_rects         (pixman_region16_t *region,
+							  pixman_box16_t    *boxes,
+							  int                count);
+void                    pixman_region_init_with_extents  (pixman_region16_t *region,
+							  pixman_box16_t    *extents);
+void                    pixman_region_fini               (pixman_region16_t *region);
+
+
+
+/* manipulation */
+void                    pixman_region_translate          (pixman_region16_t *region,
+							  int                x,
+							  int                y);
+pixman_bool_t           pixman_region_copy               (pixman_region16_t *dest,
+							  pixman_region16_t *source);
+pixman_bool_t           pixman_region_intersect          (pixman_region16_t *new_reg,
+							  pixman_region16_t *reg1,
+							  pixman_region16_t *reg2);
+pixman_bool_t           pixman_region_union              (pixman_region16_t *new_reg,
+							  pixman_region16_t *reg1,
+							  pixman_region16_t *reg2);
+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_bool_t           pixman_region_subtract           (pixman_region16_t *reg_d,
+							  pixman_region16_t *reg_m,
+							  pixman_region16_t *reg_s);
+pixman_bool_t           pixman_region_inverse            (pixman_region16_t *new_reg,
+							  pixman_region16_t *reg1,
+							  pixman_box16_t    *inv_rect);
+pixman_bool_t           pixman_region_contains_point     (pixman_region16_t *region,
+							  int                x,
+							  int                y,
+							  pixman_box16_t    *box);
+pixman_region_overlap_t pixman_region_contains_rectangle (pixman_region16_t *pixman_region16_t,
+							  pixman_box16_t    *prect);
+pixman_bool_t           pixman_region_not_empty          (pixman_region16_t *region);
+pixman_box16_t *        pixman_region_extents            (pixman_region16_t *region);
+int                     pixman_region_n_rects            (pixman_region16_t *region);
+pixman_box16_t *        pixman_region_rectangles         (pixman_region16_t *region,
+							  int               *n_rects);
+pixman_bool_t           pixman_region_equal              (pixman_region16_t *region1,
+							  pixman_region16_t *region2);
+pixman_bool_t           pixman_region_selfcheck          (pixman_region16_t *region);
+void                    pixman_region_reset              (pixman_region16_t *region,
+							  pixman_box16_t    *box);
+/*
+ * 32 bit regions
+ */
+typedef struct pixman_region32_data	pixman_region32_data_t;
+typedef struct pixman_box32		pixman_box32_t;
+typedef struct pixman_rectangle32	pixman_rectangle32_t;
+typedef struct pixman_region32		pixman_region32_t;
+
+struct pixman_region32_data {
+    long		size;
+    long		numRects;
+/*  pixman_box32_t	rects[size];   in memory but not explicitly declared */
+};
+
+struct pixman_rectangle32
+{
+    int32_t x, y;
+    uint32_t width, height;
+};
+
+struct pixman_box32
+{
+    int32_t x1, y1, x2, y2;
+};
+
+struct pixman_region32
+{
+    pixman_box32_t          extents;
+    pixman_region32_data_t  *data;
+};
+
+/* creation/destruction */
+void                    pixman_region32_init               (pixman_region32_t *region);
+void                    pixman_region32_init_rect          (pixman_region32_t *region,
+							    int                x,
+							    int                y,
+							    unsigned int       width,
+							    unsigned int       height);
+pixman_bool_t           pixman_region32_init_rects         (pixman_region32_t *region,
+							    pixman_box32_t    *boxes,
+							    int                count);
+void                    pixman_region32_init_with_extents  (pixman_region32_t *region,
+							    pixman_box32_t    *extents);
+void                    pixman_region32_fini               (pixman_region32_t *region);
+
+
+/* manipulation */
+void                    pixman_region32_translate          (pixman_region32_t *region,
+							    int                x,
+							    int                y);
+pixman_bool_t           pixman_region32_copy               (pixman_region32_t *dest,
+							    pixman_region32_t *source);
+pixman_bool_t           pixman_region32_intersect          (pixman_region32_t *new_reg,
+							    pixman_region32_t *reg1,
+							    pixman_region32_t *reg2);
+pixman_bool_t           pixman_region32_union              (pixman_region32_t *new_reg,
+							    pixman_region32_t *reg1,
+							    pixman_region32_t *reg2);
+pixman_bool_t           pixman_region32_union_rect         (pixman_region32_t *dest,
+							    pixman_region32_t *source,
+							    int                x,
+							    int                y,
+							    unsigned int       width,
+							    unsigned int       height);
+pixman_bool_t           pixman_region32_subtract           (pixman_region32_t *reg_d,
+							    pixman_region32_t *reg_m,
+							    pixman_region32_t *reg_s);
+pixman_bool_t           pixman_region32_inverse            (pixman_region32_t *new_reg,
+							    pixman_region32_t *reg1,
+							    pixman_box32_t    *inv_rect);
+pixman_bool_t           pixman_region32_contains_point     (pixman_region32_t *region,
+							    int                x,
+							    int                y,
+							    pixman_box32_t    *box);
+pixman_region_overlap_t pixman_region32_contains_rectangle (pixman_region32_t *region,
+							    pixman_box32_t    *prect);
+pixman_bool_t           pixman_region32_not_empty          (pixman_region32_t *region);
+pixman_box32_t *        pixman_region32_extents            (pixman_region32_t *region);
+int                     pixman_region32_n_rects            (pixman_region32_t *region);
+pixman_box32_t *        pixman_region32_rectangles         (pixman_region32_t *region,
+							    int               *n_rects);
+pixman_bool_t           pixman_region32_equal              (pixman_region32_t *region1,
+							    pixman_region32_t *region2);
+pixman_bool_t           pixman_region32_selfcheck          (pixman_region32_t *region);
+void                    pixman_region32_reset              (pixman_region32_t *region,
+							    pixman_box32_t    *box);
+
+
+/* Copy / Fill / Misc */
+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_bool_t pixman_fill               (uint32_t           *bits,
+					 int                 stride,
+					 int                 bpp,
+					 int                 x,
+					 int                 y,
+					 int                 width,
+					 int                 height,
+					 uint32_t            _xor);
+
+int           pixman_version            (void);
+const char*   pixman_version_string     (void);
+
+/*
+ * 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);
+
+typedef void     (* pixman_image_destroy_func_t) (pixman_image_t *image, void *data);
+
+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_TYPE_BGRA	8
+
+#define PIXMAN_FORMAT_COLOR(f)				\
+	(PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ARGB ||	\
+	 PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ABGR ||	\
+	 PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_BGRA)
+
+/* 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),
+    PIXMAN_b8g8r8a8 =	 PIXMAN_FORMAT(32,PIXMAN_TYPE_BGRA,8,8,8,8),
+    PIXMAN_b8g8r8x8 =	 PIXMAN_FORMAT(32,PIXMAN_TYPE_BGRA,0,8,8,8),
+    PIXMAN_x2r10g10b10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,10,10,10),
+    PIXMAN_a2r10g10b10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,2,10,10,10),
+    PIXMAN_x2b10g10r10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,0,10,10,10),
+    PIXMAN_a2b10g10r10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,2,10,10,10),
+
+/* 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_bool_t pixman_format_supported_destination (pixman_format_code_t format);
+pixman_bool_t pixman_format_supported_source      (pixman_format_code_t format);
+
+/* Constructors */
+pixman_image_t *pixman_image_create_solid_fill       (pixman_color_t               *color);
+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_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_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_image_t *pixman_image_create_bits             (pixman_format_code_t          format,
+						      int                           width,
+						      int                           height,
+						      uint32_t                     *bits,
+						      int                           rowstride_bytes);
+
+/* Destructor */
+pixman_image_t *pixman_image_ref                     (pixman_image_t               *image);
+pixman_bool_t   pixman_image_unref                   (pixman_image_t               *image);
+
+void		pixman_image_set_destroy_function    (pixman_image_t		   *image,
+						      pixman_image_destroy_func_t   function,
+						      void			   *data);
+
+/* Set properties */
+pixman_bool_t   pixman_image_set_clip_region         (pixman_image_t               *image,
+						      pixman_region16_t            *region);
+pixman_bool_t   pixman_image_set_clip_region32       (pixman_image_t               *image,
+						      pixman_region32_t            *region);
+void		pixman_image_set_has_client_clip     (pixman_image_t               *image,
+						      pixman_bool_t		    clien_clip);
+pixman_bool_t   pixman_image_set_transform           (pixman_image_t               *image,
+						      const pixman_transform_t     *transform);
+void            pixman_image_set_repeat              (pixman_image_t               *image,
+						      pixman_repeat_t               repeat);
+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);
+void		pixman_image_set_source_clipping     (pixman_image_t		   *image,
+						      pixman_bool_t                 source_clipping);
+void            pixman_image_set_alpha_map           (pixman_image_t               *image,
+						      pixman_image_t               *alpha_map,
+						      int16_t                       x,
+						      int16_t                       y);
+void            pixman_image_set_component_alpha     (pixman_image_t               *image,
+						      pixman_bool_t                 component_alpha);
+void		pixman_image_set_accessors	     (pixman_image_t		   *image,
+						      pixman_read_memory_func_t	    read_func,
+						      pixman_write_memory_func_t    write_func);
+void		pixman_image_set_indexed	     (pixman_image_t		   *image,
+						      const pixman_indexed_t	   *indexed);
+uint32_t       *pixman_image_get_data                (pixman_image_t               *image);
+int		pixman_image_get_width               (pixman_image_t               *image);
+int             pixman_image_get_height              (pixman_image_t               *image);
+int		pixman_image_get_stride              (pixman_image_t               *image); /* in bytes */
+int		pixman_image_get_depth               (pixman_image_t		   *image);
+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_bool_t pixman_compute_composite_region (pixman_region16_t *region,
+					       pixman_image_t    *src_image,
+					       pixman_image_t    *mask_image,
+					       pixman_image_t    *dst_image,
+					       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);
+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);
+
+/* Old X servers rely on out-of-bounds accesses when they are asked
+ * to composite with a window as the source. They create a pixman image
+ * pointing to some bogus position in memory, but then they set a clip
+ * region to the position where the actual bits are.
+ *
+ * Due to a bug in old versions of pixman, where it would not clip
+ * against the image bounds when a clip region was set, this would
+ * actually work. So by default we allow certain out-of-bound access
+ * to happen unless explicitly disabled.
+ *
+ * Fixed X servers should call this function to disable the workaround.
+ */
+void          pixman_disable_out_of_bounds_workaround (void);
+
+/*
+ * 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_fixed_t pixman_sample_ceil_y        (pixman_fixed_t             y,
+					    int                        bpp);
+pixman_fixed_t pixman_sample_floor_y       (pixman_fixed_t             y,
+					    int                        bpp);
+void           pixman_edge_step            (pixman_edge_t             *e,
+					    int                        n);
+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);
+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);
+void           pixman_rasterize_edges      (pixman_image_t            *image,
+					    pixman_edge_t             *l,
+					    pixman_edge_t             *r,
+					    pixman_fixed_t             t,
+					    pixman_fixed_t             b);
+void           pixman_add_traps            (pixman_image_t            *image,
+					    int16_t                    x_off,
+					    int16_t                    y_off,
+					    int                        ntrap,
+					    pixman_trap_t             *traps);
+void           pixman_add_trapezoids       (pixman_image_t            *image,
+					    int16_t                    x_off,
+					    int                        y_off,
+					    int                        ntraps,
+					    const pixman_trapezoid_t  *traps);
+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/pixman-0.16.0/utils.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/utils.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/utils.h	(revision 22660)
@@ -0,0 +1,6 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <glib.h>
+#include "pixman.h"
+
+void show_image (pixman_image_t *image);
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/EVI.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/EVI.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/EVI.h	(revision 22660)
@@ -0,0 +1,36 @@
+/************************************************************
+Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
+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 Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS 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 _EVI_H_
+#define _EVI_H_
+
+#define XEVI_TRANSPARENCY_NONE		0
+#define XEVI_TRANSPARENCY_PIXEL		1
+#define XEVI_TRANSPARENCY_MASK		2
+
+#define EVINAME "Extended-Visual-Information"
+
+#define XEVI_MAJOR_VERSION	1	/* current version numbers */
+#define XEVI_MINOR_VERSION	0
+
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/EVIproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/EVIproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/EVIproto.h	(revision 22660)
@@ -0,0 +1,96 @@
+/************************************************************
+Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
+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 Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS 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 _EVIPROTO_H_
+#define _EVIPROTO_H_
+
+#include <X11/extensions/EVI.h>
+
+#define X_EVIQueryVersion		0
+#define X_EVIGetVisualInfo		1
+
+#define VisualID CARD32
+
+typedef CARD32 VisualID32;
+#define sz_VisualID32 4
+
+typedef struct _xExtendedVisualInfo {
+    VisualID	core_visual_id B32;
+    INT8	screen;
+    INT8	level;
+    CARD8	transparency_type;
+    CARD8	pad0;
+    CARD32	transparency_value B32;
+    CARD8	min_hw_colormaps;
+    CARD8	max_hw_colormaps;
+    CARD16	num_colormap_conflicts B16;
+} xExtendedVisualInfo;
+#define sz_xExtendedVisualInfo 16
+
+typedef struct _XEVIQueryVersion {
+    CARD8	reqType;		/* always XEVIReqCode */
+    CARD8	xeviReqType;		/* always X_EVIQueryVersion */
+    CARD16	length B16;
+} xEVIQueryVersionReq;
+#define sz_xEVIQueryVersionReq	4
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8 	unused;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	majorVersion B16;	/* major version of EVI protocol */
+    CARD16	minorVersion B16;	/* minor version of EVI protocol */
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+} xEVIQueryVersionReply;
+#define sz_xEVIQueryVersionReply	32
+
+typedef struct _XEVIGetVisualInfoReq {
+    CARD8	reqType;	/* always XEVIReqCode */
+    CARD8	xeviReqType;	/* always X_EVIGetVisualInfo */
+    CARD16      length B16;
+    CARD32 	n_visual B32;
+} xEVIGetVisualInfoReq;
+#define sz_xEVIGetVisualInfoReq	8
+
+typedef struct _XEVIGetVisualInfoReply {
+    BYTE	type;  /* X_Reply */
+    CARD8	unused;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	n_info B32;
+    CARD32	n_conflicts B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+} xEVIGetVisualInfoReply;
+#define sz_xEVIGetVisualInfoReply	32
+
+#undef VisualID
+
+#endif /* _EVIPROTO_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/ag.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/ag.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/ag.h	(revision 22660)
@@ -0,0 +1,52 @@
+/*
+Copyright 1996, 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 _AG_H_
+#define _AG_H_
+
+#define XAGNAME "XC-APPGROUP"
+
+#define XAG_MAJOR_VERSION	1	/* current version numbers */
+#define XAG_MINOR_VERSION	0
+
+#define XagWindowTypeX11	0
+#define XagWindowTypeMacintosh	1
+#define XagWindowTypeWin32	2
+#define XagWindowTypeWin16	3
+
+#define XagBadAppGroup			0
+#define XagNumberErrors			(XagBadAppGroup + 1)
+
+#define XagNsingleScreen		7
+#define XagNdefaultRoot			1
+#define XagNrootVisual			2
+#define XagNdefaultColormap		3
+#define XagNblackPixel			4
+#define XagNwhitePixel			5
+#define XagNappGroupLeader		6
+
+#endif /* _AG_H_ */
+
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/agproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/agproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/agproto.h	(revision 22660)
@@ -0,0 +1,178 @@
+/*
+Copyright 1996, 1998, 2001  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 _AGPROTO_H_ /* { */
+#define _AGPROTO_H_
+
+#include <X11/extensions/ag.h>
+
+#define X_XagQueryVersion		0
+#define X_XagCreate			1
+#define X_XagDestroy			2
+#define X_XagGetAttr			3
+#define X_XagQuery			4
+#define X_XagCreateAssoc		5
+#define X_XagDestroyAssoc		6
+
+#define XAppGroup CARD32
+
+/*
+* Redefine some basic types used by structures defined herein.  This allows
+* both the library and server to view communicated data as 32-bit entities,
+* thus preventing problems on 64-bit architectures where libXext sees this
+* data as 64 bits and the server sees it as 32 bits.
+*/
+
+#define Colormap CARD32
+#define VisualID CARD32
+#define Window CARD32
+
+typedef struct _XagQueryVersion {
+    CARD8	reqType;	/* always XagReqCode */
+    CARD8	xagReqType;	/* always X_XagQueryVersion */
+    CARD16	length B16;
+    CARD16	client_major_version B16;
+    CARD16	client_minor_version B16;
+} xXagQueryVersionReq;
+#define sz_xXagQueryVersionReq		8
+
+typedef struct {
+    BYTE	type;		/* X_Reply */
+    BOOL	pad1;
+    CARD16	sequence_number B16;
+    CARD32	length B32;
+    CARD16	server_major_version B16;
+    CARD16	server_minor_version B16;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xXagQueryVersionReply;
+#define sz_xXagQueryVersionReply	32
+
+/* Set AppGroup Attributes masks */
+#define XagSingleScreenMask		1 << 0
+#define XagDefaultRootMask		1 << XagNdefaultRoot
+#define XagRootVisualMask		1 << XagNrootVisual
+#define XagDefaultColormapMask		1 << XagNdefaultColormap
+#define XagBlackPixelMask		1 << XagNblackPixel
+#define XagWhitePixelMask		1 << XagNwhitePixel
+#define XagAppGroupLeaderMask		1 << XagNappGroupLeader
+
+typedef struct _XagCreate {
+    CARD8	reqType;	/* always XagReqCode */
+    CARD8	xagReqType;	/* always X_XagCreate */
+    CARD16	length B16;
+    XAppGroup	app_group B32;
+    CARD32	attrib_mask B32; /* LISTofVALUE follows */
+} xXagCreateReq;
+#define sz_xXagCreateReq		12
+
+typedef struct _XagDestroy {
+    CARD8	reqType;	/* always XagReqCode */
+    CARD8	xagReqType;	/* always X_XagDestroy */
+    CARD16	length B16;
+    XAppGroup	app_group  B32;
+} xXagDestroyReq;
+#define sz_xXagDestroyReq		8
+
+typedef struct _XagGetAttr {
+    CARD8	reqType;	/* always XagReqCode */
+    CARD8	xagReqType;	/* always X_XagGetAttr */
+    CARD16	length B16;
+    XAppGroup	app_group B32;
+} xXagGetAttrReq;
+#define sz_xXagGetAttrReq		8
+
+typedef struct {
+    BYTE	type;		/* X_Reply */
+    BOOL	pad1;
+    CARD16	sequence_number B16;
+    CARD32	length B32;
+    Window	default_root B32;
+    VisualID	root_visual B32;
+    Colormap	default_colormap B32;
+    CARD32	black_pixel B32;
+    CARD32	white_pixel B32;
+    BOOL	single_screen;
+    BOOL	app_group_leader;
+    CARD16	pad2 B16;
+} xXagGetAttrReply;
+#define sz_xXagGetAttrReply		32
+
+typedef struct _XagQuery {
+    CARD8	reqType;	/* always XagReqCode */
+    CARD8	xagReqType;	/* always X_XagQuery */
+    CARD16	length B16;
+    CARD32	resource B32;
+} xXagQueryReq;
+#define sz_xXagQueryReq			8
+
+typedef struct {
+    BYTE	type;		/* X_Reply */
+    BOOL	pad1;
+    CARD16	sequence_number B16;
+    CARD32	length B32;
+    XAppGroup	app_group B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xXagQueryReply;
+#define sz_xXagQueryReply		32
+
+typedef struct _XagCreateAssoc {
+    CARD8	reqType;	/* always XagReqCode */
+    CARD8	xagReqType;	/* always X_XagCreateAssoc */
+    CARD16	length B16;
+    Window	window B32;
+    CARD16	window_type B16;
+    CARD16	system_window_len B16; /* LISTofCARD8 follows */
+} xXagCreateAssocReq;
+#define sz_xXagCreateAssocReq		12
+
+typedef struct _XagDestroyAssoc {
+    CARD8	reqType;	/* always XagReqCode */
+    CARD8	xagReqType;	/* always X_XagDestroyAssoc */
+    CARD16	length B16;
+    Window	window B32;
+} xXagDestroyAssocReq;
+#define sz_xXagDestroyAssocReq		8
+
+#undef XAppGroup
+/*
+ * Cancel the previous redefinition of the basic types, thus restoring their
+ * X.h definitions.
+ */
+
+#undef Window
+#undef Colormap
+#undef VisualID
+
+#endif /* } _AGPROTO_H_ */
+
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/cup.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/cup.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/cup.h	(revision 22660)
@@ -0,0 +1,38 @@
+/*
+
+Copyright 1987, 1988, 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 _CUP_H_
+#define _CUP_H_
+
+#define XCUPNAME "TOG-CUP"
+
+#define XCUP_MAJOR_VERSION	1	/* current version numbers */
+#define XCUP_MINOR_VERSION	0
+
+#define XcupNumberErrors			0
+
+#endif /* _CUP_H_ */
+
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/cupproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/cupproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/cupproto.h	(revision 22660)
@@ -0,0 +1,105 @@
+/*
+
+Copyright 1987, 1988, 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 _XCUPPROTO_H_ /* { */
+#define _XCUPPROTO_H_
+
+#include <X11/extensions/cup.h>
+
+#define X_XcupQueryVersion			0
+#define X_XcupGetReservedColormapEntries	1
+#define X_XcupStoreColors			2
+
+typedef struct _XcupQueryVersion {
+    CARD8	reqType;	/* always XcupReqCode */
+    CARD8	xcupReqType;	/* always X_XcupQueryVersion */
+    CARD16	length B16;
+    CARD16	client_major_version B16;
+    CARD16	client_minor_version B16;
+} xXcupQueryVersionReq;
+#define sz_xXcupQueryVersionReq		8
+
+typedef struct {
+    BYTE	type;		/* X_Reply */
+    BOOL	pad1;
+    CARD16	sequence_number B16;
+    CARD32	length B32;
+    CARD16	server_major_version B16;
+    CARD16	server_minor_version B16;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xXcupQueryVersionReply;
+#define sz_xXcupQueryVersionReply	32
+
+typedef struct _XcupGetReservedColormapEntries {
+    CARD8	reqType;	/* always XcupReqCode */
+    CARD8	xcupReqType;	/* always X_XcupGetReservedColormapEntries */
+    CARD16	length B16;
+    CARD32	screen B32;
+} xXcupGetReservedColormapEntriesReq;
+#define sz_xXcupGetReservedColormapEntriesReq 8
+
+typedef struct {
+    BYTE	type;		/* X_Reply */
+    BOOL	pad1;
+    CARD16	sequence_number B16;
+    CARD32	length B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+    CARD32	pad7 B32;
+} xXcupGetReservedColormapEntriesReply;
+#define sz_xXcupGetReservedColormapEntriesReply		32
+
+typedef struct _XcupStoreColors {
+    CARD8	reqType;	/* always XcupReqCode */
+    CARD8	xcupReqType;	/* always X_XcupStoreColors */
+    CARD16	length B16;
+    CARD32	cmap B32;
+} xXcupStoreColorsReq;
+#define sz_xXcupStoreColorsReq		8
+
+typedef struct {
+    BYTE	type;		/* X_Reply */
+    BOOL	pad1;
+    CARD16	sequence_number B16;
+    CARD32	length B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+    CARD32	pad7 B32;
+} xXcupStoreColorsReply;
+#define sz_xXcupStoreColorsReply	32
+
+#endif /* } _XCUPPROTO_H_ */
+
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/dbe.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/dbe.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/dbe.h	(revision 22660)
@@ -0,0 +1,57 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994, 1995  Hewlett-Packard Company
+ *
+ * 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard
+ * Company 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 Hewlett-Packard Company.
+ *
+ *     Header file for Xlib-related DBE
+ *
+ *****************************************************************************/
+
+#ifndef DBE_H
+#define DBE_H
+
+/* Values for swap_action field of XdbeSwapInfo structure */
+#define XdbeUndefined    0
+#define XdbeBackground   1
+#define XdbeUntouched    2
+#define XdbeCopied       3
+
+/* Errors */
+#define XdbeBadBuffer    0
+
+#define DBE_PROTOCOL_NAME "DOUBLE-BUFFER"
+
+/* Current version numbers */
+#define DBE_MAJOR_VERSION       1
+#define DBE_MINOR_VERSION       0
+
+/* Used when adding extension; also used in Xdbe macros */
+#define DbeNumberEvents			0
+#define DbeBadBuffer			0
+#define DbeNumberErrors			(DbeBadBuffer + 1)
+
+#endif /* DBE_H */
+
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/dbeproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/dbeproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/dbeproto.h	(revision 22660)
@@ -0,0 +1,224 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994, 1995  Hewlett-Packard Company
+ *
+ * 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard
+ * Company 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 Hewlett-Packard Company.
+ *
+ *     Header file for Xlib-related DBE
+ *
+ *****************************************************************************/
+
+#ifndef DBE_PROTO_H
+#define DBE_PROTO_H
+
+#include <X11/extensions/dbe.h>
+
+/* Request values used in (S)ProcDbeDispatch() */
+#define X_DbeGetVersion                 0
+#define X_DbeAllocateBackBufferName     1
+#define X_DbeDeallocateBackBufferName   2
+#define X_DbeSwapBuffers                3
+#define X_DbeBeginIdiom                 4
+#define X_DbeEndIdiom                   5
+#define X_DbeGetVisualInfo              6
+#define X_DbeGetBackBufferAttributes    7
+
+typedef CARD8  xDbeSwapAction;
+typedef CARD32 xDbeBackBuffer;
+
+/* TYPEDEFS */
+
+/* Protocol data types */
+
+typedef struct
+{
+    CARD32		window B32;	/* window      */
+    xDbeSwapAction	swapAction;	/* swap action */
+    CARD8		pad1;		/* unused      */
+    CARD16		pad2 B16;
+
+} xDbeSwapInfo;
+
+typedef struct
+{
+    CARD32	visualID B32;	/* associated visual      */
+    CARD8	depth;		/* depth of visual        */
+    CARD8	perfLevel;	/* performance level hint */
+    CARD16	pad1 B16;
+
+} xDbeVisInfo;
+#define sz_xDbeVisInfo	8
+
+typedef struct
+{
+    CARD32	n B32;	/* number of visual info items in list  */
+
+} xDbeScreenVisInfo;	/* followed by n xDbeVisInfo items */
+
+typedef struct
+{
+    CARD32	window B32;	/* window */
+
+} xDbeBufferAttributes;
+
+
+/* Requests and replies */
+
+typedef struct
+{
+    CARD8	reqType;	/* major-opcode: always codes->major_opcode */
+    CARD8	dbeReqType;	/* minor-opcode: always X_DbeGetVersion (0) */
+    CARD16	length B16;	/* request length: (2)                      */
+    CARD8	majorVersion;	/* client-major-version                     */
+    CARD8	minorVersion;	/* client-minor-version                     */
+    CARD16	unused B16;	/* unused                                   */
+
+} xDbeGetVersionReq;
+#define sz_xDbeGetVersionReq	8
+
+typedef struct
+{
+    BYTE	type;			/* Reply: X_Reply (1)   */
+    CARD8	unused;			/* unused               */
+    CARD16	sequenceNumber B16;	/* sequence number      */
+    CARD32	length B32;		/* reply length: (0)    */
+    CARD8	majorVersion;		/* server-major-version */
+    CARD8	minorVersion;		/* server-minor-version */
+    CARD16	pad1 B16;		/* unused               */
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+
+} xDbeGetVersionReply;
+#define sz_xDbeGetVersionReply	32
+
+typedef struct
+{
+    CARD8		reqType;	/* major-opcode: codes->major_opcode */
+    CARD8		dbeReqType;	/* X_DbeAllocateBackBufferName (1)   */
+    CARD16		length B16;	/* request length: (4)               */
+    CARD32		window B32;	/* window                            */
+    xDbeBackBuffer	buffer B32;	/* back buffer name                  */
+    xDbeSwapAction	swapAction;	/* swap action hint                  */
+    CARD8		pad1;		/* unused                            */
+    CARD16		pad2 B16;
+
+} xDbeAllocateBackBufferNameReq;
+#define sz_xDbeAllocateBackBufferNameReq	16
+
+typedef struct
+{
+    CARD8		reqType;	/* major-opcode: codes->major_opcode */
+    CARD8		dbeReqType;	/* X_DbeDeallocateBackBufferName (2) */
+    CARD16		length B16;	/* request length: (2)               */
+    xDbeBackBuffer	buffer B32;	/* back buffer name                  */
+
+} xDbeDeallocateBackBufferNameReq;
+#define sz_xDbeDeallocateBackBufferNameReq	8
+
+typedef struct
+{
+    CARD8	reqType;	/* major-opcode: always codes->major_opcode  */
+    CARD8	dbeReqType;	/* minor-opcode: always X_DbeSwapBuffers (3) */
+    CARD16	length B16;	/* request length: (2+2n)                    */
+    CARD32	n B32;		/* n, number of window/swap action pairs     */
+
+} xDbeSwapBuffersReq;		/* followed by n window/swap action pairs    */
+#define sz_xDbeSwapBuffersReq	8
+
+typedef struct
+{
+    CARD8	reqType;	/* major-opcode: always codes->major_opcode */
+    CARD8	dbeReqType;	/* minor-opcode: always X_DbeBeginIdom (4)  */
+    CARD16	length B16;	/* request length: (1)                      */
+
+} xDbeBeginIdiomReq;
+#define sz_xDbeBeginIdiomReq	4
+
+typedef struct
+{
+    CARD8	reqType;	/* major-opcode: always codes->major_opcode */
+    CARD8	dbeReqType;	/* minor-opcode: always X_DbeEndIdom (5)    */
+    CARD16	length B16;	/* request length: (1)                      */
+
+} xDbeEndIdiomReq;
+#define sz_xDbeEndIdiomReq	4
+
+typedef struct
+{
+    CARD8	reqType;	/* always codes->major_opcode     */
+    CARD8	dbeReqType;	/* always X_DbeGetVisualInfo (6)  */
+    CARD16	length B16;	/* request length: (2+n)          */
+    CARD32	n B32;		/* n, number of drawables in list */
+
+} xDbeGetVisualInfoReq;		/* followed by n drawables        */
+#define sz_xDbeGetVisualInfoReq	8
+
+typedef struct
+{
+    BYTE	type;			/* Reply: X_Reply (1)                */
+    CARD8	unused;			/* unused                            */
+    CARD16	sequenceNumber B16;	/* sequence number                   */
+    CARD32	length B32;		/* reply length                      */
+    CARD32	m;			/* m, number of visual infos in list */
+    CARD32	pad1 B32;		/* unused                            */
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+
+} xDbeGetVisualInfoReply;		/* followed by m visual infos        */
+#define sz_xDbeGetVisualInfoReply	32
+
+typedef struct
+{
+    CARD8		reqType;	/* always codes->major_opcode       */
+    CARD8		dbeReqType;	/* X_DbeGetBackBufferAttributes (7) */
+    CARD16		length B16;	/* request length: (2)              */
+    xDbeBackBuffer	buffer B32;	/* back buffer name                 */
+
+} xDbeGetBackBufferAttributesReq;
+#define sz_xDbeGetBackBufferAttributesReq	8
+
+typedef struct
+{
+    BYTE	type;			/* Reply: X_Reply (1) */
+    CARD8	unused;			/* unused             */
+    CARD16	sequenceNumber B16;	/* sequence number    */
+    CARD32	length B32;		/* reply length: (0)  */
+    CARD32	attributes;		/* attributes         */
+    CARD32	pad1 B32;		/* unused             */
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+
+} xDbeGetBackBufferAttributesReply;
+#define sz_xDbeGetBackBufferAttributesReply	32
+
+#endif /* DBE_PROTO_H */
+
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/dpmsconst.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/dpmsconst.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/dpmsconst.h	(revision 22660)
@@ -0,0 +1,43 @@
+/*****************************************************************
+
+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.
+
+******************************************************************/
+
+#ifndef _DPMSCONST_H
+#define _DPMSCONST_H 1
+
+#define DPMSMajorVersion	1
+#define DPMSMinorVersion	1
+
+#define DPMSExtensionName	"DPMS"
+
+#define DPMSModeOn	0
+#define DPMSModeStandby	1
+#define DPMSModeSuspend	2
+#define DPMSModeOff	3
+
+#endif /* !_DPMSCONST_H */
+
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/dpmsproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/dpmsproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/dpmsproto.h	(revision 22660)
@@ -0,0 +1,175 @@
+/*****************************************************************
+
+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.
+
+******************************************************************/
+
+#ifndef _DPMSPROTO_H_
+#define _DPMSPROTO_H_
+
+#include <X11/extensions/dpmsconst.h>
+
+#define X_DPMSGetVersion	0
+#define X_DPMSCapable		1
+#define X_DPMSGetTimeouts	2
+#define X_DPMSSetTimeouts	3
+#define X_DPMSEnable		4
+#define X_DPMSDisable		5
+#define X_DPMSForceLevel       	6
+#define X_DPMSInfo       	7
+
+#define DPMSNumberEvents	0
+
+#define DPMSNumberErrors	0
+
+
+typedef struct {
+    CARD8	reqType;	/* always DPMSCode */
+    CARD8	dpmsReqType;	/* always X_DPMSGetVersion */
+    CARD16	length B16;
+    CARD16	majorVersion B16;
+    CARD16	minorVersion B16;
+} xDPMSGetVersionReq;
+#define sz_xDPMSGetVersionReq 8
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	pad0;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	majorVersion B16;
+    CARD16	minorVersion B16;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+} xDPMSGetVersionReply;
+#define sz_xDPMSGetVersionReply 32
+
+typedef struct {
+    CARD8	reqType;	/* always DPMSCode */
+    CARD8	dpmsReqType;	/* always X_DPMSCapable */
+    CARD16	length B16;
+} xDPMSCapableReq;
+#define sz_xDPMSCapableReq 4
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	pad0;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    BOOL	capable;
+    CARD8	pad1;
+    CARD16	pad2 B16;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+    CARD32	pad7 B32;
+} xDPMSCapableReply;
+#define sz_xDPMSCapableReply 32
+
+typedef struct {
+    CARD8	reqType;	/* always DPMSCode */
+    CARD8	dpmsReqType;	/* always X_DPMSGetTimeouts */
+    CARD16	length B16;
+} xDPMSGetTimeoutsReq;
+#define sz_xDPMSGetTimeoutsReq 4
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	pad0;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	standby B16;
+    CARD16	suspend B16;
+    CARD16	off B16;
+    CARD16	pad1 B16;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+} xDPMSGetTimeoutsReply;
+#define sz_xDPMSGetTimeoutsReply 32
+
+typedef struct {
+    CARD8	reqType;	/* always DPMSCode */
+    CARD8	dpmsReqType;	/* always X_DPMSSetTimeouts */
+    CARD16	length B16;
+    CARD16	standby B16;
+    CARD16	suspend B16;
+    CARD16	off B16;
+    CARD16	pad0 B16;
+} xDPMSSetTimeoutsReq;
+#define sz_xDPMSSetTimeoutsReq 12
+
+typedef struct {
+    CARD8	reqType;	/* always DPMSCode */
+    CARD8	dpmsReqType;	/* always X_DPMSEnable */
+    CARD16	length B16;
+} xDPMSEnableReq;
+#define sz_xDPMSEnableReq 4
+
+typedef struct {
+    CARD8	reqType;	/* always DPMSCode */
+    CARD8	dpmsReqType;	/* always X_DPMSDisable */
+    CARD16	length B16;
+} xDPMSDisableReq;
+#define sz_xDPMSDisableReq 4
+
+typedef struct {
+    CARD8	reqType;	/* always DPMSCode */
+    CARD8	dpmsReqType;	/* always X_DPMSForceLevel */
+    CARD16	length B16;
+    CARD16	level B16;	/* power level requested */
+    CARD16	pad0 B16;
+} xDPMSForceLevelReq;
+#define sz_xDPMSForceLevelReq 8
+
+typedef struct {
+    CARD8	reqType;	/* always DPMSCode */
+    CARD8	dpmsReqType;	/* always X_DPMSInfo */
+    CARD16	length B16;
+} xDPMSInfoReq;
+#define sz_xDPMSInfoReq 4
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	pad0;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	power_level B16;
+    BOOL	state;
+    CARD8	pad1;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xDPMSInfoReply;
+#define sz_xDPMSInfoReply 32
+
+#endif /* _DPMSPROTO_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/ge.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/ge.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/ge.h	(revision 22660)
@@ -0,0 +1,62 @@
+/*
+ * Copyright © 2007-2008 Peter Hutterer
+ *
+ * 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: Peter Hutterer, University of South Australia, NICTA
+ *
+ */
+
+#ifndef _GE_H_
+#define _GE_H_
+
+#define GE_NAME         "Generic Event Extension"
+#define GE_MAJOR        1
+#define GE_MINOR        0
+
+/*********************************************************
+ *
+ * Requests
+ *
+ */
+
+#define X_GEQueryVersion        0
+
+#define GENumberRequests       (X_GEQueryVersion + 1)
+
+/*********************************************************
+ *
+ * Events
+ *
+ */
+
+#define X_GenericEvent        0
+
+#define GENumberEvents        (X_GenericEvent + 1)
+
+/*********************************************************
+ *
+ * Errors
+ *
+ */
+
+#define GENumberErrors        0
+
+#endif /* _GE_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/geproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/geproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/geproto.h	(revision 22660)
@@ -0,0 +1,85 @@
+/*
+ * Copyright © 2007-2008 Peter Hutterer
+ *
+ * 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: Peter Hutterer, University of South Australia, NICTA
+ *
+ */
+
+#ifndef _GEPROTO_H_
+#define _GEPROTO_H_
+
+#include<X11/Xproto.h>
+#include<X11/X.h>
+#include<X11/extensions/ge.h>
+
+
+/*********************************************************
+ *
+ * Protocol request constants
+ *
+ */
+
+#define X_GEGetExtensionVersion 1
+
+/*********************************************************
+ *
+ * XGE protocol requests/replies
+ *
+ */
+
+/* generic request */
+typedef struct {
+    CARD8   reqType;
+    CARD8   ReqType;
+    CARD16  length B16;
+} xGEReq;
+
+
+/* QueryVersion */
+typedef struct {
+    CARD8	reqType;       /* input extension major code   */
+    CARD8	ReqType;       /* always X_GEQueryVersion */
+    CARD16	length B16;
+    CARD16      majorVersion B16;
+    CARD16      minorVersion B16;
+} xGEQueryVersionReq;
+
+#define sz_xGEQueryVersionReq    8
+
+typedef struct {
+    CARD8	repType;	/* X_Reply			*/
+    CARD8	RepType;	/* always X_GEQueryVersion */
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	majorVersion B16;
+    CARD16	minorVersion B16;
+    CARD32	pad00 B32;
+    CARD32	pad01 B32;
+    CARD32	pad02 B32;
+    CARD32	pad03 B32;
+    CARD32	pad04 B32;
+} xGEQueryVersionReply;
+
+#define sz_xGEQueryVersionReply    32
+
+#endif /* _GEPROTO_H_ */
+
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/lbx.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/lbx.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/lbx.h	(revision 22660)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 1992 Network Computing Devices
+ *
+ * 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 NCD. not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  NCD. makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
+ * 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 _LBX_H_
+#define _LBX_H_
+
+#define LBXNAME "LBX"
+
+#define LBX_MAJOR_VERSION	1
+#define LBX_MINOR_VERSION	0
+
+#define LbxNumberReqs			44
+#define LbxEvent			0
+#define LbxQuickMotionDeltaEvent	1
+#define LbxNumberEvents			2
+
+/* This is always the master client */
+#define LbxMasterClientIndex		0
+
+/* LbxEvent lbxType sub-fields */
+#define LbxSwitchEvent			0
+#define LbxCloseEvent			1
+#define LbxDeltaEvent			2
+#define LbxInvalidateTagEvent		3
+#define LbxSendTagDataEvent		4
+#define LbxListenToOne			5
+#define LbxListenToAll			6
+#define LbxMotionDeltaEvent		7
+#define LbxReleaseCmapEvent		8
+#define LbxFreeCellsEvent		9
+
+/*
+ * Lbx image compression methods
+ *
+ * No compression is always assigned the value of 0.
+ *
+ * The rest of the compression method opcodes are assigned dynamically
+ * at option negotiation time.
+ */
+
+#define LbxImageCompressNone		0
+
+
+#define BadLbxClient			0
+#define LbxNumberErrors			(BadLbxClient + 1)
+
+/* tagged data types */
+#define	LbxTagTypeModmap		1
+#define	LbxTagTypeKeymap		2
+#define	LbxTagTypeProperty		3
+#define	LbxTagTypeFont			4
+#define	LbxTagTypeConnInfo		5
+
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/lbxproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/lbxproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/lbxproto.h	(revision 22660)
@@ -0,0 +1,975 @@
+/*
+ * Copyright 1992 Network Computing Devices
+ *
+ * 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 NCD. not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  NCD. makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
+ * 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 _LBXPROTO_H_
+#define _LBXPROTO_H_
+
+#include <X11/extensions/lbx.h>
+/*
+ * NOTE:  any changes or additions to the opcodes needs to be reflected
+ * in the lbxCacheable array in Xserver/lbx/lbxmain.c
+ */
+
+#define X_LbxQueryVersion		0
+#define X_LbxStartProxy			1
+#define X_LbxStopProxy			2
+#define X_LbxSwitch			3
+#define X_LbxNewClient			4
+#define X_LbxCloseClient		5
+#define X_LbxModifySequence		6
+#define X_LbxAllowMotion		7
+#define X_LbxIncrementPixel		8
+#define X_LbxDelta			9
+#define	X_LbxGetModifierMapping		10
+#define	X_LbxInvalidateTag		12
+#define X_LbxPolyPoint			13
+#define X_LbxPolyLine			14
+#define X_LbxPolySegment		15
+#define X_LbxPolyRectangle		16
+#define X_LbxPolyArc			17
+#define X_LbxFillPoly			18
+#define X_LbxPolyFillRectangle		19
+#define X_LbxPolyFillArc		20
+#define	X_LbxGetKeyboardMapping		21
+#define	X_LbxQueryFont			22
+#define	X_LbxChangeProperty		23
+#define	X_LbxGetProperty		24
+#define	X_LbxTagData			25
+
+#define X_LbxCopyArea			26
+#define X_LbxCopyPlane			27
+#define X_LbxPolyText8			28
+#define X_LbxPolyText16			29
+#define X_LbxImageText8			30
+#define X_LbxImageText16		31
+
+#define X_LbxQueryExtension		32
+#define X_LbxPutImage			33
+#define X_LbxGetImage			34
+
+#define X_LbxBeginLargeRequest		35
+#define X_LbxLargeRequestData		36
+#define X_LbxEndLargeRequest		37
+
+#define X_LbxInternAtoms		38
+#define X_LbxGetWinAttrAndGeom		39
+
+#define X_LbxGrabCmap			40
+#define X_LbxReleaseCmap		41
+#define X_LbxAllocColor			42
+
+#define X_LbxSync			43
+
+/*
+ * Redefine some basic types used by structures defined herein.  This removes
+ * any possibility on 64-bit architectures of one entity viewing communicated
+ * data as 32-bit quantities and another entity viewing the same data as 64-bit
+ * quantities.
+ */
+#define XID CARD32
+#define Atom CARD32
+#define Colormap CARD32
+#define Drawable CARD32
+#define VisualID CARD32
+#define Window CARD32
+
+typedef struct {
+    BOOL	success;		/* TRUE */
+    BOOL	changeType;
+    CARD16	majorVersion B16,
+		minorVersion B16;
+    CARD16	length B16;		/* 1/4 additional bytes in setup info */
+    CARD32	tag B32;
+} xLbxConnSetupPrefix;
+
+typedef struct _LbxQueryVersion {
+    CARD8	reqType;		/* always LbxReqCode */
+    CARD8	lbxReqType;		/* always X_LbxQueryVersion */
+    CARD16	length B16;
+} xLbxQueryVersionReq;
+#define sz_xLbxQueryVersionReq	4
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	unused;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	majorVersion B16;	/* major version of LBX protocol */
+    CARD16	minorVersion B16;	/* minor version of LBX protocol */
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+} xLbxQueryVersionReply;
+#define sz_xLbxQueryVersionReply	32
+
+typedef struct _LbxStartProxy {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxStartProxy */
+    CARD16	length B16;
+} xLbxStartProxyReq;
+#define sz_xLbxStartProxyReq	    4
+
+typedef struct _LbxStopProxy {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxStopProxy */
+    CARD16	length B16;
+} xLbxStopProxyReq;
+#define sz_xLbxStopProxyReq	    4
+
+typedef struct _LbxSwitch {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxSwitch */
+    CARD16	length B16;
+    CARD32	client B32;	/* new client */
+} xLbxSwitchReq;
+#define sz_xLbxSwitchReq	8
+
+typedef struct _LbxNewClient {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxNewClient */
+    CARD16	length B16;
+    CARD32	client B32;	/* new client */
+} xLbxNewClientReq;
+#define sz_xLbxNewClientReq	8
+
+typedef struct _LbxCloseClient {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxCloseClient */
+    CARD16	length B16;
+    CARD32	client B32;	/* new client */
+} xLbxCloseClientReq;
+#define sz_xLbxCloseClientReq	8
+
+typedef struct _LbxModifySequence {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxModifySequence */
+    CARD16	length B16;
+    CARD32	adjust B32;
+} xLbxModifySequenceReq;
+#define sz_xLbxModifySequenceReq    8
+
+typedef struct _LbxAllowMotion {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxAllowMotion */
+    CARD16	length B16;
+    CARD32	num B32;
+} xLbxAllowMotionReq;
+#define sz_xLbxAllowMotionReq    8
+
+typedef struct {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxGrabCmap */
+    CARD16	length B16;
+    Colormap	cmap B32;
+} xLbxGrabCmapReq;
+#define sz_xLbxGrabCmapReq	8
+
+#define LBX_SMART_GRAB		0x80
+#define LBX_AUTO_RELEASE	0x40
+#define LBX_3CHANNELS		0x20
+#define LBX_2BYTE_PIXELS	0x10
+#define LBX_RGB_BITS_MASK	0x0f
+
+#define LBX_LIST_END		0
+#define LBX_PIXEL_PRIVATE	1
+#define LBX_PIXEL_SHARED	2
+#define LBX_PIXEL_RANGE_PRIVATE	3
+#define LBX_PIXEL_RANGE_SHARED	4
+#define LBX_NEXT_CHANNEL	5
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	flags;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	pad0 B16;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B16;
+} xLbxGrabCmapReply;
+#define sz_xLbxGrabCmapReply	32
+#define sz_xLbxGrabCmapReplyHdr	8
+
+
+typedef struct {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxReleaseCmap */
+    CARD16	length B16;
+    Colormap	cmap B32;
+} xLbxReleaseCmapReq;
+#define sz_xLbxReleaseCmapReq	8
+
+typedef struct {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxAllocColor */
+    CARD16	length B16;
+    Colormap	cmap B32;
+    CARD32	pixel B32;
+    CARD16	red B16, green B16, blue B16;
+    CARD16	pad B16;
+} xLbxAllocColorReq;
+#define sz_xLbxAllocColorReq	20
+
+typedef struct _LbxIncrementPixel {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxIncrementPixel */
+    CARD16	length B16;
+    CARD32	cmap B32;
+    CARD32	pixel B32;
+} xLbxIncrementPixelReq;
+#define sz_xLbxIncrementPixelReq    12
+
+typedef struct _LbxDelta {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxDelta */
+    CARD16	length B16;
+    CARD8	diffs;		/* number of diffs */
+    CARD8	cindex;		/* cache index */
+				/* list of diffs follows */
+} xLbxDeltaReq;
+#define sz_xLbxDeltaReq    6
+
+typedef struct _LbxGetModifierMapping {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxGetModifierMapping */
+    CARD16	length B16;
+} xLbxGetModifierMappingReq;
+#define	sz_xLbxGetModifierMappingReq	4
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	keyspermod;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	tag B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+} xLbxGetModifierMappingReply;
+#define sz_xLbxGetModifierMappingReply	32
+
+typedef struct _LbxGetKeyboardMapping {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxGetKeyboardMapping */
+    CARD16	length B16;
+    KeyCode	firstKeyCode;
+    CARD8	count;
+    CARD16	pad1 B16;
+} xLbxGetKeyboardMappingReq;
+#define	sz_xLbxGetKeyboardMappingReq	8
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	keysperkeycode;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	tag B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+} xLbxGetKeyboardMappingReply;
+#define sz_xLbxGetKeyboardMappingReply	32
+
+typedef struct _LbxQueryFont {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxQueryFont */
+    CARD16	length B16;
+    CARD32	fid B32;
+} xLbxQueryFontReq;
+#define	sz_xLbxQueryFontReq	8
+
+typedef struct _LbxInternAtoms {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxInternAtoms */
+    CARD16	length B16;
+    CARD16	num B16;
+} xLbxInternAtomsReq;
+#define sz_xLbxInternAtomsReq	6
+
+typedef struct {
+    BYTE	type;		/* X_Reply */
+    CARD8	unused;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	atomsStart B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+} xLbxInternAtomsReply;
+#define sz_xLbxInternAtomsReply		32
+#define sz_xLbxInternAtomsReplyHdr	8
+
+
+typedef struct _LbxGetWinAttrAndGeom {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxGetWinAttrAndGeom */
+    CARD16	length B16;
+    CARD32	id B32;		/* window id */
+} xLbxGetWinAttrAndGeomReq;
+#define sz_xLbxGetWinAttrAndGeomReq 8
+
+typedef struct {
+    BYTE type;  /* X_Reply */
+    CARD8 backingStore;
+    CARD16 sequenceNumber B16;
+    CARD32 length B32;	/* NOT 0; this is an extra-large reply */
+    VisualID visualID B32;
+#if defined(__cplusplus) || defined(c_plusplus)
+    CARD16 c_class B16;
+#else
+    CARD16 class B16;
+#endif
+    CARD8 bitGravity;
+    CARD8 winGravity;
+    CARD32 backingBitPlanes B32;
+    CARD32 backingPixel B32;
+    BOOL saveUnder;
+    BOOL mapInstalled;
+    CARD8 mapState;
+    BOOL override;
+    Colormap colormap B32;
+    CARD32 allEventMasks B32;
+    CARD32 yourEventMask B32;
+    CARD16 doNotPropagateMask B16;
+    CARD16 pad1 B16;
+    Window root B32;
+    INT16 x B16, y B16;
+    CARD16 width B16, height B16;
+    CARD16 borderWidth B16;
+    CARD8 depth;
+    CARD8 pad2;
+} xLbxGetWinAttrAndGeomReply;
+#define sz_xLbxGetWinAttrAndGeomReply 60
+
+
+typedef struct {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxSync */
+    CARD16	length B16;
+} xLbxSyncReq;
+#define sz_xLbxSyncReq	4
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	pad0;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xLbxSyncReply;
+#define sz_xLbxSyncReply 32
+
+
+/* an LBX squished charinfo packs the data in a CARD32 as follows */
+#define	LBX_WIDTH_SHIFT		26
+#define	LBX_LEFT_SHIFT		20
+#define	LBX_RIGHT_SHIFT		13
+#define	LBX_ASCENT_SHIFT	7
+#define	LBX_DESCENT_SHIFT	0
+
+#define	LBX_WIDTH_BITS		6
+#define	LBX_LEFT_BITS		6
+#define	LBX_RIGHT_BITS		7
+#define	LBX_ASCENT_BITS		6
+#define	LBX_DESCENT_BITS	7
+
+#define	LBX_WIDTH_MASK		0xfc000000
+#define	LBX_LEFT_MASK		0x03f00000
+#define	LBX_RIGHT_MASK		0x000fe000
+#define	LBX_ASCENT_MASK		0x00001f80
+#define	LBX_DESCENT_MASK	0x0000007f
+
+#define	LBX_MASK_BITS(val, n)	((unsigned int) ((val) & ((1 << (n)) - 1)))
+
+typedef struct {
+    CARD32	metrics B32;
+} xLbxCharInfo;
+
+/* note that this is identical to xQueryFontReply except for missing
+ * first 2 words
+ */
+typedef struct {
+    xCharInfo minBounds;
+/* XXX do we need to leave this gunk? */
+#ifndef WORD64
+    CARD32 walign1 B32;
+#endif
+    xCharInfo maxBounds;
+#ifndef WORD64
+    CARD32 walign2 B32;
+#endif
+    CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
+    CARD16 defaultChar B16;
+    CARD16 nFontProps B16;  /* followed by this many xFontProp structures */
+    CARD8 drawDirection;
+    CARD8 minByte1, maxByte1;
+    BOOL allCharsExist;
+    INT16 fontAscent B16, fontDescent B16;
+    CARD32 nCharInfos B32; /* followed by this many xLbxCharInfo structures */
+} xLbxFontInfo;
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	compression;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	tag B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    /* X_QueryFont sticks much of the data in the base reply packet,
+     * but we hope that it won't be needed, (and it won't fit in 32 bytes
+     * with the tag anyways)
+     *
+     * if any additional data is needed, its sent in a xLbxFontInfo
+     */
+} xLbxQueryFontReply;
+#define sz_xLbxQueryFontReply	32
+
+typedef struct _LbxChangeProperty {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxChangeProperty */
+    CARD16	length B16;
+    Window	window B32;
+    Atom	property B32;
+    Atom	type B32;
+    CARD8	format;
+    CARD8	mode;
+    BYTE	pad[2];
+    CARD32	nUnits B32;
+} xLbxChangePropertyReq;
+#define	sz_xLbxChangePropertyReq	24
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	pad;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	tag B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+} xLbxChangePropertyReply;
+#define sz_xLbxChangePropertyReply	32
+
+typedef struct _LbxGetProperty {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxGetProperty */
+    CARD16	length B16;
+    Window	window B32;
+    Atom	property B32;
+    Atom	type B32;
+    CARD8	delete;
+    BYTE	pad[3];
+    CARD32	longOffset B32;
+    CARD32	longLength B32;
+} xLbxGetPropertyReq;
+#define	sz_xLbxGetPropertyReq	28
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	format;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    Atom	propertyType B32;
+    CARD32	bytesAfter B32;
+    CARD32	nItems B32;
+    CARD32	tag B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+} xLbxGetPropertyReply;
+#define sz_xLbxGetPropertyReply	32
+
+typedef struct _LbxTagData {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxTagData */
+    CARD16	length B16;
+    XID		tag B32;
+    CARD32	real_length B32;
+    /* data */
+} xLbxTagDataReq;
+#define	sz_xLbxTagDataReq	12
+
+typedef struct _LbxInvalidateTag {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxInvalidateTag */
+    CARD16	length B16;
+    CARD32	tag B32;
+} xLbxInvalidateTagReq;
+#define	sz_xLbxInvalidateTagReq	8
+
+typedef struct _LbxPutImage {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxPutImage */
+    CARD16	length B16;
+    CARD8	compressionMethod;
+    CARD8	cacheEnts;
+    CARD8	bitPacked;
+    /* rest is variable */
+} xLbxPutImageReq;
+#define sz_xLbxPutImageReq	7
+
+typedef struct {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxGetImage */
+    CARD16	length B16;
+    Drawable	drawable B32;
+    INT16	x B16, y B16;
+    CARD16	width B16, height B16;
+    CARD32	planeMask B32;
+    CARD8	format;
+    CARD8	pad1;
+    CARD16	pad2 B16;
+} xLbxGetImageReq;
+
+#define sz_xLbxGetImageReq 24
+
+typedef struct {
+    BYTE type;			/* X_Reply */
+    CARD8 depth;
+    CARD16 sequenceNumber B16;
+    CARD32 lbxLength B32;
+    CARD32 xLength B32;
+    VisualID visual B32;
+    CARD8 compressionMethod;
+    CARD8 pad1;
+    CARD16 pad2 B16;
+    CARD32 pad3 B32;
+    CARD32 pad4 B32;
+    CARD32 pad5 B32;
+} xLbxGetImageReply;
+
+#define sz_xLbxGetImageReply 32
+
+/* Following used for LbxPolyPoint, LbxPolyLine, LbxPolySegment,
+   LbxPolyRectangle, LbxPolyArc, LbxPolyFillRectangle and LbxPolyFillArc */
+
+#define GFX_CACHE_SIZE  15
+
+#define GFXdCacheEnt(e)	    ((e) & 0xf)
+#define GFXgCacheEnt(e)	    (((e) >> 4) & 0xf)
+#define GFXCacheEnts(d,g)   (((d) & 0xf) | (((g) & 0xf) << 4))
+
+#define GFXCacheNone   0xf
+
+typedef struct _LbxPolyPoint {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;
+    CARD16	length B16;
+    CARD8	cacheEnts;
+    CARD8	padBytes;
+} xLbxPolyPointReq;
+
+#define sz_xLbxPolyPointReq	6
+
+typedef xLbxPolyPointReq xLbxPolyLineReq;
+typedef xLbxPolyPointReq xLbxPolySegmentReq;
+typedef xLbxPolyPointReq xLbxPolyRectangleReq;
+typedef xLbxPolyPointReq xLbxPolyArcReq;
+typedef xLbxPolyPointReq xLbxPolyFillRectangleReq;
+typedef xLbxPolyPointReq xLbxPolyFillArcReq;
+
+#define sz_xLbxPolyLineReq		sz_xLbxPolyPointReq
+#define sz_xLbxPolySegmentReq		sz_xLbxPolyPointReq
+#define sz_xLbxPolyRectangleReq		sz_xLbxPolyPointReq
+#define sz_xLbxPolyArcReq		sz_xLbxPolyPointReq
+#define sz_xLbxPolyFillRectangleReq	sz_xLbxPolyPointReq
+#define sz_xLbxPolyFillArc		sz_xLbxPolyPointReq
+
+typedef struct _LbxFillPoly {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;
+    CARD16	length B16;
+    CARD8	cacheEnts;
+    BYTE	shape;
+    CARD8	padBytes;
+} xLbxFillPolyReq;
+#define sz_xLbxFillPolyReq	7
+
+typedef struct _LbxCopyArea {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;
+    CARD16	length B16;
+    CARD8	srcCache;	/* source drawable */
+    CARD8	cacheEnts;	/* dest drawable and gc */
+    /* followed by encoded src x, src y, dst x, dst y, width, height */
+} xLbxCopyAreaReq;
+
+#define sz_xLbxCopyAreaReq  6
+
+typedef struct _LbxCopyPlane {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;
+    CARD16	length B16;
+    CARD32	bitPlane B32;
+    CARD8	srcCache;	/* source drawable */
+    CARD8	cacheEnts;	/* dest drawable and gc */
+    /* followed by encoded src x, src y, dst x, dst y, width, height */
+} xLbxCopyPlaneReq;
+
+#define sz_xLbxCopyPlaneReq  10
+
+typedef struct _LbxPolyText {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;
+    CARD16	length B16;
+    CARD8	cacheEnts;
+    /* followed by encoded src x, src y coordinates and text elts */
+} xLbxPolyTextReq;
+
+#define sz_xLbxPolyTextReq  5
+
+typedef xLbxPolyTextReq xLbxPolyText8Req;
+typedef xLbxPolyTextReq xLbxPolyText16Req;
+
+#define sz_xLbxPolyTextReq	5
+#define sz_xLbxPolyText8Req	5
+#define sz_xLbxPolyText16Req	5
+
+typedef struct _LbxImageText {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;
+    CARD16	length B16;
+    CARD8	cacheEnts;
+    CARD8	nChars;
+    /* followed by encoded src x, src y coordinates and string */
+} xLbxImageTextReq;
+
+typedef xLbxImageTextReq xLbxImageText8Req;
+typedef xLbxImageTextReq xLbxImageText16Req;
+
+#define sz_xLbxImageTextReq	6
+#define sz_xLbxImageText8Req	6
+#define sz_xLbxImageText16Req	6
+
+typedef struct {
+    CARD8       offset;
+    CARD8       diff;
+} xLbxDiffItem;
+#define sz_xLbxDiffItem    2
+
+typedef struct {
+    BYTE	type;		/* X_Reply */
+    CARD8	nOpts;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	optDataStart B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+} xLbxStartReply;
+#define sz_xLbxStartReply	32
+#define sz_xLbxStartReplyHdr	8
+
+typedef struct _LbxQueryExtension {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxQueryExtension */
+    CARD16	length B16;
+    CARD32	nbytes B32;
+} xLbxQueryExtensionReq;
+#define	sz_xLbxQueryExtensionReq	8
+
+typedef struct _LbxQueryExtensionReply {
+    BYTE	type;			/* X_Reply */
+    CARD8	numReqs;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    BOOL	present;
+    CARD8	major_opcode;
+    CARD8	first_event;
+    CARD8	first_error;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+
+    /* reply & event generating requests */
+} xLbxQueryExtensionReply;
+#define sz_xLbxQueryExtensionReply	32
+
+
+typedef struct _LbxBeginLargeRequest {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxBeginLargeRequest */
+    CARD16	length B16;
+    CARD32	largeReqLength B32;
+} xLbxBeginLargeRequestReq;
+#define	sz_BeginLargeRequestReq 8
+
+typedef struct _LbxLargeRequestData {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxLargeRequestData */
+    CARD16	length B16;
+    /* followed by LISTofCARD8 data */
+} xLbxLargeRequestDataReq;
+#define	sz_LargeRequestDataReq 4
+
+typedef struct _LbxEndLargeRequest {
+    CARD8	reqType;	/* always LbxReqCode */
+    CARD8	lbxReqType;	/* always X_LbxEndLargeRequest */
+    CARD16	length B16;
+} xLbxEndLargeRequestReq;
+#define	sz_EndLargeRequestReq 4
+
+
+
+typedef struct _LbxSwitchEvent {
+    BYTE	type;		/* always eventBase + LbxEvent */
+    BYTE	lbxType;	/* LbxSwitchEvent */
+    CARD16	pad B16;
+    CARD32	client B32;
+} xLbxSwitchEvent;
+#define sz_xLbxSwitchEvent	8
+
+typedef struct _LbxCloseEvent {
+    BYTE	type;		/* always eventBase + LbxEvent */
+    BYTE	lbxType;	/* LbxCloseEvent */
+    CARD16	sequenceNumber B16;
+    CARD32	client B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xLbxCloseEvent;
+#define sz_xLbxCloseEvent	32
+
+typedef struct _LbxInvalidateTagEvent {
+    BYTE	type;		/* always eventBase + LbxEvent */
+    BYTE	lbxType;	/* LbxInvalidateTagEvent */
+    CARD16	sequenceNumber B16;
+    CARD32	tag B32;
+    CARD32	tagType B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+} xLbxInvalidateTagEvent;
+#define sz_xLbxInvalidateTagEvent 32
+
+typedef struct _LbxSendTagDataEvent {
+    BYTE	type;		/* always eventBase + LbxEvent */
+    BYTE	lbxType;	/* LbxSendTagDataEvent */
+    CARD16	sequenceNumber B16;
+    CARD32	tag B32;
+    CARD32	tagType B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+} xLbxSendTagDataEvent;
+#define sz_xLbxSendTagDataEvent 32
+
+typedef struct _LbxListenToOneEvent {
+    BYTE	type;		/* always eventBase + LbxEvent */
+    BYTE	lbxType;	/* LbxListenToOneEvent */
+    CARD16	sequenceNumber B16;
+    CARD32	client B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xLbxListenToOneEvent;
+#define sz_xLbxListenToOneEvent 32
+
+typedef struct _LbxListenToAllEvent {
+    BYTE	type;		/* always eventBase + LbxEvent */
+    BYTE	lbxType;	/* LbxListenToAllEvent */
+    CARD16	sequenceNumber B16;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+    CARD32	pad7 B32;
+} xLbxListenToAllEvent;
+#define sz_xLbxListenToOneEvent 32
+
+typedef struct _LbxReleaseCmapEvent {
+    BYTE	type;		/* always eventBase + LbxEvent */
+    BYTE	lbxType;	/* LbxReleaseCmapEvent */
+    CARD16	sequenceNumber B16;
+    Colormap	colormap B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xLbxReleaseCmapEvent;
+#define sz_xLbxReleaseCmapEvent	32
+
+
+typedef struct _LbxFreeCellsEvent {
+    BYTE	type;		/* always eventBase + LbxEvent */
+    BYTE	lbxType;	/* LbxFreeCellsEvent */
+    CARD16	sequenceNumber B16;
+    Colormap	colormap B32;
+    CARD32	pixelStart B32;
+    CARD32	pixelEnd B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+} xLbxFreeCellsEvent;
+#define sz_xLbxFreeCellsEvent	32
+
+
+/*
+ * squished X event sizes.  If these change, be sure to update lbxquish.c
+ * and unsquish.c appropriately
+ *
+ * lbxsz_* is the padded squished length
+ * lbxupsz_* is the unpadded squished length
+ */
+
+#define	  lbxsz_KeyButtonEvent		32
+#define	lbxupsz_KeyButtonEvent		31
+
+#define	  lbxsz_EnterLeaveEvent		32
+#define	lbxupsz_EnterLeaveEvent		32
+
+#define	  lbxsz_FocusEvent		12
+#define	lbxupsz_FocusEvent		9
+
+#define	  lbxsz_KeymapEvent		32
+#define	lbxupsz_KeymapEvent		32
+
+#define	  lbxsz_ExposeEvent		20
+#define	lbxupsz_ExposeEvent		18
+
+#define	  lbxsz_GfxExposeEvent		24
+#define	lbxupsz_GfxExposeEvent		21
+
+#define	  lbxsz_NoExposeEvent		12
+#define	lbxupsz_NoExposeEvent		11
+
+#define	  lbxsz_VisibilityEvent		12
+#define	lbxupsz_VisibilityEvent		9
+
+#define	  lbxsz_CreateNotifyEvent	24
+#define	lbxupsz_CreateNotifyEvent	23
+
+#define	  lbxsz_DestroyNotifyEvent	12
+#define	lbxupsz_DestroyNotifyEvent	12
+
+#define	  lbxsz_UnmapNotifyEvent	16
+#define	lbxupsz_UnmapNotifyEvent	13
+
+#define	  lbxsz_MapNotifyEvent		16
+#define	lbxupsz_MapNotifyEvent		13
+
+#define	  lbxsz_MapRequestEvent		12
+#define	lbxupsz_MapRequestEvent		12
+
+#define	  lbxsz_ReparentEvent		24
+#define	lbxupsz_ReparentEvent		21
+
+#define	  lbxsz_ConfigureNotifyEvent	28
+#define	lbxupsz_ConfigureNotifyEvent	27
+
+#define	  lbxsz_ConfigureRequestEvent	28
+#define	lbxupsz_ConfigureRequestEvent	28
+
+#define	  lbxsz_GravityEvent		16
+#define	lbxupsz_GravityEvent		16
+
+#define	  lbxsz_ResizeRequestEvent	12
+#define	lbxupsz_ResizeRequestEvent	12
+
+#define	  lbxsz_CirculateEvent		20
+#define	lbxupsz_CirculateEvent		17
+
+#define	  lbxsz_PropertyEvent		20
+#define	lbxupsz_PropertyEvent		17
+
+#define	  lbxsz_SelectionClearEvent	16
+#define	lbxupsz_SelectionClearEvent	16
+
+#define	  lbxsz_SelectionRequestEvent	28
+#define	lbxupsz_SelectionRequestEvent	28
+
+#define	  lbxsz_SelectionNotifyEvent	24
+#define	lbxupsz_SelectionNotifyEvent	24
+
+#define	  lbxsz_ColormapEvent		16
+#define	lbxupsz_ColormapEvent		14
+
+#define	  lbxsz_MappingNotifyEvent	8
+#define	lbxupsz_MappingNotifyEvent	7
+
+#define	  lbxsz_ClientMessageEvent	32
+#define	lbxupsz_ClientMessageEvent	32
+
+#define	lbxsz_UnknownEvent		32
+
+#ifdef DEBUG
+
+#define DBG_SWITCH	0x00000001
+#define DBG_CLOSE	0x00000002
+#define DBG_IO		0x00000004
+#define DBG_READ_REQ	0x00000008
+#define DBG_LEN		0x00000010
+#define DBG_BLOCK	0x00000020
+#define DBG_CLIENT	0x00000040
+#define DBG_DELTA	0x00000080
+#endif
+/*
+ * Cancel the previous redefinition of the basic types, thus restoring their
+ * X.h definitions.
+ */
+
+#undef XID
+#undef Atom
+#undef Colormap
+#undef Drawable
+#undef VisualID
+#undef Window
+
+#endif	/* _LBXPROTO_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/mitmiscconst.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/mitmiscconst.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/mitmiscconst.h	(revision 22660)
@@ -0,0 +1,38 @@
+/************************************************************
+
+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.
+
+********************************************************/
+
+/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */
+
+
+#ifndef _MITMISCCONST_H_
+#define _MITMISCCONST_H_
+
+#define MITMiscNumberEvents		0
+#define MITMiscNumberErrors		0
+
+#define MITMISCNAME "MIT-SUNDRY-NONSTANDARD"
+
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/mitmiscproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/mitmiscproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/mitmiscproto.h	(revision 22660)
@@ -0,0 +1,68 @@
+/************************************************************
+
+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.
+
+********************************************************/
+
+/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */
+
+#ifndef _MITMISCPROTO_H_
+#define _MITMISCPROTO_H_
+
+#include <X11/extensions/mitmiscconst.h>
+
+#define X_MITSetBugMode			0
+#define X_MITGetBugMode			1
+
+typedef struct _SetBugMode {
+    CARD8	reqType;	/* always MITReqCode */
+    CARD8	mitReqType;	/* always X_MITSetBugMode */
+    CARD16	length B16;
+    BOOL	onOff;
+    BYTE	pad0;
+    CARD16	pad1;
+} xMITSetBugModeReq;
+#define sz_xMITSetBugModeReq	8
+
+typedef struct _GetBugMode {
+    CARD8	reqType;	/* always MITReqCode */
+    CARD8	mitReqType;	/* always X_MITGetBugMode */
+    CARD16	length B16;
+} xMITGetBugModeReq;
+#define sz_xMITGetBugModeReq	4
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    BOOL	onOff;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+} xMITGetBugModeReply;
+#define sz_xMITGetBugModeReply	32
+
+#endif /* _MITMISCPROTO_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/multibufconst.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/multibufconst.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/multibufconst.h	(revision 22660)
@@ -0,0 +1,83 @@
+/*
+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 _MULTIBUFCONST_H_
+#define _MULTIBUFCONST_H_
+
+#define MULTIBUFFER_PROTOCOL_NAME "Multi-Buffering"
+
+#define MULTIBUFFER_MAJOR_VERSION	1	/* current version numbers */
+#define MULTIBUFFER_MINOR_VERSION	1	/* has ClearImageBufferArea */
+
+/*
+ * update_action field
+ */
+#define MultibufferUpdateActionUndefined	0
+#define MultibufferUpdateActionBackground	1
+#define MultibufferUpdateActionUntouched	2
+#define MultibufferUpdateActionCopied		3
+
+/*
+ * update_hint field
+ */
+#define MultibufferUpdateHintFrequent		0
+#define MultibufferUpdateHintIntermittent	1
+#define MultibufferUpdateHintStatic		2
+
+/*
+ * valuemask fields
+ */
+#define MultibufferWindowUpdateHint	(1L << 0)
+#define MultibufferBufferEventMask	(1L << 0)
+
+/*
+ * mono vs. stereo and left vs. right
+ */
+#define MultibufferModeMono		0
+#define MultibufferModeStereo		1
+#define MultibufferSideMono		0
+#define MultibufferSideLeft	  	1
+#define MultibufferSideRight		2
+
+/*
+ * clobber state
+ */
+#define MultibufferUnclobbered		0
+#define MultibufferPartiallyClobbered	1
+#define MultibufferFullyClobbered	2
+
+/*
+ * event stuff
+ */
+#define MultibufferClobberNotifyMask	0x02000000
+#define MultibufferUpdateNotifyMask	0x04000000
+
+#define MultibufferClobberNotify	0
+#define MultibufferUpdateNotify		1
+#define MultibufferNumberEvents		(MultibufferUpdateNotify + 1)
+
+#define MultibufferBadBuffer		0
+#define MultibufferNumberErrors		(MultibufferBadBuffer + 1)
+
+#endif /* _MULTIBUFCONST_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/multibufproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/multibufproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/multibufproto.h	(revision 22660)
@@ -0,0 +1,295 @@
+/*
+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 _MULTIBUFPROTO_H_
+#define _MULTIBUFPROTO_H_
+
+#include <X11/extensions/multibufconst.h>
+
+/*
+ * Protocol requests constants and alignment values
+ */
+
+#define Window CARD32
+#define Drawable CARD32
+#define VisualID CARD32
+#define Multibuffer CARD32
+
+#define X_MbufGetBufferVersion		0
+#define X_MbufCreateImageBuffers	1
+#define X_MbufDestroyImageBuffers	2
+#define X_MbufDisplayImageBuffers	3
+#define X_MbufSetMBufferAttributes	4
+#define X_MbufGetMBufferAttributes	5
+#define X_MbufSetBufferAttributes	6
+#define X_MbufGetBufferAttributes	7
+#define X_MbufGetBufferInfo		8
+#define X_MbufCreateStereoWindow	9
+#define X_MbufClearImageBufferArea	10
+
+
+typedef struct xMbufBufferInfo {
+	CARD32	visualID B32;		/* associated visual */
+	CARD16	maxBuffers B16;		/* maximum supported buffers */
+	CARD8	depth;			/* depth of visual (redundant) */
+	CARD8	unused;
+} xMbufBufferInfo;
+#define sz_xMbufBufferInfo 8
+
+typedef struct {
+    BYTE    type;
+    BYTE    unused;
+    CARD16  sequenceNumber B16;
+    CARD32  buffer B32;			/* affected buffer */
+    BYTE    state;			/* current status */
+    CARD8   unused1;
+    CARD16  unused2 B16;
+    CARD32  unused3 B32;
+    CARD32  unused4 B32;
+    CARD32  unused5 B32;
+    CARD32  unused6 B32;
+    CARD32  unused7 B32;
+} xMbufClobberNotifyEvent;
+
+typedef struct {
+    BYTE    type;
+    BYTE    unused;
+    CARD16  sequenceNumber B16;
+    CARD32  buffer B32;			/* affected buffer */
+    CARD32  timeStamp B32;		/* update time */
+    CARD32  unused1 B32;
+    CARD32  unused2 B32;
+    CARD32  unused3 B32;
+    CARD32  unused4 B32;
+    CARD32  unused5 B32;
+    CARD32  unused6 B32;
+} xMbufUpdateNotifyEvent;
+
+typedef struct {
+    CARD8	reqType;		/* always codes->major_opcode */
+    CARD8	mbufReqType;		/* always X_MbufGetBufferVersion */
+    CARD16	length B16;
+} xMbufGetBufferVersionReq;
+#define sz_xMbufGetBufferVersionReq	4
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	unused;			/* not used */
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD8	majorVersion;	/* major version of Multi-Buffering protocol */
+    CARD8	minorVersion;	/* minor version of Multi-Buffering protocol */
+    CARD16	pad1 B16;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xMbufGetBufferVersionReply;
+#define sz_xMbufGetBufferVersionReply	32
+
+typedef struct {
+    CARD8	reqType;	/* always codes->major_opcode */
+    CARD8	mbufReqType;	/* always X_MbufCreateImageBuffers */
+    CARD16	length B16;
+    CARD32	window B32;	/* associated window */
+    CARD8	updateAction;	/* action at update */
+    CARD8	updateHint;	/* hint as to frequency of updates */
+    CARD16	unused;
+} xMbufCreateImageBuffersReq;	/* followed by buffer ids */
+#define sz_xMbufCreateImageBuffersReq	12
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	unused;			/* not used */
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	numberBuffer B16;	/* number successfully allocated */
+    CARD16	unused1 B16;
+    CARD32	unused2 B32;
+    CARD32	unused3 B32;
+    CARD32	unused4 B32;
+    CARD32	unused5 B32;
+    CARD32	unused6 B32;
+} xMbufCreateImageBuffersReply;
+#define sz_xMbufCreateImageBuffersReply 32
+
+typedef struct {
+    CARD8	reqType;	/* always codes->major_opcode */
+    CARD8	mbufReqType;	/* always X_MbufDestroyImageBuffers */
+    CARD16	length B16;
+    CARD32	window B32;	/* associated window */
+} xMbufDestroyImageBuffersReq;
+#define sz_xMbufDestroyImageBuffersReq	8
+
+typedef struct {
+    CARD8	reqType;	/* always codes->major_opcode */
+    CARD8	mbufReqType;	/* always X_MbufDisplayImageBuffers */
+    CARD16	length B16;
+    CARD16	minDelay B16;	/* minimum time between last update and now */
+    CARD16	maxDelay B16;	/* maximum time between last update and now */
+} xMbufDisplayImageBuffersReq;	/* followed by list of buffers */
+#define sz_xMbufDisplayImageBuffersReq	8
+
+typedef struct {
+    CARD8	reqType;	/* always codes->major_opcode */
+    CARD8	mbufReqType;	/* always X_MbufSetMBufferAttributes */
+    CARD16	length B16;
+    CARD32	window B32;	/* associated window */
+    CARD32	valueMask B32;	/* modified entries */
+} xMbufSetMBufferAttributesReq;	/* followed by values */
+#define sz_xMbufSetMBufferAttributesReq 12
+
+typedef struct {
+    CARD8	reqType;	/* always codes->major_opcode */
+    CARD8	mbufReqType;	/* always X_MbufGetMBufferAttributes */
+    CARD16	length B16;
+    CARD32	window B32;	/* associated window */
+} xMbufGetMBufferAttributesReq;
+#define sz_xMbufGetMBufferAttributesReq 8
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	unused;			/* not used */
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	displayedBuffer B16;	/* currently visible buffer */
+    CARD8	updateAction;
+    CARD8	updateHint;
+    CARD8	windowMode;
+    CARD8	unused0;
+    CARD16	unused1 B16;
+    CARD32	unused2 B32;
+    CARD32	unused3 B32;
+    CARD32	unused4 B32;
+    CARD32	unused5 B32;
+} xMbufGetMBufferAttributesReply;
+#define sz_xMbufGetMBufferAttributesReply 32
+
+typedef struct {
+    CARD8	reqType;	/* always codes->major_opcode */
+    CARD8	mbufReqType;	/* always X_MbufSetBufferAttributes */
+    CARD16	length B16;
+    CARD32	buffer B32;
+    CARD32	valueMask B32;
+} xMbufSetBufferAttributesReq;	/* followed by values */
+#define sz_xMbufSetBufferAttributesReq 12
+
+typedef struct {
+    CARD8	reqType;	/* always codes->major_opcode */
+    CARD8	mbufReqType;	/* always X_MbufGetBufferAttributes */
+    CARD16	length B16;
+    CARD32	buffer B32;
+} xMbufGetBufferAttributesReq;
+#define sz_xMbufGetBufferAttributesReq 8
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	unused;			/* not used */
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	window B32;
+    CARD32	eventMask B32;
+    CARD16	bufferIndex B16;
+    CARD8	side;
+    CARD8	unused0;
+    CARD32	unused1 B32;
+    CARD32	unused2 B32;
+    CARD32	unused3 B32;
+} xMbufGetBufferAttributesReply;
+#define sz_xMbufGetBufferAttributesReply 32
+
+typedef struct {
+    CARD8	reqType;	/* always codes->major_opcode */
+    CARD8	mbufReqType;	/* always X_MbufGetBufferInfo */
+    CARD16	length B16;
+    Drawable	drawable B32;
+} xMbufGetBufferInfoReq;
+#define sz_xMbufGetBufferInfoReq 8
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	unused;			/* not used */
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	normalInfo B16;
+    CARD16	stereoInfo B16;
+    CARD32	unused1 B32;
+    CARD32	unused2 B32;
+    CARD32	unused3 B32;
+    CARD32	unused4 B32;
+    CARD32	unused5 B32;
+} xMbufGetBufferInfoReply;			/* followed by buffer infos */
+#define sz_xMbufGetBufferInfoReply 32
+
+
+typedef struct {
+    CARD8	reqType;	/* always codes->major_opcode */
+    CARD8	mbufReqType;	/* always X_MbufCreateStereoWindow */
+    CARD16	length B16;
+    CARD8	unused0;
+    CARD8	unused1;
+    CARD8	unused2;
+    CARD8	depth;
+    Window	wid B32;
+    Window	parent B32;
+    Multibuffer	left B32;	/* associated buffers */
+    Multibuffer	right B32;
+    INT16	x B16;
+    INT16	y B16;
+    CARD16	width B16;
+    CARD16	height B16;
+    CARD16	borderWidth B16;
+#if defined(__cplusplus) || defined(c_plusplus)
+    CARD16	c_class B16;
+#else
+    CARD16	class B16;
+#endif
+    VisualID	visual B32;
+    CARD32	mask B32;
+} xMbufCreateStereoWindowReq;		/* followed by value list */
+#define sz_xMbufCreateStereoWindowReq 44
+
+typedef struct {
+    CARD8     reqType;        /* always codes->major_opcode */
+    CARD8     mbufReqType;    /* always X_MbufClearImageBufferArea */
+    CARD16    length B16;
+    Multibuffer       buffer B32;
+    INT16     x B16;
+    INT16     y B16;
+    CARD16    width B16;
+    CARD16    height B16;
+    CARD8     unused0;
+    CARD8     unused1;
+    CARD8     unused2;
+    BOOL      exposures;
+} xMbufClearImageBufferAreaReq;
+#define sz_xMbufClearImageBufferAreaReq 20
+
+#undef Window
+#undef Drawable
+#undef VisualID
+#undef Multibuffer
+
+#endif /* _MULTIBUFPROTO_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/secur.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/secur.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/secur.h	(revision 22660)
@@ -0,0 +1,61 @@
+/*
+Copyright 1996, 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 _SECUR_H
+#define _SECUR_H
+
+#define SECURITY_EXTENSION_NAME		"SECURITY"
+#define SECURITY_MAJOR_VERSION		1
+#define SECURITY_MINOR_VERSION		0
+
+#define XSecurityNumberEvents		1
+#define XSecurityNumberErrors		2
+#define XSecurityBadAuthorization	0
+#define XSecurityBadAuthorizationProtocol 1
+
+/* trust levels */
+#define XSecurityClientTrusted		0
+#define XSecurityClientUntrusted	1
+
+/* authorization attribute masks */
+#define XSecurityTimeout		(1<<0)
+#define XSecurityTrustLevel		(1<<1)
+#define XSecurityGroup  		(1<<2)
+#define XSecurityEventMask		(1<<3)
+#define XSecurityAllAuthorizationAttributes \
+ (XSecurityTimeout | XSecurityTrustLevel | XSecurityGroup | XSecurityEventMask)
+
+/* event masks */
+#define XSecurityAuthorizationRevokedMask (1<<0)
+#define XSecurityAllEventMasks XSecurityAuthorizationRevokedMask
+
+/* event offsets */
+#define XSecurityAuthorizationRevoked 0
+
+#define XSecurityAuthorizationName	"XC-QUERY-SECURITY-1"
+#define XSecurityAuthorizationNameLen	19
+
+#endif /* _SECUR_H */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/securproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/securproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/securproto.h	(revision 22660)
@@ -0,0 +1,110 @@
+/*
+Copyright 1996, 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 _SECURPROTO_H
+#define _SECURPROTO_H
+
+#include <X11/extensions/secur.h>
+
+#define X_SecurityQueryVersion		0
+#define X_SecurityGenerateAuthorization 1
+#define X_SecurityRevokeAuthorization   2
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       securityReqType;
+    CARD16      length B16;
+    CARD16      majorVersion B16;
+    CARD16      minorVersion B16;
+} xSecurityQueryVersionReq;
+#define sz_xSecurityQueryVersionReq 	8
+
+typedef struct {
+    CARD8   type;
+    CARD8   pad0;
+    CARD16  sequenceNumber B16;
+    CARD32  length	 B32;
+    CARD16  majorVersion B16;
+    CARD16  minorVersion B16;
+    CARD32  pad1	 B32;
+    CARD32  pad2	 B32;
+    CARD32  pad3	 B32;
+    CARD32  pad4	 B32;
+    CARD32  pad5	 B32;
+ } xSecurityQueryVersionReply;
+#define sz_xSecurityQueryVersionReply  	32
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       securityReqType;
+    CARD16      length B16;
+    CARD16	nbytesAuthProto B16;
+    CARD16	nbytesAuthData B16;
+    CARD32	valueMask B32;
+    /* auth protocol name padded to 4 bytes */
+    /* auth protocol data padded to 4 bytes */
+    /* list of CARD32 values, if any */
+} xSecurityGenerateAuthorizationReq;
+#define sz_xSecurityGenerateAuthorizationReq 12
+
+typedef struct {
+    CARD8   type;
+    CARD8   pad0;
+    CARD16  sequenceNumber B16;
+    CARD32  length	 B32;
+    CARD32  authId	 B32;
+    CARD16  dataLength   B16;
+    CARD16  pad1	 B16;
+    CARD32  pad2	 B32;
+    CARD32  pad3	 B32;
+    CARD32  pad4	 B32;
+    CARD32  pad5	 B32;
+ } xSecurityGenerateAuthorizationReply;
+#define sz_xSecurityGenerateAuthorizationReply  	32
+
+typedef struct {
+    CARD8       reqType;
+    CARD8       securityReqType;
+    CARD16      length B16;
+    CARD32	authId B32;
+} xSecurityRevokeAuthorizationReq;
+#define sz_xSecurityRevokeAuthorizationReq 8
+
+typedef struct _xSecurityAuthorizationRevokedEvent {
+    BYTE	type;
+    BYTE	detail;
+    CARD16	sequenceNumber B16;
+    CARD32	authId B32;
+    CARD32	pad0	 B32;
+    CARD32	pad1	 B32;
+    CARD32	pad2	 B32;
+    CARD32	pad3	 B32;
+    CARD32	pad4	 B32;
+    CARD32	pad5	 B32;
+} xSecurityAuthorizationRevokedEvent;
+#define sz_xSecurityAuthorizationRevokedEvent 32
+
+#endif /* _SECURPROTO_H */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/shapeconst.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/shapeconst.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/shapeconst.h	(revision 22660)
@@ -0,0 +1,55 @@
+/************************************************************
+
+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 _SHAPECONST_H_
+#define _SHAPECONST_H_
+
+/*
+ * Protocol requests constants and alignment values
+ * These would really be in SHAPE's X.h and Xproto.h equivalents
+ */
+
+#define SHAPENAME "SHAPE"
+
+#define SHAPE_MAJOR_VERSION	1	/* current version numbers */
+#define SHAPE_MINOR_VERSION	1
+
+#define ShapeSet			0
+#define ShapeUnion			1
+#define ShapeIntersect			2
+#define ShapeSubtract			3
+#define ShapeInvert			4
+
+#define ShapeBounding			0
+#define ShapeClip			1
+#define ShapeInput			2
+
+#define ShapeNotifyMask			(1L << 0)
+#define ShapeNotify			0
+
+#define ShapeNumberEvents		(ShapeNotify + 1)
+
+#endif /* _SHAPECONST_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/shapeproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/shapeproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/shapeproto.h	(revision 22660)
@@ -0,0 +1,237 @@
+/************************************************************
+
+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 _SHAPEPROTO_H_
+#define _SHAPEPROTO_H_
+
+#include <X11/extensions/shapeconst.h>
+
+/*
+ * Protocol requests constants and alignment values
+ * These would really be in SHAPE's X.h and Xproto.h equivalents
+ */
+
+#define Window CARD32
+#define Time CARD32
+
+#define X_ShapeQueryVersion		0
+#define X_ShapeRectangles		1
+#define X_ShapeMask			2
+#define X_ShapeCombine			3
+#define X_ShapeOffset			4
+#define X_ShapeQueryExtents		5
+#define X_ShapeSelectInput		6
+#define X_ShapeInputSelected		7
+#define X_ShapeGetRectangles		8
+
+typedef struct _ShapeQueryVersion {
+	CARD8	reqType;		/* always ShapeReqCode */
+	CARD8	shapeReqType;		/* always X_ShapeQueryVersion */
+	CARD16	length B16;
+} xShapeQueryVersionReq;
+#define sz_xShapeQueryVersionReq	4
+
+typedef struct {
+	BYTE	type;			/* X_Reply */
+	CARD8	unused;			/* not used */
+	CARD16	sequenceNumber B16;
+	CARD32	length B32;
+	CARD16	majorVersion B16;	/* major version of SHAPE protocol */
+	CARD16	minorVersion B16;	/* minor version of SHAPE protocol */
+	CARD32	pad0 B32;
+	CARD32	pad1 B32;
+	CARD32	pad2 B32;
+	CARD32	pad3 B32;
+	CARD32	pad4 B32;
+} xShapeQueryVersionReply;
+#define sz_xShapeQueryVersionReply	32
+
+typedef struct _ShapeRectangles {
+	CARD8	reqType;	/* always ShapeReqCode */
+	CARD8	shapeReqType;	/* always X_ShapeRectangles */
+	CARD16	length B16;
+	CARD8	op;		/* Set, ... */
+	CARD8	destKind;	/* ShapeBounding or ShapeClip */
+	CARD8	ordering;	/* UnSorted, YSorted, YXSorted, YXBanded */
+	CARD8	pad0;		/* not used */
+	Window	dest B32;
+	INT16	xOff B16;
+	INT16	yOff B16;
+} xShapeRectanglesReq;		/* followed by xRects */
+#define sz_xShapeRectanglesReq	16
+
+typedef struct _ShapeMask {
+	CARD8	reqType;	/* always ShapeReqCode */
+	CARD8	shapeReqType;	/* always X_ShapeMask */
+	CARD16	length B16;
+
+	CARD8	op;		/* Set, ... */
+	CARD8	destKind;	/* ShapeBounding or ShapeClip */
+	CARD16	junk B16;	/* not used */
+
+	Window	dest B32;
+	INT16	xOff B16;
+	INT16	yOff B16;
+	CARD32	src B32;	/* 1 bit pixmap */
+} xShapeMaskReq;
+#define sz_xShapeMaskReq	20
+
+typedef struct _ShapeCombine {
+	CARD8	reqType;	/* always ShapeReqCode */
+	CARD8	shapeReqType;	/* always X_ShapeCombine */
+	CARD16	length B16;
+	CARD8	op;		/* Set, ... */
+	CARD8	destKind;	/* ShapeBounding or ShapeClip */
+	CARD8	srcKind;	/* ShapeBounding or ShapeClip */
+	CARD8	junk;		/* not used */
+	Window	dest B32;
+	INT16	xOff B16;
+	INT16	yOff B16;
+	Window	src B32;
+} xShapeCombineReq;
+#define sz_xShapeCombineReq	20
+
+typedef struct _ShapeOffset {
+	CARD8	reqType;	/* always ShapeReqCode */
+	CARD8	shapeReqType;	/* always X_ShapeOffset */
+	CARD16	length B16;
+	CARD8	destKind;	/* ShapeBounding or ShapeClip */
+	CARD8	junk1;		/* not used */
+	CARD16	junk2 B16;	/* not used */
+	Window	dest B32;
+	INT16	xOff B16;
+	INT16	yOff B16;
+} xShapeOffsetReq;
+#define sz_xShapeOffsetReq	16
+
+typedef struct _ShapeQueryExtents {
+	CARD8	reqType;	/* always ShapeReqCode */
+	CARD8	shapeReqType;	/* always X_ShapeQueryExtents */
+	CARD16	length B16;
+	Window	window B32;
+} xShapeQueryExtentsReq;
+#define sz_xShapeQueryExtentsReq	8
+
+typedef struct {
+	BYTE	type;			/* X_Reply */
+	CARD8	unused;			/* not used */
+	CARD16	sequenceNumber B16;
+	CARD32	length B32;		/* 0 */
+	CARD8	boundingShaped;		/* window has bounding shape */
+	CARD8	clipShaped;		/* window has clip shape */
+	CARD16	unused1 B16;
+	INT16	xBoundingShape B16;	/* extents of bounding shape */
+	INT16	yBoundingShape B16;
+	CARD16	widthBoundingShape B16;
+	CARD16	heightBoundingShape B16;
+	INT16	xClipShape B16;		/* extents of clip shape */
+	INT16	yClipShape B16;
+	CARD16	widthClipShape B16;
+	CARD16	heightClipShape B16;
+	CARD32	pad1 B32;
+} xShapeQueryExtentsReply;
+#define sz_xShapeQueryExtentsReply	32
+
+typedef struct _ShapeSelectInput {
+	CARD8	reqType;	/* always ShapeReqCode */
+	CARD8	shapeReqType;	/* always X_ShapeSelectInput */
+	CARD16	length B16;
+	Window	window B32;
+	BYTE	enable;		/* xTrue -> send events */
+	BYTE	pad1;
+	CARD16	pad2 B16;
+} xShapeSelectInputReq;
+#define sz_xShapeSelectInputReq	12
+
+typedef struct _ShapeNotify {
+	BYTE	type;		/* always eventBase + ShapeNotify */
+	BYTE	kind;		/* either ShapeBounding or ShapeClip */
+	CARD16	sequenceNumber B16;
+	Window	window B32;
+	INT16	x B16;
+	INT16	y B16;		/* extents of new shape */
+	CARD16	width B16;
+	CARD16	height B16;
+	Time	time B32;	/* time of change */
+	BYTE	shaped;		/* set when a shape actual exists */
+	BYTE	pad0;
+	CARD16	pad1 B16;
+	CARD32	pad2 B32;
+	CARD32	pad3 B32;
+} xShapeNotifyEvent;
+#define sz_xShapeNotifyEvent	32
+
+typedef struct _ShapeInputSelected {
+	CARD8	reqType;	/* always ShapeReqCode */
+	CARD8	shapeReqType;	/* always X_ShapeInputSelected */
+	CARD16	length B16;
+	Window	window B32;
+} xShapeInputSelectedReq;
+#define sz_xShapeInputSelectedReq 8
+
+typedef struct {
+	BYTE	type;			/* X_Reply */
+	CARD8	enabled;		/* current status */
+	CARD16	sequenceNumber B16;
+	CARD32	length B32;		/* 0 */
+	CARD32	pad1 B32;		/* unused */
+	CARD32	pad2 B32;
+	CARD32	pad3 B32;
+	CARD32	pad4 B32;
+	CARD32	pad5 B32;
+	CARD32	pad6 B32;
+} xShapeInputSelectedReply;
+#define sz_xShapeInputSelectedReply	32
+
+typedef struct _ShapeGetRectangles {
+    CARD8   reqType;		/* always ShapeReqCode */
+    CARD8   shapeReqType;	/* always X_ShapeGetRectangles */
+    CARD16  length B16;
+    Window  window B32;
+    CARD8   kind;		/* ShapeBounding or ShapeClip */
+    CARD8   junk1;
+    CARD16  junk2 B16;
+} xShapeGetRectanglesReq;
+#define sz_xShapeGetRectanglesReq	12
+
+typedef struct {
+	BYTE	type;			/* X_Reply */
+	CARD8	ordering;	/* UnSorted, YSorted, YXSorted, YXBanded */
+	CARD16	sequenceNumber B16;
+	CARD32	length B32;		/* not zero */
+	CARD32	nrects B32;		/* number of rectangles */
+	CARD32 pad1 B32;
+	CARD32 pad2 B32;
+	CARD32 pad3 B32;
+	CARD32 pad4 B32;
+	CARD32 pad5 B32;
+} xShapeGetRectanglesReply;		/* followed by xRectangles */
+#define sz_xShapeGetRectanglesReply 32
+
+#undef Window
+#undef Time
+
+#endif /* _SHAPEPROTO_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/shm.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/shm.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/shm.h	(revision 22660)
@@ -0,0 +1,44 @@
+/************************************************************
+
+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.
+
+********************************************************/
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
+
+#ifndef _SHM_H_
+#define _SHM_H_
+
+#define SHMNAME "MIT-SHM"
+
+#define SHM_MAJOR_VERSION	1	/* current version numbers */
+#define SHM_MINOR_VERSION	1
+
+#define ShmCompletion			0
+#define ShmNumberEvents			(ShmCompletion + 1)
+
+#define BadShmSeg			0
+#define ShmNumberErrors			(BadShmSeg + 1)
+
+
+#endif /* _SHM_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/shmproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/shmproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/shmproto.h	(revision 22660)
@@ -0,0 +1,187 @@
+/************************************************************
+
+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.
+
+********************************************************/
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
+
+#ifndef _SHMPROTO_H_
+#define _SHMPROTO_H_
+
+#include <X11/extensions/shm.h>
+
+#define ShmSeg CARD32
+#define Drawable CARD32
+#define VisualID CARD32
+#define GContext CARD32
+#define Pixmap CARD32
+
+#define X_ShmQueryVersion		0
+#define X_ShmAttach			1
+#define X_ShmDetach			2
+#define X_ShmPutImage			3
+#define X_ShmGetImage			4
+#define X_ShmCreatePixmap		5
+
+typedef struct _ShmQueryVersion {
+    CARD8	reqType;		/* always ShmReqCode */
+    CARD8	shmReqType;		/* always X_ShmQueryVersion */
+    CARD16	length B16;
+} xShmQueryVersionReq;
+#define sz_xShmQueryVersionReq	4
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    BOOL	sharedPixmaps;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	majorVersion B16;	/* major version of SHM protocol */
+    CARD16	minorVersion B16;	/* minor version of SHM protocol */
+    CARD16	uid B16;
+    CARD16	gid B16;
+    CARD8	pixmapFormat;
+    CARD8	pad0;
+    CARD16	pad1 B16;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+} xShmQueryVersionReply;
+#define sz_xShmQueryVersionReply	32
+
+typedef struct _ShmAttach {
+    CARD8	reqType;	/* always ShmReqCode */
+    CARD8	shmReqType;	/* always X_ShmAttach */
+    CARD16	length B16;
+    ShmSeg	shmseg B32;
+    CARD32	shmid B32;
+    BOOL	readOnly;
+    BYTE	pad0;
+    CARD16	pad1 B16;
+} xShmAttachReq;
+#define sz_xShmAttachReq	16
+
+typedef struct _ShmDetach {
+    CARD8	reqType;	/* always ShmReqCode */
+    CARD8	shmReqType;	/* always X_ShmDetach */
+    CARD16	length B16;
+    ShmSeg	shmseg B32;
+} xShmDetachReq;
+#define sz_xShmDetachReq	8
+
+typedef struct _ShmPutImage {
+    CARD8	reqType;	/* always ShmReqCode */
+    CARD8	shmReqType;	/* always X_ShmPutImage */
+    CARD16	length B16;
+    Drawable	drawable B32;
+    GContext	gc B32;
+    CARD16	totalWidth B16;
+    CARD16	totalHeight B16;
+    CARD16	srcX B16;
+    CARD16	srcY B16;
+    CARD16	srcWidth B16;
+    CARD16	srcHeight B16;
+    INT16	dstX B16;
+    INT16	dstY B16;
+    CARD8	depth;
+    CARD8	format;
+    CARD8	sendEvent;
+    CARD8	bpad;
+    ShmSeg	shmseg B32;
+    CARD32	offset B32;
+} xShmPutImageReq;
+#define sz_xShmPutImageReq	40
+
+typedef struct _ShmGetImage {
+    CARD8	reqType;	/* always ShmReqCode */
+    CARD8	shmReqType;	/* always X_ShmGetImage */
+    CARD16	length B16;
+    Drawable	drawable B32;
+    INT16	x B16;
+    INT16	y B16;
+    CARD16	width B16;
+    CARD16	height B16;
+    CARD32	planeMask B32;
+    CARD8	format;
+    CARD8	pad0;
+    CARD8	pad1;
+    CARD8	pad2;
+    ShmSeg	shmseg B32;
+    CARD32	offset B32;
+} xShmGetImageReq;
+#define sz_xShmGetImageReq	32
+
+typedef struct _ShmGetImageReply {
+    BYTE	type;  /* X_Reply */
+    CARD8	depth;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    VisualID	visual B32;
+    CARD32	size B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+} xShmGetImageReply;
+#define sz_xShmGetImageReply	32
+
+typedef struct _ShmCreatePixmap {
+    CARD8	reqType;	/* always ShmReqCode */
+    CARD8	shmReqType;	/* always X_ShmCreatePixmap */
+    CARD16	length B16;
+    Pixmap	pid B32;
+    Drawable	drawable B32;
+    CARD16	width B16;
+    CARD16	height B16;
+    CARD8	depth;
+    CARD8	pad0;
+    CARD8	pad1;
+    CARD8	pad2;
+    ShmSeg	shmseg B32;
+    CARD32	offset B32;
+} xShmCreatePixmapReq;
+#define sz_xShmCreatePixmapReq 28
+
+typedef struct _ShmCompletion {
+    BYTE	type;		/* always eventBase + ShmCompletion */
+    BYTE	bpad0;
+    CARD16	sequenceNumber B16;
+    Drawable	drawable B32;
+    CARD16	minorEvent B16;
+    BYTE	majorEvent;
+    BYTE	bpad1;
+    ShmSeg	shmseg B32;
+    CARD32	offset B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+} xShmCompletionEvent;
+#define sz_xShmCompletionEvent	32
+
+#undef ShmSeg
+#undef Drawable
+#undef VisualID
+#undef GContext
+#undef Pixmap
+
+#endif /* _SHMPROTO_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/syncconst.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/syncconst.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/syncconst.h	(revision 22660)
@@ -0,0 +1,179 @@
+/*
+
+Copyright 1991, 1993, 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.
+
+*/
+
+/***********************************************************
+Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
+and Olivetti Research Limited, Cambridge, England.
+
+                        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 names of Digital or Olivetti
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL THEY 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 _SYNCCONST_H_
+#define _SYNCCONST_H_
+
+#define SYNC_NAME "SYNC"
+
+#define SYNC_MAJOR_VERSION	3
+#define SYNC_MINOR_VERSION	0
+
+
+#define XSyncCounterNotify              0
+#define XSyncAlarmNotify		1
+#define XSyncAlarmNotifyMask 		(1L << XSyncAlarmNotify)
+
+#define XSyncNumberEvents		2L
+
+#define XSyncBadCounter			0L
+#define XSyncBadAlarm			1L
+#define XSyncNumberErrors		(XSyncBadAlarm + 1)
+
+/*
+ * Flags for Alarm Attributes
+ */
+#define XSyncCACounter			(1L<<0)
+#define XSyncCAValueType		(1L<<1)
+#define XSyncCAValue			(1L<<2)
+#define XSyncCATestType			(1L<<3)
+#define XSyncCADelta			(1L<<4)
+#define XSyncCAEvents			(1L<<5)
+
+/*  The _XSync macros below are for library internal use only.  They exist
+ *  so that if we have to make a fix, we can change it in this one place
+ *  and have both the macro and function variants inherit the fix.
+ */
+
+#define _XSyncIntToValue(pv, i)     ((pv)->hi=((i<0)?~0:0),(pv)->lo=(i))
+#define _XSyncIntsToValue(pv, l, h) ((pv)->lo = (l), (pv)->hi = (h))
+#define _XSyncValueGreaterThan(a, b)\
+    ((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>(b).lo))
+#define _XSyncValueLessThan(a, b)\
+    ((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<(b).lo))
+#define _XSyncValueGreaterOrEqual(a, b)\
+    ((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>=(b).lo))
+#define _XSyncValueLessOrEqual(a, b)\
+    ((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<=(b).lo))
+#define _XSyncValueEqual(a, b)	((a).lo==(b).lo && (a).hi==(b).hi)
+#define _XSyncValueIsNegative(v) (((v).hi & 0x80000000) ? 1 : 0)
+#define _XSyncValueIsZero(a)	((a).lo==0 && (a).hi==0)
+#define _XSyncValueIsPositive(v) (((v).hi & 0x80000000) ? 0 : 1)
+#define _XSyncValueLow32(v)	((v).lo)
+#define _XSyncValueHigh32(v)	((v).hi)
+#define _XSyncValueAdd(presult,a,b,poverflow) {\
+	int t = (a).lo;\
+	Bool signa = XSyncValueIsNegative(a);\
+	Bool signb = XSyncValueIsNegative(b);\
+	((presult)->lo = (a).lo + (b).lo);\
+	((presult)->hi = (a).hi + (b).hi);\
+	if (t>(presult)->lo) (presult)->hi++;\
+	*poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\
+     }
+#define _XSyncValueSubtract(presult,a,b,poverflow) {\
+	int t = (a).lo;\
+	Bool signa = XSyncValueIsNegative(a);\
+	Bool signb = XSyncValueIsNegative(b);\
+	((presult)->lo = (a).lo - (b).lo);\
+	((presult)->hi = (a).hi - (b).hi);\
+	if (t<(presult)->lo) (presult)->hi--;\
+	*poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\
+     }
+#define _XSyncMaxValue(pv) ((pv)->hi = 0x7fffffff, (pv)->lo = 0xffffffff)
+#define _XSyncMinValue(pv) ((pv)->hi = 0x80000000, (pv)->lo = 0)
+
+/*
+ *  These are the publically usable macros.  If you want the function version
+ *  of one of these, just #undef the macro to uncover the function.
+ *  (This is the same convention that the ANSI C library uses.)
+ */
+
+#define XSyncIntToValue(pv, i) _XSyncIntToValue(pv, i)
+#define XSyncIntsToValue(pv, l, h) _XSyncIntsToValue(pv, l, h)
+#define XSyncValueGreaterThan(a, b) _XSyncValueGreaterThan(a, b)
+#define XSyncValueLessThan(a, b) _XSyncValueLessThan(a, b)
+#define XSyncValueGreaterOrEqual(a, b) _XSyncValueGreaterOrEqual(a, b)
+#define XSyncValueLessOrEqual(a, b) _XSyncValueLessOrEqual(a, b)
+#define XSyncValueEqual(a, b) _XSyncValueEqual(a, b)
+#define XSyncValueIsNegative(v) _XSyncValueIsNegative(v)
+#define XSyncValueIsZero(a) _XSyncValueIsZero(a)
+#define XSyncValueIsPositive(v) _XSyncValueIsPositive(v)
+#define XSyncValueLow32(v) _XSyncValueLow32(v)
+#define XSyncValueHigh32(v) _XSyncValueHigh32(v)
+#define XSyncValueAdd(presult,a,b,poverflow) _XSyncValueAdd(presult,a,b,poverflow)
+#define XSyncValueSubtract(presult,a,b,poverflow) _XSyncValueSubtract(presult,a,b,poverflow)
+#define XSyncMaxValue(pv) _XSyncMaxValue(pv)
+#define XSyncMinValue(pv) _XSyncMinValue(pv)
+
+/*
+ * Constants for the value_type argument of various requests
+ */
+typedef enum {
+    XSyncAbsolute,
+    XSyncRelative
+} XSyncValueType;
+
+/*
+ * Alarm Test types
+ */
+typedef enum {
+    XSyncPositiveTransition,
+    XSyncNegativeTransition,
+    XSyncPositiveComparison,
+    XSyncNegativeComparison
+} XSyncTestType;
+
+/*
+ * Alarm state constants
+ */
+typedef enum {
+    XSyncAlarmActive,
+    XSyncAlarmInactive,
+    XSyncAlarmDestroyed
+} XSyncAlarmState;
+
+
+typedef XID XSyncCounter;
+typedef XID XSyncAlarm;
+typedef struct _XSyncValue {
+    int hi;
+    unsigned int lo;
+} XSyncValue;
+#endif /* _SYNCCONST_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/syncproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/syncproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/syncproto.h	(revision 22660)
@@ -0,0 +1,378 @@
+/*
+
+Copyright 1991, 1993, 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.
+
+*/
+
+/***********************************************************
+Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
+and Olivetti Research Limited, Cambridge, England.
+
+                        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 names of Digital or Olivetti
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL THEY 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 _SYNCPROTO_H_
+#define _SYNCPROTO_H_
+
+#include <X11/extensions/syncconst.h>
+
+#define X_SyncInitialize		0
+#define X_SyncListSystemCounters	1
+#define X_SyncCreateCounter		2
+#define X_SyncSetCounter		3
+#define X_SyncChangeCounter		4
+#define X_SyncQueryCounter              5
+#define X_SyncDestroyCounter		6
+#define X_SyncAwait			7
+#define X_SyncCreateAlarm               8
+#define X_SyncChangeAlarm	        9
+#define X_SyncQueryAlarm	       10
+#define X_SyncDestroyAlarm	       11
+#define X_SyncSetPriority   	       12
+#define X_SyncGetPriority   	       13
+
+/* cover up types from sync.h to make sure they're the right size for
+ * protocol packaging.  These will be undef'ed after all the protocol
+ * structures are defined.
+ */
+#define XSyncCounter CARD32
+#define XSyncAlarm   CARD32
+
+/*
+ * Initialize
+ */
+typedef struct _xSyncInitialize {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    CARD8	majorVersion;
+    CARD8	minorVersion;
+    CARD16	pad B16;
+} xSyncInitializeReq;
+#define sz_xSyncInitializeReq		8
+
+typedef struct {
+    BYTE	type;
+    CARD8	unused;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD8	majorVersion;
+    CARD8	minorVersion;
+    CARD16	pad B16;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+} xSyncInitializeReply;
+#define sz_xSyncInitializeReply	32
+
+/*
+ * ListSystemCounters
+ */
+typedef struct _xSyncListSystemCounters
+{
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+} xSyncListSystemCountersReq;
+#define sz_xSyncListSystemCountersReq	4
+
+typedef struct {
+    BYTE	type;
+    CARD8	unused;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    INT32	nCounters B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+} xSyncListSystemCountersReply;
+#define sz_xSyncListSystemCountersReply	32
+
+typedef struct {
+    XSyncCounter counter B32;
+    INT32	resolution_hi B32;
+    CARD32	resolution_lo B32;
+    CARD16	name_length B16;
+} xSyncSystemCounter;
+#define sz_xSyncSystemCounter 14
+
+/*
+ * Create Counter
+ */
+typedef struct _xSyncCreateCounterReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncCounter cid B32;
+    INT32       initial_value_hi B32;
+    CARD32	initial_value_lo B32;
+} xSyncCreateCounterReq;
+#define sz_xSyncCreateCounterReq	16
+
+/*
+ * Change Counter
+ */
+typedef struct _xSyncChangeCounterReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncCounter cid B32;
+    INT32       value_hi B32;
+    CARD32	value_lo B32;
+} xSyncChangeCounterReq;
+#define sz_xSyncChangeCounterReq	16
+
+/*
+ * Set Counter
+ */
+typedef struct _xSyncSetCounterReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncCounter cid B32;
+    INT32       value_hi B32;
+    CARD32	value_lo B32;
+} xSyncSetCounterReq;
+#define sz_xSyncSetCounterReq	16
+
+/*
+ * Destroy Counter
+ */
+typedef struct _xSyncDestroyCounterReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncCounter counter B32;
+} xSyncDestroyCounterReq;
+#define sz_xSyncDestroyCounterReq	8
+
+/*
+ * Query Counter
+ */
+typedef struct _xSyncQueryCounterReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncCounter counter B32;
+} xSyncQueryCounterReq;
+#define sz_xSyncQueryCounterReq		8
+
+
+typedef struct {
+    BYTE	type;
+    CARD8	unused;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    INT32	value_hi B32;
+    CARD32	value_lo B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+} xSyncQueryCounterReply;
+#define sz_xSyncQueryCounterReply	32
+
+/*
+ * Await
+ */
+typedef struct _xSyncAwaitReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+} xSyncAwaitReq;
+#define sz_xSyncAwaitReq		4
+
+typedef struct _xSyncWaitCondition {
+    XSyncCounter counter B32;
+    CARD32	value_type B32;
+    INT32       wait_value_hi B32;
+    CARD32      wait_value_lo B32;
+    CARD32	test_type B32;
+    INT32	event_threshold_hi B32;
+    CARD32	event_threshold_lo B32;
+} xSyncWaitCondition;
+#define sz_xSyncWaitCondition		28
+
+/*
+ * Create Alarm
+ */
+typedef struct _xSyncCreateAlarmReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncAlarm	id B32;
+    CARD32      valueMask B32;
+} xSyncCreateAlarmReq;
+#define sz_xSyncCreateAlarmReq		12
+
+/*
+ * Destroy Alarm
+ */
+typedef struct _xSyncDestroyAlarmReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncAlarm	alarm B32;
+} xSyncDestroyAlarmReq;
+#define sz_xSyncDestroyAlarmReq		8
+
+/*
+ * Query Alarm
+ */
+typedef struct _xSyncQueryAlarmReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncAlarm	alarm B32;
+} xSyncQueryAlarmReq;
+#define sz_xSyncQueryAlarmReq		8
+
+typedef struct {
+    BYTE	type;
+    CARD8	unused;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    XSyncCounter counter B32;
+    CARD32	value_type B32;
+    INT32	wait_value_hi B32;
+    CARD32	wait_value_lo B32;
+    CARD32	test_type      B32;
+    INT32	delta_hi B32;
+    CARD32	delta_lo B32;
+    BOOL        events;
+    BYTE        state;
+    BYTE	pad0;
+    BYTE	pad1;
+} xSyncQueryAlarmReply;
+#define sz_xSyncQueryAlarmReply		40
+
+/*
+ * Change Alarm
+ */
+typedef struct _xSyncChangeAlarmReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncAlarm	alarm B32;
+    CARD32	valueMask B32;
+} xSyncChangeAlarmReq;
+#define sz_xSyncChangeAlarmReq		12
+
+/*
+ * SetPriority
+ */
+typedef struct _xSyncSetPriority{
+    CARD8   	reqType;
+    CARD8   	syncReqType;
+    CARD16  	length B16;
+    CARD32  	id B32;
+    INT32  	priority B32;
+} xSyncSetPriorityReq;
+#define sz_xSyncSetPriorityReq	    	12
+
+/*
+ * Get Priority
+ */
+typedef struct _xSyncGetPriority{
+    CARD8   	reqType;
+    CARD8   	syncReqType;
+    CARD16  	length B16;
+    CARD32  	id B32; /*XXX XID? */
+} xSyncGetPriorityReq;
+#define sz_xSyncGetPriorityReq	    	 8
+
+typedef struct {
+    BYTE	type;
+    CARD8	unused;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    INT32  	priority B32;
+    CARD32  	pad0 B32;
+    CARD32  	pad1 B32;
+    CARD32  	pad2 B32;
+    CARD32  	pad3 B32;
+    CARD32  	pad4 B32;
+} xSyncGetPriorityReply;
+#define sz_xSyncGetPriorityReply	32
+
+/*
+ * Events
+ */
+
+typedef struct _xSyncCounterNotifyEvent {
+    BYTE	type;
+    BYTE	kind;
+    CARD16	sequenceNumber B16;
+    XSyncCounter counter B32;
+    INT32	wait_value_hi B32;
+    CARD32	wait_value_lo B32;
+    INT32	counter_value_hi B32;
+    CARD32	counter_value_lo B32;
+    CARD32	time B32;
+    CARD16	count B16;
+    BOOL	destroyed;
+    BYTE        pad0;
+} xSyncCounterNotifyEvent;
+
+typedef struct _xSyncAlarmNotifyEvent {
+    BYTE	type;
+    BYTE	kind;
+    CARD16	sequenceNumber B16;
+    XSyncAlarm	alarm B32;
+    INT32	counter_value_hi B32;
+    CARD32	counter_value_lo B32;
+    INT32	alarm_value_hi B32;
+    CARD32	alarm_value_lo B32;
+    CARD32	time B32;
+    CARD8       state;
+    BYTE        pad0;
+    BYTE        pad1;
+    BYTE        pad2;
+} xSyncAlarmNotifyEvent;
+
+#undef XSyncCounter
+#undef XSyncAlarm
+
+
+#endif /* _SYNCPROTO_H_ */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/xtestconst.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/xtestconst.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/xtestconst.h	(revision 22660)
@@ -0,0 +1,41 @@
+/*
+
+Copyright 1992, 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 _XTEST_CONST_H_
+#define _XTEST_CONST_H_
+
+#define XTestNumberEvents	0
+
+#define XTestNumberErrors	0
+
+#define XTestCurrentCursor ((Cursor)1)
+
+#define XTestMajorVersion	2
+#define XTestMinorVersion	2
+
+#define XTestExtensionName	"XTEST"
+
+#endif
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/xtestext1const.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/xtestext1const.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/xtestext1const.h	(revision 22660)
@@ -0,0 +1,160 @@
+/*
+ * xtestext1.h
+ *
+ * X11 Input Synthesis Extension include file
+ */
+
+/*
+
+
+Copyright 1986, 1987, 1988, 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 1986, 1987, 1988 by Hewlett-Packard Corporation
+
+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 Hewlett-Packard not be used in
+advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+Hewlett-Packard makes no representations about the
+suitability of this software for any purpose.  It is provided
+"as is" without express or implied warranty.
+
+This software is not subject to any license of the American
+Telephone and Telegraph Company or of the Regents of the
+University of California.
+
+*/
+
+#ifndef _XTESTEXT1CONST_H
+#define _XTESTEXT1CONST_H 1
+
+#define XTestMAX_ACTION_LIST_SIZE       64
+#define XTestACTIONS_SIZE	28
+
+
+/*
+ * used in the XTestPressButton and XTestPressKey functions
+ */
+#define XTestPRESS                      1 << 0
+#define XTestRELEASE                    1 << 1
+#define XTestSTROKE                     1 << 2
+
+/*
+ * When doing a key or button stroke, the number of milliseconds
+ * to delay between the press and the release of a key or button
+ * in the XTestPressButton and XTestPressKey functions.
+ */
+
+#define XTestSTROKE_DELAY_TIME		10
+
+/*
+ * used in the XTestGetInput function
+ */
+#define XTestEXCLUSIVE                  1 << 0
+#define XTestPACKED_ACTIONS             1 << 1
+#define XTestPACKED_MOTION              1 << 2
+
+/*
+ * used in the XTestFakeInput function
+ */
+#define XTestFAKE_ACK_NOT_NEEDED        0
+#define XTestFAKE_ACK_REQUEST           1
+
+/*
+ * used in the XTest extension initialization routine
+ */
+#define XTestEXTENSION_NAME             "XTestExtension1"
+#define XTestEVENT_COUNT                2
+
+/*
+ * This is the definition for the format of the header byte
+ * in the input action structures.
+ */
+#define XTestACTION_TYPE_MASK   0x03    /* bits 0 and 1          */
+#define XTestKEY_STATE_MASK     0x04    /* bit 2 (key action)    */
+#define XTestX_SIGN_BIT_MASK    0x04    /* bit 2 (motion action) */
+#define XTestY_SIGN_BIT_MASK    0x08    /* bit 3 (motion action) */
+#define XTestDEVICE_ID_MASK     0xf0    /* bits 4 through 7      */
+
+#define XTestMAX_DEVICE_ID	0x0f
+#define XTestPackDeviceID(x)	(((x) & XTestMAX_DEVICE_ID) << 4)
+#define XTestUnpackDeviceID(x)	(((x) & XTestDEVICE_ID_MASK) >> 4)
+
+/*
+ * These are the possible action types.
+ */
+#define XTestDELAY_ACTION       0
+#define XTestKEY_ACTION         1
+#define XTestMOTION_ACTION      2
+#define XTestJUMP_ACTION        3
+
+/*
+ * These are the definitions for key/button motion input actions.
+ */
+#define XTestKEY_UP             0x04
+#define XTestKEY_DOWN           0x00
+
+/*
+ * These are the definitions for pointer relative motion input
+ * actions.
+ *
+ * The sign bits for the x and y relative motions are contained
+ * in the header byte.  The x and y relative motions are packed
+ * into one byte to make things fit in 32 bits.  If the relative
+ * motion range is larger than +/-15, use the pointer jump action.
+ */
+#define XTestMOTION_MAX            15
+#define XTestMOTION_MIN            -15
+
+#define XTestX_NEGATIVE            0x04
+#define XTestY_NEGATIVE            0x08
+
+#define XTestX_MOTION_MASK         0x0f
+#define XTestY_MOTION_MASK         0xf0
+
+#define XTestPackXMotionValue(x)   ((x) & XTestX_MOTION_MASK)
+#define XTestPackYMotionValue(x)   (((x) << 4) & XTestY_MOTION_MASK)
+
+#define XTestUnpackXMotionValue(x) ((x) & XTestX_MOTION_MASK)
+#define XTestUnpackYMotionValue(x) (((x) & XTestY_MOTION_MASK) >> 4)
+/*
+ * These are the definitions for a long delay input action.  It is
+ * used when more than XTestSHORT_DELAY_TIME milliseconds of delay
+ * (approximately one minute) is needed.
+ *
+ * The device ID for a delay is always set to XTestDELAY_DEVICE_ID.
+ * This guarantees that a header byte with a value of 0 is not
+ * a valid header, so it can be used as a flag to indicate that
+ * there are no more input actions in an XTestInputAction event.
+ */
+
+#define XTestSHORT_DELAY_TIME	0xffff
+#define XTestDELAY_DEVICE_ID    0x0f
+
+#endif /* _XTESTEXT1CONST_H */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/xtestext1proto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/xtestext1proto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/xtestext1proto.h	(revision 22660)
@@ -0,0 +1,221 @@
+/*
+ * xtestext1.h
+ *
+ * X11 Input Synthesis Extension include file
+ */
+
+/*
+Copyright 1986, 1987, 1988, 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 1986, 1987, 1988 by Hewlett-Packard Corporation
+
+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 Hewlett-Packard not be used in
+advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+Hewlett-Packard makes no representations about the
+suitability of this software for any purpose.  It is provided
+"as is" without express or implied warranty.
+
+This software is not subject to any license of the American
+Telephone and Telegraph Company or of the Regents of the
+University of California.
+
+*/
+
+#ifndef _XTESTEXT1PROTO_H
+#define _XTESTEXT1PROTO_H 1
+
+#include <X11/extensions/xtestext1const.h>
+
+/*
+ * the typedefs for CARD8, CARD16, and CARD32 are defined in Xmd.h
+ */
+
+/*
+ * XTest request type values
+ *
+ * used in the XTest extension protocol requests
+ */
+#define X_TestFakeInput                  1
+#define X_TestGetInput                   2
+#define X_TestStopInput                  3
+#define X_TestReset                      4
+#define X_TestQueryInputSize             5
+
+/*
+ * This defines the maximum size of a list of input actions
+ * to be sent to the server.  It should always be a multiple of
+ * 4 so that the entire xTestFakeInputReq structure size is a
+ * multiple of 4.
+ */
+
+typedef struct {
+        CARD8   reqType;        /* always XTestReqCode             */
+        CARD8   XTestReqType;   /* always X_TestFakeInput           */
+        CARD16  length B16;     /* 2 + XTestMAX_ACTION_LIST_SIZE/4 */
+        CARD32  ack B32;
+        CARD8   action_list[XTestMAX_ACTION_LIST_SIZE];
+} xTestFakeInputReq;
+#define sz_xTestFakeInputReq (XTestMAX_ACTION_LIST_SIZE + 8)
+
+typedef struct {
+        CARD8   reqType;        /* always XTestReqCode  */
+        CARD8   XTestReqType;   /* always X_TestGetInput */
+        CARD16  length B16;     /* 2                    */
+        CARD32  mode B32;
+} xTestGetInputReq;
+#define sz_xTestGetInputReq 8
+
+typedef struct {
+        CARD8   reqType;        /* always XTestReqCode   */
+        CARD8   XTestReqType;   /* always X_TestStopInput */
+        CARD16  length B32;     /* 1                     */
+} xTestStopInputReq;
+#define sz_xTestStopInputReq 4
+
+typedef struct {
+        CARD8   reqType;        /* always XTestReqCode */
+        CARD8   XTestReqType;   /* always X_TestReset   */
+        CARD16  length B16;     /* 1                   */
+} xTestResetReq;
+#define sz_xTestResetReq 4
+
+typedef struct {
+        CARD8   reqType;        /* always XTestReqCode        */
+        CARD8   XTestReqType;   /* always X_TestQueryInputSize */
+        CARD16  length B16;     /* 1                          */
+} xTestQueryInputSizeReq;
+#define sz_xTestQueryInputSizeReq 4
+
+/*
+ * This is the definition of the reply for the xTestQueryInputSize
+ * request.  It should remain the same minimum size as other replies
+ * (32 bytes).
+ */
+typedef struct {
+        CARD8   type;           /* always X_Reply  */
+        CARD8   pad1;
+        CARD16  sequenceNumber B16;
+        CARD32  length B32;     /* always 0 */
+        CARD32  size_return B32;
+        CARD32  pad2 B32;
+        CARD32  pad3 B32;
+        CARD32  pad4 B32;
+        CARD32  pad5 B32;
+        CARD32  pad6 B32;
+} xTestQueryInputSizeReply;
+
+/*
+ * This is the definition for the input action wire event structure.
+ * This event is sent to the client when the server has one or
+ * more user input actions to report to the client.  It must
+ * remain the same size as all other wire events (32 bytes).
+ */
+typedef struct {
+        CARD8   type;           /* always XTestInputActionType */
+        CARD8   pad00;
+        CARD16  sequenceNumber B16;
+        CARD8   actions[XTestACTIONS_SIZE];
+} xTestInputActionEvent;
+
+/*
+ * This is the definition for the xTestFakeAck wire event structure.
+ * This event is sent to the client when the server has completely
+ * processed its input action buffer, and is ready for more.
+ * It must remain the same size as all other wire events (32 bytes).
+ */
+typedef struct {
+        CARD8   type;           /* always XTestFakeAckType */
+        CARD8   pad00;
+        CARD16  sequenceNumber B16;
+        CARD32  pad02 B32;
+        CARD32  pad03 B32;
+        CARD32  pad04 B32;
+        CARD32  pad05 B32;
+        CARD32  pad06 B32;
+        CARD32  pad07 B32;
+        CARD32  pad08 B32;
+} xTestFakeAckEvent;
+
+/*
+ * These are the definitions for key/button motion input actions.
+ */
+typedef struct {
+        CARD8   header;         /* which device, key up/down */
+        CARD8   keycode;        /* which key/button to move  */
+        CARD16  delay_time B16; /* how long to delay (in ms) */
+} XTestKeyInfo;
+
+/*
+ * This is the definition for pointer jump input actions.
+ */
+typedef struct {
+        CARD8   header;         /* which pointer             */
+        CARD8   pad1;           /* unused padding byte       */
+        CARD16  jumpx B16;      /* x coord to jump to        */
+        CARD16  jumpy B16;      /* y coord to jump to        */
+        CARD16  delay_time B16; /* how long to delay (in ms) */
+} XTestJumpInfo;
+
+/*
+ * These are the definitions for pointer relative motion input
+ * actions.
+ *
+ * The sign bits for the x and y relative motions are contained
+ * in the header byte.  The x and y relative motions are packed
+ * into one byte to make things fit in 32 bits.  If the relative
+ * motion range is larger than +/-15, use the pointer jump action.
+ */
+
+typedef struct {
+        CARD8   header;         /* which pointer             */
+        CARD8   motion_data;    /* x,y relative motion       */
+        CARD16  delay_time B16; /* how long to delay (in ms) */
+} XTestMotionInfo;
+
+/*
+ * These are the definitions for a long delay input action.  It is
+ * used when more than XTestSHORT_DELAY_TIME milliseconds of delay
+ * (approximately one minute) is needed.
+ *
+ * The device ID for a delay is always set to XTestDELAY_DEVICE_ID.
+ * This guarantees that a header byte with a value of 0 is not
+ * a valid header, so it can be used as a flag to indicate that
+ * there are no more input actions in an XTestInputAction event.
+ */
+
+typedef struct {
+        CARD8   header;         /* always XTestDELAY_DEVICE_ID */
+        CARD8   pad1;           /* unused padding byte         */
+        CARD16  pad2 B16;       /* unused padding word         */
+        CARD32  delay_time B32; /* how long to delay (in ms)   */
+} XTestDelayInfo;
+
+#endif /* _XTESTEXT1PROTO_H */
Index: /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/xtestproto.h
===================================================================
--- /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/xtestproto.h	(revision 22660)
+++ /trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/xtestproto.h	(revision 22660)
@@ -0,0 +1,124 @@
+/*
+
+Copyright 1992, 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 _XTESTPROTO_H_
+#define _XTESTPROTO_H_
+
+#include <X11/extensions/xtestconst.h>
+
+#define Window CARD32
+#define Time CARD32
+#define Cursor CARD32
+
+#define X_XTestGetVersion	0
+#define X_XTestCompareCursor	1
+#define X_XTestFakeInput	2
+#define X_XTestGrabControl	3
+
+typedef struct {
+    CARD8	reqType;	/* always XTestReqCode */
+    CARD8	xtReqType;	/* always X_XTestGetVersion */
+    CARD16	length B16;
+    CARD8	majorVersion;
+    CARD8	pad;
+    CARD16	minorVersion B16;
+} xXTestGetVersionReq;
+#define sz_xXTestGetVersionReq 8
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    CARD8	majorVersion;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD16	minorVersion B16;
+    CARD16	pad0 B16;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+} xXTestGetVersionReply;
+#define sz_xXTestGetVersionReply 32
+
+typedef struct {
+    CARD8	reqType;	/* always XTestReqCode */
+    CARD8	xtReqType;	/* always X_XTestCompareCursor */
+    CARD16	length B16;
+    Window	window B32;
+    Cursor	cursor B32;
+} xXTestCompareCursorReq;
+#define sz_xXTestCompareCursorReq 12
+
+typedef struct {
+    BYTE	type;			/* X_Reply */
+    BOOL	same;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	pad0 B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+} xXTestCompareCursorReply;
+#define sz_xXTestCompareCursorReply 32
+
+/* used only on the client side */
+typedef struct {
+    CARD8	reqType;	/* always XTestReqCode */
+    CARD8	xtReqType;	/* always X_XTestFakeInput */
+    CARD16	length B16;
+    BYTE	type;
+    BYTE	detail;
+    CARD16	pad0 B16;
+    Time	time B32;
+    Window	root B32;
+    CARD32	pad1 B32;
+    CARD32	pad2 B32;
+    INT16	rootX B16, rootY B16;
+    CARD32	pad3 B32;
+    CARD16	pad4 B16;
+    CARD8	pad5;
+    CARD8	deviceid;
+} xXTestFakeInputReq;
+#define sz_xXTestFakeInputReq 36
+
+typedef struct {
+    CARD8	reqType;	/* always XTestReqCode */
+    CARD8	xtReqType;	/* always X_XTestGrabControl */
+    CARD16	length B16;
+    BOOL	impervious;
+    CARD8	pad0;
+    CARD8	pad1;
+    CARD8	pad2;
+} xXTestGrabControlReq;
+#define sz_xXTestGrabControlReq 8
+
+#undef Window
+#undef Time
+#undef Cursor
+
+#endif /* _XTESTPROTO_H_ */
