Remove unused stuff from XKBcommonint.h
Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
12b3495ddf
commit
62a75dc179
|
@ -88,39 +88,28 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "xkbcommon/xkbcommon.h"
|
#include "xkbcommon/xkbcommon.h"
|
||||||
|
|
||||||
/* From XKM.h */
|
/* From XKM.h */
|
||||||
#define XkmFileVersion 15
|
|
||||||
|
|
||||||
#define XkmIllegalFile -1
|
|
||||||
#define XkmSemanticsFile 20
|
#define XkmSemanticsFile 20
|
||||||
#define XkmLayoutFile 21
|
#define XkmLayoutFile 21
|
||||||
#define XkmKeymapFile 22
|
#define XkmKeymapFile 22
|
||||||
#define XkmGeometryFile 23
|
|
||||||
#define XkmRulesFile 24
|
#define XkmRulesFile 24
|
||||||
|
|
||||||
#define XkmTypesIndex 0
|
#define XkmTypesIndex 0
|
||||||
#define XkmCompatMapIndex 1
|
#define XkmCompatMapIndex 1
|
||||||
#define XkmSymbolsIndex 2
|
#define XkmSymbolsIndex 2
|
||||||
#define XkmIndicatorsIndex 3
|
|
||||||
#define XkmKeyNamesIndex 4
|
#define XkmKeyNamesIndex 4
|
||||||
#define XkmGeometryIndex 5
|
#define XkmGeometryIndex 5
|
||||||
#define XkmVirtualModsIndex 6
|
|
||||||
#define XkmLastIndex XkmVirtualModsIndex
|
|
||||||
|
|
||||||
#define XkmTypesMask (1<<0)
|
#define XkmTypesMask (1<<0)
|
||||||
#define XkmCompatMapMask (1<<1)
|
#define XkmCompatMapMask (1<<1)
|
||||||
#define XkmSymbolsMask (1<<2)
|
#define XkmSymbolsMask (1<<2)
|
||||||
#define XkmIndicatorsMask (1<<3)
|
|
||||||
#define XkmKeyNamesMask (1<<4)
|
#define XkmKeyNamesMask (1<<4)
|
||||||
#define XkmGeometryMask (1<<5)
|
#define XkmGeometryMask (1<<5)
|
||||||
#define XkmVirtualModsMask (1<<6)
|
|
||||||
#define XkmLegalIndexMask (0x7f)
|
|
||||||
#define XkmAllIndicesMask (0x7f)
|
|
||||||
|
|
||||||
#define XkmSemanticsRequired (XkmCompatMapMask)
|
#define XkmSemanticsRequired (XkmCompatMapMask)
|
||||||
#define XkmSemanticsOptional (XkmTypesMask|XkmVirtualModsMask|XkmIndicatorsMask|XkmGeometryMask)
|
#define XkmSemanticsOptional (XkmTypesMask|XkmGeometryMask)
|
||||||
#define XkmSemanticsLegal (XkmSemanticsRequired|XkmSemanticsOptional)
|
#define XkmSemanticsLegal (XkmSemanticsRequired|XkmSemanticsOptional)
|
||||||
#define XkmLayoutRequired (XkmKeyNamesMask|XkmSymbolsMask|XkmTypesMask)
|
#define XkmLayoutRequired (XkmKeyNamesMask|XkmSymbolsMask|XkmTypesMask)
|
||||||
#define XkmLayoutOptional (XkmVirtualModsMask|XkmGeometryMask)
|
#define XkmLayoutOptional (XkmGeometryMask)
|
||||||
#define XkmLayoutLegal (XkmLayoutRequired|XkmLayoutOptional)
|
#define XkmLayoutLegal (XkmLayoutRequired|XkmLayoutOptional)
|
||||||
#define XkmKeymapRequired (XkmSemanticsRequired|XkmLayoutRequired)
|
#define XkmKeymapRequired (XkmSemanticsRequired|XkmLayoutRequired)
|
||||||
#define XkmKeymapOptional ((XkmSemanticsOptional|XkmLayoutOptional)&(~XkmKeymapRequired))
|
#define XkmKeymapOptional ((XkmSemanticsOptional|XkmLayoutOptional)&(~XkmKeymapRequired))
|
||||||
|
@ -293,13 +282,6 @@ struct xkb_sym_map {
|
||||||
unsigned int size_syms; /* size of 'syms' */
|
unsigned int size_syms; /* size of 'syms' */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define XkbNumGroups(g) ((g)&0x0f)
|
|
||||||
#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
|
|
||||||
#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
|
|
||||||
#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
|
|
||||||
#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
|
|
||||||
#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
|
|
||||||
|
|
||||||
struct xkb_client_map {
|
struct xkb_client_map {
|
||||||
unsigned char size_types;
|
unsigned char size_types;
|
||||||
unsigned char num_types;
|
unsigned char num_types;
|
||||||
|
@ -317,17 +299,11 @@ struct xkb_server_map {
|
||||||
unsigned short num_acts;
|
unsigned short num_acts;
|
||||||
unsigned short size_acts;
|
unsigned short size_acts;
|
||||||
|
|
||||||
#if defined(__cplusplus) || defined(c_plusplus)
|
|
||||||
/* explicit is a C++ reserved word */
|
|
||||||
unsigned char * c_explicit;
|
|
||||||
#else
|
|
||||||
unsigned char * explicit;
|
unsigned char * explicit;
|
||||||
#endif
|
|
||||||
|
|
||||||
union xkb_action *acts;
|
union xkb_action *acts;
|
||||||
struct xkb_behavior *behaviors;
|
struct xkb_behavior *behaviors;
|
||||||
unsigned short *key_acts;
|
unsigned short *key_acts;
|
||||||
unsigned char *explicits;
|
|
||||||
uint32_t vmods[XkbNumVirtualMods]; /* vmod -> mod mapping */
|
uint32_t vmods[XkbNumVirtualMods]; /* vmod -> mod mapping */
|
||||||
uint32_t *vmodmap; /* key -> vmod mapping */
|
uint32_t *vmodmap; /* key -> vmod mapping */
|
||||||
};
|
};
|
||||||
|
@ -343,7 +319,6 @@ struct xkb_indicator_map {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct xkb_indicator {
|
struct xkb_indicator {
|
||||||
unsigned long phys_indicators;
|
|
||||||
struct xkb_indicator_map maps[XkbNumIndicators];
|
struct xkb_indicator_map maps[XkbNumIndicators];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -391,7 +366,6 @@ struct xkb_keymap {
|
||||||
struct xkb_context *context;
|
struct xkb_context *context;
|
||||||
|
|
||||||
unsigned int refcnt;
|
unsigned int refcnt;
|
||||||
unsigned int defined;
|
|
||||||
unsigned short flags;
|
unsigned short flags;
|
||||||
xkb_keycode_t min_key_code;
|
xkb_keycode_t min_key_code;
|
||||||
xkb_keycode_t max_key_code;
|
xkb_keycode_t max_key_code;
|
||||||
|
@ -404,6 +378,13 @@ struct xkb_keymap {
|
||||||
struct xkb_compat_map * compat;
|
struct xkb_compat_map * compat;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define XkbNumGroups(g) ((g)&0x0f)
|
||||||
|
#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
|
||||||
|
#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
|
||||||
|
#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
|
||||||
|
#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
|
||||||
|
#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
|
||||||
|
|
||||||
#define XkbKeyGroupInfo(d,k) ((d)->map->key_sym_map[k].group_info)
|
#define XkbKeyGroupInfo(d,k) ((d)->map->key_sym_map[k].group_info)
|
||||||
#define XkbKeyNumGroups(d,k) (XkbNumGroups((d)->map->key_sym_map[k].group_info))
|
#define XkbKeyNumGroups(d,k) (XkbNumGroups((d)->map->key_sym_map[k].group_info))
|
||||||
#define XkbKeyGroupWidth(d,k,g) (XkbKeyType(d,k,g)->num_levels)
|
#define XkbKeyGroupWidth(d,k,g) (XkbKeyType(d,k,g)->num_levels)
|
||||||
|
@ -431,11 +412,6 @@ struct xkb_keymap {
|
||||||
((k)<=(d)->max_key_code))
|
((k)<=(d)->max_key_code))
|
||||||
#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
|
#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
|
||||||
|
|
||||||
struct xkb_component_name {
|
|
||||||
unsigned short flags;
|
|
||||||
char * name;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct xkb_state {
|
struct xkb_state {
|
||||||
xkb_group_index_t base_group; /**< depressed */
|
xkb_group_index_t base_group; /**< depressed */
|
||||||
xkb_group_index_t latched_group;
|
xkb_group_index_t latched_group;
|
||||||
|
@ -455,13 +431,4 @@ struct xkb_state {
|
||||||
struct xkb_keymap *xkb;
|
struct xkb_keymap *xkb;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
|
|
||||||
#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
|
|
||||||
|
|
||||||
#define XkbNumGroups(g) ((g)&0x0f)
|
|
||||||
#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
|
|
||||||
#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
|
|
||||||
#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
|
|
||||||
#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
|
|
||||||
|
|
||||||
#endif /* _XKBCOMMONINT_H_ */
|
#endif /* _XKBCOMMONINT_H_ */
|
||||||
|
|
|
@ -206,12 +206,8 @@ XkbcConfigText(unsigned config)
|
||||||
return "CompatMap";
|
return "CompatMap";
|
||||||
case XkmSymbolsIndex:
|
case XkmSymbolsIndex:
|
||||||
return "Symbols";
|
return "Symbols";
|
||||||
case XkmIndicatorsIndex:
|
|
||||||
return "Indicators";
|
|
||||||
case XkmKeyNamesIndex:
|
case XkmKeyNamesIndex:
|
||||||
return "KeyNames";
|
return "KeyNames";
|
||||||
case XkmVirtualModsIndex:
|
|
||||||
return "VirtualMods";
|
|
||||||
default:
|
default:
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
|
|
@ -473,7 +473,6 @@ BindIndicators(struct xkb_keymap * xkb, bool force, LEDInfo *unbound,
|
||||||
{
|
{
|
||||||
xkb->names->indicators[i] = XkbcAtomGetString(led->name);
|
xkb->names->indicators[i] = XkbcAtomGetString(led->name);
|
||||||
led->indicator = i + 1;
|
led->indicator = i + 1;
|
||||||
xkb->indicators->phys_indicators &= ~(1 << i);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -918,15 +918,6 @@ CompileKeycodes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge)
|
||||||
{
|
{
|
||||||
free(UNCONSTIFY(xkb->names->indicators[ii->ndx - 1]));
|
free(UNCONSTIFY(xkb->names->indicators[ii->ndx - 1]));
|
||||||
xkb->names->indicators[ii->ndx - 1] = XkbcAtomGetString(ii->name);
|
xkb->names->indicators[ii->ndx - 1] = XkbcAtomGetString(ii->name);
|
||||||
if (xkb->indicators != NULL)
|
|
||||||
{
|
|
||||||
unsigned bit;
|
|
||||||
bit = 1 << (ii->ndx - 1);
|
|
||||||
if (ii->virtual)
|
|
||||||
xkb->indicators->phys_indicators &= ~bit;
|
|
||||||
else
|
|
||||||
xkb->indicators->phys_indicators |= bit;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (info.aliases)
|
if (info.aliases)
|
||||||
|
|
|
@ -72,8 +72,8 @@ CompileKeymap(struct xkb_context *context, XkbFile *file)
|
||||||
legal = XkmKeymapLegal;
|
legal = XkmKeymapLegal;
|
||||||
break;
|
break;
|
||||||
case XkmKeymapFile:
|
case XkmKeymapFile:
|
||||||
required = XkmKeyNamesIndex | XkmTypesIndex | XkmSymbolsIndex | \
|
required = XkmKeyNamesIndex | XkmTypesIndex | XkmSymbolsIndex |
|
||||||
XkmCompatMapIndex | XkmVirtualModsIndex;
|
XkmCompatMapIndex;
|
||||||
legal = XkmKeymapLegal;
|
legal = XkmKeymapLegal;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -116,11 +116,6 @@ CompileKeymap(struct xkb_context *context, XkbFile *file)
|
||||||
break;
|
break;
|
||||||
case XkmGeometryIndex:
|
case XkmGeometryIndex:
|
||||||
continue;
|
continue;
|
||||||
case XkmVirtualModsIndex:
|
|
||||||
case XkmIndicatorsIndex:
|
|
||||||
WSGO("Found an isolated %s section\n", XkbcConfigText(file->type));
|
|
||||||
ACTION("Ignored\n");
|
|
||||||
continue;
|
|
||||||
default:
|
default:
|
||||||
WSGO("Unknown file type %d\n", file->type);
|
WSGO("Unknown file type %d\n", file->type);
|
||||||
ACTION("Ignored\n");
|
ACTION("Ignored\n");
|
||||||
|
@ -184,8 +179,6 @@ CompileKeymap(struct xkb_context *context, XkbFile *file)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
xkb->defined = have;
|
|
||||||
|
|
||||||
ok = BindIndicators(xkb, true, unbound, NULL);
|
ok = BindIndicators(xkb, true, unbound, NULL);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
|
@ -838,7 +838,6 @@ FreeXKBFile(XkbFile *file)
|
||||||
case XkmSymbolsIndex:
|
case XkmSymbolsIndex:
|
||||||
case XkmKeyNamesIndex:
|
case XkmKeyNamesIndex:
|
||||||
case XkmGeometryIndex:
|
case XkmGeometryIndex:
|
||||||
case XkmGeometryFile:
|
|
||||||
FreeStmt(file->defs);
|
FreeStmt(file->defs);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,10 +49,10 @@ ClearVModInfo(VModInfo * info, struct xkb_keymap * xkb)
|
||||||
|
|
||||||
info->newlyDefined = info->defined = info->available = 0;
|
info->newlyDefined = info->defined = info->available = 0;
|
||||||
|
|
||||||
if (XkbcAllocNames(xkb, XkbVirtualModNamesMask, 0) != Success)
|
if (XkbcAllocNames(xkb, 0, 0) != Success)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (XkbcAllocServerMap(xkb, XkbVirtualModsMask, 0) != Success)
|
if (XkbcAllocServerMap(xkb, 0, 0) != Success)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
info->xkb = xkb;
|
info->xkb = xkb;
|
||||||
|
|
|
@ -163,7 +163,6 @@ XkbDirectoryForInclude(unsigned type)
|
||||||
return "symbols";
|
return "symbols";
|
||||||
case XkmCompatMapIndex:
|
case XkmCompatMapIndex:
|
||||||
return "compat";
|
return "compat";
|
||||||
case XkmGeometryFile:
|
|
||||||
case XkmGeometryIndex:
|
case XkmGeometryIndex:
|
||||||
return "geometry";
|
return "geometry";
|
||||||
case XkmRulesFile:
|
case XkmRulesFile:
|
||||||
|
|
Loading…
Reference in New Issue