1382ff0afSmrg#ifndef XKBUI_H 2382ff0afSmrg#define XKBUI_H 1 3382ff0afSmrg/* $XConsortium: XKBui.h /main/2 1995/12/07 21:18:19 kaleb $ */ 4382ff0afSmrg/************************************************************ 5382ff0afSmrg Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc. 6382ff0afSmrg 7382ff0afSmrg Permission to use, copy, modify, and distribute this 8382ff0afSmrg software and its documentation for any purpose and without 9382ff0afSmrg fee is hereby granted, provided that the above copyright 10382ff0afSmrg notice appear in all copies and that both that copyright 11382ff0afSmrg notice and this permission notice appear in supporting 12382ff0afSmrg documentation, and that the name of Silicon Graphics not be 13382ff0afSmrg used in advertising or publicity pertaining to distribution 14382ff0afSmrg of the software without specific prior written permission. 15382ff0afSmrg Silicon Graphics makes no representation about the suitability 16382ff0afSmrg of this software for any purpose. It is provided "as is" 17382ff0afSmrg without any express or implied warranty. 18382ff0afSmrg 19382ff0afSmrg SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 20382ff0afSmrg SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 21382ff0afSmrg AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON 22382ff0afSmrg GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 23382ff0afSmrg DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 24382ff0afSmrg DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 25382ff0afSmrg OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 26382ff0afSmrg THE USE OR PERFORMANCE OF THIS SOFTWARE. 27382ff0afSmrg 28382ff0afSmrg ********************************************************/ 29382ff0afSmrg/* $XFree86$ */ 30382ff0afSmrg 31382ff0afSmrg#include <X11/Xlib.h> 32382ff0afSmrg#include <X11/XKBlib.h> 33382ff0afSmrg#include <X11/extensions/XKBgeom.h> 34382ff0afSmrg 35382ff0afSmrgtypedef struct _XkbUI_View *XkbUI_ViewPtr; 36382ff0afSmrg 37382ff0afSmrgtypedef struct _XkbUI_ViewOpts { 38382ff0afSmrg unsigned int present; 39382ff0afSmrg unsigned int fg; 40382ff0afSmrg unsigned int bg; 41382ff0afSmrg unsigned int label_mode; 42382ff0afSmrg unsigned int color_mode; 43382ff0afSmrg XRectangle viewport; 44382ff0afSmrg unsigned int margin_width; 45382ff0afSmrg unsigned int margin_height; 46382ff0afSmrg Colormap cmap; 47382ff0afSmrg} XkbUI_ViewOptsRec,*XkbUI_ViewOptsPtr; 48382ff0afSmrg 49382ff0afSmrg /* 50382ff0afSmrg * legal values for present field of a view options 51382ff0afSmrg */ 52382ff0afSmrg#define XkbUI_BackgroundMask (1<<0) 53382ff0afSmrg#define XkbUI_ForegroundMask (1<<1) 54382ff0afSmrg#define XkbUI_LabelModeMask (1<<2) 55382ff0afSmrg#define XkbUI_ColorModeMask (1<<3) 56382ff0afSmrg#define XkbUI_WidthMask (1<<4) 57382ff0afSmrg#define XkbUI_HeightMask (1<<5) 58382ff0afSmrg#define XkbUI_XOffsetMask (1<<6) 59382ff0afSmrg#define XkbUI_YOffsetMask (1<<7) 60382ff0afSmrg#define XkbUI_ColormapMask (1<<8) 61382ff0afSmrg#define XkbUI_MarginWidthMask (1<<9) 62382ff0afSmrg#define XkbUI_MarginHeightMask (1<<10) 63382ff0afSmrg 64382ff0afSmrg#define XkbUI_SizeMask (XkbUI_WidthMask|XkbUI_HeightMask) 65382ff0afSmrg#define XkbUI_OffsetMask (XkbUI_XOffsetMask|XkbUI_YOffsetMask) 66382ff0afSmrg#define XkbUI_MarginMask (XkbUI_MarginWidthMask|XkbUI_MarginHeightMask) 67382ff0afSmrg#define XkbUI_AllViewOptsMask (0x7ff) 68382ff0afSmrg 69382ff0afSmrg /* 70382ff0afSmrg * legal values for the label_mode of a view options 71382ff0afSmrg */ 72382ff0afSmrg#define XkbUI_NoLabels 0 73382ff0afSmrg#define XkbUI_KeyCodes 1 74382ff0afSmrg#define XkbUI_KeyNames 2 75382ff0afSmrg#define XkbUI_StateSyms 3 76382ff0afSmrg#define XkbUI_MultiSyms 4 77382ff0afSmrg 78382ff0afSmrgtypedef struct _XkbUI_Select { 79382ff0afSmrg unsigned type; 80382ff0afSmrg XkbSectionPtr section; 81382ff0afSmrg XkbKeyPtr key; 82382ff0afSmrg XkbDoodadPtr doodad; 83382ff0afSmrg} XkbUI_SelectRec,*XkbUI_SelectPtr; 84382ff0afSmrg 85382ff0afSmrg /* 86382ff0afSmrg * legal values for 'type' field of a selection report 87382ff0afSmrg */ 88382ff0afSmrg 89382ff0afSmrg#define XkbUI_Keys 0 90382ff0afSmrg#define XkbUI_Indicators 1 91382ff0afSmrg#define XkbUI_TextLabels 2 92382ff0afSmrg#define XkbUI_SolidShapes 3 93382ff0afSmrg#define XkbUI_Outlines 4 94382ff0afSmrg#define XkbUI_Logos 5 95382ff0afSmrg#define XkbUI_Sections 6 96382ff0afSmrg 97382ff0afSmrg /* 98382ff0afSmrg * legal values for 'which' field of a select call 99382ff0afSmrg */ 100382ff0afSmrg#define XkbUI_KeysMask (1<<0) 101382ff0afSmrg#define XkbUI_IndicatorsMask (1<<1) 102382ff0afSmrg#define XkbUI_TextLabelsMask (1<<2) 103382ff0afSmrg#define XkbUI_SolidShapesMask (1<<3) 104382ff0afSmrg#define XkbUI_OutlinesMask (1<<4) 105382ff0afSmrg#define XkbUI_LogosMask (1<<5) 106382ff0afSmrg#define XkbUI_SectionsMask (1<<6) 107382ff0afSmrg 108382ff0afSmrg /* 109382ff0afSmrg * legal values for key appearance flag 110382ff0afSmrg */ 111382ff0afSmrg#define XkbUI_KeyDown (1<<0) 112382ff0afSmrg#define XkbUI_Highlight (1<<1) 113382ff0afSmrg 114382ff0afSmrg_XFUNCPROTOBEGIN 115382ff0afSmrg 116382ff0afSmrgextern XkbUI_ViewPtr XkbUI_SimpleInit( 117382ff0afSmrg Display * /* dpy */, 118382ff0afSmrg Window /* win */, 119382ff0afSmrg int /* width */, 120382ff0afSmrg int /* height */ 121382ff0afSmrg); 122382ff0afSmrg 123382ff0afSmrgextern XkbUI_ViewPtr XkbUI_Init( 124382ff0afSmrg Display * /* dpy */, 125382ff0afSmrg Window /* win */, 126382ff0afSmrg int /* width */, 127382ff0afSmrg int /* height */, 128382ff0afSmrg XkbDescPtr /* xkb */, 129382ff0afSmrg XkbUI_ViewOptsPtr /* view */ 130382ff0afSmrg); 131382ff0afSmrg 132382ff0afSmrgextern Status XkbUI_SetViewOpts( 133382ff0afSmrg XkbUI_ViewPtr /* view */, 134382ff0afSmrg XkbUI_ViewOptsPtr /* opts */ 135382ff0afSmrg); 136382ff0afSmrg 137382ff0afSmrgextern Status XbUI_GetViewOpts( 138382ff0afSmrg XkbUI_ViewPtr /* view */, 139382ff0afSmrg XkbUI_ViewOptsPtr /* opts_rtrn */ 140382ff0afSmrg); 141382ff0afSmrg 142382ff0afSmrgextern Status XkbUI_SetCanvasSize( 143382ff0afSmrg XkbUI_ViewPtr /* view */, 144382ff0afSmrg int /* width */, 145382ff0afSmrg int /* height */ 146382ff0afSmrg); 147382ff0afSmrg 148382ff0afSmrgextern Status XkbUI_GetCanvasSize( 149382ff0afSmrg XkbUI_ViewPtr /* view */, 150382ff0afSmrg int * /* width_rtrn */, 151382ff0afSmrg int * /* height_rtrn */ 152382ff0afSmrg); 153382ff0afSmrg 154382ff0afSmrgextern Bool XkbUI_SetKeyAppearance( 155382ff0afSmrg XkbUI_ViewPtr /* view */, 156382ff0afSmrg KeyCode /* kc */, 157382ff0afSmrg unsigned /* flags */ 158382ff0afSmrg); 159382ff0afSmrg 160382ff0afSmrgextern Bool XkbUI_SetKeyAppearanceByName( 161382ff0afSmrg XkbUI_ViewPtr /* view */, 162382ff0afSmrg XkbKeyNamePtr /* name */, 163382ff0afSmrg unsigned /* flags */ 164382ff0afSmrg); 165382ff0afSmrg 166382ff0afSmrgextern Bool XkbUI_ResetKeyAppearance( 167382ff0afSmrg XkbUI_ViewPtr /* view */, 168382ff0afSmrg unsigned int /* mask */, 169382ff0afSmrg unsigned int /* values */ 170382ff0afSmrg); 171382ff0afSmrg 172382ff0afSmrgextern Bool XkbUI_DrawRegion( 173382ff0afSmrg XkbUI_ViewPtr /* view */, 174382ff0afSmrg XRectangle * /* viewport */ 175382ff0afSmrg); 176382ff0afSmrg 177382ff0afSmrgextern Bool XkbUI_DrawChanged( 178382ff0afSmrg XkbUI_ViewPtr /* view */, 179382ff0afSmrg XRectangle * /* viewport */, 180382ff0afSmrg XkbChangesPtr /* changes */, 181382ff0afSmrg int /* num_keys */, 182382ff0afSmrg XkbKeyNamePtr /* keys */ 183382ff0afSmrg); 184382ff0afSmrg 185382ff0afSmrgextern Bool XkbUI_Select( 186382ff0afSmrg XkbUI_ViewPtr /* view */, 187382ff0afSmrg XPoint * /* coord */, 188382ff0afSmrg unsigned int /* which */, 189382ff0afSmrg XkbSectionPtr /* section */ 190382ff0afSmrg); 191382ff0afSmrg 192382ff0afSmrg_XFUNCPROTOEND 193382ff0afSmrg 194382ff0afSmrg#endif /* XKBUI_H */ 195