Lines Matching defs:grab
141 * Allocate a new grab entry, and fill in all of the fields using the
157 XtServerGrabPtr grab;
161 grab = (XtServerGrabPtr) __XtMalloc(sizeof(XtServerGrabRec) +
164 grab->next = NULL;
165 grab->widget = widget;
166 XtSetBit(grab->ownerEvents, ownerEvents);
167 XtSetBit(grab->pointerMode, pointer_mode);
168 XtSetBit(grab->keyboardMode, keyboard_mode);
169 grab->eventMask = (unsigned short) event_mask;
170 XtSetBit(grab->hasExt, need_ext);
171 grab->confineToIsWidgetWin = (XtWindow(widget) == confine_to);
172 grab->modifiers = (unsigned short) modifiers;
173 grab->keybut = keybut;
175 XtServerGrabExtPtr ext = GRABEXT(grab);
182 return grab;
186 * Free up the space occupied by a grab entry.
272 * If the two grab events match exactly, or if the first grab entry
273 * 'encompasses' the second grab entry, then TRUE is returned.
314 * 1) The two grab entries match exactly, or the first grab entry
315 * encompasses the second grab entry.
316 * 2) The second grab entry encompasses the first grab entry.
371 * Delete a grab combination from the passive grab list. Each entry will
372 * be checked to see if it is affected by the grab being deleted. This
381 register XtServerGrabPtr grab;
384 for (next = passiveListPtr; (grab = *next);) {
385 if (GrabMatchesSecond(grab, pMinuendGrab) &&
386 (pDisplay(grab) == pDisplay(pMinuendGrab))) {
387 if (GrabSupersedesSecond(pMinuendGrab, grab)) {
392 *next = grab->next;
393 FreeGrab(grab);
397 if (!grab->hasExt) {
398 grab = (XtServerGrabPtr)
399 XtRealloc((char *) grab, (sizeof(XtServerGrabRec) +
401 *next = grab;
402 grab->hasExt = True;
403 ext = GRABEXT(grab);
410 ext = GRABEXT(grab);
411 if ((grab->keybut == AnyKey) && (grab->modifiers != AnyModifier)) {
420 else if ((grab->modifiers == AnyModifier) &&
421 (grab->keybut != AnyKey)) {
445 pNewGrab = CreateGrab(grab->widget,
446 (Boolean) grab->ownerEvents,
449 (int) grab->pointerMode,
450 (int) grab->keyboardMode,
490 XtServerGrabPtr next, grab;
493 grab = next;
494 next = grab->next;
500 FreeGrab(grab);
520 /* Remove the active grab, if necessary */
522 (pdi->keyboard.grab.widget == w)) {
527 (pdi->pointer.grab.widget == w))
537 * If the incoming event is on the passive grab list, then activate
538 * the grab. The grab will remain in effect until the key is released.
544 register XtServerGrabPtr grab;
574 for (grab = *passiveListPtr; grab; grab = grab->next) {
575 if (GrabMatchesSecond(&tempGrab, grab))
576 return (grab);
599 MakeGrab(XtServerGrabPtr grab,
606 XtAddEventHandler(grab->widget, ButtonReleaseMask, FALSE,
612 XGrabKey(pDisplay(grab),
613 grab->keybut, grab->modifiers,
614 pWindow(grab), grab->ownerEvents,
615 grab->pointerMode, grab->keyboardMode);
621 if (grab->hasExt) {
622 if (grab->confineToIsWidgetWin)
623 confineTo = XtWindow(grab->widget);
625 confineTo = GRABEXT(grab)->confineTo;
626 cursor = GRABEXT(grab)->cursor;
628 XGrabButton(pDisplay(grab),
629 grab->keybut, grab->modifiers,
630 pWindow(grab), grab->ownerEvents, grab->eventMask,
631 grab->pointerMode, grab->keyboardMode, confineTo, cursor);
634 /* Add the new grab entry to the passive key grab list */
635 grab->next = *passiveListPtr;
636 *passiveListPtr = grab;
654 XtServerGrabPtr grab;
657 grab = next;
658 next = grab->next;
659 pwi = _XtGetPerWidgetInput(grab->widget, FALSE);
660 MakeGrab(grab, passiveListPtr, isKeyboard, pdi, pwi);
697 * Routine used by an application to set up a passive grab for a key/modifier
731 * if the widget is realized then process the entry into the grab
763 /* Build a temporary grab list entry */
778 "Attempt to remove nonexistent passive grab",
794 /* Delete all entries which are encompassed by the specified grab. */
837 * Routine used by an application to clear a passive grab for a key/modifier
862 * Active grab of Device. clear any client side grabs so we don't lock
900 /* fill in the server grab rec */
901 device->grab.widget = widget;
902 device->grab.modifiers = 0;
903 device->grab.keybut = 0;
904 XtSetBit(device->grab.ownerEvents, owner_events);
905 XtSetBit(device->grab.pointerMode, pointer_mode);
906 XtSetBit(device->grab.keyboardMode, keyboard_mode);
907 device->grab.hasExt = False;
943 * Active grab of keyboard. clear any client side grabs so we don't lock
979 * grab the pointer