58a10de8247d3454d8fa38caf7efff16b0039acb
[platform/upstream/libXi.git] / man / XAllowDeviceEvents.man
1 '\" t
2 .\"     Title: xallowdeviceevents
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\"      Date: 09/23/2011
6 .\"    Manual: [FIXME: manual]
7 .\"    Source: [FIXME: source]
8 .\"  Language: English
9 .\"
10 .TH "XALLOWDEVICEEVENTS" "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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 XAllowDeviceEvents \- release queued events
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 #include <X11/extensions/XInput\&.h>
36 .fi
37 .sp
38 .nf
39 int XAllowDeviceEvents( Display *display,
40                         XDevice *device,
41                         int event_mode,
42                         Time time);
43 display
44        Specifies the connection to the X server\&.
45 .fi
46 .sp
47 .nf
48 device
49        Specifies the device from which events are to be
50        allowed\&.
51 .fi
52 .sp
53 .nf
54 event_mode
55        Specifies the event mode\&.You can pass AsyncThisDevice,
56        SyncThisDevice, ReplayThisDevice, AsyncOtherDevices,
57        SyncAll,or AsyncAll\&.
58 .fi
59 .sp
60 .nf
61 time
62        Specifies the time\&.You can pass either a timestamp or
63        CurrentTime\&.
64 .fi
65 .SH "DESCRIPTION"
66 .sp
67 The XAllowDeviceEvents function releases some queued events if the client has caused a device to freeze\&. It has no effect if the specified time is earlier than the last\-grab time of the most recent active grab for the client and device, or if the specified time is later than the current X server time\&.
68 .sp
69 The following describes the processing that occurs depending on what constant you pass to the event_mode argument\&.
70 .sp
71 .RS 4
72 .ie n \{\
73 \h'-04'\(bu\h'+03'\c
74 .\}
75 .el \{\
76 .sp -1
77 .IP \(bu 2.3
78 .\}
79 AsyncThisDevice \- If the specified device is frozen by the client, event processing for that device continues as usual\&. If the device is frozen multiple times by the client on behalf of multiple separate grabs, AsyncThisDevice thaws for all\&.AsyncThisDevice has no effect if the specified device is not frozen by the client, but the device need not be grabbed by the client\&.
80 .RE
81 .sp
82 .RS 4
83 .ie n \{\
84 \h'-04'\(bu\h'+03'\c
85 .\}
86 .el \{\
87 .sp -1
88 .IP \(bu 2.3
89 .\}
90 SyncThisDevice \- If the specified device is frozen and actively grabbed by the client, event processing for that device continues normally until the next key or button event is reported to the client\&. At this time, the specified device again appears to freeze\&. However, if the reported event causes the grab to be released, the specified device does not freeze\&. SyncThisDevice has no effect if the specified device is not frozen by the client or is not grabbed by the client\&.
91 .RE
92 .sp
93 .RS 4
94 .ie n \{\
95 \h'-04'\(bu\h'+03'\c
96 .\}
97 .el \{\
98 .sp -1
99 .IP \(bu 2.3
100 .\}
101 ReplayThisDevice \- If the specified device is actively grabbed by the client and is frozen as the result of an event having been sent to the client (either from the activation of a GrabDeviceButton or from a previous AllowDeviceEvents with mode SyncThisDevice, but not from a GrabDevice), the grab is released and that event is completely reprocessed\&. This time, however, the request ignores any passive grabs at or above (toward the root) that the grab\-window of the grab just released\&. The request has no effect if the specified device is not grabbed by the client or if it is not frozen as the result of an event\&.
102 .RE
103 .sp
104 .RS 4
105 .ie n \{\
106 \h'-04'\(bu\h'+03'\c
107 .\}
108 .el \{\
109 .sp -1
110 .IP \(bu 2.3
111 .\}
112 AsyncOtherDevices \- If the remaining devices are frozen by the client, event processing for them continues as usual\&. If the other devices are frozen multiple times by the client on behalf of multiple grabs, AsyncOtherDevices "thaws" for all\&. AsyncOtherDevices has no effect if the devices are not frozen by the client\&.
113 .RE
114 .sp
115 .RS 4
116 .ie n \{\
117 \h'-04'\(bu\h'+03'\c
118 .\}
119 .el \{\
120 .sp -1
121 .IP \(bu 2.3
122 .\}
123 SyncAll \- If all devices are frozen by the client, event processing (for all devices) continues normally until the next button or key event is reported to the client for a grabbed device, at which time all devices again appear to freeze\&. However, if the reported event causes the grab to be released, then the devices do not freeze\&. If any device is still grabbed, then a subsequent event for it will still cause all devices to freeze\&. SyncAll has no effect unless all devices are frozen by the client\&. If any device is frozen twice by the client on behalf of two separate grabs, SyncAll thaws for both\&. A subsequent freeze for SyncAll will only freeze each device once\&.
124 .RE
125 .sp
126 .RS 4
127 .ie n \{\
128 \h'-04'\(bu\h'+03'\c
129 .\}
130 .el \{\
131 .sp -1
132 .IP \(bu 2.3
133 .\}
134 AsyncAll \- If all devices are frozen by the client, event processing for all devices continues normally\&. If any device is frozen multiple times by the client on behalf of multiple separate grabs, AsyncAll thaws for all\&. AsyncAll has no effect unless all devices are frozen by the client\&.
135 .RE
136 .sp
137 AsyncThisDevice, SyncThisDevice, and ReplayThisDevice have no effect on the processing of events from the remaining devices\&.AsyncOtherDevices has no effect on the processing of events from the specified device\&. When the event_mode is SyncAll or AsyncAll, the device parameter is ignored\&.
138 .sp
139 It is possible for several grabs of different devices by the same or different clients to be active simultaneously\&. If a device is frozen on behalf of any grab, no event processing is performed for the device\&. It is possible for a single device to be frozen because of several grabs\&. In this case, the freeze must be released on behalf of each grab before events can again be processed\&.
140 .sp
141 XAllowDeviceEvents can generate a BadDevice or BadValue error\&.
142 .SH "DIAGNOSTICS"
143 .sp
144 .if n \{\
145 .RS 4
146 .\}
147 .nf
148 BadDevice
149        An invalid device was specified\&. The specified device
150        does not exist or has not been opened by this client via
151        XOpenInputDevice\&. This error may also occur if the
152        specified device is the X keyboard or X pointer device\&.
153 .fi
154 .if n \{\
155 .RE
156 .\}
157 .sp
158 .if n \{\
159 .RS 4
160 .\}
161 .nf
162 BadValue
163        An invalid mode was specified on the request\&.
164 .fi
165 .if n \{\
166 .RE
167 .\}
168 .SH "SEE ALSO"
169 .sp
170 .if n \{\
171 .RS 4
172 .\}
173 .nf
174 XGrabDevice(libmansuffix)
175 .fi
176 .if n \{\
177 .RE
178 .\}