4 * X11 Input Synthesis Extension include file
8 Copyright 1986, 1987, 1988, 1998 The Open Group
10 Permission to use, copy, modify, distribute, and sell this software and its
11 documentation for any purpose is hereby granted without fee, provided that
12 the above copyright notice appear in all copies and that both that
13 copyright notice and this permission notice appear in supporting
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 Except as contained in this notice, the name of The Open Group shall not be
27 used in advertising or otherwise to promote the sale, use or other dealings
28 in this Software without prior written authorization from The Open Group.
31 Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation
33 Permission to use, copy, modify, and distribute this
34 software and its documentation for any purpose and without
35 fee is hereby granted, provided that the above copyright
36 notice appear in all copies and that both that copyright
37 notice and this permission notice appear in supporting
38 documentation, and that the name of Hewlett-Packard not be used in
39 advertising or publicity pertaining to distribution of the
40 software without specific, written prior permission.
42 Hewlett-Packard makes no representations about the
43 suitability of this software for any purpose. It is provided
44 "as is" without express or implied warranty.
46 This software is not subject to any license of the American
47 Telephone and Telegraph Company or of the Regents of the
48 University of California.
52 #ifndef _XTESTEXT1PROTO_H
53 #define _XTESTEXT1PROTO_H 1
55 #include <X11/extensions/xtestext1const.h>
58 * the typedefs for CARD8, CARD16, and CARD32 are defined in Xmd.h
62 * XTest request type values
64 * used in the XTest extension protocol requests
66 #define X_TestFakeInput 1
67 #define X_TestGetInput 2
68 #define X_TestStopInput 3
70 #define X_TestQueryInputSize 5
73 * This defines the maximum size of a list of input actions
74 * to be sent to the server. It should always be a multiple of
75 * 4 so that the entire xTestFakeInputReq structure size is a
80 CARD8 reqType; /* always XTestReqCode */
81 CARD8 XTestReqType; /* always X_TestFakeInput */
82 CARD16 length B16; /* 2 + XTestMAX_ACTION_LIST_SIZE/4 */
84 CARD8 action_list[XTestMAX_ACTION_LIST_SIZE];
86 #define sz_xTestFakeInputReq (XTestMAX_ACTION_LIST_SIZE + 8)
89 CARD8 reqType; /* always XTestReqCode */
90 CARD8 XTestReqType; /* always X_TestGetInput */
91 CARD16 length B16; /* 2 */
94 #define sz_xTestGetInputReq 8
97 CARD8 reqType; /* always XTestReqCode */
98 CARD8 XTestReqType; /* always X_TestStopInput */
99 CARD16 length B32; /* 1 */
101 #define sz_xTestStopInputReq 4
104 CARD8 reqType; /* always XTestReqCode */
105 CARD8 XTestReqType; /* always X_TestReset */
106 CARD16 length B16; /* 1 */
108 #define sz_xTestResetReq 4
111 CARD8 reqType; /* always XTestReqCode */
112 CARD8 XTestReqType; /* always X_TestQueryInputSize */
113 CARD16 length B16; /* 1 */
114 } xTestQueryInputSizeReq;
115 #define sz_xTestQueryInputSizeReq 4
118 * This is the definition of the reply for the xTestQueryInputSize
119 * request. It should remain the same minimum size as other replies
123 CARD8 type; /* always X_Reply */
125 CARD16 sequenceNumber B16;
126 CARD32 length B32; /* always 0 */
127 CARD32 size_return B32;
133 } xTestQueryInputSizeReply;
136 * This is the definition for the input action wire event structure.
137 * This event is sent to the client when the server has one or
138 * more user input actions to report to the client. It must
139 * remain the same size as all other wire events (32 bytes).
142 CARD8 type; /* always XTestInputActionType */
144 CARD16 sequenceNumber B16;
145 CARD8 actions[XTestACTIONS_SIZE];
146 } xTestInputActionEvent;
149 * This is the definition for the xTestFakeAck wire event structure.
150 * This event is sent to the client when the server has completely
151 * processed its input action buffer, and is ready for more.
152 * It must remain the same size as all other wire events (32 bytes).
155 CARD8 type; /* always XTestFakeAckType */
157 CARD16 sequenceNumber B16;
168 * These are the definitions for key/button motion input actions.
171 CARD8 header; /* which device, key up/down */
172 CARD8 keycode; /* which key/button to move */
173 CARD16 delay_time B16; /* how long to delay (in ms) */
177 * This is the definition for pointer jump input actions.
180 CARD8 header; /* which pointer */
181 CARD8 pad1; /* unused padding byte */
182 CARD16 jumpx B16; /* x coord to jump to */
183 CARD16 jumpy B16; /* y coord to jump to */
184 CARD16 delay_time B16; /* how long to delay (in ms) */
188 * These are the definitions for pointer relative motion input
191 * The sign bits for the x and y relative motions are contained
192 * in the header byte. The x and y relative motions are packed
193 * into one byte to make things fit in 32 bits. If the relative
194 * motion range is larger than +/-15, use the pointer jump action.
198 CARD8 header; /* which pointer */
199 CARD8 motion_data; /* x,y relative motion */
200 CARD16 delay_time B16; /* how long to delay (in ms) */
204 * These are the definitions for a long delay input action. It is
205 * used when more than XTestSHORT_DELAY_TIME milliseconds of delay
206 * (approximately one minute) is needed.
208 * The device ID for a delay is always set to XTestDELAY_DEVICE_ID.
209 * This guarantees that a header byte with a value of 0 is not
210 * a valid header, so it can be used as a flag to indicate that
211 * there are no more input actions in an XTestInputAction event.
215 CARD8 header; /* always XTestDELAY_DEVICE_ID */
216 CARD8 pad1; /* unused padding byte */
217 CARD16 pad2 B16; /* unused padding word */
218 CARD32 delay_time B32; /* how long to delay (in ms) */
221 #endif /* _XTESTEXT1PROTO_H */