XTestCompareCursorWithWindow(3)


HOME

XTEST

NAME
SYNOPSIS
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/Tcl_RegisterChannel.3.html
Tcl_RegisterChannel(3) - buffered I/O facilities using chann
The Tcl channel mechanism provides a device-independent and platform-independent mechanism for performing buffered input and output operations on a variety of f

manpages/curl_free.3.html
curl_free(3) - reclaim memory that has been obtained through
curl_free reclaims memory that has been obtained through a libcurl call. Use curl_free() instead of free() to avoid anomalies that can result from differences i

manpages/get_current_dir_name.3.html
get_current_dir_name(3) - Get current working directory.....
These functions return a null-terminated string containing an absolute pathname that is the current working directory of the calling process. The pathname is re

manpages/DisplayPlanes.3.html
DisplayPlanes(3) - Display macros and functions (Man Page)
The AllPlanes macro returns a value with all bits set to 1 suitable for use in a plane argument to a procedure. The BlackPixel macro returns the black pixel val

manpages/Tcl_ConvertToType.3.html
Tcl_ConvertToType(3) - manipulate Tcl object types (ManPage)
The procedures in this man page manage Tcl object types. They are used to register new object types, look up types, and force conversions from one type to anoth

manpages/getppid.2.html
getppid(2) - get process identification - Linux manual page
getpid() returns the process ID of the calling process. (This is often used by routines that generate unique temporary filenames.) getppid() returns the process

manpages/glVertex4fv.3gl.html
glVertex4fv(3gl) - specify a vertex - Linux manual page.....
glVertex commands are used within glBegin/glEnd pairs to specify point, line, and polygon vertices. The current color, normal, and texture coordinates are assoc

manpages/grub2-mkimage.1.html
grub2-mkimage(1) make a bootable image of GRUB (Man Page)...
Make a bootable image of GRUB. -c, --config=FILE embed FILE as an early config -C, --compression=(xz|none|auto) choose the compression to use for core image -d,

manpages/sched_yield.2.html
sched_yield(2) - yield the processor - Linux manual page....
sched_yield() causes the calling thread to relinquish the CPU. The thread is moved to the end of the queue for its static priority and a new thread gets to run.

manpages/ttk_treeview.n.html
ttk_treeview(n) hierarchical multicolumn data display widget
The ttk::treeview widget displays a hierarchical collection of items. Each item has a textual label, an optional image, and an optional list of data values. The

manpages/XML::Parser::Style::Tree.3pm.html
XML::Parser::Style::Tree(3pm) - (unknown subject) (ManPage)
This module implements XML::Parsers Tree style parser. When parsing a document, parse() will return a parse tree for the document. Each node in the tree takes t

manpages/plasmoidviewer.1.html
plasmoidviewer(1) - Run Plasma widgets in their own window
plasmoidviewer is a graphical tool allowing developers to test Plasma applets. Only installed applets will be found. kbuildsycoca4 may need to be run for newly-





We can't live, work or learn in freedom unless the software we use is free.