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