117ca54c3Smrg/* $XFree86: xc/include/extensions/xf86misc.h,v 3.16 2002/11/20 04:04:56 dawes Exp $ */ 217ca54c3Smrg 317ca54c3Smrg/* 417ca54c3Smrg * Copyright (c) 1995, 1996 The XFree86 Project, Inc 517ca54c3Smrg */ 617ca54c3Smrg 717ca54c3Smrg/* THIS IS NOT AN X CONSORTIUM STANDARD */ 817ca54c3Smrg 917ca54c3Smrg#ifndef _XF86MISC_H_ 1017ca54c3Smrg#define _XF86MISC_H_ 1117ca54c3Smrg 1217ca54c3Smrg#include <X11/Xfuncproto.h> 1317ca54c3Smrg 1417ca54c3Smrg#define X_XF86MiscQueryVersion 0 1517ca54c3Smrg#ifdef _XF86MISC_SAVER_COMPAT_ 1617ca54c3Smrg#define X_XF86MiscGetSaver 1 1717ca54c3Smrg#define X_XF86MiscSetSaver 2 1817ca54c3Smrg#endif 1917ca54c3Smrg#define X_XF86MiscGetMouseSettings 3 2017ca54c3Smrg#define X_XF86MiscGetKbdSettings 4 2117ca54c3Smrg#define X_XF86MiscSetMouseSettings 5 2217ca54c3Smrg#define X_XF86MiscSetKbdSettings 6 2317ca54c3Smrg#define X_XF86MiscSetGrabKeysState 7 2417ca54c3Smrg#define X_XF86MiscSetClientVersion 8 2517ca54c3Smrg#define X_XF86MiscGetFilePaths 9 2617ca54c3Smrg#define X_XF86MiscPassMessage 10 2717ca54c3Smrg 2817ca54c3Smrg#define XF86MiscNumberEvents 0 2917ca54c3Smrg 3017ca54c3Smrg#define XF86MiscBadMouseProtocol 0 3117ca54c3Smrg#define XF86MiscBadMouseBaudRate 1 3217ca54c3Smrg#define XF86MiscBadMouseFlags 2 3317ca54c3Smrg#define XF86MiscBadMouseCombo 3 3417ca54c3Smrg#define XF86MiscBadKbdType 4 3517ca54c3Smrg#define XF86MiscModInDevDisabled 5 3617ca54c3Smrg#define XF86MiscModInDevClientNotLocal 6 3717ca54c3Smrg#define XF86MiscNoModule 7 3817ca54c3Smrg#define XF86MiscNumberErrors (XF86MiscNoModule + 1) 3917ca54c3Smrg 4017ca54c3Smrg/* Never renumber these */ 4117ca54c3Smrg#define MTYPE_MICROSOFT 0 4217ca54c3Smrg#define MTYPE_MOUSESYS 1 4317ca54c3Smrg#define MTYPE_MMSERIES 2 4417ca54c3Smrg#define MTYPE_LOGITECH 3 4517ca54c3Smrg#define MTYPE_BUSMOUSE 4 4617ca54c3Smrg#define MTYPE_LOGIMAN 5 4717ca54c3Smrg#define MTYPE_PS_2 6 4817ca54c3Smrg#define MTYPE_MMHIT 7 4917ca54c3Smrg#define MTYPE_GLIDEPOINT 8 5017ca54c3Smrg#define MTYPE_IMSERIAL 9 5117ca54c3Smrg#define MTYPE_THINKING 10 5217ca54c3Smrg#define MTYPE_IMPS2 11 5317ca54c3Smrg#define MTYPE_THINKINGPS2 12 5417ca54c3Smrg#define MTYPE_MMANPLUSPS2 13 5517ca54c3Smrg#define MTYPE_GLIDEPOINTPS2 14 5617ca54c3Smrg#define MTYPE_NETPS2 15 5717ca54c3Smrg#define MTYPE_NETSCROLLPS2 16 5817ca54c3Smrg#define MTYPE_SYSMOUSE 17 5917ca54c3Smrg#define MTYPE_AUTOMOUSE 18 6017ca54c3Smrg#define MTYPE_ACECAD 19 6117ca54c3Smrg#define MTYPE_EXPPS2 20 6217ca54c3Smrg 6317ca54c3Smrg#define MTYPE_XQUEUE 127 6417ca54c3Smrg#define MTYPE_OSMOUSE 126 6517ca54c3Smrg#define MTYPE_UNKNOWN 125 6617ca54c3Smrg 6717ca54c3Smrg#define KTYPE_UNKNOWN 0 6817ca54c3Smrg#define KTYPE_84KEY 1 6917ca54c3Smrg#define KTYPE_101KEY 2 7017ca54c3Smrg#define KTYPE_OTHER 3 7117ca54c3Smrg#define KTYPE_XQUEUE 4 7217ca54c3Smrg 7317ca54c3Smrg#define MF_CLEAR_DTR 1 7417ca54c3Smrg#define MF_CLEAR_RTS 2 7517ca54c3Smrg#define MF_REOPEN 128 7617ca54c3Smrg 7717ca54c3Smrg#ifndef _XF86MISC_SERVER_ 7817ca54c3Smrg 7917ca54c3Smrg/* return values for XF86MiscSetGrabKeysState */ 8017ca54c3Smrg#define MiscExtGrabStateSuccess 0 /* No errors */ 8117ca54c3Smrg#define MiscExtGrabStateLocked 1 /* A client already requested that 8217ca54c3Smrg * grabs cannot be removed/killed */ 8317ca54c3Smrg#define MiscExtGrabStateAlready 2 /* Request for enabling/disabling 84ea1d6981Smrg * grab removal/kill already done */ 8517ca54c3Smrg 8617ca54c3Smrg_XFUNCPROTOBEGIN 8717ca54c3Smrg 8817ca54c3Smrgtypedef struct { 8917ca54c3Smrg char* device; 9017ca54c3Smrg int type; 9117ca54c3Smrg int baudrate; 9217ca54c3Smrg int samplerate; 9317ca54c3Smrg int resolution; 9417ca54c3Smrg int buttons; 9517ca54c3Smrg Bool emulate3buttons; 9617ca54c3Smrg int emulate3timeout; 9717ca54c3Smrg Bool chordmiddle; 9817ca54c3Smrg int flags; 9917ca54c3Smrg} XF86MiscMouseSettings; 10017ca54c3Smrg 10117ca54c3Smrgtypedef struct { 10217ca54c3Smrg int type; 10317ca54c3Smrg int rate; 10417ca54c3Smrg int delay; 10517ca54c3Smrg Bool servnumlock; 10617ca54c3Smrg} XF86MiscKbdSettings; 10717ca54c3Smrg 10817ca54c3Smrgtypedef struct { 10917ca54c3Smrg char* configfile; 11017ca54c3Smrg char* modulepath; 11117ca54c3Smrg char* logfile; 11217ca54c3Smrg} XF86MiscFilePaths; 11317ca54c3Smrg 11417ca54c3SmrgBool XF86MiscQueryVersion( 11517ca54c3Smrg Display* /* dpy */, 11617ca54c3Smrg int* /* majorVersion */, 11717ca54c3Smrg int* /* minorVersion */ 11817ca54c3Smrg); 11917ca54c3Smrg 12017ca54c3SmrgBool XF86MiscQueryExtension( 12117ca54c3Smrg Display* /* dpy */, 12217ca54c3Smrg int* /* event_base */, 12317ca54c3Smrg int* /* error_base */ 12417ca54c3Smrg); 12517ca54c3Smrg 12617ca54c3SmrgBool XF86MiscSetClientVersion( 12717ca54c3Smrg Display *dpy /* dpy */ 12817ca54c3Smrg); 12917ca54c3Smrg 13017ca54c3SmrgStatus XF86MiscGetMouseSettings( 13117ca54c3Smrg Display* /* dpy */, 13217ca54c3Smrg XF86MiscMouseSettings* /* mouse info */ 13317ca54c3Smrg); 13417ca54c3Smrg 13517ca54c3SmrgStatus XF86MiscGetKbdSettings( 13617ca54c3Smrg Display* /* dpy */, 13717ca54c3Smrg XF86MiscKbdSettings* /* keyboard info */ 13817ca54c3Smrg); 13917ca54c3Smrg 14017ca54c3SmrgStatus XF86MiscSetMouseSettings( 14117ca54c3Smrg Display* /* dpy */, 14217ca54c3Smrg XF86MiscMouseSettings* /* mouse info */ 14317ca54c3Smrg); 14417ca54c3Smrg 14517ca54c3SmrgStatus XF86MiscSetKbdSettings( 14617ca54c3Smrg Display* /* dpy */, 14717ca54c3Smrg XF86MiscKbdSettings* /* keyboard info */ 14817ca54c3Smrg); 14917ca54c3Smrg 15017ca54c3Smrgint XF86MiscSetGrabKeysState( 15117ca54c3Smrg Display* /* dpy */, 15217ca54c3Smrg Bool /* enabled */ 15317ca54c3Smrg); 15417ca54c3Smrg 15517ca54c3SmrgStatus XF86MiscGetFilePaths( 15617ca54c3Smrg Display* /* dpy */, 15717ca54c3Smrg XF86MiscFilePaths* /* file paths/locations */ 15817ca54c3Smrg); 15917ca54c3Smrg 16017ca54c3SmrgStatus XF86MiscPassMessage( 16117ca54c3Smrg Display* /* dpy */, 16217ca54c3Smrg int /* screen */, 16317ca54c3Smrg const char* /* message name/type */, 16417ca54c3Smrg const char* /* message contents/value */, 16517ca54c3Smrg char ** /* returned message */ 16617ca54c3Smrg); 16717ca54c3Smrg 16817ca54c3Smrg_XFUNCPROTOEND 16917ca54c3Smrg 17017ca54c3Smrg#endif 17117ca54c3Smrg 17217ca54c3Smrg#endif 173