Lines Matching defs:stuff

155 _XkbCheckRequestBounds(ClientPtr client, void *stuff, void *from, void *to) {
156 char *cstuff = (char *)stuff;
178 if (stuff->wantedMajor != SERVER_XKB_MAJOR_VERSION) {
181 (stuff->wantedMajor==0)&&(stuff->wantedMinor==65));
187 client->vMajor= stuff->wantedMajor;
188 client->vMinor= stuff->wantedMinor;
194 stuff->wantedMajor,stuff->wantedMinor,
228 CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixUseAccess);
230 if (((stuff->affectWhich&XkbMapNotifyMask)!=0)&&(stuff->affectMap)) {
231 client->mapNotifyMask&= ~stuff->affectMap;
232 client->mapNotifyMask|= (stuff->affectMap&stuff->map);
234 if ((stuff->affectWhich&(~XkbMapNotifyMask))==0)
252 from.c8= (CARD8 *)&stuff[1];
253 dataLeft= (stuff->length*4)-SIZEOF(xkbSelectEventsReq);
254 maskLeft= (stuff->affectWhich&(~XkbMapNotifyMask));
320 if (stuff->clear&bit) {
325 else if (stuff->selectAll&bit) {
485 CHK_BELL_DEVICE(dev, stuff->deviceSpec, client, DixBellAccess);
486 CHK_ATOM_OR_NONE(stuff->name);
489 if ((stuff->forceSound)&&(stuff->eventOnly)) {
490 client->errorValue=_XkbErrCode3(0x1,stuff->forceSound,stuff->eventOnly);
493 if (stuff->percent < -100 || stuff->percent > 100) {
494 client->errorValue = _XkbErrCode2(0x2,stuff->percent);
497 if (stuff->duration<-1) {
498 client->errorValue = _XkbErrCode2(0x3,stuff->duration);
501 if (stuff->pitch<-1) {
502 client->errorValue = _XkbErrCode2(0x4,stuff->pitch);
506 if (stuff->bellClass == XkbDfltXIClass) {
508 stuff->bellClass= KbdFeedbackClass;
509 else stuff->bellClass= BellFeedbackClass;
512 if (stuff->window!=None) {
513 rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
515 client->errorValue= stuff->window;
530 rc = _XkbBell(client, dev, pWin, stuff->bellClass, stuff->bellID,
531 stuff->pitch, stuff->duration, stuff->percent,
532 stuff->forceSound, stuff->eventOnly, stuff->name);
534 if ((rc == Success) && ((stuff->deviceSpec == XkbUseCoreKbd) ||
535 (stuff->deviceSpec == XkbUseCorePtr)))
544 _XkbBell(client, other, pWin, stuff->bellClass,
545 stuff->bellID, stuff->pitch, stuff->duration,
546 stuff->percent, stuff->forceSound,
547 stuff->eventOnly, stuff->name);
571 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
616 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
617 CHK_MASK_MATCH(0x01, stuff->affectModLocks, stuff->modLocks);
618 CHK_MASK_MATCH(0x01, stuff->affectModLatches, stuff->modLatches);
629 if (stuff->affectModLocks) {
630 newState->locked_mods &= ~stuff->affectModLocks;
631 newState->locked_mods |= (stuff->affectModLocks & stuff->modLocks);
633 if (status == Success && stuff->lockGroup)
634 newState->locked_group = stuff->groupLock;
635 if (status == Success && stuff->affectModLatches)
636 status = XkbLatchModifiers(tmpd, stuff->affectModLatches,
637 stuff->modLatches);
638 if (status == Success && stuff->latchGroup)
639 status = XkbLatchGroup(tmpd, stuff->groupLatch);
682 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
759 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
760 CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask);
771 if (stuff->changeCtrls & XkbInternalModsMask) {
772 CHK_MASK_MATCH(0x02, stuff->affectInternalMods,
773 stuff->internalMods);
774 CHK_MASK_MATCH(0x03, stuff->affectInternalVMods,
775 stuff->internalVMods);
777 new.internal.real_mods &= ~(stuff->affectInternalMods);
778 new.internal.real_mods |= (stuff->affectInternalMods &
779 stuff->internalMods);
780 new.internal.vmods &= ~(stuff->affectInternalVMods);
781 new.internal.vmods |= (stuff->affectInternalVMods &
782 stuff->internalVMods);
788 if (stuff->changeCtrls & XkbIgnoreLockModsMask) {
789 CHK_MASK_MATCH(0x4, stuff->affectIgnoreLockMods,
790 stuff->ignoreLockMods);
791 CHK_MASK_MATCH(0x5, stuff->affectIgnoreLockVMods,
792 stuff->ignoreLockVMods);
794 new.ignore_lock.real_mods &= ~(stuff->affectIgnoreLockMods);
795 new.ignore_lock.real_mods |= (stuff->affectIgnoreLockMods &
796 stuff->ignoreLockMods);
797 new.ignore_lock.vmods &= ~(stuff->affectIgnoreLockVMods);
798 new.ignore_lock.vmods |= (stuff->affectIgnoreLockVMods &
799 stuff->ignoreLockVMods);
805 CHK_MASK_MATCH(0x06, stuff->affectEnabledCtrls,
806 stuff->enabledCtrls);
807 if (stuff->affectEnabledCtrls) {
808 CHK_MASK_LEGAL(0x07, stuff->affectEnabledCtrls,
811 new.enabled_ctrls &= ~(stuff->affectEnabledCtrls);
812 new.enabled_ctrls |= (stuff->affectEnabledCtrls &
813 stuff->enabledCtrls);
816 if (stuff->changeCtrls & XkbRepeatKeysMask) {
817 if (stuff->repeatDelay < 1 || stuff->repeatInterval < 1) {
818 client->errorValue = _XkbErrCode3(0x08, stuff->repeatDelay,
819 stuff->repeatInterval);
823 new.repeat_delay = stuff->repeatDelay;
824 new.repeat_interval = stuff->repeatInterval;
827 if (stuff->changeCtrls & XkbSlowKeysMask) {
828 if (stuff->slowKeysDelay < 1) {
830 stuff->slowKeysDelay);
834 new.slow_keys_delay = stuff->slowKeysDelay;
837 if (stuff->changeCtrls & XkbBounceKeysMask) {
838 if (stuff->debounceDelay < 1) {
840 stuff->debounceDelay);
844 new.debounce_delay = stuff->debounceDelay;
847 if (stuff->changeCtrls & XkbMouseKeysMask) {
848 if (stuff->mkDfltBtn > XkbMaxMouseKeysBtn) {
849 client->errorValue = _XkbErrCode2(0x0B, stuff->mkDfltBtn);
853 new.mk_dflt_btn = stuff->mkDfltBtn;
856 if (stuff->changeCtrls & XkbMouseKeysAccelMask) {
857 if (stuff->mkDelay < 1 || stuff->mkInterval < 1 ||
858 stuff->mkTimeToMax < 1 || stuff->mkMaxSpeed < 1 ||
859 stuff->mkCurve < -1000) {
864 new.mk_delay = stuff->mkDelay;
865 new.mk_interval = stuff->mkInterval;
866 new.mk_time_to_max = stuff->mkTimeToMax;
867 new.mk_max_speed = stuff->mkMaxSpeed;
868 new.mk_curve = stuff->mkCurve;
872 if (stuff->changeCtrls & XkbGroupsWrapMask) {
875 act = XkbOutOfRangeGroupAction(stuff->groupsWrap);
878 num = XkbOutOfRangeGroupNumber(stuff->groupsWrap);
892 new.groups_wrap= stuff->groupsWrap;
895 CHK_MASK_LEGAL(0x0F, stuff->axOptions, XkbAX_AllOptionsMask);
896 if (stuff->changeCtrls & XkbAccessXKeysMask) {
897 new.ax_options = stuff->axOptions & XkbAX_AllOptionsMask;
900 if (stuff->changeCtrls & XkbStickyKeysMask) {
902 new.ax_options |= (stuff->axOptions & XkbAX_SKOptionsMask);
905 if (stuff->changeCtrls & XkbAccessXFeedbackMask) {
907 new.ax_options |= (stuff->axOptions & XkbAX_FBOptionsMask);
911 if (stuff->changeCtrls & XkbAccessXTimeoutMask) {
912 if (stuff->axTimeout < 1) {
913 client->errorValue = _XkbErrCode2(0x10, stuff->axTimeout);
916 CHK_MASK_MATCH(0x11, stuff->axtCtrlsMask,
917 stuff->axtCtrlsValues);
918 CHK_MASK_LEGAL(0x12, stuff->axtCtrlsMask,
920 CHK_MASK_MATCH(0x13, stuff->axtOptsMask, stuff->axtOptsValues);
921 CHK_MASK_LEGAL(0x14, stuff->axtOptsMask, XkbAX_AllOptionsMask);
922 new.ax_timeout = stuff->axTimeout;
923 new.axt_ctrls_mask = stuff->axtCtrlsMask;
924 new.axt_ctrls_values = (stuff->axtCtrlsValues &
925 stuff->axtCtrlsMask);
926 new.axt_opts_mask = stuff->axtOptsMask;
927 new.axt_opts_values = (stuff->axtOptsValues &
928 stuff->axtOptsMask);
931 if (stuff->changeCtrls & XkbPerKeyRepeatMask) {
932 memcpy(new.per_key_repeat, stuff->perKeyRepeat,
1445 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
1446 CHK_MASK_OVERLAP(0x01,stuff->full,stuff->partial);
1447 CHK_MASK_LEGAL(0x02,stuff->full,XkbAllMapComponentsMask);
1448 CHK_MASK_LEGAL(0x03,stuff->partial,XkbAllMapComponentsMask);
1456 rep.present = stuff->partial|stuff->full;
1459 if ( stuff->full&XkbKeyTypesMask ) {
1463 else if (stuff->partial&XkbKeyTypesMask) {
1464 if (((unsigned)stuff->firstType+stuff->nTypes)>xkb->map->num_types) {
1466 stuff->firstType,stuff->nTypes);
1469 rep.firstType = stuff->firstType;
1470 rep.nTypes = stuff->nTypes;
1476 if ( stuff->full&XkbKeySymsMask ) {
1480 else if (stuff->partial&XkbKeySymsMask) {
1481 CHK_KEY_RANGE(0x05,stuff->firstKeySym,stuff->nKeySyms,xkb);
1482 rep.firstKeySym = stuff->firstKeySym;
1483 rep.nKeySyms = stuff->nKeySyms;
1488 if ( stuff->full&XkbKeyActionsMask ) {
1492 else if (stuff->partial&XkbKeyActionsMask) {
1493 CHK_KEY_RANGE(0x07,stuff->firstKeyAct,stuff->nKeyActs,xkb);
1494 rep.firstKeyAct= stuff->firstKeyAct;
1495 rep.nKeyActs= stuff->nKeyActs;
1500 if ( stuff->full&XkbKeyBehaviorsMask ) {
1504 else if (stuff->partial&XkbKeyBehaviorsMask) {
1505 CHK_KEY_RANGE(0x09,stuff->firstKeyBehavior,stuff->nKeyBehaviors,xkb);
1506 rep.firstKeyBehavior= stuff->firstKeyBehavior;
1507 rep.nKeyBehaviors= stuff->nKeyBehaviors;
1512 if (stuff->full&XkbVirtualModsMask)
1514 else if (stuff->partial&XkbVirtualModsMask)
1515 rep.virtualMods= stuff->virtualMods;
1517 if (stuff->full&XkbExplicitComponentsMask) {
1521 else if (stuff->partial&XkbExplicitComponentsMask) {
1522 CHK_KEY_RANGE(0x0B,stuff->firstKeyExplicit,stuff->nKeyExplicit,xkb);
1523 rep.firstKeyExplicit= stuff->firstKeyExplicit;
1524 rep.nKeyExplicit= stuff->nKeyExplicit;
1529 if (stuff->full&XkbModifierMapMask) {
1533 else if (stuff->partial&XkbModifierMapMask) {
1534 CHK_KEY_RANGE(0x0D,stuff->firstModMapKey,stuff->nModMapKeys,xkb);
1535 rep.firstModMapKey= stuff->firstModMapKey;
1536 rep.nModMapKeys= stuff->nModMapKeys;
1541 if (stuff->full&XkbVirtualModMapMask) {
1545 else if (stuff->partial&XkbVirtualModMapMask) {
1546 CHK_KEY_RANGE(0x0F,stuff->firstVModMapKey,stuff->nVModMapKeys,xkb);
1547 rep.firstVModMapKey= stuff->firstVModMapKey;
1548 rep.nVModMapKeys= stuff->nVModMapKeys;
2658 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
2659 CHK_MASK_LEGAL(0x01,stuff->present,XkbAllMapComponentsMask);
2662 rc = _XkbSetMapCheckLength(stuff);
2666 tmp = (char *)&stuff[1];
2671 rc = _XkbSetMapChecks(client, dev, stuff, tmp, TRUE);
2676 if (stuff->deviceSpec == XkbUseCoreKbd)
2686 rc = _XkbSetMapChecks(client, other, stuff, tmp, FALSE);
2695 rc = _XkbSetMap(client, dev, stuff, tmp);
2699 if (stuff->deviceSpec == XkbUseCoreKbd)
2708 _XkbSetMap(client, other, stuff, tmp);
2822 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
2831 rep.firstSI = stuff->firstSI;
2832 rep.nSI = stuff->nSI;
2833 if (stuff->getAllSI) {
2837 else if ((((unsigned)stuff->nSI)>0)&&
2838 ((unsigned)(stuff->firstSI+stuff->nSI-1)>=compat->num_si)) {
2843 rep.groups= stuff->groups;
2997 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
2999 data = (char *)&stuff[1];
3002 rc = _XkbSetCompatMap(client, dev, stuff, data, TRUE);
3005 if (stuff->deviceSpec == XkbUseCoreKbd)
3016 rc = _XkbSetCompatMap(client, other, stuff, data, TRUE);
3025 rc = _XkbSetCompatMap(client, dev, stuff, data, FALSE);
3028 if (stuff->deviceSpec == XkbUseCoreKbd)
3038 rc = _XkbSetCompatMap(client, other, stuff, data, FALSE);
3065 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
3177 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
3186 rep.which = stuff->which;
3251 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
3253 if (stuff->which==0)
3257 if (stuff->which&bit)
3260 if (stuff->length!=((SIZEOF(xkbSetIndicatorMapReq)+
3265 from = (xkbIndicatorMapWireDesc *)&stuff[1];
3267 if (stuff->which&bit) {
3279 from = (xkbIndicatorMapWireDesc *)&stuff[1];
3280 rc = _XkbSetIndicatorMap(client, dev, stuff->which, from);
3284 if (stuff->deviceSpec == XkbUseCoreKbd)
3293 _XkbSetIndicatorMap(client, other, stuff->which, from);
3318 CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
3319 CHK_ATOM_ONLY(stuff->indicator);
3321 sli= XkbFindSrvLedInfo(dev,stuff->ledClass,stuff->ledID,0);
3329 if (stuff->indicator==sli->names[i]) {
3340 rep.indicator= stuff->indicator;
3459 xkbSetNamedIndicatorReq *stuff)
3472 rc = _XkbCreateIndicatorMap(dev, stuff->indicator, stuff->ledClass,
3473 stuff->ledID, &map, &led, FALSE);
3477 sli = XkbFindSrvLedInfo(dev, stuff->ledClass, stuff->ledID,
3486 sli->namesPresent |= ((stuff->indicator != None) ? (1 << led) : 0);
3489 if (stuff->setMap) {
3490 map->flags = stuff->flags;
3491 map->which_groups = stuff->whichGroups;
3492 map->groups = stuff->groups;
3493 map->which_mods = stuff->whichMods;
3494 map->mods.mask = stuff->realMods;
3495 map->mods.real_mods = stuff->realMods;
3496 map->mods.vmods= stuff->virtualMods;
3497 map->ctrls = stuff->ctrls;
3501 if ((stuff->setState) && ((map->flags & XkbIM_NoExplicit) == 0))
3503 if (stuff->on) sli->explicitState |= (1<<led);
3540 CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
3541 CHK_ATOM_ONLY(stuff->indicator);
3542 CHK_MASK_LEGAL(0x10,stuff->whichGroups,XkbIM_UseAnyGroup);
3543 CHK_MASK_LEGAL(0x11,stuff->whichMods,XkbIM_UseAnyMods);
3546 rc = _XkbCreateIndicatorMap(dev, stuff->indicator,
3547 stuff->ledClass, stuff->ledID,
3552 if (stuff->deviceSpec == XkbUseCoreKbd ||
3553 stuff->deviceSpec == XkbUseCorePtr)
3562 rc = _XkbCreateIndicatorMap(other, stuff->indicator,
3563 stuff->ledClass, stuff->ledID,
3572 rc = _XkbSetNamedIndicator(client, dev, stuff);
3576 if (stuff->deviceSpec == XkbUseCoreKbd ||
3577 stuff->deviceSpec == XkbUseCorePtr)
3586 _XkbSetNamedIndicator(client, other, stuff);
3897 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
3898 CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask);
3906 rep.which = stuff->which;
3997 xkbSetNamesReq *stuff, CARD32 *data)
4009 if (stuff->which & XkbKeyTypeNamesMask) {
4012 if ( stuff->nTypes<1 ) {
4013 client->errorValue = _XkbErrCode2(0x02,stuff->nTypes);
4016 if ((unsigned)(stuff->firstType+stuff->nTypes-1)>=xkb->map->num_types) {
4017 client->errorValue = _XkbErrCode4(0x03,stuff->firstType,
4018 stuff->nTypes,
4022 if (((unsigned)stuff->firstType)<=XkbLastRequiredType) {
4023 client->errorValue = _XkbErrCode2(0x04,stuff->firstType);
4026 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + stuff->nTypes))
4029 tmp= _XkbCheckAtoms(tmp,stuff->nTypes,client->swapped,&bad);
4034 for (i=0;i<stuff->nTypes;i++,old++) {
4035 if (!_XkbCheckTypeName((Atom)*old,stuff->firstType+i))
4039 if (stuff->which&XkbKTLevelNamesMask) {
4043 if ( stuff->nKTLevels<1 ) {
4044 client->errorValue = _XkbErrCode2(0x05,stuff->nKTLevels);
4047 if ((unsigned)(stuff->firstKTLevel+stuff->nKTLevels-1)>=
4049 client->errorValue = _XkbErrCode4(0x06,stuff->firstKTLevel,
4050 stuff->nKTLevels,xkb->map->num_types);
4054 tmp= (CARD32 *)(((char *)tmp)+XkbPaddedSize(stuff->nKTLevels));
4055 if (!_XkbCheckRequestBounds(client, stuff, width, tmp))
4057 type = &xkb->map->types[stuff->firstKTLevel];
4058 for (i=0;i<stuff->nKTLevels;i++,type++) {
4062 client->errorValue= _XkbErrCode4(0x07,i+stuff->firstKTLevel,
4066 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + width[i]))
4075 if (stuff->which&XkbIndicatorNamesMask) {
4076 if (stuff->indicators==0) {
4080 if (!_XkbCheckRequestBounds(client, stuff, tmp,
4081 tmp + Ones(stuff->indicators)))
4083 tmp= _XkbCheckMaskedAtoms(tmp,XkbNumIndicators,stuff->indicators,
4090 if (stuff->which&XkbVirtualModNamesMask) {
4091 if (stuff->virtualMods==0) {
4095 if (!_XkbCheckRequestBounds(client, stuff, tmp,
4096 tmp + Ones(stuff->virtualMods)))
4099 (CARD32)stuff->virtualMods,
4106 if (stuff->which&XkbGroupNamesMask) {
4107 if (stuff->groupNames==0) {
4111 if (!_XkbCheckRequestBounds(client, stuff, tmp,
4112 tmp + Ones(stuff->groupNames)))
4115 (CARD32)stuff->groupNames,
4122 if (stuff->which&XkbKeyNamesMask) {
4123 if (stuff->firstKey<(unsigned)xkb->min_key_code) {
4125 stuff->firstKey);
4128 if (((unsigned)(stuff->firstKey+stuff->nKeys-1)>xkb->max_key_code)||
4129 (stuff->nKeys<1)) {
4131 stuff->firstKey,stuff->nKeys);
4134 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + stuff->nKeys))
4136 tmp+= stuff->nKeys;
4138 if ((stuff->which&XkbKeyAliasesMask)&&(stuff->nKeyAliases>0)) {
4139 if (!_XkbCheckRequestBounds(client, stuff, tmp,
4140 tmp + (stuff->nKeyAliases * 2)))
4142 tmp+= stuff->nKeyAliases*2;
4144 if (stuff->which&XkbRGNamesMask) {
4145 if ( stuff->nRadioGroups<1 ) {
4146 client->errorValue= _XkbErrCode2(0x0d,stuff->nRadioGroups);
4149 if (!_XkbCheckRequestBounds(client, stuff, tmp,
4150 tmp + stuff->nRadioGroups))
4152 tmp= _XkbCheckAtoms(tmp,stuff->nRadioGroups,client->swapped,&bad);
4158 if ((tmp-((CARD32 *)stuff))!=stuff->length) {
4159 client->errorValue = stuff->length;
4169 _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff)
4176 tmp = (CARD32 *)&stuff[1];
4180 if (XkbAllocNames(xkb,stuff->which,stuff->nRadioGroups,
4181 stuff->nKeyAliases)!=Success) {
4186 nn.changed= stuff->which;
4187 tmp = (CARD32 *)&stuff[1];
4188 if (stuff->which&XkbKeycodesNameMask)
4190 if (stuff->which&XkbGeometryNameMask)
4192 if (stuff->which&XkbSymbolsNameMask)
4194 if (stuff->which&XkbPhysSymbolsNameMask)
4196 if (stuff->which&XkbTypesNameMask)
4198 if (stuff->which&XkbCompatNameMask)
4200 if ((stuff->which&XkbKeyTypeNamesMask)&&(stuff->nTypes>0)) {
4204 type= &xkb->map->types[stuff->firstType];
4205 for (i=0;i<stuff->nTypes;i++,type++) {
4208 nn.firstType= stuff->firstType;
4209 nn.nTypes= stuff->nTypes;
4211 if (stuff->which&XkbKTLevelNamesMask) {
4217 tmp= (CARD32 *)(((char *)tmp)+XkbPaddedSize(stuff->nKTLevels));
4218 type= &xkb->map->types[stuff->firstKTLevel];
4219 for (i=0;i<stuff->nKTLevels;i++,type++) {
4231 nn.nLevelNames= stuff->nTypes;
4233 if (stuff->which&XkbIndicatorNamesMask) {
4235 stuff->indicators);
4236 nn.changedIndicators= stuff->indicators;
4238 if (stuff->which&XkbVirtualModNamesMask) {
4240 stuff->virtualMods);
4241 nn.changedVirtualMods= stuff->virtualMods;
4243 if (stuff->which&XkbGroupNamesMask) {
4245 stuff->groupNames);
4246 nn.changedVirtualMods= stuff->groupNames;
4248 if (stuff->which&XkbKeyNamesMask) {
4249 memcpy((char*)&names->keys[stuff->firstKey],(char *)tmp,
4250 stuff->nKeys*XkbKeyNameLength);
4251 tmp+= stuff->nKeys;
4252 nn.firstKey= stuff->firstKey;
4253 nn.nKeys= stuff->nKeys;
4255 if (stuff->which&XkbKeyAliasesMask) {
4256 if (stuff->nKeyAliases>0) {
4257 register int na= stuff->nKeyAliases;
4261 stuff->nKeyAliases*sizeof(XkbKeyAliasRec));
4262 tmp+= stuff->nKeyAliases*2;
4271 if (stuff->which&XkbRGNamesMask) {
4272 if (stuff->nRadioGroups>0) {
4274 nrg= stuff->nRadioGroups;
4278 for (i=0;i<stuff->nRadioGroups;i++) {
4281 tmp+= stuff->nRadioGroups;
4337 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
4338 CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask);
4340 /* check device-independent stuff */
4341 tmp = (CARD32 *)&stuff[1];
4343 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1))
4345 if (stuff->which&XkbKeycodesNameMask) {
4352 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1))
4354 if (stuff->which&XkbGeometryNameMask) {
4361 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1))
4363 if (stuff->which&XkbSymbolsNameMask) {
4370 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1))
4372 if (stuff->which&XkbPhysSymbolsNameMask) {
4379 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1))
4381 if (stuff->which&XkbTypesNameMask) {
4388 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1))
4390 if (stuff->which&XkbCompatNameMask) {
4399 rc = _XkbSetNamesCheck(client, dev, stuff, tmp);
4403 if (stuff->deviceSpec == XkbUseCoreKbd)
4414 rc = _XkbSetNamesCheck(client, other, stuff, tmp);
4424 rc = _XkbSetNames(client, dev, stuff);
4428 if (stuff->deviceSpec == XkbUseCoreKbd)
4438 _XkbSetNames(client, other, stuff);
4970 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
4971 CHK_ATOM_OR_NONE(stuff->name);
4973 geom= XkbLookupNamedGeometry(dev,stuff->name,&shouldFree);
4978 status= XkbComputeGetGeometryReplySize(geom,&rep,stuff->name);
5431 _XkbSetGeometry(ClientPtr client, DeviceIntPtr dev, xkbSetGeometryReq *stuff)
5445 sizes.num_properties= stuff->nProperties;
5446 sizes.num_colors= stuff->nColors;
5447 sizes.num_shapes= stuff->nShapes;
5448 sizes.num_sections= stuff->nSections;
5449 sizes.num_doodads= stuff->nDoodads;
5450 sizes.num_key_aliases= stuff->nKeyAliases;
5456 geom->name= stuff->name;
5457 geom->width_mm= stuff->widthMM;
5458 geom->height_mm= stuff->heightMM;
5459 if ((status= _CheckSetGeom(geom,stuff,client))!=Success) {
5496 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
5497 CHK_ATOM_OR_NONE(stuff->name);
5499 rc = _XkbSetGeometry(client, dev, stuff);
5503 if (stuff->deviceSpec == XkbUseCoreKbd)
5512 _XkbSetGeometry(client, other, stuff);
5536 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode);
5537 CHK_MASK_LEGAL(0x01,stuff->change,XkbPCF_AllFlagsMask);
5538 CHK_MASK_MATCH(0x02,stuff->change,stuff->value);
5545 if (stuff->change) {
5546 client->xkbClientFlags&= ~stuff->change;
5547 client->xkbClientFlags|= stuff->value;
5549 if (stuff->change&XkbPCF_AutoResetControlsMask) {
5551 want= stuff->value&XkbPCF_AutoResetControlsMask;
5565 affect= stuff->ctrlsToChange;
5568 CHK_MASK_MATCH(0x04,affect,stuff->autoCtrls);
5569 CHK_MASK_MATCH(0x05,stuff->autoCtrls,stuff->autoCtrlValues);
5573 interest->autoCtrls|= stuff->autoCtrls&affect;
5574 interest->autoCtrlValues|= stuff->autoCtrlValues&affect;
5674 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
5677 str= (unsigned char *)&stuff[1];
5679 list.maxRtrn= stuff->maxNames;
5687 len= str-((unsigned char *)stuff);
5688 if ((XkbPaddedSize(len)/4)!=stuff->length)
5761 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode);
5765 str= (unsigned char *)&stuff[1];
5775 len= str-((unsigned char *)stuff);
5776 if ((XkbPaddedSize(len)/4)!=stuff->length)
5779 CHK_MASK_LEGAL(0x01,stuff->want,XkbGBN_AllComponentsMask);
5780 CHK_MASK_LEGAL(0x02,stuff->need,XkbGBN_AllComponentsMask);
5782 if (stuff->load)
5784 else fwant= stuff->want|stuff->need;
5809 fwant= XkbConvertGetByNameComponents(TRUE,stuff->want)|XkmVirtualModsMask;
5810 fneed= XkbConvertGetByNameComponents(TRUE,stuff->need);
5812 if (stuff->load) {
5827 stuff->want|= stuff->need;
5831 if (stuff->load)
5833 if (stuff->load ||
6285 wanted= stuff->wanted;
6287 CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
6290 if ((!dev->button)||((stuff->nBtns<1)&&(!stuff->allBtns)))
6317 ledClass= stuff->ledClass;
6318 ledID= stuff->ledID;
6323 if (stuff->allBtns) {
6324 stuff->firstBtn= 0;
6325 stuff->nBtns= dev->button->numButtons;
6328 if ((stuff->firstBtn+stuff->nBtns)>dev->button->numButtons) {
6330 stuff->firstBtn,
6331 stuff->nBtns);
6335 rep.firstBtnWanted= stuff->firstBtn;
6336 rep.nBtnsWanted= stuff->nBtns;
6341 rep.firstBtnRtrn= stuff->firstBtn;
6342 rep.nBtnsRtrn= stuff->nBtns;
6498 xkbSetDeviceInfoReq *stuff)
6519 if (!_XkbCheckRequestBounds(client, stuff, ledWire, ledWire + 1)) {
6542 if (!_XkbCheckRequestBounds(client, stuff, atomWire, atomWire + 1)) {
6562 if (!_XkbCheckRequestBounds(client, stuff, mapWire, mapWire + 1)) {
6603 xkbSetDeviceInfoReq *stuff)
6607 wire= (char *)&stuff[1];
6608 if (stuff->change&XkbXI_ButtonActionsMask) {
6613 if ((stuff->firstBtn+stuff->nBtns)>dev->button->numButtons) {
6614 client->errorValue= _XkbErrCode4(0x02,stuff->firstBtn,stuff->nBtns,
6618 wire+= (stuff->nBtns*SIZEOF(xkbActionWireDesc));
6620 if (stuff->change&XkbXI_IndicatorsMask) {
6622 wire= CheckSetDeviceIndicators(wire,dev,stuff->nDeviceLedFBs,
6627 if (((wire-((char *)stuff))/4)!=stuff->length)
6635 xkbSetDeviceInfoReq *stuff)
6642 wire= (char *)&stuff[1];
6643 if (stuff->change&XkbXI_ButtonActionsMask) {
6656 if (stuff->firstBtn + stuff->nBtns > nBtns)
6658 sz= stuff->nBtns*SIZEOF(xkbActionWireDesc);
6659 if (!_XkbCheckRequestBounds(client, stuff, wire, (char *) wire + sz))
6661 memcpy((char *)&acts[stuff->firstBtn],(char *)wire,sz);
6664 ed.firstBtn= stuff->firstBtn;
6665 ed.nBtns= stuff->nBtns;
6669 acts= &dev->button->xkb_acts[stuff->firstBtn];
6670 for (i=0;i<stuff->nBtns;i++,acts++) {
6675 if (stuff->change&XkbXI_IndicatorsMask) {
6677 wire= SetDeviceIndicators(wire,dev,stuff->change,
6678 stuff->nDeviceLedFBs, &status,client,&ed, stuff);
6682 if ((stuff->change)&&(ed.reason))
6699 CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
6700 CHK_MASK_LEGAL(0x01,stuff->change,XkbXI_AllFeaturesMask);
6702 rc = _XkbSetDeviceInfoCheck(client, dev, stuff);
6707 if (stuff->deviceSpec == XkbUseCoreKbd || stuff->deviceSpec == XkbUseCorePtr)
6713 ((stuff->deviceSpec == XkbUseCoreKbd && other->key) ||
6714 (stuff->deviceSpec == XkbUseCorePtr && other->button)))
6719 rc = _XkbSetDeviceInfoCheck(client, other, stuff);
6728 rc = _XkbSetDeviceInfo(client, dev, stuff);
6732 if (stuff->deviceSpec == XkbUseCoreKbd || stuff->deviceSpec == XkbUseCorePtr)
6738 ((stuff->deviceSpec == XkbUseCoreKbd && other->key) ||
6739 (stuff->deviceSpec == XkbUseCorePtr && other->button)))
6744 rc = _XkbSetDeviceInfo(client, other, stuff);
6771 newFlags= xkbDebugFlags&(~stuff->affectFlags);
6772 newFlags|= (stuff->flags&stuff->affectFlags);
6773 newCtrls= xkbDebugCtrls&(~stuff->affectCtrls);
6774 newCtrls|= (stuff->ctrls&stuff->affectCtrls);
6775 if (xkbDebugFlags || newFlags || stuff->msgLength) {
6780 extraLength= (stuff->length<<2)-sz_xkbSetDebuggingFlagsReq;
6781 if (stuff->msgLength>0) {
6783 if (extraLength<XkbPaddedSize(stuff->msgLength)) {
6785 stuff->msgLength,(long)extraLength,
6786 XkbPaddedSize(stuff->msgLength));
6789 msg= (char *)&stuff[1];
6790 if (msg[stuff->msgLength-1]!='\0') {
6824 switch (stuff->data)