AccessXstruct.h revision 919
551N/A/*
551N/A * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
551N/A * Use is subject to license terms.
551N/A *
551N/A * Permission is hereby granted, free of charge, to any person obtaining a
919N/A * copy of this software and associated documentation files (the "Software"),
919N/A * to deal in the Software without restriction, including without limitation
919N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A * and/or sell copies of the Software, and to permit persons to whom the
919N/A * Software is furnished to do so, subject to the following conditions:
551N/A *
919N/A * The above copyright notice and this permission notice (including the next
919N/A * paragraph) shall be included in all copies or substantial portions of the
919N/A * Software.
551N/A *
919N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A * DEALINGS IN THE SOFTWARE.
551N/A */
551N/A/************************************************************************/
551N/A/* */
551N/A/* Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993 */
551N/A/* by Digital Equipment Corp., Maynard, MA */
551N/A/* */
551N/A/* Permission to use, copy, modify, and distribute this software */
551N/A/* and its documentation for any purpose and without fee is hereby */
551N/A/* granted, provided that the above copyright notice appear in all */
551N/A/* copies and that both that copyright notice and this permission */
551N/A/* notice appear in supporting documentation, and that the name of */
551N/A/* Digital not be used in advertising or publicity pertaining to */
551N/A/* distribution of the software without specific, written prior */
551N/A/* permission. */
551N/A/* */
551N/A/* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, */
551N/A/* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND */
551N/A/* FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, */
551N/A/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
551N/A/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN */
551N/A/* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
551N/A/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE */
551N/A/* OF THIS SOFTWARE. */
551N/A/* */
551N/A/************************************************************************/
551N/A
551N/A/************************************************************************/
551N/A/* */
551N/A/* AccessXstruct */
551N/A/* */
551N/A/* This module defines structures private to the server extension */
551N/A/* */
551N/A/* Revision History: */
551N/A/* */
551N/A/* 11-Jun-1993 WDW & MEN */
551N/A/* Develop sample implementation. */
551N/A/* */
551N/A/************************************************************************/
551N/A#include <resource.h>
551N/A#ifndef ACCESSX_STRUCT_H
551N/A#define ACCESSX_STRUCT_H
551N/A
551N/A/************************************************************************
551N/A *
551N/A * AccessXTime - needed because GetTimeInMillis returns different
551N/A * types depending upon the processor.
551N/A */
551N/A#if LONG_BIT == 64
551N/Atypedef int AccessXTime;
551N/A#else
551N/Atypedef long AccessXTime;
551N/A#endif
551N/A
551N/A/************************************************************************
551N/A *
551N/A * AccessXInfo - used by the extension to keep track of everything.
551N/A *
551N/A */
551N/Atypedef struct _AccessXInfo
551N/A{
551N/A int majorOpcode; /* Major Opcode for extension. */
551N/A ClientPtr currentClient; /* Client asking for events. */
551N/A /* Only one client is allowed */
551N/A /* at a time. */
551N/A XID currentClientID; /* FakeID for currentClient */
551N/A RESTYPE accessXResourceType; /* Resource type to associate */
551N/A /* with clients. */
551N/A int accessXEventType; /* Number to associate with the */
551N/A /* one and only event that the */
551N/A /* extension will send. */
551N/A CARD32 control; /* State of AccessX Features */
551N/A /* in the form of a bitmask. */
551N/A /* For example, is mouse keys */
551N/A /* on, is sticky keys on? */
551N/A CARD16 timeOutInterval; /* Duration (in seconds) after */
551N/A /* which the AccessX features */
551N/A /* should be turned off if */
551N/A /* there aren't any input evts.*/
551N/A /* mouse actions. */
551N/A CARD16 mouseKeysTimeToMax; /* Time (in seconds) */
551N/A /* until we reach max speed. */
551N/A CARD16 mouseKeysGain; /* Pixels per mouse movement */
551N/A /* when at maximum speed. */
551N/A CARD16 mouseKeysInterval; /* Time (in milliseconds) */
551N/A /* between MouseKeys actions. */
551N/A CARD8 mouseKeysCtrlMask; /* Modifier mask used for magic */
551N/A /* sequence to turn on MouseKs */
551N/A CARD8 mouseKeysCtrlKeyCode; /* KeyCode used in conjunction */
551N/A /* with mouseKeysCtrlMask. */
551N/A CARD8 currentMouseButton; /* What button will be used for */
551N/A CARD8 latchedModifiers; /* Bit mask saying what mods */
551N/A /* are latched. */
551N/A KeyCode latchTable[8]; /* KeyCodes which represent */
551N/A /* what modifiers are latched */
551N/A CARD8 lockedModifiers; /* Bit mask saying what mods */
551N/A /* are locked. */
551N/A KeyCode lockTable[8]; /* KeyCodes which represent */
551N/A /* what modifiers are locked */
551N/A CARD16 slowKeysDelay; /* Time (in milliseconds) for a */
551N/A /* to be pressed before it is */
551N/A /* accepted as a real KeyPress.*/
551N/A CARD16 debounceDelay; /* Time (in milliseconds) */
551N/A /* between release and press */
551N/A /* of the same key before it */
551N/A /* will be accepted. */
551N/A /* accepted as a real KeyPress.*/
551N/A CARD16 repeatKeysDelay; /* Time (in milliseconds) before*/
551N/A /* a key begins to autorepeat. */
551N/A CARD16 repeatKeysRate; /* Time (in milliseconds) for */
551N/A /* handling rate of repeat. */
551N/A KeyCode repeatKey; /* Key that is autorepeating. */
551N/A Bool savedAutoRepeat; /* Autorepeat mode saved when */
551N/A /* KRG is turned on. */
551N/A unsigned char savedAutoRepeats[32]; /* AutoRepeats field saved when */
551N/A /* mouseKeys is turned on. */
551N/A CARD16 state; /* Bitmask saying what is going */
551N/A /* on right now. For example, */
551N/A /* is the mouse moving, or is */
551N/A /* the KRG hot key being held? */
551N/A KeyCode currentKeyCode; /* KeyCode of the key currently */
551N/A /* being pressed by the user. */
551N/A CARD8 currentModifier; /* Bitmask saying if the current*/
551N/A /* key is modifier and what */
551N/A /* modifier it is. */
551N/A AccessXTime timeKeyPressed; /* The time the current key was */
551N/A /* pressed. */
551N/A AccessXTime timeKeyReleased; /* The time the current key was */
551N/A /* released. */
551N/A CARD8 physicalModifiers; /* Bitmask which says what mods */
551N/A /* are physically down. */
551N/A CARD8 shiftKeyCount; /* Number of times the right */
551N/A /* shift key has been pressed */
551N/A /* in a row. */
551N/A KeyCode lastKeyPressed; /* KeyCode of the last key */
551N/A /* pressed by the user. */
551N/A CARD8 lastModPressed; /* Bit which says which was the */
551N/A /* last modifier pressed. */
551N/A KeyCode previousKeyCode; /* KeyCode of the key previously*/
551N/A /* acted upon by the user. */
551N/A KeyCode ignoreKeyCode; /* KeyCode of key to ignore */
551N/A /* when it is released. */
551N/A AccessXTime timeOutTime; /* Time disabling AccessX. */
551N/A AccessXTime krgHoldTime; /* Time for holding KRG hot key.*/
551N/A AccessXTime slowKeysTime; /* Time to do SlowKeys action. */
551N/A AccessXTime repeatKeysTime; /* Time to do RepeatKeys action */
551N/A AccessXTime mouseKeysTime; /* Time to do MouseKeys action. */
551N/A int mouseAccel; /* Used for MouseKeys accel. */
551N/A int mouseCounter; /* " " */
551N/A int accelPass; /* " " */
551N/A int accelStep; /* " " */
551N/A AccessXTime timeStep; /* " " */
551N/A AccessXMouseKeysRec *mouseKeysActions; /* What keys act as MouseKeys*/
551N/A} AccessXInfo;
551N/A
551N/A#endif /* ACCESSX_STRUCT_HH */