Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:23

0001 /*
0002  * xtestext1.h
0003  *
0004  * X11 Input Synthesis Extension include file
0005  */
0006 
0007 /*
0008 Copyright 1986, 1987, 1988, 1998  The Open Group
0009 
0010 Permission to use, copy, modify, distribute, and sell this software and its
0011 documentation for any purpose is hereby granted without fee, provided that
0012 the above copyright notice appear in all copies and that both that
0013 copyright notice and this permission notice appear in supporting
0014 documentation.
0015 
0016 The above copyright notice and this permission notice shall be included in
0017 all copies or substantial portions of the Software.
0018 
0019 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0020 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0021 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
0022 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
0023 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0024 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0025 
0026 Except as contained in this notice, the name of The Open Group shall not be
0027 used in advertising or otherwise to promote the sale, use or other dealings
0028 in this Software without prior written authorization from The Open Group.
0029 
0030 
0031 Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation
0032 
0033 Permission to use, copy, modify, and distribute this
0034 software and its documentation for any purpose and without
0035 fee is hereby granted, provided that the above copyright
0036 notice appear in all copies and that both that copyright
0037 notice and this permission notice appear in supporting
0038 documentation, and that the name of Hewlett-Packard not be used in
0039 advertising or publicity pertaining to distribution of the
0040 software without specific, written prior permission.
0041 
0042 Hewlett-Packard makes no representations about the
0043 suitability of this software for any purpose.  It is provided
0044 "as is" without express or implied warranty.
0045 
0046 This software is not subject to any license of the American
0047 Telephone and Telegraph Company or of the Regents of the
0048 University of California.
0049 
0050 */
0051 
0052 #ifndef _XTESTEXT1PROTO_H
0053 #define _XTESTEXT1PROTO_H 1
0054 
0055 #include <X11/extensions/xtestext1const.h>
0056 
0057 /*
0058  * the typedefs for CARD8, CARD16, and CARD32 are defined in Xmd.h
0059  */
0060 
0061 /*
0062  * XTest request type values
0063  *
0064  * used in the XTest extension protocol requests
0065  */
0066 #define X_TestFakeInput                  1
0067 #define X_TestGetInput                   2
0068 #define X_TestStopInput                  3
0069 #define X_TestReset                      4
0070 #define X_TestQueryInputSize             5
0071 
0072 /*
0073  * This defines the maximum size of a list of input actions
0074  * to be sent to the server.  It should always be a multiple of
0075  * 4 so that the entire xTestFakeInputReq structure size is a
0076  * multiple of 4.
0077  */
0078 
0079 typedef struct {
0080         CARD8   reqType;        /* always XTestReqCode             */
0081         CARD8   XTestReqType;   /* always X_TestFakeInput           */
0082         CARD16  length B16;     /* 2 + XTestMAX_ACTION_LIST_SIZE/4 */
0083         CARD32  ack B32;
0084         CARD8   action_list[XTestMAX_ACTION_LIST_SIZE];
0085 } xTestFakeInputReq;
0086 #define sz_xTestFakeInputReq (XTestMAX_ACTION_LIST_SIZE + 8)
0087 
0088 typedef struct {
0089         CARD8   reqType;        /* always XTestReqCode  */
0090         CARD8   XTestReqType;   /* always X_TestGetInput */
0091         CARD16  length B16;     /* 2                    */
0092         CARD32  mode B32;
0093 } xTestGetInputReq;
0094 #define sz_xTestGetInputReq 8
0095 
0096 typedef struct {
0097         CARD8   reqType;        /* always XTestReqCode   */
0098         CARD8   XTestReqType;   /* always X_TestStopInput */
0099         CARD16  length B32;     /* 1                     */
0100 } xTestStopInputReq;
0101 #define sz_xTestStopInputReq 4
0102 
0103 typedef struct {
0104         CARD8   reqType;        /* always XTestReqCode */
0105         CARD8   XTestReqType;   /* always X_TestReset   */
0106         CARD16  length B16;     /* 1                   */
0107 } xTestResetReq;
0108 #define sz_xTestResetReq 4
0109 
0110 typedef struct {
0111         CARD8   reqType;        /* always XTestReqCode        */
0112         CARD8   XTestReqType;   /* always X_TestQueryInputSize */
0113         CARD16  length B16;     /* 1                          */
0114 } xTestQueryInputSizeReq;
0115 #define sz_xTestQueryInputSizeReq 4
0116 
0117 /*
0118  * This is the definition of the reply for the xTestQueryInputSize
0119  * request.  It should remain the same minimum size as other replies
0120  * (32 bytes).
0121  */
0122 typedef struct {
0123         CARD8   type;           /* always X_Reply  */
0124         CARD8   pad1;
0125         CARD16  sequenceNumber B16;
0126         CARD32  length B32;     /* always 0 */
0127         CARD32  size_return B32;
0128         CARD32  pad2 B32;
0129         CARD32  pad3 B32;
0130         CARD32  pad4 B32;
0131         CARD32  pad5 B32;
0132         CARD32  pad6 B32;
0133 } xTestQueryInputSizeReply;
0134 
0135 /*
0136  * This is the definition for the input action wire event structure.
0137  * This event is sent to the client when the server has one or
0138  * more user input actions to report to the client.  It must
0139  * remain the same size as all other wire events (32 bytes).
0140  */
0141 typedef struct {
0142         CARD8   type;           /* always XTestInputActionType */
0143         CARD8   pad00;
0144         CARD16  sequenceNumber B16;
0145         CARD8   actions[XTestACTIONS_SIZE];
0146 } xTestInputActionEvent;
0147 
0148 /*
0149  * This is the definition for the xTestFakeAck wire event structure.
0150  * This event is sent to the client when the server has completely
0151  * processed its input action buffer, and is ready for more.
0152  * It must remain the same size as all other wire events (32 bytes).
0153  */
0154 typedef struct {
0155         CARD8   type;           /* always XTestFakeAckType */
0156         CARD8   pad00;
0157         CARD16  sequenceNumber B16;
0158         CARD32  pad02 B32;
0159         CARD32  pad03 B32;
0160         CARD32  pad04 B32;
0161         CARD32  pad05 B32;
0162         CARD32  pad06 B32;
0163         CARD32  pad07 B32;
0164         CARD32  pad08 B32;
0165 } xTestFakeAckEvent;
0166 
0167 /*
0168  * These are the definitions for key/button motion input actions.
0169  */
0170 typedef struct {
0171         CARD8   header;         /* which device, key up/down */
0172         CARD8   keycode;        /* which key/button to move  */
0173         CARD16  delay_time B16; /* how long to delay (in ms) */
0174 } XTestKeyInfo;
0175 
0176 /*
0177  * This is the definition for pointer jump input actions.
0178  */
0179 typedef struct {
0180         CARD8   header;         /* which pointer             */
0181         CARD8   pad1;           /* unused padding byte       */
0182         CARD16  jumpx B16;      /* x coord to jump to        */
0183         CARD16  jumpy B16;      /* y coord to jump to        */
0184         CARD16  delay_time B16; /* how long to delay (in ms) */
0185 } XTestJumpInfo;
0186 
0187 /*
0188  * These are the definitions for pointer relative motion input
0189  * actions.
0190  *
0191  * The sign bits for the x and y relative motions are contained
0192  * in the header byte.  The x and y relative motions are packed
0193  * into one byte to make things fit in 32 bits.  If the relative
0194  * motion range is larger than +/-15, use the pointer jump action.
0195  */
0196 
0197 typedef struct {
0198         CARD8   header;         /* which pointer             */
0199         CARD8   motion_data;    /* x,y relative motion       */
0200         CARD16  delay_time B16; /* how long to delay (in ms) */
0201 } XTestMotionInfo;
0202 
0203 /*
0204  * These are the definitions for a long delay input action.  It is
0205  * used when more than XTestSHORT_DELAY_TIME milliseconds of delay
0206  * (approximately one minute) is needed.
0207  *
0208  * The device ID for a delay is always set to XTestDELAY_DEVICE_ID.
0209  * This guarantees that a header byte with a value of 0 is not
0210  * a valid header, so it can be used as a flag to indicate that
0211  * there are no more input actions in an XTestInputAction event.
0212  */
0213 
0214 typedef struct {
0215         CARD8   header;         /* always XTestDELAY_DEVICE_ID */
0216         CARD8   pad1;           /* unused padding byte         */
0217         CARD16  pad2 B16;       /* unused padding word         */
0218         CARD32  delay_time B32; /* how long to delay (in ms)   */
0219 } XTestDelayInfo;
0220 
0221 #endif /* _XTESTEXT1PROTO_H */