65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifndef _XKBRULES_H_
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define _XKBRULES_H_ 1
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/************************************************************
65fea56f17cd614bc8908264df980a62e1931468vboxsync Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync Permission to use, copy, modify, and distribute this
65fea56f17cd614bc8908264df980a62e1931468vboxsync software and its documentation for any purpose and without
65fea56f17cd614bc8908264df980a62e1931468vboxsync fee is hereby granted, provided that the above copyright
65fea56f17cd614bc8908264df980a62e1931468vboxsync notice appear in all copies and that both that copyright
65fea56f17cd614bc8908264df980a62e1931468vboxsync notice and this permission notice appear in supporting
65fea56f17cd614bc8908264df980a62e1931468vboxsync documentation, and that the name of Silicon Graphics not be
65fea56f17cd614bc8908264df980a62e1931468vboxsync used in advertising or publicity pertaining to distribution
65fea56f17cd614bc8908264df980a62e1931468vboxsync of the software without specific prior written permission.
65fea56f17cd614bc8908264df980a62e1931468vboxsync Silicon Graphics makes no representation about the suitability
65fea56f17cd614bc8908264df980a62e1931468vboxsync of this software for any purpose. It is provided "as is"
65fea56f17cd614bc8908264df980a62e1931468vboxsync without any express or implied warranty.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
65fea56f17cd614bc8908264df980a62e1931468vboxsync SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
65fea56f17cd614bc8908264df980a62e1931468vboxsync AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
65fea56f17cd614bc8908264df980a62e1931468vboxsync GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
65fea56f17cd614bc8908264df980a62e1931468vboxsync DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
65fea56f17cd614bc8908264df980a62e1931468vboxsync OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
65fea56f17cd614bc8908264df980a62e1931468vboxsync THE USE OR PERFORMANCE OF THIS SOFTWARE.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync ********************************************************/
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/***====================================================================***/
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _XkbRMLVOSet {
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *rules;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *model;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *layout;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *variant;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *options;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} XkbRMLVOSet;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _XkbRF_VarDefs {
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *model;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *layout;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *variant;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *options;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} XkbRF_VarDefsRec, *XkbRF_VarDefsPtr;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _XkbRF_Rule {
65fea56f17cd614bc8908264df980a62e1931468vboxsync int number;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int layout_num;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int variant_num;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *model;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *layout;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *variant;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *option;
65fea56f17cd614bc8908264df980a62e1931468vboxsync /* yields */
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *keycodes;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *symbols;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *types;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *compat;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *geometry;
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned flags;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} XkbRF_RuleRec, *XkbRF_RulePtr;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _XkbRF_Group {
65fea56f17cd614bc8908264df980a62e1931468vboxsync int number;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *name;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *words;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} XkbRF_GroupRec, *XkbRF_GroupPtr;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define XkbRF_PendingMatch (1L<<1)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define XkbRF_Option (1L<<2)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define XkbRF_Append (1L<<3)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define XkbRF_Normal (1L<<4)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define XkbRF_Invalid (1L<<5)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _XkbRF_Rules {
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned short sz_rules;
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned short num_rules;
65fea56f17cd614bc8908264df980a62e1931468vboxsync XkbRF_RulePtr rules;
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned short sz_groups;
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned short num_groups;
65fea56f17cd614bc8908264df980a62e1931468vboxsync XkbRF_GroupPtr groups;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} XkbRF_RulesRec, *XkbRF_RulesPtr;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/***====================================================================***/
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync_XFUNCPROTOBEGIN
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* Seems preferable to dragging xkbstr.h in. */
65fea56f17cd614bc8908264df980a62e1931468vboxsync struct _XkbComponentNames;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool XkbRF_GetComponents(XkbRF_RulesPtr /* rules */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync XkbRF_VarDefsPtr /* var_defs */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync struct _XkbComponentNames * /* names */
65fea56f17cd614bc8908264df980a62e1931468vboxsync );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool XkbRF_LoadRules(FILE * /* file */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync XkbRF_RulesPtr /* rules */
65fea56f17cd614bc8908264df980a62e1931468vboxsync );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool XkbRF_LoadRulesByName(char * /* base */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync char * /* locale */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync XkbRF_RulesPtr /* rules */
65fea56f17cd614bc8908264df980a62e1931468vboxsync );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/***====================================================================***/
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT XkbRF_RulesPtr XkbRF_Create(void);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void XkbRF_Free(XkbRF_RulesPtr /* rules */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool /* freeRules */
65fea56f17cd614bc8908264df980a62e1931468vboxsync );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/***====================================================================***/
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define _XKB_RF_NAMES_PROP_ATOM "_XKB_RULES_NAMES"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define _XKB_RF_NAMES_PROP_MAXLEN 1024
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync_XFUNCPROTOEND
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif /* _XKBRULES_H_ */