예제 #1
0
/**
 * Get the mask for the given modifier and set val_rtrn.uval to the mask.
 * Note that the mask returned is always > 512.
 *
 * @param priv Pointer to xkb data structure.
 * @param val_rtrn Set to the mask returned.
 *
 * @return True on success, False otherwise. If False is returned, val_rtrn is
 * undefined.
 */
int
LookupVModMask(XPointer priv,
               Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
{
    if (LookupVModIndex(priv, elem, field, type, val_rtrn))
    {
        register unsigned ndx = val_rtrn->uval;
        val_rtrn->uval = (1 << (XkbNumModifiers + ndx));
        return True;
    }
    return False;
}
예제 #2
0
int
FindKeypadVMod(XkbDescPtr xkb)
{
Atom name;
ExprResult rtrn;

    name= XkbInternAtom(xkb->dpy,"NumLock",False);
    if ((xkb)&&
	LookupVModIndex((XPointer)xkb,None,name,TypeInt,&rtrn)) {
	return rtrn.ival;
    }
    return -1;
}