3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
6 .\" Manual: [FIXME: manual]
7 .\" Source: [FIXME: source]
10 .TH "XGRABDEVICE" "libmansuffix" "09/23/2011" "[FIXME: source]" "[FIXME: manual]"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 XGrabDevice, XUngrabDevice \- grab/release the specified extension device
35 #include <X11/extensions/XInput\&.h>
39 int XGrabDevice( Display *display,
44 XEventClass *event_list,
46 int other_devices_mode,
51 int XUngrabDevice( Display *display,
58 Specifies the connection to the X server\&.
63 Specifies the device to be grabbed or released\&.
68 Specifies the id of a window to be associated with the
74 Specifies a Boolean value that indicates whether
75 theevents from the deviceare to be reported as usual or
76 reported with respect to the grab windowif selected by
82 Specifies the number of elements in the event_list
88 Specifies a pointer to a list of event classes that
89 indicates which eventsthe client wishes to receive\&.
90 These event classes must have beenobtained specifying
91 the device being grabbed\&.
96 Specifies further processing of events from this
97 device\&.You can pass GrabModeSyncor GrabModeAsync\&.
102 Specifies further processing of events from other
103 devices\&.You can pass GrabModeSyncor GrabModeAsync\&.
108 Specifies the time\&.You can pass either a timestamp or
117 The XGrabDevice request actively grabs control of the device
118 and generates DeviceFocusIn and DeviceFocusOut events\&. Further
119 device events are reported only to the grabbing
120 client\&.XGrabDevice overrides any active device grab by this
121 client\&. event_list is a pointer to a list of event classes\&.
122 This list indicates which events the client wishes to receive
123 while the grab is active\&. If owner_events is False, all
124 generated device events are reported with respect to
125 grab_window if selected\&. If owner_events is True and if a
126 generated device event would normally be reported to this
127 client, it is reported normally; otherwise, the event is
128 reported with respect to the grab_window, and is only reported
129 if specified in the event_list\&.
139 If the this_device_mode argument is GrabModeAsync, device event
140 processing continues as usual\&. If the device is currently
141 frozen by this client, then processing of device events is
142 resumed\&. If the this_device_mode argument is GrabModeSync, the
143 state of the device (as seen by client applications) appears to
144 freeze, and the X server generates no further device events
145 until the grabbing client issues a releasing XAllowDeviceEvents
146 call or until the device grab is released\&. Actual device
147 changes are not lost while the device is frozen; they are
148 simply queued in the server for later processing\&.
158 If other_devices_mode is GrabModeAsync, processing of events
159 from other devices is unaffected by activation of the grab\&. If
160 other_devices_mode is GrabModeSync, the state of all devices
161 except the grabbed device (as seen by client applications)
162 appears to freeze, and the X server generates no further events
163 from those devices until the grabbing client issues a releasing
164 XAllowDeviceEvents call or until the device grab is released\&.
165 Actual events are not lost while the devices are frozen; they
166 are simply queued in the server for later processing\&.
176 If the device is actively grabbed by some other client,
177 XGrabDevice fails and returns AlreadyGrabbed\&. If grab_window is
178 not viewable, it fails and returns GrabNotViewable\&. If the
179 device is frozen by an active grab of another client, it fails
180 and returns GrabFrozen\&. If the specified time is earlier than
181 the last\-device\-grab time or later than the current X server
182 time, it fails and returns GrabInvalidTime\&. Otherwise, the
183 last\-device\-grab time is set to the specified time (
184 CurrentTime is replaced by the current X server time)\&.
194 If a grabbed device is closed by a client while an active grab
195 by that client is in effect, the active grab is released\&. If
196 the device is frozen only by an active grab of the requesting
197 client, it is thawed\&.
207 XGrabDevice can generate BadClass, BadDevice, BadValue, and
218 The XUngrabDevice request releases the device and any queued
219 events if this client has it actively grabbed from either
220 XGrabDevice or XGrabDeviceKey\&. If other devices are frozen by
221 the grab, XUngrabDevice thaws them\&.XUngrabDevice does not
222 release the device and any queued events if the specified time
223 is earlier than the last\-device\-grab time or is later than the
224 current X server time\&. It also generates DeviceFocusIn and
225 DeviceFocusOut events\&. The X server automatically performs an
226 UngrabDevice request if the event window for an active device
227 grab becomes not viewable\&.
237 XUngrabDevice can generate a BadDevice error\&.
249 An invalid device was specified\&. The specified device
250 does not exist or has not been opened by this client via
251 XOpenInputDevice\&. This error may also occur if the
252 specified device is the X keyboard or X pointer device\&.
263 Some numeric value falls outside the range of values
264 accepted by the request\&. Unless a specific range is
265 specified for an argument, the full range defined by the
266 argument\*(Aqs type is accepted\&. Any argument defined as a
267 set of alternatives can generate this error\&.
278 A value for a Window argument does not name a defined
290 XAllowDeviceEvents(libmansuffix), XGrabDeviceButton(libmansuffix), XGrabDeviceKey(libmansuffix)