XTest.xml revision a253d6ae
1a253d6aeSmrg<?xml version="1.0" encoding="UTF-8"?> 2a253d6aeSmrg<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 3a253d6aeSmrg "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> 4a253d6aeSmrg<!-- lifted from troff+man by doclifter --> 5a253d6aeSmrg<refentry id='XTest.man'> 6a253d6aeSmrg<!-- 7a253d6aeSmrgCopyright © 1992 by UniSoft Group Ltd. 8a253d6aeSmrgPermission to use, copy, modify, and distribute this documentation for 9a253d6aeSmrgany purpose and without fee is hereby granted, provided that the above 10a253d6aeSmrgcopyright notice and this permission notice appear in all copies. 11a253d6aeSmrgUniSoft makes no representations about the suitability for any purpose of 12a253d6aeSmrgthe information in this document. This documentation is provided "as is" 13a253d6aeSmrgwithout express or implied warranty. 14a253d6aeSmrg 15a253d6aeSmrgCopyright © 1992, 1994 X Consortium 16a253d6aeSmrg 17a253d6aeSmrgPermission is hereby granted, free of charge, to any person obtaining a 18a253d6aeSmrgcopy of this software and associated documentation files (the "Software"), 19a253d6aeSmrgto deal in the Software without restriction, including without limitation 20a253d6aeSmrgthe rights to use, copy, modify, merge, publish, distribute, sublicense, 21a253d6aeSmrgand/or sell copies of the Software, and to permit persons to whom the 22a253d6aeSmrgSoftware is furnished to do so, subject to the following conditions: 23a253d6aeSmrg 24a253d6aeSmrgThe above copyright notice and this permission notice shall be included in 25a253d6aeSmrgall copies or substantial portions of the Software. 26a253d6aeSmrg 27a253d6aeSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 28a253d6aeSmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 29a253d6aeSmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 30a253d6aeSmrgTHE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 31a253d6aeSmrgWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 32a253d6aeSmrgOR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 33a253d6aeSmrgSOFTWARE. 34a253d6aeSmrg 35a253d6aeSmrgExcept as contained in this notice, the name of the X Consortium shall not 36a253d6aeSmrgbe used in advertising or otherwise to promote the sale, use or other 37a253d6aeSmrgdealings in this Software without prior written authorization from the 38a253d6aeSmrgX Consortium. 39a253d6aeSmrg --> 40a253d6aeSmrg 41a253d6aeSmrg<!-- edited for DP edits and code consistency w/ core protocol/xlib 4/2/96 --> 42a253d6aeSmrg<!-- Converted from xorg-docs/specs/Xext/xtestlib.ms 6/6/07 --> 43a253d6aeSmrg<!-- $Xorg: xtestlib.ms,v 1.3 2000/08/17 19:42:37 cpqbld Exp $ --> 44a253d6aeSmrg <refentryinfo> 45a253d6aeSmrg <productname>__vendorversion__</productname> 46a253d6aeSmrg <pubdate>6 June 2007</pubdate> 47a253d6aeSmrg <author><firstname>Kieron</firstname><surname>Drake</surname> 48a253d6aeSmrg <affiliation><orgname>UniSoft Ltd.</orgname></affiliation> 49a253d6aeSmrg </author> 50a253d6aeSmrg </refentryinfo> 51a253d6aeSmrg<refmeta> 52a253d6aeSmrg<refentrytitle>XTest</refentrytitle> 53a253d6aeSmrg<manvolnum>__libmansuffix__</manvolnum> 54a253d6aeSmrg<refmiscinfo class='source'>__xorgversion__</refmiscinfo> 55a253d6aeSmrg<refmiscinfo class='manual'>XTST FUNCTIONS</refmiscinfo> 56a253d6aeSmrg</refmeta> 57a253d6aeSmrg<refnamediv id='name'> 58a253d6aeSmrg<refname>XTestQueryExtension</refname> 59a253d6aeSmrg<refname>XTestCompareCursorWithWindow</refname> 60a253d6aeSmrg<refname>XTestCompareCurrentCursorWithWindow</refname> 61a253d6aeSmrg<refname>XTestFakeKeyEvent</refname> 62a253d6aeSmrg<refname>XTestFakeButtonEvent</refname> 63a253d6aeSmrg<refname>XTestFakeMotionEvent</refname> 64a253d6aeSmrg<refname>XTestFakeRelativeMotionEvent</refname> 65a253d6aeSmrg<refname>XTestGrabControl</refname> 66a253d6aeSmrg<refname>XTestSetGContextOfGC</refname> 67a253d6aeSmrg<refname>XTestSetVisualIDOfVisual</refname> 68a253d6aeSmrg<refname>XTestDiscard</refname> 69a253d6aeSmrg<refpurpose>XTest extension functions</refpurpose> 70a253d6aeSmrg</refnamediv> 71a253d6aeSmrg<!-- body begins here --> 72a253d6aeSmrg<refsynopsisdiv id='synopsis'> 73a253d6aeSmrg<funcsynopsis> 74a253d6aeSmrg<funcsynopsisinfo> 75a253d6aeSmrgcc [ flag ... ] file ... -lXtst [ library ... ] 76a253d6aeSmrg</funcsynopsisinfo> 77a253d6aeSmrg<funcsynopsisinfo> 78a253d6aeSmrg#include <X11/extensions/XTest.h> 79a253d6aeSmrg</funcsynopsisinfo> 80a253d6aeSmrg<funcprototype> 81a253d6aeSmrg<funcdef><function>Bool</function> XTestQueryExtension</funcdef> 82a253d6aeSmrg<paramdef><parameter>display</parameter></paramdef> 83a253d6aeSmrg<paramdef><parameter>event_base</parameter></paramdef> 84a253d6aeSmrg<paramdef><parameter>error_base</parameter></paramdef> 85a253d6aeSmrg<paramdef><parameter>major_version</parameter></paramdef> 86a253d6aeSmrg<paramdef><parameter>minor_version</parameter></paramdef> 87a253d6aeSmrg</funcprototype> 88a253d6aeSmrg<funcsynopsisinfo> 89a253d6aeSmrg Display *display; 90a253d6aeSmrg int *event_base; 91a253d6aeSmrg int *error_base; 92a253d6aeSmrg int *major_version; 93a253d6aeSmrg int *minor_version; 94a253d6aeSmrg</funcsynopsisinfo> 95a253d6aeSmrg<funcprototype> 96a253d6aeSmrg<funcdef><function>Bool</function> XTestCompareCursorWithWindow</funcdef> 97a253d6aeSmrg<paramdef><parameter>display</parameter></paramdef> 98a253d6aeSmrg<paramdef><parameter>window</parameter></paramdef> 99a253d6aeSmrg<paramdef><parameter>cursor</parameter></paramdef> 100a253d6aeSmrg</funcprototype> 101a253d6aeSmrg<funcsynopsisinfo> 102a253d6aeSmrg Display *display; 103a253d6aeSmrg Window window; 104a253d6aeSmrg Cursor cursor; 105a253d6aeSmrg</funcsynopsisinfo> 106a253d6aeSmrg<funcprototype> 107a253d6aeSmrg<funcdef><function>Bool</function> XTestCompareCurrentCursorWithWindow</funcdef> 108a253d6aeSmrg<paramdef><parameter>display</parameter></paramdef> 109a253d6aeSmrg<paramdef><parameter>window</parameter></paramdef> 110a253d6aeSmrg</funcprototype> 111a253d6aeSmrg<funcsynopsisinfo> 112a253d6aeSmrg Display *display; 113a253d6aeSmrg Window window; 114a253d6aeSmrg</funcsynopsisinfo> 115a253d6aeSmrg<funcprototype> 116a253d6aeSmrg<funcdef>int <function>XTestFakeKeyEvent</function></funcdef> 117a253d6aeSmrg<paramdef><parameter>display</parameter></paramdef> 118a253d6aeSmrg<paramdef><parameter>keycode</parameter></paramdef> 119a253d6aeSmrg<paramdef><parameter>is_press</parameter></paramdef> 120a253d6aeSmrg<paramdef><parameter>delay</parameter></paramdef> 121a253d6aeSmrg</funcprototype> 122a253d6aeSmrg<funcsynopsisinfo> 123a253d6aeSmrg Display *display; 124a253d6aeSmrg unsigned int keycode; 125a253d6aeSmrg Bool is_press; 126a253d6aeSmrg unsigned long delay; 127a253d6aeSmrg</funcsynopsisinfo> 128a253d6aeSmrg<funcprototype> 129a253d6aeSmrg<funcdef>int <function>XTestFakeButtonEvent</function></funcdef> 130a253d6aeSmrg<paramdef><parameter>display</parameter></paramdef> 131a253d6aeSmrg<paramdef><parameter>button</parameter></paramdef> 132a253d6aeSmrg<paramdef><parameter>is_press</parameter></paramdef> 133a253d6aeSmrg<paramdef><parameter>delay</parameter></paramdef> 134a253d6aeSmrg</funcprototype> 135a253d6aeSmrg<funcsynopsisinfo> 136a253d6aeSmrg Display *display; 137a253d6aeSmrg unsigned int button; 138a253d6aeSmrg Bool is_press; 139a253d6aeSmrg unsigned long delay; 140a253d6aeSmrg</funcsynopsisinfo> 141a253d6aeSmrg<funcprototype> 142a253d6aeSmrg<funcdef>int <function>XTestFakeMotionEvent</function></funcdef> 143a253d6aeSmrg<paramdef><parameter>display</parameter></paramdef> 144a253d6aeSmrg<paramdef><parameter>screen_number</parameter></paramdef> 145a253d6aeSmrg<paramdef><parameter>x</parameter></paramdef> 146a253d6aeSmrg<paramdef><parameter>y</parameter></paramdef> 147a253d6aeSmrg<paramdef><parameter>delay</parameter></paramdef> 148a253d6aeSmrg</funcprototype> 149a253d6aeSmrg<funcsynopsisinfo> 150a253d6aeSmrg Display *display; 151a253d6aeSmrg int screen_number; 152a253d6aeSmrg int x, y; 153a253d6aeSmrg unsigned long delay; 154a253d6aeSmrg</funcsynopsisinfo> 155a253d6aeSmrg<funcprototype> 156a253d6aeSmrg<funcdef>int <function>XTestFakeRelativeMotionEvent</function></funcdef> 157a253d6aeSmrg<paramdef><parameter>display</parameter></paramdef> 158a253d6aeSmrg<paramdef><parameter>screen_number</parameter></paramdef> 159a253d6aeSmrg<paramdef><parameter>x</parameter></paramdef> 160a253d6aeSmrg<paramdef><parameter>y</parameter></paramdef> 161a253d6aeSmrg<paramdef><parameter>delay</parameter></paramdef> 162a253d6aeSmrg</funcprototype> 163a253d6aeSmrg<funcsynopsisinfo> 164a253d6aeSmrg Display *display; 165a253d6aeSmrg int screen_number; 166a253d6aeSmrg int x, y; 167a253d6aeSmrg unsigned long delay; 168a253d6aeSmrg</funcsynopsisinfo> 169a253d6aeSmrg<funcprototype> 170a253d6aeSmrg<funcdef>int <function>XTestGrabControl</function></funcdef> 171a253d6aeSmrg<paramdef><parameter>display</parameter></paramdef> 172a253d6aeSmrg<paramdef><parameter>impervious</parameter></paramdef> 173a253d6aeSmrg</funcprototype> 174a253d6aeSmrg<funcsynopsisinfo> 175a253d6aeSmrg Display *display; 176a253d6aeSmrg Bool impervious; 177a253d6aeSmrg</funcsynopsisinfo> 178a253d6aeSmrg<funcprototype> 179a253d6aeSmrg<funcdef>void <function>XTestSetGContextOfGC</function></funcdef> 180a253d6aeSmrg<paramdef><parameter>gc</parameter></paramdef> 181a253d6aeSmrg<paramdef><parameter>gid</parameter></paramdef> 182a253d6aeSmrg</funcprototype> 183a253d6aeSmrg<funcsynopsisinfo> 184a253d6aeSmrg GC gc; 185a253d6aeSmrg GContext gid; 186a253d6aeSmrg</funcsynopsisinfo> 187a253d6aeSmrg<funcprototype> 188a253d6aeSmrg<funcdef>void <function>XTestSetVisualIDOfVisual</function></funcdef> 189a253d6aeSmrg<paramdef><parameter>visual</parameter></paramdef> 190a253d6aeSmrg<paramdef><parameter>visualid</parameter></paramdef> 191a253d6aeSmrg</funcprototype> 192a253d6aeSmrg<funcsynopsisinfo> 193a253d6aeSmrg Visual *visual; 194a253d6aeSmrg VisualID visualid; 195a253d6aeSmrg</funcsynopsisinfo> 196a253d6aeSmrg<funcprototype> 197a253d6aeSmrg<funcdef><function>Status</function> XTestDiscard</funcdef> 198a253d6aeSmrg<paramdef><parameter>display</parameter></paramdef> 199a253d6aeSmrg</funcprototype> 200a253d6aeSmrg<funcsynopsisinfo> 201a253d6aeSmrg Display *display; 202a253d6aeSmrg</funcsynopsisinfo> 203a253d6aeSmrg</funcsynopsis> 204a253d6aeSmrg</refsynopsisdiv> 205a253d6aeSmrg 206a253d6aeSmrg 207a253d6aeSmrg<refsect1 id='description'><title>DESCRIPTION</title> 208a253d6aeSmrg<para>This extension is a minimal set of client and server extensions 209a253d6aeSmrgrequired to completely test the X11 server with no user intervention. 210a253d6aeSmrgThis extension is not intended to support general journaling and 211a253d6aeSmrgplayback of user actions.</para> 212a253d6aeSmrg 213a253d6aeSmrg<para>The functions provided by this extension fall into two groups:</para> 214a253d6aeSmrg<variablelist remap='IP'> 215a253d6aeSmrg <varlistentry> 216a253d6aeSmrg <term><emphasis remap='B'>Client Operations</emphasis></term> 217a253d6aeSmrg <listitem> 218a253d6aeSmrg<para>These routines manipulate otherwise hidden client-side behavior. The 219a253d6aeSmrgactual implementation will depend on the details of the actual language 220a253d6aeSmrgbinding and what degree of request buffering, GContext caching, and so on, is 221a253d6aeSmrgprovided. In the C binding, routines are provided 222a253d6aeSmrgto access the internals of two opaque data structures 223a253d6aeSmrg— <structname>GC</structname>s 224a253d6aeSmrgand 225a253d6aeSmrg<structname>Visual</structname>s — 226a253d6aeSmrgand to discard any requests pending within the 227a253d6aeSmrgoutput buffer of a connection. The exact details can be expected to differ for 228a253d6aeSmrgother language bindings.</para> 229a253d6aeSmrg </listitem> 230a253d6aeSmrg </varlistentry> 231a253d6aeSmrg <varlistentry> 232a253d6aeSmrg <term><emphasis remap='B'>Server Requests</emphasis></term> 233a253d6aeSmrg <listitem> 234a253d6aeSmrg<para>The first of these requests is similar to that provided in most 235a253d6aeSmrgextensions: it allows a client to specify a major and minor version 236a253d6aeSmrgnumber to the server and for the server to respond with major and minor 237a253d6aeSmrgversions of its own. The remaining two requests allow the following:</para> 238a253d6aeSmrg <itemizedlist> 239a253d6aeSmrg <listitem> 240a253d6aeSmrg<para>Access to an otherwise <emphasis>write-only</emphasis> server resource: 241a253d6aeSmrgthe cursor associated with a given window</para> 242a253d6aeSmrg </listitem> 243a253d6aeSmrg <listitem> 244a253d6aeSmrg<para>Perhaps most importantly, limited synthesis of input device events, 245a253d6aeSmrgalmost as if a cooperative user had moved the pointing device 246a253d6aeSmrgor pressed a key or button.</para> 247a253d6aeSmrg </listitem> 248a253d6aeSmrg </itemizedlist> 249a253d6aeSmrg </listitem> 250a253d6aeSmrg </varlistentry> 251a253d6aeSmrg</variablelist> 252a253d6aeSmrg 253a253d6aeSmrg<para>All XTEST extension functions and procedures, and all manifest 254a253d6aeSmrgconstants and macros, will start with the string <emphasis>XTest</emphasis>. 255a253d6aeSmrgAll operations are classified as 256a253d6aeSmrgserver/client (Server) or client-only (Client).</para> 257a253d6aeSmrg 258a253d6aeSmrg<para><function>XTestQueryExtension</function> 259a253d6aeSmrgreturns 260a253d6aeSmrg<returnvalue>True</returnvalue> 261a253d6aeSmrgif the specified display supports the XTEST extension, else 262a253d6aeSmrg<returnvalue>False</returnvalue>. 263a253d6aeSmrgIf the extension is supported, *event_base would be set to the event number for 264a253d6aeSmrgthe first event for this extension and 265a253d6aeSmrg*error_base would be set to the error number for the first error for 266a253d6aeSmrgthis extension. As no errors or events are defined for this version of the extension, 267a253d6aeSmrgthe values returned here are not defined (nor useful). 268a253d6aeSmrgIf the extension is supported, *major_version and *minor_version are set to 269a253d6aeSmrgthe major and minor version numbers of the extension supported by the 270a253d6aeSmrgdisplay. Otherwise, none of the arguments are set.</para> 271a253d6aeSmrg 272a253d6aeSmrg 273a253d6aeSmrg<para>If the extension is supported, 274a253d6aeSmrg<function>XTestCompareCursorWithWindow</function> 275a253d6aeSmrgperforms a comparison of the cursor 276a253d6aeSmrgwhose ID is specified by cursor (which may be 277a253d6aeSmrg<emphasis remap='B'>None</emphasis>) 278a253d6aeSmrgwith the cursor of the window specified by window returning 279a253d6aeSmrg<returnvalue>True</returnvalue> 280a253d6aeSmrgif they are the same and 281a253d6aeSmrg<returnvalue>False</returnvalue> 282a253d6aeSmrgotherwise. 283a253d6aeSmrgIf the extension is not supported, then the request is ignored and 284a253d6aeSmrgzero is returned.</para> 285a253d6aeSmrg 286a253d6aeSmrg 287a253d6aeSmrg<para>If the extension is supported, 288a253d6aeSmrg<function>XTestCompareCurrentCursorWithWindow</function> 289a253d6aeSmrgperforms a comparison of the current cursor 290a253d6aeSmrgwith the cursor of the specified window returning 291a253d6aeSmrg<returnvalue>True</returnvalue> 292a253d6aeSmrgif they are the same and 293a253d6aeSmrg<returnvalue>False</returnvalue> 294a253d6aeSmrgotherwise. 295a253d6aeSmrgIf the extension is not supported, then the request is ignored and 296a253d6aeSmrgzero is returned.</para> 297a253d6aeSmrg 298a253d6aeSmrg 299a253d6aeSmrg<para>If the extension is supported, 300a253d6aeSmrg<function>XTestFakeKeyEvent</function> 301a253d6aeSmrgrequests the server to simulate either a 302a253d6aeSmrg<emphasis remap='B'>KeyPress</emphasis> 303a253d6aeSmrg(if is_press is 304a253d6aeSmrg<returnvalue>True</returnvalue>) 305a253d6aeSmrgor a 306a253d6aeSmrg<emphasis remap='B'>KeyRelease</emphasis> 307a253d6aeSmrg(if is_press is 308a253d6aeSmrg<returnvalue>False</returnvalue>) 309a253d6aeSmrgof the key with the specified keycode; 310a253d6aeSmrgotherwise, the request is ignored.</para> 311a253d6aeSmrg 312a253d6aeSmrg<para>If the extension is supported, 313a253d6aeSmrgthe simulated event will not be processed until delay milliseconds 314a253d6aeSmrgafter the request is received (if delay is 315a253d6aeSmrg<emphasis remap='B'>CurrentTime</emphasis>, 316a253d6aeSmrgthen this is interpreted as no delay at all). No other requests from 317a253d6aeSmrgthis client will be processed until this delay, if any, has expired 318a253d6aeSmrgand subsequent processing of the simulated event has been completed.</para> 319a253d6aeSmrg 320a253d6aeSmrg 321a253d6aeSmrg<para>If the extension is supported, 322a253d6aeSmrg<function>XTestFakeButtonEvent</function> 323a253d6aeSmrgrequests the server to simulate either 324a253d6aeSmrga 325a253d6aeSmrg<emphasis remap='B'>ButtonPress</emphasis> 326a253d6aeSmrg(if is_press is 327a253d6aeSmrg<returnvalue>True</returnvalue>) 328a253d6aeSmrgor a 329a253d6aeSmrg<emphasis remap='B'>ButtonRelease</emphasis> 330a253d6aeSmrg(if is_press is 331a253d6aeSmrg<returnvalue>False</returnvalue>) 332a253d6aeSmrgof the logical button numbered by the specified button; 333a253d6aeSmrgotherwise, the request is ignored.</para> 334a253d6aeSmrg 335a253d6aeSmrg<para>If the extension is supported, 336a253d6aeSmrgthe simulated event will not be processed until delay milliseconds 337a253d6aeSmrgafter the request is received (if delay is 338a253d6aeSmrg<emphasis remap='B'>CurrentTime</emphasis>, 339a253d6aeSmrgthen this is interpreted as no delay at all). No other requests from 340a253d6aeSmrgthis client will be processed until this delay, if any, has expired 341a253d6aeSmrgand subsequent processing of the simulated event has been completed.</para> 342a253d6aeSmrg 343a253d6aeSmrg 344a253d6aeSmrg<para>If the extension is supported, 345a253d6aeSmrg<function>XTestFakeMotionEvent</function> 346a253d6aeSmrgrequests the server to simulate 347a253d6aeSmrga movement of the pointer to the specified position (x, y) on the 348a253d6aeSmrgroot window of screen_number; 349a253d6aeSmrgotherwise, the request is ignored. If screen_number is -1, the 350a253d6aeSmrgcurrent screen (that the pointer is on) is used.</para> 351a253d6aeSmrg 352a253d6aeSmrg<para>If the extension is supported, 353a253d6aeSmrgthe simulated event will not be processed until delay milliseconds 354a253d6aeSmrgafter the request is received (if delay is 355a253d6aeSmrg<emphasis remap='B'>CurrentTime</emphasis>, 356a253d6aeSmrgthen this is interpreted as no delay at all). No other requests from 357a253d6aeSmrgthis client will be processed until this delay, if any, has expired 358a253d6aeSmrgand subsequent processing of the simulated event has been completed.</para> 359a253d6aeSmrg 360a253d6aeSmrg 361a253d6aeSmrg<para>If the extension is supported, 362a253d6aeSmrg<function>XTestFakeRelativeMotionEvent</function> 363a253d6aeSmrgrequests the server to simulate 364a253d6aeSmrga movement of the pointer by the specified offsets (x, y) relative 365a253d6aeSmrgto the current pointer position on screen_number; 366a253d6aeSmrgotherwise, the request is ignored. If screen_number is -1, the 367a253d6aeSmrgcurrent screen (that the pointer is on) is used.</para> 368a253d6aeSmrg 369a253d6aeSmrg<para>If the extension is supported, 370a253d6aeSmrgthe simulated event will not be processed until delay milliseconds 371a253d6aeSmrgafter the request is received (if delay is 372a253d6aeSmrg<emphasis remap='B'>CurrentTime</emphasis>, 373a253d6aeSmrgthen this is interpreted as no delay at all). No other requests from 374a253d6aeSmrgthis client will be processed until this delay, if any, has expired 375a253d6aeSmrgand subsequent processing of the simulated event has been completed.</para> 376a253d6aeSmrg 377a253d6aeSmrg 378a253d6aeSmrg 379a253d6aeSmrg<para>If impervious is 380a253d6aeSmrg<returnvalue>True</returnvalue>, 381a253d6aeSmrgthen the executing client becomes impervious to server grabs. 382a253d6aeSmrgIf impervious is 383a253d6aeSmrg<returnvalue>False</returnvalue>, 384a253d6aeSmrgthen the executing client returns to the normal state of being 385a253d6aeSmrgsusceptible to server grabs.</para> 386a253d6aeSmrg 387a253d6aeSmrg 388a253d6aeSmrg<para><function>XTestSetGContextOfGC</function> 389a253d6aeSmrgsets the GContext within the opaque datatype referenced by gc to 390a253d6aeSmrgbe that specified by gid.</para> 391a253d6aeSmrg 392a253d6aeSmrg 393a253d6aeSmrg<para><function>XTestSetVisualIDOfVisual</function> 394a253d6aeSmrgsets the VisualID within the opaque datatype referenced by visual to 395a253d6aeSmrgbe that specified by visualid.</para> 396a253d6aeSmrg 397a253d6aeSmrg 398a253d6aeSmrg<para><function>XTestDiscard</function> 399a253d6aeSmrgdiscards any requests within the output buffer for the specified display. 400a253d6aeSmrgIt returns 401a253d6aeSmrg<returnvalue>True</returnvalue> 402a253d6aeSmrgif any requests were discarded; otherwise, it returns 403a253d6aeSmrg<returnvalue>False</returnvalue>.</para> 404a253d6aeSmrg 405a253d6aeSmrg</refsect1> 406a253d6aeSmrg 407a253d6aeSmrg<refsect1 id='return_values'><title>RETURN VALUES</title> 408a253d6aeSmrg<para>All routines that have return type Status will return nonzero for 409a253d6aeSmrgsuccess and zero for failure. Even if the XTEST extension is 410a253d6aeSmrgsupported, the server may withdraw such facilities arbitrarily; in which case 411a253d6aeSmrgthey will subsequently return zero.</para> 412a253d6aeSmrg</refsect1> 413a253d6aeSmrg</refentry> 414a253d6aeSmrg 415