summaryrefslogtreecommitdiff
path: root/xserver/doc
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2013-06-07 17:28:57 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2013-06-07 17:28:57 +0000
commitc0190187060808fe0ad2a09b31f4244757572ff9 (patch)
treeb028697436476ae3ff34218b0b233a233d8a7818 /xserver/doc
parent33eda071f5846d332b428de759c5b1649e9cf1ba (diff)
Update to X server 1.14.1. Tested by many during t2k13. Thanks.
Diffstat (limited to 'xserver/doc')
-rw-r--r--xserver/doc/Makefile.in16
-rw-r--r--xserver/doc/Xserver-spec.xml61
-rw-r--r--xserver/doc/c-extensions19
-rw-r--r--xserver/doc/dtrace/Makefile.in16
-rw-r--r--xserver/doc/dtrace/Xserver-DTrace.xml153
5 files changed, 218 insertions, 47 deletions
diff --git a/xserver/doc/Makefile.in b/xserver/doc/Makefile.in
index a3ffa14a2..9b5528297 100644
--- a/xserver/doc/Makefile.in
+++ b/xserver/doc/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.12.3 from Makefile.am.
+# Makefile.in generated by automake 1.12.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
@@ -210,13 +210,9 @@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
DOXYGEN = @DOXYGEN@
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-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@
@@ -238,6 +234,7 @@ FONTTYPE1DIR = @FONTTYPE1DIR@
FOP = @FOP@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
+GLX_SYS_LIBS = @GLX_SYS_LIBS@
GLX_TLS = @GLX_TLS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
@@ -262,6 +259,7 @@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
+LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
@@ -277,7 +275,6 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
MAIN_LIB = @MAIN_LIB@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -376,6 +373,7 @@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
XNEST_LIBS = @XNEST_LIBS@
XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
XORG_CFLAGS = @XORG_CFLAGS@
+XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
XORG_INCS = @XORG_INCS@
XORG_LIBS = @XORG_LIBS@
XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
@@ -506,7 +504,7 @@ EXTRA_DIST = smartsched
all: all-recursive
.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/devbook.am $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/devbook.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -532,9 +530,9 @@ $(top_srcdir)/devbook.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
diff --git a/xserver/doc/Xserver-spec.xml b/xserver/doc/Xserver-spec.xml
index 2b11828fc..cd1a9d07a 100644
--- a/xserver/doc/Xserver-spec.xml
+++ b/xserver/doc/Xserver-spec.xml
@@ -109,6 +109,12 @@
<revremark>Revised for Xorg 1.9 devPrivates changes
and 1.8 CreateNewResourceType changes</revremark>
</revision>
+ <revision>
+ <revnumber>3.6</revnumber>
+ <date>July 2012</date>
+ <authorinitials>kp</authorinitials>
+ <revremark>Revised for X server 1.13 screen-specific devPrivates changes</revremark>
+ </revision>
</revhistory>
<abstract>
<para>The following document explains the structure of the X Window System display server and the interfaces among the larger pieces. It is intended as a reference for programmers who are implementing an X Display Server on their workstation hardware. It is included with the X Window System source tape, along with the document "Strategies for Porting the X v11 Sample Server." The order in which you should read these documents is:
@@ -680,7 +686,7 @@ pReadmask is a pointer to the information describing the descriptors
that will be waited on.
</para>
<para>
-In the sample server, pTimeout is a struct timeval **, and pReadmask is
+In the sample server, pTimeout is a pointer, and pReadmask is
the address of the select() mask for reading.
</para>
<para>
@@ -688,15 +694,14 @@ The DIX BlockHandler() iterates through the Screens, for each one calling
its BlockHandler. A BlockHandler is declared thus:
<blockquote>
<programlisting>
- void xxxBlockHandler(nscreen, pbdata, pptv, pReadmask)
- int nscreen;
- pointer pbdata;
- struct timeval ** pptv;
+ void xxxBlockHandler(pScreen, pTimeout, pReadmask)
+ ScreenPtr pScreen;
+ pointer pTimeout;
pointer pReadmask;
</programlisting>
</blockquote>
-The arguments are the index of the Screen, the blockData field
-of the Screen, and the arguments to the DIX BlockHandler().
+The arguments are a pointer to the Screen, and the arguments to the
+DIX BlockHandler().
</para>
<para>
Immediately after WaitForSomething returns from the
@@ -721,15 +726,14 @@ The DIX WakeupHandler() calls each Screen's
WakeupHandler. A WakeupHandler is declared thus:
<blockquote>
<programlisting>
- void xxxWakeupHandler(nscreen, pbdata, err, pReadmask)
- int nscreen;
- pointer pbdata;
+ void xxxWakeupHandler(pScreen, result, pReadmask)
+ ScreenPtr pScreen;
unsigned long result;
pointer pReadmask;
</programlisting>
</blockquote>
-The arguments are the index of the Screen, the blockData field
-of the Screen, and the arguments to the DIX WakeupHandler().
+The arguments are the Screen, of the Screen, and the arguments to
+the DIX WakeupHandler().
</para>
<para>
In addition to the per-screen BlockHandlers, any module may register
@@ -1942,18 +1946,15 @@ FALSE.</para>
The scrInitProc should be of the following form:
<blockquote><programlisting>
- Bool scrInitProc(iScreen, pScreen, argc, argv)
- int iScreen;
+ Bool scrInitProc(pScreen, argc, argv)
ScreenPtr pScreen;
int argc;
char **argv;
</programlisting></blockquote>
-iScreen is the index for this screen; 0 for the first one initialized,
-1 for the second, etc. pScreen is the pointer to the screen's new
-ScreenRec. argc and argv are as before. Your screen initialize
-procedure should return TRUE upon success or FALSE if the screen
-cannot be initialized (for instance, if the screen hardware does not
-exist on this machine).</para>
+pScreen is the pointer to the screen's new ScreenRec. argc and argv
+are as before. Your screen initialize procedure should return TRUE
+upon success or FALSE if the screen cannot be initialized (for
+ instance, if the screen hardware does not exist on this machine).</para>
<para>
This procedure must determine what actual device it is supposed to initialize.
If you have a different procedure for each screen, then it is no problem.
@@ -4719,7 +4720,8 @@ Two new extensibility concepts have been developed for release 4, Wrappers
and devPrivates. These replace the R3 GCInterest queues, which were not a
general enough mechanism for many extensions and only provided hooks into a
single data structure. devPrivates have been revised substantially for
-X.Org X server release 1.5, and updated again for the 1.9 release.</para>
+X.Org X server release 1.5, updated again for the 1.9 release and extended
+again for the 1.13 relealse.</para>
<section>
<title>devPrivates</title>
<para>
@@ -4763,6 +4765,23 @@ the specified type with distinct storage for the given
that are otherwise equivalent to the following Private functions.</para>
<para>
+ To request private space in objects created for a specific screen, use
+ <blockquote><programlisting>
+ Bool dixRegisterScreenSpecificPrivateKey(ScreenPtr pScreen, DevPrivateKey key, DevPrivateType type, unsigned size);
+ </programlisting></blockquote>
+ The <parameter>type</parameter> and <parameter>size</parameter> arguments are
+ the same as those to <function>dixRegisterPrivateKey</function> but this
+ function ensures only that the given <parameter>key</parameter> exists on objects of
+ the specified type that are allocated with reference to the specified
+ <parameter>pScreen</parameter>. Using the key on objects allocated for
+ other screens will result in incorrect results; there is no check made to
+ ensure that the caller's screen matches the private's screen. The key is
+ usable in any of the following functions. Screen-specific private storage is available
+ only for Windows, GCs, Pixmaps and Pictures. Attempts to allocate screen-specific
+ privates on other objects will result in a call to FatalError.
+</para>
+
+<para>
To attach a piece of private data to an object, use:
<blockquote><programlisting>
void dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val)
diff --git a/xserver/doc/c-extensions b/xserver/doc/c-extensions
index eb33e272b..4a9006150 100644
--- a/xserver/doc/c-extensions
+++ b/xserver/doc/c-extensions
@@ -35,7 +35,7 @@ The server will not build if your toolchain does not support these extensions.
* interleaved code and declarations: { foo = TRUE; int bar; do_stuff(); }
-Use of OS and library facilities throughout the X server tree
+Use of library facilities throughout the X server tree
-------------------------------------------------------------
Non-OS-dependent code can assume facilities at least as good as
@@ -44,6 +44,17 @@ be C99, but even gcc+glibc doesn't implement that yet.
Unix-like systems are assumed to be at least as good as UNIX03.
+Note that there are two Windows ports, Cygwin and MinGW:
+- Cygwin is more or less like Linux.
+- MinGW is more restrictive. Windows does not provide the required
+POSIX facilities, so some non-OS-dependent code is stubbed out or
+has an alternate implementation if WIN32 is defined. Code that
+needs to be portable to Windows should be careful to, well, be portable.
+
+
+Required OS facilities
+-------------------------------------------------------------
+
Linux systems must be at least 2.4 or later. As a practical matter
though, 2.4 kernels never receive any testing. Use 2.6 already.
@@ -51,11 +62,7 @@ TODO: Solaris.
TODO: *BSD.
-Code that needs to be portable to Windows should be careful to,
-well, be portable. Note that there are two Windows ports, cygwin and
-mingw. Cygwin is more or less like Linux, but mingw is a bit more
-restrictive. TODO: document which versions of Windows we actually care
-about.
+Windows-dependent code assumes at least NT 5.1.
OSX support is generally limited to the most recent version. Currently
that means 10.5.
diff --git a/xserver/doc/dtrace/Makefile.in b/xserver/doc/dtrace/Makefile.in
index 63a62e19c..2605977a7 100644
--- a/xserver/doc/dtrace/Makefile.in
+++ b/xserver/doc/dtrace/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.12.3 from Makefile.am.
+# Makefile.in generated by automake 1.12.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
@@ -201,13 +201,9 @@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
DOXYGEN = @DOXYGEN@
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-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@
@@ -229,6 +225,7 @@ FONTTYPE1DIR = @FONTTYPE1DIR@
FOP = @FOP@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
+GLX_SYS_LIBS = @GLX_SYS_LIBS@
GLX_TLS = @GLX_TLS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
@@ -253,6 +250,7 @@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
+LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
@@ -268,7 +266,6 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
MAIN_LIB = @MAIN_LIB@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -367,6 +364,7 @@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
XNEST_LIBS = @XNEST_LIBS@
XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
XORG_CFLAGS = @XORG_CFLAGS@
+XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
XORG_INCS = @XORG_INCS@
XORG_LIBS = @XORG_LIBS@
XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
@@ -534,7 +532,7 @@ top_srcdir = @top_srcdir@
all: all-am
.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/docbook.am $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/docbook.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -560,9 +558,9 @@ $(top_srcdir)/docbook.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
diff --git a/xserver/doc/dtrace/Xserver-DTrace.xml b/xserver/doc/dtrace/Xserver-DTrace.xml
index 5ef062980..91ca254d7 100644
--- a/xserver/doc/dtrace/Xserver-DTrace.xml
+++ b/xserver/doc/dtrace/Xserver-DTrace.xml
@@ -52,7 +52,9 @@ DEALINGS IN THE SOFTWARE.
facility in <productname>Solaris</productname> 10,
<productname>MacOS X</productname> 10.5, and later releases. This
provider instruments various points in the X server, to allow
- tracing what client applications are up to.
+ tracing what client applications are up to. DTrace probes may be used
+ with <ulink url="http://sourceware.org/systemtap/">SystemTap</ulink>
+ on GNU/Linux systems.
</para>
<para>
@@ -81,7 +83,7 @@ DEALINGS IN THE SOFTWARE.
<table id="Probes_and_their_arguments">
<title>Probes and their arguments</title>
- <tgroup cols='7'>
+ <tgroup cols='9'>
<colspec colname="probe" colwidth="2*"/>
<colspec colname="desc" colwidth="3*"/>
<colspec colname="arg0" colwidth="1*"/>
@@ -89,6 +91,8 @@ DEALINGS IN THE SOFTWARE.
<colspec colname="arg2" colwidth="1*"/>
<colspec colname="arg3" colwidth="1*"/>
<colspec colname="arg4" colwidth="1*"/>
+ <colspec colname="arg5" colwidth="1*"/>
+ <colspec colname="arg6" colwidth="1*"/>
<spanspec spanname="all" namest="probe" nameend="arg4"/>
<thead>
<row>
@@ -99,6 +103,8 @@ DEALINGS IN THE SOFTWARE.
<entry>arg2</entry>
<entry>arg3</entry>
<entry>arg4</entry>
+ <entry>arg5</entry>
+ <entry>arg6</entry>
</row>
</thead>
<tbody>
@@ -113,6 +119,8 @@ DEALINGS IN THE SOFTWARE.
<entry><parameter>requestLength</parameter></entry>
<entry><parameter>clientId</parameter></entry>
<entry><parameter>requestBuffer</parameter></entry>
+ <entry nameend="arg5" class="unused"/>
+ <entry nameend="arg6" class="unused"/>
</row>
<row>
<entry>request-done</entry>
@@ -122,6 +130,8 @@ DEALINGS IN THE SOFTWARE.
<entry><parameter>sequenceNumber</parameter></entry>
<entry><parameter>clientId</parameter></entry>
<entry><parameter>resultCode</parameter></entry>
+ <entry nameend="arg5" class="unused"/>
+ <entry nameend="arg6" class="unused"/>
</row>
<row>
<entry spanname="all" class="grouphead">Event Probes</entry>
@@ -132,7 +142,10 @@ DEALINGS IN THE SOFTWARE.
<entry><parameter>clientId</parameter></entry>
<entry><parameter>eventCode</parameter></entry>
<entry><parameter>eventBuffer</parameter></entry>
+ <entry nameend="arg3" class="unused"/>
<entry nameend="arg4" class="unused"/>
+ <entry nameend="arg5" class="unused"/>
+ <entry nameend="arg6" class="unused"/>
</row>
<row>
<entry spanname="all" class="grouphead">Client Connection Probes</entry>
@@ -142,7 +155,11 @@ DEALINGS IN THE SOFTWARE.
<entry>Called when a new connection is opened from a client</entry>
<entry><parameter>clientId</parameter></entry>
<entry><parameter>clientFD</parameter></entry>
+ <entry nameend="arg2" class="unused"/>
+ <entry nameend="arg3" class="unused"/>
<entry nameend="arg4" class="unused"/>
+ <entry nameend="arg5" class="unused"/>
+ <entry nameend="arg6" class="unused"/>
</row>
<row>
<entry>client-auth</entry>
@@ -152,12 +169,19 @@ DEALINGS IN THE SOFTWARE.
<entry><parameter>clientPid</parameter></entry>
<entry><parameter>clientZoneId</parameter></entry>
<entry nameend="arg4" class="unused"/>
+ <entry nameend="arg5" class="unused"/>
+ <entry nameend="arg6" class="unused"/>
</row>
<row>
<entry>client-disconnect</entry>
<entry>Called when a client connection is closed</entry>
<entry><parameter>clientId</parameter></entry>
+ <entry nameend="arg1" class="unused"/>
+ <entry nameend="arg2" class="unused"/>
+ <entry nameend="arg3" class="unused"/>
<entry nameend="arg4" class="unused"/>
+ <entry nameend="arg5" class="unused"/>
+ <entry nameend="arg6" class="unused"/>
</row>
<row>
<entry spanname="all" class="grouphead">Resource Allocation Probes</entry>
@@ -170,6 +194,8 @@ DEALINGS IN THE SOFTWARE.
<entry><parameter>resourceValue</parameter></entry>
<entry><parameter>resourceTypeName</parameter></entry>
<entry nameend="arg4" class="unused"/>
+ <entry nameend="arg5" class="unused"/>
+ <entry nameend="arg6" class="unused"/>
</row>
<row>
<entry>resource-free</entry>
@@ -179,6 +205,24 @@ DEALINGS IN THE SOFTWARE.
<entry><parameter>resourceValue</parameter></entry>
<entry><parameter>resourceTypeName</parameter></entry>
<entry nameend="arg4" class="unused"/>
+ <entry nameend="arg5" class="unused"/>
+ <entry nameend="arg6" class="unused"/>
+ </row>
+ <row>
+ <entry spanname="all" class="grouphead">Input API probes</entry>
+ </row>
+ <row>
+ <entry>input-event</entry>
+ <entry>Called when an input event was submitted for processing</entry>
+ <entry><parameter>deviceid</parameter></entry>
+ <entry><parameter>eventtype</parameter></entry>
+ <entry><parameter>button</parameter> or
+ <parameter>keycode</parameter> or
+ <parameter>touchid</parameter></entry>
+ <entry><parameter>flags</parameter></entry>
+ <entry><parameter>nvalues</parameter></entry>
+ <entry><parameter>mask</parameter></entry>
+ <entry><parameter>values</parameter></entry>
</row>
</tbody>
</tgroup>
@@ -304,6 +348,44 @@ DEALINGS IN THE SOFTWARE.
<entry><type>uint32_t</type></entry>
<entry>Number of X request in in this connection</entry>
</row>
+ <row>
+ <entry><parameter>deviceid</parameter></entry>
+ <entry><type>int</type></entry>
+ <entry>The device's numerical ID</entry>
+ </row>
+ <row>
+ <entry><parameter>eventtype</parameter></entry>
+ <entry><type>int</type></entry>
+ <entry>Protocol event type</entry>
+ </row>
+ <row>
+ <entry><parameter>button, keycode, touchid</parameter></entry>
+ <entry><type>uint32_t</type></entry>
+ <entry>The button number, keycode or touch ID</entry>
+ </row>
+ <row>
+ <entry><parameter>flags</parameter></entry>
+ <entry><type>uint32_t</type></entry>
+ <entry>Miscellaneous event-specific server flags</entry>
+ </row>
+ <row>
+ <entry><parameter>nvalues</parameter></entry>
+ <entry><type>int8_t</type></entry>
+ <entry>Number of bits in <parameter>mask</parameter> and number of elements
+ in <parameter>values</parameter></entry>
+ </row>
+ <row>
+ <entry><parameter>mask</parameter></entry>
+ <entry><type>uint8_t*</type></entry>
+ <entry>Binary mask indicating which indices in <parameter>values</parameter> contain
+ valid data</entry>
+ </row>
+ <row>
+ <entry><parameter>values</parameter></entry>
+ <entry><type>double*</type></entry>
+ <entry>Valuator values. Values for indices for which the
+ <parameter>mask</parameter> is not set are undefined</entry>
+ </row>
</tbody>
</tgroup>
</table>
@@ -572,6 +654,73 @@ Xserver$1:::client-disconnect
</example>
+ <example id="Input_API_monitoring_with_systemtap">
+ <title>Input API monitoring with SystemTap</title>
+
+ <para>
+ This script can be used to monitor events submitted by drivers to
+ the server for enqueuing. Due to the integration of the input API
+ probes, some server-enqueued events will show up too.
+ <programlisting>
+ # Compile+run with
+ # stap -g xorg.stp /usr/bin/Xorg
+ #
+
+
+ function print_valuators:string(nvaluators:long, mask_in:long, valuators_in:long) %{
+ int i;
+ unsigned char *mask = (unsigned char*)THIS->mask_in;
+ double *valuators = (double*)THIS->valuators_in;
+ char str[128] = {0};
+ char *s = str;
+
+ #define BitIsSet(ptr, bit) (((unsigned char*)(ptr))[(bit)>>3] &amp; (1 &lt;&lt; ((bit) &amp; 7)))
+
+ s += sprintf(s, "nval: %d ::", (int)THIS->nvaluators);
+ for (i = 0; i &lt; THIS->nvaluators; i++)
+ {
+ s += sprintf(s, " %d: ", i);
+ if (BitIsSet(mask, i))
+ s += sprintf(s, "%d", (int)valuators[i]);
+ }
+
+ sprintf(THIS->__retvalue, "%s", str);
+ %}
+
+ probe process(@1).mark("input__event")
+ {
+ deviceid = $arg1
+ type = $arg2
+ detail = $arg3
+ flags = $arg4
+ nvaluators = $arg5
+
+ str = print_valuators(nvaluators, $arg6, $arg7)
+ printf("Event: device %d type %d detail %d flags %#x %s\n",
+ deviceid, type, detail, flags, str);
+ }
+ </programlisting>
+
+ Sample output from a run of this script:
+ <screen><computeroutput>
+Event: device 13 type 4 detail 1 flags 0x0 nval: 0 ::
+Event: device 13 type 6 detail 0 flags 0xa nval: 1 :: 0: 1
+Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -1
+Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -1
+Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 4 1: -3
+Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 3 1: -3
+Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 3 1: -2
+Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -2
+Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -2
+Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -2
+Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 1: -1
+Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 1: -1
+Event: device 13 type 5 detail 1 flags 0x0 nval: 0 ::
+ </computeroutput></screen>
+
+ </para>
+
+ </example>
</sect1>