/************************************************************
Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, and distribute this
software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
#ifndef _XKB_H_
#define _XKB_H_
/*
* XKB request codes, used in:
* - xkbReqType field of all requests
* - requestMinor field of some events
*/
#define X_kbUseExtension 0
/*
* In the X sense, XKB reports only one event.
* The type field of all XKB events is XkbEventCode
*/
#define XkbEventCode 0
/*
* XKB has a minor event code so it can use one X event code for
* multiple purposes.
* - reported in the xkbType field of all XKB events.
* - XkbSelectEventDetails: Indicates the event for which event details
* are being changed
*/
#define XkbNewKeyboardNotify 0
/*
* Event Mask:
* - XkbSelectEvents: Specifies event interest.
*/
/*
* NewKeyboardNotify event details:
*/
/*
* AccessXNotify event types:
* - The 'what' field of AccessXNotify events reports the
* reason that the event was generated.
*/
#define XkbAXN_SKPress 0
/*
* AccessXNotify details:
* - Used as an event detail mask to limit the conditions under which
* AccessXNotify events are reported
*/
/*
* Miscellaneous event details:
* - event detail masks for assorted events that don't reall
* have any details.
*/
/*
* XKB reports one error: BadKeyboard
* A further reason for the error is encoded into to most significant
* byte of the resourceID for the error:
* XkbErr_BadDevice - the device in question was not found
* XkbErr_BadClass - the device was found but it doesn't belong to
* the appropriate class.
* XkbErr_BadId - the device was found and belongs to the right
* class, but not feedback with a matching id was
* found.
* The low byte of the resourceID for this error contains the device
* id, class specifier or feedback id that failed.
*/
#define XkbKeyboard 0
/*
* Keyboard Components Mask:
* - Specifies the components that follow a GetKeyboardByNameReply
*/
/*
* State detail mask:
* - The 'changed' field of StateNotify events reports which of
* the keyboard state components have changed.
* - Used as an event detail mask to limit the conditions under
* which StateNotify events are reported.
*/
/*
* Controls detail masks:
* The controls specified in XkbAllControlsMask:
* - The 'changed' field of ControlsNotify events reports which of
* the keyboard controls have changed.
* - The 'changeControls' field of the SetControls request specifies
* the controls for which values are to be changed.
* - Used as an event detail mask to limit the conditions under
* which ControlsNotify events are reported.
*
* The controls specified in the XkbAllBooleanCtrlsMask:
* - The 'enabledControls' field of ControlsNotify events reports the
* current status of the boolean controls.
* - The 'enabledControlsChanges' field of ControlsNotify events reports
* any boolean controls that have been turned on or off.
* - The 'affectEnabledControls' and 'enabledControls' fields of the
* kbSetControls request change the set of enabled controls.
* - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of
* an XkbControlsRec specify the controls to be changed if the keyboard
* times out and the values to which they should be changed.
* - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags
* request specifies the specify the controls to be reset when the
* client exits and the values to which they should be reset.
* - The 'ctrls' field of an indicator map specifies the controls
* that drive the indicator.
* - Specifies the boolean controls affected by the SetControls and
* LockControls key actions.
*/
/*
* AccessX Options Mask
* - The 'accessXOptions' field of an XkbControlsRec specifies the
* AccessX options that are currently in effect.
* - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues'
* fields of an XkbControlsRec specify the Access X options to be
* changed if the keyboard times out and the values to which they
* should be changed.
*/
/*
* XkbUseCoreKbd is used to specify the core keyboard without having
* to look up its X input extension identifier.
* XkbUseCorePtr is used to specify the core pointer without having
* to look up its X input extension identifier.
* XkbDfltXIClass is used to specify "don't care" any place that the
* XKB protocol is looking for an X Input Extension
* device class.
* XkbDfltXIId is used to specify "don't care" any place that the
* XKB protocol is looking for an X Input Extension
* feedback identifier.
* XkbAllXIClasses is used to get information about all device indicators,
* whether they're part of the indicator feedback class
* or the keyboard feedback class.
* XkbAllXIIds is used to get information about all device indicator
* feedbacks without having to list them.
* XkbXINone is used to indicate that no class or id has been specified.
* XkbLegalXILedClass(c) True if 'c' specifies a legal class with LEDs
* XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells
* XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device
* XkbExplicitXIClass(c) True if 'c' explicitly specifies a device class
* XkbExplicitXIId(c) True if 'i' explicitly specifies a device id
* XkbSingleXIClass(c) True if 'c' specifies exactly one device class,
* including the default.
* XkbSingleXIId(i) True if 'i' specifies exactly one device
* identifier, including the default.
*/
((c)==LedFeedbackClass)||\
((c)==XkbDfltXIClass)||\
((c)==XkbAllXIClasses))
((c)==BellFeedbackClass)||\
((c)==XkbDfltXIClass)||\
((c)==XkbAllXIClasses))
#define XkbNoModifierMask 0
/*
* Group Index and Mask:
* - Indices into the kt_index array of a key type.
* - Mask specifies types to be changed for XkbChangeTypesOfKey
*/
#define XkbGroup1Index 0
/*
* BuildCoreState: Given a keyboard group and a modifier state,
* construct the value to be reported an event.
* GroupForCoreState: Given the state reported in an event,
* determine the keyboard group.
* IsLegalGroup: Returns TRUE if 'g' is a valid group index.
*/
/*
* GroupsWrap values:
* - The 'groupsWrap' field of an XkbControlsRec specifies the
* treatment of out of range groups.
* - Bits 6 and 7 of the group info field of a key symbol map
* specify the interpretation of out of range groups for the
* corresponding key.
*/
/*
* Action flags: Reported in the 'flags' field of most key actions.
* Interpretation depends on the type of the action; not all actions
* accept all flags.
*
* Option Used for Actions
* ------ ----------------
* ClearLocks SetMods, LatchMods, SetGroup, LatchGroup
* LatchToLock SetMods, LatchMods, SetGroup, LatchGroup
* LockNoLock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
* LockNoUnlock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
* UseModMapMods SetMods, LatchMods, LockMods, ISOLock
* GroupAbsolute SetGroup, LatchGroup, LockGroup, ISOLock
* UseDfltButton PtrBtn, LockPtrBtn
* NoAcceleration MovePtr
* MoveAbsoluteX MovePtr
* MoveAbsoluteY MovePtr
* ISODfltIsGroup ISOLock
* ISONoAffectMods ISOLock
* ISONoAffectGroup ISOLock
* ISONoAffectPtr ISOLock
* ISONoAffectCtrls ISOLock
* MessageOnPress ActionMessage
* MessageOnRelease ActionMessage
* MessageGenKeyEvent ActionMessage
* AffectDfltBtn SetPtrDflt
* DfltBtnAbsolute SetPtrDflt
* SwitchApplication SwitchScreen
* SwitchAbsolute SwitchScreen
*/
#define XkbSA_UseDfltButton 0
/*
* The following values apply to the SA_DeviceValuator
* action only. Valuator operations specify the action
* to be taken. Values specified in the action are
* multiplied by 2^scale before they are applied.
*/
/*
* Action types: specifies the type of a key action. Reported in the
* type field of all key actions.
*/
/*
* Specifies the key actions that clear latched groups or modifiers.
*/
#define XkbSA_BreakLatch \
/*
* Macros to classify key actions
*/
/*
* Key Behavior Qualifier:
* KB_Permanent indicates that the behavior describes an unalterable
* characteristic of the keyboard, not an XKB software-simulation of
* the listed behavior.
* Key Behavior Types:
* Specifies the behavior of the underlying key.
*/
/*
* Various macros which describe the range of legal keycodes.
*/
/* Seems kinda silly to check that an unsigned char is <= 255... */
/*
* Assorted constants and limits.
*/
/*
* Key Type index and mask for the four standard key types.
*/
#define XkbOneLevelIndex 0
/*
* Extension name and version information
*/
#define XkbMinorVersion 0
/*
* Explicit map components:
* - Used in the 'explicit' field of an XkbServerMap. Specifies
* the keyboard components that should _not_ be updated automatically
* in response to core protocol keyboard mapping requests.
*/
/*
* Map components masks:
* Those in AllMapComponentsMask:
* - Specifies the individual fields to be loaded or changed for the
* GetMap and SetMap requests.
* Those in ClientInfoMask:
* - Specifies the components to be allocated by XkbAllocClientMap.
* Those in ServerInfoMask:
* - Specifies the components to be allocated by XkbAllocServerMap.
*/
#define XkbAllServerInfoMask (XkbExplicitComponentsMask|XkbKeyActionsMask|XkbKeyBehaviorsMask|XkbVirtualModsMask|XkbVirtualModMapMask)
/*
* Symbol interpretations flags:
* - Used in the flags field of a symbol interpretation
*/
/*
* Symbol interpretations match specification:
* - Used in the match field of a symbol interpretation to specify
* the conditions under which an interpretation is used.
*/
#define XkbSI_NoneOf (0)
/*
* Indicator map flags:
* - Used in the flags field of an indicator map to indicate the
* conditions under which and indicator can be changed and the
* effects of changing the indicator.
*/
/*
* Indicator map component specifications:
* - Used by the 'which_groups' and 'which_mods' fields of an indicator
* map to specify which keyboard components should be used to drive
* the indicator.
*/
#define XkbIM_UseNone 0
/*
* Compatibility Map Compontents:
* - Specifies the components to be allocated in XkbAllocCompatMap.
*/
/*
* Names component mask:
* - Specifies the names to be loaded or changed for the GetNames and
* SetNames requests.
* - Specifies the names that have changed in a NamesNotify event.
* - Specifies the names components to be allocated by XkbAllocNames.
*/
/*
* GetByName components:
* - Specifies desired or necessary components to GetKbdByName request.
* - Reports the components that were found in a GetKbdByNameReply
*/
/*
* ListComponents flags
*/
/*
* X Input Extension Interactions
* - Specifies the possible interactions between XKB and the X input
* extension
* - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo)
* XKB information about an extension device.
* - Reports the list of supported optional features in the reply to
* XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event.
* XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify
* events to indicate an attempt to use an unsupported feature.
*/
/*
* Per-Client Flags:
* - Specifies flags to be changed by the PerClientFlags request.
*/
/*
* Debugging flags and controls
*/
#endif /* _XKB_H_ */