aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/include
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
committermarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
commita915739887477b28d924ecc8417ee107d125bd6c (patch)
treec02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/include
parent6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff)
downloadvcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.gz
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.bz2
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.zip
Switched to xorg-server-1.6.99.900.tar.gz
Diffstat (limited to 'xorg-server/include')
-rw-r--r--xorg-server/include/Makefile.am4
-rw-r--r--xorg-server/include/Makefile.in74
-rw-r--r--xorg-server/include/XIstubs.h12
-rw-r--r--xorg-server/include/closestr.h1
-rw-r--r--xorg-server/include/colormap.h32
-rw-r--r--xorg-server/include/cursor.h26
-rw-r--r--xorg-server/include/dix-config.h.in12
-rw-r--r--xorg-server/include/dix.h240
-rw-r--r--xorg-server/include/dixaccess.h1
-rw-r--r--xorg-server/include/dixevents.h44
-rw-r--r--xorg-server/include/dixfont.h72
-rw-r--r--xorg-server/include/dixfontstr.h1
-rw-r--r--xorg-server/include/dixgrabs.h24
-rw-r--r--xorg-server/include/dixstruct.h57
-rw-r--r--xorg-server/include/do-not-use-config.h.in62
-rw-r--r--xorg-server/include/eventconvert.h40
-rw-r--r--xorg-server/include/events.h35
-rw-r--r--xorg-server/include/eventstr.h232
-rw-r--r--xorg-server/include/exevents.h317
-rw-r--r--xorg-server/include/extension.h12
-rw-r--r--xorg-server/include/extinit.h9
-rw-r--r--xorg-server/include/extnsionst.h12
-rw-r--r--xorg-server/include/gc.h34
-rw-r--r--xorg-server/include/globals.h98
-rw-r--r--xorg-server/include/hotplug.h4
-rw-r--r--xorg-server/include/input.h225
-rw-r--r--xorg-server/include/inputstr.h160
-rw-r--r--xorg-server/include/misc.h46
-rw-r--r--xorg-server/include/opaque.h50
-rw-r--r--xorg-server/include/os.h282
-rw-r--r--xorg-server/include/pixmap.h10
-rw-r--r--xorg-server/include/privates.h22
-rw-r--r--xorg-server/include/property.h10
-rw-r--r--xorg-server/include/ptrveloc.h102
-rw-r--r--xorg-server/include/regionstr.h52
-rw-r--r--xorg-server/include/registry.h16
-rw-r--r--xorg-server/include/resource.h53
-rw-r--r--xorg-server/include/screenint.h2
-rw-r--r--xorg-server/include/scrnintstr.h4
-rw-r--r--xorg-server/include/selection.h12
-rw-r--r--xorg-server/include/servermd.h3
-rw-r--r--xorg-server/include/site.h4
-rw-r--r--xorg-server/include/swaprep.h96
-rw-r--r--xorg-server/include/swapreq.h6
-rw-r--r--xorg-server/include/version-config.h.in16
-rw-r--r--xorg-server/include/window.h83
-rw-r--r--xorg-server/include/windowstr.h31
-rw-r--r--xorg-server/include/xkb-config.h.in14
-rw-r--r--xorg-server/include/xkbfile.h163
-rw-r--r--xorg-server/include/xkbrules.h92
-rw-r--r--xorg-server/include/xkbsrv.h366
-rw-r--r--xorg-server/include/xkbstr.h148
-rw-r--r--xorg-server/include/xorg-config.h.in13
-rw-r--r--xorg-server/include/xorg-server.h.in19
-rw-r--r--xorg-server/include/xserver-properties.h137
55 files changed, 2052 insertions, 1640 deletions
diff --git a/xorg-server/include/Makefile.am b/xorg-server/include/Makefile.am
index cb0b2934c..f8eef53e1 100644
--- a/xorg-server/include/Makefile.am
+++ b/xorg-server/include/Makefile.am
@@ -17,6 +17,7 @@ sdk_HEADERS = \
dixfontstr.h \
dixgrabs.h \
dixstruct.h \
+ events.h \
exevents.h \
extension.h \
extinit.h \
@@ -63,4 +64,5 @@ endif
AM_CFLAGS = $(DIX_CFLAGS)
EXTRA_DIST = \
- dix-config-apple-verbatim.h
+ dix-config-apple-verbatim.h \
+ eventconvert.h eventstr.h
diff --git a/xorg-server/include/Makefile.in b/xorg-server/include/Makefile.in
index 6aff39ff4..76587e409 100644
--- a/xorg-server/include/Makefile.in
+++ b/xorg-server/include/Makefile.in
@@ -38,16 +38,21 @@ subdir = include
DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/dix-config.h.in \
$(srcdir)/do-not-use-config.h.in $(srcdir)/kdrive-config.h.in \
- $(srcdir)/xkb-config.h.in $(srcdir)/xorg-config.h.in \
- $(srcdir)/xorg-server.h.in $(srcdir)/xwin-config.h.in
+ $(srcdir)/version-config.h.in $(srcdir)/xkb-config.h.in \
+ $(srcdir)/xorg-config.h.in $(srcdir)/xorg-server.h.in \
+ $(srcdir)/xwin-config.h.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
+ $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = do-not-use-config.h xorg-server.h dix-config.h \
- xorg-config.h xkb-config.h xwin-config.h kdrive-config.h
+ xorg-config.h xkb-config.h xwin-config.h kdrive-config.h \
+ version-config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
@@ -77,9 +82,9 @@ am__installdirs = "$(DESTDIR)$(sdkdir)" "$(DESTDIR)$(sdkdir)"
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 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 \
+ dixfontstr.h dixgrabs.h dixstruct.h events.h exevents.h \
+ extension.h extinit.h extnsionst.h gc.h gcstruct.h globals.h \
+ input.h inputstr.h misc.h miscstruct.h opaque.h os.h pixmap.h \
pixmapstr.h privates.h property.h propertyst.h ptrveloc.h \
region.h regionstr.h registry.h resource.h rgb.h screenint.h \
scrnintstr.h selection.h servermd.h site.h swaprep.h swapreq.h \
@@ -94,6 +99,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_MAKEFLAGS = @AM_MAKEFLAGS@
APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@
APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
@@ -114,9 +120,12 @@ CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
+CXX = @CXX@
CYGPATH_W = @CYGPATH_W@
DARWIN_LIBS = @DARWIN_LIBS@
DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -145,7 +154,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@
DRIPROTO_LIBS = @DRIPROTO_LIBS@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+DRI_CFLAGS = @DRI_CFLAGS@
DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
+DRI_LIBS = @DRI_LIBS@
DSYMUTIL = @DSYMUTIL@
DTRACE = @DTRACE@
DUMPBIN = @DUMPBIN@
@@ -154,9 +165,13 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GL_CFLAGS = @GL_CFLAGS@
@@ -195,12 +210,13 @@ LTCOMPILE = @LTCOMPILE@
LTCXXCOMPILE = @LTCXXCOMPILE@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAIN_LIB = @MAIN_LIB@
+MAKEFLAGS = @MAKEFLAGS@
MAKEINFO = @MAKEINFO@
MAKE_HTML = @MAKE_HTML@
MAKE_PDF = @MAKE_PDF@
MAKE_PS = @MAKE_PS@
MAKE_TEXT = @MAKE_TEXT@
-MESA_SOURCE = @MESA_SOURCE@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
@@ -220,7 +236,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
@@ -230,6 +245,7 @@ PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PROJECTROOT = @PROJECTROOT@
PS2PDF = @PS2PDF@
+Q = @Q@
RANLIB = @RANLIB@
RAWCPP = @RAWCPP@
RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -243,11 +259,10 @@ STRIP = @STRIP@
TSLIB_CFLAGS = @TSLIB_CFLAGS@
TSLIB_LIBS = @TSLIB_LIBS@
UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@
-VENDOR_NAME = @VENDOR_NAME@
+V = @V@
VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VENDOR_RELEASE = @VENDOR_RELEASE@
VERSION = @VERSION@
+WINDRES = @WINDRES@
X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
XDMCP_CFLAGS = @XDMCP_CFLAGS@
@@ -283,6 +298,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
XORG_SYS_LIBS = @XORG_SYS_LIBS@
XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
XPBPROXY_LIBS = @XPBPROXY_LIBS@
+XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
XSDL_INCS = @XSDL_INCS@
@@ -307,7 +323,6 @@ YFLAGS = @YFLAGS@
__XCONFIGFILE__ = @__XCONFIGFILE__@
abi_ansic = @abi_ansic@
abi_extension = @abi_extension@
-abi_font = @abi_font@
abi_videodrv = @abi_videodrv@
abi_xinput = @abi_xinput@
abs_builddir = @abs_builddir@
@@ -330,6 +345,7 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
+distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@
@@ -361,7 +377,9 @@ psdir = @psdir@
sbindir = @sbindir@
sdkdir = @sdkdir@
sharedstatedir = @sharedstatedir@
+shavedir = @shavedir@
srcdir = @srcdir@
+symbol_visibility = @symbol_visibility@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
@@ -385,6 +403,7 @@ top_srcdir = @top_srcdir@
@XORG_TRUE@ dixfontstr.h \
@XORG_TRUE@ dixgrabs.h \
@XORG_TRUE@ dixstruct.h \
+@XORG_TRUE@ events.h \
@XORG_TRUE@ exevents.h \
@XORG_TRUE@ extension.h \
@XORG_TRUE@ extinit.h \
@@ -428,9 +447,10 @@ top_srcdir = @top_srcdir@
@XORG_TRUE@nodist_sdk_HEADERS = xorg-server.h
AM_CFLAGS = $(DIX_CFLAGS)
EXTRA_DIST = \
- dix-config-apple-verbatim.h
+ dix-config-apple-verbatim.h \
+ eventconvert.h eventstr.h
-all: do-not-use-config.h xorg-server.h dix-config.h xorg-config.h xkb-config.h xwin-config.h kdrive-config.h
+all: do-not-use-config.h xorg-server.h dix-config.h xorg-config.h xkb-config.h xwin-config.h kdrive-config.h version-config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
@@ -539,8 +559,18 @@ stamp-h7: $(srcdir)/kdrive-config.h.in $(top_builddir)/config.status
@rm -f stamp-h7
cd $(top_builddir) && $(SHELL) ./config.status include/kdrive-config.h
+version-config.h: stamp-h8
+ @if test ! -f $@; then \
+ rm -f stamp-h8; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h8; \
+ else :; fi
+
+stamp-h8: $(srcdir)/version-config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h8
+ cd $(top_builddir) && $(SHELL) ./config.status include/version-config.h
+
distclean-hdr:
- -rm -f do-not-use-config.h stamp-h1 xorg-server.h stamp-h2 dix-config.h stamp-h3 xorg-config.h stamp-h4 xkb-config.h stamp-h5 xwin-config.h stamp-h6 kdrive-config.h stamp-h7
+ -rm -f do-not-use-config.h stamp-h1 xorg-server.h stamp-h2 dix-config.h stamp-h3 xorg-config.h stamp-h4 xkb-config.h stamp-h5 xwin-config.h stamp-h6 kdrive-config.h stamp-h7 version-config.h stamp-h8
mostlyclean-libtool:
-rm -f *.lo
@@ -598,11 +628,11 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
mkid -fID $$unique
tags: TAGS
-TAGS: $(HEADERS) $(SOURCES) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in $(TAGS_DEPENDENCIES) \
+TAGS: $(HEADERS) $(SOURCES) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in version-config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in $(LISP) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in version-config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
@@ -620,9 +650,9 @@ TAGS: $(HEADERS) $(SOURCES) do-not-use-config.h.in xorg-server.h.in dix-config.
fi; \
fi
ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in $(TAGS_DEPENDENCIES) \
+CTAGS: $(HEADERS) $(SOURCES) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in version-config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in $(LISP) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) do-not-use-config.h.in xorg-server.h.in dix-config.h.in xorg-config.h.in xkb-config.h.in xwin-config.h.in kdrive-config.h.in version-config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
@@ -674,7 +704,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(HEADERS) do-not-use-config.h xorg-server.h \
dix-config.h xorg-config.h xkb-config.h xwin-config.h \
- kdrive-config.h
+ kdrive-config.h version-config.h
installdirs:
for dir in "$(DESTDIR)$(sdkdir)" "$(DESTDIR)$(sdkdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
diff --git a/xorg-server/include/XIstubs.h b/xorg-server/include/XIstubs.h
index 6797e0732..ba2f861cd 100644
--- a/xorg-server/include/XIstubs.h
+++ b/xorg-server/include/XIstubs.h
@@ -26,27 +26,27 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef XI_STUBS_H
#define XI_STUBS_H 1
-void
+extern _X_EXPORT void
CloseInputDevice (
DeviceIntPtr /* d */,
ClientPtr /* client */);
-void
+extern _X_EXPORT void
AddOtherInputDevices (void);
-void
+extern _X_EXPORT void
OpenInputDevice (
DeviceIntPtr /* dev */,
ClientPtr /* client */,
int * /* status */);
-int
+extern _X_EXPORT int
SetDeviceMode (
ClientPtr /* client */,
DeviceIntPtr /* dev */,
int /* mode */);
-int
+extern _X_EXPORT int
SetDeviceValuators (
ClientPtr /* client */,
DeviceIntPtr /* dev */,
@@ -54,7 +54,7 @@ SetDeviceValuators (
int /* first_valuator */,
int /* num_valuators */);
-int
+extern _X_EXPORT int
ChangeDeviceControl (
ClientPtr /* client */,
DeviceIntPtr /* dev */,
diff --git a/xorg-server/include/closestr.h b/xorg-server/include/closestr.h
index 8855a5f93..2cd67b1d3 100644
--- a/xorg-server/include/closestr.h
+++ b/xorg-server/include/closestr.h
@@ -30,7 +30,6 @@ from The Open Group.
#ifndef CLOSESTR_H
#define CLOSESTR_H
-#define NEED_REPLIES
#include <X11/Xproto.h>
#include "closure.h"
#include "dix.h"
diff --git a/xorg-server/include/colormap.h b/xorg-server/include/colormap.h
index 8513c0a09..a3467c93f 100644
--- a/xorg-server/include/colormap.h
+++ b/xorg-server/include/colormap.h
@@ -76,7 +76,7 @@ typedef struct _CMEntry *EntryPtr;
/* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
typedef struct _colorResource *colorResourcePtr;
-extern int CreateColormap(
+extern _X_EXPORT int CreateColormap(
Colormap /*mid*/,
ScreenPtr /*pScreen*/,
VisualPtr /*pVisual*/,
@@ -84,24 +84,24 @@ extern int CreateColormap(
int /*alloc*/,
int /*client*/);
-extern int FreeColormap(
+extern _X_EXPORT int FreeColormap(
pointer /*pmap*/,
XID /*mid*/);
-extern int TellLostMap(
+extern _X_EXPORT int TellLostMap(
WindowPtr /*pwin*/,
pointer /* Colormap *pmid */);
-extern int TellGainedMap(
+extern _X_EXPORT int TellGainedMap(
WindowPtr /*pwin*/,
pointer /* Colormap *pmid */);
-extern int CopyColormapAndFree(
+extern _X_EXPORT int CopyColormapAndFree(
Colormap /*mid*/,
ColormapPtr /*pSrc*/,
int /*client*/);
-extern int AllocColor(
+extern _X_EXPORT int AllocColor(
ColormapPtr /*pmap*/,
unsigned short* /*pred*/,
unsigned short* /*pgreen*/,
@@ -109,11 +109,11 @@ extern int AllocColor(
Pixel* /*pPix*/,
int /*client*/);
-extern void FakeAllocColor(
+extern _X_EXPORT void FakeAllocColor(
ColormapPtr /*pmap*/,
xColorItem * /*item*/);
-extern void FakeFreeColor(
+extern _X_EXPORT void FakeFreeColor(
ColormapPtr /*pmap*/,
Pixel /*pixel*/);
@@ -121,7 +121,7 @@ typedef int (*ColorCompareProcPtr)(
EntryPtr /*pent*/,
xrgb * /*prgb*/);
-extern int FindColor(
+extern _X_EXPORT int FindColor(
ColormapPtr /*pmap*/,
EntryPtr /*pentFirst*/,
int /*size*/,
@@ -131,17 +131,17 @@ extern int FindColor(
int /*client*/,
ColorCompareProcPtr /*comp*/);
-extern int QueryColors(
+extern _X_EXPORT int QueryColors(
ColormapPtr /*pmap*/,
int /*count*/,
Pixel* /*ppixIn*/,
xrgb* /*prgbList*/);
-extern int FreeClientPixels(
+extern _X_EXPORT int FreeClientPixels(
pointer /*pcr*/,
XID /*fakeid*/);
-extern int AllocColorCells(
+extern _X_EXPORT int AllocColorCells(
int /*client*/,
ColormapPtr /*pmap*/,
int /*colors*/,
@@ -150,7 +150,7 @@ extern int AllocColorCells(
Pixel* /*ppix*/,
Pixel* /*masks*/);
-extern int AllocColorPlanes(
+extern _X_EXPORT int AllocColorPlanes(
int /*client*/,
ColormapPtr /*pmap*/,
int /*colors*/,
@@ -163,19 +163,19 @@ extern int AllocColorPlanes(
Pixel* /*pgmask*/,
Pixel* /*pbmask*/);
-extern int FreeColors(
+extern _X_EXPORT int FreeColors(
ColormapPtr /*pmap*/,
int /*client*/,
int /*count*/,
Pixel* /*pixels*/,
Pixel /*mask*/);
-extern int StoreColors(
+extern _X_EXPORT int StoreColors(
ColormapPtr /*pmap*/,
int /*count*/,
xColorItem* /*defs*/);
-extern int IsMapInstalled(
+extern _X_EXPORT int IsMapInstalled(
Colormap /*map*/,
WindowPtr /*pWin*/);
diff --git a/xorg-server/include/cursor.h b/xorg-server/include/cursor.h
index f7c16e3f9..acc95c3b3 100644
--- a/xorg-server/include/cursor.h
+++ b/xorg-server/include/cursor.h
@@ -64,16 +64,16 @@ struct _DeviceIntRec;
typedef struct _Cursor *CursorPtr;
typedef struct _CursorMetric *CursorMetricPtr;
-extern int cursorScreenDevPriv[MAXSCREENS];
+extern _X_EXPORT int cursorScreenDevPriv[MAXSCREENS];
#define CursorScreenKey(pScreen) (cursorScreenDevPriv + (pScreen)->myNum)
-extern CursorPtr rootCursor;
+extern _X_EXPORT CursorPtr rootCursor;
-extern int FreeCursor(
+extern _X_EXPORT int FreeCursor(
pointer /*pCurs*/,
XID /*cid*/);
-extern int AllocARGBCursor(
+extern _X_EXPORT int AllocARGBCursor(
unsigned char* /*psrcbits*/,
unsigned char* /*pmaskbits*/,
CARD32* /*argb*/,
@@ -88,7 +88,7 @@ extern int AllocARGBCursor(
ClientPtr /*client*/,
XID /*cid*/);
-extern int AllocGlyphCursor(
+extern _X_EXPORT int AllocGlyphCursor(
Font /*source*/,
unsigned int /*sourceChar*/,
Font /*mask*/,
@@ -103,39 +103,39 @@ extern int AllocGlyphCursor(
ClientPtr /*client*/,
XID /*cid*/);
-extern CursorPtr CreateRootCursor(
+extern _X_EXPORT CursorPtr CreateRootCursor(
char* /*pfilename*/,
unsigned int /*glyph*/);
-extern int ServerBitsFromGlyph(
+extern _X_EXPORT int ServerBitsFromGlyph(
FontPtr /*pfont*/,
unsigned int /*ch*/,
CursorMetricPtr /*cm*/,
unsigned char ** /*ppbits*/);
-extern Bool CursorMetricsFromGlyph(
+extern _X_EXPORT Bool CursorMetricsFromGlyph(
FontPtr /*pfont*/,
unsigned /*ch*/,
CursorMetricPtr /*cm*/);
-extern void CheckCursorConfinement(
+extern _X_EXPORT void CheckCursorConfinement(
WindowPtr /*pWin*/);
-extern void NewCurrentScreen(
+extern _X_EXPORT void NewCurrentScreen(
struct _DeviceIntRec* /*pDev*/,
ScreenPtr /*newScreen*/,
int /*x*/,
int /*y*/);
-extern Bool PointerConfinedToScreen(struct _DeviceIntRec* /* pDev */);
+extern _X_EXPORT Bool PointerConfinedToScreen(struct _DeviceIntRec* /* pDev */);
-extern void GetSpritePosition(
+extern _X_EXPORT void GetSpritePosition(
struct _DeviceIntRec* /* pDev */,
int * /*px*/,
int * /*py*/);
#ifdef PANORAMIX
-extern int XineramaGetCursorScreen(struct _DeviceIntRec* pDev);
+extern _X_EXPORT int XineramaGetCursorScreen(struct _DeviceIntRec* pDev);
#endif /* PANORAMIX */
#endif /* CURSOR_H */
diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in
index db491ed06..fcb582ff0 100644
--- a/xorg-server/include/dix-config.h.in
+++ b/xorg-server/include/dix-config.h.in
@@ -124,6 +124,9 @@
/* Have Quartz */
#undef XQUARTZ
+/* Support application updating through sparkle. */
+#undef XQUARTZ_SPARKLE
+
/* Build a standalone xpbproxy */
#undef STANDALONE_XPBPROXY
@@ -315,15 +318,6 @@
/* Support Xinerama extension */
#undef XINERAMA
-/* Build XKB */
-#undef XKB
-
-/* Enable XKB per default */
-#undef XKB_DFLT_DISABLED
-
-/* Build XKB server */
-#undef XKB_IN_SERVER
-
/* Vendor release */
#undef XORG_RELEASE
diff --git a/xorg-server/include/dix.h b/xorg-server/include/dix.h
index 9c2c73fb7..49dfe3774 100644
--- a/xorg-server/include/dix.h
+++ b/xorg-server/include/dix.h
@@ -53,6 +53,7 @@ SOFTWARE.
#include "input.h"
#include "cursor.h"
#include "geext.h"
+#include "events.h"
#include <X11/extensions/XI.h>
#define EARLIER -1
@@ -119,15 +120,15 @@ typedef struct _Client *ClientPtr; /* also in misc.h */
typedef struct _WorkQueue *WorkQueuePtr;
-extern ClientPtr clients[MAXCLIENTS];
-extern ClientPtr serverClient;
-extern int currentMaxClients;
-extern char dispatchExceptionAtReset;
+extern _X_EXPORT ClientPtr clients[MAXCLIENTS];
+extern _X_EXPORT ClientPtr serverClient;
+extern _X_EXPORT int currentMaxClients;
+extern _X_EXPORT char dispatchExceptionAtReset;
typedef int HWEventQueueType;
typedef HWEventQueueType* HWEventQueuePtr;
-extern HWEventQueuePtr checkForInput[2];
+extern _X_EXPORT HWEventQueuePtr checkForInput[2];
typedef struct _TimeStamp {
CARD32 months; /* really ~49.7 days */
@@ -136,96 +137,95 @@ typedef struct _TimeStamp {
/* dispatch.c */
-extern void SetInputCheck(
+extern _X_EXPORT void SetInputCheck(
HWEventQueuePtr /*c0*/,
HWEventQueuePtr /*c1*/);
-extern void CloseDownClient(
+extern _X_EXPORT void CloseDownClient(
ClientPtr /*client*/);
-extern void UpdateCurrentTime(void);
+extern _X_EXPORT void UpdateCurrentTime(void);
-extern void UpdateCurrentTimeIf(void);
+extern _X_EXPORT void UpdateCurrentTimeIf(void);
-extern int dixDestroyPixmap(
+extern _X_EXPORT int dixDestroyPixmap(
pointer /*value*/,
XID /*pid*/);
-extern void InitClient(
+extern _X_EXPORT void InitClient(
ClientPtr /*client*/,
int /*i*/,
pointer /*ospriv*/);
-extern ClientPtr NextAvailableClient(
+extern _X_EXPORT ClientPtr NextAvailableClient(
pointer /*ospriv*/);
-extern void SendErrorToClient(
+extern _X_EXPORT void SendErrorToClient(
ClientPtr /*client*/,
unsigned int /*majorCode*/,
unsigned int /*minorCode*/,
XID /*resId*/,
int /*errorCode*/);
-extern void MarkClientException(
+extern _X_EXPORT void MarkClientException(
ClientPtr /*client*/);
-extern void ddxBeforeReset (void);
-
+extern _X_HIDDEN Bool CreateConnectionBlock(void);
/* dixutils.c */
-extern void CopyISOLatin1Lowered(
+extern _X_EXPORT void CopyISOLatin1Lowered(
unsigned char * /*dest*/,
unsigned char * /*source*/,
int /*length*/);
-extern int CompareISOLatin1Lowered(
+extern _X_EXPORT int CompareISOLatin1Lowered(
unsigned char * /*a*/,
int alen,
unsigned char * /*b*/,
int blen);
-extern int dixLookupWindow(
+extern _X_EXPORT int dixLookupWindow(
WindowPtr *result,
XID id,
ClientPtr client,
Mask access_mode);
-extern int dixLookupDrawable(
+extern _X_EXPORT int dixLookupDrawable(
DrawablePtr *result,
XID id,
ClientPtr client,
Mask type_mask,
Mask access_mode);
-extern int dixLookupGC(
+extern _X_EXPORT int dixLookupGC(
GCPtr *result,
XID id,
ClientPtr client,
Mask access_mode);
-extern int dixLookupClient(
+extern _X_EXPORT int dixLookupClient(
ClientPtr *result,
XID id,
ClientPtr client,
Mask access_mode);
-extern void NoopDDA(void);
+extern _X_EXPORT void NoopDDA(void);
-extern int AlterSaveSetForClient(
+extern _X_EXPORT int AlterSaveSetForClient(
ClientPtr /*client*/,
WindowPtr /*pWin*/,
unsigned /*mode*/,
Bool /*toRoot*/,
Bool /*map*/);
-extern void DeleteWindowFromAnySaveSet(
+extern _X_EXPORT void DeleteWindowFromAnySaveSet(
WindowPtr /*pWin*/);
-extern void BlockHandler(
+extern _X_EXPORT void BlockHandler(
pointer /*pTimeout*/,
pointer /*pReadmask*/);
-extern void WakeupHandler(
+extern _X_EXPORT void WakeupHandler(
int /*result*/,
pointer /*pReadmask*/);
@@ -240,23 +240,23 @@ typedef void (* WakeupHandlerProcPtr)(
int /* result */,
pointer /* pReadmask */);
-extern Bool RegisterBlockAndWakeupHandlers(
+extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(
BlockHandlerProcPtr /*blockHandler*/,
WakeupHandlerProcPtr /*wakeupHandler*/,
pointer /*blockData*/);
-extern void RemoveBlockAndWakeupHandlers(
+extern _X_EXPORT void RemoveBlockAndWakeupHandlers(
BlockHandlerProcPtr /*blockHandler*/,
WakeupHandlerProcPtr /*wakeupHandler*/,
pointer /*blockData*/);
-extern void InitBlockAndWakeupHandlers(void);
+extern _X_EXPORT void InitBlockAndWakeupHandlers(void);
-extern void ProcessWorkQueue(void);
+extern _X_EXPORT void ProcessWorkQueue(void);
-extern void ProcessWorkQueueZombies(void);
+extern _X_EXPORT void ProcessWorkQueueZombies(void);
-extern Bool QueueWorkProc(
+extern _X_EXPORT Bool QueueWorkProc(
Bool (* /*function*/)(
ClientPtr /*clientUnused*/,
pointer /*closure*/),
@@ -268,47 +268,47 @@ typedef Bool (* ClientSleepProcPtr)(
ClientPtr /*client*/,
pointer /*closure*/);
-extern Bool ClientSleep(
+extern _X_EXPORT Bool ClientSleep(
ClientPtr /*client*/,
ClientSleepProcPtr /* function */,
pointer /*closure*/);
#ifndef ___CLIENTSIGNAL_DEFINED___
#define ___CLIENTSIGNAL_DEFINED___
-extern Bool ClientSignal(
+extern _X_EXPORT Bool ClientSignal(
ClientPtr /*client*/);
#endif /* ___CLIENTSIGNAL_DEFINED___ */
-extern void ClientWakeup(
+extern _X_EXPORT void ClientWakeup(
ClientPtr /*client*/);
-extern Bool ClientIsAsleep(
+extern _X_EXPORT Bool ClientIsAsleep(
ClientPtr /*client*/);
/* atom.c */
-extern Atom MakeAtom(
- char * /*string*/,
+extern _X_EXPORT Atom MakeAtom(
+ const char * /*string*/,
unsigned /*len*/,
Bool /*makeit*/);
-extern Bool ValidAtom(
+extern _X_EXPORT Bool ValidAtom(
Atom /*atom*/);
-extern char *NameForAtom(
+extern _X_EXPORT const char *NameForAtom(
Atom /*atom*/);
-extern void AtomError(void);
+extern _X_EXPORT void AtomError(void);
-extern void FreeAllAtoms(void);
+extern _X_EXPORT void FreeAllAtoms(void);
-extern void InitAtoms(void);
+extern _X_EXPORT void InitAtoms(void);
/* main.c */
-extern void SetVendorRelease(int release);
+extern _X_EXPORT void SetVendorRelease(int release);
-extern void SetVendorString(char *string);
+extern _X_EXPORT void SetVendorString(char *string);
/* events.c */
@@ -317,27 +317,26 @@ extern void SetMaskForEvent(
Mask /* mask */,
int /* event */);
-extern void ConfineToShape(
+extern _X_EXPORT void ConfineToShape(
DeviceIntPtr /* pDev */,
RegionPtr /* shape */,
int* /* px */,
int* /* py */);
-extern Bool IsParent(
+extern _X_EXPORT Bool IsParent(
WindowPtr /* maybeparent */,
WindowPtr /* child */);
-extern WindowPtr GetCurrentRootWindow(DeviceIntPtr pDev);
+extern _X_EXPORT WindowPtr GetCurrentRootWindow(DeviceIntPtr pDev);
-extern WindowPtr GetSpriteWindow(DeviceIntPtr pDev);
+extern _X_EXPORT WindowPtr GetSpriteWindow(DeviceIntPtr pDev);
-extern void NoticeEventTime(xEventPtr /* xE */);
+extern _X_EXPORT void NoticeEventTime(InternalEvent *ev);
extern void EnqueueEvent(
- xEventPtr /* xE */,
- DeviceIntPtr /* device */,
- int /* count */);
+ InternalEvent * /* ev */,
+ DeviceIntPtr /* device */);
extern void ActivatePointerGrab(
DeviceIntPtr /* mouse */,
@@ -357,39 +356,34 @@ extern void ActivateKeyboardGrab(
extern void DeactivateKeyboardGrab(
DeviceIntPtr /* keybd */);
+extern BOOL ActivateFocusInGrab(
+ DeviceIntPtr /* dev */,
+ WindowPtr /* old */,
+ WindowPtr /* win */);
+
extern void AllowSome(
ClientPtr /* client */,
TimeStamp /* time */,
DeviceIntPtr /* thisDev */,
- int /* newState */,
- Bool /* core */);
+ int /* newState */);
extern void ReleaseActiveGrabs(
ClientPtr client);
-extern int DeliverEventsToWindow(
+extern _X_EXPORT int DeliverEventsToWindow(
DeviceIntPtr /* pWin */,
WindowPtr /* pWin */,
xEventPtr /* pEvents */,
int /* count */,
Mask /* filter */,
- GrabPtr /* grab */,
- int /* mskidx */);
+ GrabPtr /* grab */);
extern int DeliverDeviceEvents(
WindowPtr /* pWin */,
- xEventPtr /* xE */,
+ InternalEvent* /* event */,
GrabPtr /* grab */,
WindowPtr /* stopAt */,
- DeviceIntPtr /* dev */,
- int /* count */);
-
-extern void DefineInitialRootWindow(
- WindowPtr /* win */);
-
-extern void SetupSprite(
- DeviceIntPtr /* pDev */,
- ScreenPtr /* pScreen */);
+ DeviceIntPtr /* dev */);
extern void InitializeSprite(
DeviceIntPtr /* pDev */,
@@ -399,37 +393,32 @@ extern void UpdateSpriteForScreen(
DeviceIntPtr /* pDev */,
ScreenPtr /* pScreen */);
-extern void WindowHasNewCursor(
+extern _X_EXPORT void WindowHasNewCursor(
WindowPtr /* pWin */);
extern Bool CheckDeviceGrabs(
DeviceIntPtr /* device */,
- xEventPtr /* xE */,
- int /* checkFirst */,
- int /* count */);
+ DeviceEvent* /* event */,
+ int /* checkFirst */);
extern void DeliverFocusedEvent(
DeviceIntPtr /* keybd */,
- xEventPtr /* xE */,
- WindowPtr /* window */,
- int /* count */);
+ InternalEvent* /* event */,
+ WindowPtr /* window */);
extern void DeliverGrabbedEvent(
- xEventPtr /* xE */,
+ InternalEvent* /* event */,
DeviceIntPtr /* thisDev */,
- Bool /* deactivateGrab */,
- int /* count */);
+ Bool /* deactivateGrab */);
-#ifdef XKB
extern void FixKeyState(
- xEvent * /* xE */,
+ DeviceEvent* /* event */,
DeviceIntPtr /* keybd */);
-#endif /* XKB */
extern void RecalculateDeliverableEvents(
WindowPtr /* pWin */);
-extern int OtherClientGone(
+extern _X_EXPORT int OtherClientGone(
pointer /* value */,
XID /* id */);
@@ -455,15 +444,13 @@ extern int GrabDevice(
Window /* grabWindow */,
unsigned /* ownerEvents */,
Time /* ctime */,
- Mask /* mask */,
- CARD8 * /* status */,
- Bool /* coreGrab */);
+ GrabMask* /* mask */,
+ int /* grabtype */,
+ Cursor /* curs */,
+ Window /* confineToWin */,
+ CARD8 * /* status */);
extern void InitEvents(void);
-extern void InitSprite(
- DeviceIntPtr /* pDev */,
- Bool /* hasCursor */
- );
extern void CloseDownEvents(void);
@@ -478,23 +465,22 @@ extern Mask EventMaskForClient(
-extern int DeliverEvents(
+extern _X_EXPORT int DeliverEvents(
WindowPtr /*pWin*/,
xEventPtr /*xE*/,
int /*count*/,
WindowPtr /*otherParent*/);
-extern Bool
-CheckMotion(
- xEvent* /* xE */,
+extern Bool CheckMotion(
+ DeviceEvent* /* ev */,
DeviceIntPtr /* pDev */);
-extern void WriteEventsToClient(
+extern _X_EXPORT void WriteEventsToClient(
ClientPtr /*pClient*/,
int /*count*/,
xEventPtr /*events*/);
-extern int TryClientEvents(
+extern _X_EXPORT int TryClientEvents(
ClientPtr /*client*/,
DeviceIntPtr /* device */,
xEventPtr /*pEvents*/,
@@ -503,17 +489,16 @@ extern int TryClientEvents(
Mask /*filter*/,
GrabPtr /*grab*/);
-extern void WindowsRestructured(void);
+extern _X_EXPORT void WindowsRestructured(void);
-extern Bool SetClientPointer(
- ClientPtr /* client */,
- ClientPtr /* setter */,
+extern int SetClientPointer(
+ ClientPtr /* client */,
DeviceIntPtr /* device */);
-extern DeviceIntPtr PickPointer(
+extern _X_EXPORT DeviceIntPtr PickPointer(
ClientPtr /* client */);
-extern DeviceIntPtr PickKeyboard(
+extern _X_EXPORT DeviceIntPtr PickKeyboard(
ClientPtr /* client */);
extern Bool IsInterferingGrab(
@@ -522,15 +507,15 @@ extern Bool IsInterferingGrab(
xEvent* /* events */);
#ifdef PANORAMIX
-extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
+extern _X_EXPORT void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
#endif
#ifdef RANDR
-void
+extern _X_EXPORT void
ScreenRestructured (ScreenPtr pScreen);
#endif
-extern int ffs(int i);
+extern _X_EXPORT int ffs(int i);
/*
* callback manager stuff
@@ -544,30 +529,30 @@ typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
typedef void (*CallbackProcPtr) (
CallbackListPtr *, pointer, pointer);
-extern Bool AddCallback(
+extern _X_EXPORT Bool AddCallback(
CallbackListPtr * /*pcbl*/,
CallbackProcPtr /*callback*/,
pointer /*data*/);
-extern Bool DeleteCallback(
+extern _X_EXPORT Bool DeleteCallback(
CallbackListPtr * /*pcbl*/,
CallbackProcPtr /*callback*/,
pointer /*data*/);
-extern void CallCallbacks(
+extern _X_EXPORT void CallCallbacks(
CallbackListPtr * /*pcbl*/,
pointer /*call_data*/);
-extern void DeleteCallbackList(
+extern _X_EXPORT void DeleteCallbackList(
CallbackListPtr * /*pcbl*/);
-extern void InitCallbackManager(void);
+extern _X_EXPORT void InitCallbackManager(void);
/*
* ServerGrabCallback stuff
*/
-extern CallbackListPtr ServerGrabCallback;
+extern _X_EXPORT CallbackListPtr ServerGrabCallback;
typedef enum {SERVER_GRABBED, SERVER_UNGRABBED,
CLIENT_PERVIOUS, CLIENT_IMPERVIOUS } ServerGrabState;
@@ -581,7 +566,7 @@ typedef struct {
* EventCallback stuff
*/
-extern CallbackListPtr EventCallback;
+extern _X_EXPORT CallbackListPtr EventCallback;
typedef struct {
ClientPtr client;
@@ -593,7 +578,7 @@ typedef struct {
* DeviceEventCallback stuff
*/
-extern CallbackListPtr DeviceEventCallback;
+extern _X_EXPORT CallbackListPtr DeviceEventCallback;
typedef struct {
xEventPtr events;
@@ -604,48 +589,41 @@ extern int XItoCoreType(int xi_type);
extern Bool DevHasCursor(DeviceIntPtr pDev);
extern Bool IsPointerDevice( DeviceIntPtr dev);
extern Bool IsKeyboardDevice(DeviceIntPtr dev);
-extern Bool IsPointerEvent(xEvent* xE);
+extern Bool IsPointerEvent(InternalEvent *event);
+extern Bool IsMaster(DeviceIntPtr dev);
+
+extern _X_HIDDEN int CorePointerProc(DeviceIntPtr dev, int what);
+extern _X_HIDDEN int CoreKeyboardProc(DeviceIntPtr dev, int what);
+
/*
* These are deprecated compatibility functions and will be removed soon!
* Please use the noted replacements instead.
*/
/* replaced by dixLookupWindow */
-extern WindowPtr SecurityLookupWindow(
+extern _X_EXPORT WindowPtr SecurityLookupWindow(
XID id,
ClientPtr client,
Mask access_mode);
/* replaced by dixLookupWindow */
-extern WindowPtr LookupWindow(
+extern _X_EXPORT WindowPtr LookupWindow(
XID id,
ClientPtr client);
/* replaced by dixLookupDrawable */
-extern pointer SecurityLookupDrawable(
+extern _X_EXPORT pointer SecurityLookupDrawable(
XID id,
ClientPtr client,
Mask access_mode);
/* replaced by dixLookupDrawable */
-extern pointer LookupDrawable(
+extern _X_EXPORT pointer LookupDrawable(
XID id,
ClientPtr client);
/* replaced by dixLookupClient */
-extern ClientPtr LookupClient(
+extern _X_EXPORT ClientPtr LookupClient(
XID id,
ClientPtr client);
-/* GE stuff */
-extern void SetGenericFilter(int extension, Mask* filters);
-extern int ExtGrabDevice(ClientPtr client,
- DeviceIntPtr dev,
- int device_mode,
- WindowPtr grabWindow,
- WindowPtr confineTo,
- TimeStamp ctime,
- Bool ownerEvents,
- CursorPtr cursor,
- Mask xi_mask,
- GenericMaskPtr ge_masks);
#endif /* DIX_H */
diff --git a/xorg-server/include/dixaccess.h b/xorg-server/include/dixaccess.h
index 3c62ee354..7180acd71 100644
--- a/xorg-server/include/dixaccess.h
+++ b/xorg-server/include/dixaccess.h
@@ -49,5 +49,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define DixManageAccess (1<<25) /* manage object */
#define DixDebugAccess (1<<26) /* debug object */
#define DixBellAccess (1<<27) /* audible sound */
+#define DixPostAccess (1<<28) /* post or follow-up call */
#endif /* DIX_ACCESS_H */
diff --git a/xorg-server/include/dixevents.h b/xorg-server/include/dixevents.h
index 1ce2ad0c1..b9153456f 100644
--- a/xorg-server/include/dixevents.h
+++ b/xorg-server/include/dixevents.h
@@ -26,62 +26,62 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef DIXEVENTS_H
#define DIXEVENTS_H
-extern void SetCriticalEvent(int /* event */);
+extern _X_EXPORT void SetCriticalEvent(int /* event */);
-extern CursorPtr GetSpriteCursor(DeviceIntPtr /*pDev*/);
+extern _X_EXPORT CursorPtr GetSpriteCursor(DeviceIntPtr /*pDev*/);
-extern int ProcAllowEvents(ClientPtr /* client */);
+extern _X_EXPORT int ProcAllowEvents(ClientPtr /* client */);
-extern int MaybeDeliverEventsToClient(
+extern _X_EXPORT int MaybeDeliverEventsToClient(
WindowPtr /* pWin */,
xEvent * /* pEvents */,
int /* count */,
Mask /* filter */,
ClientPtr /* dontClient */);
-extern int ProcWarpPointer(ClientPtr /* client */);
+extern _X_EXPORT int ProcWarpPointer(ClientPtr /* client */);
-extern int EventSelectForWindow(
+extern _X_EXPORT int EventSelectForWindow(
WindowPtr /* pWin */,
ClientPtr /* client */,
Mask /* mask */);
-extern int EventSuppressForWindow(
+extern _X_EXPORT int EventSuppressForWindow(
WindowPtr /* pWin */,
ClientPtr /* client */,
Mask /* mask */,
Bool * /* checkOptional */);
-extern int ProcSetInputFocus(ClientPtr /* client */);
+extern _X_EXPORT int ProcSetInputFocus(ClientPtr /* client */);
-extern int ProcGetInputFocus(ClientPtr /* client */);
+extern _X_EXPORT int ProcGetInputFocus(ClientPtr /* client */);
-extern int ProcGrabPointer(ClientPtr /* client */);
+extern _X_EXPORT int ProcGrabPointer(ClientPtr /* client */);
-extern int ProcChangeActivePointerGrab(ClientPtr /* client */);
+extern _X_EXPORT int ProcChangeActivePointerGrab(ClientPtr /* client */);
-extern int ProcUngrabPointer(ClientPtr /* client */);
+extern _X_EXPORT int ProcUngrabPointer(ClientPtr /* client */);
-extern int ProcGrabKeyboard(ClientPtr /* client */);
+extern _X_EXPORT int ProcGrabKeyboard(ClientPtr /* client */);
-extern int ProcUngrabKeyboard(ClientPtr /* client */);
+extern _X_EXPORT int ProcUngrabKeyboard(ClientPtr /* client */);
-extern int ProcQueryPointer(ClientPtr /* client */);
+extern _X_EXPORT int ProcQueryPointer(ClientPtr /* client */);
-extern int ProcSendEvent(ClientPtr /* client */);
+extern _X_EXPORT int ProcSendEvent(ClientPtr /* client */);
-extern int ProcUngrabKey(ClientPtr /* client */);
+extern _X_EXPORT int ProcUngrabKey(ClientPtr /* client */);
-extern int ProcGrabKey(ClientPtr /* client */);
+extern _X_EXPORT int ProcGrabKey(ClientPtr /* client */);
-extern int ProcGrabButton(ClientPtr /* client */);
+extern _X_EXPORT int ProcGrabButton(ClientPtr /* client */);
-extern int ProcUngrabButton(ClientPtr /* client */);
+extern _X_EXPORT int ProcUngrabButton(ClientPtr /* client */);
-extern int ProcRecolorCursor(ClientPtr /* client */);
+extern _X_EXPORT int ProcRecolorCursor(ClientPtr /* client */);
#ifdef PANORAMIX
-extern void PostSyntheticMotion(DeviceIntPtr pDev,
+extern _X_EXPORT void PostSyntheticMotion(DeviceIntPtr pDev,
int x,
int y,
int screen,
diff --git a/xorg-server/include/dixfont.h b/xorg-server/include/dixfont.h
index 0f3df97cf..e444a2024 100644
--- a/xorg-server/include/dixfont.h
+++ b/xorg-server/include/dixfont.h
@@ -33,45 +33,45 @@ SOFTWARE.
typedef struct _DIXFontProp *DIXFontPropPtr;
-extern Bool SetDefaultFont(char * /*defaultfontname*/);
+extern _X_EXPORT Bool SetDefaultFont(char * /*defaultfontname*/);
-extern void QueueFontWakeup(FontPathElementPtr /*fpe*/);
+extern _X_EXPORT void QueueFontWakeup(FontPathElementPtr /*fpe*/);
-extern void RemoveFontWakeup(FontPathElementPtr /*fpe*/);
+extern _X_EXPORT void RemoveFontWakeup(FontPathElementPtr /*fpe*/);
-extern void FontWakeup(pointer /*data*/,
+extern _X_EXPORT void FontWakeup(pointer /*data*/,
int /*count*/,
pointer /*LastSelectMask*/);
-extern int OpenFont(ClientPtr /*client*/,
+extern _X_EXPORT int OpenFont(ClientPtr /*client*/,
XID /*fid*/,
Mask /*flags*/,
unsigned /*lenfname*/,
char * /*pfontname*/);
-extern int CloseFont(pointer /*pfont*/,
+extern _X_EXPORT int CloseFont(pointer /*pfont*/,
XID /*fid*/);
typedef struct _xQueryFontReply *xQueryFontReplyPtr;
-extern void QueryFont(FontPtr /*pFont*/,
+extern _X_EXPORT void QueryFont(FontPtr /*pFont*/,
xQueryFontReplyPtr /*pReply*/,
int /*nProtoCCIStructs*/);
-extern int ListFonts(ClientPtr /*client*/,
+extern _X_EXPORT int ListFonts(ClientPtr /*client*/,
unsigned char * /*pattern*/,
unsigned int /*length*/,
unsigned int /*max_names*/);
-int
+extern _X_EXPORT int
doListFontsWithInfo(ClientPtr /*client*/,
LFWIclosurePtr /*c*/);
-extern int doPolyText(ClientPtr /*client*/,
+extern _X_EXPORT int doPolyText(ClientPtr /*client*/,
PTclosurePtr /*c*/
);
-extern int PolyText(ClientPtr /*client*/,
+extern _X_EXPORT int PolyText(ClientPtr /*client*/,
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
unsigned char * /*pElt*/,
@@ -81,10 +81,10 @@ extern int PolyText(ClientPtr /*client*/,
int /*reqType*/,
XID /*did*/);
-extern int doImageText(ClientPtr /*client*/,
+extern _X_EXPORT int doImageText(ClientPtr /*client*/,
ITclosurePtr /*c*/);
-extern int ImageText(ClientPtr /*client*/,
+extern _X_EXPORT int ImageText(ClientPtr /*client*/,
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*nChars*/,
@@ -94,76 +94,76 @@ extern int ImageText(ClientPtr /*client*/,
int /*reqType*/,
XID /*did*/);
-extern int SetFontPath(ClientPtr /*client*/,
+extern _X_EXPORT int SetFontPath(ClientPtr /*client*/,
int /*npaths*/,
unsigned char * /*paths*/,
int * /*error*/);
-extern int SetDefaultFontPath(char * /*path*/);
+extern _X_EXPORT int SetDefaultFontPath(char * /*path*/);
-extern int GetFontPath(ClientPtr client,
+extern _X_EXPORT int GetFontPath(ClientPtr client,
int *count,
int *length,
unsigned char **result);
-extern void DeleteClientFontStuff(ClientPtr /*client*/);
+extern _X_EXPORT void DeleteClientFontStuff(ClientPtr /*client*/);
/* Quartz support on Mac OS X pulls in the QuickDraw
framework whose InitFonts function conflicts here. */
#ifdef __APPLE__
#define InitFonts Darwin_X_InitFonts
#endif
-extern void InitFonts(void);
+extern _X_EXPORT void InitFonts(void);
-extern void FreeFonts(void);
+extern _X_EXPORT void FreeFonts(void);
-extern FontPtr find_old_font(XID /*id*/);
+extern _X_EXPORT FontPtr find_old_font(XID /*id*/);
-extern void GetGlyphs(FontPtr /*font*/,
+extern _X_EXPORT void GetGlyphs(FontPtr /*font*/,
unsigned long /*count*/,
unsigned char * /*chars*/,
FontEncoding /*fontEncoding*/,
unsigned long * /*glyphcount*/,
CharInfoPtr * /*glyphs*/);
-extern void QueryGlyphExtents(FontPtr /*pFont*/,
+extern _X_EXPORT void QueryGlyphExtents(FontPtr /*pFont*/,
CharInfoPtr * /*charinfo*/,
unsigned long /*count*/,
ExtentInfoPtr /*info*/);
-extern Bool QueryTextExtents(FontPtr /*pFont*/,
+extern _X_EXPORT Bool QueryTextExtents(FontPtr /*pFont*/,
unsigned long /*count*/,
unsigned char * /*chars*/,
ExtentInfoPtr /*info*/);
-extern Bool ParseGlyphCachingMode(char * /*str*/);
+extern _X_EXPORT Bool ParseGlyphCachingMode(char * /*str*/);
-extern void InitGlyphCaching(void);
+extern _X_EXPORT void InitGlyphCaching(void);
-extern void SetGlyphCachingMode(int /*newmode*/);
+extern _X_EXPORT void SetGlyphCachingMode(int /*newmode*/);
/*
* libXfont/src/builtins/builtin.h
*/
-extern void BuiltinRegisterFpeFunctions(void);
+extern _X_EXPORT void BuiltinRegisterFpeFunctions(void);
/*
* libXfont stubs.
*/
-extern int client_auth_generation(ClientPtr client);
+extern _X_EXPORT int client_auth_generation(ClientPtr client);
-extern void DeleteFontClientID(Font id);
+extern _X_EXPORT void DeleteFontClientID(Font id);
-extern FontResolutionPtr GetClientResolutions(int *num);
+extern _X_EXPORT FontResolutionPtr GetClientResolutions(int *num);
-extern int GetDefaultPointSize(void);
+extern _X_EXPORT int GetDefaultPointSize(void);
-extern Font GetNewFontClientID(void);
+extern _X_EXPORT Font GetNewFontClientID(void);
-extern int init_fs_handlers(FontPathElementPtr fpe,
+extern _X_EXPORT int init_fs_handlers(FontPathElementPtr fpe,
BlockHandlerProcPtr block_handler);
-extern int RegisterFPEFunctions(NameCheckFunc name_func,
+extern _X_EXPORT int RegisterFPEFunctions(NameCheckFunc name_func,
InitFpeFunc init_func,
FreeFpeFunc free_func,
ResetFpeFunc reset_func,
@@ -179,10 +179,10 @@ extern int RegisterFPEFunctions(NameCheckFunc name_func,
NextLaFunc next_list_alias_func,
SetPathFunc set_path_func);
-extern void remove_fs_handlers(FontPathElementPtr fpe,
+extern _X_EXPORT void remove_fs_handlers(FontPathElementPtr fpe,
BlockHandlerProcPtr blockHandler,
Bool all);
-extern int StoreFontClientFont(FontPtr pfont, Font id);
+extern _X_EXPORT int StoreFontClientFont(FontPtr pfont, Font id);
#endif /* DIXFONT_H */
diff --git a/xorg-server/include/dixfontstr.h b/xorg-server/include/dixfontstr.h
index 463b2fdc5..c559e861e 100644
--- a/xorg-server/include/dixfontstr.h
+++ b/xorg-server/include/dixfontstr.h
@@ -28,7 +28,6 @@ SOFTWARE.
#include "dixfont.h"
#include <X11/fonts/fontstruct.h>
#include "closure.h"
-#define NEED_REPLIES
#include <X11/Xproto.h> /* for xQueryFontReply */
#define FONTCHARSET(font) (font)
diff --git a/xorg-server/include/dixgrabs.h b/xorg-server/include/dixgrabs.h
index 29aa82857..3b2a46d72 100644
--- a/xorg-server/include/dixgrabs.h
+++ b/xorg-server/include/dixgrabs.h
@@ -26,35 +26,35 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef DIXGRABS_H
#define DIXGRABS_H 1
+struct _GrabParameters;
+
extern GrabPtr CreateGrab(
int /* client */,
DeviceIntPtr /* device */,
- WindowPtr /* window */,
- Mask /* eventMask */,
- Bool /* ownerEvents */,
- Bool /* keyboardMode */,
- Bool /* pointerMode */,
DeviceIntPtr /* modDevice */,
- unsigned short /* modifiers */,
+ WindowPtr /* window */,
+ GrabType /* grabtype */,
+ GrabMask * /* mask */,
+ struct _GrabParameters * /* param */,
int /* type */,
KeyCode /* keybut */,
- WindowPtr /* confineTo */,
- CursorPtr /* cursor */);
+ WindowPtr /* confineTo */,
+ CursorPtr /* cursor */);
-extern int DeletePassiveGrab(
+extern _X_EXPORT int DeletePassiveGrab(
pointer /* value */,
XID /* id */);
-extern Bool GrabMatchesSecond(
+extern _X_EXPORT Bool GrabMatchesSecond(
GrabPtr /* pFirstGrab */,
GrabPtr /* pSecondGrab */,
Bool /*ignoreDevice*/);
-extern int AddPassiveGrabToList(
+extern _X_EXPORT int AddPassiveGrabToList(
ClientPtr /* client */,
GrabPtr /* pGrab */);
-extern Bool DeletePassiveGrabFromList(
+extern _X_EXPORT Bool DeletePassiveGrabFromList(
GrabPtr /* pMinuendGrab */);
#endif /* DIXGRABS_H */
diff --git a/xorg-server/include/dixstruct.h b/xorg-server/include/dixstruct.h
index 4bfe3713c..696b793ff 100644
--- a/xorg-server/include/dixstruct.h
+++ b/xorg-server/include/dixstruct.h
@@ -37,11 +37,7 @@ SOFTWARE.
* translation from client ids to server addresses.
*/
-#ifdef DEBUG
-#define MAX_REQUEST_LOG 100
-#endif
-
-extern CallbackListPtr ClientStateCallback;
+extern _X_EXPORT CallbackListPtr ClientStateCallback;
typedef struct {
ClientPtr client;
@@ -54,7 +50,7 @@ typedef void (*ReplySwapPtr) (
int /* size */,
void * /* pbuf */);
-extern void ReplyNotSwappd (
+extern _X_EXPORT void ReplyNotSwappd (
ClientPtr /* pClient */,
int /* size */,
void * /* pbuf */);
@@ -89,6 +85,7 @@ typedef struct _Window *SaveSetElt;
#define SaveSetAssignMap(ss,m)
#endif
+/* The unused_ members are ABI spacing. Please reuse them. */
typedef struct _Client {
int index;
Mask clientAsMask;
@@ -104,7 +101,7 @@ typedef struct _Client {
* killed */
SaveSetElt *saveSet;
int numSaved;
- pointer screenPrivate[MAXSCREENS];
+ void *unused_screenPrivate[16];
int (**requestVector) (
ClientPtr /* pClient */);
CARD32 req_len; /* length of current request */
@@ -112,23 +109,15 @@ typedef struct _Client {
int priority;
ClientState clientState;
PrivateRec *devPrivates;
-#ifdef XKB
unsigned short xkbClientFlags;
unsigned short mapNotifyMask;
unsigned short newKeyboardNotifyMask;
unsigned short vMajor,vMinor;
KeyCode minKC,maxKC;
-#endif
-#ifdef DEBUG
- unsigned char requestLog[MAX_REQUEST_LOG];
- int requestLogIndex;
-#endif
unsigned long replyBytesRemaining;
- void *appgroup; /* Can't remove, ABI */
- struct _FontResolution * (*fontResFunc) ( /* no need for font.h */
- ClientPtr /* pClient */,
- int * /* num */);
+ void *unused_appgroup;
+ void *unused_fontResFunc;
int smart_priority;
long smart_start_tick;
long smart_stop_tick;
@@ -140,17 +129,17 @@ typedef struct _Client {
/*
* Scheduling interface
*/
-extern long SmartScheduleTime;
-extern long SmartScheduleInterval;
-extern long SmartScheduleSlice;
-extern long SmartScheduleMaxSlice;
-extern Bool SmartScheduleDisable;
-extern void SmartScheduleStartTimer(void);
-extern void SmartScheduleStopTimer(void);
+extern _X_EXPORT long SmartScheduleTime;
+extern _X_EXPORT long SmartScheduleInterval;
+extern _X_EXPORT long SmartScheduleSlice;
+extern _X_EXPORT long SmartScheduleMaxSlice;
+extern _X_EXPORT Bool SmartScheduleDisable;
+extern _X_EXPORT void SmartScheduleStartTimer(void);
+extern _X_EXPORT void SmartScheduleStopTimer(void);
#define SMART_MAX_PRIORITY (20)
#define SMART_MIN_PRIORITY (-20)
-extern Bool SmartScheduleInit(void);
+extern _X_EXPORT Bool SmartScheduleInit(void);
/* This prototype is used pervasively in Xext, dix */
@@ -166,14 +155,14 @@ typedef struct _WorkQueue {
pointer closure;
} WorkQueueRec;
-extern TimeStamp currentTime;
-extern TimeStamp lastDeviceEventTime;
+extern _X_EXPORT TimeStamp currentTime;
+extern _X_EXPORT TimeStamp lastDeviceEventTime;
-extern int CompareTimeStamps(
+extern _X_EXPORT int CompareTimeStamps(
TimeStamp /*a*/,
TimeStamp /*b*/);
-extern TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
+extern _X_EXPORT TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
typedef struct _CallbackRec {
CallbackProcPtr proc;
@@ -191,14 +180,14 @@ typedef struct _CallbackList {
/* proc vectors */
-extern int (* InitialVector[3]) (ClientPtr /*client*/);
+extern _X_EXPORT int (* InitialVector[3]) (ClientPtr /*client*/);
-extern int (* ProcVector[256]) (ClientPtr /*client*/);
+extern _X_EXPORT int (* ProcVector[256]) (ClientPtr /*client*/);
-extern int (* SwappedProcVector[256]) (ClientPtr /*client*/);
+extern _X_EXPORT int (* SwappedProcVector[256]) (ClientPtr /*client*/);
-extern ReplySwapPtr ReplySwapVector[256];
+extern _X_EXPORT ReplySwapPtr ReplySwapVector[256];
-extern int ProcBadRequest(ClientPtr /*client*/);
+extern _X_EXPORT int ProcBadRequest(ClientPtr /*client*/);
#endif /* DIXSTRUCT_H */
diff --git a/xorg-server/include/do-not-use-config.h.in b/xorg-server/include/do-not-use-config.h.in
index 26b50bcaf..b2f19ed6b 100644
--- a/xorg-server/include/do-not-use-config.h.in
+++ b/xorg-server/include/do-not-use-config.h.in
@@ -265,6 +265,12 @@
/* Define to 1 if you have the `pci_device_enable' function. */
#undef HAVE_PCI_DEVICE_ENABLE
+/* Define to 1 if you have the `pci_device_is_boot_vga' function. */
+#undef HAVE_PCI_DEVICE_IS_BOOT_VGA
+
+/* Define to 1 if you have the `pci_device_vgaarb_init' function. */
+#undef HAVE_PCI_DEVICE_VGAARB_INIT
+
/* Define to 1 if you have the `pci_system_init_dev_mem' function. */
#undef HAVE_PCI_SYSTEM_INIT_DEV_MEM
@@ -307,6 +313,9 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if you have the <stropts.h> header file. */
+#undef HAVE_STROPTS_H
+
/* Define to 1 if you have the `strrchr' function. */
#undef HAVE_STRRCHR
@@ -316,6 +325,9 @@
/* Define to 1 if SYSV IPC is available */
#undef HAVE_SYSV_IPC
+/* Define to 1 if you have the <sys/agpgart.h> header file. */
+#undef HAVE_SYS_AGPGART_H
+
/* Define to 1 if you have the <sys/agpio.h> header file. */
#undef HAVE_SYS_AGPIO_H
@@ -348,6 +360,9 @@
/* Define to 1 if you have the <sys/vm86.h> header file. */
#undef HAVE_SYS_VM86_H
+/* Define to 1 if you have the <sys/vt.h> header file. */
+#undef HAVE_SYS_VT_H
+
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@@ -433,9 +448,6 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
/* Define to the version of this package. */
#undef PACKAGE_VERSION
@@ -522,6 +534,9 @@
/* Have tslib support */
#undef TSLIB
+/* Enable unit tests */
+#undef UNITTESTS
+
/* Support UNIX socket connections */
#undef UNIXCONN
@@ -540,6 +555,18 @@
/* Define to use byteswap macros from <sys/endian.h> */
#undef USE_SYS_ENDIAN_H
+/* Vendor man version */
+#undef VENDOR_MAN_VERSION
+
+/* Vendor name */
+#undef VENDOR_NAME
+
+/* Vendor name */
+#undef VENDOR_NAME_SHORT
+
+/* Vendor release */
+#undef VENDOR_RELEASE
+
/* Version number of package */
#undef VERSION
@@ -603,20 +630,26 @@
/* Support Xinerama extension */
#undef XINERAMA
-/* Build XKB */
-#undef XKB
-
/* Path to XKB data */
#undef XKB_BASE_DIRECTORY
/* Path to XKB bin dir */
#undef XKB_BIN_DIRECTORY
-/* Disable XKB per default */
-#undef XKB_DFLT_DISABLED
+/* Default XKB layout */
+#undef XKB_DFLT_LAYOUT
+
+/* Default XKB model */
+#undef XKB_DFLT_MODEL
-/* Build XKB server */
-#undef XKB_IN_SERVER
+/* Default XKB options */
+#undef XKB_DFLT_OPTIONS
+
+/* Default XKB ruleset */
+#undef XKB_DFLT_RULES
+
+/* Default XKB variant */
+#undef XKB_DFLT_VARIANT
/* Path to XKB output dir */
#undef XKM_OUTPUT_DIR
@@ -639,6 +672,9 @@
/* Have Quartz */
#undef XQUARTZ
+/* Support application updating through sparkle. */
+#undef XQUARTZ_SPARKLE
+
/* Support Record extension */
#undef XRECORD
@@ -694,18 +730,12 @@
/* Define to 1 if unsigned long is 64 bits. */
#undef _XSERVER64
-/* Solaris 8 or later */
-#undef __SOL8__
-
/* Vendor web address for support */
#undef __VENDORDWEBSUPPORT__
/* Name of configuration file */
#undef __XCONFIGFILE__
-/* Default XKB rules */
-#undef __XKBDEFRULES__
-
/* Name of X server */
#undef __XSERVERNAME__
diff --git a/xorg-server/include/eventconvert.h b/xorg-server/include/eventconvert.h
new file mode 100644
index 000000000..277a6c4b8
--- /dev/null
+++ b/xorg-server/include/eventconvert.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef _EVENTCONVERT_H_
+#include <X11/X.h>
+#include <X11/extensions/XIproto.h>
+#include "input.h"
+#include "events.h"
+
+#define FP1616(integral, frac) ((integral) * (1 << 16) + (frac) * (1 << 16))
+
+_X_INTERNAL int EventToCore(InternalEvent *event, xEvent *core);
+_X_INTERNAL int EventToXI(InternalEvent *ev, xEvent **xi, int *count);
+_X_INTERNAL int EventToXI2(InternalEvent *ev, xEvent **xi);
+_X_INTERNAL int GetCoreType(InternalEvent* ev);
+_X_INTERNAL int GetXIType(InternalEvent* ev);
+_X_INTERNAL int GetXI2Type(InternalEvent* ev);
+
+#endif /* _EVENTCONVERT_H_ */
diff --git a/xorg-server/include/events.h b/xorg-server/include/events.h
new file mode 100644
index 000000000..9f6a94c5b
--- /dev/null
+++ b/xorg-server/include/events.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef EVENTS_H
+#define EVENTS_H
+typedef struct _DeviceEvent DeviceEvent;
+typedef struct _DeviceChangedEvent DeviceChangedEvent;
+#if XFreeXDGA
+typedef struct _DGAEvent DGAEvent;
+#endif
+typedef struct _RawDeviceEvent RawDeviceEvent;
+typedef union _InternalEvent InternalEvent;
+
+#endif
diff --git a/xorg-server/include/eventstr.h b/xorg-server/include/eventstr.h
new file mode 100644
index 000000000..f082db34a
--- /dev/null
+++ b/xorg-server/include/eventstr.h
@@ -0,0 +1,232 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef EVENTSTR_H
+#define EVENTSTR_H
+
+#include <events.h>
+/**
+ * @file events.h
+ * This file describes the event structures used internally by the X
+ * server during event generation and event processing.
+ *
+ * When are internal events used?
+ * Events from input devices are stored as internal events in the EQ and
+ * processed as internal events until late in the processing cycle. Only then
+ * do they switch to their respective wire events.
+ */
+
+/**
+ * Event types. Used exclusively internal to the server, not visible on the
+ * protocol.
+ *
+ * Note: Keep KeyPress to Motion aligned with the core events.
+ * Keep ET_Raw* in the same order as KeyPress - Motion
+ */
+enum EventType {
+ ET_KeyPress = 2,
+ ET_KeyRelease,
+ ET_ButtonPress,
+ ET_ButtonRelease,
+ ET_Motion,
+ ET_Enter,
+ ET_Leave,
+ ET_FocusIn,
+ ET_FocusOut,
+ ET_ProximityIn,
+ ET_ProximityOut,
+ ET_DeviceChanged,
+ ET_Hierarchy,
+#if XFreeXDGA
+ ET_DGAEvent,
+#endif
+ ET_RawKeyPress,
+ ET_RawKeyRelease,
+ ET_RawButtonPress,
+ ET_RawButtonRelease,
+ ET_RawMotion,
+ ET_Internal = 0xFF /* First byte */
+};
+
+#define CHECKEVENT(ev) if (ev && ((InternalEvent*)(ev))->any.header != 0xFF) \
+ FatalError("Wrong event type %d.\n", \
+ ((InternalEvent*)(ev))->any.header);
+
+/**
+ * Used for ALL input device events internal in the server until
+ * copied into the matching protocol event.
+ *
+ * Note: We only use the device id because the DeviceIntPtr may become invalid while
+ * the event is in the EQ.
+ */
+struct _DeviceEvent
+{
+ unsigned char header; /**< Always ET_Internal */
+ enum EventType type; /**< One of EventType */
+ int length; /**< Length in bytes */
+ Time time; /**< Time in ms */
+ int deviceid; /**< Device to post this event for */
+ int sourceid; /**< The physical source device */
+ union {
+ uint32_t button; /**< Button number */
+ uint32_t key; /**< Key code */
+ } detail;
+ uint16_t root_x; /**< Pos relative to root window in integral data */
+ float root_x_frac; /**< Pos relative to root window in frac part */
+ uint16_t root_y; /**< Pos relative to root window in integral part */
+ float root_y_frac; /**< Pos relative to root window in frac part */
+ uint8_t buttons[(MAX_BUTTONS + 7)/8]; /**< Button mask */
+ struct {
+ uint8_t mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */
+ uint8_t mode[(MAX_VALUATORS + 7)/8]; /**< Valuator mode (Abs or Rel)*/
+ uint32_t data[MAX_VALUATORS]; /**< Valuator data */
+ int32_t data_frac[MAX_VALUATORS]; /**< Fractional part for data */
+ } valuators;
+ struct {
+ uint32_t base; /**< XKB base modifiers */
+ uint32_t latched; /**< XKB latched modifiers */
+ uint32_t locked; /**< XKB locked modifiers */
+ uint32_t effective;/**< XKB effective modifiers */
+ } mods;
+ struct {
+ uint8_t base; /**< XKB base group */
+ uint8_t latched; /**< XKB latched group */
+ uint8_t locked; /**< XKB locked group */
+ uint8_t effective;/**< XKB effective group */
+ } group;
+ Window root; /**< Root window of the event */
+ int corestate; /**< Core key/button state BEFORE the event */
+ int key_repeat; /**< Internally-generated key repeat event */
+};
+
+
+/* Flags used in DeviceChangedEvent to signal if the slave has changed */
+#define DEVCHANGE_SLAVE_SWITCH 0x2
+/* Flags used in DeviceChangedEvent to signal whether the event was a
+ * pointer event or a keyboard event */
+#define DEVCHANGE_POINTER_EVENT 0x4
+#define DEVCHANGE_KEYBOARD_EVENT 0x8
+/* device capabilities changed */
+#define DEVCHANGE_DEVICE_CHANGE 0x10
+
+/**
+ * Sent whenever a device's capabilities have changed.
+ */
+struct _DeviceChangedEvent
+{
+ unsigned char header; /**< Always ET_Internal */
+ enum EventType type; /**< ET_DeviceChanged */
+ int length; /**< Length in bytes */
+ Time time; /**< Time in ms */
+ int deviceid; /**< Device whose capabilities have changed */
+ int flags; /**< Mask of ::HAS_NEW_SLAVE,
+ ::POINTER_EVENT, ::KEYBOARD_EVENT */
+ int masterid; /**< MD when event was generated */
+ int sourceid; /**< The device that caused the change */
+
+ struct {
+ int num_buttons; /**< Number of buttons */
+ Atom names[MAX_BUTTONS];/**< Button names */
+ } buttons;
+
+ int num_valuators; /**< Number of axes */
+ struct {
+ uint32_t min; /**< Minimum value */
+ uint32_t max; /**< Maximum value */
+ /* FIXME: frac parts of min/max */
+ uint32_t resolution; /**< Resolution counts/m */
+ uint8_t mode; /**< Relative or Absolute */
+ Atom name; /**< Axis name */
+ } valuators[MAX_VALUATORS];
+
+ struct {
+ int min_keycode;
+ int max_keycode;
+ } keys;
+};
+
+#if XFreeXDGA
+/**
+ * DGAEvent, used by DGA to intercept and emulate input events.
+ */
+struct _DGAEvent
+{
+ unsigned char header; /**< Always ET_Internal */
+ enum EventType type; /**< ET_DGAEvent */
+ int length; /**< Length in bytes */
+ Time time; /**< Time in ms */
+ int subtype; /**< KeyPress, KeyRelease, ButtonPress,
+ ButtonRelease, MotionNotify */
+ int detail; /**< Relative x coordinate */
+ int dx; /**< Relative x coordinate */
+ int dy; /**< Relative y coordinate */
+ int screen; /**< Screen number this event applies to */
+ uint16_t state; /**< Core modifier/button state */
+};
+#endif
+
+/**
+ * Raw event, contains the data as posted by the device.
+ */
+struct _RawDeviceEvent
+{
+ unsigned char header; /**< Always ET_Internal */
+ enum EventType type; /**< ET_Raw */
+ int length; /**< Length in bytes */
+ Time time; /**< Time in ms */
+ int deviceid; /**< Device to post this event for */
+ int sourceid; /**< The physical source device */
+ union {
+ uint32_t button; /**< Button number */
+ uint32_t key; /**< Key code */
+ } detail;
+ struct {
+ uint8_t mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */
+ int32_t data[MAX_VALUATORS]; /**< Valuator data */
+ int32_t data_frac[MAX_VALUATORS]; /**< Fractional part for data */
+ int32_t data_raw[MAX_VALUATORS]; /**< Valuator data as posted */
+ int32_t data_raw_frac[MAX_VALUATORS];/**< Fractional part for data_raw */
+ } valuators;
+};
+
+/**
+ * Event type used inside the X server for input event
+ * processing.
+ */
+union _InternalEvent {
+ struct {
+ unsigned char header; /**< Always ET_Internal */
+ enum EventType type; /**< One of ET_* */
+ int length; /**< Length in bytes */
+ Time time; /**< Time in ms. */
+ } any;
+ DeviceEvent device;
+ DeviceChangedEvent changed;
+#if XFreeXDGA
+ DGAEvent dga;
+#endif
+ RawDeviceEvent raw;
+};
+
+#endif
diff --git a/xorg-server/include/exevents.h b/xorg-server/include/exevents.h
index 971afc2ea..39e1c70fe 100644
--- a/xorg-server/include/exevents.h
+++ b/xorg-server/include/exevents.h
@@ -31,6 +31,98 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define EXEVENTS_H
#include <X11/extensions/XIproto.h>
+#include "inputstr.h"
+
+/***************************************************************
+ * Interface available to drivers *
+ ***************************************************************/
+
+extern _X_EXPORT int InitProximityClassDeviceStruct(
+ DeviceIntPtr /* dev */);
+
+extern _X_EXPORT void InitValuatorAxisStruct(
+ DeviceIntPtr /* dev */,
+ int /* axnum */,
+ Atom /* label */,
+ int /* minval */,
+ int /* maxval */,
+ int /* resolution */,
+ int /* min_res */,
+ int /* max_res */);
+
+/* Input device properties */
+extern _X_EXPORT void XIDeleteAllDeviceProperties(
+ DeviceIntPtr /* device */
+);
+
+extern _X_EXPORT int XIDeleteDeviceProperty(
+ DeviceIntPtr /* device */,
+ Atom /* property */,
+ Bool /* fromClient */
+);
+
+extern _X_EXPORT int XIChangeDeviceProperty(
+ DeviceIntPtr /* dev */,
+ Atom /* property */,
+ Atom /* type */,
+ int /* format*/,
+ int /* mode*/,
+ unsigned long /* len*/,
+ pointer /* value*/,
+ Bool /* sendevent*/
+ );
+
+extern _X_EXPORT int XIGetDeviceProperty(
+ DeviceIntPtr /* dev */,
+ Atom /* property */,
+ XIPropertyValuePtr* /* value */
+);
+
+extern _X_EXPORT int XISetDevicePropertyDeletable(
+ DeviceIntPtr /* dev */,
+ Atom /* property */,
+ Bool /* deletable */
+);
+
+extern _X_EXPORT long XIRegisterPropertyHandler(
+ DeviceIntPtr dev,
+ int (*SetProperty) (DeviceIntPtr dev,
+ Atom property,
+ XIPropertyValuePtr prop,
+ BOOL checkonly),
+ int (*GetProperty) (DeviceIntPtr dev,
+ Atom property),
+ int (*DeleteProperty) (DeviceIntPtr dev,
+ Atom property)
+);
+
+extern _X_EXPORT void XIUnregisterPropertyHandler(
+ DeviceIntPtr dev,
+ long id
+);
+
+extern _X_EXPORT Atom XIGetKnownProperty(
+ char* name
+);
+
+extern _X_EXPORT DeviceIntPtr XIGetDevice(xEvent *ev);
+
+extern _X_EXPORT int XIPropToInt(
+ XIPropertyValuePtr val,
+ int *nelem_return,
+ int **buf_return
+);
+
+extern _X_EXPORT int XIPropToFloat(
+ XIPropertyValuePtr val,
+ int *nelem_return,
+ float **buf_return
+);
+
+/****************************************************************************
+ * End of driver interface *
+ ****************************************************************************/
+
/**
* Attached to the devPrivates of each client. Specifies the version number as
@@ -41,87 +133,100 @@ typedef struct _XIClientRec {
int minor_version;
} XIClientRec, *XIClientPtr;
-extern void RegisterOtherDevice (
+
+typedef struct _GrabParameters {
+ int grabtype; /* GRABTYPE_CORE, etc. */
+ unsigned int ownerEvents;
+ unsigned int this_device_mode;
+ unsigned int other_devices_mode;
+ Window grabWindow;
+ Window confineTo;
+ Cursor cursor;
+ unsigned int modifiers;
+} GrabParameters;
+
+
+extern void
+RegisterOtherDevice (
DeviceIntPtr /* device */);
extern int
UpdateDeviceState (
DeviceIntPtr /* device */,
- xEventPtr /* xE */,
- int /* count */);
+ DeviceEvent* /* xE */);
-extern void ProcessOtherEvent (
- xEventPtr /* FIXME deviceKeyButtonPointer * xE */,
- DeviceIntPtr /* other */,
- int /* count */);
+extern void
+ProcessOtherEvent (
+ InternalEvent* /* ev */,
+ DeviceIntPtr /* other */);
-extern int InitProximityClassDeviceStruct(
- DeviceIntPtr /* dev */);
-
-extern void InitValuatorAxisStruct(
- DeviceIntPtr /* dev */,
- int /* axnum */,
- int /* minval */,
- int /* maxval */,
- int /* resolution */,
- int /* min_res */,
- int /* max_res */);
-
-extern void DeviceFocusEvent(
+extern void
+DeviceFocusEvent(
DeviceIntPtr /* dev */,
int /* type */,
int /* mode */,
int /* detail */,
WindowPtr /* pWin */);
-extern int GrabButton(
+extern int
+CheckGrabValues(
+ ClientPtr /* client */,
+ GrabParameters* /* param */);
+
+extern int
+GrabButton(
ClientPtr /* client */,
DeviceIntPtr /* dev */,
- BYTE /* this_device_mode */,
- BYTE /* other_devices_mode */,
- CARD16 /* modifiers */,
DeviceIntPtr /* modifier_device */,
- CARD8 /* button */,
- Window /* grabWindow */,
- BOOL /* ownerEvents */,
- Cursor /* rcursor */,
- Window /* rconfineTo */,
- Mask /* eventMask */);
-
-extern int GrabKey(
+ int /* button */,
+ GrabParameters* /* param */,
+ GrabType /* grabtype */,
+ GrabMask* /* eventMask */);
+
+extern int
+GrabKey(
ClientPtr /* client */,
DeviceIntPtr /* dev */,
- BYTE /* this_device_mode */,
- BYTE /* other_devices_mode */,
- CARD16 /* modifiers */,
DeviceIntPtr /* modifier_device */,
- CARD8 /* key */,
- Window /* grabWindow */,
- BOOL /* ownerEvents */,
- Mask /* mask */);
+ int /* key */,
+ GrabParameters* /* param */,
+ GrabType /* grabtype */,
+ GrabMask* /* eventMask */);
+
+extern int
+GrabWindow(
+ ClientPtr /* client */,
+ DeviceIntPtr /* dev */,
+ int /* type */,
+ GrabParameters* /* param */,
+ GrabMask* /* eventMask */);
-extern int SelectForWindow(
+extern int
+SelectForWindow(
DeviceIntPtr /* dev */,
WindowPtr /* pWin */,
ClientPtr /* client */,
Mask /* mask */,
- Mask /* exclusivemasks */,
- Mask /* validmasks */);
+ Mask /* exclusivemasks */);
-extern int AddExtensionClient (
+extern int
+AddExtensionClient (
WindowPtr /* pWin */,
ClientPtr /* client */,
Mask /* mask */,
int /* mskidx */);
-extern void RecalculateDeviceDeliverableEvents(
+extern void
+RecalculateDeviceDeliverableEvents(
WindowPtr /* pWin */);
-extern int InputClientGone(
+extern int
+InputClientGone(
WindowPtr /* pWin */,
XID /* id */);
-extern int SendEvent (
+extern int
+SendEvent (
ClientPtr /* client */,
DeviceIntPtr /* d */,
Window /* dest */,
@@ -130,29 +235,15 @@ extern int SendEvent (
Mask /* mask */,
int /* count */);
-extern int SetButtonMapping (
+extern int
+SetButtonMapping (
ClientPtr /* client */,
DeviceIntPtr /* dev */,
int /* nElts */,
BYTE * /* map */);
-extern int SetModifierMapping(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- int /* len */,
- int /* rlen */,
- int /* numKeyPerModifier */,
- KeyCode * /* inputMap */,
- KeyClassPtr * /* k */);
-
-extern void SendDeviceMappingNotify(
- ClientPtr /* client, */,
- CARD8 /* request, */,
- KeyCode /* firstKeyCode */,
- CARD8 /* count */,
- DeviceIntPtr /* dev */);
-
-extern int ChangeKeyMapping(
+extern int
+ChangeKeyMapping(
ClientPtr /* client */,
DeviceIntPtr /* dev */,
unsigned /* len */,
@@ -162,15 +253,18 @@ extern int ChangeKeyMapping(
CARD8 /* keySymsPerKeyCode */,
KeySym * /* map */);
-extern void DeleteWindowFromAnyExtEvents(
+extern void
+DeleteWindowFromAnyExtEvents(
WindowPtr /* pWin */,
Bool /* freeResources */);
-extern int MaybeSendDeviceMotionNotifyHint (
+extern int
+MaybeSendDeviceMotionNotifyHint (
deviceKeyButtonPointer * /* pEvents */,
Mask /* mask */);
-extern void CheckDeviceGrabAndHintWindow (
+extern void
+CheckDeviceGrabAndHintWindow (
WindowPtr /* pWin */,
int /* type */,
deviceKeyButtonPointer * /* xE */,
@@ -178,89 +272,44 @@ extern void CheckDeviceGrabAndHintWindow (
ClientPtr /* client */,
Mask /* deliveryMask */);
-extern void MaybeStopDeviceHint(
+extern void
+MaybeStopDeviceHint(
DeviceIntPtr /* dev */,
ClientPtr /* client */);
-extern int DeviceEventSuppressForWindow(
+extern int
+DeviceEventSuppressForWindow(
WindowPtr /* pWin */,
ClientPtr /* client */,
Mask /* mask */,
int /* maskndx */);
-extern void SendEventToAllWindows(
+extern void
+SendEventToAllWindows(
DeviceIntPtr /* dev */,
Mask /* mask */,
xEvent * /* ev */,
int /* count */);
-/* Input device properties */
-extern void XIDeleteAllDeviceProperties(
- DeviceIntPtr /* device */
-);
+extern _X_HIDDEN void XI2EventSwap(
+ xGenericEvent * /* from */,
+ xGenericEvent * /* to */);
-extern int XIDeleteDeviceProperty(
- DeviceIntPtr /* device */,
- Atom /* property */,
- Bool /* fromClient */
-);
-
-extern int XIChangeDeviceProperty(
- DeviceIntPtr /* dev */,
- Atom /* property */,
- Atom /* type */,
- int /* format*/,
- int /* mode*/,
- unsigned long /* len*/,
- pointer /* value*/,
- Bool /* sendevent*/
- );
-
-extern int XIGetDeviceProperty(
- DeviceIntPtr /* dev */,
- Atom /* property */,
- XIPropertyValuePtr* /* value */
-);
-
-extern int XISetDevicePropertyDeletable(
- DeviceIntPtr /* dev */,
- Atom /* property */,
- Bool /* deletable */
-);
-
-extern long XIRegisterPropertyHandler(
- DeviceIntPtr dev,
- int (*SetProperty) (DeviceIntPtr dev,
- Atom property,
- XIPropertyValuePtr prop,
- BOOL checkonly),
- int (*GetProperty) (DeviceIntPtr dev,
- Atom property),
- int (*DeleteProperty) (DeviceIntPtr dev,
- Atom property)
-);
-
-extern _X_EXPORT void XIUnregisterPropertyHandler(
- DeviceIntPtr dev,
- long id
-);
-
-extern Atom XIGetKnownProperty(
- char* name
-);
+/* For an event such as MappingNotify which affects client interpretation
+ * of input events sent by device dev, should we notify the client, or
+ * would it merely be irrelevant and confusing? */
+extern int
+XIShouldNotify(ClientPtr client, DeviceIntPtr dev);
-extern DeviceIntPtr XIGetDevice(xEvent *ev);
+extern void
+XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master,
+ DeviceChangedEvent *dce);
-extern _X_EXPORT int XIPropToInt(
- XIPropertyValuePtr val,
- int *nelem_return,
- int **buf_return
-);
+extern int
+XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,
+ unsigned int len, unsigned char* mask);
-extern _X_EXPORT int XIPropToFloat(
- XIPropertyValuePtr val,
- int *nelem_return,
- float **buf_return
-);
+extern int
+XICheckInvalidMaskBits(unsigned char *mask, int len);
#endif /* EXEVENTS_H */
diff --git a/xorg-server/include/extension.h b/xorg-server/include/extension.h
index 14526e9b5..29a11c300 100644
--- a/xorg-server/include/extension.h
+++ b/xorg-server/include/extension.h
@@ -50,17 +50,17 @@ SOFTWARE.
_XFUNCPROTOBEGIN
-extern unsigned short StandardMinorOpcode(ClientPtr /*client*/);
+extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client*/);
-extern unsigned short MinorOpcodeOfRequest(ClientPtr /*client*/);
+extern _X_EXPORT unsigned short MinorOpcodeOfRequest(ClientPtr /*client*/);
-extern Bool EnableDisableExtension(char *name, Bool enable);
+extern _X_EXPORT Bool EnableDisableExtension(char *name, Bool enable);
-extern void EnableDisableExtensionError(char *name, Bool enable);
+extern _X_EXPORT void EnableDisableExtensionError(char *name, Bool enable);
-extern void InitExtensions(int argc, char **argv);
+extern _X_EXPORT void InitExtensions(int argc, char **argv);
-extern void CloseDownExtensions(void);
+extern _X_EXPORT void CloseDownExtensions(void);
_XFUNCPROTOEND
diff --git a/xorg-server/include/extinit.h b/xorg-server/include/extinit.h
index d9964805e..c3aa7b681 100644
--- a/xorg-server/include/extinit.h
+++ b/xorg-server/include/extinit.h
@@ -32,17 +32,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "extnsionst.h"
-void
+extern void
XInputExtensionInit(
void
);
-Bool
-DeviceIsPointerType(
- DeviceIntPtr dev
- );
-
-void
+extern _X_EXPORT void
AssignTypeAndName (
DeviceIntPtr /* dev */,
Atom /* type */,
diff --git a/xorg-server/include/extnsionst.h b/xorg-server/include/extnsionst.h
index 59acd0ef4..19c76fcc4 100644
--- a/xorg-server/include/extnsionst.h
+++ b/xorg-server/include/extnsionst.h
@@ -80,9 +80,9 @@ typedef struct _ExtensionEntry {
*/
typedef void (*EventSwapPtr) (xEvent *, xEvent *);
-extern EventSwapPtr EventSwapVector[128];
+extern _X_EXPORT EventSwapPtr EventSwapVector[128];
-extern void NotImplemented ( /* FIXME: this may move to another file... */
+extern _X_EXPORT void NotImplemented ( /* FIXME: this may move to another file... */
xEvent *,
xEvent *);
@@ -91,7 +91,7 @@ extern void NotImplemented ( /* FIXME: this may move to another file... */
#define GetGCValue(pGC, GCElement) (pGC->GCElement)
-extern ExtensionEntry *AddExtension(
+extern _X_EXPORT ExtensionEntry *AddExtension(
char* /*name*/,
int /*NumEvents*/,
int /*NumErrors*/,
@@ -101,12 +101,12 @@ extern ExtensionEntry *AddExtension(
unsigned short (* /*MinorOpcodeProc*/)(ClientPtr /*client*/)
);
-extern Bool AddExtensionAlias(
+extern _X_EXPORT Bool AddExtensionAlias(
char* /*alias*/,
ExtensionEntry * /*extension*/);
-extern ExtensionEntry *CheckExtension(const char *extname);
-extern ExtensionEntry *GetExtensionEntry(int major);
+extern _X_EXPORT ExtensionEntry *CheckExtension(const char *extname);
+extern _X_EXPORT ExtensionEntry *GetExtensionEntry(int major);
#endif /* EXTENSIONSTRUCT_H */
diff --git a/xorg-server/include/gc.h b/xorg-server/include/gc.h
index bf4c268a8..e75cc5e83 100644
--- a/xorg-server/include/gc.h
+++ b/xorg-server/include/gc.h
@@ -84,16 +84,16 @@ typedef struct _GCInterest *GCInterestPtr;
typedef struct _GC *GCPtr;
typedef struct _GCOps *GCOpsPtr;
-extern void ValidateGC(
+extern _X_EXPORT void ValidateGC(
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/);
-extern int ChangeGC(
+extern _X_EXPORT int ChangeGC(
GCPtr/*pGC*/,
BITS32 /*mask*/,
XID* /*pval*/);
-extern int DoChangeGC(
+extern _X_EXPORT int DoChangeGC(
GCPtr/*pGC*/,
BITS32 /*mask*/,
XID* /*pval*/,
@@ -104,14 +104,14 @@ typedef union {
pointer ptr;
} ChangeGCVal, *ChangeGCValPtr;
-extern int dixChangeGC(
+extern _X_EXPORT int dixChangeGC(
ClientPtr /*client*/,
GCPtr /*pGC*/,
BITS32 /*mask*/,
CARD32 * /*pval*/,
ChangeGCValPtr /*pCGCV*/);
-extern GCPtr CreateGC(
+extern _X_EXPORT GCPtr CreateGC(
DrawablePtr /*pDrawable*/,
BITS32 /*mask*/,
XID* /*pval*/,
@@ -119,43 +119,43 @@ extern GCPtr CreateGC(
XID /*gcid*/,
ClientPtr /*client*/);
-extern int CopyGC(
+extern _X_EXPORT int CopyGC(
GCPtr/*pgcSrc*/,
GCPtr/*pgcDst*/,
BITS32 /*mask*/);
-extern int FreeGC(
+extern _X_EXPORT int FreeGC(
pointer /*pGC*/,
XID /*gid*/);
-extern GCPtr CreateScratchGC(
+extern _X_EXPORT GCPtr CreateScratchGC(
ScreenPtr /*pScreen*/,
unsigned /*depth*/);
-extern void FreeGCperDepth(
+extern _X_EXPORT void FreeGCperDepth(
int /*screenNum*/);
-extern Bool CreateGCperDepth(
+extern _X_EXPORT Bool CreateGCperDepth(
int /*screenNum*/);
-extern Bool CreateDefaultStipple(
+extern _X_EXPORT Bool CreateDefaultStipple(
int /*screenNum*/);
-extern void FreeDefaultStipple(
+extern _X_EXPORT void FreeDefaultStipple(
int /*screenNum*/);
-extern int SetDashes(
+extern _X_EXPORT int SetDashes(
GCPtr /*pGC*/,
unsigned /*offset*/,
unsigned /*ndash*/,
unsigned char* /*pdash*/);
-extern int VerifyRectOrder(
+extern _X_EXPORT int VerifyRectOrder(
int /*nrects*/,
xRectangle* /*prects*/,
int /*ordering*/);
-extern int SetClipRects(
+extern _X_EXPORT int SetClipRects(
GCPtr /*pGC*/,
int /*xOrigin*/,
int /*yOrigin*/,
@@ -163,11 +163,11 @@ extern int SetClipRects(
xRectangle* /*prects*/,
int /*ordering*/);
-extern GCPtr GetScratchGC(
+extern _X_EXPORT GCPtr GetScratchGC(
unsigned /*depth*/,
ScreenPtr /*pScreen*/);
-extern void FreeScratchGC(
+extern _X_EXPORT void FreeScratchGC(
GCPtr /*pGC*/);
#endif /* GC_H */
diff --git a/xorg-server/include/globals.h b/xorg-server/include/globals.h
index c3d2dcfa2..52c19a490 100644
--- a/xorg-server/include/globals.h
+++ b/xorg-server/include/globals.h
@@ -6,135 +6,129 @@
/* Global X server variables that are visible to mi, dix, os, and ddx */
-extern CARD32 defaultScreenSaverTime;
-extern CARD32 defaultScreenSaverInterval;
-extern CARD32 ScreenSaverTime;
-extern CARD32 ScreenSaverInterval;
+extern _X_EXPORT CARD32 defaultScreenSaverTime;
+extern _X_EXPORT CARD32 defaultScreenSaverInterval;
+extern _X_EXPORT CARD32 ScreenSaverTime;
+extern _X_EXPORT CARD32 ScreenSaverInterval;
#ifdef SCREENSAVER
-extern Bool screenSaverSuspended;
+extern _X_EXPORT Bool screenSaverSuspended;
#endif
-extern char *defaultFontPath;
-extern int monitorResolution;
-extern int defaultColorVisualClass;
+extern _X_EXPORT char *defaultFontPath;
+extern _X_EXPORT int monitorResolution;
+extern _X_EXPORT int defaultColorVisualClass;
-extern WindowPtr WindowTable[MAXSCREENS];
-extern int GrabInProgress;
-extern Bool noTestExtensions;
+extern _X_EXPORT WindowPtr WindowTable[MAXSCREENS];
+extern _X_EXPORT int GrabInProgress;
+extern _X_EXPORT Bool noTestExtensions;
-extern DDXPointRec dixScreenOrigins[MAXSCREENS];
+extern _X_EXPORT DDXPointRec dixScreenOrigins[MAXSCREENS];
-extern char *ConnectionInfo;
+extern _X_EXPORT char *ConnectionInfo;
#ifdef DPMSExtension
-extern CARD32 defaultDPMSStandbyTime;
-extern CARD32 defaultDPMSSuspendTime;
-extern CARD32 defaultDPMSOffTime;
-extern CARD32 DPMSStandbyTime;
-extern CARD32 DPMSSuspendTime;
-extern CARD32 DPMSOffTime;
-extern CARD16 DPMSPowerLevel;
-extern Bool defaultDPMSEnabled;
-extern Bool DPMSEnabled;
-extern Bool DPMSEnabledSwitch;
-extern Bool DPMSDisabledSwitch;
-extern Bool DPMSCapableFlag;
+extern _X_EXPORT CARD32 DPMSStandbyTime;
+extern _X_EXPORT CARD32 DPMSSuspendTime;
+extern _X_EXPORT CARD32 DPMSOffTime;
+extern _X_EXPORT CARD16 DPMSPowerLevel;
+extern _X_EXPORT Bool DPMSEnabled;
+extern _X_EXPORT Bool DPMSDisabledSwitch;
+extern _X_EXPORT Bool DPMSCapableFlag;
#endif
#ifdef PANORAMIX
-extern Bool PanoramiXExtensionDisabledHack;
+extern _X_EXPORT Bool PanoramiXExtensionDisabledHack;
#endif
#ifdef COMPOSITE
-extern Bool noCompositeExtension;
+extern _X_EXPORT Bool noCompositeExtension;
#endif
#ifdef DAMAGE
-extern Bool noDamageExtension;
+extern _X_EXPORT Bool noDamageExtension;
#endif
#ifdef DBE
-extern Bool noDbeExtension;
+extern _X_EXPORT Bool noDbeExtension;
#endif
#ifdef DPMSExtension
-extern Bool noDPMSExtension;
+extern _X_EXPORT Bool noDPMSExtension;
#endif
#ifdef GLXEXT
-extern Bool noGlxExtension;
+extern _X_EXPORT Bool noGlxExtension;
#endif
#ifdef SCREENSAVER
-extern Bool noScreenSaverExtension;
+extern _X_EXPORT Bool noScreenSaverExtension;
#endif
#ifdef MITSHM
-extern Bool noMITShmExtension;
+extern _X_EXPORT Bool noMITShmExtension;
#endif
#ifdef MULTIBUFFER
-extern Bool noMultibufferExtension;
+extern _X_EXPORT Bool noMultibufferExtension;
#endif
#ifdef RANDR
-extern Bool noRRExtension;
+extern _X_EXPORT Bool noRRExtension;
#endif
#ifdef RENDER
-extern Bool noRenderExtension;
+extern _X_EXPORT Bool noRenderExtension;
#endif
#ifdef XCSECURITY
-extern Bool noSecurityExtension;
+extern _X_EXPORT Bool noSecurityExtension;
#endif
#ifdef RES
-extern Bool noResExtension;
+extern _X_EXPORT Bool noResExtension;
#endif
#ifdef XF86BIGFONT
-extern Bool noXFree86BigfontExtension;
+extern _X_EXPORT Bool noXFree86BigfontExtension;
#endif
#ifdef XFreeXDGA
-extern Bool noXFree86DGAExtension;
+extern _X_EXPORT Bool noXFree86DGAExtension;
#endif
#ifdef XF86DRI
-extern Bool noXFree86DRIExtension;
+extern _X_EXPORT Bool noXFree86DRIExtension;
#endif
#ifdef XF86VIDMODE
-extern Bool noXFree86VidModeExtension;
+extern _X_EXPORT Bool noXFree86VidModeExtension;
#endif
#ifdef XFIXES
-extern Bool noXFixesExtension;
-#endif
-
-#ifdef XKB
-/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */
-extern Bool noXkbExtension;
+extern _X_EXPORT Bool noXFixesExtension;
#endif
#ifdef PANORAMIX
-extern Bool noPanoramiXExtension;
+extern _X_EXPORT Bool noPanoramiXExtension;
#endif
#ifdef XSELINUX
-extern Bool noSELinuxExtension;
+extern _X_EXPORT Bool noSELinuxExtension;
#define SELINUX_MODE_DEFAULT 0
#define SELINUX_MODE_DISABLED 1
#define SELINUX_MODE_PERMISSIVE 2
#define SELINUX_MODE_ENFORCING 3
-extern int selinuxEnforcingState;
+extern _X_EXPORT int selinuxEnforcingState;
#endif
#ifdef XV
-extern Bool noXvExtension;
+extern _X_EXPORT Bool noXvExtension;
+#endif
+
+#ifdef DRI2
+extern _X_EXPORT Bool noDRI2Extension;
#endif
#endif /* !_XSERV_GLOBAL_H_ */
diff --git a/xorg-server/include/hotplug.h b/xorg-server/include/hotplug.h
index b4f1bb60d..d074df31d 100644
--- a/xorg-server/include/hotplug.h
+++ b/xorg-server/include/hotplug.h
@@ -26,7 +26,7 @@
#ifndef HOTPLUG_H
#define HOTPLUG_H
-void config_init(void);
-void config_fini(void);
+extern _X_EXPORT void config_init(void);
+extern _X_EXPORT void config_fini(void);
#endif /* HOTPLUG_H */
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h
index 2ab815b80..7ab5e9d65 100644
--- a/xorg-server/include/input.h
+++ b/xorg-server/include/input.h
@@ -53,6 +53,8 @@ SOFTWARE.
#include <X11/Xmd.h>
#include <X11/Xproto.h>
#include "window.h" /* for WindowPtr */
+#include "xkbrules.h"
+#include "events.h"
#define DEVICE_INIT 0
#define DEVICE_ON 1
@@ -74,6 +76,7 @@ SOFTWARE.
/* Maximum number of valuators, divided by six, rounded up, to get number
* of events. */
#define MAX_VALUATOR_EVENTS 6
+#define MAX_BUTTONS 256 /* completely arbitrarily chosen */
#define NO_AXIS_LIMITS -1
@@ -94,34 +97,21 @@ SOFTWARE.
#define RevertToFollowKeyboard 3
#endif
-/* Used for enter/leave and focus in/out semaphores */
-#define SEMAPHORE_FIELD_SET(win, dev, field) \
- (win)->field[(dev)->id/8] |= (1 << ((dev)->id % 8)); \
-
-#define SEMAPHORE_FIELD_UNSET(win, dev, field) \
- (win)->field[(dev)->id/8] &= ~(1 << ((dev)->id % 8));
-
-#define FOCUS_SEMAPHORE_SET(win, dev) \
- SEMAPHORE_FIELD_SET(win, dev, focusinout);
-
-#define FOCUS_SEMAPHORE_UNSET(win, dev) \
- SEMAPHORE_FIELD_UNSET(win, dev, focusinout);
-
-#define FOCUS_SEMAPHORE_ISSET(win, dev) \
- (win)->focusinout[(dev)->id/8] & (1 << ((dev)->id % 8))
-
typedef unsigned long Leds;
typedef struct _OtherClients *OtherClientsPtr;
typedef struct _InputClients *InputClientsPtr;
typedef struct _DeviceIntRec *DeviceIntPtr;
typedef struct _ClassesRec *ClassesPtr;
+typedef union _GrabMask GrabMask;
typedef struct _EventList {
xEvent* event;
int evlen; /* length of allocated memory for event in bytes. This is not
the actual length of the event. The event's actual length is
32 for standard events or 32 +
- ((xGenericEvent*)event)->length * 4 for GenericEvents */
+ ((xGenericEvent*)event)->length * 4 for GenericEvents.
+ For events in the EQ, the length is
+ ((InternalEvent*)event)->u.any.length */
} EventList, *EventListPtr;
/* The DIX stores incoming input events in this list */
@@ -133,9 +123,8 @@ typedef int (*DeviceProc)(
int /*what*/);
typedef void (*ProcessInputProc)(
- xEventPtr /*events*/,
- DeviceIntPtr /*device*/,
- int /*count*/);
+ InternalEvent * /*event*/,
+ DeviceIntPtr /*device*/);
typedef Bool (*DeviceHandleProc)(
DeviceIntPtr /*device*/,
@@ -212,8 +201,8 @@ typedef struct {
unsigned char id;
} LedCtrl;
-extern KeybdCtrl defaultKeyboardControl;
-extern PtrCtrl defaultPointerControl;
+extern _X_EXPORT KeybdCtrl defaultKeyboardControl;
+extern _X_EXPORT PtrCtrl defaultPointerControl;
typedef struct _InputOption {
char *key;
@@ -221,21 +210,34 @@ typedef struct _InputOption {
struct _InputOption *next;
} InputOption;
+/* Key has been run through all input processing and events sent to clients. */
+#define KEY_PROCESSED 1
+/* Key has not been fully processed, no events have been sent. */
+#define KEY_POSTED 2
+
+extern void set_key_down(DeviceIntPtr pDev, int key_code, int type);
+extern void set_key_up(DeviceIntPtr pDev, int key_code, int type);
+extern int key_is_down(DeviceIntPtr pDev, int key_code, int type);
+
extern void InitCoreDevices(void);
+extern void InitXTestDevices(void);
-extern DeviceIntPtr AddInputDevice(
+extern _X_EXPORT DeviceIntPtr AddInputDevice(
ClientPtr /*client*/,
DeviceProc /*deviceProc*/,
Bool /*autoStart*/);
-extern Bool EnableDevice(
- DeviceIntPtr /*device*/);
+extern _X_EXPORT Bool EnableDevice(
+ DeviceIntPtr /*device*/,
+ BOOL /* sendevent */);
-extern Bool ActivateDevice(
- DeviceIntPtr /*device*/);
+extern _X_EXPORT Bool ActivateDevice(
+ DeviceIntPtr /*device*/,
+ BOOL /* sendevent */);
-extern Bool DisableDevice(
- DeviceIntPtr /*device*/);
+extern _X_EXPORT Bool DisableDevice(
+ DeviceIntPtr /*device*/,
+ BOOL /* sendevent */);
extern int InitAndStartDevices(void);
@@ -243,10 +245,11 @@ extern void CloseDownDevices(void);
extern void UndisplayDevices(void);
-extern int RemoveDevice(
- DeviceIntPtr /*dev*/);
+extern _X_EXPORT int RemoveDevice(
+ DeviceIntPtr /*dev*/,
+ BOOL /* sendevent */);
-extern int NumMotionEvents(void);
+extern _X_EXPORT int NumMotionEvents(void);
extern void RegisterPointerDevice(
DeviceIntPtr /*device*/);
@@ -254,44 +257,41 @@ extern void RegisterPointerDevice(
extern void RegisterKeyboardDevice(
DeviceIntPtr /*device*/);
-extern int dixLookupDevice(
+extern _X_EXPORT int dixLookupDevice(
DeviceIntPtr * /* dev */,
int /* id */,
ClientPtr /* client */,
Mask /* access_mode */);
-extern void QueryMinMaxKeyCodes(
+extern _X_EXPORT void QueryMinMaxKeyCodes(
KeyCode* /*minCode*/,
KeyCode* /*maxCode*/);
-extern Bool SetKeySymsMap(
+extern _X_EXPORT Bool SetKeySymsMap(
KeySymsPtr /*dst*/,
KeySymsPtr /*src*/);
-extern Bool InitKeyClassDeviceStruct(
- DeviceIntPtr /*device*/,
- KeySymsPtr /*pKeySyms*/,
- CARD8 /*pModifiers*/[]);
-
-extern Bool InitButtonClassDeviceStruct(
+extern _X_EXPORT Bool InitButtonClassDeviceStruct(
DeviceIntPtr /*device*/,
int /*numButtons*/,
+ Atom* /* labels */,
CARD8* /*map*/);
-extern Bool InitValuatorClassDeviceStruct(
+extern _X_EXPORT Bool InitValuatorClassDeviceStruct(
DeviceIntPtr /*device*/,
int /*numAxes*/,
+ Atom* /* labels */,
int /*numMotionEvents*/,
int /*mode*/);
-extern Bool InitPointerAccelerationScheme(
+extern _X_EXPORT Bool InitPointerAccelerationScheme(
DeviceIntPtr /*dev*/,
int /*scheme*/);
-extern Bool InitAbsoluteClassDeviceStruct(
+extern _X_EXPORT Bool InitAbsoluteClassDeviceStruct(
DeviceIntPtr /*device*/);
-extern Bool InitFocusClassDeviceStruct(
+extern _X_EXPORT Bool InitFocusClassDeviceStruct(
DeviceIntPtr /*device*/);
typedef void (*BellProcPtr)(
@@ -304,16 +304,11 @@ typedef void (*KbdCtrlProcPtr)(
DeviceIntPtr /*device*/,
KeybdCtrl * /*ctrl*/);
-extern Bool InitKbdFeedbackClassDeviceStruct(
- DeviceIntPtr /*device*/,
- BellProcPtr /*bellProc*/,
- KbdCtrlProcPtr /*controlProc*/);
-
typedef void (*PtrCtrlProcPtr)(
DeviceIntPtr /*device*/,
PtrCtrl * /*ctrl*/);
-extern Bool InitPtrFeedbackClassDeviceStruct(
+extern _X_EXPORT Bool InitPtrFeedbackClassDeviceStruct(
DeviceIntPtr /*device*/,
PtrCtrlProcPtr /*controlProc*/);
@@ -321,7 +316,7 @@ typedef void (*StringCtrlProcPtr)(
DeviceIntPtr /*device*/,
StringCtrl * /*ctrl*/);
-extern Bool InitStringFeedbackClassDeviceStruct(
+extern _X_EXPORT Bool InitStringFeedbackClassDeviceStruct(
DeviceIntPtr /*device*/,
StringCtrlProcPtr /*controlProc*/,
int /*max_symbols*/,
@@ -332,7 +327,7 @@ typedef void (*BellCtrlProcPtr)(
DeviceIntPtr /*device*/,
BellCtrl * /*ctrl*/);
-extern Bool InitBellFeedbackClassDeviceStruct(
+extern _X_EXPORT Bool InitBellFeedbackClassDeviceStruct(
DeviceIntPtr /*device*/,
BellProcPtr /*bellProc*/,
BellCtrlProcPtr /*controlProc*/);
@@ -341,7 +336,7 @@ typedef void (*LedCtrlProcPtr)(
DeviceIntPtr /*device*/,
LedCtrl * /*ctrl*/);
-extern Bool InitLedFeedbackClassDeviceStruct(
+extern _X_EXPORT Bool InitLedFeedbackClassDeviceStruct(
DeviceIntPtr /*device*/,
LedCtrlProcPtr /*controlProc*/);
@@ -350,30 +345,30 @@ typedef void (*IntegerCtrlProcPtr)(
IntegerCtrl * /*ctrl*/);
-extern Bool InitIntegerFeedbackClassDeviceStruct(
+extern _X_EXPORT Bool InitIntegerFeedbackClassDeviceStruct(
DeviceIntPtr /*device*/,
IntegerCtrlProcPtr /*controlProc*/);
-extern Bool InitPointerDeviceStruct(
+extern _X_EXPORT Bool InitPointerDeviceStruct(
DevicePtr /*device*/,
CARD8* /*map*/,
int /*numButtons*/,
+ Atom* /* btn_labels */,
PtrCtrlProcPtr /*controlProc*/,
int /*numMotionEvents*/,
- int /*numAxes*/);
+ int /*numAxes*/,
+ Atom* /* axes_labels */);
-extern Bool InitKeyboardDeviceStruct(
- DevicePtr /*device*/,
- KeySymsPtr /*pKeySyms*/,
- CARD8 /*pModifiers*/[],
+extern _X_EXPORT Bool InitKeyboardDeviceStruct(
+ DeviceIntPtr /*device*/,
+ XkbRMLVOSet * /*rmlvo*/,
BellProcPtr /*bellProc*/,
KbdCtrlProcPtr /*controlProc*/);
-extern void SendMappingNotify(
+extern int ApplyPointerMapping(
DeviceIntPtr /* pDev */,
- unsigned int /*request*/,
- unsigned int /*firstKeyCode*/,
- unsigned int /*count*/,
+ CARD8 * /* map */,
+ int /* len */,
ClientPtr /* client */);
extern Bool BadDeviceMap(
@@ -383,13 +378,6 @@ extern Bool BadDeviceMap(
unsigned /*high*/,
XID* /*errval*/);
-extern Bool AllModifierKeysAreUp(
- DeviceIntPtr /*device*/,
- CARD8* /*map1*/,
- int /*per1*/,
- CARD8* /*map2*/,
- int /*per2*/);
-
extern void NoteLedState(
DeviceIntPtr /*keybd*/,
int /*led*/,
@@ -400,49 +388,36 @@ extern void MaybeStopHint(
ClientPtr /*client*/);
extern void ProcessPointerEvent(
- xEventPtr /*xE*/,
- DeviceIntPtr /*mouse*/,
- int /*count*/);
+ InternalEvent* /* ev */,
+ DeviceIntPtr /*mouse*/);
extern void ProcessKeyboardEvent(
- xEventPtr /*xE*/,
- DeviceIntPtr /*keybd*/,
- int /*count*/);
-
-#ifdef XKB
-extern void CoreProcessPointerEvent(
- xEventPtr /*xE*/,
- DeviceIntPtr /*mouse*/,
- int /*count*/) _X_DEPRECATED;
-
-extern _X_DEPRECATED void CoreProcessKeyboardEvent(
- xEventPtr /*xE*/,
- DeviceIntPtr /*keybd*/,
- int /*count*/) _X_DEPRECATED;
-#endif
+ InternalEvent* /*ev*/,
+ DeviceIntPtr /*keybd*/);
extern Bool LegalModifier(
unsigned int /*key*/,
DeviceIntPtr /*pDev*/);
-extern void ProcessInputEvents(void);
+extern _X_EXPORT void ProcessInputEvents(void);
-extern void InitInput(
+extern _X_EXPORT void InitInput(
int /*argc*/,
char ** /*argv*/);
-extern int GetMaximumEventsNum(void);
+extern _X_EXPORT int GetMaximumEventsNum(void);
-extern int GetEventList(EventListPtr* list);
-extern EventListPtr InitEventList(int num_events);
-extern void SetMinimumEventSize(EventListPtr list,
+extern _X_EXPORT int GetEventList(EventListPtr* list);
+extern _X_EXPORT EventListPtr InitEventList(int num_events);
+extern _X_EXPORT void SetMinimumEventSize(EventListPtr list,
int num_events,
int min_size);
-extern void FreeEventList(EventListPtr list, int num_events);
+extern _X_EXPORT void FreeEventList(EventListPtr list, int num_events);
-extern void CreateClassesChangedEvent(EventListPtr event,
+extern void CreateClassesChangedEvent(EventListPtr event,
DeviceIntPtr master,
- DeviceIntPtr slave);
+ DeviceIntPtr slave,
+ int type);
extern int GetPointerEvents(
EventListPtr events,
DeviceIntPtr pDev,
@@ -483,13 +458,13 @@ extern void PostSyntheticMotion(
int screen,
unsigned long time);
-extern int GetMotionHistorySize(
+extern _X_EXPORT int GetMotionHistorySize(
void);
-extern void AllocateMotionHistory(
+extern _X_EXPORT void AllocateMotionHistory(
DeviceIntPtr pDev);
-extern int GetMotionHistory(
+extern _X_EXPORT int GetMotionHistory(
DeviceIntPtr pDev,
xTimecoord **buff,
unsigned long start,
@@ -501,25 +476,57 @@ extern int AttachDevice(ClientPtr client,
DeviceIntPtr slave,
DeviceIntPtr master);
-extern DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd);
+extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd);
+extern DeviceIntPtr GetMaster(DeviceIntPtr dev, int type);
-extern int AllocMasterDevice(ClientPtr client,
+extern int AllocDevicePair(ClientPtr client,
char* name,
DeviceIntPtr* ptr,
- DeviceIntPtr* keybd);
+ DeviceIntPtr* keybd,
+ DeviceProc ptr_proc,
+ DeviceProc keybd_proc,
+ Bool master);
extern void DeepCopyDeviceClasses(DeviceIntPtr from,
- DeviceIntPtr to);
+ DeviceIntPtr to,
+ DeviceChangedEvent *dce);
+
+/* Helper functions. */
+extern int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,
+ KeyCode **modkeymap, int *max_keys_per_mod);
+extern int change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *map,
+ int max_keys_per_mod);
+extern int AllocXTestDevice(ClientPtr client,
+ char* name,
+ DeviceIntPtr* ptr,
+ DeviceIntPtr* keybd,
+ DeviceIntPtr master_ptr,
+ DeviceIntPtr master_keybd);
+extern BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master);
+extern DeviceIntPtr GetXTestDevice(DeviceIntPtr master);
+
+/* misc event helpers */
+extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event);
+extern Mask GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev);
+void FixUpEventFromWindow(DeviceIntPtr pDev,
+ xEvent *xE,
+ WindowPtr pWin,
+ Window child,
+ Bool calcChild);
/* Implemented by the DDX. */
-extern int NewInputDeviceRequest(
+extern _X_EXPORT int NewInputDeviceRequest(
InputOption *options,
DeviceIntPtr *dev);
-extern void DeleteInputDeviceRequest(
+extern _X_EXPORT void DeleteInputDeviceRequest(
DeviceIntPtr dev);
-extern void DDXRingBell(
+extern _X_EXPORT void DDXRingBell(
int volume,
int pitch,
int duration);
+/* Set to TRUE by default - os/utils.c sets it to FALSE on user request,
+ xfixes/cursor.c uses it to determine if the cursor is enabled */
+extern Bool EnableCursor;
+
#endif /* INPUT_H */
diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h
index a6f823cd5..29ad5a814 100644
--- a/xorg-server/include/inputstr.h
+++ b/xorg-server/include/inputstr.h
@@ -57,33 +57,86 @@ SOFTWARE.
#include "privates.h"
#define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))
+#define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7)))
+#define ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7)))
#define SameClient(obj,client) \
(CLIENT_BITS((obj)->resource) == (client)->clientAsMask)
-#define EMASKSIZE MAXDEVICES + 1
+#define EMASKSIZE MAXDEVICES + 2
-extern DevPrivateKey CoreDevicePrivateKey;
-
-/* Kludge: OtherClients and InputClients must be compatible, see code */
+/* This is the last XI2 event supported by the server. If you add
+ * events to the protocol, the server will not support these events until
+ * this number here is bumped.
+ */
+#define XI2LASTEVENT 17 /* XI_RawMotion */
+#define XI2MASKSIZE ((XI2LASTEVENT + 7)/8) /* no of bits for masks */
+/**
+ * This struct stores the core event mask for each client except the client
+ * that created the window.
+ *
+ * Each window that has events selected from other clients has at least one of
+ * these masks. If multiple clients selected for events on the same window,
+ * these masks are in a linked list.
+ *
+ * The event mask for the client that created the window is stored in
+ * win->eventMask instead.
+ *
+ * The resource id is simply a fake client ID to associate this mask with a
+ * client.
+ *
+ * Kludge: OtherClients and InputClients must be compatible, see code.
+ */
typedef struct _OtherClients {
- OtherClientsPtr next;
- XID resource; /* id for putting into resource manager */
- Mask mask;
+ OtherClientsPtr next; /**< Pointer to the next mask */
+ XID resource; /**< id for putting into resource manager */
+ Mask mask; /**< Core event mask */
} OtherClients;
+/**
+ * This struct stores the XI event mask for each client.
+ *
+ * Each window that has events selected has at least one of these masks. If
+ * multiple client selected for events on the same window, these masks are in
+ * a linked list.
+ */
typedef struct _InputClients {
- InputClientsPtr next;
- XID resource; /* id for putting into resource manager */
- Mask mask[EMASKSIZE];
+ InputClientsPtr next; /**< Pointer to the next mask */
+ XID resource; /**< id for putting into resource manager */
+ Mask mask[EMASKSIZE]; /**< Actual XI event mask, deviceid is index */
+ /** XI2 event masks. One per device, each bit is a mask of (1 << type) */
+ unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE];
} InputClients;
+/**
+ * Combined XI event masks from all devices.
+ *
+ * This is the XI equivalent of the deliverableEvents, eventMask and
+ * dontPropagate mask of the WindowRec (or WindowOptRec).
+ *
+ * A window that has an XI client selecting for events has exactly one
+ * OtherInputMasks struct and exactly one InputClients struct hanging off
+ * inputClients. Each further client appends to the inputClients list.
+ * Each Mask field is per-device, with the device id as the index.
+ * Exception: for non-device events (Presence events), the MAXDEVICES
+ * deviceid is used.
+ */
typedef struct _OtherInputMasks {
+ /**
+ * Bitwise OR of all masks by all clients and the window's parent's masks.
+ */
Mask deliverableEvents[EMASKSIZE];
+ /**
+ * Bitwise OR of all masks by all clients on this window.
+ */
Mask inputEvents[EMASKSIZE];
+ /** The do-not-propagate masks for each device. */
Mask dontPropagateMask[EMASKSIZE];
+ /** The clients that selected for events */
InputClientsPtr inputClients;
+ /* XI2 event masks. One per device, each bit is a mask of (1 << type) */
+ unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE];
} OtherInputMasks;
/*
@@ -98,10 +151,22 @@ typedef struct _OtherInputMasks {
3 buttons. */
typedef struct _DetailRec { /* Grab details may be bit masks */
- unsigned short exact;
+ unsigned int exact;
Mask *pMask;
} DetailRec;
+typedef enum {
+ GRABTYPE_CORE,
+ GRABTYPE_XI,
+ GRABTYPE_XI2
+} GrabType;
+
+union _GrabMask {
+ Mask core;
+ Mask xi;
+ char xi2mask[EMASKSIZE][XI2MASKSIZE];
+};
+
/**
* Central struct for device grabs.
* The same struct is used for both core grabs and device grabs, with
@@ -123,8 +188,7 @@ typedef struct _GrabRec {
unsigned ownerEvents:1;
unsigned keyboardMode:1;
unsigned pointerMode:1;
- unsigned coreGrab:1; /* grab is on core device */
- unsigned coreMods:1; /* modifiers are on core keyboard */
+ GrabType grabtype;
CARD8 type; /* event type */
DetailRec modifiersDetail;
DeviceIntPtr modifierDevice;
@@ -133,24 +197,16 @@ typedef struct _GrabRec {
CursorPtr cursor; /* always NULL for keyboards */
Mask eventMask;
Mask deviceMask;
- GenericMaskPtr genericMasks;
+ /* XI2 event masks. One per device, each bit is a mask of (1 << type) */
+ unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE];
} GrabRec;
typedef struct _KeyClassRec {
+ int sourceid;
CARD8 down[DOWN_LENGTH];
CARD8 postdown[DOWN_LENGTH];
- KeyCode *modifierKeyMap;
- KeySymsRec curKeySyms;
- int modifierKeyCount[8];
- CARD8 modifierMap[MAP_LENGTH];
- CARD8 maxKeysPerModifier;
- unsigned short state;
- unsigned short prev_state;
-#ifdef XKB
+ int modifierKeyCount[8];
struct _XkbSrvInfo *xkbInfo;
-#else
- void *pad0;
-#endif
} KeyClassRec, *KeyClassPtr;
typedef struct _AxisInfo {
@@ -159,6 +215,7 @@ typedef struct _AxisInfo {
int max_resolution;
int min_value;
int max_value;
+ Atom label;
} AxisInfo, *AxisInfoPtr;
typedef struct _ValuatorAccelerationRec {
@@ -169,6 +226,7 @@ typedef struct _ValuatorAccelerationRec {
} ValuatorAccelerationRec, *ValuatorAccelerationPtr;
typedef struct _ValuatorClassRec {
+ int sourceid;
int numMotionEvents;
int first_motion;
int last_motion;
@@ -178,12 +236,13 @@ typedef struct _ValuatorClassRec {
AxisInfoPtr axes;
unsigned short numAxes;
- int *axisVal; /* always absolute, but device-coord system */
+ double *axisVal; /* always absolute, but device-coord system */
CARD8 mode;
ValuatorAccelerationRec accelScheme;
} ValuatorClassRec, *ValuatorClassPtr;
typedef struct _ButtonClassRec {
+ int sourceid;
CARD8 numButtons;
CARD8 buttonsDown; /* number of buttons currently down
This counts logical buttons, not
@@ -193,15 +252,14 @@ typedef struct _ButtonClassRec {
unsigned short state;
Mask motionMask;
CARD8 down[DOWN_LENGTH];
+ CARD8 postdown[DOWN_LENGTH];
CARD8 map[MAP_LENGTH];
-#ifdef XKB
union _XkbAction *xkb_acts;
-#else
- void *pad0;
-#endif
+ Atom labels[MAX_BUTTONS];
} ButtonClassRec, *ButtonClassPtr;
typedef struct _FocusClassRec {
+ int sourceid;
WindowPtr win; /* May be set to a int constant (e.g. PointerRootWin)! */
int revert;
TimeStamp time;
@@ -211,10 +269,12 @@ typedef struct _FocusClassRec {
} FocusClassRec, *FocusClassPtr;
typedef struct _ProximityClassRec {
+ int sourceid;
char pad;
} ProximityClassRec, *ProximityClassPtr;
typedef struct _AbsoluteClassRec {
+ int sourceid;
/* Calibration. */
int min_x;
int max_x;
@@ -246,11 +306,7 @@ typedef struct _KbdFeedbackClassRec {
KbdCtrlProcPtr CtrlProc;
KeybdCtrl ctrl;
KbdFeedbackPtr next;
-#ifdef XKB
struct _XkbSrvLedInfo *xkb_sli;
-#else
- void *pad0;
-#endif
} KbdFeedbackClassRec;
typedef struct _PtrFeedbackClassRec {
@@ -282,11 +338,7 @@ typedef struct _LedFeedbackClassRec {
LedCtrlProcPtr CtrlProc;
LedCtrl ctrl;
LedFeedbackPtr next;
-#ifdef XKB
struct _XkbSrvLedInfo *xkb_sli;
-#else
- void *pad0;
-#endif
} LedFeedbackClassRec;
@@ -405,8 +457,7 @@ typedef struct _GrabInfoRec {
Bool frozen;
int state;
GrabPtr other; /* if other grab has this frozen */
- xEvent *event; /* saved to be replayed */
- int evcount;
+ DeviceEvent *event; /* saved to be replayed */
} sync;
} GrabInfoRec, *GrabInfoPtr;
@@ -420,6 +471,11 @@ typedef struct _SpriteInfoRec {
pointer that owns the sprite. */
} SpriteInfoRec, *SpriteInfoPtr;
+/* device types */
+#define MASTER_POINTER 1
+#define MASTER_KEYBOARD 2
+#define SLAVE 3
+
typedef struct _DeviceIntRec {
DeviceRec public;
DeviceIntPtr next;
@@ -432,10 +488,10 @@ typedef struct _DeviceIntRec {
Bool enabled; /* TRUE if ON returns Success */
Bool coreEvents; /* TRUE if device also sends core */
GrabInfoRec deviceGrab; /* grab on the device */
- Bool isMaster; /* TRUE if device is master */
- Atom type;
+ int type; /* MASTER_POINTER, MASTER_KEYBOARD, SLAVE */
+ Atom xinput_type;
char *name;
- CARD8 id;
+ int id;
KeyClassPtr key;
ValuatorClassPtr valuator;
ButtonClassPtr button;
@@ -448,19 +504,15 @@ typedef struct _DeviceIntRec {
StringFeedbackPtr stringfeed;
BellFeedbackPtr bell;
LedFeedbackPtr leds;
-#ifdef XKB
struct _XkbInterest *xkb_interest;
-#else
- void *pad0;
-#endif
char *config_info; /* used by the hotplug layer */
PrivateRec *devPrivates;
int nPrivates;
DeviceUnwrapProc unwrapProc;
SpriteInfoPtr spriteInfo;
union {
- DeviceIntPtr master; /* master device */
- DeviceIntPtr lastSlave; /* last slave device used */
+ DeviceIntPtr master; /* master device */
+ DeviceIntPtr lastSlave; /* last slave device used */
} u;
/* last valuator values recorded, not posted to client;
@@ -473,6 +525,7 @@ typedef struct _DeviceIntRec {
int valuators[MAX_VALUATORS];
float remainder[MAX_VALUATORS];
int numValuators;
+ DeviceIntPtr slave;
} last;
/* Input device property handling. */
@@ -488,9 +541,11 @@ typedef struct {
DeviceIntPtr off_devices; /* all devices turned off */
DeviceIntPtr keyboard; /* the main one for the server */
DeviceIntPtr pointer;
+ DeviceIntPtr all_devices;
+ DeviceIntPtr all_master_devices;
} InputInfo;
-extern InputInfo inputInfo;
+extern _X_EXPORT InputInfo inputInfo;
/* for keeping the events for devices grabbed synchronously */
typedef struct _QdEvent *QdEventPtr;
@@ -499,8 +554,7 @@ typedef struct _QdEvent {
DeviceIntPtr device;
ScreenPtr pScreen; /* what screen the pointer was on */
unsigned long months; /* milliseconds is in the event */
- xEvent *event;
- int evcount;
-} QdEventRec;
+ InternalEvent *event;
+} QdEventRec;
#endif /* INPUTSTRUCT_H */
diff --git a/xorg-server/include/misc.h b/xorg-server/include/misc.h
index 85f9e5d4f..877c682d4 100644
--- a/xorg-server/include/misc.h
+++ b/xorg-server/include/misc.h
@@ -72,9 +72,6 @@ OF THIS SOFTWARE.
*
*/
-extern unsigned long globalSerialNumber;
-extern unsigned long serverGeneration;
-
#include <X11/Xosdefs.h>
#include <X11/Xfuncproto.h>
#include <X11/Xmd.h>
@@ -89,7 +86,7 @@ extern unsigned long serverGeneration;
#define MAXCLIENTS 256
#define MAXEXTENSIONS 128
#define MAXFORMATS 8
-#define MAXDEVICES 20 /* input devices */
+#define MAXDEVICES 40 /* input devices */
#define EXTENSION_EVENT_BASE 64
#define EXTENSION_BASE 128
@@ -183,6 +180,36 @@ typedef struct _xReq *xReqPtr;
#endif
+/**
+ * Calculate the number of bytes needed to hold bits.
+ * @param bits The minimum number of bits needed.
+ * @return The number of bytes needed to hold bits.
+ */
+static inline int
+bits_to_bytes(const int bits) {
+ return ((bits + 7) >> 3);
+}
+/**
+ * Calculate the number of 4-byte units needed to hold the given number of
+ * bytes.
+ * @param bytes The minimum number of bytes needed.
+ * @return The number of 4-byte units needed to hold bytes.
+ */
+static inline int
+bytes_to_int32(const int bytes) {
+ return (((bytes) + 3) >> 2);
+}
+
+/**
+ * Calculate the number of bytes (in multiples of 4) needed to hold bytes.
+ * @param bytes The minimum number of bytes needed.
+ * @return The closest multiple of 4 that is equal or higher than bytes.
+ */
+static inline int
+pad_to_int32(const int bytes) {
+ return (((bytes) + 3) & ~3);
+}
+
/* some macros to help swap requests, replies, and events */
#define LengthRestB(stuff) \
@@ -227,17 +254,17 @@ typedef struct _xReq *xReqPtr;
((char *) &(dst))[0] = ((char *) &(src))[1];\
((char *) &(dst))[1] = ((char *) &(src))[0]; }
-extern void SwapLongs(
+extern _X_EXPORT void SwapLongs(
CARD32 *list,
unsigned long count);
-extern void SwapShorts(
+extern _X_EXPORT void SwapShorts(
short *list,
unsigned long count);
-extern void MakePredeclaredAtoms(void);
+extern _X_EXPORT void MakePredeclaredAtoms(void);
-extern int Ones(
+extern _X_EXPORT int Ones(
unsigned long /*mask*/);
typedef struct _xPoint *DDXPointPtr;
@@ -256,4 +283,7 @@ typedef struct _CharInfo *CharInfoPtr; /* also in fonts/include/font.h */
#define _XTYPEDEF_CHARINFOPTR
#endif
+extern _X_EXPORT unsigned long globalSerialNumber;
+extern _X_EXPORT unsigned long serverGeneration;
+
#endif /* MISC_H */
diff --git a/xorg-server/include/opaque.h b/xorg-server/include/opaque.h
index 07a0715ef..b3c7c70d6 100644
--- a/xorg-server/include/opaque.h
+++ b/xorg-server/include/opaque.h
@@ -33,46 +33,46 @@ from The Open Group.
#include "globals.h"
-extern char *defaultTextFont;
-extern char *defaultCursorFont;
-extern int MaxClients;
-extern volatile char isItTimeToYield;
-extern volatile char dispatchException;
+extern _X_EXPORT char *defaultTextFont;
+extern _X_EXPORT char *defaultCursorFont;
+extern _X_EXPORT int MaxClients;
+extern _X_EXPORT volatile char isItTimeToYield;
+extern _X_EXPORT volatile char dispatchException;
/* bit values for dispatchException */
#define DE_RESET 1
#define DE_TERMINATE 2
#define DE_PRIORITYCHANGE 4 /* set when a client's priority changes */
-extern CARD32 TimeOutValue;
-extern int ScreenSaverBlanking;
-extern int ScreenSaverAllowExposures;
-extern int defaultScreenSaverBlanking;
-extern int defaultScreenSaverAllowExposures;
-extern char *display;
-
-extern int defaultBackingStore;
-extern Bool disableBackingStore;
-extern Bool enableBackingStore;
-extern Bool PartialNetwork;
+extern _X_EXPORT CARD32 TimeOutValue;
+extern _X_EXPORT int ScreenSaverBlanking;
+extern _X_EXPORT int ScreenSaverAllowExposures;
+extern _X_EXPORT int defaultScreenSaverBlanking;
+extern _X_EXPORT int defaultScreenSaverAllowExposures;
+extern _X_EXPORT char *display;
+
+extern _X_EXPORT int defaultBackingStore;
+extern _X_EXPORT Bool disableBackingStore;
+extern _X_EXPORT Bool enableBackingStore;
+extern _X_EXPORT Bool PartialNetwork;
#ifndef NOLOGOHACK
-extern int logoScreenSaver;
+extern _X_EXPORT int logoScreenSaver;
#endif
#ifdef RLIMIT_DATA
-extern int limitDataSpace;
+extern _X_EXPORT int limitDataSpace;
#endif
#ifdef RLIMIT_STACK
-extern int limitStackSpace;
+extern _X_EXPORT int limitStackSpace;
#endif
#ifdef RLIMIT_NOFILE
-extern int limitNoFile;
+extern _X_EXPORT int limitNoFile;
#endif
-extern Bool defeatAccessControl;
-extern long maxBigRequestSize;
-extern Bool party_like_its_1989;
-extern Bool whiteRoot;
+extern _X_EXPORT Bool defeatAccessControl;
+extern _X_EXPORT long maxBigRequestSize;
+extern _X_EXPORT Bool party_like_its_1989;
+extern _X_EXPORT Bool whiteRoot;
-extern Bool CoreDump;
+extern _X_EXPORT Bool CoreDump;
#endif /* OPAQUE_H */
diff --git a/xorg-server/include/os.h b/xorg-server/include/os.h
index 77e94486a..2f6b0c06f 100644
--- a/xorg-server/include/os.h
+++ b/xorg-server/include/os.h
@@ -52,8 +52,6 @@ SOFTWARE.
#include "misc.h"
#include <stdarg.h>
-#define NullFID ((FID) 0)
-
#define SCREEN_SAVER_ON 0
#define SCREEN_SAVER_OFF 1
#define SCREEN_SAVER_FORCER 2
@@ -66,7 +64,6 @@ SOFTWARE.
#define MAX_BIG_REQUEST_SIZE 4194303
#endif
-typedef pointer FID;
typedef struct _FontPathRec *FontPathPtr;
typedef struct _NewClientRec *NewClientPtr;
@@ -86,92 +83,87 @@ typedef struct _NewClientRec *NewClientPtr;
#include <stdio.h>
#include <stdarg.h>
-/* have to put $(SIGNAL_DEFINES) in DEFINES in Imakefile to get this right */
-#ifdef SIGNALRETURNSINT
-#define SIGVAL int
-#else
-#define SIGVAL void
+#ifdef DDXOSVERRORF
+extern _X_EXPORT void (*OsVendorVErrorFProc)(const char *, va_list args);
#endif
-extern void (*OsVendorVErrorFProc)(const char *, va_list args);
-
-extern int WaitForSomething(
+extern _X_EXPORT int WaitForSomething(
int* /*pClientsReady*/
);
-extern int ReadRequestFromClient(ClientPtr /*client*/);
+extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client*/);
-extern Bool InsertFakeRequest(
+extern _X_EXPORT Bool InsertFakeRequest(
ClientPtr /*client*/,
char* /*data*/,
int /*count*/);
-extern void ResetCurrentRequest(ClientPtr /*client*/);
+extern _X_EXPORT void ResetCurrentRequest(ClientPtr /*client*/);
-extern void FlushAllOutput(void);
+extern _X_EXPORT void FlushAllOutput(void);
-extern void FlushIfCriticalOutputPending(void);
+extern _X_EXPORT void FlushIfCriticalOutputPending(void);
-extern void SetCriticalOutputPending(void);
+extern _X_EXPORT void SetCriticalOutputPending(void);
-extern int WriteToClient(ClientPtr /*who*/, int /*count*/, const void* /*buf*/);
+extern _X_EXPORT int WriteToClient(ClientPtr /*who*/, int /*count*/, const void* /*buf*/);
-extern void ResetOsBuffers(void);
+extern _X_EXPORT void ResetOsBuffers(void);
-extern void InitConnectionLimits(void);
+extern _X_EXPORT void InitConnectionLimits(void);
-extern void NotifyParentProcess(void);
+extern _X_EXPORT void NotifyParentProcess(void);
-extern void CreateWellKnownSockets(void);
+extern _X_EXPORT void CreateWellKnownSockets(void);
-extern void ResetWellKnownSockets(void);
+extern _X_EXPORT void ResetWellKnownSockets(void);
-extern void CloseWellKnownConnections(void);
+extern _X_EXPORT void CloseWellKnownConnections(void);
-extern XID AuthorizationIDOfClient(ClientPtr /*client*/);
+extern _X_EXPORT XID AuthorizationIDOfClient(ClientPtr /*client*/);
-extern char *ClientAuthorized(
+extern _X_EXPORT char *ClientAuthorized(
ClientPtr /*client*/,
unsigned int /*proto_n*/,
char* /*auth_proto*/,
unsigned int /*string_n*/,
char* /*auth_string*/);
-extern Bool EstablishNewConnections(
+extern _X_EXPORT Bool EstablishNewConnections(
ClientPtr /*clientUnused*/,
pointer /*closure*/);
-extern void CheckConnections(void);
+extern _X_EXPORT void CheckConnections(void);
-extern void CloseDownConnection(ClientPtr /*client*/);
+extern _X_EXPORT void CloseDownConnection(ClientPtr /*client*/);
-extern void AddGeneralSocket(int /*fd*/);
+extern _X_EXPORT void AddGeneralSocket(int /*fd*/);
-extern void RemoveGeneralSocket(int /*fd*/);
+extern _X_EXPORT void RemoveGeneralSocket(int /*fd*/);
-extern void AddEnabledDevice(int /*fd*/);
+extern _X_EXPORT void AddEnabledDevice(int /*fd*/);
-extern void RemoveEnabledDevice(int /*fd*/);
+extern _X_EXPORT void RemoveEnabledDevice(int /*fd*/);
-extern int OnlyListenToOneClient(ClientPtr /*client*/);
+extern _X_EXPORT int OnlyListenToOneClient(ClientPtr /*client*/);
-extern void ListenToAllClients(void);
+extern _X_EXPORT void ListenToAllClients(void);
-extern void IgnoreClient(ClientPtr /*client*/);
+extern _X_EXPORT void IgnoreClient(ClientPtr /*client*/);
-extern void AttendClient(ClientPtr /*client*/);
+extern _X_EXPORT void AttendClient(ClientPtr /*client*/);
-extern void MakeClientGrabImpervious(ClientPtr /*client*/);
+extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client*/);
-extern void MakeClientGrabPervious(ClientPtr /*client*/);
+extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client*/);
#ifdef XQUARTZ
extern void ListenOnOpenFD(int /* fd */, int /* noxauth */);
#endif
-extern CARD32 GetTimeInMillis(void);
+extern _X_EXPORT CARD32 GetTimeInMillis(void);
-extern void AdjustWaitForDelay(
+extern _X_EXPORT void AdjustWaitForDelay(
pointer /*waitTime*/,
unsigned long /*newdelay*/);
@@ -182,69 +174,71 @@ typedef CARD32 (*OsTimerCallback)(
CARD32 /* time */,
pointer /* arg */);
-extern void TimerInit(void);
+extern _X_EXPORT void TimerInit(void);
-extern Bool TimerForce(OsTimerPtr /* timer */);
+extern _X_EXPORT Bool TimerForce(OsTimerPtr /* timer */);
#define TimerAbsolute (1<<0)
#define TimerForceOld (1<<1)
-extern OsTimerPtr TimerSet(
+extern _X_EXPORT OsTimerPtr TimerSet(
OsTimerPtr /* timer */,
int /* flags */,
CARD32 /* millis */,
OsTimerCallback /* func */,
pointer /* arg */);
-extern void TimerCheck(void);
-extern void TimerCancel(OsTimerPtr /* pTimer */);
-extern void TimerFree(OsTimerPtr /* pTimer */);
+extern _X_EXPORT void TimerCheck(void);
+extern _X_EXPORT void TimerCancel(OsTimerPtr /* pTimer */);
+extern _X_EXPORT void TimerFree(OsTimerPtr /* pTimer */);
-extern void SetScreenSaverTimer(void);
-extern void FreeScreenSaverTimer(void);
+extern _X_EXPORT void SetScreenSaverTimer(void);
+extern _X_EXPORT void FreeScreenSaverTimer(void);
-extern SIGVAL AutoResetServer(int /*sig*/);
+extern _X_EXPORT void AutoResetServer(int /*sig*/);
-extern SIGVAL GiveUp(int /*sig*/);
+extern _X_EXPORT void GiveUp(int /*sig*/);
-extern void UseMsg(void);
+extern _X_EXPORT void UseMsg(void);
-extern void ProcessCommandLine(int /*argc*/, char* /*argv*/[]);
+extern _X_EXPORT void ProcessCommandLine(int /*argc*/, char* /*argv*/[]);
-extern int set_font_authorizations(
+extern _X_EXPORT int set_font_authorizations(
char ** /* authorizations */,
int * /*authlen */,
pointer /* client */);
#ifndef _HAVE_XALLOC_DECLS
#define _HAVE_XALLOC_DECLS
-extern pointer Xalloc(unsigned long /*amount*/);
-extern pointer Xcalloc(unsigned long /*amount*/);
-extern pointer Xrealloc(pointer /*ptr*/, unsigned long /*amount*/);
-extern void Xfree(pointer /*ptr*/);
+extern _X_EXPORT pointer Xalloc(unsigned long /*amount*/);
+extern _X_EXPORT pointer Xcalloc(unsigned long /*amount*/);
+extern _X_EXPORT pointer Xrealloc(pointer /*ptr*/, unsigned long /*amount*/);
+extern _X_EXPORT void Xfree(pointer /*ptr*/);
#endif
-extern pointer XNFalloc(unsigned long /*amount*/);
-extern pointer XNFcalloc(unsigned long /*amount*/);
-extern pointer XNFrealloc(pointer /*ptr*/, unsigned long /*amount*/);
+extern _X_EXPORT pointer XNFalloc(unsigned long /*amount*/);
+extern _X_EXPORT pointer XNFcalloc(unsigned long /*amount*/);
+extern _X_EXPORT pointer XNFrealloc(pointer /*ptr*/, unsigned long /*amount*/);
-extern char *Xstrdup(const char *s);
-extern char *XNFstrdup(const char *s);
-extern char *Xprintf(const char *fmt, ...);
-extern char *Xvprintf(const char *fmt, va_list va);
-extern char *XNFprintf(const char *fmt, ...);
-extern char *XNFvprintf(const char *fmt, va_list va);
+extern _X_EXPORT char *Xstrdup(const char *s);
+extern _X_EXPORT char *XNFstrdup(const char *s);
+extern _X_EXPORT char *Xprintf(const char *fmt, ...);
+extern _X_EXPORT char *Xvprintf(const char *fmt, va_list va);
+extern _X_EXPORT char *XNFprintf(const char *fmt, ...);
+extern _X_EXPORT char *XNFvprintf(const char *fmt, va_list va);
-typedef SIGVAL (*OsSigHandlerPtr)(int /* sig */);
+typedef void (*OsSigHandlerPtr)(int /* sig */);
+typedef int (*OsSigWrapperPtr)(int /* sig */);
-extern OsSigHandlerPtr OsSignal(int /* sig */, OsSigHandlerPtr /* handler */);
+extern _X_EXPORT OsSigHandlerPtr OsSignal(int /* sig */, OsSigHandlerPtr /* handler */);
+extern _X_EXPORT OsSigWrapperPtr OsRegisterSigWrapper(OsSigWrapperPtr newWrap);
-extern int auditTrailLevel;
+extern _X_EXPORT int auditTrailLevel;
-extern void LockServer(void);
-extern void UnlockServer(void);
+extern _X_EXPORT void LockServer(void);
+extern _X_EXPORT void UnlockServer(void);
-extern int OsLookupColor(
+extern _X_EXPORT int OsLookupColor(
int /*screen*/,
char * /*name*/,
unsigned /*len*/,
@@ -252,24 +246,24 @@ extern int OsLookupColor(
unsigned short * /*pgreen*/,
unsigned short * /*pblue*/);
-extern void OsInit(void);
+extern _X_EXPORT void OsInit(void);
-extern void OsCleanup(Bool);
+extern _X_EXPORT void OsCleanup(Bool);
-extern void OsVendorFatalError(void);
+extern _X_EXPORT void OsVendorFatalError(void);
-extern void OsVendorInit(void);
+extern _X_EXPORT void OsVendorInit(void);
-void OsBlockSignals (void);
+extern _X_EXPORT void OsBlockSignals (void);
-void OsReleaseSignals (void);
+extern _X_EXPORT void OsReleaseSignals (void);
#if !defined(WIN32)
-extern int System(char *);
-extern pointer Popen(char *, char *);
-extern int Pclose(pointer);
-extern pointer Fopen(char *, char *);
-extern int Fclose(pointer);
+extern _X_EXPORT int System(char *);
+extern _X_EXPORT pointer Popen(char *, char *);
+extern _X_EXPORT int Pclose(pointer);
+extern _X_EXPORT pointer Fopen(char *, char *);
+extern _X_EXPORT int Fclose(pointer);
#else
#define System(a) system(a)
#define Popen(a,b) popen(a,b)
@@ -278,16 +272,16 @@ extern int Fclose(pointer);
#define Fclose(a) fclose(a)
#endif
-extern void CheckUserParameters(int argc, char **argv, char **envp);
-extern void CheckUserAuthorization(void);
+extern _X_EXPORT void CheckUserParameters(int argc, char **argv, char **envp);
+extern _X_EXPORT void CheckUserAuthorization(void);
-extern int AddHost(
+extern _X_EXPORT int AddHost(
ClientPtr /*client*/,
int /*family*/,
unsigned /*length*/,
pointer /*pAddr*/);
-extern Bool ForEachHostInFamily (
+extern _X_EXPORT Bool ForEachHostInFamily (
int /*family*/,
Bool (* /*func*/ )(
unsigned char * /* addr */,
@@ -295,13 +289,13 @@ extern Bool ForEachHostInFamily (
pointer /* closure */),
pointer /*closure*/);
-extern int RemoveHost(
+extern _X_EXPORT int RemoveHost(
ClientPtr /*client*/,
int /*family*/,
unsigned /*length*/,
pointer /*pAddr*/);
-extern int GetHosts(
+extern _X_EXPORT int GetHosts(
pointer * /*data*/,
int * /*pnHosts*/,
int * /*pLen*/,
@@ -309,11 +303,11 @@ extern int GetHosts(
typedef struct sockaddr * sockaddrPtr;
-extern int InvalidHost(sockaddrPtr /*saddr*/, int /*len*/, ClientPtr client);
+extern _X_EXPORT int InvalidHost(sockaddrPtr /*saddr*/, int /*len*/, ClientPtr client);
-extern int LocalClient(ClientPtr /* client */);
+extern _X_EXPORT int LocalClient(ClientPtr /* client */);
-extern int LocalClientCred(ClientPtr, int *, int *);
+extern _X_EXPORT int LocalClientCred(ClientPtr, int *, int *);
#define LCC_UID_SET (1 << 0)
#define LCC_GID_SET (1 << 1)
@@ -330,42 +324,44 @@ typedef struct {
int zoneid; /* Only set on Solaris 10 & later */
} LocalClientCredRec;
-extern int GetLocalClientCreds(ClientPtr, LocalClientCredRec **);
-extern void FreeLocalClientCreds(LocalClientCredRec *);
+extern _X_EXPORT int GetLocalClientCreds(ClientPtr, LocalClientCredRec **);
+extern _X_EXPORT void FreeLocalClientCreds(LocalClientCredRec *);
-extern int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/);
+extern _X_EXPORT int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/);
-extern int GetAccessControl(void);
+extern _X_EXPORT int GetAccessControl(void);
-extern void AddLocalHosts(void);
+extern _X_EXPORT void AddLocalHosts(void);
-extern void ResetHosts(char *display);
+extern _X_EXPORT void ResetHosts(char *display);
-extern void EnableLocalHost(void);
+extern _X_EXPORT void EnableLocalHost(void);
-extern void DisableLocalHost(void);
+extern _X_EXPORT void DisableLocalHost(void);
-extern void AccessUsingXdmcp(void);
+extern _X_EXPORT void AccessUsingXdmcp(void);
-extern void DefineSelf(int /*fd*/);
+extern _X_EXPORT void DefineSelf(int /*fd*/);
-extern void AugmentSelf(pointer /*from*/, int /*len*/);
+#if XDMCP
+extern _X_EXPORT void AugmentSelf(pointer /*from*/, int /*len*/);
-extern void InitAuthorization(char * /*filename*/);
+extern _X_EXPORT void RegisterAuthorizations(void);
+#endif
-/* extern int LoadAuthorization(void); */
+extern _X_EXPORT void InitAuthorization(char * /*filename*/);
-extern void RegisterAuthorizations(void);
+/* extern int LoadAuthorization(void); */
-extern int AuthorizationFromID (
+extern _X_EXPORT int AuthorizationFromID (
XID id,
unsigned short *name_lenp,
char **namep,
unsigned short *data_lenp,
char **datap);
-extern XID CheckAuthorization(
+extern _X_EXPORT XID CheckAuthorization(
unsigned int /*namelength*/,
char * /*name*/,
unsigned int /*datalength*/,
@@ -374,31 +370,33 @@ extern XID CheckAuthorization(
char ** /*reason*/
);
-extern void ResetAuthorization(void);
+extern _X_EXPORT void ResetAuthorization(void);
-extern int RemoveAuthorization (
+extern _X_EXPORT int RemoveAuthorization (
unsigned short name_length,
char *name,
unsigned short data_length,
char *data);
-extern int AddAuthorization(
+extern _X_EXPORT int AddAuthorization(
unsigned int /*name_length*/,
char * /*name*/,
unsigned int /*data_length*/,
char * /*data*/);
-extern XID GenerateAuthorization(
+#ifdef XCSECURITY
+extern _X_EXPORT XID GenerateAuthorization(
unsigned int /* name_length */,
char * /* name */,
unsigned int /* data_length */,
char * /* data */,
unsigned int * /* data_length_return */,
char ** /* data_return */);
+#endif
-extern int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
+extern _X_EXPORT int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
-extern void ddxUseMsg(void);
+extern _X_EXPORT void ddxUseMsg(void);
/* int ReqLen(xReq *req, ClientPtr client)
* Given a pointer to a *complete* request, return its length in bytes.
@@ -424,7 +422,7 @@ extern void ddxUseMsg(void);
: (otherReqTypePtr)(((CARD32*)_pxReq)+1))
/* stuff for ReplyCallback */
-extern CallbackListPtr ReplyCallback;
+extern _X_EXPORT CallbackListPtr ReplyCallback;
typedef struct {
ClientPtr client;
const void *replyData;
@@ -434,31 +432,31 @@ typedef struct {
} ReplyInfoRec;
/* stuff for FlushCallback */
-extern CallbackListPtr FlushCallback;
+extern _X_EXPORT CallbackListPtr FlushCallback;
-extern void AbortDDX(void);
-extern void ddxGiveUp(void);
-extern int TimeSinceLastInputEvent(void);
+extern _X_EXPORT void AbortDDX(void);
+extern _X_EXPORT void ddxGiveUp(void);
+extern _X_EXPORT int TimeSinceLastInputEvent(void);
/* strcasecmp.c */
#if NEED_STRCASECMP
#define strcasecmp xstrcasecmp
-extern int xstrcasecmp(const char *s1, const char *s2);
+extern _X_EXPORT 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);
+extern _X_EXPORT 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);
+extern _X_EXPORT char *xstrcasestr(const char *s, const char *find);
#endif
#ifndef HAS_STRLCPY
-extern size_t strlcpy(char *dst, const char *src, size_t siz);
-extern size_t strlcat(char *dst, const char *src, size_t siz);
+extern _X_EXPORT size_t strlcpy(char *dst, const char *src, size_t siz);
+extern _X_EXPORT size_t strlcat(char *dst, const char *src, size_t siz);
#endif
/* Logging. */
@@ -491,21 +489,21 @@ typedef enum {
#define _printf_attribute(a,b) /**/
#endif
-extern const char *LogInit(const char *fname, const char *backup);
-extern void LogClose(void);
-extern Bool LogSetParameter(LogParameter param, int value);
-extern void LogVWrite(int verb, const char *f, va_list args);
-extern void LogWrite(int verb, const char *f, ...) _printf_attribute(2,3);
-extern void LogVMessageVerb(MessageType type, int verb, const char *format,
+extern _X_EXPORT const char *LogInit(const char *fname, const char *backup);
+extern _X_EXPORT void LogClose(void);
+extern _X_EXPORT Bool LogSetParameter(LogParameter param, int value);
+extern _X_EXPORT void LogVWrite(int verb, const char *f, va_list args);
+extern _X_EXPORT void LogWrite(int verb, const char *f, ...) _printf_attribute(2,3);
+extern _X_EXPORT void LogVMessageVerb(MessageType type, int verb, const char *format,
va_list args);
-extern void LogMessageVerb(MessageType type, int verb, const char *format,
+extern _X_EXPORT void LogMessageVerb(MessageType type, int verb, const char *format,
...) _printf_attribute(3,4);
-extern void LogMessage(MessageType type, const char *format, ...)
+extern _X_EXPORT void LogMessage(MessageType type, const char *format, ...)
_printf_attribute(2,3);
-extern void FreeAuditTimer(void);
-extern void AuditF(const char *f, ...) _printf_attribute(1,2);
-extern void VAuditF(const char *f, va_list args);
-extern void FatalError(const char *f, ...) _printf_attribute(1,2)
+extern _X_EXPORT void FreeAuditTimer(void);
+extern _X_EXPORT void AuditF(const char *f, ...) _printf_attribute(1,2);
+extern _X_EXPORT void VAuditF(const char *f, va_list args);
+extern _X_EXPORT void FatalError(const char *f, ...) _printf_attribute(1,2)
#if defined(__GNUC__) && (__GNUC__ > 2)
__attribute((noreturn))
#endif
@@ -517,11 +515,11 @@ __attribute((noreturn))
#define DebugF(...) /* */
#endif
-extern void VErrorF(const char *f, va_list args);
-extern void ErrorF(const char *f, ...) _printf_attribute(1,2);
-extern void Error(char *str);
-extern void LogPrintMarkers(void);
+extern _X_EXPORT void VErrorF(const char *f, va_list args);
+extern _X_EXPORT void ErrorF(const char *f, ...) _printf_attribute(1,2);
+extern _X_EXPORT void Error(char *str);
+extern _X_EXPORT void LogPrintMarkers(void);
-extern void xorg_backtrace(void);
+extern _X_EXPORT void xorg_backtrace(void);
#endif /* OS_H */
diff --git a/xorg-server/include/pixmap.h b/xorg-server/include/pixmap.h
index 5ff0b8c16..55a9c818a 100644
--- a/xorg-server/include/pixmap.h
+++ b/xorg-server/include/pixmap.h
@@ -93,7 +93,7 @@ typedef union _PixUnion {
#define WindowDrawable(type) \
((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW))
-extern PixmapPtr GetScratchPixmapHeader(
+extern _X_EXPORT PixmapPtr GetScratchPixmapHeader(
ScreenPtr /*pScreen*/,
int /*width*/,
int /*height*/,
@@ -102,16 +102,16 @@ extern PixmapPtr GetScratchPixmapHeader(
int /*devKind*/,
pointer /*pPixData*/);
-extern void FreeScratchPixmapHeader(
+extern _X_EXPORT void FreeScratchPixmapHeader(
PixmapPtr /*pPixmap*/);
-extern Bool CreateScratchPixmapsForScreen(
+extern _X_EXPORT Bool CreateScratchPixmapsForScreen(
int /*scrnum*/);
-extern void FreeScratchPixmapsForScreen(
+extern _X_EXPORT void FreeScratchPixmapsForScreen(
int /*scrnum*/);
-extern PixmapPtr AllocatePixmap(
+extern _X_EXPORT PixmapPtr AllocatePixmap(
ScreenPtr /*pScreen*/,
int /*pixDataSize*/);
diff --git a/xorg-server/include/privates.h b/xorg-server/include/privates.h
index e3fa83cde..3c5c32175 100644
--- a/xorg-server/include/privates.h
+++ b/xorg-server/include/privates.h
@@ -27,31 +27,31 @@ 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
+extern _X_EXPORT int
dixRequestPrivate(const DevPrivateKey key, unsigned size);
/*
* Allocates a new private and attaches it to an existing object.
*/
-extern pointer *
+extern _X_EXPORT pointer *
dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key);
/*
* Look up a private pointer.
*/
-pointer
+extern _X_EXPORT pointer
dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key);
/*
* Look up the address of a private pointer.
*/
-pointer *
+extern _X_EXPORT pointer *
dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key);
/*
* Set a private pointer.
*/
-int
+extern _X_EXPORT int
dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val);
/*
@@ -63,24 +63,24 @@ typedef struct _PrivateCallback {
pointer *value; /* address of private pointer */
} PrivateCallbackRec;
-extern int
+extern _X_EXPORT int
dixRegisterPrivateInitFunc(const DevPrivateKey key,
CallbackProcPtr callback, pointer userdata);
-extern int
+extern _X_EXPORT int
dixRegisterPrivateDeleteFunc(const DevPrivateKey key,
CallbackProcPtr callback, pointer userdata);
/*
* Frees private data.
*/
-extern void
+extern _X_EXPORT void
dixFreePrivates(PrivateRec *privates);
/*
* Resets the subsystem, called from the main loop.
*/
-extern int
+extern _X_EXPORT int
dixResetPrivates(void);
/*
@@ -93,14 +93,14 @@ dixResetPrivates(void);
* Looks up the offset where the devPrivates field is located.
* Returns -1 if no offset has been registered for the resource type.
*/
-extern int
+extern _X_EXPORT int
dixLookupPrivateOffset(RESTYPE type);
/*
* Specifies the offset where the devPrivates field is located.
* A negative value indicates no devPrivates field is available.
*/
-extern int
+extern _X_EXPORT int
dixRegisterPrivateOffset(RESTYPE type, int offset);
/*
diff --git a/xorg-server/include/property.h b/xorg-server/include/property.h
index 1207e8191..075eb4a0d 100644
--- a/xorg-server/include/property.h
+++ b/xorg-server/include/property.h
@@ -52,14 +52,14 @@ SOFTWARE.
typedef struct _Property *PropertyPtr;
-extern int dixLookupProperty(
+extern _X_EXPORT int dixLookupProperty(
PropertyPtr * /*result*/,
WindowPtr /*pWin*/,
Atom /*proprty*/,
ClientPtr /*pClient*/,
Mask /*access_mode*/);
-extern int dixChangeWindowProperty(
+extern _X_EXPORT int dixChangeWindowProperty(
ClientPtr /*pClient*/,
WindowPtr /*pWin*/,
Atom /*property*/,
@@ -70,7 +70,7 @@ extern int dixChangeWindowProperty(
pointer /*value*/,
Bool /*sendevent*/);
-extern int ChangeWindowProperty(
+extern _X_EXPORT int ChangeWindowProperty(
WindowPtr /*pWin*/,
Atom /*property*/,
Atom /*type*/,
@@ -80,12 +80,12 @@ extern int ChangeWindowProperty(
pointer /*value*/,
Bool /*sendevent*/);
-extern int DeleteProperty(
+extern _X_EXPORT int DeleteProperty(
ClientPtr /*client*/,
WindowPtr /*pWin*/,
Atom /*propName*/);
-extern void DeleteAllWindowProperties(
+extern _X_EXPORT void DeleteAllWindowProperties(
WindowPtr /*pWin*/);
#endif /* PROPERTY_H */
diff --git a/xorg-server/include/ptrveloc.h b/xorg-server/include/ptrveloc.h
index 384f9a6f2..fa2156b0d 100644
--- a/xorg-server/include/ptrveloc.h
+++ b/xorg-server/include/ptrveloc.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright © 2006-2008 Simon Thum simon dot thum at gmx dot de
+ * Copyright © 2006-2009 Simon Thum simon dot thum at gmx dot de
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -27,14 +27,9 @@
#include <input.h> /* DeviceIntPtr */
-/* maximum number of filters to approximate velocity.
- * ABI-breaker!
- */
-#define MAX_VELOCITY_FILTERS 8
-
-/* constants for acceleration profiles;
- * see */
+/* constants for acceleration profiles */
+#define AccelProfileNone -1
#define AccelProfileClassic 0
#define AccelProfileDeviceSpecific 1
#define AccelProfilePolynomial 2
@@ -42,7 +37,7 @@
#define AccelProfileSimple 4
#define AccelProfilePower 5
#define AccelProfileLinear 6
-#define AccelProfileReserved 7
+#define AccelProfileLAST AccelProfileLinear
/* fwd */
struct _DeviceVelocityRec;
@@ -52,80 +47,87 @@ struct _DeviceVelocityRec;
* returns actual acceleration depending on velocity, acceleration control,...
*/
typedef float (*PointerAccelerationProfileFunc)
- (struct _DeviceVelocityRec* /*pVel*/,
- float /*velocity*/, float /*threshold*/, float /*acc*/);
+ (DeviceIntPtr dev, struct _DeviceVelocityRec* vel,
+ float velocity, float threshold, float accelCoeff);
/**
- * a filter stage contains the data for adaptive IIR filtering.
- * To improve results, one may run several parallel filters
- * which have different decays. Since more integration means more
- * delay, a given filter only does good matches in a specific phase of
- * a stroke.
- *
- * Basically, the coupling feature makes one filter fairly enough,
- * so that is the default.
+ * a motion history, with just enough information to
+ * calc mean velocity and decide which motion was along
+ * a more or less straight line
*/
-typedef struct _FilterStage {
- float* fading_lut; /* lookup for adaptive IIR filter */
- int fading_lut_size; /* size of lookup table */
- float rdecay; /* reciprocal weighting halflife in ms */
- float current;
-} FilterStage, *FilterStagePtr;
+typedef struct _MotionTracker {
+ int dx, dy; /* accumulated delta for each axis */
+ int time; /* time of creation */
+ int dir; /* initial direction bitfield */
+} MotionTracker, *MotionTrackerPtr;
/**
* Contains all data needed to implement mouse ballistics
*/
typedef struct _DeviceVelocityRec {
- FilterStage filters[MAX_VELOCITY_FILTERS];
+ MotionTrackerPtr tracker;
+ int num_tracker;
+ int cur_tracker; /* current index */
float velocity; /* velocity as guessed by algorithm */
float last_velocity; /* previous velocity estimate */
- int lrm_time; /* time the last motion event was processed */
- int last_dx, last_dy; /* last motion delta */
- int last_diff; /* last time-difference */
- Bool last_reset; /* whether a nv-reset occurred just before */
+ int last_dx; /* last time-difference */
+ int last_dy ; /* phase of last/current estimate */
float corr_mul; /* config: multiply this into velocity */
float const_acceleration; /* config: (recipr.) const deceleration */
float min_acceleration; /* config: minimum acceleration */
short reset_time; /* config: reset non-visible state after # ms */
short use_softening; /* config: use softening of mouse values */
- float coupling; /* config: max. divergence before coupling */
+ float max_rel_diff; /* config: max. relative difference */
+ float max_diff; /* config: max. difference */
+ int initial_range; /* config: max. offset used as initial velocity */
Bool average_accel; /* config: average acceleration over velocity */
PointerAccelerationProfileFunc Profile;
PointerAccelerationProfileFunc deviceSpecificProfile;
void* profile_private;/* extended data, see SetAccelerationProfile() */
struct { /* to be able to query this information */
int profile_number;
- int filter_usecount[MAX_VELOCITY_FILTERS +1];
} statistics;
} DeviceVelocityRec, *DeviceVelocityPtr;
-extern void
-InitVelocityData(DeviceVelocityPtr s);
+extern _X_EXPORT void
+InitVelocityData(DeviceVelocityPtr vel);
+
+extern _X_EXPORT void
+InitTrackers(DeviceVelocityPtr vel, int ntracker);
+
+extern _X_EXPORT short
+ProcessVelocityData2D(DeviceVelocityPtr vel, int dx, int dy, int time);
+
+extern _X_EXPORT float
+BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel,
+ float velocity, float threshold, float acc);
+
+extern _X_EXPORT void
+FreeVelocityData(DeviceVelocityPtr vel);
-extern void
-InitFilterChain(DeviceVelocityPtr s, float rdecay, float degression,
- int lutsize, int stages);
+extern _X_INTERNAL BOOL
+InitializePredictableAccelerationProperties(DeviceIntPtr dev);
-extern int
-SetAccelerationProfile(DeviceVelocityPtr s, int profile_num);
+extern _X_EXPORT int
+SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
-extern DeviceVelocityPtr
-GetDevicePredictableAccelData(DeviceIntPtr pDev);
+extern _X_EXPORT DeviceVelocityPtr
+GetDevicePredictableAccelData(DeviceIntPtr dev);
-extern void
-SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr s,
+extern _X_EXPORT void
+SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel,
PointerAccelerationProfileFunc profile);
-extern void
-AccelerationDefaultCleanup(DeviceIntPtr pDev);
+extern _X_INTERNAL void
+AccelerationDefaultCleanup(DeviceIntPtr dev);
-extern void
-acceleratePointerPredictable(DeviceIntPtr pDev, int first_valuator,
+extern _X_INTERNAL void
+acceleratePointerPredictable(DeviceIntPtr dev, int first_valuator,
int num_valuators, int *valuators, int evtime);
-extern void
-acceleratePointerLightweight(DeviceIntPtr pDev, int first_valuator,
- int num_valuators, int *valuators, int ignore);
+extern _X_INTERNAL void
+acceleratePointerLightweight(DeviceIntPtr dev, int first_valuator,
+ int num_valuators, int *valuators, int ignored);
#endif /* POINTERVELOCITY_H */
diff --git a/xorg-server/include/regionstr.h b/xorg-server/include/regionstr.h
index db712f8ae..eead1a1f2 100644
--- a/xorg-server/include/regionstr.h
+++ b/xorg-server/include/regionstr.h
@@ -66,9 +66,9 @@ typedef struct pixman_region16 RegionRec, *RegionPtr;
typedef struct pixman_region16_data RegDataRec, *RegDataPtr;
-extern BoxRec miEmptyBox;
-extern RegDataRec miEmptyData;
-extern RegDataRec miBrokenData;
+extern _X_EXPORT BoxRec miEmptyBox;
+extern _X_EXPORT RegDataRec miEmptyData;
+extern _X_EXPORT RegDataRec miBrokenData;
#define REGION_NIL(reg) ((reg)->data && !(reg)->data->numRects)
/* not a region */
@@ -198,96 +198,96 @@ extern RegDataRec miBrokenData;
/* moved from mi.h */
-extern void InitRegions (void);
+extern _X_EXPORT void InitRegions (void);
-extern RegionPtr miRegionCreate(
+extern _X_EXPORT RegionPtr miRegionCreate(
BoxPtr /*rect*/,
int /*size*/);
-extern void miRegionInit(
+extern _X_EXPORT void miRegionInit(
RegionPtr /*pReg*/,
BoxPtr /*rect*/,
int /*size*/);
-extern void miRegionDestroy(
+extern _X_EXPORT void miRegionDestroy(
RegionPtr /*pReg*/);
-extern void miRegionUninit(
+extern _X_EXPORT void miRegionUninit(
RegionPtr /*pReg*/);
-extern Bool miRegionCopy(
+extern _X_EXPORT Bool miRegionCopy(
RegionPtr /*dst*/,
RegionPtr /*src*/);
-extern Bool miIntersect(
+extern _X_EXPORT Bool miIntersect(
RegionPtr /*newReg*/,
RegionPtr /*reg1*/,
RegionPtr /*reg2*/);
-extern Bool miUnion(
+extern _X_EXPORT Bool miUnion(
RegionPtr /*newReg*/,
RegionPtr /*reg1*/,
RegionPtr /*reg2*/);
-extern Bool miRegionAppend(
+extern _X_EXPORT Bool miRegionAppend(
RegionPtr /*dstrgn*/,
RegionPtr /*rgn*/);
-extern Bool miRegionValidate(
+extern _X_EXPORT Bool miRegionValidate(
RegionPtr /*badreg*/,
Bool * /*pOverlap*/);
-extern RegionPtr miRectsToRegion(
+extern _X_EXPORT RegionPtr miRectsToRegion(
int /*nrects*/,
xRectanglePtr /*prect*/,
int /*ctype*/);
-extern Bool miSubtract(
+extern _X_EXPORT Bool miSubtract(
RegionPtr /*regD*/,
RegionPtr /*regM*/,
RegionPtr /*regS*/);
-extern Bool miInverse(
+extern _X_EXPORT Bool miInverse(
RegionPtr /*newReg*/,
RegionPtr /*reg1*/,
BoxPtr /*invRect*/);
-extern int miRectIn(
+extern _X_EXPORT int miRectIn(
RegionPtr /*region*/,
BoxPtr /*prect*/);
-extern void miTranslateRegion(
+extern _X_EXPORT void miTranslateRegion(
RegionPtr /*pReg*/,
int /*x*/,
int /*y*/);
-extern void miRegionReset(
+extern _X_EXPORT void miRegionReset(
RegionPtr /*pReg*/,
BoxPtr /*pBox*/);
-extern Bool miRegionBreak(
+extern _X_EXPORT Bool miRegionBreak(
RegionPtr /*pReg*/);
-extern Bool miPointInRegion(
+extern _X_EXPORT Bool miPointInRegion(
RegionPtr /*pReg*/,
int /*x*/,
int /*y*/,
BoxPtr /*box*/);
-extern Bool miRegionEqual(
+extern _X_EXPORT Bool miRegionEqual(
RegionPtr /*pReg1*/,
RegionPtr /*pReg2*/);
-extern Bool miRegionNotEmpty(
+extern _X_EXPORT Bool miRegionNotEmpty(
RegionPtr /*pReg*/);
-extern void miRegionEmpty(
+extern _X_EXPORT void miRegionEmpty(
RegionPtr /*pReg*/);
-extern BoxPtr miRegionExtents(
+extern _X_EXPORT BoxPtr miRegionExtents(
RegionPtr /*pReg*/);
-extern void miPrintRegion(
+extern _X_EXPORT void miPrintRegion(
RegionPtr /*pReg*/);
#endif /* REGIONSTRUCT_H */
diff --git a/xorg-server/include/registry.h b/xorg-server/include/registry.h
index 29e5fdfd3..325f76515 100644
--- a/xorg-server/include/registry.h
+++ b/xorg-server/include/registry.h
@@ -28,22 +28,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* 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);
+extern _X_EXPORT void RegisterResourceName(RESTYPE type, char *name);
+extern _X_EXPORT 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);
+extern _X_EXPORT const char *LookupMajorName(int major);
+extern _X_EXPORT const char *LookupRequestName(int major, int minor);
+extern _X_EXPORT const char *LookupEventName(int event);
+extern _X_EXPORT const char *LookupErrorName(int error);
+extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype);
/*
* Setup and teardown
*/
-void dixResetRegistry(void);
+extern _X_EXPORT void dixResetRegistry(void);
#else /* XREGISTRY */
diff --git a/xorg-server/include/resource.h b/xorg-server/include/resource.h
index 9b5792e30..774f81b56 100644
--- a/xorg-server/include/resource.h
+++ b/xorg-server/include/resource.h
@@ -122,7 +122,7 @@ typedef unsigned long RESTYPE;
#define BAD_RESOURCE 0xe0000000
/* Resource state callback */
-extern CallbackListPtr ResourceStateCallback;
+extern _X_EXPORT CallbackListPtr ResourceStateCallback;
typedef enum {ResourceStateAdding,
ResourceStateFreeing} ResourceState;
@@ -154,15 +154,15 @@ typedef Bool (*FindComplexResType)(
XID /*id*/,
pointer /*cdata*/);
-extern RESTYPE CreateNewResourceType(
+extern _X_EXPORT RESTYPE CreateNewResourceType(
DeleteType /*deleteFunc*/);
-extern RESTYPE CreateNewResourceClass(void);
+extern _X_EXPORT RESTYPE CreateNewResourceClass(void);
-extern Bool InitClientResources(
+extern _X_EXPORT Bool InitClientResources(
ClientPtr /*client*/);
-extern XID FakeClientID(
+extern _X_EXPORT XID FakeClientID(
int /*client*/);
/* Quartz support on Mac OS X uses the CarbonCore
@@ -170,81 +170,81 @@ extern XID FakeClientID(
#ifdef __APPLE__
#define AddResource Darwin_X_AddResource
#endif
-extern Bool AddResource(
+extern _X_EXPORT Bool AddResource(
XID /*id*/,
RESTYPE /*type*/,
pointer /*value*/);
-extern void FreeResource(
+extern _X_EXPORT void FreeResource(
XID /*id*/,
RESTYPE /*skipDeleteFuncType*/);
-extern void FreeResourceByType(
+extern _X_EXPORT void FreeResourceByType(
XID /*id*/,
RESTYPE /*type*/,
Bool /*skipFree*/);
-extern Bool ChangeResourceValue(
+extern _X_EXPORT Bool ChangeResourceValue(
XID /*id*/,
RESTYPE /*rtype*/,
pointer /*value*/);
-extern void FindClientResourcesByType(
+extern _X_EXPORT void FindClientResourcesByType(
ClientPtr /*client*/,
RESTYPE /*type*/,
FindResType /*func*/,
pointer /*cdata*/);
-extern void FindAllClientResources(
+extern _X_EXPORT void FindAllClientResources(
ClientPtr /*client*/,
FindAllRes /*func*/,
pointer /*cdata*/);
-extern void FreeClientNeverRetainResources(
+extern _X_EXPORT void FreeClientNeverRetainResources(
ClientPtr /*client*/);
-extern void FreeClientResources(
+extern _X_EXPORT void FreeClientResources(
ClientPtr /*client*/);
-extern void FreeAllResources(void);
+extern _X_EXPORT void FreeAllResources(void);
-extern Bool LegalNewID(
+extern _X_EXPORT Bool LegalNewID(
XID /*id*/,
ClientPtr /*client*/);
-extern pointer LookupClientResourceComplex(
+extern _X_EXPORT pointer LookupClientResourceComplex(
ClientPtr client,
RESTYPE type,
FindComplexResType func,
pointer cdata);
-extern int dixLookupResourceByType(
+extern _X_EXPORT int dixLookupResourceByType(
pointer *result,
XID id,
RESTYPE rtype,
ClientPtr client,
Mask access_mode);
-extern int dixLookupResourceByClass(
+extern _X_EXPORT int dixLookupResourceByClass(
pointer *result,
XID id,
RESTYPE rclass,
ClientPtr client,
Mask access_mode);
-extern void GetXIDRange(
+extern _X_EXPORT void GetXIDRange(
int /*client*/,
Bool /*server*/,
XID * /*minp*/,
XID * /*maxp*/);
-extern unsigned int GetXIDList(
+extern _X_EXPORT unsigned int GetXIDList(
ClientPtr /*client*/,
unsigned int /*count*/,
XID * /*pids*/);
-extern RESTYPE lastResourceType;
-extern RESTYPE TypeMask;
+extern _X_EXPORT RESTYPE lastResourceType;
+extern _X_EXPORT RESTYPE TypeMask;
/*
* These are deprecated compatibility functions and will be removed soon!
@@ -265,26 +265,27 @@ extern int dixLookupResource(
ClientPtr client,
Mask access_mode) X_DEPRECATED;
-extern pointer SecurityLookupIDByType(
+/* replaced by dixLookupResourceByType */
+extern _X_EXPORT pointer SecurityLookupIDByType(
ClientPtr client,
XID id,
RESTYPE rtype,
Mask access_mode) X_DEPRECATED;
/* replaced by dixLookupResourceByClass */
-extern pointer SecurityLookupIDByClass(
+extern _X_EXPORT pointer SecurityLookupIDByClass(
ClientPtr client,
XID id,
RESTYPE classes,
Mask access_mode) X_DEPRECATED;
/* replaced by dixLookupResourceByType */
-extern pointer LookupIDByType(
+extern _X_EXPORT pointer LookupIDByType(
XID id,
RESTYPE rtype) X_DEPRECATED;
/* replaced by dixLookupResourceByClass */
-extern pointer LookupIDByClass(
+extern _X_EXPORT pointer LookupIDByClass(
XID id,
RESTYPE classes) X_DEPRECATED;
diff --git a/xorg-server/include/screenint.h b/xorg-server/include/screenint.h
index 6d074a375..4e6c574e7 100644
--- a/xorg-server/include/screenint.h
+++ b/xorg-server/include/screenint.h
@@ -55,7 +55,7 @@ typedef struct _Visual *VisualPtr;
typedef struct _Depth *DepthPtr;
typedef struct _Screen *ScreenPtr;
-extern int AddScreen(
+extern _X_EXPORT int AddScreen(
Bool (* /*pfnInit*/)(
int /*index*/,
ScreenPtr /*pScreen*/,
diff --git a/xorg-server/include/scrnintstr.h b/xorg-server/include/scrnintstr.h
index a309077ce..ab50e7a32 100644
--- a/xorg-server/include/scrnintstr.h
+++ b/xorg-server/include/scrnintstr.h
@@ -611,9 +611,9 @@ typedef struct _ScreenInfo {
int unused;
} ScreenInfo;
-extern ScreenInfo screenInfo;
+extern _X_EXPORT ScreenInfo screenInfo;
-extern void InitOutput(
+extern _X_EXPORT void InitOutput(
ScreenInfo * /*pScreenInfo*/,
int /*argc*/,
char ** /*argv*/);
diff --git a/xorg-server/include/selection.h b/xorg-server/include/selection.h
index dd9b056fe..3271f6abb 100644
--- a/xorg-server/include/selection.h
+++ b/xorg-server/include/selection.h
@@ -70,12 +70,12 @@ typedef struct _Selection {
* Selection API
*/
-int dixLookupSelection(Selection **result, Atom name,
+extern _X_EXPORT int dixLookupSelection(Selection **result, Atom name,
ClientPtr client, Mask access_mode);
-extern Selection *CurrentSelections;
+extern _X_EXPORT Selection *CurrentSelections;
-extern CallbackListPtr SelectionCallback;
+extern _X_EXPORT CallbackListPtr SelectionCallback;
typedef enum {
SelectionSetOwner,
@@ -94,11 +94,11 @@ typedef struct {
* Selection server internals
*/
-void InitSelections(void);
+extern _X_EXPORT void InitSelections(void);
-void DeleteWindowFromAnySelections(WindowPtr pWin);
+extern _X_EXPORT void DeleteWindowFromAnySelections(WindowPtr pWin);
-void DeleteClientFromAnySelections(ClientPtr client);
+extern _X_EXPORT void DeleteClientFromAnySelections(ClientPtr client);
#endif /* SELECTION_H */
diff --git a/xorg-server/include/servermd.h b/xorg-server/include/servermd.h
index dec9f3b9e..e1d644e00 100644
--- a/xorg-server/include/servermd.h
+++ b/xorg-server/include/servermd.h
@@ -288,6 +288,7 @@ SOFTWARE.
#define LOG2_BYTES_PER_SCANLINE_PAD 2
#endif
+#include <X11/Xfuncproto.h>
/*
* This returns the number of padding units, for depth d and width w.
* For bitmaps this can be calculated with the macros above.
@@ -303,7 +304,7 @@ typedef struct _PaddingInfo {
int bytesPerPixel; /* only set when notPower2 is TRUE */
int bitsPerPixel; /* bits per pixel */
} PaddingInfo;
-extern PaddingInfo PixmapWidthPaddingInfo[];
+extern _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[];
/* The only portable way to get the bpp from the depth is to look it up */
#define BitsPerPixel(d) (PixmapWidthPaddingInfo[d].bitsPerPixel)
diff --git a/xorg-server/include/site.h b/xorg-server/include/site.h
index fec87070b..c07cbbfe6 100644
--- a/xorg-server/include/site.h
+++ b/xorg-server/include/site.h
@@ -90,11 +90,7 @@ SOFTWARE.
#define DEFAULT_BELL 50
#define DEFAULT_BELL_PITCH 400
#define DEFAULT_BELL_DURATION 100
-#ifdef XKB
#define DEFAULT_AUTOREPEAT TRUE
-#else
-#define DEFAULT_AUTOREPEAT FALSE
-#endif
#define DEFAULT_AUTOREPEATS {\
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\
diff --git a/xorg-server/include/swaprep.h b/xorg-server/include/swaprep.h
index bebd3a814..8c02737d3 100644
--- a/xorg-server/include/swaprep.h
+++ b/xorg-server/include/swaprep.h
@@ -26,239 +26,239 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SWAPREP_H
#define SWAPREP_H 1
-extern void Swap32Write(
+extern _X_EXPORT void Swap32Write(
ClientPtr /* pClient */,
int /* size */,
CARD32 * /* pbuf */);
-extern void CopySwap32Write(
+extern _X_EXPORT void CopySwap32Write(
ClientPtr /* pClient */,
int /* size */,
CARD32 * /* pbuf */);
-extern void CopySwap16Write(
+extern _X_EXPORT void CopySwap16Write(
ClientPtr /* pClient */,
int /* size */,
short * /* pbuf */);
-extern void SGenericReply(
+extern _X_EXPORT void SGenericReply(
ClientPtr /* pClient */,
int /* size */,
xGenericReply * /* pRep */);
-extern void SGetWindowAttributesReply(
+extern _X_EXPORT void SGetWindowAttributesReply(
ClientPtr /* pClient */,
int /* size */,
xGetWindowAttributesReply * /* pRep */);
-extern void SGetGeometryReply(
+extern _X_EXPORT void SGetGeometryReply(
ClientPtr /* pClient */,
int /* size */,
xGetGeometryReply * /* pRep */);
-extern void SQueryTreeReply(
+extern _X_EXPORT void SQueryTreeReply(
ClientPtr /* pClient */,
int /* size */,
xQueryTreeReply * /* pRep */);
-extern void SInternAtomReply(
+extern _X_EXPORT void SInternAtomReply(
ClientPtr /* pClient */,
int /* size */,
xInternAtomReply * /* pRep */);
-extern void SGetAtomNameReply(
+extern _X_EXPORT void SGetAtomNameReply(
ClientPtr /* pClient */,
int /* size */,
xGetAtomNameReply * /* pRep */);
-extern void SGetPropertyReply(
+extern _X_EXPORT void SGetPropertyReply(
ClientPtr /* pClient */,
int /* size */,
xGetPropertyReply * /* pRep */);
-extern void SListPropertiesReply(
+extern _X_EXPORT void SListPropertiesReply(
ClientPtr /* pClient */,
int /* size */,
xListPropertiesReply * /* pRep */);
-extern void SGetSelectionOwnerReply(
+extern _X_EXPORT void SGetSelectionOwnerReply(
ClientPtr /* pClient */,
int /* size */,
xGetSelectionOwnerReply * /* pRep */);
-extern void SQueryPointerReply(
+extern _X_EXPORT void SQueryPointerReply(
ClientPtr /* pClient */,
int /* size */,
xQueryPointerReply * /* pRep */);
-extern void SwapTimeCoordWrite(
+extern _X_EXPORT void SwapTimeCoordWrite(
ClientPtr /* pClient */,
int /* size */,
xTimecoord * /* pRep */);
-extern void SGetMotionEventsReply(
+extern _X_EXPORT void SGetMotionEventsReply(
ClientPtr /* pClient */,
int /* size */,
xGetMotionEventsReply * /* pRep */);
-extern void STranslateCoordsReply(
+extern _X_EXPORT void STranslateCoordsReply(
ClientPtr /* pClient */,
int /* size */,
xTranslateCoordsReply * /* pRep */);
-extern void SGetInputFocusReply(
+extern _X_EXPORT void SGetInputFocusReply(
ClientPtr /* pClient */,
int /* size */,
xGetInputFocusReply * /* pRep */);
-extern void SQueryKeymapReply(
+extern _X_EXPORT void SQueryKeymapReply(
ClientPtr /* pClient */,
int /* size */,
xQueryKeymapReply * /* pRep */);
-extern void SQueryFontReply(
+extern _X_EXPORT void SQueryFontReply(
ClientPtr /* pClient */,
int /* size */,
xQueryFontReply * /* pRep */);
-extern void SQueryTextExtentsReply(
+extern _X_EXPORT void SQueryTextExtentsReply(
ClientPtr /* pClient */,
int /* size */,
xQueryTextExtentsReply * /* pRep */);
-extern void SListFontsReply(
+extern _X_EXPORT void SListFontsReply(
ClientPtr /* pClient */,
int /* size */,
xListFontsReply * /* pRep */);
-extern void SListFontsWithInfoReply(
+extern _X_EXPORT void SListFontsWithInfoReply(
ClientPtr /* pClient */,
int /* size */,
xListFontsWithInfoReply * /* pRep */);
-extern void SGetFontPathReply(
+extern _X_EXPORT void SGetFontPathReply(
ClientPtr /* pClient */,
int /* size */,
xGetFontPathReply * /* pRep */);
-extern void SGetImageReply(
+extern _X_EXPORT void SGetImageReply(
ClientPtr /* pClient */,
int /* size */,
xGetImageReply * /* pRep */);
-extern void SListInstalledColormapsReply(
+extern _X_EXPORT void SListInstalledColormapsReply(
ClientPtr /* pClient */,
int /* size */,
xListInstalledColormapsReply * /* pRep */);
-extern void SAllocColorReply(
+extern _X_EXPORT void SAllocColorReply(
ClientPtr /* pClient */,
int /* size */,
xAllocColorReply * /* pRep */);
-extern void SAllocNamedColorReply(
+extern _X_EXPORT void SAllocNamedColorReply(
ClientPtr /* pClient */,
int /* size */,
xAllocNamedColorReply * /* pRep */);
-extern void SAllocColorCellsReply(
+extern _X_EXPORT void SAllocColorCellsReply(
ClientPtr /* pClient */,
int /* size */,
xAllocColorCellsReply * /* pRep */);
-extern void SAllocColorPlanesReply(
+extern _X_EXPORT void SAllocColorPlanesReply(
ClientPtr /* pClient */,
int /* size */,
xAllocColorPlanesReply * /* pRep */);
-extern void SQColorsExtend(
+extern _X_EXPORT void SQColorsExtend(
ClientPtr /* pClient */,
int /* size */,
xrgb * /* prgb */);
-extern void SQueryColorsReply(
+extern _X_EXPORT void SQueryColorsReply(
ClientPtr /* pClient */,
int /* size */,
xQueryColorsReply * /* pRep */);
-extern void SLookupColorReply(
+extern _X_EXPORT void SLookupColorReply(
ClientPtr /* pClient */,
int /* size */,
xLookupColorReply * /* pRep */);
-extern void SQueryBestSizeReply(
+extern _X_EXPORT void SQueryBestSizeReply(
ClientPtr /* pClient */,
int /* size */,
xQueryBestSizeReply * /* pRep */);
-extern void SListExtensionsReply(
+extern _X_EXPORT void SListExtensionsReply(
ClientPtr /* pClient */,
int /* size */,
xListExtensionsReply * /* pRep */);
-extern void SGetKeyboardMappingReply(
+extern _X_EXPORT void SGetKeyboardMappingReply(
ClientPtr /* pClient */,
int /* size */,
xGetKeyboardMappingReply * /* pRep */);
-extern void SGetPointerMappingReply(
+extern _X_EXPORT void SGetPointerMappingReply(
ClientPtr /* pClient */,
int /* size */,
xGetPointerMappingReply * /* pRep */);
-extern void SGetModifierMappingReply(
+extern _X_EXPORT void SGetModifierMappingReply(
ClientPtr /* pClient */,
int /* size */,
xGetModifierMappingReply * /* pRep */);
-extern void SGetKeyboardControlReply(
+extern _X_EXPORT void SGetKeyboardControlReply(
ClientPtr /* pClient */,
int /* size */,
xGetKeyboardControlReply * /* pRep */);
-extern void SGetPointerControlReply(
+extern _X_EXPORT void SGetPointerControlReply(
ClientPtr /* pClient */,
int /* size */,
xGetPointerControlReply * /* pRep */);
-extern void SGetScreenSaverReply(
+extern _X_EXPORT void SGetScreenSaverReply(
ClientPtr /* pClient */,
int /* size */,
xGetScreenSaverReply * /* pRep */);
-extern void SLHostsExtend(
+extern _X_EXPORT void SLHostsExtend(
ClientPtr /* pClient */,
int /* size */,
char * /* buf */);
-extern void SListHostsReply(
+extern _X_EXPORT void SListHostsReply(
ClientPtr /* pClient */,
int /* size */,
xListHostsReply * /* pRep */);
-extern void SErrorEvent(
+extern _X_EXPORT void SErrorEvent(
xError * /* from */,
xError * /* to */);
-extern void SwapConnSetupInfo(
+extern _X_EXPORT void SwapConnSetupInfo(
char * /* pInfo */,
char * /* pInfoTBase */);
-extern void WriteSConnectionInfo(
+extern _X_EXPORT void WriteSConnectionInfo(
ClientPtr /* pClient */,
unsigned long /* size */,
char * /* pInfo */);
-extern void SwapConnSetupPrefix(
+extern _X_EXPORT void SwapConnSetupPrefix(
xConnSetupPrefix * /* pcspFrom */,
xConnSetupPrefix * /* pcspTo */);
-extern void WriteSConnSetupPrefix(
+extern _X_EXPORT void WriteSConnSetupPrefix(
ClientPtr /* pClient */,
xConnSetupPrefix * /* pcsp */);
#undef SWAPREP_PROC
-#define SWAPREP_PROC(func) void func(xEvent * /* from */, xEvent * /* to */)
+#define SWAPREP_PROC(func) extern _X_EXPORT void func(xEvent * /* from */, xEvent * /* to */)
SWAPREP_PROC(SCirculateEvent);
SWAPREP_PROC(SClientMessageEvent);
diff --git a/xorg-server/include/swapreq.h b/xorg-server/include/swapreq.h
index 83e524bab..8038f0272 100644
--- a/xorg-server/include/swapreq.h
+++ b/xorg-server/include/swapreq.h
@@ -26,15 +26,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SWAPREQ_H
#define SWAPREQ_H 1
-extern void SwapColorItem(
+extern _X_EXPORT void SwapColorItem(
xColorItem * /* pItem */);
-extern void SwapConnClientPrefix(
+extern _X_EXPORT void SwapConnClientPrefix(
xConnClientPrefix * /* pCCP */);
#undef SWAPREQ_PROC
-#define SWAPREQ_PROC(func) int func(ClientPtr /* client */)
+#define SWAPREQ_PROC(func) extern _X_EXPORT int func(ClientPtr /* client */)
SWAPREQ_PROC(SProcAllocColor);
SWAPREQ_PROC(SProcAllocColorCells);
diff --git a/xorg-server/include/version-config.h.in b/xorg-server/include/version-config.h.in
new file mode 100644
index 000000000..8180dff8e
--- /dev/null
+++ b/xorg-server/include/version-config.h.in
@@ -0,0 +1,16 @@
+/* version-config.h.in: not generated */
+
+#ifndef VERSION_CONFIG_H
+#define VERSION_CONFIG_H
+
+/* Vendor man version */
+#undef VENDOR_MAN_VERSION
+
+/* Vendor name */
+#undef VENDOR_NAME
+
+/* Vendor release */
+#undef VENDOR_RELEASE
+
+#endif /* VERSION_CONFIG_H */
+
diff --git a/xorg-server/include/window.h b/xorg-server/include/window.h
index 04cbe2627..6fb2f8c18 100644
--- a/xorg-server/include/window.h
+++ b/xorg-server/include/window.h
@@ -77,30 +77,30 @@ typedef int (*VisitWindowProcPtr)(
WindowPtr /*pWin*/,
pointer /*data*/);
-extern int TraverseTree(
+extern _X_EXPORT int TraverseTree(
WindowPtr /*pWin*/,
VisitWindowProcPtr /*func*/,
pointer /*data*/);
-extern int WalkTree(
+extern _X_EXPORT int WalkTree(
ScreenPtr /*pScreen*/,
VisitWindowProcPtr /*func*/,
pointer /*data*/);
-extern Bool CreateRootWindow(
+extern _X_EXPORT Bool CreateRootWindow(
ScreenPtr /*pScreen*/);
-extern void InitRootWindow(
+extern _X_EXPORT void InitRootWindow(
WindowPtr /*pWin*/);
typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
-void RegisterRealChildHeadProc (RealChildHeadProc proc);
+extern _X_EXPORT void RegisterRealChildHeadProc (RealChildHeadProc proc);
-extern WindowPtr RealChildHead(
+extern _X_EXPORT WindowPtr RealChildHead(
WindowPtr /*pWin*/);
-extern WindowPtr CreateWindow(
+extern _X_EXPORT WindowPtr CreateWindow(
Window /*wid*/,
WindowPtr /*pParent*/,
int /*x*/,
@@ -116,11 +116,11 @@ extern WindowPtr CreateWindow(
VisualID /*visual*/,
int* /*error*/);
-extern int DeleteWindow(
+extern _X_EXPORT int DeleteWindow(
pointer /*pWin*/,
XID /*wid*/);
-extern int DestroySubwindows(
+extern _X_EXPORT int DestroySubwindows(
WindowPtr /*pWin*/,
ClientPtr /*client*/);
@@ -129,18 +129,18 @@ extern int DestroySubwindows(
#ifdef __APPLE__
#define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
#endif
-extern int ChangeWindowAttributes(
+extern _X_EXPORT int ChangeWindowAttributes(
WindowPtr /*pWin*/,
Mask /*vmask*/,
XID* /*vlist*/,
ClientPtr /*client*/);
-extern int ChangeWindowDeviceCursor(
+extern _X_EXPORT int ChangeWindowDeviceCursor(
WindowPtr /*pWin*/,
struct _DeviceIntRec* /*pDev*/,
struct _Cursor* /*pCursor*/);
-extern struct _Cursor* WindowGetDeviceCursor(
+extern _X_EXPORT struct _Cursor* WindowGetDeviceCursor(
WindowPtr /*pWin*/,
struct _DeviceIntRec* /*pDev*/);
@@ -150,16 +150,13 @@ extern struct _Cursor* WindowGetDeviceCursor(
#define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
extern void Darwin_X_GetWindowAttributes(
#else
-extern void GetWindowAttributes(
+extern _X_EXPORT void GetWindowAttributes(
#endif
WindowPtr /*pWin*/,
ClientPtr /*client*/,
xGetWindowAttributesReply* /* wa */);
-extern RegionPtr CreateUnclippedWinSize(
- WindowPtr /*pWin*/);
-
-extern void GravityTranslate(
+extern _X_EXPORT void GravityTranslate(
int /*x*/,
int /*y*/,
int /*oldx*/,
@@ -170,103 +167,103 @@ extern void GravityTranslate(
int* /*destx*/,
int* /*desty*/);
-extern int ConfigureWindow(
+extern _X_EXPORT int ConfigureWindow(
WindowPtr /*pWin*/,
Mask /*mask*/,
XID* /*vlist*/,
ClientPtr /*client*/);
-extern int CirculateWindow(
+extern _X_EXPORT int CirculateWindow(
WindowPtr /*pParent*/,
int /*direction*/,
ClientPtr /*client*/);
-extern int ReparentWindow(
+extern _X_EXPORT int ReparentWindow(
WindowPtr /*pWin*/,
WindowPtr /*pParent*/,
int /*x*/,
int /*y*/,
ClientPtr /*client*/);
-extern int MapWindow(
+extern _X_EXPORT int MapWindow(
WindowPtr /*pWin*/,
ClientPtr /*client*/);
-extern void MapSubwindows(
+extern _X_EXPORT void MapSubwindows(
WindowPtr /*pParent*/,
ClientPtr /*client*/);
-extern int UnmapWindow(
+extern _X_EXPORT int UnmapWindow(
WindowPtr /*pWin*/,
Bool /*fromConfigure*/);
-extern void UnmapSubwindows(
+extern _X_EXPORT void UnmapSubwindows(
WindowPtr /*pWin*/);
-extern void HandleSaveSet(
+extern _X_EXPORT void HandleSaveSet(
ClientPtr /*client*/);
-extern Bool PointInWindowIsVisible(
+extern _X_EXPORT Bool PointInWindowIsVisible(
WindowPtr /*pWin*/,
int /*x*/,
int /*y*/);
-extern RegionPtr NotClippedByChildren(
+extern _X_EXPORT RegionPtr NotClippedByChildren(
WindowPtr /*pWin*/);
-extern void SendVisibilityNotify(
+extern _X_EXPORT void SendVisibilityNotify(
WindowPtr /*pWin*/);
-extern int dixSaveScreens(
+extern _X_EXPORT int dixSaveScreens(
ClientPtr client,
int on,
int mode);
-extern int SaveScreens(
+extern _X_EXPORT int SaveScreens(
int on,
int mode);
-extern WindowPtr FindWindowWithOptional(
+extern _X_EXPORT WindowPtr FindWindowWithOptional(
WindowPtr /*w*/);
-extern void CheckWindowOptionalNeed(
+extern _X_EXPORT void CheckWindowOptionalNeed(
WindowPtr /*w*/);
-extern Bool MakeWindowOptional(
+extern _X_EXPORT Bool MakeWindowOptional(
WindowPtr /*pWin*/);
-extern WindowPtr MoveWindowInStack(
+extern _X_EXPORT WindowPtr MoveWindowInStack(
WindowPtr /*pWin*/,
WindowPtr /*pNextSib*/);
-void SetWinSize(
+extern _X_EXPORT void SetWinSize(
WindowPtr /*pWin*/);
-void SetBorderSize(
+extern _X_EXPORT void SetBorderSize(
WindowPtr /*pWin*/);
-void ResizeChildrenWinSize(
+extern _X_EXPORT void ResizeChildrenWinSize(
WindowPtr /*pWin*/,
int /*dx*/,
int /*dy*/,
int /*dw*/,
int /*dh*/);
-extern void ShapeExtensionInit(void);
+extern _X_EXPORT void ShapeExtensionInit(void);
-extern void SendShapeNotify(
+extern _X_EXPORT void SendShapeNotify(
WindowPtr /* pWin */,
int /* which */ );
-extern RegionPtr CreateBoundingShape(
+extern _X_EXPORT RegionPtr CreateBoundingShape(
WindowPtr /* pWin */ );
-extern RegionPtr CreateClipShape(
+extern _X_EXPORT RegionPtr CreateClipShape(
WindowPtr /* pWin */ );
-extern void DisableMapUnmapEvents(
+extern _X_EXPORT void DisableMapUnmapEvents(
WindowPtr /* pWin */ );
-extern void EnableMapUnmapEvents(
+extern _X_EXPORT void EnableMapUnmapEvents(
WindowPtr /* pWin */ );
#endif /* WINDOW_H */
diff --git a/xorg-server/include/windowstr.h b/xorg-server/include/windowstr.h
index a31fdc1df..96bee9b93 100644
--- a/xorg-server/include/windowstr.h
+++ b/xorg-server/include/windowstr.h
@@ -59,7 +59,6 @@ SOFTWARE.
#include "miscstruct.h"
#include <X11/Xprotostr.h>
#include "opaque.h"
-#include "inputstr.h"
#define GuaranteeNothing 0
#define GuaranteeVisBack 1
@@ -79,24 +78,6 @@ typedef struct _DevCursorNode {
struct _DevCursorNode* next;
} DevCursNodeRec, *DevCursNodePtr, *DevCursorList;
-/* Mask structure for GE extension as stored on the window.
- * Allows one mask per extension.
- * .eventMask - Summary mask for all clients, used for quick checking.
- * .geClients - list of clients with their specific mask.
- */
-typedef struct _GenericClientMasks {
- Mask eventMasks[MAXEXTENSIONS];
- GenericMaskPtr geClients;
-} GenericClientMasksRec, *GenericClientMasksPtr;
-
-typedef struct _WindowAccessRec {
- int defaultRule; /* WindowAccessDenyAll */
- DeviceIntPtr* perm;
- int nperm;
- DeviceIntPtr* deny;
- int ndeny;
-} WindowAccessRec, *WindowAccessPtr;
-
typedef struct _WindowOpt {
VisualID visual; /* default: same as parent */
CursorPtr cursor; /* default: window.cursorNone */
@@ -113,8 +94,6 @@ typedef struct _WindowOpt {
RegionPtr inputShape; /* default: NULL */
struct _OtherInputMasks *inputMasks; /* default: NULL */
DevCursorList deviceCursors; /* default: NULL */
- struct _GenericClientMasks *geMasks; /* default: NULL */
- WindowAccessRec access;
} WindowOptRec, *WindowOptPtr;
#define BackgroundPixel 2L
@@ -162,8 +141,8 @@ typedef struct _Window {
RegionRec borderSize;
DDXPointRec origin; /* position relative to parent */
unsigned short borderWidth;
- unsigned short deliverableEvents;
- Mask eventMask;
+ unsigned short deliverableEvents; /* all masks from all clients */
+ Mask eventMask; /* mask from the creating client */
PixUnion background;
PixUnion border;
pointer backStorage; /* null when BS disabled */
@@ -195,7 +174,7 @@ typedef struct _Window {
* fields (or filling the appropriate default value)
*/
-extern Mask DontPropagateMasks[];
+extern _X_EXPORT Mask DontPropagateMasks[];
#define wTrackParent(w,field) ((w)->optional ? \
(w)->optional->field \
@@ -242,7 +221,7 @@ typedef struct _ScreenSaverStuff {
#define HasSaverWindow(i) (savedScreenInfo[i].pWindow != NullWindow)
-extern int screenIsSaved;
-extern ScreenSaverStuffRec savedScreenInfo[MAXSCREENS];
+extern _X_EXPORT int screenIsSaved;
+extern _X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS];
#endif /* WINDOWSTRUCT_H */
diff --git a/xorg-server/include/xkb-config.h.in b/xorg-server/include/xkb-config.h.in
index 29261def7..d3cdd1916 100644
--- a/xorg-server/include/xkb-config.h.in
+++ b/xorg-server/include/xkb-config.h.in
@@ -6,7 +6,19 @@
#define _XKB_CONFIG_H_
/* Default set of XKB rules. */
-#undef __XKBDEFRULES__
+#undef XKB_DFLT_RULES
+
+/* Default XKB model. */
+#undef XKB_DFLT_MODEL
+
+/* Default XKB layout. */
+#undef XKB_DFLT_LAYOUT
+
+/* Default XKB variant. */
+#undef XKB_DFLT_VARIANT
+
+/* Default XKB options. */
+#undef XKB_DFLT_OPTIONS
/* Path to XKB definitions. */
#undef XKB_BASE_DIRECTORY
diff --git a/xorg-server/include/xkbfile.h b/xorg-server/include/xkbfile.h
index 948d6ca4a..a4b99ee07 100644
--- a/xorg-server/include/xkbfile.h
+++ b/xorg-server/include/xkbfile.h
@@ -27,6 +27,8 @@
#ifndef _XKBFILE_H_
#define _XKBFILE_H_ 1
+#include "xkbstr.h"
+
/***====================================================================***/
#define XkbXKMFile 0
@@ -76,116 +78,101 @@ typedef void (*XkbFileAddOnFunc)(
#define _XkbErrXReqFailure 25
#define _XkbErrBadImplementation 26
-extern char * _XkbErrMessages[];
-extern unsigned _XkbErrCode;
-extern char * _XkbErrLocation;
-extern unsigned _XkbErrData;
-
/***====================================================================***/
_XFUNCPROTOBEGIN
-extern char * XkbIndentText(
+extern _X_EXPORT char * XkbIndentText(
unsigned /* size */
);
-extern char * XkbAtomText(
+extern _X_EXPORT char * XkbAtomText(
Atom /* atm */,
unsigned /* format */
);
-extern char * XkbKeysymText(
+extern _X_EXPORT char * XkbKeysymText(
KeySym /* sym */,
unsigned /* format */
);
-extern char * XkbStringText(
+extern _X_EXPORT char * XkbStringText(
char * /* str */,
unsigned /* format */
);
-extern char * XkbKeyNameText(
+extern _X_EXPORT char * XkbKeyNameText(
char * /* name */,
unsigned /* format */
);
-extern char *
+extern _X_EXPORT char *
XkbModIndexText(
unsigned /* ndx */,
unsigned /* format */
);
-extern char *
+extern _X_EXPORT char *
XkbModMaskText(
unsigned /* mask */,
unsigned /* format */
);
-extern char * XkbVModIndexText(
+extern _X_EXPORT char * XkbVModIndexText(
XkbDescPtr /* xkb */,
unsigned /* ndx */,
unsigned /* format */
);
-extern char * XkbVModMaskText(
+extern _X_EXPORT char * XkbVModMaskText(
XkbDescPtr /* xkb */,
unsigned /* modMask */,
unsigned /* mask */,
unsigned /* format */
);
-extern char * XkbConfigText(
+extern _X_EXPORT char * XkbConfigText(
unsigned /* config */,
unsigned /* format */
);
-extern char * XkbSIMatchText(
+extern _X_EXPORT char * XkbSIMatchText(
unsigned /* type */,
unsigned /* format */
);
-extern char * XkbIMWhichStateMaskText(
+extern _X_EXPORT char * XkbIMWhichStateMaskText(
unsigned /* use_which */,
unsigned /* format */
);
-extern char * XkbAccessXDetailText(
- unsigned /* state */,
- unsigned /* format */
-);
-
-extern char * XkbNKNDetailMaskText(
- unsigned /* detail */,
- unsigned /* format */
-);
-
-extern char * XkbControlsMaskText(
+extern _X_EXPORT char * XkbControlsMaskText(
unsigned /* ctrls */,
unsigned /* format */
);
-extern char * XkbGeomFPText(
+extern _X_EXPORT char * XkbGeomFPText(
int /* val */,
unsigned /* format */
);
-extern char * XkbDoodadTypeText(
+extern _X_EXPORT char * XkbDoodadTypeText(
unsigned /* type */,
unsigned /* format */
);
-extern char * XkbActionTypeText(
+extern _X_EXPORT char * XkbActionTypeText(
unsigned /* type */,
unsigned /* format */
);
-extern char * XkbActionText(
+extern _X_EXPORT char * XkbActionText(
XkbDescPtr /* xkb */,
XkbAction * /* action */,
unsigned /* format */
);
-extern char * XkbBehaviorText(
+extern _X_EXPORT char * XkbBehaviorText(
XkbDescPtr /* xkb */,
XkbBehavior * /* behavior */,
unsigned /* format */
@@ -202,33 +189,23 @@ extern char * XkbBehaviorText(
#define XkbKSIsDeadKey(k) \
(((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound))
-extern unsigned _XkbKSCheckCase(
+extern _X_EXPORT unsigned _XkbKSCheckCase(
KeySym /* sym */
);
-extern int XkbFindKeycodeByName(
+extern _X_EXPORT 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(
+extern _X_EXPORT Atom XkbInternAtom(
char * /* name */,
Bool /* onlyIfExists */
);
-extern void XkbInitAtoms(void);
-
/***====================================================================***/
#ifdef _XKBGEOM_H_
@@ -246,39 +223,23 @@ typedef struct _XkbDrawable {
struct _XkbDrawable * next;
} XkbDrawableRec,*XkbDrawablePtr;
-extern XkbDrawablePtr
-XkbGetOrderedDrawables(
- XkbGeometryPtr /* geom */,
- XkbSectionPtr /* section */
-);
-
-extern void
-XkbFreeOrderedDrawables(
- XkbDrawablePtr /* draw */
-);
-
#endif
/***====================================================================***/
-extern unsigned XkbConvertGetByNameComponents(
+extern _X_EXPORT unsigned XkbConvertGetByNameComponents(
Bool /* toXkm */,
unsigned /* orig */
);
-extern unsigned XkbConvertXkbComponents(
- Bool /* toXkm */,
- unsigned /* orig */
-);
-
-extern Bool XkbNameMatchesPattern(
+extern _X_EXPORT Bool XkbNameMatchesPattern(
char * /* name */,
char * /* pattern */
);
/***====================================================================***/
-extern Bool XkbWriteXKBKeycodes(
+extern _X_EXPORT Bool XkbWriteXKBKeycodes(
FILE * /* file */,
XkbDescPtr /* result */,
Bool /* topLevel */,
@@ -287,7 +248,7 @@ extern Bool XkbWriteXKBKeycodes(
void * /* priv */
);
-extern Bool XkbWriteXKBKeyTypes(
+extern _X_EXPORT Bool XkbWriteXKBKeyTypes(
FILE * /* file */,
XkbDescPtr /* result */,
Bool /* topLevel */,
@@ -296,34 +257,7 @@ extern Bool XkbWriteXKBKeyTypes(
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(
+extern _X_EXPORT Bool XkbWriteXKBCompatMap(
FILE * /* file */,
XkbDescPtr /* result */,
Bool /* topLevel */,
@@ -332,7 +266,7 @@ extern Bool XkbWriteXKBSemantics(
void * /* priv */
);
-extern Bool XkbWriteXKBLayout(
+extern _X_EXPORT Bool XkbWriteXKBSymbols(
FILE * /* file */,
XkbDescPtr /* result */,
Bool /* topLevel */,
@@ -341,7 +275,7 @@ extern Bool XkbWriteXKBLayout(
void * /* priv */
);
-extern Bool XkbWriteXKBKeymap(
+extern _X_EXPORT Bool XkbWriteXKBGeometry(
FILE * /* file */,
XkbDescPtr /* result */,
Bool /* topLevel */,
@@ -350,34 +284,7 @@ extern Bool XkbWriteXKBKeymap(
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(
+extern _X_EXPORT Bool XkbWriteXKBKeymapForNames(
FILE * /* file */,
XkbComponentNamesPtr /* names */,
XkbDescPtr /* xkb */,
@@ -385,17 +292,13 @@ extern Bool XkbWriteXKBKeymapForNames(
unsigned /* need */
);
-extern Status XkbMergeFile(
- XkbDescPtr /* xkb */
-);
-
/***====================================================================***/
-extern Bool XkmProbe(
+extern _X_EXPORT Bool XkmProbe(
FILE * /* file */
);
-extern unsigned XkmReadFile(
+extern _X_EXPORT unsigned XkmReadFile(
FILE * /* file */,
unsigned /* need */,
unsigned /* want */,
diff --git a/xorg-server/include/xkbrules.h b/xorg-server/include/xkbrules.h
index 648e2e9c6..0f3f93490 100644
--- a/xorg-server/include/xkbrules.h
+++ b/xorg-server/include/xkbrules.h
@@ -29,28 +29,21 @@
/***====================================================================***/
+typedef struct _XkbRMLVOSet {
+ char * rules;
+ char * model;
+ char * layout;
+ char * variant;
+ char * options;
+} XkbRMLVOSet;
+
typedef struct _XkbRF_VarDefs {
char * model;
char * layout;
char * variant;
char * options;
- unsigned short sz_extra;
- unsigned short num_extra;
- char * extra_names;
- char ** extra_values;
} XkbRF_VarDefsRec,*XkbRF_VarDefsPtr;
-typedef struct _XkbRF_VarDesc {
- char * name;
- char * desc;
-} XkbRF_VarDescRec, *XkbRF_VarDescPtr;
-
-typedef struct _XkbRF_DescribeVars {
- int sz_desc;
- int num_desc;
- XkbRF_VarDescPtr desc;
-} XkbRF_DescribeVarsRec,*XkbRF_DescribeVarsPtr;
-
typedef struct _XkbRF_Rule {
int number;
int layout_num;
@@ -65,7 +58,6 @@ typedef struct _XkbRF_Rule {
char * types;
char * compat;
char * geometry;
- char * keymap;
unsigned flags;
} XkbRF_RuleRec,*XkbRF_RulePtr;
@@ -82,15 +74,6 @@ typedef struct _XkbRF_Group {
#define XkbRF_Invalid (1L<<5)
typedef struct _XkbRF_Rules {
- XkbRF_DescribeVarsRec models;
- XkbRF_DescribeVarsRec layouts;
- XkbRF_DescribeVarsRec variants;
- XkbRF_DescribeVarsRec options;
- unsigned short sz_extra;
- unsigned short num_extra;
- char ** extra_names;
- XkbRF_DescribeVarsPtr extra;
-
unsigned short sz_rules;
unsigned short num_rules;
XkbRF_RulePtr rules;
@@ -103,24 +86,21 @@ typedef struct _XkbRF_Rules {
_XFUNCPROTOBEGIN
-extern Bool XkbRF_GetComponents(
+/* Seems preferable to dragging xkbstr.h in. */
+struct _XkbComponentNames;
+
+extern _X_EXPORT Bool XkbRF_GetComponents(
XkbRF_RulesPtr /* rules */,
XkbRF_VarDefsPtr /* var_defs */,
- XkbComponentNamesPtr /* names */
-);
-
-extern XkbRF_RulePtr XkbRF_AddRule(
- XkbRF_RulesPtr /* rules */
+ struct _XkbComponentNames * /* names */
);
-extern XkbRF_GroupPtr XkbRF_AddGroup(XkbRF_RulesPtr rules);
-
-extern Bool XkbRF_LoadRules(
+extern _X_EXPORT Bool XkbRF_LoadRules(
FILE * /* file */,
XkbRF_RulesPtr /* rules */
);
-extern Bool XkbRF_LoadRulesByName(
+extern _X_EXPORT Bool XkbRF_LoadRulesByName(
char * /* base */,
char * /* locale */,
XkbRF_RulesPtr /* rules */
@@ -128,51 +108,13 @@ extern Bool XkbRF_LoadRulesByName(
/***====================================================================***/
-extern XkbRF_VarDescPtr XkbRF_AddVarDesc(
- XkbRF_DescribeVarsPtr /* vars */
-);
-
-extern XkbRF_VarDescPtr XkbRF_AddVarDescCopy(
- XkbRF_DescribeVarsPtr /* vars */,
- XkbRF_VarDescPtr /* copy_from */
-);
-
-extern XkbRF_DescribeVarsPtr XkbRF_AddVarToDescribe(
- XkbRF_RulesPtr /* rules */,
- char * /* name */
-);
-
-extern Bool XkbRF_LoadDescriptions(
- FILE * /* file */,
- XkbRF_RulesPtr /* rules */
-);
+extern _X_EXPORT XkbRF_RulesPtr XkbRF_Create(void);
-extern Bool XkbRF_LoadDescriptionsByName(
- char * /* base */,
- char * /* locale */,
- XkbRF_RulesPtr /* rules */
-);
-
-extern XkbRF_RulesPtr XkbRF_Load(
- char * /* base */,
- char * /* locale */,
- Bool /* wantDesc */,
- Bool /* wantRules */
-);
-
-extern XkbRF_RulesPtr XkbRF_Create(
- int /* sz_rules */,
- int /* sz_extra */
-);
-
-/***====================================================================***/
-
-extern void XkbRF_Free(
+extern _X_EXPORT void XkbRF_Free(
XkbRF_RulesPtr /* rules */,
Bool /* freeRules */
);
-
/***====================================================================***/
#define _XKB_RF_NAMES_PROP_ATOM "_XKB_RULES_NAMES"
diff --git a/xorg-server/include/xkbsrv.h b/xorg-server/include/xkbsrv.h
index d43755e06..2c7d86aaa 100644
--- a/xorg-server/include/xkbsrv.h
+++ b/xorg-server/include/xkbsrv.h
@@ -54,7 +54,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/XKBproto.h>
#include "xkbstr.h"
+#include "xkbrules.h"
#include "inputstr.h"
+#include "events.h"
typedef struct _XkbInterest {
DeviceIntPtr dev;
@@ -273,10 +275,10 @@ typedef struct
device->public.realInputProc = oldprocs->realInputProc; \
device->unwrapProc = oldprocs->unwrapProc;
-extern DevPrivateKey xkbDevicePrivateKey;
+extern _X_EXPORT DevPrivateKey xkbDevicePrivateKey;
#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey))
-extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
+extern _X_EXPORT void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
/***====================================================================***/
@@ -289,48 +291,31 @@ 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;
-extern unsigned int XkbXIUnsupported;
-
-extern Bool noXkbExtension;
-
-extern pointer XkbLastRepeatEvent;
+extern _X_EXPORT int XkbReqCode;
+extern _X_EXPORT int XkbEventBase;
+extern _X_EXPORT int XkbKeyboardErrorCode;
+extern _X_EXPORT char * XkbBaseDirectory;
+extern _X_EXPORT char * XkbBinDirectory;
-extern CARD32 xkbDebugFlags;
+extern _X_EXPORT CARD32 xkbDebugFlags;
-#define _XkbAlloc(s) xalloc((s))
-#define _XkbCalloc(n,s) Xcalloc((n)*(s))
-#define _XkbRealloc(o,s) Xrealloc((o),(s))
#define _XkbTypedAlloc(t) ((t *)xalloc(sizeof(t)))
#define _XkbTypedCalloc(n,t) ((t *)Xcalloc((n)*sizeof(t)))
#define _XkbTypedRealloc(o,n,t) \
((o)?(t *)Xrealloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t))
#define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t))
-#define _XkbFree(p) Xfree(p)
#define _XkbLibError(c,l,d) /* Epoch fail */
#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
-extern int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify;
-extern int DeviceButtonPress,DeviceButtonRelease;
-extern int DeviceEnterNotify,DeviceLeaveNotify;
+extern _X_EXPORT int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify;
+extern _X_EXPORT int DeviceButtonPress,DeviceButtonRelease;
#define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress))
#define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease))
-#define _XkbCoreKeycodeInRange(c,k) (((k)>=(c)->curKeySyms.minKeyCode)&&\
- ((k)<=(c)->curKeySyms.maxKeyCode))
-#define _XkbCoreNumKeys(c) ((c)->curKeySyms.maxKeyCode-\
- (c)->curKeySyms.minKeyCode+1)
-
#define XConvertCase(s,l,u) XkbConvertCase(s,l,u)
#undef IsKeypadKey
#define IsKeypadKey(s) XkbKSIsKeypad(s)
@@ -342,33 +327,31 @@ extern int DeviceEnterNotify,DeviceLeaveNotify;
#define False FALSE
#endif
-_XFUNCPROTOBEGIN
-
-extern void XkbUseMsg(
+extern _X_EXPORT void XkbUseMsg(
void
);
-extern int XkbProcessArguments(
+extern _X_EXPORT int XkbProcessArguments(
int /* argc */,
char ** /* argv */,
int /* i */
);
-extern void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
+extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
-extern void XkbFreeCompatMap(
+extern _X_EXPORT void XkbFreeCompatMap(
XkbDescPtr /* xkb */,
unsigned int /* which */,
Bool /* freeMap */
);
-extern void XkbFreeNames(
+extern _X_EXPORT void XkbFreeNames(
XkbDescPtr /* xkb */,
unsigned int /* which */,
Bool /* freeMap */
);
-extern int _XkbLookupAnyDevice(
+extern _X_EXPORT int _XkbLookupAnyDevice(
DeviceIntPtr *pDev,
int id,
ClientPtr client,
@@ -376,7 +359,7 @@ extern int _XkbLookupAnyDevice(
int *xkb_err
);
-extern int _XkbLookupKeyboard(
+extern _X_EXPORT int _XkbLookupKeyboard(
DeviceIntPtr *pDev,
int id,
ClientPtr client,
@@ -384,7 +367,7 @@ extern int _XkbLookupKeyboard(
int *xkb_err
);
-extern int _XkbLookupBellDevice(
+extern _X_EXPORT int _XkbLookupBellDevice(
DeviceIntPtr *pDev,
int id,
ClientPtr client,
@@ -392,7 +375,7 @@ extern int _XkbLookupBellDevice(
int *xkb_err
);
-extern int _XkbLookupLedDevice(
+extern _X_EXPORT int _XkbLookupLedDevice(
DeviceIntPtr *pDev,
int id,
ClientPtr client,
@@ -400,7 +383,7 @@ extern int _XkbLookupLedDevice(
int *xkb_err
);
-extern int _XkbLookupButtonDevice(
+extern _X_EXPORT int _XkbLookupButtonDevice(
DeviceIntPtr *pDev,
int id,
ClientPtr client,
@@ -408,63 +391,63 @@ extern int _XkbLookupButtonDevice(
int *xkb_err
);
-extern XkbDescPtr XkbAllocKeyboard(
+extern _X_EXPORT XkbDescPtr XkbAllocKeyboard(
void
);
-extern Status XkbAllocClientMap(
+extern _X_EXPORT Status XkbAllocClientMap(
XkbDescPtr /* xkb */,
unsigned int /* which */,
unsigned int /* nTypes */
);
-extern Status XkbAllocServerMap(
+extern _X_EXPORT Status XkbAllocServerMap(
XkbDescPtr /* xkb */,
unsigned int /* which */,
unsigned int /* nNewActions */
);
-extern void XkbFreeClientMap(
+extern _X_EXPORT void XkbFreeClientMap(
XkbDescPtr /* xkb */,
unsigned int /* what */,
Bool /* freeMap */
);
-extern void XkbFreeServerMap(
+extern _X_EXPORT void XkbFreeServerMap(
XkbDescPtr /* xkb */,
unsigned int /* what */,
Bool /* freeMap */
);
-extern Status XkbAllocIndicatorMaps(
+extern _X_EXPORT Status XkbAllocIndicatorMaps(
XkbDescPtr /* xkb */
);
-extern Status XkbAllocCompatMap(
+extern _X_EXPORT Status XkbAllocCompatMap(
XkbDescPtr /* xkb */,
unsigned int /* which */,
unsigned int /* nInterpret */
);
-extern Status XkbAllocNames(
+extern _X_EXPORT Status XkbAllocNames(
XkbDescPtr /* xkb */,
unsigned int /* which */,
int /* nTotalRG */,
int /* nTotalAliases */
);
-extern Status XkbAllocControls(
+extern _X_EXPORT Status XkbAllocControls(
XkbDescPtr /* xkb */,
unsigned int /* which*/
);
-extern Status XkbCopyKeyTypes(
+extern _X_EXPORT Status XkbCopyKeyTypes(
XkbKeyTypePtr /* from */,
XkbKeyTypePtr /* into */,
int /* num_types */
);
-extern Status XkbResizeKeyType(
+extern _X_EXPORT Status XkbResizeKeyType(
XkbDescPtr /* xkb */,
int /* type_ndx */,
int /* map_count */,
@@ -472,67 +455,62 @@ extern Status XkbResizeKeyType(
int /* new_num_lvls */
);
-extern void XkbFreeKeyboard(
+extern _X_EXPORT void XkbFreeKeyboard(
XkbDescPtr /* xkb */,
unsigned int /* which */,
Bool /* freeDesc */
);
-extern void XkbSetActionKeyMods(
+extern _X_EXPORT void XkbSetActionKeyMods(
XkbDescPtr /* xkb */,
XkbAction * /* act */,
unsigned int /* mods */
);
-extern Bool XkbCheckActionVMods(
- XkbDescPtr /* xkb */,
- XkbAction * /* act */,
- unsigned int /* changed */
-);
-
-extern unsigned int XkbMaskForVMask(
+extern _X_EXPORT unsigned int XkbMaskForVMask(
XkbDescPtr /* xkb */,
unsigned int /* vmask */
);
-extern Bool XkbVirtualModsToReal(
+extern _X_EXPORT Bool XkbVirtualModsToReal(
XkbDescPtr /* xkb */,
unsigned int /* virtua_mask */,
unsigned int * /* mask_rtrn */
);
-extern unsigned int XkbAdjustGroup(
+extern _X_EXPORT unsigned int XkbAdjustGroup(
int /* group */,
XkbControlsPtr /* ctrls */
);
-extern KeySym *XkbResizeKeySyms(
+extern _X_EXPORT KeySym *XkbResizeKeySyms(
XkbDescPtr /* xkb */,
int /* key */,
int /* needed */
);
-extern XkbAction *XkbResizeKeyActions(
+extern _X_EXPORT XkbAction *XkbResizeKeyActions(
XkbDescPtr /* xkb */,
int /* key */,
int /* needed */
);
-extern void XkbUpdateKeyTypesFromCore(
+extern _X_EXPORT void XkbUpdateKeyTypesFromCore(
DeviceIntPtr /* pXDev */,
+ KeySymsPtr /* syms */,
KeyCode /* first */,
CARD8 /* num */,
XkbChangesPtr /* pChanges */
);
-extern void XkbUpdateDescActions(
+extern _X_EXPORT void XkbUpdateDescActions(
XkbDescPtr /* xkb */,
KeyCode /* first */,
CARD8 /* num */,
XkbChangesPtr /* changes */
);
-extern void XkbUpdateActions(
+extern _X_EXPORT void XkbUpdateActions(
DeviceIntPtr /* pXDev */,
KeyCode /* first */,
CARD8 /* num */,
@@ -541,27 +519,27 @@ extern void XkbUpdateActions(
XkbEventCausePtr /* cause */
);
-extern void XkbUpdateCoreDescription(
- DeviceIntPtr /* keybd */,
- Bool /* resize */
+extern _X_EXPORT KeySymsPtr XkbGetCoreMap(
+ DeviceIntPtr /* keybd */
);
-extern void XkbApplyMappingChange(
+extern _X_EXPORT void XkbApplyMappingChange(
DeviceIntPtr /* pXDev */,
- CARD8 /* request */,
- KeyCode /* firstKey */,
- CARD8 /* num */,
+ KeySymsPtr /* map */,
+ KeyCode /* firstKey */,
+ CARD8 /* num */,
+ CARD8 * /* modmap */,
ClientPtr /* client */
);
-extern void XkbSetIndicators(
+extern _X_EXPORT void XkbSetIndicators(
DeviceIntPtr /* pXDev */,
CARD32 /* affect */,
CARD32 /* values */,
XkbEventCausePtr /* cause */
);
-extern void XkbUpdateIndicators(
+extern _X_EXPORT void XkbUpdateIndicators(
DeviceIntPtr /* keybd */,
CARD32 /* changed */,
Bool /* check_edevs */,
@@ -569,14 +547,14 @@ extern void XkbUpdateIndicators(
XkbEventCausePtr /* cause */
);
-extern XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
+extern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
DeviceIntPtr /* dev */,
KbdFeedbackPtr /* kf */,
LedFeedbackPtr /* lf */,
unsigned int /* needed_parts */
);
-extern XkbSrvLedInfoPtr XkbCopySrvLedInfo(
+extern _X_EXPORT XkbSrvLedInfoPtr XkbCopySrvLedInfo(
DeviceIntPtr /* dev */,
XkbSrvLedInfoPtr /* src */,
KbdFeedbackPtr /* kf */,
@@ -584,14 +562,14 @@ extern XkbSrvLedInfoPtr XkbCopySrvLedInfo(
);
-extern XkbSrvLedInfoPtr XkbFindSrvLedInfo(
+extern _X_EXPORT XkbSrvLedInfoPtr XkbFindSrvLedInfo(
DeviceIntPtr /* dev */,
unsigned int /* class */,
unsigned int /* id */,
unsigned int /* needed_parts */
);
-extern void XkbApplyLedNameChanges(
+extern _X_EXPORT void XkbApplyLedNameChanges(
DeviceIntPtr /* dev */,
XkbSrvLedInfoPtr /* sli */,
unsigned int /* changed_names */,
@@ -600,7 +578,7 @@ extern void XkbApplyLedNameChanges(
XkbEventCausePtr /* cause */
);
-extern void XkbApplyLedMapChanges(
+extern _X_EXPORT void XkbApplyLedMapChanges(
DeviceIntPtr /* dev */,
XkbSrvLedInfoPtr /* sli */,
unsigned int /* changed_maps */,
@@ -609,7 +587,7 @@ extern void XkbApplyLedMapChanges(
XkbEventCausePtr /* cause */
);
-extern void XkbApplyLedStateChanges(
+extern _X_EXPORT void XkbApplyLedStateChanges(
DeviceIntPtr /* dev */,
XkbSrvLedInfoPtr /* sli */,
unsigned int /* changed_leds */,
@@ -618,7 +596,7 @@ extern void XkbApplyLedStateChanges(
XkbEventCausePtr /* cause */
);
-extern void XkbFlushLedEvents(
+extern _X_EXPORT void XkbFlushLedEvents(
DeviceIntPtr /* dev */,
DeviceIntPtr /* kbd */,
XkbSrvLedInfoPtr /* sli */,
@@ -627,45 +605,45 @@ extern void XkbFlushLedEvents(
XkbEventCausePtr /* cause */
);
-extern unsigned int XkbIndicatorsToUpdate(
+extern _X_EXPORT unsigned int XkbIndicatorsToUpdate(
DeviceIntPtr /* dev */,
unsigned long /* state_changes */,
Bool /* enabled_ctrl_changes */
);
-extern void XkbComputeDerivedState(
+extern _X_EXPORT void XkbComputeDerivedState(
XkbSrvInfoPtr /* xkbi */
);
-extern void XkbCheckSecondaryEffects(
+extern _X_EXPORT void XkbCheckSecondaryEffects(
XkbSrvInfoPtr /* xkbi */,
unsigned int /* which */,
XkbChangesPtr /* changes */,
XkbEventCausePtr /* cause */
);
-extern void XkbCheckIndicatorMaps(
+extern _X_EXPORT void XkbCheckIndicatorMaps(
DeviceIntPtr /* dev */,
XkbSrvLedInfoPtr /* sli */,
unsigned int /* which */
);
-extern unsigned int XkbStateChangedFlags(
+extern _X_EXPORT unsigned int XkbStateChangedFlags(
XkbStatePtr /* old */,
XkbStatePtr /* new */
);
-extern void XkbSendStateNotify(
+extern _X_EXPORT void XkbSendStateNotify(
DeviceIntPtr /* kbd */,
xkbStateNotify * /* pSN */
);
-extern void XkbSendMapNotify(
+extern _X_EXPORT void XkbSendMapNotify(
DeviceIntPtr /* kbd */,
xkbMapNotify * /* ev */
);
-extern int XkbComputeControlsNotify(
+extern _X_EXPORT int XkbComputeControlsNotify(
DeviceIntPtr /* kbd */,
XkbControlsPtr /* old */,
XkbControlsPtr /* new */,
@@ -673,17 +651,17 @@ extern int XkbComputeControlsNotify(
Bool /* forceCtrlProc */
);
-extern void XkbSendControlsNotify(
+extern _X_EXPORT void XkbSendControlsNotify(
DeviceIntPtr /* kbd */,
xkbControlsNotify * /* ev */
);
-extern void XkbSendCompatMapNotify(
+extern _X_EXPORT void XkbSendCompatMapNotify(
DeviceIntPtr /* kbd */,
xkbCompatMapNotify * /* ev */
);
-extern void XkbHandleBell(
+extern _X_EXPORT void XkbHandleBell(
BOOL /* force */,
BOOL /* eventOnly */,
DeviceIntPtr /* kbd */,
@@ -695,52 +673,45 @@ extern void XkbHandleBell(
ClientPtr /* pClient */
);
-extern void XkbSendAccessXNotify(
+extern _X_EXPORT void XkbSendAccessXNotify(
DeviceIntPtr /* kbd */,
xkbAccessXNotify * /* pEv */
);
-extern void XkbSendNamesNotify(
+extern _X_EXPORT void XkbSendNamesNotify(
DeviceIntPtr /* kbd */,
xkbNamesNotify * /* ev */
);
-extern void XkbSendCompatNotify(
- DeviceIntPtr /* kbd */,
- xkbCompatMapNotify * /* ev */
-);
-
-extern void XkbSendActionMessage(
+extern _X_EXPORT void XkbSendActionMessage(
DeviceIntPtr /* kbd */,
xkbActionMessage * /* ev */
);
-extern void XkbSendExtensionDeviceNotify(
+extern _X_EXPORT void XkbSendExtensionDeviceNotify(
DeviceIntPtr /* kbd */,
ClientPtr /* client */,
xkbExtensionDeviceNotify * /* ev */
);
-extern void XkbSendNotification(
+extern _X_EXPORT void XkbSendNotification(
DeviceIntPtr /* kbd */,
XkbChangesPtr /* pChanges */,
XkbEventCausePtr /* cause */
);
-extern void XkbProcessKeyboardEvent(
- struct _xEvent * /* xE */,
- DeviceIntPtr /* keybd */,
- int /* count */
+extern _X_EXPORT void XkbProcessKeyboardEvent(
+ DeviceEvent* /* event */,
+ DeviceIntPtr /* keybd */
);
-extern void XkbHandleActions(
+extern _X_EXPORT void XkbHandleActions(
DeviceIntPtr /* dev */,
DeviceIntPtr /* kbd */,
- struct _xEvent * /* xE */,
- int /* count */
+ DeviceEvent* /* event */
);
-extern Bool XkbEnableDisableControls(
+extern _X_EXPORT Bool XkbEnableDisableControls(
XkbSrvInfoPtr /* xkbi */,
unsigned long /* change */,
unsigned long /* newValues */,
@@ -748,214 +719,185 @@ extern Bool XkbEnableDisableControls(
XkbEventCausePtr /* cause */
);
-extern void AccessXInit(
+extern _X_EXPORT void AccessXInit(
DeviceIntPtr /* dev */
);
-extern Bool AccessXFilterPressEvent(
- struct _xEvent * /* xE */,
- DeviceIntPtr /* keybd */,
- int /* count */
+extern _X_EXPORT Bool AccessXFilterPressEvent(
+ DeviceEvent* /* event */,
+ DeviceIntPtr /* keybd */
);
-extern Bool AccessXFilterReleaseEvent(
- struct _xEvent * /* xE */,
- DeviceIntPtr /* keybd */,
- int /* count */
+extern _X_EXPORT Bool AccessXFilterReleaseEvent(
+ DeviceEvent* /* event */,
+ DeviceIntPtr /* keybd */
);
-extern void AccessXCancelRepeatKey(
+extern _X_EXPORT void AccessXCancelRepeatKey(
XkbSrvInfoPtr /* xkbi */,
KeyCode /* key */
);
-extern void AccessXComputeCurveFactor(
+extern _X_EXPORT void AccessXComputeCurveFactor(
XkbSrvInfoPtr /* xkbi */,
XkbControlsPtr /* ctrls */
);
-extern XkbInterestPtr XkbFindClientResource(
+extern _X_EXPORT XkbInterestPtr XkbFindClientResource(
DevicePtr /* inDev */,
ClientPtr /* client */
);
-extern XkbInterestPtr XkbAddClientResource(
+extern _X_EXPORT XkbInterestPtr XkbAddClientResource(
DevicePtr /* inDev */,
ClientPtr /* client */,
XID /* id */
);
-extern int XkbRemoveResourceClient(
+extern _X_EXPORT int XkbRemoveResourceClient(
DevicePtr /* inDev */,
XID /* id */
);
-extern int XkbDDXInitDevice(
- DeviceIntPtr /* dev */
-);
-
-extern int XkbDDXAccessXBeep(
+extern _X_EXPORT int XkbDDXAccessXBeep(
DeviceIntPtr /* dev */,
unsigned int /* what */,
unsigned int /* which */
);
-extern void XkbDDXKeyClick(
- DeviceIntPtr /* dev */,
- int /* keycode */,
- int /* synthetic */
-);
-
-extern int XkbDDXUsesSoftRepeat(
+extern _X_EXPORT int XkbDDXUsesSoftRepeat(
DeviceIntPtr /* dev */
);
-extern void XkbDDXKeybdCtrlProc(
+extern _X_EXPORT void XkbDDXKeybdCtrlProc(
DeviceIntPtr /* dev */,
KeybdCtrl * /* ctrl */
);
-extern void XkbDDXChangeControls(
+extern _X_EXPORT void XkbDDXChangeControls(
DeviceIntPtr /* dev */,
XkbControlsPtr /* old */,
XkbControlsPtr /* new */
);
-extern void XkbDDXUpdateDeviceIndicators(
+extern _X_EXPORT void XkbDDXUpdateDeviceIndicators(
DeviceIntPtr /* dev */,
XkbSrvLedInfoPtr /* sli */,
CARD32 /* newState */
);
-extern void XkbDDXFakePointerButton(
- int /* event */,
- int /* button */
-);
-
-extern void XkbDDXFakePointerMotion(
+extern _X_EXPORT void XkbDDXFakePointerMotion(
unsigned int /* flags */,
int /* x */,
int /* y */
);
-extern void XkbDDXFakeDeviceButton(
+extern _X_EXPORT void XkbDDXFakeDeviceButton(
DeviceIntPtr /* dev */,
Bool /* press */,
int /* button */
);
-extern int XkbDDXTerminateServer(
+extern _X_EXPORT int XkbDDXTerminateServer(
DeviceIntPtr /* dev */,
KeyCode /* key */,
XkbAction * /* act */
);
-extern int XkbDDXSwitchScreen(
+extern _X_EXPORT int XkbDDXSwitchScreen(
DeviceIntPtr /* dev */,
KeyCode /* key */,
XkbAction * /* act */
);
-extern int XkbDDXPrivate(
+extern _X_EXPORT int XkbDDXPrivate(
DeviceIntPtr /* dev */,
KeyCode /* key */,
XkbAction * /* act */
);
-extern void XkbDisableComputedAutoRepeats(
+extern _X_EXPORT void XkbDisableComputedAutoRepeats(
DeviceIntPtr /* pXDev */,
unsigned int /* key */
);
-extern void XkbSetRepeatKeys(
+extern _X_EXPORT void XkbSetRepeatKeys(
DeviceIntPtr /* pXDev */,
int /* key */,
int /* onoff */
);
-extern int XkbLatchModifiers(
+extern _X_EXPORT int XkbLatchModifiers(
DeviceIntPtr /* pXDev */,
CARD8 /* mask */,
CARD8 /* latches */
);
-extern int XkbLatchGroup(
+extern _X_EXPORT int XkbLatchGroup(
DeviceIntPtr /* pXDev */,
int /* group */
);
-extern void XkbClearAllLatchesAndLocks(
+extern _X_EXPORT void XkbClearAllLatchesAndLocks(
DeviceIntPtr /* dev */,
XkbSrvInfoPtr /* xkbi */,
Bool /* genEv */,
XkbEventCausePtr /* cause */
);
-extern void XkbSetRulesDflts(
- char * /* rulesFile */,
- char * /* model */,
- char * /* layout */,
- char * /* variant */,
- char * /* options */
+extern _X_EXPORT void XkbGetRulesDflts(
+ XkbRMLVOSet * /* rmlvo */
);
-extern void XkbDeleteRulesDflts(
- void
+extern _X_EXPORT void XkbFreeRMLVOSet(
+ XkbRMLVOSet * /* rmlvo */,
+ Bool /* freeRMLVO */
);
-extern void XkbInitDevice(
- DeviceIntPtr /* pXDev */
+extern _X_EXPORT void XkbSetRulesDflts(
+ XkbRMLVOSet * /* rmlvo */
);
-extern Bool XkbInitKeyboardDeviceStruct(
- DeviceIntPtr /* pXDev */,
- XkbComponentNamesPtr /* pNames */,
- KeySymsPtr /* pSyms */,
- CARD8 /* pMods */[],
- BellProcPtr /* bellProc */,
- KbdCtrlProcPtr /* ctrlProc */
+extern _X_EXPORT void XkbDeleteRulesDflts(
+ void
);
-extern int SProcXkbDispatch(
+extern _X_EXPORT int SProcXkbDispatch(
ClientPtr /* client */
);
-extern XkbGeometryPtr XkbLookupNamedGeometry(
+extern _X_EXPORT XkbGeometryPtr XkbLookupNamedGeometry(
DeviceIntPtr /* dev */,
Atom /* name */,
Bool * /* shouldFree */
);
-extern char * _XkbDupString(
- char * /* str */
+extern _X_EXPORT char * _XkbDupString(
+ const char * /* str */
);
-extern void XkbConvertCase(
+extern _X_EXPORT void XkbConvertCase(
KeySym /* sym */,
KeySym * /* lower */,
KeySym * /* upper */
);
-extern Status XkbChangeKeycodeRange(
+extern _X_EXPORT Status XkbChangeKeycodeRange(
XkbDescPtr /* xkb */,
int /* minKC */,
int /* maxKC */,
XkbChangesPtr /* changes */
);
-extern int XkbFinishDeviceInit(
- DeviceIntPtr /* pXDev */
-);
-
-extern void XkbFreeSrvLedInfo(
+extern _X_EXPORT void XkbFreeSrvLedInfo(
XkbSrvLedInfoPtr /* sli */
);
-extern void XkbFreeInfo(
+extern _X_EXPORT void XkbFreeInfo(
XkbSrvInfoPtr /* xkbi */
);
-extern Status XkbChangeTypesOfKey(
+extern _X_EXPORT Status XkbChangeTypesOfKey(
XkbDescPtr /* xkb */,
int /* key */,
int /* nGroups */,
@@ -964,7 +906,7 @@ extern Status XkbChangeTypesOfKey(
XkbMapChangesPtr /* changes */
);
-extern int XkbKeyTypesForCoreSymbols(
+extern _X_EXPORT int XkbKeyTypesForCoreSymbols(
XkbDescPtr /* xkb */,
int /* map_width */,
KeySym * /* core_syms */,
@@ -973,34 +915,45 @@ extern int XkbKeyTypesForCoreSymbols(
KeySym * /* xkb_syms_rtrn */
);
-extern Bool XkbApplyCompatMapToKey(
+extern _X_EXPORT Bool XkbApplyCompatMapToKey(
XkbDescPtr /* xkb */,
KeyCode /* key */,
XkbChangesPtr /* changes */
);
-extern Bool XkbApplyVirtualModChanges(
+extern _X_EXPORT Bool XkbApplyVirtualModChanges(
XkbDescPtr /* xkb */,
unsigned int /* changed */,
XkbChangesPtr /* changes */
);
-extern void XkbSendNewKeyboardNotify(
+extern _X_EXPORT void XkbSendNewKeyboardNotify(
DeviceIntPtr /* kbd */,
xkbNewKeyboardNotify * /* pNKN */
);
+extern Bool XkbCopyKeymap(
+ XkbDescPtr /* dst */,
+ XkbDescPtr /* src */);
+
+extern Bool XkbCopyDeviceKeymap(
+ DeviceIntPtr /* dst */,
+ DeviceIntPtr /* src */);
+
+extern void XkbFilterEvents(
+ ClientPtr /* pClient */,
+ int /* nEvents */,
+ xEvent* /* xE */);
+
#include "xkbfile.h"
-#include <X11/extensions/XKMformat.h>
#include "xkbrules.h"
-#define _XkbListKeymaps 0
-#define _XkbListKeycodes 1
-#define _XkbListTypes 2
-#define _XkbListCompat 3
-#define _XkbListSymbols 4
-#define _XkbListGeometry 5
-#define _XkbListNumComponents 6
+#define _XkbListKeycodes 0
+#define _XkbListTypes 1
+#define _XkbListCompat 2
+#define _XkbListSymbols 3
+#define _XkbListGeometry 4
+#define _XkbListNumComponents 5
typedef struct _XkbSrvListInfo {
int szPool;
@@ -1014,13 +967,13 @@ typedef struct _XkbSrvListInfo {
int nFound[_XkbListNumComponents];
} XkbSrvListInfoRec,*XkbSrvListInfoPtr;
-extern Status XkbDDXList(
+extern _X_EXPORT Status XkbDDXList(
DeviceIntPtr /* dev */,
XkbSrvListInfoPtr /* listing */,
ClientPtr /* client */
);
-extern unsigned int XkbDDXLoadKeymapByNames(
+extern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames(
DeviceIntPtr /* keybd */,
XkbComponentNamesPtr /* names */,
unsigned int /* want */,
@@ -1030,25 +983,18 @@ extern unsigned int XkbDDXLoadKeymapByNames(
int /* keymapNameRtrnLen */
);
-extern Bool XkbDDXNamesFromRules(
+extern _X_EXPORT Bool XkbDDXNamesFromRules(
DeviceIntPtr /* keybd */,
char * /* rules */,
XkbRF_VarDefsPtr /* defs */,
XkbComponentNamesPtr /* names */
);
-extern Bool XkbDDXApplyConfig(
- void * /* cfg_in */,
- XkbSrvInfoPtr /* xkbi */
-);
-
-extern int _XkbStrCaseCmp(
- char * /* str1 */,
- char * /* str2 */
+extern _X_EXPORT XkbDescPtr XkbCompileKeymap(
+ DeviceIntPtr /* dev */,
+ XkbRMLVOSet * /* rmlvo */
);
-_XFUNCPROTOEND
-
#define XkbAtomGetString(s) NameForAtom(s)
#endif /* _XKBSRV_H_ */
diff --git a/xorg-server/include/xkbstr.h b/xorg-server/include/xkbstr.h
index 5eebe41e3..4afe010d2 100644
--- a/xorg-server/include/xkbstr.h
+++ b/xorg-server/include/xkbstr.h
@@ -29,12 +29,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#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)))
+#define XkbCharToInt(v) ((int) ((v) & 0x80 ? ((v) | (~0xff)) : ((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))
+#define Xkb2CharsToInt(h, l) ((int) ((h) & 0x80 ? \
+ (((h) << 8) | (l) | (~0xffff)) : \
+ (((h) << 8) | (l) & 0x7fff))
#else
#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
#endif
@@ -44,20 +45,30 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
typedef struct _XkbStateRec {
- unsigned char group;
+ unsigned char group; /* base + latched + locked */
+ /* FIXME: Why are base + latched short and not char?? */
+ unsigned short base_group; /* physically ... down? */
+ unsigned short latched_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;
+
+ unsigned char mods; /* base + latched + locked */
+ unsigned char base_mods; /* physically down */
+ unsigned char latched_mods;
+ unsigned char locked_mods;
+
+ unsigned char compat_state; /* mods + group for core state */
+
+ /* grab mods = all depressed and latched mods, _not_ locked mods */
+ unsigned char grab_mods; /* grab mods minus internal mods */
+ unsigned char compat_grab_mods; /* grab mods + group for core state,
+ but not locked groups if
+ IgnoreGroupLocks set */
+
+ /* effective mods = all mods (depressed, latched, locked) */
+ unsigned char lookup_mods; /* effective mods minus internal mods */
+ unsigned char compat_lookup_mods; /* effective mods + group */
+
+ unsigned short ptr_buttons; /* core pointer buttons */
} XkbStateRec,*XkbStatePtr;
#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
@@ -88,7 +99,8 @@ typedef struct _XkbKeyType {
#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 XkbSetGroupInfo(g, w, n) (((w) & 0xc0) | (((n) & 3) << 4) | \
+ ((g) & 0x0f))
#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
/*
@@ -111,17 +123,19 @@ typedef struct _XkbModAction {
unsigned char flags;
unsigned char mask;
unsigned char real_mods;
+ /* FIXME: Make this an int. */
unsigned char vmods1;
unsigned char vmods2;
} XkbModAction;
-#define XkbModActionVMods(a) \
- ((short)(((a)->vmods1<<8)|((a)->vmods2)))
+#define XkbModActionVMods(a) ((short) (((a)->vmods1 << 8) | (a)->vmods2))
#define XkbSetModActionVMods(a,v) \
- (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff))
+ ((a)->vmods1 = (((v) >> 8) & 0xff), \
+ (a)->vmods2 = (v) & 0xff)
typedef struct _XkbGroupAction {
unsigned char type;
unsigned char flags;
+ /* FIXME: Make this an int. */
char group_XXX;
} XkbGroupAction;
#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX))
@@ -132,6 +146,7 @@ typedef struct _XkbISOAction {
unsigned char flags;
unsigned char mask;
unsigned char real_mods;
+ /* FIXME: Make this an int. */
char group_XXX;
unsigned char affect;
unsigned char vmods1;
@@ -141,6 +156,7 @@ typedef struct _XkbISOAction {
typedef struct _XkbPtrAction {
unsigned char type;
unsigned char flags;
+ /* FIXME: Make this an int. */
unsigned char high_XXX;
unsigned char low_XXX;
unsigned char high_YYY;
@@ -165,7 +181,7 @@ typedef struct _XkbPtrDfltAction {
char valueXXX;
} XkbPtrDfltAction;
#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX))
-#define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff))
+#define XkbSASetPtrDfltValue(a, c) ((a)->valueXXX = (c) & 0xff)
typedef struct _XkbSwitchScreenAction {
unsigned char type;
@@ -173,24 +189,25 @@ typedef struct _XkbSwitchScreenAction {
char screenXXX;
} XkbSwitchScreenAction;
#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX))
-#define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff))
+#define XkbSASetScreen(a, s) ((a)->screenXXX = (s) & 0xff)
typedef struct _XkbCtrlsAction {
unsigned char type;
unsigned char flags;
+ /* FIXME: Make this an int. */
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 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)))
+ ((unsigned int) (a)->ctrls0))
typedef struct _XkbMessageAction {
unsigned char type;
@@ -203,6 +220,7 @@ typedef struct _XkbRedirectKeyAction {
unsigned char new_key;
unsigned char mods_mask;
unsigned char mods;
+ /* FIXME: Make this an int. */
unsigned char vmods_mask0;
unsigned char vmods_mask1;
unsigned char vmods0;
@@ -211,6 +229,7 @@ typedef struct _XkbRedirectKeyAction {
#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
((unsigned int)(a)->vmods0))
+/* FIXME: This is blatantly not setting vmods. Yeesh. */
#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
((a)->vmods_mask0=((m)&0xff)))
#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\
@@ -281,7 +300,8 @@ typedef struct _XkbControls {
#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))
+#define XkbAX_NeedFeedback(c, w) (XkbAX_AnyFeedback((c)) && \
+ XkbAX_NeedOption((c), (w)))
typedef struct _XkbServerMapRec {
unsigned short num_acts;
@@ -300,7 +320,7 @@ typedef struct _XkbServerMapRec {
unsigned short *vmodmap;
} XkbServerMapRec, *XkbServerMapPtr;
-#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]])
+#define XkbSMKeyActionsPtr(m, k) (&(m)->acts[(m)->key_acts[(k)]])
/*
* Structures and access macros used primarily by clients
@@ -326,15 +346,16 @@ typedef struct _XkbClientMapRec {
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)])
+#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
@@ -358,6 +379,8 @@ typedef struct _XkbCompatMapRec {
typedef struct _XkbIndicatorMapRec {
unsigned char flags;
+ /* FIXME: For some reason, interepretation of groups is wildly
+ * different between which being base/latched/locked. */
unsigned char which_groups;
unsigned char groups;
unsigned char which_mods;
@@ -365,12 +388,12 @@ typedef struct _XkbIndicatorMapRec {
unsigned int ctrls;
} XkbIndicatorMapRec, *XkbIndicatorMapPtr;
-#define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\
+#define XkbIM_IsAuto(i) (!((i)->flags & XkbIM_NoAutomatic) && \
(((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))
+ (i)->ctrls))
+#define XkbIM_InUse(i) ((i)->flags || (i)->which_groups || (i)->which_mods || \
+ (i)->ctrls)
typedef struct _XkbIndicatorRec {
@@ -428,28 +451,30 @@ typedef struct _XkbDesc {
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 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 XkbKeySym(d, k, n) (XkbKeySymsPtr((d), (k))[(n)])
#define XkbKeySymEntry(d,k,sl,g) \
- (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
+ (XkbKeySym((d), (k), (XkbKeyGroupsWidth((d), (k)) * (g)) + (sl)))
#define XkbKeyAction(d,k,n) \
- (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL)
+ (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))
+ (XkbKeyHasActions((d), (k)) ? \
+ XkbKeyAction((d), (k), ((XkbKeyGroupsWidth((d), (k)) * (g)) + (sl))) : \
+ NULL)
+
+#define XkbKeyHasActions(d, k) (!!(d)->server->key_acts[(k)])
+#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)
@@ -527,7 +552,6 @@ typedef struct _XkbChanges {
* database.
*/
typedef struct _XkbComponentNames {
- char * keymap;
char * keycodes;
char * types;
char * compat;
@@ -588,9 +612,9 @@ typedef struct _XkbDeviceInfo {
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))
+#define XkbXI_DevHasBtnActs(d) ((d)->num_btns > 0 && (d)->btn_acts)
+#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d) && (b) < (d)->num_btns)
+#define XkbXI_DevHasLeds(d) ((d)->num_leds > 0 && (d)->leds)
typedef struct _XkbDeviceLedChanges {
unsigned short led_class;
diff --git a/xorg-server/include/xorg-config.h.in b/xorg-server/include/xorg-config.h.in
index f9b77d03d..d1594202e 100644
--- a/xorg-server/include/xorg-config.h.in
+++ b/xorg-server/include/xorg-config.h.in
@@ -51,12 +51,15 @@
/* Build DRI2 extension */
#undef DRI2
-/* Solaris 8 or later? */
-#undef __SOL8__
+/* Define to 1 if you have the <stropts.h> header file. */
+#undef HAVE_STROPTS_H
/* Define to 1 if you have the <sys/kd.h> header file. */
#undef HAVE_SYS_KD_H
+/* Define to 1 if you have the <sys/vt.h> header file. */
+#undef HAVE_SYS_VT_H
+
/* Define to 1 if you have the `walkcontext' function (used on Solaris for
xorg_backtrace in hw/xfree86/common/xf86Events.c */
#undef HAVE_WALKCONTEXT
@@ -115,9 +118,15 @@
/* Have pci_system_init_dev_mem() */
#undef HAVE_PCI_SYSTEM_INIT_DEV_MEM
+/* Define to 1 if you have the `pci_device_is_boot_vga' function. */
+#undef HAVE_PCI_DEVICE_IS_BOOT_VGA
+
/* Have pci_enable_device */
#undef HAVE_PCI_DEVICE_ENABLE
+/* Define to 1 if you have the `pci_device_vgaarb_init' function. */
+#undef HAVE_PCI_DEVICE_VGAARB_INIT
+
/* Path to text files containing PCI IDs */
#undef PCI_TXT_IDS_PATH
diff --git a/xorg-server/include/xorg-server.h.in b/xorg-server/include/xorg-server.h.in
index 4cf1bbf0e..76cab16b6 100644
--- a/xorg-server/include/xorg-server.h.in
+++ b/xorg-server/include/xorg-server.h.in
@@ -100,14 +100,8 @@
/* Support X Input extension */
#undef XINPUT
-/* Build XKB */
-#undef XKB
-
-/* Enable XKB per default */
-#undef XKB_DFLT_DISABLED
-
-/* Build XKB server */
-#undef XKB_IN_SERVER
+/* XKB default rules */
+#undef XKB_DFLT_RULES
/* Support loadable input and output drivers */
#undef XLOADABLE
@@ -160,9 +154,6 @@
/* Location of configuration file */
#undef __XCONFIGFILE__
-/* XKB default rules */
-#undef __XKBDEFRULES__
-
/* Name of X server */
#undef __XSERVERNAME__
@@ -175,9 +166,6 @@
/* System is BSD-like */
#undef CSRG_BASED
-/* Solaris 8 or later? */
-#undef __SOL8__
-
/* System has PC console */
#undef PCCONS_SUPPORT
@@ -196,4 +184,7 @@
/* Use libpciaccess */
#undef XSERVER_LIBPCIACCESS
+/* X Access Control Extension */
+#undef XACE
+
#endif /* _XORG_SERVER_H_ */
diff --git a/xorg-server/include/xserver-properties.h b/xorg-server/include/xserver-properties.h
index f8aeab65d..626d0ad27 100644
--- a/xorg-server/include/xserver-properties.h
+++ b/xorg-server/include/xserver-properties.h
@@ -32,5 +32,142 @@
/* BOOL. 0 - device disabled, 1 - device enabled */
#define XI_PROP_ENABLED "Device Enabled"
+/* BOOL. If present, device is a virtual XTEST device */
+#define XI_PROP_XTEST_DEVICE "XTEST Device"
+
+/* Pointer acceleration properties */
+/* INTEGER of any format */
+#define ACCEL_PROP_PROFILE_NUMBER "Device Accel Profile"
+/* FLOAT, format 32 */
+#define ACCEL_PROP_CONSTANT_DECELERATION "Device Accel Constant Deceleration"
+/* FLOAT, format 32 */
+#define ACCEL_PROP_ADAPTIVE_DECELERATION "Device Accel Adaptive Deceleration"
+/* FLOAT, format 32 */
+#define ACCEL_PROP_VELOCITY_SCALING "Device Accel Velocity Scaling"
+
+
+/* Axis labels */
+#define AXIS_LABEL_PROP "Axis Labels"
+
+#define AXIS_LABEL_PROP_REL_X "Rel X"
+#define AXIS_LABEL_PROP_REL_Y "Rel Y"
+#define AXIS_LABEL_PROP_REL_Z "Rel Z"
+#define AXIS_LABEL_PROP_REL_RX "Rel Rotary X"
+#define AXIS_LABEL_PROP_REL_RY "Rel Rotary Y"
+#define AXIS_LABEL_PROP_REL_RZ "Rel Rotary Z"
+#define AXIS_LABEL_PROP_REL_HWHEEL "Rel Horiz Wheel"
+#define AXIS_LABEL_PROP_REL_DIAL "Rel Dial"
+#define AXIS_LABEL_PROP_REL_WHEEL "Rel Vert Wheel"
+#define AXIS_LABEL_PROP_REL_MISC "Rel Misc"
+
+/*
+ * Absolute axes
+ */
+
+#define AXIS_LABEL_PROP_ABS_X "Abs X"
+#define AXIS_LABEL_PROP_ABS_Y "Abs Y"
+#define AXIS_LABEL_PROP_ABS_Z "Abs Z"
+#define AXIS_LABEL_PROP_ABS_RX "Abs Rotary X"
+#define AXIS_LABEL_PROP_ABS_RY "Abs Rotary Y"
+#define AXIS_LABEL_PROP_ABS_RZ "Abs Rotary Z"
+#define AXIS_LABEL_PROP_ABS_THROTTLE "Abs Throttle"
+#define AXIS_LABEL_PROP_ABS_RUDDER "Abs Rudder"
+#define AXIS_LABEL_PROP_ABS_WHEEL "Abs Wheel"
+#define AXIS_LABEL_PROP_ABS_GAS "Abs Gas"
+#define AXIS_LABEL_PROP_ABS_BRAKE "Abs Brake"
+#define AXIS_LABEL_PROP_ABS_HAT0X "Abs Hat 0 X"
+#define AXIS_LABEL_PROP_ABS_HAT0Y "Abs Hat 0 Y"
+#define AXIS_LABEL_PROP_ABS_HAT1X "Abs Hat 1 X"
+#define AXIS_LABEL_PROP_ABS_HAT1Y "Abs Hat 1 Y"
+#define AXIS_LABEL_PROP_ABS_HAT2X "Abs Hat 2 X"
+#define AXIS_LABEL_PROP_ABS_HAT2Y "Abs Hat 2 Y"
+#define AXIS_LABEL_PROP_ABS_HAT3X "Abs Hat 3 X"
+#define AXIS_LABEL_PROP_ABS_HAT3Y "Abs Hat 3 Y"
+#define AXIS_LABEL_PROP_ABS_PRESSURE "Abs Pressure"
+#define AXIS_LABEL_PROP_ABS_DISTANCE "Abs Distance"
+#define AXIS_LABEL_PROP_ABS_TILT_X "Abs Tilt X"
+#define AXIS_LABEL_PROP_ABS_TILT_Y "Abs Tilt Y"
+#define AXIS_LABEL_PROP_ABS_TOOL_WIDTH "Abs Tool Width"
+#define AXIS_LABEL_PROP_ABS_VOLUME "Abs Volume"
+#define AXIS_LABEL_PROP_ABS_MISC "Abs Misc"
+
+/* Button names */
+#define BTN_LABEL_PROP "Button Labels"
+
+/* Default label */
+#define BTN_LABEL_PROP_BTN_UNKNOWN "Button Unknown"
+/* Wheel buttons */
+#define BTN_LABEL_PROP_BTN_WHEEL_UP "Button Wheel Up"
+#define BTN_LABEL_PROP_BTN_WHEEL_DOWN "Button Wheel Down"
+#define BTN_LABEL_PROP_BTN_HWHEEL_LEFT "Button Horiz Wheel Left"
+#define BTN_LABEL_PROP_BTN_HWHEEL_RIGHT "Button Horiz Wheel Right"
+
+/* The following are from linux/input.h */
+#define BTN_LABEL_PROP_BTN_0 "Button 0"
+#define BTN_LABEL_PROP_BTN_1 "Button 1"
+#define BTN_LABEL_PROP_BTN_2 "Button 2"
+#define BTN_LABEL_PROP_BTN_3 "Button 3"
+#define BTN_LABEL_PROP_BTN_4 "Button 4"
+#define BTN_LABEL_PROP_BTN_5 "Button 5"
+#define BTN_LABEL_PROP_BTN_6 "Button 6"
+#define BTN_LABEL_PROP_BTN_7 "Button 7"
+#define BTN_LABEL_PROP_BTN_8 "Button 8"
+#define BTN_LABEL_PROP_BTN_9 "Button 9"
+
+#define BTN_LABEL_PROP_BTN_LEFT "Button Left"
+#define BTN_LABEL_PROP_BTN_RIGHT "Button Right"
+#define BTN_LABEL_PROP_BTN_MIDDLE "Button Middle"
+#define BTN_LABEL_PROP_BTN_SIDE "Button Side"
+#define BTN_LABEL_PROP_BTN_EXTRA "Button Extra"
+#define BTN_LABEL_PROP_BTN_FORWARD "Button Forward"
+#define BTN_LABEL_PROP_BTN_BACK "Button Back"
+#define BTN_LABEL_PROP_BTN_TASK "Button Task"
+
+#define BTN_LABEL_PROP_BTN_TRIGGER "Button Trigger"
+#define BTN_LABEL_PROP_BTN_THUMB "Button Thumb"
+#define BTN_LABEL_PROP_BTN_THUMB2 "Button Thumb2"
+#define BTN_LABEL_PROP_BTN_TOP "Button Top"
+#define BTN_LABEL_PROP_BTN_TOP2 "Button Top2"
+#define BTN_LABEL_PROP_BTN_PINKIE "Button Pinkie"
+#define BTN_LABEL_PROP_BTN_BASE "Button Base"
+#define BTN_LABEL_PROP_BTN_BASE2 "Button Base2"
+#define BTN_LABEL_PROP_BTN_BASE3 "Button Base3"
+#define BTN_LABEL_PROP_BTN_BASE4 "Button Base4"
+#define BTN_LABEL_PROP_BTN_BASE5 "Button Base5"
+#define BTN_LABEL_PROP_BTN_BASE6 "Button Base6"
+#define BTN_LABEL_PROP_BTN_DEAD "Button Dead"
+
+#define BTN_LABEL_PROP_BTN_A "Button A"
+#define BTN_LABEL_PROP_BTN_B "Button B"
+#define BTN_LABEL_PROP_BTN_C "Button C"
+#define BTN_LABEL_PROP_BTN_X "Button X"
+#define BTN_LABEL_PROP_BTN_Y "Button Y"
+#define BTN_LABEL_PROP_BTN_Z "Button Z"
+#define BTN_LABEL_PROP_BTN_TL "Button T Left"
+#define BTN_LABEL_PROP_BTN_TR "Button T Right"
+#define BTN_LABEL_PROP_BTN_TL2 "Button T Left2"
+#define BTN_LABEL_PROP_BTN_TR2 "Button T Right2"
+#define BTN_LABEL_PROP_BTN_SELECT "Button Select"
+#define BTN_LABEL_PROP_BTN_START "Button Start"
+#define BTN_LABEL_PROP_BTN_MODE "Button Mode"
+#define BTN_LABEL_PROP_BTN_THUMBL "Button Thumb Left"
+#define BTN_LABEL_PROP_BTN_THUMBR "Button Thumb Right"
+
+#define BTN_LABEL_PROP_BTN_TOOL_PEN "Button Tool Pen"
+#define BTN_LABEL_PROP_BTN_TOOL_RUBBER "Button Tool Rubber"
+#define BTN_LABEL_PROP_BTN_TOOL_BRUSH "Button Tool Brush"
+#define BTN_LABEL_PROP_BTN_TOOL_PENCIL "Button Tool Pencil"
+#define BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH "Button Tool Airbrush"
+#define BTN_LABEL_PROP_BTN_TOOL_FINGER "Button Tool Finger"
+#define BTN_LABEL_PROP_BTN_TOOL_MOUSE "Button Tool Mouse"
+#define BTN_LABEL_PROP_BTN_TOOL_LENS "Button Tool Lens"
+#define BTN_LABEL_PROP_BTN_TOUCH "Button Touch"
+#define BTN_LABEL_PROP_BTN_STYLUS "Button Stylus"
+#define BTN_LABEL_PROP_BTN_STYLUS2 "Button Stylus2"
+#define BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP "Button Tool Doubletap"
+#define BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP "Button Tool Tripletap"
+
+#define BTN_LABEL_PROP_BTN_GEAR_DOWN "Button Gear down"
+#define BTN_LABEL_PROP_BTN_GEAR_UP "Button Gear up"
#endif