xtest1.xml revision a5602400
1a5602400Smrg<?xml version="1.0" encoding="UTF-8" ?> 2a5602400Smrg<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 3a5602400Smrg "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> 4a5602400Smrg 5a5602400Smrg 6a5602400Smrg<article id="xtest1"> 7a5602400Smrg 8a5602400Smrg<articleinfo> 9a5602400Smrg <title>X11 INPUT SYNTHESIS EXTENSION PROPOSAL</title> 10a5602400Smrg <subtitle>X Consortium Standard</subtitle> 11a5602400Smrg <releaseinfo>Version 1.0</releaseinfo> 12a5602400Smrg <authorgroup> 13a5602400Smrg <author> 14a5602400Smrg <firstname>Larry</firstname><surname>Woestman</surname> 15a5602400Smrg <affiliation><jobtitle>Member of Technical Staff</jobtitle> 16a5602400Smrg <orgname>Hewlett Packard</orgname></affiliation> 17a5602400Smrg </author> 18a5602400Smrg </authorgroup> 19a5602400Smrg <corpname>X Consortium Standard</corpname> 20a5602400Smrg <copyright><year>1993</year><holder>X Consortium</holder></copyright> 21a5602400Smrg <affiliation><orgname>X Consortium</orgname></affiliation> 22a5602400Smrg <productnumber>X Version 11, Release 7</productnumber> 23a5602400Smrg 24a5602400Smrg<abstract> 25a5602400Smrg<para> 26a5602400SmrgThis is a proposal for an extension to the X11 server and Xlib. 27a5602400Smrg</para> 28a5602400Smrg</abstract> 29a5602400Smrg 30a5602400Smrg</articleinfo> 31a5602400Smrg 32a5602400Smrg<sect1 id="introduction"> 33a5602400Smrg<title>Introduction</title> 34a5602400Smrg<para> 35a5602400SmrgThis is a proposal for an extension to the X11 server and Xlib. 36a5602400SmrgIt provides two capabilities: 37a5602400Smrg</para> 38a5602400Smrg 39a5602400Smrg<itemizedlist> 40a5602400Smrg <listitem> 41a5602400Smrg <para> 42a5602400SmrgIt allows a client to generate user input actions in the server without 43a5602400Smrgrequiring a user to be present. 44a5602400Smrg </para> 45a5602400Smrg </listitem> 46a5602400Smrg <listitem> 47a5602400Smrg <para> 48a5602400SmrgIt also allows a client to control the 49a5602400Smrghandling of user input actions by the server. 50a5602400Smrg </para> 51a5602400Smrg </listitem> 52a5602400Smrg</itemizedlist> 53a5602400Smrg 54a5602400Smrg<para> 55a5602400SmrgThe capability 56a5602400Smrgto allow a client to generate user input actions in the server 57a5602400Smrgwill be used by some of the X Testing Consortium Xlib tests. 58a5602400SmrgBoth capabilities will be used by the X Testing Consortium client exerciser 59a5602400Smrgprogram. 60a5602400SmrgThese capabilities may also be useful in other programs. 61a5602400Smrg</para> 62a5602400Smrg 63a5602400Smrg<para> 64a5602400SmrgThis extension requires modification to device-dependent code in the 65a5602400Smrgserver. Therefore it is not a 'portable' extension as defined by the 66a5602400SmrgX11 Server Extensions document. However, the majority of the code 67a5602400Smrgand functionality of this extension will be implementation-independent. 68a5602400Smrg</para> 69a5602400Smrg 70a5602400Smrg</sect1> 71a5602400Smrg 72a5602400Smrg<sect1 id="conventions_used_in_this_document"> 73a5602400Smrg<title>Conventions Used In This Document</title> 74a5602400Smrg 75a5602400Smrg<para> 76a5602400SmrgThe naming conventions used in the Xlib documentation are followed 77a5602400Smrgwith these additions: 78a5602400Smrg</para> 79a5602400Smrg 80a5602400Smrg<itemizedlist> 81a5602400Smrg <listitem> 82a5602400Smrg <para> 83a5602400SmrgThe names of all functions defined in this extension begin with 'XTest', 84a5602400Smrgwith the first letter of each additional word capitalized. 85a5602400Smrg </para> 86a5602400Smrg </listitem> 87a5602400Smrg <listitem> 88a5602400Smrg <para> 89a5602400SmrgThe names of the protocol request structures follow the Xlib convention 90a5602400Smrgof 'x<name>Req'. 91a5602400Smrg </para> 92a5602400Smrg </listitem> 93a5602400Smrg <listitem> 94a5602400Smrg <para> 95a5602400SmrgThe names of the protocol request minor type codes follow the Xlib convention 96a5602400Smrgof 'X_<name>'. 97a5602400Smrg </para> 98a5602400Smrg </listitem> 99a5602400Smrg <listitem> 100a5602400Smrg <para> 101a5602400SmrgThe names of all other constants defined in this extension begin with 'XTest', 102a5602400Smrgwith the rest of the name in upper case letters. 103a5602400Smrg </para> 104a5602400Smrg </listitem> 105a5602400Smrg <listitem> 106a5602400Smrg <para> 107a5602400SmrgAll constants and structures defined in this extension will have their 108a5602400Smrgvalues specified in the 'xtestext1.h' file (listed in section 5). 109a5602400Smrg </para> 110a5602400Smrg </listitem> 111a5602400Smrg</itemizedlist> 112a5602400Smrg 113a5602400Smrg</sect1> 114a5602400Smrg<sect1 id="definition_of_terms"> 115a5602400Smrg<title>Definition Of Terms</title> 116a5602400Smrg 117a5602400Smrg<sect2 id="input_actions"> 118a5602400Smrg<title>Input Actions</title> 119a5602400Smrg<para> 120a5602400SmrgInput actions are pointer movements, button presses and releases, 121a5602400Smrgand key presses and releases. They can be generated by a user or by a client 122a5602400Smrg(using functions in this extension). 123a5602400Smrg</para> 124a5602400Smrg</sect2> 125a5602400Smrg 126a5602400Smrg<sect2 id="user_input_actions"> 127a5602400Smrg<title>User Input Actions</title> 128a5602400Smrg<para> 129a5602400SmrgUser input actions are input actions that are generated by the user 130a5602400Smrgmoving a pointing device (typically a mouse), pressing and releasing buttons on 131a5602400Smrgthe pointing device, and pressing and releasing keys on the keyboard. 132a5602400Smrg</para> 133a5602400Smrg</sect2> 134a5602400Smrg 135a5602400Smrg</sect1> 136a5602400Smrg 137a5602400Smrg<sect1 id="what_does_this_extension_do"> 138a5602400Smrg<title>What Does This Extension Do?</title> 139a5602400Smrg<para> 140a5602400SmrgWithout this extension, user input actions are processed by the server, 141a5602400Smrgand are converted into normal X events that are sent to the 142a5602400Smrgappropriate client or clients. 143a5602400Smrg</para> 144a5602400Smrg 145a5602400Smrg<para> 146a5602400SmrgThis extension adds the following capabilities: 147a5602400Smrg</para> 148a5602400Smrg 149a5602400Smrg<itemizedlist> 150a5602400Smrg <listitem> 151a5602400Smrg <para> 152a5602400SmrgInput actions may be sent from a client to the server to be 153a5602400Smrgprocessed just as if the user had physically performed them. 154a5602400SmrgThe input actions are provided to the server in the form of X protocol 155a5602400Smrgrequests defined by this extension. 156a5602400SmrgThe information provided to the server includes what action should be 157a5602400Smrgperformed, and how long to delay before processing the action in the server. 158a5602400Smrg </para> 159a5602400Smrg </listitem> 160a5602400Smrg <listitem> 161a5602400Smrg <para> 162a5602400SmrgUser input actions may be diverted to a client before being processed by the 163a5602400Smrgserver. 164a5602400SmrgThe effect on the server is as if the user had performed no input action. 165a5602400SmrgThe user input actions are provided to the client in the form of X events 166a5602400Smrgdefined by this extension. 167a5602400SmrgThe information provided to the client includes what user input action 168a5602400Smrgoccurred and the delay between this user input action and the previous user 169a5602400Smrginput action. 170a5602400SmrgThe client may then do anything it wishes with this information. 171a5602400Smrg </para> 172a5602400Smrg </listitem> 173a5602400Smrg <listitem> 174a5602400Smrg <para> 175a5602400SmrgUser input actions may be copied, with one copy going to the server in the 176a5602400Smrgnormal way, and the other copy being sent to a client as described above. 177a5602400Smrg </para> 178a5602400Smrg </listitem> 179a5602400Smrg</itemizedlist> 180a5602400Smrg 181a5602400Smrg</sect1> 182a5602400Smrg<sect1 id="functions_in_this_extension"> 183a5602400Smrg<title>Functions In This Extension</title> 184a5602400Smrg 185a5602400Smrg<sect2 id="high_level_functions"> 186a5602400Smrg<title>High Level Functions</title> 187a5602400Smrg 188a5602400Smrg<para> 189a5602400SmrgThese functions are built on top of the low level functions described later. 190a5602400Smrg</para> 191a5602400Smrg 192a5602400Smrg<sect3 id="xtestmovepointer"> 193a5602400Smrg<title>XTestMovePointer</title> 194a5602400Smrg 195a5602400Smrg<funcsynopsis> 196a5602400Smrg<funcprototype> 197a5602400Smrg <funcdef>int <function>XTestMovePointer</function></funcdef> 198a5602400Smrg <paramdef>Display <parameter>*display</parameter></paramdef> 199a5602400Smrg <paramdef>int <parameter>device_id</parameter></paramdef> 200a5602400Smrg <paramdef>unsigned long <parameter>delay</parameter></paramdef> 201a5602400Smrg <paramdef>int <parameter>x</parameter></paramdef> 202a5602400Smrg <paramdef>int <parameter>y</parameter></paramdef> 203a5602400Smrg <paramdef>unsigned int <parameter>count</parameter></paramdef> 204a5602400Smrg</funcprototype> 205a5602400Smrg</funcsynopsis> 206a5602400Smrg 207a5602400Smrg<variablelist> 208a5602400Smrg <varlistentry> 209a5602400Smrg <term>display</term> 210a5602400Smrg <listitem> 211a5602400Smrg <para> 212a5602400SmrgSpecifies the connection to the X server. 213a5602400Smrg </para> 214a5602400Smrg </listitem> 215a5602400Smrg </varlistentry> 216a5602400Smrg <varlistentry> 217a5602400Smrg <term>device_id</term> 218a5602400Smrg <listitem> 219a5602400Smrg <para> 220a5602400SmrgSpecifies which pointer device was supposed to have caused the input action. 221a5602400SmrgThis is a provision for future support of multiple (distinguishable) pointer 222a5602400Smrgdevices, and should always be set to 0 for now. 223a5602400Smrg </para> 224a5602400Smrg </listitem> 225a5602400Smrg </varlistentry> 226a5602400Smrg <varlistentry> 227a5602400Smrg <term>delay</term> 228a5602400Smrg <listitem> 229a5602400Smrg <para> 230a5602400SmrgSpecifies the time (in milliseconds) to wait before each movement 231a5602400Smrgof the pointer. 232a5602400Smrg </para> 233a5602400Smrg </listitem> 234a5602400Smrg </varlistentry> 235a5602400Smrg <varlistentry> 236a5602400Smrg <term>x, y</term> 237a5602400Smrg <listitem> 238a5602400Smrg <para> 239a5602400SmrgSpecifies the x and y coordinates to move the pointer to relative to the 240a5602400Smrgroot window for the specified display. 241a5602400Smrg </para> 242a5602400Smrg </listitem> 243a5602400Smrg </varlistentry> 244a5602400Smrg <varlistentry> 245a5602400Smrg <term>count</term> 246a5602400Smrg <listitem> 247a5602400Smrg <para> 248a5602400SmrgSpecifies the number of 'delay, x, y' triplets contained in the 249a5602400Smrg<emphasis>delay</emphasis>, 250a5602400Smrg<emphasis>x</emphasis> and 251a5602400Smrg<emphasis>y</emphasis> arrays. 252a5602400Smrg </para> 253a5602400Smrg </listitem> 254a5602400Smrg </varlistentry> 255a5602400Smrg</variablelist> 256a5602400Smrg 257a5602400Smrg<para> 258a5602400SmrgThe 259a5602400Smrg<function>XTestMovePointer</function> 260a5602400Smrgfunction creates input actions to be sent to the the server. 261a5602400SmrgThe input actions will be accumulated in a request defined by this extension 262a5602400Smrguntil the request is full or the XTestFlush function is called. 263a5602400SmrgThey will then be sent to the server. 264a5602400SmrgWhen the input actions are sent to the server, the input actions will cause 265a5602400Smrgthe server to think that the pointer was moved to the specified position(s), 266a5602400Smrgwith the specified delay before each input action. 267a5602400Smrg</para> 268a5602400Smrg<para> 269a5602400SmrgThe 270a5602400Smrg<function>XTestMovePointer</function> 271a5602400Smrgfunction will return -1 if there is an error, and 0 otherwise. 272a5602400Smrg</para> 273a5602400Smrg</sect3> 274a5602400Smrg 275a5602400Smrg<sect3 id="xtestpressbutton"> 276a5602400Smrg<title>XTestPressButton</title> 277a5602400Smrg 278a5602400Smrg<funcsynopsis> 279a5602400Smrg<funcprototype> 280a5602400Smrg <funcdef>int <function>XTestPressButton</function></funcdef> 281a5602400Smrg <paramdef>Display <parameter>*display</parameter></paramdef> 282a5602400Smrg <paramdef>int <parameter>device_id</parameter></paramdef> 283a5602400Smrg <paramdef>unsigned long <parameter>delay</parameter></paramdef> 284a5602400Smrg <paramdef>unsigned int <parameter>button_number</parameter></paramdef> 285a5602400Smrg <paramdef>unsigned int <parameter>button_action</parameter></paramdef> 286a5602400Smrg</funcprototype> 287a5602400Smrg</funcsynopsis> 288a5602400Smrg 289a5602400Smrg 290a5602400Smrg<!-- .VL 15 --> 291a5602400Smrg<variablelist> 292a5602400Smrg <varlistentry> 293a5602400Smrg <term>display</term> 294a5602400Smrg <listitem> 295a5602400Smrg <para> 296a5602400SmrgSpecifies the connection to the X server. 297a5602400Smrg </para> 298a5602400Smrg </listitem> 299a5602400Smrg </varlistentry> 300a5602400Smrg <varlistentry> 301a5602400Smrg <term>device_id</term> 302a5602400Smrg <listitem> 303a5602400Smrg <para> 304a5602400SmrgSpecifies which button device was supposed to have caused the input action. 305a5602400SmrgThis is a provision for future support of multiple (distinguishable) button 306a5602400Smrgdevices, and should always be set to 0 for now. 307a5602400Smrg </para> 308a5602400Smrg </listitem> 309a5602400Smrg </varlistentry> 310a5602400Smrg <varlistentry> 311a5602400Smrg <term>delay</term> 312a5602400Smrg <listitem> 313a5602400Smrg <para> 314a5602400SmrgSpecifies the time (in milliseconds) to wait before the input action. 315a5602400Smrg </para> 316a5602400Smrg </listitem> 317a5602400Smrg </varlistentry> 318a5602400Smrg <varlistentry> 319a5602400Smrg <term>button_number</term> 320a5602400Smrg <listitem> 321a5602400Smrg <para> 322a5602400SmrgSpecifies which button is being acted upon. 323a5602400Smrg </para> 324a5602400Smrg </listitem> 325a5602400Smrg </varlistentry> 326a5602400Smrg <varlistentry> 327a5602400Smrg <term>button_action</term> 328a5602400Smrg <listitem> 329a5602400Smrg <para> 330a5602400SmrgSpecifies the action to be performed (one of 331a5602400Smrg<emphasis>XTestPRESS</emphasis>, 332a5602400Smrg<emphasis>XTestRELEASE</emphasis>, or 333a5602400Smrg<emphasis>XTestSTROKE</emphasis>). 334a5602400Smrg </para> 335a5602400Smrg </listitem> 336a5602400Smrg </varlistentry> 337a5602400Smrg</variablelist> 338a5602400Smrg 339a5602400Smrg<para> 340a5602400SmrgThe 341a5602400Smrg<function>XTestPressButton</function> 342a5602400Smrgfunction creates input actions to be sent to the the server. 343a5602400SmrgThe input actions will be accumulated in a request defined by this extension 344a5602400Smrguntil the request is full or the XTestFlush function is called. 345a5602400SmrgThey will then be sent to the server. 346a5602400SmrgWhen the input actions are sent to the server, the input actions will cause 347a5602400Smrgthe server to think that the specified button was moved as specified. 348a5602400Smrg</para> 349a5602400Smrg<para> 350a5602400SmrgThe 351a5602400Smrg<function>XTestPressButton</function> 352a5602400Smrgfunction will return -1 if there is an error, and 0 otherwise. 353a5602400Smrg</para> 354a5602400Smrg</sect3> 355a5602400Smrg 356a5602400Smrg<sect3 id="xtestpresskey"> 357a5602400Smrg<title>XTestPressKey</title> 358a5602400Smrg 359a5602400Smrg<funcsynopsis> 360a5602400Smrg<funcprototype> 361a5602400Smrg <funcdef>int <function>XTestPressKey</function></funcdef> 362a5602400Smrg <paramdef>Display <parameter>*display</parameter></paramdef> 363a5602400Smrg <paramdef>int <parameter>device_id</parameter></paramdef> 364a5602400Smrg <paramdef>unsigned long <parameter>delay</parameter></paramdef> 365a5602400Smrg <paramdef>unsigned int <parameter>keycode</parameter></paramdef> 366a5602400Smrg <paramdef>unsigned int <parameter>key_action</parameter></paramdef> 367a5602400Smrg</funcprototype> 368a5602400Smrg</funcsynopsis> 369a5602400Smrg 370a5602400Smrg<!-- .VL 12 --> 371a5602400Smrg<variablelist> 372a5602400Smrg <varlistentry> 373a5602400Smrg <term>display</term> 374a5602400Smrg <listitem> 375a5602400Smrg <para> 376a5602400SmrgSpecifies the connection to the X server. 377a5602400Smrg </para> 378a5602400Smrg </listitem> 379a5602400Smrg </varlistentry> 380a5602400Smrg <varlistentry> 381a5602400Smrg <term>device_id</term> 382a5602400Smrg <listitem> 383a5602400Smrg <para> 384a5602400SmrgSpecifies which keyboard device was supposed to have caused the input action. 385a5602400SmrgThis is a provision for future support of multiple (distinguishable) keyboard 386a5602400Smrgdevices, and should always be set to 0 for now. 387a5602400Smrg </para> 388a5602400Smrg </listitem> 389a5602400Smrg </varlistentry> 390a5602400Smrg <varlistentry> 391a5602400Smrg <term>delay</term> 392a5602400Smrg <listitem> 393a5602400Smrg <para> 394a5602400SmrgSpecifies the time (in milliseconds) to wait before the input action. 395a5602400Smrg </para> 396a5602400Smrg </listitem> 397a5602400Smrg </varlistentry> 398a5602400Smrg <varlistentry> 399a5602400Smrg <term>keycode</term> 400a5602400Smrg <listitem> 401a5602400Smrg <para> 402a5602400SmrgSpecifies which keycode is being acted upon. 403a5602400Smrg </para> 404a5602400Smrg </listitem> 405a5602400Smrg </varlistentry> 406a5602400Smrg <varlistentry> 407a5602400Smrg <term>key_action</term> 408a5602400Smrg <listitem> 409a5602400Smrg <para> 410a5602400SmrgSpecifies the action to be performed (one of 411a5602400Smrg<emphasis>XTestPRESS</emphasis>, 412a5602400Smrg<emphasis>XTestRELEASE</emphasis>, or 413a5602400Smrg<emphasis>XTestSTROKE</emphasis>). 414a5602400Smrg </para> 415a5602400Smrg </listitem> 416a5602400Smrg </varlistentry> 417a5602400Smrg</variablelist> 418a5602400Smrg 419a5602400Smrg 420a5602400Smrg<para> 421a5602400SmrgThe 422a5602400Smrg<function>XTestPressKey</function> 423a5602400Smrgfunction creates input actions to be sent to the the server. 424a5602400SmrgThe input actions will be accumulated in a request defined by this extension 425a5602400Smrguntil the request is full or the XTestFlush function is called. 426a5602400SmrgThey will then be sent to the server. 427a5602400SmrgWhen the input actions are sent to the server, the input actions will cause 428a5602400Smrgthe server to think that the specified key on the keyboard was moved as 429a5602400Smrgspecified. 430a5602400Smrg</para> 431a5602400Smrg 432a5602400Smrg<para> 433a5602400SmrgThe 434a5602400Smrg<function>XTestPressKey</function> 435a5602400Smrgfunction will return -1 if there is an error, and 0 otherwise. 436a5602400Smrg</para> 437a5602400Smrg 438a5602400Smrg</sect3> 439a5602400Smrg<sect3 id="xtestflush"> 440a5602400Smrg<title>XTestFlush</title> 441a5602400Smrg 442a5602400Smrg<funcsynopsis> 443a5602400Smrg<funcprototype> 444a5602400Smrg <funcdef>int <function>XTestFlush</function></funcdef> 445a5602400Smrg <paramdef>Display <parameter>*display</parameter></paramdef> 446a5602400Smrg</funcprototype> 447a5602400Smrg</funcsynopsis> 448a5602400Smrg 449a5602400Smrg<!-- .VL 9 --> 450a5602400Smrg<variablelist> 451a5602400Smrg <varlistentry> 452a5602400Smrg <term>display</term> 453a5602400Smrg <listitem> 454a5602400Smrg <para> 455a5602400SmrgSpecifies the connection to the X server. 456a5602400Smrg </para> 457a5602400Smrg </listitem> 458a5602400Smrg </varlistentry> 459a5602400Smrg</variablelist> 460a5602400Smrg 461a5602400Smrg<para> 462a5602400SmrgThe 463a5602400Smrg<function>XTestFlush</function> 464a5602400Smrgwill send any remaining input actions to the server. 465a5602400Smrg</para> 466a5602400Smrg 467a5602400Smrg<para> 468a5602400SmrgThe 469a5602400Smrg<function>XTestFlush</function> 470a5602400Smrgfunction will return -1 if there is an error, and 0 otherwise. 471a5602400Smrg</para> 472a5602400Smrg 473a5602400Smrg</sect3> 474a5602400Smrg</sect2> 475a5602400Smrg 476a5602400Smrg<!-- .H 2 Low~Level~Functions --> 477a5602400Smrg<sect2 id="low_level_functions"> 478a5602400Smrg<title>Low Level Functions</title> 479a5602400Smrg 480a5602400Smrg<!-- .H 3 XTestGetInput --> 481a5602400Smrg<sect3 id="xtestgetinput"> 482a5602400Smrg<title>XTestGetInput</title> 483a5602400Smrg 484a5602400Smrg<funcsynopsis> 485a5602400Smrg<funcprototype> 486a5602400Smrg <funcdef>int <function>XTestGetInput</function></funcdef> 487a5602400Smrg <paramdef>Display <parameter>*display</parameter></paramdef> 488a5602400Smrg <paramdef>int <parameter>action_handling</parameter></paramdef> 489a5602400Smrg</funcprototype> 490a5602400Smrg</funcsynopsis> 491a5602400Smrg 492a5602400Smrg 493a5602400Smrg<variablelist> 494a5602400Smrg <varlistentry> 495a5602400Smrg <term>display</term> 496a5602400Smrg <listitem> 497a5602400Smrg <para> 498a5602400SmrgSpecifies the connection to the X server. 499a5602400Smrg </para> 500a5602400Smrg </listitem> 501a5602400Smrg </varlistentry> 502a5602400Smrg <varlistentry> 503a5602400Smrg <term>action_handling</term> 504a5602400Smrg <listitem> 505a5602400Smrg <para> 506a5602400SmrgSpecifies to the server what to do with the user input actions. (one of 507a5602400Smrg0, <emphasis>XTestPACKED_MOTION</emphasis> or 508a5602400Smrg<emphasis>XTestPACKED_ACTIONS</emphasis>; optionally 'or'ed 509a5602400Smrgwith <emphasis>XTestEXCLUSIVE</emphasis>). 510a5602400Smrg </para> 511a5602400Smrg </listitem> 512a5602400Smrg </varlistentry> 513a5602400Smrg</variablelist> 514a5602400Smrg 515a5602400Smrg 516a5602400Smrg<para> 517a5602400SmrgThe 518a5602400Smrg<function>XTestGetInput</function> 519a5602400Smrgfunction tells the server to begin putting information about user input actions 520a5602400Smrginto events to be sent to the client that called this function. These events 521a5602400Smrgcan be read via the Xlib <function>XNextEvent</function>fR function. 522a5602400Smrg</para> 523a5602400Smrg 524a5602400Smrg<para> 525a5602400SmrgThe server assigns an event type of 526a5602400Smrg<emphasis>XTestInputActionType</emphasis> to these events 527a5602400Smrgto distinguish them from other events. 528a5602400SmrgSince the actual value of the event type may vary depending on how many 529a5602400Smrgextensions are included with an X11 implementation, 530a5602400Smrg<emphasis>XTestInputActionType</emphasis> is a variable that will be 531a5602400Smrgcontained in the Xlib 532a5602400Smrgpart of this extension. It may be referenced as follows: 533a5602400Smrg</para> 534a5602400Smrg 535a5602400Smrg<para> 536a5602400Smrgextern int XTestInputActionType; 537a5602400Smrg</para> 538a5602400Smrg 539a5602400Smrg<itemizedlist> 540a5602400Smrg <listitem> 541a5602400Smrg <para> 542a5602400SmrgAn <emphasis>action_handling</emphasis> value of 0 causes the server 543a5602400Smrgto send one user input action in each 544a5602400Smrg<emphasis>XTestInputActionType</emphasis> event. 545a5602400SmrgThis can sometimes cause performance problems. 546a5602400Smrg </para> 547a5602400Smrg </listitem> 548a5602400Smrg <listitem> 549a5602400Smrg <para> 550a5602400SmrgAn <emphasis>action_handling</emphasis> value of 551a5602400Smrg<emphasis>XTestPACKED_ACTIONS</emphasis> causes the server 552a5602400Smrgto pack as many user input actions as possible into a 553a5602400Smrg<emphasis>XTestInputActionType</emphasis> event. 554a5602400SmrgThis is needed if user input actions are happening rapidly (such as 555a5602400Smrgwhen the user moves the pointer) to keep performance at a reasonable level. 556a5602400Smrg </para> 557a5602400Smrg </listitem> 558a5602400Smrg <listitem> 559a5602400Smrg <para> 560a5602400SmrgAn <emphasis>action_handling</emphasis> value of 561a5602400Smrg<emphasis>XTestPACKED_MOTION</emphasis> causes the server 562a5602400Smrgto pack only user input actions associated with moving the pointer. 563a5602400SmrgThis allows the 564a5602400Smrgclient to receive button and key motions as they happen without waiting for the 565a5602400Smrgevent to fill up, while still keeping performance at a reasonable level. 566a5602400Smrg </para> 567a5602400Smrg </listitem> 568a5602400Smrg <listitem> 569a5602400Smrg <para> 570a5602400SmrgAn <emphasis>action_handling</emphasis> value with 571a5602400Smrg<emphasis>XTestEXCLUSIVE</emphasis> 'or'ed in 572a5602400Smrgcauses the server to send user input actions only to the client. 573a5602400SmrgThe effect on the server is as if the user had performed no input actions. 574a5602400Smrg </para> 575a5602400Smrg </listitem> 576a5602400Smrg <listitem> 577a5602400Smrg <para> 578a5602400SmrgAn <emphasis>action_handling</emphasis> value without 579a5602400Smrg<emphasis>XTestEXCLUSIVE</emphasis> 580a5602400Smrgcauses the server to copy user input actions, sending one copy to the 581a5602400Smrgclient, and handling the other copy normally (as it would if this extension 582a5602400Smrgwere not installed). 583a5602400Smrg </para> 584a5602400Smrg </listitem> 585a5602400Smrg</itemizedlist> 586a5602400Smrg 587a5602400Smrg<para> 588a5602400SmrgThere are four types of input actions that are passed from the server 589a5602400Smrgto the client. They are: 590a5602400Smrg</para> 591a5602400Smrg 592a5602400Smrg<variablelist> 593a5602400Smrg <varlistentry> 594a5602400Smrg <term>key/button~state~change</term> 595a5602400Smrg <listitem> 596a5602400Smrg <para> 597a5602400SmrgThis type of input action contains the keycode of the key or button that 598a5602400Smrgchanged state; 599a5602400Smrgwhether the key or button is up or down, 600a5602400Smrgand the time delay between this input action and the previous input action. 601a5602400Smrg </para> 602a5602400Smrg </listitem> 603a5602400Smrg </varlistentry> 604a5602400Smrg <varlistentry> 605a5602400Smrg <term>pointer~motions</term> 606a5602400Smrg <listitem> 607a5602400Smrg <para> 608a5602400SmrgThis type of input action contains information about the motion of the 609a5602400Smrgpointer when the pointer has only moved a short distance. 610a5602400SmrgIf the pointer has moved a long distance, 611a5602400Smrgthe pointer jump input action is used. 612a5602400Smrg </para> 613a5602400Smrg </listitem> 614a5602400Smrg </varlistentry> 615a5602400Smrg <varlistentry> 616a5602400Smrg <term>pointer~jumps</term> 617a5602400Smrg <listitem> 618a5602400Smrg <para> 619a5602400SmrgThis type of input action contains information about the motion of the 620a5602400Smrgpointer when the pointer has moved a long distance. 621a5602400Smrg </para> 622a5602400Smrg </listitem> 623a5602400Smrg </varlistentry> 624a5602400Smrg <varlistentry> 625a5602400Smrg <term>delays</term> 626a5602400Smrg <listitem> 627a5602400Smrg <para> 628a5602400SmrgThis type of input action is used when the delay between input actions is too 629a5602400Smrglarge to be held in the other input actions. 630a5602400Smrg </para> 631a5602400Smrg </listitem> 632a5602400Smrg </varlistentry> 633a5602400Smrg</variablelist> 634a5602400Smrg 635a5602400Smrg<para> 636a5602400SmrgThe 637a5602400Smrg<function>XTestGetInput</function> 638a5602400Smrgfunction will return -1 if there is an error, and 0 otherwise. 639a5602400Smrg</para> 640a5602400Smrg<para> 641a5602400SmrgAn error code of <emphasis>BadAccess</emphasis> means that another client 642a5602400Smrghas already requested that user input actions be sent to it. 643a5602400Smrg</para> 644a5602400Smrg 645a5602400Smrg</sect3> 646a5602400Smrg 647a5602400Smrg<!-- .H 3 XTestStopInput --> 648a5602400Smrg<sect3 id="xteststopinput"> 649a5602400Smrg<title>XTestStopInput</title> 650a5602400Smrg 651a5602400Smrg<funcsynopsis> 652a5602400Smrg<funcprototype> 653a5602400Smrg <funcdef>int <function>XTestStopInput</function></funcdef> 654a5602400Smrg <paramdef>Display <parameter>*display</parameter></paramdef> 655a5602400Smrg</funcprototype> 656a5602400Smrg</funcsynopsis> 657a5602400Smrg 658a5602400Smrg 659a5602400Smrg 660a5602400Smrg<variablelist> 661a5602400Smrg <varlistentry> 662a5602400Smrg <term>display</term> 663a5602400Smrg <listitem> 664a5602400Smrg <para> 665a5602400SmrgSpecifies the connection to the X server. 666a5602400Smrg </para> 667a5602400Smrg </listitem> 668a5602400Smrg </varlistentry> 669a5602400Smrg</variablelist> 670a5602400Smrg 671a5602400Smrg<para> 672a5602400SmrgThe 673a5602400Smrg<function>XTestStopInput</function> 674a5602400Smrgfunction tells the server to stop putting information about user input actions 675a5602400Smrginto events. 676a5602400SmrgThe server will process user input actions normally (as it would 677a5602400Smrgif this extension were not in the server). 678a5602400Smrg</para> 679a5602400Smrg 680a5602400Smrg<para> 681a5602400SmrgThe 682a5602400Smrg<function>XTestStopInput</function> 683a5602400Smrgfunction will return -1 if there is an error, and 0 otherwise. 684a5602400Smrg</para> 685a5602400Smrg 686a5602400Smrg<para> 687a5602400SmrgAn error code of <emphasis>BadAccess</emphasis> means that a request 688a5602400Smrgwas made to stop input when input has never been started. 689a5602400Smrg</para> 690a5602400Smrg 691a5602400Smrg</sect3> 692a5602400Smrg 693a5602400Smrg<!-- .H 3 XTestFakeInput --> 694a5602400Smrg<sect3 id="xtestfakeinput"> 695a5602400Smrg<title>XTestFakeInput</title> 696a5602400Smrg 697a5602400Smrg<funcsynopsis> 698a5602400Smrg<funcprototype> 699a5602400Smrg <funcdef>int <function>XTestFakeInput</function></funcdef> 700a5602400Smrg <paramdef>Display <parameter>*display</parameter></paramdef> 701a5602400Smrg <paramdef>char <parameter>*action_list_addr</parameter></paramdef> 702a5602400Smrg <paramdef>int <parameter>action_list_size</parameter></paramdef> 703a5602400Smrg <paramdef>int <parameter>ack_flag</parameter></paramdef> 704a5602400Smrg</funcprototype> 705a5602400Smrg</funcsynopsis> 706a5602400Smrg 707a5602400Smrg 708a5602400Smrg<!-- .VL 18 --> 709a5602400Smrg 710a5602400Smrg<variablelist> 711a5602400Smrg <varlistentry> 712a5602400Smrg <term>display</term> 713a5602400Smrg <listitem> 714a5602400Smrg <para> 715a5602400SmrgSpecifies the connection to the X server. 716a5602400Smrg </para> 717a5602400Smrg </listitem> 718a5602400Smrg </varlistentry> 719a5602400Smrg <varlistentry> 720a5602400Smrg <term>action_list_addr</term> 721a5602400Smrg <listitem> 722a5602400Smrg <para> 723a5602400SmrgSpecifies the address of an list of input actions to be sent to the server. 724a5602400Smrg </para> 725a5602400Smrg </listitem> 726a5602400Smrg </varlistentry> 727a5602400Smrg <varlistentry> 728a5602400Smrg <term>action_list_size</term> 729a5602400Smrg <listitem> 730a5602400Smrg <para> 731a5602400SmrgSpecifies the size (in bytes) of the list of input actions. 732a5602400SmrgIt may be no larger than <emphasis>XTestMAX_ACTION_LIST_SIZE</emphasis> bytes. 733a5602400Smrg </para> 734a5602400Smrg </listitem> 735a5602400Smrg </varlistentry> 736a5602400Smrg <varlistentry> 737a5602400Smrg <term>ack_flag</term> 738a5602400Smrg <listitem> 739a5602400Smrg <para> 740a5602400SmrgSpecifies whether the server needs to send an event to indicate that its 741a5602400Smrginput action buffer is empty (one of 742a5602400Smrg<emphasis>XTestFAKE_ACK_NOT_NEEDED</emphasis> or 743a5602400Smrg<emphasis>XTestFAKE_ACK_REQUEST</emphasis>). 744a5602400Smrg </para> 745a5602400Smrg </listitem> 746a5602400Smrg </varlistentry> 747a5602400Smrg</variablelist> 748a5602400Smrg 749a5602400Smrg<para> 750a5602400SmrgThe 751a5602400Smrg<function>XTestFakeInput</function> 752a5602400Smrgfunction tells the server to take the specified user input actions and process 753a5602400Smrgthem as if the user had physically performed them. 754a5602400Smrg</para> 755a5602400Smrg 756a5602400Smrg<para> 757a5602400SmrgThe server can only accept a limited number of input actions at one 758a5602400Smrgtime. This limit can be determined by the 759a5602400Smrg<function>XTestQueryInputSize</function> function 760a5602400Smrgin this extension. 761a5602400Smrg</para> 762a5602400Smrg 763a5602400Smrg<para> 764a5602400SmrgThe client should set <emphasis>ack_flag</emphasis> to 765a5602400Smrg<emphasis>XTestFAKE_ACK_NOT_NEEDED</emphasis> 766a5602400Smrgon calls to <emphasis>XTestFakeInput</emphasis> that do not reach this limit. 767a5602400Smrg</para> 768a5602400Smrg 769a5602400Smrg<para> 770a5602400SmrgThe client should set <emphasis>ack_flag</emphasis> to 771a5602400Smrg<emphasis>XTestFAKE_ACK_REQUEST</emphasis> 772a5602400Smrgon the call to <emphasis>XTestFakeInput</emphasis> that reaches this limit. 773a5602400Smrg</para> 774a5602400Smrg 775a5602400Smrg<para> 776a5602400SmrgWhen the server sees an <emphasis>ack_flag</emphasis> value of 777a5602400Smrg<emphasis>XTestFAKE_ACK_REQUEST</emphasis> 778a5602400Smrgit finishes processing its input action buffer, then sends an event with 779a5602400Smrgtype <emphasis>XTestFakeAckType</emphasis> to the client. 780a5602400SmrgWhen the client reads this event, it knows that it is safe to resume 781a5602400Smrgsending input actions to the server. 782a5602400Smrg</para> 783a5602400Smrg 784a5602400Smrg<para> 785a5602400SmrgSince the actual value of the event type may vary depending on how many 786a5602400Smrgextensions are included with an X11 implementation, 787a5602400Smrg<emphasis>XTestFakeAckType</emphasis> is a variable that is contained 788a5602400Smrgin the Xlib part of this extension. It may be referenced as follows: 789a5602400Smrg</para> 790a5602400Smrg 791a5602400Smrg<para> 792a5602400Smrgextern int XTestFakeAckType; 793a5602400Smrg</para> 794a5602400Smrg 795a5602400Smrg<para> 796a5602400SmrgThere are four types of input actions that are passed from the client 797a5602400Smrgto the server. They are: 798a5602400Smrg</para> 799a5602400Smrg 800a5602400Smrg<variablelist> 801a5602400Smrg <varlistentry> 802a5602400Smrg <term>key/button~state~change</term> 803a5602400Smrg <listitem> 804a5602400Smrg <para> 805a5602400SmrgThis type of input action contains the keycode of the key or button that 806a5602400Smrgis to change state; 807a5602400Smrgwhether the key or button is to be up or down, 808a5602400Smrgand the time to delay before changing the state of the key or button. 809a5602400Smrg </para> 810a5602400Smrg </listitem> 811a5602400Smrg </varlistentry> 812a5602400Smrg <varlistentry> 813a5602400Smrg <term>pointer~motions</term> 814a5602400Smrg <listitem> 815a5602400Smrg <para> 816a5602400SmrgThis type of input action contains information about the motion of the 817a5602400Smrgpointer when the pointer is to be moved a short distance, 818a5602400Smrgand the time to delay before moving the pointer. 819a5602400SmrgIf the pointer is to be moved a long distance, 820a5602400Smrgthe pointer jump input action must be used. 821a5602400Smrg </para> 822a5602400Smrg </listitem> 823a5602400Smrg </varlistentry> 824a5602400Smrg <varlistentry> 825a5602400Smrg <term>pointer~jumps</term> 826a5602400Smrg <listitem> 827a5602400Smrg <para> 828a5602400SmrgThis type of input action contains information about the motion of the 829a5602400Smrgpointer when the pointer is to be moved a long distance, 830a5602400Smrgand the time to delay before moving the pointer. 831a5602400Smrg </para> 832a5602400Smrg </listitem> 833a5602400Smrg </varlistentry> 834a5602400Smrg <varlistentry> 835a5602400Smrg <term>delays</term> 836a5602400Smrg <listitem> 837a5602400Smrg <para> 838a5602400SmrgThis type of input action is used when the delay between input actions is too 839a5602400Smrglarge to be held in the other input actions. 840a5602400Smrg </para> 841a5602400Smrg </listitem> 842a5602400Smrg </varlistentry> 843a5602400Smrg</variablelist> 844a5602400Smrg 845a5602400Smrg 846a5602400Smrg<para> 847a5602400SmrgThe 848a5602400Smrg<function>XTestFakeInput</function> 849a5602400Smrgfunction will return -1 if there is an error, and 0 otherwise. 850a5602400Smrg</para> 851a5602400Smrg 852a5602400Smrg<para> 853a5602400SmrgAn error code of \fIBadAccess\fR means that another client has already 854a5602400Smrgsent user input actions to the server, and the server has not finished 855a5602400Smrgprocessing the user input actions. 856a5602400Smrg</para> 857a5602400Smrg 858a5602400Smrg</sect3> 859a5602400Smrg 860a5602400Smrg<!-- .H 3 XTestQueryInputSize --> 861a5602400Smrg<sect3 id="xtestqueryinputsize"> 862a5602400Smrg<title>XTestQueryInputSize</title> 863a5602400Smrg 864a5602400Smrg<funcsynopsis> 865a5602400Smrg<funcprototype> 866a5602400Smrg <funcdef>int <function>XTestQueryInputSize</function></funcdef> 867a5602400Smrg <paramdef>Display <parameter>*display</parameter></paramdef> 868a5602400Smrg <paramdef>unsigned long <parameter>size_return</parameter></paramdef> 869a5602400Smrg</funcprototype> 870a5602400Smrg</funcsynopsis> 871a5602400Smrg 872a5602400Smrg 873a5602400Smrg<variablelist> 874a5602400Smrg <varlistentry> 875a5602400Smrg <term>display</term> 876a5602400Smrg <listitem> 877a5602400Smrg <para> 878a5602400SmrgSpecifies the connection to the X server. 879a5602400Smrg </para> 880a5602400Smrg </listitem> 881a5602400Smrg </varlistentry> 882a5602400Smrg <varlistentry> 883a5602400Smrg <term>size_return</term> 884a5602400Smrg <listitem> 885a5602400Smrg <para> 886a5602400SmrgReturns the number of input actions that the server's input action buffer can 887a5602400Smrghold. 888a5602400Smrg </para> 889a5602400Smrg </listitem> 890a5602400Smrg </varlistentry> 891a5602400Smrg</variablelist> 892a5602400Smrg 893a5602400Smrg<para> 894a5602400SmrgThe 895a5602400Smrg<function>XTestQueryInputSize</function> 896a5602400Smrgfunction asks the server to return the number of input actions that it can hold 897a5602400Smrgin its input action buffer in the unsigned long pointed to by \fIsize_return\fR. 898a5602400Smrg</para> 899a5602400Smrg<para> 900a5602400SmrgThe 901a5602400Smrg<function>XTestQueryInputSize</function> 902a5602400Smrgfunction will return -1 if there is an error, and 0 otherwise. 903a5602400Smrg</para> 904a5602400Smrg</sect3> 905a5602400Smrg 906a5602400Smrg<!-- .H 3 XTestReset --> 907a5602400Smrg<sect3 id="xtestreset"> 908a5602400Smrg<title>XTestReset</title> 909a5602400Smrg 910a5602400Smrg<funcsynopsis> 911a5602400Smrg<funcprototype> 912a5602400Smrg <funcdef>int <function>XTestReset</function></funcdef> 913a5602400Smrg <paramdef>Display <parameter>*display</parameter></paramdef> 914a5602400Smrg</funcprototype> 915a5602400Smrg</funcsynopsis> 916a5602400Smrg 917a5602400Smrg 918a5602400Smrg<variablelist> 919a5602400Smrg <varlistentry> 920a5602400Smrg <term>display</term> 921a5602400Smrg <listitem> 922a5602400Smrg <para> 923a5602400SmrgSpecifies the connection to the X server. 924a5602400Smrg </para> 925a5602400Smrg </listitem> 926a5602400Smrg </varlistentry> 927a5602400Smrg</variablelist> 928a5602400Smrg 929a5602400Smrg<para> 930a5602400SmrgThe 931a5602400Smrg<function>XTestReset</function> 932a5602400Smrgfunction tells the server to set everything having to do with this extension 933a5602400Smrgback to its initial state. After this call the server will act as if this 934a5602400Smrgextension were not installed until one of the extension functions is called by 935a5602400Smrga client. This function is not normally needed, but is included in case a 936a5602400Smrgclient wishes to clean up the server state, such as after a serious error. 937a5602400Smrg</para> 938a5602400Smrg 939a5602400Smrg<para> 940a5602400SmrgThe 941a5602400Smrg<function>XTestReset</function> 942a5602400Smrgfunction will return -1 if there is an error, and 0 otherwise. 943a5602400Smrg</para> 944a5602400Smrg 945a5602400Smrg</sect3> 946a5602400Smrg</sect2> 947a5602400Smrg</sect1> 948a5602400Smrg 949a5602400Smrg<!-- .H 1 'xtestext1.h'~File~Listing --> 950a5602400Smrg<!-- .so xtestext1.h --> 951a5602400Smrg<!-- .TC 1 1 4 --> 952a5602400Smrg</article> 953