indicators.h revision f46a6179
1f46a6179Smrg/* $Xorg: indicators.h,v 1.3 2000/08/17 19:54:32 cpqbld Exp $ */ 2f46a6179Smrg/************************************************************ 3f46a6179Smrg Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. 4f46a6179Smrg 5f46a6179Smrg Permission to use, copy, modify, and distribute this 6f46a6179Smrg software and its documentation for any purpose and without 7f46a6179Smrg fee is hereby granted, provided that the above copyright 8f46a6179Smrg notice appear in all copies and that both that copyright 9f46a6179Smrg notice and this permission notice appear in supporting 10f46a6179Smrg documentation, and that the name of Silicon Graphics not be 11f46a6179Smrg used in advertising or publicity pertaining to distribution 12f46a6179Smrg of the software without specific prior written permission. 13f46a6179Smrg Silicon Graphics makes no representation about the suitability 14f46a6179Smrg of this software for any purpose. It is provided "as is" 15f46a6179Smrg without any express or implied warranty. 16f46a6179Smrg 17f46a6179Smrg SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 18f46a6179Smrg SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 19f46a6179Smrg AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON 20f46a6179Smrg GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 21f46a6179Smrg DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 22f46a6179Smrg DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 23f46a6179Smrg OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 24f46a6179Smrg THE USE OR PERFORMANCE OF THIS SOFTWARE. 25f46a6179Smrg 26f46a6179Smrg ********************************************************/ 27f46a6179Smrg/* $XFree86$ */ 28f46a6179Smrg 29f46a6179Smrg#ifndef INDICATORS_H 30f46a6179Smrg#define INDICATORS_H 1 31f46a6179Smrg 32f46a6179Smrg#define _LED_Index (1<<0) 33f46a6179Smrg#define _LED_Mods (1<<1) 34f46a6179Smrg#define _LED_Groups (1<<2) 35f46a6179Smrg#define _LED_Ctrls (1<<3) 36f46a6179Smrg#define _LED_Explicit (1<<4) 37f46a6179Smrg#define _LED_Automatic (1<<5) 38f46a6179Smrg#define _LED_DrivesKbd (1<<6) 39f46a6179Smrg 40f46a6179Smrg#define _LED_NotBound 255 41f46a6179Smrg 42f46a6179Smrgtypedef struct _LEDInfo { 43f46a6179Smrg CommonInfo defs; 44f46a6179Smrg Atom name; 45f46a6179Smrg unsigned char indicator; 46f46a6179Smrg unsigned char flags; 47f46a6179Smrg unsigned char which_mods; 48f46a6179Smrg unsigned char real_mods; 49f46a6179Smrg unsigned short vmods; 50f46a6179Smrg unsigned char which_groups; 51f46a6179Smrg unsigned char groups; 52f46a6179Smrg unsigned int ctrls; 53f46a6179Smrg} LEDInfo; 54f46a6179Smrg 55f46a6179Smrgextern void ClearIndicatorMapInfo( 56f46a6179Smrg Display * /* dpy */, 57f46a6179Smrg LEDInfo * /* info */ 58f46a6179Smrg); 59f46a6179Smrg 60f46a6179Smrg 61f46a6179Smrgextern LEDInfo *AddIndicatorMap( 62f46a6179Smrg LEDInfo * /* oldLEDs */, 63f46a6179Smrg LEDInfo * /* newLED */ 64f46a6179Smrg); 65f46a6179Smrg 66f46a6179Smrgextern int SetIndicatorMapField( 67f46a6179Smrg LEDInfo * /* led */, 68f46a6179Smrg XkbDescPtr /* xkb */, 69f46a6179Smrg char * /* field */, 70f46a6179Smrg ExprDef * /* arrayNdx */, 71f46a6179Smrg ExprDef * /* value */ 72f46a6179Smrg); 73f46a6179Smrg 74f46a6179Smrgextern LEDInfo *HandleIndicatorMapDef( 75f46a6179Smrg IndicatorMapDef * /* stmt */, 76f46a6179Smrg XkbDescPtr /* xkb */, 77f46a6179Smrg LEDInfo * /* dflt */, 78f46a6179Smrg LEDInfo * /* oldLEDs */, 79f46a6179Smrg unsigned /* mergeMode */ 80f46a6179Smrg); 81f46a6179Smrg 82f46a6179Smrgextern Bool CopyIndicatorMapDefs( 83f46a6179Smrg XkbFileInfo * /* result */, 84f46a6179Smrg LEDInfo * /* leds */, 85f46a6179Smrg LEDInfo ** /* unboundRtrn */ 86f46a6179Smrg); 87f46a6179Smrg 88f46a6179Smrgextern Bool BindIndicators( 89f46a6179Smrg XkbFileInfo * /* result */, 90f46a6179Smrg Bool /* force */, 91f46a6179Smrg LEDInfo * /* unbound */, 92f46a6179Smrg LEDInfo ** /* unboundRtrn */ 93f46a6179Smrg); 94f46a6179Smrg 95f46a6179Smrg#endif /* INDICATORS_H */ 96