aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/include
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-11 12:14:52 +0000
committermarha <marha@users.sourceforge.net>2010-06-11 12:14:52 +0000
commit4c61bf84b11e26e6f22648668c95ea760a379163 (patch)
tree0ac762ab2815eae283dded7447ad7cb5a54b926a /xorg-server/include
parente1dabd2ce8be0d70c6c15353b58de256129dfd1f (diff)
downloadvcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.tar.gz
vcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.tar.bz2
vcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.zip
xserver git update 11/6/2010
Diffstat (limited to 'xorg-server/include')
-rw-r--r--xorg-server/include/cursor.h279
-rw-r--r--xorg-server/include/cursorstr.h194
-rw-r--r--xorg-server/include/dix-config.h.in889
-rw-r--r--xorg-server/include/dix.h4
-rw-r--r--xorg-server/include/globals.h253
-rw-r--r--xorg-server/include/input.h2
-rw-r--r--xorg-server/include/inputstr.h7
-rw-r--r--xorg-server/include/pixmap.h239
-rw-r--r--xorg-server/include/privates.h268
-rw-r--r--xorg-server/include/regionstr.h429
-rw-r--r--xorg-server/include/scrnintstr.h23
-rw-r--r--xorg-server/include/windowstr.h445
-rw-r--r--xorg-server/include/xkbsrv.h6
-rw-r--r--xorg-server/include/xorg-config.h.in287
-rw-r--r--xorg-server/include/xserver-properties.h375
15 files changed, 1974 insertions, 1726 deletions
diff --git a/xorg-server/include/cursor.h b/xorg-server/include/cursor.h
index dadedfd1d..39d829769 100644
--- a/xorg-server/include/cursor.h
+++ b/xorg-server/include/cursor.h
@@ -1,139 +1,140 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef CURSOR_H
-#define CURSOR_H
-
-#include "misc.h"
-#include "screenint.h"
-#include "window.h"
-
-#define NullCursor ((CursorPtr)NULL)
-
-/* Provide support for alpha composited cursors */
-#define ARGB_CURSOR
-
-struct _DeviceIntRec;
-
-typedef struct _Cursor *CursorPtr;
-typedef struct _CursorMetric *CursorMetricPtr;
-
-extern _X_EXPORT int cursorScreenDevPriv[MAXSCREENS];
-#define CursorScreenKey(pScreen) (cursorScreenDevPriv + (pScreen)->myNum)
-
-extern _X_EXPORT CursorPtr rootCursor;
-
-extern _X_EXPORT int FreeCursor(
- pointer /*pCurs*/,
- XID /*cid*/);
-
-extern _X_EXPORT int AllocARGBCursor(
- unsigned char* /*psrcbits*/,
- unsigned char* /*pmaskbits*/,
- CARD32* /*argb*/,
- CursorMetricPtr /*cm*/,
- unsigned /*foreRed*/,
- unsigned /*foreGreen*/,
- unsigned /*foreBlue*/,
- unsigned /*backRed*/,
- unsigned /*backGreen*/,
- unsigned /*backBlue*/,
- CursorPtr* /*ppCurs*/,
- ClientPtr /*client*/,
- XID /*cid*/);
-
-extern _X_EXPORT int AllocGlyphCursor(
- Font /*source*/,
- unsigned int /*sourceChar*/,
- Font /*mask*/,
- unsigned int /*maskChar*/,
- unsigned /*foreRed*/,
- unsigned /*foreGreen*/,
- unsigned /*foreBlue*/,
- unsigned /*backRed*/,
- unsigned /*backGreen*/,
- unsigned /*backBlue*/,
- CursorPtr* /*ppCurs*/,
- ClientPtr /*client*/,
- XID /*cid*/);
-
-extern _X_EXPORT CursorPtr CreateRootCursor(
- char* /*pfilename*/,
- unsigned int /*glyph*/);
-
-extern _X_EXPORT int ServerBitsFromGlyph(
- FontPtr /*pfont*/,
- unsigned int /*ch*/,
- CursorMetricPtr /*cm*/,
- unsigned char ** /*ppbits*/);
-
-extern _X_EXPORT Bool CursorMetricsFromGlyph(
- FontPtr /*pfont*/,
- unsigned /*ch*/,
- CursorMetricPtr /*cm*/);
-
-extern _X_EXPORT void CheckCursorConfinement(
- WindowPtr /*pWin*/);
-
-extern _X_EXPORT void NewCurrentScreen(
- struct _DeviceIntRec* /*pDev*/,
- ScreenPtr /*newScreen*/,
- int /*x*/,
- int /*y*/);
-
-extern _X_EXPORT Bool PointerConfinedToScreen(struct _DeviceIntRec* /* pDev */);
-
-extern _X_EXPORT void GetSpritePosition(
- struct _DeviceIntRec* /* pDev */,
- int * /*px*/,
- int * /*py*/);
-
-#ifdef PANORAMIX
-extern _X_EXPORT int XineramaGetCursorScreen(struct _DeviceIntRec* pDev);
-#endif /* PANORAMIX */
-
-#endif /* CURSOR_H */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef CURSOR_H
+#define CURSOR_H
+
+#include "misc.h"
+#include "screenint.h"
+#include "window.h"
+#include "privates.h"
+
+#define NullCursor ((CursorPtr)NULL)
+
+/* Provide support for alpha composited cursors */
+#define ARGB_CURSOR
+
+struct _DeviceIntRec;
+
+typedef struct _Cursor *CursorPtr;
+typedef struct _CursorMetric *CursorMetricPtr;
+
+extern _X_EXPORT DevPrivateKeyRec cursorScreenDevPriv[MAXSCREENS];
+#define CursorScreenKey(pScreen) (cursorScreenDevPriv + (pScreen)->myNum)
+
+extern _X_EXPORT CursorPtr rootCursor;
+
+extern _X_EXPORT int FreeCursor(
+ pointer /*pCurs*/,
+ XID /*cid*/);
+
+extern _X_EXPORT int AllocARGBCursor(
+ unsigned char* /*psrcbits*/,
+ unsigned char* /*pmaskbits*/,
+ CARD32* /*argb*/,
+ CursorMetricPtr /*cm*/,
+ unsigned /*foreRed*/,
+ unsigned /*foreGreen*/,
+ unsigned /*foreBlue*/,
+ unsigned /*backRed*/,
+ unsigned /*backGreen*/,
+ unsigned /*backBlue*/,
+ CursorPtr* /*ppCurs*/,
+ ClientPtr /*client*/,
+ XID /*cid*/);
+
+extern _X_EXPORT int AllocGlyphCursor(
+ Font /*source*/,
+ unsigned int /*sourceChar*/,
+ Font /*mask*/,
+ unsigned int /*maskChar*/,
+ unsigned /*foreRed*/,
+ unsigned /*foreGreen*/,
+ unsigned /*foreBlue*/,
+ unsigned /*backRed*/,
+ unsigned /*backGreen*/,
+ unsigned /*backBlue*/,
+ CursorPtr* /*ppCurs*/,
+ ClientPtr /*client*/,
+ XID /*cid*/);
+
+extern _X_EXPORT CursorPtr CreateRootCursor(
+ char* /*pfilename*/,
+ unsigned int /*glyph*/);
+
+extern _X_EXPORT int ServerBitsFromGlyph(
+ FontPtr /*pfont*/,
+ unsigned int /*ch*/,
+ CursorMetricPtr /*cm*/,
+ unsigned char ** /*ppbits*/);
+
+extern _X_EXPORT Bool CursorMetricsFromGlyph(
+ FontPtr /*pfont*/,
+ unsigned /*ch*/,
+ CursorMetricPtr /*cm*/);
+
+extern _X_EXPORT void CheckCursorConfinement(
+ WindowPtr /*pWin*/);
+
+extern _X_EXPORT void NewCurrentScreen(
+ struct _DeviceIntRec* /*pDev*/,
+ ScreenPtr /*newScreen*/,
+ int /*x*/,
+ int /*y*/);
+
+extern _X_EXPORT Bool PointerConfinedToScreen(struct _DeviceIntRec* /* pDev */);
+
+extern _X_EXPORT void GetSpritePosition(
+ struct _DeviceIntRec* /* pDev */,
+ int * /*px*/,
+ int * /*py*/);
+
+#ifdef PANORAMIX
+extern _X_EXPORT int XineramaGetCursorScreen(struct _DeviceIntRec* pDev);
+#endif /* PANORAMIX */
+
+#endif /* CURSOR_H */
diff --git a/xorg-server/include/cursorstr.h b/xorg-server/include/cursorstr.h
index 3ff56e2bf..b082cb911 100644
--- a/xorg-server/include/cursorstr.h
+++ b/xorg-server/include/cursorstr.h
@@ -1,95 +1,99 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef CURSORSTRUCT_H
-#define CURSORSTRUCT_H
-
-#include "cursor.h"
-#include "privates.h"
-/*
- * device-independent cursor storage
- */
-
-/*
- * source and mask point directly to the bits, which are in the server-defined
- * bitmap format.
- */
-typedef struct _CursorBits {
- unsigned char *source; /* points to bits */
- unsigned char *mask; /* points to bits */
- Bool emptyMask; /* all zeros mask */
- unsigned short width, height, xhot, yhot; /* metrics */
- int refcnt; /* can be shared */
- PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
-#ifdef ARGB_CURSOR
- CARD32 *argb; /* full-color alpha blended */
-#endif
-} CursorBits, *CursorBitsPtr;
-
-typedef struct _Cursor {
- CursorBitsPtr bits;
- unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */
- unsigned short backRed, backGreen, backBlue; /* device-independent color */
- int refcnt;
- PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
- XID id;
-#ifdef XFIXES
- CARD32 serialNumber;
- Atom name;
-#endif
-} CursorRec;
-
-typedef struct _CursorMetric {
- unsigned short width, height, xhot, yhot;
-} CursorMetricRec;
-
-typedef struct {
- int x, y;
- ScreenPtr pScreen;
-} HotSpot;
-
-#endif /* CURSORSTRUCT_H */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef CURSORSTRUCT_H
+#define CURSORSTRUCT_H
+
+#include "cursor.h"
+#include "privates.h"
+/*
+ * device-independent cursor storage
+ */
+
+/*
+ * source and mask point directly to the bits, which are in the server-defined
+ * bitmap format.
+ */
+typedef struct _CursorBits {
+ unsigned char *source; /* points to bits */
+ unsigned char *mask; /* points to bits */
+ Bool emptyMask; /* all zeros mask */
+ unsigned short width, height, xhot, yhot; /* metrics */
+ int refcnt; /* can be shared */
+ PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
+#ifdef ARGB_CURSOR
+ CARD32 *argb; /* full-color alpha blended */
+#endif
+} CursorBits, *CursorBitsPtr;
+
+#define CURSOR_BITS_SIZE (sizeof(CursorBits) + dixPrivatesSize(PRIVATE_CURSOR_BITS))
+
+typedef struct _Cursor {
+ CursorBitsPtr bits;
+ unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */
+ unsigned short backRed, backGreen, backBlue; /* device-independent color */
+ int refcnt;
+ PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
+ XID id;
+#ifdef XFIXES
+ CARD32 serialNumber;
+ Atom name;
+#endif
+} CursorRec;
+
+#define CURSOR_REC_SIZE (sizeof(CursorRec) + dixPrivatesSize(PRIVATE_CURSOR))
+
+typedef struct _CursorMetric {
+ unsigned short width, height, xhot, yhot;
+} CursorMetricRec;
+
+typedef struct {
+ int x, y;
+ ScreenPtr pScreen;
+} HotSpot;
+
+#endif /* CURSORSTRUCT_H */
diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in
index 7759aac6a..63a770f1e 100644
--- a/xorg-server/include/dix-config.h.in
+++ b/xorg-server/include/dix-config.h.in
@@ -1,443 +1,446 @@
-/* dix-config.h.in: not at all generated. -*- c -*- */
-
-#ifndef _DIX_CONFIG_H_
-#define _DIX_CONFIG_H_
-
-/* Support BigRequests extension */
-#undef BIGREQS
-
-/* Builder address */
-#undef BUILDERADDR
-
-/* Operating System Name */
-#undef OSNAME
-
-/* Operating System Vendor */
-#undef OSVENDOR
-
-/* Builder string */
-#undef BUILDERSTRING
-
-/* Default font path */
-#undef COMPILEDDEFAULTFONTPATH
-
-/* Miscellaneous server configuration files path */
-#undef SERVER_MISC_CONFIG_PATH
-
-/* Support Composite Extension */
-#undef COMPOSITE
-
-/* Support Damage extension */
-#undef DAMAGE
-
-/* Build for darwin with Quartz support */
-#undef DARWIN_WITH_QUARTZ
-
-/* Use OsVendorVErrorF */
-#undef DDXOSVERRORF
-
-/* Use ddxBeforeReset */
-#undef DDXBEFORERESET
-
-/* Build DPMS extension */
-#undef DPMSExtension
-
-/* Build GLX extension */
-#undef GLXEXT
-
-/* Build GLX DRI loader */
-#undef GLX_DRI
-
-/* Path to DRI drivers */
-#undef DRI_DRIVER_PATH
-
-/* Support XDM-AUTH*-1 */
-#undef HASXDMAUTH
-
-/* Define to 1 if you have the `getdtablesize' function. */
-#undef HAS_GETDTABLESIZE
-
-/* Define to 1 if you have the `getifaddrs' function. */
-#undef HAS_GETIFADDRS
-
-/* Define to 1 if you have the `getpeereid' function. */
-#undef HAS_GETPEEREID
-
-/* Define to 1 if you have the `getpeerucred' function. */
-#undef HAS_GETPEERUCRED
-
-/* Define to 1 if you have the `mmap' function. */
-#undef HAS_MMAP
-
-/* Support SHM */
-#undef HAS_SHM
-
-/* Have the 'strlcpy' function */
-#undef HAS_STRLCPY
-
-/* Define to 1 if you have the <asm/mtrr.h> header file. */
-#undef HAVE_ASM_MTRR_H
-
-/* Has backtrace support */
-#undef HAVE_BACKTRACE
-
-/* Define to 1 if you have the <byteswap.h> header file. */
-#undef HAVE_BYTESWAP_H
-
-/* Define to 1 if you have cbrt */
-#undef HAVE_CBRT
-
-/* Define to 1 if you have the <dbm.h> header file. */
-#undef HAVE_DBM_H
-
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- */
-#undef HAVE_DIRENT_H
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#undef HAVE_DOPRNT
-
-/* Have execinfo.h */
-#undef HAVE_EXECINFO_H
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the `geteuid' function. */
-#undef HAVE_GETEUID
-
-/* Define to 1 if you have the `getisax' function. */
-#undef HAVE_GETISAX
-
-/* Define to 1 if you have the `getuid' function. */
-#undef HAVE_GETUID
-
-/* Define to 1 if you have the `getzoneid' function. */
-#undef HAVE_GETZONEID
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Have Quartz */
-#undef XQUARTZ
-
-/* Support application updating through sparkle. */
-#undef XQUARTZ_SPARKLE
-
-/* Prefix to use for launchd identifiers */
-#undef LAUNCHD_ID_PREFIX
-
-/* Build a standalone xpbproxy */
-#undef STANDALONE_XPBPROXY
-
-/* Define to 1 if you have the `m' library (-lm). */
-#undef HAVE_LIBM
-
-/* Define to 1 if you have the `link' function. */
-#undef HAVE_LINK
-
-/* Define to 1 if you have the <linux/agpgart.h> header file. */
-#undef HAVE_LINUX_AGPGART_H
-
-/* Define to 1 if you have the <linux/apm_bios.h> header file. */
-#undef HAVE_LINUX_APM_BIOS_H
-
-/* Define to 1 if you have the <linux/fb.h> header file. */
-#undef HAVE_LINUX_FB_H
-
-/* Define to 1 if you have the `mkstemp' function. */
-#undef HAVE_MKSTEMP
-
-/* Define to 1 if you have the <ndbm.h> header file. */
-#undef HAVE_NDBM_H
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-#undef HAVE_NDIR_H
-
-/* Define to 1 if you have the <rpcsvc/dbm.h> header file. */
-#undef HAVE_RPCSVC_DBM_H
-
-/* Define to use libc SHA1 functions */
-#undef HAVE_SHA1_IN_LIBC
-
-/* Define to use CommonCrypto SHA1 functions */
-#undef HAVE_SHA1_IN_COMMONCRYPTO
-
-/* Define to use libmd SHA1 functions */
-#undef HAVE_SHA1_IN_LIBMD
-
-/* Define to use libgcrypt SHA1 functions */
-#undef HAVE_SHA1_IN_LIBGCRYPT
-
-/* Define to use libsha1 for SHA1 */
-#undef HAVE_SHA1_IN_LIBSHA1
-
-/* Define to 1 if you have the `shmctl64' function. */
-#undef HAVE_SHMCTL64
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the `strrchr' function. */
-#undef HAVE_STRRCHR
-
-/* Define to 1 if you have the `strtol' function. */
-#undef HAVE_STRTOL
-
-/* Define to 1 if SYSV IPC is available */
-#undef HAVE_SYSV_IPC
-
-/* Define to 1 if you have the <sys/agpio.h> header file. */
-#undef HAVE_SYS_AGPIO_H
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-#undef HAVE_SYS_DIR_H
-
-/* Define to 1 if you have the <sys/io.h> header file. */
-#undef HAVE_SYS_IO_H
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-#undef HAVE_SYS_NDIR_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/vm86.h> header file. */
-#undef HAVE_SYS_VM86_H
-
-/* Define to 1 if you have the <tslib.h> header file. */
-#undef HAVE_TSLIB_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the <fnmatch.h> header file. */
-#undef HAVE_FNMATCH_H
-
-/* Have /dev/urandom */
-#undef HAVE_URANDOM
-
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
-
-/* Support IPv6 for TCP connections */
-#undef IPv6
-
-/* Support os-specific local connections */
-#undef LOCALCONN
-
-/* Support MIT-SHM Extension */
-#undef MITSHM
-
-/* Enable some debugging code */
-#undef DEBUG
-
-/* Name of package */
-#undef PACKAGE
-
-/* Internal define for Xinerama */
-#undef PANORAMIX
-
-/* Overall prefix */
-#undef PROJECTROOT
-
-/* Support RANDR extension */
-#undef RANDR
-
-/* Support Record extension */
-#undef XRECORD
-
-/* Support RENDER extension */
-#undef RENDER
-
-/* Support X resource extension */
-#undef RES
-
-/* Support MIT-SCREEN-SAVER extension */
-#undef SCREENSAVER
-
-/* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */
-#undef SECURE_RPC
-
-/* Support SHAPE extension */
-#undef SHAPE
-
-/* Define to 1 on systems derived from System V Release 4 */
-#undef SVR4
-
-/* Support TCP socket connections */
-#undef TCPCONN
-
-/* Enable touchscreen support */
-#undef TOUCHSCREEN
-
-/* Support tslib touchscreen abstraction library */
-#undef TSLIB
-
-/* Support UNIX socket connections */
-#undef UNIXCONN
-
-/* Define to use byteswap macros from <sys/endian.h> */
-#undef USE_SYS_ENDIAN_H
-
-/* unaligned word accesses behave as expected */
-#undef WORKING_UNALIGNED_INT
-
-/* Build X string registry */
-#undef XREGISTRY
-
-/* Build X-ACE extension */
-#undef XACE
-
-/* Build SELinux extension */
-#undef XSELINUX
-
-/* Support XCMisc extension */
-#undef XCMISC
-
-/* Build Security extension */
-#undef XCSECURITY
-
-/* Support Xdmcp */
-#undef XDMCP
-
-/* Build XFree86 BigFont extension */
-#undef XF86BIGFONT
-
-/* Support XFree86 Video Mode extension */
-#undef XF86VIDMODE
-
-/* Support XFixes extension */
-#undef XFIXES
-
-/* Build XDGA support */
-#undef XFreeXDGA
-
-/* Support Xinerama extension */
-#undef XINERAMA
-
-/* Vendor release */
-#undef XORG_RELEASE
-
-/* Current Xorg version */
-#undef XORG_VERSION_CURRENT
-
-/* Xorg release date */
-#undef XORG_DATE
-
-/* Build Xv Extension */
-#undef XvExtension
-
-/* Build XvMC Extension */
-#undef XvMCExtension
-
-/* Support XSync extension */
-#undef XSYNC
-
-/* Support XTest extension */
-#undef XTEST
-
-/* Support Xv extension */
-#undef XV
-
-/* Support DRI extension */
-#undef XF86DRI
-
-/* Build DRI2 extension */
-#undef DRI2
-
-/* Build DBE support */
-#undef DBE
-
-/* Vendor name */
-#undef XVENDORNAME
-
-/* Enable GNU and other extensions to the C environment for GLIBC */
-#undef _GNU_SOURCE
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef pid_t
-
-/* Build Rootless code */
-#undef ROOTLESS
-
-/* Define to 1 if unsigned long is 64 bits. */
-#undef _XSERVER64
-
-/* System is BSD-like */
-#undef CSRG_BASED
-
-/* Define to 1 if `struct sockaddr_in' has a `sin_len' member */
-#undef BSD44SOCKETS
-
-/* Support D-Bus */
-#undef HAVE_DBUS
-
-/* Use libudev for input hotplug */
-#undef CONFIG_UDEV
-
-/* Use D-Bus for input hotplug */
-#undef CONFIG_NEED_DBUS
-
-/* Support the D-Bus hotplug API */
-#undef CONFIG_DBUS_API
-
-/* Support HAL for hotplug */
-#undef CONFIG_HAL
-
-/* Have a monotonic clock from clock_gettime() */
-#undef MONOTONIC_CLOCK
-
-/* Define to 1 if the DTrace Xserver provider probes should be built in */
-#undef XSERVER_DTRACE
-
-/* Define to 16-bit byteswap macro */
-#undef bswap_16
-
-/* Define to 32-bit byteswap macro */
-#undef bswap_32
-
-/* Define to 64-bit byteswap macro */
-#undef bswap_64
-
-/* Need the strcasecmp function. */
-#undef NEED_STRCASECMP
-
-/* Need the strncasecmp function. */
-#undef NEED_STRNCASECMP
-
-/* Need the strcasestr function. */
-#undef NEED_STRCASESTR
-
-/* Define to 1 if you have the `ffs' function. */
-#undef HAVE_FFS
-
-/* Correctly set _XSERVER64 for OSX fat binaries */
-#ifdef __APPLE__
-#include "dix-config-apple-verbatim.h"
-#endif
-
-#endif /* _DIX_CONFIG_H_ */
+/* dix-config.h.in: not at all generated. -*- c -*- */
+
+#ifndef _DIX_CONFIG_H_
+#define _DIX_CONFIG_H_
+
+/* Support BigRequests extension */
+#undef BIGREQS
+
+/* Builder address */
+#undef BUILDERADDR
+
+/* Operating System Name */
+#undef OSNAME
+
+/* Operating System Vendor */
+#undef OSVENDOR
+
+/* Builder string */
+#undef BUILDERSTRING
+
+/* Default font path */
+#undef COMPILEDDEFAULTFONTPATH
+
+/* Miscellaneous server configuration files path */
+#undef SERVER_MISC_CONFIG_PATH
+
+/* Support Composite Extension */
+#undef COMPOSITE
+
+/* Support Damage extension */
+#undef DAMAGE
+
+/* Build for darwin with Quartz support */
+#undef DARWIN_WITH_QUARTZ
+
+/* Use OsVendorVErrorF */
+#undef DDXOSVERRORF
+
+/* Use ddxBeforeReset */
+#undef DDXBEFORERESET
+
+/* Build DPMS extension */
+#undef DPMSExtension
+
+/* Build GLX extension */
+#undef GLXEXT
+
+/* Build GLX DRI loader */
+#undef GLX_DRI
+
+/* Path to DRI drivers */
+#undef DRI_DRIVER_PATH
+
+/* Support XDM-AUTH*-1 */
+#undef HASXDMAUTH
+
+/* Define to 1 if you have the `getdtablesize' function. */
+#undef HAS_GETDTABLESIZE
+
+/* Define to 1 if you have the `getifaddrs' function. */
+#undef HAS_GETIFADDRS
+
+/* Define to 1 if you have the `getpeereid' function. */
+#undef HAS_GETPEEREID
+
+/* Define to 1 if you have the `getpeerucred' function. */
+#undef HAS_GETPEERUCRED
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAS_MMAP
+
+/* Support SHM */
+#undef HAS_SHM
+
+/* Have the 'strlcpy' function */
+#undef HAS_STRLCPY
+
+/* Define to 1 if you have the <asm/mtrr.h> header file. */
+#undef HAVE_ASM_MTRR_H
+
+/* Has backtrace support */
+#undef HAVE_BACKTRACE
+
+/* Define to 1 if you have the <byteswap.h> header file. */
+#undef HAVE_BYTESWAP_H
+
+/* Define to 1 if you have cbrt */
+#undef HAVE_CBRT
+
+/* Define to 1 if you have the <dbm.h> header file. */
+#undef HAVE_DBM_H
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* Have execinfo.h */
+#undef HAVE_EXECINFO_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `geteuid' function. */
+#undef HAVE_GETEUID
+
+/* Define to 1 if you have the `getisax' function. */
+#undef HAVE_GETISAX
+
+/* Define to 1 if you have the `getuid' function. */
+#undef HAVE_GETUID
+
+/* Define to 1 if you have the `getzoneid' function. */
+#undef HAVE_GETZONEID
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Have Quartz */
+#undef XQUARTZ
+
+/* Support application updating through sparkle. */
+#undef XQUARTZ_SPARKLE
+
+/* Prefix to use for launchd identifiers */
+#undef LAUNCHD_ID_PREFIX
+
+/* Build a standalone xpbproxy */
+#undef STANDALONE_XPBPROXY
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the `link' function. */
+#undef HAVE_LINK
+
+/* Define to 1 if you have the <linux/agpgart.h> header file. */
+#undef HAVE_LINUX_AGPGART_H
+
+/* Define to 1 if you have the <linux/apm_bios.h> header file. */
+#undef HAVE_LINUX_APM_BIOS_H
+
+/* Define to 1 if you have the <linux/fb.h> header file. */
+#undef HAVE_LINUX_FB_H
+
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have the <ndbm.h> header file. */
+#undef HAVE_NDBM_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the <rpcsvc/dbm.h> header file. */
+#undef HAVE_RPCSVC_DBM_H
+
+/* Define to use libc SHA1 functions */
+#undef HAVE_SHA1_IN_LIBC
+
+/* Define to use CommonCrypto SHA1 functions */
+#undef HAVE_SHA1_IN_COMMONCRYPTO
+
+/* Define to use libmd SHA1 functions */
+#undef HAVE_SHA1_IN_LIBMD
+
+/* Define to use libgcrypt SHA1 functions */
+#undef HAVE_SHA1_IN_LIBGCRYPT
+
+/* Define to use libsha1 for SHA1 */
+#undef HAVE_SHA1_IN_LIBSHA1
+
+/* Define to 1 if you have the `shmctl64' function. */
+#undef HAVE_SHMCTL64
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strrchr' function. */
+#undef HAVE_STRRCHR
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if SYSV IPC is available */
+#undef HAVE_SYSV_IPC
+
+/* Define to 1 if you have the <sys/agpio.h> header file. */
+#undef HAVE_SYS_AGPIO_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/io.h> header file. */
+#undef HAVE_SYS_IO_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/utsname.h> header file. */
+#undef HAVE_SYS_UTSNAME_H
+
+/* Define to 1 if you have the <sys/vm86.h> header file. */
+#undef HAVE_SYS_VM86_H
+
+/* Define to 1 if you have the <tslib.h> header file. */
+#undef HAVE_TSLIB_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <fnmatch.h> header file. */
+#undef HAVE_FNMATCH_H
+
+/* Have /dev/urandom */
+#undef HAVE_URANDOM
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
+
+/* Support IPv6 for TCP connections */
+#undef IPv6
+
+/* Support os-specific local connections */
+#undef LOCALCONN
+
+/* Support MIT-SHM Extension */
+#undef MITSHM
+
+/* Enable some debugging code */
+#undef DEBUG
+
+/* Name of package */
+#undef PACKAGE
+
+/* Internal define for Xinerama */
+#undef PANORAMIX
+
+/* Overall prefix */
+#undef PROJECTROOT
+
+/* Support RANDR extension */
+#undef RANDR
+
+/* Support Record extension */
+#undef XRECORD
+
+/* Support RENDER extension */
+#undef RENDER
+
+/* Support X resource extension */
+#undef RES
+
+/* Support MIT-SCREEN-SAVER extension */
+#undef SCREENSAVER
+
+/* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */
+#undef SECURE_RPC
+
+/* Support SHAPE extension */
+#undef SHAPE
+
+/* Define to 1 on systems derived from System V Release 4 */
+#undef SVR4
+
+/* Support TCP socket connections */
+#undef TCPCONN
+
+/* Enable touchscreen support */
+#undef TOUCHSCREEN
+
+/* Support tslib touchscreen abstraction library */
+#undef TSLIB
+
+/* Support UNIX socket connections */
+#undef UNIXCONN
+
+/* Define to use byteswap macros from <sys/endian.h> */
+#undef USE_SYS_ENDIAN_H
+
+/* unaligned word accesses behave as expected */
+#undef WORKING_UNALIGNED_INT
+
+/* Build X string registry */
+#undef XREGISTRY
+
+/* Build X-ACE extension */
+#undef XACE
+
+/* Build SELinux extension */
+#undef XSELINUX
+
+/* Support XCMisc extension */
+#undef XCMISC
+
+/* Build Security extension */
+#undef XCSECURITY
+
+/* Support Xdmcp */
+#undef XDMCP
+
+/* Build XFree86 BigFont extension */
+#undef XF86BIGFONT
+
+/* Support XFree86 Video Mode extension */
+#undef XF86VIDMODE
+
+/* Support XFixes extension */
+#undef XFIXES
+
+/* Build XDGA support */
+#undef XFreeXDGA
+
+/* Support Xinerama extension */
+#undef XINERAMA
+
+/* Vendor release */
+#undef XORG_RELEASE
+
+/* Current Xorg version */
+#undef XORG_VERSION_CURRENT
+
+/* Xorg release date */
+#undef XORG_DATE
+
+/* Build Xv Extension */
+#undef XvExtension
+
+/* Build XvMC Extension */
+#undef XvMCExtension
+
+/* Support XSync extension */
+#undef XSYNC
+
+/* Support XTest extension */
+#undef XTEST
+
+/* Support Xv extension */
+#undef XV
+
+/* Support DRI extension */
+#undef XF86DRI
+
+/* Build DRI2 extension */
+#undef DRI2
+
+/* Build DBE support */
+#undef DBE
+
+/* Vendor name */
+#undef XVENDORNAME
+
+/* Enable GNU and other extensions to the C environment for GLIBC */
+#undef _GNU_SOURCE
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Build Rootless code */
+#undef ROOTLESS
+
+/* Define to 1 if unsigned long is 64 bits. */
+#undef _XSERVER64
+
+/* System is BSD-like */
+#undef CSRG_BASED
+
+/* Define to 1 if `struct sockaddr_in' has a `sin_len' member */
+#undef BSD44SOCKETS
+
+/* Support D-Bus */
+#undef HAVE_DBUS
+
+/* Use libudev for input hotplug */
+#undef CONFIG_UDEV
+
+/* Use D-Bus for input hotplug */
+#undef CONFIG_NEED_DBUS
+
+/* Support the D-Bus hotplug API */
+#undef CONFIG_DBUS_API
+
+/* Support HAL for hotplug */
+#undef CONFIG_HAL
+
+/* Have a monotonic clock from clock_gettime() */
+#undef MONOTONIC_CLOCK
+
+/* Define to 1 if the DTrace Xserver provider probes should be built in */
+#undef XSERVER_DTRACE
+
+/* Define to 16-bit byteswap macro */
+#undef bswap_16
+
+/* Define to 32-bit byteswap macro */
+#undef bswap_32
+
+/* Define to 64-bit byteswap macro */
+#undef bswap_64
+
+/* Need the strcasecmp function. */
+#undef NEED_STRCASECMP
+
+/* Need the strncasecmp function. */
+#undef NEED_STRNCASECMP
+
+/* Need the strcasestr function. */
+#undef NEED_STRCASESTR
+
+/* Define to 1 if you have the `ffs' function. */
+#undef HAVE_FFS
+
+/* Correctly set _XSERVER64 for OSX fat binaries */
+#ifdef __APPLE__
+#include "dix-config-apple-verbatim.h"
+#endif
+
+#endif /* _DIX_CONFIG_H_ */
diff --git a/xorg-server/include/dix.h b/xorg-server/include/dix.h
index 254ddb3f4..e5a0d5c51 100644
--- a/xorg-server/include/dix.h
+++ b/xorg-server/include/dix.h
@@ -83,7 +83,7 @@ SOFTWARE.
if (!LegalNewID(id,client)) \
{\
client->errorValue = id;\
- return(BadIDChoice);\
+ return BadIDChoice;\
}
#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
@@ -95,7 +95,7 @@ SOFTWARE.
if (rc != Success)\
return rc;\
if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
- return (BadMatch);\
+ return BadMatch;\
}\
if (pGC->serialNumber != pDraw->serialNumber)\
ValidateGC(pDraw, pGC);
diff --git a/xorg-server/include/globals.h b/xorg-server/include/globals.h
index 6959fc71a..e9a6028dd 100644
--- a/xorg-server/include/globals.h
+++ b/xorg-server/include/globals.h
@@ -1,128 +1,125 @@
-
-#ifndef _XSERV_GLOBAL_H_
-#define _XSERV_GLOBAL_H_
-
-#include "window.h" /* for WindowPtr */
-
-/* Global X server variables that are visible to mi, dix, os, and ddx */
-
-extern _X_EXPORT CARD32 defaultScreenSaverTime;
-extern _X_EXPORT CARD32 defaultScreenSaverInterval;
-extern _X_EXPORT CARD32 ScreenSaverTime;
-extern _X_EXPORT CARD32 ScreenSaverInterval;
-
-#ifdef SCREENSAVER
-extern _X_EXPORT Bool screenSaverSuspended;
-#endif
-
-extern _X_EXPORT char *defaultFontPath;
-extern _X_EXPORT int monitorResolution;
-extern _X_EXPORT int defaultColorVisualClass;
-
-extern _X_EXPORT WindowPtr WindowTable[MAXSCREENS];
-extern _X_EXPORT int GrabInProgress;
-extern _X_EXPORT Bool noTestExtensions;
-
-extern _X_EXPORT DDXPointRec dixScreenOrigins[MAXSCREENS];
-
-extern _X_EXPORT char *ConnectionInfo;
-
-#ifdef DPMSExtension
-extern _X_EXPORT CARD32 DPMSStandbyTime;
-extern _X_EXPORT CARD32 DPMSSuspendTime;
-extern _X_EXPORT CARD32 DPMSOffTime;
-extern _X_EXPORT CARD16 DPMSPowerLevel;
-extern _X_EXPORT Bool DPMSEnabled;
-extern _X_EXPORT Bool DPMSDisabledSwitch;
-extern _X_EXPORT Bool DPMSCapableFlag;
-#endif
-
-#ifdef PANORAMIX
-extern _X_EXPORT Bool PanoramiXExtensionDisabledHack;
-#endif
-
-#ifdef COMPOSITE
-extern _X_EXPORT Bool noCompositeExtension;
-#endif
-
-#ifdef DAMAGE
-extern _X_EXPORT Bool noDamageExtension;
-#endif
-
-#ifdef DBE
-extern _X_EXPORT Bool noDbeExtension;
-#endif
-
-#ifdef DPMSExtension
-extern _X_EXPORT Bool noDPMSExtension;
-#endif
-
-#ifdef GLXEXT
-extern _X_EXPORT Bool noGlxExtension;
-#endif
-
-#ifdef SCREENSAVER
-extern _X_EXPORT Bool noScreenSaverExtension;
-#endif
-
-#ifdef MITSHM
-extern _X_EXPORT Bool noMITShmExtension;
-#endif
-
-#ifdef RANDR
-extern _X_EXPORT Bool noRRExtension;
-#endif
-
-extern _X_EXPORT Bool noRenderExtension;
-
-#ifdef XCSECURITY
-extern _X_EXPORT Bool noSecurityExtension;
-#endif
-
-#ifdef RES
-extern _X_EXPORT Bool noResExtension;
-#endif
-
-#ifdef XF86BIGFONT
-extern _X_EXPORT Bool noXFree86BigfontExtension;
-#endif
-
-#ifdef XFreeXDGA
-extern _X_EXPORT Bool noXFree86DGAExtension;
-#endif
-
-#ifdef XF86DRI
-extern _X_EXPORT Bool noXFree86DRIExtension;
-#endif
-
-#ifdef XF86VIDMODE
-extern _X_EXPORT Bool noXFree86VidModeExtension;
-#endif
-
-#ifdef XFIXES
-extern _X_EXPORT Bool noXFixesExtension;
-#endif
-
-#ifdef PANORAMIX
-extern _X_EXPORT Bool noPanoramiXExtension;
-#endif
-
-#ifdef XSELINUX
-extern _X_EXPORT Bool noSELinuxExtension;
-
-#define SELINUX_MODE_DEFAULT 0
-#define SELINUX_MODE_DISABLED 1
-#define SELINUX_MODE_PERMISSIVE 2
-#define SELINUX_MODE_ENFORCING 3
-extern _X_EXPORT int selinuxEnforcingState;
-#endif
-
-#ifdef XV
-extern _X_EXPORT Bool noXvExtension;
-#endif
-
-#ifdef DRI2
-extern _X_EXPORT Bool noDRI2Extension;
-#endif
-
-#endif /* !_XSERV_GLOBAL_H_ */
+
+#ifndef _XSERV_GLOBAL_H_
+#define _XSERV_GLOBAL_H_
+
+#include "window.h" /* for WindowPtr */
+
+/* Global X server variables that are visible to mi, dix, os, and ddx */
+
+extern _X_EXPORT CARD32 defaultScreenSaverTime;
+extern _X_EXPORT CARD32 defaultScreenSaverInterval;
+extern _X_EXPORT CARD32 ScreenSaverTime;
+extern _X_EXPORT CARD32 ScreenSaverInterval;
+
+#ifdef SCREENSAVER
+extern _X_EXPORT Bool screenSaverSuspended;
+#endif
+
+extern _X_EXPORT char *defaultFontPath;
+extern _X_EXPORT int monitorResolution;
+extern _X_EXPORT int defaultColorVisualClass;
+
+extern _X_EXPORT int GrabInProgress;
+extern _X_EXPORT Bool noTestExtensions;
+
+extern _X_EXPORT char *ConnectionInfo;
+
+#ifdef DPMSExtension
+extern _X_EXPORT CARD32 DPMSStandbyTime;
+extern _X_EXPORT CARD32 DPMSSuspendTime;
+extern _X_EXPORT CARD32 DPMSOffTime;
+extern _X_EXPORT CARD16 DPMSPowerLevel;
+extern _X_EXPORT Bool DPMSEnabled;
+extern _X_EXPORT Bool DPMSDisabledSwitch;
+extern _X_EXPORT Bool DPMSCapableFlag;
+#endif
+
+#ifdef PANORAMIX
+extern _X_EXPORT Bool PanoramiXExtensionDisabledHack;
+#endif
+
+#ifdef COMPOSITE
+extern _X_EXPORT Bool noCompositeExtension;
+#endif
+
+#ifdef DAMAGE
+extern _X_EXPORT Bool noDamageExtension;
+#endif
+
+#ifdef DBE
+extern _X_EXPORT Bool noDbeExtension;
+#endif
+
+#ifdef DPMSExtension
+extern _X_EXPORT Bool noDPMSExtension;
+#endif
+
+#ifdef GLXEXT
+extern _X_EXPORT Bool noGlxExtension;
+#endif
+
+#ifdef SCREENSAVER
+extern _X_EXPORT Bool noScreenSaverExtension;
+#endif
+
+#ifdef MITSHM
+extern _X_EXPORT Bool noMITShmExtension;
+#endif
+
+#ifdef RANDR
+extern _X_EXPORT Bool noRRExtension;
+#endif
+
+extern _X_EXPORT Bool noRenderExtension;
+
+#ifdef XCSECURITY
+extern _X_EXPORT Bool noSecurityExtension;
+#endif
+
+#ifdef RES
+extern _X_EXPORT Bool noResExtension;
+#endif
+
+#ifdef XF86BIGFONT
+extern _X_EXPORT Bool noXFree86BigfontExtension;
+#endif
+
+#ifdef XFreeXDGA
+extern _X_EXPORT Bool noXFree86DGAExtension;
+#endif
+
+#ifdef XF86DRI
+extern _X_EXPORT Bool noXFree86DRIExtension;
+#endif
+
+#ifdef XF86VIDMODE
+extern _X_EXPORT Bool noXFree86VidModeExtension;
+#endif
+
+#ifdef XFIXES
+extern _X_EXPORT Bool noXFixesExtension;
+#endif
+
+#ifdef PANORAMIX
+extern _X_EXPORT Bool noPanoramiXExtension;
+#endif
+
+#ifdef XSELINUX
+extern _X_EXPORT Bool noSELinuxExtension;
+
+#define SELINUX_MODE_DEFAULT 0
+#define SELINUX_MODE_DISABLED 1
+#define SELINUX_MODE_PERMISSIVE 2
+#define SELINUX_MODE_ENFORCING 3
+extern _X_EXPORT int selinuxEnforcingState;
+#endif
+
+#ifdef XV
+extern _X_EXPORT Bool noXvExtension;
+#endif
+
+#ifdef DRI2
+extern _X_EXPORT Bool noDRI2Extension;
+#endif
+
+#endif /* !_XSERV_GLOBAL_H_ */
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h
index b0979b4df..e96a44d50 100644
--- a/xorg-server/include/input.h
+++ b/xorg-server/include/input.h
@@ -215,6 +215,8 @@ typedef struct _InputAttributes {
char *product;
char *vendor;
char *device;
+ char *pnp_id;
+ char *usb_id;
char **tags; /* null-terminated */
uint32_t flags;
} InputAttributes;
diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h
index fa21c7b3a..c37f30073 100644
--- a/xorg-server/include/inputstr.h
+++ b/xorg-server/include/inputstr.h
@@ -49,6 +49,7 @@ SOFTWARE.
#ifndef INPUTSTRUCT_H
#define INPUTSTRUCT_H
+#include <pixman.h>
#include "input.h"
#include "window.h"
#include "dixstruct.h"
@@ -550,6 +551,12 @@ typedef struct _DeviceIntRec {
XIPropertyPtr properties;
XIPropertyHandlerPtr handlers; /* NULL-terminated */
} properties;
+
+ /* coordinate transformation matrix for absolute input devices */
+ struct pixman_f_transform transform;
+
+ /* XTest related master device id */
+ int xtest_master_id;
} DeviceIntRec;
typedef struct {
diff --git a/xorg-server/include/pixmap.h b/xorg-server/include/pixmap.h
index 55a9c818a..9761ce48c 100644
--- a/xorg-server/include/pixmap.h
+++ b/xorg-server/include/pixmap.h
@@ -1,118 +1,121 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef PIXMAP_H
-#define PIXMAP_H
-
-#include "misc.h"
-#include "screenint.h"
-
-/* types for Drawable */
-#define DRAWABLE_WINDOW 0
-#define DRAWABLE_PIXMAP 1
-#define UNDRAWABLE_WINDOW 2
-#define DRAWABLE_BUFFER 3
-
-/* corresponding type masks for dixLookupDrawable() */
-#define M_DRAWABLE_WINDOW (1<<0)
-#define M_DRAWABLE_PIXMAP (1<<1)
-#define M_UNDRAWABLE_WINDOW (1<<2)
-#define M_DRAWABLE_BUFFER (1<<3)
-#define M_ANY (-1)
-#define M_WINDOW (M_DRAWABLE_WINDOW|M_UNDRAWABLE_WINDOW)
-#define M_DRAWABLE (M_DRAWABLE_WINDOW|M_DRAWABLE_PIXMAP|M_DRAWABLE_BUFFER)
-#define M_UNDRAWABLE (M_UNDRAWABLE_WINDOW)
-
-/* flags to PaintWindow() */
-#define PW_BACKGROUND 0
-#define PW_BORDER 1
-
-#define NullPixmap ((PixmapPtr)0)
-
-typedef struct _Drawable *DrawablePtr;
-typedef struct _Pixmap *PixmapPtr;
-
-typedef union _PixUnion {
- PixmapPtr pixmap;
- unsigned long pixel;
-} PixUnion;
-
-#define SamePixUnion(a,b,isPixel)\
- ((isPixel) ? (a).pixel == (b).pixel : (a).pixmap == (b).pixmap)
-
-#define EqualPixUnion(as, a, bs, b) \
- ((as) == (bs) && (SamePixUnion (a, b, as)))
-
-#define OnScreenDrawable(type) \
- ((type == DRAWABLE_WINDOW) || (type == DRAWABLE_BUFFER))
-
-#define WindowDrawable(type) \
- ((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW))
-
-extern _X_EXPORT PixmapPtr GetScratchPixmapHeader(
- ScreenPtr /*pScreen*/,
- int /*width*/,
- int /*height*/,
- int /*depth*/,
- int /*bitsPerPixel*/,
- int /*devKind*/,
- pointer /*pPixData*/);
-
-extern _X_EXPORT void FreeScratchPixmapHeader(
- PixmapPtr /*pPixmap*/);
-
-extern _X_EXPORT Bool CreateScratchPixmapsForScreen(
- int /*scrnum*/);
-
-extern _X_EXPORT void FreeScratchPixmapsForScreen(
- int /*scrnum*/);
-
-extern _X_EXPORT PixmapPtr AllocatePixmap(
- ScreenPtr /*pScreen*/,
- int /*pixDataSize*/);
-
-#endif /* PIXMAP_H */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef PIXMAP_H
+#define PIXMAP_H
+
+#include "misc.h"
+#include "screenint.h"
+
+/* types for Drawable */
+#define DRAWABLE_WINDOW 0
+#define DRAWABLE_PIXMAP 1
+#define UNDRAWABLE_WINDOW 2
+#define DRAWABLE_BUFFER 3
+
+/* corresponding type masks for dixLookupDrawable() */
+#define M_DRAWABLE_WINDOW (1<<0)
+#define M_DRAWABLE_PIXMAP (1<<1)
+#define M_UNDRAWABLE_WINDOW (1<<2)
+#define M_DRAWABLE_BUFFER (1<<3)
+#define M_ANY (-1)
+#define M_WINDOW (M_DRAWABLE_WINDOW|M_UNDRAWABLE_WINDOW)
+#define M_DRAWABLE (M_DRAWABLE_WINDOW|M_DRAWABLE_PIXMAP|M_DRAWABLE_BUFFER)
+#define M_UNDRAWABLE (M_UNDRAWABLE_WINDOW)
+
+/* flags to PaintWindow() */
+#define PW_BACKGROUND 0
+#define PW_BORDER 1
+
+#define NullPixmap ((PixmapPtr)0)
+
+typedef struct _Drawable *DrawablePtr;
+typedef struct _Pixmap *PixmapPtr;
+
+typedef union _PixUnion {
+ PixmapPtr pixmap;
+ unsigned long pixel;
+} PixUnion;
+
+#define SamePixUnion(a,b,isPixel)\
+ ((isPixel) ? (a).pixel == (b).pixel : (a).pixmap == (b).pixmap)
+
+#define EqualPixUnion(as, a, bs, b) \
+ ((as) == (bs) && (SamePixUnion (a, b, as)))
+
+#define OnScreenDrawable(type) \
+ ((type == DRAWABLE_WINDOW) || (type == DRAWABLE_BUFFER))
+
+#define WindowDrawable(type) \
+ ((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW))
+
+extern _X_EXPORT PixmapPtr GetScratchPixmapHeader(
+ ScreenPtr /*pScreen*/,
+ int /*width*/,
+ int /*height*/,
+ int /*depth*/,
+ int /*bitsPerPixel*/,
+ int /*devKind*/,
+ pointer /*pPixData*/);
+
+extern _X_EXPORT void FreeScratchPixmapHeader(
+ PixmapPtr /*pPixmap*/);
+
+extern _X_EXPORT Bool CreateScratchPixmapsForScreen(
+ int /*scrnum*/);
+
+extern _X_EXPORT void FreeScratchPixmapsForScreen(
+ int /*scrnum*/);
+
+extern _X_EXPORT PixmapPtr AllocatePixmap(
+ ScreenPtr /*pScreen*/,
+ int /*pixDataSize*/);
+
+extern _X_EXPORT void FreePixmap(
+ PixmapPtr /*pPixmap*/);
+
+#endif /* PIXMAP_H */
diff --git a/xorg-server/include/privates.h b/xorg-server/include/privates.h
index cbb08887f..2774776ab 100644
--- a/xorg-server/include/privates.h
+++ b/xorg-server/include/privates.h
@@ -12,125 +12,257 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef PRIVATES_H
#define PRIVATES_H 1
-#include "dix.h"
-#include "resource.h"
+#include <X11/Xdefs.h>
+#include <X11/Xosdefs.h>
+#include <X11/Xfuncproto.h>
+#include "misc.h"
/*****************************************************************
* STUFF FOR PRIVATES
*****************************************************************/
-typedef int *DevPrivateKey;
-struct _Private;
-typedef struct _Private PrivateRec;
+typedef struct _Private PrivateRec, *PrivatePtr;
+
+typedef enum {
+ /* XSELinux uses the same private keys for numerous objects */
+ PRIVATE_XSELINUX,
+
+ /* Otherwise, you get a private in just the requested structure
+ */
+ /* These can have objects created before all of the keys are registered */
+ PRIVATE_SCREEN,
+ PRIVATE_EXTENSION,
+ PRIVATE_COLORMAP,
+
+ /* These cannot have any objects before all relevant keys are registered */
+ PRIVATE_DEVICE,
+ PRIVATE_CLIENT,
+ PRIVATE_PROPERTY,
+ PRIVATE_SELECTION,
+ PRIVATE_WINDOW,
+ PRIVATE_PIXMAP,
+ PRIVATE_GC,
+ PRIVATE_CURSOR,
+ PRIVATE_CURSOR_BITS,
+
+ /* extension privates */
+ PRIVATE_DBE_WINDOW,
+ PRIVATE_DAMAGE,
+ PRIVATE_GLYPH,
+ PRIVATE_GLYPHSET,
+ PRIVATE_PICTURE,
+
+ /* last private type */
+ PRIVATE_LAST,
+} DevPrivateType;
+
+typedef struct _DevPrivateKeyRec {
+ int offset;
+ int size;
+ Bool initialized;
+ Bool allocated;
+ DevPrivateType type;
+ struct _DevPrivateKeyRec *next;
+} DevPrivateKeyRec, *DevPrivateKey;
/*
- * Request pre-allocated private space for your driver/module. This function
- * increases the amount of space allocated automatically when dixLookupPrivate
- * is called on a PrivateRec that does not yet have a value associated with
- * 'key'.
- *
- * This function will only increase the reserved size: if a size was previously
- * requested, then dixRequestPrivate causes later calls to dixLookupPrivate to
- * allocate the maximum of the old size and 'size'. Requested sizes are reset
- * to 0 by dixResetPrivates, which is called before each server generation.
- *
- * If dixRequestPrivate is not called with a nonzero size for 'key', then the
- * module responsible for 'key' must manage the associated pointer itself with
- * dixSetPrivate.
- *
- * dixRequestPrivate returns FALSE if it cannot store the requested size.
+ * Let drivers know how to initialize private keys
*/
-extern _X_EXPORT int
-dixRequestPrivate(const DevPrivateKey key, unsigned size);
+
+#define HAS_DEVPRIVATEKEYREC 1
+#define HAS_DIXREGISTERPRIVATEKEY 1
/*
- * Allocates space for an association of 'key' with a value in 'privates'.
+ * Register a new private index for the private type.
*
- * If a nonzero size was requested with dixRequestPrivate, then
- * dixAllocatePrivate also allocates the requested amount of memory and
- * associates the pointer to that memory with 'key' in 'privates'. The
- * allocated memory is initialized to zero. This memory can only be freed by
- * dixFreePrivates.
+ * This initializes the specified key and optionally requests pre-allocated
+ * private space for your driver/module. If you request no extra space, you
+ * may set and get a single pointer value using this private key. Otherwise,
+ * you can get the address of the extra space and store whatever data you like
+ * there.
*
- * If dixRequestPrivate was never called with a nonzero size, then
- * dixAllocatePrivate associates NULL with 'key' in 'privates'.
+ * You may call dixRegisterPrivate more than once on the same key, but the
+ * size and type must match or the server will abort.
*
- * dixAllocatePrivate returns a pointer to the value associated with 'key' in
- * 'privates', unless a memory allocation fails, in which case it returns NULL.
+ * dixRegisterPrivateIndex returns FALSE if it fails to allocate memory
+ * during its operation.
*/
-extern _X_EXPORT pointer *
-dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key);
+extern _X_EXPORT Bool
+dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size);
/*
- * Look up a private pointer.
+ * Check whether a private key has been registered
+ */
+static inline Bool
+dixPrivateKeyRegistered(DevPrivateKey key)
+{
+ return key->initialized;
+}
+
+/*
+ * Allocate a new private key.
*
- * If no value is currently associated with 'key' in 'privates', then
- * dixLookupPrivate calls dixAllocatePrivate and returns the resulting
- * associated value.
+ * This manages the storage of the key object itself, freeing it when the
+ * privates system is restarted at server reset time. All other keys
+ * are expected to be statically allocated as the privates must be
+ * reset after all objects have been freed
+ */
+extern _X_EXPORT DevPrivateKey
+dixCreatePrivateKey(DevPrivateType type, unsigned size);
+
+/*
+ * Get the address of the private storage.
*
- * dixLookupPrivate returns NULL if a memory allocation fails.
+ * For keys with pre-defined storage, this gets the base of that storage
+ * Otherwise, it returns the place where the private pointer is stored.
*/
-extern _X_EXPORT pointer
-dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key);
+static inline void *
+dixGetPrivateAddr(PrivatePtr *privates, const DevPrivateKey key)
+{
+ assert(key->initialized);
+ return (char *) (*privates) + key->offset;
+}
/*
- * Look up the address of a private pointer. If 'key' is not associated with a
- * value in 'privates', then dixLookupPrivateAddr calls dixAllocatePrivate and
- * returns a pointer to the resulting associated value.
+ * Fetch a private pointer stored in the object
*
- * dixLookupPrivateAddr returns NULL if 'key' was not previously associated in
- * 'privates' and a memory allocation fails.
+ * Returns the pointer stored with dixSetPrivate.
+ * This must only be used with keys that have
+ * no pre-defined storage
*/
-extern _X_EXPORT pointer *
-dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key);
+static inline void *
+dixGetPrivate(PrivatePtr *privates, const DevPrivateKey key)
+{
+ assert (key->size == 0);
+ return *(void **) dixGetPrivateAddr(privates, key);
+}
/*
* Associate 'val' with 'key' in 'privates' so that later calls to
* dixLookupPrivate(privates, key) will return 'val'.
+ */
+static inline void
+dixSetPrivate(PrivatePtr *privates, const DevPrivateKey key, pointer val)
+{
+ assert (key->size == 0);
+ *(pointer *) dixGetPrivateAddr(privates, key) = val;
+}
+
+#include "dix.h"
+#include "resource.h"
+
+/*
+ * Lookup a pointer to the private record.
*
- * dixSetPrivate returns FALSE if a memory allocation fails.
+ * For privates with defined storage, return the address of the
+ * storage. For privates without defined storage, return the pointer
+ * contents
*/
-extern _X_EXPORT int
-dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val);
+static inline pointer
+dixLookupPrivate(PrivatePtr *privates, const DevPrivateKey key)
+{
+ if (key->size)
+ return dixGetPrivateAddr(privates, key);
+ else
+ return dixGetPrivate(privates, key);
+}
+
+/*
+ * Look up the address of the pointer to the storage
+ *
+ * This returns the place where the private pointer is stored,
+ * which is only valid for privates without predefined storage.
+ */
+static inline pointer *
+dixLookupPrivateAddr(PrivatePtr *privates, const DevPrivateKey key)
+{
+ assert (key->size == 0);
+ return dixGetPrivateAddr(privates, key);
+}
/*
- * Unassociates all keys from 'privates' and frees all private data automatically
- * allocated via dixRequestPrivate.
+ * Allocates private data separately from main object.
+ *
+ * For objects created during server initialization, this allows those
+ * privates to be re-allocated as new private keys are registered.
+ *
+ * This includes screens, the serverClient, default colormaps and
+ * extensions entries.
+ */
+extern _X_EXPORT Bool
+dixAllocatePrivates(PrivatePtr *privates, DevPrivateType type);
+
+/*
+ * Frees separately allocated private data
*/
extern _X_EXPORT void
-dixFreePrivates(PrivateRec *privates);
+dixFreePrivates(PrivatePtr privates, DevPrivateType type);
/*
- * Resets the privates subsystem. dixResetPrivates is called from the main loop
- * before each server generation. This function must only be called by main().
+ * Initialize privates by zeroing them
*/
-extern _X_EXPORT int
-dixResetPrivates(void);
+extern _X_EXPORT void
+_dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type);
+
+#define dixInitPrivates(o, v, type) _dixInitPrivates(&(o)->devPrivates, (v), type);
/*
- * These next two functions are necessary because the position of
- * the devPrivates field varies by structure and calling code might
- * only know the resource type, not the structure definition.
+ * Clean up privates
*/
+extern _X_EXPORT void
+_dixFiniPrivates(PrivatePtr privates, DevPrivateType type);
+
+#define dixFiniPrivates(o,t) _dixFiniPrivates((o)->devPrivates,t)
/*
- * Looks up the offset where the devPrivates field is located.
- * Returns -1 if no offset has been registered for the resource type.
+ * Allocates private data at object creation time. Required
+ * for almost all objects, except for the list described
+ * above for dixAllocatePrivates.
+ */
+extern _X_EXPORT void *
+_dixAllocateObjectWithPrivates(unsigned size, unsigned clear, unsigned offset, DevPrivateType type);
+
+#define dixAllocateObjectWithPrivates(t, type) (t *) _dixAllocateObjectWithPrivates(sizeof(t), sizeof(t), offsetof(t, devPrivates), type)
+
+extern _X_EXPORT void
+_dixFreeObjectWithPrivates(void *object, PrivatePtr privates, DevPrivateType type);
+
+#define dixFreeObjectWithPrivates(o,t) _dixFreeObjectWithPrivates(o, (o)->devPrivates, t)
+
+/*
+ * Return size of privates for the specified type
*/
extern _X_EXPORT int
-dixLookupPrivateOffset(RESTYPE type);
+dixPrivatesSize(DevPrivateType type);
+
+/*
+ * Dump out private stats to ErrorF
+ */
+extern void
+dixPrivateUsage(void);
+
+/*
+ * Resets the privates subsystem. dixResetPrivates is called from the main loop
+ * before each server generation. This function must only be called by main().
+ */
+extern _X_EXPORT void
+dixResetPrivates(void);
/*
- * Specifies the offset where the devPrivates field is located.
- * A negative value indicates no devPrivates field is available.
+ * Looks up the offset where the devPrivates field is located.
+ *
+ * Returns -1 if the specified resource has no dev privates.
+ * The position of the devPrivates field varies by structure
+ * and calling code might only know the resource type, not the
+ * structure definition.
*/
extern _X_EXPORT int
-dixRegisterPrivateOffset(RESTYPE type, int offset);
+dixLookupPrivateOffset(RESTYPE type);
/*
* Convenience macro for adding an offset to an object pointer
* when making a call to one of the devPrivates functions
*/
-#define DEVPRIV_AT(ptr, offset) ((PrivateRec **)((char *)ptr + offset))
+#define DEVPRIV_AT(ptr, offset) ((PrivatePtr *)((char *)(ptr) + offset))
#endif /* PRIVATES_H */
diff --git a/xorg-server/include/regionstr.h b/xorg-server/include/regionstr.h
index d67873295..92f4ca9f2 100644
--- a/xorg-server/include/regionstr.h
+++ b/xorg-server/include/regionstr.h
@@ -66,228 +66,305 @@ typedef struct pixman_region16 RegionRec, *RegionPtr;
typedef struct pixman_region16_data RegDataRec, *RegDataPtr;
-extern _X_EXPORT BoxRec miEmptyBox;
-extern _X_EXPORT RegDataRec miEmptyData;
-extern _X_EXPORT RegDataRec miBrokenData;
+extern _X_EXPORT BoxRec RegionEmptyBox;
+extern _X_EXPORT RegDataRec RegionEmptyData;
+extern _X_EXPORT RegDataRec RegionBrokenData;
+static inline Bool RegionNil(RegionPtr reg) {
+ return ((reg)->data && !(reg)->data->numRects);
+}
-#define REGION_NIL(reg) ((reg)->data && !(reg)->data->numRects)
/* not a region */
-#define REGION_NAR(reg) ((reg)->data == &miBrokenData)
-#define REGION_NUM_RECTS(reg) ((reg)->data ? (reg)->data->numRects : 1)
-#define REGION_SIZE(reg) ((reg)->data ? (reg)->data->size : 0)
-#define REGION_RECTS(reg) ((reg)->data ? (BoxPtr)((reg)->data + 1) \
- : &(reg)->extents)
-#define REGION_BOXPTR(reg) ((BoxPtr)((reg)->data + 1))
-#define REGION_BOX(reg,i) (&REGION_BOXPTR(reg)[i])
-#define REGION_TOP(reg) REGION_BOX(reg, (reg)->data->numRects)
-#define REGION_END(reg) REGION_BOX(reg, (reg)->data->numRects - 1)
-#define REGION_SZOF(n) (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)))
-
-#define REGION_CREATE(_pScreen, _rect, _size) \
- miRegionCreate(_rect, _size)
-
-#define REGION_COPY(_pScreen, dst, src) \
- miRegionCopy(dst, src)
-
-#define REGION_DESTROY(_pScreen, _pReg) \
- miRegionDestroy(_pReg)
-
-#define REGION_INTERSECT(_pScreen, newReg, reg1, reg2) \
- miIntersect(newReg, reg1, reg2)
-
-#define REGION_UNION(_pScreen, newReg, reg1, reg2) \
- miUnion(newReg, reg1, reg2)
-
-#define REGION_SUBTRACT(_pScreen, newReg, reg1, reg2) \
- miSubtract(newReg, reg1, reg2)
-
-#define REGION_INVERSE(_pScreen, newReg, reg1, invRect) \
- miInverse(newReg, reg1, invRect)
-
-#define REGION_TRANSLATE(_pScreen, _pReg, _x, _y) \
- miTranslateRegion(_pReg, _x, _y)
-
-#define RECT_IN_REGION(_pScreen, _pReg, prect) \
- miRectIn(_pReg, prect)
-
-#define POINT_IN_REGION(_pScreen, _pReg, _x, _y, prect) \
- miPointInRegion(_pReg, _x, _y, prect)
-
-#define REGION_APPEND(_pScreen, dstrgn, rgn) \
- miRegionAppend(dstrgn, rgn)
-
-#define REGION_VALIDATE(_pScreen, badreg, pOverlap) \
- miRegionValidate(badreg, pOverlap)
-
-#define BITMAP_TO_REGION(_pScreen, pPix) \
- (*(_pScreen)->BitmapToRegion)(pPix) /* no mi version?! */
-
-#define RECTS_TO_REGION(_pScreen, nrects, prect, ctype) \
- miRectsToRegion(nrects, prect, ctype)
-
-#define REGION_EQUAL(_pScreen, _pReg1, _pReg2) \
- miRegionEqual(_pReg1, _pReg2)
-
-#define REGION_BREAK(_pScreen, _pReg) \
- miRegionBreak(_pReg)
-
-#define REGION_INIT(_pScreen, _pReg, _rect, _size) \
-{ \
- if ((_rect) != NULL) \
- { \
- (_pReg)->extents = *(_rect); \
- (_pReg)->data = (RegDataPtr)NULL; \
- } \
- else \
- { \
- (_pReg)->extents = miEmptyBox; \
- if (((_size) > 1) && ((_pReg)->data = \
- (RegDataPtr)malloc(REGION_SZOF(_size)))) \
- { \
- (_pReg)->data->size = (_size); \
- (_pReg)->data->numRects = 0; \
- } \
- else \
- (_pReg)->data = &miEmptyData; \
- } \
- }
-
-
-#define REGION_UNINIT(_pScreen, _pReg) \
-{ \
- if ((_pReg)->data && (_pReg)->data->size) { \
- free((_pReg)->data); \
- (_pReg)->data = NULL; \
- } \
+
+static inline Bool RegionNar(RegionPtr reg) {
+ return ((reg)->data == &RegionBrokenData);
}
-#define REGION_RESET(_pScreen, _pReg, _pBox) \
-{ \
- (_pReg)->extents = *(_pBox); \
- REGION_UNINIT(_pScreen, _pReg); \
- (_pReg)->data = (RegDataPtr)NULL; \
+static inline int RegionNumRects(RegionPtr reg) {
+ return ((reg)->data ? (reg)->data->numRects : 1);
}
-#define REGION_NOTEMPTY(_pScreen, _pReg) \
- !REGION_NIL(_pReg)
+static inline int RegionSize(RegionPtr reg) {
+ return ((reg)->data ? (reg)->data->size : 0);
+}
-#define REGION_BROKEN(_pScreen, _pReg) \
- REGION_NAR(_pReg)
+static inline BoxPtr RegionRects(RegionPtr reg) {
+ return ((reg)->data ? (BoxPtr)((reg)->data + 1) : &(reg)->extents);
+}
-#define REGION_EMPTY(_pScreen, _pReg) \
-{ \
- REGION_UNINIT(_pScreen, _pReg); \
- (_pReg)->extents.x2 = (_pReg)->extents.x1; \
- (_pReg)->extents.y2 = (_pReg)->extents.y1; \
- (_pReg)->data = &miEmptyData; \
+static inline BoxPtr RegionBoxptr(RegionPtr reg) {
+ return ((BoxPtr)((reg)->data + 1));
}
-#define REGION_EXTENTS(_pScreen, _pReg) \
- (&(_pReg)->extents)
+static inline BoxPtr RegionBox(RegionPtr reg, int i) {
+ return (&RegionBoxptr(reg)[i]);
+}
-#define REGION_NULL(_pScreen, _pReg) \
-{ \
- (_pReg)->extents = miEmptyBox; \
- (_pReg)->data = &miEmptyData; \
+static inline BoxPtr RegionTop(RegionPtr reg) {
+ return RegionBox(reg, (reg)->data->numRects);
}
-#ifndef REGION_NULL
-#define REGION_NULL(_pScreen, _pReg) \
- REGION_INIT(_pScreen, _pReg, NullBox, 1)
-#endif
+static inline BoxPtr RegionEnd(RegionPtr reg) {
+ return RegionBox(reg, (reg)->data->numRects - 1);
+}
-/* moved from mi.h */
+static inline size_t RegionSizeof(int n) {
+ return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
+}
-extern _X_EXPORT void InitRegions (void);
+static inline void RegionInit(RegionPtr _pReg, BoxPtr _rect, int _size)
+{
+ if ((_rect) != NULL)
+ {
+ (_pReg)->extents = *(_rect);
+ (_pReg)->data = (RegDataPtr)NULL;
+ }
+ else
+ {
+ (_pReg)->extents = RegionEmptyBox;
+ if (((_size) > 1) && ((_pReg)->data =
+ (RegDataPtr)malloc(RegionSizeof(_size))))
+ {
+ (_pReg)->data->size = (_size);
+ (_pReg)->data->numRects = 0;
+ }
+ else
+ (_pReg)->data = &RegionEmptyData;
+ }
+}
-extern _X_EXPORT RegionPtr miRegionCreate(
- BoxPtr /*rect*/,
- int /*size*/);
+static inline void RegionUninit(RegionPtr _pReg)
+{
+ if ((_pReg)->data && (_pReg)->data->size) {
+ free((_pReg)->data);
+ (_pReg)->data = NULL;
+ }
+}
+
+static inline void RegionReset(RegionPtr _pReg, BoxPtr _pBox)
+{
+ (_pReg)->extents = *(_pBox);
+ RegionUninit(_pReg);
+ (_pReg)->data = (RegDataPtr)NULL;
+}
+
+static inline Bool RegionNotEmpty(RegionPtr _pReg) {
+ return !RegionNil(_pReg);
+}
+
+static inline Bool RegionBroken(RegionPtr _pReg) {
+ return RegionNar(_pReg);
+}
+
+static inline void RegionEmpty(RegionPtr _pReg)
+{
+ RegionUninit(_pReg);
+ (_pReg)->extents.x2 = (_pReg)->extents.x1;
+ (_pReg)->extents.y2 = (_pReg)->extents.y1;
+ (_pReg)->data = &RegionEmptyData;
+}
+
+static inline BoxPtr RegionExtents(RegionPtr _pReg)
+{
+ return (&(_pReg)->extents);
+}
-extern _X_EXPORT void miRegionInit(
- RegionPtr /*pReg*/,
+static inline void RegionNull(RegionPtr _pReg)
+{
+ (_pReg)->extents = RegionEmptyBox;
+ (_pReg)->data = &RegionEmptyData;
+}
+
+extern _X_EXPORT void InitRegions(void);
+
+extern _X_EXPORT RegionPtr RegionCreate(
BoxPtr /*rect*/,
int /*size*/);
-extern _X_EXPORT void miRegionDestroy(
+extern _X_EXPORT void RegionDestroy(
RegionPtr /*pReg*/);
-extern _X_EXPORT void miRegionUninit(
- RegionPtr /*pReg*/);
-
-extern _X_EXPORT Bool miRegionCopy(
- RegionPtr /*dst*/,
- RegionPtr /*src*/);
+static inline Bool
+RegionCopy(RegionPtr dst, RegionPtr src)
+{
+ return pixman_region_copy (dst, src);
+}
-extern _X_EXPORT Bool miIntersect(
- RegionPtr /*newReg*/,
- RegionPtr /*reg1*/,
- RegionPtr /*reg2*/);
+static inline Bool
+RegionIntersect(
+ RegionPtr newReg, /* destination Region */
+ RegionPtr reg1,
+ RegionPtr reg2 /* source regions */
+ )
+{
+ return pixman_region_intersect (newReg, reg1, reg2);
+}
-extern _X_EXPORT Bool miUnion(
- RegionPtr /*newReg*/,
- RegionPtr /*reg1*/,
- RegionPtr /*reg2*/);
+static inline Bool
+RegionUnion(
+ RegionPtr newReg, /* destination Region */
+ RegionPtr reg1,
+ RegionPtr reg2 /* source regions */
+ )
+{
+ return pixman_region_union (newReg, reg1, reg2);
+}
-extern _X_EXPORT Bool miRegionAppend(
+extern _X_EXPORT Bool RegionAppend(
RegionPtr /*dstrgn*/,
RegionPtr /*rgn*/);
-extern _X_EXPORT Bool miRegionValidate(
+extern _X_EXPORT Bool RegionValidate(
RegionPtr /*badreg*/,
Bool * /*pOverlap*/);
-extern _X_EXPORT RegionPtr miRectsToRegion(
+extern _X_EXPORT RegionPtr RegionFromRects(
int /*nrects*/,
xRectanglePtr /*prect*/,
int /*ctype*/);
-extern _X_EXPORT Bool miSubtract(
- RegionPtr /*regD*/,
- RegionPtr /*regM*/,
- RegionPtr /*regS*/);
+/*-
+ *-----------------------------------------------------------------------
+ * Subtract --
+ * Subtract regS from regM and leave the result in regD.
+ * S stands for subtrahend, M for minuend and D for difference.
+ *
+ * Results:
+ * TRUE if successful.
+ *
+ * Side Effects:
+ * regD is overwritten.
+ *
+ *-----------------------------------------------------------------------
+ */
+static inline Bool
+RegionSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS)
+{
+ return pixman_region_subtract (regD, regM, regS);
+}
+
+/*-
+ *-----------------------------------------------------------------------
+ * Inverse --
+ * Take a region and a box and return a region that is everything
+ * in the box but not in the region. The careful reader will note
+ * that this is the same as subtracting the region from the box...
+ *
+ * Results:
+ * TRUE.
+ *
+ * Side Effects:
+ * newReg is overwritten.
+ *
+ *-----------------------------------------------------------------------
+ */
-extern _X_EXPORT Bool miInverse(
- RegionPtr /*newReg*/,
- RegionPtr /*reg1*/,
- BoxPtr /*invRect*/);
+static inline Bool
+RegionInverse(
+ RegionPtr newReg, /* Destination region */
+ RegionPtr reg1, /* Region to invert */
+ BoxPtr invRect /* Bounding box for inversion */
+ )
+{
+ return pixman_region_inverse (newReg, reg1, invRect);
+}
-extern _X_EXPORT int miRectIn(
- RegionPtr /*region*/,
- BoxPtr /*prect*/);
+static inline int
+RegionContainsRect(RegionPtr region, BoxPtr prect)
+{
+ return pixman_region_contains_rectangle (region, prect);
+}
-extern _X_EXPORT void miTranslateRegion(
- RegionPtr /*pReg*/,
- int /*x*/,
- int /*y*/);
+/* TranslateRegion(pReg, x, y)
+ translates in place
+*/
-extern _X_EXPORT void miRegionReset(
- RegionPtr /*pReg*/,
- BoxPtr /*pBox*/);
+static inline void
+RegionTranslate(RegionPtr pReg, int x, int y)
+{
+ pixman_region_translate (pReg, x, y);
+}
-extern _X_EXPORT Bool miRegionBreak(
+extern _X_EXPORT Bool RegionBreak(
RegionPtr /*pReg*/);
-extern _X_EXPORT Bool miPointInRegion(
- RegionPtr /*pReg*/,
- int /*x*/,
- int /*y*/,
- BoxPtr /*box*/);
-
-extern _X_EXPORT Bool miRegionEqual(
- RegionPtr /*pReg1*/,
- RegionPtr /*pReg2*/);
+static inline Bool
+RegionContainsPoint(
+ RegionPtr pReg,
+ int x,
+ int y,
+ BoxPtr box /* "return" value */
+ )
+{
+ return pixman_region_contains_point (pReg, x, y, box);
+}
-extern _X_EXPORT Bool miRegionNotEmpty(
- RegionPtr /*pReg*/);
+static inline Bool
+RegionEqual(RegionPtr reg1, RegionPtr reg2)
+{
+ return pixman_region_equal (reg1, reg2);
+}
-extern _X_EXPORT void miRegionEmpty(
- RegionPtr /*pReg*/);
+extern _X_EXPORT Bool RegionRectAlloc(
+ RegionPtr /*pRgn*/,
+ int /*n*/
+);
-extern _X_EXPORT BoxPtr miRegionExtents(
- RegionPtr /*pReg*/);
+#ifdef DEBUG
+extern _X_EXPORT Bool RegionIsValid(
+ RegionPtr /*prgn*/
+);
+#endif
-extern _X_EXPORT void miPrintRegion(
+extern _X_EXPORT void RegionPrint(
RegionPtr /*pReg*/);
+extern _X_EXPORT int RegionClipSpans(
+ RegionPtr /*prgnDst*/,
+ DDXPointPtr /*ppt*/,
+ int * /*pwidth*/,
+ int /*nspans*/,
+ DDXPointPtr /*pptNew*/,
+ int * /*pwidthNew*/,
+ int /*fSorted*/
+);
+
+#define INCLUDE_LEGACY_REGION_DEFINES
+#ifdef INCLUDE_LEGACY_REGION_DEFINES
+
+#define REGION_NIL RegionNil
+#define REGION_NAR RegionNar
+#define REGION_NUM_RECTS RegionNumRects
+#define REGION_SIZE RegionSize
+#define REGION_RECTS RegionRects
+#define REGION_BOXPTR RegionBoxptr
+#define REGION_BOX RegionBox
+#define REGION_TOP RegionTop
+#define REGION_END RegionEnd
+#define REGION_SZOF RegionSizeof
+#define BITMAP_TO_REGION BitmapToRegion
+#define REGION_CREATE(pScreen, r, s) RegionCreate(r,s)
+#define REGION_COPY(pScreen, d, r) RegionCopy(d, r)
+#define REGION_DESTROY(pScreen, r) RegionDestroy(r)
+#define REGION_INTERSECT(pScreen, res, r1, r2) RegionIntersect(res, r1, r2)
+#define REGION_UNION(pScreen, res, r1, r2) RegionUnion(res, r1, r2)
+#define REGION_SUBTRACT(pScreen, res, r1, r2) RegionSubtract(res, r1, r2)
+#define REGION_INVERSE(pScreen, n, r, b) RegionInverse(n, r, b)
+#define REGION_TRANSLATE(pScreen, r, x, y) RegionTranslate(r, x, y)
+#define RECT_IN_REGION(pScreen, r, b) RegionContainsRect(r, b)
+#define POINT_IN_REGION(pScreen, r, x, y, b) RegionContainsPoint(r, x, y, b)
+#define REGION_EQUAL(pScreen, r1, r2) RegionEqual(r1, r2)
+#define REGION_APPEND(pScreen, d, r) RegionAppend(d, r)
+#define REGION_VALIDATE(pScreen, r, o) RegionValidate(r, o)
+#define RECTS_TO_REGION(pScreen, n, r, c) RegionFromRects(n, r, c)
+#define REGION_BREAK(pScreen, r) RegionBreak(r)
+#define REGION_INIT(pScreen, r, b, s) RegionInit(r, b, s)
+#define REGION_UNINIT(pScreen, r) RegionUninit(r)
+#define REGION_RESET(pScreen, r, b) RegionReset(r, b)
+#define REGION_NOTEMPTY(pScreen, r) RegionNotEmpty(r)
+#define REGION_BROKEN(pScreen, r) RegionBroken(r)
+#define REGION_EMPTY(pScreen, r) RegionEmpty(r)
+#define REGION_EXTENTS(pScreen, r) RegionExtents(r)
+#define REGION_NULL(pScreen, r) RegionNull(r)
+
+#endif /* INCLUDE_LEGACY_REGION_DEFINES */
#endif /* REGIONSTRUCT_H */
diff --git a/xorg-server/include/scrnintstr.h b/xorg-server/include/scrnintstr.h
index 8684c8f19..4c7dcb712 100644
--- a/xorg-server/include/scrnintstr.h
+++ b/xorg-server/include/scrnintstr.h
@@ -82,6 +82,16 @@ typedef struct _Depth {
VisualID *vids; /* block of visual ids for this depth */
} DepthRec;
+typedef struct _ScreenSaverStuff {
+ WindowPtr pWindow;
+ XID wid;
+ char blanked;
+ Bool (*ExternalScreenSaver)(
+ ScreenPtr /*pScreen*/,
+ int /*xstate*/,
+ Bool /*force*/);
+} ScreenSaverStuffRec;
+
/*
* There is a typedef for each screen function pointer so that code that
@@ -386,7 +396,7 @@ typedef void (* PostChangeSaveUnderProcPtr)(
WindowPtr /*pLayerWin*/,
WindowPtr /*firstChild*/);
-typedef void (* ConfigNotifyProcPtr)(
+typedef int (* ConfigNotifyProcPtr)(
WindowPtr /*pWin*/,
int /*x*/,
int /*y*/,
@@ -423,7 +433,8 @@ typedef void (* ReparentWindowProcPtr)(
WindowPtr /*pPriorParent*/);
typedef void (* SetShapeProcPtr)(
- WindowPtr /*pWin*/);
+ WindowPtr /*pWin*/,
+ int /* kind */);
typedef void (* ChangeBorderWidthProcPtr)(
WindowPtr /*pWin*/,
@@ -445,7 +456,7 @@ typedef void (* DeviceCursorCleanupProcPtr)(
typedef struct _Screen {
int myNum; /* index of this instance in Screens[] */
ATOM id;
- short width, height;
+ short x, y, width, height;
short mmWidth, mmHeight;
short numDepths;
unsigned char rootDepth;
@@ -467,6 +478,8 @@ typedef struct _Screen {
pointer devPrivate;
short numVisuals;
VisualPtr visuals;
+ WindowPtr root;
+ ScreenSaverStuffRec screensaver;
/* Random screen procedures */
@@ -590,6 +603,10 @@ typedef struct _Screen {
DeviceCursorCleanupProcPtr DeviceCursorCleanup;
} ScreenRec;
+static inline RegionPtr BitmapToRegion(ScreenPtr _pScreen, PixmapPtr pPix) {
+ return (*(_pScreen)->BitmapToRegion)(pPix); /* no mi version?! */
+}
+
typedef struct _ScreenInfo {
int imageByteOrder;
int bitmapScanlineUnit;
diff --git a/xorg-server/include/windowstr.h b/xorg-server/include/windowstr.h
index 96bee9b93..ec1e07c80 100644
--- a/xorg-server/include/windowstr.h
+++ b/xorg-server/include/windowstr.h
@@ -1,227 +1,218 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef WINDOWSTRUCT_H
-#define WINDOWSTRUCT_H
-
-#include "window.h"
-#include "pixmapstr.h"
-#include "regionstr.h"
-#include "cursor.h"
-#include "property.h"
-#include "resource.h" /* for ROOT_WINDOW_ID_BASE */
-#include "dix.h"
-#include "privates.h"
-#include "miscstruct.h"
-#include <X11/Xprotostr.h>
-#include "opaque.h"
-
-#define GuaranteeNothing 0
-#define GuaranteeVisBack 1
-
-#define SameBackground(as, a, bs, b) \
- ((as) == (bs) && ((as) == None || \
- (as) == ParentRelative || \
- SamePixUnion(a,b,as == BackgroundPixel)))
-
-#define SameBorder(as, a, bs, b) \
- EqualPixUnion(as, a, bs, b)
-
-/* used as NULL-terminated list */
-typedef struct _DevCursorNode {
- CursorPtr cursor;
- DeviceIntPtr dev;
- struct _DevCursorNode* next;
-} DevCursNodeRec, *DevCursNodePtr, *DevCursorList;
-
-typedef struct _WindowOpt {
- VisualID visual; /* default: same as parent */
- CursorPtr cursor; /* default: window.cursorNone */
- Colormap colormap; /* default: same as parent */
- Mask dontPropagateMask; /* default: window.dontPropagate */
- Mask otherEventMasks; /* default: 0 */
- struct _OtherClients *otherClients; /* default: NULL */
- struct _GrabRec *passiveGrabs; /* default: NULL */
- PropertyPtr userProps; /* default: NULL */
- unsigned long backingBitPlanes; /* default: ~0L */
- unsigned long backingPixel; /* default: 0 */
- RegionPtr boundingShape; /* default: NULL */
- RegionPtr clipShape; /* default: NULL */
- RegionPtr inputShape; /* default: NULL */
- struct _OtherInputMasks *inputMasks; /* default: NULL */
- DevCursorList deviceCursors; /* default: NULL */
-} WindowOptRec, *WindowOptPtr;
-
-#define BackgroundPixel 2L
-#define BackgroundPixmap 3L
-
-/*
- * The redirectDraw field can have one of three values:
- *
- * RedirectDrawNone
- * A normal window; painted into the same pixmap as the parent
- * and clipping parent and siblings to its geometry. These
- * windows get a clip list equal to the intersection of their
- * geometry with the parent geometry, minus the geometry
- * of overlapping None and Clipped siblings.
- * RedirectDrawAutomatic
- * A redirected window which clips parent and sibling drawing.
- * Contents for these windows are manage inside the server.
- * These windows get an internal clip list equal to their
- * geometry.
- * RedirectDrawManual
- * A redirected window which does not clip parent and sibling
- * drawing; the window must be represented within the parent
- * geometry by the client performing the redirection management.
- * Contents for these windows are managed outside the server.
- * These windows get an internal clip list equal to their
- * geometry.
- */
-
-#define RedirectDrawNone 0
-#define RedirectDrawAutomatic 1
-#define RedirectDrawManual 2
-
-typedef struct _Window {
- DrawableRec drawable;
- PrivateRec *devPrivates;
- WindowPtr parent; /* ancestor chain */
- WindowPtr nextSib; /* next lower sibling */
- WindowPtr prevSib; /* next higher sibling */
- WindowPtr firstChild; /* top-most child */
- WindowPtr lastChild; /* bottom-most child */
- RegionRec clipList; /* clipping rectangle for output */
- RegionRec borderClip; /* NotClippedByChildren + border */
- union _Validate *valdata;
- RegionRec winSize;
- RegionRec borderSize;
- DDXPointRec origin; /* position relative to parent */
- unsigned short borderWidth;
- unsigned short deliverableEvents; /* all masks from all clients */
- Mask eventMask; /* mask from the creating client */
- PixUnion background;
- PixUnion border;
- pointer backStorage; /* null when BS disabled */
- WindowOptPtr optional;
- unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */
- unsigned borderIsPixel:1;
- unsigned cursorIsNone:1; /* else real cursor (might inherit) */
- unsigned backingStore:2;
- unsigned saveUnder:1;
- unsigned DIXsaveUnder:1;
- unsigned bitGravity:4;
- unsigned winGravity:4;
- unsigned overrideRedirect:1;
- unsigned visibility:2;
- unsigned mapped:1;
- unsigned realized:1; /* ancestors are all mapped */
- unsigned viewable:1; /* realized && InputOutput */
- unsigned dontPropagate:3;/* index into DontPropagateMasks */
- unsigned forcedBS:1; /* system-supplied backingStore */
- unsigned redirectDraw:2; /* COMPOSITE rendering redirect */
- unsigned forcedBG:1; /* must have an opaque background */
-#ifdef ROOTLESS
- unsigned rootlessUnhittable:1; /* doesn't hit-test */
-#endif
-} WindowRec;
-
-/*
- * Ok, a bunch of macros for accessing the optional record
- * fields (or filling the appropriate default value)
- */
-
-extern _X_EXPORT Mask DontPropagateMasks[];
-
-#define wTrackParent(w,field) ((w)->optional ? \
- (w)->optional->field \
- : FindWindowWithOptional(w)->optional->field)
-#define wUseDefault(w,field,def) ((w)->optional ? \
- (w)->optional->field \
- : def)
-
-#define wVisual(w) wTrackParent(w, visual)
-#define wCursor(w) ((w)->cursorIsNone ? None : wTrackParent(w, cursor))
-#define wColormap(w) ((w)->drawable.class == InputOnly ? None : wTrackParent(w, colormap))
-#define wDontPropagateMask(w) wUseDefault(w, dontPropagateMask, DontPropagateMasks[(w)->dontPropagate])
-#define wOtherEventMasks(w) wUseDefault(w, otherEventMasks, 0)
-#define wOtherClients(w) wUseDefault(w, otherClients, NULL)
-#define wOtherInputMasks(w) wUseDefault(w, inputMasks, NULL)
-#define wPassiveGrabs(w) wUseDefault(w, passiveGrabs, NULL)
-#define wUserProps(w) wUseDefault(w, userProps, NULL)
-#define wBackingBitPlanes(w) wUseDefault(w, backingBitPlanes, ~0L)
-#define wBackingPixel(w) wUseDefault(w, backingPixel, 0)
-#define wBoundingShape(w) wUseDefault(w, boundingShape, NULL)
-#define wClipShape(w) wUseDefault(w, clipShape, NULL)
-#define wInputShape(w) wUseDefault(w, inputShape, NULL)
-#define wClient(w) (clients[CLIENT_ID((w)->drawable.id)])
-#define wBorderWidth(w) ((int) (w)->borderWidth)
-
-/* true when w needs a border drawn. */
-
-#define HasBorder(w) ((w)->borderWidth || wClipShape(w))
-
-typedef struct _ScreenSaverStuff {
- WindowPtr pWindow;
- XID wid;
- char blanked;
- Bool (*ExternalScreenSaver)(
- ScreenPtr /*pScreen*/,
- int /*xstate*/,
- Bool /*force*/);
-} ScreenSaverStuffRec, *ScreenSaverStuffPtr;
-
-#define SCREEN_IS_BLANKED 0
-#define SCREEN_ISNT_SAVED 1
-#define SCREEN_IS_TILED 2
-#define SCREEN_IS_BLACK 3
-
-#define HasSaverWindow(i) (savedScreenInfo[i].pWindow != NullWindow)
-
-extern _X_EXPORT int screenIsSaved;
-extern _X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS];
-
-#endif /* WINDOWSTRUCT_H */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef WINDOWSTRUCT_H
+#define WINDOWSTRUCT_H
+
+#include "window.h"
+#include "pixmapstr.h"
+#include "regionstr.h"
+#include "cursor.h"
+#include "property.h"
+#include "resource.h" /* for ROOT_WINDOW_ID_BASE */
+#include "dix.h"
+#include "privates.h"
+#include "miscstruct.h"
+#include <X11/Xprotostr.h>
+#include "opaque.h"
+
+#define GuaranteeNothing 0
+#define GuaranteeVisBack 1
+
+#define SameBackground(as, a, bs, b) \
+ ((as) == (bs) && ((as) == None || \
+ (as) == ParentRelative || \
+ SamePixUnion(a,b,as == BackgroundPixel)))
+
+#define SameBorder(as, a, bs, b) \
+ EqualPixUnion(as, a, bs, b)
+
+/* used as NULL-terminated list */
+typedef struct _DevCursorNode {
+ CursorPtr cursor;
+ DeviceIntPtr dev;
+ struct _DevCursorNode* next;
+} DevCursNodeRec, *DevCursNodePtr, *DevCursorList;
+
+typedef struct _WindowOpt {
+ VisualID visual; /* default: same as parent */
+ CursorPtr cursor; /* default: window.cursorNone */
+ Colormap colormap; /* default: same as parent */
+ Mask dontPropagateMask; /* default: window.dontPropagate */
+ Mask otherEventMasks; /* default: 0 */
+ struct _OtherClients *otherClients; /* default: NULL */
+ struct _GrabRec *passiveGrabs; /* default: NULL */
+ PropertyPtr userProps; /* default: NULL */
+ unsigned long backingBitPlanes; /* default: ~0L */
+ unsigned long backingPixel; /* default: 0 */
+ RegionPtr boundingShape; /* default: NULL */
+ RegionPtr clipShape; /* default: NULL */
+ RegionPtr inputShape; /* default: NULL */
+ struct _OtherInputMasks *inputMasks; /* default: NULL */
+ DevCursorList deviceCursors; /* default: NULL */
+} WindowOptRec, *WindowOptPtr;
+
+#define BackgroundPixel 2L
+#define BackgroundPixmap 3L
+
+/*
+ * The redirectDraw field can have one of three values:
+ *
+ * RedirectDrawNone
+ * A normal window; painted into the same pixmap as the parent
+ * and clipping parent and siblings to its geometry. These
+ * windows get a clip list equal to the intersection of their
+ * geometry with the parent geometry, minus the geometry
+ * of overlapping None and Clipped siblings.
+ * RedirectDrawAutomatic
+ * A redirected window which clips parent and sibling drawing.
+ * Contents for these windows are manage inside the server.
+ * These windows get an internal clip list equal to their
+ * geometry.
+ * RedirectDrawManual
+ * A redirected window which does not clip parent and sibling
+ * drawing; the window must be represented within the parent
+ * geometry by the client performing the redirection management.
+ * Contents for these windows are managed outside the server.
+ * These windows get an internal clip list equal to their
+ * geometry.
+ */
+
+#define RedirectDrawNone 0
+#define RedirectDrawAutomatic 1
+#define RedirectDrawManual 2
+
+typedef struct _Window {
+ DrawableRec drawable;
+ PrivateRec *devPrivates;
+ WindowPtr parent; /* ancestor chain */
+ WindowPtr nextSib; /* next lower sibling */
+ WindowPtr prevSib; /* next higher sibling */
+ WindowPtr firstChild; /* top-most child */
+ WindowPtr lastChild; /* bottom-most child */
+ RegionRec clipList; /* clipping rectangle for output */
+ RegionRec borderClip; /* NotClippedByChildren + border */
+ union _Validate *valdata;
+ RegionRec winSize;
+ RegionRec borderSize;
+ DDXPointRec origin; /* position relative to parent */
+ unsigned short borderWidth;
+ unsigned short deliverableEvents; /* all masks from all clients */
+ Mask eventMask; /* mask from the creating client */
+ PixUnion background;
+ PixUnion border;
+ pointer backStorage; /* null when BS disabled */
+ WindowOptPtr optional;
+ unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */
+ unsigned borderIsPixel:1;
+ unsigned cursorIsNone:1; /* else real cursor (might inherit) */
+ unsigned backingStore:2;
+ unsigned saveUnder:1;
+ unsigned DIXsaveUnder:1;
+ unsigned bitGravity:4;
+ unsigned winGravity:4;
+ unsigned overrideRedirect:1;
+ unsigned visibility:2;
+ unsigned mapped:1;
+ unsigned realized:1; /* ancestors are all mapped */
+ unsigned viewable:1; /* realized && InputOutput */
+ unsigned dontPropagate:3;/* index into DontPropagateMasks */
+ unsigned forcedBS:1; /* system-supplied backingStore */
+ unsigned redirectDraw:2; /* COMPOSITE rendering redirect */
+ unsigned forcedBG:1; /* must have an opaque background */
+#ifdef ROOTLESS
+ unsigned rootlessUnhittable:1; /* doesn't hit-test */
+#endif
+} WindowRec;
+
+/*
+ * Ok, a bunch of macros for accessing the optional record
+ * fields (or filling the appropriate default value)
+ */
+
+extern _X_EXPORT Mask DontPropagateMasks[];
+
+#define wTrackParent(w,field) ((w)->optional ? \
+ (w)->optional->field \
+ : FindWindowWithOptional(w)->optional->field)
+#define wUseDefault(w,field,def) ((w)->optional ? \
+ (w)->optional->field \
+ : def)
+
+#define wVisual(w) wTrackParent(w, visual)
+#define wCursor(w) ((w)->cursorIsNone ? None : wTrackParent(w, cursor))
+#define wColormap(w) ((w)->drawable.class == InputOnly ? None : wTrackParent(w, colormap))
+#define wDontPropagateMask(w) wUseDefault(w, dontPropagateMask, DontPropagateMasks[(w)->dontPropagate])
+#define wOtherEventMasks(w) wUseDefault(w, otherEventMasks, 0)
+#define wOtherClients(w) wUseDefault(w, otherClients, NULL)
+#define wOtherInputMasks(w) wUseDefault(w, inputMasks, NULL)
+#define wPassiveGrabs(w) wUseDefault(w, passiveGrabs, NULL)
+#define wUserProps(w) wUseDefault(w, userProps, NULL)
+#define wBackingBitPlanes(w) wUseDefault(w, backingBitPlanes, ~0L)
+#define wBackingPixel(w) wUseDefault(w, backingPixel, 0)
+#define wBoundingShape(w) wUseDefault(w, boundingShape, NULL)
+#define wClipShape(w) wUseDefault(w, clipShape, NULL)
+#define wInputShape(w) wUseDefault(w, inputShape, NULL)
+#define wClient(w) (clients[CLIENT_ID((w)->drawable.id)])
+#define wBorderWidth(w) ((int) (w)->borderWidth)
+
+/* true when w needs a border drawn. */
+
+#define HasBorder(w) ((w)->borderWidth || wClipShape(w))
+
+typedef struct _ScreenSaverStuff *ScreenSaverStuffPtr;
+
+#define SCREEN_IS_BLANKED 0
+#define SCREEN_ISNT_SAVED 1
+#define SCREEN_IS_TILED 2
+#define SCREEN_IS_BLACK 3
+
+#define HasSaverWindow(pScreen) (pScreen->screensaver.pWindow != NullWindow)
+
+extern _X_EXPORT int screenIsSaved;
+
+#endif /* WINDOWSTRUCT_H */
diff --git a/xorg-server/include/xkbsrv.h b/xorg-server/include/xkbsrv.h
index 18494d7ae..30b4f9f8e 100644
--- a/xorg-server/include/xkbsrv.h
+++ b/xorg-server/include/xkbsrv.h
@@ -275,7 +275,9 @@ typedef struct
device->public.realInputProc = oldprocs->realInputProc; \
device->unwrapProc = oldprocs->unwrapProc;
-extern DevPrivateKey xkbDevicePrivateKey;
+extern _X_EXPORT DevPrivateKeyRec xkbDevicePrivateKeyRec;
+#define xkbDevicePrivateKey (&xkbDevicePrivateKeyRec)
+
#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey))
extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
@@ -319,6 +321,8 @@ extern _X_EXPORT int XkbProcessArguments(
int /* i */
);
+extern _X_EXPORT Bool XkbInitPrivates(void);
+
extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
extern _X_EXPORT void XkbFreeCompatMap(
diff --git a/xorg-server/include/xorg-config.h.in b/xorg-server/include/xorg-config.h.in
index 8946a6538..f2494af78 100644
--- a/xorg-server/include/xorg-config.h.in
+++ b/xorg-server/include/xorg-config.h.in
@@ -1,142 +1,145 @@
-/* xorg-config.h.in: not at all generated. -*- c -*-
- *
- * This file differs from xorg-server.h.in in that -server is installed
- * with the rest of the SDK for external drivers/modules to use, whereas
- * -config is for internal use only (i.e. building the DDX).
- *
- */
-
-#ifndef _XORG_CONFIG_H_
-#define _XORG_CONFIG_H_
-
-#include <dix-config.h>
-#include <xkb-config.h>
-
-/* Building Xorg server. */
-#undef XORGSERVER
-
-/* Current X.Org version. */
-#undef XORG_VERSION_CURRENT
-
-/* Name of X server. */
-#undef __XSERVERNAME__
-
-/* URL to go to for support. */
-#undef __VENDORDWEBSUPPORT__
-
-/* Built-in output drivers. */
-#undef DRIVERS
-
-/* Built-in input drivers. */
-#undef IDRIVERS
-
-/* Path to configuration file. */
-#undef XF86CONFIGFILE
-
-/* Path to configuration file. */
-#undef __XCONFIGFILE__
-
-/* Name of configuration directory. */
-#undef __XCONFIGDIR__
-
-/* Path to loadable modules. */
-#undef DEFAULT_MODULE_PATH
-
-/* Path to installed libraries. */
-#undef DEFAULT_LIBRARY_PATH
-
-/* Path to server log file. */
-#undef DEFAULT_LOGPREFIX
-
-/* Building DRI-capable DDX. */
-#undef XF86DRI
-
-/* Build DRI2 extension */
-#undef DRI2
-
-/* Define to 1 if you have the <stropts.h> header file. */
-#undef HAVE_STROPTS_H
-
-/* Define to 1 if you have the <sys/kd.h> header file. */
-#undef HAVE_SYS_KD_H
-
-/* Define to 1 if you have the <sys/vt.h> header file. */
-#undef HAVE_SYS_VT_H
-
-/* Define to 1 if you have the `walkcontext' function (used on Solaris for
- xorg_backtrace in hw/xfree86/common/xf86Events.c */
-#undef HAVE_WALKCONTEXT
-
-/* Define to 1 if unsigned long is 64 bits. */
-#undef _XSERVER64
-
-/* Building vgahw module */
-#undef WITH_VGAHW
-
-/* Define to 1 if NetBSD built-in MTRR support is available */
-#undef HAS_MTRR_BUILTIN
-
-/* Define to 1 if BSD MTRR support is available */
-#undef HAS_MTRR_SUPPORT
-
-/* NetBSD PIO alpha IO */
-#undef USE_ALPHA_PIO
-
-/* BSD AMD64 iopl */
-#undef USE_AMD64_IOPL
-
-/* BSD /dev/io */
-#undef USE_DEV_IO
-
-/* BSD i386 iopl */
-#undef USE_I386_IOPL
-
-/* System is BSD-like */
-#undef CSRG_BASED
-
-/* System has PC console */
-#undef PCCONS_SUPPORT
-
-/* System has PCVT console */
-#undef PCVT_SUPPORT
-
-/* System has syscons console */
-#undef SYSCONS_SUPPORT
-
-/* System has wscons console */
-#undef WSCONS_SUPPORT
-
-/* System has /dev/xf86 aperture driver */
-#undef HAS_APERTURE_DRV
-
-/* Has backtrace support */
-#undef HAVE_BACKTRACE
-
-/* Name of the period field in struct kbd_repeat */
-#undef LNX_KBD_PERIOD_NAME
-
-/* Have execinfo.h */
-#undef HAVE_EXECINFO_H
-
-/* Have pci_system_init_dev_mem() */
-#undef HAVE_PCI_SYSTEM_INIT_DEV_MEM
-
-/* Define to 1 if you have the `pci_device_is_boot_vga' function. */
-#undef HAVE_PCI_DEVICE_IS_BOOT_VGA
-
-/* Have pci_enable_device */
-#undef HAVE_PCI_DEVICE_ENABLE
-
-/* Define to 1 if you have the `pci_device_vgaarb_init' function. */
-#undef HAVE_PCI_DEVICE_VGAARB_INIT
-
-/* Path to text files containing PCI IDs */
-#undef PCI_TXT_IDS_PATH
-
-/* Use SIGIO handlers for input device events by default */
-#undef USE_SIGIO_BY_DEFAULT
-
-/* Support PC98 */
-#undef SUPPORT_PC98
-
-#endif /* _XORG_CONFIG_H_ */
+/* xorg-config.h.in: not at all generated. -*- c -*-
+ *
+ * This file differs from xorg-server.h.in in that -server is installed
+ * with the rest of the SDK for external drivers/modules to use, whereas
+ * -config is for internal use only (i.e. building the DDX).
+ *
+ */
+
+#ifndef _XORG_CONFIG_H_
+#define _XORG_CONFIG_H_
+
+#include <dix-config.h>
+#include <xkb-config.h>
+
+/* Building Xorg server. */
+#undef XORGSERVER
+
+/* Current X.Org version. */
+#undef XORG_VERSION_CURRENT
+
+/* Name of X server. */
+#undef __XSERVERNAME__
+
+/* URL to go to for support. */
+#undef __VENDORDWEBSUPPORT__
+
+/* Built-in output drivers. */
+#undef DRIVERS
+
+/* Built-in input drivers. */
+#undef IDRIVERS
+
+/* Path to configuration file. */
+#undef XF86CONFIGFILE
+
+/* Path to configuration file. */
+#undef __XCONFIGFILE__
+
+/* Name of configuration directory. */
+#undef __XCONFIGDIR__
+
+/* Path to loadable modules. */
+#undef DEFAULT_MODULE_PATH
+
+/* Path to installed libraries. */
+#undef DEFAULT_LIBRARY_PATH
+
+/* Path to server log file. */
+#undef DEFAULT_LOGPREFIX
+
+/* Building DRI-capable DDX. */
+#undef XF86DRI
+
+/* Build DRI2 extension */
+#undef DRI2
+
+/* Define to 1 if you have the <stropts.h> header file. */
+#undef HAVE_STROPTS_H
+
+/* Define to 1 if you have the <sys/kd.h> header file. */
+#undef HAVE_SYS_KD_H
+
+/* Define to 1 if you have the <sys/vt.h> header file. */
+#undef HAVE_SYS_VT_H
+
+/* Define to 1 if you have the `walkcontext' function (used on Solaris for
+ xorg_backtrace in hw/xfree86/common/xf86Events.c */
+#undef HAVE_WALKCONTEXT
+
+/* Define to 1 if unsigned long is 64 bits. */
+#undef _XSERVER64
+
+/* Building vgahw module */
+#undef WITH_VGAHW
+
+/* Define to 1 if NetBSD built-in MTRR support is available */
+#undef HAS_MTRR_BUILTIN
+
+/* Define to 1 if BSD MTRR support is available */
+#undef HAS_MTRR_SUPPORT
+
+/* NetBSD PIO alpha IO */
+#undef USE_ALPHA_PIO
+
+/* BSD AMD64 iopl */
+#undef USE_AMD64_IOPL
+
+/* BSD /dev/io */
+#undef USE_DEV_IO
+
+/* BSD i386 iopl */
+#undef USE_I386_IOPL
+
+/* System is BSD-like */
+#undef CSRG_BASED
+
+/* System has PC console */
+#undef PCCONS_SUPPORT
+
+/* System has PCVT console */
+#undef PCVT_SUPPORT
+
+/* System has syscons console */
+#undef SYSCONS_SUPPORT
+
+/* System has wscons console */
+#undef WSCONS_SUPPORT
+
+/* System has /dev/xf86 aperture driver */
+#undef HAS_APERTURE_DRV
+
+/* Has backtrace support */
+#undef HAVE_BACKTRACE
+
+/* Name of the period field in struct kbd_repeat */
+#undef LNX_KBD_PERIOD_NAME
+
+/* Have execinfo.h */
+#undef HAVE_EXECINFO_H
+
+/* Have pci_system_init_dev_mem() */
+#undef HAVE_PCI_SYSTEM_INIT_DEV_MEM
+
+/* Define to 1 if you have the `pci_device_is_boot_vga' function. */
+#undef HAVE_PCI_DEVICE_IS_BOOT_VGA
+
+/* Have pci_enable_device */
+#undef HAVE_PCI_DEVICE_ENABLE
+
+/* Define to 1 if you have the `pci_device_vgaarb_init' function. */
+#undef HAVE_PCI_DEVICE_VGAARB_INIT
+
+/* Path to text files containing PCI IDs */
+#undef PCI_TXT_IDS_PATH
+
+/* Use SIGIO handlers for input device events by default */
+#undef USE_SIGIO_BY_DEFAULT
+
+/* Support PC98 */
+#undef SUPPORT_PC98
+
+/* Build with libdrm support */
+#undef WITH_LIBDRM
+
+#endif /* _XORG_CONFIG_H_ */
diff --git a/xorg-server/include/xserver-properties.h b/xorg-server/include/xserver-properties.h
index 30e8efb68..d3dc976fd 100644
--- a/xorg-server/include/xserver-properties.h
+++ b/xorg-server/include/xserver-properties.h
@@ -1,184 +1,191 @@
-/*
- * 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
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * them 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 MERCHANTIBILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS 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.
- */
-
-
-/* Properties managed by the server. */
-
-#ifndef _XSERVER_PROPERTIES_H_
-#define _XSERVER_PROPERTIES_H_
-
-/* Type for a 4 byte float. Storage format IEEE 754 in client's default
- * byte-ordering. */
-#define XATOM_FLOAT "FLOAT"
-
-/* BOOL. 0 - device disabled, 1 - device enabled */
-#define XI_PROP_ENABLED "Device Enabled"
-/* BOOL. If present, device is a virtual XTEST device */
-#define XI_PROP_XTEST_DEVICE "XTEST Device"
-
-/* Pointer acceleration properties */
-/* INTEGER of any format */
-#define ACCEL_PROP_PROFILE_NUMBER "Device Accel Profile"
-/* FLOAT, format 32 */
-#define ACCEL_PROP_CONSTANT_DECELERATION "Device Accel Constant Deceleration"
-/* FLOAT, format 32 */
-#define ACCEL_PROP_ADAPTIVE_DECELERATION "Device Accel Adaptive Deceleration"
-/* FLOAT, format 32 */
-#define ACCEL_PROP_VELOCITY_SCALING "Device Accel Velocity Scaling"
-
-
-/* Axis labels */
-#define AXIS_LABEL_PROP "Axis Labels"
-
-#define AXIS_LABEL_PROP_REL_X "Rel X"
-#define AXIS_LABEL_PROP_REL_Y "Rel Y"
-#define AXIS_LABEL_PROP_REL_Z "Rel Z"
-#define AXIS_LABEL_PROP_REL_RX "Rel Rotary X"
-#define AXIS_LABEL_PROP_REL_RY "Rel Rotary Y"
-#define AXIS_LABEL_PROP_REL_RZ "Rel Rotary Z"
-#define AXIS_LABEL_PROP_REL_HWHEEL "Rel Horiz Wheel"
-#define AXIS_LABEL_PROP_REL_DIAL "Rel Dial"
-#define AXIS_LABEL_PROP_REL_WHEEL "Rel Vert Wheel"
-#define AXIS_LABEL_PROP_REL_MISC "Rel Misc"
-
-/*
- * Absolute axes
- */
-
-#define AXIS_LABEL_PROP_ABS_X "Abs X"
-#define AXIS_LABEL_PROP_ABS_Y "Abs Y"
-#define AXIS_LABEL_PROP_ABS_Z "Abs Z"
-#define AXIS_LABEL_PROP_ABS_RX "Abs Rotary X"
-#define AXIS_LABEL_PROP_ABS_RY "Abs Rotary Y"
-#define AXIS_LABEL_PROP_ABS_RZ "Abs Rotary Z"
-#define AXIS_LABEL_PROP_ABS_THROTTLE "Abs Throttle"
-#define AXIS_LABEL_PROP_ABS_RUDDER "Abs Rudder"
-#define AXIS_LABEL_PROP_ABS_WHEEL "Abs Wheel"
-#define AXIS_LABEL_PROP_ABS_GAS "Abs Gas"
-#define AXIS_LABEL_PROP_ABS_BRAKE "Abs Brake"
-#define AXIS_LABEL_PROP_ABS_HAT0X "Abs Hat 0 X"
-#define AXIS_LABEL_PROP_ABS_HAT0Y "Abs Hat 0 Y"
-#define AXIS_LABEL_PROP_ABS_HAT1X "Abs Hat 1 X"
-#define AXIS_LABEL_PROP_ABS_HAT1Y "Abs Hat 1 Y"
-#define AXIS_LABEL_PROP_ABS_HAT2X "Abs Hat 2 X"
-#define AXIS_LABEL_PROP_ABS_HAT2Y "Abs Hat 2 Y"
-#define AXIS_LABEL_PROP_ABS_HAT3X "Abs Hat 3 X"
-#define AXIS_LABEL_PROP_ABS_HAT3Y "Abs Hat 3 Y"
-#define AXIS_LABEL_PROP_ABS_PRESSURE "Abs Pressure"
-#define AXIS_LABEL_PROP_ABS_DISTANCE "Abs Distance"
-#define AXIS_LABEL_PROP_ABS_TILT_X "Abs Tilt X"
-#define AXIS_LABEL_PROP_ABS_TILT_Y "Abs Tilt Y"
-#define AXIS_LABEL_PROP_ABS_TOOL_WIDTH "Abs Tool Width"
-#define AXIS_LABEL_PROP_ABS_VOLUME "Abs Volume"
-#define AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR "Abs MT Touch Major"
-#define AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR "Abs MT Touch Minor"
-#define AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR "Abs MT Width Major"
-#define AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR "Abs MT Width Minor"
-#define AXIS_LABEL_PROP_ABS_MT_ORIENTATION "Abs MT Orientation"
-#define AXIS_LABEL_PROP_ABS_MT_POSITION_X "Abs MT Position X"
-#define AXIS_LABEL_PROP_ABS_MT_POSITION_Y "Abs MT Position Y"
-#define AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE "Abs MT Tool Type"
-#define AXIS_LABEL_PROP_ABS_MT_BLOB_ID "Abs MT Blob ID"
-#define AXIS_LABEL_PROP_ABS_MT_TRACKING_ID "Abs MT Tracking ID"
-#define AXIS_LABEL_PROP_ABS_MT_PRESSURE "Abs MT Pressure"
-#define AXIS_LABEL_PROP_ABS_MISC "Abs Misc"
-
-/* Button names */
-#define BTN_LABEL_PROP "Button Labels"
-
-/* Default label */
-#define BTN_LABEL_PROP_BTN_UNKNOWN "Button Unknown"
-/* Wheel buttons */
-#define BTN_LABEL_PROP_BTN_WHEEL_UP "Button Wheel Up"
-#define BTN_LABEL_PROP_BTN_WHEEL_DOWN "Button Wheel Down"
-#define BTN_LABEL_PROP_BTN_HWHEEL_LEFT "Button Horiz Wheel Left"
-#define BTN_LABEL_PROP_BTN_HWHEEL_RIGHT "Button Horiz Wheel Right"
-
-/* The following are from linux/input.h */
-#define BTN_LABEL_PROP_BTN_0 "Button 0"
-#define BTN_LABEL_PROP_BTN_1 "Button 1"
-#define BTN_LABEL_PROP_BTN_2 "Button 2"
-#define BTN_LABEL_PROP_BTN_3 "Button 3"
-#define BTN_LABEL_PROP_BTN_4 "Button 4"
-#define BTN_LABEL_PROP_BTN_5 "Button 5"
-#define BTN_LABEL_PROP_BTN_6 "Button 6"
-#define BTN_LABEL_PROP_BTN_7 "Button 7"
-#define BTN_LABEL_PROP_BTN_8 "Button 8"
-#define BTN_LABEL_PROP_BTN_9 "Button 9"
-
-#define BTN_LABEL_PROP_BTN_LEFT "Button Left"
-#define BTN_LABEL_PROP_BTN_RIGHT "Button Right"
-#define BTN_LABEL_PROP_BTN_MIDDLE "Button Middle"
-#define BTN_LABEL_PROP_BTN_SIDE "Button Side"
-#define BTN_LABEL_PROP_BTN_EXTRA "Button Extra"
-#define BTN_LABEL_PROP_BTN_FORWARD "Button Forward"
-#define BTN_LABEL_PROP_BTN_BACK "Button Back"
-#define BTN_LABEL_PROP_BTN_TASK "Button Task"
-
-#define BTN_LABEL_PROP_BTN_TRIGGER "Button Trigger"
-#define BTN_LABEL_PROP_BTN_THUMB "Button Thumb"
-#define BTN_LABEL_PROP_BTN_THUMB2 "Button Thumb2"
-#define BTN_LABEL_PROP_BTN_TOP "Button Top"
-#define BTN_LABEL_PROP_BTN_TOP2 "Button Top2"
-#define BTN_LABEL_PROP_BTN_PINKIE "Button Pinkie"
-#define BTN_LABEL_PROP_BTN_BASE "Button Base"
-#define BTN_LABEL_PROP_BTN_BASE2 "Button Base2"
-#define BTN_LABEL_PROP_BTN_BASE3 "Button Base3"
-#define BTN_LABEL_PROP_BTN_BASE4 "Button Base4"
-#define BTN_LABEL_PROP_BTN_BASE5 "Button Base5"
-#define BTN_LABEL_PROP_BTN_BASE6 "Button Base6"
-#define BTN_LABEL_PROP_BTN_DEAD "Button Dead"
-
-#define BTN_LABEL_PROP_BTN_A "Button A"
-#define BTN_LABEL_PROP_BTN_B "Button B"
-#define BTN_LABEL_PROP_BTN_C "Button C"
-#define BTN_LABEL_PROP_BTN_X "Button X"
-#define BTN_LABEL_PROP_BTN_Y "Button Y"
-#define BTN_LABEL_PROP_BTN_Z "Button Z"
-#define BTN_LABEL_PROP_BTN_TL "Button T Left"
-#define BTN_LABEL_PROP_BTN_TR "Button T Right"
-#define BTN_LABEL_PROP_BTN_TL2 "Button T Left2"
-#define BTN_LABEL_PROP_BTN_TR2 "Button T Right2"
-#define BTN_LABEL_PROP_BTN_SELECT "Button Select"
-#define BTN_LABEL_PROP_BTN_START "Button Start"
-#define BTN_LABEL_PROP_BTN_MODE "Button Mode"
-#define BTN_LABEL_PROP_BTN_THUMBL "Button Thumb Left"
-#define BTN_LABEL_PROP_BTN_THUMBR "Button Thumb Right"
-
-#define BTN_LABEL_PROP_BTN_TOOL_PEN "Button Tool Pen"
-#define BTN_LABEL_PROP_BTN_TOOL_RUBBER "Button Tool Rubber"
-#define BTN_LABEL_PROP_BTN_TOOL_BRUSH "Button Tool Brush"
-#define BTN_LABEL_PROP_BTN_TOOL_PENCIL "Button Tool Pencil"
-#define BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH "Button Tool Airbrush"
-#define BTN_LABEL_PROP_BTN_TOOL_FINGER "Button Tool Finger"
-#define BTN_LABEL_PROP_BTN_TOOL_MOUSE "Button Tool Mouse"
-#define BTN_LABEL_PROP_BTN_TOOL_LENS "Button Tool Lens"
-#define BTN_LABEL_PROP_BTN_TOUCH "Button Touch"
-#define BTN_LABEL_PROP_BTN_STYLUS "Button Stylus"
-#define BTN_LABEL_PROP_BTN_STYLUS2 "Button Stylus2"
-#define BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP "Button Tool Doubletap"
-#define BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP "Button Tool Tripletap"
-
-#define BTN_LABEL_PROP_BTN_GEAR_DOWN "Button Gear down"
-#define BTN_LABEL_PROP_BTN_GEAR_UP "Button Gear up"
-
-#endif
+/*
+ * 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
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * them 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 MERCHANTIBILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS 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.
+ */
+
+
+/* Properties managed by the server. */
+
+#ifndef _XSERVER_PROPERTIES_H_
+#define _XSERVER_PROPERTIES_H_
+
+/* Type for a 4 byte float. Storage format IEEE 754 in client's default
+ * byte-ordering. */
+#define XATOM_FLOAT "FLOAT"
+
+/* BOOL. 0 - device disabled, 1 - device enabled */
+#define XI_PROP_ENABLED "Device Enabled"
+/* BOOL. If present, device is a virtual XTEST device */
+#define XI_PROP_XTEST_DEVICE "XTEST Device"
+
+/* Coordinate transformation matrix for absolute input devices
+ * FLOAT, 9 values in row-major order, coordinates in 0..1 range:
+ * [c0 c1 c2] [x]
+ * [c3 c4 c5] * [y]
+ * [c6 c7 c8] [1] */
+#define XI_PROP_TRANSFORM "Coordinate Transformation Matrix"
+
+/* Pointer acceleration properties */
+/* INTEGER of any format */
+#define ACCEL_PROP_PROFILE_NUMBER "Device Accel Profile"
+/* FLOAT, format 32 */
+#define ACCEL_PROP_CONSTANT_DECELERATION "Device Accel Constant Deceleration"
+/* FLOAT, format 32 */
+#define ACCEL_PROP_ADAPTIVE_DECELERATION "Device Accel Adaptive Deceleration"
+/* FLOAT, format 32 */
+#define ACCEL_PROP_VELOCITY_SCALING "Device Accel Velocity Scaling"
+
+
+/* Axis labels */
+#define AXIS_LABEL_PROP "Axis Labels"
+
+#define AXIS_LABEL_PROP_REL_X "Rel X"
+#define AXIS_LABEL_PROP_REL_Y "Rel Y"
+#define AXIS_LABEL_PROP_REL_Z "Rel Z"
+#define AXIS_LABEL_PROP_REL_RX "Rel Rotary X"
+#define AXIS_LABEL_PROP_REL_RY "Rel Rotary Y"
+#define AXIS_LABEL_PROP_REL_RZ "Rel Rotary Z"
+#define AXIS_LABEL_PROP_REL_HWHEEL "Rel Horiz Wheel"
+#define AXIS_LABEL_PROP_REL_DIAL "Rel Dial"
+#define AXIS_LABEL_PROP_REL_WHEEL "Rel Vert Wheel"
+#define AXIS_LABEL_PROP_REL_MISC "Rel Misc"
+
+/*
+ * Absolute axes
+ */
+
+#define AXIS_LABEL_PROP_ABS_X "Abs X"
+#define AXIS_LABEL_PROP_ABS_Y "Abs Y"
+#define AXIS_LABEL_PROP_ABS_Z "Abs Z"
+#define AXIS_LABEL_PROP_ABS_RX "Abs Rotary X"
+#define AXIS_LABEL_PROP_ABS_RY "Abs Rotary Y"
+#define AXIS_LABEL_PROP_ABS_RZ "Abs Rotary Z"
+#define AXIS_LABEL_PROP_ABS_THROTTLE "Abs Throttle"
+#define AXIS_LABEL_PROP_ABS_RUDDER "Abs Rudder"
+#define AXIS_LABEL_PROP_ABS_WHEEL "Abs Wheel"
+#define AXIS_LABEL_PROP_ABS_GAS "Abs Gas"
+#define AXIS_LABEL_PROP_ABS_BRAKE "Abs Brake"
+#define AXIS_LABEL_PROP_ABS_HAT0X "Abs Hat 0 X"
+#define AXIS_LABEL_PROP_ABS_HAT0Y "Abs Hat 0 Y"
+#define AXIS_LABEL_PROP_ABS_HAT1X "Abs Hat 1 X"
+#define AXIS_LABEL_PROP_ABS_HAT1Y "Abs Hat 1 Y"
+#define AXIS_LABEL_PROP_ABS_HAT2X "Abs Hat 2 X"
+#define AXIS_LABEL_PROP_ABS_HAT2Y "Abs Hat 2 Y"
+#define AXIS_LABEL_PROP_ABS_HAT3X "Abs Hat 3 X"
+#define AXIS_LABEL_PROP_ABS_HAT3Y "Abs Hat 3 Y"
+#define AXIS_LABEL_PROP_ABS_PRESSURE "Abs Pressure"
+#define AXIS_LABEL_PROP_ABS_DISTANCE "Abs Distance"
+#define AXIS_LABEL_PROP_ABS_TILT_X "Abs Tilt X"
+#define AXIS_LABEL_PROP_ABS_TILT_Y "Abs Tilt Y"
+#define AXIS_LABEL_PROP_ABS_TOOL_WIDTH "Abs Tool Width"
+#define AXIS_LABEL_PROP_ABS_VOLUME "Abs Volume"
+#define AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR "Abs MT Touch Major"
+#define AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR "Abs MT Touch Minor"
+#define AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR "Abs MT Width Major"
+#define AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR "Abs MT Width Minor"
+#define AXIS_LABEL_PROP_ABS_MT_ORIENTATION "Abs MT Orientation"
+#define AXIS_LABEL_PROP_ABS_MT_POSITION_X "Abs MT Position X"
+#define AXIS_LABEL_PROP_ABS_MT_POSITION_Y "Abs MT Position Y"
+#define AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE "Abs MT Tool Type"
+#define AXIS_LABEL_PROP_ABS_MT_BLOB_ID "Abs MT Blob ID"
+#define AXIS_LABEL_PROP_ABS_MT_TRACKING_ID "Abs MT Tracking ID"
+#define AXIS_LABEL_PROP_ABS_MT_PRESSURE "Abs MT Pressure"
+#define AXIS_LABEL_PROP_ABS_MISC "Abs Misc"
+
+/* Button names */
+#define BTN_LABEL_PROP "Button Labels"
+
+/* Default label */
+#define BTN_LABEL_PROP_BTN_UNKNOWN "Button Unknown"
+/* Wheel buttons */
+#define BTN_LABEL_PROP_BTN_WHEEL_UP "Button Wheel Up"
+#define BTN_LABEL_PROP_BTN_WHEEL_DOWN "Button Wheel Down"
+#define BTN_LABEL_PROP_BTN_HWHEEL_LEFT "Button Horiz Wheel Left"
+#define BTN_LABEL_PROP_BTN_HWHEEL_RIGHT "Button Horiz Wheel Right"
+
+/* The following are from linux/input.h */
+#define BTN_LABEL_PROP_BTN_0 "Button 0"
+#define BTN_LABEL_PROP_BTN_1 "Button 1"
+#define BTN_LABEL_PROP_BTN_2 "Button 2"
+#define BTN_LABEL_PROP_BTN_3 "Button 3"
+#define BTN_LABEL_PROP_BTN_4 "Button 4"
+#define BTN_LABEL_PROP_BTN_5 "Button 5"
+#define BTN_LABEL_PROP_BTN_6 "Button 6"
+#define BTN_LABEL_PROP_BTN_7 "Button 7"
+#define BTN_LABEL_PROP_BTN_8 "Button 8"
+#define BTN_LABEL_PROP_BTN_9 "Button 9"
+
+#define BTN_LABEL_PROP_BTN_LEFT "Button Left"
+#define BTN_LABEL_PROP_BTN_RIGHT "Button Right"
+#define BTN_LABEL_PROP_BTN_MIDDLE "Button Middle"
+#define BTN_LABEL_PROP_BTN_SIDE "Button Side"
+#define BTN_LABEL_PROP_BTN_EXTRA "Button Extra"
+#define BTN_LABEL_PROP_BTN_FORWARD "Button Forward"
+#define BTN_LABEL_PROP_BTN_BACK "Button Back"
+#define BTN_LABEL_PROP_BTN_TASK "Button Task"
+
+#define BTN_LABEL_PROP_BTN_TRIGGER "Button Trigger"
+#define BTN_LABEL_PROP_BTN_THUMB "Button Thumb"
+#define BTN_LABEL_PROP_BTN_THUMB2 "Button Thumb2"
+#define BTN_LABEL_PROP_BTN_TOP "Button Top"
+#define BTN_LABEL_PROP_BTN_TOP2 "Button Top2"
+#define BTN_LABEL_PROP_BTN_PINKIE "Button Pinkie"
+#define BTN_LABEL_PROP_BTN_BASE "Button Base"
+#define BTN_LABEL_PROP_BTN_BASE2 "Button Base2"
+#define BTN_LABEL_PROP_BTN_BASE3 "Button Base3"
+#define BTN_LABEL_PROP_BTN_BASE4 "Button Base4"
+#define BTN_LABEL_PROP_BTN_BASE5 "Button Base5"
+#define BTN_LABEL_PROP_BTN_BASE6 "Button Base6"
+#define BTN_LABEL_PROP_BTN_DEAD "Button Dead"
+
+#define BTN_LABEL_PROP_BTN_A "Button A"
+#define BTN_LABEL_PROP_BTN_B "Button B"
+#define BTN_LABEL_PROP_BTN_C "Button C"
+#define BTN_LABEL_PROP_BTN_X "Button X"
+#define BTN_LABEL_PROP_BTN_Y "Button Y"
+#define BTN_LABEL_PROP_BTN_Z "Button Z"
+#define BTN_LABEL_PROP_BTN_TL "Button T Left"
+#define BTN_LABEL_PROP_BTN_TR "Button T Right"
+#define BTN_LABEL_PROP_BTN_TL2 "Button T Left2"
+#define BTN_LABEL_PROP_BTN_TR2 "Button T Right2"
+#define BTN_LABEL_PROP_BTN_SELECT "Button Select"
+#define BTN_LABEL_PROP_BTN_START "Button Start"
+#define BTN_LABEL_PROP_BTN_MODE "Button Mode"
+#define BTN_LABEL_PROP_BTN_THUMBL "Button Thumb Left"
+#define BTN_LABEL_PROP_BTN_THUMBR "Button Thumb Right"
+
+#define BTN_LABEL_PROP_BTN_TOOL_PEN "Button Tool Pen"
+#define BTN_LABEL_PROP_BTN_TOOL_RUBBER "Button Tool Rubber"
+#define BTN_LABEL_PROP_BTN_TOOL_BRUSH "Button Tool Brush"
+#define BTN_LABEL_PROP_BTN_TOOL_PENCIL "Button Tool Pencil"
+#define BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH "Button Tool Airbrush"
+#define BTN_LABEL_PROP_BTN_TOOL_FINGER "Button Tool Finger"
+#define BTN_LABEL_PROP_BTN_TOOL_MOUSE "Button Tool Mouse"
+#define BTN_LABEL_PROP_BTN_TOOL_LENS "Button Tool Lens"
+#define BTN_LABEL_PROP_BTN_TOUCH "Button Touch"
+#define BTN_LABEL_PROP_BTN_STYLUS "Button Stylus"
+#define BTN_LABEL_PROP_BTN_STYLUS2 "Button Stylus2"
+#define BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP "Button Tool Doubletap"
+#define BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP "Button Tool Tripletap"
+
+#define BTN_LABEL_PROP_BTN_GEAR_DOWN "Button Gear down"
+#define BTN_LABEL_PROP_BTN_GEAR_UP "Button Gear up"
+
+#endif