kbproto unentanglement: XkbLC_*
Signed-off-by: Daniel Stone <daniel@fooishbar.org>master
parent
830fe67132
commit
b6e0457195
|
@ -445,7 +445,7 @@ EnsureSafeMapName(char *name)
|
|||
|
||||
XkbFile *
|
||||
XkbFileCreate(struct xkb_context *ctx, enum xkb_file_type type, char *name,
|
||||
ParseCommon *defs, unsigned flags)
|
||||
ParseCommon *defs, enum xkb_map_flags flags)
|
||||
{
|
||||
XkbFile *file;
|
||||
|
||||
|
|
|
@ -249,6 +249,17 @@ typedef struct _IndicatorMapDef {
|
|||
VarDef *body;
|
||||
} IndicatorMapDef;
|
||||
|
||||
enum xkb_map_flags {
|
||||
MAP_IS_DEFAULT = (1 << 0),
|
||||
MAP_IS_PARTIAL = (1 << 1),
|
||||
MAP_IS_HIDDEN = (1 << 2),
|
||||
MAP_HAS_ALPHANUMERIC = (1 << 3),
|
||||
MAP_HAS_MODIFIER = (1 << 4),
|
||||
MAP_HAS_KEYPAD = (1 << 5),
|
||||
MAP_HAS_FN = (1 << 6),
|
||||
MAP_IS_ALTGR = (1 << 7),
|
||||
};
|
||||
|
||||
typedef struct _XkbFile {
|
||||
ParseCommon common;
|
||||
enum xkb_file_type file_type;
|
||||
|
@ -256,7 +267,7 @@ typedef struct _XkbFile {
|
|||
char *name;
|
||||
ParseCommon *defs;
|
||||
int id;
|
||||
unsigned flags;
|
||||
enum xkb_map_flags flags;
|
||||
} XkbFile;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -280,7 +280,7 @@ ProcessIncludeFile(struct xkb_context *ctx,
|
|||
}
|
||||
else if (rtrn->common.next) {
|
||||
for (; mapToUse; mapToUse = (XkbFile *) mapToUse->common.next)
|
||||
if (mapToUse->flags & XkbLC_Default)
|
||||
if (mapToUse->flags & MAP_IS_DEFAULT)
|
||||
break;
|
||||
|
||||
if (!mapToUse) {
|
||||
|
|
|
@ -125,6 +125,7 @@ yyerror(struct YYLTYPE *loc, struct parser_param *param, const char *msg)
|
|||
char keyName[XKB_KEY_NAME_LENGTH];
|
||||
xkb_atom_t sval;
|
||||
enum merge_mode merge;
|
||||
enum xkb_map_flags mapFlags;
|
||||
ParseCommon *any;
|
||||
ExprDef *expr;
|
||||
VarDef *var;
|
||||
|
@ -148,7 +149,8 @@ yyerror(struct YYLTYPE *loc, struct parser_param *param, const char *msg)
|
|||
%type <ival> Number Integer Float SignedNumber
|
||||
%type <merge> MergeMode OptMergeMode
|
||||
%type <file_type> XkbCompositeType FileType
|
||||
%type <uval> DoodadType Flag Flags OptFlags KeyCode
|
||||
%type <uval> DoodadType
|
||||
%type <mapFlags> Flag Flags OptFlags KeyCode
|
||||
%type <str> MapName OptMapName KeySym
|
||||
%type <sval> FieldSpec Ident Element String
|
||||
%type <any> DeclList Decl
|
||||
|
@ -253,14 +255,14 @@ Flags : Flags Flag { $$ = ($1 | $2); }
|
|||
| Flag { $$ = $1; }
|
||||
;
|
||||
|
||||
Flag : PARTIAL { $$ = XkbLC_Partial; }
|
||||
| DEFAULT { $$ = XkbLC_Default; }
|
||||
| HIDDEN { $$ = XkbLC_Hidden; }
|
||||
| ALPHANUMERIC_KEYS { $$ = XkbLC_AlphanumericKeys; }
|
||||
| MODIFIER_KEYS { $$ = XkbLC_ModifierKeys; }
|
||||
| KEYPAD_KEYS { $$ = XkbLC_KeypadKeys; }
|
||||
| FUNCTION_KEYS { $$ = XkbLC_FunctionKeys; }
|
||||
| ALTERNATE_GROUP { $$ = XkbLC_AlternateGroup; }
|
||||
Flag : PARTIAL { $$ = MAP_IS_PARTIAL; }
|
||||
| DEFAULT { $$ = MAP_IS_DEFAULT; }
|
||||
| HIDDEN { $$ = MAP_IS_HIDDEN; }
|
||||
| ALPHANUMERIC_KEYS { $$ = MAP_HAS_ALPHANUMERIC; }
|
||||
| MODIFIER_KEYS { $$ = MAP_HAS_MODIFIER; }
|
||||
| KEYPAD_KEYS { $$ = MAP_HAS_KEYPAD; }
|
||||
| FUNCTION_KEYS { $$ = MAP_HAS_FN; }
|
||||
| ALTERNATE_GROUP { $$ = MAP_IS_ALTGR; }
|
||||
;
|
||||
|
||||
DeclList : DeclList Decl
|
||||
|
|
|
@ -234,7 +234,7 @@ CheckDefaultMap(struct xkb_context *ctx, XkbFile *maps, const char *fileName)
|
|||
XkbFile *dflt = NULL, *tmp;
|
||||
|
||||
for (tmp = maps; tmp; tmp = (XkbFile *) tmp->common.next) {
|
||||
if (!(tmp->flags & XkbLC_Default))
|
||||
if (!(tmp->flags & MAP_IS_DEFAULT))
|
||||
continue;
|
||||
|
||||
if (!dflt) {
|
||||
|
@ -249,7 +249,7 @@ CheckDefaultMap(struct xkb_context *ctx, XkbFile *maps, const char *fileName)
|
|||
(dflt->name ? dflt->name : "(first)"),
|
||||
(tmp->name ? tmp->name : "(subsequent)"));
|
||||
|
||||
tmp->flags &= (~XkbLC_Default);
|
||||
tmp->flags &= (~MAP_IS_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue