mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 15:10:02 +01:00
Revert "xkb: move XkbConvertGetByNameComponents and make it static"
This reverts commit 114c1c84b1.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2046>
This commit is contained in:
parent
d0d62a791b
commit
122345d484
3 changed files with 47 additions and 39 deletions
|
|
@ -86,6 +86,14 @@ extern _X_EXPORT int XkbFindKeycodeByName(XkbDescPtr /* xkb */ ,
|
||||||
Bool /* use_aliases */
|
Bool /* use_aliases */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/***====================================================================***/
|
||||||
|
|
||||||
|
extern _X_EXPORT unsigned XkbConvertGetByNameComponents(Bool /* toXkm */ ,
|
||||||
|
unsigned /* orig */
|
||||||
|
);
|
||||||
|
|
||||||
|
/***====================================================================***/
|
||||||
|
|
||||||
extern _X_EXPORT Bool XkbWriteXKBKeycodes(FILE * /* file */ ,
|
extern _X_EXPORT Bool XkbWriteXKBKeycodes(FILE * /* file */ ,
|
||||||
XkbDescPtr /* result */ ,
|
XkbDescPtr /* result */ ,
|
||||||
Bool /* topLevel */ ,
|
Bool /* topLevel */ ,
|
||||||
|
|
|
||||||
39
xkb/xkb.c
39
xkb/xkb.c
|
|
@ -5906,45 +5906,6 @@ ProcXkbListComponents(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned
|
|
||||||
XkbConvertGetByNameComponents(Bool toXkm, unsigned orig)
|
|
||||||
{
|
|
||||||
unsigned rtrn;
|
|
||||||
|
|
||||||
rtrn = 0;
|
|
||||||
if (toXkm) {
|
|
||||||
if (orig & XkbGBN_TypesMask)
|
|
||||||
rtrn |= XkmTypesMask;
|
|
||||||
if (orig & XkbGBN_CompatMapMask)
|
|
||||||
rtrn |= XkmCompatMapMask;
|
|
||||||
if (orig & XkbGBN_SymbolsMask)
|
|
||||||
rtrn |= XkmSymbolsMask;
|
|
||||||
if (orig & XkbGBN_IndicatorMapMask)
|
|
||||||
rtrn |= XkmIndicatorsMask;
|
|
||||||
if (orig & XkbGBN_KeyNamesMask)
|
|
||||||
rtrn |= XkmKeyNamesMask;
|
|
||||||
if (orig & XkbGBN_GeometryMask)
|
|
||||||
rtrn |= XkmGeometryMask;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (orig & XkmTypesMask)
|
|
||||||
rtrn |= XkbGBN_TypesMask;
|
|
||||||
if (orig & XkmCompatMapMask)
|
|
||||||
rtrn |= XkbGBN_CompatMapMask;
|
|
||||||
if (orig & XkmSymbolsMask)
|
|
||||||
rtrn |= XkbGBN_SymbolsMask;
|
|
||||||
if (orig & XkmIndicatorsMask)
|
|
||||||
rtrn |= XkbGBN_IndicatorMapMask;
|
|
||||||
if (orig & XkmKeyNamesMask)
|
|
||||||
rtrn |= XkbGBN_KeyNamesMask;
|
|
||||||
if (orig & XkmGeometryMask)
|
|
||||||
rtrn |= XkbGBN_GeometryMask;
|
|
||||||
if (orig != 0)
|
|
||||||
rtrn |= XkbGBN_OtherNamesMask;
|
|
||||||
}
|
|
||||||
return rtrn;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
int
|
int
|
||||||
ProcXkbGetKbdByName(ClientPtr client)
|
ProcXkbGetKbdByName(ClientPtr client)
|
||||||
|
|
|
||||||
|
|
@ -390,3 +390,42 @@ XkbFindKeycodeByName(XkbDescPtr xkb, char *name, Bool use_aliases)
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned
|
||||||
|
XkbConvertGetByNameComponents(Bool toXkm, unsigned orig)
|
||||||
|
{
|
||||||
|
unsigned rtrn;
|
||||||
|
|
||||||
|
rtrn = 0;
|
||||||
|
if (toXkm) {
|
||||||
|
if (orig & XkbGBN_TypesMask)
|
||||||
|
rtrn |= XkmTypesMask;
|
||||||
|
if (orig & XkbGBN_CompatMapMask)
|
||||||
|
rtrn |= XkmCompatMapMask;
|
||||||
|
if (orig & XkbGBN_SymbolsMask)
|
||||||
|
rtrn |= XkmSymbolsMask;
|
||||||
|
if (orig & XkbGBN_IndicatorMapMask)
|
||||||
|
rtrn |= XkmIndicatorsMask;
|
||||||
|
if (orig & XkbGBN_KeyNamesMask)
|
||||||
|
rtrn |= XkmKeyNamesMask;
|
||||||
|
if (orig & XkbGBN_GeometryMask)
|
||||||
|
rtrn |= XkmGeometryMask;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (orig & XkmTypesMask)
|
||||||
|
rtrn |= XkbGBN_TypesMask;
|
||||||
|
if (orig & XkmCompatMapMask)
|
||||||
|
rtrn |= XkbGBN_CompatMapMask;
|
||||||
|
if (orig & XkmSymbolsMask)
|
||||||
|
rtrn |= XkbGBN_SymbolsMask;
|
||||||
|
if (orig & XkmIndicatorsMask)
|
||||||
|
rtrn |= XkbGBN_IndicatorMapMask;
|
||||||
|
if (orig & XkmKeyNamesMask)
|
||||||
|
rtrn |= XkbGBN_KeyNamesMask;
|
||||||
|
if (orig & XkmGeometryMask)
|
||||||
|
rtrn |= XkbGBN_GeometryMask;
|
||||||
|
if (orig != 0)
|
||||||
|
rtrn |= XkbGBN_OtherNamesMask;
|
||||||
|
}
|
||||||
|
return rtrn;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue