XTEST
NAMESYNOPSIS
DESCRIPTION
RETURN VALUES
AUTHOR
NAME
XTestQueryExtension, XTestCompareCursorWithWindow, XTestCompareCurrentCursorWithWindow, XTestFakeKeyEvent, XTestFakeButtonEvent, XTestFakeMotionEvent, XTestFakeRelativeMotionEvent, XTestGrabControl, XTestSetGContextOfGC, XTestSetVisualIDOfVisual, XTestDiscard − XTest extension functions
SYNOPSIS
cc [ flag ... ] file ... −lXtst [ library ... ]
#include <X11/extensions/XTest.h>
Bool XTestQueryExtension(display, event_base_return, error_base_return, major_version_return, minor_version_return); |
Display
*display;
int *event_base_return;
int *error_base_return;
int *major_version_return;
int *minor_version_return;
Bool XTestCompareCursorWithWindow(display, window, cursor); |
Display
*display;
Window window;
Cursor cursor;
Bool XTestCompareCurrentCursorWithWindow(display, window); |
Display
*display;
Window window;
int XTestFakeKeyEvent(display, keycode, is_press, delay); |
Display
*display;
unsigned int keycode;
Bool is_press;
unsigned long delay;
int XTestFakeButtonEvent(display, button, is_press, delay); |
Display
*display;
unsigned int button;
Bool is_press;
unsigned long delay;
int XTestFakeMotionEvent(display, screen_number, x, y, delay); |
Display
*display;
int screen_number;
int x, y;
unsigned long delay;
int XTestFakeRelativeMotionEvent(display, screen_number, x, y, delay); |
Display
*display;
int screen_number;
int x, y;
unsigned long delay;
int XTestGrabControl(display, impervious); |
Display
*display;
Bool impervious;
void XTestSetGContextOfGC(gc, gid); |
GC gc;
GContext gid;
void XTestSetVisualIDOfVisual(visual, visualid); |
Visual
*visual;
VisualID visualid;
Status XTestDiscard(display); |
Display *display;
DESCRIPTION
This extension is a minimal set of client and server extensions required to completely test the X11 server with no user intervention. This extension is not intended to support general journaling and playback of user actions.
The functions
provided by this extension fall into two groups:
Client Operations
These routines manipulate otherwise hidden client−side behavior. The actual implementation will depend on the details of the actual language binding and what degree of request buffering, GContext caching, and so on, is provided. In the C binding, routines are provided to access the internals of two opaque data structures — GCs and Visuals — and to discard any requests pending within the output buffer of a connection. The exact details can be expected to differ for other language bindings.
Server Requests
The first of these requests is similar to that provided in most extensions: it allows a client to specify a major and minor version number to the server and for the server to respond with major and minor versions of its own. The remaining two requests allow the following:
• |
Access to an otherwise write−only server resource: the cursor associated with a given window | ||
• |
Perhaps most importantly, limited synthesis of input device events, almost as if a cooperative user had moved the pointing device or pressed a key or button. |
All XTEST extension functions and procedures, and all manifest constants and macros, will start with the string XTest. All operations are classified as server/client (Server) or client−only (Client).
XTestQueryExtension returns True if the specified display supports the XTEST extension, else False. If the extension is supported, *event_base would be set to the event number for the first event for this extension and *error_base would be set to the error number for the first error for this extension. As no errors or events are defined for this version of the extension, the values returned here are not defined (nor useful). If the extension is supported, *major_version and *minor_version are set to the major and minor version numbers of the extension supported by the display. Otherwise, none of the arguments are set.
If the extension is supported, XTestCompareCursorWithWindow performs a comparison of the cursor whose ID is specified by cursor (which may be None) with the cursor of the window specified by window returning True if they are the same and False otherwise. If the extension is not supported, then the request is ignored and zero is returned.
If the extension is supported, XTestCompareCurrentCursorWithWindow performs a comparison of the current cursor with the cursor of the specified window returning True if they are the same and False otherwise. If the extension is not supported, then the request is ignored and zero is returned.
If the extension is supported, XTestFakeKeyEvent requests the server to simulate either a KeyPress (if is_press is True) or a KeyRelease (if is_press is False) of the key with the specified keycode; otherwise, the request is ignored.
If the extension is supported, the simulated event will not be processed until delay milliseconds after the request is received (if delay is CurrentTime, then this is interpreted as no delay at all). No other requests from this client will be processed until this delay, if any, has expired and subsequent processing of the simulated event has been completed.
If the extension is supported, XTestFakeButtonEvent requests the server to simulate either a ButtonPress (if is_press is True) or a ButtonRelease (if is_press is False) of the logical button numbered by the specified button; otherwise, the request is ignored.
If the extension is supported, the simulated event will not be processed until delay milliseconds after the request is received (if delay is CurrentTime, then this is interpreted as no delay at all). No other requests from this client will be processed until this delay, if any, has expired and subsequent processing of the simulated event has been completed.
If the extension is supported, XTestFakeMotionEvent requests the server to simulate a movement of the pointer to the specified position (x, y) on the root window of screen_number; otherwise, the request is ignored. If screen_number is −1, the current screen (that the pointer is on) is used.
If the extension is supported, the simulated event will not be processed until delay milliseconds after the request is received (if delay is CurrentTime, then this is interpreted as no delay at all). No other requests from this client will be processed until this delay, if any, has expired and subsequent processing of the simulated event has been completed.
If the extension is supported, XTestFakeRelativeMotionEvent requests the server to simulate a movement of the pointer by the specified offsets (x, y) relative to the current pointer position on screen_number; otherwise, the request is ignored. If screen_number is −1, the current screen (that the pointer is on) is used.
If the extension is supported, the simulated event will not be processed until delay milliseconds after the request is received (if delay is CurrentTime, then this is interpreted as no delay at all). No other requests from this client will be processed until this delay, if any, has expired and subsequent processing of the simulated event has been completed.
If impervious is True, then the executing client becomes impervious to server grabs. If impervious is False, then the executing client returns to the normal state of being susceptible to server grabs.
XTestSetGContextOfGC sets the GContext within the opaque datatype referenced by gc to be that specified by gid.
XTestSetVisualIDOfVisual sets the VisualID within the opaque datatype referenced by visual to be that specified by visualid.
XTestDiscard discards any requests within the output buffer for the specified display. It returns True if any requests were discarded; otherwise, it returns False.
RETURN VALUES
All routines that have return type Status will return nonzero for success and zero for failure. Even if the XTEST extension is supported, the server may withdraw such facilities arbitrarily; in which case they will subsequently return zero.
AUTHOR
Kieron Drake.
More Linux Commands
manpages/xdr_authunix_parms.3.html
xdr_authunix_parms(3) - library routines for remote procedur
These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the s
manpages/gluNurbsSurface.3gl.html
gluNurbsSurface(3gl) - define the shape of a NURBS surface
Use gluNurbsSurface within a NURBS (Non-Uniform Rational B-Spline) surface definition to describe the shape of a NURBS surface (before any trimming). To mark th
manpages/sane-gt68xx.5.html
sane-gt68xx(5) - SANE backend for GT-68XX based USB flatbed
The sane-gt68xx library implements a SANE (Scanner Access Now Easy) backend that provides access to USB flatbed scanners based on the Grandtech GT-6801 and GT-6
manpages/systemd-hostnamed.service.8.html
systemd-hostnamed.service(8) Host name bus mechanism........
systemd-hostnamed is a system service that may be used as a mechanism to change the systems hostname. systemd-hostnamed is automatically activated on request an
manpages/menu_request_name.3menu.html
menu_request_name(3menu) - handle printable menu request nam
The function menu_request_name returns the printable name of a menu request code. The function menu_request_by_name searches in the name-table for a request wit
manpages/XSelectionRequestEvent.3.html
XSelectionRequestEvent(3) - SelectionRequest event structure
The structure for SelectionRequest events contains: typedef struct { int type; /* SelectionRequest */ unsigned long serial; /* # of last request processed by se
manpages/iwgetid.8.html
iwgetid(8) - Report ESSID, NWID or AP/Cell Address of wirele
iwgetid is used to find out the NWID, ESSID or AP/Cell Address of the wireless network that is currently used. The information reported is the same as the one s
manpages/CPU_AND_S.3.html
CPU_AND_S(3) - macros for manipulating CPU sets (Man Page)
The cpu_set_t data structure represents a set of CPUs. CPU sets are used by sched_setaffinity(2) and similar interfaces. The cpu_set_t data type is implemented
manpages/curl_formadd.3.html
curl_formadd(3) - add a section to a multipart/formdata HTTP
curl_formadd() is used to append sections when building a multipart/formdata HTTP POST (sometimes referred to as RFC2388-style posts). Append one section at a t
manpages/gnutls_certificate_get_issuer.3.html
gnutls_certificate_get_issuer(3) - API function (Man Page)
This function will return the issuer of a given certificate. RETURNS On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. SINCE 3.0.0
manpages/asn1_parser2array.3.html
asn1_parser2array(3) - function that generates a C structure
Function that generates a C structure from an ASN1 file. Creates a file containing a C vector to use to manage the definitions included in inputFileName file. I
manpages/nexttoward.3.html
nexttoward(3) - floating-point number manipulation (ManPage)
The nextafter(), nextafterf(), and nextafterl() functions return the next representable floating-point value following x in the direction of y. If y is less tha
