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       #include <X11/Intrinsic.h>
11
12       void XtGrabKey(Widget widget, KeyCode keycode, Modifiers modifiers,
13              Boolean owner_events, int pointer_mode, int keyboard_mode);
14
15       void XtUngrabKey(Widget widget, KeyCode keycode, Modifiers modifiers);
16
17       int XtGrabKeyboard(Widget widget, Boolean owner_events, int
18              pointer_mode, int keyboard_mode, Time time);
19
20       void XtUngrabKeyboard(Widget widget, Time time);
21
22       void XtGrabButton(Widget widget, int button, Modifiers modifiers, Bool‐
23              ean owner_events, unsigned int event_mask, int pointer_mode, int
24              keyboard_mode, Window confine_to, Cursor cursor);
25
26       void XtUngrabButton(Widget widget, unsigned button, Modifiers modi‐
27              fiers);
28
29       int XtGrabPointer(Widget widget, Boolean owner_events, unsigned int
30              event_mask, int pointer_mode, int keyboard_mode, Window con‐
31              fine_to, Cursor cursor, Time time);
32
33       void XtUngrabPointer(Widget widget, Time time);
34

ARGUMENTS

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

DESCRIPTION

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

SEE ALSO

111       X Toolkit Intrinsics - C Language Interface
112       Xlib - C Language X Interface
113
114
115
116X Version 11                     libXt 1.1.5.1                    XtGrabKey(3)
Impressum