1706f2543Smrg#ifndef _XKBRULES_H_ 2706f2543Smrg#define _XKBRULES_H_ 1 3706f2543Smrg 4706f2543Smrg/************************************************************ 5706f2543Smrg Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc. 6706f2543Smrg 7706f2543Smrg Permission to use, copy, modify, and distribute this 8706f2543Smrg software and its documentation for any purpose and without 9706f2543Smrg fee is hereby granted, provided that the above copyright 10706f2543Smrg notice appear in all copies and that both that copyright 11706f2543Smrg notice and this permission notice appear in supporting 12706f2543Smrg documentation, and that the name of Silicon Graphics not be 13706f2543Smrg used in advertising or publicity pertaining to distribution 14706f2543Smrg of the software without specific prior written permission. 15706f2543Smrg Silicon Graphics makes no representation about the suitability 16706f2543Smrg of this software for any purpose. It is provided "as is" 17706f2543Smrg without any express or implied warranty. 18706f2543Smrg 19706f2543Smrg SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 20706f2543Smrg SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 21706f2543Smrg AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON 22706f2543Smrg GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 23706f2543Smrg DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 24706f2543Smrg DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 25706f2543Smrg OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 26706f2543Smrg THE USE OR PERFORMANCE OF THIS SOFTWARE. 27706f2543Smrg 28706f2543Smrg ********************************************************/ 29706f2543Smrg 30706f2543Smrg/***====================================================================***/ 31706f2543Smrg 32706f2543Smrgtypedef struct _XkbRMLVOSet { 33706f2543Smrg char * rules; 34706f2543Smrg char * model; 35706f2543Smrg char * layout; 36706f2543Smrg char * variant; 37706f2543Smrg char * options; 38706f2543Smrg} XkbRMLVOSet; 39706f2543Smrg 40706f2543Smrgtypedef struct _XkbRF_VarDefs { 41706f2543Smrg char * model; 42706f2543Smrg char * layout; 43706f2543Smrg char * variant; 44706f2543Smrg char * options; 45706f2543Smrg} XkbRF_VarDefsRec,*XkbRF_VarDefsPtr; 46706f2543Smrg 47706f2543Smrgtypedef struct _XkbRF_Rule { 48706f2543Smrg int number; 49706f2543Smrg int layout_num; 50706f2543Smrg int variant_num; 51706f2543Smrg char * model; 52706f2543Smrg char * layout; 53706f2543Smrg char * variant; 54706f2543Smrg char * option; 55706f2543Smrg /* yields */ 56706f2543Smrg char * keycodes; 57706f2543Smrg char * symbols; 58706f2543Smrg char * types; 59706f2543Smrg char * compat; 60706f2543Smrg char * geometry; 61706f2543Smrg unsigned flags; 62706f2543Smrg} XkbRF_RuleRec,*XkbRF_RulePtr; 63706f2543Smrg 64706f2543Smrgtypedef struct _XkbRF_Group { 65706f2543Smrg int number; 66706f2543Smrg char * name; 67706f2543Smrg char * words; 68706f2543Smrg} XkbRF_GroupRec, *XkbRF_GroupPtr; 69706f2543Smrg 70706f2543Smrg#define XkbRF_PendingMatch (1L<<1) 71706f2543Smrg#define XkbRF_Option (1L<<2) 72706f2543Smrg#define XkbRF_Append (1L<<3) 73706f2543Smrg#define XkbRF_Normal (1L<<4) 74706f2543Smrg#define XkbRF_Invalid (1L<<5) 75706f2543Smrg 76706f2543Smrgtypedef struct _XkbRF_Rules { 77706f2543Smrg unsigned short sz_rules; 78706f2543Smrg unsigned short num_rules; 79706f2543Smrg XkbRF_RulePtr rules; 80706f2543Smrg unsigned short sz_groups; 81706f2543Smrg unsigned short num_groups; 82706f2543Smrg XkbRF_GroupPtr groups; 83706f2543Smrg} XkbRF_RulesRec, *XkbRF_RulesPtr; 84706f2543Smrg 85706f2543Smrg/***====================================================================***/ 86706f2543Smrg 87706f2543Smrg_XFUNCPROTOBEGIN 88706f2543Smrg 89706f2543Smrg/* Seems preferable to dragging xkbstr.h in. */ 90706f2543Smrgstruct _XkbComponentNames; 91706f2543Smrg 92706f2543Smrgextern _X_EXPORT Bool XkbRF_GetComponents( 93706f2543Smrg XkbRF_RulesPtr /* rules */, 94706f2543Smrg XkbRF_VarDefsPtr /* var_defs */, 95706f2543Smrg struct _XkbComponentNames * /* names */ 96706f2543Smrg); 97706f2543Smrg 98706f2543Smrgextern _X_EXPORT Bool XkbRF_LoadRules( 99706f2543Smrg FILE * /* file */, 100706f2543Smrg XkbRF_RulesPtr /* rules */ 101706f2543Smrg); 102706f2543Smrg 103706f2543Smrgextern _X_EXPORT Bool XkbRF_LoadRulesByName( 104706f2543Smrg char * /* base */, 105706f2543Smrg char * /* locale */, 106706f2543Smrg XkbRF_RulesPtr /* rules */ 107706f2543Smrg); 108706f2543Smrg 109706f2543Smrg/***====================================================================***/ 110706f2543Smrg 111706f2543Smrgextern _X_EXPORT XkbRF_RulesPtr XkbRF_Create(void); 112706f2543Smrg 113706f2543Smrgextern _X_EXPORT void XkbRF_Free( 114706f2543Smrg XkbRF_RulesPtr /* rules */, 115706f2543Smrg Bool /* freeRules */ 116706f2543Smrg); 117706f2543Smrg 118706f2543Smrg/***====================================================================***/ 119706f2543Smrg 120706f2543Smrg#define _XKB_RF_NAMES_PROP_ATOM "_XKB_RULES_NAMES" 121706f2543Smrg#define _XKB_RF_NAMES_PROP_MAXLEN 1024 122706f2543Smrg 123706f2543Smrg_XFUNCPROTOEND 124706f2543Smrg 125706f2543Smrg#endif /* _XKBRULES_H_ */ 126