aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/include
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/include')
-rw-r--r--xorg-server/include/Makefile.am143
-rw-r--r--xorg-server/include/client.h59
-rw-r--r--xorg-server/include/dix-config.h.in901
-rw-r--r--xorg-server/include/dix.h1
-rw-r--r--xorg-server/include/dixstruct.h382
-rw-r--r--xorg-server/include/eventconvert.h2
-rw-r--r--xorg-server/include/input.h16
-rw-r--r--xorg-server/include/inputstr.h8
-rw-r--r--xorg-server/include/list.h384
-rw-r--r--xorg-server/include/protocol-versions.h4
-rw-r--r--xorg-server/include/ptrveloc.h10
-rw-r--r--xorg-server/include/regionstr.h730
-rw-r--r--xorg-server/include/xkbsrv.h1968
13 files changed, 2419 insertions, 2189 deletions
diff --git a/xorg-server/include/Makefile.am b/xorg-server/include/Makefile.am
index 2b5ee4ddb..6f63c764f 100644
--- a/xorg-server/include/Makefile.am
+++ b/xorg-server/include/Makefile.am
@@ -1,71 +1,72 @@
-if XORG
-sdk_HEADERS = \
- XIstubs.h \
- Xprintf.h \
- callback.h \
- closestr.h \
- closure.h \
- colormap.h \
- colormapst.h \
- hotplug.h \
- cursor.h \
- cursorstr.h \
- dix.h \
- dixaccess.h \
- dixevents.h \
- dixfont.h \
- dixfontstr.h \
- dixgrabs.h \
- dixstruct.h \
- events.h \
- exevents.h \
- extension.h \
- extinit.h \
- extnsionst.h \
- gc.h \
- gcstruct.h \
- globals.h \
- input.h \
- inputstr.h \
- list.h \
- misc.h \
- miscstruct.h \
- opaque.h \
- os.h \
- pixmap.h \
- pixmapstr.h \
- privates.h \
- property.h \
- propertyst.h \
- ptrveloc.h \
- region.h \
- regionstr.h \
- registry.h \
- resource.h \
- rgb.h \
- screenint.h \
- scrnintstr.h \
- selection.h \
- servermd.h \
- site.h \
- swaprep.h \
- swapreq.h \
- validate.h \
- window.h \
- windowstr.h \
- xkbfile.h \
- xkbsrv.h \
- xkbstr.h \
- xkbrules.h \
- xserver-properties.h
-
-nodist_sdk_HEADERS = xorg-server.h
-endif
-
-AM_CFLAGS = $(DIX_CFLAGS)
-
-EXTRA_DIST = \
- dix-config-apple-verbatim.h \
- eventconvert.h eventstr.h inpututils.h \
- protocol-versions.h \
- xsha1.h
+if XORG
+sdk_HEADERS = \
+ XIstubs.h \
+ Xprintf.h \
+ callback.h \
+ client.h \
+ closestr.h \
+ closure.h \
+ colormap.h \
+ colormapst.h \
+ hotplug.h \
+ cursor.h \
+ cursorstr.h \
+ dix.h \
+ dixaccess.h \
+ dixevents.h \
+ dixfont.h \
+ dixfontstr.h \
+ dixgrabs.h \
+ dixstruct.h \
+ events.h \
+ exevents.h \
+ extension.h \
+ extinit.h \
+ extnsionst.h \
+ gc.h \
+ gcstruct.h \
+ globals.h \
+ input.h \
+ inputstr.h \
+ list.h \
+ misc.h \
+ miscstruct.h \
+ opaque.h \
+ os.h \
+ pixmap.h \
+ pixmapstr.h \
+ privates.h \
+ property.h \
+ propertyst.h \
+ ptrveloc.h \
+ region.h \
+ regionstr.h \
+ registry.h \
+ resource.h \
+ rgb.h \
+ screenint.h \
+ scrnintstr.h \
+ selection.h \
+ servermd.h \
+ site.h \
+ swaprep.h \
+ swapreq.h \
+ validate.h \
+ window.h \
+ windowstr.h \
+ xkbfile.h \
+ xkbsrv.h \
+ xkbstr.h \
+ xkbrules.h \
+ xserver-properties.h
+
+nodist_sdk_HEADERS = xorg-server.h
+endif
+
+AM_CFLAGS = $(DIX_CFLAGS)
+
+EXTRA_DIST = \
+ dix-config-apple-verbatim.h \
+ eventconvert.h eventstr.h inpututils.h \
+ protocol-versions.h \
+ xsha1.h
diff --git a/xorg-server/include/client.h b/xorg-server/include/client.h
new file mode 100644
index 000000000..aaafc7da6
--- /dev/null
+++ b/xorg-server/include/client.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All
+ * rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+/* Author: Rami Ylimäki <rami.ylimaki@vincit.fi> */
+
+#ifndef CLIENT_H
+#define CLIENT_H
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif /* HAVE_DIX_CONFIG_H */
+#include <X11/Xfuncproto.h>
+#include <sys/types.h>
+
+/* Client IDs. Use GetClientPid, GetClientCmdName and GetClientCmdArgs
+ * instead of accessing the fields directly. */
+typedef struct {
+ pid_t pid; /* process ID, -1 if not available */
+ const char *cmdname; /* process name, NULL if not available */
+ const char *cmdargs; /* process arguments, NULL if not available */
+} ClientIdRec, *ClientIdPtr;
+
+struct _Client;
+
+/* Initialize and clean up. */
+void ReserveClientIds(struct _Client *client);
+void ReleaseClientIds(struct _Client *client);
+
+/* Determine client IDs for caching. Exported on purpose for
+ * extensions such as SELinux. */
+extern _X_EXPORT pid_t DetermineClientPid(struct _Client *client);
+extern _X_EXPORT void DetermineClientCmd(pid_t, const char **cmdname, const char **cmdargs);
+
+/* Query cached client IDs. Exported on purpose for drivers. */
+extern _X_EXPORT pid_t GetClientPid(struct _Client *client);
+extern _X_EXPORT const char *GetClientCmdName(struct _Client *client);
+extern _X_EXPORT const char *GetClientCmdArgs(struct _Client *client);
+
+#endif /* CLIENT_H */
diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in
index 64eb296c8..fc93f3ec1 100644
--- a/xorg-server/include/dix-config.h.in
+++ b/xorg-server/include/dix-config.h.in
@@ -1,449 +1,452 @@
-/* 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
-
-/* Define to 1 if you have the `vasprintf' function. */
-#undef HAVE_VASPRINTF
-
-/* 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
+
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
+
+/* 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 client ID tracking in X resource extension */
+#undef CLIENTIDS
+
+/* 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 12e4b5977..3f99098a2 100644
--- a/xorg-server/include/dix.h
+++ b/xorg-server/include/dix.h
@@ -570,6 +570,7 @@ extern Bool _X_EXPORT IsPointerDevice( DeviceIntPtr dev);
extern Bool _X_EXPORT IsKeyboardDevice(DeviceIntPtr dev);
extern Bool IsPointerEvent(InternalEvent *event);
extern _X_EXPORT Bool IsMaster(DeviceIntPtr dev);
+extern _X_EXPORT Bool IsFloating(DeviceIntPtr dev);
extern _X_HIDDEN void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
extern _X_HIDDEN int CorePointerProc(DeviceIntPtr dev, int what);
diff --git a/xorg-server/include/dixstruct.h b/xorg-server/include/dixstruct.h
index 92d68d332..443e8b0ae 100644
--- a/xorg-server/include/dixstruct.h
+++ b/xorg-server/include/dixstruct.h
@@ -1,190 +1,192 @@
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef DIXSTRUCT_H
-#define DIXSTRUCT_H
-
-#include "dix.h"
-#include "resource.h"
-#include "cursor.h"
-#include "gc.h"
-#include "pixmap.h"
-#include "privates.h"
-#include <X11/Xmd.h>
-
-/*
- * direct-mapped hash table, used by resource manager to store
- * translation from client ids to server addresses.
- */
-
-extern _X_EXPORT CallbackListPtr ClientStateCallback;
-
-typedef struct {
- ClientPtr client;
- xConnSetupPrefix *prefix;
- xConnSetup *setup;
-} NewClientInfoRec;
-
-typedef void (*ReplySwapPtr) (
- ClientPtr /* pClient */,
- int /* size */,
- void * /* pbuf */);
-
-extern _X_EXPORT void ReplyNotSwappd (
- ClientPtr /* pClient */,
- int /* size */,
- void * /* pbuf */) _X_NORETURN;
-
-typedef enum {ClientStateInitial,
- ClientStateAuthenticating,
- ClientStateRunning,
- ClientStateRetained,
- ClientStateGone,
- ClientStateCheckingSecurity,
- ClientStateCheckedSecurity} ClientState;
-
-#ifdef XFIXES
-typedef struct _saveSet {
- struct _Window *windowPtr;
- Bool toRoot;
- Bool map;
-} SaveSetElt;
-#define SaveSetWindow(ss) ((ss).windowPtr)
-#define SaveSetToRoot(ss) ((ss).toRoot)
-#define SaveSetShouldMap(ss) ((ss).map)
-#define SaveSetAssignWindow(ss,w) ((ss).windowPtr = (w))
-#define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr))
-#define SaveSetAssignMap(ss,m) ((ss).map = (m))
-#else
-typedef struct _Window *SaveSetElt;
-#define SaveSetWindow(ss) (ss)
-#define SaveSetToRoot(ss) FALSE
-#define SaveSetShouldMap(ss) TRUE
-#define SaveSetAssignWindow(ss,w) ((ss) = (w))
-#define SaveSetAssignToRoot(ss,tr)
-#define SaveSetAssignMap(ss,m)
-#endif
-
-typedef struct _Client {
- int index;
- Mask clientAsMask;
- pointer requestBuffer;
- pointer osPrivate; /* for OS layer, including scheduler */
- Bool swapped;
- ReplySwapPtr pSwapReplyFunc;
- XID errorValue;
- int sequence;
- int closeDownMode;
- int clientGone;
- int noClientException; /* this client died or needs to be
- * killed */
- int ignoreCount; /* count for Attend/IgnoreClient */
- SaveSetElt *saveSet;
- int numSaved;
- int (**requestVector) (
- ClientPtr /* pClient */);
- CARD32 req_len; /* length of current request */
- Bool big_requests; /* supports large requests */
- int priority;
- ClientState clientState;
- PrivateRec *devPrivates;
- unsigned short xkbClientFlags;
- unsigned short mapNotifyMask;
- unsigned short newKeyboardNotifyMask;
- unsigned short vMajor,vMinor;
- KeyCode minKC,maxKC;
-
- unsigned long replyBytesRemaining;
- int smart_priority;
- long smart_start_tick;
- long smart_stop_tick;
- long smart_check_tick;
-
- DeviceIntPtr clientPtr;
-} ClientRec;
-
-/*
- * Scheduling interface
- */
-extern _X_EXPORT long SmartScheduleTime;
-extern _X_EXPORT long SmartScheduleInterval;
-extern _X_EXPORT long SmartScheduleSlice;
-extern _X_EXPORT long SmartScheduleMaxSlice;
-extern _X_EXPORT Bool SmartScheduleDisable;
-extern _X_EXPORT void SmartScheduleStartTimer(void);
-extern _X_EXPORT void SmartScheduleStopTimer(void);
-#define SMART_MAX_PRIORITY (20)
-#define SMART_MIN_PRIORITY (-20)
-
-extern _X_EXPORT void SmartScheduleInit(void);
-
-
-/* This prototype is used pervasively in Xext, dix */
-#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
-
-typedef struct _WorkQueue {
- struct _WorkQueue *next;
- Bool (*function) (
- ClientPtr /* pClient */,
- pointer /* closure */
-);
- ClientPtr client;
- pointer closure;
-} WorkQueueRec;
-
-extern _X_EXPORT TimeStamp currentTime;
-extern _X_EXPORT TimeStamp lastDeviceEventTime;
-
-extern _X_EXPORT int CompareTimeStamps(
- TimeStamp /*a*/,
- TimeStamp /*b*/);
-
-extern _X_EXPORT TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
-
-typedef struct _CallbackRec {
- CallbackProcPtr proc;
- pointer data;
- Bool deleted;
- struct _CallbackRec *next;
-} CallbackRec, *CallbackPtr;
-
-typedef struct _CallbackList {
- int inCallback;
- Bool deleted;
- int numDeleted;
- CallbackPtr list;
-} CallbackListRec;
-
-/* proc vectors */
-
-extern _X_EXPORT int (* InitialVector[3]) (ClientPtr /*client*/);
-
-extern _X_EXPORT int (* ProcVector[256]) (ClientPtr /*client*/);
-
-extern _X_EXPORT int (* SwappedProcVector[256]) (ClientPtr /*client*/);
-
-extern _X_EXPORT ReplySwapPtr ReplySwapVector[256];
-
-extern _X_EXPORT int ProcBadRequest(ClientPtr /*client*/);
-
-#endif /* DIXSTRUCT_H */
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIXSTRUCT_H
+#define DIXSTRUCT_H
+
+#include "client.h"
+#include "dix.h"
+#include "resource.h"
+#include "cursor.h"
+#include "gc.h"
+#include "pixmap.h"
+#include "privates.h"
+#include <X11/Xmd.h>
+
+/*
+ * direct-mapped hash table, used by resource manager to store
+ * translation from client ids to server addresses.
+ */
+
+extern _X_EXPORT CallbackListPtr ClientStateCallback;
+
+typedef struct {
+ ClientPtr client;
+ xConnSetupPrefix *prefix;
+ xConnSetup *setup;
+} NewClientInfoRec;
+
+typedef void (*ReplySwapPtr) (
+ ClientPtr /* pClient */,
+ int /* size */,
+ void * /* pbuf */);
+
+extern _X_EXPORT void ReplyNotSwappd (
+ ClientPtr /* pClient */,
+ int /* size */,
+ void * /* pbuf */) _X_NORETURN;
+
+typedef enum {ClientStateInitial,
+ ClientStateAuthenticating,
+ ClientStateRunning,
+ ClientStateRetained,
+ ClientStateGone,
+ ClientStateCheckingSecurity,
+ ClientStateCheckedSecurity} ClientState;
+
+#ifdef XFIXES
+typedef struct _saveSet {
+ struct _Window *windowPtr;
+ Bool toRoot;
+ Bool map;
+} SaveSetElt;
+#define SaveSetWindow(ss) ((ss).windowPtr)
+#define SaveSetToRoot(ss) ((ss).toRoot)
+#define SaveSetShouldMap(ss) ((ss).map)
+#define SaveSetAssignWindow(ss,w) ((ss).windowPtr = (w))
+#define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr))
+#define SaveSetAssignMap(ss,m) ((ss).map = (m))
+#else
+typedef struct _Window *SaveSetElt;
+#define SaveSetWindow(ss) (ss)
+#define SaveSetToRoot(ss) FALSE
+#define SaveSetShouldMap(ss) TRUE
+#define SaveSetAssignWindow(ss,w) ((ss) = (w))
+#define SaveSetAssignToRoot(ss,tr)
+#define SaveSetAssignMap(ss,m)
+#endif
+
+typedef struct _Client {
+ int index;
+ Mask clientAsMask;
+ pointer requestBuffer;
+ pointer osPrivate; /* for OS layer, including scheduler */
+ Bool swapped;
+ ReplySwapPtr pSwapReplyFunc;
+ XID errorValue;
+ int sequence;
+ int closeDownMode;
+ int clientGone;
+ int noClientException; /* this client died or needs to be
+ * killed */
+ int ignoreCount; /* count for Attend/IgnoreClient */
+ SaveSetElt *saveSet;
+ int numSaved;
+ int (**requestVector) (
+ ClientPtr /* pClient */);
+ CARD32 req_len; /* length of current request */
+ Bool big_requests; /* supports large requests */
+ int priority;
+ ClientState clientState;
+ PrivateRec *devPrivates;
+ unsigned short xkbClientFlags;
+ unsigned short mapNotifyMask;
+ unsigned short newKeyboardNotifyMask;
+ unsigned short vMajor,vMinor;
+ KeyCode minKC,maxKC;
+
+ unsigned long replyBytesRemaining;
+ int smart_priority;
+ long smart_start_tick;
+ long smart_stop_tick;
+ long smart_check_tick;
+
+ DeviceIntPtr clientPtr;
+ ClientIdPtr clientIds;
+} ClientRec;
+
+/*
+ * Scheduling interface
+ */
+extern _X_EXPORT long SmartScheduleTime;
+extern _X_EXPORT long SmartScheduleInterval;
+extern _X_EXPORT long SmartScheduleSlice;
+extern _X_EXPORT long SmartScheduleMaxSlice;
+extern _X_EXPORT Bool SmartScheduleDisable;
+extern _X_EXPORT void SmartScheduleStartTimer(void);
+extern _X_EXPORT void SmartScheduleStopTimer(void);
+#define SMART_MAX_PRIORITY (20)
+#define SMART_MIN_PRIORITY (-20)
+
+extern _X_EXPORT void SmartScheduleInit(void);
+
+
+/* This prototype is used pervasively in Xext, dix */
+#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
+
+typedef struct _WorkQueue {
+ struct _WorkQueue *next;
+ Bool (*function) (
+ ClientPtr /* pClient */,
+ pointer /* closure */
+);
+ ClientPtr client;
+ pointer closure;
+} WorkQueueRec;
+
+extern _X_EXPORT TimeStamp currentTime;
+extern _X_EXPORT TimeStamp lastDeviceEventTime;
+
+extern _X_EXPORT int CompareTimeStamps(
+ TimeStamp /*a*/,
+ TimeStamp /*b*/);
+
+extern _X_EXPORT TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
+
+typedef struct _CallbackRec {
+ CallbackProcPtr proc;
+ pointer data;
+ Bool deleted;
+ struct _CallbackRec *next;
+} CallbackRec, *CallbackPtr;
+
+typedef struct _CallbackList {
+ int inCallback;
+ Bool deleted;
+ int numDeleted;
+ CallbackPtr list;
+} CallbackListRec;
+
+/* proc vectors */
+
+extern _X_EXPORT int (* InitialVector[3]) (ClientPtr /*client*/);
+
+extern _X_EXPORT int (* ProcVector[256]) (ClientPtr /*client*/);
+
+extern _X_EXPORT int (* SwappedProcVector[256]) (ClientPtr /*client*/);
+
+extern _X_EXPORT ReplySwapPtr ReplySwapVector[256];
+
+extern _X_EXPORT int ProcBadRequest(ClientPtr /*client*/);
+
+#endif /* DIXSTRUCT_H */
diff --git a/xorg-server/include/eventconvert.h b/xorg-server/include/eventconvert.h
index b1196a00e..b000abc4b 100644
--- a/xorg-server/include/eventconvert.h
+++ b/xorg-server/include/eventconvert.h
@@ -30,7 +30,7 @@
#define FP1616(integral, frac) ((integral) * (1 << 16) + (frac) * (1 << 16))
-_X_EXPORT int EventToCore(InternalEvent *event, xEvent *core);
+_X_EXPORT int EventToCore(InternalEvent *event, xEvent **core, int *count);
_X_EXPORT int EventToXI(InternalEvent *ev, xEvent **xi, int *count);
_X_EXPORT int EventToXI2(InternalEvent *ev, xEvent **xi);
_X_INTERNAL int GetCoreType(InternalEvent* ev);
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h
index f96a0a988..643866f98 100644
--- a/xorg-server/include/input.h
+++ b/xorg-server/include/input.h
@@ -150,6 +150,11 @@ typedef void (*PointerAccelSchemeProc)(
typedef void (*DeviceCallbackProc)(
DeviceIntPtr /*pDev*/);
+struct _ValuatorAccelerationRec;
+typedef Bool (*PointerAccelSchemeInitProc)(
+ DeviceIntPtr /*dev*/,
+ struct _ValuatorAccelerationRec* /*protoScheme*/);
+
typedef struct _DeviceRec {
pointer devicePrivate;
ProcessInputProc processInputProc; /* current */
@@ -538,14 +543,15 @@ extern WindowPtr XYToWindow(SpritePtr pSprite, int x, int y);
extern int EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event,
WindowPtr win);
/**
- * Return masks for EventIsDeliverable.
+ * Masks specifying the type of event to deliver for an InternalEvent; used
+ * by EventIsDeliverable.
* @defgroup EventIsDeliverable return flags
* @{
*/
-#define XI_MASK (1 << 0) /**< XI mask set on window */
-#define CORE_MASK (1 << 1) /**< Core mask set on window */
-#define DONT_PROPAGATE_MASK (1 << 2) /**< DontPropagate mask set on window */
-#define XI2_MASK (1 << 3) /**< XI2 mask set on window */
+#define EVENT_XI1_MASK (1 << 0) /**< XI1.x event */
+#define EVENT_CORE_MASK (1 << 1) /**< Core event */
+#define EVENT_DONT_PROPAGATE_MASK (1 << 2) /**< DontPropagate mask set */
+#define EVENT_XI2_MASK (1 << 3) /**< XI2 mask set on window */
/* @} */
/* Implemented by the DDX. */
diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h
index b74ee0454..8509eb024 100644
--- a/xorg-server/include/inputstr.h
+++ b/xorg-server/include/inputstr.h
@@ -266,6 +266,7 @@ typedef struct _ValuatorAccelerationRec {
int number;
PointerAccelSchemeProc AccelSchemeProc;
void *accelData; /* at disposal of AccelScheme */
+ PointerAccelSchemeInitProc AccelInitProc;
DeviceCallbackProc AccelCleanupProc;
} ValuatorAccelerationRec, *ValuatorAccelerationPtr;
@@ -493,6 +494,7 @@ typedef struct _SpriteInfoRec {
#define MASTER_POINTER 1
#define MASTER_KEYBOARD 2
#define SLAVE 3
+#define MASTER_ATTACHED 4 /* special type for GetMaster */
typedef struct _DeviceIntRec {
DeviceRec public;
@@ -529,10 +531,8 @@ typedef struct _DeviceIntRec {
PrivateRec *devPrivates;
DeviceUnwrapProc unwrapProc;
SpriteInfoPtr spriteInfo;
- union {
- DeviceIntPtr master; /* master device */
- DeviceIntPtr lastSlave; /* last slave device used */
- } u;
+ DeviceIntPtr master; /* master device */
+ DeviceIntPtr lastSlave; /* last slave device used */
/* last valuator values recorded, not posted to client;
* for slave devices, valuators is in device coordinates
diff --git a/xorg-server/include/list.h b/xorg-server/include/list.h
index 9479d2d92..5933b973d 100644
--- a/xorg-server/include/list.h
+++ b/xorg-server/include/list.h
@@ -1,103 +1,281 @@
-/*
- * Copyright © 2010 Intel Corporation
- * Copyright © 2010 Francisco Jerez <currojerez@riseup.net>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- *
- */
-
-#ifndef _LIST_H_
-#define _LIST_H_
-
-/* classic doubly-link circular list */
-struct list {
- struct list *next, *prev;
-};
-
-static void
-list_init(struct list *list)
-{
- list->next = list->prev = list;
-}
-
-static inline void
-__list_add(struct list *entry,
- struct list *prev,
- struct list *next)
-{
- next->prev = entry;
- entry->next = next;
- entry->prev = prev;
- prev->next = entry;
-}
-
-static inline void
-list_add(struct list *entry, struct list *head)
-{
- __list_add(entry, head, head->next);
-}
-
-static inline void
-__list_del(struct list *prev, struct list *next)
-{
- next->prev = prev;
- prev->next = next;
-}
-
-static inline void
-list_del(struct list *entry)
-{
- __list_del(entry->prev, entry->next);
- list_init(entry);
-}
-
-static inline Bool
-list_is_empty(struct list *head)
-{
- return head->next == head;
-}
-
-#ifndef container_of
-#define container_of(ptr, type, member) \
- (type *)((char *)(ptr) - (char *) &((type *)0)->member)
-#endif
-
-#define list_entry(ptr, type, member) \
- container_of(ptr, type, member)
-
-#define list_first_entry(ptr, type, member) \
- list_entry((ptr)->next, type, member)
-
-#define __container_of(ptr, sample, member) \
- (void *)((char *)(ptr) \
- - ((char *)&(sample)->member - (char *)(sample)))
-
-#define list_for_each_entry(pos, head, member) \
- for (pos = __container_of((head)->next, pos, member); \
- &pos->member != (head); \
- pos = __container_of(pos->member.next, pos, member))
-
-#define list_for_each_entry_safe(pos, tmp, head, member) \
- for (pos = __container_of((head)->next, pos, member), \
- tmp = __container_of(pos->member.next, pos, member); \
- &pos->member != (head); \
- pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
-
-#endif
+/*
+ * Copyright © 2010 Intel Corporation
+ * Copyright © 2010 Francisco Jerez <currojerez@riseup.net>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#ifndef _LIST_H_
+#define _LIST_H_
+
+/**
+ * @file Classic doubly-link circular list implementation.
+ *
+ * Example:
+ * We need to keep a list of struct foo in the parent struct bar, i.e. what
+ * we want is something like this.
+ *
+ * struct bar {
+ * ...
+ * struct foo *foos; -----> struct foo {}, struct foo {}, struct foo{}
+ * ...
+ * }
+ *
+ * We need one list head in bar and a list element in all foos (both are of
+ * data type 'struct list').
+ *
+ * struct bar {
+ * ...
+ * struct list foos;
+ * ...
+ * }
+ *
+ * struct foo {
+ * ...
+ * struct list entry;
+ * ...
+ * }
+ *
+ * Now we initialize the list head:
+ *
+ * struct bar bar;
+ * ...
+ * list_init(&bar.foos);
+ *
+ * Then we create the first element and add it to this list:
+ *
+ * struct foo *foo = malloc(...);
+ * ....
+ * list_add(&foo->entry, &bar.foos);
+ *
+ * Repeat the above for each element you want to add to the list. Deleting
+ * works with the element itself.
+ * list_del(&foo->entry);
+ * free(foo);
+ *
+ * Note: calling list_del(&bar.foos) will set bar.foos to an empty
+ * list again.
+ *
+ * Looping through the list requires a 'struct foo' as iterator and the
+ * name of the field the subnodes use.
+ *
+ * struct foo *iterator;
+ * list_for_each_entry(iterator, &bar.foos, entry) {
+ * if (iterator->something == ...)
+ * ...
+ * }
+ *
+ * Note: You must not call list_del() on the iterator if you continue the
+ * loop. You need to run the safe for-each loop instead:
+ *
+ * struct foo *iterator, *next;
+ * list_for_each_entry_safe(iterator, next, &bar.foos, entry) {
+ * if (...)
+ * list_del(&iterator->entry);
+ * }
+ *
+ */
+
+/**
+ * The linkage struct for list nodes. This struct must be part of your
+ * to-be-linked struct.
+ *
+ * Example:
+ * struct foo {
+ * int a;
+ * void *b;
+ * struct list *mylist;
+ * }
+ *
+ * Position and name of the struct list field is irrelevant.
+ * There are no requirements that elements of a list are of the same type.
+ * There are no requirements for a list head, any struct list can be a list
+ * head.
+ */
+struct list {
+ struct list *next, *prev;
+};
+
+/**
+ * Initialize the list as an empty list.
+ *
+ * Example:
+ * list_init(&foo->mylist);
+ *
+ * @param The list to initialized.
+ */
+static void
+list_init(struct list *list)
+{
+ list->next = list->prev = list;
+}
+
+static inline void
+__list_add(struct list *entry,
+ struct list *prev,
+ struct list *next)
+{
+ next->prev = entry;
+ entry->next = next;
+ entry->prev = prev;
+ prev->next = entry;
+}
+
+/**
+ * Insert a new element after the given list head.
+ * The list changes from:
+ * head → some element → ...
+ * to
+ * head → new element → older element → ...
+ *
+ * Example:
+ * struct foo *newfoo = malloc(...);
+ * list_add(&newfoo->mylist, &foo->mylist);
+ *
+ * @param entry The new element to prepend to the list.
+ * @param head The existing list.
+ */
+static inline void
+list_add(struct list *entry, struct list *head)
+{
+ __list_add(entry, head, head->next);
+}
+
+static inline void
+__list_del(struct list *prev, struct list *next)
+{
+ next->prev = prev;
+ prev->next = next;
+}
+
+/**
+ * Remove the element from the list it is in. Using this function will reset
+ * the pointers to/from this element so it is removed from the list. It does
+ * NOT free the element itself or manipulate it otherwise.
+ *
+ * Using list_del on a pure list head (like in the example at the top of
+ * this file) will NOT remove the first element from
+ * the list but rather reset the list as empty list.
+ *
+ * Example:
+ * list_del(&newfoo->mylist);
+ *
+ * @param entry The element to remove.
+ */
+static inline void
+list_del(struct list *entry)
+{
+ __list_del(entry->prev, entry->next);
+ list_init(entry);
+}
+
+/**
+ * Check if the list is empty.
+ *
+ * Example:
+ * list_is_empty(&foo->mylist);
+ *
+ * @return True if the list contains one or more elements or False otherwise.
+ */
+static inline Bool
+list_is_empty(struct list *head)
+{
+ return head->next == head;
+}
+
+/**
+ * Returns a pointer to the container of this list element.
+ *
+ * Example:
+ * struct foo* f;
+ * f = container_of(&foo->mylist, struct foo, mylist);
+ * assert(f == foo);
+ *
+ * @param ptr Pointer to the struct list.
+ * @param type Data type of the list element.
+ * @param member Member name of the struct list field in the list element.
+ * @return A pointer to the data struct containing the list head.
+ */
+#ifndef container_of
+#define container_of(ptr, type, member) \
+ (type *)((char *)(ptr) - (char *) &((type *)0)->member)
+#endif
+
+/**
+ * Alias of container_of
+ */
+#define list_entry(ptr, type, member) \
+ container_of(ptr, type, member)
+
+/**
+ * Retrieve the first list entry for the given list pointer.
+ *
+ * Example:
+ * struct foo *first;
+ * first = list_first_entry(&foo->mylist, struct foo, mylist);
+ *
+ * @param ptr The list head
+ * @param type Data type of the list element to retrieve
+ * @param member Member name of the struct list field in the list element.
+ * @return A pointer to the first list element.
+ */
+#define list_first_entry(ptr, type, member) \
+ list_entry((ptr)->next, type, member)
+
+#define __container_of(ptr, sample, member) \
+ (void *)((char *)(ptr) \
+ - ((char *)&(sample)->member - (char *)(sample)))
+/**
+ * Loop through the list given by head and set pos to struct in the list.
+ *
+ * Example:
+ * struct foo *iterator;
+ * list_for_each_entry(iterator, &foo->mylist, mylist) {
+ * [modify iterator]
+ * }
+ *
+ * This macro is not safe for node deletion. Use list_for_each_entry_safe
+ * instead.
+ *
+ * @param pos Iterator variable of the type of the list elements.
+ * @param head List head
+ * @param member Member name of the struct list in the list elements.
+ *
+ */
+#define list_for_each_entry(pos, head, member) \
+ for (pos = __container_of((head)->next, pos, member); \
+ &pos->member != (head); \
+ pos = __container_of(pos->member.next, pos, member))
+
+/**
+ * Loop through the list, keeping a backup pointer to the element. This
+ * macro allows for the deletion of a list element while looping through the
+ * list.
+ *
+ * See list_for_each_entry for more details.
+ */
+#define list_for_each_entry_safe(pos, tmp, head, member) \
+ for (pos = __container_of((head)->next, pos, member), \
+ tmp = __container_of(pos->member.next, pos, member); \
+ &pos->member != (head); \
+ pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
+
+#endif
diff --git a/xorg-server/include/protocol-versions.h b/xorg-server/include/protocol-versions.h
index 1d33bddcf..8692ded8a 100644
--- a/xorg-server/include/protocol-versions.h
+++ b/xorg-server/include/protocol-versions.h
@@ -104,10 +104,6 @@
#define SERVER_WINDOWSWM_MINOR_VERSION 0
#define SERVER_WINDOWSWM_PATCH_VERSION 0
-/* Xcalibrate */
-#define SERVER_XCALIBRATE_MAJOR_VERSION 0
-#define SERVER_XCALIBRATE_MINOR_VERSION 1
-
/* DGA */
#define SERVER_XDGA_MAJOR_VERSION 2
#define SERVER_XDGA_MINOR_VERSION 0
diff --git a/xorg-server/include/ptrveloc.h b/xorg-server/include/ptrveloc.h
index 6f999a88f..8c59c0361 100644
--- a/xorg-server/include/ptrveloc.h
+++ b/xorg-server/include/ptrveloc.h
@@ -110,12 +110,6 @@ BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel,
extern _X_EXPORT void
FreeVelocityData(DeviceVelocityPtr vel);
-extern _X_INTERNAL BOOL
-InitializePredictableAccelerationProperties(DeviceIntPtr dev);
-
-extern _X_INTERNAL BOOL
-DeletePredictableAccelerationProperties(DeviceIntPtr dev);
-
extern _X_EXPORT int
SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
@@ -129,6 +123,10 @@ SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel,
extern _X_INTERNAL void
AccelerationDefaultCleanup(DeviceIntPtr dev);
+extern _X_INTERNAL Bool
+InitPredictableAccelerationScheme(DeviceIntPtr dev,
+ struct _ValuatorAccelerationRec* protoScheme);
+
extern _X_INTERNAL void
acceleratePointerPredictable(DeviceIntPtr dev, int first_valuator,
int num_valuators, int *valuators, int evtime);
diff --git a/xorg-server/include/regionstr.h b/xorg-server/include/regionstr.h
index 92f4ca9f2..3759fe17b 100644
--- a/xorg-server/include/regionstr.h
+++ b/xorg-server/include/regionstr.h
@@ -1,370 +1,360 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef REGIONSTRUCT_H
-#define REGIONSTRUCT_H
-
-typedef struct pixman_region16 RegionRec, *RegionPtr;
-
-#include "miscstruct.h"
-
-/* Return values from RectIn() */
-
-#define rgnOUT 0
-#define rgnIN 1
-#define rgnPART 2
-
-#define NullRegion ((RegionPtr)0)
-
-/*
- * clip region
- */
-
-typedef struct pixman_region16_data RegDataRec, *RegDataPtr;
-
-extern _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);
-}
-
-/* not a region */
-
-static inline Bool RegionNar(RegionPtr reg) {
- return ((reg)->data == &RegionBrokenData);
-}
-
-static inline int RegionNumRects(RegionPtr reg) {
- return ((reg)->data ? (reg)->data->numRects : 1);
-}
-
-static inline int RegionSize(RegionPtr reg) {
- return ((reg)->data ? (reg)->data->size : 0);
-}
-
-static inline BoxPtr RegionRects(RegionPtr reg) {
- return ((reg)->data ? (BoxPtr)((reg)->data + 1) : &(reg)->extents);
-}
-
-static inline BoxPtr RegionBoxptr(RegionPtr reg) {
- return ((BoxPtr)((reg)->data + 1));
-}
-
-static inline BoxPtr RegionBox(RegionPtr reg, int i) {
- return (&RegionBoxptr(reg)[i]);
-}
-
-static inline BoxPtr RegionTop(RegionPtr reg) {
- return RegionBox(reg, (reg)->data->numRects);
-}
-
-static inline BoxPtr RegionEnd(RegionPtr reg) {
- return RegionBox(reg, (reg)->data->numRects - 1);
-}
-
-static inline size_t RegionSizeof(int n) {
- return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
-}
-
-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;
- }
-}
-
-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);
-}
-
-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 RegionDestroy(
- RegionPtr /*pReg*/);
-
-static inline Bool
-RegionCopy(RegionPtr dst, RegionPtr src)
-{
- return pixman_region_copy (dst, src);
-}
-
-static inline Bool
-RegionIntersect(
- RegionPtr newReg, /* destination Region */
- RegionPtr reg1,
- RegionPtr reg2 /* source regions */
- )
-{
- return pixman_region_intersect (newReg, reg1, 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 RegionAppend(
- RegionPtr /*dstrgn*/,
- RegionPtr /*rgn*/);
-
-extern _X_EXPORT Bool RegionValidate(
- RegionPtr /*badreg*/,
- Bool * /*pOverlap*/);
-
-extern _X_EXPORT RegionPtr RegionFromRects(
- int /*nrects*/,
- xRectanglePtr /*prect*/,
- int /*ctype*/);
-
-/*-
- *-----------------------------------------------------------------------
- * 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.
- *
- *-----------------------------------------------------------------------
- */
-
-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);
-}
-
-static inline int
-RegionContainsRect(RegionPtr region, BoxPtr prect)
-{
- return pixman_region_contains_rectangle (region, prect);
-}
-
-/* TranslateRegion(pReg, x, y)
- translates in place
-*/
-
-static inline void
-RegionTranslate(RegionPtr pReg, int x, int y)
-{
- pixman_region_translate (pReg, x, y);
-}
-
-extern _X_EXPORT Bool RegionBreak(
- RegionPtr /*pReg*/);
-
-static inline Bool
-RegionContainsPoint(
- RegionPtr pReg,
- int x,
- int y,
- BoxPtr box /* "return" value */
- )
-{
- return pixman_region_contains_point (pReg, x, y, box);
-}
-
-static inline Bool
-RegionEqual(RegionPtr reg1, RegionPtr reg2)
-{
- return pixman_region_equal (reg1, reg2);
-}
-
-extern _X_EXPORT Bool RegionRectAlloc(
- RegionPtr /*pRgn*/,
- int /*n*/
-);
-
-#ifdef DEBUG
-extern _X_EXPORT Bool RegionIsValid(
- RegionPtr /*prgn*/
-);
-#endif
-
-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 */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef REGIONSTRUCT_H
+#define REGIONSTRUCT_H
+
+typedef struct pixman_region16 RegionRec, *RegionPtr;
+
+#include "miscstruct.h"
+
+/* Return values from RectIn() */
+
+#define rgnOUT 0
+#define rgnIN 1
+#define rgnPART 2
+
+#define NullRegion ((RegionPtr)0)
+
+/*
+ * clip region
+ */
+
+typedef struct pixman_region16_data RegDataRec, *RegDataPtr;
+
+extern _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);
+}
+
+/* not a region */
+
+static inline Bool RegionNar(RegionPtr reg) {
+ return ((reg)->data == &RegionBrokenData);
+}
+
+static inline int RegionNumRects(RegionPtr reg) {
+ return ((reg)->data ? (reg)->data->numRects : 1);
+}
+
+static inline int RegionSize(RegionPtr reg) {
+ return ((reg)->data ? (reg)->data->size : 0);
+}
+
+static inline BoxPtr RegionRects(RegionPtr reg) {
+ return ((reg)->data ? (BoxPtr)((reg)->data + 1) : &(reg)->extents);
+}
+
+static inline BoxPtr RegionBoxptr(RegionPtr reg) {
+ return ((BoxPtr)((reg)->data + 1));
+}
+
+static inline BoxPtr RegionBox(RegionPtr reg, int i) {
+ return (&RegionBoxptr(reg)[i]);
+}
+
+static inline BoxPtr RegionTop(RegionPtr reg) {
+ return RegionBox(reg, (reg)->data->numRects);
+}
+
+static inline BoxPtr RegionEnd(RegionPtr reg) {
+ return RegionBox(reg, (reg)->data->numRects - 1);
+}
+
+static inline size_t RegionSizeof(int n) {
+ return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
+}
+
+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;
+ }
+}
+
+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);
+}
+
+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 RegionDestroy(
+ RegionPtr /*pReg*/);
+
+static inline Bool
+RegionCopy(RegionPtr dst, RegionPtr src)
+{
+ return pixman_region_copy (dst, src);
+}
+
+static inline Bool
+RegionIntersect(
+ RegionPtr newReg, /* destination Region */
+ RegionPtr reg1,
+ RegionPtr reg2 /* source regions */
+ )
+{
+ return pixman_region_intersect (newReg, reg1, 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 RegionAppend(
+ RegionPtr /*dstrgn*/,
+ RegionPtr /*rgn*/);
+
+extern _X_EXPORT Bool RegionValidate(
+ RegionPtr /*badreg*/,
+ Bool * /*pOverlap*/);
+
+extern _X_EXPORT RegionPtr RegionFromRects(
+ int /*nrects*/,
+ xRectanglePtr /*prect*/,
+ int /*ctype*/);
+
+/*-
+ *-----------------------------------------------------------------------
+ * 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.
+ *
+ *-----------------------------------------------------------------------
+ */
+
+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);
+}
+
+static inline int
+RegionContainsRect(RegionPtr region, BoxPtr prect)
+{
+ return pixman_region_contains_rectangle (region, prect);
+}
+
+/* TranslateRegion(pReg, x, y)
+ translates in place
+*/
+
+static inline void
+RegionTranslate(RegionPtr pReg, int x, int y)
+{
+ pixman_region_translate (pReg, x, y);
+}
+
+extern _X_EXPORT Bool RegionBreak(
+ RegionPtr /*pReg*/);
+
+static inline Bool
+RegionContainsPoint(
+ RegionPtr pReg,
+ int x,
+ int y,
+ BoxPtr box /* "return" value */
+ )
+{
+ return pixman_region_contains_point (pReg, x, y, box);
+}
+
+static inline Bool
+RegionEqual(RegionPtr reg1, RegionPtr reg2)
+{
+ return pixman_region_equal (reg1, reg2);
+}
+
+extern _X_EXPORT Bool RegionRectAlloc(
+ RegionPtr /*pRgn*/,
+ int /*n*/
+);
+
+#ifdef DEBUG
+extern _X_EXPORT Bool RegionIsValid(
+ RegionPtr /*prgn*/
+);
+#endif
+
+extern _X_EXPORT void RegionPrint(
+ RegionPtr /*pReg*/);
+
+#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/xkbsrv.h b/xorg-server/include/xkbsrv.h
index a7f17d44c..422bae014 100644
--- a/xorg-server/include/xkbsrv.h
+++ b/xorg-server/include/xkbsrv.h
@@ -1,986 +1,982 @@
-/************************************************************
-Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
-
-Permission to use, copy, modify, and distribute this
-software and its documentation for any purpose and without
-fee is hereby granted, provided that the above copyright
-notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
-of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
-of this software for any purpose. It is provided "as is"
-without any express or implied warranty.
-
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
-THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-#ifndef _XKBSRV_H_
-#define _XKBSRV_H_
-
-#define XkbAllocClientMap SrvXkbAllocClientMap
-#define XkbAllocServerMap SrvXkbAllocServerMap
-#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey
-#define XkbCopyKeyTypes SrvXkbCopyKeyTypes
-#define XkbFreeClientMap SrvXkbFreeClientMap
-#define XkbFreeServerMap SrvXkbFreeServerMap
-#define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols
-#define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey
-#define XkbResizeKeyActions SrvXkbResizeKeyActions
-#define XkbResizeKeySyms SrvXkbResizeKeySyms
-#define XkbResizeKeyType SrvXkbResizeKeyType
-#define XkbAllocCompatMap SrvXkbAllocCompatMap
-#define XkbAllocControls SrvXkbAllocControls
-#define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps
-#define XkbAllocKeyboard SrvXkbAllocKeyboard
-#define XkbAllocNames SrvXkbAllocNames
-#define XkbFreeCompatMap SrvXkbFreeCompatMap
-#define XkbFreeKeyboard SrvXkbFreeKeyboard
-#define XkbFreeNames SrvXkbFreeNames
-#define XkbLatchModifiers SrvXkbLatchModifiers
-#define XkbLatchGroup SrvXkbLatchGroup
-#define XkbVirtualModsToReal SrvXkbVirtualModsToReal
-#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange
-#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges
-
-#include <X11/extensions/XKBproto.h>
-#include "xkbstr.h"
-#include "xkbrules.h"
-#include "inputstr.h"
-#include "events.h"
-
-typedef struct _XkbInterest {
- DeviceIntPtr dev;
- ClientPtr client;
- XID resource;
- struct _XkbInterest * next;
- CARD16 extDevNotifyMask;
- CARD16 stateNotifyMask;
- CARD16 namesNotifyMask;
- CARD32 ctrlsNotifyMask;
- CARD8 compatNotifyMask;
- BOOL bellNotifyMask;
- BOOL actionMessageMask;
- CARD16 accessXNotifyMask;
- CARD32 iStateNotifyMask;
- CARD32 iMapNotifyMask;
- CARD16 altSymsNotifyMask;
- CARD32 autoCtrls;
- CARD32 autoCtrlValues;
-} XkbInterestRec,*XkbInterestPtr;
-
-typedef struct _XkbRadioGroup {
- CARD8 flags;
- CARD8 nMembers;
- CARD8 dfltDown;
- CARD8 currentDown;
- CARD8 members[XkbRGMaxMembers];
-} XkbRadioGroupRec, *XkbRadioGroupPtr;
-
-typedef struct _XkbEventCause {
- CARD8 kc;
- CARD8 event;
- CARD8 mjr;
- CARD8 mnr;
- ClientPtr client;
-} XkbEventCauseRec,*XkbEventCausePtr;
-#define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
- (c)->mjr= (c)->mnr= 0; \
- (c)->client= NULL; }
-#define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
- (c)->mjr= (j),(c)->mnr= (n);\
- (c)->client= (cl); }
-#define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl)
-#define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl)
-#define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0)
-
-#define _OFF_TIMER 0
-#define _KRG_WARN_TIMER 1
-#define _KRG_TIMER 2
-#define _SK_TIMEOUT_TIMER 3
-#define _ALL_TIMEOUT_TIMER 4
-
-#define _BEEP_NONE 0
-#define _BEEP_FEATURE_ON 1
-#define _BEEP_FEATURE_OFF 2
-#define _BEEP_FEATURE_CHANGE 3
-#define _BEEP_SLOW_WARN 4
-#define _BEEP_SLOW_PRESS 5
-#define _BEEP_SLOW_ACCEPT 6
-#define _BEEP_SLOW_REJECT 7
-#define _BEEP_SLOW_RELEASE 8
-#define _BEEP_STICKY_LATCH 9
-#define _BEEP_STICKY_LOCK 10
-#define _BEEP_STICKY_UNLOCK 11
-#define _BEEP_LED_ON 12
-#define _BEEP_LED_OFF 13
-#define _BEEP_LED_CHANGE 14
-#define _BEEP_BOUNCE_REJECT 15
-
-typedef struct _XkbFilter {
- CARD16 keycode;
- CARD8 what;
- CARD8 active;
- CARD8 filterOthers;
- CARD32 priv;
- XkbAction upAction;
- int (*filter)(
- struct _XkbSrvInfo* /* xkbi */,
- struct _XkbFilter * /* filter */,
- unsigned /* keycode */,
- XkbAction * /* action */
- );
- struct _XkbFilter *next;
-} XkbFilterRec,*XkbFilterPtr;
-
-typedef struct _XkbSrvInfo {
- XkbStateRec prev_state;
- XkbStateRec state;
- XkbDescPtr desc;
-
- DeviceIntPtr device;
- KbdCtrlProcPtr kbdProc;
-
- XkbRadioGroupPtr radioGroups;
- CARD8 nRadioGroups;
- CARD8 clearMods;
- CARD8 setMods;
- INT16 groupChange;
-
- CARD16 dfltPtrDelta;
-
- double mouseKeysCurve;
- double mouseKeysCurveFactor;
- INT16 mouseKeysDX;
- INT16 mouseKeysDY;
- CARD8 mouseKeysFlags;
- Bool mouseKeysAccel;
- CARD8 mouseKeysCounter;
-
- CARD8 lockedPtrButtons;
- CARD8 shiftKeyCount;
- KeyCode mouseKey;
- KeyCode inactiveKey;
- KeyCode slowKey;
- KeyCode repeatKey;
- CARD8 krgTimerActive;
- CARD8 beepType;
- CARD8 beepCount;
-
- CARD32 flags;
- CARD32 lastPtrEventTime;
- CARD32 lastShiftEventTime;
- OsTimerPtr beepTimer;
- OsTimerPtr mouseKeyTimer;
- OsTimerPtr slowKeysTimer;
- OsTimerPtr bounceKeysTimer;
- OsTimerPtr repeatKeyTimer;
- OsTimerPtr krgTimer;
-
- int szFilters;
- XkbFilterPtr filters;
-} XkbSrvInfoRec, *XkbSrvInfoPtr;
-
-#define XkbSLI_IsDefault (1L<<0)
-#define XkbSLI_HasOwnState (1L<<1)
-
-typedef struct _XkbSrvLedInfo {
- CARD16 flags;
- CARD16 class;
- CARD16 id;
- union {
- KbdFeedbackPtr kf;
- LedFeedbackPtr lf;
- } fb;
-
- CARD32 physIndicators;
- CARD32 autoState;
- CARD32 explicitState;
- CARD32 effectiveState;
-
- CARD32 mapsPresent;
- CARD32 namesPresent;
- XkbIndicatorMapPtr maps;
- Atom * names;
-
- CARD32 usesBase;
- CARD32 usesLatched;
- CARD32 usesLocked;
- CARD32 usesEffective;
- CARD32 usesCompat;
- CARD32 usesControls;
-
- CARD32 usedComponents;
-} XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
-
-/*
- * Settings for xkbClientFlags field (used by DIX)
- * These flags _must_ not overlap with XkbPCF_*
- */
-#define _XkbClientInitialized (1<<15)
-
-#define _XkbWantsDetectableAutoRepeat(c)\
- ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
-
-/*
- * Settings for flags field
- */
-#define _XkbStateNotifyInProgress (1<<0)
-
-typedef struct
-{
- ProcessInputProc processInputProc;
- /* If processInputProc is set to something different than realInputProc,
- * UNWRAP and COND_WRAP will not touch processInputProc and update only
- * realInputProc. This ensures that
- * processInputProc == (frozen ? EnqueueEvent : realInputProc)
- *
- * WRAP_PROCESS_INPUT_PROC should only be called during initialization,
- * since it may destroy this invariant.
- */
- ProcessInputProc realInputProc;
- DeviceUnwrapProc unwrapProc;
-} xkbDeviceInfoRec, *xkbDeviceInfoPtr;
-
-#define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
- device->public.processInputProc = proc; \
- oldprocs->processInputProc = \
- oldprocs->realInputProc = device->public.realInputProc; \
- device->public.realInputProc = proc; \
- oldprocs->unwrapProc = device->unwrapProc; \
- device->unwrapProc = unwrapproc;
-
-#define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
- if (device->public.processInputProc == device->public.realInputProc)\
- device->public.processInputProc = proc; \
- oldprocs->processInputProc = \
- oldprocs->realInputProc = device->public.realInputProc; \
- device->public.realInputProc = proc; \
- oldprocs->unwrapProc = device->unwrapProc; \
- device->unwrapProc = unwrapproc;
-
-#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \
- backupproc = device->public.realInputProc; \
- if (device->public.processInputProc == device->public.realInputProc)\
- device->public.processInputProc = oldprocs->realInputProc; \
- device->public.realInputProc = oldprocs->realInputProc; \
- device->unwrapProc = oldprocs->unwrapProc;
-
-extern _X_EXPORT DevPrivateKeyRec xkbDevicePrivateKeyRec;
-#define xkbDevicePrivateKey (&xkbDevicePrivateKeyRec)
-
-#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey))
-
-extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
-
-/***====================================================================***/
-
-
-/***====================================================================***/
-
-#define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
-#define XkbAllFilteredEventsMask \
- (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask)
-
-/***====================================================================***/
-
-extern _X_EXPORT int XkbReqCode;
-extern _X_EXPORT int XkbEventBase;
-extern _X_EXPORT int XkbKeyboardErrorCode;
-extern _X_EXPORT char * XkbBaseDirectory;
-extern _X_EXPORT char * XkbBinDirectory;
-
-extern _X_EXPORT CARD32 xkbDebugFlags;
-
-#define _XkbLibError(c,l,d) /* Epoch fail */
-#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
-#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
-#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
-
-extern _X_EXPORT int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify;
-extern _X_EXPORT int DeviceButtonPress,DeviceButtonRelease;
-
-#define Status int
-
-extern _X_EXPORT void XkbUseMsg(
- void
-);
-
-extern _X_EXPORT int XkbProcessArguments(
- int /* argc */,
- char ** /* argv */,
- int /* i */
-);
-
-extern _X_EXPORT Bool XkbInitPrivates(void);
-
-extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
-
-extern _X_EXPORT void XkbFreeCompatMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeMap */
-);
-
-extern _X_EXPORT void XkbFreeNames(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeMap */
-);
-
-extern _X_EXPORT int _XkbLookupAnyDevice(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT int _XkbLookupKeyboard(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT int _XkbLookupBellDevice(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT int _XkbLookupLedDevice(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT int _XkbLookupButtonDevice(
- DeviceIntPtr *pDev,
- int id,
- ClientPtr client,
- Mask access_mode,
- int *xkb_err
-);
-
-extern _X_EXPORT XkbDescPtr XkbAllocKeyboard(
- void
-);
-
-extern _X_EXPORT Status XkbAllocClientMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- unsigned int /* nTypes */
-);
-
-extern _X_EXPORT Status XkbAllocServerMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- unsigned int /* nNewActions */
-);
-
-extern _X_EXPORT void XkbFreeClientMap(
- XkbDescPtr /* xkb */,
- unsigned int /* what */,
- Bool /* freeMap */
-);
-
-extern _X_EXPORT void XkbFreeServerMap(
- XkbDescPtr /* xkb */,
- unsigned int /* what */,
- Bool /* freeMap */
-);
-
-extern _X_EXPORT Status XkbAllocIndicatorMaps(
- XkbDescPtr /* xkb */
-);
-
-extern _X_EXPORT Status XkbAllocCompatMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- unsigned int /* nInterpret */
-);
-
-extern _X_EXPORT Status XkbAllocNames(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- int /* nTotalRG */,
- int /* nTotalAliases */
-);
-
-extern _X_EXPORT Status XkbAllocControls(
- XkbDescPtr /* xkb */,
- unsigned int /* which*/
-);
-
-extern _X_EXPORT Status XkbCopyKeyTypes(
- XkbKeyTypePtr /* from */,
- XkbKeyTypePtr /* into */,
- int /* num_types */
-);
-
-extern _X_EXPORT Status XkbResizeKeyType(
- XkbDescPtr /* xkb */,
- int /* type_ndx */,
- int /* map_count */,
- Bool /* want_preserve */,
- int /* new_num_lvls */
-);
-
-extern _X_EXPORT void XkbFreeKeyboard(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeDesc */
-);
-
-extern _X_EXPORT void XkbSetActionKeyMods(
- XkbDescPtr /* xkb */,
- XkbAction * /* act */,
- unsigned int /* mods */
-);
-
-extern _X_EXPORT unsigned int XkbMaskForVMask(
- XkbDescPtr /* xkb */,
- unsigned int /* vmask */
-);
-
-extern _X_EXPORT Bool XkbVirtualModsToReal(
- XkbDescPtr /* xkb */,
- unsigned int /* virtua_mask */,
- unsigned int * /* mask_rtrn */
-);
-
-extern _X_EXPORT unsigned int XkbAdjustGroup(
- int /* group */,
- XkbControlsPtr /* ctrls */
-);
-
-extern _X_EXPORT KeySym *XkbResizeKeySyms(
- XkbDescPtr /* xkb */,
- int /* key */,
- int /* needed */
-);
-
-extern _X_EXPORT XkbAction *XkbResizeKeyActions(
- XkbDescPtr /* xkb */,
- int /* key */,
- int /* needed */
-);
-
-extern _X_EXPORT void XkbUpdateKeyTypesFromCore(
- DeviceIntPtr /* pXDev */,
- KeySymsPtr /* syms */,
- KeyCode /* first */,
- CARD8 /* num */,
- XkbChangesPtr /* pChanges */
-);
-
-extern _X_EXPORT void XkbUpdateDescActions(
- XkbDescPtr /* xkb */,
- KeyCode /* first */,
- CARD8 /* num */,
- XkbChangesPtr /* changes */
-);
-
-extern _X_EXPORT void XkbUpdateActions(
- DeviceIntPtr /* pXDev */,
- KeyCode /* first */,
- CARD8 /* num */,
- XkbChangesPtr /* pChanges */,
- unsigned int * /* needChecksRtrn */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT KeySymsPtr XkbGetCoreMap(
- DeviceIntPtr /* keybd */
-);
-
-extern _X_EXPORT void XkbApplyMappingChange(
- DeviceIntPtr /* pXDev */,
- KeySymsPtr /* map */,
- KeyCode /* firstKey */,
- CARD8 /* num */,
- CARD8 * /* modmap */,
- ClientPtr /* client */
-);
-
-extern _X_EXPORT void XkbSetIndicators(
- DeviceIntPtr /* pXDev */,
- CARD32 /* affect */,
- CARD32 /* values */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbUpdateIndicators(
- DeviceIntPtr /* keybd */,
- CARD32 /* changed */,
- Bool /* check_edevs */,
- XkbChangesPtr /* pChanges */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
- DeviceIntPtr /* dev */,
- KbdFeedbackPtr /* kf */,
- LedFeedbackPtr /* lf */,
- unsigned int /* needed_parts */
-);
-
-extern _X_EXPORT XkbSrvLedInfoPtr XkbCopySrvLedInfo(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* src */,
- KbdFeedbackPtr /* kf */,
- LedFeedbackPtr /* lf */
-);
-
-
-extern _X_EXPORT XkbSrvLedInfoPtr XkbFindSrvLedInfo(
- DeviceIntPtr /* dev */,
- unsigned int /* class */,
- unsigned int /* id */,
- unsigned int /* needed_parts */
-);
-
-extern _X_EXPORT void XkbApplyLedNameChanges(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- unsigned int /* changed_names */,
- xkbExtensionDeviceNotify * /* ed */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbApplyLedMapChanges(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- unsigned int /* changed_maps */,
- xkbExtensionDeviceNotify * /* ed */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbApplyLedStateChanges(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- unsigned int /* changed_leds */,
- xkbExtensionDeviceNotify * /* ed */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbFlushLedEvents(
- DeviceIntPtr /* dev */,
- DeviceIntPtr /* kbd */,
- XkbSrvLedInfoPtr /* sli */,
- xkbExtensionDeviceNotify * /* ed */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT unsigned int XkbIndicatorsToUpdate(
- DeviceIntPtr /* dev */,
- unsigned long /* state_changes */,
- Bool /* enabled_ctrl_changes */
-);
-
-extern _X_EXPORT void XkbComputeDerivedState(
- XkbSrvInfoPtr /* xkbi */
-);
-
-extern _X_EXPORT void XkbCheckSecondaryEffects(
- XkbSrvInfoPtr /* xkbi */,
- unsigned int /* which */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbCheckIndicatorMaps(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- unsigned int /* which */
-);
-
-extern _X_EXPORT unsigned int XkbStateChangedFlags(
- XkbStatePtr /* old */,
- XkbStatePtr /* new */
-);
-
-extern _X_EXPORT void XkbSendStateNotify(
- DeviceIntPtr /* kbd */,
- xkbStateNotify * /* pSN */
-);
-
-extern _X_EXPORT void XkbSendMapNotify(
- DeviceIntPtr /* kbd */,
- xkbMapNotify * /* ev */
-);
-
-extern _X_EXPORT int XkbComputeControlsNotify(
- DeviceIntPtr /* kbd */,
- XkbControlsPtr /* old */,
- XkbControlsPtr /* new */,
- xkbControlsNotify * /* pCN */,
- Bool /* forceCtrlProc */
-);
-
-extern _X_EXPORT void XkbSendControlsNotify(
- DeviceIntPtr /* kbd */,
- xkbControlsNotify * /* ev */
-);
-
-extern _X_EXPORT void XkbSendCompatMapNotify(
- DeviceIntPtr /* kbd */,
- xkbCompatMapNotify * /* ev */
-);
-
-extern _X_EXPORT void XkbHandleBell(
- BOOL /* force */,
- BOOL /* eventOnly */,
- DeviceIntPtr /* kbd */,
- CARD8 /* percent */,
- pointer /* ctrl */,
- CARD8 /* class */,
- Atom /* name */,
- WindowPtr /* pWin */,
- ClientPtr /* pClient */
-);
-
-extern _X_EXPORT void XkbSendAccessXNotify(
- DeviceIntPtr /* kbd */,
- xkbAccessXNotify * /* pEv */
-);
-
-extern _X_EXPORT void XkbSendNamesNotify(
- DeviceIntPtr /* kbd */,
- xkbNamesNotify * /* ev */
-);
-
-extern _X_EXPORT void XkbSendActionMessage(
- DeviceIntPtr /* kbd */,
- xkbActionMessage * /* ev */
-);
-
-extern _X_EXPORT void XkbSendExtensionDeviceNotify(
- DeviceIntPtr /* kbd */,
- ClientPtr /* client */,
- xkbExtensionDeviceNotify * /* ev */
-);
-
-extern _X_EXPORT void XkbSendNotification(
- DeviceIntPtr /* kbd */,
- XkbChangesPtr /* pChanges */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbProcessKeyboardEvent(
- DeviceEvent* /* event */,
- DeviceIntPtr /* keybd */
-);
-
-extern _X_EXPORT void XkbHandleActions(
- DeviceIntPtr /* dev */,
- DeviceIntPtr /* kbd */,
- DeviceEvent* /* event */
-);
-
-extern _X_EXPORT Bool XkbEnableDisableControls(
- XkbSrvInfoPtr /* xkbi */,
- unsigned long /* change */,
- unsigned long /* newValues */,
- XkbChangesPtr /* changes */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void AccessXInit(
- DeviceIntPtr /* dev */
-);
-
-extern _X_EXPORT Bool AccessXFilterPressEvent(
- DeviceEvent* /* event */,
- DeviceIntPtr /* keybd */
-);
-
-extern _X_EXPORT Bool AccessXFilterReleaseEvent(
- DeviceEvent* /* event */,
- DeviceIntPtr /* keybd */
-);
-
-extern _X_EXPORT void AccessXCancelRepeatKey(
- XkbSrvInfoPtr /* xkbi */,
- KeyCode /* key */
-);
-
-extern _X_EXPORT void AccessXComputeCurveFactor(
- XkbSrvInfoPtr /* xkbi */,
- XkbControlsPtr /* ctrls */
-);
-
-extern _X_EXPORT XkbInterestPtr XkbFindClientResource(
- DevicePtr /* inDev */,
- ClientPtr /* client */
-);
-
-extern _X_EXPORT XkbInterestPtr XkbAddClientResource(
- DevicePtr /* inDev */,
- ClientPtr /* client */,
- XID /* id */
-);
-
-extern _X_EXPORT int XkbRemoveResourceClient(
- DevicePtr /* inDev */,
- XID /* id */
-);
-
-extern _X_EXPORT int XkbDDXAccessXBeep(
- DeviceIntPtr /* dev */,
- unsigned int /* what */,
- unsigned int /* which */
-);
-
-extern _X_EXPORT int XkbDDXUsesSoftRepeat(
- DeviceIntPtr /* dev */
-);
-
-extern _X_EXPORT void XkbDDXKeybdCtrlProc(
- DeviceIntPtr /* dev */,
- KeybdCtrl * /* ctrl */
-);
-
-extern _X_EXPORT void XkbDDXChangeControls(
- DeviceIntPtr /* dev */,
- XkbControlsPtr /* old */,
- XkbControlsPtr /* new */
-);
-
-extern _X_EXPORT void XkbDDXUpdateDeviceIndicators(
- DeviceIntPtr /* dev */,
- XkbSrvLedInfoPtr /* sli */,
- CARD32 /* newState */
-);
-
-extern _X_EXPORT int XkbDDXTerminateServer(
- DeviceIntPtr /* dev */,
- KeyCode /* key */,
- XkbAction * /* act */
-);
-
-extern _X_EXPORT int XkbDDXSwitchScreen(
- DeviceIntPtr /* dev */,
- KeyCode /* key */,
- XkbAction * /* act */
-);
-
-extern _X_EXPORT int XkbDDXPrivate(
- DeviceIntPtr /* dev */,
- KeyCode /* key */,
- XkbAction * /* act */
-);
-
-extern _X_EXPORT void XkbDisableComputedAutoRepeats(
- DeviceIntPtr /* pXDev */,
- unsigned int /* key */
-);
-
-extern _X_EXPORT void XkbSetRepeatKeys(
- DeviceIntPtr /* pXDev */,
- int /* key */,
- int /* onoff */
-);
-
-extern _X_EXPORT int XkbLatchModifiers(
- DeviceIntPtr /* pXDev */,
- CARD8 /* mask */,
- CARD8 /* latches */
-);
-
-extern _X_EXPORT int XkbLatchGroup(
- DeviceIntPtr /* pXDev */,
- int /* group */
-);
-
-extern _X_EXPORT void XkbClearAllLatchesAndLocks(
- DeviceIntPtr /* dev */,
- XkbSrvInfoPtr /* xkbi */,
- Bool /* genEv */,
- XkbEventCausePtr /* cause */
-);
-
-extern _X_EXPORT void XkbGetRulesDflts(
- XkbRMLVOSet * /* rmlvo */
-);
-
-extern _X_EXPORT void XkbFreeRMLVOSet(
- XkbRMLVOSet * /* rmlvo */,
- Bool /* freeRMLVO */
-);
-
-extern _X_EXPORT void XkbSetRulesDflts(
- XkbRMLVOSet * /* rmlvo */
-);
-
-extern _X_EXPORT void XkbDeleteRulesDflts(
- void
-);
-
-extern _X_EXPORT int SProcXkbDispatch(
- ClientPtr /* client */
-);
-
-extern _X_EXPORT XkbGeometryPtr XkbLookupNamedGeometry(
- DeviceIntPtr /* dev */,
- Atom /* name */,
- Bool * /* shouldFree */
-);
-
-extern _X_EXPORT char * _XkbDupString(
- const char * /* str */
-);
-
-extern _X_EXPORT void XkbConvertCase(
- KeySym /* sym */,
- KeySym * /* lower */,
- KeySym * /* upper */
-);
-
-extern _X_EXPORT Status XkbChangeKeycodeRange(
- XkbDescPtr /* xkb */,
- int /* minKC */,
- int /* maxKC */,
- XkbChangesPtr /* changes */
-);
-
-extern _X_EXPORT void XkbFreeSrvLedInfo(
- XkbSrvLedInfoPtr /* sli */
-);
-
-extern _X_EXPORT void XkbFreeInfo(
- XkbSrvInfoPtr /* xkbi */
-);
-
-extern _X_EXPORT Status XkbChangeTypesOfKey(
- XkbDescPtr /* xkb */,
- int /* key */,
- int /* nGroups */,
- unsigned int /* groups */,
- int * /* newTypesIn */,
- XkbMapChangesPtr /* changes */
-);
-
-extern _X_EXPORT int XkbKeyTypesForCoreSymbols(
- XkbDescPtr /* xkb */,
- int /* map_width */,
- KeySym * /* core_syms */,
- unsigned int /* protected */,
- int * /* types_inout */,
- KeySym * /* xkb_syms_rtrn */
-);
-
-extern _X_EXPORT Bool XkbApplyCompatMapToKey(
- XkbDescPtr /* xkb */,
- KeyCode /* key */,
- XkbChangesPtr /* changes */
-);
-
-extern _X_EXPORT Bool XkbApplyVirtualModChanges(
- XkbDescPtr /* xkb */,
- unsigned int /* changed */,
- XkbChangesPtr /* changes */
-);
-
-extern _X_EXPORT void XkbSendNewKeyboardNotify(
- DeviceIntPtr /* kbd */,
- xkbNewKeyboardNotify * /* pNKN */
-);
-
-extern Bool XkbCopyKeymap(
- XkbDescPtr /* dst */,
- XkbDescPtr /* src */);
-
-extern _X_EXPORT Bool XkbCopyDeviceKeymap(
- DeviceIntPtr /* dst */,
- DeviceIntPtr /* src */);
-
-extern void XkbFilterEvents(
- ClientPtr /* pClient */,
- int /* nEvents */,
- xEvent* /* xE */);
-
-extern int XkbGetEffectiveGroup(
- XkbSrvInfoPtr /* xkbi */,
- XkbStatePtr /* xkbstate */,
- CARD8 /* keycode */);
-
-extern void XkbMergeLockedPtrBtns(
- DeviceIntPtr /* master */);
-
-extern void XkbFakeDeviceButton(
- DeviceIntPtr /* dev */,
- int /* press */,
- int /* button */);
-
-
-#include "xkbfile.h"
-#include "xkbrules.h"
-
-#define _XkbListKeycodes 0
-#define _XkbListTypes 1
-#define _XkbListCompat 2
-#define _XkbListSymbols 3
-#define _XkbListGeometry 4
-#define _XkbListNumComponents 5
-
-typedef struct _XkbSrvListInfo {
- int szPool;
- int nPool;
- char * pool;
-
- int maxRtrn;
- int nTotal;
-
- char * pattern[_XkbListNumComponents];
- int nFound[_XkbListNumComponents];
-} XkbSrvListInfoRec,*XkbSrvListInfoPtr;
-
-extern _X_EXPORT Status XkbDDXList(
- DeviceIntPtr /* dev */,
- XkbSrvListInfoPtr /* listing */,
- ClientPtr /* client */
-);
-
-extern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames(
- DeviceIntPtr /* keybd */,
- XkbComponentNamesPtr /* names */,
- unsigned int /* want */,
- unsigned int /* need */,
- XkbDescPtr * /* finfoRtrn */,
- char * /* keymapNameRtrn */,
- int /* keymapNameRtrnLen */
-);
-
-extern _X_EXPORT Bool XkbDDXNamesFromRules(
- DeviceIntPtr /* keybd */,
- char * /* rules */,
- XkbRF_VarDefsPtr /* defs */,
- XkbComponentNamesPtr /* names */
-);
-
-extern _X_EXPORT XkbDescPtr XkbCompileKeymap(
- DeviceIntPtr /* dev */,
- XkbRMLVOSet * /* rmlvo */
-);
-
-#endif /* _XKBSRV_H_ */
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKBSRV_H_
+#define _XKBSRV_H_
+
+#define XkbAllocClientMap SrvXkbAllocClientMap
+#define XkbAllocServerMap SrvXkbAllocServerMap
+#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey
+#define XkbCopyKeyTypes SrvXkbCopyKeyTypes
+#define XkbFreeClientMap SrvXkbFreeClientMap
+#define XkbFreeServerMap SrvXkbFreeServerMap
+#define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols
+#define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey
+#define XkbResizeKeyActions SrvXkbResizeKeyActions
+#define XkbResizeKeySyms SrvXkbResizeKeySyms
+#define XkbResizeKeyType SrvXkbResizeKeyType
+#define XkbAllocCompatMap SrvXkbAllocCompatMap
+#define XkbAllocControls SrvXkbAllocControls
+#define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps
+#define XkbAllocKeyboard SrvXkbAllocKeyboard
+#define XkbAllocNames SrvXkbAllocNames
+#define XkbFreeCompatMap SrvXkbFreeCompatMap
+#define XkbFreeKeyboard SrvXkbFreeKeyboard
+#define XkbFreeNames SrvXkbFreeNames
+#define XkbLatchModifiers SrvXkbLatchModifiers
+#define XkbLatchGroup SrvXkbLatchGroup
+#define XkbVirtualModsToReal SrvXkbVirtualModsToReal
+#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange
+#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges
+
+#include <X11/extensions/XKBproto.h>
+#include "xkbstr.h"
+#include "xkbrules.h"
+#include "inputstr.h"
+#include "events.h"
+
+typedef struct _XkbInterest {
+ DeviceIntPtr dev;
+ ClientPtr client;
+ XID resource;
+ struct _XkbInterest * next;
+ CARD16 extDevNotifyMask;
+ CARD16 stateNotifyMask;
+ CARD16 namesNotifyMask;
+ CARD32 ctrlsNotifyMask;
+ CARD8 compatNotifyMask;
+ BOOL bellNotifyMask;
+ BOOL actionMessageMask;
+ CARD16 accessXNotifyMask;
+ CARD32 iStateNotifyMask;
+ CARD32 iMapNotifyMask;
+ CARD16 altSymsNotifyMask;
+ CARD32 autoCtrls;
+ CARD32 autoCtrlValues;
+} XkbInterestRec,*XkbInterestPtr;
+
+typedef struct _XkbRadioGroup {
+ CARD8 flags;
+ CARD8 nMembers;
+ CARD8 dfltDown;
+ CARD8 currentDown;
+ CARD8 members[XkbRGMaxMembers];
+} XkbRadioGroupRec, *XkbRadioGroupPtr;
+
+typedef struct _XkbEventCause {
+ CARD8 kc;
+ CARD8 event;
+ CARD8 mjr;
+ CARD8 mnr;
+ ClientPtr client;
+} XkbEventCauseRec,*XkbEventCausePtr;
+#define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
+ (c)->mjr= (c)->mnr= 0; \
+ (c)->client= NULL; }
+#define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
+ (c)->mjr= (j),(c)->mnr= (n);\
+ (c)->client= (cl); }
+#define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl)
+#define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl)
+#define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0)
+
+#define _OFF_TIMER 0
+#define _KRG_WARN_TIMER 1
+#define _KRG_TIMER 2
+#define _SK_TIMEOUT_TIMER 3
+#define _ALL_TIMEOUT_TIMER 4
+
+#define _BEEP_NONE 0
+#define _BEEP_FEATURE_ON 1
+#define _BEEP_FEATURE_OFF 2
+#define _BEEP_FEATURE_CHANGE 3
+#define _BEEP_SLOW_WARN 4
+#define _BEEP_SLOW_PRESS 5
+#define _BEEP_SLOW_ACCEPT 6
+#define _BEEP_SLOW_REJECT 7
+#define _BEEP_SLOW_RELEASE 8
+#define _BEEP_STICKY_LATCH 9
+#define _BEEP_STICKY_LOCK 10
+#define _BEEP_STICKY_UNLOCK 11
+#define _BEEP_LED_ON 12
+#define _BEEP_LED_OFF 13
+#define _BEEP_LED_CHANGE 14
+#define _BEEP_BOUNCE_REJECT 15
+
+typedef struct _XkbFilter {
+ CARD16 keycode;
+ CARD8 what;
+ CARD8 active;
+ CARD8 filterOthers;
+ CARD32 priv;
+ XkbAction upAction;
+ int (*filter)(
+ struct _XkbSrvInfo* /* xkbi */,
+ struct _XkbFilter * /* filter */,
+ unsigned /* keycode */,
+ XkbAction * /* action */
+ );
+ struct _XkbFilter *next;
+} XkbFilterRec,*XkbFilterPtr;
+
+typedef struct _XkbSrvInfo {
+ XkbStateRec prev_state;
+ XkbStateRec state;
+ XkbDescPtr desc;
+
+ DeviceIntPtr device;
+ KbdCtrlProcPtr kbdProc;
+
+ XkbRadioGroupPtr radioGroups;
+ CARD8 nRadioGroups;
+ CARD8 clearMods;
+ CARD8 setMods;
+ INT16 groupChange;
+
+ CARD16 dfltPtrDelta;
+
+ double mouseKeysCurve;
+ double mouseKeysCurveFactor;
+ INT16 mouseKeysDX;
+ INT16 mouseKeysDY;
+ CARD8 mouseKeysFlags;
+ Bool mouseKeysAccel;
+ CARD8 mouseKeysCounter;
+
+ CARD8 lockedPtrButtons;
+ CARD8 shiftKeyCount;
+ KeyCode mouseKey;
+ KeyCode inactiveKey;
+ KeyCode slowKey;
+ KeyCode repeatKey;
+ CARD8 krgTimerActive;
+ CARD8 beepType;
+ CARD8 beepCount;
+
+ CARD32 flags;
+ CARD32 lastPtrEventTime;
+ CARD32 lastShiftEventTime;
+ OsTimerPtr beepTimer;
+ OsTimerPtr mouseKeyTimer;
+ OsTimerPtr slowKeysTimer;
+ OsTimerPtr bounceKeysTimer;
+ OsTimerPtr repeatKeyTimer;
+ OsTimerPtr krgTimer;
+
+ int szFilters;
+ XkbFilterPtr filters;
+} XkbSrvInfoRec, *XkbSrvInfoPtr;
+
+#define XkbSLI_IsDefault (1L<<0)
+#define XkbSLI_HasOwnState (1L<<1)
+
+typedef struct _XkbSrvLedInfo {
+ CARD16 flags;
+ CARD16 class;
+ CARD16 id;
+ union {
+ KbdFeedbackPtr kf;
+ LedFeedbackPtr lf;
+ } fb;
+
+ CARD32 physIndicators;
+ CARD32 autoState;
+ CARD32 explicitState;
+ CARD32 effectiveState;
+
+ CARD32 mapsPresent;
+ CARD32 namesPresent;
+ XkbIndicatorMapPtr maps;
+ Atom * names;
+
+ CARD32 usesBase;
+ CARD32 usesLatched;
+ CARD32 usesLocked;
+ CARD32 usesEffective;
+ CARD32 usesCompat;
+ CARD32 usesControls;
+
+ CARD32 usedComponents;
+} XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
+
+/*
+ * Settings for xkbClientFlags field (used by DIX)
+ * These flags _must_ not overlap with XkbPCF_*
+ */
+#define _XkbClientInitialized (1<<15)
+
+#define _XkbWantsDetectableAutoRepeat(c)\
+ ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
+
+/*
+ * Settings for flags field
+ */
+#define _XkbStateNotifyInProgress (1<<0)
+
+typedef struct
+{
+ ProcessInputProc processInputProc;
+ /* If processInputProc is set to something different than realInputProc,
+ * UNWRAP and COND_WRAP will not touch processInputProc and update only
+ * realInputProc. This ensures that
+ * processInputProc == (frozen ? EnqueueEvent : realInputProc)
+ *
+ * WRAP_PROCESS_INPUT_PROC should only be called during initialization,
+ * since it may destroy this invariant.
+ */
+ ProcessInputProc realInputProc;
+ DeviceUnwrapProc unwrapProc;
+} xkbDeviceInfoRec, *xkbDeviceInfoPtr;
+
+#define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
+ device->public.processInputProc = proc; \
+ oldprocs->processInputProc = \
+ oldprocs->realInputProc = device->public.realInputProc; \
+ device->public.realInputProc = proc; \
+ oldprocs->unwrapProc = device->unwrapProc; \
+ device->unwrapProc = unwrapproc;
+
+#define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
+ if (device->public.processInputProc == device->public.realInputProc)\
+ device->public.processInputProc = proc; \
+ oldprocs->processInputProc = \
+ oldprocs->realInputProc = device->public.realInputProc; \
+ device->public.realInputProc = proc; \
+ oldprocs->unwrapProc = device->unwrapProc; \
+ device->unwrapProc = unwrapproc;
+
+#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \
+ backupproc = device->public.realInputProc; \
+ if (device->public.processInputProc == device->public.realInputProc)\
+ device->public.processInputProc = oldprocs->realInputProc; \
+ device->public.realInputProc = oldprocs->realInputProc; \
+ device->unwrapProc = oldprocs->unwrapProc;
+
+extern _X_EXPORT DevPrivateKeyRec xkbDevicePrivateKeyRec;
+#define xkbDevicePrivateKey (&xkbDevicePrivateKeyRec)
+
+#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey))
+
+extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
+
+/***====================================================================***/
+
+
+/***====================================================================***/
+
+#define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
+#define XkbAllFilteredEventsMask \
+ (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask)
+
+/***====================================================================***/
+
+extern _X_EXPORT int XkbReqCode;
+extern _X_EXPORT int XkbEventBase;
+extern _X_EXPORT int XkbKeyboardErrorCode;
+extern _X_EXPORT char * XkbBaseDirectory;
+extern _X_EXPORT char * XkbBinDirectory;
+
+extern _X_EXPORT CARD32 xkbDebugFlags;
+
+#define _XkbLibError(c,l,d) /* Epoch fail */
+#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
+#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
+#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
+
+extern _X_EXPORT int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify;
+extern _X_EXPORT int DeviceButtonPress,DeviceButtonRelease;
+
+#define Status int
+
+extern _X_EXPORT void XkbUseMsg(
+ void
+);
+
+extern _X_EXPORT int XkbProcessArguments(
+ int /* argc */,
+ char ** /* argv */,
+ int /* i */
+);
+
+extern _X_EXPORT Bool XkbInitPrivates(void);
+
+extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
+
+extern _X_EXPORT void XkbFreeCompatMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern _X_EXPORT void XkbFreeNames(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern _X_EXPORT int _XkbLookupAnyDevice(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
+);
+
+extern _X_EXPORT int _XkbLookupKeyboard(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
+);
+
+extern _X_EXPORT int _XkbLookupBellDevice(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
+);
+
+extern _X_EXPORT int _XkbLookupLedDevice(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
+);
+
+extern _X_EXPORT int _XkbLookupButtonDevice(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
+);
+
+extern _X_EXPORT XkbDescPtr XkbAllocKeyboard(
+ void
+);
+
+extern _X_EXPORT Status XkbAllocClientMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nTypes */
+);
+
+extern _X_EXPORT Status XkbAllocServerMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nNewActions */
+);
+
+extern _X_EXPORT void XkbFreeClientMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+);
+
+extern _X_EXPORT void XkbFreeServerMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+);
+
+extern _X_EXPORT Status XkbAllocIndicatorMaps(
+ XkbDescPtr /* xkb */
+);
+
+extern _X_EXPORT Status XkbAllocCompatMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nInterpret */
+);
+
+extern _X_EXPORT Status XkbAllocNames(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ int /* nTotalRG */,
+ int /* nTotalAliases */
+);
+
+extern _X_EXPORT Status XkbAllocControls(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which*/
+);
+
+extern _X_EXPORT Status XkbCopyKeyTypes(
+ XkbKeyTypePtr /* from */,
+ XkbKeyTypePtr /* into */,
+ int /* num_types */
+);
+
+extern _X_EXPORT Status XkbResizeKeyType(
+ XkbDescPtr /* xkb */,
+ int /* type_ndx */,
+ int /* map_count */,
+ Bool /* want_preserve */,
+ int /* new_num_lvls */
+);
+
+extern _X_EXPORT void XkbFreeKeyboard(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeDesc */
+);
+
+extern _X_EXPORT void XkbSetActionKeyMods(
+ XkbDescPtr /* xkb */,
+ XkbAction * /* act */,
+ unsigned int /* mods */
+);
+
+extern _X_EXPORT unsigned int XkbMaskForVMask(
+ XkbDescPtr /* xkb */,
+ unsigned int /* vmask */
+);
+
+extern _X_EXPORT Bool XkbVirtualModsToReal(
+ XkbDescPtr /* xkb */,
+ unsigned int /* virtua_mask */,
+ unsigned int * /* mask_rtrn */
+);
+
+extern _X_EXPORT unsigned int XkbAdjustGroup(
+ int /* group */,
+ XkbControlsPtr /* ctrls */
+);
+
+extern _X_EXPORT KeySym *XkbResizeKeySyms(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* needed */
+);
+
+extern _X_EXPORT XkbAction *XkbResizeKeyActions(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* needed */
+);
+
+extern _X_EXPORT void XkbUpdateKeyTypesFromCore(
+ DeviceIntPtr /* pXDev */,
+ KeySymsPtr /* syms */,
+ KeyCode /* first */,
+ CARD8 /* num */,
+ XkbChangesPtr /* pChanges */
+);
+
+extern _X_EXPORT void XkbUpdateDescActions(
+ XkbDescPtr /* xkb */,
+ KeyCode /* first */,
+ CARD8 /* num */,
+ XkbChangesPtr /* changes */
+);
+
+extern _X_EXPORT void XkbUpdateActions(
+ DeviceIntPtr /* pXDev */,
+ KeyCode /* first */,
+ CARD8 /* num */,
+ XkbChangesPtr /* pChanges */,
+ unsigned int * /* needChecksRtrn */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT KeySymsPtr XkbGetCoreMap(
+ DeviceIntPtr /* keybd */
+);
+
+extern _X_EXPORT void XkbApplyMappingChange(
+ DeviceIntPtr /* pXDev */,
+ KeySymsPtr /* map */,
+ KeyCode /* firstKey */,
+ CARD8 /* num */,
+ CARD8 * /* modmap */,
+ ClientPtr /* client */
+);
+
+extern _X_EXPORT void XkbSetIndicators(
+ DeviceIntPtr /* pXDev */,
+ CARD32 /* affect */,
+ CARD32 /* values */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbUpdateIndicators(
+ DeviceIntPtr /* keybd */,
+ CARD32 /* changed */,
+ Bool /* check_edevs */,
+ XkbChangesPtr /* pChanges */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
+ DeviceIntPtr /* dev */,
+ KbdFeedbackPtr /* kf */,
+ LedFeedbackPtr /* lf */,
+ unsigned int /* needed_parts */
+);
+
+extern _X_EXPORT XkbSrvLedInfoPtr XkbCopySrvLedInfo(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* src */,
+ KbdFeedbackPtr /* kf */,
+ LedFeedbackPtr /* lf */
+);
+
+
+extern _X_EXPORT XkbSrvLedInfoPtr XkbFindSrvLedInfo(
+ DeviceIntPtr /* dev */,
+ unsigned int /* class */,
+ unsigned int /* id */,
+ unsigned int /* needed_parts */
+);
+
+extern _X_EXPORT void XkbApplyLedNameChanges(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* changed_names */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbApplyLedMapChanges(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* changed_maps */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbApplyLedStateChanges(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* changed_leds */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbFlushLedEvents(
+ DeviceIntPtr /* dev */,
+ DeviceIntPtr /* kbd */,
+ XkbSrvLedInfoPtr /* sli */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT unsigned int XkbIndicatorsToUpdate(
+ DeviceIntPtr /* dev */,
+ unsigned long /* state_changes */,
+ Bool /* enabled_ctrl_changes */
+);
+
+extern _X_EXPORT void XkbComputeDerivedState(
+ XkbSrvInfoPtr /* xkbi */
+);
+
+extern _X_EXPORT void XkbCheckSecondaryEffects(
+ XkbSrvInfoPtr /* xkbi */,
+ unsigned int /* which */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbCheckIndicatorMaps(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* which */
+);
+
+extern _X_EXPORT unsigned int XkbStateChangedFlags(
+ XkbStatePtr /* old */,
+ XkbStatePtr /* new */
+);
+
+extern _X_EXPORT void XkbSendStateNotify(
+ DeviceIntPtr /* kbd */,
+ xkbStateNotify * /* pSN */
+);
+
+extern _X_EXPORT void XkbSendMapNotify(
+ DeviceIntPtr /* kbd */,
+ xkbMapNotify * /* ev */
+);
+
+extern _X_EXPORT int XkbComputeControlsNotify(
+ DeviceIntPtr /* kbd */,
+ XkbControlsPtr /* old */,
+ XkbControlsPtr /* new */,
+ xkbControlsNotify * /* pCN */,
+ Bool /* forceCtrlProc */
+);
+
+extern _X_EXPORT void XkbSendControlsNotify(
+ DeviceIntPtr /* kbd */,
+ xkbControlsNotify * /* ev */
+);
+
+extern _X_EXPORT void XkbSendCompatMapNotify(
+ DeviceIntPtr /* kbd */,
+ xkbCompatMapNotify * /* ev */
+);
+
+extern _X_EXPORT void XkbHandleBell(
+ BOOL /* force */,
+ BOOL /* eventOnly */,
+ DeviceIntPtr /* kbd */,
+ CARD8 /* percent */,
+ pointer /* ctrl */,
+ CARD8 /* class */,
+ Atom /* name */,
+ WindowPtr /* pWin */,
+ ClientPtr /* pClient */
+);
+
+extern _X_EXPORT void XkbSendAccessXNotify(
+ DeviceIntPtr /* kbd */,
+ xkbAccessXNotify * /* pEv */
+);
+
+extern _X_EXPORT void XkbSendNamesNotify(
+ DeviceIntPtr /* kbd */,
+ xkbNamesNotify * /* ev */
+);
+
+extern _X_EXPORT void XkbSendActionMessage(
+ DeviceIntPtr /* kbd */,
+ xkbActionMessage * /* ev */
+);
+
+extern _X_EXPORT void XkbSendExtensionDeviceNotify(
+ DeviceIntPtr /* kbd */,
+ ClientPtr /* client */,
+ xkbExtensionDeviceNotify * /* ev */
+);
+
+extern _X_EXPORT void XkbSendNotification(
+ DeviceIntPtr /* kbd */,
+ XkbChangesPtr /* pChanges */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbProcessKeyboardEvent(
+ DeviceEvent* /* event */,
+ DeviceIntPtr /* keybd */
+);
+
+extern _X_EXPORT void XkbHandleActions(
+ DeviceIntPtr /* dev */,
+ DeviceIntPtr /* kbd */,
+ DeviceEvent* /* event */
+);
+
+extern _X_EXPORT Bool XkbEnableDisableControls(
+ XkbSrvInfoPtr /* xkbi */,
+ unsigned long /* change */,
+ unsigned long /* newValues */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void AccessXInit(
+ DeviceIntPtr /* dev */
+);
+
+extern _X_EXPORT Bool AccessXFilterPressEvent(
+ DeviceEvent* /* event */,
+ DeviceIntPtr /* keybd */
+);
+
+extern _X_EXPORT Bool AccessXFilterReleaseEvent(
+ DeviceEvent* /* event */,
+ DeviceIntPtr /* keybd */
+);
+
+extern _X_EXPORT void AccessXCancelRepeatKey(
+ XkbSrvInfoPtr /* xkbi */,
+ KeyCode /* key */
+);
+
+extern _X_EXPORT void AccessXComputeCurveFactor(
+ XkbSrvInfoPtr /* xkbi */,
+ XkbControlsPtr /* ctrls */
+);
+
+extern _X_EXPORT XkbInterestPtr XkbFindClientResource(
+ DevicePtr /* inDev */,
+ ClientPtr /* client */
+);
+
+extern _X_EXPORT XkbInterestPtr XkbAddClientResource(
+ DevicePtr /* inDev */,
+ ClientPtr /* client */,
+ XID /* id */
+);
+
+extern _X_EXPORT int XkbRemoveResourceClient(
+ DevicePtr /* inDev */,
+ XID /* id */
+);
+
+extern _X_EXPORT int XkbDDXAccessXBeep(
+ DeviceIntPtr /* dev */,
+ unsigned int /* what */,
+ unsigned int /* which */
+);
+
+extern _X_EXPORT int XkbDDXUsesSoftRepeat(
+ DeviceIntPtr /* dev */
+);
+
+extern _X_EXPORT void XkbDDXKeybdCtrlProc(
+ DeviceIntPtr /* dev */,
+ KeybdCtrl * /* ctrl */
+);
+
+extern _X_EXPORT void XkbDDXChangeControls(
+ DeviceIntPtr /* dev */,
+ XkbControlsPtr /* old */,
+ XkbControlsPtr /* new */
+);
+
+extern _X_EXPORT void XkbDDXUpdateDeviceIndicators(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ CARD32 /* newState */
+);
+
+extern _X_EXPORT int XkbDDXTerminateServer(
+ DeviceIntPtr /* dev */,
+ KeyCode /* key */,
+ XkbAction * /* act */
+);
+
+extern _X_EXPORT int XkbDDXSwitchScreen(
+ DeviceIntPtr /* dev */,
+ KeyCode /* key */,
+ XkbAction * /* act */
+);
+
+extern _X_EXPORT int XkbDDXPrivate(
+ DeviceIntPtr /* dev */,
+ KeyCode /* key */,
+ XkbAction * /* act */
+);
+
+extern _X_EXPORT void XkbDisableComputedAutoRepeats(
+ DeviceIntPtr /* pXDev */,
+ unsigned int /* key */
+);
+
+extern _X_EXPORT void XkbSetRepeatKeys(
+ DeviceIntPtr /* pXDev */,
+ int /* key */,
+ int /* onoff */
+);
+
+extern _X_EXPORT int XkbLatchModifiers(
+ DeviceIntPtr /* pXDev */,
+ CARD8 /* mask */,
+ CARD8 /* latches */
+);
+
+extern _X_EXPORT int XkbLatchGroup(
+ DeviceIntPtr /* pXDev */,
+ int /* group */
+);
+
+extern _X_EXPORT void XkbClearAllLatchesAndLocks(
+ DeviceIntPtr /* dev */,
+ XkbSrvInfoPtr /* xkbi */,
+ Bool /* genEv */,
+ XkbEventCausePtr /* cause */
+);
+
+extern _X_EXPORT void XkbGetRulesDflts(
+ XkbRMLVOSet * /* rmlvo */
+);
+
+extern _X_EXPORT void XkbFreeRMLVOSet(
+ XkbRMLVOSet * /* rmlvo */,
+ Bool /* freeRMLVO */
+);
+
+extern _X_EXPORT void XkbSetRulesDflts(
+ XkbRMLVOSet * /* rmlvo */
+);
+
+extern _X_EXPORT void XkbDeleteRulesDflts(
+ void
+);
+
+extern _X_EXPORT int SProcXkbDispatch(
+ ClientPtr /* client */
+);
+
+extern _X_EXPORT XkbGeometryPtr XkbLookupNamedGeometry(
+ DeviceIntPtr /* dev */,
+ Atom /* name */,
+ Bool * /* shouldFree */
+);
+
+extern _X_EXPORT void XkbConvertCase(
+ KeySym /* sym */,
+ KeySym * /* lower */,
+ KeySym * /* upper */
+);
+
+extern _X_EXPORT Status XkbChangeKeycodeRange(
+ XkbDescPtr /* xkb */,
+ int /* minKC */,
+ int /* maxKC */,
+ XkbChangesPtr /* changes */
+);
+
+extern _X_EXPORT void XkbFreeSrvLedInfo(
+ XkbSrvLedInfoPtr /* sli */
+);
+
+extern _X_EXPORT void XkbFreeInfo(
+ XkbSrvInfoPtr /* xkbi */
+);
+
+extern _X_EXPORT Status XkbChangeTypesOfKey(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* nGroups */,
+ unsigned int /* groups */,
+ int * /* newTypesIn */,
+ XkbMapChangesPtr /* changes */
+);
+
+extern _X_EXPORT int XkbKeyTypesForCoreSymbols(
+ XkbDescPtr /* xkb */,
+ int /* map_width */,
+ KeySym * /* core_syms */,
+ unsigned int /* protected */,
+ int * /* types_inout */,
+ KeySym * /* xkb_syms_rtrn */
+);
+
+extern _X_EXPORT Bool XkbApplyCompatMapToKey(
+ XkbDescPtr /* xkb */,
+ KeyCode /* key */,
+ XkbChangesPtr /* changes */
+);
+
+extern _X_EXPORT Bool XkbApplyVirtualModChanges(
+ XkbDescPtr /* xkb */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* changes */
+);
+
+extern _X_EXPORT void XkbSendNewKeyboardNotify(
+ DeviceIntPtr /* kbd */,
+ xkbNewKeyboardNotify * /* pNKN */
+);
+
+extern Bool XkbCopyKeymap(
+ XkbDescPtr /* dst */,
+ XkbDescPtr /* src */);
+
+extern _X_EXPORT Bool XkbCopyDeviceKeymap(
+ DeviceIntPtr /* dst */,
+ DeviceIntPtr /* src */);
+
+extern void XkbFilterEvents(
+ ClientPtr /* pClient */,
+ int /* nEvents */,
+ xEvent* /* xE */);
+
+extern int XkbGetEffectiveGroup(
+ XkbSrvInfoPtr /* xkbi */,
+ XkbStatePtr /* xkbstate */,
+ CARD8 /* keycode */);
+
+extern void XkbMergeLockedPtrBtns(
+ DeviceIntPtr /* master */);
+
+extern void XkbFakeDeviceButton(
+ DeviceIntPtr /* dev */,
+ int /* press */,
+ int /* button */);
+
+
+#include "xkbfile.h"
+#include "xkbrules.h"
+
+#define _XkbListKeycodes 0
+#define _XkbListTypes 1
+#define _XkbListCompat 2
+#define _XkbListSymbols 3
+#define _XkbListGeometry 4
+#define _XkbListNumComponents 5
+
+typedef struct _XkbSrvListInfo {
+ int szPool;
+ int nPool;
+ char * pool;
+
+ int maxRtrn;
+ int nTotal;
+
+ char * pattern[_XkbListNumComponents];
+ int nFound[_XkbListNumComponents];
+} XkbSrvListInfoRec,*XkbSrvListInfoPtr;
+
+extern _X_EXPORT Status XkbDDXList(
+ DeviceIntPtr /* dev */,
+ XkbSrvListInfoPtr /* listing */,
+ ClientPtr /* client */
+);
+
+extern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames(
+ DeviceIntPtr /* keybd */,
+ XkbComponentNamesPtr /* names */,
+ unsigned int /* want */,
+ unsigned int /* need */,
+ XkbDescPtr * /* finfoRtrn */,
+ char * /* keymapNameRtrn */,
+ int /* keymapNameRtrnLen */
+);
+
+extern _X_EXPORT Bool XkbDDXNamesFromRules(
+ DeviceIntPtr /* keybd */,
+ char * /* rules */,
+ XkbRF_VarDefsPtr /* defs */,
+ XkbComponentNamesPtr /* names */
+);
+
+extern _X_EXPORT XkbDescPtr XkbCompileKeymap(
+ DeviceIntPtr /* dev */,
+ XkbRMLVOSet * /* rmlvo */
+);
+
+#endif /* _XKBSRV_H_ */