|
||||
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 0009 0010 Copyright 1986, 1987, 1988, 1998 The Open Group 0011 0012 Permission to use, copy, modify, distribute, and sell this software and its 0013 documentation for any purpose is hereby granted without fee, provided that 0014 the above copyright notice appear in all copies and that both that 0015 copyright notice and this permission notice appear in supporting 0016 documentation. 0017 0018 The above copyright notice and this permission notice shall be included in 0019 all copies or substantial portions of the Software. 0020 0021 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 0022 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 0023 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 0024 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 0025 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 0026 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 0027 0028 Except as contained in this notice, the name of The Open Group shall not be 0029 used in advertising or otherwise to promote the sale, use or other dealings 0030 in this Software without prior written authorization from The Open Group. 0031 0032 0033 Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation 0034 0035 Permission to use, copy, modify, and distribute this 0036 software and its documentation for any purpose and without 0037 fee is hereby granted, provided that the above copyright 0038 notice appear in all copies and that both that copyright 0039 notice and this permission notice appear in supporting 0040 documentation, and that the name of Hewlett-Packard not be used in 0041 advertising or publicity pertaining to distribution of the 0042 software without specific, written prior permission. 0043 0044 Hewlett-Packard makes no representations about the 0045 suitability of this software for any purpose. It is provided 0046 "as is" without express or implied warranty. 0047 0048 This software is not subject to any license of the American 0049 Telephone and Telegraph Company or of the Regents of the 0050 University of California. 0051 0052 */ 0053 0054 #ifndef _XTESTEXT1CONST_H 0055 #define _XTESTEXT1CONST_H 1 0056 0057 #define XTestMAX_ACTION_LIST_SIZE 64 0058 #define XTestACTIONS_SIZE 28 0059 0060 0061 /* 0062 * used in the XTestPressButton and XTestPressKey functions 0063 */ 0064 #define XTestPRESS 1 << 0 0065 #define XTestRELEASE 1 << 1 0066 #define XTestSTROKE 1 << 2 0067 0068 /* 0069 * When doing a key or button stroke, the number of milliseconds 0070 * to delay between the press and the release of a key or button 0071 * in the XTestPressButton and XTestPressKey functions. 0072 */ 0073 0074 #define XTestSTROKE_DELAY_TIME 10 0075 0076 /* 0077 * used in the XTestGetInput function 0078 */ 0079 #define XTestEXCLUSIVE 1 << 0 0080 #define XTestPACKED_ACTIONS 1 << 1 0081 #define XTestPACKED_MOTION 1 << 2 0082 0083 /* 0084 * used in the XTestFakeInput function 0085 */ 0086 #define XTestFAKE_ACK_NOT_NEEDED 0 0087 #define XTestFAKE_ACK_REQUEST 1 0088 0089 /* 0090 * used in the XTest extension initialization routine 0091 */ 0092 #define XTestEXTENSION_NAME "XTestExtension1" 0093 #define XTestEVENT_COUNT 2 0094 0095 /* 0096 * This is the definition for the format of the header byte 0097 * in the input action structures. 0098 */ 0099 #define XTestACTION_TYPE_MASK 0x03 /* bits 0 and 1 */ 0100 #define XTestKEY_STATE_MASK 0x04 /* bit 2 (key action) */ 0101 #define XTestX_SIGN_BIT_MASK 0x04 /* bit 2 (motion action) */ 0102 #define XTestY_SIGN_BIT_MASK 0x08 /* bit 3 (motion action) */ 0103 #define XTestDEVICE_ID_MASK 0xf0 /* bits 4 through 7 */ 0104 0105 #define XTestMAX_DEVICE_ID 0x0f 0106 #define XTestPackDeviceID(x) (((x) & XTestMAX_DEVICE_ID) << 4) 0107 #define XTestUnpackDeviceID(x) (((x) & XTestDEVICE_ID_MASK) >> 4) 0108 0109 /* 0110 * These are the possible action types. 0111 */ 0112 #define XTestDELAY_ACTION 0 0113 #define XTestKEY_ACTION 1 0114 #define XTestMOTION_ACTION 2 0115 #define XTestJUMP_ACTION 3 0116 0117 /* 0118 * These are the definitions for key/button motion input actions. 0119 */ 0120 #define XTestKEY_UP 0x04 0121 #define XTestKEY_DOWN 0x00 0122 0123 /* 0124 * These are the definitions for pointer relative motion input 0125 * actions. 0126 * 0127 * The sign bits for the x and y relative motions are contained 0128 * in the header byte. The x and y relative motions are packed 0129 * into one byte to make things fit in 32 bits. If the relative 0130 * motion range is larger than +/-15, use the pointer jump action. 0131 */ 0132 #define XTestMOTION_MAX 15 0133 #define XTestMOTION_MIN -15 0134 0135 #define XTestX_NEGATIVE 0x04 0136 #define XTestY_NEGATIVE 0x08 0137 0138 #define XTestX_MOTION_MASK 0x0f 0139 #define XTestY_MOTION_MASK 0xf0 0140 0141 #define XTestPackXMotionValue(x) ((x) & XTestX_MOTION_MASK) 0142 #define XTestPackYMotionValue(x) (((x) << 4) & XTestY_MOTION_MASK) 0143 0144 #define XTestUnpackXMotionValue(x) ((x) & XTestX_MOTION_MASK) 0145 #define XTestUnpackYMotionValue(x) (((x) & XTestY_MOTION_MASK) >> 4) 0146 /* 0147 * These are the definitions for a long delay input action. It is 0148 * used when more than XTestSHORT_DELAY_TIME milliseconds of delay 0149 * (approximately one minute) is needed. 0150 * 0151 * The device ID for a delay is always set to XTestDELAY_DEVICE_ID. 0152 * This guarantees that a header byte with a value of 0 is not 0153 * a valid header, so it can be used as a flag to indicate that 0154 * there are no more input actions in an XTestInputAction event. 0155 */ 0156 0157 #define XTestSHORT_DELAY_TIME 0xffff 0158 #define XTestDELAY_DEVICE_ID 0x0f 0159 0160 #endif /* _XTESTEXT1CONST_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |