1XtGrabKey(3)                     XT FUNCTIONS                     XtGrabKey(3)
2
3
4

NAME

6       XtGrabKey, XtUngrabKey, XtGrabKeyboard, XtUngrabKeyboard, XtGrabButton,
7       XtUngrabButton, XtGrabPointer, XtUngrabPointer - manage grabs
8

SYNTAX

10       void XtGrabKey(Widget widget, KeyCode keycode, Modifiers modifiers,
11              Boolean owner_events, int pointer_mode, int keyboard_mode);
12
13       void XtUngrabKey(Widget widget, KeyCode keycode, Modifiers modifiers);
14
15       int XtGrabKeyboard(Widget widget, Boolean owner_events, int
16              pointer_mode, int keyboard_mode, Time time);
17
18       void XtUngrabKeyboard(Widget widget, Time time);
19
20       void XtGrabButton(Widget widget, int button, Modifiers modifiers, Bool‐
21              ean owner_events, unsigned int event_mask, int pointer_mode, int
22              keyboard_mode, Window confine_to, Cursor cursor);
23
24       void XtUngrabButton(Widget widget, KeyCode button, Modifiers modi‐
25              fiers);
26
27       int XtGrabPointer(Widget widget, Boolean owner_events, unsigned int
28              event_mask, int pointer_mode, int keyboard_mode, Window con‐
29              fine_to, Cursor cursor, Time time);
30
31       void XtUngrabPointer(Widget widget, Time time);
32

ARGUMENTS

34       widget    Specifies the widget in whose window the grab will occur.
35                 Must be of class Core or a subclass thereof.
36
37       keycode
38       modifiers
39       owner_events
40       pointer_mode
41       keyboard_mode
42       time
43       button
44       confine_to
45       cursor    Specifies arguments to the associated Xlib function call.
46

DESCRIPTION

48       XtGrabKey calls XGrabKey specifying the widget's window as the grab
49       window if the widget is realized. The remaining arguments are exactly
50       as for XGrabKey.  If the widget is not realized, or is later unreal‐
51       ized, the call to XGrabKey will be performed (again) when the widget is
52       realized and its window becomes mapped. In the future, if XtDis‐
53       patchEvent is called with a KeyPress event matching the specified key‐
54       code and modifiers (which may be AnyKey or AnyModifier, respectively)
55       for the widget's window, the Intrinsics will call XtUngrabKeyboard with
56       the timestamp from the KeyPress event if either of the following condi‐
57       tions is true:
58
59       ·  There is a modal cascade and the widget is not in the active subset
60          of the cascade and the keyboard was not previously grabbed, or
61
62       ·  XFilterEvent returns True.
63
64       XtUngrabKey calls XUngrabKey specifying the widget's window as the
65       ungrab window if the widget is realized. The remaining arguments are
66       exactly as for XUngrabKey.  If the widget is not realized, XtUngrabKey
67       removes a deferred XtGrabKey request, if any, for the specified widget,
68       keycode, and modifiers.
69
70       If the specified widget is realized XtGrabKeyboard calls XGrabKeyboard
71       specifying the widget's window as the grab window. The remaining argu‐
72       ments and return value are exactly as for XGrabKeyboard.  If the widget
73       is not realized, XtGrabKeyboard immediately returns GrabNotViewable.
74       No future ungrab is implied by XtGrabKeyboard.
75
76       XtUngrabKeyboard calls XUngrabKeyboard with the specified time.
77
78       XtGrabButton calls XGrabButton specifying the widget's window as the
79       grab window if the widget is realized. The remaining arguments are
80       exactly as for XGrabButton.  If the widget is not realized, or is later
81       unrealized, the call to XGrabButton will be performed (again) when the
82       widget is realized and its window becomes mapped. In the future, if
83       XtDispatchEvent is called with a ButtonPress event matching the speci‐
84       fied button and modifiers (which may be AnyButton or AnyModifier,
85       respectively) for the widget's window, the Intrinsics will call
86       XtUngrabPointer with the timestamp from the ButtonPress event if either
87       of the following conditions is true:
88
89       ·  There is a modal cascade and the widget is not in the active subset
90          of the cascade and the pointer was not previously grabbed, or
91
92       ·  XFilterEvent returns True.
93
94       XtUngrabButton calls XUngrabButton specifying the widget's window as
95       the ungrab window if the widget is realized. The remaining arguments
96       are exactly as for XUngrabButton.  If the widget is not realized,
97       XtUngrabButton removes a deferred XtGrabButton request, if any, for the
98       specified widget, button, and modifiers.
99
100       XtGrabPointer calls XGrabPointer specifying the widget's window as the
101       grab window. The remaining arguments and return value are exactly as
102       for XGrabPointer.  If the widget is not realized, XtGrabPointer immedi‐
103       ately returns GrabNotViewable.  No future ungrab is implied by XtGrab‐
104       Pointer.
105
106       XtUngrabPointer calls XUngrabPointer with the specified time.
107

SEE ALSO

109       X Toolkit Intrinsics - C Language Interface
110       Xlib - C Language X Interface
111
112
113
114X Version 11                      libXt 1.1.5                     XtGrabKey(3)
Impressum