summaryrefslogtreecommitdiff
path: root/lib/libXext
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2019-05-10 11:44:40 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2019-05-10 11:44:40 +0000
commit46215bfc9c142f5f32aad1cc54d49ee1d69a1980 (patch)
treec2dc7890e0949610053716de222c8ed166efb1b7 /lib/libXext
parent237e992702cdc1b26e14ebd64eedf4e338af77b6 (diff)
Install more manual pages:
* XKB-Config(7), XKB-Enhancing(7): user-level documentation for XKB configuration; not perfect, but the best available. * xtrans(3): a library actively maintained upstream. * libXmu and libXext: Many libraries are effectively frozen upstream. According to matthieu@, the documentation of libXmu and libXext is among the most valuable of those. Feedback and OK matthieu@.
Diffstat (limited to 'lib/libXext')
-rw-r--r--lib/libXext/Makefile.bsd-wrapper20
-rw-r--r--lib/libXext/specs/defs.ent1
-rw-r--r--lib/libXext/specs/shapelib.3493
-rw-r--r--lib/libXext/specs/synclib.3740
-rw-r--r--lib/libXext/specs/xtest1.3586
5 files changed, 1839 insertions, 1 deletions
diff --git a/lib/libXext/Makefile.bsd-wrapper b/lib/libXext/Makefile.bsd-wrapper
index 1ea416086..fead1acfa 100644
--- a/lib/libXext/Makefile.bsd-wrapper
+++ b/lib/libXext/Makefile.bsd-wrapper
@@ -1,7 +1,25 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.5 2013/08/13 07:07:15 guenther Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.6 2019/05/10 11:44:39 schwarze Exp $
CONFIGURE_ARGS= --without-xmlto --without-fop --without-xsltproc
SHARED_LIBS= Xext 13.0
+MDOCS = specs/shapelib \
+ specs/synclib \
+ specs/xtest1
+
+beforeinstall:
+.for n in ${MDOCS}
+ ${INSTALL} ${INSTALL_COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
+ ${.CURDIR}/${n}.3 ${DESTDIR}${MANDIR}3
+.endfor
+
+# maintainer target, not used duing build or install
+mdoc:
+.for n in ${MDOCS}
+ docbook2mdoc -s 3 ${.CURDIR}/${n}.xml > ${.CURDIR}/${n}.3
+.endfor
+
+.PHONY: mdoc
+
.include <bsd.xorg.mk>
diff --git a/lib/libXext/specs/defs.ent b/lib/libXext/specs/defs.ent
new file mode 100644
index 000000000..30b1911cd
--- /dev/null
+++ b/lib/libXext/specs/defs.ent
@@ -0,0 +1 @@
+<!ENTITY fullrelvers "6">
diff --git a/lib/libXext/specs/shapelib.3 b/lib/libXext/specs/shapelib.3
new file mode 100644
index 000000000..b2f50ee6b
--- /dev/null
+++ b/lib/libXext/specs/shapelib.3
@@ -0,0 +1,493 @@
+.\" automatically generated with docbook2mdoc shapelib.xml
+.Dd $Mdocdate: May 10 2019 $
+.Dt SHAPELIB 3
+.Os
+.Sh NAME
+.Nm shapelib
+.Nd X Nonrectangular Window Shape Extension Library
+.Sh OVERVIEW
+This extension provides arbitrary window and border shapes within
+the X11 protocol.
+.Pp
+The restriction of rectangular windows within the X protocol is a significant
+limitation in the implementation of many styles of user interface.
+For
+example, many transient windows would like to display a
+\(lqdrop shadow\(rq to give the illusion of 3 dimensions.
+As
+another example, some user interface style guides call for buttons with
+rounded corners; the full simulation of a nonrectangular shape,
+particularly with respect to event distribution and cursor shape, is not
+possible within the core X protocol.
+As a final example, round clocks
+and nonrectangular icons are desirable visual addition to the desktop.
+.Pp
+This extension provides mechanisms for changing the visible shape of a
+window to an arbitrary, possibly disjoint, nonrectangular form.
+The intent
+of the extension is to supplement the existing semantics, not replace them.
+In particular, it is desirable for clients that are unaware of the
+extension to still be able to cope reasonably with shaped windows.
+For
+example, window managers should still be able to negotiate screen
+real estate in rectangular pieces.
+Toward this end, any shape specified for
+a window is clipped by the bounding rectangle for the window as specified by
+the window's geometry in the core protocol.
+An expected convention would be
+that client programs expand their shape to fill the area offered by the
+window manager.
+.Sh DESCRIPTION
+Each window (even with no shapes specified) is defined by two regions: the
+.Lk shapelib "bounding region"
+.Pq bounding_region
+and the
+.Lk shapelib "clip region"
+.Pq clip_region .
+The bounding region is the
+area of the parent window that the window will occupy (including border).
+The clip region is the subset of the bounding region that is available for
+subwindows and graphics.
+The area between the bounding region and the
+clip region is defined to be the border of the window.
+.Pp
+A nonshaped window will have a bounding region that is a rectangle spanning
+the window, including its border; the clip region will be a rectangle
+filling the inside dimensions (not including the border). In this document,
+these areas are referred to as the
+.Lk shapelib "default bounding region"
+.Pq default_bounding_region
+and the
+.Lk shapelib "default clip region"
+.Pq default_clip_region .
+For a window with
+inside size of
+.Em width
+by
+.Em height
+and border width
+.Em bwidth ,
+the default bounding and clip
+regions are the rectangles (relative to the window origin):
+.Bd -unfilled
+bounding.x = \c
+.Pf - Em bwidth
+bounding.y = \c
+.Pf - Em bwidth
+bounding.width = \c
+.Em width No + 2 * Em bwidth
+bounding.height = \c
+.Em height No + 2 * Em bwidth
+clip.x = 0
+clip.y = 0
+clip.width = \c
+.Em width
+clip.height = \c
+.Em height
+.Ed
+.Pp
+This extension allows a client to modify either or both of the bounding or
+clip regions by specifying new regions that combine with the default
+regions.
+These new regions are called the
+.Lk shapelib "client bounding region"
+.Pq client_bounding_region
+and the
+.Lk shapelib "client clip region"
+.Pq client_clip_region .
+They are specified
+relative to the origin of the window and are always defined by offsets
+relative to the window origin (that is, region adjustments are not
+required when the window is moved). Three mechanisms for specifying
+regions are provided: a list of rectangles, a bitmap, and an existing
+bounding or clip region from a window.
+This is modeled on the specification
+of regions in graphics contexts in the core protocol and allows a variety
+of different uses of the extension.
+.Pp
+When using an existing window shape as an operand in specifying a new shape,
+the client region is used, unless none has been set, in which case the
+default region is used instead.
+.Pp
+The
+.Lk shapelib "effective bounding region"
+.Pq effective_bounding_region
+of a window is
+defined to be the intersection of the client bounding region with the default
+bounding region.
+Any portion of the client bounding region that is not
+included in the default bounding region will not be included in the
+effective bounding region on the screen.
+This means that window managers
+(or other geometry managers) used to dealing with rectangular client windows
+will be able to constrain the client to a rectangular area of the screen.
+.Pp
+Construction of the effective bounding region is dynamic; the client bounding
+region is not mutated to obtain the effective bounding region.
+If a client
+bounding region is specified that extends beyond the current default bounding
+region, and the window is later enlarged, the effective bounding region will
+be enlarged to include more of the client bounding region.
+.Pp
+The
+.Lk shapelib "effective clip region"
+.Pq effective_clip_region
+of a window is
+defined to be the intersection of the client clip region with both the
+default clip region and the client bounding region.
+Any portion of the
+client clip region that is not included in both the default clip region
+and the client bounding region will not be included in the effective clip
+region on the screen.
+.Pp
+Construction of the effective clip region is dynamic; the client clip region is
+not mutated to obtain the effective clip region.
+If a client clip region is
+specified that extends beyond the current default clip region and the
+window or its bounding region is later enlarged, the effective clip region will
+be enlarged to include more of the client clip region if it is included in
+the effective bounding region.
+.Pp
+The border of a window is defined to be the difference between the effective
+bounding region and the effective clip region.
+If this region is empty, no
+border is displayed.
+If this region is nonempty, the border is filled
+using the border-tile or border-pixel of the window as specified in the core
+protocol.
+Note that a window with a nonzero border width will never be able
+to draw beyond the default clip region of the window.
+Also note that a zero
+border width does not prevent a window from having a border, since the clip
+shape can still be made smaller than the bounding shape.
+.Pp
+All output to the window and visible regions of any subwindows will be
+clipped to the effective clip region.
+The server must not retain window
+contents beyond the effective bounding region with backing store.
+The window's
+origin (for graphics operations, background tiling, and subwindow placement)
+is not affected by the existence of a bounding region or clip region.
+.Pp
+Areas that are inside the default bounding region but outside the effective
+bounding region are not part of the window; these areas of the screen will
+be occupied by other windows.
+Input events that occur within the default
+bounding region but outside the effective bounding region will be delivered as
+if the window was not occluding the event position.
+Events that occur in
+a nonrectangular border of a window will be delivered to that window, just
+as for events that occur in a normal rectangular border.
+.Pp
+An
+.Lk libX11 InputOnly
+.Pq glossary:InputOnly_window
+window can have its bounding region set, but it is a
+.Lk libX11 Match
+.Pq BadMatch
+error to attempt to set a clip region on an
+.Lk libX11 InputOnly
+.Pq glossary:InputOnly_window
+window or to specify its clip region as a source to a request
+in this extension.
+.Pp
+The server must accept changes to the clip region of a root window, but
+the server is permitted to ignore requested changes to the bounding region
+of a root window.
+If the server accepts bounding region changes, the contents
+of the screen outside the bounding region are implementation dependent.
+.Sh C LANGUAGE BINDING
+The C functions provide direct access to the protocol and add no additional
+semantics.
+.Pp
+The include file for this extension is
+.Pf < Dv X11/extensions/shape.h Ns > .
+The defined shape kinds are
+.Fn ShapeBounding
+and
+.Fn ShapeClip
+The defined region operations are
+.Fn ShapeSet
+.Fn ShapeUnion
+.Fn ShapeIntersect
+.Fn ShapeSubtract
+and
+.Fn ShapeInvert .
+.Pp
+.Ft Bool
+.Fo XShapeQueryExtension
+.Fa "Display *display"
+.Fa "int *event_base"
+.Fa "int *error_base"
+.Fc
+.Pp
+.Fn XShapeQueryExtension
+returns
+.Fn True
+if the specified display supports the SHAPE extension else
+.Fn False
+If the extension is supported, *event_base is set to the event number for
+.Fn ShapeNotify
+events and *error_base would be set to the error number for the first error for
+this extension.
+Because no errors are defined for this version of
+the extension, the value returned here is not defined (nor useful).
+.Pp
+.Ft Status
+.Fo XShapeQueryVersion
+.Fa "Display *display"
+.Fa "int *major_version"
+.Fa "int *minor_version"
+.Fc
+.Pp
+If the extension is supported,
+.Fn XShapeQueryVersion
+sets the major and minor version numbers of the
+extension supported by the display and returns a nonzero value.
+Otherwise, the arguments are not set and zero is returned.
+.Pp
+.Fo XShapeCombineRegion
+.Fa "Display *display"
+.Fa "Window dest"
+.Fa "int dest_kind"
+.Fa "int x_off"
+.Fa "int y_off"
+.Fa "int region"
+.Fa "int op"
+.Fa "REGION *region"
+.Fc
+.Pp
+.Fn XShapeCombineRegion
+converts the specified region into a list of rectangles and calls
+.Fn XShapeCombineRectangles
+.Pp
+.Fo XShapeCombineRectangles
+.Fa "Display *display"
+.Fa "Window dest"
+.Fa "int dest_kind"
+.Fa "int x_off"
+.Fa "int y_off"
+.Fa "XRectangle *rectangles"
+.Fa "int n_rects"
+.Fa "int op"
+.Fa "int ordering"
+.Fc
+.Pp
+If the extension is supported,
+.Fn XShapeCombineRectangles
+performs a
+.Fn ShapeRectangles
+operation; otherwise, the request is ignored.
+.Pp
+.Fo XShapeCombineMask
+.Fa "Display *display"
+.Fa "int dest"
+.Fa "int dest_kind"
+.Fa "int x_off"
+.Fa "int y_off"
+.Fa "Pixmap src"
+.Fa "int op"
+.Fc
+.Pp
+If the extension is supported,
+.Fn XShapeCombineMask
+performs a
+.Fn ShapeMask
+operation; otherwise, the request is ignored.
+.Pp
+.Fo XShapeCombineShape
+.Fa "Display *display"
+.Fa "Window dest"
+.Fa "int dest_kind"
+.Fa "int x_off"
+.Fa "int y_off"
+.Fa "Window src"
+.Fa "int src_kind"
+.Fa "int op"
+.Fc
+.Pp
+If the extension is supported,
+.Fn XShapeCombineShape
+performs a
+.Fn ShapeCombine
+operation; otherwise, the request is ignored.
+.Pp
+.Fo XShapeOffsetShape
+.Fa display
+.Fa dest
+.Fa dest_kind
+.Fa x_off
+.Fa y_off
+.Fc
+.Pp
+If the extension is supported,
+.Fn XShapeOffsetShape
+performs a
+.Fn ShapeOffset
+operation; otherwise, the request is ignored.
+.Pp
+.Ft Status
+.Fo XShapeQueryExtents
+.Fa "Display *display"
+.Fa "Window window"
+.Fa "Bool *bounding_shaped"
+.Fa "int *x_bounding"
+.Fa "int *y_bounding"
+.Fa "unsigned int *w_bounding"
+.Fa "unsigned int *h_bounding"
+.Fa "Bool *clip_shaped"
+.Fa "int *x_clip"
+.Fa "int *y_clip"
+.Fa "unsigned int *w_clip"
+.Fa "unsigned int *h_clip"
+.Fc
+.Pp
+If the extension is supported,
+.Fn XShapeQueryExtents
+sets x_bounding, y_bounding, w_bounding, h_bounding to the extents of the
+bounding shape and sets x_clip, y_clip, w_clip, h_clip to the extents of
+the clip shape.
+For unspecified client regions, the extents of the
+corresponding default region are used.
+.Pp
+If the extension is supported, a nonzero value is returned; otherwise,
+zero is returned.
+.Pp
+.Fo XShapeSelectInput
+.Fa "Display *display"
+.Fa "Window window"
+.Fa "unsigned long mask"
+.Fc
+.Pp
+To make this extension more compatible with other interfaces, although
+only one event type can be selected via the extension,
+.Fn XShapeSelectInput
+provides a general mechanism similar to the standard Xlib binding for
+window events.
+A mask value has been defined,
+.Fn ShapeNotifyMask
+that is the only valid bit in mask that may be specified.
+The structure for this event is defined as follows:
+.Bd -unfilled
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came frome a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* window of event */
+ int kind; /* ShapeBounding or ShapeClip */
+ int x, y; /* extents of new region */
+ unsigned width, height;
+ Time time; /* server timestamp when region changed */
+ Bool shaped; /* true if the region exists */
+} XShapeEvent;
+.Ed
+.Pp
+.Ft unsigned long
+.Fo XShapeInputSelected
+.Fa "Display *display"
+.Fa "Window window"
+.Fc
+.Pp
+.Fn XShapeInputSelected
+returns the current input mask for extension events on the specified
+window; the value returned if
+.Fn ShapeNotify
+is selected for is
+.Fn ShapeNotifyMask
+otherwise, it returns zero.
+If the extension is not supported, it returns zero.
+.Pp
+.Ft XRectangle
+.Fo *XShapeGetRectangles
+.Fa "Display *display"
+.Fa "Window window"
+.Fa "int kind"
+.Fa "int *count"
+.Fa "int *ordering"
+.Fc
+.Pp
+If the extension is not supported,
+.Fn XShapeGetRectangles
+returns NULL.
+Otherwise, it returns a list of rectangles that describe the
+region specified by kind.
+.Bl -tag -width Ds
+.It Em bounding region
+The area of the parent window that this window will occupy.
+This area is divided into two parts: the border and the interior.
+.It Em clip region
+The interior of the window, as a subset of the bounding
+region.
+This region describes the area that will be painted with the
+window background when the window is cleared, will contain all graphics
+output to the window, and will clip any subwindows.
+.It Em default bounding region
+The rectangular area, as described by the core protocol
+window size, that covers the interior of the window and its border.
+.It Em default clip region
+The rectangular area, as described by the core protocol
+window size, that covers the interior of the window and excludes the border.
+.It Em client bounding region
+The region associated with a window that is directly
+modified via this extension when specified by
+.Fn ShapeBounding
+This region is used in conjunction with the default bounding region
+to produce the effective bounding region.
+.It Em client clip region
+The region associated with a window that is directly
+modified via this extension when specified by
+.Fn ShapeClip
+This region is used in conjunction with the default clip region
+and the client bounding region to produce the effective clip region.
+.It Em effective bounding region
+The actual shape of the window on the screen, including
+border and interior (but excluding the effects of overlapping windows).
+When a window has a client bounding region, the effective bounding region
+is the intersection of the default bounding region and the client bounding
+region.
+Otherwise, the effective bounding region is the same as the
+default bounding region.
+.It Em effective clip region
+The actual shape of the interior of the window on the
+screen (excluding the effects of overlapping windows). When a window
+has a client clip region or a client bounding region, the effective
+clip region is the intersection of the default clip region, the client
+clip region (if any) and the client bounding region (if any). Otherwise,
+the effective clip region is the same as the default clip region.
+.El
+.Sh AUTHORS
+.An -nosplit
+.Sy X Consortium Standard
+.Pp
+X Version 11, Release 6
+Version 1.0
+.An -split
+.An Keith Packard ,
+MIT X Consortium
+Copyright \(co 1989X Consortium
+.Ss Legal Notice
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files
+(the \(lqSoftware\(rq), 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:
+.Pp
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+.Pp
+THE SOFTWARE IS PROVIDED \(lqAS IS\(rq, 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 X CONSORTIUM 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.
+.Pp
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+.Pp
+X Window System is a trademark of The OpenGroup.
diff --git a/lib/libXext/specs/synclib.3 b/lib/libXext/specs/synclib.3
new file mode 100644
index 000000000..77c51ffca
--- /dev/null
+++ b/lib/libXext/specs/synclib.3
@@ -0,0 +1,740 @@
+.\" automatically generated with docbook2mdoc synclib.xml
+.Dd $Mdocdate: May 10 2019 $
+.Dt SYNCLIB 3
+.Os
+.Sh NAME
+.Nm synclib
+.Nd X Synchronization Extension Library
+.Sh SYNCHRONIZATION PROTOCOL
+The core X protocol makes no guarantees about the relative order of
+execution of requests for different clients.
+This means that any
+synchronization between clients must be done at the client level in an
+operating system-dependent and network-dependent manner.
+Even if there
+was an accepted standard for such synchronization, the use of a network
+introduces unpredictable delays between the synchronization of the clients and
+the delivery of the resulting requests to the X server.
+.Pp
+The core X protocol also makes no guarantees about the time at which
+requests are executed, which means that all clients with real-time constraints
+must implement their timing on the host computer.
+Any such timings are
+subject to error introduced by delays within the operating system and
+network and are inefficient because of the need for round-trip requests that
+keep the client and server synchronized.
+.Pp
+The synchronization extension provides primitives that allow synchronization
+between clients to take place entirely within the X server.
+This removes any
+error introduced by the network and makes it possible to synchronize clients
+on different hosts running different operating systems.
+This is important for
+multimedia applications, where audio, video, and graphics data streams are
+being synchronized.
+The extension also provides internal timers within the X
+server to which client requests can be synchronized.
+This allows simple
+animation applications to be implemented without any round-trip requests
+and makes best use of buffering within the client, network, and server.
+.Ss Description
+The mechanism used by this extension for synchronization within the X server
+is to block the processing of requests from a client until a specific
+synchronization condition occurs.
+When the condition occurs, the client is
+released and processing of requests continues.
+Multiple clients may block on
+the same condition to give inter-client synchronization.
+Alternatively, a single
+client may block on a condition such as an animation frame marker.
+.Pp
+The extension adds
+.Fn Counter
+and
+.Fn Alarm
+to the set of resources managed by
+the server.
+A counter has a 64-bit integer value that may be increased or
+decreased by client requests or by the server internally.
+A client can
+block by sending an
+.Fn Await
+request that waits until
+one of a set of synchronization conditions, called TRIGGERs, becomes TRUE.
+.Pp
+The
+.Fn CreateCounter
+request allows a client to create
+a
+.Fn Counter
+that can be changed by explicit
+.Fn SetCounter
+and
+.Fn ChangeCounter
+requests.
+These can be used to implement synchronization between
+different clients.
+.Pp
+There are some counters, called
+.Fn System Counters ,
+that are changed by the server internally rather than by client
+requests.
+The effect of any change to a system counter is not visible
+until the server has finished processing the current request.
+In other
+words, system counters are apparently updated in the gaps between the
+execution of requests rather than during the actual execution of a
+request.
+The extension provides a system counter that advances with the
+server time as defined by the core protocol, and it may also provide
+counters that advance with the real-world time or that change each
+time the CRT screen is refreshed.
+Other extensions may provide their own
+extension-specific system counters.
+.Pp
+The extension provides an
+.Fn Alarm
+mechanism that allows clients to receive an
+event on a regular basis when a particular counter is changed.
+.Sh C LANGUAGE BINDING
+The C routines provide direct access to the protocol and add no additional
+semantics.
+.Pp
+The include file for this extension is <X11/extensions/sync.h>.
+Most of the names in the language binding are derived from the protocol
+names by prepending XSync to the protocol name and changing the
+capitalization.
+.Ss C Functions
+Most of the following functions generate SYNC protocol requests.
+.Pp
+.Ft Status
+.Fo XSyncQueryExtension
+.Fa "Display *dpy"
+.Fa "int *event_base_return"
+.Fa "int *error_base_return"
+.Fc
+.Pp
+If dpy supports the SYNC extension,
+.Fn XSyncQueryExtension
+returns True,
+sets *event_base_return to the event number for the first SYNC event, and
+sets *error_base_return to the error number for the first SYNC error.
+If dpy
+does not support the SYNC extension, it returns False.
+.Pp
+.Ft Status
+.Fo XSyncInitialize
+.Fa "Display *dpy"
+.Fa "int *major_version_return"
+.Fa "int *minor_version_return"
+.Fc
+.Pp
+.Fn XSyncInitialize
+sets *major_version_return and
+*minor version return to the major/minor SYNC protocol version supported
+by the server.
+If the XSync library is compatible with the version
+returned by the server, this function returns
+.Fn True .
+If dpy does not support the SYNC extension, or if there was an error
+during communication with the server, or if the server and library protocol
+versions are incompatible, this function returns
+.Fn False .
+The only XSync function that may be called before this function is
+XSyncQueryExtension.
+If a client violates this rule, the effects of all XSync
+calls that it makes are undefined.
+.Pp
+.Ft XSyncSystemCounter
+.Fo "* XSyncListSystemCounters"
+.Fa "Display *dpy"
+.Fa "int *n_counters_return"
+.Fc
+.Pp
+.Fn XSyncListSystemCounters
+returns a pointer to an array
+of system counters supported by the display and sets *n_counters_return
+to the number of counters in the array.
+The array should be freed with
+.Fn XSyncFreeSystemCounterList .
+If dpy does not support
+the SYNC extension, or if there was an error during communication with
+the server, or if the server does not support any system counters,
+this function returns NULL.
+.Pp
+XSyncSystemCounter has the following fields:
+.Bd -unfilled
+char * name; /* null-terminated name of system counter */
+XSyncCounter counter; /* counter id of this system counter */
+XSyncValue resolution; /* resolution of this system counter */
+.Ed
+.Pp
+.Ft void
+.Fo XSyncFreeSystemCounterList
+.Fa "XSyncSystemCounter *list"
+.Fc
+.Pp
+.Fn XSyncFreeSystemCounterList
+frees the memory
+associated with the system counter list returned by
+.Fn XSyncListSystemCounters .
+.Pp
+.Ft XSyncCounter
+.Fo XSyncCreateCounter
+.Fa "Display *dpy"
+.Fa "XSyncValue initial_value"
+.Fc
+.Pp
+.Fn XSyncCreateCounter
+creates a counter on the dpy
+with the given initial value and returns the counter ID.
+It returns
+.Fn None
+if dpy does not support the SYNC extension.
+.Pp
+.Ft Status
+.Fo XSyncSetCounter
+.Fa "Display *dpy"
+.Fa "XSyncCounter counter"
+.Fa "XSyncValue value"
+.Fc
+.Pp
+.Fn XSyncSetCounter
+sets counter to value.
+It returns
+.Fn False
+if dpy does not
+support the SYNC extension; otherwise, it returns
+.Fn True .
+.Pp
+.Ft Status
+.Fo XSyncChangeCounter
+.Fa "Display *dpy"
+.Fa "XSyncCounter counter"
+.Fa "XSyncValue value"
+.Fc
+.Pp
+.Fn XSyncChangeCounter
+adds value to counter.
+It returns
+.Fn False
+if dpy does not support the SYNC extension;
+otherwise, it returns
+.Fn True .
+.Pp
+.Ft Status
+.Fo XSyncDestroyCounter
+.Fa "Display *dpy"
+.Fa "XSyncCounter counter"
+.Fc
+.Pp
+.Fn XSyncDestroyCounter
+destroys counter.
+It returns
+.Fn False
+if dpy does not support the SYNC extension;
+otherwise, it returns
+.Fn True .
+.Pp
+.Ft Status
+.Fo XSyncQueryCounter
+.Fa "Display *dpy"
+.Fa "XSyncCounter counter"
+.Fa "XSyncValue *value_return"
+.Fc
+.Pp
+.Fn XSyncQueryCounter
+sets *value_return to the current
+value of counter.
+It returns
+.Fn False
+if there was an
+error during communication with the server or if dpy does not support the
+SYNC extension; otherwise, it returns
+.Fn True .
+.Pp
+.Ft Status
+.Fo XSyncAwait
+.Fa "Display *dpy"
+.Fa "XSyncWaitCondition *wait_list"
+.Fa "int n_conditions"
+.Fc
+.Pp
+.Fn XSyncAwait
+awaits on the conditions in wait_list.
+The n_conditions is the number of wait conditions in wait_list.
+It
+returns
+.Fn False
+if dpy does not support the SYNC
+extension; otherwise, it returns
+.Fn True .
+The await is
+processed asynchronously by the server; this function always returns
+immediately after issuing the request.
+.Pp
+XSyncWaitCondition has the following fields:
+.Bd -unfilled
+XSyncCounter trigger.counter; /*counter to trigger on */
+XSyncValueType trigger.value_type; /*absolute/relative */
+XSyncValue trigger.wait_value; /*value to compare counter to */
+XSyncTestType trigger.test_type; /*pos/neg comparison/transtion */
+XSyncValue event_threshold; /*send event if past threshold */
+.Ed
+.Pp
+.Fn XSyncValueType
+can be either
+.Fn XSyncAbsolute
+or
+.Fn XSyncRelative .
+.Pp
+.Fn XSyncTestType
+can be one of
+.Fn XSyncPositiveTransition ,
+.Fn XSyncNegativeTransition ,
+.Fn XSyncPositiveComparison ,
+or
+.Fn XSyncNegativeComparison .
+.Pp
+.Ft XSyncAlarm
+.Fo XSyncCreateAlarm
+.Fa "Display *dpy"
+.Fa "unsigned long values_mask"
+.Fa "XSyncAlarmAttributes *values`"
+.Fc
+.Pp
+.Fn XSyncCreateAlarm
+creates an alarm and returns the
+alarm ID.
+It returns None if the display does not support the SYNC
+extension.
+The values_mask and values specify the alarm attributes.
+.Pp
+.Fn XSyncAlarmAttributes
+has the following fields.
+The
+attribute_mask column specifies the symbol that the caller should OR
+into values_mask to indicate that the value for the corresponding
+attribute was actually supplied.
+Default values are used for all
+attributes that do not have their attribute_mask OR’ed into values_mask.
+See the protocol description for
+.Fn CreateAlarm
+for the
+defaults.
+.Bd -unfilled
+type field name attribute_mask
+XSyncCounter trigger.counter; XSyncCACounter
+XSyncValueType trigger.value_type; XSyncCAValueType
+XSyncValue trigger.wait_value; XSyncCAValue
+XSyncTestType trigger.test_type; XSyncCATestType
+XSyncValue delta; XSyncCADelta
+Bool events; XSyncCAEvents
+XSyncAlarmState state; client cannot set this
+.Ed
+.Pp
+.Ft Status
+.Fo XSyncDestroyAlarm
+.Fa "Display *dpy"
+.Fa "XSyncAlarm alarm"
+.Fc
+.Pp
+.Fn XSyncDestroyAlarm
+destroys alarm.
+It returns
+.Fn False
+if dpy does not support
+the SYNC extension; otherwise, it returns
+.Fn True .
+.Pp
+.Ft Status
+.Fo XSyncQueryAlarm
+.Fa "Display *dpy"
+.Fa "XSyncAlarm alarm"
+.Fa "XSyncAlarmAttributes *values_return"
+.Fc
+.Pp
+.Fn XSyncQueryAlarm
+sets *values_return to the alarm’s
+attributes.
+It returns
+.Fn False
+if there was an error
+during communication with the server or if dpy does not support the
+SYNC extension; otherwise, it returns
+.Fn True .
+.Pp
+.Ft Status
+.Fo XSyncChangeAlarm
+.Fa "Display *dpy"
+.Fa "XSyncAlarm alarm"
+.Fa "unsigned long values_mask"
+.Fa "XSyncAlarmAttributes *values"
+.Fc
+.Pp
+.Fn XSyncChangeAlarm
+changes alarm’s attributes.
+The
+attributes to change are specified as in
+.Fn XSyncCreateAlarm .
+It returns
+.Fn False
+if dpy does not support
+the SYNC extension; otherwise, it returns
+.Fn True .
+.Pp
+.Ft Status
+.Fo XSyncSetPriority
+.Fa "Display *dpy"
+.Fa "XID client_resource_id"
+.Fa "int priority"
+.Fc
+.Pp
+.Fn XSyncSetPriority
+sets the priority of the client
+owning client_resource_id to priority.
+If client_resource_id is None, it
+sets the caller’s priority.
+It returns
+.Fn False
+if dpy does not support the SYNC extension;
+otherwise, it returns
+.Fn True .
+.Pp
+.Ft Status
+.Fo XSyncGetPriority
+.Fa "Display *dpy"
+.Fa "XID client_resource_id"
+.Fa "int *return_priority"
+.Fc
+.Pp
+.Fn XSyncGetPriority
+sets *return_priority to the
+priority of the client owning client_resource_id.
+If client_resource_id
+is None, it sets *return_priority to the caller’s priority.
+It returns
+.Fn False
+if there was an error during communication
+with the server or if dpy does not support the SYNC extension; otherwise, it
+returns
+.Fn True .
+.Ss C Macros/Functions
+The following procedures manipulate 64-bit values.
+They are defined both as
+macros and as functions.
+By default, the macro form is used.
+To use the
+function form, #undef the macro name to uncover the function.
+.Pp
+.Ft void
+.Fo XSyncIntToValue
+.Fa "XSyncValue *pv"
+.Fa "int i"
+.Fc
+.Pp
+Converts i to an
+.Fn XSyncValue
+and stores it in *pv.
+Performs sign extension (*pv will have the same sign as i.)
+.Pp
+.Ft void
+.Fo XSyncIntsToValue
+.Fa "XSyncValue *pv"
+.Fa "unsigned int low"
+.Fa "int high"
+.Fc
+.Pp
+Stores low in the low 32 bits of *pv and high in the high 32 bits of *pv.
+.Pp
+.Ft Bool
+.Fo XSyncValueGreaterThan
+.Fa "XSyncValue a"
+.Fa "XSyncValue b"
+.Fc
+.Pp
+Returns
+.Fn True
+if a is greater than b, else returns
+.Fn False .
+.Pp
+.Ft Bool
+.Fo XSyncValueLessThan
+.Fa "XSyncValue a"
+.Fa "XSyncValue b"
+.Fc
+.Pp
+Returns
+.Fn True
+if a is less than b, else returns
+.Fn False .
+.Pp
+.Ft Bool
+.Fo XSyncValueGreaterOrEqual
+.Fa "XSyncValue a"
+.Fa "XSyncValue b"
+.Fc
+.Pp
+Returns
+.Fn True
+if a is greater than or equal to b,
+else returns
+.Fn False .
+.Pp
+.Ft Bool
+.Fo XSyncValueLessOrEqual
+.Fa "XSyncValue a"
+.Fa "XSyncValue b"
+.Fc
+.Pp
+Returns
+.Fn True
+if a is less than or equal to b,
+else returns
+.Fn False .
+.Pp
+.Ft Bool
+.Fo XSyncValueEqual
+.Fa "XSyncValue a"
+.Fa "XSyncValue b"
+.Fc
+.Pp
+Returns
+.Fn True
+if a is equal to b,
+else returns
+.Fn False .
+.Pp
+.Ft Bool
+.Fo XSyncValueIsNegative
+.Fa "XSyncValue v"
+.Fc
+.Pp
+Returns
+.Fn True
+if v is negative,
+else returns
+.Fn False .
+.Pp
+.Ft Bool
+.Fo XSyncValueIsZero
+.Fa "XSyncValue v"
+.Fc
+.Pp
+Returns
+.Fn True
+if v is zero,
+else returns
+.Fn False .
+.Pp
+.Ft Bool
+.Fo XSyncValueIsPositive
+.Fa "XSyncValue v"
+.Fc
+.Pp
+Returns
+.Fn True
+if v is positive,
+else returns
+.Fn False .
+.Pp
+.Ft unsigned int
+.Fo XSyncValueLow32
+.Fa "XSyncValue v"
+.Fc
+.Pp
+Returns the low 32 bits of v.
+.Pp
+.Ft unsigned int
+.Fo XSyncValueHigh32
+.Fa "XSyncValue v"
+.Fc
+.Pp
+Returns the high 32 bits of v.
+.Pp
+.Ft void
+.Fo XSyncValueAdd
+.Fa "XSyncValue *presult"
+.Fa "XSyncValue a"
+.Fa "XSyncValue b"
+.Fa "Bool *poverflow"
+.Fc
+.Pp
+Adds a to b and stores the result in *presult.
+If the result could not
+fit in 64 bits, *poverflow is set to
+.Fn True ,
+else it is
+set to
+.Fn False .
+.Pp
+.Ft void
+.Fo XSyncValueSubtract
+.Fa "XSyncValue *presult"
+.Fa "XSyncValue a"
+.Fa "XSyncValue b"
+.Fa "Bool *poverflow"
+.Fc
+.Pp
+Subtracts b from a and stores the result in *presult.
+If the result could not
+fit in 64 bits, *poverflow is set to
+.Fn True ,
+else it is
+set to
+.Fn False .
+.Pp
+.Ft void
+.Fo XSyncMaxValue
+.Fa "XSyncValue *pv"
+.Fc
+.Pp
+Sets *pv to the maximum value expressible in 64 bits.
+.Pp
+.Ft void
+.Fo XSyncMinValue
+.Fa "XSyncValue *pv"
+.Fc
+.Pp
+Sets *pv to the minimum value expressible in 64 bits.
+.Ss Events
+Let
+.Em event_base
+be the value event base return as defined in the function
+.Fn XSyncQueryExtension .
+.Pp
+An
+.Fn XSyncCounterNotifyEvent Ns ’s
+type field has the value
+event_base +
+.Fn XSyncCounterNotify .
+The fields of this
+structure are:
+.Bd -unfilled
+int type; /* event base + XSyncCounterNotify */
+unsigned long serial; /* number of last request processed by server */
+Bool send event; /* true if this came from a SendEvent request */
+Display * display; /* Display the event was read from */
+XSyncCounter counter; /* counter involved in await */
+XSyncValue wait_value; /* value being waited for */
+XSyncValue counter_value; /* counter value when this event was sent */
+Time time; /* milliseconds */
+int count; /* how many more events to come */
+Bool destroyed; /* True if counter was destroyed */
+.Ed
+.Pp
+An
+.Fn XSyncAlarmNotifyEvent Ns ’s
+type field has the value
+event_base +
+.Fn XSyncAlarmNotify .
+The fields of
+this structure are:
+.Bd -unfilled
+int type; /* event_base + XSyncAlarmNotify */
+unsigned long serial; /* number of last request processed by server */
+Bool send_event; /* true if this came from a SendEvent request */
+Display * display; /*Display the event was read from */
+XSyncAlarm alarm; /* alarm that triggered */
+XSyncValue counter_value /* value that triggered the alarm */
+XSyncValue alarm_value /* test value of trigger in alarm */
+Time time; /* milliseconds */
+XSyncAlarmState state; /* new state of alarm */
+.Ed
+.Ss Errors
+Let
+.Em error_base
+be the value
+.Em error_base_return
+as defined in the function
+.Fn XSyncQueryExtension .
+.Pp
+An
+.Fn XSyncAlarmError Ns ’s
+error_code field has
+.Fn XSyncBadAlarm .
+The fields of this structure are:
+.Bd -unfilled
+int type
+Display * display; /* Display the event was read from */
+XSyncCounter counter; /* resource id */
+unsigned long serial; /* serial number of failed request */
+unsigned char error_code; /* error_base + XSyncBadAlarm */
+unsigned char request_code; /* Major op-code of failed request */
+unsigned char minor_code; /* Minor op-code of failed request */
+.Ed
+.Pp
+An
+.Fn XSyncCounterError Ns ’s
+error code field has the value
+error_base +
+.Fn XSyncBadCounter .
+The fields of this
+structure are:
+.Bd -unfilled
+int type
+Display * display; /* Display the event was read from */
+XSyncCounter counter; /* resource id */
+unsigned long serial; /* serial number of failed request */
+unsigned char error_code; /* error_base + XSyncBadCounter */
+unsigned char request_code; /* Major op-code of failed request */
+unsigned char minor_code; /* Minor op-code of failed request */
+.Ed
+.Sh AUTHORS
+.An -nosplit
+.Sy X Consortium Standard
+.Pp
+X Version 11, Release 6
+Version 3.0
+.An -split
+.An Tim Glauert ,
+Olivetti Research
+MultiWorks
+.An Dave Carver ,
+Digital Equipment Corporation
+MIT/Project Athena
+.An Jim Gettys ,
+Digital Equipment Corporation
+Cambridge Research Laboratory
+.An David P. Wiggins ,
+X Consortium, Inc.
+Copyright \(co 1991
+Olivetti Research Limited, Cambridge England
+Digital Equipment Corporation, Maynard, Massachusetts
+.Ss Legal Notice
+Permission to use, copy, modify, and distribute this documentation for any
+purpose and without fee is hereby granted, provided that the above
+copyright notice appear in all copies.
+Olivetti, Digital, MIT, and the
+X Consortium make no representations about the suitability for any purpose
+of the information in this document.
+This documentation is provided as
+is without express or implied warranty.
+.Ss Legal Notice
+Copyright \(co 1991 X Consortium, Inc.
+.Pp
+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:
+.Pp
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+.Pp
+THE SOFTWARE IS PROVIDED \(lqAS IS\(rq, 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 X CONSORTIUM 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.
+.Pp
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from the
+X Consortium.
+.Pp
+X Window System is a trademark of The OpenGroup.
diff --git a/lib/libXext/specs/xtest1.3 b/lib/libXext/specs/xtest1.3
new file mode 100644
index 000000000..33723c0cb
--- /dev/null
+++ b/lib/libXext/specs/xtest1.3
@@ -0,0 +1,586 @@
+.\" automatically generated with docbook2mdoc xtest1.xml
+.Dd $Mdocdate: May 10 2019 $
+.Dt XTEST1 3
+.Os
+.Sh NAME
+.Nm xtest1
+.Nd X11 INPUT SYNTHESIS EXTENSION PROPOSAL
+.Sh ABSTRACT
+This is a proposal for an extension to the X11 server and Xlib.
+.Sh INTRODUCTION
+This is a proposal for an extension to the X11 server and Xlib.
+It provides two capabilities:
+.Bl -bullet
+.It
+It allows a client to generate user input actions in the server without
+requiring a user to be present.
+.It
+It also allows a client to control the
+handling of user input actions by the server.
+.El
+.Pp
+The capability
+to allow a client to generate user input actions in the server
+will be used by some of the X Testing Consortium Xlib tests.
+Both capabilities will be used by the X Testing Consortium client exerciser
+program.
+These capabilities may also be useful in other programs.
+.Pp
+This extension requires modification to device-dependent code in the
+server.
+Therefore it is not a 'portable' extension as defined by the
+X11 Server Extensions document.
+However, the majority of the code
+and functionality of this extension will be implementation-independent.
+.Sh CONVENTIONS USED IN THIS DOCUMENT
+The naming conventions used in the Xlib documentation are followed
+with these additions:
+.Bl -bullet
+.It
+The names of all functions defined in this extension begin with 'XTest',
+with the first letter of each additional word capitalized.
+.It
+The names of the protocol request structures follow the Xlib convention
+of 'x<name>Req'.
+.It
+The names of the protocol request minor type codes follow the Xlib convention
+of 'X_<name>'.
+.It
+The names of all other constants defined in this extension begin with 'XTest',
+with the rest of the name in upper case letters.
+.It
+All constants and structures defined in this extension will have their
+values specified in the 'xtestext1.h' file (listed in section 5).
+.El
+.Sh DEFINITION OF TERMS
+.Ss Input Actions
+Input actions are pointer movements, button presses and releases,
+and key presses and releases.
+They can be generated by a user or by a client
+(using functions in this extension).
+.Ss User Input Actions
+User input actions are input actions that are generated by the user
+moving a pointing device (typically a mouse), pressing and releasing buttons on
+the pointing device, and pressing and releasing keys on the keyboard.
+.Sh WHAT DOES THIS EXTENSION DO?
+Without this extension, user input actions are processed by the server,
+and are converted into normal X events that are sent to the
+appropriate client or clients.
+.Pp
+This extension adds the following capabilities:
+.Bl -bullet
+.It
+Input actions may be sent from a client to the server to be
+processed just as if the user had physically performed them.
+The input actions are provided to the server in the form of X protocol
+requests defined by this extension.
+The information provided to the server includes what action should be
+performed, and how long to delay before processing the action in the server.
+.It
+User input actions may be diverted to a client before being processed by the
+server.
+The effect on the server is as if the user had performed no input action.
+The user input actions are provided to the client in the form of X events
+defined by this extension.
+The information provided to the client includes what user input action
+occurred and the delay between this user input action and the previous user
+input action.
+The client may then do anything it wishes with this information.
+.It
+User input actions may be copied, with one copy going to the server in the
+normal way, and the other copy being sent to a client as described above.
+.El
+.Sh FUNCTIONS IN THIS EXTENSION
+.Ss High Level Functions
+These functions are built on top of the low level functions described later.
+.Pp
+.Sy XTestMovePointer
+.Pp
+.Ft int
+.Fo XTestMovePointer
+.Fa "Display *display"
+.Fa "int device_id"
+.Fa "unsigned long delay"
+.Fa "int x"
+.Fa "int y"
+.Fa "unsigned int count"
+.Fc
+.Bl -tag -width Ds
+.It display
+Specifies the connection to the X server.
+.It device_id
+Specifies which pointer device was supposed to have caused the input action.
+This is a provision for future support of multiple (distinguishable) pointer
+devices, and should always be set to 0 for now.
+.It delay
+Specifies the time (in milliseconds) to wait before each movement
+of the pointer.
+.It x, y
+Specifies the x and y coordinates to move the pointer to relative to the
+root window for the specified display.
+.It count
+Specifies the number of 'delay, x, y' triplets contained in the
+.Em delay ,
+.Em x
+and
+.Em y
+arrays.
+.El
+.Pp
+The
+.Fn XTestMovePointer
+function creates input actions to be sent to the the server.
+The input actions will be accumulated in a request defined by this extension
+until the request is full or the XTestFlush function is called.
+They will then be sent to the server.
+When the input actions are sent to the server, the input actions will cause
+the server to think that the pointer was moved to the specified position(s),
+with the specified delay before each input action.
+.Pp
+The
+.Fn XTestMovePointer
+function will return -1 if there is an error, and 0 otherwise.
+.Pp
+.Sy XTestPressButton
+.Pp
+.Ft int
+.Fo XTestPressButton
+.Fa "Display *display"
+.Fa "int device_id"
+.Fa "unsigned long delay"
+.Fa "unsigned int button_number"
+.Fa "unsigned int button_action"
+.Fc
+.Bl -tag -width Ds
+.It display
+Specifies the connection to the X server.
+.It device_id
+Specifies which button device was supposed to have caused the input action.
+This is a provision for future support of multiple (distinguishable) button
+devices, and should always be set to 0 for now.
+.It delay
+Specifies the time (in milliseconds) to wait before the input action.
+.It button_number
+Specifies which button is being acted upon.
+.It button_action
+Specifies the action to be performed (one of
+.Em XTestPRESS ,
+.Em XTestRELEASE ,
+or
+.Em XTestSTROKE ) .
+.El
+.Pp
+The
+.Fn XTestPressButton
+function creates input actions to be sent to the the server.
+The input actions will be accumulated in a request defined by this extension
+until the request is full or the XTestFlush function is called.
+They will then be sent to the server.
+When the input actions are sent to the server, the input actions will cause
+the server to think that the specified button was moved as specified.
+.Pp
+The
+.Fn XTestPressButton
+function will return -1 if there is an error, and 0 otherwise.
+.Pp
+.Sy XTestPressKey
+.Pp
+.Ft int
+.Fo XTestPressKey
+.Fa "Display *display"
+.Fa "int device_id"
+.Fa "unsigned long delay"
+.Fa "unsigned int keycode"
+.Fa "unsigned int key_action"
+.Fc
+.Bl -tag -width Ds
+.It display
+Specifies the connection to the X server.
+.It device_id
+Specifies which keyboard device was supposed to have caused the input action.
+This is a provision for future support of multiple (distinguishable) keyboard
+devices, and should always be set to 0 for now.
+.It delay
+Specifies the time (in milliseconds) to wait before the input action.
+.It keycode
+Specifies which keycode is being acted upon.
+.It key_action
+Specifies the action to be performed (one of
+.Em XTestPRESS ,
+.Em XTestRELEASE ,
+or
+.Em XTestSTROKE ) .
+.El
+.Pp
+The
+.Fn XTestPressKey
+function creates input actions to be sent to the the server.
+The input actions will be accumulated in a request defined by this extension
+until the request is full or the XTestFlush function is called.
+They will then be sent to the server.
+When the input actions are sent to the server, the input actions will cause
+the server to think that the specified key on the keyboard was moved as
+specified.
+.Pp
+The
+.Fn XTestPressKey
+function will return -1 if there is an error, and 0 otherwise.
+.Pp
+.Sy XTestFlush
+.Pp
+.Ft int
+.Fo XTestFlush
+.Fa "Display *display"
+.Fc
+.Bl -tag -width Ds
+.It display
+Specifies the connection to the X server.
+.El
+.Pp
+The
+.Fn XTestFlush
+will send any remaining input actions to the server.
+.Pp
+The
+.Fn XTestFlush
+function will return -1 if there is an error, and 0 otherwise.
+.Ss Low Level Functions
+.Sy XTestGetInput
+.Pp
+.Ft int
+.Fo XTestGetInput
+.Fa "Display *display"
+.Fa "int action_handling"
+.Fc
+.Bl -tag -width Ds
+.It display
+Specifies the connection to the X server.
+.It action_handling
+Specifies to the server what to do with the user input actions.
+(one of
+0,
+.Em XTestPACKED_MOTION
+or
+.Em XTestPACKED_ACTIONS ;
+optionally 'or'ed
+with
+.Em XTestEXCLUSIVE ) .
+.El
+.Pp
+The
+.Fn XTestGetInput
+function tells the server to begin putting information about user input actions
+into events to be sent to the client that called this function.
+These events
+can be read via the Xlib
+.Fn XNextEvent Ns fR
+function.
+.Pp
+The server assigns an event type of
+.Em XTestInputActionType
+to these events
+to distinguish them from other events.
+Since the actual value of the event type may vary depending on how many
+extensions are included with an X11 implementation,
+.Em XTestInputActionType
+is a variable that will be
+contained in the Xlib
+part of this extension.
+It may be referenced as follows:
+.Pp
+extern int XTestInputActionType;
+.Bl -bullet
+.It
+An
+.Em action_handling
+value of 0 causes the server
+to send one user input action in each
+.Em XTestInputActionType
+event.
+This can sometimes cause performance problems.
+.It
+An
+.Em action_handling
+value of
+.Em XTestPACKED_ACTIONS
+causes the server
+to pack as many user input actions as possible into a
+.Em XTestInputActionType
+event.
+This is needed if user input actions are happening rapidly (such as
+when the user moves the pointer) to keep performance at a reasonable level.
+.It
+An
+.Em action_handling
+value of
+.Em XTestPACKED_MOTION
+causes the server
+to pack only user input actions associated with moving the pointer.
+This allows the
+client to receive button and key motions as they happen without waiting for the
+event to fill up, while still keeping performance at a reasonable level.
+.It
+An
+.Em action_handling
+value with
+.Em XTestEXCLUSIVE
+\&'or'ed in
+causes the server to send user input actions only to the client.
+The effect on the server is as if the user had performed no input actions.
+.It
+An
+.Em action_handling
+value without
+.Em XTestEXCLUSIVE
+causes the server to copy user input actions, sending one copy to the
+client, and handling the other copy normally (as it would if this extension
+were not installed).
+.El
+.Pp
+There are four types of input actions that are passed from the server
+to the client.
+They are:
+.Bl -tag -width Ds
+.It key/button~state~change
+This type of input action contains the keycode of the key or button that
+changed state;
+whether the key or button is up or down,
+and the time delay between this input action and the previous input action.
+.It pointer~motions
+This type of input action contains information about the motion of the
+pointer when the pointer has only moved a short distance.
+If the pointer has moved a long distance,
+the pointer jump input action is used.
+.It pointer~jumps
+This type of input action contains information about the motion of the
+pointer when the pointer has moved a long distance.
+.It delays
+This type of input action is used when the delay between input actions is too
+large to be held in the other input actions.
+.El
+.Pp
+The
+.Fn XTestGetInput
+function will return -1 if there is an error, and 0 otherwise.
+.Pp
+An error code of
+.Em BadAccess
+means that another client
+has already requested that user input actions be sent to it.
+.Pp
+.Sy XTestStopInput
+.Pp
+.Ft int
+.Fo XTestStopInput
+.Fa "Display *display"
+.Fc
+.Bl -tag -width Ds
+.It display
+Specifies the connection to the X server.
+.El
+.Pp
+The
+.Fn XTestStopInput
+function tells the server to stop putting information about user input actions
+into events.
+The server will process user input actions normally (as it would
+if this extension were not in the server).
+.Pp
+The
+.Fn XTestStopInput
+function will return -1 if there is an error, and 0 otherwise.
+.Pp
+An error code of
+.Em BadAccess
+means that a request
+was made to stop input when input has never been started.
+.Pp
+.Sy XTestFakeInput
+.Pp
+.Ft int
+.Fo XTestFakeInput
+.Fa "Display *display"
+.Fa "char *action_list_addr"
+.Fa "int action_list_size"
+.Fa "int ack_flag"
+.Fc
+.Bl -tag -width Ds
+.It display
+Specifies the connection to the X server.
+.It action_list_addr
+Specifies the address of an list of input actions to be sent to the server.
+.It action_list_size
+Specifies the size (in bytes) of the list of input actions.
+It may be no larger than
+.Em XTestMAX_ACTION_LIST_SIZE
+bytes.
+.It ack_flag
+Specifies whether the server needs to send an event to indicate that its
+input action buffer is empty (one of
+.Em XTestFAKE_ACK_NOT_NEEDED
+or
+.Em XTestFAKE_ACK_REQUEST ) .
+.El
+.Pp
+The
+.Fn XTestFakeInput
+function tells the server to take the specified user input actions and process
+them as if the user had physically performed them.
+.Pp
+The server can only accept a limited number of input actions at one
+time.
+This limit can be determined by the
+.Fn XTestQueryInputSize
+function
+in this extension.
+.Pp
+The client should set
+.Em ack_flag
+to
+.Em XTestFAKE_ACK_NOT_NEEDED
+on calls to
+.Em XTestFakeInput
+that do not reach this limit.
+.Pp
+The client should set
+.Em ack_flag
+to
+.Em XTestFAKE_ACK_REQUEST
+on the call to
+.Em XTestFakeInput
+that reaches this limit.
+.Pp
+When the server sees an
+.Em ack_flag
+value of
+.Em XTestFAKE_ACK_REQUEST
+it finishes processing its input action buffer, then sends an event with
+type
+.Em XTestFakeAckType
+to the client.
+When the client reads this event, it knows that it is safe to resume
+sending input actions to the server.
+.Pp
+Since the actual value of the event type may vary depending on how many
+extensions are included with an X11 implementation,
+.Em XTestFakeAckType
+is a variable that is contained
+in the Xlib part of this extension.
+It may be referenced as follows:
+.Pp
+extern int XTestFakeAckType;
+.Pp
+There are four types of input actions that are passed from the client
+to the server.
+They are:
+.Bl -tag -width Ds
+.It key/button~state~change
+This type of input action contains the keycode of the key or button that
+is to change state;
+whether the key or button is to be up or down,
+and the time to delay before changing the state of the key or button.
+.It pointer~motions
+This type of input action contains information about the motion of the
+pointer when the pointer is to be moved a short distance,
+and the time to delay before moving the pointer.
+If the pointer is to be moved a long distance,
+the pointer jump input action must be used.
+.It pointer~jumps
+This type of input action contains information about the motion of the
+pointer when the pointer is to be moved a long distance,
+and the time to delay before moving the pointer.
+.It delays
+This type of input action is used when the delay between input actions is too
+large to be held in the other input actions.
+.El
+.Pp
+The
+.Fn XTestFakeInput
+function will return -1 if there is an error, and 0 otherwise.
+.Pp
+An error code of \efIBadAccess\efR means that another client has already
+sent user input actions to the server, and the server has not finished
+processing the user input actions.
+.Pp
+.Sy XTestQueryInputSize
+.Pp
+.Ft int
+.Fo XTestQueryInputSize
+.Fa "Display *display"
+.Fa "unsigned long size_return"
+.Fc
+.Bl -tag -width Ds
+.It display
+Specifies the connection to the X server.
+.It size_return
+Returns the number of input actions that the server's input action buffer can
+hold.
+.El
+.Pp
+The
+.Fn XTestQueryInputSize
+function asks the server to return the number of input actions that it can hold
+in its input action buffer in the unsigned long pointed to by \efIsize_return\efR.
+.Pp
+The
+.Fn XTestQueryInputSize
+function will return -1 if there is an error, and 0 otherwise.
+.Pp
+.Sy XTestReset
+.Pp
+.Ft int
+.Fo XTestReset
+.Fa "Display *display"
+.Fc
+.Bl -tag -width Ds
+.It display
+Specifies the connection to the X server.
+.El
+.Pp
+The
+.Fn XTestReset
+function tells the server to set everything having to do with this extension
+back to its initial state.
+After this call the server will act as if this
+extension were not installed until one of the extension functions is called by
+a client.
+This function is not normally needed, but is included in case a
+client wishes to clean up the server state, such as after a serious error.
+.Pp
+The
+.Fn XTestReset
+function will return -1 if there is an error, and 0 otherwise.
+.Sh AUTHORS
+.An -nosplit
+.Sy X Consortium Standard
+.Pp
+Version 1.0
+.An -split
+.An Larry Woestman ,
+Member of Technical Staff
+Hewlett Packard
+Copyright \(co 1993X Consortium
+.Ss Legal Notice
+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:
+.Pp
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+.Pp
+THE SOFTWARE IS PROVIDED \(lqAS IS\(rq, 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 X
+CONSORTIUM 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.
+.Pp
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings in
+this Software without prior written authorization from the X Consortium.
+.Pp
+X Window System is a trademark of The Open Group.