1/* $XFree86: xc/include/extensions/xf86misc.h,v 3.16 2002/11/20 04:04:56 dawes Exp $ */ 2 3/* 4 * Copyright (c) 1995, 1996 The XFree86 Project, Inc 5 */ 6 7/* THIS IS NOT AN X CONSORTIUM STANDARD */ 8 9#ifndef _XF86MISC_H_ 10#define _XF86MISC_H_ 11 12#include <X11/Xfuncproto.h> 13 14#define X_XF86MiscQueryVersion 0 15#ifdef _XF86MISC_SAVER_COMPAT_ 16#define X_XF86MiscGetSaver 1 17#define X_XF86MiscSetSaver 2 18#endif 19#define X_XF86MiscGetMouseSettings 3 20#define X_XF86MiscGetKbdSettings 4 21#define X_XF86MiscSetMouseSettings 5 22#define X_XF86MiscSetKbdSettings 6 23#define X_XF86MiscSetGrabKeysState 7 24#define X_XF86MiscSetClientVersion 8 25#define X_XF86MiscGetFilePaths 9 26#define X_XF86MiscPassMessage 10 27 28#define XF86MiscNumberEvents 0 29 30#define XF86MiscBadMouseProtocol 0 31#define XF86MiscBadMouseBaudRate 1 32#define XF86MiscBadMouseFlags 2 33#define XF86MiscBadMouseCombo 3 34#define XF86MiscBadKbdType 4 35#define XF86MiscModInDevDisabled 5 36#define XF86MiscModInDevClientNotLocal 6 37#define XF86MiscNoModule 7 38#define XF86MiscNumberErrors (XF86MiscNoModule + 1) 39 40/* Never renumber these */ 41#define MTYPE_MICROSOFT 0 42#define MTYPE_MOUSESYS 1 43#define MTYPE_MMSERIES 2 44#define MTYPE_LOGITECH 3 45#define MTYPE_BUSMOUSE 4 46#define MTYPE_LOGIMAN 5 47#define MTYPE_PS_2 6 48#define MTYPE_MMHIT 7 49#define MTYPE_GLIDEPOINT 8 50#define MTYPE_IMSERIAL 9 51#define MTYPE_THINKING 10 52#define MTYPE_IMPS2 11 53#define MTYPE_THINKINGPS2 12 54#define MTYPE_MMANPLUSPS2 13 55#define MTYPE_GLIDEPOINTPS2 14 56#define MTYPE_NETPS2 15 57#define MTYPE_NETSCROLLPS2 16 58#define MTYPE_SYSMOUSE 17 59#define MTYPE_AUTOMOUSE 18 60#define MTYPE_ACECAD 19 61#define MTYPE_EXPPS2 20 62 63#define MTYPE_XQUEUE 127 64#define MTYPE_OSMOUSE 126 65#define MTYPE_UNKNOWN 125 66 67#define KTYPE_UNKNOWN 0 68#define KTYPE_84KEY 1 69#define KTYPE_101KEY 2 70#define KTYPE_OTHER 3 71#define KTYPE_XQUEUE 4 72 73#define MF_CLEAR_DTR 1 74#define MF_CLEAR_RTS 2 75#define MF_REOPEN 128 76 77#ifndef _XF86MISC_SERVER_ 78 79/* return values for XF86MiscSetGrabKeysState */ 80#define MiscExtGrabStateSuccess 0 /* No errors */ 81#define MiscExtGrabStateLocked 1 /* A client already requested that 82 * grabs cannot be removed/killed */ 83#define MiscExtGrabStateAlready 2 /* Request for enabling/disabling 84 * grab removal/kill already done */ 85 86_XFUNCPROTOBEGIN 87 88typedef struct { 89 char* device; 90 int type; 91 int baudrate; 92 int samplerate; 93 int resolution; 94 int buttons; 95 Bool emulate3buttons; 96 int emulate3timeout; 97 Bool chordmiddle; 98 int flags; 99} XF86MiscMouseSettings; 100 101typedef struct { 102 int type; 103 int rate; 104 int delay; 105 Bool servnumlock; 106} XF86MiscKbdSettings; 107 108typedef struct { 109 char* configfile; 110 char* modulepath; 111 char* logfile; 112} XF86MiscFilePaths; 113 114Bool XF86MiscQueryVersion( 115 Display* /* dpy */, 116 int* /* majorVersion */, 117 int* /* minorVersion */ 118); 119 120Bool XF86MiscQueryExtension( 121 Display* /* dpy */, 122 int* /* event_base */, 123 int* /* error_base */ 124); 125 126Bool XF86MiscSetClientVersion( 127 Display *dpy /* dpy */ 128); 129 130Status XF86MiscGetMouseSettings( 131 Display* /* dpy */, 132 XF86MiscMouseSettings* /* mouse info */ 133); 134 135Status XF86MiscGetKbdSettings( 136 Display* /* dpy */, 137 XF86MiscKbdSettings* /* keyboard info */ 138); 139 140Status XF86MiscSetMouseSettings( 141 Display* /* dpy */, 142 XF86MiscMouseSettings* /* mouse info */ 143); 144 145Status XF86MiscSetKbdSettings( 146 Display* /* dpy */, 147 XF86MiscKbdSettings* /* keyboard info */ 148); 149 150int XF86MiscSetGrabKeysState( 151 Display* /* dpy */, 152 Bool /* enabled */ 153); 154 155Status XF86MiscGetFilePaths( 156 Display* /* dpy */, 157 XF86MiscFilePaths* /* file paths/locations */ 158); 159 160Status XF86MiscPassMessage( 161 Display* /* dpy */, 162 int /* screen */, 163 const char* /* message name/type */, 164 const char* /* message contents/value */, 165 char ** /* returned message */ 166); 167 168_XFUNCPROTOEND 169 170#endif 171 172#endif 173