REF XT_GRAB                                         Adrian Howard Jun 91

       COPYRIGHT University of Sussex 1990. All Rights Reserved.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<                             >>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<  INPUT "GRABBING" ROUTINES  >>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<                             >>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

This REF  file  details  the  procedures supplied  by  the  two  library
packages LIB * FAST_XT_GRAB and LIB * XT_GRAB  which provide the  Pop-11
interface to  some X  Toolkit  routines for  redirecting user  input  to
widgets.

         CONTENTS - (Use <ENTER> g to access required sections)

  1   Introduction

  2   LIB XT_GRAB

  3   LIB FAST_XT_GRAB



---------------
1  Introduction
---------------
The following routines provide the following functions:

  # Redirection  of input  to a  modal widget.  (The difference  between
    modal widgets and normal widgets is that the former will prevent any
    user events being delivered outside the modal widget itself).

  # Removal of the redirection of user events to a modal widget.

  # Addition/removal  of a  passive grab  on a  single key  by a  single
    widget

  # Addition/removal  of an  active grab  on the  keyboard by  a  single
    widget.

  # Addition/removal of a passive grab  on a single pointer button  by a
    single widget.

  # Addition/removal  of an  active  grab on  the  pointer by  a  single
    widget.

  # The redirection of keyboard input.

The  exact  structure  of  arguments  and  results  for  the   following
procedures is as discussed in REF * XTOOLKIT

Data structure support for TimePtrs is provided by LIB * XT_GRAB.

Note: a number  of these routines  use Xlib data  types (Window,  Cursor
etc.) for which no  high level support has  been provided, so that  they
appear in Poplog as simple integers.

For more details see sections 7.2 and 7.3 of:

               X Toolkit Intrinsics - C Language Interface
                             X Window System
                         X Version 11, Release 4

        Copyright (C)  1985,  1986,  1987,  1988,  Massachusetts
        Institute of Technology,  Cambridge, Massachusetts,  and
        Digital Equipment Corporation, Maynard, Massachusetts.




--------------
2  LIB XT_GRAB
--------------

XtAddGrab(widget, exclusive_bool, spring_loaded_bool)        [procedure]
        Redirect user input to a modal widget.


XtRemoveGrab(widget)                                         [procedure]
        Stops the redirection of user input to a model widget.


XtGrabKey(widget, keycode, modifiers, bool, ptr, kbd)        [procedure]
        Passively grab a single key.


XtUngrabKey(widget, keycode, modifiers)                      [procedure]
        Cancel a passive key grab.


XtGrabButton(widget, button, modifiers, bool, event_mask,    [procedure]
             ptr, kbd, window, cursor)
        Passively grab a single pointer button.


XtUngrabButton(widget, button_int, modifiers)                [procedure]
        Cancel a passive button grab.


XtGrabKeyboard(widget, bool, ptr, kbd, time) -> int          [procedure]
        Actively grab the keyboard.


XtUngrabKeyboard(widget, keycode, modifiers)                 [procedure]
        Cancel an active keyboard grab.


XtGrabPointer(widget, bool, event_mask, ptr, kbd, window,    [procedure]
              cursor, time) -> int
        Actively grab the pointer.


XtUngrabPointer(widget, time)                                [procedure]
        Cancel an active pointer grab.


XtSetKeyboardFocus(subtree_widget, descendant_widget)        [procedure]
        Redirect keyboard input to a normal descendant of a widget.


XtCallAcceptFocus(widget, timeptr) -> bool                   [procedure]
        Call a widgets accept_focus procedure.




-------------------
3  LIB FAST_XT_GRAB
-------------------

fast_XtAddGrab(widget, exclusive_bool, spring_loaded_bool)   [procedure]
fast_XtRemoveGrab(widget)                                    [procedure]
fast_XtGrabKey(widget, keycode, modifiers, bool, ptr, kbd)   [procedure]
fast_XtUngrabKey(widget, keycode, modifiers)                 [procedure]
fast_XtGrabButton(widget, button, modifiers, bool,           [procedure]
             event_mask, ptr, kbd, window, cursor)
fast_XtUngrabButton(widget, button_int, modifiers)           [procedure]
fast_XtGrabKeyboard(widget, bool, ptr, kbd, time) -> int     [procedure]
fast_XtUngrabKeyboard(widget, keycode, modifiers)            [procedure]
fast_XtGrabPointer(widget, bool, event_mask, ptr, kbd,       [procedure]
              window, cursor, time) -> int
fast_XtUngrabPointer(widget, time)                           [procedure]
fast_XtSetKeyboardFocus(subtree_widget, descendant_widget)   [procedure]
fast_XtCallAcceptFocus(widget, timeptr) -> bool              [procedure]
        As for the procedures in  LIB * XT_GRAB, but without checks  for
        valid arguments. These procedures should  only be used in  fully
        debugged programs. See  REF * XTOOLKIT for full  details of  the
        Poplog  X  naming  conventions  for  non-checking  and  checking
        procedures.



--- C.x/x/pop/ref/xt_grab
--- Copyright University of Sussex 1993. All rights reserved.
