summaryrefslogtreecommitdiff
path: root/xserver/include
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-11-02 15:26:35 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-11-02 15:26:35 +0000
commitdbca69c8a4f3e2d1ccb4f89152213b2861b33af6 (patch)
treef8963ef73903a7b4374adc2354dffbaa905112ac /xserver/include
parent33b2029f322f3c238b7ba528083195ad8dde33e1 (diff)
xserver 1.5.2. tested by ckuethe@, oga@, and others.
Diffstat (limited to 'xserver/include')
-rw-r--r--xserver/include/Makefile.am10
-rw-r--r--xserver/include/Makefile.in94
-rw-r--r--xserver/include/bstorestr.h2
-rw-r--r--xserver/include/colormapst.h3
-rw-r--r--xserver/include/cursor.h26
-rw-r--r--xserver/include/cursorstr.h6
-rw-r--r--xserver/include/dix-config.h.in50
-rw-r--r--xserver/include/dix.h372
-rw-r--r--xserver/include/dixaccess.h53
-rw-r--r--xserver/include/dixevents.h26
-rw-r--r--xserver/include/dixfont.h8
-rw-r--r--xserver/include/dixgrabs.h1
-rw-r--r--xserver/include/dixstruct.h18
-rw-r--r--xserver/include/do-not-use-config.h.in92
-rw-r--r--xserver/include/extension.h8
-rw-r--r--xserver/include/extinit.h118
-rw-r--r--xserver/include/extnsionst.h42
-rw-r--r--xserver/include/gc.h9
-rw-r--r--xserver/include/gcstruct.h3
-rw-r--r--xserver/include/globals.h15
-rw-r--r--xserver/include/input.h109
-rw-r--r--xserver/include/inputstr.h78
-rw-r--r--xserver/include/misc.h5
-rw-r--r--xserver/include/miscstruct.h18
-rw-r--r--xserver/include/os.h27
-rw-r--r--xserver/include/pixmapstr.h18
-rw-r--r--xserver/include/privates.h112
-rw-r--r--xserver/include/property.h19
-rw-r--r--xserver/include/propertyst.h2
-rw-r--r--xserver/include/registry.h64
-rw-r--r--xserver/include/resource.h93
-rw-r--r--xserver/include/screenint.h42
-rw-r--r--xserver/include/scrnintstr.h27
-rw-r--r--xserver/include/selection.h47
-rw-r--r--xserver/include/servermd.h11
-rw-r--r--xserver/include/site.h5
-rw-r--r--xserver/include/swapreq.h11
-rw-r--r--xserver/include/window.h40
-rw-r--r--xserver/include/windowstr.h41
-rw-r--r--xserver/include/xkbfile.h436
-rw-r--r--xserver/include/xkbsrv.h97
-rw-r--r--xserver/include/xkbstr.h613
-rw-r--r--xserver/include/xorg-config.h.in15
-rw-r--r--xserver/include/xorg-server.h.in21
44 files changed, 1998 insertions, 909 deletions
diff --git a/xserver/include/Makefile.am b/xserver/include/Makefile.am
index 9e340d72d..5edefe7b5 100644
--- a/xserver/include/Makefile.am
+++ b/xserver/include/Makefile.am
@@ -7,9 +7,11 @@ sdk_HEADERS = \
closure.h \
colormap.h \
colormapst.h \
+ hotplug.h \
cursor.h \
cursorstr.h \
dix.h \
+ dixaccess.h \
dixevents.h \
dixfont.h \
dixfontstr.h \
@@ -30,10 +32,12 @@ sdk_HEADERS = \
os.h \
pixmap.h \
pixmapstr.h \
+ privates.h \
property.h \
propertyst.h \
region.h \
regionstr.h \
+ registry.h \
resource.h \
rgb.h \
screenint.h \
@@ -46,9 +50,13 @@ sdk_HEADERS = \
validate.h \
window.h \
windowstr.h \
+ xkbfile.h \
+ xkbsrv.h \
+ xkbstr.h \
xorg-server.h
endif
AM_CFLAGS = $(DIX_CFLAGS)
-EXTRA_DIST = $(sdk_HEADERS) do-not-use-config.h dix-config.h xorg-config.h
+EXTRA_DIST = $(sdk_HEADERS) do-not-use-config.h dix-config.h xorg-config.h \
+ xkb-config.h
diff --git a/xserver/include/Makefile.in b/xserver/include/Makefile.in
index 55cfd0b6a..148c03739 100644
--- a/xserver/include/Makefile.in
+++ b/xserver/include/Makefile.in
@@ -57,13 +57,14 @@ SOURCES =
DIST_SOURCES =
am__sdk_HEADERS_DIST = XIstubs.h bstore.h bstorestr.h closestr.h \
closure.h colormap.h colormapst.h hotplug.h cursor.h \
- cursorstr.h dix.h dixevents.h dixfont.h dixfontstr.h \
- dixgrabs.h dixstruct.h exevents.h extension.h extinit.h \
- extnsionst.h gc.h gcstruct.h globals.h input.h inputstr.h \
- misc.h miscstruct.h opaque.h os.h pixmap.h pixmapstr.h \
- property.h propertyst.h region.h regionstr.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 xkbsrv.h \
+ cursorstr.h dix.h dixaccess.h dixevents.h dixfont.h \
+ dixfontstr.h dixgrabs.h dixstruct.h exevents.h extension.h \
+ extinit.h extnsionst.h gc.h gcstruct.h globals.h input.h \
+ inputstr.h misc.h miscstruct.h opaque.h os.h pixmap.h \
+ pixmapstr.h privates.h property.h propertyst.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 \
xorg-server.h
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@@ -115,8 +116,6 @@ BSD_KQUEUE_APM_FALSE = @BSD_KQUEUE_APM_FALSE@
BSD_KQUEUE_APM_TRUE = @BSD_KQUEUE_APM_TRUE@
BUILDDOCS_FALSE = @BUILDDOCS_FALSE@
BUILDDOCS_TRUE = @BUILDDOCS_TRUE@
-BUILD_DARWIN_FALSE = @BUILD_DARWIN_FALSE@
-BUILD_DARWIN_TRUE = @BUILD_DARWIN_TRUE@
BUILD_DATE = @BUILD_DATE@
BUILD_IOPORT_FALSE = @BUILD_IOPORT_FALSE@
BUILD_IOPORT_TRUE = @BUILD_IOPORT_TRUE@
@@ -188,6 +187,10 @@ DMX_FALSE = @DMX_FALSE@
DMX_TRUE = @DMX_TRUE@
DPMSExtension_FALSE = @DPMSExtension_FALSE@
DPMSExtension_TRUE = @DPMSExtension_TRUE@
+DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
+DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
+DRI2_FALSE = @DRI2_FALSE@
+DRI2_TRUE = @DRI2_TRUE@
DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@
DRIPROTO_LIBS = @DRIPROTO_LIBS@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
@@ -217,7 +220,7 @@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@
FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@
FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
FREETYPE_LIBS = @FREETYPE_LIBS@
-FREETYPE_REQUIRES = @FREETYPE_REQUIRES@
+GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GLX_FALSE = @GLX_FALSE@
GLX_TRUE = @GLX_TRUE@
@@ -231,8 +234,8 @@ HAVE_AGL_FRAMEWORK_FALSE = @HAVE_AGL_FRAMEWORK_FALSE@
HAVE_AGL_FRAMEWORK_TRUE = @HAVE_AGL_FRAMEWORK_TRUE@
HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@
HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@
-HAVE_X_PLUGIN_FALSE = @HAVE_X_PLUGIN_FALSE@
-HAVE_X_PLUGIN_TRUE = @HAVE_X_PLUGIN_TRUE@
+HAVE_XPLUGIN_FALSE = @HAVE_XPLUGIN_FALSE@
+HAVE_XPLUGIN_TRUE = @HAVE_XPLUGIN_TRUE@
HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@
HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@
HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@
@@ -273,6 +276,9 @@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
KDRIVE_TRUE = @KDRIVE_TRUE@
+LAUNCHD = @LAUNCHD@
+LAUNCHD_FALSE = @LAUNCHD_FALSE@
+LAUNCHD_TRUE = @LAUNCHD_TRUE@
LDFLAGS = @LDFLAGS@
LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
LEX = @LEX@
@@ -327,6 +333,8 @@ OBJCFLAGS = @OBJCFLAGS@
OBJCLINK = @OBJCLINK@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -334,12 +342,11 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
+PCIACCESS_LIBS = @PCIACCESS_LIBS@
+PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
PERL = @PERL@
-PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
-PIXMAN_LIBS = @PIXMAN_LIBS@
PKG_CONFIG = @PKG_CONFIG@
-PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@
-PLIST_VERSION_STRING = @PLIST_VERSION_STRING@
PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@
PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@
PROJECTROOT = @PROJECTROOT@
@@ -351,13 +358,12 @@ RECORD_FALSE = @RECORD_FALSE@
RECORD_TRUE = @RECORD_TRUE@
RES_FALSE = @RES_FALSE@
RES_TRUE = @RES_TRUE@
-RGB_DB = @RGB_DB@
SCREENSAVER_FALSE = @SCREENSAVER_FALSE@
SCREENSAVER_TRUE = @SCREENSAVER_TRUE@
SECURE_RPC_FALSE = @SECURE_RPC_FALSE@
SECURE_RPC_TRUE = @SECURE_RPC_TRUE@
SED = @SED@
-SERVERCONFIGdir = @SERVERCONFIGdir@
+SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
SET_MAKE = @SET_MAKE@
SGI_VIDEO_FALSE = @SGI_VIDEO_FALSE@
SGI_VIDEO_TRUE = @SGI_VIDEO_TRUE@
@@ -373,20 +379,21 @@ SPARC64_VIDEO_TRUE = @SPARC64_VIDEO_TRUE@
STRIP = @STRIP@
SUN_KBD_MODE_FALSE = @SUN_KBD_MODE_FALSE@
SUN_KBD_MODE_TRUE = @SUN_KBD_MODE_TRUE@
-SYS_LIBS = @SYS_LIBS@
TSLIB_CFLAGS = @TSLIB_CFLAGS@
TSLIB_FALSE = @TSLIB_FALSE@
TSLIB_LIBS = @TSLIB_LIBS@
TSLIB_TRUE = @TSLIB_TRUE@
USE_CURSES_FALSE = @USE_CURSES_FALSE@
USE_CURSES_TRUE = @USE_CURSES_TRUE@
-USE_RGB_BUILTIN_FALSE = @USE_RGB_BUILTIN_FALSE@
-USE_RGB_BUILTIN_TRUE = @USE_RGB_BUILTIN_TRUE@
+UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@
VENDOR_NAME = @VENDOR_NAME@
VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
VENDOR_RELEASE = @VENDOR_RELEASE@
VERSION = @VERSION@
+X11APP_ARCHS = @X11APP_ARCHS@
+X11APP_FALSE = @X11APP_FALSE@
+X11APP_TRUE = @X11APP_TRUE@
X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
XACE_FALSE = @XACE_FALSE@
@@ -403,18 +410,22 @@ XDMCP_LIBS = @XDMCP_LIBS@
XDMCP_TRUE = @XDMCP_TRUE@
XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
+XDMX_CFLAGS = @XDMX_CFLAGS@
XDMX_LIBS = @XDMX_LIBS@
+XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@
-XEGLMODULES_LIBS = @XEGLMODULES_LIBS@
XEGL_FALSE = @XEGL_FALSE@
XEGL_LIBS = @XEGL_LIBS@
+XEGL_SYS_LIBS = @XEGL_SYS_LIBS@
XEGL_TRUE = @XEGL_TRUE@
XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
+XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@
XEPHYR_FALSE = @XEPHYR_FALSE@
+XEPHYR_HAS_DRI_FALSE = @XEPHYR_HAS_DRI_FALSE@
+XEPHYR_HAS_DRI_TRUE = @XEPHYR_HAS_DRI_TRUE@
XEPHYR_INCS = @XEPHYR_INCS@
XEPHYR_LIBS = @XEPHYR_LIBS@
XEPHYR_TRUE = @XEPHYR_TRUE@
-XERRORDB_PATH = @XERRORDB_PATH@
XEVIE_FALSE = @XEVIE_FALSE@
XEVIE_TRUE = @XEVIE_TRUE@
XF86BIGFONT_FALSE = @XF86BIGFONT_FALSE@
@@ -438,10 +449,12 @@ XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@
XGLXMODULES_LIBS = @XGLXMODULES_LIBS@
XGLX_FALSE = @XGLX_FALSE@
XGLX_LIBS = @XGLX_LIBS@
+XGLX_SYS_LIBS = @XGLX_SYS_LIBS@
XGLX_TRUE = @XGLX_TRUE@
XGL_FALSE = @XGL_FALSE@
XGL_LIBS = @XGL_LIBS@
XGL_MODULE_PATH = @XGL_MODULE_PATH@
+XGL_SYS_LIBS = @XGL_SYS_LIBS@
XGL_TRUE = @XGL_TRUE@
XINERAMA_FALSE = @XINERAMA_FALSE@
XINERAMA_TRUE = @XINERAMA_TRUE@
@@ -455,19 +468,18 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
XNEST_FALSE = @XNEST_FALSE@
XNEST_LIBS = @XNEST_LIBS@
+XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
XNEST_TRUE = @XNEST_TRUE@
XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@
XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@
XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@
XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@
-XORG_BUS_FREEBSDPCI_FALSE = @XORG_BUS_FREEBSDPCI_FALSE@
-XORG_BUS_FREEBSDPCI_TRUE = @XORG_BUS_FREEBSDPCI_TRUE@
+XORG_BUS_BSDPCI_FALSE = @XORG_BUS_BSDPCI_FALSE@
+XORG_BUS_BSDPCI_TRUE = @XORG_BUS_BSDPCI_TRUE@
XORG_BUS_IX86PCI_FALSE = @XORG_BUS_IX86PCI_FALSE@
XORG_BUS_IX86PCI_TRUE = @XORG_BUS_IX86PCI_TRUE@
XORG_BUS_LINUXPCI_FALSE = @XORG_BUS_LINUXPCI_FALSE@
XORG_BUS_LINUXPCI_TRUE = @XORG_BUS_LINUXPCI_TRUE@
-XORG_BUS_NETBSDPCI_FALSE = @XORG_BUS_NETBSDPCI_FALSE@
-XORG_BUS_NETBSDPCI_TRUE = @XORG_BUS_NETBSDPCI_TRUE@
XORG_BUS_PPCPCI_FALSE = @XORG_BUS_PPCPCI_FALSE@
XORG_BUS_PPCPCI_TRUE = @XORG_BUS_PPCPCI_TRUE@
XORG_BUS_SPARCPCI_FALSE = @XORG_BUS_SPARCPCI_FALSE@
@@ -475,7 +487,6 @@ XORG_BUS_SPARCPCI_TRUE = @XORG_BUS_SPARCPCI_TRUE@
XORG_BUS_SPARC_FALSE = @XORG_BUS_SPARC_FALSE@
XORG_BUS_SPARC_TRUE = @XORG_BUS_SPARC_TRUE@
XORG_CFLAGS = @XORG_CFLAGS@
-XORG_CORE_LIBS = @XORG_CORE_LIBS@
XORG_FALSE = @XORG_FALSE@
XORG_INCS = @XORG_INCS@
XORG_LIBS = @XORG_LIBS@
@@ -485,23 +496,31 @@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
XORG_OS = @XORG_OS@
XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
+XORG_SYS_LIBS = @XORG_SYS_LIBS@
XORG_TRUE = @XORG_TRUE@
+XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@
+XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@
XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@
XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@
XPRINT_CFLAGS = @XPRINT_CFLAGS@
XPRINT_FALSE = @XPRINT_FALSE@
XPRINT_LIBS = @XPRINT_LIBS@
+XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@
XPRINT_TRUE = @XPRINT_TRUE@
XP_USE_FREETYPE_FALSE = @XP_USE_FREETYPE_FALSE@
XP_USE_FREETYPE_TRUE = @XP_USE_FREETYPE_TRUE@
XQUARTZ_FALSE = @XQUARTZ_FALSE@
XQUARTZ_TRUE = @XQUARTZ_TRUE@
+XREGISTRY_FALSE = @XREGISTRY_FALSE@
+XREGISTRY_TRUE = @XREGISTRY_TRUE@
XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
XSDLSERVER_FALSE = @XSDLSERVER_FALSE@
XSDLSERVER_TRUE = @XSDLSERVER_TRUE@
XSDL_INCS = @XSDL_INCS@
XSDL_LIBS = @XSDL_LIBS@
+XSELINUX_FALSE = @XSELINUX_FALSE@
+XSELINUX_TRUE = @XSELINUX_TRUE@
XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -509,12 +528,14 @@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
XSERVER_DTRACE_FALSE = @XSERVER_DTRACE_FALSE@
XSERVER_DTRACE_TRUE = @XSERVER_DTRACE_TRUE@
XSERVER_LIBS = @XSERVER_LIBS@
+XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
XTRAP_FALSE = @XTRAP_FALSE@
XTRAP_TRUE = @XTRAP_TRUE@
XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
XVFB_FALSE = @XVFB_FALSE@
XVFB_LIBS = @XVFB_LIBS@
+XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
XVFB_TRUE = @XVFB_TRUE@
XVMC_FALSE = @XVMC_FALSE@
XVMC_TRUE = @XVMC_TRUE@
@@ -539,7 +560,7 @@ XWIN_PRIMARYFB_TRUE = @XWIN_PRIMARYFB_TRUE@
XWIN_RANDR_FALSE = @XWIN_RANDR_FALSE@
XWIN_RANDR_TRUE = @XWIN_RANDR_TRUE@
XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
-XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@
+XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
XWIN_TRUE = @XWIN_TRUE@
XWIN_XV_FALSE = @XWIN_XV_FALSE@
XWIN_XV_TRUE = @XWIN_XV_TRUE@
@@ -547,6 +568,11 @@ X_PRIVSEP_FALSE = @X_PRIVSEP_FALSE@
X_PRIVSEP_TRUE = @X_PRIVSEP_TRUE@
YACC = @YACC@
__XCONFIGFILE__ = @__XCONFIGFILE__@
+abi_ansic = @abi_ansic@
+abi_extension = @abi_extension@
+abi_font = @abi_font@
+abi_videodrv = @abi_videodrv@
+abi_xinput = @abi_xinput@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
@@ -589,6 +615,7 @@ host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
+launchagentsdir = @launchagentsdir@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
@@ -618,6 +645,7 @@ xpconfigdir = @xpconfigdir@
@XORG_TRUE@ cursor.h \
@XORG_TRUE@ cursorstr.h \
@XORG_TRUE@ dix.h \
+@XORG_TRUE@ dixaccess.h \
@XORG_TRUE@ dixevents.h \
@XORG_TRUE@ dixfont.h \
@XORG_TRUE@ dixfontstr.h \
@@ -638,10 +666,12 @@ xpconfigdir = @xpconfigdir@
@XORG_TRUE@ os.h \
@XORG_TRUE@ pixmap.h \
@XORG_TRUE@ pixmapstr.h \
+@XORG_TRUE@ privates.h \
@XORG_TRUE@ property.h \
@XORG_TRUE@ propertyst.h \
@XORG_TRUE@ region.h \
@XORG_TRUE@ regionstr.h \
+@XORG_TRUE@ registry.h \
@XORG_TRUE@ resource.h \
@XORG_TRUE@ rgb.h \
@XORG_TRUE@ screenint.h \
@@ -654,11 +684,15 @@ xpconfigdir = @xpconfigdir@
@XORG_TRUE@ validate.h \
@XORG_TRUE@ window.h \
@XORG_TRUE@ windowstr.h \
+@XORG_TRUE@ xkbfile.h \
@XORG_TRUE@ xkbsrv.h \
+@XORG_TRUE@ xkbstr.h \
@XORG_TRUE@ xorg-server.h
AM_CFLAGS = $(DIX_CFLAGS)
-EXTRA_DIST = $(sdk_HEADERS) do-not-use-config.h dix-config.h xorg-config.h
+EXTRA_DIST = $(sdk_HEADERS) do-not-use-config.h dix-config.h xorg-config.h \
+ xkb-config.h
+
all: do-not-use-config.h xorg-server.h dix-config.h xgl-config.h xorg-config.h xkb-config.h xwin-config.h kdrive-config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff --git a/xserver/include/bstorestr.h b/xserver/include/bstorestr.h
index 14e2fe1da..cf7820ba4 100644
--- a/xserver/include/bstorestr.h
+++ b/xserver/include/bstorestr.h
@@ -45,13 +45,11 @@ typedef PixmapPtr (* BackingStoreGetImagePixmapProcPtr)(void);
typedef PixmapPtr (* BackingStoreGetSpansPixmapProcPtr)(void);
typedef struct _BSFuncs {
-
BackingStoreSaveAreasProcPtr SaveAreas;
BackingStoreRestoreAreasProcPtr RestoreAreas;
BackingStoreSetClipmaskRgnProcPtr SetClipmaskRgn;
BackingStoreGetImagePixmapProcPtr GetImagePixmap;
BackingStoreGetSpansPixmapProcPtr GetSpansPixmap;
-
} BSFuncRec, *BSFuncPtr;
#endif /* _BSTORESTR_H_ */
diff --git a/xserver/include/colormapst.h b/xserver/include/colormapst.h
index c9d9514ad..f1fc8ebef 100644
--- a/xserver/include/colormapst.h
+++ b/xserver/include/colormapst.h
@@ -52,6 +52,7 @@ SOFTWARE.
#include "colormap.h"
#include "screenint.h"
+#include "privates.h"
/* Shared color -- the color is used by AllocColorPlanes */
typedef struct
@@ -126,7 +127,7 @@ typedef struct _ColormapRec
Entry *green;
Entry *blue;
pointer devPriv;
- DevUnion *devPrivates; /* dynamic devPrivates added after devPriv
+ PrivateRec *devPrivates; /* dynamic devPrivates added after devPriv
already existed - must keep devPriv */
} ColormapRec;
diff --git a/xserver/include/cursor.h b/xserver/include/cursor.h
index bdf4fd301..8635cf1a2 100644
--- a/xserver/include/cursor.h
+++ b/xserver/include/cursor.h
@@ -68,23 +68,7 @@ extern int FreeCursor(
pointer /*pCurs*/,
XID /*cid*/);
-/* Quartz support on Mac OS X pulls in the QuickDraw
- framework whose AllocCursor function conflicts here. */
-#ifdef __DARWIN__
-#define AllocCursor Darwin_X_AllocCursor
-#endif
-extern CursorPtr AllocCursor(
- unsigned char* /*psrcbits*/,
- unsigned char* /*pmaskbits*/,
- CursorMetricPtr /*cm*/,
- unsigned /*foreRed*/,
- unsigned /*foreGreen*/,
- unsigned /*foreBlue*/,
- unsigned /*backRed*/,
- unsigned /*backGreen*/,
- unsigned /*backBlue*/);
-
-extern CursorPtr AllocCursorARGB(
+extern int AllocARGBCursor(
unsigned char* /*psrcbits*/,
unsigned char* /*pmaskbits*/,
CARD32* /*argb*/,
@@ -94,7 +78,10 @@ extern CursorPtr AllocCursorARGB(
unsigned /*foreBlue*/,
unsigned /*backRed*/,
unsigned /*backGreen*/,
- unsigned /*backBlue*/);
+ unsigned /*backBlue*/,
+ CursorPtr* /*ppCurs*/,
+ ClientPtr /*client*/,
+ XID /*cid*/);
extern int AllocGlyphCursor(
Font /*source*/,
@@ -108,7 +95,8 @@ extern int AllocGlyphCursor(
unsigned /*backGreen*/,
unsigned /*backBlue*/,
CursorPtr* /*ppCurs*/,
- ClientPtr /*client*/);
+ ClientPtr /*client*/,
+ XID /*cid*/);
extern CursorPtr CreateRootCursor(
char* /*pfilename*/,
diff --git a/xserver/include/cursorstr.h b/xserver/include/cursorstr.h
index b7beaa0c5..bca35969b 100644
--- a/xserver/include/cursorstr.h
+++ b/xserver/include/cursorstr.h
@@ -49,6 +49,7 @@ SOFTWARE.
#define CURSORSTRUCT_H
#include "cursor.h"
+#include "privates.h"
/*
* device-independent cursor storage
*/
@@ -63,7 +64,7 @@ typedef struct _CursorBits {
Bool emptyMask; /* all zeros mask */
unsigned short width, height, xhot, yhot; /* metrics */
int refcnt; /* can be shared */
- pointer devPriv[MAXSCREENS]; /* set by pScr->RealizeCursor*/
+ PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
#ifdef ARGB_CURSOR
CARD32 *argb; /* full-color alpha blended */
#endif
@@ -74,7 +75,8 @@ typedef struct _Cursor {
unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */
unsigned short backRed, backGreen, backBlue; /* device-independent color */
int refcnt;
- pointer devPriv[MAXSCREENS]; /* set by pScr->RealizeCursor*/
+ PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
+ XID id;
#ifdef XFIXES
CARD32 serialNumber;
Atom name;
diff --git a/xserver/include/dix-config.h.in b/xserver/include/dix-config.h.in
index 22d3677f9..dde547910 100644
--- a/xserver/include/dix-config.h.in
+++ b/xserver/include/dix-config.h.in
@@ -21,6 +21,9 @@
/* Default font path */
#undef COMPILEDDEFAULTFONTPATH
+/* Miscellaneous server configuration files path */
+#undef SERVER_MISC_CONFIG_PATH
+
/* Support Composite Extension */
#undef COMPOSITE
@@ -136,12 +139,18 @@
/* 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
/* Define to 1 if you have version 2.2 (or newer) of the drm library */
#undef HAVE_LIBDRM_2_2
+/* Have Quartz */
+#undef XQUARTZ
+
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
@@ -181,6 +190,9 @@
/* Define to 1 if you have the <rpcsvc/dbm.h> header file. */
#undef HAVE_RPCSVC_DBM_H
+/* 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
@@ -234,6 +246,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Have /dev/urandom */
+#undef HAVE_URANDOM
+
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
@@ -261,9 +276,6 @@
/* Internal define for Xinerama */
#undef PANORAMIX
-/* Support pixmap privates */
-#undef PIXPRIV
-
/* Overall prefix */
#undef PROJECTROOT
@@ -320,21 +332,21 @@
/* Support UNIX socket connections */
#undef UNIXCONN
-/* Use builtin rgb color database */
-#undef USE_RGB_BUILTIN
-
-/* Use rgb.txt directly */
-#undef USE_RGB_TXT
-
/* 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
@@ -422,6 +434,11 @@
/* Support DRI extension */
#undef XF86DRI
+#undef XEPHYR_DRI
+
+/* Build DRI2 extension */
+#undef DRI2
+
/* Build DBE support */
#undef DBE
@@ -456,9 +473,6 @@
/* Define to 1 if unsigned long is 64 bits. */
#undef _XSERVER64
-/* Define to location of RGB database */
-#undef RGB_DB
-
/* System is BSD-like */
#undef CSRG_BASED
@@ -495,9 +509,6 @@
/* Define to 1 if the DTrace Xserver provider probes should be built in */
#undef XSERVER_DTRACE
-/* Path to XErrorDB file */
-#undef XERRORDB_PATH
-
/* Define to 16-bit byteswap macro */
#undef bswap_16
@@ -507,4 +518,13 @@
/* 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
+
#endif /* _DIX_CONFIG_H_ */
diff --git a/xserver/include/dix.h b/xserver/include/dix.h
index f346b43a2..64035fec7 100644
--- a/xserver/include/dix.h
+++ b/xserver/include/dix.h
@@ -81,180 +81,17 @@ SOFTWARE.
return(BadIDChoice);\
}
-/* XXX if you are using this macro, you are probably not generating Match
- * errors where appropriate */
-#define LOOKUP_DRAWABLE(did, client)\
- ((client->lastDrawableID == did) ? \
- client->lastDrawable : (DrawablePtr)LookupDrawable(did, client))
-
-#ifdef XACE
-
-#define SECURITY_VERIFY_DRAWABLE(pDraw, did, client, mode)\
- {\
- pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
- RC_DRAWABLE, mode);\
- if (!pDraw) \
- {\
- client->errorValue = did; \
- return BadDrawable;\
- }\
- if (pDraw->type == UNDRAWABLE_WINDOW)\
- return BadMatch;\
- }
-
-#define SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, mode)\
- {\
- pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
- RC_DRAWABLE, mode);\
- if (!pDraw) \
- {\
- client->errorValue = did; \
- return BadDrawable;\
- }\
- }
-
-#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
- pGC = (GC *) SecurityLookupIDByType(client, rid, RT_GC, mode);\
- if (!pGC)\
- {\
- client->errorValue = rid;\
- return (BadGC);\
- }
-
-#define VERIFY_DRAWABLE(pDraw, did, client)\
- SECURITY_VERIFY_DRAWABLE(pDraw, did, client, SecurityUnknownAccess)
-
-#define VERIFY_GEOMETRABLE(pDraw, did, client)\
- SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, SecurityUnknownAccess)
-
-#define VERIFY_GC(pGC, rid, client)\
- SECURITY_VERIFY_GC(pGC, rid, client, SecurityUnknownAccess)
-
-#else /* not XACE */
-
-#define VERIFY_DRAWABLE(pDraw, did, client)\
- if (client->lastDrawableID == did)\
- pDraw = client->lastDrawable;\
- else \
- {\
- pDraw = (DrawablePtr) LookupIDByClass(did, RC_DRAWABLE);\
- if (!pDraw) \
- {\
- client->errorValue = did; \
- return BadDrawable;\
- }\
- if (pDraw->type == UNDRAWABLE_WINDOW)\
- return BadMatch;\
- }
-
-#define VERIFY_GEOMETRABLE(pDraw, did, client)\
- if (client->lastDrawableID == did)\
- pDraw = client->lastDrawable;\
- else \
- {\
- pDraw = (DrawablePtr) LookupIDByClass(did, RC_DRAWABLE);\
- if (!pDraw) \
- {\
- client->errorValue = did; \
- return BadDrawable;\
- }\
- }
-
-#define VERIFY_GC(pGC, rid, client)\
- if (client->lastGCID == rid)\
- pGC = client->lastGC;\
- else\
- pGC = (GC *)LookupIDByType(rid, RT_GC);\
- if (!pGC)\
- {\
- client->errorValue = rid;\
- return (BadGC);\
- }
-
-#define SECURITY_VERIFY_DRAWABLE(pDraw, did, client, mode)\
- VERIFY_DRAWABLE(pDraw, did, client)
-
-#define SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, mode)\
- VERIFY_GEOMETRABLE(pDraw, did, client)
-
-#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
- VERIFY_GC(pGC, rid, client)
-
-#endif /* XACE */
-
-/*
- * We think that most hardware implementations of DBE will want
- * LookupID*(dbe_back_buffer_id) to return the window structure that the
- * id is a back buffer for. Since both front and back buffers will
- * return the same structure, you need to be able to distinguish
- * somewhere what kind of buffer (front/back) was being asked for, so
- * that ddx can render to the right place. That's the problem that the
- * following code solves. Note: we couldn't embed this in the LookupID*
- * functions because the VALIDATE_DRAWABLE_AND_GC macro often circumvents
- * those functions by checking a one-element cache. That's why we're
- * mucking with VALIDATE_DRAWABLE_AND_GC.
- *
- * If you put -DNEED_DBE_BUF_BITS into PervasiveDBEDefines, the window
- * structure will have two additional bits defined, srcBuffer and
- * dstBuffer, and their values will be maintained via the macros
- * SET_DBE_DSTBUF and SET_DBE_SRCBUF (below). If you also
- * put -DNEED_DBE_BUF_VALIDATE into PervasiveDBEDefines, the function
- * DbeValidateBuffer will be called any time the bits change to give you
- * a chance to do some setup. See the DBE code for more details on this
- * function. We put in these levels of conditionality so that you can do
- * just what you need to do, and no more. If neither of these defines
- * are used, the bits won't be there, and VALIDATE_DRAWABLE_AND_GC will
- * be unchanged. dpw
- */
-
-#if defined(NEED_DBE_BUF_BITS)
-#define SET_DBE_DSTBUF(_pDraw, _drawID) \
- SET_DBE_BUF(_pDraw, _drawID, dstBuffer, TRUE)
-#define SET_DBE_SRCBUF(_pDraw, _drawID) \
- SET_DBE_BUF(_pDraw, _drawID, srcBuffer, FALSE)
-#if defined (NEED_DBE_BUF_VALIDATE)
-#define SET_DBE_BUF(_pDraw, _drawID, _whichBuffer, _dstbuf) \
- if (_pDraw->type == DRAWABLE_WINDOW)\
- {\
- int thisbuf = (_pDraw->id == _drawID);\
- if (thisbuf != ((WindowPtr)_pDraw)->_whichBuffer)\
- {\
- ((WindowPtr)_pDraw)->_whichBuffer = thisbuf;\
- DbeValidateBuffer((WindowPtr)_pDraw, _drawID, _dstbuf);\
- }\
- }
-#else /* want buffer bits, but don't need to call DbeValidateBuffer */
-#define SET_DBE_BUF(_pDraw, _drawID, _whichBuffer, _dstbuf) \
- if (_pDraw->type == DRAWABLE_WINDOW)\
- {\
- ((WindowPtr)_pDraw)->_whichBuffer = (_pDraw->id == _drawID);\
- }
-#endif /* NEED_DBE_BUF_VALIDATE */
-#else /* don't want buffer bits in window */
-#define SET_DBE_DSTBUF(_pDraw, _drawID) /**/
-#define SET_DBE_SRCBUF(_pDraw, _drawID) /**/
-#endif /* NEED_DBE_BUF_BITS */
-
-#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, pGC, client)\
- if ((stuff->gc == INVALID) || (client->lastGCID != stuff->gc) ||\
- (client->lastDrawableID != drawID))\
+#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
{\
- SECURITY_VERIFY_GEOMETRABLE(pDraw, drawID, client, SecurityWriteAccess);\
- SECURITY_VERIFY_GC(pGC, stuff->gc, client, SecurityReadAccess);\
- if ((pGC->depth != pDraw->depth) ||\
- (pGC->pScreen != pDraw->pScreen))\
+ int rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
+ if (rc != Success)\
+ return rc;\
+ rc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
+ if (rc != Success)\
+ return rc;\
+ if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
return (BadMatch);\
- client->lastDrawable = pDraw;\
- client->lastDrawableID = drawID;\
- client->lastGC = pGC;\
- client->lastGCID = stuff->gc;\
}\
- else\
- {\
- pGC = client->lastGC;\
- pDraw = client->lastDrawable;\
- }\
- SET_DBE_DSTBUF(pDraw, drawID);\
if (pGC->serialNumber != pDraw->serialNumber)\
ValidateGC(pDraw, pGC);
@@ -279,7 +116,9 @@ typedef struct _Client *ClientPtr; /* also in misc.h */
typedef struct _WorkQueue *WorkQueuePtr;
+#ifdef XPRINT
extern ClientPtr requestingClient;
+#endif
extern ClientPtr *clients;
extern ClientPtr serverClient;
extern int currentMaxClients;
@@ -308,16 +147,10 @@ extern void UpdateCurrentTime(void);
extern void UpdateCurrentTimeIf(void);
-extern void InitSelections(void);
-
-extern void FlushClientCaches(XID /*id*/);
-
extern int dixDestroyPixmap(
pointer /*value*/,
XID /*pid*/);
-extern void CloseDownRetainedResources(void);
-
extern void InitClient(
ClientPtr /*client*/,
int /*i*/,
@@ -333,31 +166,9 @@ extern void SendErrorToClient(
XID /*resId*/,
int /*errorCode*/);
-extern void DeleteWindowFromAnySelections(
- WindowPtr /*pWin*/);
-
extern void MarkClientException(
ClientPtr /*client*/);
-extern int GetGeometry(
- ClientPtr /*client*/,
- xGetGeometryReply* /* wa */);
-
-extern int SendConnSetup(
- ClientPtr /*client*/,
- char* /*reason*/);
-
-extern int DoGetImage(
- ClientPtr /*client*/,
- int /*format*/,
- Drawable /*drawable*/,
- int /*x*/,
- int /*y*/,
- int /*width*/,
- int /*height*/,
- Mask /*planemask*/,
- xGetImageReply ** /*im_return*/);
-
#if defined(DDXBEFORERESET)
extern void ddxBeforeReset (void);
#endif
@@ -375,47 +186,30 @@ extern int CompareISOLatin1Lowered(
unsigned char * /*b*/,
int blen);
-#ifdef XACE
-
-extern WindowPtr SecurityLookupWindow(
- XID /*rid*/,
- ClientPtr /*client*/,
- Mask /*access_mode*/);
-
-extern pointer SecurityLookupDrawable(
- XID /*rid*/,
- ClientPtr /*client*/,
- Mask /*access_mode*/);
-
-extern WindowPtr LookupWindow(
- XID /*rid*/,
- ClientPtr /*client*/);
-
-extern pointer LookupDrawable(
- XID /*rid*/,
- ClientPtr /*client*/);
-
-#else
-
-extern WindowPtr LookupWindow(
- XID /*rid*/,
- ClientPtr /*client*/);
-
-extern pointer LookupDrawable(
- XID /*rid*/,
- ClientPtr /*client*/);
-
-#define SecurityLookupWindow(rid, client, access_mode) \
- LookupWindow(rid, client)
-
-#define SecurityLookupDrawable(rid, client, access_mode) \
- LookupDrawable(rid, client)
-
-#endif /* XACE */
-
-extern ClientPtr LookupClient(
- XID /*rid*/,
- ClientPtr /*client*/);
+extern int dixLookupWindow(
+ WindowPtr *result,
+ XID id,
+ ClientPtr client,
+ Mask access_mode);
+
+extern int dixLookupDrawable(
+ DrawablePtr *result,
+ XID id,
+ ClientPtr client,
+ Mask type_mask,
+ Mask access_mode);
+
+extern int dixLookupGC(
+ GCPtr *result,
+ XID id,
+ ClientPtr client,
+ Mask access_mode);
+
+extern int dixLookupClient(
+ ClientPtr *result,
+ XID id,
+ ClientPtr client,
+ Mask access_mode);
extern void NoopDDA(void);
@@ -535,13 +329,6 @@ extern void EnqueueEvent(
DeviceIntPtr /* device */,
int /* count */);
-extern void ComputeFreezes(void);
-
-extern void CheckGrabForSyncs(
- DeviceIntPtr /* dev */,
- Bool /* thisMode */,
- Bool /* otherMode */);
-
extern void ActivatePointerGrab(
DeviceIntPtr /* mouse */,
GrabPtr /* grab */,
@@ -588,6 +375,9 @@ extern int DeliverDeviceEvents(
extern void DefineInitialRootWindow(
WindowPtr /* win */);
+extern void UpdateSpriteForScreen(
+ ScreenPtr /* pScreen */);
+
extern void WindowHasNewCursor(
WindowPtr /* pWin */);
@@ -693,13 +483,7 @@ void
ScreenRestructured (ScreenPtr pScreen);
#endif
-extern void ResetClientPrivates(void);
-
-extern int AllocateClientPrivateIndex(void);
-
-extern Bool AllocateClientPrivate(
- int /*index*/,
- unsigned /*amount*/);
+extern int ffs(int i);
/*
* callback manager stuff
@@ -713,29 +497,6 @@ typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
typedef void (*CallbackProcPtr) (
CallbackListPtr *, pointer, pointer);
-typedef Bool (*AddCallbackProcPtr) (
- CallbackListPtr *, CallbackProcPtr, pointer);
-
-typedef Bool (*DeleteCallbackProcPtr) (
- CallbackListPtr *, CallbackProcPtr, pointer);
-
-typedef void (*CallCallbacksProcPtr) (
- CallbackListPtr *, pointer);
-
-typedef void (*DeleteCallbackListProcPtr) (
- CallbackListPtr *);
-
-typedef struct _CallbackProcs {
- AddCallbackProcPtr AddCallback;
- DeleteCallbackProcPtr DeleteCallback;
- CallCallbacksProcPtr CallCallbacks;
- DeleteCallbackListProcPtr DeleteCallbackList;
-} CallbackFuncsRec, *CallbackFuncsPtr;
-
-extern Bool CreateCallbackList(
- CallbackListPtr * /*pcbl*/,
- CallbackFuncsPtr /*cbfuncs*/);
-
extern Bool AddCallback(
CallbackListPtr * /*pcbl*/,
CallbackProcPtr /*callback*/,
@@ -792,27 +553,52 @@ typedef struct {
int count;
} DeviceEventInfoRec;
+/* strcasecmp.c */
+#if NEED_STRCASECMP
+#define strcasecmp xstrcasecmp
+extern int xstrcasecmp(const char *s1, const char *s2);
+#endif
+
+#if NEED_STRNCASECMP
+#define strncasecmp xstrncasecmp
+extern int xstrncasecmp(const char *s1, const char *s2, size_t n);
+#endif
+
+#if NEED_STRCASESTR
+#define strcasestr xstrcasestr
+extern char *xstrcasestr(const char *s, const char *find);
+#endif
+
/*
- * SelectionCallback stuff
+ * These are deprecated compatibility functions and will be removed soon!
+ * Please use the noted replacements instead.
*/
-extern CallbackListPtr SelectionCallback;
+/* replaced by dixLookupWindow */
+extern WindowPtr SecurityLookupWindow(
+ XID id,
+ ClientPtr client,
+ Mask access_mode);
+
+/* replaced by dixLookupWindow */
+extern WindowPtr LookupWindow(
+ XID id,
+ ClientPtr client);
-typedef enum {
- SelectionSetOwner,
- SelectionWindowDestroy,
- SelectionClientClose
-} SelectionCallbackKind;
+/* replaced by dixLookupDrawable */
+extern pointer SecurityLookupDrawable(
+ XID id,
+ ClientPtr client,
+ Mask access_mode);
-typedef struct {
- struct _Selection *selection;
- SelectionCallbackKind kind;
-} SelectionInfoRec;
+/* replaced by dixLookupDrawable */
+extern pointer LookupDrawable(
+ XID id,
+ ClientPtr client);
-/* strcasecmp.c */
-#if NEED_STRCASECMP
-#define strcasecmp xstrcasecmp
-extern int xstrcasecmp(char *s1, char *s2);
-#endif
+/* replaced by dixLookupClient */
+extern ClientPtr LookupClient(
+ XID id,
+ ClientPtr client);
#endif /* DIX_H */
diff --git a/xserver/include/dixaccess.h b/xserver/include/dixaccess.h
new file mode 100644
index 000000000..3c62ee354
--- /dev/null
+++ b/xserver/include/dixaccess.h
@@ -0,0 +1,53 @@
+/***********************************************************
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIX_ACCESS_H
+#define DIX_ACCESS_H
+
+/* These are the access modes that can be passed in the last parameter
+ * to several of the dix lookup functions. They were originally part
+ * of the Security extension, now used by XACE.
+ *
+ * You can or these values together to indicate multiple modes
+ * simultaneously.
+ */
+
+#define DixUnknownAccess 0 /* don't know intentions */
+#define DixReadAccess (1<<0) /* inspecting the object */
+#define DixWriteAccess (1<<1) /* changing the object */
+#define DixDestroyAccess (1<<2) /* destroying the object */
+#define DixCreateAccess (1<<3) /* creating the object */
+#define DixGetAttrAccess (1<<4) /* get object attributes */
+#define DixSetAttrAccess (1<<5) /* set object attributes */
+#define DixListPropAccess (1<<6) /* list properties of object */
+#define DixGetPropAccess (1<<7) /* get properties of object */
+#define DixSetPropAccess (1<<8) /* set properties of object */
+#define DixGetFocusAccess (1<<9) /* get focus of object */
+#define DixSetFocusAccess (1<<10) /* set focus of object */
+#define DixListAccess (1<<11) /* list objects */
+#define DixAddAccess (1<<12) /* add object */
+#define DixRemoveAccess (1<<13) /* remove object */
+#define DixHideAccess (1<<14) /* hide object */
+#define DixShowAccess (1<<15) /* show object */
+#define DixBlendAccess (1<<16) /* mix contents of objects */
+#define DixGrabAccess (1<<17) /* exclusive access to object */
+#define DixFreezeAccess (1<<18) /* freeze status of object */
+#define DixForceAccess (1<<19) /* force status of object */
+#define DixInstallAccess (1<<20) /* install object */
+#define DixUninstallAccess (1<<21) /* uninstall object */
+#define DixSendAccess (1<<22) /* send to object */
+#define DixReceiveAccess (1<<23) /* receive from object */
+#define DixUseAccess (1<<24) /* use object */
+#define DixManageAccess (1<<25) /* manage object */
+#define DixDebugAccess (1<<26) /* debug object */
+#define DixBellAccess (1<<27) /* audible sound */
+
+#endif /* DIX_ACCESS_H */
diff --git a/xserver/include/dixevents.h b/xserver/include/dixevents.h
index 2a9458f08..77b37c85e 100644
--- a/xserver/include/dixevents.h
+++ b/xserver/include/dixevents.h
@@ -41,28 +41,6 @@ extern int MaybeDeliverEventsToClient(
extern int ProcWarpPointer(ClientPtr /* client */);
-#if 0
-extern void
-#ifdef XKB
-CoreProcessKeyboardEvent (
-#else
-ProcessKeyboardEvent (
-#endif
- xEvent * /* xE */,
- DeviceIntPtr /* keybd */,
- int /* count */);
-
-extern void
-#ifdef XKB
-CoreProcessPointerEvent (
-#else
-ProcessPointerEvent (
-#endif
- xEvent * /* xE */,
- DeviceIntPtr /* mouse */,
- int /* count */);
-#endif
-
extern int EventSelectForWindow(
WindowPtr /* pWin */,
ClientPtr /* client */,
@@ -102,4 +80,8 @@ extern int ProcUngrabButton(ClientPtr /* client */);
extern int ProcRecolorCursor(ClientPtr /* client */);
+#ifdef PANORAMIX
+extern void PostSyntheticMotion(int x, int y, int screen, unsigned long time);
+#endif
+
#endif /* DIXEVENTS_H */
diff --git a/xserver/include/dixfont.h b/xserver/include/dixfont.h
index 709da6272..516d91b58 100644
--- a/xserver/include/dixfont.h
+++ b/xserver/include/dixfont.h
@@ -105,8 +105,10 @@ extern int SetFontPath(ClientPtr /*client*/,
extern int SetDefaultFontPath(char * /*path*/);
-extern unsigned char *GetFontPath(int * /*count*/,
- int * /*length*/);
+extern int GetFontPath(ClientPtr client,
+ int *count,
+ int *length,
+ unsigned char **result);
extern int LoadGlyphs(ClientPtr /*client*/,
FontPtr /*pfont*/,
@@ -118,7 +120,7 @@ extern void DeleteClientFontStuff(ClientPtr /*client*/);
/* Quartz support on Mac OS X pulls in the QuickDraw
framework whose InitFonts function conflicts here. */
-#ifdef __DARWIN__
+#ifdef __APPLE__
#define InitFonts Darwin_X_InitFonts
#endif
extern void InitFonts(void);
diff --git a/xserver/include/dixgrabs.h b/xserver/include/dixgrabs.h
index 2d66d6ba1..f93e99957 100644
--- a/xserver/include/dixgrabs.h
+++ b/xserver/include/dixgrabs.h
@@ -50,6 +50,7 @@ extern Bool GrabMatchesSecond(
GrabPtr /* pSecondGrab */);
extern int AddPassiveGrabToList(
+ ClientPtr /* client */,
GrabPtr /* pGrab */);
extern Bool DeletePassiveGrabFromList(
diff --git a/xserver/include/dixstruct.h b/xserver/include/dixstruct.h
index b5ffcca49..d44b9cfa7 100644
--- a/xserver/include/dixstruct.h
+++ b/xserver/include/dixstruct.h
@@ -29,6 +29,7 @@ SOFTWARE.
#include "cursor.h"
#include "gc.h"
#include "pixmap.h"
+#include "privates.h"
#include <X11/Xmd.h>
/*
@@ -101,10 +102,6 @@ typedef struct _Client {
int clientGone;
int noClientException; /* this client died or needs to be
* killed */
- DrawablePtr lastDrawable;
- Drawable lastDrawableID;
- GCPtr lastGC;
- GContext lastGCID;
SaveSetElt *saveSet;
int numSaved;
pointer screenPrivate[MAXSCREENS];
@@ -114,7 +111,7 @@ typedef struct _Client {
Bool big_requests; /* supports large requests */
int priority;
ClientState clientState;
- DevUnion *devPrivates;
+ PrivateRec *devPrivates;
#ifdef XKB
unsigned short xkbClientFlags;
unsigned short mapNotifyMask;
@@ -150,11 +147,9 @@ extern long SmartScheduleTime;
extern long SmartScheduleInterval;
extern long SmartScheduleSlice;
extern long SmartScheduleMaxSlice;
-extern unsigned long SmartScheduleIdleCount;
extern Bool SmartScheduleDisable;
-extern Bool SmartScheduleIdle;
-extern Bool SmartScheduleTimerStopped;
-extern Bool SmartScheduleStartTimer(void);
+extern void SmartScheduleStartTimer(void);
+extern void SmartScheduleStopTimer(void);
#define SMART_MAX_PRIORITY (20)
#define SMART_MIN_PRIORITY (-20)
@@ -192,7 +187,6 @@ typedef struct _CallbackRec {
} CallbackRec, *CallbackPtr;
typedef struct _CallbackList {
- CallbackFuncsRec funcs;
int inCallback;
Bool deleted;
int numDeleted;
@@ -207,10 +201,6 @@ extern int (* ProcVector[256]) (ClientPtr /*client*/);
extern int (* SwappedProcVector[256]) (ClientPtr /*client*/);
-#ifdef K5AUTH
-extern int (*k5_Vector[256])(ClientPtr /*client*/);
-#endif
-
extern ReplySwapPtr ReplySwapVector[256];
extern int ProcBadRequest(ClientPtr /*client*/);
diff --git a/xserver/include/do-not-use-config.h.in b/xserver/include/do-not-use-config.h.in
index 5635f0fe6..e60f5f5ea 100644
--- a/xserver/include/do-not-use-config.h.in
+++ b/xserver/include/do-not-use-config.h.in
@@ -56,9 +56,6 @@
/* Support Damage extension */
#undef DAMAGE
-/* Have Quartz */
-#undef DARWIN_WITH_QUARTZ
-
/* Support DBE extension */
#undef DBE
@@ -95,8 +92,8 @@
/* Support DPMS extension */
#undef DPMSExtension
-/* Built-in output drivers (none) */
-#undef DRIVERS
+/* Build DRI2 extension */
+#undef DRI2
/* Default DRI driver path */
#undef DRI_DRIVER_PATH
@@ -143,6 +140,9 @@
/* Support SHM */
#undef HAS_SHM
+/* Have the 'strlcpy' function */
+#undef HAS_STRLCPY
+
/* Use Windows sockets */
#undef HAS_WINSOCK
@@ -214,15 +214,30 @@
/* 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
+/* launchd support available */
+#undef HAVE_LAUNCHD
+
+/* Define to 1 if you have the `audit' library (-laudit). */
+#undef HAVE_LIBAUDIT
+
+/* Define to 1 if you have the <libaudit.h> header file. */
+#undef HAVE_LIBAUDIT_H
+
/* Has version 2.2 (or newer) of the drm library */
#undef HAVE_LIBDRM_2_2
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
+/* Define to 1 if you have the `selinux' library (-lselinux). */
+#undef HAVE_LIBSELINUX
+
/* Define to 1 if you have the `link' function. */
#undef HAVE_LINK
@@ -256,12 +271,27 @@
/* 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 `pci_device_enable' function. */
+#undef HAVE_PCI_DEVICE_ENABLE
+
+/* Define to 1 if you have the `pci_system_init_dev_mem' function. */
+#undef HAVE_PCI_SYSTEM_INIT_DEV_MEM
+
/* Define to 1 if you have the <rpcsvc/dbm.h> header file. */
#undef HAVE_RPCSVC_DBM_H
/* Define to 1 if you have the <SDL/SDL.h> header file. */
#undef HAVE_SDL_SDL_H
+/* Define to 1 if you have the <selinux/avc.h> header file. */
+#undef HAVE_SELINUX_AVC_H
+
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
+#undef HAVE_SELINUX_SELINUX_H
+
+/* Define to 1 if you have the `shmctl64' function. */
+#undef HAVE_SHMCTL64
+
/* Define to 1 if the system has the type `socklen_t'. */
#undef HAVE_SOCKLEN_T
@@ -271,6 +301,9 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
+/* Define to 1 if you have the `strcasestr' function. */
+#undef HAVE_STRCASESTR
+
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
@@ -321,6 +354,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Has /dev/urandom */
+#undef HAVE_URANDOM
+
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
@@ -330,9 +366,6 @@
/* Define to 1 if you have the `walkcontext' function. */
#undef HAVE_WALKCONTEXT
-/* Built-in input drivers (none) */
-#undef IDRIVERS
-
/* Support IPv6 for TCP connections */
#undef IPv6
@@ -369,6 +402,12 @@
/* Do not have 'strcasecmp'. */
#undef NEED_STRCASECMP
+/* Do not have 'strcasestr'. */
+#undef NEED_STRCASESTR
+
+/* Do not have 'strncasecmp'. */
+#undef NEED_STRNCASECMP
+
/* Need XFree86 helper functions */
#undef NEED_XF86_PROTOTYPES
@@ -423,12 +462,12 @@
/* System has PC console */
#undef PCCONS_SUPPORT
+/* Default PCI text file ID path */
+#undef PCI_TXT_IDS_PATH
+
/* System has PC console */
#undef PCVT_SUPPORT
-/* Support pixmap privates */
-#undef PIXPRIV
-
/* Overall prefix */
#undef PROJECTROOT
@@ -447,9 +486,6 @@
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
-/* Default RGB path */
-#undef RGB_DB
-
/* Build Rootless code */
#undef ROOTLESS
@@ -459,12 +495,12 @@
/* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */
#undef SECURE_RPC
-/* Server config path */
-#undef SERVERCONFIGdir
-
/* Use a lock to prevent multiple servers on a display */
#undef SERVER_LOCK
+/* Server miscellaneous config path */
+#undef SERVER_MISC_CONFIG_PATH
+
/* Support SHAPE extension */
#undef SHAPE
@@ -515,12 +551,6 @@
/* BSD i386 iopl */
#undef USE_I386_IOPL
-/* Use built-in RGB color database */
-#undef USE_RGB_BUILTIN
-
-/* Use rgb.txt directly */
-#undef USE_RGB_TXT
-
/* Define to use byteswap macros from <sys/endian.h> */
#undef USE_SYS_ENDIAN_H
@@ -551,8 +581,8 @@
/* Support XDM Control Protocol */
#undef XDMCP
-/* Path to XErrorDB file */
-#undef XERRORDB_PATH
+/* enable DRI extension in xephyr */
+#undef XEPHYR_DRI
/* Build XEvIE extension */
#undef XEVIE
@@ -635,18 +665,30 @@
/* Support FreeType rasterizer in Xprint for nearly all font file formats */
#undef XP_USE_FREETYPE
+/* Have Quartz */
+#undef XQUARTZ
+
/* Support Record extension */
#undef XRECORD
+/* Build registry module */
+#undef XREGISTRY
+
/* Build XRes extension */
#undef XResExtension
/* Build Xsdl server */
#undef XSDLSERVER
+/* Build SELinux extension */
+#undef XSELINUX
+
/* Define to 1 if the DTrace Xserver provider probes should be built in. */
#undef XSERVER_DTRACE
+/* Use libpciaccess for all pci manipulation */
+#undef XSERVER_LIBPCIACCESS
+
/* Support XSync extension */
#undef XSYNC
diff --git a/xserver/include/extension.h b/xserver/include/extension.h
index 74975c50b..6e6081740 100644
--- a/xserver/include/extension.h
+++ b/xserver/include/extension.h
@@ -58,14 +58,6 @@ extern Bool EnableDisableExtension(char *name, Bool enable);
extern void EnableDisableExtensionError(char *name, Bool enable);
-extern void ResetExtensionPrivates(void);
-
-extern int AllocateExtensionPrivateIndex(void);
-
-extern Bool AllocateExtensionPrivate(
- int /*index*/,
- unsigned /*amount*/);
-
extern void InitExtensions(int argc, char **argv);
extern void InitVisualWrap(void);
diff --git a/xserver/include/extinit.h b/xserver/include/extinit.h
index b1a0f215d..df9773caf 100644
--- a/xserver/include/extinit.h
+++ b/xserver/include/extinit.h
@@ -37,87 +37,6 @@ XInputExtensionInit(
void
);
-
-int
-ProcIDispatch (
- ClientPtr /* client */
- );
-
-int
-SProcIDispatch(
- ClientPtr /* client */
- );
-
-void
-SReplyIDispatch (
- ClientPtr /* client */,
- int /* len */,
- xGrabDeviceReply * /* rep */
- );
-
-void
-SEventIDispatch (
- xEvent * /* from */,
- xEvent * /* to */
- );
-
-void
-SEventDeviceValuator (
- deviceValuator * /* from */,
- deviceValuator * /* to */
- );
-
-void
-SEventFocus (
- deviceFocus * /* from */,
- deviceFocus * /* to */
- );
-
-void
-SDeviceStateNotifyEvent (
- deviceStateNotify * /* from */,
- deviceStateNotify * /* to */
- );
-
-void
-SDeviceKeyStateNotifyEvent (
- deviceKeyStateNotify * /* from */,
- deviceKeyStateNotify * /* to */
- );
-
-void
-SDeviceButtonStateNotifyEvent (
- deviceButtonStateNotify * /* from */,
- deviceButtonStateNotify * /* to */
- );
-
-void
-SChangeDeviceNotifyEvent (
- changeDeviceNotify * /* from */,
- changeDeviceNotify * /* to */
- );
-
-void
-SDeviceMappingNotifyEvent (
- deviceMappingNotify * /* from */,
- deviceMappingNotify * /* to */
- );
-
-void
-FixExtensionEvents (
- ExtensionEntry * /* extEntry */
- );
-
-void
-RestoreExtensionEvents (
- void
- );
-
-void
-IResetProc(
- ExtensionEntry * /* unused */
- );
-
void
AssignTypeAndName (
DeviceIntPtr /* dev */,
@@ -125,41 +44,4 @@ AssignTypeAndName (
char * /* name */
);
-void
-MakeDeviceTypeAtoms (
- void
-);
-
-DeviceIntPtr
-LookupDeviceIntRec (
- CARD8 /* id */
- );
-
-void
-SetExclusiveAccess (
- Mask /* mask */
- );
-
-void
-AllowPropagateSuppress (
- Mask /* mask */
- );
-
-Mask
-GetNextExtEventMask (
- void
-);
-
-void
-SetMaskForExtEvent(
- Mask /* mask */,
- int /* event */
- );
-
-void
-SetEventInfo(
- Mask /* mask */,
- int /* constant */
- );
-
#endif /* EXTINIT_H */
diff --git a/xserver/include/extnsionst.h b/xserver/include/extnsionst.h
index 38d4bd7d9..59acd0ef4 100644
--- a/xserver/include/extnsionst.h
+++ b/xserver/include/extnsionst.h
@@ -53,6 +53,7 @@ SOFTWARE.
#include "screenint.h"
#include "extension.h"
#include "gc.h"
+#include "privates.h"
typedef struct _ExtensionEntry {
int index;
@@ -69,7 +70,7 @@ typedef struct _ExtensionEntry {
pointer extPrivate;
unsigned short (* MinorOpcode)( /* called for errors */
ClientPtr /* client */);
- DevUnion *devPrivates;
+ PrivateRec *devPrivates;
} ExtensionEntry;
/*
@@ -85,32 +86,11 @@ extern void NotImplemented ( /* FIXME: this may move to another file... */
xEvent *,
xEvent *);
-typedef void (* ExtensionLookupProc)(
-#ifdef EXTENSION_PROC_ARGS
- EXTENSION_PROC_ARGS
-#else
- /* args no longer indeterminate */
- char *name,
- GCPtr pGC
-#endif
-);
-
-typedef struct _ProcEntry {
- char *name;
- ExtensionLookupProc proc;
-} ProcEntryRec, *ProcEntryPtr;
-
-typedef struct _ScreenProcEntry {
- int num;
- ProcEntryPtr procList;
-} ScreenProcEntry;
-
#define SetGCVector(pGC, VectorElement, NewRoutineAddress, Atom) \
pGC->VectorElement = NewRoutineAddress;
#define GetGCValue(pGC, GCElement) (pGC->GCElement)
-
extern ExtensionEntry *AddExtension(
char* /*name*/,
int /*NumEvents*/,
@@ -128,23 +108,5 @@ extern Bool AddExtensionAlias(
extern ExtensionEntry *CheckExtension(const char *extname);
extern ExtensionEntry *GetExtensionEntry(int major);
-extern ExtensionLookupProc LookupProc(
- char* /*name*/,
- GCPtr /*pGC*/);
-
-extern Bool RegisterProc(
- char* /*name*/,
- GCPtr /*pGC*/,
- ExtensionLookupProc /*proc*/);
-
-extern Bool RegisterScreenProc(
- char* /*name*/,
- ScreenPtr /*pScreen*/,
- ExtensionLookupProc /*proc*/);
-
-extern void DeclareExtensionSecurity(
- char * /*extname*/,
- Bool /*secure*/);
-
#endif /* EXTENSIONSTRUCT_H */
diff --git a/xserver/include/gc.h b/xserver/include/gc.h
index 6c7add620..bf4c268a8 100644
--- a/xserver/include/gc.h
+++ b/xserver/include/gc.h
@@ -115,7 +115,9 @@ extern GCPtr CreateGC(
DrawablePtr /*pDrawable*/,
BITS32 /*mask*/,
XID* /*pval*/,
- int* /*pStatus*/);
+ int* /*pStatus*/,
+ XID /*gcid*/,
+ ClientPtr /*client*/);
extern int CopyGC(
GCPtr/*pgcSrc*/,
@@ -126,11 +128,6 @@ extern int FreeGC(
pointer /*pGC*/,
XID /*gid*/);
-extern void SetGCMask(
- GCPtr /*pGC*/,
- Mask /*selectMask*/,
- Mask /*newDataMask*/);
-
extern GCPtr CreateScratchGC(
ScreenPtr /*pScreen*/,
unsigned /*depth*/);
diff --git a/xserver/include/gcstruct.h b/xserver/include/gcstruct.h
index 14f747836..8d9b05575 100644
--- a/xserver/include/gcstruct.h
+++ b/xserver/include/gcstruct.h
@@ -56,6 +56,7 @@ SOFTWARE.
#include "region.h"
#include "pixmap.h"
#include "screenint.h"
+#include "privates.h"
#include <X11/Xprotostr.h>
/*
@@ -308,7 +309,7 @@ typedef struct _GC {
unsigned long serialNumber;
GCFuncs *funcs;
GCOps *ops;
- DevUnion *devPrivates;
+ PrivateRec *devPrivates;
/*
* The following were moved here from private storage to allow device-
* independent access to them from screen wrappers.
diff --git a/xserver/include/globals.h b/xserver/include/globals.h
index 821b12bdb..2ca9531d9 100644
--- a/xserver/include/globals.h
+++ b/xserver/include/globals.h
@@ -16,7 +16,6 @@ extern Bool screenSaverSuspended;
#endif
extern char *defaultFontPath;
-extern char *rgbPath;
extern int monitorResolution;
extern Bool loadableFonts;
extern int defaultColorVisualClass;
@@ -44,10 +43,6 @@ extern Bool DPMSCapableFlag;
#endif
#ifdef PANORAMIX
-extern Bool PanoramiXMapped;
-extern Bool PanoramiXVisibilityNotifySent;
-extern Bool PanoramiXWindowExposureSent;
-extern Bool PanoramiXOneExposeRequest;
extern Bool PanoramiXExtensionDisabledHack;
#endif
@@ -180,6 +175,16 @@ extern Bool noXInputExtension;
extern Bool noXIdleExtension;
#endif
+#ifdef XSELINUX
+extern Bool noSELinuxExtension;
+
+#define SELINUX_MODE_DEFAULT 0
+#define SELINUX_MODE_DISABLED 1
+#define SELINUX_MODE_PERMISSIVE 2
+#define SELINUX_MODE_ENFORCING 3
+extern int selinuxEnforcingState;
+#endif
+
#ifdef XV
extern Bool noXvExtension;
#endif
diff --git a/xserver/include/input.h b/xserver/include/input.h
index c0cee2458..ca67cfac5 100644
--- a/xserver/include/input.h
+++ b/xserver/include/input.h
@@ -59,6 +59,10 @@ SOFTWARE.
#define DEVICE_OFF 2
#define DEVICE_CLOSE 3
+#define POINTER_RELATIVE (1 << 1)
+#define POINTER_ABSOLUTE (1 << 2)
+#define POINTER_ACCELERATE (1 << 3)
+
#define MAP_LENGTH 256
#define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */
#define NullGrab ((GrabPtr)NULL)
@@ -154,13 +158,17 @@ typedef struct {
unsigned char id;
} LedCtrl;
-extern int AllocateDevicePrivateIndex(void);
-extern Bool AllocateDevicePrivate(DeviceIntPtr device, int index);
-extern void ResetDevicePrivateIndex(void);
-
extern KeybdCtrl defaultKeyboardControl;
extern PtrCtrl defaultPointerControl;
+typedef struct _InputOption {
+ char *key;
+ char *value;
+ struct _InputOption *next;
+} InputOption;
+
+extern void InitCoreDevices(void);
+
extern DeviceIntPtr AddInputDevice(
DeviceProc /*deviceProc*/,
Bool /*autoStart*/);
@@ -168,6 +176,9 @@ extern DeviceIntPtr AddInputDevice(
extern Bool EnableDevice(
DeviceIntPtr /*device*/);
+extern Bool ActivateDevice(
+ DeviceIntPtr /*device*/);
+
extern Bool DisableDevice(
DeviceIntPtr /*device*/);
@@ -175,7 +186,7 @@ extern int InitAndStartDevices(void);
extern void CloseDownDevices(void);
-extern void RemoveDevice(
+extern int RemoveDevice(
DeviceIntPtr /*dev*/);
extern int NumMotionEvents(void);
@@ -186,12 +197,11 @@ extern void RegisterPointerDevice(
extern void RegisterKeyboardDevice(
DeviceIntPtr /*device*/);
-extern DevicePtr LookupKeyboardDevice(void);
-
-extern DevicePtr LookupPointerDevice(void);
-
-extern DevicePtr LookupDevice(
- int /* id */);
+extern int dixLookupDevice(
+ DeviceIntPtr * /* dev */,
+ int /* id */,
+ ClientPtr /* client */,
+ Mask /* access_mode */);
extern void QueryMinMaxKeyCodes(
KeyCode* /*minCode*/,
@@ -225,6 +235,9 @@ extern Bool InitValuatorClassDeviceStruct(
int /*numMotionEvents*/,
int /*mode*/);
+extern Bool InitAbsoluteClassDeviceStruct(
+ DeviceIntPtr /*device*/);
+
extern Bool InitFocusClassDeviceStruct(
DeviceIntPtr /*device*/);
@@ -294,7 +307,8 @@ extern Bool InitPointerDeviceStruct(
int /*numButtons*/,
ValuatorMotionProcPtr /*motionProc*/,
PtrCtrlProcPtr /*controlProc*/,
- int /*numMotionEvents*/);
+ int /*numMotionEvents*/,
+ int /*numAxes*/);
extern Bool InitKeyboardDeviceStruct(
DevicePtr /*device*/,
@@ -356,7 +370,7 @@ extern void CoreProcessKeyboardEvent(
extern Bool LegalModifier(
unsigned int /*key*/,
- DevicePtr /*pDev*/);
+ DeviceIntPtr /*pDev*/);
extern void ProcessInputEvents(void);
@@ -364,4 +378,73 @@ extern void InitInput(
int /*argc*/,
char ** /*argv*/);
+extern int GetMaximumEventsNum(void);
+
+extern int GetPointerEvents(
+ xEvent *events,
+ DeviceIntPtr pDev,
+ int type,
+ int buttons,
+ int flags,
+ int first_valuator,
+ int num_valuators,
+ int *valuators);
+
+extern int GetKeyboardEvents(
+ xEvent *events,
+ DeviceIntPtr pDev,
+ int type,
+ int key_code);
+
+extern int GetKeyboardValuatorEvents(
+ xEvent *events,
+ DeviceIntPtr pDev,
+ int type,
+ int key_code,
+ int first_valuator,
+ int num_valuator,
+ int *valuators);
+
+extern int GetProximityEvents(
+ xEvent *events,
+ DeviceIntPtr pDev,
+ int type,
+ int first_valuator,
+ int num_valuators,
+ int *valuators);
+
+extern void PostSyntheticMotion(
+ int x,
+ int y,
+ int screen,
+ unsigned long time);
+
+extern int GetMotionHistorySize(
+ void);
+
+extern void AllocateMotionHistory(
+ DeviceIntPtr pDev);
+
+extern int GetMotionHistory(
+ DeviceIntPtr pDev,
+ xTimecoord *buff,
+ unsigned long start,
+ unsigned long stop,
+ ScreenPtr pScreen);
+
+extern void SwitchCoreKeyboard(DeviceIntPtr pDev);
+extern void SwitchCorePointer(DeviceIntPtr pDev);
+
+/* Implemented by the DDX. */
+extern int NewInputDeviceRequest(
+ InputOption *options,
+ DeviceIntPtr *dev);
+extern void DeleteInputDeviceRequest(
+ DeviceIntPtr dev);
+
+extern void DDXRingBell(
+ int volume,
+ int pitch,
+ int duration);
+
#endif /* INPUT_H */
diff --git a/xserver/include/inputstr.h b/xserver/include/inputstr.h
index 5e2e26968..b1f9856ed 100644
--- a/xserver/include/inputstr.h
+++ b/xserver/include/inputstr.h
@@ -52,6 +52,7 @@ SOFTWARE.
#include "input.h"
#include "window.h"
#include "dixstruct.h"
+#include "privates.h"
#define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))
@@ -62,6 +63,8 @@ SOFTWARE.
#define EMASKSIZE MAX_DEVICES
+extern DevPrivateKey CoreDevicePrivateKey;
+
/* Kludge: OtherClients and InputClients must be compatible, see code */
typedef struct _OtherClients {
@@ -91,15 +94,15 @@ typedef struct _OtherInputMasks {
*/
#define MasksPerDetailMask 8 /* 256 keycodes and 256 possible
- modifier combinations, but only
- 3 buttons. */
+ modifier combinations, but only
+ 3 buttons. */
- typedef struct _DetailRec { /* Grab details may be bit masks */
- unsigned short exact;
- Mask *pMask;
- } DetailRec;
+typedef struct _DetailRec { /* Grab details may be bit masks */
+ unsigned short exact;
+ Mask *pMask;
+} DetailRec;
- typedef struct _GrabRec {
+typedef struct _GrabRec {
GrabPtr next; /* for chain of passive grabs */
XID resource;
DeviceIntPtr device;
@@ -120,6 +123,7 @@ typedef struct _OtherInputMasks {
typedef struct _KeyClassRec {
CARD8 down[DOWN_LENGTH];
+ CARD8 postdown[DOWN_LENGTH];
KeyCode *modifierKeyMap;
KeySymsRec curKeySyms;
int modifierKeyCount[8];
@@ -129,6 +133,8 @@ typedef struct _KeyClassRec {
unsigned short prev_state;
#ifdef XKB
struct _XkbSrvInfo *xkbInfo;
+#else
+ void *pad0;
#endif
} KeyClassRec, *KeyClassPtr;
@@ -142,12 +148,20 @@ typedef struct _AxisInfo {
typedef struct _ValuatorClassRec {
ValuatorMotionProcPtr GetMotionProc;
- int numMotionEvents;
- WindowPtr motionHintWindow;
- AxisInfoPtr axes;
- unsigned short numAxes;
- int *axisVal;
- CARD8 mode;
+ int numMotionEvents;
+ int first_motion;
+ int last_motion;
+ void *motion;
+
+ WindowPtr motionHintWindow;
+
+ AxisInfoPtr axes;
+ unsigned short numAxes;
+ int *axisVal;
+ int lastx, lasty; /* last event recorded, not posted to
+ * client; see dix/devices.c */
+ float dxremaind, dyremaind; /* for acceleration */
+ CARD8 mode;
} ValuatorClassRec, *ValuatorClassPtr;
typedef struct _ButtonClassRec {
@@ -158,7 +172,9 @@ typedef struct _ButtonClassRec {
CARD8 down[DOWN_LENGTH];
CARD8 map[MAP_LENGTH];
#ifdef XKB
- union _XkbAction * xkb_acts;
+ union _XkbAction *xkb_acts;
+#else
+ void *pad0;
#endif
} ButtonClassRec, *ButtonClassPtr;
@@ -175,6 +191,26 @@ typedef struct _ProximityClassRec {
char pad;
} ProximityClassRec, *ProximityClassPtr;
+typedef struct _AbsoluteClassRec {
+ /* Calibration. */
+ int min_x;
+ int max_x;
+ int min_y;
+ int max_y;
+ int flip_x;
+ int flip_y;
+ int rotation;
+ int button_threshold;
+
+ /* Area. */
+ int offset_x;
+ int offset_y;
+ int width;
+ int height;
+ int screen;
+ XID following;
+} AbsoluteClassRec, *AbsoluteClassPtr;
+
typedef struct _KbdFeedbackClassRec *KbdFeedbackPtr;
typedef struct _PtrFeedbackClassRec *PtrFeedbackPtr;
typedef struct _IntegerFeedbackClassRec *IntegerFeedbackPtr;
@@ -189,6 +225,8 @@ typedef struct _KbdFeedbackClassRec {
KbdFeedbackPtr next;
#ifdef XKB
struct _XkbSrvLedInfo *xkb_sli;
+#else
+ void *pad0;
#endif
} KbdFeedbackClassRec;
@@ -223,6 +261,8 @@ typedef struct _LedFeedbackClassRec {
LedFeedbackPtr next;
#ifdef XKB
struct _XkbSrvLedInfo *xkb_sli;
+#else
+ void *pad0;
#endif
} LedFeedbackClassRec;
@@ -248,6 +288,8 @@ typedef struct _DeviceIntRec {
used to initialize, turn on, or
turn off the device */
Bool inited; /* TRUE if INIT returns Success */
+ Bool enabled; /* TRUE if ON returns Success */
+ Bool coreEvents; /* TRUE if device also sends core */
GrabPtr grab; /* the grabber - used by DIX */
struct {
Bool frozen;
@@ -274,6 +316,7 @@ typedef struct _DeviceIntRec {
ButtonClassPtr button;
FocusClassPtr focus;
ProximityClassPtr proximity;
+ AbsoluteClassPtr absolute;
KbdFeedbackPtr kbdfeed;
PtrFeedbackPtr ptrfeed;
IntegerFeedbackPtr intfeed;
@@ -281,9 +324,12 @@ typedef struct _DeviceIntRec {
BellFeedbackPtr bell;
LedFeedbackPtr leds;
#ifdef XKB
- struct _XkbInterest * xkb_interest;
+ struct _XkbInterest *xkb_interest;
+#else
+ void *pad0;
#endif
- DevUnion *devPrivates;
+ char *config_info; /* used by the hotplug layer */
+ PrivateRec *devPrivates;
int nPrivates;
DeviceUnwrapProc unwrapProc;
} DeviceIntRec;
diff --git a/xserver/include/misc.h b/xserver/include/misc.h
index 2be1d66a6..a1cbe8670 100644
--- a/xserver/include/misc.h
+++ b/xserver/include/misc.h
@@ -87,10 +87,7 @@ extern unsigned long serverGeneration;
#define MAXSCREENS 16
#endif
#define MAXCLIENTS 256
-#define MAXDITS 1
-#define MAXEXTENSIONS 128
#define MAXFORMATS 8
-#define MAXVISUALS_PER_SCREEN 50
typedef unsigned long PIXEL;
typedef unsigned long ATOM;
@@ -239,7 +236,7 @@ extern int Ones(
unsigned long /*mask*/);
typedef struct _xPoint *DDXPointPtr;
-typedef struct _Box *BoxPtr;
+typedef struct pixman_box16 *BoxPtr;
typedef struct _xEvent *xEventPtr;
typedef struct _xRectangle *xRectanglePtr;
typedef struct _GrabRec *GrabPtr;
diff --git a/xserver/include/miscstruct.h b/xserver/include/miscstruct.h
index c39f03ce8..409b102c0 100644
--- a/xserver/include/miscstruct.h
+++ b/xserver/include/miscstruct.h
@@ -50,29 +50,17 @@ SOFTWARE.
#include "misc.h"
#include <X11/Xprotostr.h>
-#include "gc.h"
+#include <pixman.h>
typedef xPoint DDXPointRec;
-typedef struct _Box {
- short x1, y1, x2, y2;
-} BoxRec;
+typedef struct pixman_box16 BoxRec;
typedef union _DevUnion {
pointer ptr;
long val;
unsigned long uval;
- RegionPtr (*fptr)(
- DrawablePtr /* pSrcDrawable */,
- DrawablePtr /* pDstDrawable */,
- GCPtr /* pGC */,
- int /* srcx */,
- int /* srcy */,
- int /* width */,
- int /* height */,
- int /* dstx */,
- int /* dsty */,
- unsigned long /* bitPlane */);
+ pointer (*fptr)(void);
} DevUnion;
#endif /* MISCSTRUCT_H */
diff --git a/xserver/include/os.h b/xserver/include/os.h
index 60756641b..9cb266d3c 100644
--- a/xserver/include/os.h
+++ b/xserver/include/os.h
@@ -50,9 +50,6 @@ SOFTWARE.
#define OS_H
#include "misc.h"
-#define ALLOCATE_LOCAL_FALLBACK(_size) Xalloc((unsigned long)(_size))
-#define DEALLOCATE_LOCAL_FALLBACK(_ptr) Xfree((pointer)(_ptr))
-#include <X11/Xalloca.h>
#include <stdarg.h>
#define NullFID ((FID) 0)
@@ -124,6 +121,8 @@ extern void ResetOsBuffers(void);
extern void InitConnectionLimits(void);
+extern void NotifyParentProcess(void);
+
extern void CreateWellKnownSockets(void);
extern void ResetWellKnownSockets(void);
@@ -155,7 +154,7 @@ extern void AddEnabledDevice(int /*fd*/);
extern void RemoveEnabledDevice(int /*fd*/);
-extern void OnlyListenToOneClient(ClientPtr /*client*/);
+extern int OnlyListenToOneClient(ClientPtr /*client*/);
extern void ListenToAllClients(void);
@@ -326,6 +325,24 @@ extern int LocalClient(ClientPtr /* client */);
extern int LocalClientCred(ClientPtr, int *, int *);
+#define LCC_UID_SET (1 << 0)
+#define LCC_GID_SET (1 << 1)
+#define LCC_PID_SET (1 << 2)
+#define LCC_ZID_SET (1 << 3)
+
+typedef struct {
+ int fieldsSet; /* Bit mask of fields set */
+ int euid; /* Effective uid */
+ int egid; /* Primary effective group id */
+ int nSuppGids; /* Number of supplementary group ids */
+ int *pSuppGids; /* Array of supplementary group ids */
+ int pid; /* Process id */
+ int zoneid; /* Only set on Solaris 10 & later */
+} LocalClientCredRec;
+
+extern int GetLocalClientCreds(ClientPtr, LocalClientCredRec **);
+extern void FreeLocalClientCreds(LocalClientCredRec *);
+
extern int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/);
extern int GetAccessControl(void);
@@ -502,7 +519,7 @@ __attribute((noreturn))
#ifdef DEBUG
#define DebugF ErrorF
#else
-#define DebugF(x, ...) /* */
+#define DebugF(...) /* */
#endif
extern void VErrorF(const char *f, va_list args);
diff --git a/xserver/include/pixmapstr.h b/xserver/include/pixmapstr.h
index 628465b97..cc5a8d8de 100644
--- a/xserver/include/pixmapstr.h
+++ b/xserver/include/pixmapstr.h
@@ -44,31 +44,20 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86$ */
#ifndef PIXMAPSTRUCT_H
#define PIXMAPSTRUCT_H
-#include <X11/Xarch.h>
#include "pixmap.h"
#include "screenint.h"
#include "regionstr.h"
-
-/*
- * The padN members are unfortunate ABI BC. See fdo bug #6924.
- */
+#include "privates.h"
typedef struct _Drawable {
unsigned char type; /* DRAWABLE_<type> */
unsigned char class; /* specific to type */
unsigned char depth;
unsigned char bitsPerPixel;
-#if defined(_XSERVER64)
- XID pad0;
-#endif
XID id; /* resource id */
-#if defined(_XSERVER64)
- XID pad1;
-#endif
short x; /* window: screen absolute, pixmap: 0 */
short y; /* window: screen absolute, pixmap: 0 */
unsigned short width;
@@ -83,16 +72,15 @@ typedef struct _Drawable {
typedef struct _Pixmap {
DrawableRec drawable;
+ PrivateRec *devPrivates;
int refcnt;
int devKind;
DevUnion devPrivate;
-#ifdef PIXPRIV
- DevUnion *devPrivates; /* real devPrivates like gcs & windows */
-#endif
#ifdef COMPOSITE
short screen_x;
short screen_y;
#endif
+ unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */
} PixmapRec;
#endif /* PIXMAPSTRUCT_H */
diff --git a/xserver/include/privates.h b/xserver/include/privates.h
new file mode 100644
index 000000000..98d893c77
--- /dev/null
+++ b/xserver/include/privates.h
@@ -0,0 +1,112 @@
+/***********************************************************
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#ifndef PRIVATES_H
+#define PRIVATES_H 1
+
+#include "dix.h"
+#include "resource.h"
+
+/*****************************************************************
+ * STUFF FOR PRIVATES
+ *****************************************************************/
+
+typedef void *DevPrivateKey;
+struct _Private;
+typedef struct _Private PrivateRec;
+
+/*
+ * Request pre-allocated private space for your driver/module.
+ * Calling this is not necessary if only a pointer by itself is needed.
+ */
+extern int
+dixRequestPrivate(const DevPrivateKey key, unsigned size);
+
+/*
+ * Allocates a new private and attaches it to an existing object.
+ */
+extern pointer *
+dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key);
+
+/*
+ * Look up a private pointer.
+ */
+pointer
+dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key);
+
+/*
+ * Look up the address of a private pointer.
+ */
+pointer *
+dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key);
+
+/*
+ * Set a private pointer.
+ */
+int
+dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val);
+
+/*
+ * Register callbacks to be called on private allocation/freeing.
+ * The calldata argument to the callbacks is a PrivateCallbackPtr.
+ */
+typedef struct _PrivateCallback {
+ DevPrivateKey key; /* private registration key */
+ pointer *value; /* address of private pointer */
+} PrivateCallbackRec;
+
+extern int
+dixRegisterPrivateInitFunc(const DevPrivateKey key,
+ CallbackProcPtr callback, pointer userdata);
+
+extern int
+dixRegisterPrivateDeleteFunc(const DevPrivateKey key,
+ CallbackProcPtr callback, pointer userdata);
+
+/*
+ * Frees private data.
+ */
+extern void
+dixFreePrivates(PrivateRec *privates);
+
+/*
+ * Resets the subsystem, called from the main loop.
+ */
+extern int
+dixResetPrivates(void);
+
+/*
+ * These next two functions are necessary because the position of
+ * the devPrivates field varies by structure and calling code might
+ * only know the resource type, not the structure definition.
+ */
+
+/*
+ * Looks up the offset where the devPrivates field is located.
+ * Returns -1 if no offset has been registered for the resource type.
+ */
+extern int
+dixLookupPrivateOffset(RESTYPE type);
+
+/*
+ * Specifies the offset where the devPrivates field is located.
+ * A negative value indicates no devPrivates field is available.
+ */
+extern int
+dixRegisterPrivateOffset(RESTYPE type, int offset);
+
+/*
+ * Convenience macro for adding an offset to an object pointer
+ * when making a call to one of the devPrivates functions
+ */
+#define DEVPRIV_AT(ptr, offset) ((PrivateRec **)((char *)ptr + offset))
+
+#endif /* PRIVATES_H */
diff --git a/xserver/include/property.h b/xserver/include/property.h
index 8b6dc0912..1207e8191 100644
--- a/xserver/include/property.h
+++ b/xserver/include/property.h
@@ -52,6 +52,24 @@ SOFTWARE.
typedef struct _Property *PropertyPtr;
+extern int dixLookupProperty(
+ PropertyPtr * /*result*/,
+ WindowPtr /*pWin*/,
+ Atom /*proprty*/,
+ ClientPtr /*pClient*/,
+ Mask /*access_mode*/);
+
+extern int dixChangeWindowProperty(
+ ClientPtr /*pClient*/,
+ WindowPtr /*pWin*/,
+ Atom /*property*/,
+ Atom /*type*/,
+ int /*format*/,
+ int /*mode*/,
+ unsigned long /*len*/,
+ pointer /*value*/,
+ Bool /*sendevent*/);
+
extern int ChangeWindowProperty(
WindowPtr /*pWin*/,
Atom /*property*/,
@@ -63,6 +81,7 @@ extern int ChangeWindowProperty(
Bool /*sendevent*/);
extern int DeleteProperty(
+ ClientPtr /*client*/,
WindowPtr /*pWin*/,
Atom /*propName*/);
diff --git a/xserver/include/propertyst.h b/xserver/include/propertyst.h
index 6add81d9a..fd1148eb7 100644
--- a/xserver/include/propertyst.h
+++ b/xserver/include/propertyst.h
@@ -49,6 +49,7 @@ SOFTWARE.
#define PROPERTYSTRUCT_H
#include "misc.h"
#include "property.h"
+#include "privates.h"
/*
* PROPERTY -- property element
*/
@@ -60,6 +61,7 @@ typedef struct _Property {
short format; /* format of data for swapping - 8,16,32 */
long size; /* size of data in (format/8) bytes */
pointer data; /* private to client */
+ PrivateRec *devPrivates;
} PropertyRec;
#endif /* PROPERTYSTRUCT_H */
diff --git a/xserver/include/registry.h b/xserver/include/registry.h
new file mode 100644
index 000000000..29e5fdfd3
--- /dev/null
+++ b/xserver/include/registry.h
@@ -0,0 +1,64 @@
+/***********************************************************
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIX_REGISTRY_H
+#define DIX_REGISTRY_H
+
+/*
+ * Result returned from any unsuccessful lookup
+ */
+#define XREGISTRY_UNKNOWN "<unknown>"
+
+#ifdef XREGISTRY
+
+#include "resource.h"
+#include "extnsionst.h"
+
+/* Internal string registry - for auditing, debugging, security, etc. */
+
+/*
+ * Registration functions. The name string is not copied, so it must
+ * not be a stack variable.
+ */
+void RegisterResourceName(RESTYPE type, char *name);
+void RegisterExtensionNames(ExtensionEntry *ext);
+
+/*
+ * Lookup functions. The returned string must not be modified or freed.
+ */
+const char *LookupMajorName(int major);
+const char *LookupRequestName(int major, int minor);
+const char *LookupEventName(int event);
+const char *LookupErrorName(int error);
+const char *LookupResourceName(RESTYPE rtype);
+
+/*
+ * Setup and teardown
+ */
+void dixResetRegistry(void);
+
+#else /* XREGISTRY */
+
+/* Define calls away when the registry is not being built. */
+
+#define RegisterResourceName(a, b) { ; }
+#define RegisterExtensionNames(a) { ; }
+
+#define LookupMajorName(a) XREGISTRY_UNKNOWN
+#define LookupRequestName(a, b) XREGISTRY_UNKNOWN
+#define LookupEventName(a) XREGISTRY_UNKNOWN
+#define LookupErrorName(a) XREGISTRY_UNKNOWN
+#define LookupResourceName(a) XREGISTRY_UNKNOWN
+
+#define dixResetRegistry() { ; }
+
+#endif /* XREGISTRY */
+#endif /* DIX_REGISTRY_H */
diff --git a/xserver/include/resource.h b/xserver/include/resource.h
index fd0caaeb5..b8105d45a 100644
--- a/xserver/include/resource.h
+++ b/xserver/include/resource.h
@@ -48,6 +48,7 @@ SOFTWARE.
#ifndef RESOURCE_H
#define RESOURCE_H 1
#include "misc.h"
+#include "dixaccess.h"
/*****************************************************************
* STUFF FOR RESOURCES
@@ -71,9 +72,9 @@ typedef unsigned long RESTYPE;
/* types for Resource routines */
-#define RT_WINDOW ((RESTYPE)1|RC_CACHED|RC_DRAWABLE)
-#define RT_PIXMAP ((RESTYPE)2|RC_CACHED|RC_DRAWABLE)
-#define RT_GC ((RESTYPE)3|RC_CACHED)
+#define RT_WINDOW ((RESTYPE)1|RC_DRAWABLE)
+#define RT_PIXMAP ((RESTYPE)2|RC_DRAWABLE)
+#define RT_GC ((RESTYPE)3)
#undef RT_FONT
#undef RT_CURSOR
#define RT_FONT ((RESTYPE)4)
@@ -120,6 +121,19 @@ typedef unsigned long RESTYPE;
#define BAD_RESOURCE 0xe0000000
+/* Resource state callback */
+extern CallbackListPtr ResourceStateCallback;
+
+typedef enum {ResourceStateAdding,
+ ResourceStateFreeing} ResourceState;
+
+typedef struct {
+ ResourceState state;
+ XID id;
+ RESTYPE type;
+ pointer value;
+} ResourceStateInfoRec;
+
typedef int (*DeleteType)(
pointer /*value*/,
XID /*id*/);
@@ -153,7 +167,7 @@ extern XID FakeClientID(
/* Quartz support on Mac OS X uses the CarbonCore
framework whose AddResource function conflicts here. */
-#ifdef __DARWIN__
+#ifdef __APPLE__
#define AddResource Darwin_X_AddResource
#endif
extern Bool AddResource(
@@ -198,45 +212,18 @@ extern Bool LegalNewID(
XID /*id*/,
ClientPtr /*client*/);
-extern pointer LookupIDByType(
- XID /*id*/,
- RESTYPE /*rtype*/);
-
-extern pointer LookupIDByClass(
- XID /*id*/,
- RESTYPE /*classes*/);
-
extern pointer LookupClientResourceComplex(
ClientPtr client,
RESTYPE type,
FindComplexResType func,
pointer cdata);
-/* These are the access modes that can be passed in the last parameter
- * to SecurityLookupIDByType/Class. The Security extension doesn't
- * currently make much use of these; they're mainly provided as an
- * example of what you might need for discretionary access control.
- * You can or these values together to indicate multiple modes
- * simultaneously.
- */
-
-#define SecurityUnknownAccess 0 /* don't know intentions */
-#define SecurityReadAccess (1<<0) /* inspecting the object */
-#define SecurityWriteAccess (1<<1) /* changing the object */
-#define SecurityDestroyAccess (1<<2) /* destroying the object */
-
-extern pointer SecurityLookupIDByType(
- ClientPtr /*client*/,
- XID /*id*/,
- RESTYPE /*rtype*/,
- Mask /*access_mode*/);
-
-extern pointer SecurityLookupIDByClass(
- ClientPtr /*client*/,
- XID /*id*/,
- RESTYPE /*classes*/,
- Mask /*access_mode*/);
-
+extern int dixLookupResource(
+ pointer *result,
+ XID id,
+ RESTYPE rtype,
+ ClientPtr client,
+ Mask access_mode);
extern void GetXIDRange(
int /*client*/,
@@ -252,10 +239,34 @@ extern unsigned int GetXIDList(
extern RESTYPE lastResourceType;
extern RESTYPE TypeMask;
-#ifdef XResExtension
-extern Atom *ResourceNames;
-void RegisterResourceName(RESTYPE type, char* name);
-#endif
+/*
+ * These are deprecated compatibility functions and will be removed soon!
+ * Please use the noted replacements instead.
+ */
+
+/* replaced by dixLookupResource */
+extern pointer SecurityLookupIDByType(
+ ClientPtr client,
+ XID id,
+ RESTYPE rtype,
+ Mask access_mode);
+
+/* replaced by dixLookupResource */
+extern pointer SecurityLookupIDByClass(
+ ClientPtr client,
+ XID id,
+ RESTYPE classes,
+ Mask access_mode);
+
+/* replaced by dixLookupResource */
+extern pointer LookupIDByType(
+ XID id,
+ RESTYPE rtype);
+
+/* replaced by dixLookupResource */
+extern pointer LookupIDByClass(
+ XID id,
+ RESTYPE classes);
#endif /* RESOURCE_H */
diff --git a/xserver/include/screenint.h b/xserver/include/screenint.h
index e60c2480c..6d074a375 100644
--- a/xserver/include/screenint.h
+++ b/xserver/include/screenint.h
@@ -55,28 +55,6 @@ typedef struct _Visual *VisualPtr;
typedef struct _Depth *DepthPtr;
typedef struct _Screen *ScreenPtr;
-extern void ResetScreenPrivates(void);
-
-extern int AllocateScreenPrivateIndex(void);
-
-extern void ResetWindowPrivates(void);
-
-extern int AllocateWindowPrivateIndex(void);
-
-extern Bool AllocateWindowPrivate(
- ScreenPtr /* pScreen */,
- int /* index */,
- unsigned /* amount */);
-
-extern void ResetGCPrivates(void);
-
-extern int AllocateGCPrivateIndex(void);
-
-extern Bool AllocateGCPrivate(
- ScreenPtr /* pScreen */,
- int /* index */,
- unsigned /* amount */);
-
extern int AddScreen(
Bool (* /*pfnInit*/)(
int /*index*/,
@@ -86,26 +64,6 @@ extern int AddScreen(
int /*argc*/,
char** /*argv*/);
-#ifdef PIXPRIV
-
-extern void ResetPixmapPrivates(void);
-
-extern int AllocatePixmapPrivateIndex(void);
-
-extern Bool AllocatePixmapPrivate(
- ScreenPtr /* pScreen */,
- int /* index */,
- unsigned /* amount */);
-
-#endif /* PIXPRIV */
-
-extern void ResetColormapPrivates(void);
-
-
typedef struct _ColormapRec *ColormapPtr;
-typedef int (*InitCmapPrivFunc)(ColormapPtr, int);
-
-extern int AllocateColormapPrivateIndex(
- InitCmapPrivFunc /* initPrivFunc */);
#endif /* SCREENINT_H */
diff --git a/xserver/include/scrnintstr.h b/xserver/include/scrnintstr.h
index 36135153f..3b2cf9f81 100644
--- a/xserver/include/scrnintstr.h
+++ b/xserver/include/scrnintstr.h
@@ -56,6 +56,7 @@ SOFTWARE.
#include "validate.h"
#include <X11/Xproto.h>
#include "dix.h"
+#include "privates.h"
typedef struct _PixmapFormat {
unsigned char depth;
@@ -197,11 +198,19 @@ typedef void (* ClipNotifyProcPtr)(
int /*dx*/,
int /*dy*/);
+/* pixmap will exist only for the duration of the current rendering operation */
+#define CREATE_PIXMAP_USAGE_SCRATCH 1
+/* pixmap will be the backing pixmap for a redirected window */
+#define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2
+/* pixmap will contain a glyph */
+#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3
+
typedef PixmapPtr (* CreatePixmapProcPtr)(
ScreenPtr /*pScreen*/,
int /*width*/,
int /*height*/,
- int /*depth*/);
+ int /*depth*/,
+ unsigned /*usage_hint*/);
typedef Bool (* DestroyPixmapProcPtr)(
PixmapPtr /*pPixmap*/);
@@ -449,12 +458,6 @@ typedef struct _Screen {
pointer devPrivate;
short numVisuals;
VisualPtr visuals;
- int WindowPrivateLen;
- unsigned *WindowPrivateSizes;
- unsigned totalWindowSize;
- int GCPrivateLen;
- unsigned *GCPrivateSizes;
- unsigned totalGCSize;
/* Random screen procedures */
@@ -477,8 +480,8 @@ typedef struct _Screen {
ValidateTreeProcPtr ValidateTree;
PostValidateTreeProcPtr PostValidateTree;
WindowExposuresProcPtr WindowExposures;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
+ PaintWindowBackgroundProcPtr PaintWindowBackground; /** unused */
+ PaintWindowBorderProcPtr PaintWindowBorder; /** unused */
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
ClipNotifyProcPtr ClipNotify;
@@ -546,7 +549,7 @@ typedef struct _Screen {
pointer wakeupData;
/* anybody can get a piece of this array */
- DevUnion *devPrivates;
+ PrivateRec *devPrivates;
CreateScreenResourcesProcPtr CreateScreenResources;
ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
@@ -558,11 +561,7 @@ typedef struct _Screen {
PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */
-#ifdef PIXPRIV
- int PixmapPrivateLen;
- unsigned int *PixmapPrivateSizes;
unsigned int totalPixmapSize;
-#endif
MarkWindowProcPtr MarkWindow;
MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
diff --git a/xserver/include/selection.h b/xserver/include/selection.h
index fbe7cfca6..dd9b056fe 100644
--- a/xserver/include/selection.h
+++ b/xserver/include/selection.h
@@ -1,7 +1,3 @@
-
-#ifndef SELECTION_H
-#define SELECTION_H 1
-
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -49,9 +45,13 @@ SOFTWARE.
******************************************************************/
+#ifndef SELECTION_H
+#define SELECTION_H 1
+
#include "dixstruct.h"
+#include "privates.h"
+
/*
- *
* Selection data structures
*/
@@ -61,8 +61,45 @@ typedef struct _Selection {
Window window;
WindowPtr pWin;
ClientPtr client;
+ struct _Selection *next;
+ PrivateRec *devPrivates;
} Selection;
+
+/*
+ * Selection API
+ */
+
+int dixLookupSelection(Selection **result, Atom name,
+ ClientPtr client, Mask access_mode);
+
+extern Selection *CurrentSelections;
+
+extern CallbackListPtr SelectionCallback;
+
+typedef enum {
+ SelectionSetOwner,
+ SelectionWindowDestroy,
+ SelectionClientClose
+} SelectionCallbackKind;
+
+typedef struct {
+ struct _Selection *selection;
+ ClientPtr client;
+ SelectionCallbackKind kind;
+} SelectionInfoRec;
+
+
+/*
+ * Selection server internals
+ */
+
+void InitSelections(void);
+
+void DeleteWindowFromAnySelections(WindowPtr pWin);
+
+void DeleteClientFromAnySelections(ClientPtr client);
+
#endif /* SELECTION_H */
diff --git a/xserver/include/servermd.h b/xserver/include/servermd.h
index 71ad6c5c2..17baef74e 100644
--- a/xserver/include/servermd.h
+++ b/xserver/include/servermd.h
@@ -269,7 +269,7 @@ SOFTWARE.
#if defined(ibm032) || defined (ibm)
-#ifdef i386
+#ifdef __i386__
# define IMAGE_BYTE_ORDER LSBFirst /* Value for PS/2 only */
#else
# define IMAGE_BYTE_ORDER MSBFirst /* Values for the RT only*/
@@ -279,7 +279,7 @@ SOFTWARE.
#define GETLEFTBITS_ALIGNMENT 4
/* ibm pcc doesn't understand pragmas. */
-#ifdef i386
+#ifdef __i386__
#define BITMAP_SCANLINE_UNIT 8
#endif
@@ -402,7 +402,7 @@ SOFTWARE.
#endif /* ia64 */
-#if defined(__amd64__) || defined(amd64) || defined(__amd64)
+#if defined(__amd64__) || defined(amd64) || defined(__amd64) || defined(__x86_64__)
# define IMAGE_BYTE_ORDER LSBFirst
# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
@@ -453,10 +453,9 @@ SOFTWARE.
#endif /* luna */
-#if (defined(SVR4) && defined(i386)) || \
+#if (defined(SVR4) && (defined(__i386__) || (defined(__i386)))) || \
defined(__alpha__) || defined(__alpha) || \
- defined(__i386__) || defined(__i386) || \
- defined(__QNX__) || \
+ defined(__i386__) || defined(__QNX__) || \
defined(__s390x__) || defined(__s390__)
#ifndef IMAGE_BYTE_ORDER
diff --git a/xserver/include/site.h b/xserver/include/site.h
index 5b9f25815..fec87070b 100644
--- a/xserver/include/site.h
+++ b/xserver/include/site.h
@@ -52,7 +52,7 @@ SOFTWARE.
* server executable.
*/
#ifndef VENDOR_STRING
-#define VENDOR_STRING "The X.Org Group"
+#define VENDOR_STRING "The X.Org Foundation"
#endif
/*
@@ -75,9 +75,6 @@ SOFTWARE.
#ifndef COMPILEDDEFAULTFONTPATH
#define COMPILEDDEFAULTFONTPATH "/usr/lib/X11/fonts/misc/"
#endif
-#ifndef RGB_DB
-#define RGB_DB "/usr/lib/X11/rgb"
-#endif
/*
* The following constants contain default values for all of the variables
diff --git a/xserver/include/swapreq.h b/xserver/include/swapreq.h
index 9c785fe62..83e524bab 100644
--- a/xserver/include/swapreq.h
+++ b/xserver/include/swapreq.h
@@ -26,17 +26,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SWAPREQ_H
#define SWAPREQ_H 1
-/* The first two are in misc.h */
-#if 0
-extern void SwapLongs (
- CARD32 * /* list */,
- unsigned long /* count */);
-
-extern void SwapShorts (
- short * /* list */,
- unsigned long /* count */);
-#endif
-
extern void SwapColorItem(
xColorItem * /* pItem */);
diff --git a/xserver/include/window.h b/xserver/include/window.h
index bddeb252b..52b3982e3 100644
--- a/xserver/include/window.h
+++ b/xserver/include/window.h
@@ -44,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86$ */
#ifndef WINDOW_H
#define WINDOW_H
@@ -84,23 +83,12 @@ extern int WalkTree(
VisitWindowProcPtr /*func*/,
pointer /*data*/);
-extern WindowPtr AllocateWindow(
- ScreenPtr /*pScreen*/);
-
extern Bool CreateRootWindow(
ScreenPtr /*pScreen*/);
extern void InitRootWindow(
WindowPtr /*pWin*/);
-extern void ClippedRegionFromBox(
- WindowPtr /*pWin*/,
- RegionPtr /*Rgn*/,
- int /*x*/,
- int /*y*/,
- int /*w*/,
- int /*h*/);
-
typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
void RegisterRealChildHeadProc (RealChildHeadProc proc);
@@ -128,13 +116,13 @@ extern int DeleteWindow(
pointer /*pWin*/,
XID /*wid*/);
-extern void DestroySubwindows(
+extern int DestroySubwindows(
WindowPtr /*pWin*/,
ClientPtr /*client*/);
/* Quartz support on Mac OS X uses the HIToolbox
framework whose ChangeWindowAttributes function conflicts here. */
-#ifdef __DARWIN__
+#ifdef __APPLE__
#define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
#endif
extern int ChangeWindowAttributes(
@@ -145,7 +133,7 @@ extern int ChangeWindowAttributes(
/* Quartz support on Mac OS X uses the HIToolbox
framework whose GetWindowAttributes function conflicts here. */
-#ifdef __DARWIN__
+#ifdef __APPLE__
#define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
extern void Darwin_X_GetWindowAttributes(
#else
@@ -205,12 +193,6 @@ extern void UnmapSubwindows(
extern void HandleSaveSet(
ClientPtr /*client*/);
-extern Bool VisibleBoundingBoxFromPoint(
- WindowPtr /*pWin*/,
- int /*x*/,
- int /*y*/,
- BoxPtr /*box*/);
-
extern Bool PointInWindowIsVisible(
WindowPtr /*pWin*/,
int /*x*/,
@@ -222,9 +204,14 @@ extern RegionPtr NotClippedByChildren(
extern void SendVisibilityNotify(
WindowPtr /*pWin*/);
-extern void SaveScreens(
- int /*on*/,
- int /*mode*/);
+extern int dixSaveScreens(
+ ClientPtr client,
+ int on,
+ int mode);
+
+extern int SaveScreens(
+ int on,
+ int mode);
extern WindowPtr FindWindowWithOptional(
WindowPtr /*w*/);
@@ -235,9 +222,6 @@ extern void CheckWindowOptionalNeed(
extern Bool MakeWindowOptional(
WindowPtr /*pWin*/);
-extern void DisposeWindowOptional(
- WindowPtr /*pWin*/);
-
extern WindowPtr MoveWindowInStack(
WindowPtr /*pWin*/,
WindowPtr /*pNextSib*/);
@@ -271,7 +255,5 @@ extern void DisableMapUnmapEvents(
WindowPtr /* pWin */ );
extern void EnableMapUnmapEvents(
WindowPtr /* pWin */ );
-extern Bool MapUnmapEventsEnabled(
- WindowPtr /* pWin */ );
#endif /* WINDOW_H */
diff --git a/xserver/include/windowstr.h b/xserver/include/windowstr.h
index a37dc6b75..e06a2f1bd 100644
--- a/xserver/include/windowstr.h
+++ b/xserver/include/windowstr.h
@@ -55,6 +55,7 @@ SOFTWARE.
#include "property.h"
#include "resource.h" /* for ROOT_WINDOW_ID_BASE */
#include "dix.h"
+#include "privates.h"
#include "miscstruct.h"
#include <X11/Xprotostr.h>
#include "opaque.h"
@@ -94,8 +95,36 @@ typedef struct _WindowOpt {
#define BackgroundPixel 2L
#define BackgroundPixmap 3L
+/*
+ * The redirectDraw field can have one of three values:
+ *
+ * RedirectDrawNone
+ * A normal window; painted into the same pixmap as the parent
+ * and clipping parent and siblings to its geometry. These
+ * windows get a clip list equal to the intersection of their
+ * geometry with the parent geometry, minus the geometry
+ * of overlapping None and Clipped siblings.
+ * RedirectDrawAutomatic
+ * A redirected window which clips parent and sibling drawing.
+ * Contents for these windows are manage inside the server.
+ * These windows get an internal clip list equal to their
+ * geometry.
+ * RedirectDrawManual
+ * A redirected window which does not clip parent and sibling
+ * drawing; the window must be represented within the parent
+ * geometry by the client performing the redirection management.
+ * Contents for these windows are managed outside the server.
+ * These windows get an internal clip list equal to their
+ * geometry.
+ */
+
+#define RedirectDrawNone 0
+#define RedirectDrawAutomatic 1
+#define RedirectDrawManual 2
+
typedef struct _Window {
DrawableRec drawable;
+ PrivateRec *devPrivates;
WindowPtr parent; /* ancestor chain */
WindowPtr nextSib; /* next lower sibling */
WindowPtr prevSib; /* next higher sibling */
@@ -129,16 +158,8 @@ typedef struct _Window {
unsigned viewable:1; /* realized && InputOutput */
unsigned dontPropagate:3;/* index into DontPropagateMasks */
unsigned forcedBS:1; /* system-supplied backingStore */
-#ifdef NEED_DBE_BUF_BITS
-#define DBE_FRONT_BUFFER 1
-#define DBE_BACK_BUFFER 0
- unsigned dstBuffer:1; /* destination buffer for rendering */
- unsigned srcBuffer:1; /* source buffer for rendering */
-#endif
-#ifdef COMPOSITE
- unsigned redirectDraw:1; /* rendering is redirected from here */
-#endif
- DevUnion *devPrivates;
+ unsigned redirectDraw:2; /* COMPOSITE rendering redirect */
+ unsigned forcedBG:1; /* must have an opaque background */
} WindowRec;
/*
diff --git a/xserver/include/xkbfile.h b/xserver/include/xkbfile.h
new file mode 100644
index 000000000..0a6cb18b9
--- /dev/null
+++ b/xserver/include/xkbfile.h
@@ -0,0 +1,436 @@
+/************************************************************
+ Copyright (c) 1994 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 _XKBFILE_H_
+#define _XKBFILE_H_ 1
+
+/***====================================================================***/
+
+#define XkbXKMFile 0
+#define XkbCFile 1
+#define XkbXKBFile 2
+#define XkbMessage 3
+
+#define XkbMapDefined (1<<0)
+#define XkbStateDefined (1<<1)
+
+typedef void (*XkbFileAddOnFunc)(
+ FILE * /* file */,
+ XkbDescPtr /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ int /* fileSection */,
+ void * /* priv */
+);
+
+/***====================================================================***/
+
+#define _XkbSuccess 0
+#define _XkbErrMissingNames 1
+#define _XkbErrMissingTypes 2
+#define _XkbErrMissingReqTypes 3
+#define _XkbErrMissingSymbols 4
+#define _XkbErrMissingVMods 5
+#define _XkbErrMissingIndicators 6
+#define _XkbErrMissingCompatMap 7
+#define _XkbErrMissingSymInterps 8
+#define _XkbErrMissingGeometry 9
+#define _XkbErrIllegalDoodad 10
+#define _XkbErrIllegalTOCType 11
+#define _XkbErrIllegalContents 12
+#define _XkbErrEmptyFile 13
+#define _XkbErrFileNotFound 14
+#define _XkbErrFileCannotOpen 15
+#define _XkbErrBadValue 16
+#define _XkbErrBadMatch 17
+#define _XkbErrBadTypeName 18
+#define _XkbErrBadTypeWidth 19
+#define _XkbErrBadFileType 20
+#define _XkbErrBadFileVersion 21
+#define _XkbErrBadFileFormat 22
+#define _XkbErrBadAlloc 23
+#define _XkbErrBadLength 24
+#define _XkbErrXReqFailure 25
+#define _XkbErrBadImplementation 26
+
+extern char * _XkbErrMessages[];
+extern unsigned _XkbErrCode;
+extern char * _XkbErrLocation;
+extern unsigned _XkbErrData;
+
+/***====================================================================***/
+
+_XFUNCPROTOBEGIN
+
+extern char * XkbIndentText(
+ unsigned /* size */
+);
+
+extern char * XkbAtomText(
+ Atom /* atm */,
+ unsigned /* format */
+);
+
+extern char * XkbKeysymText(
+ KeySym /* sym */,
+ unsigned /* format */
+);
+
+extern char * XkbStringText(
+ char * /* str */,
+ unsigned /* format */
+);
+
+extern char * XkbKeyNameText(
+ char * /* name */,
+ unsigned /* format */
+);
+
+extern char *
+XkbModIndexText(
+ unsigned /* ndx */,
+ unsigned /* format */
+);
+
+extern char *
+XkbModMaskText(
+ unsigned /* mask */,
+ unsigned /* format */
+);
+
+extern char * XkbVModIndexText(
+ XkbDescPtr /* xkb */,
+ unsigned /* ndx */,
+ unsigned /* format */
+);
+
+extern char * XkbVModMaskText(
+ XkbDescPtr /* xkb */,
+ unsigned /* modMask */,
+ unsigned /* mask */,
+ unsigned /* format */
+);
+
+extern char * XkbConfigText(
+ unsigned /* config */,
+ unsigned /* format */
+);
+
+extern char * XkbSIMatchText(
+ unsigned /* type */,
+ unsigned /* format */
+);
+
+extern char * XkbIMWhichStateMaskText(
+ unsigned /* use_which */,
+ unsigned /* format */
+);
+
+extern char * XkbAccessXDetailText(
+ unsigned /* state */,
+ unsigned /* format */
+);
+
+extern char * XkbNKNDetailMaskText(
+ unsigned /* detail */,
+ unsigned /* format */
+);
+
+extern char * XkbControlsMaskText(
+ unsigned /* ctrls */,
+ unsigned /* format */
+);
+
+extern char * XkbGeomFPText(
+ int /* val */,
+ unsigned /* format */
+);
+
+extern char * XkbDoodadTypeText(
+ unsigned /* type */,
+ unsigned /* format */
+);
+
+extern char * XkbActionTypeText(
+ unsigned /* type */,
+ unsigned /* format */
+);
+
+extern char * XkbActionText(
+ XkbDescPtr /* xkb */,
+ XkbAction * /* action */,
+ unsigned /* format */
+);
+
+extern char * XkbBehaviorText(
+ XkbDescPtr /* xkb */,
+ XkbBehavior * /* behavior */,
+ unsigned /* format */
+);
+
+/***====================================================================***/
+
+#define _XkbKSLower (1<<0)
+#define _XkbKSUpper (1<<1)
+
+#define XkbKSIsLower(k) (_XkbKSCheckCase(k)&_XkbKSLower)
+#define XkbKSIsUpper(k) (_XkbKSCheckCase(k)&_XkbKSUpper)
+#define XkbKSIsKeypad(k) (((k)>=XK_KP_Space)&&((k)<=XK_KP_Equal))
+#define XkbKSIsDeadKey(k) \
+ (((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound))
+
+extern unsigned _XkbKSCheckCase(
+ KeySym /* sym */
+);
+
+extern int XkbFindKeycodeByName(
+ XkbDescPtr /* xkb */,
+ char * /* name */,
+ Bool /* use_aliases */
+);
+
+extern Bool XkbLookupGroupAndLevel(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int * /* mods_inout */,
+ int * /* grp_inout */,
+ int * /* lvl_rtrn */
+);
+
+/***====================================================================***/
+
+extern Atom XkbInternAtom(
+ char * /* name */,
+ Bool /* onlyIfExists */
+);
+
+extern void XkbInitAtoms(void);
+
+/***====================================================================***/
+
+#ifdef _XKBGEOM_H_
+
+#define XkbDW_Unknown 0
+#define XkbDW_Doodad 1
+#define XkbDW_Section 2
+typedef struct _XkbDrawable {
+ int type;
+ int priority;
+ union {
+ XkbDoodadPtr doodad;
+ XkbSectionPtr section;
+ } u;
+ struct _XkbDrawable * next;
+} XkbDrawableRec,*XkbDrawablePtr;
+
+extern XkbDrawablePtr
+XkbGetOrderedDrawables(
+ XkbGeometryPtr /* geom */,
+ XkbSectionPtr /* section */
+);
+
+extern void
+XkbFreeOrderedDrawables(
+ XkbDrawablePtr /* draw */
+);
+
+#endif
+
+/***====================================================================***/
+
+extern unsigned XkbConvertGetByNameComponents(
+ Bool /* toXkm */,
+ unsigned /* orig */
+);
+
+extern unsigned XkbConvertXkbComponents(
+ Bool /* toXkm */,
+ unsigned /* orig */
+);
+
+extern Bool XkbNameMatchesPattern(
+ char * /* name */,
+ char * /* pattern */
+);
+
+/***====================================================================***/
+
+extern Bool XkbWriteXKBKeycodes(
+ FILE * /* file */,
+ XkbDescPtr /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBKeyTypes(
+ FILE * /* file */,
+ XkbDescPtr /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBCompatMap(
+ FILE * /* file */,
+ XkbDescPtr /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBSymbols(
+ FILE * /* file */,
+ XkbDescPtr /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBGeometry(
+ FILE * /* file */,
+ XkbDescPtr /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBSemantics(
+ FILE * /* file */,
+ XkbDescPtr /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBLayout(
+ FILE * /* file */,
+ XkbDescPtr /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBKeymap(
+ FILE * /* file */,
+ XkbDescPtr /* result */,
+ Bool /* topLevel */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteXKBFile(
+ FILE * /* file */,
+ XkbDescPtr /* result */,
+ Bool /* showImplicit */,
+ XkbFileAddOnFunc /* addOn */,
+ void * /* priv */
+);
+
+extern Bool XkbWriteCFile(
+ FILE * /* file */,
+ char * /* name */,
+ XkbDescPtr /* info */
+);
+
+extern Bool XkbWriteXKMFile(
+ FILE * /* file */,
+ XkbDescPtr /* result */
+);
+
+extern Bool XkbWriteToServer(
+ XkbDescPtr /* result */
+);
+
+extern void XkbEnsureSafeMapName(
+ char * /* name */
+);
+
+extern Bool XkbWriteXKBKeymapForNames(
+ FILE * /* file */,
+ XkbComponentNamesPtr /* names */,
+ XkbDescPtr /* xkb */,
+ unsigned /* want */,
+ unsigned /* need */
+);
+
+extern Status XkbMergeFile(
+ XkbDescPtr /* xkb */
+);
+
+/***====================================================================***/
+
+extern Bool XkmProbe(
+ FILE * /* file */
+);
+
+extern unsigned XkmReadFile(
+ FILE * /* file */,
+ unsigned /* need */,
+ unsigned /* want */,
+ XkbDescPtr * /* result */
+);
+
+#ifdef _XKMFORMAT_H_
+
+extern Bool XkmReadTOC(
+ FILE * /* file */,
+ xkmFileInfo * /* file_info */,
+ int /* max_toc */,
+ xkmSectionInfo * /* toc */
+);
+
+extern xkmSectionInfo *XkmFindTOCEntry(
+ xkmFileInfo * /* finfo */,
+ xkmSectionInfo * /* toc */,
+ unsigned /* type */
+);
+
+extern Bool XkmReadFileSection(
+ FILE * /* file */,
+ xkmSectionInfo * /* toc */,
+ XkbDescPtr /* result */,
+ unsigned * /* loaded_rtrn */
+);
+
+extern char * XkmReadFileSectionName(
+ FILE * /* file */,
+ xkmSectionInfo * /* toc */
+);
+
+#endif /* _XKMFORMAT_H */
+
+_XFUNCPROTOEND
+
+#endif /* _XKBFILE_H_ */
diff --git a/xserver/include/xkbsrv.h b/xserver/include/xkbsrv.h
index acf3bb0a3..040bb936a 100644
--- a/xserver/include/xkbsrv.h
+++ b/xserver/include/xkbsrv.h
@@ -27,7 +27,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef _XKBSRV_H_
#define _XKBSRV_H_
-#ifdef XKB_IN_SERVER
#define XkbAllocClientMap SrvXkbAllocClientMap
#define XkbAllocServerMap SrvXkbAllocServerMap
#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey
@@ -52,10 +51,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XkbVirtualModsToReal SrvXkbVirtualModsToReal
#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange
#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges
-#endif
-#include <X11/extensions/XKBstr.h>
#include <X11/extensions/XKBproto.h>
+#include "xkbstr.h"
#include "inputstr.h"
typedef struct _XkbInterest {
@@ -126,8 +124,6 @@ typedef struct _XkbEventCause {
#define _BEEP_LED_CHANGE 14
#define _BEEP_BOUNCE_REJECT 15
-struct _XkbSrvInfo; /* definition see below */
-
typedef struct _XkbFilter {
CARD16 keycode;
CARD8 what;
@@ -277,8 +273,8 @@ typedef struct
device->public.realInputProc = oldprocs->realInputProc; \
device->unwrapProc = oldprocs->unwrapProc;
-extern int xkbDevicePrivateIndex;
-#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr) (dev)->devPrivates[xkbDevicePrivateIndex].ptr)
+extern DevPrivateKey xkbDevicePrivateKey;
+#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey))
extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
@@ -296,6 +292,7 @@ extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
extern int XkbReqCode;
extern int XkbEventBase;
extern int XkbDisableLockActions;
+extern int XkbKeyboardErrorCode;
extern char * XkbBaseDirectory;
extern char * XkbBinDirectory;
extern char * XkbInitialMap;
@@ -317,8 +314,7 @@ extern CARD32 xkbDebugFlags;
#define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t))
#define _XkbFree(p) Xfree(p)
-#define _XkbLibError(c,l,d) \
- { _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); }
+#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)))
@@ -327,13 +323,8 @@ extern int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify;
extern int DeviceButtonPress,DeviceButtonRelease;
extern int DeviceEnterNotify,DeviceLeaveNotify;
-#ifdef XINPUT
#define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress))
#define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease))
-#else
-#define _XkbIsPressEvent(t) ((t)==KeyPress)
-#define _XkbIsReleaseEvent(t) ((t)==KeyRelease)
-#endif
#define _XkbCoreKeycodeInRange(c,k) (((k)>=(c)->curKeySyms.minKeyCode)&&\
((k)<=(c)->curKeySyms.maxKeyCode))
@@ -345,20 +336,10 @@ extern int DeviceEnterNotify,DeviceLeaveNotify;
#define IsKeypadKey(s) XkbKSIsKeypad(s)
#define Status int
-#define XPointer pointer
-#define Display struct _XDisplay
#ifndef True
-#define True 1
-#define False 0
-#endif
-
-#ifndef PATH_MAX
-#ifdef MAXPATHLEN
-#define PATH_MAX MAXPATHLEN
-#else
-#define PATH_MAX 1024
-#endif
+#define True TRUE
+#define False FALSE
#endif
_XFUNCPROTOBEGIN
@@ -387,29 +368,44 @@ extern void XkbFreeNames(
Bool /* freeMap */
);
-extern DeviceIntPtr _XkbLookupAnyDevice(
- int /* id */,
- int * /* why_rtrn */
+extern int _XkbLookupAnyDevice(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
);
-extern DeviceIntPtr _XkbLookupKeyboard(
- int /* id */,
- int * /* why_rtrn */
+extern int _XkbLookupKeyboard(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
);
-extern DeviceIntPtr _XkbLookupBellDevice(
- int /* id */,
- int * /* why_rtrn */
+extern int _XkbLookupBellDevice(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
);
-extern DeviceIntPtr _XkbLookupLedDevice(
- int /* id */,
- int * /* why_rtrn */
+extern int _XkbLookupLedDevice(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
);
-extern DeviceIntPtr _XkbLookupButtonDevice(
- int /* id */,
- int * /* why_rtrn */
+extern int _XkbLookupButtonDevice(
+ DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode,
+ int *xkb_err
);
extern XkbDescPtr XkbAllocKeyboard(
@@ -982,10 +978,8 @@ extern void XkbSendNewKeyboardNotify(
xkbNewKeyboardNotify * /* pNKN */
);
-#ifdef XKBSRV_NEED_FILE_FUNCS
-
+#include "xkbfile.h"
#include <X11/extensions/XKMformat.h>
-#include <X11/extensions/XKBfile.h>
#include <X11/extensions/XKBrules.h>
#define _XkbListKeymaps 0
@@ -1019,7 +1013,7 @@ extern unsigned int XkbDDXLoadKeymapByNames(
XkbComponentNamesPtr /* names */,
unsigned int /* want */,
unsigned int /* need */,
- XkbFileInfoPtr /* finfoRtrn */,
+ XkbDescPtr * /* finfoRtrn */,
char * /* keymapNameRtrn */,
int /* keymapNameRtrnLen */
);
@@ -1032,26 +1026,17 @@ extern Bool XkbDDXNamesFromRules(
);
extern Bool XkbDDXApplyConfig(
- XPointer /* cfg_in */,
+ void * /* cfg_in */,
XkbSrvInfoPtr /* xkbi */
);
-extern XPointer XkbDDXPreloadConfig(
- char ** /* rulesFileRtrn */,
- XkbRF_VarDefsPtr /* defs */,
- XkbComponentNamesPtr /* names */,
- DeviceIntPtr /* dev */
-);
-
extern int _XkbStrCaseCmp(
char * /* str1 */,
char * /* str2 */
);
-#endif /* XKBSRV_NEED_FILE_FUNCS */
-
_XFUNCPROTOEND
-#define XkbAtomGetString(d,s) NameForAtom(s)
+#define XkbAtomGetString(s) NameForAtom(s)
#endif /* _XKBSRV_H_ */
diff --git a/xserver/include/xkbstr.h b/xserver/include/xkbstr.h
new file mode 100644
index 000000000..214a5543c
--- /dev/null
+++ b/xserver/include/xkbstr.h
@@ -0,0 +1,613 @@
+/************************************************************
+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 _XKBSTR_H_
+#define _XKBSTR_H_
+
+#include <X11/extensions/XKB.h>
+
+#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f))
+#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
+
+#if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
+#define Xkb2CharsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)):\
+ (int)(((h)<<8)|(l)&0x7fff))
+#else
+#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
+#endif
+
+ /*
+ * Common data structures and access macros
+ */
+
+typedef struct _XkbStateRec {
+ unsigned char group;
+ unsigned char locked_group;
+ unsigned short base_group;
+ unsigned short latched_group;
+ unsigned char mods;
+ unsigned char base_mods;
+ unsigned char latched_mods;
+ unsigned char locked_mods;
+ unsigned char compat_state;
+ unsigned char grab_mods;
+ unsigned char compat_grab_mods;
+ unsigned char lookup_mods;
+ unsigned char compat_lookup_mods;
+ unsigned short ptr_buttons;
+} XkbStateRec,*XkbStatePtr;
+#define XkbModLocks(s) ((s)->locked_mods)
+#define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s))
+#define XkbGroupLock(s) ((s)->locked_group)
+#define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s))
+#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
+#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
+
+typedef struct _XkbMods {
+ unsigned char mask; /* effective mods */
+ unsigned char real_mods;
+ unsigned short vmods;
+} XkbModsRec,*XkbModsPtr;
+
+typedef struct _XkbKTMapEntry {
+ Bool active;
+ unsigned char level;
+ XkbModsRec mods;
+} XkbKTMapEntryRec,*XkbKTMapEntryPtr;
+
+typedef struct _XkbKeyType {
+ XkbModsRec mods;
+ unsigned char num_levels;
+ unsigned char map_count;
+ XkbKTMapEntryPtr map;
+ XkbModsPtr preserve;
+ Atom name;
+ Atom * level_names;
+} XkbKeyTypeRec, *XkbKeyTypePtr;
+
+#define XkbNumGroups(g) ((g)&0x0f)
+#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
+#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
+#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
+#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
+#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
+
+ /*
+ * Structures and access macros used primarily by the server
+ */
+
+typedef struct _XkbBehavior {
+ unsigned char type;
+ unsigned char data;
+} XkbBehavior;
+
+#define XkbAnyActionDataSize 7
+typedef struct _XkbAnyAction {
+ unsigned char type;
+ unsigned char data[XkbAnyActionDataSize];
+} XkbAnyAction;
+
+typedef struct _XkbModAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ unsigned char vmods1;
+ unsigned char vmods2;
+} XkbModAction;
+#define XkbModActionVMods(a) \
+ ((short)(((a)->vmods1<<8)|((a)->vmods2)))
+#define XkbSetModActionVMods(a,v) \
+ (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff))
+
+typedef struct _XkbGroupAction {
+ unsigned char type;
+ unsigned char flags;
+ char group_XXX;
+} XkbGroupAction;
+#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX))
+#define XkbSASetGroup(a,g) ((a)->group_XXX=(g))
+
+typedef struct _XkbISOAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ char group_XXX;
+ unsigned char affect;
+ unsigned char vmods1;
+ unsigned char vmods2;
+} XkbISOAction;
+
+typedef struct _XkbPtrAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char high_XXX;
+ unsigned char low_XXX;
+ unsigned char high_YYY;
+ unsigned char low_YYY;
+} XkbPtrAction;
+#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX))
+#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY))
+#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX))
+#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY))
+
+typedef struct _XkbPtrBtnAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
+} XkbPtrBtnAction;
+
+typedef struct _XkbPtrDfltAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char affect;
+ char valueXXX;
+} XkbPtrDfltAction;
+#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX))
+#define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff))
+
+typedef struct _XkbSwitchScreenAction {
+ unsigned char type;
+ unsigned char flags;
+ char screenXXX;
+} XkbSwitchScreenAction;
+#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX))
+#define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff))
+
+typedef struct _XkbCtrlsAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char ctrls3;
+ unsigned char ctrls2;
+ unsigned char ctrls1;
+ unsigned char ctrls0;
+} XkbCtrlsAction;
+#define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),\
+ ((a)->ctrls2=(((c)>>16)&0xff)),\
+ ((a)->ctrls1=(((c)>>8)&0xff)),\
+ ((a)->ctrls0=((c)&0xff)))
+#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\
+ (((unsigned int)(a)->ctrls2)<<16)|\
+ (((unsigned int)(a)->ctrls1)<<8)|\
+ ((unsigned int)((a)->ctrls0)))
+
+typedef struct _XkbMessageAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char message[6];
+} XkbMessageAction;
+
+typedef struct _XkbRedirectKeyAction {
+ unsigned char type;
+ unsigned char new_key;
+ unsigned char mods_mask;
+ unsigned char mods;
+ unsigned char vmods_mask0;
+ unsigned char vmods_mask1;
+ unsigned char vmods0;
+ unsigned char vmods1;
+} XkbRedirectKeyAction;
+
+#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
+ ((unsigned int)(a)->vmods0))
+#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
+ ((a)->vmods_mask0=((m)&0xff)))
+#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\
+ ((unsigned int)(a)->vmods_mask0))
+#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
+ ((a)->vmods_mask0=((m)&0xff)))
+
+typedef struct _XkbDeviceBtnAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
+ unsigned char device;
+} XkbDeviceBtnAction;
+
+typedef struct _XkbDeviceValuatorAction {
+ unsigned char type;
+ unsigned char device;
+ unsigned char v1_what;
+ unsigned char v1_ndx;
+ unsigned char v1_value;
+ unsigned char v2_what;
+ unsigned char v2_ndx;
+ unsigned char v2_value;
+} XkbDeviceValuatorAction;
+
+typedef union _XkbAction {
+ XkbAnyAction any;
+ XkbModAction mods;
+ XkbGroupAction group;
+ XkbISOAction iso;
+ XkbPtrAction ptr;
+ XkbPtrBtnAction btn;
+ XkbPtrDfltAction dflt;
+ XkbSwitchScreenAction screen;
+ XkbCtrlsAction ctrls;
+ XkbMessageAction msg;
+ XkbRedirectKeyAction redirect;
+ XkbDeviceBtnAction devbtn;
+ XkbDeviceValuatorAction devval;
+ unsigned char type;
+} XkbAction;
+
+typedef struct _XkbControls {
+ unsigned char mk_dflt_btn;
+ unsigned char num_groups;
+ unsigned char groups_wrap;
+ XkbModsRec internal;
+ XkbModsRec ignore_lock;
+ unsigned int enabled_ctrls;
+ unsigned short repeat_delay;
+ unsigned short repeat_interval;
+ unsigned short slow_keys_delay;
+ unsigned short debounce_delay;
+ unsigned short mk_delay;
+ unsigned short mk_interval;
+ unsigned short mk_time_to_max;
+ unsigned short mk_max_speed;
+ short mk_curve;
+ unsigned short ax_options;
+ unsigned short ax_timeout;
+ unsigned short axt_opts_mask;
+ unsigned short axt_opts_values;
+ unsigned int axt_ctrls_mask;
+ unsigned int axt_ctrls_values;
+ unsigned char per_key_repeat[XkbPerKeyBitArraySize];
+} XkbControlsRec, *XkbControlsPtr;
+
+#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask)
+#define XkbAX_NeedOption(c,w) ((c)->ax_options&(w))
+#define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w))
+
+typedef struct _XkbServerMapRec {
+ unsigned short num_acts;
+ unsigned short size_acts;
+ XkbAction *acts;
+
+ XkbBehavior *behaviors;
+ unsigned short *key_acts;
+#if defined(__cplusplus) || defined(c_plusplus)
+ /* explicit is a C++ reserved word */
+ unsigned char *c_explicit;
+#else
+ unsigned char *explicit;
+#endif
+ unsigned char vmods[XkbNumVirtualMods];
+ unsigned short *vmodmap;
+} XkbServerMapRec, *XkbServerMapPtr;
+
+#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]])
+
+ /*
+ * Structures and access macros used primarily by clients
+ */
+
+typedef struct _XkbSymMapRec {
+ unsigned char kt_index[XkbNumKbdGroups];
+ unsigned char group_info;
+ unsigned char width;
+ unsigned short offset;
+} XkbSymMapRec, *XkbSymMapPtr;
+
+typedef struct _XkbClientMapRec {
+ unsigned char size_types;
+ unsigned char num_types;
+ XkbKeyTypePtr types;
+
+ unsigned short size_syms;
+ unsigned short num_syms;
+ KeySym *syms;
+ XkbSymMapPtr key_sym_map;
+
+ unsigned char *modmap;
+} XkbClientMapRec, *XkbClientMapPtr;
+
+#define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info)
+#define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info))
+#define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels)
+#define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width)
+#define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3])
+#define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)])
+#define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k))
+#define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset)
+#define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)])
+
+ /*
+ * Compatibility structures and access macros
+ */
+
+typedef struct _XkbSymInterpretRec {
+ KeySym sym;
+ unsigned char flags;
+ unsigned char match;
+ unsigned char mods;
+ unsigned char virtual_mod;
+ XkbAnyAction act;
+} XkbSymInterpretRec,*XkbSymInterpretPtr;
+
+typedef struct _XkbCompatMapRec {
+ XkbSymInterpretPtr sym_interpret;
+ XkbModsRec groups[XkbNumKbdGroups];
+ unsigned short num_si;
+ unsigned short size_si;
+} XkbCompatMapRec, *XkbCompatMapPtr;
+
+typedef struct _XkbIndicatorMapRec {
+ unsigned char flags;
+ unsigned char which_groups;
+ unsigned char groups;
+ unsigned char which_mods;
+ XkbModsRec mods;
+ unsigned int ctrls;
+} XkbIndicatorMapRec, *XkbIndicatorMapPtr;
+
+#define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\
+ (((i)->which_groups&&(i)->groups)||\
+ ((i)->which_mods&&(i)->mods.mask)||\
+ ((i)->ctrls)))
+#define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||\
+ ((i)->which_mods)||((i)->ctrls))
+
+
+typedef struct _XkbIndicatorRec {
+ unsigned long phys_indicators;
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbIndicatorRec,*XkbIndicatorPtr;
+
+typedef struct _XkbKeyNameRec {
+ char name[XkbKeyNameLength];
+} XkbKeyNameRec,*XkbKeyNamePtr;
+
+typedef struct _XkbKeyAliasRec {
+ char real[XkbKeyNameLength];
+ char alias[XkbKeyNameLength];
+} XkbKeyAliasRec,*XkbKeyAliasPtr;
+
+ /*
+ * Names for everything
+ */
+typedef struct _XkbNamesRec {
+ Atom keycodes;
+ Atom geometry;
+ Atom symbols;
+ Atom types;
+ Atom compat;
+ Atom vmods[XkbNumVirtualMods];
+ Atom indicators[XkbNumIndicators];
+ Atom groups[XkbNumKbdGroups];
+ XkbKeyNamePtr keys;
+ XkbKeyAliasPtr key_aliases;
+ Atom *radio_groups;
+ Atom phys_symbols;
+
+ unsigned char num_keys;
+ unsigned char num_key_aliases;
+ unsigned short num_rg;
+} XkbNamesRec,*XkbNamesPtr;
+
+typedef struct _XkbGeometry *XkbGeometryPtr;
+ /*
+ * Tie it all together into one big keyboard description
+ */
+typedef struct _XkbDesc {
+ unsigned int defined;
+ unsigned short flags;
+ unsigned short device_spec;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+
+ XkbControlsPtr ctrls;
+ XkbServerMapPtr server;
+ XkbClientMapPtr map;
+ XkbIndicatorPtr indicators;
+ XkbNamesPtr names;
+ XkbCompatMapPtr compat;
+ XkbGeometryPtr geom;
+} XkbDescRec, *XkbDescPtr;
+#define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g))
+#define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g))
+#define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g))
+#define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k))
+#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k)))
+#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k)))
+#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k)))
+#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k)))
+#define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n])
+#define XkbKeySymEntry(d,k,sl,g) \
+ (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
+#define XkbKeyAction(d,k,n) \
+ (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL)
+#define XkbKeyActionEntry(d,k,sl,g) \
+ (XkbKeyHasActions(d,k)?\
+ XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL)
+
+#define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0)
+#define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1)
+#define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k))
+#define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&&\
+ ((k)<=(d)->max_key_code))
+#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
+
+
+ /*
+ * The following structures can be used to track changes
+ * to a keyboard device
+ */
+typedef struct _XkbMapChanges {
+ unsigned short changed;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+ unsigned char first_type;
+ unsigned char num_types;
+ KeyCode first_key_sym;
+ unsigned char num_key_syms;
+ KeyCode first_key_act;
+ unsigned char num_key_acts;
+ KeyCode first_key_behavior;
+ unsigned char num_key_behaviors;
+ KeyCode first_key_explicit;
+ unsigned char num_key_explicit;
+ KeyCode first_modmap_key;
+ unsigned char num_modmap_keys;
+ KeyCode first_vmodmap_key;
+ unsigned char num_vmodmap_keys;
+ unsigned char pad;
+ unsigned short vmods;
+} XkbMapChangesRec,*XkbMapChangesPtr;
+
+typedef struct _XkbControlsChanges {
+ unsigned int changed_ctrls;
+ unsigned int enabled_ctrls_changes;
+ Bool num_groups_changed;
+} XkbControlsChangesRec,*XkbControlsChangesPtr;
+
+typedef struct _XkbIndicatorChanges {
+ unsigned int state_changes;
+ unsigned int map_changes;
+} XkbIndicatorChangesRec,*XkbIndicatorChangesPtr;
+
+typedef struct _XkbNameChanges {
+ unsigned int changed;
+ unsigned char first_type;
+ unsigned char num_types;
+ unsigned char first_lvl;
+ unsigned char num_lvls;
+ unsigned char num_aliases;
+ unsigned char num_rg;
+ unsigned char first_key;
+ unsigned char num_keys;
+ unsigned short changed_vmods;
+ unsigned long changed_indicators;
+ unsigned char changed_groups;
+} XkbNameChangesRec,*XkbNameChangesPtr;
+
+typedef struct _XkbCompatChanges {
+ unsigned char changed_groups;
+ unsigned short first_si;
+ unsigned short num_si;
+} XkbCompatChangesRec,*XkbCompatChangesPtr;
+
+typedef struct _XkbChanges {
+ unsigned short device_spec;
+ unsigned short state_changes;
+ XkbMapChangesRec map;
+ XkbControlsChangesRec ctrls;
+ XkbIndicatorChangesRec indicators;
+ XkbNameChangesRec names;
+ XkbCompatChangesRec compat;
+} XkbChangesRec, *XkbChangesPtr;
+
+ /*
+ * These data structures are used to construct a keymap from
+ * a set of components or to list components in the server
+ * database.
+ */
+typedef struct _XkbComponentNames {
+ char * keymap;
+ char * keycodes;
+ char * types;
+ char * compat;
+ char * symbols;
+ char * geometry;
+} XkbComponentNamesRec, *XkbComponentNamesPtr;
+
+typedef struct _XkbComponentName {
+ unsigned short flags;
+ char * name;
+} XkbComponentNameRec,*XkbComponentNamePtr;
+
+typedef struct _XkbComponentList {
+ int num_keymaps;
+ int num_keycodes;
+ int num_types;
+ int num_compat;
+ int num_symbols;
+ int num_geometry;
+ XkbComponentNamePtr keymaps;
+ XkbComponentNamePtr keycodes;
+ XkbComponentNamePtr types;
+ XkbComponentNamePtr compat;
+ XkbComponentNamePtr symbols;
+ XkbComponentNamePtr geometry;
+} XkbComponentListRec, *XkbComponentListPtr;
+
+ /*
+ * The following data structures describe and track changes to a
+ * non-keyboard extension device
+ */
+typedef struct _XkbDeviceLedInfo {
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int phys_indicators;
+ unsigned int maps_present;
+ unsigned int names_present;
+ unsigned int state;
+ Atom names[XkbNumIndicators];
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr;
+
+typedef struct _XkbDeviceInfo {
+ char * name;
+ Atom type;
+ unsigned short device_spec;
+ Bool has_own_state;
+ unsigned short supported;
+ unsigned short unsupported;
+
+ unsigned short num_btns;
+ XkbAction * btn_acts;
+
+ unsigned short sz_leds;
+ unsigned short num_leds;
+ unsigned short dflt_kbd_fb;
+ unsigned short dflt_led_fb;
+ XkbDeviceLedInfoPtr leds;
+} XkbDeviceInfoRec,*XkbDeviceInfoPtr;
+
+#define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL))
+#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns))
+#define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL))
+
+typedef struct _XkbDeviceLedChanges {
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int defined; /* names or maps changed */
+ struct _XkbDeviceLedChanges *next;
+} XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr;
+
+typedef struct _XkbDeviceChanges {
+ unsigned int changed;
+ unsigned short first_btn;
+ unsigned short num_btns;
+ XkbDeviceLedChangesRec leds;
+} XkbDeviceChangesRec,*XkbDeviceChangesPtr;
+
+#endif /* _XKBSTR_H_ */
diff --git a/xserver/include/xorg-config.h.in b/xserver/include/xorg-config.h.in
index 8dbc13a62..b6d78024d 100644
--- a/xserver/include/xorg-config.h.in
+++ b/xserver/include/xorg-config.h.in
@@ -54,12 +54,12 @@
/* Building DRI-capable DDX. */
#undef XF86DRI
+/* Build DRI2 extension */
+#undef DRI2
+
/* Solaris 8 or later? */
#undef __SOL8__
-/* Whether to use pixmap privates */
-#undef PIXPRIV
-
/* Define to 1 if you have the `walkcontext' function (used on Solaris for
xorg_backtrace in hw/xfree86/common/xf86Events.c */
#undef HAVE_WALKCONTEXT
@@ -118,6 +118,15 @@
/* Have execinfo.h */
#undef HAVE_EXECINFO_H
+/* Have pci_system_init_dev_mem() */
+#undef HAVE_PCI_SYSTEM_INIT_DEV_MEM
+
+/* Have pci_enable_device */
+#undef HAVE_PCI_DEVICE_ENABLE
+
+/* Path to text files containing PCI IDs */
+#undef PCI_TXT_IDS_PATH
+
/* Use X server privilege separation */
#undef X_PRIVSEP
diff --git a/xserver/include/xorg-server.h.in b/xserver/include/xorg-server.h.in
index 2ecec5b22..7e6e37dfc 100644
--- a/xserver/include/xorg-server.h.in
+++ b/xserver/include/xorg-server.h.in
@@ -31,9 +31,6 @@
/* Build DPMS extension */
#undef DPMSExtension
-/* Built-in output drivers */
-#undef DRIVERS
-
/* Build GLX extension */
#undef GLXEXT
@@ -46,9 +43,6 @@
/* Support SHM */
#undef HAS_SHM
-/* Built-in input drivers */
-#undef IDRIVERS
-
/* Support IPv6 for TCP connections */
#undef IPv6
@@ -70,9 +64,6 @@
/* Internal define for Xinerama */
#undef PANORAMIX
-/* Support pixmap privates */
-#undef PIXPRIV
-
/* Support RANDR extension */
#undef RANDR
@@ -109,12 +100,6 @@
/* Support UNIX socket connections */
#undef UNIXCONN
-/* Use builtin rgb color database */
-#undef USE_RGB_BUILTIN
-
-/* Use rgb.txt directly */
-#undef USE_RGB_TXT
-
/* unaligned word accesses behave as expected */
#undef WORKING_UNALIGNED_INT
@@ -157,6 +142,9 @@
/* Build DRI extension */
#undef XF86DRI
+/* Build DRI2 extension */
+#undef DRI2
+
/* Build Xorg server */
#undef XORGSERVER
@@ -251,6 +239,9 @@
/* Loadable XFree86 server awesomeness */
#undef XFree86LOADER
+/* Use libpciaccess */
+#undef XSERVER_LIBPCIACCESS
+
/* Use X server privilege separation */
#undef X_PRIVSEP