diff options
Diffstat (limited to 'include/X11/extensions')
-rw-r--r-- | include/X11/extensions/XKBbells.h | 146 | ||||
-rw-r--r-- | include/X11/extensions/XKBconfig.h | 299 | ||||
-rw-r--r-- | include/X11/extensions/XKBfile.h | 601 | ||||
-rw-r--r-- | include/X11/extensions/XKBrules.h | 264 | ||||
-rw-r--r-- | include/X11/extensions/XKM.h | 70 | ||||
-rw-r--r-- | include/X11/extensions/XKMformat.h | 299 |
6 files changed, 1679 insertions, 0 deletions
diff --git a/include/X11/extensions/XKBbells.h b/include/X11/extensions/XKBbells.h new file mode 100644 index 0000000..2b6865f --- /dev/null +++ b/include/X11/extensions/XKBbells.h @@ -0,0 +1,146 @@ +#ifndef _XKBBELLS_H_ +#define _XKBBELLS_H_ 1 + +/* $Xorg: XKBbells.h,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ +/************************************************************ + Copyright (c) 1995 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. + + ********************************************************/ + +#define XkbBN_Info "Info" +#define XkbBN_Warning "Warning" +#define XkbBN_MinorError "MinorError" +#define XkbBN_MajorError "MajorError" +#define XkbBN_BadValue "BadValue" +#define XkbBN_InvalidLocation "InvalidLocation" +#define XkbBN_Question "Question" +#define XkbBN_Start "Start" +#define XkbBN_End "End" +#define XkbBN_Success "Success" +#define XkbBN_Failure "Failure" +#define XkbBN_Wait "Wait" +#define XkbBN_Proceed "Proceed" +#define XkbBN_Ignore "Ignore" +#define XkbBN_Iconify "Iconify" +#define XkbBN_Deiconify "Deconify" +#define XkbBN_Open "Open" +#define XkbBN_Close "Close" +#define XkbBN_TerminalBell "TerminalBell" +#define XkbBN_MarginBell "MarginBell" +#define XkbBN_CursorStuck "CursorStuck" +#define XkbBN_NewMail "NewMail" +#define XkbBN_LaunchApp "LaunchApp" +#define XkbBN_AppDeath "AppDeath" +#define XkbBN_ImAlive "ImAlive" +#define XkbBN_ClockChimeHour "ClockChimeHour" +#define XkbBN_ClockChimeHalf "ClockChimeHalf" +#define XkbBN_ClockChimeQuarter "ClockChimeQuarter" +#define XkbBN_RepeatingLastBell "RepeatingLastBell" +#define XkbBN_ComposeFail "ComposeFail" +#define XkbBN_AX_FeatureOn "AX_FeatureOn" +#define XkbBN_AX_FeatureOff "AX_FeatureOff" +#define XkbBN_AX_FeatureChange "AX_FeatureChange" +#define XkbBN_AX_IndicatorOn "AX_IndicatorOn" +#define XkbBN_AX_IndicatorOff "AX_IndicatorOff" +#define XkbBN_AX_IndicatorChange "AX_IndicatorChange" +#define XkbBN_AX_SlowKeysWarning "AX_SlowKeysWarning" +#define XkbBN_AX_SlowKeyPress "AX_SlowKeyPress" +#define XkbBN_AX_SlowKeyAccept "AX_SlowKeyAccept" +#define XkbBN_AX_SlowKeyReject "AX_SlowKeyReject" +#define XkbBN_AX_SlowKeyRelease "AX_SlowKeyRelease" +#define XkbBN_AX_BounceKeyReject "AX_BounceKeyReject" +#define XkbBN_AX_StickyLatch "AX_StickyLatch" +#define XkbBN_AX_StickyLock "AX_StickyLock" +#define XkbBN_AX_StickyUnlock "AX_StickyUnlock" + +#define XkbBI_Info 0 +#define XkbBI_Warning 1 +#define XkbBI_MinorError 2 +#define XkbBI_MajorError 3 +#define XkbBI_BadValue 4 +#define XkbBI_InvalidLocation 5 +#define XkbBI_Question 6 +#define XkbBI_Start 7 +#define XkbBI_End 8 +#define XkbBI_Success 9 +#define XkbBI_Failure 10 +#define XkbBI_Wait 11 +#define XkbBI_Proceed 12 +#define XkbBI_Ignore 13 +#define XkbBI_Iconify 14 +#define XkbBI_Deiconify 15 +#define XkbBI_Open 16 +#define XkbBI_Close 17 +#define XkbBI_TerminalBell 18 +#define XkbBI_MarginBell 19 +#define XkbBI_CursorStuck 20 +#define XkbBI_NewMail 21 +#define XkbBI_LaunchApp 22 +#define XkbBI_AppDeath 23 +#define XkbBI_ImAlive 24 +#define XkbBI_ClockChimeHour 25 +#define XkbBI_ClockChimeHalf 26 +#define XkbBI_ClockChimeQuarter 27 +#define XkbBI_RepeatingLastBell 28 +#define XkbBI_ComposeFail 29 +#define XkbBI_AX_FeatureOn 30 +#define XkbBI_AX_FeatureOff 31 +#define XkbBI_AX_FeatureChange 32 +#define XkbBI_AX_IndicatorOn 33 +#define XkbBI_AX_IndicatorOff 34 +#define XkbBI_AX_IndicatorChange 35 +#define XkbBI_AX_SlowKeysWarning 36 +#define XkbBI_AX_SlowKeyPress 37 +#define XkbBI_AX_SlowKeyAccept 38 +#define XkbBI_AX_SlowKeyReject 39 +#define XkbBI_AX_SlowKeyRelease 40 +#define XkbBI_AX_BounceKeyReject 41 +#define XkbBI_AX_StickyLatch 42 +#define XkbBI_AX_StickyLock 43 +#define XkbBI_AX_StickyUnlock 44 +#define XkbBI_NumBells 45 + +_XFUNCPROTOBEGIN + +extern Bool XkbStdBell( +#if NeedFunctionPrototypes + Display * /* dpy */, + Window /* win */, + int /* percent */, + int /* bellDef */ +#endif +); + +extern Bool XkbStdBellEvent( +#if NeedFunctionPrototypes + Display * /* dpy */, + Window /* win */, + int /* percent */, + int /* bellDef */ +#endif +); + +_XFUNCPROTOEND + +#endif /* _XKBBELLS_H_ */ diff --git a/include/X11/extensions/XKBconfig.h b/include/X11/extensions/XKBconfig.h new file mode 100644 index 0000000..5c38b6f --- /dev/null +++ b/include/X11/extensions/XKBconfig.h @@ -0,0 +1,299 @@ +#ifndef _XKBCONFIG_H_ +#define _XKBCONFIG_H_ 1 + +/* $Xorg: XKBconfig.h,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ +/************************************************************ + Copyright (c) 1995 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. + + ********************************************************/ + + +typedef struct _XkbConfigRtrn *XkbConfigRtrnPtr; +typedef struct _XkbConfigField *XkbConfigFieldPtr; +typedef struct _XkbConfigFields *XkbConfigFieldsPtr; + +typedef Bool (*XkbConfigParseFunc)( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbConfigFieldsPtr /* fields */, + XkbConfigFieldPtr /* field */, + XkbDescPtr /* xkb */, + XkbConfigRtrnPtr /* rtrn */ +#endif +); + +#define XkbCF_Check 0 +#define XkbCF_Apply 1 +#define XkbCF_CleanUp 2 +#define XkbCF_Destroy 3 + +typedef Bool (*XkbConfigFinishFunc)( +#if NeedFunctionPrototypes + XkbConfigFieldsPtr /* fields */, + XkbDescPtr /* xkb */, + XkbConfigRtrnPtr /* rtrn */, + int /* what */ +#endif +); + +typedef struct _XkbConfigRtrnPriv { + int cfg_id; + XPointer priv; + struct _XkbConfigRtrnPriv * next; +} XkbConfigRtrnPrivRec,*XkbConfigRtrnPrivPtr; + +typedef struct _XkbConfigModInfo { + Bool replace; + unsigned char mods; + unsigned char mods_clear; + unsigned short vmods; + unsigned short vmods_clear; +} XkbConfigModInfoRec,*XkbConfigModInfoPtr; + +typedef struct _XkbConfigUnboundMod { + unsigned char what; + unsigned char mods; + unsigned short vmods; + short merge; + char * name; +} XkbConfigUnboundModRec,*XkbConfigUnboundModPtr; + +#define XkbCF_MergeSet 0 +#define XkbCF_MergeAdd 1 +#define XkbCF_MergeRemove 2 + +#define XkbCF_InitialMods (1L<<0) +#define XkbCF_InternalMods (1L<<1) +#define XkbCF_IgnoreLockMods (1L<<2) +#define XkbCF_InitialCtrls (1L<<3) +#define XkbCF_AccessXTimeout (1L<<4) +#define XkbCF_AccessXTimeoutCtrlsOn (1L<<5) +#define XkbCF_AccessXTimeoutCtrlsOff (1L<<6) +#define XkbCF_AccessXTimeoutOptsOn (1L<<7) +#define XkbCF_AccessXTimeoutOptsOff (1L<<8) +#define XkbCF_GroupsWrap (1L<<9) + +typedef struct _XkbConfigRtrn { + unsigned defined; + int error; + int line; + + int click_volume; + int bell_volume; + int bell_pitch; + int bell_duration; + int repeat_delay; + int repeat_interval; + + char * rules_file; + char * model; + char * layout; + char * variant; + char * options; + + char * keymap; + char * keycodes; + char * geometry; + char * phys_symbols; + char * symbols; + char * types; + char * compat; + Bool replace_initial_ctrls; + unsigned long initial_ctrls; + unsigned long initial_ctrls_clear; + + XkbConfigModInfoRec initial_mods; + XkbConfigModInfoRec internal_mods; + XkbConfigModInfoRec ignore_lock_mods; + + short num_unbound_mods; + short sz_unbound_mods; + XkbConfigUnboundModPtr unbound_mods; + + int groups_wrap; + int slow_keys_delay; + int debounce_delay; + int mk_delay; + int mk_interval; + int mk_time_to_max; + int mk_max_speed; + int mk_curve; + int ax_timeout; + + Bool replace_axt_ctrls_on; + Bool replace_axt_ctrls_off; + unsigned long axt_ctrls_on; + unsigned long axt_ctrls_off; + unsigned long axt_ctrls_ignore; + + Bool replace_axt_opts_off; + Bool replace_axt_opts_on; + unsigned short axt_opts_off; + unsigned short axt_opts_on; + unsigned short axt_opts_ignore; + XkbConfigRtrnPrivPtr priv; +} XkbConfigRtrnRec; + +typedef struct _XkbConfigField { + char * field; + unsigned char field_id; +} XkbConfigFieldRec; + +typedef struct _XkbConfigFields { + unsigned short cfg_id; + unsigned short num_fields; + XkbConfigFieldPtr fields; + XkbConfigParseFunc parser; + XkbConfigFinishFunc finish; + XPointer priv; + struct _XkbConfigFields *next; +} XkbConfigFieldsRec; + +#define XkbCF_EOF -1 +#define XkbCF_Unknown 0 +#define XkbCF_EOL 1 +#define XkbCF_Semi 2 +#define XkbCF_Equals 3 +#define XkbCF_PlusEquals 4 +#define XkbCF_MinusEquals 5 +#define XkbCF_Plus 6 +#define XkbCF_Minus 7 +#define XkbCF_String 10 +#define XkbCF_Ident 11 +#define XkbCF_Integer 12 + +#define XkbCF_UnterminatedString 100 +#define XkbCF_BadAlloc 101 +#define XkbCF_MissingIdent 102 +#define XkbCF_MissingEquals 103 +#define XkbCF_ExpectedEOS 104 +#define XkbCF_ExpectedBoolean 105 +#define XkbCF_ExpectedInteger 106 +#define XkbCF_ExpectedString 107 +#define XkbCF_ExpectedModifier 108 +#define XkbCF_ExpectedControl 109 +#define XkbCF_ExpectedAXOption 110 +#define XkbCF_ExpectedOperator 111 +#define XkbCF_ExpectedOORGroupBehavior 112 + +typedef union { + int ival; + char * str; +} XkbCFScanResultRec,*XkbCFScanResultPtr; + +extern XkbConfigFieldsPtr XkbCFDflts; + +_XFUNCPROTOBEGIN + +extern int XkbCFScan( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbCFScanResultPtr /* val_rtrn */, + XkbConfigRtrnPtr /* rtrn */ +#endif +); + +extern XkbConfigFieldsPtr XkbCFDup( +#if NeedFunctionPrototypes + XkbConfigFieldsPtr /* fields */ +#endif +); + +extern XkbConfigFieldsPtr XkbCFFree( +#if NeedFunctionPrototypes + XkbConfigFieldsPtr /* fields */, + Bool /* all */ +#endif +); + +extern XkbConfigUnboundModPtr XkbCFAddModByName( +#if NeedFunctionPrototypes + XkbConfigRtrnPtr /* rtrn */, + int /* what */, + char * /* name */, + Bool /* merge */, + XkbConfigUnboundModPtr /* last */ +#endif +); + +extern Bool XkbCFBindMods( +#if NeedFunctionPrototypes + XkbConfigRtrnPtr /* rtrn */, + XkbDescPtr /* xkb */ +#endif +); + +extern Bool XkbCFApplyMods( +#if NeedFunctionPrototypes + XkbConfigRtrnPtr /* rtrn */, + int /* what */, + XkbConfigModInfoPtr /* info */ +#endif +); + +extern Bool XkbCFApplyRtrnValues( +#if NeedFunctionPrototypes + XkbConfigRtrnPtr /* rtrn */, + XkbConfigFieldsPtr /* fields */, + XkbDescPtr /* xkb */ +#endif +); + +extern XkbConfigRtrnPrivPtr XkbCFAddPrivate( +#if NeedFunctionPrototypes + XkbConfigRtrnPtr /* rtrn */, + XkbConfigFieldsPtr /* fields */, + XPointer /* ptr */ +#endif +); + +extern void XkbCFFreeRtrn( +#if NeedFunctionPrototypes + XkbConfigRtrnPtr /* rtrn */, + XkbConfigFieldsPtr /* fields */, + XkbDescPtr /* xkb */ +#endif +); + +extern Bool XkbCFParse( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbConfigFieldsPtr /* fields */, + XkbDescPtr /* xkb */, + XkbConfigRtrnPtr /* rtrn */ +#endif +); + +extern void XkbCFReportError( +#if NeedFunctionPrototypes + FILE * /* file */, + char * /* name */, + int /* error */, + int /* line */ +#endif +); + +_XFUNCPROTOEND + +#endif /* _XKBCONFIG_H_ */ diff --git a/include/X11/extensions/XKBfile.h b/include/X11/extensions/XKBfile.h new file mode 100644 index 0000000..2c7de2d --- /dev/null +++ b/include/X11/extensions/XKBfile.h @@ -0,0 +1,601 @@ +#ifndef _XKBFILE_H_ +#define _XKBFILE_H_ 1 + +/* $Xorg: XKBfile.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ +/************************************************************ + Copyright (c) 1994 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. + + ********************************************************/ + +/***====================================================================***/ + +#define XkbXKMFile 0 +#define XkbCFile 1 +#define XkbXKBFile 2 +#define XkbMessage 3 + +#define XkbMapDefined (1<<0) +#define XkbStateDefined (1<<1) + +typedef struct _XkbFileInfo { + unsigned type; + unsigned defined; + XkbDescPtr xkb; +} XkbFileInfo,*XkbFileInfoPtr; + +typedef void (*XkbFileAddOnFunc)( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + int /* fileSection */, + void * /* priv */ +#endif +); + +/***====================================================================***/ + +#define _XkbSuccess 0 +#define _XkbErrMissingNames 1 +#define _XkbErrMissingTypes 2 +#define _XkbErrMissingReqTypes 3 +#define _XkbErrMissingSymbols 4 +#define _XkbErrMissingVMods 5 +#define _XkbErrMissingIndicators 6 +#define _XkbErrMissingCompatMap 7 +#define _XkbErrMissingSymInterps 8 +#define _XkbErrMissingGeometry 9 +#define _XkbErrIllegalDoodad 10 +#define _XkbErrIllegalTOCType 11 +#define _XkbErrIllegalContents 12 +#define _XkbErrEmptyFile 13 +#define _XkbErrFileNotFound 14 +#define _XkbErrFileCannotOpen 15 +#define _XkbErrBadValue 16 +#define _XkbErrBadMatch 17 +#define _XkbErrBadTypeName 18 +#define _XkbErrBadTypeWidth 19 +#define _XkbErrBadFileType 20 +#define _XkbErrBadFileVersion 21 +#define _XkbErrBadFileFormat 22 +#define _XkbErrBadAlloc 23 +#define _XkbErrBadLength 24 +#define _XkbErrXReqFailure 25 +#define _XkbErrBadImplementation 26 + +extern char * _XkbErrMessages[]; +extern unsigned _XkbErrCode; +extern char * _XkbErrLocation; +extern unsigned _XkbErrData; + +/***====================================================================***/ + +_XFUNCPROTOBEGIN + +extern char * XkbIndentText( +#if NeedFunctionPrototypes + unsigned /* size */ +#endif +); + +extern char * XkbAtomText( +#if NeedFunctionPrototypes + Display * /* dpy */, + Atom /* atm */, + unsigned /* format */ +#endif +); + +extern char * XkbKeysymText( +#if NeedFunctionPrototypes + KeySym /* sym */, + unsigned /* format */ +#endif +); + +extern char * XkbStringText( +#if NeedFunctionPrototypes + char * /* str */, + unsigned /* format */ +#endif +); + +extern char * XkbKeyNameText( +#if NeedFunctionPrototypes + char * /* name */, + unsigned /* format */ +#endif +); + +extern char * +XkbModIndexText( +#if NeedFunctionPrototypes + unsigned /* ndx */, + unsigned /* format */ +#endif +); + +extern char * +XkbModMaskText( +#if NeedFunctionPrototypes + unsigned /* mask */, + unsigned /* format */ +#endif +); + +extern char * XkbVModIndexText( +#if NeedFunctionPrototypes + Display * /* dpy */, + XkbDescPtr /* xkb */, + unsigned /* ndx */, + unsigned /* format */ +#endif +); + +extern char * XkbVModMaskText( +#if NeedFunctionPrototypes + Display * /* dpy */, + XkbDescPtr /* xkb */, + unsigned /* modMask */, + unsigned /* mask */, + unsigned /* format */ +#endif +); + +extern char * XkbConfigText( +#if NeedFunctionPrototypes + unsigned /* config */, + unsigned /* format */ +#endif +); + +extern char * XkbSIMatchText( +#if NeedFunctionPrototypes + unsigned /* type */, + unsigned /* format */ +#endif +); + +extern char * XkbIMWhichStateMaskText( +#if NeedFunctionPrototypes + unsigned /* use_which */, + unsigned /* format */ +#endif +); + +extern char * XkbAccessXDetailText( +#if NeedFunctionPrototypes + unsigned /* state */, + unsigned /* format */ +#endif +); + +extern char * XkbNKNDetailMaskText( +#if NeedFunctionPrototypes + unsigned /* detail */, + unsigned /* format */ +#endif +); + +extern char * XkbControlsMaskText( +#if NeedFunctionPrototypes + unsigned /* ctrls */, + unsigned /* format */ +#endif +); + +extern char * XkbGeomFPText( +#if NeedFunctionPrototypes + int /* val */, + unsigned /* format */ +#endif +); + +extern char * XkbDoodadTypeText( +#if NeedFunctionPrototypes + unsigned /* type */, + unsigned /* format */ +#endif +); + +extern char * XkbActionTypeText( +#if NeedFunctionPrototypes + unsigned /* type */, + unsigned /* format */ +#endif +); + +extern char * XkbActionText( +#if NeedFunctionPrototypes + Display * /* dpy */, + XkbDescPtr /* xkb */, + XkbAction * /* action */, + unsigned /* format */ +#endif +); + +extern char * XkbBehaviorText( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + XkbBehavior * /* behavior */, + unsigned /* format */ +#endif +); + +/***====================================================================***/ + +#define _XkbKSLower (1<<0) +#define _XkbKSUpper (1<<1) + +#define XkbKSIsLower(k) (_XkbKSCheckCase(k)&_XkbKSLower) +#define XkbKSIsUpper(k) (_XkbKSCheckCase(k)&_XkbKSUpper) +#define XkbKSIsKeypad(k) (((k)>=XK_KP_Space)&&((k)<=XK_KP_Equal)) +#define XkbKSIsDeadKey(k) \ + (((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound)) + +extern unsigned _XkbKSCheckCase( +#if NeedFunctionPrototypes + KeySym /* sym */ +#endif +); + +extern int XkbFindKeycodeByName( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + char * /* name */, + Bool /* use_aliases */ +#endif +); + +extern Bool XkbLookupGroupAndLevel( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + int /* key */, + int * /* mods_inout */, + int * /* grp_inout */, + int * /* lvl_rtrn */ +#endif +); + +/***====================================================================***/ + +#ifndef XKB_IN_SERVER + +extern Bool XkbLookupCanonicalRGBColor( +#if NeedFunctionPrototypes + char * /* def */, + XColor * /* color */ +#endif +); + +#endif + +/***====================================================================***/ + +extern char * XkbAtomGetString( +#if NeedFunctionPrototypes + Display * /* dpy */, + Atom /* atm */ +#endif +); + +extern Atom XkbInternAtom( +#if NeedFunctionPrototypes + Display * /* dpy */, + char * /* name */, + Bool /* onlyIfExists */ +#endif +); + +extern Status XkbChangeKbdDisplay( +#if NeedFunctionPrototypes + Display * /* newDpy */, + XkbFileInfo * /* result */ +#endif +); + +extern Atom XkbChangeAtomDisplay( +#if NeedFunctionPrototypes + Display * /* oldDpy */, + Display * /* newDpy */, + Atom /* atm */ +#endif +); + +extern void XkbInitAtoms( +#if NeedFunctionPrototypes + Display * /* dpy */ +#endif +); + +/***====================================================================***/ + +#ifdef _XKBGEOM_H_ + +#define XkbDW_Unknown 0 +#define XkbDW_Doodad 1 +#define XkbDW_Section 2 +typedef struct _XkbDrawable { + int type; + int priority; + union { + XkbDoodadPtr doodad; + XkbSectionPtr section; + } u; + struct _XkbDrawable * next; +} XkbDrawableRec,*XkbDrawablePtr; + +extern XkbDrawablePtr +XkbGetOrderedDrawables( +#if NeedFunctionPrototypes + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */ +#endif +); + +extern void +XkbFreeOrderedDrawables( +#if NeedFunctionPrototypes + XkbDrawablePtr /* draw */ +#endif +); + +#endif + +/***====================================================================***/ + +extern unsigned XkbConvertGetByNameComponents( +#if NeedFunctionPrototypes + Bool /* toXkm */, + unsigned /* orig */ +#endif +); + +extern unsigned XkbConvertXkbComponents( +#if NeedFunctionPrototypes + Bool /* toXkm */, + unsigned /* orig */ +#endif +); + +extern Bool XkbDetermineFileType( +#if NeedFunctionPrototypes + XkbFileInfo * /* xkb */, + int /* format */, + int * /* opts_missing */ +#endif +); + +extern Bool XkbNameMatchesPattern( +#if NeedFunctionPrototypes + char * /* name */, + char * /* pattern */ +#endif +); + +/***====================================================================***/ + +extern Bool XkbWriteXKBKeycodes( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +#endif +); + +extern Bool XkbWriteXKBKeyTypes( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +#endif +); + +extern Bool XkbWriteXKBCompatMap( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +#endif +); + +extern Bool XkbWriteXKBSymbols( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +#endif +); + +extern Bool XkbWriteXKBGeometry( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +#endif +); + +extern Bool XkbWriteXKBSemantics( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +#endif +); + +extern Bool XkbWriteXKBLayout( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +#endif +); + +extern Bool XkbWriteXKBKeymap( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +#endif +); + +extern Bool XkbWriteXKBFile( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +#endif +); + +extern Bool XkbWriteCFile( +#if NeedFunctionPrototypes + FILE * /* file */, + char * /* name */, + XkbFileInfo * /* info */ +#endif +); + +extern Bool XkbWriteXKMFile( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbFileInfo * /* result */ +#endif +); + +extern Bool XkbWriteToServer( +#if NeedFunctionPrototypes + XkbFileInfo * /* result */ +#endif +); + +extern void XkbEnsureSafeMapName( +#if NeedFunctionPrototypes + char * /* name */ +#endif +); + +extern Bool XkbWriteXKBKeymapForNames( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbComponentNamesPtr /* names */, + Display * /* dpy */, + XkbDescPtr /* xkb */, + unsigned /* want */, + unsigned /* need */ +#endif +); + +/***====================================================================***/ + +extern Bool XkmProbe( +#if NeedFunctionPrototypes + FILE * /* file */ +#endif +); + +extern unsigned XkbReadFromServer( +#if NeedFunctionPrototypes + Display * /* dpy */, + unsigned /* need */, + unsigned /* want */, + XkbFileInfo * /* result */ +#endif +); + +extern unsigned XkmReadFile( +#if NeedFunctionPrototypes + FILE * /* file */, + unsigned /* need */, + unsigned /* want */, + XkbFileInfo * /* result */ +#endif +); + +#ifdef _XKMFORMAT_H_ + +extern Bool XkmReadTOC( +#if NeedFunctionPrototypes + FILE * /* file */, + xkmFileInfo * /* file_info */, + int /* max_toc */, + xkmSectionInfo * /* toc */ +#endif +); + +extern xkmSectionInfo *XkmFindTOCEntry( +#if NeedFunctionPrototypes + xkmFileInfo * /* finfo */, + xkmSectionInfo * /* toc */, + unsigned /* type */ +#endif +); + +extern Bool XkmReadFileSection( +#if NeedFunctionPrototypes + FILE * /* file */, + xkmSectionInfo * /* toc */, + XkbFileInfo * /* result */, + unsigned * /* loaded_rtrn */ +#endif +); + +extern char * XkmReadFileSectionName( +#if NeedFunctionPrototypes + FILE * /* file */, + xkmSectionInfo * /* toc */ +#endif +); + +#endif /* _XKMFORMAT_H */ + +_XFUNCPROTOEND + +#endif /* _XKBFILE_H_ */ diff --git a/include/X11/extensions/XKBrules.h b/include/X11/extensions/XKBrules.h new file mode 100644 index 0000000..ffc5138 --- /dev/null +++ b/include/X11/extensions/XKBrules.h @@ -0,0 +1,264 @@ +#ifndef _XKBRULES_H_ +#define _XKBRULES_H_ 1 + +/* $Xorg: XKBrules.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ +/************************************************************ + Copyright (c) 1996 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. + + ********************************************************/ + +/***====================================================================***/ + +typedef struct _XkbRF_VarDefs { + char * model; + char * layout; + char * variant; + char * options; + unsigned short sz_extra; + unsigned short num_extra; + char * extra_names; + char ** extra_values; +} XkbRF_VarDefsRec,*XkbRF_VarDefsPtr; + +typedef struct _XkbRF_VarDesc { + char * name; + char * desc; +} XkbRF_VarDescRec, *XkbRF_VarDescPtr; + +typedef struct _XkbRF_DescribeVars { + int sz_desc; + int num_desc; + XkbRF_VarDescPtr desc; +} XkbRF_DescribeVarsRec,*XkbRF_DescribeVarsPtr; + +typedef struct _XkbRF_Rule { + char * model; + char * layout; + char * variant; + char * option; + /* yields */ + char * keycodes; + char * symbols; + char * types; + char * compat; + char * geometry; + char * keymap; + unsigned flags; +} XkbRF_RuleRec,*XkbRF_RulePtr; + +#define XkbRF_PendingMatch (1L<<1) +#define XkbRF_Delayed (1L<<2) +#define XkbRF_Append (1L<<3) +#define XkbRF_Invalid (1L<<4) + +typedef struct _XkbRF_Rules { + XkbRF_DescribeVarsRec models; + XkbRF_DescribeVarsRec layouts; + XkbRF_DescribeVarsRec variants; + XkbRF_DescribeVarsRec options; + unsigned short sz_extra; + unsigned short num_extra; + char ** extra_names; + XkbRF_DescribeVarsPtr extra; + + unsigned short sz_rules; + unsigned short num_rules; + XkbRF_RulePtr rules; +} XkbRF_RulesRec, *XkbRF_RulesPtr; + +/***====================================================================***/ + +_XFUNCPROTOBEGIN + +extern Bool XkbRF_ApplyRule( +#if NeedFunctionPrototypes + XkbRF_RulePtr /* rule */, + XkbComponentNamesPtr /* names */ +#endif +); + +extern Bool XkbRF_CheckApplyRule( +#if NeedFunctionPrototypes + XkbRF_RulePtr /* rule */, + XkbRF_VarDefsPtr /* defs */, + XkbComponentNamesPtr /* names */ +#endif +); + +extern void XkbRF_ClearPartialMatches( +#if NeedFunctionPrototypes + XkbRF_RulesPtr /* rules */ +#endif +); + +extern Bool XkbRF_ApplyPartialMatches( +#if NeedFunctionPrototypes + XkbRF_RulesPtr /* rules */, + XkbComponentNamesPtr /* names */ +#endif +); + +extern void XkbRF_CheckApplyDelayedRules( +#if NeedFunctionPrototypes + XkbRF_RulesPtr /* rules */, + XkbRF_VarDefsPtr /* defs */, + XkbComponentNamesPtr /* names */ +#endif +); + +extern Bool XkbRF_CheckApplyRules( +#if NeedFunctionPrototypes + XkbRF_RulesPtr /* rules */, + XkbRF_VarDefsPtr /* defs */, + XkbComponentNamesPtr /* names */ +#endif +); + +extern char * XkbRF_SubstituteVars( +#if NeedFunctionPrototypes + char * /* p_name */, + XkbRF_VarDefsPtr /* defs */ +#endif +); + +extern Bool XkbRF_GetComponents( +#if NeedFunctionPrototypes + XkbRF_RulesPtr /* rules */, + XkbRF_VarDefsPtr /* var_defs */, + XkbComponentNamesPtr /* names */ +#endif +); + +extern XkbRF_RulePtr XkbRF_AddRule( +#if NeedFunctionPrototypes + XkbRF_RulesPtr /* rules */ +#endif +); + +extern Bool XkbRF_LoadRules( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbRF_RulesPtr /* rules */ +#endif +); + +extern Bool XkbRF_LoadRulesByName( +#if NeedFunctionPrototypes + char * /* base */, + char * /* locale */, + XkbRF_RulesPtr /* rules */ +#endif +); + +/***====================================================================***/ + +extern XkbRF_VarDescPtr XkbRF_AddVarDesc( +#if NeedFunctionPrototypes + XkbRF_DescribeVarsPtr /* vars */ +#endif +); + +extern XkbRF_VarDescPtr XkbRF_AddVarDescCopy( +#if NeedFunctionPrototypes + XkbRF_DescribeVarsPtr /* vars */, + XkbRF_VarDescPtr /* copy_from */ +#endif +); + +extern XkbRF_DescribeVarsPtr XkbRF_AddVarToDescribe( +#if NeedFunctionPrototypes + XkbRF_RulesPtr /* rules */, + char * /* name */ +#endif +); + +extern Bool XkbRF_LoadDescriptions( +#if NeedFunctionPrototypes + FILE * /* file */, + XkbRF_RulesPtr /* rules */ +#endif +); + +extern Bool XkbRF_LoadDescriptionsByName( +#if NeedFunctionPrototypes + char * /* base */, + char * /* locale */, + XkbRF_RulesPtr /* rules */ +#endif +); + +extern XkbRF_RulesPtr XkbRF_Load( +#if NeedFunctionPrototypes + char * /* base */, + char * /* locale */, + Bool /* wantDesc */, + Bool /* wantRules */ +#endif +); + +extern XkbRF_RulesPtr XkbRF_Create( +#if NeedFunctionPrototypes + int /* sz_rules */, + int /* sz_extra */ +#endif +); + +/***====================================================================***/ + +extern void XkbRF_Free( +#if NeedFunctionPrototypes + XkbRF_RulesPtr /* rules */, + Bool /* freeRules */ +#endif +); + + +/***====================================================================***/ + +#define _XKB_RF_NAMES_PROP_ATOM "_XKB_RULES_NAMES" +#define _XKB_RF_NAMES_PROP_MAXLEN 1024 + +#ifndef XKB_IN_SERVER + +extern Bool XkbRF_GetNamesProp( +#if NeedFunctionPrototypes + Display * /* dpy */, + char ** /* rules_file_rtrn */, + XkbRF_VarDefsPtr /* var_defs_rtrn */ +#endif +); + +extern Bool XkbRF_SetNamesProp( +#if NeedFunctionPrototypes + Display * /* dpy */, + char * /* rules_file */, + XkbRF_VarDefsPtr /* var_defs */ +#endif +); + +#endif + +_XFUNCPROTOEND + +#endif /* _XKBRULES_H_ */ diff --git a/include/X11/extensions/XKM.h b/include/X11/extensions/XKM.h new file mode 100644 index 0000000..c6c9f51 --- /dev/null +++ b/include/X11/extensions/XKM.h @@ -0,0 +1,70 @@ +/* $Xorg: XKM.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ +/************************************************************ + Copyright (c) 1994 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 XKM_H +#define XKM_H 1 + +#define XkmFileVersion 15 + +#define XkmIllegalFile -1 +#define XkmSemanticsFile 20 +#define XkmLayoutFile 21 +#define XkmKeymapFile 22 +#define XkmGeometryFile 23 + +#define XkmTypesIndex 0 +#define XkmCompatMapIndex 1 +#define XkmSymbolsIndex 2 +#define XkmIndicatorsIndex 3 +#define XkmKeyNamesIndex 4 +#define XkmGeometryIndex 5 +#define XkmVirtualModsIndex 6 +#define XkmLastIndex XkmVirtualModsIndex + +#define XkmTypesMask (1<<0) +#define XkmCompatMapMask (1<<1) +#define XkmSymbolsMask (1<<2) +#define XkmIndicatorsMask (1<<3) +#define XkmKeyNamesMask (1<<4) +#define XkmGeometryMask (1<<5) +#define XkmVirtualModsMask (1<<6) +#define XkmLegalIndexMask (0x7f) +#define XkmAllIndicesMask (0x7f) + +#define XkmSemanticsRequired (XkmCompatMapMask) +#define XkmSemanticsOptional (XkmTypesMask|XkmVirtualModsMask|XkmIndicatorsMask) +#define XkmSemanticsLegal (XkmSemanticsRequired|XkmSemanticsOptional) +#define XkmLayoutRequired (XkmKeyNamesMask|XkmSymbolsMask|XkmTypesMask) +#define XkmLayoutOptional (XkmVirtualModsMask|XkmGeometryMask) +#define XkmLayoutLegal (XkmLayoutRequired|XkmLayoutOptional) +#define XkmKeymapRequired (XkmSemanticsRequired|XkmLayoutRequired) +#define XkmKeymapOptional ((XkmSemanticsOptional|XkmLayoutOptional)&(~XkmKeymapRequired)) +#define XkmKeymapLegal (XkmKeymapRequired|XkmKeymapOptional) + +#define XkmLegalSection(m) (((m)&(~XkmKeymapLegal))==0) +#define XkmSingleSection(m) (XkmLegalSection(m)&&(((m)&(~(m)+1))==(m))) + +#endif /* XKM_H */ diff --git a/include/X11/extensions/XKMformat.h b/include/X11/extensions/XKMformat.h new file mode 100644 index 0000000..9e70845 --- /dev/null +++ b/include/X11/extensions/XKMformat.h @@ -0,0 +1,299 @@ +/* $Xorg: XKMformat.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ +/************************************************************ + Copyright (c) 1994 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 _XKMFORMAT_H_ +#define _XKMFORMAT_H_ 1 + +#include <X11/extensions/XKB.h> +#include <X11/extensions/XKBproto.h> +#include "XKM.h" + +typedef struct _xkmFileInfo { + CARD8 type; + CARD8 min_kc; + CARD8 max_kc; + CARD8 num_toc; + CARD16 present B16; + CARD16 pad B16; +} xkmFileInfo; +#define sz_xkmFileInfo 8 + +typedef struct _xkmSectionInfo { + CARD16 type B16; + CARD16 format B16; + CARD16 size B16; + CARD16 offset B16; +} xkmSectionInfo; +#define sz_xkmSectionInfo 8 + +typedef struct _xkmKeyTypeDesc { + CARD8 realMods; + CARD8 numLevels; + CARD16 virtualMods B16; + CARD8 nMapEntries; + CARD8 nLevelNames; + CARD8 preserve; + CARD8 pad; +} xkmKeyTypeDesc; +#define sz_xkmKeyTypeDesc 8 + +typedef struct _xkmKTMapEntryDesc { + CARD8 level; + CARD8 realMods; + CARD16 virtualMods B16; +} xkmKTMapEntryDesc; +#define sz_xkmKTMapEntryDesc 4 + +typedef struct _xkmModsDesc { + CARD8 realMods; + CARD8 pad; + CARD16 virtualMods B16; +} xkmModsDesc; +#define sz_xkmModsDesc 4 + +typedef struct _xkmVModMapDesc { + CARD8 key; + CARD8 pad; + CARD16 vmods B16; +} xkmVModMapDesc; +#define sz_xkmVModMapDesc 4 + +typedef struct _xkmSymInterpretDesc { + CARD32 sym B32; + CARD8 mods; + CARD8 match; + CARD8 virtualMod; + CARD8 flags; + CARD8 actionType; + CARD8 actionData[7]; +} xkmSymInterpretDesc; +#define sz_xkmSymInterpretDesc 16 + +typedef struct _xkmBehaviorDesc { + CARD8 type; + CARD8 data; + CARD16 pad B16; +} xkmBehaviorDesc; +#define sz_xkmBehaviorDesc 4 + +typedef struct _xkmActionDesc { + CARD8 type; + CARD8 data[7]; +} xkmActionDesc; +#define sz_xkmActionDesc 8 + +#define XkmKeyHasTypes (0x0f) +#define XkmKeyHasGroup1Type (1<<0) +#define XkmKeyHasGroup2Type (1<<1) +#define XkmKeyHasGroup3Type (1<<2) +#define XkmKeyHasGroup4Type (1<<3) +#define XkmKeyHasActions (1<<4) +#define XkmKeyHasBehavior (1<<5) +#define XkmRepeatingKey (1<<6) +#define XkmNonRepeatingKey (1<<7) + +typedef struct _xkmKeySymMapDesc { + CARD8 width; + CARD8 num_groups; + CARD8 modifier_map; + CARD8 flags; +} xkmKeySymMapDesc; +#define sz_xkmKeySymMapDesc 4 + +typedef struct _xkmIndicatorMapDesc { + CARD8 indicator; + CARD8 flags; + CARD8 which_mods; + CARD8 real_mods; + CARD16 vmods B16; + CARD8 which_groups; + CARD8 groups; + CARD32 ctrls B32; +} xkmIndicatorMapDesc; +#define sz_xkmIndicatorMapDesc 12 + +typedef struct _xkmGeometryDesc { + CARD16 width_mm B16; + CARD16 height_mm B16; + CARD8 base_color_ndx; + CARD8 label_color_ndx; + CARD16 num_properties B16; + CARD16 num_colors B16; + CARD16 num_shapes B16; + CARD16 num_sections B16; + CARD16 num_doodads B16; + CARD16 num_key_aliases B16; + CARD16 pad1 B16; +} xkmGeometryDesc; +#define sz_xkmGeometryDesc 20 + +typedef struct _xkmPointDesc { + INT16 x B16; + INT16 y B16; +} xkmPointDesc; +#define sz_xkmPointDesc 4 + +typedef struct _xkmOutlineDesc { + CARD8 num_points; + CARD8 corner_radius; + CARD16 pad B16; +} xkmOutlineDesc; +#define sz_xkmOutlineDesc 4 + +typedef struct _xkmShapeDesc { + CARD8 num_outlines; + CARD8 primary_ndx; + CARD8 approx_ndx; + CARD8 pad; +} xkmShapeDesc; +#define sz_xkmShapeDesc 4 + +typedef struct _xkmSectionDesc { + INT16 top B16; + INT16 left B16; + CARD16 width B16; + CARD16 height B16; + INT16 angle B16; + CARD8 priority; + CARD8 num_rows; + CARD8 num_doodads; + CARD8 num_overlays; + CARD16 pad2 B16; +} xkmSectionDesc; +#define sz_xkmSectionDesc 16 + +typedef struct _xkmRowDesc { + INT16 top B16; + INT16 left B16; + CARD8 num_keys; + BOOL vertical; + CARD16 pad B16; +} xkmRowDesc; +#define sz_xkmRowDesc 8 + +typedef struct _xkmKeyDesc { + CARD8 name[XkbKeyNameLength]; + INT16 gap B16; + CARD8 shape_ndx; + CARD8 color_ndx; +} xkmKeyDesc; +#define sz_xkmKeyDesc 8 + +typedef struct _xkmOverlayDesc { + CARD8 num_rows; + CARD8 pad1; + CARD16 pad2 B16; +} xkmOverlayDesc; +#define sz_xkmOverlayDesc 4 + +typedef struct _xkmOverlayRowDesc { + CARD8 row_under; + CARD8 num_keys; + CARD16 pad B16; +} xkmOverlayRowDesc; +#define sz_xkmOverlayRowDesc 4 + +typedef struct _xkmOverlayKeyDesc { + char over[XkbKeyNameLength]; + char under[XkbKeyNameLength]; +} xkmOverlayKeyDesc; +#define sz_xkmOverlayKeyDesc 8 + +typedef struct _xkmShapeDoodadDesc { + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + INT16 angle B16; + CARD8 color_ndx; + CARD8 shape_ndx; + CARD16 pad B16; + CARD32 pad1 B32; +} xkmShapeDoodadDesc; +#define sz_xkmShapeDoodadDesc 16 + +typedef struct _xkmTextDoodadDesc { + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + INT16 angle B16; + CARD16 width B16; + CARD16 height B16; + CARD8 color_ndx; + CARD8 pad1; + CARD16 pad2 B16; +} xkmTextDoodadDesc; +#define sz_xkmTextDoodadDesc 16 + +typedef struct _xkmIndicatorDoodadDesc { + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + CARD8 shape_ndx; + CARD8 on_color_ndx; + CARD8 off_color_ndx; + CARD8 pad1; + CARD16 pad2 B16; + CARD32 pad3 B32; +} xkmIndicatorDoodadDesc; +#define sz_xkmIndicatorDoodadDesc 16 + +typedef struct _xkmLogoDoodadDesc { + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + INT16 angle B16; + CARD8 color_ndx; + CARD8 shape_ndx; + CARD16 pad B16; + CARD32 pad1 B32; +} xkmLogoDoodadDesc; +#define sz_xkmLogoDoodadDesc 16 + +typedef struct _xkmAnyDoodadDesc { + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xkmAnyDoodadDesc; +#define sz_xkmAnyDoodadDesc 16 + +typedef union _xkmDoodadDesc { + xkmAnyDoodadDesc any; + xkmShapeDoodadDesc shape; + xkmTextDoodadDesc text; + xkmIndicatorDoodadDesc indicator; + xkmLogoDoodadDesc logo; +} xkmDoodadDesc; +#define sz_xkmDoodadDesc 16 + +#endif /* _XKMFORMAT_H_ */ |